gik-components 0.2.1

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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +373 -0
  3. package/dist/agent-facing-DjAMQ4Ju.d.ts +110 -0
  4. package/dist/agent-facing.d.ts +8 -0
  5. package/dist/agent-facing.js +2 -0
  6. package/dist/agent-facing.js.map +1 -0
  7. package/dist/chunk-2I33SAGT.js +2 -0
  8. package/dist/chunk-2I33SAGT.js.map +1 -0
  9. package/dist/chunk-2XVVN3LX.js +7 -0
  10. package/dist/chunk-2XVVN3LX.js.map +1 -0
  11. package/dist/chunk-4BIHH7HT.js +2 -0
  12. package/dist/chunk-4BIHH7HT.js.map +1 -0
  13. package/dist/chunk-6JMFZS2Y.js +2 -0
  14. package/dist/chunk-6JMFZS2Y.js.map +1 -0
  15. package/dist/chunk-6TBEAKS7.js +2 -0
  16. package/dist/chunk-6TBEAKS7.js.map +1 -0
  17. package/dist/chunk-DMIV5ZI5.js +2 -0
  18. package/dist/chunk-DMIV5ZI5.js.map +1 -0
  19. package/dist/chunk-DNHCWSHQ.js +2 -0
  20. package/dist/chunk-DNHCWSHQ.js.map +1 -0
  21. package/dist/chunk-GL7PGK3G.js +2 -0
  22. package/dist/chunk-GL7PGK3G.js.map +1 -0
  23. package/dist/chunk-H6T3CCU5.js +2 -0
  24. package/dist/chunk-H6T3CCU5.js.map +1 -0
  25. package/dist/chunk-OFWGYY7S.js +2 -0
  26. package/dist/chunk-OFWGYY7S.js.map +1 -0
  27. package/dist/chunk-UP2OAMPY.js +2 -0
  28. package/dist/chunk-UP2OAMPY.js.map +1 -0
  29. package/dist/chunk-VR5CS5LA.js +2 -0
  30. package/dist/chunk-VR5CS5LA.js.map +1 -0
  31. package/dist/chunk-XA6FE7ZK.js +6 -0
  32. package/dist/chunk-XA6FE7ZK.js.map +1 -0
  33. package/dist/component-authoring-internal-DfFqqPhw.d.ts +40 -0
  34. package/dist/fluent.d.ts +103 -0
  35. package/dist/fluent.js +2 -0
  36. package/dist/fluent.js.map +1 -0
  37. package/dist/index.d.ts +139 -0
  38. package/dist/index.js +2 -0
  39. package/dist/index.js.map +1 -0
  40. package/dist/primitives.d.ts +440 -0
  41. package/dist/primitives.js +2 -0
  42. package/dist/primitives.js.map +1 -0
  43. package/dist/security.d.ts +39 -0
  44. package/dist/security.js +2 -0
  45. package/dist/security.js.map +1 -0
  46. package/dist/semantic.d.ts +147 -0
  47. package/dist/semantic.js +2 -0
  48. package/dist/semantic.js.map +1 -0
  49. package/dist/software.d.ts +44 -0
  50. package/dist/software.js +2 -0
  51. package/dist/software.js.map +1 -0
  52. package/package.json +83 -0
