@diagrammo/dgmo 0.64.0 → 0.65.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/LICENSE +1 -1
  2. package/dist/advanced.js +71 -71
  3. package/dist/block.js +15 -15
  4. package/dist/chart-meta.js +3 -3
  5. package/dist/{charts-d3-ZTXJWEHI.js → charts-d3-I6OE5K3B.js} +9 -9
  6. package/dist/{chunk-C6DMG2V6.js → chunk-27YPE7NO.js} +28 -12
  7. package/dist/{chunk-RBAW7VUG.js → chunk-2EPV7CLY.js} +5 -7
  8. package/dist/{chunk-SCJ7CAJF.js → chunk-3HOCNSPD.js} +2 -2
  9. package/dist/{chunk-Z2ADWRSW.js → chunk-3PSPUYT5.js} +3 -3
  10. package/dist/{chunk-RBBJIHNL.js → chunk-4IE42ODL.js} +11 -11
  11. package/dist/{chunk-SMCUX42K.js → chunk-4TM7MWU4.js} +7 -6
  12. package/dist/{chunk-H3HFC3SQ.js → chunk-5GM6BZO7.js} +3 -3
  13. package/dist/{chunk-7T3A2UK3.js → chunk-5T7K6QND.js} +15 -16
  14. package/dist/{chunk-NKRCPBTJ.js → chunk-6BOPYGJC.js} +6 -6
  15. package/dist/{chunk-37EHGTQ2.js → chunk-6E5YZR4S.js} +18 -16
  16. package/dist/{chunk-MHI6W6XS.js → chunk-6IUL6LER.js} +10 -7
  17. package/dist/{chunk-S5RWWISJ.js → chunk-7L53J53J.js} +4 -4
  18. package/dist/{chunk-WDJ4HAGO.js → chunk-A6CTYC7O.js} +2 -2
  19. package/dist/{chunk-CDMF7P5A.js → chunk-BBCKUAUR.js} +2 -2
  20. package/dist/{chunk-AA4M6F2P.js → chunk-BBY57XAA.js} +3 -3
  21. package/dist/{chunk-NKRVFQGO.js → chunk-BDI25HWH.js} +18 -6
  22. package/dist/{chunk-SVR3YFM3.js → chunk-C666LP3O.js} +20 -15
  23. package/dist/{chunk-KRTO7NRK.js → chunk-D2WHS23S.js} +2 -2
  24. package/dist/{chunk-LYTEVE2N.js → chunk-DBF4IM4U.js} +20 -15
  25. package/dist/{chunk-PCWPYOT4.js → chunk-ET4R3AU5.js} +4 -4
  26. package/dist/{chunk-2KOBOIB2.js → chunk-FBD5ASMB.js} +2 -2
  27. package/dist/{chunk-ES66QH6J.js → chunk-FG24NXKN.js} +2 -2
  28. package/dist/{chunk-3CIOJ5YJ.js → chunk-FJ57274M.js} +3 -1
  29. package/dist/{chunk-6BVIZW5N.js → chunk-FLFBY5GN.js} +14 -12
  30. package/dist/{chunk-XUN3MIO3.js → chunk-G64OVYUT.js} +2 -2
  31. package/dist/{chunk-RQL25P3U.js → chunk-G7QZF6T3.js} +9 -9
  32. package/dist/{chunk-IGIJZHB6.js → chunk-GC7CBX6C.js} +6 -6
  33. package/dist/{chunk-B6AONGTI.js → chunk-GDQN2TPX.js} +21 -14
  34. package/dist/{chunk-CZUSH6NI.js → chunk-GMLSYNFP.js} +10 -9
  35. package/dist/{chunk-R6HCNSP6.js → chunk-GOW5VO6M.js} +2 -2
  36. package/dist/{chunk-SPHC4RYF.js → chunk-GXOMKWQ5.js} +10 -9
  37. package/dist/{chunk-MQHOKBJ6.js → chunk-IJ4FUFTR.js} +5 -5
  38. package/dist/{chunk-V3UQSKWJ.js → chunk-IJSFEU4J.js} +9 -9
  39. package/dist/{chunk-LSFZDBAP.js → chunk-IKHV5IJB.js} +2 -2
  40. package/dist/{chunk-LMXAB4YM.js → chunk-IZ6RWMBM.js} +9 -9
  41. package/dist/{chunk-6VJCURWU.js → chunk-J2EXBAPZ.js} +4 -5
  42. package/dist/{chunk-IX6N5MCY.js → chunk-JCL4K7AK.js} +12 -11
  43. package/dist/{chunk-OBKM6GIJ.js → chunk-JTUDM7S4.js} +10 -10
  44. package/dist/{chunk-CVVICCSB.js → chunk-L65WI4HO.js} +4 -4
  45. package/dist/{chunk-67D4MN2H.js → chunk-LK6LTSLH.js} +2 -2
  46. package/dist/{chunk-KOHIF4LD.js → chunk-MBODBL7C.js} +6 -5
  47. package/dist/chunk-MTGGOCND.js +638 -0
  48. package/dist/{chunk-VJARCVMH.js → chunk-MU3CJPJF.js} +2 -2
  49. package/dist/{chunk-RKTIIU7Z.js → chunk-N6XI5VTA.js} +4 -4
  50. package/dist/{chunk-ODUT5WMC.js → chunk-NVOU7N6C.js} +2 -2
  51. package/dist/{chunk-T4QXHE34.js → chunk-OWUWLZJT.js} +13 -11
  52. package/dist/{chunk-LDVUPGWC.js → chunk-OWVDD5EC.js} +2 -2
  53. package/dist/{chunk-M4HYPDER.js → chunk-P5OCINCI.js} +8 -8
  54. package/dist/{chunk-JU2VMFYC.js → chunk-PZOFMBF3.js} +2 -2
  55. package/dist/{chunk-YLK3JNWP.js → chunk-QNCXONBR.js} +2 -2
  56. package/dist/{chunk-DB2KQ5DN.js → chunk-QRWY5QTA.js} +5 -5
  57. package/dist/{chunk-I2ATN25N.js → chunk-R4XM44BW.js} +25 -16
  58. package/dist/{chunk-DJCZWQ2A.js → chunk-RTTZIX34.js} +4 -4
  59. package/dist/{chunk-OMTBYLKN.js → chunk-TPKNA2U5.js} +9 -7
  60. package/dist/{chunk-DN5HEDE4.js → chunk-TT5B36WO.js} +16 -20
  61. package/dist/{chunk-SF3JAWMY.js → chunk-TWILCDUE.js} +3 -3
  62. package/dist/{chunk-NIZM3LAG.js → chunk-UINRIO77.js} +10 -10
  63. package/dist/{chunk-5H2LIQIH.js → chunk-UJXCDF4E.js} +4 -4
  64. package/dist/{chunk-Z5ID35YP.js → chunk-UTCPNJND.js} +2 -4
  65. package/dist/{chunk-U42ZEK7L.js → chunk-V4BYBIBU.js} +24 -15
  66. package/dist/{chunk-L4IN4OBB.js → chunk-VLI5SYXW.js} +7 -7
  67. package/dist/{chunk-43E26CDA.js → chunk-VS2M72PF.js} +4 -4
  68. package/dist/{chunk-KZ3PCDUJ.js → chunk-VV6HZQ5K.js} +2 -2
  69. package/dist/{chunk-Z5BTSBWW.js → chunk-WF2HDQPG.js} +4 -4
  70. package/dist/{chunk-TAJ2XFTT.js → chunk-XKMCL2YJ.js} +19 -16
  71. package/dist/{chunk-7GUYGQR4.js → chunk-XVEPB2UU.js} +4 -4
  72. package/dist/{chunk-YHTKDIF2.js → chunk-YGFNITPC.js} +11 -11
  73. package/dist/{chunk-I24O2RWT.js → chunk-YJOOIOSR.js} +84 -14
  74. package/dist/{chunk-KPX2OWZR.js → chunk-YKWHUPBP.js} +13 -14
  75. package/dist/{chunk-FRC4LDTQ.js → chunk-YMYPFX4O.js} +36 -30
  76. package/dist/{chunk-VOJOARA6.js → chunk-ZZXPYVS4.js} +82 -77
  77. package/dist/{dgmo-router-QWRF7ZKM.js → dgmo-router-464FE256.js} +4 -4
  78. package/dist/{dimensions-ES6O2T4H.js → dimensions-ILAVBRQ3.js} +7 -7
  79. package/dist/{flowchart-renderer-EXMRHFTQ.js → flowchart-renderer-6JKM2FA4.js} +7 -7
  80. package/dist/index.js +15 -15
  81. package/dist/{layout-HBWT2G23.js → layout-4LNMXLVK.js} +3 -3
  82. package/dist/{layout-UU4VJTOP.js → layout-62ERBWCM.js} +3 -3
  83. package/dist/{layout-N6X46MWG.js → layout-6SKHNQYO.js} +4 -4
  84. package/dist/{layout-OH4VQ3OI.js → layout-7JULRP4Y.js} +4 -4
  85. package/dist/{layout-QTZO6CW5.js → layout-FA37VP7V.js} +4 -4
  86. package/dist/layout-IN53LAE6.js +9 -0
  87. package/dist/{layout-H4H4OFE4.js → layout-IO6ORC5T.js} +3 -3
  88. package/dist/{layout-54P3DAXY.js → layout-LVMWK4QY.js} +5 -5
  89. package/dist/{layout-WCOEZPOI.js → layout-MNOTDWXW.js} +4 -4
  90. package/dist/{layout-2T2VCCTM.js → layout-RD7GDM4I.js} +5 -5
  91. package/dist/{layout-SKQMIXTG.js → layout-SBQTN2YM.js} +4 -4
  92. package/dist/{layout-5E2NQZNM.js → layout-SGYR6HBX.js} +3 -3
  93. package/dist/{layout-W3ZBJOIK.js → layout-WIMQIHBU.js} +5 -5
  94. package/dist/{layout-search-AJ6VUVUI.js → layout-search-C44CJQOB.js} +5 -5
  95. package/dist/{legend-constants-QQU3QYBF.js → legend-constants-RGINV5SF.js} +3 -3
  96. package/dist/{parser-KSIYWKYF.js → parser-CSKF2KNO.js} +8 -4
  97. package/dist/{parser-2BGDJJ2L.js → parser-WLL63XH7.js} +2 -2
  98. package/dist/{renderer-XLEYPLVL.js → renderer-2UIQVKXK.js} +8 -8
  99. package/dist/{renderer-KOWVTTYR.js → renderer-3GG2DEFQ.js} +7 -7
  100. package/dist/{renderer-XLPNUOYA.js → renderer-6NDYVZXQ.js} +10 -10
  101. package/dist/{renderer-2ARNFXSC.js → renderer-6ST44AVP.js} +10 -10
  102. package/dist/{renderer-YLM4CGBG.js → renderer-ALP46W2X.js} +8 -8
  103. package/dist/{renderer-NHFRVCDC.js → renderer-AOFIEF2T.js} +9 -9
  104. package/dist/{renderer-HLWEJQJW.js → renderer-BEVY3UP5.js} +5 -5
  105. package/dist/{renderer-H6AQ4UIR.js → renderer-BXPWSNTJ.js} +13 -13
  106. package/dist/{renderer-BYWLJDT4.js → renderer-EWTETTII.js} +8 -8
  107. package/dist/{renderer-KK2534AF.js → renderer-FHXAWDNI.js} +4 -4
  108. package/dist/{renderer-OB77AT7V.js → renderer-FI4IKF4I.js} +7 -7
  109. package/dist/{renderer-DMVUBKP7.js → renderer-GHYH6DLG.js} +4 -4
  110. package/dist/{renderer-LSBXYOID.js → renderer-GYYJ4APT.js} +10 -10
  111. package/dist/{renderer-M43ROWET.js → renderer-JFOHE3YB.js} +9 -9
  112. package/dist/{renderer-OA7FSZ4A.js → renderer-L5QGQTLV.js} +3 -3
  113. package/dist/{renderer-7OOC2ZO2.js → renderer-L7S6YVM6.js} +4 -4
  114. package/dist/{renderer-YELZR4QT.js → renderer-LCHVBTV4.js} +12 -12
  115. package/dist/{renderer-IN3UPTZS.js → renderer-M4DAYNWC.js} +3 -3
  116. package/dist/{renderer-WN47AMUM.js → renderer-NXIK3LOA.js} +8 -8
  117. package/dist/{renderer-QR5343AR.js → renderer-OWUXQDHM.js} +3 -3
  118. package/dist/{renderer-FCO42JLK.js → renderer-PJNJOCLB.js} +8 -8
  119. package/dist/{renderer-OYTERGAO.js → renderer-QQBUBD66.js} +9 -9
  120. package/dist/{renderer-PM7JPC3J.js → renderer-REFE3YFH.js} +11 -11
  121. package/dist/{renderer-C6KOE774.js → renderer-RL2JGVPC.js} +10 -10
  122. package/dist/{renderer-ZNTLBQ45.js → renderer-RVFPPKWN.js} +9 -9
  123. package/dist/{renderer-QEHUJHRK.js → renderer-SFQHFPC5.js} +10 -10
  124. package/dist/{renderer-LO4FXQHP.js → renderer-T4CMBGA5.js} +8 -8
  125. package/dist/{renderer-M3PQKXK2.js → renderer-TJD6A3AK.js} +13 -13
  126. package/dist/{renderer-2E7LQC32.js → renderer-URPIVAPI.js} +3 -3
  127. package/dist/{renderer-T5CUGSXP.js → renderer-WENGQEX6.js} +7 -7
  128. package/dist/{renderer-WR3FA3FF.js → renderer-WR6J7NKH.js} +8 -8
  129. package/dist/{renderer-YBEZ5V2H.js → renderer-X3V2G4UL.js} +3 -3
  130. package/dist/{renderer-KPEQ72FY.js → renderer-YAW4VHAI.js} +11 -11
  131. package/dist/{renderer-radial-XWAKJACV.js → renderer-radial-HOUGPUPW.js} +7 -7
  132. package/dist/{state-renderer-LIESKSBO.js → state-renderer-JJSQJZEL.js} +11 -11
  133. package/docs/ai-integration.md +1 -1
  134. package/docs/language-reference.md +5 -0
  135. package/gallery/fixtures/er.dgmo +1 -1
  136. package/package.json +5 -3
  137. package/dist/chunk-4ASYQ347.js +0 -185
  138. package/dist/layout-5XGYNYVT.js +0 -9
