ryugi-artifacts 1.76.0 → 1.78.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 (138) hide show
  1. package/dist/cli.cjs +411 -35
  2. package/dist/output-bootstrap.cjs +9 -2
  3. package/dist/server.cjs +302 -298
  4. package/dist/viewer/ArtboardLayout-BTys-6Vg.js +13 -0
  5. package/dist/viewer/Canvas-CWPtxXag.js +1 -0
  6. package/dist/viewer/{DocumentLayout-BFuBCe1z.js → DocumentLayout-Bv6Ni6pv.js} +2 -2
  7. package/dist/viewer/{DocumentPage-BqBUftrx.js → DocumentPage-21BkHTw9.js} +1 -1
  8. package/dist/viewer/PreviewLayout-Dl9CuJaY.js +2 -0
  9. package/dist/viewer/{SnapshotDocument-DXjajUyC.js → SnapshotDocument-Cv3OmLv4.js} +1 -1
  10. package/dist/viewer/channel-BtxKScqa.js +4 -0
  11. package/dist/viewer/index.js +2 -2
  12. package/dist/viewer/index4.css +64 -0
  13. package/dist/viewer/preview.html +2 -2
  14. package/dist/viewer/preview.js +1 -1
  15. package/dist/viewer/{printDocument-CHLL0WV9.js → printDocument-C4mixOCB.js} +1 -1
  16. package/dist/viewer/view-BJqsLsys.js +2 -0
  17. package/dist/viewer-lib/{Canvas-BwBZAQOH.js → Canvas-CCq4Ko7_.js} +445 -342
  18. package/dist/viewer-lib/{PhoneArtboardBar-CnuXdNK_.js → PhoneArtboardBar-Cll7l0fz.js} +1 -1
  19. package/dist/viewer-lib/PreviewView-D7cDFhyg.js +801 -0
  20. package/dist/viewer-lib/{ReadOnlyWhiteboard-BIrh4itZ.js → ReadOnlyWhiteboard-CmKjtHFJ.js} +59 -59
  21. package/dist/viewer-lib/{SnapshotDocument-DxFquEK9.js → SnapshotDocument-BSkLVGik.js} +15589 -15547
  22. package/dist/viewer-lib/{VirtualizedEditor-uWe43zaI-CkFFq0vg.js → VirtualizedEditor-uWe43zaI-BPwh1XeB.js} +2 -2
  23. package/dist/viewer-lib/{VirtualizedRenderer-C_d95FXi-Dsji27_T.js → VirtualizedRenderer-C_d95FXi-D_uVjc6A.js} +3 -3
  24. package/dist/viewer-lib/{ar-SA-G6X2FPQ2-BRnkqOuC.js → ar-SA-G6X2FPQ2-HZky6mYE.js} +1 -1
  25. package/dist/viewer-lib/{az-AZ-76LH7QW2-ehow0VIq.js → az-AZ-76LH7QW2-Bz6gZGXm.js} +1 -1
  26. package/dist/viewer-lib/{bg-BG-XCXSNQG7-BI6qziGi.js → bg-BG-XCXSNQG7-Bj6azCuS.js} +1 -1
  27. package/dist/viewer-lib/{bn-BD-2XOGV67Q-tpMGd2_B.js → bn-BD-2XOGV67Q-pkZSsKMV.js} +1 -1
  28. package/dist/viewer-lib/{ca-ES-6MX7JW3Y-BbUlsBJ3.js → ca-ES-6MX7JW3Y-DInd8tqd.js} +1 -1
  29. package/dist/viewer-lib/{chunk-EIO257PC-Bv-n7kZ3.js → chunk-EIO257PC-A9RZ-nRE.js} +1 -1
  30. package/dist/viewer-lib/core.js +3 -3
  31. package/dist/viewer-lib/{cs-CZ-2BRQDIVT-DSqbdlen.js → cs-CZ-2BRQDIVT-CQ0UDIDw.js} +1 -1
  32. package/dist/viewer-lib/{da-DK-5WZEPLOC-BjZ1R6o-.js → da-DK-5WZEPLOC-rSt6qKPe.js} +1 -1
  33. package/dist/viewer-lib/{de-DE-XR44H4JA-BfGPalkL.js → de-DE-XR44H4JA-DrIjWm0C.js} +1 -1
  34. package/dist/viewer-lib/{dist-mZ0nbNzy.js → dist--CpqpZeP.js} +2 -2
  35. package/dist/viewer-lib/{dist-DnQNTkTe.js → dist-B-VcBVha.js} +4 -4
  36. package/dist/viewer-lib/{dist-qYdH7M_t.js → dist-BIRD6yJM.js} +4 -4
  37. package/dist/viewer-lib/{dist-B8Fcs3nk.js → dist-By5I7Okg.js} +1 -1
  38. package/dist/viewer-lib/{dist-wfYzTIrG.js → dist-C_4-r-SK.js} +3 -3
  39. package/dist/viewer-lib/{dist-DullpK1S.js → dist-C_TzQuVj.js} +2 -2
  40. package/dist/viewer-lib/{dist-_LP1pOLG.js → dist-CiDxjK87.js} +3 -3
  41. package/dist/viewer-lib/{dist-rgz6xpXM.js → dist-D-o6TefA.js} +3 -3
  42. package/dist/viewer-lib/{dist-yTJLUGcc.js → dist-D4p8lcBm.js} +3 -3
  43. package/dist/viewer-lib/{dist-B1gf6Fa6.js → dist-D7GVdiZ_.js} +3 -3
  44. package/dist/viewer-lib/{dist-DhIKmABp.js → dist-DUp1l9aw.js} +1 -1
  45. package/dist/viewer-lib/{dist-9o61dnhF.js → dist-DiIs4Wtf.js} +2 -2
  46. package/dist/viewer-lib/{dist-NA5mGdqC.js → dist-DkB9uL4b.js} +3 -3
  47. package/dist/viewer-lib/{dist-B20oz2cZ.js → dist-DkRPb1L4.js} +3 -3
  48. package/dist/viewer-lib/{dist-BkAQ5CG2.js → dist-Do5FbfPB.js} +2 -2
  49. package/dist/viewer-lib/{dist-Mo4r-8tk.js → dist-DwPZHID8.js} +2 -2
  50. package/dist/viewer-lib/{dist-DIGLcVme.js → dist-MF77ZiP3.js} +3 -3
  51. package/dist/viewer-lib/{dist-BfpTX5QK.js → dist-OysWJvrd.js} +2 -2
  52. package/dist/viewer-lib/{dist-BdKPWdwp.js → dist-SWpcpLKQ.js} +2 -2
  53. package/dist/viewer-lib/{dist-06BdfUMU.js → dist-T-NoxEoS.js} +4 -4
  54. package/dist/viewer-lib/{dist-5oASkt9-.js → dist-TTrYwc3n.js} +2 -2
  55. package/dist/viewer-lib/{dist-Cnmv9jOf.js → dist-nttHr497.js} +3 -3
  56. package/dist/viewer-lib/{dist-6StWP8sP.js → dist-z5xmIJm7.js} +3 -3
  57. package/dist/viewer-lib/document.js +3 -3
  58. package/dist/viewer-lib/{el-GR-BZB4AONW-BvUZSnTi.js → el-GR-BZB4AONW-3kVOQ15p.js} +1 -1
  59. package/dist/viewer-lib/{en-B4ZKOASM-Dyp8KE8C.js → en-B4ZKOASM-sas4DJvS.js} +1 -1
  60. package/dist/viewer-lib/{es-ES-U4NZUMDT-B1PZEwLb.js → es-ES-U4NZUMDT-DF1DXGeP.js} +1 -1
  61. package/dist/viewer-lib/{eu-ES-A7QVB2H4-BNk6M67A.js → eu-ES-A7QVB2H4-CIu5bgjr.js} +1 -1
  62. package/dist/viewer-lib/{fa-IR-HGAKTJCU-CEtlDVKb.js → fa-IR-HGAKTJCU-Dg12PelN.js} +1 -1
  63. package/dist/viewer-lib/{fi-FI-Z5N7JZ37-CqXNLgJp.js → fi-FI-Z5N7JZ37-DGfGckr2.js} +1 -1
  64. package/dist/viewer-lib/{fr-FR-RHASNOE6-D7dtIipP.js → fr-FR-RHASNOE6-CB3RBQBb.js} +1 -1
  65. package/dist/viewer-lib/{gl-ES-HMX3MZ6V-Cgo7fAtE.js → gl-ES-HMX3MZ6V-srdgH8Yb.js} +1 -1
  66. package/dist/viewer-lib/{he-IL-6SHJWFNN-Bm1-H99W.js → he-IL-6SHJWFNN-C-u3aIrD.js} +1 -1
  67. package/dist/viewer-lib/{hi-IN-IWLTKZ5I-yK8E_0J9.js → hi-IN-IWLTKZ5I-DnRD5RwM.js} +1 -1
  68. package/dist/viewer-lib/{hu-HU-A5ZG7DT2-C98VrJxm.js → hu-HU-A5ZG7DT2-cHUeODPe.js} +1 -1
  69. package/dist/viewer-lib/{id-ID-SAP4L64H-TIdVGjhY.js → id-ID-SAP4L64H-BYp8Yosj.js} +1 -1
  70. package/dist/viewer-lib/{image-GAAHSSAO-Bi1NqWd6.js → image-GAAHSSAO-MaHRDtG2.js} +1 -1
  71. package/dist/viewer-lib/index.js +3117 -3076
  72. package/dist/viewer-lib/{it-IT-JPQ66NNP-627ORc6z.js → it-IT-JPQ66NNP-K76B2vDZ.js} +1 -1
  73. package/dist/viewer-lib/{ja-JP-DBVTYXUO-BMKJR86l.js → ja-JP-DBVTYXUO-DGtajQ1n.js} +1 -1
  74. package/dist/viewer-lib/{kaa-6HZHGXH3-BpSB5geq.js → kaa-6HZHGXH3-Byq6aZnP.js} +1 -1
  75. package/dist/viewer-lib/{kab-KAB-ZGHBKWFO-BfYd3nUy.js → kab-KAB-ZGHBKWFO-xFQx0VKj.js} +1 -1
  76. package/dist/viewer-lib/{kk-KZ-P5N5QNE5-B2w9l6j_.js → kk-KZ-P5N5QNE5-DqTYtjE9.js} +1 -1
  77. package/dist/viewer-lib/{km-KH-HSX4SM5Z-DpRvnOD3.js → km-KH-HSX4SM5Z-CmHVZ3Pg.js} +1 -1
  78. package/dist/viewer-lib/{ko-KR-MTYHY66A-CGrV1Spl.js → ko-KR-MTYHY66A-pItxT0ea.js} +1 -1
  79. package/dist/viewer-lib/{ku-TR-6OUDTVRD-DGfmXOnJ.js → ku-TR-6OUDTVRD-DJoNwVzF.js} +1 -1
  80. package/dist/viewer-lib/{lt-LT-XHIRWOB4-DW9cVrrY.js → lt-LT-XHIRWOB4-DG1eQnL9.js} +1 -1
  81. package/dist/viewer-lib/{lv-LV-5QDEKY6T-CDlwVi5d.js → lv-LV-5QDEKY6T-BAFyGSRK.js} +1 -1
  82. package/dist/viewer-lib/{mr-IN-CRQNXWMA-DZTsb8X7.js → mr-IN-CRQNXWMA-Dpt8RtYD.js} +1 -1
  83. package/dist/viewer-lib/{my-MM-5M5IBNSE-eimCGnfV.js → my-MM-5M5IBNSE-PB-QhewM.js} +1 -1
  84. package/dist/viewer-lib/{nb-NO-T6EIAALU-CA0qj8A_.js → nb-NO-T6EIAALU-DUOVY3a0.js} +1 -1
  85. package/dist/viewer-lib/{nl-NL-IS3SIHDZ-xjXdrqei.js → nl-NL-IS3SIHDZ-EvHXncDP.js} +1 -1
  86. package/dist/viewer-lib/{nn-NO-6E72VCQL-BFaVKUPb.js → nn-NO-6E72VCQL-DiLJJ6in.js} +1 -1
  87. package/dist/viewer-lib/{oc-FR-POXYY2M6-x-knw1UV.js → oc-FR-POXYY2M6-BcMNlMjU.js} +1 -1
  88. package/dist/viewer-lib/{pa-IN-N4M65BXN-BzuUR6mV.js → pa-IN-N4M65BXN-y8F6i_xQ.js} +1 -1
  89. package/dist/viewer-lib/{percentages-BXMCSKIN-DUBJl_II.js → percentages-BXMCSKIN-BcGLGIbY.js} +1 -1
  90. package/dist/viewer-lib/{pl-PL-T2D74RX3-GB1o6A0p.js → pl-PL-T2D74RX3-BcJAM87-.js} +1 -1
  91. package/dist/viewer-lib/{printDocument-DjfXK0VD.js → printDocument-Bw-KNCCN.js} +2 -2
  92. package/dist/viewer-lib/{pt-BR-5N22H2LF-CjKPG-dA.js → pt-BR-5N22H2LF-B6LXfMUc.js} +1 -1
  93. package/dist/viewer-lib/{pt-PT-UZXXM6DQ-DXKwitID.js → pt-PT-UZXXM6DQ-Bp-xUqQ8.js} +1 -1
  94. package/dist/viewer-lib/{ro-RO-JPDTUUEW-GXm0K0W-.js → ro-RO-JPDTUUEW-BSUxwWXI.js} +1 -1
  95. package/dist/viewer-lib/{ru-RU-B4JR7IUQ-C3aifH4r.js → ru-RU-B4JR7IUQ-CQdjNcBG.js} +1 -1
  96. package/dist/viewer-lib/{si-LK-N5RQ5JYF-CbCU4-qM.js → si-LK-N5RQ5JYF-7CAmmMro.js} +1 -1
  97. package/dist/viewer-lib/{sk-SK-C5VTKIMK-oq8tYd7x.js → sk-SK-C5VTKIMK-CpC5WEtb.js} +1 -1
  98. package/dist/viewer-lib/{sl-SI-NN7IZMDC-CqbGY6Ud.js → sl-SI-NN7IZMDC-s5Digk56.js} +1 -1
  99. package/dist/viewer-lib/{static-rqLqPT6F.js → static-BL_ltq0p.js} +2 -2
  100. package/dist/viewer-lib/{stylex-DKFn6mfl.css → stylex-B6-Q1VRZ.css} +70 -0
  101. package/dist/viewer-lib/subset-shared.chunk-DVeVdUoS.js +2 -0
  102. package/dist/viewer-lib/{subset-worker.chunk-DPMoD5NG.js → subset-worker.chunk-V92b2YKH.js} +2 -2
  103. package/dist/viewer-lib/{sv-SE-XGPEYMSR-Bsf1cby9.js → sv-SE-XGPEYMSR-D7xx9CF4.js} +1 -1
  104. package/dist/viewer-lib/{ta-IN-2NMHFXQM-eRp4M6qC.js → ta-IN-2NMHFXQM-DbRLNuGy.js} +1 -1
  105. package/dist/viewer-lib/{th-TH-HPSO5L25-DW9SpgaC.js → th-TH-HPSO5L25-FmDN7f8Q.js} +1 -1
  106. package/dist/viewer-lib/thumbnail.js +281 -1
  107. package/dist/viewer-lib/{tr-TR-DEFEU3FU-pOCJfq5E.js → tr-TR-DEFEU3FU-C6SMoY6h.js} +1 -1
  108. package/dist/viewer-lib/types/src/shared/flow.d.ts +24 -0
  109. package/dist/viewer-lib/types/src/shared/geometry.d.ts +7 -0
  110. package/dist/viewer-lib/types/src/shared/types.d.ts +7 -1
  111. package/dist/viewer-lib/types/src/shared/validate.d.ts +1 -0
  112. package/dist/viewer-lib/types/src/viewer/components/BoardPlaceholder.d.ts +1 -1
  113. package/dist/viewer-lib/types/src/viewer/components/BoardsOverview.d.ts +12 -0
  114. package/dist/viewer-lib/types/src/viewer/components/Canvas.d.ts +5 -2
  115. package/dist/viewer-lib/types/src/viewer/components/CanvasNotes.d.ts +6 -0
  116. package/dist/viewer-lib/types/src/viewer/components/DebugHud.d.ts +2 -1
  117. package/dist/viewer-lib/types/src/viewer/components/FlowLayer.d.ts +9 -0
  118. package/dist/viewer-lib/types/src/viewer/components/Labels.d.ts +2 -1
  119. package/dist/viewer-lib/types/src/viewer/document/tocStyles.d.ts +24 -1
  120. package/dist/viewer-lib/types/src/viewer/hooks/useBoardLifecycle.d.ts +3 -2
  121. package/dist/viewer-lib/types/src/viewer/hooks/useCulledBoards.d.ts +1 -0
  122. package/dist/viewer-lib/types/src/viewer/lib/board-lifecycle.d.ts +13 -1
  123. package/dist/viewer-lib/types/src/viewer/lib/cull.d.ts +1 -0
  124. package/dist/viewer-lib/types/src/viewer/lib/overview.d.ts +15 -0
  125. package/dist/viewer-lib/{uk-UA-QMV73CPH-DkgFEjc5.js → uk-UA-QMV73CPH-UOEzCOen.js} +1 -1
  126. package/dist/viewer-lib/{vi-VN-M7AON7JQ-DW2UXo4M.js → vi-VN-M7AON7JQ-Dxi27jBl.js} +1 -1
  127. package/dist/viewer-lib/{viewport-CFJHn_Y6-d5wzsaWt.js → viewport-CFJHn_Y6-CcY0_b0z.js} +1 -1
  128. package/dist/viewer-lib/{zh-CN-LNUGB5OW-APfqTduX.js → zh-CN-LNUGB5OW-BkbG5N7o.js} +1 -1
  129. package/dist/viewer-lib/{zh-HK-E62DVLB3-SgR07W8h.js → zh-HK-E62DVLB3-Btkkw8Q_.js} +1 -1
  130. package/dist/viewer-lib/{zh-TW-RAJ6MFWO-BByKMSmL.js → zh-TW-RAJ6MFWO-BeX560km.js} +1 -1
  131. package/package.json +1 -1
  132. package/dist/viewer/ArtboardLayout-LjqEYnU4.js +0 -13
  133. package/dist/viewer/Canvas-DhxIof5j.js +0 -1
  134. package/dist/viewer/PreviewLayout-Bx_Yf3rn.js +0 -2
  135. package/dist/viewer/channel-ieJNPeHy.js +0 -4
  136. package/dist/viewer/view-DK0Yp3Y_.js +0 -2
  137. package/dist/viewer-lib/PreviewView-DXGaELRD.js +0 -431
  138. package/dist/viewer-lib/subset-shared.chunk-CCczPz6Y.js +0 -2