@@ -0,0 +1,2 @@
1
+ import{a as p,b as le,c as ce,d as w,e as R,f as T,g as pe,h as de,i as ue,j as me,k as be,l as fe,m as he,n as ge}from"./chunk-DNHCWSHQ.js";import{a as g,f as se,i as c,j as l}from"./chunk-XA6FE7ZK.js";import I from"react";import{Field as N,Input as Ke,SearchBox as $e,Tab as Ze,TabList as Qe,Tag as Ye,TagGroup as et,Textarea as tt}from"@fluentui/react-components";import{readProps as L}from"@gik-ai/react";var D={type:"object",additionalProperties:!1,required:["value","label"],properties:{value:{type:"string"},label:{type:"string"},disabled:{type:"boolean"}}};function A(e){return Array.isArray(e)?e.flatMap(t=>!t||typeof t!="object"||Array.isArray(t)?[]:typeof t.value!="string"||typeof t.label!="string"?[]:[{value:t.value,label:t.label,...typeof t.description=="string"?{description:t.description}:{},disabled:t.disabled===!0}]):[]}import{jsx as y,jsxs as mt}from"react/jsx-runtime";function ot(e){let[t,o]=I.useState(e);return I.useEffect(()=>o(e),[e]),[t,o]}var E=({node:e,emit:t})=>{let o=L(e);return y(N,{...l(e),label:o.str("label")||void 0,required:o.bool("required"),children:y(Ke,{type:o.bool("secret")?"password":"text",size:T(o.str("size"),e.props.variant),value:o.str("value"),placeholder:o.str("placeholder")||void 0,disabled:o.bool("disabled"),onChange:(n,a)=>{t("input",{value:a.value})}})})},_=({node:e,emit:t})=>{let o=L(e),n=typeof e.props.rows=="number"?e.props.rows:void 0;return y(N,{...l(e),label:o.str("label")||void 0,required:o.bool("required"),children:y(tt,{rows:n,size:T(o.str("size"),e.props.variant),value:o.str("value"),placeholder:o.str("placeholder")||void 0,disabled:o.bool("disabled"),onChange:(a,r)=>{t("input",{value:r.value})}})})},O=({node:e,emit:t})=>{let o=L(e),[n,a]=ot(o.str("value")),r=o.str("label");return y("form",{...l(e),onSubmit:i=>{i.preventDefault(),t("submit",{value:n})},children:y(N,{label:r||void 0,required:o.bool("required"),children:y($e,{value:n,size:T(o.str("size"),e.props.variant),placeholder:o.str("placeholder")||void 0,disabled:o.bool("disabled"),"aria-label":o.str("ariaLabel")||r||void 0,onChange:(i,s)=>a(s.value)})})})},q=({node:e,emit:t,children:o})=>{let n=L(e),a=A(e.props.options),r=Array.isArray(e.props.tabs)?e.props.tabs.flatMap(d=>{if(!d||typeof d!="object"||Array.isArray(d))return[];let k=d;return typeof k.value!="string"||typeof k.headerLabel!="string"?[]:[{value:k.value,label:k.headerLabel,disabled:k.disabled===!0}]}):a,i=I.Children.toArray(o),s=typeof e.props.active=="string",[h,b]=I.useState(()=>n.str("defaultActive")||r[0]?.value),x=s?n.str("active"):h,j=r.some(d=>d.value===x)?x:r[0]?.value,f=r.findIndex(d=>d.value===j),v=f>=0?i[f]:void 0;return mt("div",{...l(e),children:[y(Qe,{selectedValue:j,size:T(n.str("size"),e.props.variant),"aria-label":n.str("ariaLabel")||void 0,disabled:n.bool("disabled"),onTabSelect:(d,k)=>{let ie=String(k.value);s||b(ie),t("select",{value:ie})},children:r.map(d=>y(Ze,{value:d.value,disabled:d.disabled,children:d.label},d.value))}),e.props.tabs===void 0?i:v===void 0?null:y("div",{role:"tabpanel",children:v})]})},M=({node:e,emit:t})=>{let o=L(e),n=A(e.props.items),a=o.str("size"),r=a==="extra-small"||a==="small"||a==="medium"?a:e.props.variant==="compact"?"small":void 0;return y(et,{...l(e),dismissible:!0,disabled:o.bool("disabled"),"aria-label":o.str("ariaLabel")||void 0,onDismiss:(i,s)=>{t("remove",{value:String(s.value)})},children:n.map(i=>y(Ye,{value:i.value,disabled:i.disabled,size:r,children:i.label},i.value))})},S={type:"string"},U={value:S,label:S,placeholder:S,required:{type:"boolean"},disabled:{type:"boolean"},size:{type:"string",enum:R}},nt=c({type:"object",additionalProperties:!1,properties:{...U,secret:{type:"boolean"}}}),at=c({type:"object",additionalProperties:!1,properties:{...U,rows:{type:"number",minimum:1}}}),rt=c({type:"object",additionalProperties:!1,properties:{...U,ariaLabel:S}}),it=c({type:"object",additionalProperties:!1,anyOf:[{required:["tabs"]},{required:["options"]}],properties:{active:S,defaultActive:S,ariaLabel:S,disabled:{type:"boolean"},size:{type:"string",enum:R},tabs:{type:"array",minItems:1,items:{type:"object",additionalProperties:!1,required:["value","headerLabel"],properties:{value:{type:"string",minLength:1},headerLabel:{type:"string",minLength:1},disabled:{type:"boolean"}}}},options:{type:"array",items:D}}}),st=c({type:"object",additionalProperties:!1,required:["items"],properties:{ariaLabel:S,disabled:{type:"boolean"},size:{type:"string",enum:["extra-small",...R]},items:{type:"array",items:D}}}),lt={capability:"fluent:text-field",summary:"Renders a Fluent 2 text input that emits each edited value.",dataProp:"value",events:["input"],eventContracts:{input:g("The edited text value changes.",{value:{type:"string"}})},semanticTokens:[],defaultVariant:"standard",variants:w,authoring:{useWhen:["A short text value must update as the user types"],avoidWhen:["The value requires multiple lines","The value should commit only on form submission"],rules:["Use secret only for obscured text entry","Handle input outside the component"]}},ct={capability:"fluent:textarea",summary:"Renders a Fluent 2 multiline input that emits each edited value.",dataProp:"value",events:["input"],eventContracts:{input:g("The edited multiline value changes.",{value:{type:"string"}})},semanticTokens:[],defaultVariant:"standard",variants:w,authoring:{useWhen:["A multiline text value must update as the user types"],avoidWhen:["The value is short enough for a text field","The value should commit only on form submission"],rules:["Use rows only when the authored surface requires a specific initial height","Handle input outside the component"]}},pt={capability:"fluent:searchbox",summary:"Renders a Fluent 2 search box that emits its value when submitted.",dataProp:"value",events:["submit"],eventContracts:{submit:g("The user submits the search value.",{value:{type:"string"}})},semanticTokens:[],defaultVariant:"standard",variants:w,authoring:{useWhen:["A search or filtering value should be committed explicitly"],avoidWhen:["Every keystroke must update the result set; use text-field"],rules:["Provide label or ariaLabel","Handle submit outside the component"]}},dt={capability:"fluent:tab-bar",summary:"Renders Fluent 2 tabs and their ordered authored panes as one composed region.",dataProp:"tabs",events:["select"],eventContracts:{select:g("The active tab changes.",{value:{type:"string"}})},semanticTokens:[],defaultVariant:"standard",variants:w,authoring:{useWhen:["Peer views share one region and exactly one is active"],avoidWhen:["The choices set a form value rather than switching views"],rules:["Provide stable tab values and headerLabel values","Place one authored child for each tab, in the same order","Prefer local tab state and use defaultActive only to choose the initial tab","Bind active only when application behavior, persistence, or cross-Cell coordination controls the active tab","Handle select only when the application needs to observe or control tab selection"]}},ut={capability:"fluent:chips",summary:"Renders a Fluent 2 group of dismissible tags.",dataProp:"items",events:["remove"],eventContracts:{remove:g("The user removes a chip.",{value:{type:"string"}})},semanticTokens:[],defaultVariant:"standard",variants:w,authoring:{useWhen:["Users need to review and remove a compact set of discrete values"],avoidWhen:["Values are read-only","Users must add values within the same control"],rules:["Provide stable item values and labels","Handle remove outside the component"]}},ye=p(lt,nt,E,{label:"Name",value:"Ada"}),ve=p(ct,at,_,{label:"Notes",value:"Draft",rows:4}),we=p(pt,rt,O,{label:"Search incidents",value:"credential access"}),Ce=p(dt,it,q,{defaultActive:"all",ariaLabel:"Incident views",tabs:[{value:"all",headerLabel:"All"},{value:"open",headerLabel:"Open"}]}),Te=p(ut,st,M,{ariaLabel:"Selected techniques",items:[{value:"credential-access",label:"Credential access"}]});import{Dropdown as bt,Field as ft,Option as ht,Switch as gt,ToggleButton as yt}from"@fluentui/react-components";import{CircleRegular as vt,CircleSmallFilled as wt}from"@fluentui/react-icons";import{readProps as W}from"@gik-ai/react";import{jsx as V}from"react/jsx-runtime";function xe(e){let t=W(e),o=t.str("onValue","on"),n=t.str("offValue","off"),a=e.props.checked===!0||e.props.value===o;return{checked:a,label:a?t.str("onLabel",t.str("label")):t.str("offLabel",t.str("label")),onValue:o,offValue:n}}var H=({node:e,emit:t})=>{let o=W(e),n=xe(e),a=o.str("name");return V(gt,{...l(e),checked:n.checked,size:T(o.str("size"),e.props.variant)==="small"?"small":void 0,disabled:o.bool("disabled"),label:n.label,"aria-label":o.str("ariaLabel")||void 0,onChange:(r,i)=>{t("toggle",{checked:i.checked,value:i.checked?n.onValue:n.offValue,...a?{name:a}:{}})}})},G=({node:e,emit:t})=>{let o=W(e),n=xe(e),a=n.checked?o.str("onIcon"):o.str("offIcon"),r=B[a],i=n.checked?o.str("onTitle"):o.str("offTitle");return V(yt,{...l(e),checked:n.checked,size:T(o.str("size"),e.props.variant),disabled:o.bool("disabled"),icon:r,"aria-label":o.str("ariaLabel")||void 0,title:i||void 0,onClick:()=>{t("toggle",{checked:!n.checked,value:n.checked?n.offValue:n.onValue})},children:r?null:n.label})},B={acts:V(wt,{}),steps:V(vt,{})},X=({node:e,emit:t})=>{let o=W(e),n=A(e.props.options),a=o.str("value"),r=n.find(s=>s.value===a),i=o.str("label");return V(ft,{...l(e),label:i||void 0,required:o.bool("required"),children:V(bt,{"aria-label":o.str("ariaLabel")||i||void 0,size:T(o.str("size"),e.props.variant),placeholder:o.str("placeholder")||void 0,disabled:o.bool("disabled"),value:r?.label??"",selectedOptions:a?[a]:[],onOptionSelect:(s,h)=>{if(!h.optionValue)return;let b=n.find(x=>x.value===h.optionValue);t("select",{value:h.optionValue,label:b?.label??h.optionText})},children:n.map(s=>V(ht,{value:s.value,disabled:s.disabled,children:s.label},s.value))})})},De={value:{type:"string"},checked:{type:"boolean"},onValue:{type:"string"},offValue:{type:"string"},label:{type:"string"},onLabel:{type:"string"},offLabel:{type:"string"},disabled:{type:"boolean"},ariaLabel:{type:"string"},name:{type:"string"},size:{type:"string",enum:R}},Ct=c({type:"object",additionalProperties:!1,properties:De}),Tt=c({type:"object",additionalProperties:!1,properties:{...De,onIcon:{type:"string",enum:Object.keys(B)},offIcon:{type:"string",enum:Object.keys(B)},onTitle:{type:"string"},offTitle:{type:"string"}}}),xt=c({type:"object",additionalProperties:!1,properties:{value:{type:"string"},options:{type:"array",items:D},label:{type:"string"},placeholder:{type:"string"},ariaLabel:{type:"string"},required:{type:"boolean"},disabled:{type:"boolean"}},required:["options"]});function J(e,t,o,n,a,r,i,s){return{capability:e,summary:t,events:[o],eventContracts:{[o]:g(n,a,r)},semanticTokens:[],defaultVariant:"standard",variants:w,authoring:{useWhen:[i],avoidWhen:["A domain-specific component owns the interaction contract"],rules:s}}}var Dt=J("fluent:switch","Renders a Fluent 2 binary switch with value-derived state.","toggle","The switch changes between its authored values.",{checked:{type:"boolean"},value:{type:"string"},name:{type:"string"}},["checked","value"],"A binary setting benefits from a track-and-thumb control",["Declare stable on and off values","Handle toggle outside the component"]),St=J("fluent:toggle","Renders a compact Fluent 2 pressed-state toggle button.","toggle","The pressed state changes between its authored values.",{checked:{type:"boolean"},value:{type:"string"}},["checked","value"],"A binary mode needs a compact button presentation",["Declare stable on and off values","Use onIcon, offIcon, onTitle, offTitle, and ariaLabel for an icon-only toggle","Handle toggle outside the component"]),Pt=J("fluent:dropdown","Renders a single-select Fluent 2 dropdown from declarative options.","select","The selected option changes.",{value:{type:"string"},label:{type:"string"}},["value","label"],"A user selects one value from a small option set",["Provide stable option values","Provide label or ariaLabel","Handle select outside the component"]),Se=p(Dt,Ct,H,{value:"auto",onValue:"auto",offValue:"manual",onLabel:"Auto",offLabel:"Manual"}),Pe=p(St,Tt,G,{value:"auto",onValue:"auto",offValue:"manual",onLabel:"Auto",offLabel:"Manual"}),Fe=p(Pt,xt,X,{value:"soc-t3",ariaLabel:"Select demo Blueprint",options:[{value:"soc-t3",label:"Governed SOC investigation"},{value:"soc-executive",label:"SOC executive walkthrough"}]});import{DataGrid as Ft,DataGridBody as kt,DataGridCell as At,DataGridHeader as Vt,DataGridHeaderCell as Rt,DataGridRow as ke,List as Lt,ListItem as zt,Table as jt,TableBody as It,TableCell as Wt,TableHeader as Nt,TableHeaderCell as Et,TableRow as Ae,createTableColumn as _t,makeStyles as Ot,tokens as m}from"@fluentui/react-components";import{readProps as K}from"@gik-ai/react";import{jsx as u,jsxs as Y}from"react/jsx-runtime";var qt=[{value:"standard",summary:"Renders a non-selecting Fluent list.",useWhen:["Items are displayed for reading or navigation handled elsewhere"]},{value:"selectable",summary:"Enables Fluent single selection unless selectionMode is explicitly authored.",useWhen:["Users choose one or more items from the list"]},{value:"vertical-cards",summary:"Renders full-width vertically stacked cards with Fluent single selection.",useWhen:["Users choose an item from a prominent vertical set of options"]}],Mt=Ot({verticalCards:{display:"flex",flexDirection:"column",gap:m.spacingVerticalS,width:"100%"},verticalCard:{alignItems:"flex-start",boxSizing:"border-box",width:"100%",padding:`${m.spacingVerticalM} ${m.spacingHorizontalL}`,border:`${m.strokeWidthThin} solid ${m.colorNeutralStroke2}`,borderRadius:m.borderRadiusMedium,backgroundColor:m.colorNeutralBackground1,"&:hover":{backgroundColor:m.colorNeutralBackground1Hover},'&[aria-selected="true"]':{color:m.colorBrandForeground2,backgroundColor:m.colorBrandBackground2},'&[aria-selected="true"]:hover':{backgroundColor:m.colorBrandBackground2Hover}},verticalCardContent:{display:"grid",gap:m.spacingVerticalXXS,minWidth:0},verticalCardLabel:{fontWeight:m.fontWeightSemibold},verticalCardDescription:{color:m.colorNeutralForeground3,fontSize:m.fontSizeBase200}});function Ve(e){return Array.isArray(e)?e.flatMap(t=>!t||typeof t!="object"||Array.isArray(t)?[]:typeof t.id!="string"||typeof t.label!="string"?[]:[{id:t.id,label:t.label}]):[]}function Re(e){return Array.isArray(e)?e.flatMap(t=>{if(!t||typeof t!="object"||Array.isArray(t)||typeof t.id!="string")return[];let o=t.cells&&typeof t.cells=="object"&&!Array.isArray(t.cells)?t.cells:{};return[{id:t.id,cells:o}]}):[]}function Le(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function ze(e){return e==null?null:String(e)}var $=({node:e,emit:t})=>{let o=Mt(),n=K(e),a=A(e.props.items),r=e.props.variant==="vertical-cards",i=n.str("selectionMode"),s=i==="single"||i==="multiselect"?i:e.props.variant==="selectable"||r?"single":void 0,h=Le(e.props.selectedValues);return u(Lt,{...l(e,r?o.verticalCards:void 0),"aria-label":n.str("ariaLabel")||void 0,selectionMode:s,selectedItems:h,onSelectionChange:(b,x)=>{t("select",{values:[...x.selectedItems].map(String)})},children:a.map(b=>u(zt,{value:b.value,disabledSelection:b.disabled,checkmark:r?null:void 0,className:r?o.verticalCard:void 0,children:r?Y("span",{className:o.verticalCardContent,children:[u("span",{className:o.verticalCardLabel,children:b.label}),b.description?u("span",{className:o.verticalCardDescription,children:b.description}):null]}):b.label},b.value))})},Z=({node:e})=>{let t=K(e),o=Ve(e.props.columns),n=Re(e.props.rows),a=t.str("size"),r=a==="extra-small"||a==="small"||a==="medium"?a:e.props.variant==="compact"?"small":void 0;return Y(jt,{...l(e),"aria-label":t.str("ariaLabel")||void 0,size:r,children:[u(Nt,{children:u(Ae,{children:o.map(i=>u(Et,{children:i.label},i.id))})}),u(It,{children:n.map(i=>u(Ae,{children:o.map(s=>u(Wt,{children:ze(i.cells[s.id])},s.id))},i.id))})]})},Q=({node:e,emit:t})=>{let o=K(e),n=Ve(e.props.columns),a=Re(e.props.rows),r=o.str("selectionMode"),i=o.str("sortColumn"),s=o.str("sortDirection"),h=o.str("size"),b=h==="extra-small"||h==="small"||h==="medium"?h:e.props.variant==="compact"?"small":void 0,x=n.map(f=>_t({columnId:f.id,renderHeaderCell:()=>f.label,renderCell:v=>ze(v.cells[f.id])})),j=new Set(Le(e.props.selectedRowIds));return Y(Ft,{...l(e),"aria-label":o.str("ariaLabel")||void 0,items:a,columns:x,size:b,getRowId:f=>f.id,...r==="single"||r==="multiselect"?{selectionMode:r,selectedItems:j}:{},...i?{sortState:{sortColumn:i,sortDirection:s==="descending"?"descending":"ascending"}}:{},onSelectionChange:(f,v)=>{t("select",{rowIds:[...v.selectedItems].map(String)})},onSortChange:(f,v)=>{t("sort",{columnId:String(v.sortColumn),direction:v.sortDirection})},children:[u(Vt,{children:u(ke,{children:({renderHeaderCell:f})=>u(Rt,{children:f()})})}),u(kt,{children:({item:f,rowId:v})=>u(ke,{children:({renderCell:d})=>u(At,{children:d(f)})},v)})]})},P={type:"string"},Ut={type:"object",additionalProperties:!1,required:["id","label"],properties:{id:P,label:P}},Bt={type:["string","number","boolean","null"]},Ht={type:"object",additionalProperties:!1,required:["id","cells"],properties:{id:P,cells:{type:"object",additionalProperties:Bt}}},Gt={...D,properties:{...D.properties,description:{type:"string"}}},Xt=c({type:"object",additionalProperties:!1,required:["items"],properties:{ariaLabel:P,items:{type:"array",items:Gt},selectionMode:{type:"string",enum:["single","multiselect"]},selectedValues:{type:"array",items:P}}}),je={ariaLabel:P,columns:{type:"array",minItems:1,items:Ut},rows:{type:"array",items:Ht}},Jt=c({type:"object",additionalProperties:!1,required:["columns","rows"],properties:{...je,size:{type:"string",enum:["extra-small","small","medium"]}}}),Kt=c({type:"object",additionalProperties:!1,required:["columns","rows"],properties:{...je,selectionMode:{type:"string",enum:["single","multiselect"]},selectedRowIds:{type:"array",items:P},sortColumn:P,sortDirection:{type:"string",enum:["ascending","descending"]},size:{type:"string",enum:["extra-small","small","medium"]}}}),$t={capability:"fluent:list",summary:"Renders a Fluent 2 list with optional controlled item selection.",dataProp:"items",events:["select"],eventContracts:{select:g("The selected list values change.",{values:{type:"array",items:{type:"string"}}})},semanticTokens:[],defaultVariant:"standard",variants:qt,authoring:{useWhen:["A compact sequence of labeled values should be displayed or selected"],avoidWhen:["Values require columns; use table or data-grid"],rules:["Use stable item values","Use vertical-cards for a prominent full-width selection surface","Set selectionMode only when selection is required","Handle select outside the component"]}},Zt={capability:"fluent:table",summary:"Renders read-only row and column data with Fluent 2 table semantics.",dataProp:"rows",events:[],semanticTokens:[],defaultVariant:"standard",variants:w,authoring:{useWhen:["Structured data needs a read-only tabular presentation"],avoidWhen:["Rows need selection or columns need sorting; use data-grid"],rules:["Provide explicit columns","Provide each row as a stable id and cells map"]}},Qt={capability:"fluent:data-grid",summary:"Renders Fluent 2 tabular data with controlled row selection and sorting.",dataProp:"rows",events:["select","sort"],eventContracts:{select:g("The selected data-grid rows change.",{rowIds:{type:"array",items:{type:"string"}}}),sort:g("The data-grid sort changes.",{columnId:{type:"string"},direction:{enum:["ascending","descending"]}})},semanticTokens:[],defaultVariant:"standard",variants:w,authoring:{useWhen:["Tabular data needs row selection or sortable columns"],avoidWhen:["The table is display-only; use table","Users need spreadsheet editing"],rules:["Provide explicit columns and stable row ids","Apply sorting and selection state outside the component"]}},Ie=[{id:"status",label:"Status"},{id:"owner",label:"Owner"}],We=[{id:"incident-1",cells:{status:"Open",owner:"SOC"}},{id:"incident-2",cells:{status:"Resolved",owner:"IR"}}],Ne=p($t,Xt,$,{ariaLabel:"Incident states",items:[{value:"open",label:"Open"},{value:"resolved",label:"Resolved"}]}),Ee=p(Zt,Jt,Z,{ariaLabel:"Incident ownership",columns:Ie,rows:We}),_e=p(Qt,Kt,Q,{ariaLabel:"Selectable incidents",columns:Ie,rows:We,selectionMode:"single",selectedRowIds:["incident-1"],sortColumn:"status",sortDirection:"ascending"});import{Text as ee}from"@fluentui/react-components";import{readProps as Yt}from"@gik-ai/react";import{jsx as z}from"react/jsx-runtime";var eo=["body","caption","subtitle","title","display"],Oe=["span","p","div","label","h1","h2","h3","h4","h5","h6"],to={body:{size:300,weight:"regular"},caption:{size:200,weight:"regular"},subtitle:{size:400,weight:"semibold"},title:{size:500,weight:"semibold"},display:{size:700,weight:"bold"}},te=({node:e})=>{let t=Yt(e),o=eo.includes(e.props.variant)?e.props.variant:"body",n=t.str("as"),a=Oe.includes(n)?n:"span",r=t.str("value"),i={...to[o],align:t.str("align")||void 0,block:t.bool("block"),italic:t.bool("italic"),truncate:t.bool("truncate"),underline:t.bool("underline"),wrap:t.bool("wrap")};return a==="label"?z("label",{...l(e),htmlFor:t.str("htmlFor")||void 0,children:z(ee,{...i,children:r})}):a==="div"?z("div",{...l(e),children:z(ee,{...i,children:r})}):z(ee,{...l(e),...i,as:a,children:r})},oo=c({type:"object",additionalProperties:!1,required:["value"],properties:{value:{type:"string"},as:{type:"string",enum:Oe},htmlFor:{type:"string",minLength:1},align:{type:"string",enum:["start","center","end","justify"]},block:{type:"boolean"},italic:{type:"boolean"},truncate:{type:"boolean"},underline:{type:"boolean"},wrap:{type:"boolean"}}}),no={capability:"fluent:text",summary:"Renders basic text with Fluent 2 typography while preserving its authored HTML semantics.",dataProp:"value",events:[],semanticTokens:[],defaultVariant:"body",variants:[{value:"body",summary:"Uses standard body typography.",useWhen:["Text is ordinary prose or a short value"]},{value:"caption",summary:"Uses compact supporting typography.",useWhen:["Text annotates or qualifies nearby content"]},{value:"subtitle",summary:"Uses emphasized section-support typography.",useWhen:["Text introduces a compact subsection"]},{value:"title",summary:"Uses prominent title typography.",useWhen:["Text names a page or major region"]},{value:"display",summary:"Uses the largest display typography.",useWhen:["A sparse surface needs one dominant textual signal"]}],authoring:{useWhen:["A scalar string needs basic Fluent typography","A heading, label, caption, or prose value needs explicit HTML semantics"],avoidWhen:["Content contains Markdown or rich document structure","Text is an interactive input or command"],rules:["Use as to express semantics and variant to express visual hierarchy","Use h1 through h6 according to document structure rather than desired font size","Use label with htmlFor only for a corresponding form control","Do not encode Markdown in value"]}},qe=p(no,oo,te,{value:"Incident report analysis workbench",as:"h1",variant:"title",block:!0});import{Toolbar as ao}from"@fluentui/react-components";import{readProps as ro}from"@gik-ai/react";import{jsx as co}from"react/jsx-runtime";var io=["small","medium","large"],oe=({node:e,children:t})=>{let o=ro(e);return co(ao,{...l(e),"aria-label":o.str("ariaLabel")||void 0,size:o.str("size")||void 0,vertical:o.bool("vertical"),children:t})},so=c({type:"object",additionalProperties:!1,properties:{ariaLabel:{type:"string"},size:{type:"string",enum:io},vertical:{type:"boolean"}}}),lo={capability:"fluent:toolbar",summary:"Renders a Fluent 2 toolbar that groups related commands and controls.",slots:["children"],events:[],semanticTokens:[],variants:[],authoring:{useWhen:["Related commands and controls act on the same work surface"],avoidWhen:["Children are general page content rather than commands or controls"],rules:["Provide ariaLabel","Keep command and control groups concise"]}},Me=p(lo,so,oe,{ariaLabel:"Incident report controls"});import{makeStyles as po,mergeClasses as Ue,tokens as C}from"@fluentui/react-components";import{readProps as Be}from"@gik-ai/react";import{jsx as Je,jsxs as ho}from"react/jsx-runtime";var He=po({row:{minWidth:0,display:"flex",alignItems:"center",gap:C.spacingHorizontalM},wrap:{flexWrap:"wrap"},between:{justifyContent:"space-between"},panel:{minWidth:0,padding:C.spacingHorizontalL,border:`${C.strokeWidthThin} solid ${C.colorNeutralStroke2}`,borderRadius:C.borderRadiusMedium,backgroundColor:C.colorNeutralBackground1},subtle:{backgroundColor:C.colorNeutralBackground2},title:{margin:`0 0 ${C.spacingVerticalM}`,fontSize:C.fontSizeBase400,lineHeight:C.lineHeightBase400,fontWeight:C.fontWeightSemibold}}),ne=({node:e,children:t})=>{let o=He(),n=Be(e),a=n.str("variant","default"),r=n.str("spacing");return Je("div",{...l(e,Ue(o.row,a==="wrap"?o.wrap:void 0,a==="between"?o.between:void 0)),style:{...e.props.style,...r?{gap:r}:{}},children:t})},ae=({node:e,children:t})=>{let o=He(),n=Be(e),a=n.str("title");return ho("section",{...l(e,Ue(o.panel,n.str("variant")==="subtle"?o.subtle:void 0)),children:[a?Je("h2",{className:o.title,children:a}):null,t]})},uo=c({type:"object",additionalProperties:!1,properties:{variant:{type:"string"},spacing:{type:"string"}}}),mo=c({type:"object",additionalProperties:!1,properties:{title:{type:"string"},variant:{type:"string"}}}),bo={capability:"fluent:row",summary:"Arranges authored children in a horizontal Fluent layout.",slots:["children"],events:[],semanticTokens:[],defaultVariant:"default",variants:[{value:"default",summary:"Uses a standard horizontal layout.",useWhen:["Children fit on one line"]},{value:"wrap",summary:"Wraps children onto additional lines.",useWhen:["Children may exceed available width"]},{value:"between",summary:"Distributes children across the available width.",useWhen:["Leading and trailing groups share a row"]}],authoring:{useWhen:["Peer controls belong on one horizontal line"],avoidWhen:["Children form a vertical document flow"],rules:["Use wrap when content may exceed the available width"]}},fo={capability:"fluent:panel",summary:"Groups authored children in a titled Fluent surface.",slots:["children"],events:[],semanticTokens:[],defaultVariant:"default",variants:[{value:"default",summary:"Uses the standard Fluent surface.",useWhen:["A bounded content group is required"]},{value:"subtle",summary:"Uses a quieter neutral surface.",useWhen:["The group is secondary to nearby content"]}],authoring:{useWhen:["Related controls or content need a bounded group"],avoidWhen:["The group does not need a visual boundary"],rules:["Use a concise title","Do not nest panels solely for spacing"]}},Ge=p(bo,uo,ne,{}),Xe=p(fo,mo,ae,{title:"Details"});var Tn={badge:ue,button:le,chips:M,"data-grid":Q,dialog:pe,dropdown:X,list:$,panel:ae,persona:me,searchbox:O,row:ne,spinner:be,switch:H,table:Z,text:te,"tab-bar":q,"text-field":E,textarea:_,toolbar:oe,toggle:G},re={badge:fe,button:ce,chips:Te,"data-grid":_e,dialog:de,dropdown:Fe,list:Ne,panel:Xe,persona:he,searchbox:we,row:Ge,spinner:ge,switch:Se,table:Ee,text:qe,"tab-bar":Ce,"text-field":ye,textarea:ve,toolbar:Me,toggle:Pe},xn=Object.fromEntries(Object.entries(re).map(([e,t])=>[e,{propsSchema:t.getSchema(),...t.dataProp?{dataProp:t.dataProp}:{},emits:[...t.events]}]));var F=se({definitions:re,kind:"fluent",toolKind:"Fluent"}),Fn=()=>F.list(),kn=e=>F.describe(e),An=(e,t)=>F.validate(e,t),Vn=F.materialize,Rn=(e,t)=>F.preflight(e,t),Ln=F.instructions,go=e=>F.createTools(e),zn=e=>F.getKit(e),jn=go();export{E as a,_ as b,O as c,q as d,M as e,ye as f,ve as g,we as h,Ce as i,Te as j,H as k,G as l,X as m,Se as n,Pe as o,Fe as p,$ as q,Z as r,Q as s,Ne as t,Ee as u,_e as v,eo as w,Oe as x,te as y,qe as z,oe as A,Me as B,ne as C,ae as D,Ge as E,Xe as F,Tn as G,re as H,xn as I,Fn as J,kn as K,An as L,Vn as M,Rn as N,Ln as O,go as P,zn as Q,jn as R};
2
+ //# sourceMappingURL=chunk-2I33SAGT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/fluent/FluentBasicControls.tsx","../src/fluent/readFluentOptions.ts","../src/fluent/FluentInputs.tsx","../src/fluent/FluentDataControls.tsx","../src/fluent/FluentText.tsx","../src/fluent/FluentToolbar.tsx","../src/fluent/FluentLayoutControls.tsx","../src/fluent/registry.ts","../src/fluent/authoring.ts"],"sourcesContent":["import React from \"react\";\nimport {\n Field,\n Input,\n SearchBox,\n Tab,\n TabList,\n Tag,\n TagGroup,\n Textarea,\n} from \"@fluentui/react-components\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { eventContract, type ComponentDescription } from \"../shared/definition\";\nimport { componentRootProps, withComponentStylePropsSchema } from \"../shared/component\";\nimport { defineFluentComponent } from \"./defineFluentComponent\";\nimport { FLUENT_CONTROL_SIZES, resolveControlSize, STANDARD_COMPACT_VARIANTS } from \"./fluentVariants\";\nimport { fluentOptionSchema, readFluentOptions } from \"./readFluentOptions\";\n\n function useSyncedValue(incoming: string): [string, React.Dispatch<React.SetStateAction<string>>] {\n const [value, setValue] = React.useState(incoming);\n React.useEffect(() => setValue(incoming), [incoming]);\n return [value, setValue];\n }\n\n export const FluentTextField: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n return (\n <Field {...componentRootProps(node)} label={props.str(\"label\") || undefined} required={props.bool(\"required\")}>\n <Input\n type={props.bool(\"secret\") ? \"password\" : \"text\"}\n size={resolveControlSize(props.str(\"size\"), node.props.variant)}\n value={props.str(\"value\")}\n placeholder={props.str(\"placeholder\") || undefined}\n disabled={props.bool(\"disabled\")}\n onChange={(_, data) => void emit(\"input\", { value: data.value })}\n />\n </Field>\n );\n };\n\n export const FluentTextarea: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const rows = typeof node.props.rows === \"number\" ? node.props.rows : undefined;\n return (\n <Field {...componentRootProps(node)} label={props.str(\"label\") || undefined} required={props.bool(\"required\")}>\n <Textarea\n rows={rows}\n size={resolveControlSize(props.str(\"size\"), node.props.variant)}\n value={props.str(\"value\")}\n placeholder={props.str(\"placeholder\") || undefined}\n disabled={props.bool(\"disabled\")}\n onChange={(_, data) => void emit(\"input\", { value: data.value })}\n />\n </Field>\n );\n };\n\n export const FluentSearchbox: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const [value, setValue] = useSyncedValue(props.str(\"value\"));\n const label = props.str(\"label\");\n return (\n <form\n {...componentRootProps(node)}\n onSubmit={(event) => {\n event.preventDefault();\n void emit(\"submit\", { value });\n }}\n >\n <Field label={label || undefined} required={props.bool(\"required\")}>\n <SearchBox\n value={value}\n size={resolveControlSize(props.str(\"size\"), node.props.variant)}\n placeholder={props.str(\"placeholder\") || undefined}\n disabled={props.bool(\"disabled\")}\n aria-label={props.str(\"ariaLabel\") || label || undefined}\n onChange={(_, data) => setValue(data.value)}\n />\n </Field>\n </form>\n );\n };\n\n export const FluentTabBar: ProjectionView = ({ node, emit, children }) => {\n const props = readProps(node);\n const legacyOptions = readFluentOptions(node.props.options);\n const tabs = Array.isArray(node.props.tabs)\n ? node.props.tabs.flatMap((candidate) => {\n if (!candidate || typeof candidate !== \"object\" || Array.isArray(candidate)) return [];\n const tab = candidate as Record<string, unknown>;\n if (typeof tab.value !== \"string\" || typeof tab.headerLabel !== \"string\") return [];\n return [{\n value: tab.value,\n label: tab.headerLabel,\n disabled: tab.disabled === true,\n }];\n })\n : legacyOptions;\n const panes = React.Children.toArray(children);\n const controlled = typeof node.props.active === \"string\";\n const [localActive, setLocalActive] = React.useState(\n () => props.str(\"defaultActive\") || tabs[0]?.value,\n );\n const requestedActive = controlled ? props.str(\"active\") : localActive;\n const active = tabs.some((tab) => tab.value === requestedActive)\n ? requestedActive\n : tabs[0]?.value;\n const activeIndex = tabs.findIndex((tab) => tab.value === active);\n const activePane = activeIndex >= 0 ? panes[activeIndex] : undefined;\n return (\n <div {...componentRootProps(node)}>\n <TabList\n selectedValue={active}\n size={resolveControlSize(props.str(\"size\"), node.props.variant)}\n aria-label={props.str(\"ariaLabel\") || undefined}\n disabled={props.bool(\"disabled\")}\n onTabSelect={(_, data) => {\n const value = String(data.value);\n if (!controlled) setLocalActive(value);\n void emit(\"select\", { value });\n }}\n >\n {tabs.map((tab) => (\n <Tab key={tab.value} value={tab.value} disabled={tab.disabled}>{tab.label}</Tab>\n ))}\n </TabList>\n {node.props.tabs === undefined\n ? panes\n : activePane === undefined ? null : <div role=\"tabpanel\">{activePane}</div>}\n </div>\n );\n };\n\n export const FluentChips: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const items = readFluentOptions(node.props.items);\n const size = props.str(\"size\");\n const resolvedSize = size === \"extra-small\" || size === \"small\" || size === \"medium\"\n ? size\n : node.props.variant === \"compact\" ? \"small\" : undefined;\n return (\n <TagGroup\n {...componentRootProps(node)}\n dismissible\n disabled={props.bool(\"disabled\")}\n aria-label={props.str(\"ariaLabel\") || undefined}\n onDismiss={(_, data) => void emit(\"remove\", { value: String(data.value) })}\n >\n {items.map((item) => <Tag key={item.value} value={item.value} disabled={item.disabled} size={resolvedSize}>{item.label}</Tag>)}\n </TagGroup>\n );\n };\n\n const stringProperty = { type: \"string\" } as const;\n const inputProperties = {\n value: stringProperty,\n label: stringProperty,\n placeholder: stringProperty,\n required: { type: \"boolean\" },\n disabled: { type: \"boolean\" },\n size: { type: \"string\", enum: FLUENT_CONTROL_SIZES },\n } as const;\n const textFieldSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n properties: { ...inputProperties, secret: { type: \"boolean\" } },\n } as const);\n const textareaSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n properties: { ...inputProperties, rows: { type: \"number\", minimum: 1 } },\n } as const);\n const searchboxSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n properties: { ...inputProperties, ariaLabel: stringProperty },\n } as const);\n const tabBarSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n anyOf: [\n { required: [\"tabs\"] },\n { required: [\"options\"] },\n ],\n properties: {\n active: stringProperty,\n defaultActive: stringProperty,\n ariaLabel: stringProperty,\n disabled: { type: \"boolean\" },\n size: { type: \"string\", enum: FLUENT_CONTROL_SIZES },\n tabs: {\n type: \"array\",\n minItems: 1,\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"value\", \"headerLabel\"],\n properties: {\n value: { type: \"string\", minLength: 1 },\n headerLabel: { type: \"string\", minLength: 1 },\n disabled: { type: \"boolean\" },\n },\n },\n },\n options: { type: \"array\", items: fluentOptionSchema },\n },\n } as const);\n const chipsSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n required: [\"items\"],\n properties: {\n ariaLabel: stringProperty,\n disabled: { type: \"boolean\" },\n size: { type: \"string\", enum: [\"extra-small\", ...FLUENT_CONTROL_SIZES] },\n items: { type: \"array\", items: fluentOptionSchema },\n },\n } as const);\n\n const textFieldDescription: ComponentDescription = {\n capability: \"fluent:text-field\",\n summary: \"Renders a Fluent 2 text input that emits each edited value.\",\n dataProp: \"value\",\n events: [\"input\"],\n eventContracts: { input: eventContract(\"The edited text value changes.\", { value: { type: \"string\" } }) },\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: STANDARD_COMPACT_VARIANTS,\n authoring: {\n useWhen: [\"A short text value must update as the user types\"],\n avoidWhen: [\"The value requires multiple lines\", \"The value should commit only on form submission\"],\n rules: [\"Use secret only for obscured text entry\", \"Handle input outside the component\"],\n },\n };\n const textareaDescription: ComponentDescription = {\n capability: \"fluent:textarea\",\n summary: \"Renders a Fluent 2 multiline input that emits each edited value.\",\n dataProp: \"value\",\n events: [\"input\"],\n eventContracts: { input: eventContract(\"The edited multiline value changes.\", { value: { type: \"string\" } }) },\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: STANDARD_COMPACT_VARIANTS,\n authoring: {\n useWhen: [\"A multiline text value must update as the user types\"],\n avoidWhen: [\"The value is short enough for a text field\", \"The value should commit only on form submission\"],\n rules: [\"Use rows only when the authored surface requires a specific initial height\", \"Handle input outside the component\"],\n },\n };\n const searchboxDescription: ComponentDescription = {\n capability: \"fluent:searchbox\",\n summary: \"Renders a Fluent 2 search box that emits its value when submitted.\",\n dataProp: \"value\",\n events: [\"submit\"],\n eventContracts: { submit: eventContract(\"The user submits the search value.\", { value: { type: \"string\" } }) },\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: STANDARD_COMPACT_VARIANTS,\n authoring: {\n useWhen: [\"A search or filtering value should be committed explicitly\"],\n avoidWhen: [\"Every keystroke must update the result set; use text-field\"],\n rules: [\"Provide label or ariaLabel\", \"Handle submit outside the component\"],\n },\n };\n const tabBarDescription: ComponentDescription = {\n capability: \"fluent:tab-bar\",\n summary: \"Renders Fluent 2 tabs and their ordered authored panes as one composed region.\",\n dataProp: \"tabs\",\n events: [\"select\"],\n eventContracts: { select: eventContract(\"The active tab changes.\", { value: { type: \"string\" } }) },\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: STANDARD_COMPACT_VARIANTS,\n authoring: {\n useWhen: [\"Peer views share one region and exactly one is active\"],\n avoidWhen: [\"The choices set a form value rather than switching views\"],\n rules: [\n \"Provide stable tab values and headerLabel values\",\n \"Place one authored child for each tab, in the same order\",\n \"Prefer local tab state and use defaultActive only to choose the initial tab\",\n \"Bind active only when application behavior, persistence, or cross-Cell coordination controls the active tab\",\n \"Handle select only when the application needs to observe or control tab selection\",\n ],\n },\n };\n const chipsDescription: ComponentDescription = {\n capability: \"fluent:chips\",\n summary: \"Renders a Fluent 2 group of dismissible tags.\",\n dataProp: \"items\",\n events: [\"remove\"],\n eventContracts: { remove: eventContract(\"The user removes a chip.\", { value: { type: \"string\" } }) },\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: STANDARD_COMPACT_VARIANTS,\n authoring: {\n useWhen: [\"Users need to review and remove a compact set of discrete values\"],\n avoidWhen: [\"Values are read-only\", \"Users must add values within the same control\"],\n rules: [\"Provide stable item values and labels\", \"Handle remove outside the component\"],\n },\n };\n\n export const fluentTextFieldDefinition = defineFluentComponent(textFieldDescription, textFieldSchema, FluentTextField, {\n label: \"Name\",\n value: \"Ada\",\n });\n export const fluentTextareaDefinition = defineFluentComponent(textareaDescription, textareaSchema, FluentTextarea, {\n label: \"Notes\",\n value: \"Draft\",\n rows: 4,\n });\n export const fluentSearchboxDefinition = defineFluentComponent(searchboxDescription, searchboxSchema, FluentSearchbox, {\n label: \"Search incidents\",\n value: \"credential access\",\n });\n export const fluentTabBarDefinition = defineFluentComponent(tabBarDescription, tabBarSchema, FluentTabBar, {\n defaultActive: \"all\",\n ariaLabel: \"Incident views\",\n tabs: [{ value: \"all\", headerLabel: \"All\" }, { value: \"open\", headerLabel: \"Open\" }],\n });\n export const fluentChipsDefinition = defineFluentComponent(chipsDescription, chipsSchema, FluentChips, {\n ariaLabel: \"Selected techniques\",\n items: [{ value: \"credential-access\", label: \"Credential access\" }],\n });\n","import type { Json } from \"@gik-ai/kernel\";\n\nexport interface FluentOptionValue {\n value: string;\n label: string;\n description?: string;\n disabled?: boolean;\n}\n\nexport const fluentOptionSchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"value\", \"label\"],\n properties: {\n value: { type: \"string\" },\n label: { type: \"string\" },\n disabled: { type: \"boolean\" },\n },\n} as const;\n\nexport function readFluentOptions(value: Json | undefined): FluentOptionValue[] {\n if (!Array.isArray(value)) return [];\n return value.flatMap((item) => {\n if (!item || typeof item !== \"object\" || Array.isArray(item)) return [];\n if (typeof item.value !== \"string\" || typeof item.label !== \"string\") return [];\n return [{\n value: item.value,\n label: item.label,\n ...(typeof item.description === \"string\" ? { description: item.description } : {}),\n disabled: item.disabled === true,\n }];\n });\n}\n","import { Dropdown, Field, Option, Switch, ToggleButton } from \"@fluentui/react-components\";\nimport { CircleRegular, CircleSmallFilled } from \"@fluentui/react-icons\";\nimport { readProps, type ProjectionView, type ProjectionViewProps } from \"@gik-ai/react\";\n\nimport { eventContract, type ComponentDescription } from \"../shared/definition\";\nimport { componentRootProps, withComponentStylePropsSchema } from \"../shared/component\";\nimport { defineFluentComponent } from \"./defineFluentComponent\";\nimport { FLUENT_CONTROL_SIZES, resolveControlSize, STANDARD_COMPACT_VARIANTS } from \"./fluentVariants\";\nimport { fluentOptionSchema, readFluentOptions } from \"./readFluentOptions\";\n\nfunction readToggleState(node: ProjectionViewProps[\"node\"]): {\n checked: boolean;\n label: string;\n onValue: string;\n offValue: string;\n} {\n const props = readProps(node);\n const onValue = props.str(\"onValue\", \"on\");\n const offValue = props.str(\"offValue\", \"off\");\n const checked = node.props.checked === true || node.props.value === onValue;\n return {\n checked,\n label: checked\n ? props.str(\"onLabel\", props.str(\"label\"))\n : props.str(\"offLabel\", props.str(\"label\")),\n onValue,\n offValue,\n };\n}\n\nexport const FluentSwitch: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const state = readToggleState(node);\n const name = props.str(\"name\");\n return (\n <Switch\n {...componentRootProps(node)}\n checked={state.checked}\n size={resolveControlSize(props.str(\"size\"), node.props.variant) === \"small\" ? \"small\" : undefined}\n disabled={props.bool(\"disabled\")}\n label={state.label}\n aria-label={props.str(\"ariaLabel\") || undefined}\n onChange={(_, data) => void emit(\"toggle\", {\n checked: data.checked,\n value: data.checked ? state.onValue : state.offValue,\n ...(name ? { name } : {}),\n })}\n />\n );\n};\n\nexport const FluentToggle: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const state = readToggleState(node);\n const iconName = state.checked ? props.str(\"onIcon\") : props.str(\"offIcon\");\n const icon = toggleIcons[iconName as keyof typeof toggleIcons];\n const title = state.checked ? props.str(\"onTitle\") : props.str(\"offTitle\");\n return (\n <ToggleButton\n {...componentRootProps(node)}\n checked={state.checked}\n size={resolveControlSize(props.str(\"size\"), node.props.variant)}\n disabled={props.bool(\"disabled\")}\n icon={icon}\n aria-label={props.str(\"ariaLabel\") || undefined}\n title={title || undefined}\n onClick={() => void emit(\"toggle\", {\n checked: !state.checked,\n value: state.checked ? state.offValue : state.onValue,\n })}\n >\n {icon ? null : state.label}\n </ToggleButton>\n );\n};\n\nconst toggleIcons = {\n acts: <CircleSmallFilled />,\n steps: <CircleRegular />,\n} as const;\n\nexport const FluentDropdown: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const options = readFluentOptions(node.props.options);\n const value = props.str(\"value\");\n const selected = options.find((option) => option.value === value);\n\n const label = props.str(\"label\");\n return (\n <Field {...componentRootProps(node)} label={label || undefined} required={props.bool(\"required\")}>\n <Dropdown\n aria-label={props.str(\"ariaLabel\") || label || undefined}\n size={resolveControlSize(props.str(\"size\"), node.props.variant)}\n placeholder={props.str(\"placeholder\") || undefined}\n disabled={props.bool(\"disabled\")}\n value={selected?.label ?? \"\"}\n selectedOptions={value ? [value] : []}\n onOptionSelect={(_, data) => {\n if (!data.optionValue) return;\n const option = options.find((candidate) => candidate.value === data.optionValue);\n void emit(\"select\", { value: data.optionValue, label: option?.label ?? data.optionText });\n }}\n >\n {options.map((option) => (\n <Option key={option.value} value={option.value} disabled={option.disabled}>{option.label}</Option>\n ))}\n </Dropdown>\n </Field>\n );\n};\n\nconst toggleProperties = {\n value: { type: \"string\" },\n checked: { type: \"boolean\" },\n onValue: { type: \"string\" },\n offValue: { type: \"string\" },\n label: { type: \"string\" },\n onLabel: { type: \"string\" },\n offLabel: { type: \"string\" },\n disabled: { type: \"boolean\" },\n ariaLabel: { type: \"string\" },\n name: { type: \"string\" },\n size: { type: \"string\", enum: FLUENT_CONTROL_SIZES },\n} as const;\n\nconst switchSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n properties: toggleProperties,\n} as const);\n\nconst toggleSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n properties: {\n ...toggleProperties,\n onIcon: { type: \"string\", enum: Object.keys(toggleIcons) },\n offIcon: { type: \"string\", enum: Object.keys(toggleIcons) },\n onTitle: { type: \"string\" },\n offTitle: { type: \"string\" },\n },\n} as const);\n\nconst dropdownSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n properties: {\n value: { type: \"string\" },\n options: {\n type: \"array\",\n items: fluentOptionSchema,\n },\n label: { type: \"string\" },\n placeholder: { type: \"string\" },\n ariaLabel: { type: \"string\" },\n required: { type: \"boolean\" },\n disabled: { type: \"boolean\" },\n },\n required: [\"options\"],\n} as const);\n\nfunction description(\n capability: string,\n summary: string,\n event: string,\n eventSummary: string,\n eventProperties: Record<string, unknown>,\n requiredProperties: readonly string[],\n useWhen: string,\n rules: string[],\n): ComponentDescription {\n return {\n capability,\n summary,\n events: [event],\n eventContracts: { [event]: eventContract(eventSummary, eventProperties, requiredProperties) },\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: STANDARD_COMPACT_VARIANTS,\n authoring: {\n useWhen: [useWhen],\n avoidWhen: [\"A domain-specific component owns the interaction contract\"],\n rules,\n },\n };\n}\n\nconst switchDescription = description(\n \"fluent:switch\",\n \"Renders a Fluent 2 binary switch with value-derived state.\",\n \"toggle\",\n \"The switch changes between its authored values.\",\n { checked: { type: \"boolean\" }, value: { type: \"string\" }, name: { type: \"string\" } },\n [\"checked\", \"value\"],\n \"A binary setting benefits from a track-and-thumb control\",\n [\"Declare stable on and off values\", \"Handle toggle outside the component\"],\n);\nconst toggleDescription = description(\n \"fluent:toggle\",\n \"Renders a compact Fluent 2 pressed-state toggle button.\",\n \"toggle\",\n \"The pressed state changes between its authored values.\",\n { checked: { type: \"boolean\" }, value: { type: \"string\" } },\n [\"checked\", \"value\"],\n \"A binary mode needs a compact button presentation\",\n [\"Declare stable on and off values\", \"Use onIcon, offIcon, onTitle, offTitle, and ariaLabel for an icon-only toggle\", \"Handle toggle outside the component\"],\n);\nconst dropdownDescription = description(\n \"fluent:dropdown\",\n \"Renders a single-select Fluent 2 dropdown from declarative options.\",\n \"select\",\n \"The selected option changes.\",\n { value: { type: \"string\" }, label: { type: \"string\" } },\n [\"value\", \"label\"],\n \"A user selects one value from a small option set\",\n [\"Provide stable option values\", \"Provide label or ariaLabel\", \"Handle select outside the component\"],\n);\n\nexport const fluentSwitchDefinition = defineFluentComponent(switchDescription, switchSchema, FluentSwitch, {\n value: \"auto\",\n onValue: \"auto\",\n offValue: \"manual\",\n onLabel: \"Auto\",\n offLabel: \"Manual\",\n});\n\nexport const fluentToggleDefinition = defineFluentComponent(toggleDescription, toggleSchema, FluentToggle, {\n value: \"auto\",\n onValue: \"auto\",\n offValue: \"manual\",\n onLabel: \"Auto\",\n offLabel: \"Manual\",\n});\n\nexport const fluentDropdownDefinition = defineFluentComponent(dropdownDescription, dropdownSchema, FluentDropdown, {\n value: \"soc-t3\",\n ariaLabel: \"Select demo Blueprint\",\n options: [\n { value: \"soc-t3\", label: \"Governed SOC investigation\" },\n { value: \"soc-executive\", label: \"SOC executive walkthrough\" },\n ],\n});\n","import React from \"react\";\nimport {\n DataGrid,\n DataGridBody,\n DataGridCell,\n DataGridHeader,\n DataGridHeaderCell,\n DataGridRow,\n List,\n ListItem,\n Table,\n TableBody,\n TableCell,\n TableHeader,\n TableHeaderCell,\n TableRow,\n createTableColumn,\n makeStyles,\n tokens,\n} from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { eventContract, type ComponentDescription } from \"../shared/definition\";\nimport { componentRootProps, withComponentStylePropsSchema } from \"../shared/component\";\nimport { defineFluentComponent } from \"./defineFluentComponent\";\nimport { STANDARD_COMPACT_VARIANTS } from \"./fluentVariants\";\nimport { fluentOptionSchema, readFluentOptions } from \"./readFluentOptions\";\n\ntype CellValue = string | number | boolean | null;\n\ninterface FluentDataColumn {\n id: string;\n label: string;\n}\n\ninterface FluentDataRow {\n id: string;\n cells: Record<string, CellValue>;\n}\n\nconst LIST_VARIANTS = [\n {\n value: \"standard\",\n summary: \"Renders a non-selecting Fluent list.\",\n useWhen: [\"Items are displayed for reading or navigation handled elsewhere\"],\n },\n {\n value: \"selectable\",\n summary: \"Enables Fluent single selection unless selectionMode is explicitly authored.\",\n useWhen: [\"Users choose one or more items from the list\"],\n },\n {\n value: \"vertical-cards\",\n summary: \"Renders full-width vertically stacked cards with Fluent single selection.\",\n useWhen: [\"Users choose an item from a prominent vertical set of options\"],\n },\n] as const;\n\nconst useListStyles = makeStyles({\n verticalCards: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: tokens.spacingVerticalS,\n width: \"100%\",\n },\n verticalCard: {\n alignItems: \"flex-start\",\n boxSizing: \"border-box\",\n width: \"100%\",\n padding: `${tokens.spacingVerticalM} ${tokens.spacingHorizontalL}`,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n borderRadius: tokens.borderRadiusMedium,\n backgroundColor: tokens.colorNeutralBackground1,\n \"&:hover\": {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n },\n '&[aria-selected=\"true\"]': {\n color: tokens.colorBrandForeground2,\n backgroundColor: tokens.colorBrandBackground2,\n },\n '&[aria-selected=\"true\"]:hover': {\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n },\n verticalCardContent: {\n display: \"grid\",\n gap: tokens.spacingVerticalXXS,\n minWidth: 0,\n },\n verticalCardLabel: { fontWeight: tokens.fontWeightSemibold },\n verticalCardDescription: {\n color: tokens.colorNeutralForeground3,\n fontSize: tokens.fontSizeBase200,\n },\n});\n\nfunction readColumns(value: Json | undefined): FluentDataColumn[] {\n if (!Array.isArray(value)) return [];\n return value.flatMap((column) => {\n if (!column || typeof column !== \"object\" || Array.isArray(column)) return [];\n if (typeof column.id !== \"string\" || typeof column.label !== \"string\") return [];\n return [{ id: column.id, label: column.label }];\n });\n}\n\nfunction readRows(value: Json | undefined): FluentDataRow[] {\n if (!Array.isArray(value)) return [];\n return value.flatMap((row) => {\n if (!row || typeof row !== \"object\" || Array.isArray(row) || typeof row.id !== \"string\") return [];\n const cells = row.cells && typeof row.cells === \"object\" && !Array.isArray(row.cells)\n ? row.cells as Record<string, CellValue>\n : {};\n return [{ id: row.id, cells }];\n });\n}\n\nfunction readStringArray(value: Json | undefined): string[] {\n return Array.isArray(value) ? value.filter((item): item is string => typeof item === \"string\") : [];\n}\n\nfunction renderCellValue(value: CellValue | undefined): React.ReactNode {\n return value == null ? null : String(value);\n}\n\nexport const FluentList: ProjectionView = ({ node, emit }) => {\n const styles = useListStyles();\n const props = readProps(node);\n const items = readFluentOptions(node.props.items);\n const isVerticalCards = node.props.variant === \"vertical-cards\";\n const selectionMode = props.str(\"selectionMode\");\n const resolvedSelectionMode = selectionMode === \"single\" || selectionMode === \"multiselect\"\n ? selectionMode\n : node.props.variant === \"selectable\" || isVerticalCards ? \"single\" : undefined;\n const selectedItems = readStringArray(node.props.selectedValues);\n return (\n <List\n {...componentRootProps(node, isVerticalCards ? styles.verticalCards : undefined)}\n aria-label={props.str(\"ariaLabel\") || undefined}\n selectionMode={resolvedSelectionMode}\n selectedItems={selectedItems}\n onSelectionChange={(_, data) => void emit(\"select\", { values: [...data.selectedItems].map(String) })}\n >\n {items.map((item) => (\n <ListItem\n key={item.value}\n value={item.value}\n disabledSelection={item.disabled}\n checkmark={isVerticalCards ? null : undefined}\n className={isVerticalCards ? styles.verticalCard : undefined}\n >\n {isVerticalCards ? (\n <span className={styles.verticalCardContent}>\n <span className={styles.verticalCardLabel}>{item.label}</span>\n {item.description\n ? <span className={styles.verticalCardDescription}>{item.description}</span>\n : null}\n </span>\n ) : item.label}\n </ListItem>\n ))}\n </List>\n );\n};\n\nexport const FluentTable: ProjectionView = ({ node }) => {\n const props = readProps(node);\n const columns = readColumns(node.props.columns);\n const rows = readRows(node.props.rows);\n const size = props.str(\"size\");\n const resolvedSize = size === \"extra-small\" || size === \"small\" || size === \"medium\"\n ? size\n : node.props.variant === \"compact\" ? \"small\" : undefined;\n return (\n <Table\n {...componentRootProps(node)}\n aria-label={props.str(\"ariaLabel\") || undefined}\n size={resolvedSize}\n >\n <TableHeader>\n <TableRow>\n {columns.map((column) => <TableHeaderCell key={column.id}>{column.label}</TableHeaderCell>)}\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map((row) => (\n <TableRow key={row.id}>\n {columns.map((column) => <TableCell key={column.id}>{renderCellValue(row.cells[column.id])}</TableCell>)}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n );\n};\n\nexport const FluentDataGrid: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const authoredColumns = readColumns(node.props.columns);\n const rows = readRows(node.props.rows);\n const selectionMode = props.str(\"selectionMode\");\n const sortColumn = props.str(\"sortColumn\");\n const sortDirection = props.str(\"sortDirection\");\n const size = props.str(\"size\");\n const resolvedSize = size === \"extra-small\" || size === \"small\" || size === \"medium\"\n ? size\n : node.props.variant === \"compact\" ? \"small\" : undefined;\n const columns = authoredColumns.map((column) => createTableColumn<FluentDataRow>({\n columnId: column.id,\n renderHeaderCell: () => column.label,\n renderCell: (row) => renderCellValue(row.cells[column.id]),\n }));\n const selectedItems = new Set(readStringArray(node.props.selectedRowIds));\n\n return (\n <DataGrid\n {...componentRootProps(node)}\n aria-label={props.str(\"ariaLabel\") || undefined}\n items={rows}\n columns={columns}\n size={resolvedSize}\n getRowId={(row) => row.id}\n {...(selectionMode === \"single\" || selectionMode === \"multiselect\"\n ? { selectionMode, selectedItems }\n : {})}\n {...(sortColumn\n ? { sortState: { sortColumn, sortDirection: sortDirection === \"descending\" ? \"descending\" : \"ascending\" } }\n : {})}\n onSelectionChange={(_, data) => void emit(\"select\", { rowIds: [...data.selectedItems].map(String) })}\n onSortChange={(_, data) => void emit(\"sort\", { columnId: String(data.sortColumn), direction: data.sortDirection })}\n >\n <DataGridHeader>\n <DataGridRow>\n {({ renderHeaderCell }) => <DataGridHeaderCell>{renderHeaderCell()}</DataGridHeaderCell>}\n </DataGridRow>\n </DataGridHeader>\n <DataGridBody<FluentDataRow>>\n {({ item, rowId }) => (\n <DataGridRow<FluentDataRow> key={rowId}>\n {({ renderCell }) => <DataGridCell>{renderCell(item)}</DataGridCell>}\n </DataGridRow>\n )}\n </DataGridBody>\n </DataGrid>\n );\n};\n\nconst stringProperty = { type: \"string\" } as const;\nconst columnSchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"label\"],\n properties: { id: stringProperty, label: stringProperty },\n} as const;\nconst cellValueSchema = { type: [\"string\", \"number\", \"boolean\", \"null\"] } as const;\nconst rowSchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"id\", \"cells\"],\n properties: {\n id: stringProperty,\n cells: { type: \"object\", additionalProperties: cellValueSchema },\n },\n} as const;\nconst listItemSchema = {\n ...fluentOptionSchema,\n properties: {\n ...fluentOptionSchema.properties,\n description: { type: \"string\" },\n },\n} as const;\nconst listSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n required: [\"items\"],\n properties: {\n ariaLabel: stringProperty,\n items: { type: \"array\", items: listItemSchema },\n selectionMode: { type: \"string\", enum: [\"single\", \"multiselect\"] },\n selectedValues: { type: \"array\", items: stringProperty },\n },\n} as const);\nconst tableProperties = {\n ariaLabel: stringProperty,\n columns: { type: \"array\", minItems: 1, items: columnSchema },\n rows: { type: \"array\", items: rowSchema },\n} as const;\nconst tableSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n required: [\"columns\", \"rows\"],\n properties: {\n ...tableProperties,\n size: { type: \"string\", enum: [\"extra-small\", \"small\", \"medium\"] },\n },\n} as const);\nconst dataGridSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n required: [\"columns\", \"rows\"],\n properties: {\n ...tableProperties,\n selectionMode: { type: \"string\", enum: [\"single\", \"multiselect\"] },\n selectedRowIds: { type: \"array\", items: stringProperty },\n sortColumn: stringProperty,\n sortDirection: { type: \"string\", enum: [\"ascending\", \"descending\"] },\n size: { type: \"string\", enum: [\"extra-small\", \"small\", \"medium\"] },\n },\n} as const);\n\nconst listDescription: ComponentDescription = {\n capability: \"fluent:list\",\n summary: \"Renders a Fluent 2 list with optional controlled item selection.\",\n dataProp: \"items\",\n events: [\"select\"],\n eventContracts: { select: eventContract(\"The selected list values change.\", { values: { type: \"array\", items: { type: \"string\" } } }) },\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: LIST_VARIANTS,\n authoring: {\n useWhen: [\"A compact sequence of labeled values should be displayed or selected\"],\n avoidWhen: [\"Values require columns; use table or data-grid\"],\n rules: [\"Use stable item values\", \"Use vertical-cards for a prominent full-width selection surface\", \"Set selectionMode only when selection is required\", \"Handle select outside the component\"],\n },\n};\nconst tableDescription: ComponentDescription = {\n capability: \"fluent:table\",\n summary: \"Renders read-only row and column data with Fluent 2 table semantics.\",\n dataProp: \"rows\",\n events: [],\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: STANDARD_COMPACT_VARIANTS,\n authoring: {\n useWhen: [\"Structured data needs a read-only tabular presentation\"],\n avoidWhen: [\"Rows need selection or columns need sorting; use data-grid\"],\n rules: [\"Provide explicit columns\", \"Provide each row as a stable id and cells map\"],\n },\n};\nconst dataGridDescription: ComponentDescription = {\n capability: \"fluent:data-grid\",\n summary: \"Renders Fluent 2 tabular data with controlled row selection and sorting.\",\n dataProp: \"rows\",\n events: [\"select\", \"sort\"],\n eventContracts: {\n select: eventContract(\"The selected data-grid rows change.\", { rowIds: { type: \"array\", items: { type: \"string\" } } }),\n sort: eventContract(\"The data-grid sort changes.\", { columnId: { type: \"string\" }, direction: { enum: [\"ascending\", \"descending\"] } }),\n },\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: STANDARD_COMPACT_VARIANTS,\n authoring: {\n useWhen: [\"Tabular data needs row selection or sortable columns\"],\n avoidWhen: [\"The table is display-only; use table\", \"Users need spreadsheet editing\"],\n rules: [\"Provide explicit columns and stable row ids\", \"Apply sorting and selection state outside the component\"],\n },\n};\n\nconst trialColumns: Json[] = [{ id: \"status\", label: \"Status\" }, { id: \"owner\", label: \"Owner\" }];\nconst trialRows: Json[] = [\n { id: \"incident-1\", cells: { status: \"Open\", owner: \"SOC\" } },\n { id: \"incident-2\", cells: { status: \"Resolved\", owner: \"IR\" } },\n];\n\nexport const fluentListDefinition = defineFluentComponent(listDescription, listSchema, FluentList, {\n ariaLabel: \"Incident states\",\n items: [{ value: \"open\", label: \"Open\" }, { value: \"resolved\", label: \"Resolved\" }],\n});\nexport const fluentTableDefinition = defineFluentComponent(tableDescription, tableSchema, FluentTable, {\n ariaLabel: \"Incident ownership\",\n columns: trialColumns,\n rows: trialRows,\n});\nexport const fluentDataGridDefinition = defineFluentComponent(dataGridDescription, dataGridSchema, FluentDataGrid, {\n ariaLabel: \"Selectable incidents\",\n columns: trialColumns,\n rows: trialRows,\n selectionMode: \"single\",\n selectedRowIds: [\"incident-1\"],\n sortColumn: \"status\",\n sortDirection: \"ascending\",\n});","import { Text, type TextProps } from \"@fluentui/react-components\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport type { ComponentDescription } from \"../shared/definition\";\nimport { componentRootProps, withComponentStylePropsSchema } from \"../shared/component\";\nimport { defineFluentComponent } from \"./defineFluentComponent\";\n\nexport const FLUENT_TEXT_VARIANTS = [\"body\", \"caption\", \"subtitle\", \"title\", \"display\"] as const;\nexport const FLUENT_TEXT_ELEMENTS = [\"span\", \"p\", \"div\", \"label\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"] as const;\n\nconst variantProps: Record<typeof FLUENT_TEXT_VARIANTS[number], Pick<TextProps, \"size\" | \"weight\">> = {\n body: { size: 300, weight: \"regular\" },\n caption: { size: 200, weight: \"regular\" },\n subtitle: { size: 400, weight: \"semibold\" },\n title: { size: 500, weight: \"semibold\" },\n display: { size: 700, weight: \"bold\" },\n};\n\nexport const FluentText: ProjectionView = ({ node }) => {\n const props = readProps(node);\n const variant = FLUENT_TEXT_VARIANTS.includes(node.props.variant as typeof FLUENT_TEXT_VARIANTS[number])\n ? node.props.variant as typeof FLUENT_TEXT_VARIANTS[number]\n : \"body\";\n const element = props.str(\"as\");\n const as = FLUENT_TEXT_ELEMENTS.includes(element as typeof FLUENT_TEXT_ELEMENTS[number])\n ? element as typeof FLUENT_TEXT_ELEMENTS[number]\n : \"span\";\n const content = props.str(\"value\");\n const typographyProps = {\n ...variantProps[variant],\n align: props.str(\"align\") as TextProps[\"align\"] || undefined,\n block: props.bool(\"block\"),\n italic: props.bool(\"italic\"),\n truncate: props.bool(\"truncate\"),\n underline: props.bool(\"underline\"),\n wrap: props.bool(\"wrap\"),\n };\n if (as === \"label\") {\n return <label {...componentRootProps(node)} htmlFor={props.str(\"htmlFor\") || undefined}><Text {...typographyProps}>{content}</Text></label>;\n }\n if (as === \"div\") {\n return <div {...componentRootProps(node)}><Text {...typographyProps}>{content}</Text></div>;\n }\n return (\n <Text\n {...componentRootProps(node)}\n {...typographyProps}\n as={as as TextProps[\"as\"]}\n >\n {content}\n </Text>\n );\n};\n\nconst schema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n required: [\"value\"],\n properties: {\n value: { type: \"string\" },\n as: { type: \"string\", enum: FLUENT_TEXT_ELEMENTS },\n htmlFor: { type: \"string\", minLength: 1 },\n align: { type: \"string\", enum: [\"start\", \"center\", \"end\", \"justify\"] },\n block: { type: \"boolean\" },\n italic: { type: \"boolean\" },\n truncate: { type: \"boolean\" },\n underline: { type: \"boolean\" },\n wrap: { type: \"boolean\" },\n },\n} as const);\n\nconst description: ComponentDescription = {\n capability: \"fluent:text\",\n summary: \"Renders basic text with Fluent 2 typography while preserving its authored HTML semantics.\",\n dataProp: \"value\",\n events: [],\n semanticTokens: [],\n defaultVariant: \"body\",\n variants: [\n { value: \"body\", summary: \"Uses standard body typography.\", useWhen: [\"Text is ordinary prose or a short value\"] },\n { value: \"caption\", summary: \"Uses compact supporting typography.\", useWhen: [\"Text annotates or qualifies nearby content\"] },\n { value: \"subtitle\", summary: \"Uses emphasized section-support typography.\", useWhen: [\"Text introduces a compact subsection\"] },\n { value: \"title\", summary: \"Uses prominent title typography.\", useWhen: [\"Text names a page or major region\"] },\n { value: \"display\", summary: \"Uses the largest display typography.\", useWhen: [\"A sparse surface needs one dominant textual signal\"] },\n ],\n authoring: {\n useWhen: [\"A scalar string needs basic Fluent typography\", \"A heading, label, caption, or prose value needs explicit HTML semantics\"],\n avoidWhen: [\"Content contains Markdown or rich document structure\", \"Text is an interactive input or command\"],\n rules: [\n \"Use as to express semantics and variant to express visual hierarchy\",\n \"Use h1 through h6 according to document structure rather than desired font size\",\n \"Use label with htmlFor only for a corresponding form control\",\n \"Do not encode Markdown in value\",\n ],\n },\n};\n\nexport const fluentTextDefinition = defineFluentComponent(description, schema, FluentText, {\n value: \"Incident report analysis workbench\",\n as: \"h1\",\n variant: \"title\",\n block: true,\n});","import { Toolbar, type ToolbarProps } from \"@fluentui/react-components\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport type { ComponentDescription } from \"../shared/definition\";\nimport { componentRootProps, withComponentStylePropsSchema } from \"../shared/component\";\nimport { defineFluentComponent } from \"./defineFluentComponent\";\n\nconst toolbarSizes = [\"small\", \"medium\", \"large\"] as const;\n\nexport const FluentToolbar: ProjectionView = ({ node, children }) => {\n const props = readProps(node);\n return (\n <Toolbar\n {...componentRootProps(node)}\n aria-label={props.str(\"ariaLabel\") || undefined}\n size={props.str(\"size\") as ToolbarProps[\"size\"] || undefined}\n vertical={props.bool(\"vertical\")}\n >\n {children}\n </Toolbar>\n );\n};\n\nconst toolbarSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n properties: {\n ariaLabel: { type: \"string\" },\n size: { type: \"string\", enum: toolbarSizes },\n vertical: { type: \"boolean\" },\n },\n} as const);\n\nconst toolbarDescription: ComponentDescription = {\n capability: \"fluent:toolbar\",\n summary: \"Renders a Fluent 2 toolbar that groups related commands and controls.\",\n slots: [\"children\"],\n events: [],\n semanticTokens: [],\n variants: [],\n authoring: {\n useWhen: [\"Related commands and controls act on the same work surface\"],\n avoidWhen: [\"Children are general page content rather than commands or controls\"],\n rules: [\"Provide ariaLabel\", \"Keep command and control groups concise\"],\n },\n};\n\nexport const fluentToolbarDefinition = defineFluentComponent(toolbarDescription, toolbarSchema, FluentToolbar, {\n ariaLabel: \"Incident report controls\",\n});","import React from \"react\";\nimport { makeStyles, mergeClasses, tokens } from \"@fluentui/react-components\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { componentRootProps, withComponentStylePropsSchema } from \"../shared/component\";\nimport { type ComponentDescription } from \"../shared/definition\";\nimport { defineFluentComponent } from \"./defineFluentComponent\";\n\nconst useStyles = makeStyles({\n row: { minWidth: 0, display: \"flex\", alignItems: \"center\", gap: tokens.spacingHorizontalM },\n wrap: { flexWrap: \"wrap\" },\n between: { justifyContent: \"space-between\" },\n panel: { minWidth: 0, padding: tokens.spacingHorizontalL, border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`, borderRadius: tokens.borderRadiusMedium, backgroundColor: tokens.colorNeutralBackground1 },\n subtle: { backgroundColor: tokens.colorNeutralBackground2 },\n title: { margin: `0 0 ${tokens.spacingVerticalM}`, fontSize: tokens.fontSizeBase400, lineHeight: tokens.lineHeightBase400, fontWeight: tokens.fontWeightSemibold },\n});\n\nexport const FluentRow: ProjectionView = ({ node, children }) => {\n const styles = useStyles();\n const props = readProps(node);\n const variant = props.str(\"variant\", \"default\");\n const gap = props.str(\"spacing\");\n return <div {...componentRootProps(node, mergeClasses(styles.row, variant === \"wrap\" ? styles.wrap : undefined, variant === \"between\" ? styles.between : undefined))} style={{ ...node.props.style as React.CSSProperties, ...(gap ? { gap } : {}) }}>{children}</div>;\n};\n\nexport const FluentPanel: ProjectionView = ({ node, children }) => {\n const styles = useStyles();\n const props = readProps(node);\n const title = props.str(\"title\");\n return <section {...componentRootProps(node, mergeClasses(styles.panel, props.str(\"variant\") === \"subtle\" ? styles.subtle : undefined))}>{title ? <h2 className={styles.title}>{title}</h2> : null}{children}</section>;\n};\n\nconst rowSchema = withComponentStylePropsSchema({ type: \"object\", additionalProperties: false, properties: { variant: { type: \"string\" }, spacing: { type: \"string\" } } } as const);\nconst panelSchema = withComponentStylePropsSchema({ type: \"object\", additionalProperties: false, properties: { title: { type: \"string\" }, variant: { type: \"string\" } } } as const);\nconst rowDescription: ComponentDescription = { capability: \"fluent:row\", summary: \"Arranges authored children in a horizontal Fluent layout.\", slots: [\"children\"], events: [], semanticTokens: [], defaultVariant: \"default\", variants: [{ value: \"default\", summary: \"Uses a standard horizontal layout.\", useWhen: [\"Children fit on one line\"] }, { value: \"wrap\", summary: \"Wraps children onto additional lines.\", useWhen: [\"Children may exceed available width\"] }, { value: \"between\", summary: \"Distributes children across the available width.\", useWhen: [\"Leading and trailing groups share a row\"] }], authoring: { useWhen: [\"Peer controls belong on one horizontal line\"], avoidWhen: [\"Children form a vertical document flow\"], rules: [\"Use wrap when content may exceed the available width\"] } };\nconst panelDescription: ComponentDescription = { capability: \"fluent:panel\", summary: \"Groups authored children in a titled Fluent surface.\", slots: [\"children\"], events: [], semanticTokens: [], defaultVariant: \"default\", variants: [{ value: \"default\", summary: \"Uses the standard Fluent surface.\", useWhen: [\"A bounded content group is required\"] }, { value: \"subtle\", summary: \"Uses a quieter neutral surface.\", useWhen: [\"The group is secondary to nearby content\"] }], authoring: { useWhen: [\"Related controls or content need a bounded group\"], avoidWhen: [\"The group does not need a visual boundary\"], rules: [\"Use a concise title\", \"Do not nest panels solely for spacing\"] } };\nexport const fluentRowDefinition = defineFluentComponent(rowDescription, rowSchema, FluentRow, {});\nexport const fluentPanelDefinition = defineFluentComponent(panelDescription, panelSchema, FluentPanel, { title: \"Details\" });\n","import type { CapabilityDescriptor } from \"@gik-ai/kernel\";\nimport type { ProjectionView } from \"@gik-ai/react\";\n\nimport {\n FluentButton,\n fluentButtonDefinition,\n} from \"./FluentButtons\";\nimport {\n FluentChips,\n FluentSearchbox,\n FluentTabBar,\n FluentTextField,\n FluentTextarea,\n fluentChipsDefinition,\n fluentSearchboxDefinition,\n fluentTabBarDefinition,\n fluentTextFieldDefinition,\n fluentTextareaDefinition,\n} from \"./FluentBasicControls\";\nimport {\n FluentDropdown,\n FluentSwitch,\n FluentToggle,\n fluentDropdownDefinition,\n fluentSwitchDefinition,\n fluentToggleDefinition,\n} from \"./FluentInputs\";\nimport {\n FluentDataGrid,\n FluentList,\n FluentTable,\n fluentDataGridDefinition,\n fluentListDefinition,\n fluentTableDefinition,\n} from \"./FluentDataControls\";\nimport { FluentDialog, fluentDialogDefinition } from \"./FluentDialog\";\nimport { FluentText, fluentTextDefinition } from \"./FluentText\";\nimport { FluentToolbar, fluentToolbarDefinition } from \"./FluentToolbar\";\nimport { FluentPanel, FluentRow, fluentPanelDefinition, fluentRowDefinition } from \"./FluentLayoutControls\";\nimport {\n FluentBadge,\n FluentPersona,\n FluentSpinner,\n fluentBadgeDefinition,\n fluentPersonaDefinition,\n fluentSpinnerDefinition,\n} from \"./FluentDisplayControls\";\n\nexport const fluentComponentViews: Record<string, ProjectionView> = {\n badge: FluentBadge,\n button: FluentButton,\n chips: FluentChips,\n \"data-grid\": FluentDataGrid,\n dialog: FluentDialog,\n dropdown: FluentDropdown,\n list: FluentList,\n panel: FluentPanel,\n persona: FluentPersona,\n searchbox: FluentSearchbox,\n row: FluentRow,\n spinner: FluentSpinner,\n switch: FluentSwitch,\n table: FluentTable,\n text: FluentText,\n \"tab-bar\": FluentTabBar,\n \"text-field\": FluentTextField,\n textarea: FluentTextarea,\n toolbar: FluentToolbar,\n toggle: FluentToggle,\n};\n\nexport const fluentComponentDefinitions = {\n badge: fluentBadgeDefinition,\n button: fluentButtonDefinition,\n chips: fluentChipsDefinition,\n \"data-grid\": fluentDataGridDefinition,\n dialog: fluentDialogDefinition,\n dropdown: fluentDropdownDefinition,\n list: fluentListDefinition,\n panel: fluentPanelDefinition,\n persona: fluentPersonaDefinition,\n searchbox: fluentSearchboxDefinition,\n row: fluentRowDefinition,\n spinner: fluentSpinnerDefinition,\n switch: fluentSwitchDefinition,\n table: fluentTableDefinition,\n text: fluentTextDefinition,\n \"tab-bar\": fluentTabBarDefinition,\n \"text-field\": fluentTextFieldDefinition,\n textarea: fluentTextareaDefinition,\n toolbar: fluentToolbarDefinition,\n toggle: fluentToggleDefinition,\n} as const;\n\nexport const fluentComponentCapabilities: Record<string, CapabilityDescriptor> = Object.fromEntries(\n Object.entries(fluentComponentDefinitions).map(([name, definition]) => [name, {\n propsSchema: definition.getSchema(),\n ...(definition.dataProp ? { dataProp: definition.dataProp } : {}),\n emits: [...definition.events],\n }]),\n);\n","import type { ComponentValidationReport } from \"../shared/definition\";\nimport {\n createComponentAuthoringApi,\n type ComponentAgentKit,\n type ComponentAuthoringDescription,\n type ComponentAuthoringTool,\n type ComponentCatalogEntry,\n type ComponentPreflightReport,\n} from \"../shared/component-authoring-internal\";\nimport { fluentComponentDefinitions } from \"./registry\";\n\nexport interface FluentComponentCatalogEntry extends ComponentCatalogEntry {}\nexport interface FluentComponentAuthoringDescription extends ComponentAuthoringDescription {}\nexport interface FluentComponentPreflightReport extends ComponentPreflightReport {}\nexport interface FluentComponentAgentKit extends ComponentAgentKit {}\n\nconst api = createComponentAuthoringApi({\n definitions: fluentComponentDefinitions,\n kind: \"fluent\",\n toolKind: \"Fluent\",\n});\n\nexport const listFluentComponents = (): FluentComponentCatalogEntry[] => api.list();\n\nexport const describeFluentComponent = (\n capability: string,\n): FluentComponentAuthoringDescription => api.describe(capability);\n\nexport const validateFluentComponentProps = (\n capability: string,\n props: unknown,\n): ComponentValidationReport => api.validate(capability, props);\n\nexport const materializeFluentComponentTrial = api.materialize;\n\nexport const preflightFluentComponent = (\n capability: string,\n props: unknown,\n): FluentComponentPreflightReport => api.preflight(capability, props);\n\nexport const getFluentComponentAgentInstructions = api.instructions;\n\nexport const createFluentComponentAuthoringTools = (\n components?: readonly string[],\n): ComponentAuthoringTool[] => api.createTools(components);\n\nexport const getFluentComponentAgentKit = (\n components?: readonly string[],\n): FluentComponentAgentKit => api.getKit(components);\n\nexport const fluentComponentAuthoringTools = createFluentComponentAuthoringTools();\n"],"mappings":"2MAAA,OAAOA,MAAW,QAClB,OACE,SAAAC,EACA,SAAAC,GACA,aAAAC,GACA,OAAAC,GACA,WAAAC,GACA,OAAAC,GACA,YAAAC,GACA,YAAAC,OACK,6BACP,OAAS,aAAAC,MAAsC,gBCFxC,IAAMC,EAAqB,CAChC,KAAM,SACN,qBAAsB,GACtB,SAAU,CAAC,QAAS,OAAO,EAC3B,WAAY,CACV,MAAO,CAAE,KAAM,QAAS,EACxB,MAAO,CAAE,KAAM,QAAS,EACxB,SAAU,CAAE,KAAM,SAAU,CAC9B,CACF,EAEO,SAASC,EAAkBC,EAA8C,CAC9E,OAAK,MAAM,QAAQA,CAAK,EACjBA,EAAM,QAASC,GAChB,CAACA,GAAQ,OAAOA,GAAS,UAAY,MAAM,QAAQA,CAAI,EAAU,CAAC,EAClE,OAAOA,EAAK,OAAU,UAAY,OAAOA,EAAK,OAAU,SAAiB,CAAC,EACvE,CAAC,CACN,MAAOA,EAAK,MACZ,MAAOA,EAAK,MACZ,GAAI,OAAOA,EAAK,aAAgB,SAAW,CAAE,YAAaA,EAAK,WAAY,EAAI,CAAC,EAChF,SAAUA,EAAK,WAAa,EAC9B,CAAC,CACF,EAViC,CAAC,CAWrC,CDHQ,cAAAC,EAkFF,QAAAC,OAlFE,oBAVN,SAASC,GAAeC,EAA0E,CAChG,GAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAM,SAASH,CAAQ,EACjD,OAAAG,EAAM,UAAU,IAAMD,EAASF,CAAQ,EAAG,CAACA,CAAQ,CAAC,EAC7C,CAACC,EAAOC,CAAQ,CACzB,CAEO,IAAME,EAAkC,CAAC,CAAE,KAAAC,EAAM,KAAAC,CAAK,IAAM,CACjE,IAAMC,EAAQC,EAAUH,CAAI,EAC5B,OACER,EAACY,EAAA,CAAO,GAAGC,EAAmBL,CAAI,EAAG,MAAOE,EAAM,IAAI,OAAO,GAAK,OAAW,SAAUA,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AAI,SAASK,CAAU,EAEpDC,GAA+B,CAC1CD,EACAE,IAC8BP,EAAI,SAASK,EAAYE,CAAK,EAEjDC,GAAkCR,EAAI,YAEtCS,GAA2B,CACtCJ,EACAE,IACmCP,EAAI,UAAUK,EAAYE,CAAK,EAEvDG,GAAsCV,EAAI,aAE1CW,GACXC,GAC6BZ,EAAI,YAAYY,CAAU,EAE5CC,GACXD,GAC4BZ,EAAI,OAAOY,CAAU,EAEtCE,GAAgCH,GAAoC","names":["React","Field","Input","SearchBox","Tab","TabList","Tag","TagGroup","Textarea","readProps","fluentOptionSchema","readFluentOptions","value","item","jsx","jsxs","useSyncedValue","incoming","value","setValue","React","FluentTextField","node","emit","props","readProps","Field","componentRootProps","Input","resolveControlSize","_","data","FluentTextarea","rows","Textarea","FluentSearchbox","label","event","SearchBox","FluentTabBar","children","legacyOptions","readFluentOptions","tabs","candidate","tab","panes","controlled","localActive","setLocalActive","requestedActive","active","activeIndex","activePane","TabList","Tab","FluentChips","items","size","resolvedSize","TagGroup","item","Tag","stringProperty","inputProperties","FLUENT_CONTROL_SIZES","textFieldSchema","withComponentStylePropsSchema","textareaSchema","searchboxSchema","tabBarSchema","fluentOptionSchema","chipsSchema","textFieldDescription","eventContract","STANDARD_COMPACT_VARIANTS","textareaDescription","searchboxDescription","tabBarDescription","chipsDescription","fluentTextFieldDefinition","defineFluentComponent","fluentTextareaDefinition","fluentSearchboxDefinition","fluentTabBarDefinition","fluentChipsDefinition","Dropdown","Field","Option","Switch","ToggleButton","CircleRegular","CircleSmallFilled","readProps","jsx","readToggleState","node","props","readProps","onValue","offValue","checked","FluentSwitch","emit","state","name","Switch","componentRootProps","resolveControlSize","_","data","FluentToggle","iconName","icon","toggleIcons","title","ToggleButton","CircleSmallFilled","CircleRegular","FluentDropdown","options","readFluentOptions","value","selected","option","label","Field","Dropdown","candidate","Option","toggleProperties","FLUENT_CONTROL_SIZES","switchSchema","withComponentStylePropsSchema","toggleSchema","dropdownSchema","fluentOptionSchema","description","capability","summary","event","eventSummary","eventProperties","requiredProperties","useWhen","rules","eventContract","STANDARD_COMPACT_VARIANTS","switchDescription","toggleDescription","dropdownDescription","fluentSwitchDefinition","defineFluentComponent","fluentToggleDefinition","fluentDropdownDefinition","DataGrid","DataGridBody","DataGridCell","DataGridHeader","DataGridHeaderCell","DataGridRow","List","ListItem","Table","TableBody","TableCell","TableHeader","TableHeaderCell","TableRow","createTableColumn","makeStyles","tokens","readProps","jsx","jsxs","LIST_VARIANTS","useListStyles","makeStyles","tokens","readColumns","value","column","readRows","row","cells","readStringArray","item","renderCellValue","FluentList","node","emit","styles","props","readProps","items","readFluentOptions","isVerticalCards","selectionMode","resolvedSelectionMode","selectedItems","List","componentRootProps","_","data","ListItem","FluentTable","columns","rows","size","resolvedSize","Table","TableHeader","TableRow","TableHeaderCell","TableBody","TableCell","FluentDataGrid","authoredColumns","sortColumn","sortDirection","createTableColumn","DataGrid","DataGridHeader","DataGridRow","renderHeaderCell","DataGridHeaderCell","DataGridBody","rowId","renderCell","DataGridCell","stringProperty","columnSchema","cellValueSchema","rowSchema","listItemSchema","fluentOptionSchema","listSchema","withComponentStylePropsSchema","tableProperties","tableSchema","dataGridSchema","listDescription","eventContract","tableDescription","STANDARD_COMPACT_VARIANTS","dataGridDescription","trialColumns","trialRows","fluentListDefinition","defineFluentComponent","fluentTableDefinition","fluentDataGridDefinition","Text","readProps","jsx","FLUENT_TEXT_VARIANTS","FLUENT_TEXT_ELEMENTS","variantProps","FluentText","node","props","readProps","variant","element","as","content","typographyProps","componentRootProps","Text","schema","withComponentStylePropsSchema","description","fluentTextDefinition","defineFluentComponent","Toolbar","readProps","jsx","toolbarSizes","FluentToolbar","node","children","props","readProps","Toolbar","componentRootProps","toolbarSchema","withComponentStylePropsSchema","toolbarDescription","fluentToolbarDefinition","defineFluentComponent","makeStyles","mergeClasses","tokens","readProps","jsx","jsxs","useStyles","makeStyles","tokens","FluentRow","node","children","styles","props","readProps","variant","gap","componentRootProps","mergeClasses","FluentPanel","title","rowSchema","withComponentStylePropsSchema","panelSchema","rowDescription","panelDescription","fluentRowDefinition","defineFluentComponent","fluentPanelDefinition","fluentComponentViews","FluentBadge","FluentButton","FluentChips","FluentDataGrid","FluentDialog","FluentDropdown","FluentList","FluentPanel","FluentPersona","FluentSearchbox","FluentRow","FluentSpinner","FluentSwitch","FluentTable","FluentText","FluentTabBar","FluentTextField","FluentTextarea","FluentToolbar","FluentToggle","fluentComponentDefinitions","fluentBadgeDefinition","fluentButtonDefinition","fluentChipsDefinition","fluentDataGridDefinition","fluentDialogDefinition","fluentDropdownDefinition","fluentListDefinition","fluentPanelDefinition","fluentPersonaDefinition","fluentSearchboxDefinition","fluentRowDefinition","fluentSpinnerDefinition","fluentSwitchDefinition","fluentTableDefinition","fluentTextDefinition","fluentTabBarDefinition","fluentTextFieldDefinition","fluentTextareaDefinition","fluentToolbarDefinition","fluentToggleDefinition","fluentComponentCapabilities","name","definition","api","createComponentAuthoringApi","fluentComponentDefinitions","listFluentComponents","describeFluentComponent","capability","validateFluentComponentProps","props","materializeFluentComponentTrial","preflightFluentComponent","getFluentComponentAgentInstructions","createFluentComponentAuthoringTools","components","getFluentComponentAgentKit","fluentComponentAuthoringTools"]}
@@ -0,0 +1,7 @@
1
+ import{b as Nt,f as Dt}from"./chunk-UP2OAMPY.js";import{b as At,f as Vt,l as Lt,q as jt}from"./chunk-H6T3CCU5.js";import{C as Ft,p as Et,u as Bt,y as Wt}from"./chunk-OFWGYY7S.js";import{c as $t,g as zt}from"./chunk-DMIV5ZI5.js";import{b as Rt,g as Tt,k as Pt}from"./chunk-DNHCWSHQ.js";import{a as j,b as S,d as k,f as xt,g as E,h as St,i as K,j as C,k as Le,l as kt,m as He,n as ie}from"./chunk-XA6FE7ZK.js";import{runDeclarativeValidators as Jn}from"@gik-ai/evaluators";import{readProps as _n}from"@gik-ai/react";import q from"react";import{Button as Ot,Checkbox as Rn,Dropdown as It,Field as ge,Input as Tn,Option as Mt,Spinner as Pn,Textarea as Ht,makeStyles as Nn,mergeClasses as Je,tokens as Z}from"@fluentui/react-components";import{CheckmarkCircleRegular as Dn}from"@fluentui/react-icons";import{runDeclarativeValidators as An,validateDeclarativeFormValues as Vn}from"@gik-ai/evaluators";import{readProps as Ln,resolveLayoutSlots as jn}from"@gik-ai/react";import{Fragment as Hn,jsx as W,jsxs as je}from"react/jsx-runtime";var En=Nn({root:{display:"grid",gap:Z.spacingVerticalL},grid:{display:"grid",gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gap:`${Z.spacingVerticalM} ${Z.spacingHorizontalL}`},span1:{gridColumn:"span 1"},span2:{gridColumn:"span 2"},span3:{gridColumn:"span 3"},span4:{gridColumn:"span 4"},span5:{gridColumn:"span 5"},span6:{gridColumn:"span 6"},span7:{gridColumn:"span 7"},span8:{gridColumn:"span 8"},span9:{gridColumn:"span 9"},span10:{gridColumn:"span 10"},span11:{gridColumn:"span 11"},span12:{gridColumn:"span 12"},actions:{display:"flex",justifyContent:"flex-end",gap:Z.spacingHorizontalS},success:{display:"flex",alignItems:"center",gap:Z.spacingHorizontalXS,color:Z.colorPaletteGreenForeground1},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"32px"},footerError:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:Z.colorPaletteRedForeground1},errors:{display:"grid",gap:Z.spacingVerticalXXS,color:Z.colorPaletteRedForeground1},fullWidth:{width:"100%"},checkbox:{alignSelf:"end"}});function Bn(e,o){let n=JSON.stringify(e),[t,r]=q.useState(e),[a,i]=q.useState(o);q.useEffect(()=>{r(e),i(o)},[n,o]);let l=q.useCallback(()=>{r(e),i(o)},[n,o]);return{draft:t,setDraft:r,dirty:a,setDirty:i,reset:l}}function _e(e,o=!1){let n=o?e.items??{}:e;if(Array.isArray(n.oneOf))return n.oneOf.map(t=>{let r=t;return{value:String(r.const??""),label:String(r.title??r.const??"")}});if(Array.isArray(e.options))return e.options.map(t=>typeof t=="string"?{value:t,label:t}:{value:String(t.value),label:String(t.label)});if(Array.isArray(n.enum)){let t=Array.isArray(n.enumNames)?n.enumNames:[];return n.enum.map((r,a)=>({value:String(r??""),label:String(t[a]??r??"")}))}return[]}function Jt(e){return e.format==="json"||e.type==="json"}function _t(e){let o=e.items??{};return e.type==="array"&&(Array.isArray(o.enum)||Array.isArray(o.oneOf)||Array.isArray(e.options))}function Gt(e){return e.format==="textarea"||e.multiline===!0}function Wn(e){return e.format==="password"||e.secret===!0?"password":e.format==="date"?"date":e.format==="time"?"time":e.format==="date-time"||e.format==="datetime"?"datetime-local":e.type==="number"||e.type==="integer"?"number":"text"}function Fn(e){let o=e.colSpan??e.span;return typeof o=="number"&&Number.isFinite(o)?Math.min(12,Math.max(1,Math.round(o))):(e.type==="number"||e.type==="integer"||_e(e).length>0||_t(e)||["date","time","date-time","datetime"].includes(String(e.format)))&&!Gt(e)?6:12}function $n(e,o){let n=o==null?"":String(o);return e.format==="date"?n.slice(0,10):e.format==="time"?n.slice(0,5):e.format==="date-time"||e.format==="datetime"?n.slice(0,16):n}var Ce=({node:e,emit:o})=>{let n=Ln(e),t=En(),r=n.obj("fields",n.obj("schema",{properties:{}})),a=r.properties??{},i=new Set(r.required??[]),l=n.obj("value",n.obj("data",{})),u=n.obj("validationContext",{}),m=n.bool("readOnly"),h=n.bool("initiallyDirty"),d=e.props.saving!==void 0,c=n.bool("saving"),g=n.str("saveError"),{draft:s,setDraft:f,dirty:D,setDirty:B,reset:w}=Bn(l,h),y=Object.entries(a).filter(([,N])=>Jt(N)).map(([N])=>N),x=y.join("\0"),v=q.useCallback(N=>Object.fromEntries(y.map(T=>{let p=N[T];return[T,p==null?"":typeof p=="string"?p:JSON.stringify(p,null,2)]})),[x]),[R,L]=q.useState(()=>v(l)),[O,z]=q.useState({}),[H,oe]=q.useState([]),[ne,U]=q.useState(!1);q.useEffect(()=>{L(v(l)),z({}),oe([]),U(!1)},[JSON.stringify(l),v]);let Ie=q.useRef(!1);q.useEffect(()=>{d&&Ie.current&&!c&&!g&&(B(!1),U(!0)),Ie.current=c},[c,g,d]);let re=(N,T)=>{f(p=>({...p,[N]:T})),B(!0),U(!1)},vn=(N,T)=>{if(L(p=>({...p,[N]:T})),B(!0),U(!1),!T.trim()){z(p=>({...p,[N]:""})),f(p=>({...p,[N]:void 0}));return}try{let p=JSON.parse(T);z(J=>({...J,[N]:""})),f(J=>({...J,[N]:p}))}catch(p){z(J=>({...J,[N]:p instanceof Error?p.message:"Invalid JSON"}))}},wn=()=>{w(),L(v(l)),z({}),oe([]),U(!1)},Cn=N=>{if(N.preventDefault(),m||c||Object.values(O).some(Boolean))return;let T=Vn(r,s,{bindings:u});oe(T.errors.map(p=>p.detail)),T.ok&&(o("save",{values:s}),d||(B(!1),U(!0)))},xn=[t.span1,t.span2,t.span3,t.span4,t.span5,t.span6,t.span7,t.span8,t.span9,t.span10,t.span11,t.span12],vt=jn(Object.entries(a).map(([N,T])=>({key:N,content:{key:N,field:T}})),e.props.layout),Sn=[{slot:"children",fields:vt.children},...Object.entries(vt.slots).map(([N,T])=>({slot:N,fields:T}))].filter(N=>N.fields.length>0);return je("form",{...C(e,t.root),onSubmit:Cn,children:[Sn.map(N=>W("div",{className:Je(t.grid,"gx-form-grid"),"data-layout-slot":N.slot,children:N.fields.map(({key:T,field:p})=>{let J=String(p.title??T),wt=typeof p.description=="string"?p.description:typeof p.hint=="string"?p.hint:void 0,de=m||p.readOnly===!0||p.disabled===!0,ve=i.has(T),ee=s[T],Ct=Fn(p),me=Je(xn[Ct-1],"gx-field-cell",`gx-col-span-${Ct}`),ue=wt?W("span",{className:"gx-field-hint",children:wt}):void 0;if(Jt(p)){let _=O[T];return W(ge,{className:me,label:J,hint:ue,required:ve,validationState:_?"error":"none",validationMessage:_||void 0,children:W(Ht,{className:t.fullWidth,rows:Number(p.rows??8),resize:"vertical",value:R[T]??"",placeholder:String(p.placeholder??""),readOnly:de,onChange:(I,G)=>vn(T,G.value)})},T)}if(p.type==="boolean")return W(ge,{className:Je(me,t.checkbox),hint:ue,children:W(Rn,{label:J,checked:!!ee,disabled:de,onChange:(_,I)=>re(T,I.checked)})},T);if(_t(p)){let _=Array.isArray(ee)?ee.map(String):[],I=_e(p,!0);return W(ge,{className:me,label:J,hint:ue,required:ve,children:W(It,{multiselect:!0,className:t.fullWidth,selectedOptions:_,value:I.filter(G=>_.includes(G.value)).map(G=>G.label).join(", "),disabled:de,onOptionSelect:(G,kn)=>re(T,kn.selectedOptions),children:I.map(G=>W(Mt,{value:G.value,children:G.label},G.value))})},T)}let Me=_e(p);if(Me.length>0){let _=ee==null?"":String(ee);return W(ge,{className:me,label:J,hint:ue,required:ve,children:W(It,{className:t.fullWidth,selectedOptions:_?[_]:[],value:Me.find(I=>I.value===_)?.label??"",placeholder:String(p.placeholder??"All"),disabled:de,onOptionSelect:(I,G)=>re(T,G.optionValue??""),children:Me.map(I=>W(Mt,{value:I.value,children:I.label},I.value))})},T)}if(Gt(p))return W(ge,{className:me,label:J,hint:ue,required:ve,children:W(Ht,{className:t.fullWidth,rows:Number(p.rows??4),resize:"vertical",value:ee==null?"":String(ee),placeholder:String(p.placeholder??""),readOnly:de,minLength:typeof p.minLength=="number"?p.minLength:void 0,maxLength:typeof p.maxLength=="number"?p.maxLength:void 0,onChange:(_,I)=>re(T,I.value)})},T);let we=Wn(p);return W(ge,{className:me,label:J,hint:ue,required:ve,children:W(Tn,{className:t.fullWidth,type:we,value:$n(p,ee),placeholder:String(p.placeholder??""),readOnly:de,min:typeof p.minimum=="number"?p.minimum:void 0,max:typeof p.maximum=="number"?p.maximum:void 0,step:p.type==="integer"?1:p.type==="number"?"any":void 0,minLength:we==="text"&&typeof p.minLength=="number"?p.minLength:void 0,maxLength:we==="text"&&typeof p.maxLength=="number"?p.maxLength:void 0,pattern:we==="text"&&typeof p.pattern=="string"?p.pattern:void 0,onChange:(_,I)=>re(T,we==="number"&&I.value!==""?Number.parseFloat(I.value):I.value)})},T)})},N.slot)),H.length>0?W("div",{className:t.errors,role:"alert",children:H.map(N=>W("span",{children:N},N))}):null,m?null:W("div",{className:t.footer,children:ne&&!D?je("div",{className:t.success,role:"status",children:[W(Dn,{"aria-hidden":"true"}),W("span",{children:n.str("successLabel","Saved")})]}):D?je(Hn,{children:[g?W("span",{className:t.footerError,role:"alert",title:g,children:g}):null,je("div",{className:t.actions,children:[W(Ot,{type:"button",onClick:wn,disabled:c,children:n.str("discardLabel","Discard")}),W(Ot,{type:"submit",appearance:"primary",disabled:c||Object.values(O).some(Boolean),icon:c?W(Pn,{size:"tiny"}):void 0,children:c?n.str("savingLabel","Saving\u2026"):n.str("saveLabel","Save")})]})]}):null})]})},zn={type:"object",additionalProperties:!1,properties:{fields:{type:"object"},schema:{type:"object"},value:{type:"object"},data:{type:"object"},validationContext:{type:"object"},saveLabel:{type:"string"},discardLabel:{type:"string"},successLabel:{type:"string"},savingLabel:{type:"string"},saving:{type:"boolean"},saveError:{type:"string"},initiallyDirty:{type:"boolean"},readOnly:{type:"boolean"},...St}},On={capability:"primitive:form",summary:"Renders a schema-driven committed form using Fluent 2 controls and emits saved values.",dataProp:"value",events:["save"],eventContracts:{save:j("The user commits the edited form values.",{values:{type:"object",additionalProperties:!0}})},semanticTokens:[],variants:[],authoring:{useWhen:["Users edit a schema-defined object and explicitly commit or discard the draft"],avoidWhen:["Each field must emit immediately without an explicit commit","The data is naturally edited as rows; use editable-table"],rules:["Define fields through JSON Schema properties","Handle save payload values","Use readOnly for inspect-only forms","Pass external validator bindings through validationContext","Use initiallyDirty only for drafts not yet persisted","Keep workflow effects outside the component","The component itself shows a local success confirmation (successLabel) after a save with no further edits -- do not also author a separate saved-confirmation view for the common case","For a save that resolves asynchronously in the host Blueprint (e.g. a durable service invoke), bind `saving`/`saveError` to ordinary Blueprint state the Cell's own behavior manages -- an `assign` sets `saving` true at dispatch, and the operation's `settlement`/`failureSettlement` transform sets it back to false (plus `saveError` on failure) -- rather than relying on the optimistic success shown as soon as `save` is emitted"]},agentFacing:{catalog:{interaction:"committed-input"},detail:{notes:["Editing is draft-based; values are published only through save."]}}},qt=K(zn);function In(e){return An([{kind:"ajv-schema",schema:qt,message:"Invalid primitive:form props",code:"primitive-form-schema"}],e)}function Mn(){return k("primitive:form",{fields:{properties:{name:{type:"string",title:"Name"},active:{type:"boolean",title:"Active"}},required:["name"]},value:{name:"Ada",active:!0}})}var Ee=S({description:On,version:"1.0.0",component:Ce,getSchema:()=>qt,validate:In,materializeTrial:Mn});import{Fragment as Kn,jsx as ae,jsxs as Ut}from"react/jsx-runtime";function Be(e,o,n){return{id:e,capability:o,props:n,visible:!0,fallback:!1,children:[]}}var Ge=({node:e,emit:o,children:n})=>{let r=_n(e).obj("access",{});if(!r.triggered)return ae(Kn,{children:n});let a=r.status??"required",i=r.title??"Access required",l=Le(r.inputFormSpec),u=Le(r.actions),m=Be(`${e.id}-dialog`,"fluent:dialog",{defaultOpen:!0,title:i,ariaLabel:i,modalType:"modal",...e.props.className?{className:e.props.className}:{},...e.props.style?{style:e.props.style}:{}}),h=Be(`${e.id}-form`,"primitive:form",l),d=(c,g,s,f)=>u[c]!==!0?null:ae(Rt,{node:Be(`${e.id}-${c}`,"fluent:button",{label:typeof u[`${c}Label`]=="string"?u[`${c}Label`]:g,...f?{appearance:f}:{}}),emit:()=>o(s,{}),children:void 0},c);return ae(Tt,{node:m,emit:(c,g)=>{Le(g).open===!1&&o("dismiss",{})},children:Ut("div",{className:"gx-access-gate-content",children:[r.message?ae("p",{children:r.message}):null,r.error?ae("p",{role:"alert",children:r.error}):null,a==="checking"?ae(Pt,{node:Be(`${e.id}-spinner`,"fluent:spinner",{label:"Checking access..."}),emit:()=>{},children:void 0}):null,Object.keys(l).length>0?ae(Ce,{node:h,emit:(c,g)=>o("submit",g),children:void 0}):null,Ut("div",{className:"gx-access-gate-actions",children:[d("reset","Reset","reset"),d("retry","Retry","retry","primary")]})]})})},Kt=K({type:"object",additionalProperties:!1,required:["access"],properties:{access:{type:"object",additionalProperties:!1,required:["triggered"],properties:{triggered:{type:"boolean"},status:{type:"string",enum:["idle","checking","required","error"]},title:{type:"string"},message:{type:"string"},error:{type:"string"},inputFormSpec:Ee.getSchema(),actions:{type:"object",additionalProperties:!1,properties:{retry:{type:"boolean"},retryLabel:{type:"string"},reset:{type:"boolean"},resetLabel:{type:"string"}}}}}}}),Gn={capability:"primitive:access-gate",summary:"Gates protected children behind a controlled access workflow composed from declarative GIK controls.",dataProp:"access",slots:["children"],events:["submit","retry","reset","dismiss"],eventContracts:{submit:j("The user submits the authored access fields.",{values:{type:"object",additionalProperties:!0}}),retry:j("The user requests another access check."),reset:j("The user requests that access state be reset."),dismiss:j("The user dismisses the access prompt without completing the access workflow.")},semanticTokens:[],variants:[],authoring:{useWhen:["Content availability depends on an externally managed access workflow"],avoidWhen:["The workflow is a general confirmation without access input"],rules:["Resolve authored conditions into access.triggered at the call site","Describe credential fields through inputFormSpec","Handle emitted events with declarative actions or effects","Handle dismiss only when the application needs to react to cancellation","Never place credentials in the trigger expression"]}};function qn(e){return Jn([{kind:"ajv-schema",schema:Kt,message:"Invalid primitive:access-gate props",code:"primitive-access-gate-schema"}],e)}function Un(){return k("primitive:access-gate",{access:{triggered:!0,status:"required",title:"Connect to service",message:"Enter a credential to continue.",inputFormSpec:{fields:{properties:{credential:{type:"string",title:"Credential",format:"password"}},required:["credential"]},value:{credential:""},saveLabel:"Continue"},actions:{retry:!1,reset:!1}}})}var Xt=S({description:Gn,version:"1.0.0",component:Ge,getSchema:()=>Kt,validate:qn,materializeTrial:Un});import{MessageBar as Xn,MessageBarBody as Zn,MessageBarTitle as Qn}from"@fluentui/react-components";import{runDeclarativeValidators as Yn}from"@gik-ai/evaluators";import{readProps as er}from"@gik-ai/react";import{jsx as Zt,jsxs as nr}from"react/jsx-runtime";var Qt=["good","success","warn","warning","bad","error","info","unknown"],qe=({node:e})=>{let o=er(e),n=o.str("level","unknown"),t=n==="good"||n==="success"?"success":n==="warn"||n==="warning"?"warning":n==="bad"||n==="error"?"error":"info";return Zt(Xn,{...C(e),intent:t,children:nr(Zn,{children:[o.str("label")?Zt(Qn,{children:o.str("label")}):null,o.str("value")||"-"]})})},Yt={type:"object",additionalProperties:!1,required:["value"],properties:{...E,value:{type:"string"},label:{type:"string"},level:{type:"string",enum:Qt}}},tr={capability:"primitive:alert",summary:"Presents a labeled status message using Fluent semantic intent.",dataProp:"value",events:[],semanticTokens:[...Qt],variants:[],authoring:{useWhen:["A status or failure needs prominent non-interactive feedback"],avoidWhen:["The message is ordinary supporting copy; use primitive:note"],rules:["Bind message text through value","Use level only for semantic status"]}};function or(e){return Yn([{kind:"ajv-schema",schema:Yt,message:"Invalid primitive:alert props",code:"primitive-alert-schema"}],e)}var eo=S({description:tr,version:"1.0.0",component:qe,getSchema:()=>Yt,validate:or,materializeTrial:()=>k("primitive:alert",{label:"Status",value:"Investigation active",level:"info"})});import{Badge as rr,Text as xe,makeStyles as ir,tokens as P}from"@fluentui/react-components";import{runDeclarativeValidators as ar}from"@gik-ai/evaluators";import{jsx as F,jsxs as X}from"react/jsx-runtime";var oo=["accent","positive","negative","warning","neutral"],sr=["standard","compact"],lr=["bar","line","pie"],cr={$schema:"http://json-schema.org/draft-07/schema#",type:"object",additionalProperties:!1,required:["points","spec"],properties:{...E,points:{type:"array",items:{type:"object"}},summaryValue:{type:["string","number"]},variant:{enum:sr},spec:{type:"object",additionalProperties:!1,required:["kind","fields"],properties:{kind:{enum:lr},title:{type:"string"},description:{type:"string"},emptyText:{type:"string"},valueSuffix:{type:"string"},fields:{type:"object",additionalProperties:!1,required:["label","value"],properties:{label:{type:"string",minLength:1},value:{type:"string",minLength:1},tone:{type:"string",minLength:1}}},toneMap:{type:"object",additionalProperties:{enum:oo}},summary:{type:"object",additionalProperties:!1,required:["label"],properties:{label:{type:"string",minLength:1},prefix:{type:"string"},suffix:{type:"string"}}},table:{type:"object",additionalProperties:!1,required:["label","columns"],properties:{label:{type:"string",minLength:1},columns:{type:"array",minItems:1,items:{type:"object",additionalProperties:!1,required:["field","label"],properties:{field:{type:"string",minLength:1},label:{type:"string",minLength:1},prefix:{type:"string"},suffix:{type:"string"}}}}}}}}}},pr=ir({root:{display:"grid",gap:P.spacingVerticalM,minWidth:0},header:{display:"grid",gap:P.spacingVerticalXXS},description:{color:P.colorNeutralForeground3},summary:{display:"grid",gap:P.spacingVerticalXXS},chart:{width:"100%",minWidth:0,overflow:"visible"},legend:{display:"flex",flexWrap:"wrap",gap:P.spacingHorizontalS},legendItem:{display:"flex",alignItems:"center",gap:P.spacingHorizontalXS},swatch:{width:P.spacingHorizontalM,height:P.spacingVerticalM,borderRadius:P.borderRadiusSmall},tableWrap:{overflowX:"auto"},table:{width:"100%",borderCollapse:"collapse"},cell:{padding:`${P.spacingVerticalS} ${P.spacingHorizontalS}`,textAlign:"left",borderBottom:`${P.strokeWidthThin} solid ${P.colorNeutralStroke2}`,whiteSpace:"nowrap"}});function to(e){return e==="positive"?P.colorPaletteGreenForeground1:e==="negative"?P.colorPaletteRedForeground1:e==="warning"?P.colorPaletteDarkOrangeForeground1:e==="neutral"?P.colorNeutralForeground3:P.colorBrandForeground1}var We=[P.colorBrandForeground1,P.colorPaletteGreenForeground1,P.colorPaletteDarkOrangeForeground1,P.colorPaletteRedForeground1,P.colorPaletteLightTealForeground2];function dr(e,o,n,t,r){let a=m=>({x:e+n*Math.cos(m),y:o+n*Math.sin(m)}),i=a(t),l=a(r),u=r-t>Math.PI?1:0;return`M ${e} ${o} L ${i.x} ${i.y} A ${n} ${n} 0 ${u} 1 ${l.x} ${l.y} Z`}var Ue=({node:e})=>{let o=pr(),n=kt(e.props.points),t=e.props.spec??{},r=(e.props.variant??"standard")==="compact",a=n.map(w=>Number(He(w,t.fields?.value))).filter(Number.isFinite),i=Math.max(...a,0);if(!t.fields||n.length===0||i<=0)return F(xe,{...C(e),children:t.emptyText??"No chart data available."});let l=640,u=r?180:260,m=42,h=16,d=r?30:48,c=u-h-d,g=(l-m-12)/n.length,s=n.map((w,y)=>{let x=Number(He(w,t.fields.value));return{point:w,value:x,x:m+g*y+g/2,y:h+c-x/i*c}}),f=s.reduce((w,y)=>w+y.value,0),D=-Math.PI/2,B=(w,y)=>`${y.prefix??""}${ie(w,y.field)}${y.suffix??""}`;return X("figure",{...C(e,o.root),"aria-label":t.title??"Chart",children:[X("figcaption",{className:o.header,children:[t.title?F(xe,{weight:"semibold",size:500,children:t.title}):null,t.description?F(xe,{className:o.description,children:t.description}):null,t.summary?X("div",{className:o.summary,role:"group","aria-label":t.summary.label,children:[F(xe,{children:t.summary.label}),X(xe,{weight:"bold",size:700,children:[t.summary.prefix??"",String(e.props.summaryValue??""),t.summary.suffix??""]})]}):null]}),X("svg",{className:o.chart,viewBox:`0 0 ${l} ${u}`,role:"img",children:[F("title",{children:t.title??"Chart"}),F("desc",{children:t.description??`${t.kind} chart with ${n.length} points`}),t.kind!=="pie"?F("line",{x1:m,y1:h+c,x2:l-12,y2:h+c,stroke:P.colorNeutralStroke1}):null,t.kind==="line"?F("polyline",{points:s.map(({x:w,y})=>`${w},${y}`).join(" "),fill:"none",stroke:P.colorBrandForeground1,strokeWidth:P.strokeWidthThicker}):null,s.map(({point:w,value:y,x,y:v},R)=>{let L=ie(w,t.fields.tone),O=L?t.toneMap?.[L]:void 0,z=O?to(O):We[R%We.length],H=ie(w,t.fields.label);if(t.kind==="pie"){let oe=D,ne=D+y/f*Math.PI*2;return D=ne,F("path",{d:dr(l/2,u/2,r?72:106,oe,ne),fill:z,stroke:P.colorNeutralBackground1,strokeWidth:P.strokeWidthThick,children:F("title",{children:`${H}: ${y}${t.valueSuffix??""}`})},`${H}-${R}`)}return X("g",{children:[t.kind==="bar"?F("rect",{x:x-g*.3,y:v,width:g*.6,height:h+c-v,rx:P.borderRadiusSmall,fill:z,children:F("title",{children:`${H}: ${y}${t.valueSuffix??""}`})}):F("circle",{cx:x,cy:v,r:"5",fill:z,children:F("title",{children:`${H}: ${y}${t.valueSuffix??""}`})}),F("text",{x,y:u-(r?10:22),textAnchor:"middle",fill:P.colorNeutralForeground2,fontSize:P.fontSizeBase200,children:H}),r?null:X("text",{x,y:Math.max(v-8,12),textAnchor:"middle",fill:P.colorNeutralForeground1,fontSize:P.fontSizeBase200,children:[y,t.valueSuffix??""]})]},`${H}-${R}`)})]}),F("div",{className:o.legend,"aria-hidden":"true",children:s.map(({point:w,value:y},x)=>{let v=ie(w,t.fields.tone),R=v?t.toneMap?.[v]:void 0,L=R?to(R):We[x%We.length];return X("div",{className:o.legendItem,children:[F("span",{className:o.swatch,style:{backgroundColor:L}}),X(rr,{appearance:"outline",children:[ie(w,t.fields.label),t.kind==="pie"?` \xB7 ${y}${t.valueSuffix??""}`:""]})]},x)})}),t.table?F("div",{className:o.tableWrap,children:X("table",{className:o.table,"aria-label":t.table.label,children:[F("thead",{children:F("tr",{children:t.table.columns.map(w=>F("th",{className:o.cell,children:w.label},w.field))})}),F("tbody",{children:n.map((w,y)=>F("tr",{children:t.table.columns.map(x=>F("td",{className:o.cell,children:B(w,x)},x.field))},`${ie(w,t.fields.label)}-${y}`))})]})}):null]})},no={capability:"primitive:chart",summary:"Renders a small mapped numeric series as an accessible bar, line, or pie chart.",dataProp:"points",events:[],semanticTokens:oo,defaultVariant:"standard",variants:[{value:"standard",summary:"Full chart with direct value labels where the chart kind supports them.",useWhen:["The chart is a primary analytical surface","Exact values should remain visible"]},{value:"compact",summary:"Reduced-height chart without direct value labels.",useWhen:["The chart supports a dashboard summary","Vertical space is constrained"]}],authoring:{useWhen:["Numeric values need visual comparison, trend reading, or part-to-whole analysis","A small single series is sufficient"],avoidWhen:["Values are primarily read as exact measures; use measure-set","The data needs multi-series interaction or zooming; use a specialized chart capability"],rules:["Provide finite non-negative numeric values","Set spec.kind to bar for category comparison, line for ordered trends, or pie for part-to-whole composition","Keep labels short","Map tone values only to recognized chart tokens"]}};function Os(){return no}function ro(){return cr}function mr(e){return ar([{kind:"ajv-schema",schema:ro(),message:"Invalid primitive:chart props",code:"primitive-chart-schema"},{kind:"jsonata",expr:"($field := data.spec.fields.value; $count(data.points[$type($lookup($, $field)) = 'number' and $lookup($, $field) >= 0]) = $count(data.points))",message:"Chart values must be finite non-negative numbers",code:"semantic-chart-values"}],e)}function ur(){return k("primitive:chart",{variant:"standard",points:[{hour:"08:00",count:7,posture:"normal"},{hour:"09:00",count:18,posture:"elevated"},{hour:"10:00",count:31,posture:"critical"},{hour:"11:00",count:12,posture:"normal"}],spec:{kind:"line",title:"Risk events by hour",description:"Observed events during the response window",fields:{label:"hour",value:"count",tone:"posture"},toneMap:{normal:"accent",elevated:"warning",critical:"negative"}}})}var io=S({description:no,version:"1.1.0",component:Ue,getSchema:ro,validate:mr,materializeTrial:ur});import{makeStyles as gr,mergeClasses as fr,tokens as Se}from"@fluentui/react-components";import{runDeclarativeValidators as hr}from"@gik-ai/evaluators";import{jsx as fo}from"react/jsx-runtime";var ao=["row","column","stack","flex"],so=["none","xs","s","m","l","xl"],lo=["stretch","start","center","end","baseline"],co=["start","center","end","space-between","space-around","space-evenly"],po=["row","row-reverse","column","column-reverse"],yr=gr({root:{boxSizing:"border-box",minWidth:0,minHeight:0},row:{display:"flex",flexDirection:"row"},column:{display:"flex",flexDirection:"column"},stack:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)"},flex:{display:"flex"},wrap:{flexWrap:"wrap"},grow:{flex:"1 1 0"},fullWidth:{width:"100%",minWidth:0},fullHeight:{height:"100%",minHeight:0},gapNone:{gap:0},gapXs:{gap:Se.spacingVerticalXS},gapS:{gap:Se.spacingVerticalS},gapM:{gap:Se.spacingVerticalM},gapL:{gap:Se.spacingVerticalL},gapXl:{gap:Se.spacingVerticalXL},alignStretch:{alignItems:"stretch"},alignStart:{alignItems:"flex-start"},alignCenter:{alignItems:"center"},alignEnd:{alignItems:"flex-end"},alignBaseline:{alignItems:"baseline"},justifyStart:{justifyContent:"flex-start"},justifyCenter:{justifyContent:"center"},justifyEnd:{justifyContent:"flex-end"},justifySpaceBetween:{justifyContent:"space-between"},justifySpaceAround:{justifyContent:"space-around"},justifySpaceEvenly:{justifyContent:"space-evenly"},directionRow:{flexDirection:"row"},directionRowReverse:{flexDirection:"row-reverse"},directionColumn:{flexDirection:"column"},directionColumnReverse:{flexDirection:"column-reverse"}});function br({children:e,className:o,style:n,variant:t="column",gap:r="m",align:a="stretch",justify:i="start",wrap:l=!1,direction:u="row",fill:m=!1,grow:h=!1,fullWidth:d=!1,fullHeight:c=!1,ariaLabel:g}){let s=yr(),f={none:s.gapNone,xs:s.gapXs,s:s.gapS,m:s.gapM,l:s.gapL,xl:s.gapXl},D={stretch:s.alignStretch,start:s.alignStart,center:s.alignCenter,end:s.alignEnd,baseline:s.alignBaseline},B={start:s.justifyStart,center:s.justifyCenter,end:s.justifyEnd,"space-between":s.justifySpaceBetween,"space-around":s.justifySpaceAround,"space-evenly":s.justifySpaceEvenly},w={row:s.directionRow,"row-reverse":s.directionRowReverse,column:s.directionColumn,"column-reverse":s.directionColumnReverse};return fo("div",{className:fr(s.root,s[t],f[r],D[a],B[i],t==="flex"&&w[u],l&&t!=="stack"&&s.wrap,(m||h)&&s.grow,(m||d)&&s.fullWidth,(m||c)&&s.fullHeight,(m||h)&&"gik-container-grow",(m||d)&&"gik-container-full-width",(m||c)&&"gik-container-full-height","gik-container",`gik-container-${t}`,o),style:n,role:g?"region":void 0,"aria-label":g,children:e})}function ke(e,o,n){return o.includes(e)?e:n}var Ke=({node:e,children:o})=>fo(br,{...C(e),variant:ke(e.props.variant,ao,"column"),gap:ke(e.props.gap,so,"m"),align:ke(e.props.align,lo,"stretch"),justify:ke(e.props.justify,co,"start"),wrap:e.props.wrap===!0,direction:ke(e.props.direction,po,"row"),fill:e.props.fill===!0,grow:e.props.grow===!0,fullWidth:e.props.fullWidth===!0,fullHeight:e.props.fullHeight===!0,ariaLabel:typeof e.props.ariaLabel=="string"?e.props.ariaLabel:void 0,children:o}),vr={$schema:"http://json-schema.org/draft-07/schema#",type:"object",additionalProperties:!1,properties:{...E,variant:{enum:ao},gap:{enum:so},align:{enum:lo},justify:{enum:co},wrap:{type:"boolean"},direction:{enum:po},fill:{type:"boolean"},grow:{type:"boolean"},fullWidth:{type:"boolean"},fullHeight:{type:"boolean"},ariaLabel:{type:"string",minLength:1}}},mo={capability:"primitive:container",summary:"Declaratively arranges child views without owning their data or behavior.",slots:["children"],events:[],semanticTokens:[],defaultVariant:"column",variants:[{value:"row",summary:"Places children horizontally in source order.",useWhen:["Peers belong on one horizontal line"]},{value:"column",summary:"Places children vertically in source order.",useWhen:["A page or region flows from top to bottom"]},{value:"stack",summary:"Places children in a single-column grid.",useWhen:["Grid sizing should align vertically stacked children"]},{value:"flex",summary:"Provides configurable flex direction, alignment, wrapping, and distribution.",useWhen:["Responsive child distribution needs explicit flex controls"]}],authoring:{useWhen:["Child views need declarative spatial composition","One projection root must contain several sibling regions"],avoidWhen:["The surface has domain semantics better expressed by a semantic component","The region needs bounded scrolling; use primitive:growing-container"],rules:["Place composed views in the children slot","Use row or column for ordinary one-axis layouts and flex only when direction or wrapping must be configurable","Use stack for a single-column grid, not for overlapping layers","Use named gap values instead of embedding spacing in child styles","Use fullWidth or fullHeight for axis sizing, grow for flex growth, and fill only when all three behaviors are intended","Do not bind authored data to a container; containers intentionally declare no dataProp"]}};function qs(){return mo}function uo(){return vr}function wr(e){return hr([{kind:"ajv-schema",schema:uo(),message:"Invalid primitive:container props",code:"primitive-container-schema"}],e)}function Cr(){return k("primitive:container",{variant:"column",gap:"m",fill:!0,ariaLabel:"Content region"})}var go=S({description:mo,version:"1.0.0",component:Ke,getSchema:uo,validate:wr,materializeTrial:Cr});import Q from"react";import{Button as Re,Dialog as xr,DialogBody as Sr,DialogContent as kr,DialogSurface as Rr,DialogTitle as Tr,DialogTrigger as ho,makeStyles as Pr,mergeClasses as Te,tokens as A}from"@fluentui/react-components";import{ChevronLeftRegular as yo,ChevronRightRegular as bo,DismissRegular as Nr}from"@fluentui/react-icons";import{runDeclarativeValidators as Dr}from"@gik-ai/evaluators";import{readProps as Ar}from"@gik-ai/react";import{Fragment as Pe,jsx as V,jsxs as se}from"react/jsx-runtime";var Vr=["drawer","floating-drawer","dialog-modal"],Lr=["top-left","top-right","bottom-left","bottom-right"],jr=["primary","secondary","subtle","transparent","outline"],Er=Pr({root:{position:"fixed",top:A.spacingVerticalS,bottom:A.spacingVerticalS,zIndex:1040,display:"flex",alignItems:"flex-start",pointerEvents:"none"},left:{left:A.spacingHorizontalS},right:{right:A.spacingHorizontalS,flexDirection:"row-reverse"},floatingRoot:{pointerEvents:"auto"},toggle:{zIndex:2,pointerEvents:"auto",boxShadow:A.shadow8},bottom:{alignSelf:"flex-end"},edgeHandle:{zIndex:2,width:"24px",minWidth:"24px",height:"72px",padding:0,borderRadius:0,boxShadow:A.shadow16,pointerEvents:"auto"},edgeHandleLeft:{borderTopRightRadius:A.borderRadiusLarge,borderBottomRightRadius:A.borderRadiusLarge},edgeHandleRight:{borderTopLeftRadius:A.borderRadiusLarge,borderBottomLeftRadius:A.borderRadiusLarge},backdrop:{position:"fixed",inset:0,zIndex:0,backgroundColor:A.colorBackgroundOverlay,pointerEvents:"none"},panel:{position:"relative",zIndex:1,display:"flex",flexDirection:"column",width:"min(var(--gik-drawer-width), calc(100vw - 4.5rem))",height:"100%",minWidth:0,overflow:"hidden",boxSizing:"border-box",border:`${A.strokeWidthThin} solid ${A.colorNeutralStroke2}`,borderRadius:A.borderRadiusLarge,backgroundColor:A.colorNeutralBackground1,boxShadow:A.shadow64,pointerEvents:"auto"},floatingHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:A.spacingHorizontalM,padding:A.spacingVerticalS,borderRadius:A.borderRadiusMedium,backgroundColor:A.colorNeutralBackground2},floatingTitle:{fontSize:A.fontSizeBase400,fontWeight:A.fontWeightSemibold},floatingHeaderContent:{flex:"1 1 auto",minWidth:0},sections:{display:"grid",gridTemplateRows:"auto minmax(0, 1fr) auto",flexGrow:1,flexShrink:1,flexBasis:0,width:"100%",minHeight:0,overflow:"hidden"},sectionBody:{gridRow:2,minHeight:0,overflow:"auto",boxSizing:"border-box",padding:A.spacingHorizontalL},sectionChrome:{padding:A.spacingVerticalS,borderRadius:A.borderRadiusMedium,backgroundColor:A.colorNeutralBackground2},sectionHeader:{gridRow:1},sectionFooter:{gridRow:3},dialogContent:{display:"flex",minHeight:0}});function Br({children:e}){return V(Pe,{children:e})}function Wr({children:e}){return V(Pe,{children:e})}function Fr({children:e}){return V(Pe,{children:e})}function $r({children:e}){return V(Pe,{children:e})}function zr(e){let o,n=[],t=[],r=[];return Q.Children.forEach(e,a=>{if(Q.isValidElement(a)&&a.type===Wr){let i=Q.Children.toArray(a.props.children);i.length===1&&Q.isValidElement(i[0])&&(o=i[0])}else Q.isValidElement(a)&&a.type===Br?n.push(a.props.children):Q.isValidElement(a)&&a.type===Fr?t.push(a.props.children):Q.isValidElement(a)&&a.type===$r?r.push(a.props.children):t.push(a)}),{trigger:o,header:n,body:t,footer:r}}function vo(e,o,n,t){let r=e.props;return Q.cloneElement(e,{onClick:a=>{r.onClick?.(a),a.defaultPrevented||o()},"aria-label":r["aria-label"]??n,title:r.title??n,"aria-expanded":t})}function wo({sections:e,styles:o,includeHeader:n=!0}){return se("div",{className:o.sections,children:[n&&e.header.length>0?V("header",{className:Te(o.sectionChrome,o.sectionHeader),children:e.header}):null,V("div",{className:o.sectionBody,children:e.body}),e.footer.length>0?V("footer",{className:Te(o.sectionChrome,o.sectionFooter),children:e.footer}):null]})}var Xe=({node:e,emit:o,children:n})=>{let t=Er(),r=Ar(e),a=r.str("variant","drawer"),i=r.str("fabPosition","top-left"),l=i.endsWith("-right"),u=i.startsWith("bottom-"),m=typeof e.props.open=="boolean",[h,d]=Q.useState(()=>typeof e.props.defaultOpen=="boolean"?e.props.defaultOpen:a==="floating-drawer"),c=m?r.bool("open"):h,g=r.str("title","Panel"),s=r.str("openLabel",`Open ${g}`),f=r.str("closeLabel",`Close ${g}`),D=r.str("triggerLabel",s),B=typeof e.props.panelWidthPercent=="number"?e.props.panelWidthPercent:80,w=Math.min(80,Math.max(20,B)),y=typeof e.props.panelWidthPx=="number"?e.props.panelWidthPx:void 0,x=y===void 0?`${w}vw`:`${Math.min(720,Math.max(240,y))}px`,v=C(e),R=zr(n),L=c?"36px":"0px",O=c?"36px":A.spacingVerticalS,z=U=>{m||d(U),o("openChange",{open:U})};if(a==="dialog-modal"){let U=R.trigger?vo(R.trigger,()=>z(!0),D,c):V(Re,{appearance:r.str("triggerAppearance")||void 0,children:D});return se(xr,{open:c,modalType:"modal",onOpenChange:(Ie,re)=>z(re.open),children:[V(ho,{disableButtonEnhancement:!0,children:U}),V(Rr,{...v,"aria-label":r.str("ariaLabel",g),children:se(Sr,{children:[V(Tr,{action:V(ho,{action:"close",disableButtonEnhancement:!0,children:V(Re,{appearance:"subtle",icon:V(Nr,{}),"aria-label":f})}),children:g}),V(kr,{className:t.dialogContent,children:V(wo,{sections:R,styles:t})})]})})]})}let H=l===c?V(bo,{}):V(yo,{}),oe=a==="floating-drawer"?V(Re,{className:Te(t.edgeHandle,l?t.edgeHandleRight:t.edgeHandleLeft,u&&t.bottom),appearance:"primary",icon:H,"aria-label":s,title:s,"aria-expanded":!1,onClick:()=>z(!0)}):V(Re,{className:Te(t.toggle,u&&t.bottom),appearance:"primary",shape:"circular",size:"large",icon:H,"aria-label":c?f:s,title:c?f:s,"aria-expanded":c,onClick:()=>z(!c)}),ne=R.trigger?vo(R.trigger,()=>z(a==="floating-drawer"?!0:!c),c?f:s,c):oe;return se("aside",{...v,className:Te(t.root,l?t.right:t.left,a==="floating-drawer"&&t.floatingRoot,v.className),style:{...v.style,...a==="floating-drawer"?{top:O,bottom:O,...l?{right:L}:{left:L}}:{}},"aria-label":r.str("ariaLabel",g),children:[c?a==="drawer"?ne:null:ne,c?se(Pe,{children:[a==="drawer"?V("div",{className:t.backdrop,"data-pane-backdrop":!0,"aria-hidden":"true"}):null,se("div",{className:t.panel,style:{"--gik-drawer-width":x},children:[a==="floating-drawer"?se("header",{className:t.floatingHeader,children:[V("div",{className:t.floatingHeaderContent,children:R.header.length>0?R.header:V("span",{className:t.floatingTitle,children:g})}),V(Re,{appearance:"subtle",size:"small",icon:l?V(bo,{}):V(yo,{}),"aria-label":f,title:f,onClick:()=>z(!1)})]}):null,V(wo,{sections:R,styles:t,includeHeader:a!=="floating-drawer"})]})]}):null]})},Co=K({type:"object",additionalProperties:!1,required:["variant","title"],properties:{variant:{enum:Vr},open:{type:"boolean"},defaultOpen:{type:"boolean"},fabPosition:{enum:Lr},ariaLabel:{type:"string",minLength:1},title:{type:"string",minLength:1},openLabel:{type:"string",minLength:1},closeLabel:{type:"string",minLength:1},triggerLabel:{type:"string",minLength:1},triggerAppearance:{type:"string",enum:jr},panelWidthPercent:{type:"number",minimum:20,maximum:80},panelWidthPx:{type:"number",minimum:240,maximum:720}},allOf:[{if:{properties:{variant:{const:"dialog-modal"}},required:["variant"]},then:{required:["triggerLabel","closeLabel"]}}]}),Or={capability:"primitive:pane-with-trigger",summary:"Reveals authored children in a trigger-controlled drawer or modal dialog.",slots:["trigger","header","body","footer"],events:["openChange"],eventContracts:{openChange:j("The drawer open state changed; handling this event is optional unless open is controlled.",{open:{type:"boolean"}})},semanticTokens:[],defaultVariant:"drawer",variants:[{value:"drawer",summary:"Composes a corner-pinned circular toggle with a dimmed full-height overlay panel.",useWhen:["Secondary tools should visually suppress the workspace while open"]},{value:"floating-drawer",summary:"Composes a non-dimming floating panel with an internal hide action and a directional edge handle when closed.",useWhen:["Controls should open by default alongside a visible, interactive workspace"]},{value:"dialog-modal",summary:"Composes a labeled trigger with a modal dialog, title, and close action.",useWhen:["A focused temporary workflow must interrupt the current surface"]}],authoring:{useWhen:["Authored children belong in a temporary surface opened by its own trigger"],avoidWhen:["Content should permanently remain in the page flow"],rules:["Choose drawer when the open pane should visually suppress the workspace","Choose floating-drawer when controls and the workspace must remain visible together","Floating-drawer opens by default; set defaultOpen only when it should initially be closed","Floating-drawer derives its edge and hide direction from fabPosition","Choose dialog-modal for a focused modal workflow","Prefer local pane state; use defaultOpen only to choose its initial state","Bind open only when application behavior or cross-Cell coordination must control the drawer","Handle openChange only when the application needs to observe or control pane state","Use the optional trigger section to provide the clickable trigger element; otherwise the generated trigger button is used","Use optional header and footer sections around the required body section","Bare children remain supported and render in the body section","For drawer and floating-drawer, choose the toggle corner with fabPosition","Use panelWidthPx for a stable pane width or panelWidthPercent for a viewport-relative drawer width; do not provide both","For dialog-modal, provide triggerLabel and closeLabel","Provide concise accessible labels for both variants"]}};function Ir(e){return Dr([{kind:"ajv-schema",schema:Co,message:"Invalid primitive:pane-with-trigger props",code:"primitive-pane-with-trigger-schema"}],e)}function Mr(){return k("primitive:pane-with-trigger",{variant:"drawer",defaultOpen:!0,fabPosition:"top-left",title:"Source reports",triggerLabel:"Open source reports",closeLabel:"Close source reports",panelWidthPercent:80})}var xo=S({description:Or,version:"1.0.0",component:Xe,getSchema:()=>Co,validate:Ir,materializeTrial:Mr});import Fe from"react";import{Button as $e,Input as Hr,Table as Jr,TableBody as _r,TableCell as Ze,TableHeader as Gr,TableHeaderCell as So,TableRow as Qe,Text as ko,makeStyles as qr,mergeClasses as Ro,tokens as Ye}from"@fluentui/react-components";import{runDeclarativeValidators as Ur}from"@gik-ai/evaluators";import{readProps as Kr}from"@gik-ai/react";import{jsx as M,jsxs as Ne}from"react/jsx-runtime";var Xr=qr({root:{display:"grid",gap:Ye.spacingVerticalM,minWidth:0},overflow:{overflowX:"auto"},table:{width:"100%"},input:{width:"100%"},actionCell:{width:"1%",whiteSpace:"nowrap"},actions:{display:"flex",justifyContent:"flex-end",gap:Ye.spacingHorizontalS},placeholder:{color:Ye.colorNeutralForeground3}});function Zr(e){return e.map(o=>o&&typeof o=="object"&&!Array.isArray(o)?{...o}:{value:o??""})}function et(e){return Object.fromEntries(e.map(o=>[o,""]))}function Po(e){return Object.values(e).every(o=>o==null||typeof o=="string"&&o.trim()==="")}function To(e,o){return e.length>0&&Po(e[e.length-1])?e:[...e,et(o)]}function Qr(e){return e.filter(o=>!Po(o))}function Yr(e,o,n){return n===e.length-1?[...e,et(o)]:e}function ei(e,o){if(Array.isArray(e.columns)&&e.columns.length>0)return e.columns.map(String);let n=Object.keys(e.schema?.properties??{});if(n.length>0)return n;let t=new Set;for(let r of o)for(let a of Object.keys(r))t.add(a);return[...t]}var tt=({node:e,emit:o})=>{let n=Kr(e),t=Xr(),r=n.obj("spec",{}),a=Zr(n.list("rows").length>0?n.list("rows"):n.list("baseRows")),i=ei(r,a),l=JSON.stringify(a),u=i.join("\0"),m=Fe.useMemo(()=>To(a,i),[l,u]),[h,d]=Fe.useState(m),[c,g]=Fe.useState(!1);Fe.useEffect(()=>{d(m),g(!1)},[m]);let s=r.addRow!==!1,f=r.deleteRow!==!1,D=r.schema?.properties??{},B=(y,x,v,R)=>{d(L=>L.map((O,z)=>z===y?{...O,[x]:R&&v!==""?Number.parseFloat(v):v}:O)),g(!0)},w=y=>{d(x=>To(x.filter((v,R)=>R!==y),i)),g(!0)};return i.length===0&&!s?M(ko,{className:t.placeholder,children:r.placeholder??"No data"}):Ne("div",{...C(e,t.root,"gx-editable-table"),children:[M("div",{className:t.overflow,children:Ne(Jr,{className:Ro(t.table,"gx-table","gx-table-editable"),"aria-label":n.str("ariaLabel","Editable table"),children:[M(Gr,{children:Ne(Qe,{children:[i.map(y=>M(So,{children:String(D[y]?.title??y)},y)),f?M(So,{className:t.actionCell,children:"Actions"}):null]})}),M(_r,{children:h.length===0?M(Qe,{children:M(Ze,{colSpan:i.length+(f?1:0),children:M(ko,{className:t.placeholder,children:r.placeholder??"No data"})})}):h.map((y,x)=>Ne(Qe,{children:[i.map(v=>{let R=D[v]??{},L=R.type==="number"||R.type==="integer"||typeof y[v]=="number";return M(Ze,{children:M(Hr,{className:t.input,type:L?"number":"text",step:L?"any":void 0,value:y[v]==null?"":String(y[v]),"aria-label":`${String(R.title??v)}, row ${x+1}`,onFocus:x===h.length-1?()=>d(O=>Yr(O,i,x)):void 0,onChange:(O,z)=>B(x,v,z.value,L)})},v)}),f?M(Ze,{className:t.actionCell,children:M($e,{className:"gx-cell-delete",appearance:"subtle",size:"small","aria-label":`remove row ${x+1}`,title:`Remove row ${x+1}`,onClick:()=>w(x),children:"Remove"})}):null]},x))})]})}),s||c?Ne("div",{className:Ro(t.actions,"gx-panel-actions"),children:[s?M($e,{className:"gx-btn",onClick:()=>{d(y=>[...y,et(i)]),g(!0)},children:"+ Add row"}):null,c?M($e,{onClick:()=>{d(m),g(!1)},children:n.str("discardLabel","Discard")}):null,c?M($e,{appearance:"primary",onClick:()=>{o("save",{rows:Qr(h)}),g(!1)},children:n.str("saveLabel","Save")}):null]}):null]})},ti={type:"object",additionalProperties:!1,properties:{spec:{type:"object"},rows:{type:"array"},baseRows:{type:"array"},saveLabel:{type:"string"},discardLabel:{type:"string"},ariaLabel:{type:"string"}}},oi={capability:"primitive:editable-table",summary:"Renders a committed row editor with Fluent 2 table, input, and action controls.",dataProp:"rows",events:["save"],semanticTokens:[],variants:[],eventContracts:{save:j("The user commits the edited rows.",{rows:{type:"array",items:{type:"object"}}})},authoring:{useWhen:["Users edit a small tabular collection and explicitly commit or discard the draft"],avoidWhen:["Rows are read-only","The dataset requires virtualization or spreadsheet formulas"],rules:["Declare columns or a property schema when rows may be empty","Handle save payload rows","Keep persistence outside the component"]}},No=K(ti);function ni(e){return Ur([{kind:"ajv-schema",schema:No,message:"Invalid primitive:editable-table props",code:"primitive-editable-table-schema"}],e)}function ri(){return k("primitive:editable-table",{spec:{schema:{properties:{name:{type:"string",title:"Name"},amount:{type:"number",title:"Amount"}}}},rows:[{name:"Budget",amount:3}]})}var Do=S({description:oi,version:"1.0.0",component:tt,getSchema:()=>No,validate:ni,materializeTrial:ri});import{Button as ii}from"@fluentui/react-components";import{runDeclarativeValidators as ai}from"@gik-ai/evaluators";import{readProps as si}from"@gik-ai/react";import{jsx as mi}from"react/jsx-runtime";function li(e){let o=atob(e),n=new Uint8Array(new ArrayBuffer(o.length));for(let t=0;t<o.length;t+=1)n[t]=o.charCodeAt(t);return n}var ot=({node:e,emit:o})=>{let n=si(e),t=n.str("filename","download.txt"),r=n.str("content",""),a=n.str("mediaType","text/plain"),i=n.str("encoding","text"),l=n.bool("disabled"),u=()=>{if(l)return;let m=i==="base64"?li(r):r,h=URL.createObjectURL(new Blob([m],{type:a})),d=document.createElement("a");d.href=h,d.download=t,d.click(),URL.revokeObjectURL(h),o("download",{filename:t})};return mi(ii,{...C(e),type:"button",disabled:l,onClick:u,children:n.str("label","Download")})},Ao={type:"object",additionalProperties:!1,properties:{label:{type:"string"},filename:{type:"string",minLength:1},content:{type:"string"},mediaType:{type:"string"},encoding:{enum:["text","base64"]},disabled:{type:"boolean"},...E}},ci={capability:"primitive:file-download",summary:"Downloads declaratively supplied text or base64 content as a local file.",events:["download"],eventContracts:{download:j("The file download was requested.",{filename:{type:"string"}})},semanticTokens:[],variants:[],authoring:{useWhen:["A workflow exposes generated or persisted content as a local download"],avoidWhen:["A remote URL should be navigated directly"],rules:["Bind filename and content from committed state","Specify the media type","Use base64 only for binary content"]}};function pi(e){return ai([{kind:"ajv-schema",schema:Ao,message:"Invalid primitive:file-download props",code:"primitive-file-download-schema"}],e)}function di(){return k("primitive:file-download",{label:"Download report",filename:"report.txt",content:"Ready",mediaType:"text/plain"})}var Vo=S({description:ci,version:"1.0.0",component:ot,getSchema:()=>Ao,validate:pi,materializeTrial:di});import Lo from"react";import{Button as ui,makeStyles as gi,mergeClasses as fi,tokens as le}from"@fluentui/react-components";import{runDeclarativeValidators as hi}from"@gik-ai/evaluators";import{readProps as yi}from"@gik-ai/react";import{jsx as nt,jsxs as Eo}from"react/jsx-runtime";var bi=gi({root:{display:"inline-flex"},dropzone:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"96px",width:"100%",padding:le.spacingVerticalL,border:`1px dashed ${le.colorNeutralStroke1}`,borderRadius:le.borderRadiusMedium,backgroundColor:le.colorNeutralBackground2,color:le.colorNeutralForeground1,cursor:"pointer"},active:{boxShadow:`inset 0 0 0 1px ${le.colorBrandStroke1}`,backgroundColor:le.colorBrandBackground2},disabled:{cursor:"not-allowed",opacity:.6}});function vi(e){let o="";for(let n=0;n<e.length;n+=32768)o+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(o)}async function wi(e,o){let n={name:e.name,type:e.type,size:e.size,lastModified:e.lastModified};return o==="text"?{...n,text:await e.text(),encoding:"text"}:o==="base64"?{...n,content:vi(new Uint8Array(await e.arrayBuffer())),encoding:"base64"}:n}var rt=({node:e,emit:o})=>{let n=yi(e),t=bi(),r=Lo.useRef(null),[a,i]=Lo.useState(!1),l=n.bool("disabled"),u=n.bool("multiple"),m=n.str("variant","button"),h=n.str("readAs","metadata"),d=n.str("accept",""),c=n.str("label",u?"Choose files":"Choose file"),g=async f=>{if(l)return;let D=Array.from(f??[]),B=await Promise.all((u?D:D.slice(0,1)).map(w=>wi(w,h)));B.length!==0&&(await o("select",{files:B,...u?{}:{file:B[0]}}),r.current&&(r.current.value=""))},s=nt("input",{ref:r,type:"file",hidden:!0,accept:d||void 0,multiple:u,disabled:l,onChange:f=>{g(f.currentTarget.files)}});return m==="dropzone"?Eo("div",{...C(e,t.root),children:[nt("div",{className:fi(t.dropzone,a&&t.active,l&&t.disabled),role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,onClick:()=>{l||r.current?.click()},onKeyDown:f=>{!l&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),r.current?.click())},onDragEnter:f=>{f.preventDefault(),l||i(!0)},onDragOver:f=>{f.preventDefault(),l||i(!0)},onDragLeave:f=>{f.preventDefault(),f.currentTarget===f.target&&i(!1)},onDrop:f=>{f.preventDefault(),i(!1),g(f.dataTransfer.files)},children:c}),s]}):Eo("span",{...C(e,t.root),children:[nt(ui,{type:"button",disabled:l,onClick:()=>r.current?.click(),children:c}),s]})},Bo={type:"object",additionalProperties:!1,properties:{label:{type:"string"},accept:{type:"string"},multiple:{type:"boolean"},disabled:{type:"boolean"},variant:{enum:["button","dropzone"]},readAs:{enum:["metadata","text","base64"]},...E}},jo={type:"object",additionalProperties:!1,required:["name","type","size","lastModified"],properties:{name:{type:"string"},type:{type:"string"},size:{type:"number"},lastModified:{type:"number"},text:{type:"string"},content:{type:"string"},encoding:{enum:["text","base64"]}}},Ci={capability:"primitive:file-input",summary:"Selects or drops one or more files and emits JSON-serializable file records.",events:["select"],eventContracts:{select:j("Files were selected or dropped.",{files:{type:"array",items:jo},file:jo},["files"])},semanticTokens:[],defaultVariant:"button",variants:[{value:"button",summary:"Opens a native file picker from a compact button.",useWhen:["File selection is a secondary command"]},{value:"dropzone",summary:"Accepts drag-and-drop and click selection.",useWhen:["File acquisition is a primary workflow"]}],authoring:{useWhen:["A declarative workflow needs local files or attachments"],avoidWhen:["The host must acquire files without user interaction"],rules:["Use text for textual documents","Use base64 only when binary content must cross the event boundary","Use metadata when content stays browser-owned"]}};function xi(e){return hi([{kind:"ajv-schema",schema:Bo,message:"Invalid primitive:file-input props",code:"primitive-file-input-schema"}],e)}function Si(){return k("primitive:file-input",{label:"Attach files",multiple:!0,variant:"dropzone",readAs:"metadata"})}var Wo=S({description:Ci,version:"1.0.0",component:rt,getSchema:()=>Bo,validate:xi,materializeTrial:Si});import{Button as ki,makeStyles as Ri,tokens as ce}from"@fluentui/react-components";import{runDeclarativeValidators as Ti}from"@gik-ai/evaluators";import{readProps as Pi}from"@gik-ai/react";import{jsx as fe,jsxs as ji}from"react/jsx-runtime";var Ni=Ri({root:{display:"flex",flexDirection:"column",gap:ce.spacingVerticalXS,margin:0,padding:0,listStyleType:"none"},item:{display:"flex",alignItems:"center",gap:ce.spacingHorizontalS,padding:ce.spacingVerticalS,borderBottom:`1px solid ${ce.colorNeutralStroke2}`},name:{flexGrow:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},metadata:{color:ce.colorNeutralForeground3,fontSize:ce.fontSizeBase200},empty:{color:ce.colorNeutralForeground3}});function Di(e){let o=Number(e);return!Number.isFinite(o)||o<0?"":o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}var it=({node:e,emit:o})=>{let n=Pi(e),t=Ni(),r=Array.isArray(e.props.files)?e.props.files:[],a=n.bool("removable");return r.length===0?fe("div",{...C(e,t.empty),children:n.str("emptyText","No files")}):fe("ul",{...C(e,t.root),children:r.map((i,l)=>{let u=String(i.name??`File ${l+1}`),m=typeof i.url=="string"?i.url:"",h=Di(i.size);return ji("li",{className:t.item,children:[m?fe("a",{className:t.name,href:m,download:u,onClick:()=>{o("download",{index:l,file:i})},children:u}):fe("button",{className:t.name,type:"button",onClick:()=>{o("select",{index:l,file:i})},children:u}),h?fe("span",{className:t.metadata,children:h}):null,a?fe(ki,{size:"small",appearance:"subtle",type:"button",onClick:()=>{o("remove",{index:l,file:i})},children:"Remove"}):null]},String(i.id??`${u}-${l}`))})})},ze={type:"object",additionalProperties:!0,required:["name"],properties:{id:{type:["string","number"]},name:{type:"string"},type:{type:"string"},size:{type:"number"},url:{type:"string"}}},Fo={type:"object",additionalProperties:!1,properties:{files:{type:"array",items:ze},removable:{type:"boolean"},emptyText:{type:"string"},...E}},Ai={capability:"primitive:file-list",summary:"Presents normalized file records with optional download and removal actions.",dataProp:"files",events:["select","download","remove"],eventContracts:{select:j("A non-downloadable file was selected.",{index:{type:"integer"},file:ze}),download:j("A URL-backed file download was requested.",{index:{type:"integer"},file:ze}),remove:j("A file removal was requested.",{index:{type:"integer"},file:ze})},semanticTokens:[],variants:[],authoring:{useWhen:["A workflow presents uploaded, staged, or downloadable files"],avoidWhen:["Only one command-style download is needed; use file-download"],rules:["Bind JSON-serializable normalized file records","Keep upload and storage effects outside the component","Provide URLs only for host-authorized downloads"]}};function Vi(e){return Ti([{kind:"ajv-schema",schema:Fo,message:"Invalid primitive:file-list props",code:"primitive-file-list-schema"}],e)}function Li(){return k("primitive:file-list",{files:[{name:"report.pdf",type:"application/pdf",size:2048,url:"/report.pdf"}],removable:!0})}var $o=S({description:Ai,version:"1.0.0",component:it,getSchema:()=>Fo,validate:Vi,materializeTrial:Li});import he from"react";import{makeStyles as Ei,mergeClasses as zo}from"@fluentui/react-components";import{runDeclarativeValidators as Bi}from"@gik-ai/evaluators";import{jsx as at}from"react/jsx-runtime";var Oo=["always","when-at-end","off"],Wi=Ei({root:{boxSizing:"border-box",width:"100%",height:"100%",minWidth:0,minHeight:0,maxWidth:"100%",maxHeight:"100%",overflow:"auto",overscrollBehavior:"contain"},content:{minWidth:0,minHeight:"100%"}}),Fi=typeof window>"u"?he.useEffect:he.useLayoutEffect;function $i(e,o=8){return e.scrollHeight-e.scrollTop-e.clientHeight<=o}function zi(e,o){return e==="always"||e==="when-at-end"&&o}function Oi({children:e,className:o,style:n,followEnd:t="always",ariaLabel:r}){let a=Wi(),i=he.useRef(null),l=he.useRef(null),u=he.useRef(!0),m=he.useCallback(()=>{let d=i.current;d&&(d.scrollTop=d.scrollHeight)},[]);Fi(()=>{let d=l.current;if(!i.current||!d||t==="off")return;let c=()=>{zi(t,u.current)&&m()},g=typeof ResizeObserver>"u"?void 0:new ResizeObserver(c),s=typeof MutationObserver>"u"?void 0:new MutationObserver(c);return g?.observe(d),s?.observe(d,{childList:!0,subtree:!0,characterData:!0}),m(),()=>{g?.disconnect(),s?.disconnect()}},[t,m]);let h=()=>{let d=i.current;d&&(u.current=$i(d))};return at("div",{ref:i,className:zo(a.root,"gik-growing-container",o),style:n,role:r?"region":void 0,"aria-label":r,onScroll:h,children:at("div",{ref:l,className:zo(a.content,"gik-growing-container-content"),children:e})})}var st=({node:e,children:o})=>{let n=e.props.followEnd,t=Oo.includes(n)?n:"always",r=typeof e.props.ariaLabel=="string"?e.props.ariaLabel:void 0;return at(Oi,{...C(e),followEnd:t,ariaLabel:r,children:o})},Ii={$schema:"http://json-schema.org/draft-07/schema#",type:"object",additionalProperties:!1,properties:{...E,followEnd:{enum:Oo},ariaLabel:{type:"string",minLength:1}}},Io={capability:"primitive:growing-container",summary:"Provides a bounded scrolling viewport that can follow content appended at its end.",slots:["children"],events:[],semanticTokens:[],variants:[],authoring:{useWhen:["A bounded region receives content incrementally","The viewport should own overflow and optionally follow appended content"],avoidWhen:["The parent already owns scrolling","Content should expand the surrounding document instead of remaining bounded"],rules:["Place rendered content in the children slot","Use always for output surfaces that must stay at the newest content","Use when-at-end when users must be able to scroll back without being pulled to the end","Use off when the viewport must never move automatically","Provide ariaLabel when the scrolling region needs an accessible name"]}};function Ol(){return Io}function Mo(){return Ii}function Mi(e){return Bi([{kind:"ajv-schema",schema:Mo(),message:"Invalid primitive:growing-container props",code:"primitive-growing-container-schema"}],e)}function Hi(){return k("primitive:growing-container",{followEnd:"when-at-end",ariaLabel:"Streaming output"})}var Ho=S({description:Io,version:"1.0.0",component:st,getSchema:Mo,validate:Mi,materializeTrial:Hi});import lt from"react";import{Button as Jo,Dialog as Ji,DialogActions as _i,DialogBody as Gi,DialogContent as qi,DialogSurface as Ui,DialogTitle as Ki,Input as Xi,makeStyles as Zi,tokens as pe}from"@fluentui/react-components";import{runDeclarativeValidators as Qi}from"@gik-ai/evaluators";import{readProps as Yi}from"@gik-ai/react";import{jsx as Y,jsxs as De}from"react/jsx-runtime";var ea=Zi({message:{margin:`0 0 ${pe.spacingVerticalL}`,color:pe.colorNeutralForeground2},label:{display:"grid",gap:pe.spacingVerticalS,fontWeight:pe.fontWeightSemibold},error:{minHeight:pe.lineHeightBase300,marginTop:pe.spacingVerticalXS,color:pe.colorPaletteRedForeground1}}),ct=({node:e,emit:o})=>{let n=ea(),t=Yi(e),r=Number(e.props.operandA??3),a=Number(e.props.operandB??7),[i,l]=lt.useState(""),u=lt.useRef(null),m=`${e.id}-title`,h=`${e.id}-message`,d=i.trim().length>0,c=d&&Number(i)===r+a;return lt.useEffect(()=>{u.current?.focus()},[]),Y(Ji,{open:!0,modalType:"alert",onOpenChange:(g,s)=>{s.open||o("cancel",{reason:"escape"})},children:Y(Ui,{...C(e),"aria-labelledby":m,"aria-describedby":h,children:Y("form",{onSubmit:g=>{g.preventDefault(),c&&o("confirm",{})},children:De(Gi,{children:[Y(Ki,{id:m,children:t.str("title","Confirm destructive action")}),De(qi,{children:[Y("p",{className:n.message,id:h,children:t.str("message","This action cannot be undone.")}),De("label",{className:n.label,htmlFor:`${e.id}-answer`,children:["Solve to continue: ",De("strong",{children:[r," + ",a," = ?"]})]}),Y(Xi,{ref:u,id:`${e.id}-answer`,type:"number",inputMode:"numeric",value:i,"aria-invalid":d&&!c,autoComplete:"off",onChange:(g,s)=>l(s.value)}),Y("div",{className:n.error,"aria-live":"polite",children:d&&!c?"Incorrect answer. Try again.":""})]}),De(_i,{children:[Y(Jo,{type:"button",onClick:()=>{o("cancel",{reason:"button"})},children:t.str("cancelLabel","Cancel")}),Y(Jo,{appearance:"primary",type:"submit",disabled:!c,children:t.str("confirmLabel","Delete")})]})]})})})})},_o={type:"object",additionalProperties:!1,properties:{...E,operandA:{type:"number"},operandB:{type:"number"},title:{type:"string"},message:{type:"string"},cancelLabel:{type:"string"},confirmLabel:{type:"string"}}},ta={capability:"primitive:math-challenge",summary:"Gates a destructive confirmation behind a small arithmetic challenge.",dataProp:"message",events:["confirm","cancel"],eventContracts:{confirm:j("The user solves the challenge and confirms the action."),cancel:j("The user cancels the challenge.",{reason:{enum:["escape","button"]}})},semanticTokens:[],variants:[],authoring:{useWhen:["A destructive action requires deliberate confirmation"],avoidWhen:["A normal confirmation button is sufficient","The operation is reversible"],rules:["Handle both confirm and cancel","Explain the destructive consequence in message","Do not use as authentication"]}};function oa(e){return Qi([{kind:"ajv-schema",schema:_o,message:"Invalid primitive:math-challenge props",code:"primitive-math-challenge-schema"}],e)}var Go=S({description:ta,version:"1.0.0",component:ct,getSchema:()=>_o,validate:oa,materializeTrial:()=>k("primitive:math-challenge",{title:"Delete Blueprint",message:"This action cannot be undone.",operandA:3,operandB:7})});import pt from"react";import{makeStyles as na,tokens as b}from"@fluentui/react-components";import{runDeclarativeValidators as ra}from"@gik-ai/evaluators";import{readProps as ia}from"@gik-ai/react";import{jsx as $,jsxs as ma}from"react/jsx-runtime";var aa=na({root:{minWidth:0,color:b.colorNeutralForeground1,fontFamily:b.fontFamilyBase,lineHeight:b.lineHeightBase300,overflowWrap:"anywhere","& h1":{fontSize:b.fontSizeHero700,lineHeight:b.lineHeightHero700,margin:`${b.spacingVerticalL} 0 ${b.spacingVerticalS}`},"& h2":{fontSize:b.fontSizeBase600,lineHeight:b.lineHeightBase600,margin:`${b.spacingVerticalL} 0 ${b.spacingVerticalS}`},"& h3":{fontSize:b.fontSizeBase500,lineHeight:b.lineHeightBase500,margin:`${b.spacingVerticalM} 0 ${b.spacingVerticalXS}`},"& h4":{fontSize:b.fontSizeBase400,lineHeight:b.lineHeightBase400,margin:`${b.spacingVerticalM} 0 ${b.spacingVerticalXS}`},"& p":{margin:`0 0 ${b.spacingVerticalM}`},"& ul, & ol":{margin:`0 0 ${b.spacingVerticalM}`,paddingLeft:b.spacingHorizontalXXL},"& a":{color:b.colorBrandForegroundLink,textDecorationLine:"underline",textUnderlineOffset:"2px"},"& code":{fontFamily:b.fontFamilyMonospace,color:b.colorBrandForeground1}},code:{overflow:"auto",padding:`${b.spacingVerticalM} ${b.spacingHorizontalM}`,backgroundColor:b.colorNeutralBackground3,border:`${b.strokeWidthThin} solid ${b.colorNeutralStroke2}`,borderRadius:b.borderRadiusMedium},diagram:{overflow:"auto",margin:`${b.spacingVerticalM} 0`,textAlign:"center","& svg":{display:"inline-block",maxWidth:"100%",height:"auto"}},tableWrap:{maxWidth:"100%",overflowX:"auto",margin:`${b.spacingVerticalM} 0`},table:{width:"100%",borderCollapse:"collapse",fontSize:b.fontSizeBase200,"& th":{padding:`${b.spacingVerticalS} ${b.spacingHorizontalS}`,borderBottom:`${b.strokeWidthThick} solid ${b.colorNeutralStroke1}`,textAlign:"left",whiteSpace:"nowrap"},"& td":{padding:`${b.spacingVerticalS} ${b.spacingHorizontalS}`,borderBottom:`${b.strokeWidthThin} solid ${b.colorNeutralStroke2}`,textAlign:"left",verticalAlign:"top"},"& tbody tr:hover":{backgroundColor:b.colorNeutralBackground2}}});function sa(e){let o=e.trim();return/^(https?:|mailto:|\/|#|\.)/i.test(o)?o:null}function Ae(e){let o=/(`[^`]+`)|(\[[^\]]+\]\([^)\s]+\))|(\*\*[^*]+\*\*)|(\*[^*]+\*)|(_[^_]+_)/g,n=[],t=0,r=0,a;for(;(a=o.exec(e))!==null;){a.index>t&&n.push(e.slice(t,a.index));let i=a[0];if(i.startsWith("`"))n.push($("code",{children:i.slice(1,-1)},r++));else if(i.startsWith("[")){let l=/^\[([^\]]+)\]\(([^)\s]+)\)$/.exec(i),u=l?sa(l[2]):null;n.push(l&&u?$("a",{href:u,target:"_blank",rel:"noreferrer noopener",children:l[1]},r++):i)}else i.startsWith("**")?n.push($("strong",{children:i.slice(2,-2)},r++)):n.push($("em",{children:i.slice(1,-1)},r++));t=a.index+i.length}return t<e.length&&n.push(e.slice(t)),n.length===0?e:n.length===1?n[0]:n}var qo=!1;function la({source:e,className:o,codeClassName:n}){let t=pt.useId().replace(/[^a-zA-Z0-9_-]/g,""),[r,a]=pt.useState(null);return pt.useEffect(()=>{let i=!0;return a(null),import("mermaid").then(async({default:l})=>{qo||(l.initialize({startOnLoad:!1,securityLevel:"strict"}),qo=!0);let u=await l.render(`gik-mermaid-${t}`,e);i&&a(u.svg)}).catch(()=>{}),()=>{i=!1}},[t,e]),r?$("div",{className:o,role:"img","aria-label":"Mermaid diagram",dangerouslySetInnerHTML:{__html:r}}):$("pre",{className:n,"data-mermaid-fallback":!0,children:$("code",{className:"language-mermaid",children:e})})}function Oe(e){let o=[],n="",t=!1;for(let r of e.trim().replace(/^\|/,"").replace(/\|$/,""))t?(n+=r,t=!1):r==="\\"?t=!0:r==="|"?(o.push(n.trim()),n=""):n+=r;return t&&(n+="\\"),o.push(n.trim()),o}function ca(e,o){let n=e.replace(/\r\n/g,`
2
+ `).split(`
3
+ `),t=[],r=[],a=[],i=!1,l=null,u=[],m=()=>{r.length&&(t.push($("p",{children:Ae(r.join(" "))},`p-${t.length}`)),r=[])},h=()=>{if(!a.length)return;let c=a.map((g,s)=>$("li",{children:Ae(g)},s));t.push(i?$("ol",{children:c},`ol-${t.length}`):$("ul",{children:c},`ul-${t.length}`)),a=[]},d=()=>{if(l===null)return;let c=u.join(`
4
+ `);t.push(l.toLowerCase()==="mermaid"?$(la,{source:c,className:o.diagram,codeClassName:o.code},`f-${t.length}`):$("pre",{className:o.code,children:$("code",{className:l?`language-${l}`:void 0,children:c})},`f-${t.length}`)),l=null,u=[]};for(let c=0;c<n.length;c+=1){let g=n[c],s=g.trim();if(l!==null){/^```\s*$/.test(s)?d():u.push(g);continue}let f=/^```([^\s`]*)\s*$/.exec(s);if(f){m(),h(),l=f[1];continue}if(!s){m(),h();continue}let D=s.includes("|")?Oe(s):[],B=n[c+1]?.trim()??"";if(D.length>1&&Oe(B).length===D.length&&Oe(B).every(v=>/^:?-{3,}:?$/.test(v))){m(),h();let v=[];for(c+=2;c<n.length&&n[c].trim().includes("|");){let R=Oe(n[c]);if(R.length!==D.length)break;v.push(R),c+=1}c-=1,t.push($("div",{className:o.tableWrap,children:ma("table",{className:o.table,children:[$("thead",{children:$("tr",{children:D.map((R,L)=>$("th",{children:Ae(R)},L))})}),$("tbody",{children:v.map((R,L)=>$("tr",{children:R.map((O,z)=>$("td",{children:Ae(O)},z))},L))})]})},`t-${t.length}`));continue}let w=/^(#{1,4})\s+(.*)$/.exec(s);if(w){m(),h();let v=`h${w[1].length}`;t.push($(v,{children:Ae(w[2])},`h-${t.length}`));continue}let y=/^\d+\.\s+(.*)$/.exec(s);if(y){m(),i||h(),i=!0,a.push(y[1]);continue}let x=/^[-*]\s+(.*)$/.exec(s);if(x){m(),i&&h(),i=!1,a.push(x[1]);continue}h(),r.push(s)}return m(),h(),d(),t}var dt=({node:e})=>{let o=aa(),n=ia(e).str("value");return n?$("div",{...C(e,o.root,"gik-markdown"),children:ca(n,o)}):null},Uo={$schema:"http://json-schema.org/draft-07/schema#",type:"object",additionalProperties:!1,required:["value"],properties:{...E,value:{type:"string"}}},pa={capability:"primitive:markdown",summary:"Safely renders authored Markdown as structured document content, including tables, code, and Mermaid diagrams.",dataProp:"value",events:[],semanticTokens:[],variants:[],authoring:{useWhen:["A trusted scalar contains Markdown document content","Headings, lists, tables, code, and links must retain their structure"],avoidWhen:["The value is plain text; use fluent:text","The source must be shown verbatim; use primitive:source-viewer"],rules:["Bind Markdown through value","Do not pass HTML as a substitute for Markdown","Use fenced mermaid blocks for diagrams"]}};function da(e){return ra([{kind:"ajv-schema",schema:Uo,message:"Invalid primitive:markdown props",code:"primitive-markdown-schema"}],e)}var Ko=S({description:pa,version:"1.0.0",component:dt,getSchema:()=>Uo,validate:da,materializeTrial:()=>k("primitive:markdown",{value:`# Incident report
5
+
6
+ **Status:** Ready`})});import{makeStyles as ua,Text as Xo,tokens as Zo}from"@fluentui/react-components";import{runDeclarativeValidators as ga}from"@gik-ai/evaluators";import{readProps as fa}from"@gik-ai/react";import{jsx as Qo,jsxs as va}from"react/jsx-runtime";var ha=ua({root:{minWidth:0,display:"flex",flexDirection:"column",gap:Zo.spacingVerticalXXS},label:{color:Zo.colorNeutralForeground3},value:{overflowWrap:"anywhere"}}),mt=({node:e})=>{let o=ha(),n=fa(e);return va("div",{...C(e,o.root),children:[Qo(Xo,{className:o.label,size:200,children:n.str("label")}),Qo(Xo,{className:o.value,size:500,weight:"semibold",children:n.str("value")})]})},Yo={type:"object",additionalProperties:!1,required:["label","value"],properties:{...E,label:{type:"string"},value:{type:["string","number"]}}},ya={capability:"primitive:metric",summary:"Presents one labeled scalar measure.",dataProp:"value",events:[],semanticTokens:[],variants:[],authoring:{useWhen:["One scalar deserves compact visual prominence"],avoidWhen:["Several related measures should be compared; use semantic:measure-set"],rules:["Provide a concise label","Bind the scalar through value"]}};function ba(e){return ga([{kind:"ajv-schema",schema:Yo,message:"Invalid primitive:metric props",code:"primitive-metric-schema"}],e)}var en=S({description:ya,version:"1.0.0",component:mt,getSchema:()=>Yo,validate:ba,materializeTrial:()=>k("primitive:metric",{label:"Coverage",value:"94%"})});import{makeStyles as wa,mergeClasses as Ca,tokens as ye}from"@fluentui/react-components";import{runDeclarativeValidators as xa}from"@gik-ai/evaluators";import{readProps as Sa}from"@gik-ai/react";import{jsx as Pa}from"react/jsx-runtime";var ka=wa({root:{margin:0,color:ye.colorNeutralForeground3,lineHeight:ye.lineHeightBase300},info:{color:ye.colorBrandForeground1},warning:{color:ye.colorPaletteDarkOrangeForeground2},danger:{color:ye.colorPaletteRedForeground1},success:{color:ye.colorPaletteGreenForeground1}}),ut=({node:e})=>{let o=ka(),n=Sa(e),t=n.str("tone","muted"),r=t==="info"?o.info:t==="warning"?o.warning:t==="danger"?o.danger:t==="success"?o.success:void 0;return Pa("p",{...C(e,Ca(o.root,r)),children:n.str("value")})},tn={type:"object",additionalProperties:!1,required:["value"],properties:{...E,value:{type:"string"},tone:{type:"string",enum:["muted","info","warning","danger","success"]}}},Ra={capability:"primitive:note",summary:"Presents a short, non-interactive status or supporting note with an optional semantic tone.",dataProp:"value",events:[],semanticTokens:["muted","info","warning","danger","success"],variants:[],authoring:{useWhen:["Short supporting or status copy needs visual emphasis without interaction"],avoidWhen:["Content contains document structure; use primitive:markdown","The message requires dismissal or an action"],rules:["Bind text through value","Use tone only for semantic status"]}};function Ta(e){return xa([{kind:"ajv-schema",schema:tn,message:"Invalid primitive:note props",code:"primitive-note-schema"}],e)}var on=S({description:Ra,version:"1.0.0",component:ut,getSchema:()=>tn,validate:Ta,materializeTrial:()=>k("primitive:note",{value:"Refinement complete.",tone:"success"})});import{makeStyles as Na,Text as nn,tokens as rn}from"@fluentui/react-components";import{runDeclarativeValidators as Da}from"@gik-ai/evaluators";import{readProps as Aa}from"@gik-ai/react";import{jsx as an,jsxs as Ea}from"react/jsx-runtime";var Va=Na({root:{minWidth:0,display:"flex",flexDirection:"column",gap:rn.spacingVerticalXXS},label:{color:rn.colorNeutralForeground3,textTransform:"uppercase"},value:{overflowWrap:"anywhere"}}),gt=({node:e})=>{let o=Va(),n=Aa(e);return Ea("div",{...C(e,o.root),children:[an(nn,{className:o.label,size:100,children:n.str("label")}),an(nn,{className:o.value,size:300,weight:"semibold",children:n.str("value")})]})},sn={type:"object",additionalProperties:!1,required:["label","value"],properties:{...E,label:{type:"string"},value:{type:["string","number","boolean"]}}},La={capability:"primitive:property",summary:"Presents one compact labeled attribute.",dataProp:"value",events:[],semanticTokens:[],variants:[],authoring:{useWhen:["An identifier, enum, count, or short phrase needs a visible label"],avoidWhen:["The value is a prominent measure; use primitive:metric"],rules:["Keep values concise","Bind the attribute through value"]}};function ja(e){return Da([{kind:"ajv-schema",schema:sn,message:"Invalid primitive:property props",code:"primitive-property-schema"}],e)}var ln=S({description:La,version:"1.0.0",component:gt,getSchema:()=>sn,validate:ja,materializeTrial:()=>k("primitive:property",{label:"Version",value:"1.0.0"})});import Ve from"react";import{Button as Ba,ToggleButton as Wa,makeStyles as Fa,tokens as cn}from"@fluentui/react-components";import{runDeclarativeValidators as $a}from"@gik-ai/evaluators";import{readProps as za,useCountdownTimer as Oa}from"@gik-ai/react";import{Fragment as Xa,jsx as pn,jsxs as dn}from"react/jsx-runtime";var Ia=["manual","auto"],Ma=["standard","auto-only"],Ha=["primary","secondary","outline","subtle","transparent"],Ja=["small","medium","large"],_a=Fa({root:{display:"inline-flex",alignItems:"center",gap:cn.spacingHorizontalS,flexWrap:"wrap"},countdownButton:{minWidth:"4.75rem",fontFamily:cn.fontFamilyMonospace,fontVariantNumeric:"tabular-nums"}});function Ga(e){let o=Math.max(0,Math.floor(e)),n=Math.floor(o/60);return`${String(n).padStart(2,"0")}:${String(o%60).padStart(2,"0")}`}function ft(e,o){let n=Number(e??o);return Number.isFinite(n)?Math.max(0,n):o}var ht=({node:e,emit:o})=>{let n=za(e),t=_a(),[r,a]=Ve.useState(()=>e.props.defaultPace==="manual"?"manual":"auto"),i=e.props.variant==="auto-only",l=i?"auto":r,u=ft(e.props.durationMs,3e3),m=ft(l==="auto"?e.props.autoDurationMs:e.props.manualDurationMs,u),h=n.bool("disabled"),d=e.props.showCountdown!==!1,c=e.props.countdownOnly===!0,g=!i&&e.props.showPaceSwitch===!0,s=l==="auto"&&e.props.autoStart!==!1&&!h,f=e.props.resetKey??"",D=JSON.stringify(f),B=Ve.useRef(),w=Ve.useRef(f);Ve.useEffect(()=>{let L=Number(w.current),O=Number(f);w.current=f,Number.isFinite(L)&&Number.isFinite(O)&&O<L&&a(i||e.props.defaultPace!=="manual"?"auto":"manual")},[i,f,e.props.defaultPace]);let y=Oa({durationMs:m,running:s,resetKey:`${JSON.stringify(f)}:${l}`,onElapsed:()=>{o("press",{reason:"timeout"}),e.props.repeat===!0&&y.restart()}});Ve.useEffect(()=>{e.props.triggerImmediately!==!0||!s||B.current===D||(B.current=D,o("press",{reason:"immediate"}))},[o,D,e.props.triggerImmediately,s]);let x=n.str("label"),v=Ga(y.remainingSeconds),R=n.str("ariaLabel")||x;return dn("div",{...C(e,t.root),children:[g?pn(Wa,{checked:l==="auto",size:"small","aria-label":n.str("paceAriaLabel","Automatically trigger when the countdown ends"),onClick:()=>a(L=>L==="auto"?"manual":"auto"),children:l==="auto"?n.str("autoLabel","Auto"):n.str("manualLabel","Manual")}):null,pn(Ba,{className:c?t.countdownButton:void 0,appearance:n.str("appearance","secondary"),size:n.str("size","medium"),disabled:h,"aria-label":s&&d?`${R}, ${y.remainingSeconds} seconds remaining`:R,onClick:()=>{o("press",{reason:"manual"}),y.restart()},children:c&&d?v:dn(Xa,{children:[x,s&&d?` \xB7 ${v}`:null]})})]})},qa={$schema:"http://json-schema.org/draft-07/schema#",type:"object",additionalProperties:!1,required:["label"],properties:{...E,label:{type:"string",minLength:1},variant:{enum:Ma},ariaLabel:{type:"string",minLength:1},durationMs:{type:"number",minimum:0},autoDurationMs:{type:"number",minimum:0},manualDurationMs:{type:"number",minimum:0},defaultPace:{enum:Ia},autoStart:{type:"boolean"},triggerImmediately:{type:"boolean"},repeat:{type:"boolean"},showCountdown:{type:"boolean"},countdownOnly:{type:"boolean"},showPaceSwitch:{type:"boolean"},disabled:{type:"boolean"},resetKey:{type:["string","number","boolean","null"]},appearance:{enum:Ha},size:{enum:Ja},paceAriaLabel:{type:"string",minLength:1},autoLabel:{type:"string",minLength:1},manualLabel:{type:"string",minLength:1}}},mn={capability:"primitive:timer-button",summary:"Renders a button that can emit manually or when an optional countdown elapses.",events:["press"],eventContracts:{press:j("The button invokes immediately, manually, or when its countdown elapses.",{reason:{enum:["immediate","manual","timeout"]}})},semanticTokens:[],defaultVariant:"standard",variants:[{value:"standard",summary:"Supports manual or automatic pace, with an optional user-facing pace switch.",useWhen:["The authored flow may use manual pace or let the user choose between manual and automatic pace"]},{value:"auto-only",summary:"Always runs in automatic pace and never displays the manual/auto switch.",useWhen:["The action must trigger automatically without exposing manual versus automatic pace controls"]}],authoring:{useWhen:["An action may be triggered manually or after a visible delay","A user-selectable manual/auto pace supports repeated demonstrations or guided flows"],avoidWhen:["Elapsed time is informational and must not trigger an action","The workflow needs scheduling that must survive an unmounted UI"],rules:["Handle press payload reason as immediate, manual, or timeout","Set triggerImmediately when the action must run once as soon as each resetKey becomes active","Set showPaceSwitch only when the user should control manual versus auto behavior","Set countdownOnly when a compact fixed-width MM:SS action is more useful than a changing text label","Use auto-only when the action must always run in automatic pace without exposing pace controls","Set repeat only when every elapsed interval should trigger another press","Use resetKey to restart the countdown when external progress changes","Keep durable scheduling and domain workflow state outside the projection component"]}};function jc(){return mn}function un(){return qa}function Ua(e){return $a([{kind:"ajv-schema",schema:un(),message:"Invalid primitive:timer-button props",code:"primitive-timer-button-schema"}],e)}function Ka(){return k("primitive:timer-button",{label:"Continue",variant:"standard",durationMs:5e3,defaultPace:"auto",showCountdown:!0,showPaceSwitch:!0})}var gn=S({description:mn,version:"1.1.0",component:ht,getSchema:un,validate:Ua,materializeTrial:Ka});import fn from"react";import{Checkbox as Za,Field as Qa,List as Ya,ListItem as es,Text as hn}from"@fluentui/react-components";import{runDeclarativeValidators as ts}from"@gik-ai/evaluators";import{readProps as os}from"@gik-ai/react";import{jsx as be,jsxs as ls}from"react/jsx-runtime";function ns(e,o,n){return{...e,[o]:n}}var yt=({node:e,emit:o})=>{let n=os(e),r=n.obj("fields",{}).properties??{},a=n.obj("value",{}),i=JSON.stringify(a),[l,u]=fn.useState(a),m=e.props.variant==="compact";return fn.useEffect(()=>u(a),[i]),ls("div",{...C(e),children:[Object.keys(r).length===0?be(hn,{children:n.str("emptyText","Nothing here yet.")}):null,be(Ya,{"aria-label":n.str("ariaLabel","Todo list"),children:Object.entries(r).map(([h,d])=>{let c=String(d.title??h),g=typeof d.description=="string"?d.description:typeof d.hint=="string"?d.hint:void 0,s=!!l[h];return be(es,{children:be(Qa,{hint:g,children:be(Za,{checked:s,size:m?"medium":"large",label:be(hn,{strikethrough:s,children:c}),disabled:d.readOnly===!0||d.disabled===!0,onChange:(f,D)=>{let B=ns(l,h,D.checked===!0);u(B),o("save",{values:B})}})})},h)})})]})},rs={type:"object",additionalProperties:!1,required:["type","title"],properties:{type:{const:"boolean"},title:{type:"string"},description:{type:"string"},hint:{type:"string"},readOnly:{type:"boolean"},disabled:{type:"boolean"}}},yn=K({type:"object",additionalProperties:!1,required:["fields","value"],properties:{fields:{type:"object",additionalProperties:!1,required:["properties"],properties:{properties:{type:"object",additionalProperties:rs}}},value:{type:"object",additionalProperties:{type:"boolean"}},variant:{type:"string",enum:["standard","compact"]},ariaLabel:{type:"string"},emptyText:{type:"string"}}}),is={capability:"primitive:todo-list",summary:"Renders boolean form fields as a todo list and immediately saves each changed value.",dataProp:"value",events:["save"],eventContracts:{save:j("A todo change commits the complete next values object.",{values:{type:"object",additionalProperties:{type:"boolean"}}})},semanticTokens:[],defaultVariant:"standard",variants:[{value:"standard",summary:"Uses standard Fluent control sizing.",useWhen:["The todo editor appears in a normal panel or form"]},{value:"compact",summary:"Uses native compact Fluent control sizing.",useWhen:["The todo editor appears in a dense or constrained surface"]}],authoring:{useWhen:["Boolean form fields should be presented as immediately committed todo items"],avoidWhen:["Values require an explicit Save or Discard step; use primitive:form","Items are read-only; use fluent:list"],rules:["Define every field as a titled boolean property","Provide values as a keyed boolean object","Handle each save payload values object as the complete next value","Keep persistence outside the component"]}};function as(e){return ts([{kind:"ajv-schema",schema:yn,message:"Invalid primitive:todo-list props",code:"primitive-todo-list-schema"}],e)}function ss(){return k("primitive:todo-list",{variant:"standard",fields:{properties:{shipComponent:{type:"boolean",title:"Ship the component"},publishDocs:{type:"boolean",title:"Publish the docs"}}},value:{shipComponent:!1,publishDocs:!0}})}var bn=S({description:is,version:"1.0.0",component:yt,getSchema:()=>yn,validate:as,materializeTrial:ss});var gp={"access-gate":Ge,alert:qe,chart:Ue,"collection-board":Nt,container:Ke,datetime:At,"pane-with-trigger":Xe,"editable-table":tt,"file-download":ot,"file-input":rt,"file-list":it,form:Ce,gantt:Lt,"graph-diagram":Wt,"growing-container":st,"infinite-canvas":Et,"math-challenge":ct,markdown:dt,metric:mt,note:ut,property:gt,"source-viewer":$t,"timer-button":ht,"todo-list":yt},bt={"access-gate":Xt,alert:eo,chart:io,"collection-board":Dt,container:go,datetime:Vt,"pane-with-trigger":xo,"editable-table":Do,"file-download":Vo,"file-input":Wo,"file-list":$o,form:Ee,gantt:jt,"graph-diagram":Ft,"growing-container":Ho,"infinite-canvas":Bt,"math-challenge":Go,markdown:Ko,metric:en,note:on,property:ln,"source-viewer":zt,"timer-button":gn,"todo-list":bn},fp=Object.fromEntries(Object.entries(bt).map(([e,o])=>[e,{propsSchema:o.getSchema(),...o.dataProp?{dataProp:o.dataProp}:{},...o.slots?{slots:[...o.slots]}:{},emits:[...o.events]}]));var te=xt({definitions:bt,kind:"primitive",toolKind:"Primitive"}),vp=()=>te.list(),wp=e=>te.describe(e),Cp=(e,o)=>te.validate(e,o),xp=te.materialize,Sp=(e,o)=>te.preflight(e,o),kp=te.instructions,cs=e=>te.createTools(e),Rp=e=>te.getKit(e),Tp=cs();export{Ce as a,In as b,Mn as c,Ee as d,Ge as e,qn as f,Un as g,Xt as h,qe as i,or as j,eo as k,oo as l,sr as m,lr as n,Ue as o,Os as p,ro as q,mr as r,ur as s,io as t,ao as u,so as v,lo as w,co as x,po as y,br as z,Ke as A,qs as B,uo as C,wr as D,Cr as E,go as F,Vr as G,Br as H,Wr as I,Fr as J,$r as K,Xe as L,Ir as M,Mr as N,xo as O,Po as P,To as Q,Qr as R,Yr as S,ei as T,tt as U,ni as V,ri as W,Do as X,ot as Y,pi as Z,di as _,Vo as $,rt as aa,xi as ba,Si as ca,Wo as da,it as ea,Vi as fa,Li as ga,$o as ha,Oo as ia,$i as ja,zi as ka,Oi as la,st as ma,Ol as na,Mo as oa,Mi as pa,Hi as qa,Ho as ra,ct as sa,oa as ta,Go as ua,sa as va,dt as wa,da as xa,Ko as ya,mt as za,ba as Aa,en as Ba,ut as Ca,Ta as Da,on as Ea,gt as Fa,ja as Ga,ln as Ha,Ia,Ma as Ja,Ha as Ka,Ja as La,Ga as Ma,ht as Na,jc as Oa,un as Pa,Ua as Qa,Ka as Ra,gn as Sa,ns as Ta,yt as Ua,as as Va,ss as Wa,bn as Xa,gp as Ya,bt as Za,fp as _a,vp as $a,wp as ab,Cp as bb,xp as cb,Sp as db,kp as eb,cs as fb,Rp as gb,Tp as hb};
7
+ //# sourceMappingURL=chunk-2XVVN3LX.js.map