@appsolutely-io/waypoint 0.0.0-stage → 0.1.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +260 -2
  3. package/dist/block-reply-DN4RiLL0.d.cts +169 -0
  4. package/dist/block-reply-Dtof9ild.d.ts +169 -0
  5. package/dist/blocks-25YOJ5SS.cjs +1 -0
  6. package/dist/blocks-UJ7GUJHD.js +1 -0
  7. package/dist/chunk-3KV7TDDR.cjs +3 -0
  8. package/dist/chunk-4BWV3SEL.cjs +1 -0
  9. package/dist/chunk-4ZGW4HM4.cjs +1 -0
  10. package/dist/chunk-5TBO732O.js +1 -0
  11. package/dist/chunk-6OZSKCPT.cjs +1 -0
  12. package/dist/chunk-C3VS33WJ.js +1 -0
  13. package/dist/chunk-D2EGPBCX.cjs +1 -0
  14. package/dist/chunk-FBADWFRR.cjs +1 -0
  15. package/dist/chunk-FQSWQLRW.js +1 -0
  16. package/dist/chunk-GT6PI4CT.cjs +1 -0
  17. package/dist/chunk-II26UWZM.cjs +1 -0
  18. package/dist/chunk-JFMVVGGB.js +1 -0
  19. package/dist/chunk-K73VV7KA.js +1 -0
  20. package/dist/chunk-L4PFFRDE.js +3 -0
  21. package/dist/chunk-LLPGVQUT.cjs +1 -0
  22. package/dist/chunk-M3UENQ6L.cjs +1 -0
  23. package/dist/chunk-M63QOANE.js +1 -0
  24. package/dist/chunk-MEKDQDSV.js +1 -0
  25. package/dist/chunk-OEPKPDLD.js +1 -0
  26. package/dist/chunk-OWT55N6J.js +3 -0
  27. package/dist/chunk-PFR2J5BV.js +1 -0
  28. package/dist/chunk-Q6BD2YL3.cjs +1 -0
  29. package/dist/chunk-Q7BULGQG.cjs +1 -0
  30. package/dist/chunk-QS3MKZOY.cjs +3 -0
  31. package/dist/chunk-RHBDQGD4.js +1 -0
  32. package/dist/chunk-RZZDQWC2.js +1 -0
  33. package/dist/chunk-S73WZWDP.js +1 -0
  34. package/dist/chunk-SD2KAIVE.js +1 -0
  35. package/dist/chunk-T5XF2R74.js +1 -0
  36. package/dist/chunk-TCFCSGQ3.js +1 -0
  37. package/dist/chunk-TGL3DR2K.js +1 -0
  38. package/dist/chunk-TODYQ3SG.cjs +1 -0
  39. package/dist/chunk-TVSQHTK2.cjs +1 -0
  40. package/dist/chunk-UYR3UEIW.cjs +1 -0
  41. package/dist/chunk-VGGJGRNK.cjs +1 -0
  42. package/dist/chunk-W6Y7H56X.js +1 -0
  43. package/dist/chunk-XSHOLIC7.cjs +1 -0
  44. package/dist/chunk-XWDB2LS3.cjs +1 -0
  45. package/dist/cli.js +3 -0
  46. package/dist/confirmation-view-CICNJJIO.js +1 -0
  47. package/dist/confirmation-view-OMWHUYVC.cjs +1 -0
  48. package/dist/conformance.cjs +1 -0
  49. package/dist/conformance.d.cts +10 -0
  50. package/dist/conformance.d.ts +10 -0
  51. package/dist/conformance.js +1 -0
  52. package/dist/flow-parser.cjs +1 -0
  53. package/dist/flow-parser.d.cts +3 -0
  54. package/dist/flow-parser.d.ts +3 -0
  55. package/dist/flow-parser.js +1 -0
  56. package/dist/flows-panel-AIULKYOS.cjs +1 -0
  57. package/dist/flows-panel-YEJ36RTY.js +1 -0
  58. package/dist/form-extras-QYE32TUY.cjs +1 -0
  59. package/dist/form-extras-SBBOMJS2.js +1 -0
  60. package/dist/form-fill-C32AHxSr.d.cts +653 -0
  61. package/dist/form-fill-Dp3ut1_Y.d.ts +653 -0
  62. package/dist/form-session.cjs +1 -0
  63. package/dist/form-session.d.cts +7 -0
  64. package/dist/form-session.d.ts +7 -0
  65. package/dist/form-session.js +1 -0
  66. package/dist/frame-decoder.cjs +3 -0
  67. package/dist/frame-decoder.d.cts +5 -0
  68. package/dist/frame-decoder.d.ts +5 -0
  69. package/dist/frame-decoder.js +3 -0
  70. package/dist/generated-C9tbjwK0.d.cts +797 -0
  71. package/dist/generated-C9tbjwK0.d.ts +797 -0
  72. package/dist/hooks/index.cjs +1 -0
  73. package/dist/hooks/index.d.cts +48 -0
  74. package/dist/hooks/index.d.ts +48 -0
  75. package/dist/hooks/index.js +1 -0
  76. package/dist/i18n-DPNfYTMG.d.cts +148 -0
  77. package/dist/i18n-DPNfYTMG.d.ts +148 -0
  78. package/dist/index-B5idIFTx.d.cts +34 -0
  79. package/dist/index-DPzoKXCK.d.ts +34 -0
  80. package/dist/index.cjs +3 -0
  81. package/dist/index.d.cts +38 -0
  82. package/dist/index.d.ts +38 -0
  83. package/dist/index.js +3 -0
  84. package/dist/intent-BQPPows1.d.cts +154 -0
  85. package/dist/intent-BuvqEU3Q.d.ts +154 -0
  86. package/dist/intent.cjs +1 -0
  87. package/dist/intent.d.cts +2 -0
  88. package/dist/intent.d.ts +2 -0
  89. package/dist/intent.js +1 -0
  90. package/dist/markdown-BSRKJFFE.cjs +17 -0
  91. package/dist/markdown-ETLB66BK.js +17 -0
  92. package/dist/message-actions-3HGE6VTS.js +1 -0
  93. package/dist/message-actions-F6SPLTT7.cjs +1 -0
  94. package/dist/messages/en/index.cjs +1 -0
  95. package/dist/messages/en/index.d.cts +3 -0
  96. package/dist/messages/en/index.d.ts +3 -0
  97. package/dist/messages/en/index.js +1 -0
  98. package/dist/messages/index.cjs +1 -0
  99. package/dist/messages/index.d.cts +14 -0
  100. package/dist/messages/index.d.ts +14 -0
  101. package/dist/messages/index.js +1 -0
  102. package/dist/messages/zh-Hans/index.cjs +1 -0
  103. package/dist/messages/zh-Hans/index.d.cts +3 -0
  104. package/dist/messages/zh-Hans/index.d.ts +3 -0
  105. package/dist/messages/zh-Hans/index.js +1 -0
  106. package/dist/on-demand.cjs +1 -0
  107. package/dist/on-demand.d.cts +56 -0
  108. package/dist/on-demand.d.ts +56 -0
  109. package/dist/on-demand.js +1 -0
  110. package/dist/problem-messages-THONMXFZ.cjs +1 -0
  111. package/dist/problem-messages-Z5QGO6RE.js +1 -0
  112. package/dist/react/index.cjs +1 -0
  113. package/dist/react/index.d.cts +419 -0
  114. package/dist/react/index.d.ts +419 -0
  115. package/dist/react/index.js +1 -0
  116. package/dist/reads-Bk84x_rt.d.ts +38 -0
  117. package/dist/reads-DlpCt8dE.d.cts +38 -0
  118. package/dist/recovery-panel-OWY2CWOH.cjs +3 -0
  119. package/dist/recovery-panel-VOKVDDZD.js +3 -0
  120. package/dist/reply-controls-5CWIAKIG.js +1 -0
  121. package/dist/reply-controls-CPWB4VBK.cjs +1 -0
  122. package/dist/run-XBABOEXK.js +1 -0
  123. package/dist/schema.json +2900 -0
  124. package/dist/skin-antd/index.cjs +1 -0
  125. package/dist/skin-antd/index.d.cts +30 -0
  126. package/dist/skin-antd/index.d.ts +30 -0
  127. package/dist/skin-antd/index.js +1 -0
  128. package/dist/skin-default/index.cjs +1 -0
  129. package/dist/skin-default/index.d.cts +42 -0
  130. package/dist/skin-default/index.d.ts +42 -0
  131. package/dist/skin-default/index.js +1 -0
  132. package/dist/step-name-3hQ6CCGr.d.cts +19 -0
  133. package/dist/step-name-BdkYnb5g.d.ts +19 -0
  134. package/dist/storage-commit.cjs +1 -0
  135. package/dist/storage-commit.d.cts +17 -0
  136. package/dist/storage-commit.d.ts +17 -0
  137. package/dist/storage-commit.js +1 -0
  138. package/dist/stream-reads.cjs +1 -0
  139. package/dist/stream-reads.d.cts +22 -0
  140. package/dist/stream-reads.d.ts +22 -0
  141. package/dist/stream-reads.js +1 -0
  142. package/dist/styles.css +796 -0
  143. package/dist/testing/index.cjs +1 -0
  144. package/dist/testing/index.d.cts +57 -0
  145. package/dist/testing/index.d.ts +57 -0
  146. package/dist/testing/index.js +1 -0
  147. package/docs/examples/message-versions.tsx +74 -0
  148. package/docs/form-fill-protocol.md +83 -0
  149. package/docs/message-versions.md +64 -0
  150. package/docs/plan-protocol.md +83 -0
  151. package/docs/reply-protocol.md +75 -0
  152. package/etc/hooks.api.md +2385 -0
  153. package/etc/index.api.md +2159 -0
  154. package/etc/messages-en.api.md +13 -0
  155. package/etc/messages-zh-Hans.api.md +13 -0
  156. package/etc/messages.api.md +183 -0
  157. package/etc/react.api.md +2968 -0
  158. package/etc/skin-antd.api.md +2989 -0
  159. package/etc/skin-default.api.md +61 -0
  160. package/etc/testing.api.md +3034 -0
  161. package/package.json +168 -4
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkTVSQHTK2cjs = require('../chunk-TVSQHTK2.cjs');var _chunkGT6PI4CTcjs = require('../chunk-GT6PI4CT.cjs');require('../chunk-II26UWZM.cjs');var _antd = require('antd');var _dayjs = require('dayjs'); var _dayjs2 = _interopRequireDefault(_dayjs);var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function b(r,t){let e=parseFloat(r);return Number.isFinite(e)?e*(r.endsWith("rem")?16:1):t}var C="(prefers-reduced-motion: reduce)";function W(){return _react.useSyncExternalStore.call(void 0, r=>{if(typeof matchMedia!="function")return()=>{};let t=matchMedia(C);return _optionalChain([t, 'access', _2 => _2.addEventListener, 'optionalCall', _3 => _3("change",r)]),()=>_optionalChain([t, 'access', _4 => _4.removeEventListener, 'optionalCall', _5 => _5("change",r)])},()=>typeof matchMedia=="function"&&matchMedia(C).matches,()=>!1)}var u="\\s*(\\d*\\.?\\d+)\\s*",_=new RegExp(`^rgba?\\((?:${u},${u},${u}(?:,${u})?|${u}\\s${u}\\s${u}(?:/${u})?)\\)$`,"i");function l(r){let t=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]), () => ("")),e=_optionalChain([/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, 'access', _8 => _8.exec, 'call', _9 => _9(t), 'optionalAccess', _10 => _10[1]]),n=e?(e.length<5?[...e].map(o=>o+o):e.match(/../g)).map((o,a)=>parseInt(o,16)/(a>2?255:1)):_optionalChain([_, 'access', _11 => _11.exec, 'call', _12 => _12(t), 'optionalAccess', _13 => _13.slice, 'call', _14 => _14(1), 'access', _15 => _15.filter, 'call', _16 => _16(o=>o!==void 0), 'access', _17 => _17.map, 'call', _18 => _18(Number)]);return _optionalChain([n, 'optionalAccess', _19 => _19.every, 'call', _20 => _20((o,a)=>o<=(a>2?1:255))])?[n[0],n[1],n[2],_nullishCoalesce(n[3], () => (1))]:void 0}var B=[255,255,255,1],g=(r,t=B)=>[0,1,2].map(e=>r[e]*r[3]+t[e]*(1-r[3])).concat(1);function w(r){let[t,e,n]=r.map(o=>{let a=o/255;return a<=.03928?a/12.92:((a+.055)/1.055)**2.4});return .2126*t+.7152*e+.0722*n}function D(r,t){let e=l(r);if(!e)return 0;let[n,o]=[w(g(e,t)),w(t)];return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}var $=r=>"#"+r.slice(0,3).map(t=>Math.round(t).toString(16).padStart(2,"0")).join("");function x(r,t,e=r.accent){let[n,o,a]=[r.background,r.surface,e].map(l);if(!n||!o||!a)return;let i=g(n),c=t==="dark"?.16:.12,d=a[3]*c+o[3]*(1-c),p=[0,1,2].map(f=>(a[f]*a[3]*c+o[f]*o[3]*(1-c))/(d||1));return[["background",i],["surface",g(o,i)],["user surface",g([...p,d],i)]]}var M=4.5,G=4.6,U="foreground muted accent danger success warning focusRing controlBorder".split(" "),E=new Set;function j(r,t){if(_chunkTVSQHTK2cjs.a.call(void 0, ))return;let e=o=>{E.has(o)||console.warn(`waypoint: the host antd theme's ${o}`),E.add(o)},n=x(r,t);[...U,"background","surface"].forEach((o,a)=>{let i=r[o];if(!i)return;if(!l(i))return e(`${o} (${i}) is not a colour waypoint can read, so its contrast is not checked`);let c=a<6?M:3;for(let[d,p]of _nullishCoalesce(_optionalChain([n, 'optionalAccess', _21 => _21.slice, 'call', _22 => _22(0,a<3?3:a<8?2:0)]), () => ([]))){let f=D(i,p);f<c&&e(`${o} (${i}) has ${f.toFixed(2)}:1 against its ${d} (${$(p)}), under ${c}:1`)}})}var R=_antd.theme.defaultSeed;function X(r){if(!R)return;let t=(r==="dark"?_antd.theme.darkAlgorithm:_antd.theme.defaultAlgorithm)(R);return{accent:t.colorPrimary,danger:t.colorError,success:t.colorSuccess,warning:t.colorWarning}}function K(r,t,e){let n=l(r);return n&&$(n.map(o=>o*(1-e)+t*e))}function Q(r,t){let e=X(t);for(let n of["accent","danger","success","warning"]){let o=i=>_optionalChain([x, 'call', _23 => _23(r,t,i), 'optionalAccess', _24 => _24.slice, 'call', _25 => _25(0,n==="accent"?3:2), 'access', _26 => _26.every, 'call', _27 => _27(([,c])=>D(i,c)>=(n==="danger"?G:M))]),a=r[n];if(!(!a||_optionalChain([e, 'optionalAccess', _28 => _28[n], 'optionalAccess', _29 => _29.toLowerCase, 'call', _30 => _30()])!==a.toLowerCase()||o(a)))for(let i=1;i<=10;i++){let c=K(a,t==="dark"?255:0,i/10);if(c&&o(c)){r[n]=c;break}}}}function J(){let{token:r}=_antd.theme.useToken();return _react.useMemo.call(void 0, ()=>{let t=w(g(_nullishCoalesce(l(r.colorBgContainer), () => (B))))<.5?"dark":"light",e={accent:r.colorPrimary,background:r.colorBgContainer,surface:t==="dark"?r.colorBgElevated:r.colorBgLayout,foreground:r.colorText,muted:r.colorTextSecondary,border:r.colorBorderSecondary,controlBorder:r.colorBorder,danger:r.colorError,success:r.colorSuccess,warning:r.colorWarning,focusRing:r.colorPrimary,radius:`${r.borderRadius}px`,fontFamily:r.fontFamily,fontSize:`${r.fontSize}px`};for(let n in e)e[n]===void 0&&delete e[n];return Q(e,t),j(e,t),(!x(e,t)||!l(e.foreground)||!l(e.muted))&&Object.assign(e,{userTint:"0%",userEdge:"3px"}),{tokens:e,scheme:t}},[r])}function F({children:r,colorScheme:t,tokens:e,tokenSource:n="waypoint"}){let o=W();return n==="host"?_jsxruntime.jsx.call(void 0, _antd.ConfigProvider,{theme:{token:o?{motionDurationFast:"0s",motionDurationMid:"0s",motionDurationSlow:"0s"}:{}},children:r}):_jsxruntime.jsx.call(void 0, _antd.ConfigProvider,{theme:{algorithm:t==="dark"?_antd.theme.darkAlgorithm:_antd.theme.defaultAlgorithm,token:{colorPrimary:e.accent,colorPrimaryBorder:_nullishCoalesce(e.focusRing, () => (e.accent)),colorPrimaryHover:e.accent,colorPrimaryActive:e.accent,colorBgContainer:e.background,colorText:e.foreground,colorBorder:_nullishCoalesce(e.controlBorder, () => (e.border)),colorBorderSecondary:e.border,colorSplit:e.border,borderRadius:b(e.radius,8),padding:b(e.space,12),fontSize:b(e.fontSize,16),fontFamily:e.fontFamily,boxShadow:e.shadow,colorBgElevated:e.surface,colorTextSecondary:e.muted,colorError:e.danger,colorSuccess:e.success,colorWarning:e.warning,motionDurationFast:o?"0s":_nullishCoalesce(e.motionFast, () => (e.motion)),motionDurationMid:o?"0s":e.motion,motionDurationSlow:o?"0s":_nullishCoalesce(e.motionSlow, () => (e.motion))}},children:r})}function V({value:r,onChange:t,label:e,inputRef:n,onKeyDown:o,disabled:a,describedBy:i}){return _jsxruntime.jsx.call(void 0, _antd.Input.TextArea,{disabled:a,value:r,onChange:c=>_optionalChain([t, 'optionalCall', _31 => _31(c.target.value)]),"aria-label":e,"aria-describedby":i,onKeyDown:o,ref:c=>{let d=_nullishCoalesce(_optionalChain([c, 'optionalAccess', _32 => _32.resizableTextArea, 'optionalAccess', _33 => _33.textArea]), () => (null));typeof n=="function"?n(d):n&&(n.current=d)}})}function Y({children:r,onPress:t,disabled:e,label:n,...o}){let{token:a}=_antd.theme.useToken();return _jsxruntime.jsx.call(void 0, _antd.Button,{disabled:e,onClick:t,"aria-label":n,style:{"--wp-btn":a.controlHeight},...o,children:r})}var L={button:Y,textarea:V,input:({value:r,onChange:t,label:e,disabled:n,type:o,invalid:a,describedBy:i,required:c})=>_jsxruntime.jsxs.call(void 0, "label",{children:[e,_jsxruntime.jsx.call(void 0, _antd.Input,{type:o,disabled:n,value:r,"aria-invalid":a,"aria-describedby":i,"aria-required":c||void 0,status:a?"error":void 0,onChange:d=>t(d.target.value)})]}),datePicker:({value:r,onChange:t,label:e,disabled:n})=>_jsxruntime.jsxs.call(void 0, "label",{children:[e,_jsxruntime.jsx.call(void 0, _antd.DatePicker,{showTime:!0,disabled:n,value:r?_dayjs2.default.call(void 0, r):null,onChange:o=>t(_nullishCoalesce(_optionalChain([o, 'optionalAccess', _34 => _34.toISOString, 'call', _35 => _35()]), () => (""))),"aria-label":e})]}),drawer:r=>r.open?_jsxruntime.jsx.call(void 0, Z,{...r}):null,checkbox:({checked:r,onChange:t,label:e,disabled:n,invalid:o,describedBy:a})=>_jsxruntime.jsx.call(void 0, _antd.Checkbox,{checked:r,disabled:n,"aria-invalid":o,"aria-describedby":a,onChange:i=>t(i.target.checked),children:e})};function Z({children:r,label:t,onClose:e,closeLabel:n,focusInto:o,restoreFocus:a}){return _jsxruntime.jsx.call(void 0, _antd.Drawer,{open:!0,title:t,onClose:i=>{_optionalChain([i, 'optionalAccess', _36 => _36.type])==="click"&&i.detail>1||e()},autoFocus:!1,getContainer:!1,width:"min(378px, 100%)",closable:!n,extra:n?_jsxruntime.jsx.call(void 0, _antd.Button,{type:"text","aria-label":n,onClick:e,children:_jsxruntime.jsx.call(void 0, "span",{"aria-hidden":"true",children:"\xD7"})}):void 0,children:_jsxruntime.jsxs.call(void 0, _antd.ConfigProvider,{getPopupContainer:i=>_nullishCoalesce(_optionalChain([i, 'optionalAccess', _37 => _37.closest, 'call', _38 => _38(_chunkGT6PI4CTcjs.a)]), () => (document.body)),children:[_jsxruntime.jsx.call(void 0, ee,{label:t,focusInto:o,restoreFocus:a}),r]})})}function ee({label:r,focusInto:t,restoreFocus:e}){let n=_react.useRef.call(void 0, null),o=_react.useRef.call(void 0, e);return o.current=e,_react.useLayoutEffect.call(void 0, ()=>{_optionalChain([n, 'access', _39 => _39.current, 'optionalAccess', _40 => _40.closest, 'call', _41 => _41(_chunkGT6PI4CTcjs.a), 'optionalAccess', _42 => _42.setAttribute, 'call', _43 => _43("aria-label",r)])},[r]),_react.useLayoutEffect.call(void 0, ()=>{let a=_nullishCoalesce(_optionalChain([n, 'access', _44 => _44.current, 'optionalAccess', _45 => _45.closest, 'call', _46 => _46(_chunkGT6PI4CTcjs.a)]), () => (void 0));if(!a)return;a.hasAttribute("tabindex")||(a.tabIndex=-1);let i=a.closest(".ant-drawer");return _optionalChain([i, 'optionalAccess', _47 => _47.setAttribute, 'call', _48 => _48("data-wp-modal-root","")]),_optionalChain([i, 'optionalAccess', _49 => _49.querySelectorAll, 'call', _50 => _50(":scope > [data-sentinel]"), 'access', _51 => _51.forEach, 'call', _52 => _52(c=>c.setAttribute("inert",""))]),_optionalChain([t, 'optionalCall', _53 => _53(a)]),()=>_optionalChain([o, 'access', _54 => _54.current, 'optionalCall', _55 => _55(a)])},[]),_jsxruntime.jsx.call(void 0, "span",{ref:n,hidden:!0})}var re=J,te= exports.antdSkin ={primitives:L,wrapper:F,useThemeTokens:re,parts:{fieldAdornment:({label:r,onPress:t,disabled:e,describedBy:n,"aria-disabled":o})=>_jsxruntime.jsx.call(void 0, _antd.Button,{"aria-label":r,onClick:o?void 0:t,disabled:e,"aria-disabled":o,"aria-describedby":n,children:r})}};exports.AntdTheme = F; exports.antdPrimitives = L; exports.antdSkin = te;
@@ -0,0 +1,30 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { PrimitiveComponents, ThemeTokensHook, PartProps } from '../react/index.cjs';
4
+ export { ButtonProps, CheckboxProps, ConfirmSheet, ConversationRail, ConversationRailProps, DrawerProps, FieldAdornment, FieldAdornmentProps, FormFillFields, FormFillFieldsProps, FormFillPopup, FormFillPopupProps, InputProps, MarkdownImagePolicy, PartData, PartDataMap, PartMessage, PartName, PartPending, PartStep, PlanDiagram, PlanDiagramProps, PrivateAttachmentPort, RecoveryPanel, Slots, WaypointChat, WaypointChatProps, WaypointProvider, WaypointProviderProps, Widget, WidgetProps, WidgetRegistration, defaultProblemText, isSafeUrl, partNames, standardWidgets, useComposer, useConversation, useFlows, useFormFill, usePlan, useWaypointClient } from '../react/index.cjs';
5
+ import { Theme } from '../skin-default/index.cjs';
6
+ export { RequiredThemeToken, ResolvedTheme, ThemeToken, darkTheme, lightTheme, themeProperties } from '../skin-default/index.cjs';
7
+ export { A as ActionEntry, a as ActionId, B as BlockAnswer, b as BlockReply, j as BlockSummary, K as KeepSheet, c as KeepSheetView, P as PlanView, d as PlanViewAlert, e as PlanViewInput, f as PlanViewStatus, S as StepStatus, T as Tone, V as ViewMessage, g as cardReplyId, k as keepSheet, n as noticeMessages, p as planView, u as useBlockReply, h as usePlanView, i as useWaypointSnapshot } from '../block-reply-DN4RiLL0.cjs';
8
+ export { P as PlanLabels, s as stepName } from '../step-name-3hQ6CCGr.cjs';
9
+ export { B as BlockCatalogue, a as BlockMessageKey, C as ConfirmationCatalogue, b as ConfirmationMessageKey, F as FormCatalogue, c as FormMessageKey, d as FormatMessage, M as MessageKey, e as MessageValues, P as ProblemCatalogue, f as ProblemMessageKey, R as RecoveryCatalogue, g as RecoveryMessageKey, h as ReplyCatalogue, i as ReplyMessageKey, k as addMessages, l as catalogueFor, m as createFormatter, j as english, s as simplifiedChinese } from '../i18n-DPNfYTMG.cjs';
10
+ export { B as Block, b as BlockButtons, c as BlockCard, d as BlockChoice, e as BlockDetails, f as BlockDiff, g as BlockForm, h as BlockFormFill, i as BlockList, j as BlockMarkdown, k as BlockNotice, l as BlockPlan, m as BlockRouteLink, n as BlockTable, C as CanonicalRequest, o as CardAnswer, p as ConfirmationItem, q as ConfirmationRecord, r as ConfirmationSchedule, s as Conversation, t as CreateConversation, D as DecisionVersions, E as ExecutionAcceptance, u as ExtensionBlock, v as FinalHistory, a as Flow, w as FlowParameter, x as FormFillField, y as FormFillRequest, z as FormFillValue, A as FormSubject, G as FormValidation, F as Frame, H as FrameBlock, I as FrameMessageEnd, J as FrameMessageStart, K as FramePlanDraft, L as FramePlanFinal, N as FramePlanStep, O as FramePlanningRead, Q as FrameProblem, S as FrameStale, U as FrameTextDelta, V as FrameToolCall, W as ImmediateDraft, X as ImmediatePlan, Y as IntentCause, Z as IntentKind, _ as IntentRequest, $ as IntentTarget, a0 as IntentWinner, a1 as KeptFact, a2 as LeaveAcknowledgment, M as ManifestEntry, a3 as Message, a4 as Negotiated, a5 as Negotiation, a6 as NegotiationOfferWire, a7 as Outcome, a8 as PatchFlow, a9 as Plan, aa as PlanCommand, ab as PlanIntentReply, ac as PlanRecord, ad as PlanState, P as Problem, R as ReadTemplate, ae as RecoveryPhase, af as RecoveryView, ag as Reply, ah as ReplyAction, ai as ReplyConfirm, aj as ReplyDecline, ak as ReplyForm, al as ReplyFormFill, am as ReplyMessage, an as ReplyPlanValues, ao as ReplyStop, ap as ReplyToolResult, aq as RunFlow, ar as Source, as as Step, at as TimedPlan, T as ToolCall, au as WaypointProtocol, av as WinnerKind } from '../generated-C9tbjwK0.cjs';
11
+ export { A as AttachmentPort, B as BuiltinFlowTab, h as CAPABILITIES, i as Capability, C as ClientConfig, b as ClientSnapshot, j as ComposerContribution, k as ConversationReadError, d as ConversationReadResult, l as ConversationSource, m as ConversationSummary, D as DEFAULT_FLOW_TABS, n as FORM_SESSION_UNAVAILABLE, o as FeedbackInput, p as FeedbackPort, q as FlowSource, r as FlowSummary, s as FlowTab, t as FormDraft, u as FormField, v as FormMaterial, a as FormSession, F as FormSessionConfig, w as FormSnapshot, K as KeepChangesReview, x as KeepChangesReviewResult, y as KeepDisabledReason, M as MaybePromise, z as MessageVersionInput, E as MessageVersionPort, N as NegotiationOffer, P as PendingSend, G as PlanReadRefused, H as PlanRunner, I as PlatformPorts, f as ReadPorts, J as ReaderRequestContext, e as ReplyDelivery, R as ReplyInput, L as ReplyOutcome, g as ReplyState, O as RestoredMessage, Q as RunnerPorts, S as StepContext, T as StoragePort, U as ToolStep, V as TransportEvent, X as TransportPort, W as WaypointClient, c as WaypointEvent, Y as asProblem, Z as canTransition, _ as confirmationOf, $ as createMemoryStorage, a0 as createPlanRunner, a1 as createWaypointClient, a2 as flowTabId, a3 as loadFormSession, a4 as readProblem, a5 as replyRow, a6 as versionWalk } from '../form-fill-C32AHxSr.cjs';
12
+ export { I as IntentAlert, b as IntentFailure, c as IntentNotice, d as IntentOverlay, a as ScopeSignal } from '../intent-BQPPows1.cjs';
13
+
14
+ declare function AntdTheme({ children, colorScheme, tokens, tokenSource, }: {
15
+ children?: ReactNode;
16
+ colorScheme: "light" | "dark";
17
+ tokens: Theme;
18
+ tokenSource?: "host" | "waypoint";
19
+ }): react.JSX.Element;
20
+ declare const antdPrimitives: PrimitiveComponents;
21
+ declare const antdSkin: {
22
+ primitives: PrimitiveComponents;
23
+ wrapper: typeof AntdTheme;
24
+ useThemeTokens: ThemeTokensHook;
25
+ parts: {
26
+ fieldAdornment: ({ label, onPress, disabled, describedBy, "aria-disabled": guarded, }: PartProps) => react.JSX.Element;
27
+ };
28
+ };
29
+
30
+ export { AntdTheme, PartProps, PrimitiveComponents, Theme, ThemeTokensHook, antdPrimitives, antdSkin };
@@ -0,0 +1,30 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { PrimitiveComponents, ThemeTokensHook, PartProps } from '../react/index.js';
4
+ export { ButtonProps, CheckboxProps, ConfirmSheet, ConversationRail, ConversationRailProps, DrawerProps, FieldAdornment, FieldAdornmentProps, FormFillFields, FormFillFieldsProps, FormFillPopup, FormFillPopupProps, InputProps, MarkdownImagePolicy, PartData, PartDataMap, PartMessage, PartName, PartPending, PartStep, PlanDiagram, PlanDiagramProps, PrivateAttachmentPort, RecoveryPanel, Slots, WaypointChat, WaypointChatProps, WaypointProvider, WaypointProviderProps, Widget, WidgetProps, WidgetRegistration, defaultProblemText, isSafeUrl, partNames, standardWidgets, useComposer, useConversation, useFlows, useFormFill, usePlan, useWaypointClient } from '../react/index.js';
5
+ import { Theme } from '../skin-default/index.js';
6
+ export { RequiredThemeToken, ResolvedTheme, ThemeToken, darkTheme, lightTheme, themeProperties } from '../skin-default/index.js';
7
+ export { A as ActionEntry, a as ActionId, B as BlockAnswer, b as BlockReply, j as BlockSummary, K as KeepSheet, c as KeepSheetView, P as PlanView, d as PlanViewAlert, e as PlanViewInput, f as PlanViewStatus, S as StepStatus, T as Tone, V as ViewMessage, g as cardReplyId, k as keepSheet, n as noticeMessages, p as planView, u as useBlockReply, h as usePlanView, i as useWaypointSnapshot } from '../block-reply-Dtof9ild.js';
8
+ export { P as PlanLabels, s as stepName } from '../step-name-BdkYnb5g.js';
9
+ export { B as BlockCatalogue, a as BlockMessageKey, C as ConfirmationCatalogue, b as ConfirmationMessageKey, F as FormCatalogue, c as FormMessageKey, d as FormatMessage, M as MessageKey, e as MessageValues, P as ProblemCatalogue, f as ProblemMessageKey, R as RecoveryCatalogue, g as RecoveryMessageKey, h as ReplyCatalogue, i as ReplyMessageKey, k as addMessages, l as catalogueFor, m as createFormatter, j as english, s as simplifiedChinese } from '../i18n-DPNfYTMG.js';
10
+ export { B as Block, b as BlockButtons, c as BlockCard, d as BlockChoice, e as BlockDetails, f as BlockDiff, g as BlockForm, h as BlockFormFill, i as BlockList, j as BlockMarkdown, k as BlockNotice, l as BlockPlan, m as BlockRouteLink, n as BlockTable, C as CanonicalRequest, o as CardAnswer, p as ConfirmationItem, q as ConfirmationRecord, r as ConfirmationSchedule, s as Conversation, t as CreateConversation, D as DecisionVersions, E as ExecutionAcceptance, u as ExtensionBlock, v as FinalHistory, a as Flow, w as FlowParameter, x as FormFillField, y as FormFillRequest, z as FormFillValue, A as FormSubject, G as FormValidation, F as Frame, H as FrameBlock, I as FrameMessageEnd, J as FrameMessageStart, K as FramePlanDraft, L as FramePlanFinal, N as FramePlanStep, O as FramePlanningRead, Q as FrameProblem, S as FrameStale, U as FrameTextDelta, V as FrameToolCall, W as ImmediateDraft, X as ImmediatePlan, Y as IntentCause, Z as IntentKind, _ as IntentRequest, $ as IntentTarget, a0 as IntentWinner, a1 as KeptFact, a2 as LeaveAcknowledgment, M as ManifestEntry, a3 as Message, a4 as Negotiated, a5 as Negotiation, a6 as NegotiationOfferWire, a7 as Outcome, a8 as PatchFlow, a9 as Plan, aa as PlanCommand, ab as PlanIntentReply, ac as PlanRecord, ad as PlanState, P as Problem, R as ReadTemplate, ae as RecoveryPhase, af as RecoveryView, ag as Reply, ah as ReplyAction, ai as ReplyConfirm, aj as ReplyDecline, ak as ReplyForm, al as ReplyFormFill, am as ReplyMessage, an as ReplyPlanValues, ao as ReplyStop, ap as ReplyToolResult, aq as RunFlow, ar as Source, as as Step, at as TimedPlan, T as ToolCall, au as WaypointProtocol, av as WinnerKind } from '../generated-C9tbjwK0.js';
11
+ export { A as AttachmentPort, B as BuiltinFlowTab, h as CAPABILITIES, i as Capability, C as ClientConfig, b as ClientSnapshot, j as ComposerContribution, k as ConversationReadError, d as ConversationReadResult, l as ConversationSource, m as ConversationSummary, D as DEFAULT_FLOW_TABS, n as FORM_SESSION_UNAVAILABLE, o as FeedbackInput, p as FeedbackPort, q as FlowSource, r as FlowSummary, s as FlowTab, t as FormDraft, u as FormField, v as FormMaterial, a as FormSession, F as FormSessionConfig, w as FormSnapshot, K as KeepChangesReview, x as KeepChangesReviewResult, y as KeepDisabledReason, M as MaybePromise, z as MessageVersionInput, E as MessageVersionPort, N as NegotiationOffer, P as PendingSend, G as PlanReadRefused, H as PlanRunner, I as PlatformPorts, f as ReadPorts, J as ReaderRequestContext, e as ReplyDelivery, R as ReplyInput, L as ReplyOutcome, g as ReplyState, O as RestoredMessage, Q as RunnerPorts, S as StepContext, T as StoragePort, U as ToolStep, V as TransportEvent, X as TransportPort, W as WaypointClient, c as WaypointEvent, Y as asProblem, Z as canTransition, _ as confirmationOf, $ as createMemoryStorage, a0 as createPlanRunner, a1 as createWaypointClient, a2 as flowTabId, a3 as loadFormSession, a4 as readProblem, a5 as replyRow, a6 as versionWalk } from '../form-fill-Dp3ut1_Y.js';
12
+ export { I as IntentAlert, b as IntentFailure, c as IntentNotice, d as IntentOverlay, a as ScopeSignal } from '../intent-BuvqEU3Q.js';
13
+
14
+ declare function AntdTheme({ children, colorScheme, tokens, tokenSource, }: {
15
+ children?: ReactNode;
16
+ colorScheme: "light" | "dark";
17
+ tokens: Theme;
18
+ tokenSource?: "host" | "waypoint";
19
+ }): react.JSX.Element;
20
+ declare const antdPrimitives: PrimitiveComponents;
21
+ declare const antdSkin: {
22
+ primitives: PrimitiveComponents;
23
+ wrapper: typeof AntdTheme;
24
+ useThemeTokens: ThemeTokensHook;
25
+ parts: {
26
+ fieldAdornment: ({ label, onPress, disabled, describedBy, "aria-disabled": guarded, }: PartProps) => react.JSX.Element;
27
+ };
28
+ };
29
+
30
+ export { AntdTheme, PartProps, PrimitiveComponents, Theme, ThemeTokensHook, antdPrimitives, antdSkin };
@@ -0,0 +1 @@
1
+ import{a as S}from"../chunk-OEPKPDLD.js";import{a as h}from"../chunk-M63QOANE.js";import"../chunk-5TBO732O.js";import{ConfigProvider as y,Input as A,Button as k,Checkbox as H,DatePicker as I,Drawer as N,theme as m}from"antd";import O from"dayjs";import{useLayoutEffect as P,useMemo as q,useRef as v,useSyncExternalStore as z}from"react";import{jsx as s,jsxs as T}from"react/jsx-runtime";function b(r,t){let e=parseFloat(r);return Number.isFinite(e)?e*(r.endsWith("rem")?16:1):t}var C="(prefers-reduced-motion: reduce)";function W(){return z(r=>{if(typeof matchMedia!="function")return()=>{};let t=matchMedia(C);return t.addEventListener?.("change",r),()=>t.removeEventListener?.("change",r)},()=>typeof matchMedia=="function"&&matchMedia(C).matches,()=>!1)}var u="\\s*(\\d*\\.?\\d+)\\s*",_=new RegExp(`^rgba?\\((?:${u},${u},${u}(?:,${u})?|${u}\\s${u}\\s${u}(?:/${u})?)\\)$`,"i");function l(r){let t=r?.trim()??"",e=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(t)?.[1],n=e?(e.length<5?[...e].map(o=>o+o):e.match(/../g)).map((o,a)=>parseInt(o,16)/(a>2?255:1)):_.exec(t)?.slice(1).filter(o=>o!==void 0).map(Number);return n?.every((o,a)=>o<=(a>2?1:255))?[n[0],n[1],n[2],n[3]??1]:void 0}var B=[255,255,255,1],g=(r,t=B)=>[0,1,2].map(e=>r[e]*r[3]+t[e]*(1-r[3])).concat(1);function w(r){let[t,e,n]=r.map(o=>{let a=o/255;return a<=.03928?a/12.92:((a+.055)/1.055)**2.4});return .2126*t+.7152*e+.0722*n}function D(r,t){let e=l(r);if(!e)return 0;let[n,o]=[w(g(e,t)),w(t)];return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}var $=r=>"#"+r.slice(0,3).map(t=>Math.round(t).toString(16).padStart(2,"0")).join("");function x(r,t,e=r.accent){let[n,o,a]=[r.background,r.surface,e].map(l);if(!n||!o||!a)return;let i=g(n),c=t==="dark"?.16:.12,d=a[3]*c+o[3]*(1-c),p=[0,1,2].map(f=>(a[f]*a[3]*c+o[f]*o[3]*(1-c))/(d||1));return[["background",i],["surface",g(o,i)],["user surface",g([...p,d],i)]]}var M=4.5,G=4.6,U="foreground muted accent danger success warning focusRing controlBorder".split(" "),E=new Set;function j(r,t){if(S())return;let e=o=>{E.has(o)||console.warn(`waypoint: the host antd theme's ${o}`),E.add(o)},n=x(r,t);[...U,"background","surface"].forEach((o,a)=>{let i=r[o];if(!i)return;if(!l(i))return e(`${o} (${i}) is not a colour waypoint can read, so its contrast is not checked`);let c=a<6?M:3;for(let[d,p]of n?.slice(0,a<3?3:a<8?2:0)??[]){let f=D(i,p);f<c&&e(`${o} (${i}) has ${f.toFixed(2)}:1 against its ${d} (${$(p)}), under ${c}:1`)}})}var R=m.defaultSeed;function X(r){if(!R)return;let t=(r==="dark"?m.darkAlgorithm:m.defaultAlgorithm)(R);return{accent:t.colorPrimary,danger:t.colorError,success:t.colorSuccess,warning:t.colorWarning}}function K(r,t,e){let n=l(r);return n&&$(n.map(o=>o*(1-e)+t*e))}function Q(r,t){let e=X(t);for(let n of["accent","danger","success","warning"]){let o=i=>x(r,t,i)?.slice(0,n==="accent"?3:2).every(([,c])=>D(i,c)>=(n==="danger"?G:M)),a=r[n];if(!(!a||e?.[n]?.toLowerCase()!==a.toLowerCase()||o(a)))for(let i=1;i<=10;i++){let c=K(a,t==="dark"?255:0,i/10);if(c&&o(c)){r[n]=c;break}}}}function J(){let{token:r}=m.useToken();return q(()=>{let t=w(g(l(r.colorBgContainer)??B))<.5?"dark":"light",e={accent:r.colorPrimary,background:r.colorBgContainer,surface:t==="dark"?r.colorBgElevated:r.colorBgLayout,foreground:r.colorText,muted:r.colorTextSecondary,border:r.colorBorderSecondary,controlBorder:r.colorBorder,danger:r.colorError,success:r.colorSuccess,warning:r.colorWarning,focusRing:r.colorPrimary,radius:`${r.borderRadius}px`,fontFamily:r.fontFamily,fontSize:`${r.fontSize}px`};for(let n in e)e[n]===void 0&&delete e[n];return Q(e,t),j(e,t),(!x(e,t)||!l(e.foreground)||!l(e.muted))&&Object.assign(e,{userTint:"0%",userEdge:"3px"}),{tokens:e,scheme:t}},[r])}function F({children:r,colorScheme:t,tokens:e,tokenSource:n="waypoint"}){let o=W();return n==="host"?s(y,{theme:{token:o?{motionDurationFast:"0s",motionDurationMid:"0s",motionDurationSlow:"0s"}:{}},children:r}):s(y,{theme:{algorithm:t==="dark"?m.darkAlgorithm:m.defaultAlgorithm,token:{colorPrimary:e.accent,colorPrimaryBorder:e.focusRing??e.accent,colorPrimaryHover:e.accent,colorPrimaryActive:e.accent,colorBgContainer:e.background,colorText:e.foreground,colorBorder:e.controlBorder??e.border,colorBorderSecondary:e.border,colorSplit:e.border,borderRadius:b(e.radius,8),padding:b(e.space,12),fontSize:b(e.fontSize,16),fontFamily:e.fontFamily,boxShadow:e.shadow,colorBgElevated:e.surface,colorTextSecondary:e.muted,colorError:e.danger,colorSuccess:e.success,colorWarning:e.warning,motionDurationFast:o?"0s":e.motionFast??e.motion,motionDurationMid:o?"0s":e.motion,motionDurationSlow:o?"0s":e.motionSlow??e.motion}},children:r})}function V({value:r,onChange:t,label:e,inputRef:n,onKeyDown:o,disabled:a,describedBy:i}){return s(A.TextArea,{disabled:a,value:r,onChange:c=>t?.(c.target.value),"aria-label":e,"aria-describedby":i,onKeyDown:o,ref:c=>{let d=c?.resizableTextArea?.textArea??null;typeof n=="function"?n(d):n&&(n.current=d)}})}function Y({children:r,onPress:t,disabled:e,label:n,...o}){let{token:a}=m.useToken();return s(k,{disabled:e,onClick:t,"aria-label":n,style:{"--wp-btn":a.controlHeight},...o,children:r})}var L={button:Y,textarea:V,input:({value:r,onChange:t,label:e,disabled:n,type:o,invalid:a,describedBy:i,required:c})=>T("label",{children:[e,s(A,{type:o,disabled:n,value:r,"aria-invalid":a,"aria-describedby":i,"aria-required":c||void 0,status:a?"error":void 0,onChange:d=>t(d.target.value)})]}),datePicker:({value:r,onChange:t,label:e,disabled:n})=>T("label",{children:[e,s(I,{showTime:!0,disabled:n,value:r?O(r):null,onChange:o=>t(o?.toISOString()??""),"aria-label":e})]}),drawer:r=>r.open?s(Z,{...r}):null,checkbox:({checked:r,onChange:t,label:e,disabled:n,invalid:o,describedBy:a})=>s(H,{checked:r,disabled:n,"aria-invalid":o,"aria-describedby":a,onChange:i=>t(i.target.checked),children:e})};function Z({children:r,label:t,onClose:e,closeLabel:n,focusInto:o,restoreFocus:a}){return s(N,{open:!0,title:t,onClose:i=>{i?.type==="click"&&i.detail>1||e()},autoFocus:!1,getContainer:!1,width:"min(378px, 100%)",closable:!n,extra:n?s(k,{type:"text","aria-label":n,onClick:e,children:s("span",{"aria-hidden":"true",children:"\xD7"})}):void 0,children:T(y,{getPopupContainer:i=>i?.closest(h)??document.body,children:[s(ee,{label:t,focusInto:o,restoreFocus:a}),r]})})}function ee({label:r,focusInto:t,restoreFocus:e}){let n=v(null),o=v(e);return o.current=e,P(()=>{n.current?.closest(h)?.setAttribute("aria-label",r)},[r]),P(()=>{let a=n.current?.closest(h)??void 0;if(!a)return;a.hasAttribute("tabindex")||(a.tabIndex=-1);let i=a.closest(".ant-drawer");return i?.setAttribute("data-wp-modal-root",""),i?.querySelectorAll(":scope > [data-sentinel]").forEach(c=>c.setAttribute("inert","")),t?.(a),()=>o.current?.(a)},[]),s("span",{ref:n,hidden:!0})}var re=J,te={primitives:L,wrapper:F,useThemeTokens:re,parts:{fieldAdornment:({label:r,onPress:t,disabled:e,describedBy:n,"aria-disabled":o})=>s(k,{"aria-label":r,onClick:o?void 0:t,disabled:e,"aria-disabled":o,"aria-describedby":n,children:r})}};export{F as AntdTheme,L as antdPrimitives,te as antdSkin};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4BWV3SELcjs = require('../chunk-4BWV3SEL.cjs');require('../chunk-II26UWZM.cjs');exports.darkTheme = _chunk4BWV3SELcjs.b; exports.lightTheme = _chunk4BWV3SELcjs.a; exports.themeProperties = _chunk4BWV3SELcjs.c;
@@ -0,0 +1,42 @@
1
+ declare const lightTheme: {
2
+ readonly background: "#ffffff";
3
+ readonly foreground: "#18212f";
4
+ readonly muted: "#526071";
5
+ readonly accent: "#245ad1";
6
+ readonly border: "#ccd4df";
7
+ readonly surface: "#f2f5f9";
8
+ readonly danger: "#b42318";
9
+ readonly space: "0.75rem";
10
+ readonly radius: "0.5rem";
11
+ readonly fontSize: "1rem";
12
+ readonly fontFamily: "system-ui, sans-serif";
13
+ readonly shadow: "0 0.25rem 1rem #0002";
14
+ readonly motion: "120ms";
15
+ readonly space1: "0.25rem";
16
+ readonly space2: "0.5rem";
17
+ readonly fontSizeSm: "0.875rem";
18
+ readonly fontSizeLg: "1.125rem";
19
+ readonly motionFast: "80ms";
20
+ readonly motionSlow: "200ms";
21
+ readonly easing: "cubic-bezier(0.2, 0, 0, 1)";
22
+ readonly focusRing: "#245ad1";
23
+ readonly controlBorder: "#6b7889";
24
+ readonly success: "#1a7f37";
25
+ readonly warning: "#8a5c00";
26
+ };
27
+ /** The name of a theme token. */
28
+ type ThemeToken = keyof typeof lightTheme;
29
+ type RequiredThemeToken = "background" | "foreground" | "muted" | "accent" | "border" | "surface" | "danger" | "space" | "radius" | "fontSize" | "fontFamily" | "shadow" | "motion";
30
+ type Theme = {
31
+ [K in RequiredThemeToken]: string;
32
+ } & {
33
+ [K in Exclude<ThemeToken, RequiredThemeToken>]?: string;
34
+ };
35
+ /** A theme with every token present, as the chat uses it. */
36
+ type ResolvedTheme = {
37
+ [K in ThemeToken]: string;
38
+ };
39
+ declare const darkTheme: ResolvedTheme;
40
+ declare function themeProperties(theme: Partial<ResolvedTheme>): Record<string, string>;
41
+
42
+ export { type RequiredThemeToken, type ResolvedTheme, type Theme, type ThemeToken, darkTheme, lightTheme, themeProperties };
@@ -0,0 +1,42 @@
1
+ declare const lightTheme: {
2
+ readonly background: "#ffffff";
3
+ readonly foreground: "#18212f";
4
+ readonly muted: "#526071";
5
+ readonly accent: "#245ad1";
6
+ readonly border: "#ccd4df";
7
+ readonly surface: "#f2f5f9";
8
+ readonly danger: "#b42318";
9
+ readonly space: "0.75rem";
10
+ readonly radius: "0.5rem";
11
+ readonly fontSize: "1rem";
12
+ readonly fontFamily: "system-ui, sans-serif";
13
+ readonly shadow: "0 0.25rem 1rem #0002";
14
+ readonly motion: "120ms";
15
+ readonly space1: "0.25rem";
16
+ readonly space2: "0.5rem";
17
+ readonly fontSizeSm: "0.875rem";
18
+ readonly fontSizeLg: "1.125rem";
19
+ readonly motionFast: "80ms";
20
+ readonly motionSlow: "200ms";
21
+ readonly easing: "cubic-bezier(0.2, 0, 0, 1)";
22
+ readonly focusRing: "#245ad1";
23
+ readonly controlBorder: "#6b7889";
24
+ readonly success: "#1a7f37";
25
+ readonly warning: "#8a5c00";
26
+ };
27
+ /** The name of a theme token. */
28
+ type ThemeToken = keyof typeof lightTheme;
29
+ type RequiredThemeToken = "background" | "foreground" | "muted" | "accent" | "border" | "surface" | "danger" | "space" | "radius" | "fontSize" | "fontFamily" | "shadow" | "motion";
30
+ type Theme = {
31
+ [K in RequiredThemeToken]: string;
32
+ } & {
33
+ [K in Exclude<ThemeToken, RequiredThemeToken>]?: string;
34
+ };
35
+ /** A theme with every token present, as the chat uses it. */
36
+ type ResolvedTheme = {
37
+ [K in ThemeToken]: string;
38
+ };
39
+ declare const darkTheme: ResolvedTheme;
40
+ declare function themeProperties(theme: Partial<ResolvedTheme>): Record<string, string>;
41
+
42
+ export { type RequiredThemeToken, type ResolvedTheme, type Theme, type ThemeToken, darkTheme, lightTheme, themeProperties };
@@ -0,0 +1 @@
1
+ import{a as e,b as m,c as o}from"../chunk-RZZDQWC2.js";import"../chunk-5TBO732O.js";export{m as darkTheme,e as lightTheme,o as themeProperties};
@@ -0,0 +1,19 @@
1
+ import { d as FormatMessage } from './i18n-DPNfYTMG.cjs';
2
+
3
+ /**
4
+ * The names a plan's steps are shown with. The protocol names a step's
5
+ * resource and fields by their internal keys; a host that wants them shown
6
+ * returns the words its users know, else the chat shows a neutral name
7
+ * ("Change 1", "Value 1"), never the key.
8
+ */
9
+ interface PlanLabels {
10
+ resource?(resource: string): string | undefined;
11
+ field?(resource: string, field: string): string | undefined;
12
+ }
13
+ /** A step's name: "Task 1" with a label for its resource, else "Change 1". */
14
+ declare function stepName(t: FormatMessage, labels: PlanLabels | undefined, step: {
15
+ index: number;
16
+ resource?: string;
17
+ }): string;
18
+
19
+ export { type PlanLabels as P, stepName as s };
@@ -0,0 +1,19 @@
1
+ import { d as FormatMessage } from './i18n-DPNfYTMG.js';
2
+
3
+ /**
4
+ * The names a plan's steps are shown with. The protocol names a step's
5
+ * resource and fields by their internal keys; a host that wants them shown
6
+ * returns the words its users know, else the chat shows a neutral name
7
+ * ("Change 1", "Value 1"), never the key.
8
+ */
9
+ interface PlanLabels {
10
+ resource?(resource: string): string | undefined;
11
+ field?(resource: string, field: string): string | undefined;
12
+ }
13
+ /** A step's name: "Task 1" with a label for its resource, else "Change 1". */
14
+ declare function stepName(t: FormatMessage, labels: PlanLabels | undefined, step: {
15
+ index: number;
16
+ resource?: string;
17
+ }): string;
18
+
19
+ export { type PlanLabels as P, stepName as s };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkXSHOLIC7cjs = require('./chunk-XSHOLIC7.cjs');require('./chunk-II26UWZM.cjs');var m=new WeakMap;function w(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t=="object"&&t!==null?t:null}catch (e2){return null}}function v(e,t,f){let g=async o=>{let r=await e.get(t),i=w(r),n=_chunkXSHOLIC7cjs.a.call(void 0, i),d=f(i,n);if(!d)return{done:!0,committed:void 0};let a=JSON.stringify({...d,revision:n+1});if(e.compareAndSet){if(!await e.compareAndSet(t,r,a))return{done:!1,committed:void 0}}else if(await e.set(t,a),o&&await e.get(t)!==a)return{done:!1,committed:void 0};return{done:!0,committed:n+1}},c=async()=>{let o=e.compareAndSet?void 0:_optionalChain([globalThis, 'access', _ => _.navigator, 'optionalAccess', _2 => _2.locks]),r=()=>g(!o);for(let i=0;i<5;i++){let n=o?await o.request(`waypoint-storage:${t}`,r):await r();if(n.done)return n.committed}throw new Error("Storage revision conflict")},s=m.get(e);s||m.set(e,s=new Map);let u=(_nullishCoalesce(s.get(t), () => (Promise.resolve()))).then(c,c);return s.set(t,u.catch(()=>{})),u}exports.commitRecord = v;
@@ -0,0 +1,17 @@
1
+ import { T as StoragePort } from './form-fill-C32AHxSr.cjs';
2
+ import './generated-C9tbjwK0.cjs';
3
+ import './intent-BQPPows1.cjs';
4
+
5
+ interface StoredRecord {
6
+ revision?: unknown;
7
+ [field: string]: unknown;
8
+ }
9
+
10
+ /**
11
+ * Builds the next record from the stored one and commits it. `build`
12
+ * returns `null` to drop the write. Resolves to the committed revision, or
13
+ * `undefined` when the write was dropped.
14
+ */
15
+ declare function commitRecord(port: StoragePort, key: string, build: (stored: StoredRecord | null, revision: number) => Record<string, unknown> | null): Promise<number | undefined>;
16
+
17
+ export { commitRecord };
@@ -0,0 +1,17 @@
1
+ import { T as StoragePort } from './form-fill-Dp3ut1_Y.js';
2
+ import './generated-C9tbjwK0.js';
3
+ import './intent-BuvqEU3Q.js';
4
+
5
+ interface StoredRecord {
6
+ revision?: unknown;
7
+ [field: string]: unknown;
8
+ }
9
+
10
+ /**
11
+ * Builds the next record from the stored one and commits it. `build`
12
+ * returns `null` to drop the write. Resolves to the committed revision, or
13
+ * `undefined` when the write was dropped.
14
+ */
15
+ declare function commitRecord(port: StoragePort, key: string, build: (stored: StoredRecord | null, revision: number) => Record<string, unknown> | null): Promise<number | undefined>;
16
+
17
+ export { commitRecord };
@@ -0,0 +1 @@
1
+ import{a as l}from"./chunk-K73VV7KA.js";import"./chunk-5TBO732O.js";var m=new WeakMap;function w(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t=="object"&&t!==null?t:null}catch{return null}}function v(e,t,f){let g=async o=>{let r=await e.get(t),i=w(r),n=l(i),d=f(i,n);if(!d)return{done:!0,committed:void 0};let a=JSON.stringify({...d,revision:n+1});if(e.compareAndSet){if(!await e.compareAndSet(t,r,a))return{done:!1,committed:void 0}}else if(await e.set(t,a),o&&await e.get(t)!==a)return{done:!1,committed:void 0};return{done:!0,committed:n+1}},c=async()=>{let o=e.compareAndSet?void 0:globalThis.navigator?.locks,r=()=>g(!o);for(let i=0;i<5;i++){let n=o?await o.request(`waypoint-storage:${t}`,r):await r();if(n.done)return n.committed}throw new Error("Storage revision conflict")},s=m.get(e);s||m.set(e,s=new Map);let u=(s.get(t)??Promise.resolve()).then(c,c);return s.set(t,u.catch(()=>{})),u}export{v as commitRecord};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('./chunk-II26UWZM.cjs');async function y(e,n,s){let r=n.find(o=>o.id===e.operation&&o.kind==="read"&&o.method==="GET"&&o.path===e.path);if(e.method!=="GET"||!r||!f(e.path)||Object.keys(_nullishCoalesce(e.query, () => ({}))).some(o=>!r.filterable.includes(o)||r.fields[o]!=="low"))return{kind:"refused",reason:"invalid-read"};let t=r.returns.filter(o=>r.fields[o]==="low"),l=await s(e);return{kind:"result",callId:e.id,result:Array.isArray(l)?l.map(o=>u(o,t)):u(l,t)}}function u(e,n){return typeof e!="object"||e===null?{}:Object.fromEntries(n.filter(s=>Object.prototype.hasOwnProperty.call(e,s)).map(s=>[s,e[s]]))}function f(e){return e.startsWith("/")&&!e.startsWith("//")&&!/[?#\\]/.test(e)&&!R(e).split("/").some(n=>n==="."||n==="..")&&!/%2f|%5c/i.test(e)}function R(e){try{return decodeURIComponent(e)}catch (e2){return".."}}async function m(e,n,s){if(e.method!=="GET"||e.path!==n.path||!f(e.path)||JSON.stringify(e.rows)!==JSON.stringify(n.rows)||JSON.stringify(e.fields)!==JSON.stringify(n.fields))return{kind:"refused",reason:"invalid-read"};let r=await s(n);return Object.keys(r.rows).some(t=>!n.rows.includes(t))||n.rows.some(t=>!r.versions[t]||!Object.prototype.hasOwnProperty.call(r.rows,t))?{kind:"refused",reason:"invalid-read"}:{kind:"plan.values",rows:Object.fromEntries(n.rows.map(t=>[t,u(r.rows[t],n.fields)])),versions:Object.fromEntries(n.rows.map(t=>[t,r.versions[t]]))}}async function g(e,n,s,r,t,l){let o=i=>async d=>{if(!r())throw new Error("stale-read");return i(d)};if(e.type==="tool.call"){let i=await y(e.call,n.manifest,o(w=>n.request(w)));if(!r())return;let d=i.kind==="refused"?{code:"invalid-read",id:e.call.id}:void 0;return d&&t(d),await l({kind:"tool-result",clientReplyId:`${s}:tool:${e.call.id}`,callId:e.call.id,result:i.kind==="result"?i.result:null,...d?{problem:d}:{}}),!d}let p=n.planning,c=await _optionalChain([p, 'optionalAccess', _ => _.template, 'call', _2 => _2(e.planId,e.stepId)]);if(!r())return;let a=c&&p&&await m(e.template,c,o(i=>p.request(i)));if(r()){if(!a||a.kind==="refused")return t({code:"invalid-read",id:e.stepId});await l({kind:"plan.values",clientReplyId:`${s}:values:${e.planId}:${e.stepId}`,planId:e.planId,steps:[{stepId:e.stepId,rows:a.rows,versions:a.versions}]})}}exports.answerRead = g; exports.handlePlanningRead = m; exports.handleToolRead = y;
@@ -0,0 +1,22 @@
1
+ import { F as Frame, P as Problem, R as ReadTemplate, T as ToolCall, M as ManifestEntry } from './generated-C9tbjwK0.cjs';
2
+ import { R as ReadResult } from './reads-DlpCt8dE.cjs';
3
+ import { f as ReadPorts, R as ReplyInput } from './form-fill-C32AHxSr.cjs';
4
+ import './intent-BQPPows1.cjs';
5
+
6
+ declare function handleToolRead(call: ToolCall, manifest: readonly ManifestEntry[], request: (call: ToolCall) => Promise<unknown>): Promise<ReadResult>;
7
+ declare function handlePlanningRead(call: ReadTemplate, template: ReadTemplate, request: (call: ReadTemplate) => Promise<{
8
+ rows: Record<string, unknown>;
9
+ versions: Record<string, string>;
10
+ }>): Promise<{
11
+ kind: "refused";
12
+ reason: string;
13
+ } | {
14
+ kind: "plan.values";
15
+ rows: Record<string, Record<string, unknown>>;
16
+ versions: Record<string, string>;
17
+ }>;
18
+ declare function answerRead(frame: Extract<Frame, {
19
+ type: "tool.call" | "planning-read";
20
+ }>, reads: ReadPorts, conversationId: string, current: () => boolean, report: (problem: Problem) => void, send: (reply: ReplyInput) => Promise<unknown>): Promise<boolean | void>;
21
+
22
+ export { answerRead, handlePlanningRead, handleToolRead };
@@ -0,0 +1,22 @@
1
+ import { F as Frame, P as Problem, R as ReadTemplate, T as ToolCall, M as ManifestEntry } from './generated-C9tbjwK0.js';
2
+ import { R as ReadResult } from './reads-Bk84x_rt.js';
3
+ import { f as ReadPorts, R as ReplyInput } from './form-fill-Dp3ut1_Y.js';
4
+ import './intent-BuvqEU3Q.js';
5
+
6
+ declare function handleToolRead(call: ToolCall, manifest: readonly ManifestEntry[], request: (call: ToolCall) => Promise<unknown>): Promise<ReadResult>;
7
+ declare function handlePlanningRead(call: ReadTemplate, template: ReadTemplate, request: (call: ReadTemplate) => Promise<{
8
+ rows: Record<string, unknown>;
9
+ versions: Record<string, string>;
10
+ }>): Promise<{
11
+ kind: "refused";
12
+ reason: string;
13
+ } | {
14
+ kind: "plan.values";
15
+ rows: Record<string, Record<string, unknown>>;
16
+ versions: Record<string, string>;
17
+ }>;
18
+ declare function answerRead(frame: Extract<Frame, {
19
+ type: "tool.call" | "planning-read";
20
+ }>, reads: ReadPorts, conversationId: string, current: () => boolean, report: (problem: Problem) => void, send: (reply: ReplyInput) => Promise<unknown>): Promise<boolean | void>;
21
+
22
+ export { answerRead, handlePlanningRead, handleToolRead };
@@ -0,0 +1 @@
1
+ import"./chunk-5TBO732O.js";async function y(e,n,s){let r=n.find(o=>o.id===e.operation&&o.kind==="read"&&o.method==="GET"&&o.path===e.path);if(e.method!=="GET"||!r||!f(e.path)||Object.keys(e.query??{}).some(o=>!r.filterable.includes(o)||r.fields[o]!=="low"))return{kind:"refused",reason:"invalid-read"};let t=r.returns.filter(o=>r.fields[o]==="low"),l=await s(e);return{kind:"result",callId:e.id,result:Array.isArray(l)?l.map(o=>u(o,t)):u(l,t)}}function u(e,n){return typeof e!="object"||e===null?{}:Object.fromEntries(n.filter(s=>Object.prototype.hasOwnProperty.call(e,s)).map(s=>[s,e[s]]))}function f(e){return e.startsWith("/")&&!e.startsWith("//")&&!/[?#\\]/.test(e)&&!R(e).split("/").some(n=>n==="."||n==="..")&&!/%2f|%5c/i.test(e)}function R(e){try{return decodeURIComponent(e)}catch{return".."}}async function m(e,n,s){if(e.method!=="GET"||e.path!==n.path||!f(e.path)||JSON.stringify(e.rows)!==JSON.stringify(n.rows)||JSON.stringify(e.fields)!==JSON.stringify(n.fields))return{kind:"refused",reason:"invalid-read"};let r=await s(n);return Object.keys(r.rows).some(t=>!n.rows.includes(t))||n.rows.some(t=>!r.versions[t]||!Object.prototype.hasOwnProperty.call(r.rows,t))?{kind:"refused",reason:"invalid-read"}:{kind:"plan.values",rows:Object.fromEntries(n.rows.map(t=>[t,u(r.rows[t],n.fields)])),versions:Object.fromEntries(n.rows.map(t=>[t,r.versions[t]]))}}async function g(e,n,s,r,t,l){let o=i=>async d=>{if(!r())throw new Error("stale-read");return i(d)};if(e.type==="tool.call"){let i=await y(e.call,n.manifest,o(w=>n.request(w)));if(!r())return;let d=i.kind==="refused"?{code:"invalid-read",id:e.call.id}:void 0;return d&&t(d),await l({kind:"tool-result",clientReplyId:`${s}:tool:${e.call.id}`,callId:e.call.id,result:i.kind==="result"?i.result:null,...d?{problem:d}:{}}),!d}let p=n.planning,c=await p?.template(e.planId,e.stepId);if(!r())return;let a=c&&p&&await m(e.template,c,o(i=>p.request(i)));if(r()){if(!a||a.kind==="refused")return t({code:"invalid-read",id:e.stepId});await l({kind:"plan.values",clientReplyId:`${s}:values:${e.planId}:${e.stepId}`,planId:e.planId,steps:[{stepId:e.stepId,rows:a.rows,versions:a.versions}]})}}export{g as answerRead,m as handlePlanningRead,y as handleToolRead};