@@ -1,3 +1,245 @@
1
+ // src/shared/geometry.ts
2
+ var NAME_STRIP_H = 48;
3
+ var TITLE_LINE_HEIGHT = 1.15;
4
+ var DEFAULT_TITLE_SIZE = 96;
5
+ var STICKY_DEFAULT_W = 240;
6
+ var STICKY_FONT_SIZE = 18;
7
+ var STICKY_LINE_H = 27;
8
+ var STICKY_PAD = 16;
9
+ var CONDITION_H = 96;
10
+ var CONDITION_FONT_SIZE = 40;
11
+ var CONDITION_PAD = 40;
12
+ var CONDITION_GLYPH = 28;
13
+ var CONDITION_GLYPH_GAP = 16;
14
+ var isWide = (code) => code >= 11904;
15
+ function textWidth(text2, fontSize) {
16
+ let width = 0;
17
+ for (const char of text2) width += fontSize * (isWide(char.codePointAt(0)) ? 1 : 0.56);
18
+ return width;
19
+ }
20
+ function wrappedLines(text2, fontSize, maxWidth) {
21
+ return text2.split("\n").reduce(
22
+ (lines, paragraph) => lines + Math.max(1, Math.ceil(textWidth(paragraph, fontSize) / maxWidth)),
23
+ 0
24
+ );
25
+ }
26
+ var conditionWidth = (text2) => Math.ceil(
27
+ textWidth(text2, CONDITION_FONT_SIZE) + CONDITION_PAD * 2 + CONDITION_GLYPH + CONDITION_GLYPH_GAP
28
+ );
29
+ function noteRect(note) {
30
+ if (note.kind === "condition") {
31
+ return { x: note.x, y: note.y, w: conditionWidth(note.text), h: CONDITION_H };
32
+ }
33
+ if (note.kind === "sticky") {
34
+ const w = note.w ?? STICKY_DEFAULT_W;
35
+ const lines = wrappedLines(note.text, STICKY_FONT_SIZE, Math.max(1, w - STICKY_PAD * 2));
36
+ return { x: note.x, y: note.y, w, h: lines * STICKY_LINE_H + STICKY_PAD * 2 };
37
+ }
38
+ const size = note.size ?? DEFAULT_TITLE_SIZE;
39
+ const lineH = size * TITLE_LINE_HEIGHT;
40
+ if (note.w === void 0) {
41
+ return { x: note.x, y: note.y, w: textWidth(note.text, size), h: lineH };
42
+ }
43
+ return { x: note.x, y: note.y, w: note.w, h: wrappedLines(note.text, size, note.w) * lineH };
44
+ }
45
+ var intersects = (a, b) => a.x < b.x + b.w && b.x < a.x + a.w && a.y < b.y + b.h && b.y < a.y + a.h;
46
+
47
+ // src/shared/flow.ts
48
+ var FLOW_LABEL_FONT_SIZE = 32;
49
+ var FLOW_BRANCH_FONT_SIZE = 28;
50
+ var FLOW_LABEL_PAD = 16;
51
+ var LABEL_LINE = 1.4;
52
+ var LABEL_CLEARANCE = 24;
53
+ var SLOT_GAP = 160;
54
+ var ROOM_LIMIT = 2400;
55
+ var centerX = (rect2) => rect2.x + rect2.w / 2;
56
+ var centerY = (rect2) => rect2.y + rect2.h / 2;
57
+ var horizontal = (side) => side === "left" || side === "right";
58
+ function endOf(canvas, page, id) {
59
+ const board = canvas.boards[id];
60
+ const note = canvas.notes?.[id];
61
+ if (board && note) return null;
62
+ if (board?.page === page) {
63
+ return {
64
+ id,
65
+ board: true,
66
+ rect: { x: board.x, y: board.y - NAME_STRIP_H, w: board.w, h: board.h + NAME_STRIP_H }
67
+ };
68
+ }
69
+ if (note?.kind === "condition" && note.page === page) {
70
+ return { id, board: false, rect: noteRect(note) };
71
+ }
72
+ return null;
73
+ }
74
+ function obstaclesOn(canvas, page) {
75
+ const ids = [...Object.keys(canvas.boards), ...Object.keys(canvas.notes ?? {})];
76
+ return [...new Set(ids)].flatMap((id) => endOf(canvas, page, id) ?? []);
77
+ }
78
+ function sidePoint(rect2, side, offset) {
79
+ if (side === "left") return { x: rect2.x, y: centerY(rect2) + offset };
80
+ if (side === "right") return { x: rect2.x + rect2.w, y: centerY(rect2) + offset };
81
+ if (side === "top") return { x: centerX(rect2) + offset, y: rect2.y };
82
+ return { x: centerX(rect2) + offset, y: rect2.y + rect2.h };
83
+ }
84
+ function segmentHits(a, b, rect2) {
85
+ const minX = Math.min(a.x, b.x);
86
+ const maxX = Math.max(a.x, b.x);
87
+ const minY = Math.min(a.y, b.y);
88
+ const maxY = Math.max(a.y, b.y);
89
+ if (minY === maxY) {
90
+ return minY > rect2.y && minY < rect2.y + rect2.h && minX < rect2.x + rect2.w && maxX > rect2.x;
91
+ }
92
+ return minX > rect2.x && minX < rect2.x + rect2.w && minY < rect2.y + rect2.h && maxY > rect2.y;
93
+ }
94
+ function crossed(points2, obstacles, skip) {
95
+ return obstacles.filter(
96
+ (obstacle) => !skip.has(obstacle.id) && points2.some(
97
+ (point, index) => index + 1 < points2.length && segmentHits(point, points2[index + 1], obstacle.rect)
98
+ )
99
+ ).map((obstacle) => obstacle.id);
100
+ }
101
+ function build(plan, fromOffset, toOffset) {
102
+ const start = sidePoint(plan.from.rect, plan.fromSide, fromOffset);
103
+ const end = sidePoint(plan.to.rect, plan.toSide, toOffset);
104
+ if (horizontal(plan.fromSide) !== horizontal(plan.toSide)) {
105
+ const corner = horizontal(plan.fromSide) ? { x: end.x, y: start.y } : { x: start.x, y: end.y };
106
+ return [start, corner, end];
107
+ }
108
+ if (horizontal(plan.fromSide)) {
109
+ if (Math.abs(start.y - end.y) < 0.5) return [start, { x: end.x, y: start.y }];
110
+ const mid2 = (start.x + end.x) / 2;
111
+ return [start, { x: mid2, y: start.y }, { x: mid2, y: end.y }, end];
112
+ }
113
+ if (Math.abs(start.x - end.x) < 0.5) return [start, { x: start.x, y: end.y }];
114
+ const mid = (start.y + end.y) / 2;
115
+ return [start, { x: start.x, y: mid }, { x: end.x, y: mid }, end];
116
+ }
117
+ function chooseSides(from, to, obstacles) {
118
+ const a = from.rect;
119
+ const b = to.rect;
120
+ const right = centerX(b) >= centerX(a);
121
+ const below = centerY(b) >= centerY(a);
122
+ if (a.y < b.y + b.h && b.y < a.y + a.h) return right ? ["right", "left"] : ["left", "right"];
123
+ if (a.x < b.x + b.w && b.x < a.x + a.w) return below ? ["bottom", "top"] : ["top", "bottom"];
124
+ const turns = [
125
+ [right ? "right" : "left", below ? "top" : "bottom"],
126
+ [below ? "bottom" : "top", right ? "left" : "right"]
127
+ ];
128
+ const skip = /* @__PURE__ */ new Set([from.id, to.id]);
129
+ const cost = ([fromSide, toSide], index) => {
130
+ const points2 = build({ from, to, fromSide, toSide }, 0, 0);
131
+ const overBoardTop = fromSide === "top" && from.board || toSide === "top" && to.board;
132
+ const preferred = index === (from.board ? 0 : 1);
133
+ return crossed(points2, obstacles, skip).length * 100 + (overBoardTop ? 10 : 0) + (preferred ? 0 : 1);
134
+ };
135
+ return cost(turns[0], 0) <= cost(turns[1], 1) ? turns[0] : turns[1];
136
+ }
137
+ function slotOffsets(plans) {
138
+ const groups = /* @__PURE__ */ new Map();
139
+ for (const plan of plans) {
140
+ for (const [role, own, side, other] of [
141
+ ["from", plan.from, plan.fromSide, plan.to],
142
+ ["to", plan.to, plan.toSide, plan.from]
143
+ ]) {
144
+ const group = `${own.id}
145
+ ${side}`;
146
+ const flat = horizontal(side);
147
+ const members = groups.get(group) ?? [];
148
+ members.push({
149
+ key: `${plan.id}
150
+ ${role}`,
151
+ edge: plan.id,
152
+ along: flat ? centerY(other.rect) : centerX(other.rect),
153
+ length: flat ? own.rect.h : own.rect.w
154
+ });
155
+ groups.set(group, members);
156
+ }
157
+ }
158
+ const slots = /* @__PURE__ */ new Map();
159
+ for (const members of groups.values()) {
160
+ members.sort((p, q) => p.along - q.along || (p.edge < q.edge ? -1 : 1));
161
+ const length = members[0].length;
162
+ const gap = Math.min(SLOT_GAP, length / (members.length + 1));
163
+ members.forEach((member, index) => {
164
+ slots.set(member.key, {
165
+ offset: (index - (members.length - 1) / 2) * gap,
166
+ size: members.length,
167
+ limit: length / 2 - gap / 2
168
+ });
169
+ });
170
+ }
171
+ return slots;
172
+ }
173
+ function labelFor(plan, points2, obstacles) {
174
+ const text2 = plan.label?.trim();
175
+ if (!text2) return null;
176
+ const branch = !plan.from.board;
177
+ const size = branch ? FLOW_BRANCH_FONT_SIZE : FLOW_LABEL_FONT_SIZE;
178
+ const w = Math.ceil(textWidth(text2, size) + FLOW_LABEL_PAD * 2);
179
+ const h = Math.ceil(size * LABEL_LINE);
180
+ const roomAt = (x, y, flat, length) => {
181
+ let room = flat ? length - LABEL_CLEARANCE * 2 : ROOM_LIMIT;
182
+ const band = { x: x - ROOM_LIMIT / 2, y: y - h / 2, w: ROOM_LIMIT, h };
183
+ for (const { rect: rect2 } of obstacles) {
184
+ if (!intersects(band, rect2)) continue;
185
+ const gap = rect2.x >= x ? rect2.x - x : x >= rect2.x + rect2.w ? x - (rect2.x + rect2.w) : 0;
186
+ room = Math.min(room, gap * 2 - LABEL_CLEARANCE);
187
+ }
188
+ return Math.max(0, room);
189
+ };
190
+ const segments = points2.slice(0, -1).map((a, index) => {
191
+ const b = points2[index + 1];
192
+ return { a, b, flat: a.y === b.y, length: Math.abs(a.x - b.x) + Math.abs(a.y - b.y) };
193
+ }).sort((p, q) => q.length - p.length);
194
+ let best = null;
195
+ for (const { a, b, flat, length } of segments) {
196
+ const x = (a.x + b.x) / 2;
197
+ const y = (a.y + b.y) / 2;
198
+ const fitsAlong = flat || length >= h + LABEL_CLEARANCE * 2;
199
+ const room = fitsAlong ? roomAt(x, y, flat, length) : 0;
200
+ const label = { text: text2, branch, x, y, w, h, room };
201
+ if (room >= w) return label;
202
+ if (!best || room > best.room) best = label;
203
+ }
204
+ return best;
205
+ }
206
+ function routeFlow(canvas, page) {
207
+ const edges = Object.entries(canvas.edges ?? {});
208
+ if (edges.length === 0) return [];
209
+ const obstacles = obstaclesOn(canvas, page);
210
+ const plans = [];
211
+ for (const [id, edge] of edges) {
212
+ if (edge.from === edge.to) continue;
213
+ const from = endOf(canvas, page, edge.from);
214
+ const to = endOf(canvas, page, edge.to);
215
+ if (!from || !to) continue;
216
+ const [fromSide, toSide] = chooseSides(from, to, obstacles);
217
+ plans.push({ id, from, to, fromSide, toSide, label: edge.label });
218
+ }
219
+ const slots = slotOffsets(plans);
220
+ return plans.map((plan) => {
221
+ const fromSlot = slots.get(`${plan.id}
222
+ from`);
223
+ const toSlot = slots.get(`${plan.id}
224
+ to`);
225
+ let fromOffset = fromSlot.offset;
226
+ let toOffset = toSlot.offset;
227
+ const flat = horizontal(plan.fromSide);
228
+ const facing = flat === horizontal(plan.toSide);
229
+ const aligned = facing && (flat ? Math.abs(centerY(plan.from.rect) - centerY(plan.to.rect)) < 0.5 : Math.abs(centerX(plan.from.rect) - centerX(plan.to.rect)) < 0.5);
230
+ if (aligned && fromOffset !== toOffset) {
231
+ const fromLeads = fromSlot.size >= toSlot.size;
232
+ const shared = fromLeads ? fromOffset : toOffset;
233
+ if (Math.abs(shared) <= (fromLeads ? toSlot : fromSlot).limit) {
234
+ fromOffset = shared;
235
+ toOffset = shared;
236
+ }
237
+ }
238
+ const points2 = build(plan, fromOffset, toOffset);
239
+ return { id: plan.id, points: points2, label: labelFor(plan, points2, obstacles) };
240
+ });
241
+ }
242
+
1
243
  // src/shared/whiteboard/thumbnail.ts
