@dqa-ai-solutions/ui-runtime 0.0.0-stage → 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 (79) hide show
  1. package/README.md +49 -2
  2. package/dist/_types/ui-kit/index.d.ts +4 -0
  3. package/dist/_types/ui-kit/lens/action.d.ts +76 -0
  4. package/dist/_types/ui-kit/lens/cell.d.ts +79 -0
  5. package/dist/_types/ui-kit/lens/diagnostic.d.ts +49 -0
  6. package/dist/_types/ui-kit/lens/format.d.ts +32 -0
  7. package/dist/_types/ui-kit/lens/index.d.ts +12 -0
  8. package/dist/_types/ui-kit/lens/list.d.ts +223 -0
  9. package/dist/_types/ui-kit/lens/milestone.d.ts +112 -0
  10. package/dist/_types/ui-kit/lens/pattern.d.ts +38 -0
  11. package/dist/_types/ui-kit/lens/queue.d.ts +30 -0
  12. package/dist/_types/ui-kit/lens/record.d.ts +110 -0
  13. package/dist/_types/ui-kit/lens/registry.d.ts +9 -0
  14. package/dist/_types/ui-kit/lens/shape.d.ts +27 -0
  15. package/dist/_types/ui-kit/lens/timeline.d.ts +36 -0
  16. package/dist/_types/ui-kit/primitives/action.d.ts +263 -0
  17. package/dist/_types/ui-kit/primitives/component-css.d.ts +10 -0
  18. package/dist/_types/ui-kit/primitives/index.d.ts +5 -0
  19. package/dist/_types/ui-kit/primitives/spec.d.ts +102 -0
  20. package/dist/_types/ui-kit/primitives/state.d.ts +148 -0
  21. package/dist/_types/ui-kit/primitives/stylesheet.d.ts +37 -0
  22. package/dist/_types/ui-kit/shell/index.d.ts +2 -0
  23. package/dist/_types/ui-kit/shell/nav.d.ts +142 -0
  24. package/dist/_types/ui-kit/shell/trail.d.ts +85 -0
  25. package/dist/_types/ui-kit/tokens/emit.d.ts +70 -0
  26. package/dist/_types/ui-kit/tokens/index.d.ts +6 -0
  27. package/dist/_types/ui-kit/tokens/oklch.d.ts +53 -0
  28. package/dist/_types/ui-kit/tokens/resolve.d.ts +4 -0
  29. package/dist/_types/ui-kit/tokens/scales.d.ts +325 -0
  30. package/dist/_types/ui-kit/tokens/theme.dqa.d.ts +2 -0
  31. package/dist/_types/ui-kit/tokens/types.d.ts +252 -0
  32. package/dist/_types/ui-react/elements/action-bar.d.ts +32 -0
  33. package/dist/_types/ui-react/elements/action-scope.d.ts +9 -0
  34. package/dist/_types/ui-react/elements/button.d.ts +42 -0
  35. package/dist/_types/ui-react/elements/choice.d.ts +40 -0
  36. package/dist/_types/ui-react/elements/columns.d.ts +82 -0
  37. package/dist/_types/ui-react/elements/dialog-scope.d.ts +15 -0
  38. package/dist/_types/ui-react/elements/dialog.d.ts +67 -0
  39. package/dist/_types/ui-react/elements/disclosure.d.ts +305 -0
  40. package/dist/_types/ui-react/elements/field-attributes.d.ts +39 -0
  41. package/dist/_types/ui-react/elements/field.d.ts +628 -0
  42. package/dist/_types/ui-react/elements/file.d.ts +82 -0
  43. package/dist/_types/ui-react/elements/filter.d.ts +61 -0
  44. package/dist/_types/ui-react/elements/link.d.ts +38 -0
  45. package/dist/_types/ui-react/elements/menu.d.ts +56 -0
  46. package/dist/_types/ui-react/elements/milestone.d.ts +119 -0
  47. package/dist/_types/ui-react/elements/nav.d.ts +73 -0
  48. package/dist/_types/ui-react/elements/pop.d.ts +14 -0
  49. package/dist/_types/ui-react/elements/record.d.ts +174 -0
  50. package/dist/_types/ui-react/elements/segmented.d.ts +59 -0
  51. package/dist/_types/ui-react/elements/suggest.d.ts +11 -0
  52. package/dist/_types/ui-react/elements/surface.d.ts +354 -0
  53. package/dist/_types/ui-react/elements/table.d.ts +72 -0
  54. package/dist/_types/ui-react/elements/toast.d.ts +69 -0
  55. package/dist/_types/ui-react/index.d.ts +22 -0
  56. package/dist/_types/ui-react/prefix/index.d.ts +8 -0
  57. package/dist/chunks/chunk-5NTG4J62.js +11 -0
  58. package/dist/chunks/chunk-66DQVLFK.js +5 -0
  59. package/dist/chunks/chunk-7WHYHIUX.js +1 -0
  60. package/dist/chunks/chunk-JOIDPECM.js +3 -0
  61. package/dist/chunks/chunk-MS2W22ER.js +3 -0
  62. package/dist/index.d.ts +1 -0
  63. package/dist/index.js +1 -0
  64. package/dist/kit.css +2291 -0
  65. package/dist/lens.d.ts +1 -0
  66. package/dist/lens.js +1 -0
  67. package/dist/primitives.d.ts +1 -0
  68. package/dist/primitives.js +1 -0
  69. package/dist/react.d.ts +1 -0
  70. package/dist/react.js +1 -0
  71. package/dist/shell.d.ts +1 -0
  72. package/dist/shell.js +1 -0
  73. package/dist/tokens.css +160 -0
  74. package/dist/tokens.d.ts +1 -0
  75. package/dist/tokens.dark.css +98 -0
  76. package/dist/tokens.generated.css +98 -0
  77. package/dist/tokens.high.css +98 -0
  78. package/dist/tokens.js +1 -0
  79. package/package.json +61 -4