@@ -0,0 +1,638 @@
1
+ // src/utils/inter-metrics.ts
2
+ var INTER_REGULAR_W = {
3
+ " ": 0.281,
4
+ "!": 0.288,
5
+ '"': 0.466,
6
+ "#": 0.633,
7
+ "$": 0.642,
8
+ "%": 0.982,
9
+ "&": 0.644,
10
+ "'": 0.3,
11
+ "(": 0.365,
12
+ ")": 0.365,
13
+ "*": 0.501,
14
+ "+": 0.662,
15
+ ",": 0.288,
16
+ "-": 0.46,
17
+ ".": 0.288,
18
+ "/": 0.36,
19
+ "0": 0.631,
20
+ "1": 0.407,
21
+ "2": 0.61,
22
+ "3": 0.618,
23
+ "4": 0.646,
24
+ "5": 0.593,
25
+ "6": 0.62,
26
+ "7": 0.566,
27
+ "8": 0.619,
28
+ "9": 0.62,
29
+ ":": 0.288,
30
+ ";": 0.302,
31
+ "<": 0.662,
32
+ "=": 0.662,
33
+ ">": 0.662,
34
+ "?": 0.511,
35
+ "@": 0.966,
36
+ A: 0.69,
37
+ B: 0.654,
38
+ C: 0.73,
39
+ D: 0.722,
40
+ E: 0.601,
41
+ F: 0.59,
42
+ G: 0.746,
43
+ H: 0.743,
44
+ I: 0.269,
45
+ J: 0.571,
46
+ K: 0.672,
47
+ L: 0.565,
48
+ M: 0.903,
49
+ N: 0.753,
50
+ O: 0.765,
51
+ P: 0.639,
52
+ Q: 0.765,
53
+ R: 0.644,
54
+ S: 0.642,
55
+ T: 0.646,
56
+ U: 0.744,
57
+ V: 0.69,
58
+ W: 0.985,
59
+ X: 0.682,
60
+ Y: 0.679,
61
+ Z: 0.629,
62
+ "[": 0.365,
63
+ "\\": 0.36,
64
+ "]": 0.365,
65
+ "^": 0.471,
66
+ "_": 0.456,
67
+ "`": 0.323,
68
+ a: 0.562,
69
+ b: 0.612,
70
+ c: 0.571,
71
+ d: 0.612,
72
+ e: 0.583,
73
+ f: 0.37,
74
+ g: 0.613,
75
+ h: 0.591,
76
+ i: 0.242,
77
+ j: 0.242,
78
+ k: 0.549,
79
+ l: 0.242,
80
+ m: 0.876,
81
+ n: 0.591,
82
+ o: 0.6,
83
+ p: 0.612,
84
+ q: 0.612,
85
+ r: 0.376,
86
+ s: 0.528,
87
+ t: 0.327,
88
+ u: 0.591,
89
+ v: 0.562,
90
+ w: 0.818,
91
+ x: 0.546,
92
+ y: 0.562,
93
+ z: 0.552,
94
+ "{": 0.426,
95
+ "|": 0.333,
96
+ "}": 0.426,
97
+ "~": 0.662,
98
+ "\xA0": 0.281,
99
+ "\xA1": 0.288,
100
+ "\xA2": 0.571,
101
+ "\xA3": 0.611,
102
+ "\xA4": 0.725,
103
+ "\xA5": 0.55,
104
+ "\xA6": 0.27,
105
+ "\xA7": 0.568,
106
+ "\xA8": 0.591,
107
+ "\xA9": 0.914,
108
+ "\xAA": 0.454,
109
+ "\xAB": 0.583,
110
+ "\xAC": 0.662,
111
+ "\xAE": 0.666,
112
+ "\xAF": 0.478,
113
+ "\xB0": 0.456,
114
+ "\xB1": 0.662,
115
+ "\xB2": 0.442,
116
+ "\xB3": 0.446,
117
+ "\xB4": 0.323,
118
+ "\xB5": 0.586,
119
+ "\xB6": 0.603,
120
+ "\xB7": 0.288,
121
+ "\xB8": 0.268,
122
+ "\xB9": 0.304,
123
+ "\xBA": 0.482,
124
+ "\xBB": 0.583,
125
+ "\xBC": 0.802,
126
+ "\xBD": 0.847,
127
+ "\xBE": 0.882,
128
+ "\xBF": 0.511,
129
+ "\xC0": 0.69,
130
+ "\xC1": 0.69,
131
+ "\xC2": 0.69,
132
+ "\xC3": 0.69,
133
+ "\xC4": 0.69,
134
+ "\xC5": 0.69,
135
+ "\xC6": 0.994,
136
+ "\xC7": 0.73,
137
+ "\xC8": 0.601,
138
+ "\xC9": 0.601,
139
+ "\xCA": 0.601,
140
+ "\xCB": 0.601,
141
+ "\xCC": 0.269,
142
+ "\xCD": 0.269,
143
+ "\xCE": 0.269,
144
+ "\xCF": 0.269,
145
+ "\xD0": 0.735,
146
+ "\xD1": 0.753,
147
+ "\xD2": 0.765,
148
+ "\xD3": 0.765,
149
+ "\xD4": 0.765,
150
+ "\xD5": 0.765,
151
+ "\xD6": 0.765,
152
+ "\xD7": 0.662,
153
+ "\xD8": 0.765,
154
+ "\xD9": 0.744,
155
+ "\xDA": 0.744,
156
+ "\xDB": 0.744,
157
+ "\xDC": 0.744,
158
+ "\xDD": 0.679,
159
+ "\xDE": 0.636,
160
+ "\xDF": 0.616,
161
+ "\xE0": 0.562,
162
+ "\xE1": 0.562,
163
+ "\xE2": 0.562,
164
+ "\xE3": 0.562,
165
+ "\xE4": 0.562,
166
+ "\xE5": 0.562,
167
+ "\xE6": 0.917,
168
+ "\xE7": 0.571,
169
+ "\xE8": 0.583,
170
+ "\xE9": 0.583,
171
+ "\xEA": 0.583,
172
+ "\xEB": 0.583,
173
+ "\xEC": 0.242,
174
+ "\xED": 0.242,
175
+ "\xEE": 0.242,
176
+ "\xEF": 0.242,
177
+ "\xF0": 0.583,
178
+ "\xF1": 0.591,
179
+ "\xF2": 0.6,
180
+ "\xF3": 0.6,
181
+ "\xF4": 0.6,
182
+ "\xF5": 0.6,
183
+ "\xF6": 0.6,
184
+ "\xF7": 0.662,
185
+ "\xF8": 0.6,
186
+ "\xF9": 0.591,
187
+ "\xFA": 0.591,
188
+ "\xFB": 0.591,
189
+ "\xFC": 0.591,
190
+ "\xFD": 0.562,
191
+ "\xFE": 0.612,
192
+ "\xFF": 0.562,
193
+ "\u2013": 0.5,
194
+ "\u2014": 1,
195
+ "\u2018": 0.261,
196
+ "\u2019": 0.261,
197
+ "\u201A": 0.241,
198
+ "\u201C": 0.44,
199
+ "\u201D": 0.44,
200
+ "\u201E": 0.421,
201
+ "\u2020": 0.491,
202
+ "\u2021": 0.491,
203
+ "\u2022": 0.563,
204
+ "\u2026": 0.864,
205
+ "\u20AC": 0.667,
206
+ "\u2122": 0.611,
207
+ "\u2190": 0.954,
208
+ "\u2192": 0.954,
209
+ "\u2194": 1.341,
210
+ "\u2248": 0.662,
211
+ "\u2260": 0.662,
212
+ "\u2264": 0.662,
213
+ "\u2265": 0.662
214
+ };
215
+ var INTER_BOLD_W = {
216
+ " ": 0.237,
217
+ "!": 0.338,
218
+ '"': 0.552,
219
+ "#": 0.649,
220
+ "$": 0.655,
221
+ "%": 1.016,
222
+ "&": 0.672,
223
+ "'": 0.339,
224
+ "(": 0.377,
225
+ ")": 0.377,
226
+ "*": 0.559,
227
+ "+": 0.679,
228
+ ",": 0.334,
229
+ "-": 0.468,
230
+ ".": 0.334,
231
+ "/": 0.388,
232
+ "0": 0.674,
233
+ "1": 0.431,
234
+ "2": 0.63,
235
+ "3": 0.646,
236
+ "4": 0.676,
237
+ "5": 0.622,
238
+ "6": 0.649,
239
+ "7": 0.582,
240
+ "8": 0.651,
241
+ "9": 0.649,
242
+ ":": 0.334,
243
+ ";": 0.343,
244
+ "<": 0.679,
245
+ "=": 0.679,
246
+ ">": 0.679,
247
+ "?": 0.56,
248
+ "@": 1.016,
249
+ A: 0.747,
250
+ B: 0.662,
251
+ C: 0.74,
252
+ D: 0.722,
253
+ E: 0.607,
254
+ F: 0.587,
255
+ G: 0.75,
256
+ H: 0.747,
257
+ I: 0.281,
258
+ J: 0.584,
259
+ K: 0.719,
260
+ L: 0.565,
261
+ M: 0.932,
262
+ N: 0.762,
263
+ O: 0.771,
264
+ P: 0.648,
265
+ Q: 0.777,
266
+ R: 0.657,
267
+ S: 0.655,
268
+ T: 0.667,
269
+ U: 0.732,
270
+ V: 0.747,
271
+ W: 1.038,
272
+ X: 0.738,
273
+ Y: 0.731,
274
+ Z: 0.664,
275
+ "[": 0.377,
276
+ "\\": 0.388,
277
+ "]": 0.377,
278
+ "^": 0.487,
279
+ "_": 0.476,
280
+ "`": 0.365,
281
+ a: 0.581,
282
+ b: 0.63,
283
+ c: 0.588,
284
+ d: 0.63,
285
+ e: 0.596,
286
+ f: 0.398,
287
+ g: 0.632,
288
+ h: 0.623,
289
+ i: 0.271,
290
+ j: 0.271,
291
+ k: 0.58,
292
+ l: 0.271,
293
+ m: 0.913,
294
+ n: 0.623,
295
+ o: 0.613,
296
+ p: 0.63,
297
+ q: 0.63,
298
+ r: 0.407,
299
+ s: 0.56,
300
+ t: 0.366,
301
+ u: 0.623,
302
+ v: 0.6,
303
+ w: 0.85,
304
+ x: 0.58,
305
+ y: 0.602,
306
+ z: 0.573,
307
+ "{": 0.469,
308
+ "|": 0.372,
309
+ "}": 0.469,
310
+ "~": 0.679,
311
+ "\xA0": 0.237,
312
+ "\xA1": 0.338,
313
+ "\xA2": 0.588,
314
+ "\xA3": 0.639,
315
+ "\xA4": 0.762,
316
+ "\xA5": 0.57,
317
+ "\xA6": 0.339,
318
+ "\xA7": 0.568,
319
+ "\xA8": 0.623,
320
+ "\xA9": 0.914,
321
+ "\xAA": 0.464,
322
+ "\xAB": 0.66,
323
+ "\xAC": 0.679,
324
+ "\xAE": 0.662,
325
+ "\xAF": 0.439,
326
+ "\xB0": 0.459,
327
+ "\xB1": 0.679,
328
+ "\xB2": 0.46,
329
+ "\xB3": 0.472,
330
+ "\xB4": 0.365,
331
+ "\xB5": 0.628,
332
+ "\xB6": 0.599,
333
+ "\xB7": 0.334,
334
+ "\xB8": 0.364,
335
+ "\xB9": 0.333,
336
+ "\xBA": 0.49,
337
+ "\xBB": 0.66,
338
+ "\xBC": 0.846,
339
+ "\xBD": 0.881,
340
+ "\xBE": 0.92,
341
+ "\xBF": 0.56,
342
+ "\xC0": 0.747,
343
+ "\xC1": 0.747,
344
+ "\xC2": 0.747,
345
+ "\xC3": 0.747,
346
+ "\xC4": 0.747,
347
+ "\xC5": 0.747,
348
+ "\xC6": 1.022,
349
+ "\xC7": 0.74,
350
+ "\xC8": 0.607,
351
+ "\xC9": 0.607,
352
+ "\xCA": 0.607,
353
+ "\xCB": 0.607,
354
+ "\xCC": 0.281,
355
+ "\xCD": 0.281,
356
+ "\xCE": 0.281,
357
+ "\xCF": 0.281,
358
+ "\xD0": 0.76,
359
+ "\xD1": 0.762,
360
+ "\xD2": 0.771,
361
+ "\xD3": 0.771,
362
+ "\xD4": 0.771,
363
+ "\xD5": 0.771,
364
+ "\xD6": 0.771,
365
+ "\xD7": 0.679,
366
+ "\xD8": 0.771,
367
+ "\xD9": 0.732,
368
+ "\xDA": 0.732,
369
+ "\xDB": 0.732,
370
+ "\xDC": 0.732,
371
+ "\xDD": 0.731,
372
+ "\xDE": 0.669,
373
+ "\xDF": 0.657,
374
+ "\xE0": 0.581,
375
+ "\xE1": 0.581,
376
+ "\xE2": 0.581,
377
+ "\xE3": 0.581,
378
+ "\xE4": 0.581,
379
+ "\xE5": 0.581,
380
+ "\xE6": 0.91,
381
+ "\xE7": 0.588,
382
+ "\xE8": 0.596,
383
+ "\xE9": 0.596,
384
+ "\xEA": 0.596,
385
+ "\xEB": 0.596,
386
+ "\xEC": 0.271,
387
+ "\xED": 0.271,
388
+ "\xEE": 0.271,
389
+ "\xEF": 0.271,
390
+ "\xF0": 0.599,
391
+ "\xF1": 0.623,
392
+ "\xF2": 0.613,
393
+ "\xF3": 0.613,
394
+ "\xF4": 0.613,
395
+ "\xF5": 0.613,
396
+ "\xF6": 0.613,
397
+ "\xF7": 0.679,
398
+ "\xF8": 0.613,
399
+ "\xF9": 0.623,
400
+ "\xFA": 0.623,
401
+ "\xFB": 0.623,
402
+ "\xFC": 0.623,
403
+ "\xFD": 0.602,
404
+ "\xFE": 0.63,
405
+ "\xFF": 0.602,
406
+ "\u2013": 0.5,
407
+ "\u2014": 1,
408
+ "\u2018": 0.311,
409
+ "\u2019": 0.311,
410
+ "\u201A": 0.289,
411
+ "\u201C": 0.54,
412
+ "\u201D": 0.532,
413
+ "\u201E": 0.51,
414
+ "\u2020": 0.583,
415
+ "\u2021": 0.583,
416
+ "\u2022": 0.474,
417
+ "\u2026": 1.002,
418
+ "\u20AC": 0.685,
419
+ "\u2122": 0.64,
420
+ "\u2190": 0.954,
421
+ "\u2192": 0.954,
422
+ "\u2194": 1.341,
423
+ "\u2248": 0.679,
424
+ "\u2260": 0.679,
425
+ "\u2264": 0.679,
426
+ "\u2265": 0.679
427
+ };
428
+ var INTER_DEFAULT_W = 0.603;
429
+
430
+ // src/utils/script-metrics.ts
431
+ var SCRIPT_W = [
432
+ // Greek and Greek Extended — Inter has these glyphs, but the generated
433
+ // table stops at Latin-1, so they arrive here.
434
+ [880, 1023, 0.559],
435
+ // Cyrillic, Cyrillic Supplement. Same story, and the same 0.604 the flat
436
+ // fallback already gave them.
437
+ [1024, 1327, 0.604],
438
+ [1424, 1535, 0.499],
439
+ // Hebrew
440
+ [1536, 1791, 0.447],
441
+ // Arabic
442
+ [1872, 1919, 0.447],
443
+ // Arabic Supplement
444
+ [2208, 2303, 0.447],
445
+ // Arabic Extended-A
446
+ [2304, 2431, 0.553],
447
+ // Devanagari
448
+ [3584, 3711, 0.589],
449
+ // Thai
450
+ [4352, 4607, 1],
451
+ // Hangul, conjoining letters
452
+ [7936, 8191, 0.559],
453
+ // Greek Extended
454
+ [11904, 12031, 1],
455
+ // CJK Radicals Supplement
456
+ [12288, 12351, 1],
457
+ // CJK Symbols and Punctuation
458
+ [12352, 12543, 1],
459
+ // Hiragana, Katakana
460
+ [12592, 12687, 1],
461
+ // Hangul, compatibility letters
462
+ [12784, 12799, 1],
463
+ // Katakana Phonetic Extensions
464
+ [13312, 19903, 1],
465
+ // CJK Unified Ideographs Extension A
466
+ [19968, 40959, 1],
467
+ // CJK Unified Ideographs
468
+ [42560, 42655, 0.604],
469
+ // Cyrillic Extended-B
470
+ [43232, 43263, 0.553],
471
+ // Devanagari Extended
472
+ [43360, 43391, 1],
473
+ // Hangul, extended letters A
474
+ [44032, 55295, 1],
475
+ // Hangul syllables, and extended letters B
476
+ [63744, 64255, 1],
477
+ // CJK Compatibility Ideographs
478
+ [64336, 65023, 0.447],
479
+ // Arabic Presentation Forms-A
480
+ [65136, 65279, 0.447],
481
+ // Arabic Presentation Forms-B
482
+ // Full-width forms only. The half-width tail (U+FF61 onward) is half an em
483
+ // and is left to the default rather than given a wrong full-width ratio.
484
+ [65281, 65376, 1],
485
+ [131072, 195103, 1]
486
+ // CJK Unified Ideographs Extension B and later
487
+ ];
488
+ var FIRST_INTERESTING_CP = 768;
489
+ var COMBINING_MARK = /\p{M}/u;
490
+ function uncoveredWidthRatio(cp) {
491
+ if (cp < FIRST_INTERESTING_CP) return INTER_DEFAULT_W;
492
+ if (COMBINING_MARK.test(String.fromCodePoint(cp))) return 0;
493
+ for (const [start, end, ratio] of SCRIPT_W) {
494
+ if (cp < start) break;
495
+ if (cp <= end) return ratio;
496
+ }
497
+ return INTER_DEFAULT_W;
498
+ }
499
+ var segmenter = typeof Intl !== "undefined" && typeof Intl.Segmenter === "function" ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : void 0;
500
+ function graphemeClusters(text) {
501
+ let simple = true;
502
+ for (let i = 0; i < text.length; i++) {
503
+ if (text.charCodeAt(i) >= FIRST_INTERESTING_CP) {
504
+ simple = false;
505
+ break;
506
+ }
507
+ }
508
+ if (simple) return text.split("");
509
+ if (segmenter) {
510
+ const out2 = [];
511
+ for (const { segment } of segmenter.segment(text)) out2.push(segment);
512
+ return out2;
513
+ }
514
+ const out = [];
515
+ for (const ch of text) {
516
+ if (out.length > 0 && COMBINING_MARK.test(ch)) {
517
+ out[out.length - 1] += ch;
518
+ } else {
519
+ out.push(ch);
520
+ }
521
+ }
522
+ return out;
523
+ }
524
+
525
+ // src/utils/text-measure.ts
526
+ var DEFAULT_W = INTER_DEFAULT_W;
527
+ var tableFor = (opts) => opts?.bold ? INTER_BOLD_W : INTER_REGULAR_W;
528
+ var CHAR_WIDTH_RATIO = DEFAULT_W;
529
+ var MEASURE_CACHE = /* @__PURE__ */ new Map();
530
+ var MEASURE_CACHE_MAX = 1e4;
531
+ function extendWidth(acc, text, fontSize, opts) {
532
+ const table = tableFor(opts);
533
+ let w = acc;
534
+ for (let i = 0; i < text.length; i++) {
535
+ const covered = table[text.charAt(i)];
536
+ if (covered !== void 0) {
537
+ w += covered * fontSize;
538
+ continue;
539
+ }
540
+ const cp = text.codePointAt(i);
541
+ if (cp === void 0) continue;
542
+ if (cp > 65535) i++;
543
+ w += uncoveredWidthRatio(cp) * fontSize;
544
+ }
545
+ return w;
546
+ }
547
+ function measureText(text, fontSize, opts) {
548
+ const key = `${opts?.bold ? "b" : "r"}|${fontSize}|${text}`;
549
+ const cached = MEASURE_CACHE.get(key);
550
+ if (cached !== void 0) return cached;
551
+ const w = extendWidth(0, text, fontSize, opts);
552
+ if (MEASURE_CACHE.size >= MEASURE_CACHE_MAX) MEASURE_CACHE.clear();
553
+ MEASURE_CACHE.set(key, w);
554
+ return w;
555
+ }
556
+ function truncateText(text, fontSize, maxWidth, opts) {
557
+ if (measureText(text, fontSize, opts) <= maxWidth) return text;
558
+ const ellipsis = "\u2026";
559
+ const ellipsisW = measureText(ellipsis, fontSize, opts);
560
+ if (ellipsisW > maxWidth) return "";
561
+ const clusters = graphemeClusters(text);
562
+ const prefix = [0];
563
+ for (let i = 0; i < clusters.length; i++) {
564
+ prefix.push(extendWidth(prefix[i], clusters[i], fontSize, opts));
565
+ }
566
+ let lo = 0;
567
+ let hi = clusters.length;
568
+ while (lo < hi) {
569
+ const mid = Math.ceil((lo + hi) / 2);
570
+ if (prefix[mid] + ellipsisW <= maxWidth) {
571
+ lo = mid;
572
+ } else {
573
+ hi = mid - 1;
574
+ }
575
+ }
576
+ return lo === 0 ? ellipsis : clusters.slice(0, lo).join("") + ellipsis;
577
+ }
578
+ function wrapTextToWidth(text, fontSize, maxWidth, opts) {
579
+ const words = text.split(/\s+/).filter((w) => w.length > 0);
580
+ if (words.length === 0) return [""];
581
+ const hardBreak = opts?.hardBreak ?? false;
582
+ const spaceW = (tableFor(opts)[" "] ?? DEFAULT_W) * fontSize;
583
+ const lines = [];
584
+ let current = "";
585
+ let currentW = 0;
586
+ const pushWord = (word) => {
587
+ const testW = extendWidth(
588
+ current ? currentW + spaceW : 0,
589
+ word,
590
+ fontSize,
591
+ opts
592
+ );
593
+ if (testW <= maxWidth || !current) {
594
+ current = current ? `${current} ${word}` : word;
595
+ currentW = testW;
596
+ } else {
597
+ lines.push(current);
598
+ current = word;
599
+ currentW = extendWidth(0, word, fontSize, opts);
600
+ }
601
+ };
602
+ for (const word of words) {
603
+ if (hardBreak && measureText(word, fontSize, opts) > maxWidth) {
604
+ if (current) {
605
+ lines.push(current);
606
+ current = "";
607
+ currentW = 0;
608
+ }
609
+ let chunk = "";
610
+ let chunkW = 0;
611
+ for (const ch of graphemeClusters(word)) {
612
+ const candW = extendWidth(chunkW, ch, fontSize, opts);
613
+ if (chunk && candW > maxWidth) {
614
+ lines.push(chunk);
615
+ chunk = ch;
616
+ chunkW = extendWidth(0, ch, fontSize, opts);
617
+ } else {
618
+ chunk += ch;
619
+ chunkW = candW;
620
+ }
621
+ }
622
+ current = chunk;
623
+ currentW = chunkW;
624
+ continue;
625
+ }
626
+ pushWord(word);
627
+ }
628
+ if (current) lines.push(current);
629
+ return lines.length > 0 ? lines : [""];
630
+ }
631
+
632
+ export {
633
+ CHAR_WIDTH_RATIO,
634
+ measureText,
635
+ truncateText,
636
+ wrapTextToWidth
637
+ };
638
+ //# sourceMappingURL=chunk-MTGGOCND.js.map
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-NCT22MOD.js";
13
13
  import {
14
14
  measureText
15
- } from "./chunk-4ASYQ347.js";
15
+ } from "./chunk-MTGGOCND.js";
16
16
 