2
244
  var W = 600;
3
245
  var H = 360;
@@ -224,6 +466,35 @@ function box(value) {
224
466
  const b = object(value);
225
467
  return [b.x, b.y, b.w, b.h].every(number) && b.w > 0 && b.h > 0 ? b : null;
226
468
  }
469
+ function flowCanvas(canvas, page) {
470
+ const boards = {};
471
+ for (const [id, value] of Object.entries(object(canvas.boards)).slice(0, 2e3)) {
472
+ const b = box(value);
473
+ if (!b || object(value).page !== page) continue;
474
+ boards[id] = { x: b.x, y: b.y, w: b.w, h: b.h, page, file: "" };
475
+ }
476
+ const notes = {};
477
+ for (const [id, value] of Object.entries(object(canvas.notes)).slice(0, 200)) {
478
+ const note = object(value);
479
+ if (note.kind !== "condition" || note.page !== page) continue;
480
+ if (!number(note.x) || !number(note.y)) continue;
481
+ notes[id] = {
482
+ kind: "condition",
483
+ page,
484
+ x: note.x,
485
+ y: note.y,
486
+ text: string(note.text).slice(0, 200)
487
+ };
488
+ }
489
+ const edges = {};
490
+ for (const [id, value] of Object.entries(object(canvas.edges)).slice(0, 200)) {
491
+ const edge = object(value);
492
+ if (typeof edge.from === "string" && typeof edge.to === "string") {
493
+ edges[id] = { from: edge.from, to: edge.to };
494
+ }
495
+ }
496
+ return { version: 1, pages: [{ id: page, name: page }], boards, notes, edges };
497
+ }
227
498
  function artboardDrawing(payload) {
228
499
  const canvas = object(payload.canvas);
229
500
  const page = string(canvas.activePage) || string(children(canvas.pages)[0]?.id);
@@ -265,6 +536,11 @@ function artboardDrawing(payload) {
265
536
  )
266
537
  );
