ryugi-artifacts 1.96.1 → 1.97.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 (98) hide show
  1. package/dist/cli.cjs +4 -4
  2. package/dist/server.cjs +1 -1
  3. package/dist/viewer/{ActionBar-CBg5Lbhq.js → ActionBar-BEJ066Ej.js} +1 -1
  4. package/dist/viewer/{ActionIcon-Cc4tIoPf.js → ActionIcon-CelD6ljd.js} +1 -1
  5. package/dist/viewer/{AgentStatusPill-D0Rec9af.js → AgentStatusPill-B2LrXApc.js} +1 -1
  6. package/dist/viewer/{ArtboardLayout-C5pqwr8S.js → ArtboardLayout-DuPhmI2p.js} +1 -1
  7. package/dist/viewer/{ArtifactList-CXK1wKgO.js → ArtifactList-Cp_4E7tp.js} +1 -1
  8. package/dist/viewer/{ArtifactModal-DtAhWCXJ.js → ArtifactModal-D3ScY6_n.js} +1 -1
  9. package/dist/viewer/{Avatar-BkXEFoPL.js → Avatar-Bl67MCxf.js} +1 -1
  10. package/dist/viewer/{BottomSheet-BQW1npWE.js → BottomSheet-7r3g6yRy.js} +1 -1
  11. package/dist/viewer/{Canvas-BvgS7RZe.js → Canvas-BaCiqx37.js} +1 -1
  12. package/dist/viewer/{CloudLegalNotice-DqoeWQE4.js → CloudLegalNotice-C-lwr2NX.js} +1 -1
  13. package/dist/viewer/{Composer-t4_HrD_Y.js → Composer-DtmsJM8R.js} +1 -1
  14. package/dist/viewer/{CompositeItem-CPyga1ao.js → CompositeItem-r7w86f_k.js} +1 -1
  15. package/dist/viewer/{DocumentExportMenu-ChgnP6GL.js → DocumentExportMenu-DHSPKzzP.js} +1 -1
  16. package/dist/viewer/DocumentLayout-CJoYGdTu.js +2 -0
  17. package/dist/viewer/DocumentPage-CTXWOPjh.js +3 -0
  18. package/dist/viewer/{DraggablePanel-9ifKjt_G.js → DraggablePanel-DZLHeUmg.js} +1 -1
  19. package/dist/viewer/{DropdownMenu-COqNosvu.js → DropdownMenu-CJwUBLlC.js} +1 -1
  20. package/dist/viewer/{FieldControl-DGCh5UaB.js → FieldControl-CHQD9IDx.js} +1 -1
  21. package/dist/viewer/{GroupVerdict-CRdehNar.js → GroupVerdict-YCGvEg4H.js} +1 -1
  22. package/dist/viewer/{HtmlLayout-BtGbMait.js → HtmlLayout-L2YY8RF2.js} +1 -1
  23. package/dist/viewer/{Input-CbJjyKLA.js → Input-C4lfMDT0.js} +1 -1
  24. package/dist/viewer/{MenuTrigger-DeOY467Q.js → MenuTrigger-BP8vj2dt.js} +1 -1
  25. package/dist/viewer/{PhoneArtboardBar-D_NFOSi-.js → PhoneArtboardBar-BZpLfQYf.js} +1 -1
  26. package/dist/viewer/{PhoneSheet-hPziEorx.js → PhoneSheet-Dyg85WID.js} +1 -1
  27. package/dist/viewer/{Popover-mA0ZatAs.js → Popover-B_c2R3tb.js} +1 -1
  28. package/dist/viewer/{PreviewLayout-D6i9jAsH.js → PreviewLayout-Z9Q--w6E.js} +2 -2
  29. package/dist/viewer/{PublishMenu-VLSbq_cl.js → PublishMenu-eV9uW7Kg.js} +1 -1
  30. package/dist/viewer/{ReportLayout-TkIi9O3f.js → ReportLayout-DjlI-WU4.js} +1 -1
  31. package/dist/viewer/{Segmented-BqrFveQI.js → Segmented-xJdCLm-b.js} +1 -1
  32. package/dist/viewer/{Select-DOC2P1EA.js → Select-TB8D_2Ak.js} +1 -1
  33. package/dist/viewer/{SlidesLayout-Bgur5-Ez.js → SlidesLayout-DrnbCy4l.js} +3 -3
  34. package/dist/viewer/{SnapshotDocument-C0rk-m6N.js → SnapshotDocument-DeGHYbT2.js} +1 -1
  35. package/dist/viewer/{SplitFrame-CFXC7W03.js → SplitFrame-C8XTBMoN.js} +1 -1
  36. package/dist/viewer/{ThreadView-SodgS7UN.js → ThreadView-De_p-Sr1.js} +1 -1
  37. package/dist/viewer/{VerifyLayout-MN-8cJN7.js → VerifyLayout-Calc3qn5.js} +1 -1
  38. package/dist/viewer/{VirtualizedEditor-uWe43zaI-C1g9cCyX.js → VirtualizedEditor-uWe43zaI-CBFaNcDc.js} +1 -1
  39. package/dist/viewer/{VirtualizedRenderer-C_d95FXi-CiVdUIgQ.js → VirtualizedRenderer-C_d95FXi-Cg_8Iwar.js} +1 -1
  40. package/dist/viewer/{WarningsBadge-CFeZv8N3.js → WarningsBadge-BXOR30h4.js} +1 -1
  41. package/dist/viewer/{WhiteboardEditor-cZ32fLqJ-BHWo4yCF.js → WhiteboardEditor-cZ32fLqJ-BAVFcyMv.js} +1 -1
  42. package/dist/viewer/{WhiteboardLayout-Q-bMT-_q.js → WhiteboardLayout-CAcGLV3D.js} +1 -1
  43. package/dist/viewer/{WritingCursor-BDXPMRMS.js → WritingCursor-Bcmcf9RW.js} +1 -1
  44. package/dist/viewer/{api-DFo4Oqef.js → api-BCnpPU7U.js} +1 -1
  45. package/dist/viewer/{artifact-list-BWgn_fzw.js → artifact-list-BgZnDmry.js} +1 -1
  46. package/dist/viewer/{auto-publish-DHavv7el.js → auto-publish-CPtZZlz2.js} +1 -1
  47. package/dist/viewer/{channel-Cpar5IxH.js → channel-DM-J4UvB.js} +3 -3
  48. package/dist/viewer/{dist-rgEZOa2B.js → dist-0G4T7khJ.js} +1 -1
  49. package/dist/viewer/{dist-Bx1NxgVp.js → dist-B078fYsG.js} +1 -1
  50. package/dist/viewer/{dist-CQntsSqO.js → dist-B2eKRzdt.js} +1 -1
  51. package/dist/viewer/{dist-Xr1petIf.js → dist-BBkRo6YU.js} +1 -1
  52. package/dist/viewer/{dist-Du-e0WIr.js → dist-BKu_xDQJ.js} +1 -1
  53. package/dist/viewer/{dist-BZN2zA0y.js → dist-BQ9e4trY.js} +1 -1
  54. package/dist/viewer/{dist-CXUXyLWP.js → dist-BhEA0j6b.js} +1 -1
  55. package/dist/viewer/{dist-B9SEPjM9.js → dist-C5cT_f2R.js} +1 -1
  56. package/dist/viewer/{dist-C1vS2Suq.js → dist-CCL9krh0.js} +1 -1
  57. package/dist/viewer/{dist-DzarOfqM.js → dist-CFZeMEUu.js} +1 -1
  58. package/dist/viewer/{dist-DSX_HUxH.js → dist-CSznh8aj.js} +1 -1
  59. package/dist/viewer/{dist-DdZ3SfkZ.js → dist-CUM1f5sU.js} +1 -1
  60. package/dist/viewer/{dist-FYz4i8cO.js → dist-D4wETyt-.js} +2 -2
  61. package/dist/viewer/{dist-wKW8P0Oo.js → dist-D9vKXn61.js} +1 -1
  62. package/dist/viewer/{dist-CIwGvFo3.js → dist-DBdwPP9-.js} +1 -1
  63. package/dist/viewer/{dist-Cz69vRDy.js → dist-DE3_RTOy.js} +1 -1
  64. package/dist/viewer/{dist-DGge8ohf.js → dist-DJseCf4V.js} +1 -1
  65. package/dist/viewer/{dist-CQrf_3of.js → dist-DNArnIBh.js} +1 -1
  66. package/dist/viewer/{dist-CpL5hsD6.js → dist-DREvUDL0.js} +1 -1
  67. package/dist/viewer/{dist-Bpl4yhU-.js → dist-DkQsTfmV.js} +1 -1
  68. package/dist/viewer/{dist-bweeVyVC.js → dist-DtW-Vysc.js} +1 -1
  69. package/dist/viewer/{dist-DcDXtIp4.js → dist-DxWVxZGy.js} +1 -1
  70. package/dist/viewer/{dist-BXpWiPzV.js → dist-Dym_bxcg.js} +1 -1
  71. package/dist/viewer/{dist-BM4VNWsZ.js → dist-anZFdtZb.js} +1 -1
  72. package/dist/viewer/{editor-CkCjGIni.js → editor-CcqMiLz3.js} +4 -4
  73. package/dist/viewer/{icons-CvaVFQTZ.js → icons-DrkFjhmy.js} +1 -1
  74. package/dist/viewer/index.html +3 -3
  75. package/dist/viewer/index.js +2 -2
  76. package/dist/viewer/{local-split-host-1U6JgPrf.js → local-split-host-Dl9rlSsp.js} +1 -1
  77. package/dist/viewer/preview.html +5 -5
  78. package/dist/viewer/preview.js +1 -1
  79. package/dist/viewer/{printDocument-m74qXcoZ.js → printDocument-UiN1Tkyp.js} +1 -1
  80. package/dist/viewer/{read-resolutions-UVCd7r_y.js → read-resolutions-CyYzExQ1.js} +1 -1
  81. package/dist/viewer/{ref-Bu4VUCqZ.js → ref-CVmDwuKG.js} +1 -1
  82. package/dist/viewer/{route-GGJyt0jy.js → route-CBDn8aA_.js} +2 -2
  83. package/dist/viewer/{route-messages-C6xnnJlF.js → route-messages-hJ8pJxir.js} +1 -1
  84. package/dist/viewer/{settings-BVzw2sWx.js → settings-CnSJna4w.js} +1 -1
  85. package/dist/viewer/{snap-Bt8K5ih5.js → snap-BpI2bGh5.js} +1 -1
  86. package/dist/viewer/{split-BVOyh9Pb.js → split-B6eupXjE.js} +2 -2
  87. package/dist/viewer/{tokens.stylex-B10cCmJn.js → tokens.stylex-4hFgkDcQ.js} +1 -1
  88. package/dist/viewer/{url-DUdroRW6.js → url-D2nInhsE.js} +1 -1
  89. package/dist/viewer/{useArtifactFeed-ByaH7dmh.js → useArtifactFeed-r3p9_j2-.js} +1 -1
  90. package/dist/viewer/{useCloudStatus-Dt6-7IpT.js → useCloudStatus-_QzffzLo.js} +1 -1
  91. package/dist/viewer/{useScrollLock-KLGnvBoH.js → useScrollLock-DQ9j79Pm.js} +1 -1
  92. package/dist/viewer/{useTranslation-EB04DdQ1.js → useTranslation-UGm7Uo4m.js} +1 -1
  93. package/dist/viewer/{useTriggerFocusGuards-BeyIvwv6.js → useTriggerFocusGuards-qc8VJB2K.js} +1 -1
  94. package/dist/viewer/{view-DbJjmh_I.js → view-BVogu64x.js} +1 -1
  95. package/dist/viewer/{viewport-CFJHn_Y6-CLkou4bB.js → viewport-CFJHn_Y6-C9yC5trU.js} +1 -1
  96. package/package.json +1 -1
  97. package/dist/viewer/DocumentLayout-Deg-ZGA1.js +0 -2
  98. package/dist/viewer/DocumentPage-DhlG_hX7.js +0 -3
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-XKyaHtl9.js";import{a as t}from"./ref-Bu4VUCqZ.js";import{r as n}from"./index.js";import{t as r}from"./api-DFo4Oqef.js";var i=e({localSplitHost:()=>o}),a=async(e,t)=>{let n=await fetch(e,{cache:`no-store`,...t}).catch(()=>null);return n?.ok?await n.json().catch(()=>null):null},o={path:(e,t)=>`/${e}/${t}`,refId:e=>t(e)||void 0,frameSrc:(e,t)=>r(`/embed/${e}/${t}`),aloneHref:(e,t)=>r(`/${e}/${t}`),carry:e=>r(e),async loadLinks(e,t=`artboard`){let n=await a(r(`/api/artifacts/${t}/${e}`));if(!n)return null;let i=n.canvas;return{backlinks:n.backlinks??null,groups:Object.keys(i?.groups??{})}},onArtboardChange:(e,t,r=`artboard`)=>n(n=>{n.type===`change`&&n.artifact===`${r}/${e}`&&t()})};export{i as n,o as t};
1
+ import{n as e}from"./rolldown-runtime-XKyaHtl9.js";import{a as t}from"./ref-CVmDwuKG.js";import{r as n}from"./index.js";import{t as r}from"./api-BCnpPU7U.js";var i=e({localSplitHost:()=>o}),a=async(e,t)=>{let n=await fetch(e,{cache:`no-store`,...t}).catch(()=>null);return n?.ok?await n.json().catch(()=>null):null},o={path:(e,t)=>`/${e}/${t}`,refId:e=>t(e)||void 0,frameSrc:(e,t)=>r(`/embed/${e}/${t}`),aloneHref:(e,t)=>r(`/${e}/${t}`),carry:e=>r(e),async loadLinks(e,t=`artboard`){let n=await a(r(`/api/artifacts/${t}/${e}`));if(!n)return null;let i=n.canvas;return{backlinks:n.backlinks??null,groups:Object.keys(i?.groups??{})}},onArtboardChange:(e,t,r=`artboard`)=>n(n=>{n.type===`change`&&n.artifact===`${r}/${e}`&&t()})};export{i as n,o as t};
@@ -13,11 +13,11 @@
13
13
  <link rel="modulepreload" crossorigin href="/jsx-runtime-LKYXHABd.js">