17
17
  // src/utils/note-box/metrics.ts
18
18
  function normalizeBulletLine(line) {
@@ -49,4 +49,4 @@ export {
49
49
  wrapNoteBody,
50
50
  noteBoxSize
51
51
  };
52
- //# sourceMappingURL=chunk-VJARCVMH.js.map
52
+ //# sourceMappingURL=chunk-MU3CJPJF.js.map
@@ -11,10 +11,10 @@ import {
11
11
  LEGEND_PILL_FONT_SIZE,
12
12
  LEGEND_PILL_PAD,
13
13
  measureLegendText
14
- } from "./chunk-SCJ7CAJF.js";
14
+ } from "./chunk-3HOCNSPD.js";
15
15
  import {
16
16
  measureText
17
- } from "./chunk-4ASYQ347.js";
17
+ } from "./chunk-MTGGOCND.js";
18
18
  import {
19
19
  injectDefaultTagMetadata,
20
20
  resolveTagColor,
@@ -62,7 +62,7 @@ function filterMetadata(metadata, hiddenAttributes) {
62
62
  return filtered;
63
63
  }
64
64
  function computeCardWidth(label, meta) {
65
- let maxTextWidth = measureText(label, LABEL_FONT_SIZE);
65
+ let maxTextWidth = measureText(label, LABEL_FONT_SIZE, { bold: true });
66
66
  for (const [key, value] of Object.entries(meta)) {
67
67
  const lineWidth = measureText(`${key}: ${value}`, META_FONT_SIZE);
68
68
  if (lineWidth > maxTextWidth) maxTextWidth = lineWidth;
@@ -870,4 +870,4 @@ function layoutOrg(parsed, hiddenCounts, activeTagGroup, hiddenAttributes, expan
870
870
  export {
871
871
  layoutOrg
872
872
  };
873
- //# sourceMappingURL=chunk-RKTIIU7Z.js.map
873
+ //# sourceMappingURL=chunk-N6XI5VTA.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  measureText
3
- } from "./chunk-4ASYQ347.js";
3
+ } from "./chunk-MTGGOCND.js";
4
4
 
5
5
  // src/wireframe/layout.ts
6
6
  var DESKTOP_WIDTH = 1200;
@@ -302,4 +302,4 @@ function computeFieldAlignX(children) {
302
302
  export {
303
303
  layoutWireframe
304
304
  };
305
- //# sourceMappingURL=chunk-ODUT5WMC.js.map
305
+ //# sourceMappingURL=chunk-NVOU7N6C.js.map