267
538
  }
539
+ for (const route of routeFlow(flowCanvas(canvas, page), page)) {
540
+ shapes.push(
541
+ `<polyline points="${route.points.map((point) => `${point.x},${point.y}`).join(" ")}" fill="none" stroke="var(--muted)" stroke-width="1" vector-effect="non-scaling-stroke"/>`
542
+ );
543
+ }
268
544
  for (const board of boards) {
269
545
  const b = box(board);
270
546
  shapes.push(rect(b.x, b.y, b.w, b.h, "var(--paper)", "var(--border)"));
@@ -282,7 +558,11 @@ function artboardDrawing(payload) {
282
558
  for (const [id, value] of Object.entries(object(canvas.notes)).slice(0, 200)) {
283
559
  const note = object(value), b = box(noteRects[id]);
284
560
  if (note.page !== page || !b) continue;
285
- if (note.kind === "sticky") {
561
+ if (note.kind === "condition") {
562
+ shapes.push(
563
+ `<rect x="${b.x}" y="${b.y}" width="${b.w}" height="${b.h}" rx="${b.h / 2}" fill="var(--paper)" stroke="var(--muted)"/>`
564
+ );
565
+ } else if (note.kind === "sticky") {
286
566
  const color = /^#[\da-f]{3}(?:[\da-f]{3})?$/i.test(string(note.color)) ? string(note.color) : "#f0e2ad";
287
567
  shapes.push(rect(b.x, b.y, b.w, b.h, color));
288
568
  if (b.w * scale > 35)
@@ -1,4 +1,4 @@
1
- import "./ReadOnlyWhiteboard-BIrh4itZ.js";
1
+ import "./ReadOnlyWhiteboard-CmKjtHFJ.js";
2
2
  // ../../node_modules/.pnpm/@excalidraw+excalidraw@0.18.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react_a25c1476b9f79f7d7934d7242f2f9a82/node_modules/@excalidraw/excalidraw/dist/prod/locales/tr-TR-DEFEU3FU.js
3
3
  var e = {
4
4
  paste: "Yapıştır",
@@ -0,0 +1,24 @@
1
+ import type { Point } from './arrange';
2
+ import type { CanvasSpec } from './types';
3
+ export declare const FLOW_STROKE = 4;
4
+ export declare const FLOW_RADIUS = 32;
5
+ export declare const FLOW_LABEL_FONT_SIZE = 32;
6
+ export declare const FLOW_BRANCH_FONT_SIZE = 28;
7
+ export declare const FLOW_LABEL_PAD = 16;
8
+ export interface FlowLabel {
9
+ branch: boolean;
10
+ h: number;
11
+ room: number;
12
+ text: string;
13
+ w: number;
14
+ x: number;
15
+ y: number;
16
+ }
17
+ export interface FlowRoute {
18
+ id: string;
19
+ label: FlowLabel | null;
20
+ points: Point[];
21
+ }
22
+ export declare function routeFlow(canvas: CanvasSpec, page: string): FlowRoute[];
23
+ export declare function flowPath(points: Point[], radius: number): string;
24
+ export declare function flowNotices(canvas: CanvasSpec): string[];
@@ -8,9 +8,16 @@ export declare const STICKY_DEFAULT_W = 240;
8
8
  export declare const STICKY_FONT_SIZE = 18;
9
9
  export declare const STICKY_LINE_H = 27;
10
10
  export declare const STICKY_PAD = 16;
11
+ export declare const CONDITION_H = 96;
12
+ export declare const CONDITION_FONT_SIZE = 40;
13
+ export declare const CONDITION_PAD = 40;
14
+ export declare const CONDITION_GLYPH = 28;
15
+ export declare const CONDITION_GLYPH_GAP = 16;
16
+ export declare function textWidth(text: string, fontSize: number): number;
11
17
  export declare function groupFrame(group: GroupSpec, boards: Record<string, BoardSpec>): (Rect & {
12
18
  page: string;
13
19
  }) | null;
20
+ export declare const conditionWidth: (text: string) => number;
14
21
  export declare function noteRect(note: NoteSpec): Rect;
15
22
  export declare function computeLayout(canvas: CanvasSpec): CanvasLayout;
16
23
  export declare const intersects: (a: Rect, b: Rect) => boolean;
@@ -46,7 +46,7 @@ export interface GroupSpec {
46
46
  }
47
47
  export interface NoteSpec {
48
48
  color?: string;
49
- kind: 'title' | 'sticky';
49
+ kind: 'title' | 'sticky' | 'condition';
50
50
  page: string;
51
51
  size?: number;
52
52
  text: string;
@@ -54,6 +54,11 @@ export interface NoteSpec {
54
54
  x: number;
55
55
  y: number;
56
56
  }
57
+ export interface EdgeSpec {
58
+ from: string;
59
+ label?: string;
60
+ to: string;
61
+ }
57
62
  export interface FocusSpec {
58
63
  at: string;
59
64
  target: string;
@@ -62,6 +67,7 @@ export interface CanvasSpec {
62
67
  activePage?: string;
63
68
  boards: Record<string, BoardSpec>;
64
69
  building?: boolean;
70
+ edges?: Record<string, EdgeSpec>;
65
71
  focus?: FocusSpec;
66
72
  groups?: Record<string, GroupSpec>;
67
73
  notes?: Record<string, NoteSpec>;
@@ -1,5 +1,6 @@
1
1
  import { type CanvasSpec } from './types';
2
2
  export declare function structuralWarnings(raw: unknown): string[];
3
+ export declare const MAX_EDGE_LABEL = 32;
3
4
  export declare function slugTitleWarning(field: string, title: string, artifact: string | undefined): string | null;
4
5
  export declare function validateCanvas(raw: unknown, fileExists: (file: string) => boolean, options?: {
5
6
  artifact?: string;
@@ -1,4 +1,4 @@
1
- export type BoardPlaceholderState = 'waiting' | 'drawing' | 'opening';
1
+ export type BoardPlaceholderState = 'waiting' | 'drawing' | 'opening' | 'resting';
2
2
  export declare function BoardPlaceholder({ agent, state, title, }: {
3
3
  agent: string;
4
4
  state: BoardPlaceholderState;
@@ -0,0 +1,12 @@
1
+ import { type Ref } from 'react';
2
+ import { type BoardSpec } from '../../shared/types';
3
+ import type { View } from '../lib/view';
4
+ export declare function BoardsOverview({ boards, overlayRef, size, view, }: {
5
+ boards: [string, BoardSpec][];
6
+ overlayRef: Ref<HTMLDivElement>;
7
+ size: {
8
+ width: number;
9
+ height: number;
10
+ };
11
+ view: View;
12
+ }): import("react").JSX.Element;
@@ -1,9 +1,10 @@
1
1
  import { type Ref } from 'react';
2
2
  import type { AgentSession } from '../../shared/agent-status';
3
+ import type { FlowRoute } from '../../shared/flow';
3
4
  import { type BoardSpec, type NoteSpec } from '../../shared/types';
4
5
  import type { Inspector } from '../hooks/useInspector';
5
6
  import type { BoardPhase } from '../lib/board-lifecycle';
6
- import { type View } from '../lib/view';
7
+ import type { View } from '../lib/view';
7
8
  interface BoardsProps {
8
9
  active?: string;
9
10
  agent: string;
@@ -12,6 +13,7 @@ interface BoardsProps {
12
13
  boardSandbox?: string;
13
14
  contentBase: string;
14
15
  culled?: ReadonlySet<string>;
16
+ distant?: ReadonlySet<string>;
15
17
  frameLoaded: Inspector['loaded'];
16
18
  frameRef: Inspector['refFor'];
17
19
  gesturing?: boolean;
@@ -34,9 +36,10 @@ interface CanvasProps extends Omit<BoardsProps, 'active' | 'agent'> {
34
36
  artifact?: string | null;
35
37
  live?: boolean;
36
38
  notes: [string, NoteSpec][];
39
+ routes?: FlowRoute[];
37
40
  titleRooms?: Record<string, number>;
38
41
  view: View;
39
42
  worldRef?: Ref<HTMLDivElement>;
40
43
  }
41
- export declare function Canvas({ boardBase, boardSandbox, view, worldRef, phases, images, culled, gesturing, boards, notes, titleRooms, contentBase, versions, pending, playing, replays, inspecting, frameRef, frameLoaded, live, writing, agent, agentSessions, artifact, updated, onExpand, }: CanvasProps): import("react").JSX.Element;
44
+ export declare function Canvas({ boardBase, boardSandbox, view, worldRef, phases, images, culled, distant, gesturing, boards, notes, routes, titleRooms, contentBase, versions, pending, playing, replays, inspecting, frameRef, frameLoaded, live, writing, agent, agentSessions, artifact, updated, onExpand, }: CanvasProps): import("react").JSX.Element;
42
45
  export {};
@@ -0,0 +1,6 @@
1
+ import type { NoteSpec } from '../../shared/types';
2
+ export declare function CanvasNotes({ notes, titleRooms, zoom, }: {
3
+ notes: [string, NoteSpec][];
4
+ titleRooms?: Record<string, number>;
5
+ zoom: number;
6
+ }): import("react").JSX.Element[];
@@ -5,9 +5,10 @@ interface BoardCounts {
5
5
  uncapturable: number;
6
6
  unloaded: number;
7
7
  }
8
- export declare function DebugHud({ counts, culled, gesturing, }: {
8
+ export declare function DebugHud({ counts, culled, distant, gesturing, }: {
9
9
  counts: BoardCounts;
10
10
  culled: number;
11
+ distant?: number;
11
12
  gesturing: boolean;
12
13
  }): import("react").JSX.Element;
13
14
  export {};
@@ -0,0 +1,9 @@
1
+ import { type FlowRoute } from '../../shared/flow';
2
+ import type { NoteSpec } from '../../shared/types';
3
+ export declare const FlowLayer: import("react").MemoExoticComponent<({ routes }: {
4
+ routes: FlowRoute[];
5
+ }) => import("react").JSX.Element>;
6
+ export declare function ConditionNote({ id, note }: {
7
+ id: string;
8
+ note: NoteSpec;
9
+ }): import("react").JSX.Element;
@@ -13,6 +13,7 @@ interface LabelsProps {
13
13
  boards: [string, BoardSpec][];
14
14
  choices?: Pick<Choices, 'boardChoice' | 'choose' | 'chosenBoards'>;
15
15
  contentBase: string;
16
+ culled?: ReadonlySet<string>;
16
17
  groups: [string, GroupSpec][];
17
18
  onExpand: (id: string) => void;
18
19
  onReplay: (id: string) => void;
@@ -28,5 +29,5 @@ interface LabelsProps {
28
29
  versions: Record<string, number>;
29
30
  view: View;
30
31
  }
31
- export declare function Labels({ view, artboard, backlinks, boards, groups, allBoards, contentBase, versions, pending, playing, selected, onExpand, onTogglePlay, onReplay, parameters, activeParameters, onToggleParameters, updates, verdicts, choices, overlayRef, }: LabelsProps): import("react").JSX.Element;
32
+ export declare function Labels({ view, artboard, backlinks, boards, culled, groups, allBoards, contentBase, versions, pending, playing, selected, onExpand, onTogglePlay, onReplay, parameters, activeParameters, onToggleParameters, updates, verdicts, choices, overlayRef, }: LabelsProps): import("react").JSX.Element;
32
33
  export {};
@@ -95,7 +95,7 @@ export declare const tocStyles: Readonly<{
95
95
  readonly font: stylex.StyleXClassNameFor<"font", "inherit">;
96
96
  readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "start">;
97
97
  readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
98
- readonly transition: stylex.StyleXClassNameFor<"transition", "opacity 200ms cubic-bezier(.2, 0, 0, 1)">;
98
+ readonly transition: stylex.StyleXClassNameFor<"transition", "opacity 200ms cubic-bezier(.2, 0, 0, 1)" | "opacity 200ms cubic-bezier(.2, 0, 0, 1), height 200ms cubic-bezier(.2, 0, 0, 1), font-size 200ms cubic-bezier(.2, 0, 0, 1)">;
99
99
  readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", 2>;
100
100
  readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "solid">;
101
101
  readonly outlineOffset: stylex.StyleXClassNameFor<"outlineOffset", -1>;
@@ -130,6 +130,29 @@ export declare const tocStyles: Readonly<{
130
130
  readonly color: stylex.StyleXClassNameFor<"color", string>;
131
131
  readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
132
132
  }>;
133
+ readonly fold: Readonly<{
134
+ readonly display: stylex.StyleXClassNameFor<"display", "grid">;
135
+ readonly gridTemplateRows: stylex.StyleXClassNameFor<"gridTemplateRows", "0fr">;
136
+ readonly visibility: stylex.StyleXClassNameFor<"visibility", "hidden">;
137
+ readonly opacity: stylex.StyleXClassNameFor<"opacity", 0>;
138
+ readonly transition: stylex.StyleXClassNameFor<"transition", "grid-template-rows 180ms cubic-bezier(.2, 0, 0, 1), opacity 120ms linear, visibility 0s 180ms" | "none">;
139
+ }>;
140
+ readonly foldOpen: Readonly<{
141
+ readonly gridTemplateRows: stylex.StyleXClassNameFor<"gridTemplateRows", "1fr">;
142
+ readonly visibility: stylex.StyleXClassNameFor<"visibility", "visible">;
143
+ readonly opacity: stylex.StyleXClassNameFor<"opacity", 1>;
144
+ readonly transition: stylex.StyleXClassNameFor<"transition", "grid-template-rows 220ms cubic-bezier(.2, 0, 0, 1), opacity 200ms linear 40ms, visibility 0s" | "none">;
145
+ }>;
146
+ readonly foldRows: Readonly<{
147
+ readonly minHeight: stylex.StyleXClassNameFor<"minHeight", 0>;
148
+ readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
149
+ readonly transform: stylex.StyleXClassNameFor<"transform", "translateY(-4px)">;
150
+ readonly transition: stylex.StyleXClassNameFor<"transition", "none" | "transform 180ms cubic-bezier(.2, 0, 0, 1)">;
151
+ }>;
152
+ readonly foldRowsOpen: Readonly<{
153
+ readonly transform: stylex.StyleXClassNameFor<"transform", "none">;
154
+ readonly transition: stylex.StyleXClassNameFor<"transition", "none" | "transform 220ms cubic-bezier(.2, 0, 0, 1)">;
155
+ }>;
133
156
  readonly fadeNear: Readonly<{
134
157
  readonly opacity: stylex.StyleXClassNameFor<"opacity", 0.85>;
135
158
  }>;
@@ -1,10 +1,11 @@
1
1
  import { type BoardSpec } from '../../shared/types';
2
- import { type BoardPhase } from '../lib/board-lifecycle';
2
+ import { type BoardPhase, createBoardLifecycle } from '../lib/board-lifecycle';
3
3
  import type { View } from '../lib/view';
4
4
  interface Options {
5
5
  active: ReadonlySet<string>;
6
6
  boards: [string, BoardSpec][];
7
7
  gesturing: boolean;
8
+ limits?: Parameters<typeof createBoardLifecycle>[0];
8
9
  pending: ReadonlySet<string>;
9
10
  versions: Record<string, number>;
10
11
  view: View;
@@ -13,7 +14,7 @@ interface Options {
13
14
  height: number;
14
15
  };
15
16
  }
16
- export declare function useBoardLifecycle({ boards, versions, pending, view, viewport, active, gesturing, }: Options): {
17
+ export declare function useBoardLifecycle({ boards, versions, pending, view, viewport, active, gesturing, limits, }: Options): {
17
18
  phases: Map<string, BoardPhase>;
18
19
  images: ReadonlyMap<string, string>;
19
20
  frameRef: (id: string) => (element: HTMLIFrameElement | null) => void;
@@ -4,3 +4,4 @@ export declare function useCulledBoards(boards: [string, BoardSpec][], view: Vie
4
4
  width: number;
5
5
  height: number;
6
6
  }): ReadonlySet<string>;
7
+ export declare function useDistantBoards(boards: [string, BoardSpec][], zoom: number): ReadonlySet<string>;
@@ -2,6 +2,11 @@ import type { View } from './view';
2
2
  export declare const IDLE_UNLOAD_MS = 300000;
3
3
  export declare const READY_TIMEOUT_MS = 8000;
4
4
  export declare const CAPTURE_TIMEOUT_MS = 10000;
5
+ export declare const MAX_LIVE = 24;
6
+ export declare const MIN_LIVE_PX = 96;
7
+ export declare const SETTLE_MS = 1000;
8
+ export declare const TOUCH_HOLD_MS = 30000;
9
+ export declare const MAX_SNAPSHOTS = 600;
5
10
  export type BoardPhase = 'mounted' | 'capturing' | 'unloaded' | 'restoring';
6
11
  export interface LifecycleBoard {
7
12
  h: number;
@@ -23,6 +28,7 @@ export interface LifecycleInput {
23
28
  }
24
29
  export interface LifecycleOutput {
25
30
  capture: string[];
31
+ forget: string[];
26
32
  phases: Map<string, BoardPhase>;
27
33
  uncapturable: ReadonlySet<string>;
28
34
  wakeAt: number | null;
@@ -30,12 +36,18 @@ export interface LifecycleOutput {
30
36
  interface Options {
31
37
  captureTimeoutMs?: number;
32
38
  idleMs?: number;
39
+ maxLive?: number;
40
+ maxSnapshots?: number;
41
+ minLivePx?: number;
33
42
  now?: () => number;
34
43
  readyTimeoutMs?: number;
44
+ settleMs?: number;
45
+ touchHoldMs?: number;
35
46
  }
36
- export declare function createBoardLifecycle({ now, idleMs, readyTimeoutMs, captureTimeoutMs, }?: Options): {
47
+ export declare function createBoardLifecycle({ now, idleMs, readyTimeoutMs, captureTimeoutMs, maxLive, minLivePx, settleMs, touchHoldMs, maxSnapshots, }?: Options): {
37
48
  update({ boards, view, viewport, active, gesturing }: LifecycleInput): LifecycleOutput;
38
49
  touch(id: string): void;
50
+ changed(id: string): void;
39
51
  captured(id: string, { version, ok }: {
40
52
  version: number;
41
53
  ok: boolean;
@@ -11,4 +11,5 @@ export declare function culledBoards(boards: Box[], view: View, viewport: {
11
11
  width: number;
12
12
  height: number;
13
13
  }, margin?: number): Set<string>;
14
+ export declare function distantBoards(boards: Pick<Box, 'id' | 'w'>[], zoom: number, minPx?: number): Set<string>;
14
15
  export {};
@@ -0,0 +1,15 @@
1
+ import type { View } from './view';
2
+ interface Box {
3
+ h: number;
4
+ w: number;
5
+ x: number;
6
+ y: number;
7
+ }
8
+ export declare function overviewRects(boards: Box[], view: View, viewport: {
9
+ width: number;
10
+ height: number;
11
+ }, { bleed, minPx }: {
12
+ bleed: number;
13
+ minPx?: number;
14
+ }): Box[];
15
+ export {};
@@ -1,4 +1,4 @@
1
- import "./ReadOnlyWhiteboard-BIrh4itZ.js";
1
+ import "./ReadOnlyWhiteboard-CmKjtHFJ.js";
2
2
  // ../../node_modules/.pnpm/@excalidraw+excalidraw@0.18.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react_a25c1476b9f79f7d7934d7242f2f9a82/node_modules/@excalidraw/excalidraw/dist/prod/locales/uk-UA-QMV73CPH.js
3
3
  var e = {
4
4
  paste: "Вставити",
@@ -1,4 +1,4 @@
1
- import "./ReadOnlyWhiteboard-BIrh4itZ.js";
1
+ import "./ReadOnlyWhiteboard-CmKjtHFJ.js";
2
2
  // ../../node_modules/.pnpm/@excalidraw+excalidraw@0.18.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react_a25c1476b9f79f7d7934d7242f2f9a82/node_modules/@excalidraw/excalidraw/dist/prod/locales/vi-VN-M7AON7JQ.js
3
3
  var e = {
4
4
  paste: "Dán",
@@ -1,4 +1,4 @@
1
- import { Wn as e } from "./SnapshotDocument-DxFquEK9.js";
1
+ import { Wn as e } from "./SnapshotDocument-BSkLVGik.js";
2
2
  // ../../node_modules/.pnpm/@haklex+rich-editor@0.65.6_@base-ui+react@1.9.0_@types+react@19.3.0_date-fns@4.4.0_reac_28502dcbf73ea80bb71f06853bca3c79/node_modules/@haklex/rich-editor/dist/viewport-CFJHn_Y6.js
3
3
  function t(e, t) {
4
4
  return Math.max(0, e, t) + Math.min(0, e, t);
@@ -1,4 +1,4 @@
1
- import "./ReadOnlyWhiteboard-BIrh4itZ.js";
1
+ import "./ReadOnlyWhiteboard-CmKjtHFJ.js";
2
2
  // ../../node_modules/.pnpm/@excalidraw+excalidraw@0.18.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react_a25c1476b9f79f7d7934d7242f2f9a82/node_modules/@excalidraw/excalidraw/dist/prod/locales/zh-CN-LNUGB5OW.js
3
3
  var e = {
4
4
  paste: "粘贴",
@@ -1,4 +1,4 @@
1
- import "./ReadOnlyWhiteboard-BIrh4itZ.js";
1
+ import "./ReadOnlyWhiteboard-CmKjtHFJ.js";
2
2
  // ../../node_modules/.pnpm/@excalidraw+excalidraw@0.18.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react_a25c1476b9f79f7d7934d7242f2f9a82/node_modules/@excalidraw/excalidraw/dist/prod/locales/zh-HK-E62DVLB3.js
3
3
  var e = {
4
4
  paste: "貼上",