14
14
  <link rel="modulepreload" crossorigin href="/clsx-DRUh9g2d.js">
15
15
  <link rel="modulepreload" crossorigin href="/types-D9vXo34b.js">
16
- <link rel="modulepreload" crossorigin href="/route-GGJyt0jy.js">
17
- <link rel="modulepreload" crossorigin href="/api-DFo4Oqef.js">
18
- <link rel="modulepreload" crossorigin href="/view-DbJjmh_I.js">
19
- <link rel="modulepreload" crossorigin href="/useTranslation-EB04DdQ1.js">
20
- <link rel="modulepreload" crossorigin href="/PreviewLayout-D6i9jAsH.js">
16
+ <link rel="modulepreload" crossorigin href="/route-CBDn8aA_.js">
17
+ <link rel="modulepreload" crossorigin href="/api-BCnpPU7U.js">
18
+ <link rel="modulepreload" crossorigin href="/view-BVogu64x.js">
19
+ <link rel="modulepreload" crossorigin href="/useTranslation-UGm7Uo4m.js">
20
+ <link rel="modulepreload" crossorigin href="/PreviewLayout-Z9Q--w6E.js">
21
21
  <link rel="stylesheet" crossorigin href="/index2.css">
22
22
  </head>
23
23
  <body>
@@ -1 +1 @@
1
- import{_ as e,f as t,n,p as r,v as i,y as a}from"./route-GGJyt0jy.js";import{r as o,t as s}from"./PreviewLayout-D6i9jAsH.js";import{t as c}from"./jsx-runtime-LKYXHABd.js";var l=i(),u=c();document.documentElement.lang=a[r.language];function d(){e();let i=n(location.pathname);return i.kind===`preview`?(0,u.jsx)(s,{id:document.documentElement.dataset.ryugiArtifactId??i.id,type:i.type}):(0,u.jsx)(`div`,{...t(o.message),children:r.t(`preview.unavailable`)})}(0,l.createRoot)(document.getElementById(`root`)).render((0,u.jsx)(d,{}));
1
+ import{_ as e,f as t,n,p as r,v as i,y as a}from"./route-CBDn8aA_.js";import{r as o,t as s}from"./PreviewLayout-Z9Q--w6E.js";import{t as c}from"./jsx-runtime-LKYXHABd.js";var l=i(),u=c();document.documentElement.lang=a[r.language];function d(){e();let i=n(location.pathname);return i.kind===`preview`?(0,u.jsx)(s,{id:document.documentElement.dataset.ryugiArtifactId??i.id,type:i.type}):(0,u.jsx)(`div`,{...t(o.message),children:r.t(`preview.unavailable`)})}(0,l.createRoot)(document.getElementById(`root`)).render((0,u.jsx)(d,{}));
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-DlmbjZJV.js";import{m as n,v as r,w as i}from"./route-GGJyt0jy.js";import"./shims-s-YVfIlz.js";import{C as a,D as o,T as s,a as c,b as l,gt as u,h as d,k as f,l as p,m,p as h,s as g,u as _,vt as v,w as y,y as b}from"./editor-CkCjGIni.js";import{n as x,t as S}from"./dist-FYz4i8cO.js";import{R as C}from"./WhiteboardEditor-cZ32fLqJ-BHWo4yCF.js";import{a as w,t as T}from"./ref-Bu4VUCqZ.js";import{t as E}from"./katex-DuZJ-tFh.js";import{a as D,o as O,t as k}from"./channel-Cpar5IxH.js";import{t as A}from"./jsx-runtime-LKYXHABd.js";var j=e(t(),1),M=e(i(),1),N=r(),P=`@page{size:A4;margin:16mm}[data-document-print-root]{color:#242424;width:178mm;font-family:var(--lobe-font-family,system-ui, sans-serif);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;pointer-events:none;background:#fff;font-size:14px;line-height:1.75;position:absolute;top:0;left:-100000px}[data-document-print-root] .rich-content{max-width:none;padding:0}.document-print-image{margin:16px 0}.document-print-image img,.document-print-diagram{max-width:100%;height:auto;margin-inline:auto;display:block}.document-print-image figcaption{color:#666;text-align:center;margin-top:8px;font-size:12px}.document-print-state{color:#555;font-size:12px}.document-print-pending{color:#666;border-inline-start:2px solid #aaa;padding-inline-start:12px}.document-print-reference{color:#245d88;text-decoration:underline}@media print{html[data-document-printing],html[data-document-printing] body{background:#fff!important;height:auto!important;margin:0!important;overflow:visible!important}html[data-document-printing] body>:not([data-document-print-root]){display:none!important}html[data-document-printing] [data-document-print-root]{pointer-events:auto;width:auto;position:static}[data-document-print-root] h1,[data-document-print-root] h2,[data-document-print-root] h3{break-after:avoid}[data-document-print-root] img,[data-document-print-root] svg{object-fit:contain;max-width:100%;max-height:250mm}[data-document-print-root] pre,[data-document-print-root] pre code{white-space:pre-wrap!important;overflow-wrap:anywhere!important}[data-document-print-root] [data-chrome]{overflow:visible!important}[data-document-print-root] .rich-table-scrollable-wrapper{width:100%!important;max-width:100%!important;overflow:visible!important}[data-document-print-root] table{table-layout:fixed!important;width:100%!important;min-width:0!important}[data-document-print-root] th,[data-document-print-root] td{overflow-wrap:anywhere;white-space:normal!important;min-width:0!important}[data-document-print-root] tr{break-inside:avoid}[data-document-print-root] thead{display:table-header-group}[data-document-print-root] .rich-spoiler{color:inherit!important;filter:none!important;background:0 0!important}[data-document-print-root] .rich-heading-anchor,[data-document-print-root] figure>div>button[aria-pressed]{display:none!important}}`,F=A(),I=(0,j.createContext)(null),L=[o,s,...S,g,c,f,h],R=e=>(0,F.jsx)(C,{...e,collapsible:!1,showCopyButton:!1});function z({equation:e,displayMode:t}){let n=(0,j.useMemo)(()=>E.renderToString(e,{displayMode:t,throwOnError:!1}),[e,t]);return(0,F.jsx)(`span`,{dangerouslySetInnerHTML:{__html:n}})}function B({src:e,altText:t,caption:n,width:r,height:i,fixedWidth:a,displayWidth:o}){return(0,F.jsxs)(`figure`,{className:`document-print-image`,children:[(0,F.jsx)(`img`,{alt:t,height:i,loading:`eager`,src:e,width:a??o??r}),n?(0,F.jsx)(`figcaption`,{children:n}):null]})}function V({content:e}){let t=b(e,`light`);return t?(0,F.jsx)(`img`,{alt:n(`mermaid.diagram`),className:`document-print-diagram`,height:t.height,loading:`eager`,src:t.src,width:t.width}):(0,F.jsx)(`p`,{"data-print-error":n(`documentExport.diagramFailed`),children:n(`documentExport.diagramFailed`)})}function H({node:e}){let t=(0,j.useContext)(I),r=u([v(e,``)],t.comments.threads)[0],i=r.text??r.options.find(e=>e.value===r.choice)?.label,a=r.state===`settled`?`askSettled`:r.state===`submitted`?`askSubmitted`:r.byRecommendation?`askRecommended`:i?`askDraft`:`askUnanswered`;return(0,F.jsxs)(`span`,{className:`document-print-state`,children:[n(`documentExport.${a}`),i?`: ${i}`:``,r.note?` · ${r.note}`:``]})}function U({node:e}){let t=(0,j.useContext)(I),n=O(e,t),r=e.label??[w(e),e.group??e.board??e.frame??e.page].filter(Boolean).join(` · `);return n?(0,F.jsx)(`a`,{className:`document-print-reference`,href:n,children:r}):(0,F.jsx)(`span`,{className:`document-print-reference`,children:r})}function W({node:e}){let t=(0,j.useContext)(I).embeds?.[D(e)],n=t&&`scene`in t?d(t.scene.elements,e.frame):null,r=[w(e),e.frame??e.page].filter(Boolean).join(` · `);return!t||!(`scene`in t)||!n||!(`box`in n)?(0,F.jsx)(`p`,{className:`document-print-reference`,"data-print-embed":`missing`,children:r}):(0,F.jsx)(`figure`,{className:`document-print-whiteboard`,style:{aspectRatio:`${n.box.w} / ${n.box.h}`,maxHeight:640,margin:0},children:(0,F.jsx)(m,{light:!0,files:t.scene.files??{},label:r,view:n})})}function G({node:e}){let t=(0,j.useContext)(I),[r,i]=(0,j.useState)(!1),[a,o]=(0,j.useState)(null),s=(0,j.useMemo)(()=>({artifact:`document-print`,contentBase:t.contentBase,channel:k(),send:e=>{let t=e;t.type===`loaded`&&i(!0),t.type===`runtime-error`&&o(t.message??n(`documentExport.blockFailed`))}}),[t.contentBase]);return(0,F.jsx)(`div`,{"data-print-error":a??void 0,"data-print-loading":r?void 0:``,children:(0,F.jsx)(_,{value:s,children:(0,F.jsx)(p,{componentProps:e.props,initialHeight:e.initialHeight,url:e.url})})})}var K={ask:e=>(0,F.jsx)(H,{node:e}),ref:e=>T(e)?(0,F.jsx)(W,{node:e}):(0,F.jsx)(U,{node:e}),pending:e=>(0,F.jsxs)(`p`,{className:`document-print-pending`,children:[n(`documentExport.inProgress`),`:`,` `,e.intent||n(`document.pending`)]}),dynamic:e=>(0,F.jsx)(G,{node:e})},q={Alert:a,CodeBlock:R,Image:B,KaTeX:z,Mermaid:V,Whiteboard:y};function J({snapshot:e}){return(0,F.jsx)(I,{value:e,children:(0,F.jsx)(l,{children:(0,F.jsx)(x,{builtinNodeOverrides:K,extraNodes:L,rendererConfig:q,theme:`light`,value:e.state,variant:`article`})})})}async function Y(e,{signal:t,timeoutMs:n=2e4}={}){e.querySelectorAll(`details`).forEach(e=>{e.open=!0}),e.querySelectorAll(`img[src]`).forEach(e=>{e.loading=`eager`}),e.querySelectorAll(`table`).forEach(e=>{let t=e.querySelector(`tr`);!e.tHead&&t?.cells.length&&[...t.cells].every(e=>e.tagName===`TH`)&&e.createTHead().append(t)}),await new Promise((r,i)=>{let a=Date.now()+n,o=Date.now(),s=!document.fonts,c=null,l=0,u,d=new WeakSet,f=new MutationObserver(()=>{o=Date.now()});f.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0});let p=e=>{clearTimeout(u),f.disconnect(),t?.removeEventListener(`abort`,m),e?i(e):r()},m=()=>p(new DOMException(`Print cancelled`,`AbortError`));if(t?.addEventListener(`abort`,m,{once:!0}),t?.aborted){m();return}document.fonts&&document.fonts.ready.then(()=>{s=!0},()=>{c=Error(`A document font failed to load`)});let h=()=>{if(t?.aborted){m();return}let n=e.querySelector(`[data-print-error], [role="alert"]`);if(n){p(Error(n.dataset.printError||n.textContent||`A document block failed to render`));return}let r=!s||document.fonts?.status===`loading`||e.querySelector(`[data-print-loading], [aria-busy="true"]`)!==null;e.querySelectorAll(`details:not([open])`).forEach(e=>{e.open=!0});for(let t of e.querySelectorAll(`img[src]`))if(t.getAttribute(`src`)){if(t.loading!==`eager`&&(t.loading=`eager`),t.complete&&t.naturalWidth===0){p(Error(`Document image failed to load: ${t.alt||`image`}`));return}t.complete?!d.has(t)&&typeof t.decode==`function`&&(d.add(t),l++,t.decode().then(()=>{l--},()=>{l--,c=Error(`A document image failed to decode`)})):r=!0}c?p(c):!r&&l===0&&Date.now()-o>=100?p():Date.now()>=a?p(Error(`Document resources timed out`)):u=setTimeout(h,25)};h()})}var X=class extends j.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,F.jsx)(`p`,{"data-print-error":this.state.error.message,children:this.state.error.message}):this.props.children}};async function Z(e,{signal:t,timeoutMs:n}={}){if(document.querySelector(`[data-document-print-root]`))throw Error(`A document export is already open`);if(t?.aborted)throw new DOMException(`Print cancelled`,`AbortError`);let r=document.createElement(`div`);r.dataset.documentPrintRoot=``,r.dataset.theme=`light`,r.setAttribute(`aria-hidden`,`true`);let i=document.createElement(`style`);i.nonce=document.querySelector(`style[nonce]`)?.nonce??``,i.textContent=P,document.head.append(i),document.body.append(r);let a=(0,N.createRoot)(r),o=document.title;try{(0,M.flushSync)(()=>a.render((0,F.jsx)(X,{children:(0,F.jsx)(J,{snapshot:e})}))),await Y(r,{signal:t,timeoutMs:n}),r.removeAttribute(`aria-hidden`),document.documentElement.dataset.documentPrinting=``,document.title=e.title,await new Promise((e,n)=>{let r=()=>{window.removeEventListener(`afterprint`,i),t?.removeEventListener(`abort`,a)},i=()=>{r(),e()},a=()=>{r(),n(new DOMException(`Print cancelled`,`AbortError`))};if(window.addEventListener(`afterprint`,i,{once:!0}),t?.addEventListener(`abort`,a,{once:!0}),t?.aborted)a();else try{window.print()}catch(e){r(),n(e)}})}finally{a.unmount(),r.remove(),i.remove(),delete document.documentElement.dataset.documentPrinting,document.title===e.title&&(document.title=o)}}export{Z as printDocument};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-DlmbjZJV.js";import{m as n,v as r,w as i}from"./route-CBDn8aA_.js";import"./shims-s-YVfIlz.js";import{C as a,D as o,T as s,a as c,b as l,gt as u,h as d,k as f,l as p,m,p as h,s as g,u as _,vt as v,w as y,y as b}from"./editor-CcqMiLz3.js";import{n as x,t as S}from"./dist-D4wETyt-.js";import{R as C}from"./WhiteboardEditor-cZ32fLqJ-BAVFcyMv.js";import{a as w,t as T}from"./ref-CVmDwuKG.js";import{t as E}from"./katex-DuZJ-tFh.js";import{a as D,o as O,t as k}from"./channel-DM-J4UvB.js";import{t as A}from"./jsx-runtime-LKYXHABd.js";var j=e(t(),1),M=e(i(),1),N=r(),P=`@page{size:A4;margin:16mm}[data-document-print-root]{color:#242424;width:178mm;font-family:var(--lobe-font-family,system-ui, sans-serif);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;pointer-events:none;background:#fff;font-size:14px;line-height:1.75;position:absolute;top:0;left:-100000px}[data-document-print-root] .rich-content{max-width:none;padding:0}.document-print-image{margin:16px 0}.document-print-image img,.document-print-diagram{max-width:100%;height:auto;margin-inline:auto;display:block}.document-print-image figcaption{color:#666;text-align:center;margin-top:8px;font-size:12px}.document-print-state{color:#555;font-size:12px}.document-print-pending{color:#666;border-inline-start:2px solid #aaa;padding-inline-start:12px}.document-print-reference{color:#245d88;text-decoration:underline}@media print{html[data-document-printing],html[data-document-printing] body{background:#fff!important;height:auto!important;margin:0!important;overflow:visible!important}html[data-document-printing] body>:not([data-document-print-root]){display:none!important}html[data-document-printing] [data-document-print-root]{pointer-events:auto;width:auto;position:static}[data-document-print-root] h1,[data-document-print-root] h2,[data-document-print-root] h3{break-after:avoid}[data-document-print-root] img,[data-document-print-root] svg{object-fit:contain;max-width:100%;max-height:250mm}[data-document-print-root] pre,[data-document-print-root] pre code{white-space:pre-wrap!important;overflow-wrap:anywhere!important}[data-document-print-root] [data-chrome]{overflow:visible!important}[data-document-print-root] .rich-table-scrollable-wrapper{width:100%!important;max-width:100%!important;overflow:visible!important}[data-document-print-root] table{table-layout:fixed!important;width:100%!important;min-width:0!important}[data-document-print-root] th,[data-document-print-root] td{overflow-wrap:anywhere;white-space:normal!important;min-width:0!important}[data-document-print-root] tr{break-inside:avoid}[data-document-print-root] thead{display:table-header-group}[data-document-print-root] .rich-spoiler{color:inherit!important;filter:none!important;background:0 0!important}[data-document-print-root] .rich-heading-anchor,[data-document-print-root] figure>div>button[aria-pressed]{display:none!important}}`,F=A(),I=(0,j.createContext)(null),L=[o,s,...S,g,c,f,h],R=e=>(0,F.jsx)(C,{...e,collapsible:!1,showCopyButton:!1});function z({equation:e,displayMode:t}){let n=(0,j.useMemo)(()=>E.renderToString(e,{displayMode:t,throwOnError:!1}),[e,t]);return(0,F.jsx)(`span`,{dangerouslySetInnerHTML:{__html:n}})}function B({src:e,altText:t,caption:n,width:r,height:i,fixedWidth:a,displayWidth:o}){return(0,F.jsxs)(`figure`,{className:`document-print-image`,children:[(0,F.jsx)(`img`,{alt:t,height:i,loading:`eager`,src:e,width:a??o??r}),n?(0,F.jsx)(`figcaption`,{children:n}):null]})}function V({content:e}){let t=b(e,`light`);return t?(0,F.jsx)(`img`,{alt:n(`mermaid.diagram`),className:`document-print-diagram`,height:t.height,loading:`eager`,src:t.src,width:t.width}):(0,F.jsx)(`p`,{"data-print-error":n(`documentExport.diagramFailed`),children:n(`documentExport.diagramFailed`)})}function H({node:e}){let t=(0,j.useContext)(I),r=u([v(e,``)],t.comments.threads)[0],i=r.text??r.options.find(e=>e.value===r.choice)?.label,a=r.state===`settled`?`askSettled`:r.state===`submitted`?`askSubmitted`:r.byRecommendation?`askRecommended`:i?`askDraft`:`askUnanswered`;return(0,F.jsxs)(`span`,{className:`document-print-state`,children:[n(`documentExport.${a}`),i?`: ${i}`:``,r.note?` · ${r.note}`:``]})}function U({node:e}){let t=(0,j.useContext)(I),n=O(e,t),r=e.label??[w(e),e.group??e.board??e.frame??e.page].filter(Boolean).join(` · `);return n?(0,F.jsx)(`a`,{className:`document-print-reference`,href:n,children:r}):(0,F.jsx)(`span`,{className:`document-print-reference`,children:r})}function W({node:e}){let t=(0,j.useContext)(I).embeds?.[D(e)],n=t&&`scene`in t?d(t.scene.elements,e.frame):null,r=[w(e),e.frame??e.page].filter(Boolean).join(` · `);return!t||!(`scene`in t)||!n||!(`box`in n)?(0,F.jsx)(`p`,{className:`document-print-reference`,"data-print-embed":`missing`,children:r}):(0,F.jsx)(`figure`,{className:`document-print-whiteboard`,style:{aspectRatio:`${n.box.w} / ${n.box.h}`,maxHeight:640,margin:0},children:(0,F.jsx)(m,{light:!0,files:t.scene.files??{},label:r,view:n})})}function G({node:e}){let t=(0,j.useContext)(I),[r,i]=(0,j.useState)(!1),[a,o]=(0,j.useState)(null),s=(0,j.useMemo)(()=>({artifact:`document-print`,contentBase:t.contentBase,channel:k(),send:e=>{let t=e;t.type===`loaded`&&i(!0),t.type===`runtime-error`&&o(t.message??n(`documentExport.blockFailed`))}}),[t.contentBase]);return(0,F.jsx)(`div`,{"data-print-error":a??void 0,"data-print-loading":r?void 0:``,children:(0,F.jsx)(_,{value:s,children:(0,F.jsx)(p,{componentProps:e.props,initialHeight:e.initialHeight,url:e.url})})})}var K={ask:e=>(0,F.jsx)(H,{node:e}),ref:e=>T(e)?(0,F.jsx)(W,{node:e}):(0,F.jsx)(U,{node:e}),pending:e=>(0,F.jsxs)(`p`,{className:`document-print-pending`,children:[n(`documentExport.inProgress`),`:`,` `,e.intent||n(`document.pending`)]}),dynamic:e=>(0,F.jsx)(G,{node:e})},q={Alert:a,CodeBlock:R,Image:B,KaTeX:z,Mermaid:V,Whiteboard:y};function J({snapshot:e}){return(0,F.jsx)(I,{value:e,children:(0,F.jsx)(l,{children:(0,F.jsx)(x,{builtinNodeOverrides:K,extraNodes:L,rendererConfig:q,theme:`light`,value:e.state,variant:`article`})})})}async function Y(e,{signal:t,timeoutMs:n=2e4}={}){e.querySelectorAll(`details`).forEach(e=>{e.open=!0}),e.querySelectorAll(`img[src]`).forEach(e=>{e.loading=`eager`}),e.querySelectorAll(`table`).forEach(e=>{let t=e.querySelector(`tr`);!e.tHead&&t?.cells.length&&[...t.cells].every(e=>e.tagName===`TH`)&&e.createTHead().append(t)}),await new Promise((r,i)=>{let a=Date.now()+n,o=Date.now(),s=!document.fonts,c=null,l=0,u,d=new WeakSet,f=new MutationObserver(()=>{o=Date.now()});f.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0});let p=e=>{clearTimeout(u),f.disconnect(),t?.removeEventListener(`abort`,m),e?i(e):r()},m=()=>p(new DOMException(`Print cancelled`,`AbortError`));if(t?.addEventListener(`abort`,m,{once:!0}),t?.aborted){m();return}document.fonts&&document.fonts.ready.then(()=>{s=!0},()=>{c=Error(`A document font failed to load`)});let h=()=>{if(t?.aborted){m();return}let n=e.querySelector(`[data-print-error], [role="alert"]`);if(n){p(Error(n.dataset.printError||n.textContent||`A document block failed to render`));return}let r=!s||document.fonts?.status===`loading`||e.querySelector(`[data-print-loading], [aria-busy="true"]`)!==null;e.querySelectorAll(`details:not([open])`).forEach(e=>{e.open=!0});for(let t of e.querySelectorAll(`img[src]`))if(t.getAttribute(`src`)){if(t.loading!==`eager`&&(t.loading=`eager`),t.complete&&t.naturalWidth===0){p(Error(`Document image failed to load: ${t.alt||`image`}`));return}t.complete?!d.has(t)&&typeof t.decode==`function`&&(d.add(t),l++,t.decode().then(()=>{l--},()=>{l--,c=Error(`A document image failed to decode`)})):r=!0}c?p(c):!r&&l===0&&Date.now()-o>=100?p():Date.now()>=a?p(Error(`Document resources timed out`)):u=setTimeout(h,25)};h()})}var X=class extends j.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,F.jsx)(`p`,{"data-print-error":this.state.error.message,children:this.state.error.message}):this.props.children}};async function Z(e,{signal:t,timeoutMs:n}={}){if(document.querySelector(`[data-document-print-root]`))throw Error(`A document export is already open`);if(t?.aborted)throw new DOMException(`Print cancelled`,`AbortError`);let r=document.createElement(`div`);r.dataset.documentPrintRoot=``,r.dataset.theme=`light`,r.setAttribute(`aria-hidden`,`true`);let i=document.createElement(`style`);i.nonce=document.querySelector(`style[nonce]`)?.nonce??``,i.textContent=P,document.head.append(i),document.body.append(r);let a=(0,N.createRoot)(r),o=document.title;try{(0,M.flushSync)(()=>a.render((0,F.jsx)(X,{children:(0,F.jsx)(J,{snapshot:e})}))),await Y(r,{signal:t,timeoutMs:n}),r.removeAttribute(`aria-hidden`),document.documentElement.dataset.documentPrinting=``,document.title=e.title,await new Promise((e,n)=>{let r=()=>{window.removeEventListener(`afterprint`,i),t?.removeEventListener(`abort`,a)},i=()=>{r(),e()},a=()=>{r(),n(new DOMException(`Print cancelled`,`AbortError`))};if(window.addEventListener(`afterprint`,i,{once:!0}),t?.addEventListener(`abort`,a,{once:!0}),t?.aborted)a();else try{window.print()}catch(e){r(),n(e)}})}finally{a.unmount(),r.remove(),i.remove(),delete document.documentElement.dataset.documentPrinting,document.title===e.title&&(document.title=o)}}export{Z as printDocument};
@@ -1 +1 @@
1
- import{m as e}from"./route-GGJyt0jy.js";import{i as t}from"./Composer-t4_HrD_Y.js";var n=(e,t)=>e.kind===`node`?t.kind===`node`&&e.id===t.id:t.kind===`edge`&&e.from===t.from&&e.to===t.to&&e.index===t.index;function r(e,t,r){let i=e.find(e=>n(e.target,t));return!i||t.kind===`edge`&&r&&i.label!==r?null:i}function i(e,t){return e.kind===`node`?t||e.id:`${e.from} → ${e.to}${t?` · ${t}`:``}`}function a(n){if(n.diagram)return i(n.diagram,n.quote);if(n.quote)return n.quote;let r=t(n).length;return r>1?e(`document.wholeBlocks`,{count:r}):e(`document.wholeBlock`)}function o(e,t,n){if(!t)return`block`;let r=n!==void 0&&e.slice(n,n+t.length)===t?n:e.indexOf(t);return r===-1?`block`:{start:r,end:r+t.length}}function s(e,t){return new Set(e.filter(e=>e.status===`open`||e.id===t).map(e=>e.id))}var c=`ryugi:read-resolutions`,l=500;function u(){try{let e=JSON.parse(globalThis.localStorage?.getItem(c)??`null`);return e&&typeof e==`object`?e:{}}catch{return{}}}var d=e=>e.status===`resolved`&&e.statusBy===`agent`&&u()[e.id]!==e.statusAt;function f(e){let t=u();delete t[e.id],t[e.id]=e.statusAt;let n=Object.keys(t);for(let e of n.slice(0,Math.max(0,n.length-l)))delete t[e];try{globalThis.localStorage?.setItem(c,JSON.stringify(t))}catch{return}}export{s as a,o as i,f as n,r as o,a as r,i as s,d as t};
1
+ import{m as e}from"./route-CBDn8aA_.js";import{i as t}from"./Composer-DtmsJM8R.js";var n=(e,t)=>e.kind===`node`?t.kind===`node`&&e.id===t.id:t.kind===`edge`&&e.from===t.from&&e.to===t.to&&e.index===t.index;function r(e,t,r){let i=e.find(e=>n(e.target,t));return!i||t.kind===`edge`&&r&&i.label!==r?null:i}function i(e,t){return e.kind===`node`?t||e.id:`${e.from} → ${e.to}${t?` · ${t}`:``}`}function a(n){if(n.diagram)return i(n.diagram,n.quote);if(n.quote)return n.quote;let r=t(n).length;return r>1?e(`document.wholeBlocks`,{count:r}):e(`document.wholeBlock`)}function o(e,t,n){if(!t)return`block`;let r=n!==void 0&&e.slice(n,n+t.length)===t?n:e.indexOf(t);return r===-1?`block`:{start:r,end:r+t.length}}function s(e,t){return new Set(e.filter(e=>e.status===`open`||e.id===t).map(e=>e.id))}var c=`ryugi:read-resolutions`,l=500;function u(){try{let e=JSON.parse(globalThis.localStorage?.getItem(c)??`null`);return e&&typeof e==`object`?e:{}}catch{return{}}}var d=e=>e.status===`resolved`&&e.statusBy===`agent`&&u()[e.id]!==e.statusAt;function f(e){let t=u();delete t[e.id],t[e.id]=e.statusAt;let n=Object.keys(t);for(let e of n.slice(0,Math.max(0,n.length-l)))delete t[e];try{globalThis.localStorage?.setItem(c,JSON.stringify(t))}catch{return}}export{s as a,o as i,f as n,r as o,a as r,i as s,d as t};
@@ -1 +1 @@
1
- import{o as e,s as t}from"./url-DUdroRW6.js";var n=e=>e.type===`ref`,r=e=>e.embed===`true`,i=t=>e.filter(e=>t[e]!==void 0),a=n=>{let r={};for(let t of e)n[t]!==void 0&&(r[t]=n[t]);n.to&&(r.to=n.to);for(let e of t)n[e]&&(r[e]=n[e]);return n.embed!==void 0&&(r.embed=n.embed),n.label&&(r.label=n.label),r},o=e=>i(e)[0]??`artboard`,s=e=>e[o(e)]??``,c=e=>e.frame??(e.page?`page:${e.page}`:void 0)??e.group??e.board??e.slide??e.block??``;function l(e){let t=[],r=(e,i)=>{n(e)&&t.push({blockId:i,...a(e)});for(let t of e.children??[])r(t,i)};for(let t of e.root.children)r(t,t.$?.blockId??``);return t}export{s as a,i,c as n,l as o,o as r,r as t};
1
+ import{o as e,s as t}from"./url-D2nInhsE.js";var n=e=>e.type===`ref`,r=e=>e.embed===`true`,i=t=>e.filter(e=>t[e]!==void 0),a=n=>{let r={};for(let t of e)n[t]!==void 0&&(r[t]=n[t]);n.to&&(r.to=n.to);for(let e of t)n[e]&&(r[e]=n[e]);return n.embed!==void 0&&(r.embed=n.embed),n.label&&(r.label=n.label),r},o=e=>i(e)[0]??`artboard`,s=e=>e[o(e)]??``,c=e=>e.frame??(e.page?`page:${e.page}`:void 0)??e.group??e.board??e.slide??e.block??``;function l(e){let t=[],r=(e,i)=>{n(e)&&t.push({blockId:i,...a(e)});for(let t of e.children??[])r(t,i)};for(let t of e.root.children)r(t,t.$?.blockId??``);return t}export{s as a,i,c as n,l as o,o as r,r as t};