@@ -0,0 +1,11 @@
1
+ import{u as x,w as T}from"./chunk-66DQVLFK.js";var A=n=>n==="table"||n==="list"?"rows":n==="card"||n==="record"?"block":null;function B(n){let{forbidden:e,error:t,loading:i,data:o,count:a,narrowed:p,empty:d,surface:c="list",retry:g=!0,loadingLabel:b="\u0110ang t\u1EA3i\u2026"}=n,s=[...n.faults??[]],l=o!=null;return e?{kind:"forbidden",message:e}:!l&&i?{kind:"loading",skeleton:A(c),label:b}:!l&&t?{kind:"error",message:t,retry:g}:!l||(t&&s.push({kind:"stale",message:t}),a===0)?E(d,p):s.length?{kind:"partial",data:o,faults:s}:{kind:"ready",data:o}}function E(n,e){let t=e?n.noMatch:n.noRecords;return{kind:"empty",because:e?"no-match":"no-records",title:t.title,...t.body?{body:t.body}:{},...t.action?{action:t.action}:{}}}function G(n,e){switch(n.kind){case"loading":return e.loading(n);case"forbidden":return e.forbidden(n);case"error":return e.error(n);case"empty":return e.empty(n);case"partial":return e.partial(n);case"ready":return e.ready(n);default:return O(n,"SurfaceState")}}function O(n,e){throw new Error(`${e}: unhandled variant ${JSON.stringify(n)}`)}var U=n=>n.destroys?"danger":n.exits?"quiet":"normal";function S(n){let e=n.filter(a=>!a.exits),t=e.filter(a=>a.primary);if(t.length)return t.length===1?t[0]:null;let i=e.filter(a=>a.outcome==="approve");if(i.length===1)return i[0];let o=e.filter(a=>a.advances&&a.outcome!=="reject");return o.length===1?o[0]:e.length===1?e[0]:null}function R(n){let e=S(n);return n.map(t=>({key:t.key,label:t.label,tier:t===e&&!t.destroys?"key":U(t),primary:t===e,...t.icon?{icon:t.icon}:{},showLabel:t===e,busy:t.busy??!1,disabled:t.disabled??!1,...t.provisional?{provisional:t.provisional}:{}}))}var $=1,y=n=>n<=$+1?n:$;function N(n,e,t=!1){let i=d=>!!e.find(c=>c.key===d.key)?.destroys;if(t&&n.length>1&&n.some(i)){let d=n.filter(s=>!i(s)),c=Math.min(y(n.length),d.length),g=d.slice(0,c);n.length-g.length===1&&(g=g.slice(0,-1));let b=new Set(g.map(s=>s.key));return{sight:g,menu:n.filter(s=>!b.has(s.key))}}let o=y(n.length),a=[...n.filter(d=>!i(d)),...n.filter(i)],p=new Set(a.slice(0,o).map(d=>d.key));return{sight:n.filter(d=>p.has(d.key)),menu:n.filter(d=>!p.has(d.key))}}function M(n,e){let t=R(n),i=t.filter(l=>!l.icon).map(l=>l.key);if(e.surface==="table"||e.surface==="item"){let l=e.surface==="item",m=t.map(f=>({...f,primary:!1,tier:f.tier==="key"?"normal":f.tier})),{sight:F,menu:P}=N(m,n,e.surface==="table");return{inline:F.map(f=>({...f,showLabel:l})),menu:P.map(f=>({...f,showLabel:!0})),missingIcon:i,missingPrimary:!1}}let o=e.surface==="dialog"||e.surface==="form",a=l=>o&&!!n.find(m=>m.key===l.key)?.exits,p=t.filter(l=>l.primary),d=t.filter(a),c=t.filter(l=>!l.primary&&!a(l)),{sight:g,menu:b}=d.length===0?N(c,n):d.length+c.length<=$+1||c.length===1?{sight:c,menu:[]}:{sight:[],menu:[...c.filter(l=>!n.find(m=>m.key===l.key)?.destroys),...c.filter(l=>n.find(m=>m.key===l.key)?.destroys)]},s=n.filter(l=>!l.exits);return{inline:[...d,...g,...p].map(l=>({...l,showLabel:!0})),menu:b.map(l=>({...l,showLabel:!0})),missingIcon:i,missingPrimary:e.surface!=="card"&&s.length>0&&!t.some(l=>l.primary)}}var j={key:{background:"var(--fos-primary)",ink:"var(--fos-primary-contrast)",border:null},normal:{background:"var(--fos-surface)",ink:"var(--fos-ink)",border:"var(--fos-line)"},quiet:{background:"transparent",ink:"var(--fos-ink-2)",border:null},danger:{background:"transparent",ink:"var(--fos-tone-stop)",border:"var(--fos-tone-stop)"}};var r=n=>`var(--fos-${n})`,I={"page-title":{step:"h1",ink:r("ink")},"section-title":{step:"h3",ink:r("ink")},"card-title":{step:"body-lg",ink:r("ink"),weight:600},lead:{step:"body-lg",ink:r("ink-2")},body:{step:"body",ink:r("ink")},label:{step:"caption",ink:r("ink-2"),weight:500},hint:{step:"caption",ink:r("ink-3")},error:{step:"caption",ink:r("tone-stop"),weight:500},"table-header":{step:"meta",ink:r("ink-3"),weight:500},"table-cell":{step:"body",ink:r("ink")},"table-cell-sub":{step:"meta",ink:r("ink-3")},note:{step:"caption",ink:r("ink-3")},delta:{step:"body",ink:r("ink"),weight:500,numeric:!0},badge:{step:"micro",ink:r("ink"),weight:500},"empty-title":{step:"body-lg",ink:r("ink"),weight:600},"empty-body":{step:"body",ink:r("ink-2")},"rail-item":{step:"body",ink:r("ink-2")},tab:{step:"body",ink:r("ink-2"),weight:500}},w=n=>I[n],L={page:r("touch"),dialog:r("touch"),form:r("touch"),card:r("touch"),rail:r("touch"),table:r("row-h")},z={key:{background:r("primary"),ink:r("primary-contrast"),border:null},normal:{background:r("surface"),ink:r("ink"),border:r("line")},quiet:{background:"transparent",ink:r("ink-2"),border:null},danger:{background:"transparent",ink:r("tone-stop"),border:r("tone-stop")}};function q(n){let e=n.surface==="table";return{tier:n.tier,height:L[n.surface],padX:r(e?"s3":"s5"),gap:r("s2"),text:e?"table-cell":"body",...z[n.tier]}}var Y=n=>({height:L[n],padX:r(n==="table"?"s2":"s3"),radius:r("r"),background:r("surface"),ink:r("ink"),border:r("line"),label:"label",hint:"hint",error:"error"}),X=n=>n==="card"||n==="dialog"?{height:r("s6"),padX:r("s4"),text:"tab",ink:r("ink-2"),activeInk:r("ink"),marker:"filled"}:{height:r("touch"),padX:r("s4"),text:"tab",ink:r("ink-2"),activeInk:r("primary"),marker:"underline"},K=()=>({headerHeight:r("row-h"),rowHeight:r("row-h"),padX:r("cell-x"),padY:r("cell-y"),header:"table-header",cell:"table-cell",cellSub:"table-cell-sub",rule:r("line-2"),headerRule:r("line"),hover:r("surface-2"),selected:r("primary-bg")}),V=()=>({height:r("touch"),padX:r("s4"),text:"rail-item",ink:r("ink-2"),activeInk:r("primary"),activeBackground:r("primary-bg"),hover:r("surface-2"),unbuiltInk:r("ink-3")}),_=["page","dialog","form","table","rail","card"],k=Object.keys(I);var H=(n,e)=>[`${n} {`,...Object.entries(e).map(([t,i])=>` ${t}: ${i};`),"}"].join(`
2
+ `),u=(n,e)=>({"background-image":`linear-gradient(var(--${e}-${n}), var(--${e}-${n}))`}),h=(n,e)=>{let t=w(n);return{font:`var(--${e}-t-${t.step}-weight) var(--${e}-t-${t.step})/var(--${e}-t-${t.step}-line) var(--${e}-font)`,"letter-spacing":`var(--${e}-t-${t.step}-tracking)`,color:t.ink,...t.weight?{"font-weight":String(t.weight)}:{}}};function v(n={}){let e=n.prefix??"fos",t=s=>`var(--${e}-${s})`,i=["/* GENERATED by @dqa-ai-solutions/ui-runtime \u2014 the component standard."," * Every element, every state its kind obliges. Every value a token"," * reference: change the theme and this follows. Context is expressed by"," * nesting, so nobody has to remember a modifier. */"],o=(s,l)=>i.push(H(s,l)),a=(...s)=>i.push("",s.length===1?`/* ${s[0]} */`:["/*",...s.map(l=>` * ${l}`)," */"].join(`
3
+ `)),p={display:"inline-flex","align-items":"center","min-height":t("control-h"),"border-radius":t("r"),cursor:"pointer","text-decoration":"none",position:"relative"},d={outline:`2px solid ${t("focus")}`,"outline-offset":"2px"},c={opacity:"0.55",cursor:"not-allowed"};a("text \u2014 named by the JOB it does, never by its size");for(let s of k){if(s==="badge"||s==="tab"||s==="rail-item")continue;let l=w(s);o(`.${e}-${s}`,{...h(s,e),...l.numeric?{"font-variant-numeric":"tabular-nums"}:{}})}a("\u26D4 DELTA \u2014 the SIGN carries the meaning, the colour only echoes it.","A column of differences read by colour alone is unreadable to roughly one","man in twelve, and to everyone on a photocopy. Default ink is neutral."),o(`.${e}-delta--short`,{color:t("tone-stop")}),o(`.${e}-delta--over`,{color:t("tone-done")}),a("button \u2014 the box comes from WHERE it stands, the paint from WHAT it does"),o(`.${e}-btn`,{...p,"justify-content":"center",gap:t("s2"),padding:`0 ${t("s5")}`,border:"1px solid transparent","text-decoration":"none","white-space":"nowrap",...h("body",e)}),o(`.${e}-btn--key`,{background:t("primary"),color:t("primary-contrast")}),o(`.${e}-btn--normal`,{background:t("surface"),color:t("ink"),"border-color":t("line")}),o(`.${e}-btn--quiet`,{background:"transparent",color:t("ink-2")}),a("\u26D4 DANGER IS OUTLINED, NEVER FILLED \u2014 and this is not a taste.","A filled dark-red block standing next to a filled brand-red block is TWO","solid reds on one screen: the eye reads two primaries and picks neither.","The reference app hit this three times \u2014 21/8, 28/8 and 8/9/2026 \u2014 and each",'time a user reported it in the same words: "two active buttons".',"Ink and border carry `tone-stop` perfectly well; `error` text already","proves that pairing readable on `surface`. The fill added nothing but","weight, and weight is exactly what a destructive action must not have."),o(`.${e}-btn--danger`,{background:"transparent",color:t("tone-stop"),"border-color":t("tone-stop")}),a("\u26D4 FIXED IN 0.11.0 \u2014 PAST, NOT PRESENT. The hover and press colours exist","and are checked; what follows is why the check is there.","They did NOT exist until this grammar asked for them: a silent replacement","had dropped them from the resolver, and no test noticed because tests","checked the tokens present, never the tokens required. Every button in","every app had no hover state."),o(`.${e}-btn--key:hover`,{background:t("accent-hover")}),o(`.${e}-btn--key:active`,{background:t("accent-press")}),o(`.${e}-btn:hover`,u("hover",e)),o(`.${e}-btn:active`,{...u("press",e),transform:"translateY(1px)"}),o(`.${e}-btn:focus-visible`,d),o(`.${e}-btn[disabled], .${e}-btn[aria-disabled="true"]`,c),a("\u2B50 ICON-ONLY IS THE DEFAULT SHAPE, and the label lives on as the","accessible name and the tooltip. A square box, because a wide box with","one glyph floating in it reads as a button missing its word."),o(`.${e}-btn--icon`,{padding:"0",width:t("control-h"),"min-width":t("control-h"),gap:"0"}),o(`.${e}-btn--icon .${e}-icon`,{width:t("t-body-lg"),height:t("t-body-lg")}),a("the overflow trigger \u2014 one control standing for several"),o(`.${e}-btn--menu`,{padding:"0",width:t("control-h"),"min-width":t("control-h")}),a("\u2B50 ON A FINGER, THE HIT AREA GROWS BACK TO THE FULL TARGET.","The control is DRAWN at --fos-control-h, so a dense screen is not pushed","down the page by a row of 44px boxes. On a coarse pointer a transparent","::after expands the area back out to --fos-touch: the eye gets 36px, the","finger keeps 44, and nothing was traded away. The inset is computed FROM","the two tokens, so it cannot drift out of step with either."),i.push("@media (pointer: coarse) {"),i.push(H(`.${e}-btn::after, .${e}-menu-item::after`,{content:'""',position:"absolute",inset:`calc((${t("touch")} - ${t("control-h")}) / -2)`}).replace(/^/gm," ")),i.push("}"),a("inside a table the row sets the height \u2014 WCAG 2.2 \xA72.5.8 is why it may"),o(`.${e}-table .${e}-btn`,{"min-height":t("row-h"),padding:`0 ${t("s3")}`}),a("\u26D4 and in a table a button is ALWAYS square and wordless: a word in a row","competes with the data for the same glance, on every one of forty rows."),o(`.${e}-table .${e}-btn--icon, .${e}-table .${e}-btn--menu`,{width:t("row-h"),"min-width":t("row-h"),padding:"0"}),a("\u26D4 AND IT WEARS NO BOX \u2014 added 6/9/2026, after a user looked at forty rows.","A square outline repeated down every row draws a column of empty boxes that","is heavier on the page than the data beside it, and the box says nothing the",'glyph did not already say. Reported as: "it should show like the icon only,','no border \u2014 that is what makes it professional."',"\u2B50 The affordance does not disappear; it moves to the pointer. Hover and"," press keep their wash, and focus keeps its ring, so the control is still"," discoverable by mouse and reachable by keyboard. What is dropped is the","ink that was standing there when nobody was pointing at it.","\u26A0\uFE0F TIER-BLIND ON PURPOSE. A key/danger button carries meaning in its FILL,"," not in its outline, so this strips the border and the surface but leaves"," the paint of a tier that has one."),o(`.${e}-table .${e}-btn--icon:not(.${e}-btn--key):not(.${e}-btn--danger), .${e}-table .${e}-btn--menu:not(.${e}-btn--key):not(.${e}-btn--danger)`,{background:"transparent","border-color":"transparent",color:t("ink-2")}),o(`.${e}-table .${e}-btn--icon:hover, .${e}-table .${e}-btn--menu:hover`,{color:t("ink")}),a("\u26D4 AND THE GLYPH GETS A FLOOR \u2014 added 6/9/2026, after a user could barely",'see it: "the icon and the ... button look too small, users can hardly see','them at all."',"\u2B50 Stripping the border (above) took away the box that used to advertise the"," control, so the mark left standing has to carry the weight on its own. An"," icon drawn for a 13px table CELL is not the same thing as an icon that IS"," the whole control.","\u26A0\uFE0F SET HERE, NOT AT EACH CALL SITE. The size an app passes is right for the"," place it was written for; what makes it wrong is standing alone in a row."," The kit already decides the BOX from where it stands \u2014 the mark inside it","follows the same rule.","\u26A0\uFE0F AND `s4`, NOT `s5`. The first try used `s5` (24px at the middle density)",' and the same user called it back: "too big now, bring it down a bit \u2014 it',' is too different from the text and the icon on the row." A row control'," has to be findable, not louder than the data it sits beside; `s4` (16px)","lands next to the 14px mark that leads the row instead of towering over it."),o(`.${e}-table .${e}-btn--icon > svg, .${e}-table .${e}-btn--menu > svg`,{width:t("s4"),height:t("s4")}),a("row header \u2014 the identity cell of a row, and the one place a mark may stand","IN FRONT OF the name: a tree toggle, an icon for what kind of row this is.","\u26D4 THREE SLOTS, NOT AN INLINE RUN. A mark placed inline is dodged by the"," FIRST line only; the second line of a wrapped name starts at the cell"," edge and falls outside the tree's own alignment. Measured on a real","screen 6/9/2026 and reported by a user twice.","\u26A0\uFE0F AND NOT `display: flex` ON THE CELL ITSELF. A table cell usually carries"," width and an overflow rule; a flex box inside a pinned width squeezes the"," text down to two words and then spills. The box goes INSIDE the cell."),o(`.${e}-row-head`,{display:"flex","align-items":"flex-start",gap:t("s2")}),o(`.${e}-row-head-lead`,{flex:"0 0 auto",display:"inline-flex","align-items":"center",gap:t("s2"),color:t("ink-3")}),o(`.${e}-row-head-text`,{flex:"1 1 auto","min-width":"0"}),a("action row \u2014 WRAPS when it does not fit, and a button icon never shrinks.","\u26D4 Found 27/9/2026 drawing the rules at every level: a dialog foot with",' "\u0110\xF3ng" + two secondaries + the primary, in a 34rem box, ran OUT of the'," dialog, and each icon was squeezed to a dot \u2014 `:where(svg)` carries"," `max-width: 100%`, so inside a shrinking flex button the mark gives way"," first and the button looks icon-less. Wrap the row; pin the mark.","\u26A0\uFE0F A TABLE ROW does not wrap: one line per row, it scrolls in its own box."),o(`.${e}-actions`,{display:"flex","align-items":"center",gap:t("s2"),"flex-wrap":"wrap"}),o(`.${e}-table .${e}-actions`,{"justify-content":"flex-end","flex-wrap":"nowrap"}),o(`.${e}-btn > svg`,{flex:"none"}),o(`.${e}-rail .${e}-btn`,{width:"100%","justify-content":"flex-start"}),o(`.${e}-dialog .${e}-btn`,{"min-width":t("s7")}),a("dialog head \u2014 the name on the left, the way out (\u2715) in the top corner.","\u2B50 Added 27/9/2026: the exit left the foot for the head, so a foot holds"," only work and never reaches four buttons (see `DialogHead`). The \u2715 is an"," icon button \u2014 it keeps its square, not the wide minimum of a worded one."),o(`.${e}-dialog .${e}-btn--icon`,{"min-width":t("control-h")}),o(`.${e}-dialog-head`,{display:"flex","align-items":"center",gap:t("s3")}),o(`.${e}-dialog-title`,{margin:"0",flex:"1 1 auto","min-width":"0",font:`${t("t-h3-weight")} ${t("t-h3")}/${t("t-h3-line")} ${t("font")}`,"letter-spacing":t("t-h3-tracking"),color:t("ink")}),o(`.${e}-dialog-close`,{flex:"none","margin-inline-end":`calc(-1 * ${t("s2")})`}),a("dialog frame \u2014 ONE scroll, and it is the body. The dialog itself never scrolls.",'\u26D4 Found 27/9/2026 on "Ti\u1EBFp \u0111\xF3n": two columns each scrolling, inside a dialog'," that ALSO scrolled \u2014 scroll to the end and a blank band sat under the",' buttons. The user: "m\u1ECDi dialog ch\u1EC9 \u0111\u01B0\u1EE3c c\xF3 duy nh\u1EA5t 1 scroll content, view',' c\u1EE7a n\xF3 ph\u1EA3i l\xE0 c\u1ED1 \u0111\u1ECBnh". So: the dialog is a fixed frame no taller than'," the screen; the head and the foot stand still; `DialogBody` is the one"," region that scrolls. Every wrapper between the dialog and its body (a"," <form>, a sheet) becomes a column that may shrink, found with `:has()`.","\u26A0\uFE0F `position: relative` on the body: an `absolute` child (a native radio"," hidden under its chip) must be clipped BY the body \u2014 with no positioned"," ancestor it takes the dialog as its box and stretches the dialog."),o(`.${e}-dialog[open]`,{display:"flex","flex-direction":"column",overflow:"hidden","max-height":`calc(100dvh - 2 * ${t("s5")})`,"box-sizing":"border-box"}),o(`.${e}-dialog:focus`,{outline:"none"}),o(`.${e}-dialog :has(.${e}-dialog-body)`,{display:"flex","flex-direction":"column","min-height":"0"}),o(`.${e}-dialog > *, .${e}-dialog :has(.${e}-dialog-body) > *`,{flex:"none","min-height":"0"}),o(`.${e}-dialog :is(.${e}-dialog-body, :has(.${e}-dialog-body))`,{flex:"1 1 auto"}),a("\u26A0\uFE0F ROOM FOR THE FOCUS RING. The ring is `outline: 2px` + `outline-offset: 2px`,"," i.e. 4px OUTSIDE the control \u2014 and a scrolling box clips it. A field flush",' with the body edge lost its left ring on focus ("textbox b\xE1m qu\xE1 s\xE1t l\u1EC1',' tr\xE1i\u2026 nh\xECn nh\u01B0 b\u1ECB c\u1EAFt", 27/9/2026). The body pads by `s2` on every side and'," pulls itself out by the same amount, so content still lines up with the head."),o(`.${e}-dialog-body`,{position:"relative","overflow-y":"auto","min-height":"0","overscroll-behavior":"contain",padding:t("s2"),margin:`0 calc(-1 * ${t("s2")})`,display:"grid",gap:t("s4"),"align-content":"start"}),a("\u26A0\uFE0F a link GOES somewhere; it never commits. Drawn as a button, a reader","cannot tell which one is safe to press twice."),o(`.${e}-link`,{color:t("primary"),"text-decoration":"underline","text-underline-offset":"2px",cursor:"pointer"}),o(`.${e}-link:hover`,{color:t("accent-hover")}),o(`.${e}-link:active`,{color:t("accent-press")}),o(`.${e}-link:focus-visible`,d),o(`.${e}-link[disabled], .${e}-link[aria-disabled="true"]`,{...c,color:t("ink-3")}),a("disclosure \u2014 shows more of what is already here; never navigates"),o(`.${e}-disclosure`,{...p,gap:t("s2"),padding:`0 ${t("s3")}`,background:"transparent",border:"0","list-style":"none",...h("body",e),color:t("ink")}),o(`.${e}-disclosure:hover`,u("hover",e)),o(`.${e}-disclosure:active`,u("press",e)),o(`.${e}-disclosure:focus-visible`,d),o(`.${e}-disclosure[disabled], .${e}-disclosure[aria-disabled="true"]`,c),a("\u2B50 two levels, drawn differently on purpose: page tabs change WHAT the","screen is; nested tabs change a slice of one thing."),o(`.${e}-tabs`,{display:"flex",gap:t("s3"),"border-bottom":`1px solid ${t("line")}`}),o(`.${e}-tab`,{...p,padding:`0 ${t("s4")}`,background:"transparent",border:"0","border-bottom":"2px solid transparent","border-radius":"0",...h("tab",e)}),o(`.${e}-tab:hover`,{color:t("ink")}),o(`.${e}-tab:focus-visible`,d),o(`.${e}-tab[aria-selected="true"]`,{color:t("primary"),"border-bottom-color":t("primary")}),o(`.${e}-tab[aria-current="page"]`,{color:t("primary")}),o(`.${e}-tab[disabled], .${e}-tab[aria-disabled="true"]`,c),o(`.${e}-tabs--nested`,{"border-bottom":"0",gap:t("s2")}),o(`.${e}-tabs--nested .${e}-tab`,{"min-height":t("s6"),"border-bottom":"0","border-radius":t("r-pill")}),o(`.${e}-tabs--nested .${e}-tab[aria-selected="true"]`,{background:t("primary-bg"),color:t("ink"),"border-bottom-color":"transparent"}),a("rail"),o(`.${e}-rail-item`,{display:"flex","align-items":"center",gap:t("s2"),"min-height":t("touch"),padding:`0 ${t("s4")}`,"border-radius":t("r"),"text-decoration":"none",...h("rail-item",e)}),o(`.${e}-rail-item:hover`,u("hover",e)),o(`.${e}-rail-item:focus-visible`,d),o(`.${e}-rail-item[aria-current="page"]`,{background:t("primary-bg"),color:t("primary"),"font-weight":"500"}),a("\u26D4 declared scope with no screen yet \u2014 dimmed, inert, still listed. Not the","same as hidden-for-lack-of-role, which never renders at all."),o(`.${e}-rail-item[data-state="unbuilt"], .${e}-rail-item[aria-disabled="true"]`,{color:t("ink-3"),cursor:"default"}),o(`.${e}-rail-item--dense`,{"min-height":t("control-h")}),a("menu \u2014 an opened list of choices"),o(`.${e}-menu`,{background:t("surface"),border:`1px solid ${t("line")}`,"border-radius":t("r"),padding:t("s2"),"box-shadow":t("sh-3"),"min-width":t("s7"),margin:"0","list-style":"none"}),o(`.${e}-menu-item`,{display:"flex","align-items":"center",gap:t("s2"),width:"100%","min-height":t("touch"),padding:`0 ${t("s3")}`,"border-radius":t("r-sm"),background:"transparent",border:"0",cursor:"pointer","text-align":"left","text-decoration":"none",...h("body",e)}),o(`.${e}-menu-item:hover`,u("hover",e)),o(`.${e}-menu-item:focus-visible`,d),o(`.${e}-menu-item[aria-current="page"], .${e}-menu-item[aria-selected="true"]`,{background:t("primary-bg"),color:t("primary")}),o(`.${e}-menu-item[disabled], .${e}-menu-item[aria-disabled="true"]`,c),o(`.${e}-menu-item[data-tier="danger"]`,{color:t("tone-stop")}),o(`.${e}-menu--pop`,{position:"absolute",top:`calc(100% + ${t("s1")})`,left:"0","z-index":"60","max-height":"60vh","overflow-y":"auto",width:"max-content","max-width":"90vw"}),o(`.${e}-menu--pop-up`,{top:"auto",bottom:`calc(100% + ${t("s1")})`}),o(`.${e}-menu--pop-end`,{left:"auto",right:"0"}),o(`.${e}-menu-anchor`,{position:"relative",display:"inline-flex"}),o(`.${e}-suggest`,{position:"relative",display:"block"}),o(`.${e}-suggest > .${e}-menu--pop`,{width:"100%","max-width":"none","max-height":"40vh","box-sizing":"border-box"}),o(`.${e}-menu > [role="separator"]`,{height:"1px",margin:`${t("s2")} 0`,background:t("line-2"),border:"0","list-style":"none"}),a("\u26A0\uFE0F every input shares ONE box, so a form does not step as the eye goes down");let g={"min-height":t("control-h"),padding:`0 ${t("s3")}`,width:"100%","border-radius":t("r"),border:`1px solid ${t("line")}`,"background-color":t("surface"),...h("body",e),color:t("ink")};o(`.${e}-field-row`,{display:"grid",gap:t("s2")});let b={textarea:{"min-height":t("s7"),padding:t("s3"),"line-height":t("t-body-line")},select:{"padding-right":t("s6"),appearance:"none"}};for(let s of["field","select","textarea"])o(`.${e}-${s}`,{...g,...b[s]??{}}),o(`.${e}-${s}:focus-visible`,d),o(`.${e}-${s}[aria-invalid="true"]`,{"border-color":t("tone-stop")}),o(`.${e}-${s}[disabled]`,{...c,background:t("surface-2"),color:t("ink-3")}),a("readonly is NOT disabled \u2014 the value is still readable, selectable, copyable"),o(`.${e}-${s}[readonly]`,{background:t("surface-2"),"border-style":"dashed"});o(`.${e}-table .${e}-field, .${e}-table .${e}-select`,{"min-height":t("row-h"),padding:`0 ${t("s2")}`}),a('\u26D4 `<input type="file">` tr\u1EA7n v\u1EBD nh\xE3n c\u1EE7a TR\xCCNH DUY\u1EC6T \u2014 "Choose File / No','file chosen" \u2014 kh\xF4ng \u0111\u1ED5i \u0111\u01B0\u1EE3c b\u1EB1ng thu\u1ED9c t\xEDnh, v\xE0 n\xF3 l\xE0 ti\u1EBFng Anh gi\u1EEFa m\u1ED9t',"bi\u1EC3u m\u1EABu ti\u1EBFng kh\xE1c. N\xEAn \xF4 th\u1EADt b\u1ECB che, c\u1EA3 v\xF9ng l\xE0 nh\xE3n."),a("\u26A0\uFE0F C\u1EA2 V\xD9NG b\u1EA5m \u0111\u01B0\u1EE3c, kh\xF4ng ph\u1EA3i m\u1ED9t c\xE1i n\xFAt n\u1EB1m trong khung n\xE9t \u0111\u1EE9t. Khung",'n\xE9t \u0111\u1EE9t l\xE0 quy \u01B0\u1EDBc "b\u1EA5m ho\u1EB7c th\u1EA3 t\u1EC7p v\xE0o \u0111\xE2y"; v\u1EBD khung m\xE0 ch\u1EC9 c\xE1i n\xFAt b\xEAn',"trong m\u1EDBi \u0103n th\xEC ng\u01B0\u1EDDi d\xF9ng b\u1EA5m v\xE0o kho\u1EA3ng tr\u1ED1ng, kh\xF4ng th\u1EA5y g\xEC x\u1EA3y ra, v\xE0","k\u1EBFt lu\u1EADn m\xE0n h\xECnh h\u1ECFng. Khung h\u1EE9a m\u1ED9t \u0111\u1EB1ng, l\xE0m m\u1ED9t n\u1EBBo."),o(`.${e}-file`,{position:"relative",display:"grid","align-items":"center",cursor:"pointer","grid-template-columns":"auto 1fr auto","grid-template-areas":"'mark main clear' 'mark hint clear'",gap:`${t("s1")} ${t("s4")}`,padding:`${t("s4")} ${t("s4")}`,border:`1px dashed ${t("line")}`,"border-radius":t("r"),"background-color":t("surface-2"),margin:"0",transition:`border-color ${t("dur-fast")} ${t("ease-out")}`}),o(`.${e}-file:hover`,{"border-color":t("ink-3"),...u("hover",e)}),a("\xF4 t\u1EC7p TH\u1EACT v\u1EABn \u1EDF trong DOM v\xE0 v\u1EABn nh\u1EADn ti\xEAu \u0111i\u1EC3m b\xE0n ph\xEDm \u2014 che b\u1EB1ng k\u1EF9","thu\u1EADt che-nh\u01B0ng-v\u1EABn-\u0111\u1ECDc-\u0111\u01B0\u1EE3c, kh\xF4ng ph\u1EA3i `display: none`"),o(`.${e}-file > input`,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0 0 0 0)","white-space":"nowrap",border:"0"}),o(`.${e}-file:focus-visible, .${e}-file:has(:focus-visible)`,d),o(`.${e}-file[aria-invalid="true"], .${e}-file:has([aria-invalid="true"]), .${e}-file:has(:user-invalid)`,{"border-color":t("tone-stop"),"border-style":"solid"}),o(`.${e}-file[disabled], .${e}-file[aria-disabled="true"], .${e}-file:has(:disabled)`,{...c,"background-color":t("surface-2")}),o(`.${e}-file[readonly], .${e}-file:has([readonly])`,{"background-color":t("surface-2"),"border-style":"solid"}),a('\u0111\xE3 ch\u1ECDn \u0111\u01B0\u1EE3c t\u1EC7p \u2014 n\xE9t li\u1EC1n v\xE0 s\u1EAFc "xong", kh\xF4ng c\xF2n n\xE9t \u0111\u1EE9t "c\xF2n tr\u1ED1ng"'),o(`.${e}-file--has`,{"border-style":"solid","border-color":t("tone-done"),"background-color":t("tone-done-bg")}),o(`.${e}-file--has .${e}-file-mark`,{color:t("tone-done")}),a("\u0111ang k\xE9o t\u1EC7p l\u01A1 l\u1EEDng b\xEAn tr\xEAn: ph\u1EA3i ph\u1EA3n h\u1ED3i, kh\xF4ng th\xEC ng\u01B0\u1EDDi d\xF9ng kh\xF4ng","bi\u1EBFt th\u1EA3 xu\u1ED1ng c\xF3 \u0103n hay kh\xF4ng"),o(`.${e}-file--over`,{"border-style":"solid","border-color":t("ink-2"),"background-color":t("surface-2")}),o(`.${e}-file-mark`,{"grid-area":"mark",display:"grid","place-items":"center",color:t("ink-3")}),o(`.${e}-file-main`,{"grid-area":"main",...h("label",e),color:t("ink")}),o(`.${e}-file-hint`,{"grid-area":"hint",...h("hint",e)}),o(`.${e}-file-clear`,{"grid-area":"clear","align-self":"center"}),a("\u26D4 a checkbox is a few pixels of ink inside a full-size target \u2014 shrinking","the target to match the ink is the commonest tap failure in a form.");for(let s of["check","radio"])o(`.${e}-${s}`,{display:"inline-flex","align-items":"center",gap:t("s2"),"min-height":t("control-h"),cursor:"pointer",...h("body",e)}),o(`.${e}-${s}:hover`,{color:t("ink")}),o(`.${e}-${s}:focus-visible, .${e}-${s}:has(:focus-visible)`,d),o(`.${e}-${s}[aria-selected="true"], .${e}-${s}:has(:checked)`,{color:t("primary")}),o(`.${e}-${s}[disabled], .${e}-${s}[aria-disabled="true"], .${e}-${s}:has(:disabled)`,c);a("table"),o(`.${e}-table`,{width:"100%","border-collapse":"collapse"}),o(`.${e}-table th`,{"text-align":"left",padding:`${t("cell-y")} ${t("cell-x")}`,height:t("row-h"),"border-bottom":`1px solid ${t("line")}`,"white-space":"nowrap",...h("table-header",e)}),a("a long table without a rule between rows lets the eye slip a line"),a("\u26D4 `middle`, NOT `top` \u2014 AND THE GRAMMAR CONTRADICTED ITSELF ON THIS.","A cell here declares `height: var(--row-h)`: the row HAS a height, chosen","by density. Then top-aligning inside it pins the text to the ceiling of a","box deliberately taller than the text, leaving the same slack under every","line of every table where all cells are one line \u2014 which is most of them.","Declaring a height and then refusing to sit in it is incoherent, and it is",'visible: the first app to notice described the rows as "pushed up", wrote',"its own override, and dated the decision.","A row that really does need `top` says so, and says so in the kit's own","vocabulary: `table-cell-sub` is the second line under a name.","\u26A0\uFE0F A name that merely WRAPS carries no sub-line, so its row centres. That","is the honest limit of asking a class instead of measuring a height."),o(`.${e}-table td`,{padding:`${t("cell-y")} ${t("cell-x")}`,height:t("row-h"),"border-bottom":`1px solid ${t("line-2")}`,"vertical-align":"middle",...h("table-cell",e)}),a("\u26D4 THE CELL THAT NAMES THE RECORD IS A `th`, AND IT WEARS THE ROW'S SHAPE,","NOT THE COLUMN HEADER'S.",'`rowHeaderKey` asks for `<th scope="row">`, which is right for a screen',"reader \u2014 and which then inherits everything from the rule above, because","that rule says `th`. Four defects shipped that way, all of them silent:","the name rendered at META size, 0.8\xD7, the smallest text in its own row;","it carried the header's heavier bottom rule, so one cell of every row was","underlined darker than the rest of that row; it never got `vertical-align:","top`, so in a two-line row the name sat on a different baseline; and a","selected row's highlight had a hole in it, at exactly that column.","Found by `tagSwapGaps`, which is now a test \u2014 see `reach.ts`.",'What it keeps from being a header is the WEIGHT: heavier says "this names','the record", and that is the one difference that was ever intended.'),o(`.${e}-table th[scope="row"]`,{"white-space":"normal","vertical-align":"middle","border-bottom":`1px solid ${t("line-2")}`,...h("table-cell",e),"font-weight":"500"}),a("\u26D4 THE WASH, NOT A LADDER RUNG \u2014 FIXED IN 0.20.0, reported by a person",'looking at a screen: "hovering a button or a table turns everything white".',"It did. `--surface-2` is an absolute lightness, so on the page ground it","was LIGHTER than what it covered. A state must move away from what is","under it, and only a translucent wash knows what that is."),o(`.${e}-table tbody tr:hover td, .${e}-table tbody tr:hover th`,u("hover",e)),o(`.${e}-table tbody tr[aria-selected="true"] td, .${e}-table tbody tr[aria-selected="true"] th`,{background:t("primary-bg")}),a("a row with a second line under the name is the row that needs the top"),o(`.${e}-table tr:has(.${e}-table-cell-sub) td, .${e}-table tr:has(.${e}-table-cell-sub) th[scope="row"]`,{"vertical-align":"top"}),a("\u2B50 PICK-CELL \u2014 the column that selects a row.","The missing half of a grammar that already owns the table and already","knows about selection: `listModel` produces the selected state, and until","now nothing said what the column that sets it looks like.","\u26D4 THE HIT AREA WAS PROPOSED AT 17px AND THAT IS BELOW THIS PACKAGE'S OWN","FLOOR. `TARGET_FLOOR` is 24 \u2014 WCAG 2.2 \xA72.5.8 \u2014 and the reason given for 17","is the reason FOR the floor, not an exception to it: in a dense table a","small tremor lands on the neighbouring row. Taking the rule as offered","would have shipped a target this package already forbids elsewhere.","So the box stays small and the target is grown back around it \u2014 and the","floor is `--fos-target`, not a number, because a floor written as a literal","in one rule is a floor the next rule does not know about."),o(`.${e}-pick-cell`,{width:"1%","text-align":"center","vertical-align":"middle",padding:`0 ${t("cell-x")}`}),o(`.${e}-pick`,{display:"inline-grid","place-items":"center",cursor:"pointer","min-width":t("target"),"min-height":t("target"),"border-radius":t("r-sm"),color:t("ink-3")}),o(`.${e}-pick:hover`,{...u("hover",e),color:t("ink")}),o(`.${e}-pick:focus-visible, .${e}-pick:has(:focus-visible)`,d),o(`.${e}-pick[aria-selected="true"], .${e}-pick:has(:checked)`,{color:t("primary")}),o(`.${e}-pick[disabled], .${e}-pick[aria-disabled="true"]`,c),o(`.${e}-table--empty`,{"min-height":t("s7")}),o(`.${e}-table .${e}-num`,{"text-align":"right","font-variant-numeric":"tabular-nums"}),o(`.${e}-table .${e}-table-cell-sub`,{display:"block"}),a("a header that scrolls away makes the reader scroll back to name a column"),o(`.${e}-table--sticky thead th`,{position:"sticky",top:"0","z-index":"1",background:t("surface")}),a("surfaces"),a("\u2B50 FACTS \u2014 a record's own values, name beside value.","The shape `recordModel` has been producing data for since it existed, with","nowhere to pour it. The package was shipping content and no mould.","Two columns by default: a name column that takes what it needs and a value","column that takes the rest \u2014 so names align down the page and the eye can","run the list without reading it."),o(`.${e}-facts`,{display:"grid","grid-template-columns":"auto minmax(0, 1fr)",gap:`${t("s3")} ${t("s5")}`,margin:"0"}),o(`.${e}-facts > dt`,{...h("label",e)}),o(`.${e}-facts > dd`,{margin:"0","min-width":"0",...h("body",e)}),a("a long value reads better stacked than squeezed into a second column"),o(`.${e}-facts--stacked`,{"grid-template-columns":"minmax(0, 1fr)",gap:t("s2")}),o(`.${e}-facts--stacked > dt`,{"margin-top":t("s3")}),o(`.${e}-facts--stacked > dt:first-child`,{"margin-top":"0"}),a("\u2B50 CARD, HEAD and BODY \u2014 parts, the way `th` and `td` are parts.","A bare card leaves every screen to divide it into a heading strip and a","content area on its own; measured on one application, 378 places had done","exactly that. `:has()` lets the card drop its own padding once it is given","a head, so a plain card still works with no parts at all."),o(`.${e}-card`,{background:t("surface"),border:`1px solid ${t("line")}`,"border-radius":t("r-lg"),padding:t("s5"),"min-width":"0"}),o(`.${e}-card:has(> .${e}-card-head)`,{padding:"0"}),o(`.${e}-card-head`,{display:"flex","align-items":"center",gap:t("s3"),padding:`${t("s3")} ${t("s5")}`,"border-bottom":`1px solid ${t("line-2")}`}),a("the trailing slot \u2014 a count, a state, an action; never the title"),o(`.${e}-card-head > :last-child:not(:only-child)`,{"margin-left":"auto"}),o(`.${e}-card-body`,{padding:t("s5"),"min-width":"0"}),o(`.${e}-dialog`,{background:t("surface"),border:"0","border-radius":t("r-lg"),padding:t("s5"),"box-shadow":t("sh-3"),"max-width":"100%"}),o(`.${e}-notice`,{display:"flex",gap:t("s3"),padding:t("s4"),"border-radius":t("r"),"border-left":`2px solid ${t("tone-doing")}`,background:t("tone-doing-bg"),...h("body",e),color:t("ink")});for(let s of["wait","doing","done","warn","stop"])o(`.${e}-notice--${s}`,{"border-left-color":t(`tone-${s}`),background:t(`tone-${s}-bg`)});a("\u2B50 AN ACTION'S OUTCOME COMES TO A CORNER, NOT INTO THE PAGE.","Told in place, an error sat wherever the form happened to end \u2014 below the","fold, behind a dialog's scroll \u2014 and the person, eyes on the button they","had pressed, did not see it. One fixed corner, bottom right, the same on","every screen: the eye learns where to look once.","\u26A0\uFE0F The stack is `position: fixed` and carries no background of its own; the","UA styles of `[popover]`/`<dialog>` it may sit in are reset here."),o(`.${e}-toasts`,{position:"fixed",inset:`auto ${t("s5")} ${t("s5")} auto`,"z-index":"70",display:"grid",gap:t("s2"),width:`min(26rem, calc(100vw - 2 * ${t("s5")}))`,margin:"0",padding:"0",border:"0",background:"transparent",overflow:"visible","pointer-events":"none"}),o(`.${e}-toast`,{display:"flex","align-items":"flex-start",gap:t("s3"),padding:`${t("s3")} ${t("s3")} ${t("s3")} ${t("s4")}`,background:t("surface"),border:`1px solid ${t("line")}`,"border-left":`2px solid ${t("tone-doing")}`,"border-radius":t("r"),"box-shadow":t("sh-3"),"pointer-events":"auto",...h("body",e),color:t("ink")}),o(`.${e}-toast-body`,{display:"grid",gap:"2px",flex:"1 1 auto","min-width":"0","padding-top":"2px"});for(let s of["wait","doing","done","warn","stop"])o(`.${e}-toast--${s}`,{"border-left-color":t(`tone-${s}`)});a("\u2B50 A STATE IS A DOT, NOT A PILL WRAPPED ROUND A WORD.","A filled pill puts a block of colour behind text, so on a list of forty","rows the eye lands on the blocks instead of the names \u2014 the decoration","outranks the data. A dot carries the same information in a tenth of the","area and leaves the word in ordinary ink, where it stays readable.","\u26A0\uFE0F The dot is sized in `em`, so it belongs to whatever text it sits"," beside instead of needing a token that would drift from it."),o(`.${e}-badge`,{display:"inline-flex","align-items":"baseline",gap:t("s2"),...h("badge",e),color:t("ink")}),o(`.${e}-badge::before`,{content:'""',width:"0.55em",height:"0.55em","border-radius":t("r-pill"),background:t("tone-plain"),flex:"0 0 auto",transform:"translateY(-0.05em)"});for(let s of["plain","wait","doing","done","warn","stop"])o(`.${e}-badge--${s}::before`,{background:t(`tone-${s}`)});a("\u26D4 a dot with no word needs a legend, and an accessible name \u2014 colour on","its own is a channel roughly one man in twelve cannot read."),o(`.${e}-badge--bare`,{gap:"0"}),o(`.${e}-legend`,{display:"flex","flex-wrap":"wrap",gap:`${t("s2")} ${t("s4")}`,...h("hint",e)}),o(`.${e}-legend .${e}-badge`,{...h("hint",e),color:t("ink-3")}),a("\u26A0\uFE0F a skeleton stands in for DATA, never for a control \u2014 see `skeletonFor`"),o(`.${e}-skeleton`,{background:t("surface-2"),"border-radius":t("r-sm"),"min-height":t("t-body"),animation:`${e}-pulse 1.4s ease-in-out infinite`}),i.push(`@keyframes ${e}-pulse { 50% { opacity: 0.55; } }`),o(`@media (prefers-reduced-motion: reduce) { .${e}-skeleton`,{animation:"none"}),i.push("}"),o(`.${e}-empty`,{display:"grid",gap:t("s3"),"justify-items":"center",padding:t("s7"),"text-align":"center"}),o(`.${e}-empty--compact`,{"justify-items":"start","text-align":"left",padding:`${t("s3")} 0`,gap:t("s1"),...h("hint",e)}),a("\u2B50 SEGMENTED \u2014 switches a MODE, not a place.","Drawn unlike a tab on purpose: a tab changes what you are looking at, a","segmented control changes how you are looking at it, and a reader who","cannot tell them apart does not know whether a click loses their place."),o(`.${e}-segmented`,{display:"flex","flex-wrap":"wrap",gap:t("s2")}),o(`.${e}-segmented-item`,{...p,gap:t("s2"),"min-height":`calc(${t("control-h")} - ${t("s1")})`,padding:`0 ${t("s3")}`,background:t("surface"),border:`1px solid ${t("line")}`,"border-radius":t("r-pill"),...h("tab",e),color:t("ink-2")}),o(`.${e}-segmented-item:hover`,{color:t("ink"),"border-color":t("ink-3")}),o(`.${e}-segmented-item:focus-visible`,d),o(`.${e}-segmented-item[aria-current]:not([aria-current="false"]), .${e}-segmented-item[aria-selected="true"]`,{background:t("primary"),"border-color":t("primary"),color:t("primary-contrast")}),o(`.${e}-segmented-item .${e}-count`,{"min-width":"0","min-height":"0",padding:"0",background:"transparent",color:t("ink-3")}),o(`.${e}-segmented-item[aria-current]:not([aria-current="false"]) .${e}-count, .${e}-segmented-item[aria-selected="true"] .${e}-count`,{color:"inherit",opacity:"0.8"}),o(`.${e}-segmented-item[disabled], .${e}-segmented-item[aria-disabled="true"]`,c),a("\u26A0\uFE0F COUNT and TAG are NOT states, and must not borrow the state dot.",'A count answers "how many"; a tag answers "what kind". Drawing either',"with a tone makes a reader look for a meaning that is not there \u2014 which","is how a screen ends up with fourteen coloured things and no signal."),o(`.${e}-count`,{display:"inline-flex","align-items":"center","justify-content":"center","min-width":t("s5"),"min-height":t("s5"),padding:`0 ${t("s1")}`,"border-radius":t("r-pill"),background:t("surface-2"),"font-variant-numeric":"tabular-nums",...h("badge",e),color:t("ink-2")}),o(`.${e}-tag`,{display:"inline-flex","align-items":"center","min-height":t("s5"),padding:`0 ${t("s2")}`,"border-radius":t("r-sm"),border:`1px solid ${t("line")}`,...h("badge",e),color:t("ink-2")}),a("\u2B50 METER \u2014 how far along, against a target.",'A bare number cannot say "0 of 240" at a glance across forty rows; a bar','can. It carries `role="meter"` with the real numbers, so the value is',"available to anyone who cannot see the bar at all."),o(`.${e}-meter`,{display:"block",width:"100%","min-width":t("s7"),"max-width":t("s7"),height:t("s2"),"border-radius":t("r-pill"),background:t("surface-2"),overflow:"hidden"}),o(`.${e}-meter > *`,{display:"block",height:"100%",background:t("primary")});for(let s of["wait","doing","done","warn","stop"])o(`.${e}-meter--${s} > *`,{background:t(`tone-${s}`)});return a("\u2B50 SR-ONLY \u2014 out of sight, still heard.","Carries no business word, and no design system is without it. It is also","the condition for this grammar's OWN icon-only button: `--icon` hides the","label with `aria-label`, but a label that must stay IN THE DOM without","taking pixels had no name here until now.","\u26A0\uFE0F Both `clip` and `clip-path`, and `white-space: nowrap`, on purpose.","The legacy `clip` is what old assistive stacks read; `nowrap` stops a","one-pixel box wrapping every word onto its own line, which some screen","readers then announce letter by letter. Writing five of the six lines is","the common mistake, and the sixth is invisible to whoever wrote it."),o(`.${e}-sr-only`,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(50%)","white-space":"nowrap",border:"0"}),a("and it comes BACK when focused, or a keyboard skip-link is invisible"),o(`.${e}-sr-only--focusable:focus, .${e}-sr-only--focusable:focus-within`,{position:"static",width:"auto",height:"auto",margin:"0",overflow:"visible",clip:"auto","clip-path":"none","white-space":"normal"}),a("\u2B50 PROVENANCE \u2014 where this number came from.","A footer under a record or a figure: a tinted ground, a rule above, smaller","type, and a `code` run that does not break in the middle of an identifier.","\u26A0\uFE0F THE CONTRACT DOES NOT CARRY THIS, and the proposal said it did. What","`@dqa-ai-solutions/app-runtime` carries is `notes` / `ResolvedField.note` \u2014 the","authority behind ONE FIELD, per property. This is the RECORD-level block,","and it has no contract behind it today. The mould is here because the shape","is general; the day a contract grows a record-level provenance, it has","somewhere to pour."),o(`.${e}-provenance`,{display:"grid",gap:t("s2"),"margin-top":t("s5"),"padding-top":t("s4"),"border-top":`1px solid ${t("line-2")}`,...h("note",e)}),o(`.${e}-provenance code, .${e}-provenance kbd`,{font:`var(--${e}-t-meta-weight) var(--${e}-t-meta)/var(--${e}-t-meta-line) var(--${e}-mono)`,background:t("surface-2"),"border-radius":t("r-sm"),padding:`0 ${t("s1")}`,"overflow-wrap":"anywhere"}),a("\u2B50 AVATAR \u2014 who: a face, or the initials standing for one.","\u26A0\uFE0F The proposal called it `chip`, and that name is taken: everywhere else a","chip is a small text token, which is `fos-tag` here. A name that means","something else in every other system is a name that will be reached for by","mistake.","\u26A0\uFE0F SIZED FROM DENSITY, not from the 30\u201334px it was measured at. Every other","control in this grammar moves with `--fos-control-h`; an avatar that does","not is the one round thing that stays put while its row changes height."),o(`.${e}-avatar`,{display:"inline-grid","place-items":"center","flex-shrink":"0",width:t("control-h"),height:t("control-h"),"border-radius":t("r-pill"),overflow:"hidden",background:t("primary-bg"),...h("table-cell-sub",e),color:t("primary"),"font-weight":"600","text-transform":"uppercase","user-select":"none"}),o(`.${e}-avatar > img`,{width:"100%",height:"100%","object-fit":"cover"}),a("\u2B50 TREE ROW \u2014 depth as a number, not as a pile of spacer cells.","Indentation comes from --fos-depth on the row, so a renderer never emits","padding it computed itself, and a row can never disagree with its own","nesting."),o(`.${e}-tree-toggle`,{...p,"justify-content":"center",width:t("s5"),"min-width":t("s5"),"min-height":t("s5"),padding:"0",background:"transparent",border:"0",color:t("ink-3")}),o(`.${e}-tree-toggle:hover`,{color:t("ink")}),o(`.${e}-tree-toggle:active`,{color:t("primary")}),o(`.${e}-tree-toggle:focus-visible`,d),o(`.${e}-tree-toggle[disabled], .${e}-tree-toggle[aria-disabled="true"]`,c),o(`.${e}-table [data-depth] th[scope="row"], .${e}-table [data-depth] td:first-child`,{"padding-left":`calc(${t("cell-x")} + var(--${e}-depth, 0) * ${t("s5")})`}),a("\u2B50 MILESTONES \u2014 how far along a route, and what stands between here and next.","A rail of points with a line drawn through them: the ones behind, the one","the record is on, the ones ahead. Its parts carry the weight \u2014 the rail","itself is a scroller and a connector, like `table` to its `th` and `td`.","\u26A0\uFE0F THE CONNECTOR IS DRAWN BY THE POINT, NOT BY THE RAIL. A single line","under the whole rail cannot change colour partway, and the colour IS the","information: solid behind the record, dashed ahead of it. Each point draws","the segment arriving at itself, so the break falls exactly where the record","stands, with no element counting how many points there are.","\u26D4 AND IT SCROLLS SIDEWAYS RATHER THAN WRAPPING. A route that wraps to a","second row reads as a second stage; a route that scrolls reads as one long","route, which is what it is. Measured: routes run to 12 points."),o(`.${e}-milestones`,{display:"flex","align-items":"stretch","overflow-x":"auto",gap:"0","padding-bottom":t("s1")}),o(`.${e}-milestone`,{flex:"1 1 0","min-width":t("s7"),position:"relative",display:"flex","flex-direction":"column","align-items":"center","text-align":"center",padding:`0 ${t("s1")}`}),o(`.${e}-milestone::before`,{content:'""',position:"absolute",top:`calc(${t("s4")} / 2)`,left:"-50%",right:"50%",height:"2px",background:t("line"),"z-index":"0"}),o(`.${e}-milestone:first-child::before`,{display:"none"}),o(`.${e}-milestone--past::before, .${e}-milestone--current::before`,{background:t("tone-done")}),o(`.${e}-milestone--ahead::before`,{"background-image":`repeating-linear-gradient(90deg, ${t("line")} 0 ${t("s1")}, transparent ${t("s1")} ${t("s2")})`,"background-color":"transparent"}),o(`.${e}-milestone-dot`,{display:"flex","align-items":"center","justify-content":"center",width:t("s4"),height:t("s4"),"border-radius":t("r-pill"),background:t("surface"),border:`2px solid ${t("line")}`,flex:"0 0 auto","z-index":"1",...h("badge",e),color:t("ink-3")}),o(`.${e}-milestone--past > .${e}-milestone-dot`,{background:t("tone-done"),"border-color":t("tone-done"),color:t("surface")}),o(`.${e}-milestone--current > .${e}-milestone-dot`,{background:t("tone-doing"),"border-color":t("tone-doing"),color:t("surface")}),o(`.${e}-milestone--gate > .${e}-milestone-dot`,{"border-style":"dashed","border-color":t("tone-warn"),background:t("tone-warn-bg"),color:t("tone-warn")}),a("\u2B50 A SETTLED GATE IS NO LONGER A WAIT, AND THE RING MUST STOP SAYING IT IS.","The dash stays \u2014 it is still a gate, and shape is what tells a gate from a",'state. What changes is the tone: `tone-warn` means "somebody still has to','act", and on a gate that has been ruled on, nobody does.',"\u26D4 AND IT IS TWO TONES, NOT ONE. Settled says the level above HAS ruled;","it does not say which way. Painting a refusal the same green as an approval","would put the strip's only picture at odds with the words beneath it \u2014","exactly the fault this rule was written to end, one step further along.","\u26A0\uFE0F THE CALLER CANNOT TELL US WHICH: the lens carries the verdict as the","application's own word (`approve`, `RETURNED`, whatever the domain says).","So the React layer takes a two-valued `settled` and the app maps its own","vocabulary onto it. Two classes here, no strings."),o(`.${e}-milestone--gate.${e}-milestone--passed > .${e}-milestone-dot`,{"border-color":t("tone-done"),background:t("tone-done-bg"),color:t("tone-done")}),o(`.${e}-milestone--gate.${e}-milestone--refused > .${e}-milestone-dot`,{"border-color":t("tone-stop"),background:t("tone-stop-bg"),color:t("tone-stop")}),a("the one thing the record is actually waiting on \u2014 the only ring on the rail"),o(`.${e}-milestone--awaiting > .${e}-milestone-dot`,{"box-shadow":`0 0 0 ${t("s1")} ${t("tone-warn-bg")}`}),o(`.${e}-milestone-label`,{"margin-top":t("s2"),...h("table-cell",e),"font-weight":"600"}),o(`.${e}-milestone--ahead > .${e}-milestone-label`,{color:t("ink-2"),"font-weight":"400"}),o(`.${e}-milestone-who`,{"margin-top":"2px",...h("table-cell-sub",e)}),o(`.${e}-milestone--awaiting > .${e}-milestone-who`,{color:t("tone-warn")}),a("\u26D4 WHAT IS NOT A POSITION ON THE ROUTE SITS BELOW THE RAIL, NEVER ON IT.","Three kinds of work fail to be a point on a route, and all three are","ordinary rather than exceptional:"," \xB7 a RETURN \u2014 walks the record backward. 22 of 54 processes have one."," \xB7 PARALLEL work \u2014 another role's, running alongside, blocking nobody."," \xB7 work done ON DEMAND \u2014 outside the sequence, taken only if needed.","Drawn as another point, each asserts a place in the order it does not hold:","a return would read as coming AFTER the state it returns to, and parallel","work would read as a step everyone must pass through.","\u26A0\uFE0F THE FOOT OWNS THE RULE ABOVE IT, not each line. Three lines each drawing","their own divider stack into three dividers for one seam."),o(`.${e}-milestones-foot`,{display:"flex","flex-direction":"column",gap:t("s2"),"margin-top":t("s3"),"padding-top":t("s2"),"border-top":`1px dashed ${t("line")}`}),o(`.${e}-milestone-note`,{display:"flex","align-items":"flex-start",gap:t("s2"),...h("table-cell-sub",e)}),o(`.${e}-milestone-note > :first-child`,{flex:"0 0 auto","align-self":"flex-start","line-height":"inherit"}),o(`.${e}-milestone-note > :first-child > svg`,{"vertical-align":"middle"}),a("\u26D4 an icon alone is a guess unless it is labelled \u2014 see `check-icon-only-aria`"),o(`.${e}-icon`,{width:t("t-body"),height:t("t-body"),flex:"0 0 auto","vertical-align":"middle"}),i.join(`
4
+ `)+`
5
+ `}var D=(n,e)=>[`${n} {`,...Object.entries(e).map(([t,i])=>` ${t}: ${i};`),"}"].join(`
6
+ `);function C(n="fos"){let e=n,t=a=>`var(--${e}-${a})`,i=["/* base \u2014 element defaults at ZERO specificity: override freely. */"],o=(a,p)=>i.push(D(`:where(${a})`,p));o("*, *::before, *::after",{"box-sizing":"border-box"}),o("html",{"-webkit-text-size-adjust":"100%"}),o("body",{margin:"0",background:t("bg"),color:t("ink"),font:`var(--${e}-t-body-weight) var(--${e}-t-body)/var(--${e}-t-body-line) var(--${e}-font)`,"letter-spacing":t("t-body-tracking"),"-webkit-font-smoothing":"antialiased"}),i.push("","/* headings take the ladder; nothing is left at a browser default */");for(let[a,p]of[["h1","h1"],["h2","h2"],["h3","h3"],["h4","body-lg"]])o(a,{margin:"0",font:`var(--${e}-t-${p}-weight) var(--${e}-t-${p})/var(--${e}-t-${p}-line) var(--${e}-font)`,"letter-spacing":t(`t-${p}-tracking`),color:t("ink")});return o("p, ul, ol, dl",{margin:"0"}),o("ul, ol",{"padding-left":t("s5")}),o("a",{color:t("primary"),"text-underline-offset":"2px"}),o("code, kbd, samp, pre",{"font-family":t("mono"),"font-size":"0.92em"}),o("hr",{border:"0","border-top":`1px solid ${t("line")}`,margin:"0"}),o("img, svg, video",{"max-width":"100%"}),i.push("","/* \u26D4 a bare control must be QUIET. See the header for what happens otherwise. */"),o("button",{font:"inherit",color:t("ink"),background:t("surface"),border:`1px solid ${t("line")}`,"border-radius":t("r"),"min-height":t("control-h"),padding:`0 ${t("s4")}`,cursor:"pointer"}),o("input, select, textarea",{font:"inherit",color:t("ink"),background:t("surface"),border:`1px solid ${t("line")}`,"border-radius":t("r"),"min-height":t("control-h"),padding:`0 ${t("s3")}`}),o("textarea",{padding:t("s3"),"min-height":t("s7")}),o("label",{font:`500 var(--${e}-t-caption)/var(--${e}-t-caption-line) var(--${e}-font)`,color:t("ink-2")}),o(":focus-visible",{outline:`2px solid ${t("focus")}`,"outline-offset":"2px"}),i.push("","/* \u2B50 tables read right with no class at all \u2014 the commonest surface in an"),i.push(" * operational product should not be the one that needs remembering. */"),o("table",{width:"100%","border-collapse":"collapse"}),o("th",{"text-align":"left",padding:`${t("cell-y")} ${t("cell-x")}`,height:t("row-h"),"border-bottom":`1px solid ${t("line")}`,font:`500 var(--${e}-t-meta)/var(--${e}-t-meta-line) var(--${e}-font)`,color:t("ink-3"),"white-space":"nowrap"}),o("td",{padding:`${t("cell-y")} ${t("cell-x")}`,height:t("row-h"),"border-bottom":`1px solid ${t("line-2")}`,"vertical-align":"middle",font:`var(--${e}-t-body-weight) var(--${e}-t-body)/var(--${e}-t-body-line) var(--${e}-font)`}),i.push(" /* \u26D4 FIXED IN 0.16.0 \u2014 PAST, NOT PRESENT. The rule below is the fix."),i.push(" * The base layer had the same `th`/`td` swap the component layer had:"),i.push(" * `rowHeaderKey` makes one cell of every row a `th`, and a bare table"),i.push(" * gave that cell the COLUMN HEADER's size, colour and rule."),i.push(" * Weight is the one thing it keeps \u2014 it names the record. */"),o('th[scope="row"]',{"white-space":"normal","vertical-align":"middle","border-bottom":`1px solid ${t("line-2")}`,font:`var(--${e}-t-body-weight) var(--${e}-t-body)/var(--${e}-t-body-line) var(--${e}-font)`,"font-weight":"500",color:t("ink")}),o("tbody tr:hover td, tbody tr:hover th",{"background-image":`linear-gradient(var(--${e}-hover), var(--${e}-hover))`}),i.push("","/* someone who turned motion off meant it */"),i.push("@media (prefers-reduced-motion: reduce) {"),i.push(" :where(*) { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }"),i.push("}"),i.join(`
7
+ `)+`
8
+ `}function W(n="fos"){let e=n,t=a=>`var(--${e}-${a})`,i=["/* layout \u2014 the mould a screen is poured into */"],o=(a,p)=>i.push(D(a,p));return o(`.${e}-app`,{display:"grid","grid-template-columns":"auto 1fr","min-height":"100vh"}),o(`.${e}-rail`,{display:"flex","flex-direction":"column",gap:t("s1"),padding:t("s3"),"border-right":`1px solid ${t("line")}`,background:t("surface"),"min-width":t("s7"),position:"sticky",top:"0",height:"100vh","overflow-y":"auto","box-sizing":"border-box"}),o(`.${e}-main`,{"min-width":"0",padding:t("s6"),display:"grid",gap:t("s6"),"align-content":"start"}),i.push("","/* one rhythm between sections, so no screen invents its own */"),o(`.${e}-page-head`,{display:"grid",gap:t("s2")}),o(`.${e}-page-head .${e}-actions`,{display:"flex",gap:t("s3"),"flex-wrap":"wrap"}),o(`.${e}-section`,{display:"grid",gap:t("s4"),"align-content":"start"}),i.push("","/* \u2B50 a form is one column of equal rows \u2014 a grid of mixed widths is how a"),i.push(" * form starts looking like a spreadsheet nobody can scan. */"),o(`.${e}-form`,{display:"grid",gap:t("s5"),"max-width":"42rem"}),o(`.${e}-form-actions`,{display:"flex","flex-wrap":"wrap",gap:t("s3"),"justify-content":"flex-end","padding-top":t("s4"),"border-top":`1px solid ${t("line-2")}`}),i.push("","/* \u2B50 A NOTE THAT BELONGS TO THE ACTION ROW, AND RE-ALIGNS WHEN THE ROW"),i.push(' * IS EMPTY. Proposed as `handoff` \u2014 "the process has not stopped, here is'),i.push(' * who is next" \u2014 which is a WORKFLOW word, not a shape. The shape is'),i.push(" * general and the shape is what a kernel may carry: a note sits beside the"),i.push(" * buttons and is a caption FOR them, so it goes right; with no buttons it"),i.push(" * is a sentence of its own, so it goes left."),i.push(" * \u2B50 Worth taking for the sibling rule alone: its alignment depends on what"),i.push(" * is NEXT TO IT, which no single screen can state and only a grammar can."),i.push(" * \u26A0\uFE0F Layout, not an element \u2014 the type comes from `.fos-note`, the position"),i.push(" * from here, and what is left is arrangement. Same ruling as `badge-group`. */"),o(`.${e}-actions-note`,{"text-align":"right","margin-left":"auto"}),o(`.${e}-form-actions:empty ~ .${e}-actions-note, .${e}-actions:empty ~ .${e}-actions-note`,{"text-align":"left","margin-left":"0"}),i.push("","/* \u2B50 WHY A BUTTON IS LOCKED \u2014 UNDER THE ROW, ONE LINE PER BUTTON. Added 27/9/2026."),i.push(" * Each reason standing beside its own button squeezed words BETWEEN the"),i.push(' * buttons ("[L\u01B0u] Ch\u01B0a c\xF3 thay \u0111\u1ED5i\u2026 [Submit] C\xF2n thi\u1EBFu\u2026"); one run-on caption'),i.push(' * after the row was not better. The user: "c\xE1c text b\xE1o tr\u1EA1ng th\xE1i cho c\xE1c'),i.push(' * button n\xEAn hi\u1EC3n th\u1ECB ph\xEDa d\u01B0\u1EDBi, nhi\u1EC1u text th\xEC show l\u1EA7n l\u01B0\u1EE3t theo c\u1ED9t".'),i.push(" * \u26A0\uFE0F Layout only \u2014 each line is a `.fos-hint`; what is added is where it goes:"),i.push(" * the row wraps only when it carries reasons, and the list takes a line of its"),i.push(" * own; in a bar whose buttons sit right (a dialog or form foot, a page head)"),i.push(" * the lines sit right under them. */"),o(`.${e}-actions--noted`,{"flex-wrap":"wrap"}),o(`.${e}-actions-why`,{"flex-basis":"100%",margin:"0",padding:"0","list-style":"none",display:"grid",gap:t("s1")}),o(`.${e}-form-actions .${e}-actions, .${e}-page-head .${e}-actions--noted`,{"justify-content":"flex-end"}),o(`.${e}-form-actions .${e}-actions-why, .${e}-page-head .${e}-actions-why`,{"text-align":"right"}),i.push("","/* \u26D4 a wide table scrolls INSIDE its own box. A page that scrolls sideways"),i.push(" * takes the navigation off screen with it. */"),o(`.${e}-table-wrap`,{"overflow-x":"auto",border:`1px solid ${t("line")}`,"border-radius":t("r-lg"),background:t("surface")}),o(`.${e}-badge-group`,{display:"inline-flex","align-items":"center",gap:t("s3")}),o(`.${e}-grid`,{display:"grid",gap:t("s4"),"grid-template-columns":"repeat(auto-fill, minmax(16rem, 1fr))"}),o(`.${e}-backdrop`,{position:"fixed",inset:"0",display:"grid","place-items":"center",padding:t("s5"),background:"rgb(0 0 0 / 45%)"}),i.push("","/* a narrow screen drops the rail rather than squeezing the work */"),i.push("@media (max-width: 52rem) {"),i.push(` .${e}-app { grid-template-columns: 1fr; }`),i.push(` .${e}-rail { border-right: 0; border-bottom: 1px solid ${t("line")}; position: static; height: auto; overflow-y: visible; }`),i.push(` .${e}-main { padding: ${t("s4")}; }`),i.push("}"),i.join(`
9
+ `)+`
10
+ `}function J(n,e={}){let t=e.prefix??"fos",{base:i=!0,layout:o=!0,...a}=e;return["/* @dqa-ai-solutions/ui-runtime \u2014 the whole kit. Generated; edit the theme, not this file."," * Load BEFORE your own stylesheet. Element defaults are zero-specificity,"," * so anything you write wins without !important. */","",x(n,{...a,prefix:t}),i?C(t):"",T(n,t),v({prefix:t}),o?W(t):""].filter(Boolean).join(`
11
+ `)}export{A as a,B as b,G as c,O as d,S as e,R as f,$ as g,y as h,M as i,j,w as k,q as l,Y as m,X as n,K as o,V as p,_ as q,k as r,v as s,C as t,W as u,J as v};
@@ -0,0 +1,5 @@
1
+ var k={light:{bg:1,surface:0,"surface-2":.6,ink:7,"ink-2":8,"ink-3":10,line:2.5,"line-2":2},dark:{bg:1,surface:1.1,"surface-2":1.05,ink:1.2,"ink-2":2,"ink-3":2.6,line:1.8,"line-2":1.6}},y={light:{bg:.973,surface:1,"surface-2":.988,ink:.239,"ink-2":.477,"ink-3":.545,line:.924,"line-2":.955,accent:.428,accentBg:.946,toneInk:.515,toneGround:.952},dark:{bg:.2,surface:.247,"surface-2":.224,ink:.96,"ink-2":.8,"ink-3":.7,line:.33,"line-2":.285,accent:.68,accentBg:.3,toneInk:.82,toneGround:.31}},S={plain:{hue:264,chroma:.019},wait:{hue:96,chroma:.095},doing:{hue:259.7,chroma:.172},done:{hue:158.2,chroma:.115},warn:{hue:64.4,chroma:.123},stop:{hue:28.8,chroma:.181}},O={plain:"muted",doing:"info",done:"ok",warn:"warn",stop:"bad"},d={compact:{s1:2,s2:6,s3:8,s4:12,s5:18,s6:24,s7:36},cosy:{s1:4,s2:8,s3:12,s4:16,s5:24,s6:32,s7:48},roomy:{s1:4,s2:10,s3:16,s4:24,s5:32,s6:48,s7:72}},p={compact:{h:32,padX:8,padY:4},cosy:{h:40,padX:12,padY:8},roomy:{h:48,padX:16,padY:12}},x={compact:30,cosy:36,roomy:42},T=24,R=44,l={s1:"icon to its label; inside a badge",s2:"control to its hint; between list rows",s3:"inside a chip; tight stack",s4:"between fields; dense card padding",s5:"card padding; heading to its body",s6:"between blocks in one section",s7:"between top-level sections"},m={micro:{r:.72,line:1.35,weight:400,tracking:.1},meta:{r:.8,line:1.4,weight:400,tracking:.05},caption:{r:.857,line:1.4,weight:400,tracking:0},body:{r:1,line:1.5,weight:400,tracking:0},"body-lg":{r:1.143,line:1.5,weight:400,tracking:-.05},h3:{r:1.429,line:1.3,weight:600,tracking:-.2},h2:{r:1.714,line:1.25,weight:600,tracking:-.4},h1:{r:2,line:1.2,weight:600,tracking:-.6}},f=14,b=e=>Math.round(e*2)/2,E=(e=f)=>Object.fromEntries(Object.entries(m).map(([r,a])=>[r,{size:b(e*a.r),line:a.line,weight:a.weight,tracking:a.tracking}])),A=E(),I={sharp:{sm:3,r:4,lg:8,pill:9999},soft:{sm:6,r:8,lg:12,pill:9999},round:{sm:8,r:12,lg:20,pill:9999}},u={sm:"badge, inline tag",r:"button, input, card",lg:"dialog, sheet, panel",pill:"chip, avatar, segmented control"},N={"sh-1":"0 1px 2px rgba(19, 23, 34, .04)","sh-2":"0 1px 3px rgba(19, 23, 34, .07), 0 1px 2px rgba(19, 23, 34, .04)","sh-3":"0 12px 28px -10px rgba(19, 23, 34, .16)","dur-fast":"120ms","dur-base":"180ms","ease-out":"cubic-bezier(0.16, 1, 0.3, 1)","ease-standard":"cubic-bezier(0.4, 0, 0.2, 1)"},_={sans:"'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif",mono:"ui-monospace, SFMono-Regular, Menlo, monospace"},P={light:{lo:.52,hi:.68,chroma:.15},dark:{lo:.62,hi:.78,chroma:.13}},j=8,v=.1,C={light:{from:.93,to:.45,chroma:.11},dark:{from:.3,to:.85,chroma:.1}};var $=e=>({...Object.fromEntries(Object.entries(d[e]).map(([r,a])=>[r,`${a}px`])),"row-h":`${p[e].h}px`,"control-h":`${x[e]}px`,"cell-x":`${p[e].padX}px`,"cell-y":`${p[e].padY}px`});function w(e,r={}){let{selector:a=":root",prefix:c="fos",annotate:i=!0,tail:g}=r,n=(o,s)=>` --${c}-${o}: ${s};`,t=[];t.push("/* GENERATED by @dqa-ai-solutions/ui-runtime \u2014 do not edit."),t.push(" * Change the theme declaration and regenerate. Every colour below was computed from"),t.push(" * a hue and checked for contrast against every ground it can land on. */"),t.push(`${a} {`),t.push(` color-scheme: ${e.scheme};`),t.push(""," /* \u2500\u2500 colour \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */");for(let[o,s]of Object.entries(e.colors))t.push(n(o,s));t.push(""," /* \u2500\u2500 chart: categories rotate hue AND alternate lightness \u2500 */"),e.series.forEach((o,s)=>t.push(n(`series-${s+1}`,o))),t.push(""," /* \u2500\u2500 chart: one ordered scale, one hue, low \u2192 high \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */"),e.levels.forEach((o,s)=>t.push(n(`level-${s+1}`,o))),t.push(""," /* \u2500\u2500 rhythm \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */");for(let[o,s]of Object.entries(e.space))t.push(n(o,`${s}px`)+(i&&l[o]?` /* ${l[o]} */`:""));t.push(""," /* \u2500\u2500 type \u2014 four numbers per step, always together \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */");for(let[o,s]of Object.entries(e.text))t.push(n(`t-${o}`,`${s.size}px`)),t.push(n(`t-${o}-line`,String(s.line))),t.push(n(`t-${o}-weight`,String(s.weight))),t.push(n(`t-${o}-tracking`,`${s.tracking}px`));t.push(""," /* \u2500\u2500 table row: density reaches the surface it matters most on \u2500 */"),t.push(n("row-h",`${e.row.h}px`)),t.push(n("cell-x",`${e.row.padX}px`)),t.push(n("cell-y",`${e.row.padY}px`)),t.push(n("control-h",`${e.controlHeight}px`)+" /* how tall a control is DRAWN */"),t.push(n("target",`${e.targetFloor}px`)+" /* \u26D4 the FLOOR any target may shrink to \u2014 WCAG 2.2 \xA72.5.8 */"),t.push(n("touch",`${e.touchTarget}px`)+" /* how big a FINGER target must be */"),t.push(""," /* \u2500\u2500 radius \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */");for(let[o,s]of Object.entries(e.radius)){let h=o==="r"?"r":`r-${o}`;t.push(n(h,`${s}px`)+(i&&u[o]?` /* ${u[o]} */`:""))}t.push(""," /* \u2500\u2500 shadow, motion, type family \u2014 passed through \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */");for(let[o,s]of Object.entries(e.static))t.push(n(o,s));t.push(n("font",e.font.sans)),t.push(n("mono",e.font.mono)),g&&t.push("",g.replace(/^/gm," ").trimEnd()),t.push("}");for(let o of new Set([...r.densities??[],...r.densities?.length?[e.density]:[]])){t.push("",`/* density: ${o} \u2014 only what density governs. No --${c}-touch. */`),t.push(`${a}[data-density="${o}"] {`);for(let[s,h]of Object.entries($(o)))t.push(n(s,h));t.push("}")}return t.join(`
2
+ `)+`
3
+ `}function D(e,r="fos"){let a=w(e,{prefix:r});return[...new Set([...a.matchAll(new RegExp(`--${r}-([\\w-]+)\\s*:`,"g"))].map(c=>`--${r}-${c[1]}`))]}function L(e,r="fos"){let a=["/* GENERATED by @dqa-ai-solutions/ui-runtime \u2014 one class per type step, all four numbers. */"];for(let[c,i]of Object.entries(e.text))a.push(`.${r}-t-${c} {`,` font: ${i.weight} ${i.size}px/${i.line} var(--${r}-font);`,` letter-spacing: ${i.tracking}px;`,"}");return a.join(`
4
+ `)+`
5
+ `}export{k as a,y as b,S as c,O as d,d as e,p as f,x as g,T as h,R as i,l as j,E as k,A as l,I as m,u as n,N as o,_ as p,P as q,j as r,v as s,C as t,w as u,D as v,L as w};
@@ -0,0 +1 @@
1
+ var y=(e,s)=>!e?.length||e.some(n=>s.roles.includes(n)),b=e=>e.replace(/^\/+/,"").split("/")[0]??"";function k(e,s,n){let r=[],t=new Map(e.clusters.map(o=>[o.name,o])),i=new Map;for(let o of e.clusters)for(let a of o.items){if(a.path==null)continue;a.path.startsWith("/")||r.push({severity:"error",code:"CONTRACT_GAP",where:`${o.name}.${a.name}`,message:`"${a.path}" is not absolute. A relative menu path resolves differently depending on the page it is clicked from, which is a link that works until it does not.`});let p=i.get(a.path);p?r.push({severity:"error",code:"CONTRACT_GAP",where:`${o.name}.${a.name}`,message:`"${a.path}" is already claimed by "${p}". Two menu entries pointing at one screen means one of them is a name nobody can navigate back to.`}):i.set(a.path,`${o.name}.${a.name}`)}let l=b(n),f=e.domains.find(o=>o.name===l&&!o.crossDomain)??null;if(!f||!y(f.need,s))return{domain:null,clusters:[],active:null,entry:"launcher",diagnostics:r};let u=f.clusters?.length?f.clusters:e.clusters.map(o=>o.name);for(let o of u)t.has(o)||r.push({severity:"error",code:"CONTRACT_GAP",where:`domains.${f.name}`,message:`cluster "${o}" is listed but never declared, so a section of this domain has no way in and nothing says so.`});let m=u.map(o=>t.get(o)).filter(o=>o!=null).map(o=>({...o,items:o.items.filter(a=>y(a.need,s)).map(a=>({...a,state:a.path==null?"unbuilt":"ready"}))})).filter(o=>o.items.length>0),h="/"+n.replace(/^\/+/,"").split("/").slice(1).join("/"),c=null;for(let o of m)for(let a of o.items)a.path==null||!(a.end?h===a.path:h===a.path||h.startsWith(a.path+"/"))||(!c||a.path.length>(c.item.path?.length??0))&&(c={cluster:o.name,item:a});return{domain:f,clusters:m,active:c,entry:"domain",diagnostics:r}}var w=(e,s)=>`${e.replace(/\/$/,"")}/${s.replace(/^\//,"")}`,q=e=>e.clusters.flatMap(s=>s.items.flatMap(n=>{let r=n.path;if(r==null)return[];let t={path:r,item:n,cluster:s.name,child:!1,...n.need?{need:n.need}:{}},i=(n.under??[]).map(l=>{let f=l.need??n.need;return{path:w(r,l.path),item:n,cluster:s.name,child:!0,...f?{need:f}:{}}});return[t,...i]}));var d=()=>({seq:0,entries:{}});function T(e,s,n,r=200){if(e.at===n.key&&e.entries[n.key])return e;let t={...e.entries},i=t[n.key],l=e.at!==void 0?t[e.at]:void 0,f;s==="PUSH"?f=l?e.at:void 0:s==="REPLACE"?(f=l?.below,e.at!==void 0&&delete t[e.at]):f=i?.below;let u=e.seq+1;return t[n.key]={path:n.path,href:n.href,...i?.title!==void 0?{title:i.title}:{},...f!==void 0?{below:f}:{},seq:i?.seq??u},{at:n.key,seq:u,entries:A(t,r,n.key)}}function $(e,s,n){let r=e.entries[s];if(r?.title===n)return e;let t=e.seq+1;return{...e,seq:t,entries:{...e.entries,[s]:r?{...r,title:n}:{path:"",href:"",title:n,seq:t}}}}function g(e,s){if(s===void 0)return null;let n=e.entries[s];if(!n||!n.path)return null;let r=n;for(let t=1;t<=200;t++){let i=r.below!==void 0?e.entries[r.below]:void 0;if(!i||!i.path)return null;if(i.path!==n.path)return{kind:"history",steps:t,href:i.href,...i.title!==void 0?{title:i.title}:{}};r=i}return null}function O(e,s,...n){let r=g(e,s);if(r)return r;for(let t of n)if(t?.href)return{kind:"parent",href:t.href,...t.title!==void 0?{title:t.title}:{}};return null}function x(e){if(!e||typeof e!="object")return d();let s=e;if(typeof s.seq!="number"||!s.entries||typeof s.entries!="object")return d();let n={};for(let[r,t]of Object.entries(s.entries))t&&typeof t=="object"&&typeof t.path=="string"&&typeof t.href=="string"&&typeof t.seq=="number"&&(n[r]={path:t.path,href:t.href,seq:t.seq,...typeof t.title=="string"?{title:t.title}:{},...typeof t.below=="string"?{below:t.below}:{}});return{...typeof s.at=="string"?{at:s.at}:{},seq:s.seq,entries:n}}function A(e,s,n){let r=Object.keys(e).filter(i=>i!==n);if(r.length<s)return e;r.sort((i,l)=>e[i].seq-e[l].seq);let t={...e};for(let i of r.slice(0,r.length-(s-1)))delete t[i];return t}export{b as a,k as b,q as c,d,T as e,$ as f,g,O as h,x as i};
@@ -0,0 +1,3 @@
1
+ import{a as O,b as M,c as G,d as U,e as j,f as it,g as Y,h as B,i as ct,k as ht,m as K,o as W,p as L,q as ut,r as V,s as mt,t as lt}from"./chunk-66DQVLFK.js";var Q=t=>t*t*t;function X({l:t,c:o,h:r}){let i=r*Math.PI/180,c=o*Math.cos(i),m=o*Math.sin(i),p=Q(t+.3963377774*c+.2158037573*m),g=Q(t-.1055613458*c-.0638541728*m),l=Q(t-.0894841775*c-1.291485548*m);return{r:4.0767416621*p-3.3077115913*g+.2309699292*l,g:-1.2684380046*p+2.6097574011*g-.3413193965*l,b:-.0041960863*p-.7034186147*g+1.707614701*l}}var v=t=>{let o=t<0?-1:1,r=Math.abs(t);return o*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)},ft=.5/255,pt=({r:t,g:o,b:r})=>[t,o,r].every(i=>{let c=v(i);return c>=-ft&&c<=1+ft});function At(t){let o=X(t);if(pt(o))return{rgb:o,clipped:!1};let r=0,i=t.c;for(let c=0;c<20;c++){let m=(r+i)/2;pt(X({...t,c:m}))?r=m:i=m}return{rgb:X({...t,c:r}),clipped:r<t.c*.995}}var q=t=>Math.round(Math.min(1,Math.max(0,t))*255).toString(16).padStart(2,"0");function k(t){let{rgb:o,clipped:r}=At(t);return{hex:`#${q(v(o.r))}${q(v(o.g))}${q(v(o.b))}`,clipped:r}}var z=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function $(t){let o=parseInt(t.slice(1),16),r=z((o>>16&255)/255),i=z((o>>8&255)/255),c=z((o&255)/255);return .2126*r+.7152*i+.0722*c}function E(t,o){let r=$(t),i=$(o),[c,m]=r>i?[r,i]:[i,r];return(c+.05)/(m+.05)}function St(t){let o=parseInt(t.replace("#",""),16),r=y=>y<=.04045?y/12.92:Math.pow((y+.055)/1.055,2.4),i=r((o>>16&255)/255),c=r((o>>8&255)/255),m=r((o&255)/255),p=Math.cbrt(.4122214708*i+.5363325363*c+.0514459929*m),g=Math.cbrt(.2119034982*i+.6806995451*c+.1073969566*m),l=Math.cbrt(.0883024619*i+.2817188376*c+.6299787005*m),h=.2104542553*p+.793617785*g-.0040720468*l,b=1.9779984951*p-2.428592205*g+.4505937099*l,u=.0259040371*p+.7827717662*g-.808675766*l,s=Math.atan2(u,b)*180/Math.PI;return{l:h,c:Math.hypot(b,u),h:s<0?s+360:s}}var Ot=["bg","surface","surface-2"],J=["ink","ink-2","ink-3"],T=4.5,gt=new Set(["scheme","primary","grey","flair","tint","contrast","density","radius","font","tones","chart","text"]),w=(t,o)=>typeof t=="number"?{hue:t,chroma:o,l:void 0}:{hue:t.hue,chroma:t.chroma??o,l:"l"in t?t.l:void 0},Z=(t,o,r)=>Math.min(.99,Math.max(.02,o+(t-o)*r));function wt(t,o,r,i,c){if(t==null||t==="normal")return 1;if(t==="high")return 1.25;if(typeof t=="number")return t;let m=M[o],p=(s,y)=>k({l:s,c:r*y,h:i}).hex,g=p(m.bg,O[o].bg),l=t.on??"all",h=l==="all"?J:[l],b=s=>Math.min(...h.map(y=>E(p(Z(m[y],m.bg,s),O[o][y]),g))),u=1.6;for(let s=1;s<=u;s+=.01)if(b(s)>=t.min)return s;return c("warn","CONTRAST_UNREACHABLE","contrast.min",`${t.min}:1 on "${l}" is beyond what this ladder reaches \u2014 it tops out at ${b(u).toFixed(2)}:1 before the ink runs out of room. Pushed as far as it goes.`),u}function It(t){let o=[],r=(e,n,a,f)=>o.push({severity:e,code:n,where:a,message:f});for(let e of Object.keys(t))gt.has(e)||r("error","UNKNOWN_KEY",e,`"${e}" is not in the theme vocabulary. Taking it and ignoring it would leave a declaration that looks answered and a screen that is not. Known keys: ${[...gt].join(", ")}.`);let i=t.scheme??"light",c=M[i],m=t.tint??.003,p=t.grey!=null?typeof t.grey=="number"?t.grey:t.grey.hue:w(t.primary,.172).hue,g=wt(t.contrast,i,m,p,r),l=t.tint??.003;(l<0||l>.02)&&r("warn","OUT_OF_RANGE","tint",`tint ${l} is outside 0\u20130.02. Past that the greys stop reading as greys \u2014 each rung is tinted by its own multiple of this number, and ink carries seven times the page ground.`);let h=w(t.primary,.172),b=!1,u=(e,n,a=!1)=>{let{hex:f,clipped:d}=k(e);return d&&!a&&!b&&(b=!0,r("warn","CHROMA_CLIPPED",n,`chroma ${e.c} at lightness ${e.l.toFixed(2)} is outside sRGB and was reduced to fit. Hue and lightness are unchanged \u2014 the colour is duller than asked, not different.`)),f},s={},y=t.grey!=null?w(t.grey,l):{hue:h.hue,chroma:l};for(let[e,n]of Object.entries(O[i])){let a=c[e],f=J.includes(e)||e.startsWith("line")?Z(a,c.bg,g):a;s[e]=u({l:f,c:l*n,h:y.hue},e)}let I=h.l??c.accent;s.primary=u({l:I,c:h.chroma,h:h.hue},"primary"),s["primary-bg"]=u({l:c.accentBg,c:h.chroma*.093,h:h.hue},"primary-bg"),s.steel=u({l:I+.013,c:h.chroma*.69,h:h.hue},"steel"),s["accent-hover"]=u({l:I+.07,c:h.chroma,h:h.hue},"accent-hover"),s["accent-press"]=u({l:I-.05,c:h.chroma,h:h.hue},"accent-press"),s.focus=s.primary;let tt=(e,n)=>{let a=parseInt(s.ink.replace("#",""),16);return`rgb(${a>>16&255} ${a>>8&255} ${a&255} / ${e})`},dt=i==="dark"?.09:.05,yt=i==="dark"?.16:.1;s.hover=tt(dt,"hover"),s.press=tt(yt,"press");let et=u({l:.99,c:.004,h:h.hue},"primary-contrast"),nt=u({l:.2,c:.02,h:h.hue},"primary-contrast"),ot=E(et,s.primary)>=E(nt,s.primary)?et:nt;s["primary-contrast"]=ot;let rt=E(ot,s.primary);rt<T&&r("error","PRIMARY_UNREADABLE","primary",`no label reaches WCAG AA on this primary \u2014 the best available is ${rt.toFixed(2)}:1 and it needs ${T}:1. Lower the chroma, or move the hue out of yellow-green where sRGB runs out of dark room.`);let C=(t.flair??[]).map((e,n)=>{let a=w(e,.15),f=typeof e=="object"&&e.l!=null?e.l:i==="light"?.755:.7,d=u({l:f,c:a.chroma,h:a.hue},`flair[${n}]`);return s[n===0?"accent":`accent-${n+1}`]=d,d});C.length>=2&&(s["gradient-brand"]=`linear-gradient(135deg, ${s.primary} 0%, ${C[0]} 55%, ${C[1]} 100%)`);let H={};for(let[e,n]of Object.entries(G)){let a=t.tones?.[e];H[e]=a?w(a,n.chroma):n}for(let[e,n]of Object.entries(H)){let a=u({l:c.toneGround,c:n.chroma*.16,h:n.hue},`tones.${e}`,!0),f=u({l:Z(c.toneInk,c.bg,g),c:n.chroma,h:n.hue},`tones.${e}`);s[`tone-${e}`]=f,s[`tone-${e}-bg`]=a;let d=U[e];d&&(s[d]=f,s[`${d}-bg`]=a);let N=E(f,a);N<T&&r("error","CONTRAST_FAIL",`tones.${e}`,`the "${e}" badge is ${N.toFixed(2)}:1 on its own ground, needs ${T}:1. A state badge is the one place a user reads a single word and acts on it.`)}let A=Object.entries(H).filter(([e])=>e!=="plain");for(let e=0;e<A.length;e++)for(let n=e+1;n<A.length;n++){let[a,f]=A[e],[d,N]=A[n],st=Math.abs(f.hue-N.hue)%360,at=Math.min(st,360-st);at<20&&r("warn","TONE_COLLISION",`tones.${a}/${d}`,`"${a}" and "${d}" are ${at.toFixed(0)}\xB0 apart \u2014 close enough that the two badges read as the same state. Tones carry meaning; keep them at least 20\xB0 apart.`)}for(let[e,n]of A){let a=Math.abs(h.hue-n.hue)%360,f=Math.min(a,360-a);f<20&&r("warn","PRIMARY_TONE_COLLISION",`primary/${e}`,`the action colour and the "${e}" state are ${f.toFixed(0)}\xB0 apart. A button and a badge differ in shape and place, so this is reportable rather than wrong \u2014 but if the identity colour is not deliberate here, one of the two is saying the wrong thing.`)}let R=t.chart?.series??6;R>V&&r("warn","SERIES_TOO_MANY","chart.series",`${R} categories asked for; past ${V} the reader is matching swatches to a legend rather than reading a chart. No palette fixes that \u2014 group the tail into "other".`);let P=ut[i],bt=(t.chart?.avoid??[]).map(e=>({from:(e.from%360+360)%360,to:(e.to%360+360)%360,full:Math.abs(e.to-e.from)>=360})),Et=e=>bt.some(n=>n.full||(n.from<=n.to?e>=n.from&&e<=n.to:e>=n.from||e<=n.to)),_=[];for(let e=0;e<360;e+=.5)Et((h.hue+e)%360)||_.push((h.hue+e)%360);_.length===0&&r("warn","SERIES_INDISTINCT","chart.avoid","the reserved arcs cover the whole wheel, so no series hue is left. Ignoring them.");let D=_.length?_:Array.from({length:720},(e,n)=>(h.hue+n*.5)%360),S=[];for(let e=0;e<R;e++){let n=D[Math.round(e*D.length/Math.max(R,3))%D.length];S.push(u({l:e%2?P.hi:P.lo,c:P.chroma,h:n},`series[${e}]`,!0))}for(let e=1;e<S.length;e++)Math.abs($(S[e])-$(S[e-1]))<mt*.35&&r("warn","SERIES_INDISTINCT",`series[${e-1}/${e}]`,`series ${e} and ${e+1} are separable by hue alone. Roughly one man in twelve cannot use that difference, and nothing on the chart says so.`);let F=t.chart?.levels??5,x=lt[i],$t=t.chart?.levelHue??h.hue,Tt=Array.from({length:F},(e,n)=>{let a=F===1?0:n/(F-1);return u({l:x.from+(x.to-x.from)*a,c:x.chroma,h:$t},`levels[${n}]`,!0)});for(let e of J)for(let n of Ot){let a=E(s[e],s[n]);a<T&&r("error","CONTRAST_FAIL",e,`${e} on ${n} is ${a.toFixed(2)}:1, needs ${T}:1.`)}return{theme:{scheme:i,colors:s,density:t.density??"cosy",space:j[t.density??"cosy"],row:{...it[t.density??"cosy"]},controlHeight:Y[t.density??"cosy"],targetFloor:B,touchTarget:ct,radius:K[t.radius??"soft"],text:ht(t.text?.base),series:S,levels:Tt,font:{sans:t.font?.sans??L.sans,mono:t.font?.mono??L.mono},static:{...W}},diagnostics:o,ok:!o.some(e=>e.severity==="error")}}function Rt(t){return t.length?t.map(o=>`${o.severity==="error"?"\u26D4":"\u26A0\uFE0F "} [${o.code}] ${o.where}
2
+ ${o.message}`).join(`
3
+ `):""}var _t={scheme:"light",primary:{hue:259.7,chroma:.172},flair:[{hue:231.6,chroma:.1534,l:.755},{hue:196.6,chroma:.1314,l:.772}],tint:.003,density:"cosy",radius:"soft"};export{k as a,$ as b,E as c,St as d,It as e,Rt as f,_t as g};
@@ -0,0 +1,3 @@
1
+ import{b as N,f as K}from"./chunk-5NTG4J62.js";function Y(e){let{locale:t,currency:n,timeZone:s}=e,i=new Intl.NumberFormat(t),o=new Intl.NumberFormat(t,{style:"currency",currency:n}),a=new Intl.NumberFormat(t,{style:"percent",maximumFractionDigits:1}),r=new Intl.DateTimeFormat(t,{day:"2-digit",month:"2-digit",year:"numeric",...s?{timeZone:s}:{}}),d=new Intl.DateTimeFormat(t,{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",...s?{timeZone:s}:{}}),p=f=>f instanceof Date?f:new Date(f);return{decl:e,number:f=>i.format(f),currency:f=>o.format(f),percent:f=>a.format(f/100),date:f=>Number.isNaN(+p(f))?String(f):r.format(p(f)),datetime:f=>Number.isNaN(+p(f))?String(f):d.format(p(f))}}var D=120;function A(e,t,n){if(n==null)return"";if(t.meaning==="currency"&&typeof n=="number")return e.currency(n);if(t.meaning==="percent"&&typeof n=="number")return e.percent(n);switch(t.kind){case"date":return e.date(n);case"datetime":return e.datetime(n);case"number":return typeof n=="number"?e.number(n):String(n);case"text[]":return Array.isArray(n)?n.join(", "):String(n);default:return t.numeric&&typeof n=="number"?e.number(n):String(n)}}var O=Symbol("the read layer never produced this key");function x(e,t){let n=e.data;return n&&t in n?n[t]:t in e?e[t]:O}function ee(e){let t=e.data,{data:n,...s}=e;return t?{...s,...t}:s}var U=e=>{let t=new Set(e);return{has:n=>t.has(n),names:()=>[...t]}},te=U([]);function ne(e,t){if(t.kind!=="derived"){let s=x(e,t.key);return s===O?void 0:s}if(t.derived&&!(t.key in e))return O;let n=e[t.key];return n==null?null:t.derived?.kind==="linked"?n[t.derived.show]:n}function k(e,t,n){if(t.widget)return n.blocks.has(t.widget)?{kind:"block",field:t,widget:t.widget}:{kind:"missing-block",field:t,widget:t.widget,message:`"${t.label}" names the block "${t.widget}", which this renderer does not publish. Register it, or the column is blank with nothing to notice.`};let s=ne(e,t);if(s===O){let r=t.derived&&"via"in t.derived?t.derived.via:void 0;return{kind:"unwired",field:t,message:`the row carries no "${t.key}" key`+(r?`, so the join through "${r}" never ran`:"")+". The ontology name and the read layer's key must be the same word."}}if(s==null||s==="")return{kind:"blank",field:t};if(t.enum?.length){let r=t.enum.find(d=>d.value===s);return r&&!n.plain?{kind:"tone",field:t,value:String(s),label:r.label,tone:r.tone??"plain"}:{kind:"text",field:t,text:r?r.label:String(s),numeric:!1,long:!1}}let i=t.derived?.kind==="linked"?e[t.key]:null,o=i&&typeof i=="object"?i.id:void 0;if(t.refEntity&&typeof o=="string")return{kind:"link",field:t,text:A(n.format,t,s),to:{entity:t.refEntity,id:o}};let a=A(n.format,t,s);return{kind:"text",field:t,text:a,numeric:!!t.numeric||t.kind==="number",long:a.length>D}}var _=e=>e.filter(t=>t.kind==="unwired"||t.kind==="missing-block");var oe=e=>e.filter(t=>t.severity==="error");function se(e){return e.length?e.map(t=>`${t.severity==="error"?"\u26D4":"\u26A0\uFE0F "} [${t.code}] ${t.where}
2
+ ${t.message}`).join(`
3
+ `):""}function j(e,t={}){let n=e.list,s=n?.columns??[],i={primary:0,normal:1,extra:2},o=[...s].sort((u,g)=>i[u.priority??"normal"]-i[g.priority??"normal"]),a=Math.max(1,t.maxColumns??7),r=n?.main?.key??null,d=new Set(t.hiddenByDefault??[]),p=new Set(o.filter(u=>u.key===r||!d.has(u.key)).slice(0,a).map(u=>u.key));r&&p.add(r);let f=t.visibility??{},y=o.map(u=>{let g=u.key===r,$=f[u.key];return{key:u.key,label:u.label,shown:g||(typeof $=="boolean"?$:p.has(u.key)),locked:g,hiddenByDefault:!p.has(u.key)}}),b=y.some(u=>!u.locked&&u.shown===u.hiddenByDefault),h=new Set(y.filter(u=>u.shown).map(u=>u.key)),c=n?.sort??[],m={};for(let u of o){let g=c.find($=>$.by===u.key);m[u.key]=u.sortable===!1?"none":g?g.dir==="desc"?"descending":"ascending":"none"}return{columns:o.filter(u=>h.has(u.key)),extraColumns:o.filter(u=>!h.has(u.key)),choices:y,customised:b,rowHeaderKey:r,sortState:m}}function re(e,t,n={}){let s=n.as==="queue"?[e.row?.main?.key,e.list?.main?.key]:[e.list?.main?.key,e.row?.main?.key];for(let i of s){if(!i)continue;let o=x(t,i);if(!(o===O||o==null||o===""))return{key:i,text:String(o)}}return null}var ae=(e,t)=>typeof e.id=="string"?e.id:String(e.id??t);function ie(e,t){let n=[...e.list?.columns??[],...e.list?.main?[e.list.main]:[],...e.list?.sub?[e.list.sub]:[],...e.detail?.facts??[],...e.row?[e.row.main,e.row.sub,e.row.badge]:[]].filter(o=>o!=null&&o.kind==="derived"&&o.derived!=null),s=new Set,i=[];for(let o of n){if(s.has(o.key)||(s.add(o.key),o.key in t))continue;let a=o.derived&&"via"in o.derived?o.derived.via:void 0;i.push({key:o.key,label:o.label,...a?{via:a}:{}})}return i}function le(e,t){let{contract:n,rows:s,empty:i}=e,o=n.list,a=o?.columns??[],r=[],d=j(n,{maxColumns:e.maxColumns,visibility:e.visibility,hiddenByDefault:e.hiddenByDefault}),p=d.columns,f=s==null?null:{...d,search:o?.search??[],sort:o?.sort??[],rows:s.map((b,h)=>{for(let m of ie(n,b))r.some(g=>g.message.includes(`"${m.key}"`))||r.push({kind:"missing-key",message:`"${n.entity}" promises the derived property "${m.key}"`+(m.via?` through "${m.via}"`:"")+", but the rows do not carry it. The column is blank for a reason no user can see."});let c=p.map(m=>k(b,m,t));return{id:ae(b,h),main:o?.main?k(b,o.main,t):null,sub:o?.sub?k(b,o.sub,{...t,plain:!0}):null,cells:c}})};for(let b of f?.rows??[])for(let h of _(ce(b)))h.kind==="missing-block"&&(r.some(c=>c.message.includes(`"${h.widget}"`))||r.push({kind:"missing-key",message:h.message}));let y=e.total??s?.length;return{state:N({forbidden:e.forbidden,error:e.error,loading:e.loading,data:f,count:y,narrowed:e.narrowed,faults:r,empty:i,surface:"table"}),faults:r}}var ce=e=>[...e.cells,...e.main?[e.main]:[],...e.sub?[e.sub]:[]];var de=e=>!!e.typeClasses?.multiline||!!e.typeClasses?.paragraph;function ue(e){if(e.enum?.length)return"select";switch(e.kind){case"text":return de(e)?"textarea":"text";case"number":return"number";case"date":return"date";case"datetime":return"datetime";case"text[]":return"tags";case"file":return"file";case"uuid":return e.many?"refs":"ref";default:return"unrenderable"}}function me(e,t){let n=[];e.widget&&!t.has(e.widget)&&n.push({severity:"error",code:"UNKNOWN_BLOCK",where:`action.${e.action}`,message:`step "${e.label}" names the form "${e.widget}", which this renderer does not publish. The step would open an empty dialog.`});let s=[],i=[],o=[],a=e.task?.filledBy;for(let r of e.fields){if(r.fixed!=null){s.push({field:r,value:r.fixed});continue}let d=a?.[r.key];if(d==="system"){o.push(r);continue}let p=ue(r);p==="unrenderable"&&!e.widget&&n.push({severity:"error",code:"UNRENDERABLE_FIELD",where:`action.${e.action}.${r.key}`,message:`no control can be generated for "${r.label}" (type ${r.kind}). Declare \`widgets: { action.${e.action}: <name> }\` and write the form, or the step refuses in front of whoever is taking it.`}),i.push({field:r,control:p,required:!!r.required,...r.refEntity?{refEntity:r.refEntity}:{},...d==="interaction"||d==="suggested"?{entry:d}:{}})}return{action:e.action,label:e.label,...e.widget?{widget:e.widget}:{},fields:i,settled:s,...o.length?{bySoftware:o}:{},diagnostics:n}}var M=(e,t)=>e.actions.filter(n=>t==null?n.from.length===0:n.from.includes(t));function L(e,t={}){let n=[],s=e.map(o=>{let a=t[o.action]??{},r=a.outcome??o.outcome;return{key:o.action,label:o.label,advances:o.to!=null,...r?{outcome:r}:{},...a.exits?{exits:!0}:{},...a.destroys?{destroys:!0}:{},...o.provisional?{provisional:o.provisional}:{}}}),i=s.filter(o=>o.advances&&!o.outcome);return i.length>1&&n.push({severity:"warn",code:"CONTRACT_GAP",where:"actions",message:`${i.length} steps advance the record and none declares \`decision.outcome\`, so no button can be the primary one. If one of them IS the approval, say so in the process; otherwise the screen must still name one (\`primary: true\`) \u2014 a flat screen is not an answer (ruled 26/9/2026: "tr\xEAn 1 m\xE0n h\xECnh lu\xF4n ph\u1EA3i define button n\xE0o l\xE0 ch\xEDnh").`}),{facts:s,diagnostics:n}}var I=e=>K(e);var fe={name:"main",label:""},he=(e,t)=>{if(!e.stateProperty)return null;let n=x(t,e.stateProperty);return typeof n=="string"?n:null};function pe(e,t){let{contract:n,record:s,layout:i,empty:o}=e,a=[],r=[],d=n.detail?.facts??[],p=new Map(d.map(y=>[y.key,y])),f=null;if(s!=null){let y=he(n,s),b=n.row?.main??n.list?.main??null,h=b?k(s,b,t):null,c=h?.kind==="text"?h.text:null;b||a.push({severity:"error",code:"NO_TITLE",where:n.entity,message:"no property is marked `keys: title`, so this record has no name to show at the top of its own page. Every other screen that lists it has the same problem."});let m=n.row?.badge??(n.stateProperty?p.get(n.stateProperty):void 0)??null,u=m?k(s,m,t):null,g=n.states?.find(l=>l.name===y)?.hint,$=i?.sections??[],C=$.filter(l=>!l.when||y!=null&&l.when.includes(y)),R=new Set(C.flatMap(l=>l.facts??[]));for(let l of $){for(let w of l.facts??[])p.has(w)||a.push({severity:"error",code:"UNKNOWN_FACT",where:`sections.${l.name}`,message:`"${w}" is not among the facts this contract carries. Either the ontology never declared it, or \`detail.facts\` does not list it \u2014 the section would simply be short one row, with nothing to notice.`});l.facts?.length&&l.block&&a.push({severity:"error",code:"UNKNOWN_BLOCK",where:`sections.${l.name}`,message:"a section draws facts or a block, never both \u2014 pick one."})}let T=d.filter(l=>!R.has(l.key));$.length&&T.length&&a.push({severity:"warn",code:"ORPHAN_FACTS",where:n.entity,message:`${T.length} declared fact(s) belong to no section and were appended at the end: ${T.map(l=>l.key).join(", ")}. Place them, or drop them from \`detail.facts\`.`});let q=$.length?[...C,...T.length?[{name:"_rest",facts:T.map(l=>l.key)}]:[]]:[{name:"main",facts:d.map(l=>l.key)}],W=l=>l.block?t.blocks.has(l.block)?{kind:"block",name:l.name,...l.label?{label:l.label}:{},widget:l.block}:{kind:"missing-block",name:l.name,widget:l.block,message:`section "${l.name}" names the block "${l.block}", which this renderer does not publish. The section would be an empty heading.`}:{kind:"facts",name:l.name,...l.label?{label:l.label}:{},facts:(l.facts??[]).map(w=>p.get(w)).filter(w=>w!=null).map(w=>({field:w,cell:k(s,w,t)}))},H=(n.detail?.related??[]).filter(l=>!l.when||y!=null&&l.when.includes(y)).map(l=>{let w=e.related?.[l.name];w==null&&a.push({severity:"error",code:"MISSING_ROWS",where:`detail.related.${l.name}`,message:`"${l.name}" is declared but the app supplied no rows for it. A section drawn empty is indistinguishable from one that genuinely has nothing \u2014 so it is reported here instead, and the process should refuse to start.`});let E=l.columns.find(S=>S.priority==="primary")??l.columns[0]??null;return{kind:"related",name:l.name,label:l.label,entity:l.entity,columns:l.columns,rowHeaderKey:E?.key??null,rows:(w??[]).map((S,z)=>({id:typeof S.id=="string"?S.id:String(S.id??z),cells:l.columns.map(Q=>k(S,Q,t))}))}}),B=i?.tabs?.length?i.tabs:[fe],F=B.map(l=>({name:l.name,label:l.label,parts:[...q.filter(w=>(w.tab??B[0].name)===l.name).map(W),...l.name===B[0].name?H:[]]})).filter((l,w)=>w===0||l.parts.length>0);for(let l of F)for(let w of l.parts)if(w.kind==="missing-block"&&a.push({severity:"error",code:"UNKNOWN_BLOCK",where:`sections.${w.name}`,message:w.message}),w.kind==="facts")for(let{cell:E}of w.facts)E.kind==="unwired"&&r.push({kind:"missing-key",message:E.message});let X=M(n,y),{facts:J,diagnostics:Z}=L(X,e.hints);a.push(...Z),f={title:c,badge:u,...g?{hint:g}:{},state:y,tabs:F,actions:I(J)}}return{state:N({forbidden:e.forbidden,error:e.error,loading:e.loading,data:f,count:s==null?0:1,faults:r,empty:o,surface:"record"}),diagnostics:a,faults:r}}function ge(e,t){let n=[],s=[],i=new Set,o=e.items?.flatMap(({entity:a,record:r},d)=>{let p=e.contracts[a];if(!p)return i.has(a)||(i.add(a),n.push({severity:"error",code:"NO_TITLE",where:a,message:`the queue holds "${a}" records and no view contract was supplied for it. They cannot be named, so they are dropped rather than listed as blanks.`})),[];let f=p.row?.main??p.list?.main;if(!f)return i.has(a)||(i.add(a),n.push({severity:"error",code:"NO_TITLE",where:a,message:`nothing says what a "${a}" is called, so a queue row for it would be an id. Mark a property \`keys: title\`, or declare \`row.main\`.`})),[];let y=p.row?.sub??null,b=p.row?.badge??null,h={id:typeof r.id=="string"?r.id:String(r.id??d),entity:a,main:k(r,f,{...t,plain:!0}),sub:y?k(r,y,{...t,plain:!0}):null,badge:b?k(r,b,t):null};for(let c of[h.main,h.sub,h.badge])c?.kind==="unwired"&&s.push({kind:"missing-key",message:c.message});return[h]})??null;return{state:N({forbidden:e.forbidden,error:e.error,loading:e.loading,data:o,count:o?.length,narrowed:e.narrowed,faults:s,empty:e.empty,surface:"list"}),diagnostics:n,faults:s}}function ye(e,t){let{contract:n,process:s}=e,i=n.lines?.length?n.lines:n.states?.length?[{process:"",stateProperty:n.stateProperty??"status",states:n.states}]:[];if(!i.length)return t.push({severity:"error",code:"CONTRACT_GAP",where:n.entity,message:`"${n.entity}" declares no states, so it has no route to draw. Either it has no lifecycle \u2014 in which case no screen should ask for one \u2014 or its process was not loaded.`}),null;if(!s&&i.length>1)return t.push({severity:"error",code:"AMBIGUOUS_LINE",where:n.entity,message:`"${n.entity}" runs ${i.length} lines (${i.map(d=>d.process).join(", ")}) and no \`process\` was given. Drawing them end to end would assert an order none of them declares, so nothing is drawn: pass the line the record is on.`}),null;let o=s?i.find(d=>d.process===s):i[0];if(!o)return t.push({severity:"error",code:"AMBIGUOUS_LINE",where:`${n.entity}.${s}`,message:`"${s}" is not a line of "${n.entity}". It declares ${i.map(d=>d.process).join(", ")||"none"}.`}),null;let r=n.actions.some(d=>d.process)?n.actions.filter(d=>d.process===o.process):n.actions;return{line:o,steps:r}}function be(e,t,n){let s=[];for(let o of e)for(let a of o.waitsOn??[])a.kind==="decision"&&!s.includes(a.via)&&s.push(a.via);let i=new Map;for(let o of s){let a=e.filter(d=>d.settles===o&&d.outcome==="approve");if(!a.length){n.push({severity:"warn",code:"UNPLACED_GATE",where:o,message:`steps wait on "${o}" and no step declares \`decision: { via: "${o}", outcome: approve }\`. The wait cannot be named without inventing a word for it, so it is left off the route \u2014 it is still on those steps' \`waitsOn\`. Mark the granting step's outcome in the process.`});continue}let r=a.flatMap(d=>d.from).map(d=>t.get(d)).filter(d=>d!=null);if(!r.length){n.push({severity:"warn",code:"UNPLACED_GATE",where:o,message:`"${o}" is opened by ${a.map(d=>`"${d.action}"`).join(", ")}, which departs from no state on this line. It has no place on the route and is left off.`});continue}i.set(o,{via:o,label:a[0].label,roles:[...new Set(a.map(d=>d.role))],after:Math.min(...r)})}return i}function we(e){let t=[],n=ye(e,t);if(!n)return{milestones:[],returns:[],diagnostics:t};let{line:s,steps:i}=n,o=new Map(s.states.map((c,m)=>[c.name,m])),a=new Set;for(let c of i)for(let m of[...c.from,...c.to?[c.to]:[]])o.has(m)||a.add(m);for(let c of a)t.push({severity:"error",code:"UNKNOWN_STATE",where:`${e.contract.entity}.${s.process||"line"}`,message:`a step names the state "${c}", which this line does not declare. Either the state is missing from the process, or the record belongs to a different line.`});let r=e.state==null?-1:o.get(e.state)??null;if(r===null)return t.push({severity:"error",code:"UNKNOWN_STATE",where:`${e.contract.entity}.${s.process||"line"}`,message:`the record is in "${e.state}", which is not a state of this line (${s.states.map(c=>c.name).join(", ")}). Nothing is drawn rather than drawing it as not yet started.`}),{milestones:[],returns:[],diagnostics:t};let d=new Map;for(let c of i){if(!c.to)continue;let m=o.get(c.to);if(m==null)continue;let u=c.from.map(g=>o.get(g)).filter(g=>g!=null&&g<m);c.from.length&&!u.length||d.set(c.to,[...d.get(c.to)??[],c])}let p=c=>[...new Set((d.get(c)??[]).map(m=>m.role))],f=c=>{let m=[...new Set((d.get(c)??[]).map(u=>u.label))];return m.length===1?m[0]:null},y=be(i,o,t),b=[];s.states.forEach((c,m)=>{b.push({kind:"state",key:c.name,label:f(c.name)??c.label,stateLabel:c.label,...c.hint?{hint:c.hint}:{},...c.tone?{tone:c.tone}:{},standing:m<r?"past":m===r?"current":"ahead",roles:p(c.name)});for(let u of y.values()){if(u.after!==m)continue;let g=e.settled?.[u.via];b.push({kind:"gate",key:u.via,label:u.label,standing:r>m||g?"past":"ahead",roles:u.roles,...g?{verdict:g}:{},...r===m&&!g?{awaiting:!0}:{}})}});let h=i.flatMap(c=>{if(!c.to)return[];let m=o.get(c.to),u=c.from.map(g=>o.get(g)).filter(g=>g!=null);return m==null||!u.length||m>=Math.min(...u)?[]:[{action:c.action,label:c.label,role:c.role,from:c.from,to:c.to}]});return{milestones:b,returns:h,diagnostics:t}}function ke(e,t){let n=[],s=new Set,i=e.events?.map(a=>{let r=e.vocabulary[a.event];return!r&&!s.has(a.event)&&(s.add(a.event),n.push({severity:"error",code:"UNLABELLED_EVENT",where:a.event,message:`"${a.event}" has no wording, so the timeline would print the machine name. Every event a record can record needs a sentence a person can read.`})),{event:a.event,label:r??a.event,at:a.at,when:t.datetime(a.at),...a.actor?{actor:a.actor}:{},...a.detail?{detail:a.detail}:{},unlabelled:!r}})??null,o=i?i.map((a,r)=>({e:a,i:r})).sort((a,r)=>+new Date(r.e.at)-+new Date(a.e.at)||a.i-r.i).map(({e:a})=>a):null;return{state:N({loading:e.loading,error:e.error,data:o,count:o?.length,empty:e.empty,surface:"list"}),diagnostics:n}}var v=e=>({determined:!1,why:e}),P=e=>typeof e=="object"&&e!==null&&typeof e.rows=="string";function G(e){let t=e.task,n=`"${e.label||e.action}"`;if(!t)return v(`nobody has said how ${n} is done`);if(!t.category)return v(`nobody has said who does ${n}`);if(t.category==="system")return{determined:!0,value:{surface:"none"}};let s=t.iteration;if(s===void 0)return v(`nobody has said whether ${n} is done on one record or many`);if(s!=="single"&&s!=="records"&&!P(s))return v(`${n} repeats over ${JSON.stringify(s)}, which is not a pattern`);if(t.reads===void 0)return v(`nobody has said what the person must see to do ${n}`);let i=e.fields.filter(h=>h.fixed==null).map(h=>h.key),o=t.filledBy,a=o?Object.keys(o):i;if(!o&&(i.length||t.category==="user"))return v(`nobody has said who puts in what ${n} records`);let r=o??{},d=i.find(h=>!(h in r));if(d)return v(`nobody has said who puts in "${d}" at ${n}`);let p=Object.entries(r).find(([h,c])=>c!=="system"&&!i.includes(h));if(p)return v(`"${p[0]}" is to be put in by a person at ${n}, but the step does not take it`);if(P(s)&&!a.includes(s.rows))return v(`${n} repeats over lines of "${s.rows}", which it does not record`);let f=i.filter(h=>r[h]==="interaction"),y=i.filter(h=>r[h]==="suggested"),b=f.length||y.length?"fields":"none";if(t.category==="user"){if(!a.length)return v(`${n} happens away from the software and nothing of it is recorded`);if(!t.leaves)return v(`nobody has said what ${n} leaves behind \u2014 a signed paper, or only a result`);t.leaves==="document"&&(b="document")}return{determined:!0,value:{surface:"action",review:t.reads,input:b,typed:f,suggested:y,over:s}}}function V(e,t,n){let s=e.lines?.find(o=>o.process===t);if(!s)return v(`"${e.entity}" has no line "${t}"`);let i=s.readers?.[n];return i?{determined:!0,value:i}:v(`nobody has said who else may see a record at "${n}"`)}function ve(e){let t=[];for(let n of e.actions){let s=G(n);s.determined||t.push({at:`${n.process}.step:${n.action}`,why:s.why})}for(let n of e.lines??[])for(let s of n.states){let i=V(e,n.process,s.name);i.determined||t.push({at:`${n.process}.state:${s.name}`,why:i.why})}return t}export{Y as a,D as b,A as c,O as d,x as e,ee as f,U as g,te as h,k as i,_ as j,oe as k,se as l,j as m,re as n,le as o,me as p,M as q,L as r,I as s,pe as t,ge as u,we as v,ke as w,G as x,V as y,ve as z};
@@ -0,0 +1 @@
1
+ export * from './_types/ui-kit/index.js';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{a as o,b as r,c as e,d as f,e as l,f as n,g as v}from"./chunks/chunk-JOIDPECM.js";import{a as T,b as U,c as V,d as W,e as X,f as Y,g as Z,h as _,i as $,j as oo,k as ro,l as eo,m as fo,n as mo,o as po,p as to,q as xo,r as ao,s as bo,t as co,u as go,v as ho,w as io,x as jo,y as ko,z as lo}from"./chunks/chunk-MS2W22ER.js";import{a as no,b as qo,c as so,d as uo,e as vo,f as wo,g as yo,h as zo,i as Ao}from"./chunks/chunk-7WHYHIUX.js";import{a as w,b as y,c as z,d as A,e as B,f as C,g as D,h as E,i as F,j as G,k as H,l as I,m as J,n as K,o as L,p as M,q as N,r as O,s as P,t as Q,u as R,v as S}from"./chunks/chunk-5NTG4J62.js";import{a as m,b as p,c as t,d as x,e as a,g as b,h as c,j as d,l as g,m as h,n as i,o as j,p as k,u as q,v as s,w as u}from"./chunks/chunk-66DQVLFK.js";export{W as ABSENT,b as CONTROL,v as DQA_THEME,k as FONT,m as GREY_TINT,p as LADDER,U as LONG_TEXT,_ as NO_BLOCKS,h as RADIUS,i as RADIUS_PURPOSE,a as SPACE,d as SPACE_PURPOSE,j as STATIC,N as SURFACES,c as TARGET_FLOOR,g as TEXT,O as TEXT_ROLES,G as TIER_PAINT,x as TONE_ALIAS,t as TONE_HUE,D as VISIBLE_SECONDARY,F as actionBar,bo as actionButtons,ao as actionFacts,to as actionForm,C as actionViews,A as assertNever,xo as availableActions,yo as backOf,I as buttonSpec,$ as cellOf,e as contrast,oo as defectsOf,no as domainOf,Q as emitBaseCss,P as emitComponentCss,q as emitCss,R as emitLayoutCss,S as emitStylesheet,u as emitTypeUtilities,uo as emptyTrail,ro as errorsIn,J as fieldSpec,Y as fieldsOf,eo as formatLensDiagnostics,n as formatThemeDiagnostics,T as formatter,f as fromHex,E as inSightCount,po as listModel,r as luminance,z as matchState,M as menuItemSpec,ho as milestoneModel,vo as moveTrail,qo as navModel,Ao as parseTrail,fo as planColumns,jo as presentationOf,B as primaryOf,go as queueModel,X as readValue,ko as readersOf,co as recordModel,Z as registryOf,l as resolveTheme,zo as returnOf,so as routesOf,w as skeletonFor,mo as subjectOf,y as surfaceState,K as tabSpec,L as tableSpec,H as textSpec,io as timelineModel,wo as titleTrail,o as toHex,s as tokenNames,lo as undeterminedIn,V as writeValue};