@graphty/graph-io 0.3.48 → 0.3.50

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 (600) hide show
  1. package/dist/chunks/{approximations-C2riR4NT.js → approximations-BRXsll0T.js} +2 -2
  2. package/dist/chunks/{approximations-C2riR4NT.js.map → approximations-BRXsll0T.js.map} +1 -1
  3. package/dist/chunks/bends-BGXjv_U4.js +129 -0
  4. package/dist/chunks/bends-BGXjv_U4.js.map +1 -0
  5. package/dist/chunks/{block-Cu22ewuS.js → block-yl0f_qLO.js} +931 -164
  6. package/dist/chunks/block-yl0f_qLO.js.map +1 -0
  7. package/dist/chunks/choose-CczZJaX_.js +717 -0
  8. package/dist/chunks/choose-CczZJaX_.js.map +1 -0
  9. package/dist/chunks/{codes-CV_Bhcyi.js → codes-BE2xir2k.js} +6 -2
  10. package/dist/chunks/codes-BE2xir2k.js.map +1 -0
  11. package/dist/chunks/{constants-D0LqcsLJ.js → constants-CKkYLPtt.js} +2 -2
  12. package/dist/chunks/{constants-D0LqcsLJ.js.map → constants-CKkYLPtt.js.map} +1 -1
  13. package/dist/chunks/{context-cgmmOxZ2.js → context-DizmppHy.js} +5 -4
  14. package/dist/chunks/{context-cgmmOxZ2.js.map → context-DizmppHy.js.map} +1 -1
  15. package/dist/chunks/{convert-BcQ8_jMo.js → convert-Ct2zelbQ.js} +7 -2
  16. package/dist/chunks/convert-Ct2zelbQ.js.map +1 -0
  17. package/dist/chunks/{credentials-BiQsnMTb.js → credentials-CmvJXYeH.js} +67 -16
  18. package/dist/chunks/credentials-CmvJXYeH.js.map +1 -0
  19. package/dist/chunks/{cx-export-BEeF6ymo.js → cx-export-Bt6NoqTQ.js} +3 -3
  20. package/dist/chunks/{cx-export-BEeF6ymo.js.map → cx-export-Bt6NoqTQ.js.map} +1 -1
  21. package/dist/chunks/descriptor-B28U25x4.js +60 -0
  22. package/dist/chunks/descriptor-B28U25x4.js.map +1 -0
  23. package/dist/chunks/{descriptor-BJ-W0Jd-.js → descriptor-Dhez_Cew.js} +11 -2
  24. package/dist/chunks/descriptor-Dhez_Cew.js.map +1 -0
  25. package/dist/chunks/{emit-CD8xnY8s.js → emit-7Jkpg0yd.js} +1788 -133
  26. package/dist/chunks/emit-7Jkpg0yd.js.map +1 -0
  27. package/dist/chunks/{escape-DH2Egt-l.js → escape-CuCIzNMB.js} +8 -8
  28. package/dist/chunks/{escape-DH2Egt-l.js.map → escape-CuCIzNMB.js.map} +1 -1
  29. package/dist/chunks/{export-CZ7VRm4I.js → export-Cha4dRFz.js} +45 -387
  30. package/dist/chunks/export-Cha4dRFz.js.map +1 -0
  31. package/dist/chunks/{exporter-ChjL5fmP.js → exporter-1Ajud15J.js} +9 -8
  32. package/dist/chunks/{exporter-ChjL5fmP.js.map → exporter-1Ajud15J.js.map} +1 -1
  33. package/dist/chunks/{exporter-BIdaoIgh.js → exporter-B6yvL3wy.js} +7 -7
  34. package/dist/chunks/{exporter-BIdaoIgh.js.map → exporter-B6yvL3wy.js.map} +1 -1
  35. package/dist/chunks/{exporter-Dcw7Ldtq.js → exporter-BP6otMO6.js} +6 -6
  36. package/dist/chunks/{exporter-Dcw7Ldtq.js.map → exporter-BP6otMO6.js.map} +1 -1
  37. package/dist/chunks/{exporter-DtVU80Fa.js → exporter-CA5q8ROP.js} +9 -8
  38. package/dist/chunks/{exporter-DtVU80Fa.js.map → exporter-CA5q8ROP.js.map} +1 -1
  39. package/dist/chunks/{exporter-bxxjOrDZ.js → exporter-CQQZFJ2v.js} +1284 -156
  40. package/dist/chunks/exporter-CQQZFJ2v.js.map +1 -0
  41. package/dist/chunks/format-BXiAb-1h.js +408 -0
  42. package/dist/chunks/format-BXiAb-1h.js.map +1 -0
  43. package/dist/chunks/{generic-CP6YD34u.js → generic-Dc21MAdg.js} +387 -31
  44. package/dist/chunks/generic-Dc21MAdg.js.map +1 -0
  45. package/dist/chunks/{importer-B87_fmVx.js → importer-C6NVpCXp.js} +327 -84
  46. package/dist/chunks/importer-C6NVpCXp.js.map +1 -0
  47. package/dist/chunks/{importer-DPZDN40-.js → importer-CKFe4q54.js} +25 -17
  48. package/dist/chunks/importer-CKFe4q54.js.map +1 -0
  49. package/dist/chunks/{importer-Bji2MeWr.js → importer-CKbUbsJA.js} +13 -10
  50. package/dist/chunks/{importer-Bji2MeWr.js.map → importer-CKbUbsJA.js.map} +1 -1
  51. package/dist/chunks/{importer-CB_zV5_L.js → importer-ClCsdgTJ.js} +208 -1104
  52. package/dist/chunks/importer-ClCsdgTJ.js.map +1 -0
  53. package/dist/chunks/{importer-e3huMZbm.js → importer-CyVZTrf0.js} +14 -10
  54. package/dist/chunks/importer-CyVZTrf0.js.map +1 -0
  55. package/dist/chunks/{importer-CVT-JyDE.js → importer-DgG4v1Ms.js} +1537 -355
  56. package/dist/chunks/importer-DgG4v1Ms.js.map +1 -0
  57. package/dist/chunks/{importer-Cyy6UseH.js → importer-asFUrIsj.js} +66 -13
  58. package/dist/chunks/importer-asFUrIsj.js.map +1 -0
  59. package/dist/chunks/{input-Ccg9I22A.js → input-CAxt_aV-.js} +4 -4
  60. package/dist/chunks/{input-Ccg9I22A.js.map → input-CAxt_aV-.js.map} +1 -1
  61. package/dist/chunks/{json-elements-By172SVq.js → json-elements-Cq76WjnZ.js} +4 -4
  62. package/dist/chunks/{json-elements-By172SVq.js.map → json-elements-Cq76WjnZ.js.map} +1 -1
  63. package/dist/chunks/{lexicon-u2SI5xcx.js → lexicon-IVRq2Uoo.js} +282 -74
  64. package/dist/chunks/lexicon-IVRq2Uoo.js.map +1 -0
  65. package/dist/chunks/{ontology-export-BwgMyuF0.js → ontology-export-OMo91mb0.js} +4 -4
  66. package/dist/chunks/{ontology-export-BwgMyuF0.js.map → ontology-export-OMo91mb0.js.map} +1 -1
  67. package/dist/chunks/{records-Cgvxz-Vx.js → records-NJiYvekn.js} +2 -2
  68. package/dist/chunks/{records-Cgvxz-Vx.js.map → records-NJiYvekn.js.map} +1 -1
  69. package/dist/chunks/{report-CgdsL9Hb.js → report-CwMfYa9J.js} +23 -23
  70. package/dist/chunks/{report-CgdsL9Hb.js.map → report-CwMfYa9J.js.map} +1 -1
  71. package/dist/chunks/round-trip-Cy3_SHRZ.js +79 -0
  72. package/dist/chunks/round-trip-Cy3_SHRZ.js.map +1 -0
  73. package/dist/chunks/{sigv4-LkAzsLAu.js → sigv4-BXwVbza3.js} +5 -5
  74. package/dist/chunks/sigv4-BXwVbza3.js.map +1 -0
  75. package/dist/chunks/{styles-CaABMoO1.js → styles-CAVmBLgp.js} +1237 -138
  76. package/dist/chunks/styles-CAVmBLgp.js.map +1 -0
  77. package/dist/chunks/styles-CPczw1Jz.js +1928 -0
  78. package/dist/chunks/styles-CPczw1Jz.js.map +1 -0
  79. package/dist/chunks/styles-boK6Ln54.js +2847 -0
  80. package/dist/chunks/styles-boK6Ln54.js.map +1 -0
  81. package/dist/chunks/{styles-yed-Cs1nmrjn.js → styles-yed-XeFBQ6VS.js} +506 -175
  82. package/dist/chunks/styles-yed-XeFBQ6VS.js.map +1 -0
  83. package/dist/chunks/{text-BuKQVMz2.js → text-ystE2bYi.js} +2 -2
  84. package/dist/chunks/{text-BuKQVMz2.js.map → text-ystE2bYi.js.map} +1 -1
  85. package/dist/csv.js +7 -7
  86. package/dist/cx.js +2 -2
  87. package/dist/cx2.js +2 -2
  88. package/dist/cys.js +1 -1
  89. package/dist/dot.js +8 -4
  90. package/dist/dot.js.map +1 -1
  91. package/dist/gexf.js +42 -12
  92. package/dist/gexf.js.map +1 -1
  93. package/dist/gml.js +848 -194
  94. package/dist/gml.js.map +1 -1
  95. package/dist/graph-io.js +230 -193
  96. package/dist/graph-io.js.map +1 -1
  97. package/dist/graphml.js +3 -3
  98. package/dist/json.js +3 -2
  99. package/dist/neo4j.js +6 -6
  100. package/dist/obo.js +1 -1
  101. package/dist/pajek.js +1 -1
  102. package/dist/positions.js +45 -3
  103. package/dist/positions.js.map +1 -1
  104. package/dist/sources-cypher.js +141 -23
  105. package/dist/sources-cypher.js.map +1 -1
  106. package/dist/sources-ndex.js +2 -2
  107. package/dist/sources-rest.js +32 -6
  108. package/dist/sources-rest.js.map +1 -1
  109. package/dist/sources-sparql.d.ts +1 -0
  110. package/dist/sources-sparql.js +439 -0
  111. package/dist/sources-sparql.js.map +1 -0
  112. package/dist/src/formats/cx/importer.d.ts.map +1 -1
  113. package/dist/src/formats/cx/importer.js +5 -1
  114. package/dist/src/formats/cx/importer.js.map +1 -1
  115. package/dist/src/formats/cx/styles.d.ts +24 -1
  116. package/dist/src/formats/cx/styles.d.ts.map +1 -1
  117. package/dist/src/formats/cx/styles.js +117 -11
  118. package/dist/src/formats/cx/styles.js.map +1 -1
  119. package/dist/src/formats/cx2/importer.d.ts.map +1 -1
  120. package/dist/src/formats/cx2/importer.js +1 -0
  121. package/dist/src/formats/cx2/importer.js.map +1 -1
  122. package/dist/src/formats/cx2/styles.d.ts.map +1 -1
  123. package/dist/src/formats/cx2/styles.js +3 -1
  124. package/dist/src/formats/cx2/styles.js.map +1 -1
  125. package/dist/src/formats/cys/importer.d.ts.map +1 -1
  126. package/dist/src/formats/cys/importer.js +1 -0
  127. package/dist/src/formats/cys/importer.js.map +1 -1
  128. package/dist/src/formats/cys/styles.d.ts +2 -0
  129. package/dist/src/formats/cys/styles.d.ts.map +1 -1
  130. package/dist/src/formats/cys/styles.js +15 -7
  131. package/dist/src/formats/cys/styles.js.map +1 -1
  132. package/dist/src/formats/dot/drawing.d.ts +98 -0
  133. package/dist/src/formats/dot/drawing.d.ts.map +1 -0
  134. package/dist/src/formats/dot/drawing.js +734 -0
  135. package/dist/src/formats/dot/drawing.js.map +1 -0
  136. package/dist/src/formats/dot/exporter.d.ts.map +1 -1
  137. package/dist/src/formats/dot/exporter.js +34 -2
  138. package/dist/src/formats/dot/exporter.js.map +1 -1
  139. package/dist/src/formats/dot/importer.d.ts +6 -1
  140. package/dist/src/formats/dot/importer.d.ts.map +1 -1
  141. package/dist/src/formats/dot/importer.js +170 -33
  142. package/dist/src/formats/dot/importer.js.map +1 -1
  143. package/dist/src/formats/dot/index.d.ts +3 -1
  144. package/dist/src/formats/dot/index.d.ts.map +1 -1
  145. package/dist/src/formats/dot/index.js +2 -1
  146. package/dist/src/formats/dot/index.js.map +1 -1
  147. package/dist/src/formats/dot/label-places.d.ts +41 -0
  148. package/dist/src/formats/dot/label-places.d.ts.map +1 -0
  149. package/dist/src/formats/dot/label-places.js +185 -0
  150. package/dist/src/formats/dot/label-places.js.map +1 -0
  151. package/dist/src/formats/dot/names.d.ts +13 -0
  152. package/dist/src/formats/dot/names.d.ts.map +1 -1
  153. package/dist/src/formats/dot/names.js +13 -0
  154. package/dist/src/formats/dot/names.js.map +1 -1
  155. package/dist/src/formats/dot/record.d.ts +50 -0
  156. package/dist/src/formats/dot/record.d.ts.map +1 -0
  157. package/dist/src/formats/dot/record.js +275 -0
  158. package/dist/src/formats/dot/record.js.map +1 -0
  159. package/dist/src/formats/dot/styles.d.ts +72 -2
  160. package/dist/src/formats/dot/styles.d.ts.map +1 -1
  161. package/dist/src/formats/dot/styles.js +1500 -119
  162. package/dist/src/formats/dot/styles.js.map +1 -1
  163. package/dist/src/formats/gexf/dialog-metrics.d.ts +15 -0
  164. package/dist/src/formats/gexf/dialog-metrics.d.ts.map +1 -0
  165. package/dist/src/formats/gexf/dialog-metrics.js +59 -0
  166. package/dist/src/formats/gexf/dialog-metrics.js.map +1 -0
  167. package/dist/src/formats/gexf/importer.d.ts +7 -0
  168. package/dist/src/formats/gexf/importer.d.ts.map +1 -1
  169. package/dist/src/formats/gexf/importer.js +41 -5
  170. package/dist/src/formats/gexf/importer.js.map +1 -1
  171. package/dist/src/formats/gexf/preview.d.ts +77 -0
  172. package/dist/src/formats/gexf/preview.d.ts.map +1 -0
  173. package/dist/src/formats/gexf/preview.js +191 -0
  174. package/dist/src/formats/gexf/preview.js.map +1 -0
  175. package/dist/src/formats/gexf/schema.d.ts.map +1 -1
  176. package/dist/src/formats/gexf/schema.js +2 -1
  177. package/dist/src/formats/gexf/schema.js.map +1 -1
  178. package/dist/src/formats/gexf/styles.d.ts +58 -31
  179. package/dist/src/formats/gexf/styles.d.ts.map +1 -1
  180. package/dist/src/formats/gexf/styles.js +848 -225
  181. package/dist/src/formats/gexf/styles.js.map +1 -1
  182. package/dist/src/formats/gml/importer.d.ts +5 -2
  183. package/dist/src/formats/gml/importer.d.ts.map +1 -1
  184. package/dist/src/formats/gml/importer.js +258 -71
  185. package/dist/src/formats/gml/importer.js.map +1 -1
  186. package/dist/src/formats/gml/index.d.ts +1 -1
  187. package/dist/src/formats/gml/index.d.ts.map +1 -1
  188. package/dist/src/formats/gml/index.js +1 -1
  189. package/dist/src/formats/gml/index.js.map +1 -1
  190. package/dist/src/formats/gml/positions.d.ts +7 -0
  191. package/dist/src/formats/gml/positions.d.ts.map +1 -1
  192. package/dist/src/formats/gml/positions.js +29 -7
  193. package/dist/src/formats/gml/positions.js.map +1 -1
  194. package/dist/src/formats/gml/styles.d.ts.map +1 -1
  195. package/dist/src/formats/gml/styles.js +754 -102
  196. package/dist/src/formats/gml/styles.js.map +1 -1
  197. package/dist/src/formats/graphml/styles-plain.d.ts.map +1 -1
  198. package/dist/src/formats/graphml/styles-plain.js +6 -10
  199. package/dist/src/formats/graphml/styles-plain.js.map +1 -1
  200. package/dist/src/formats/graphml/styles-yed.d.ts +21 -15
  201. package/dist/src/formats/graphml/styles-yed.d.ts.map +1 -1
  202. package/dist/src/formats/graphml/styles-yed.js +695 -164
  203. package/dist/src/formats/graphml/styles-yed.js.map +1 -1
  204. package/dist/src/formats/graphml/styles-yfiles3.d.ts +1 -1
  205. package/dist/src/formats/graphml/styles-yfiles3.d.ts.map +1 -1
  206. package/dist/src/formats/graphml/styles-yfiles3.js +431 -64
  207. package/dist/src/formats/graphml/styles-yfiles3.js.map +1 -1
  208. package/dist/src/formats/graphml/yfiles.d.ts +3 -3
  209. package/dist/src/formats/graphml/yfiles.d.ts.map +1 -1
  210. package/dist/src/formats/graphml/yfiles.js +16 -6
  211. package/dist/src/formats/graphml/yfiles.js.map +1 -1
  212. package/dist/src/formats/json/dialect.d.ts +3 -2
  213. package/dist/src/formats/json/dialect.d.ts.map +1 -1
  214. package/dist/src/formats/json/dialect.js +39 -5
  215. package/dist/src/formats/json/dialect.js.map +1 -1
  216. package/dist/src/formats/json/importer.d.ts +13 -2
  217. package/dist/src/formats/json/importer.d.ts.map +1 -1
  218. package/dist/src/formats/json/importer.js +42 -6
  219. package/dist/src/formats/json/importer.js.map +1 -1
  220. package/dist/src/formats/json/index.d.ts +1 -1
  221. package/dist/src/formats/json/index.d.ts.map +1 -1
  222. package/dist/src/formats/json/index.js +1 -1
  223. package/dist/src/formats/json/index.js.map +1 -1
  224. package/dist/src/formats/json/positions.d.ts +5 -2
  225. package/dist/src/formats/json/positions.d.ts.map +1 -1
  226. package/dist/src/formats/json/positions.js +20 -4
  227. package/dist/src/formats/json/positions.js.map +1 -1
  228. package/dist/src/formats/json/styles.d.ts +12 -1
  229. package/dist/src/formats/json/styles.d.ts.map +1 -1
  230. package/dist/src/formats/json/styles.js +1843 -136
  231. package/dist/src/formats/json/styles.js.map +1 -1
  232. package/dist/src/formats/pajek/draw.d.ts +104 -0
  233. package/dist/src/formats/pajek/draw.d.ts.map +1 -0
  234. package/dist/src/formats/pajek/draw.js +382 -0
  235. package/dist/src/formats/pajek/draw.js.map +1 -0
  236. package/dist/src/formats/pajek/exporter.d.ts.map +1 -1
  237. package/dist/src/formats/pajek/exporter.js +70 -51
  238. package/dist/src/formats/pajek/exporter.js.map +1 -1
  239. package/dist/src/formats/pajek/importer.d.ts +9 -0
  240. package/dist/src/formats/pajek/importer.d.ts.map +1 -1
  241. package/dist/src/formats/pajek/importer.js +233 -102
  242. package/dist/src/formats/pajek/importer.js.map +1 -1
  243. package/dist/src/formats/pajek/index.d.ts +1 -0
  244. package/dist/src/formats/pajek/index.d.ts.map +1 -1
  245. package/dist/src/formats/pajek/index.js.map +1 -1
  246. package/dist/src/formats/pajek/styles.d.ts +15 -7
  247. package/dist/src/formats/pajek/styles.d.ts.map +1 -1
  248. package/dist/src/formats/pajek/styles.js +1395 -114
  249. package/dist/src/formats/pajek/styles.js.map +1 -1
  250. package/dist/src/formats/pajek/syntax.d.ts +10 -1
  251. package/dist/src/formats/pajek/syntax.d.ts.map +1 -1
  252. package/dist/src/formats/pajek/syntax.js +26 -2
  253. package/dist/src/formats/pajek/syntax.js.map +1 -1
  254. package/dist/src/formats/xgmml/emit.d.ts +1 -0
  255. package/dist/src/formats/xgmml/emit.d.ts.map +1 -1
  256. package/dist/src/formats/xgmml/emit.js +65 -5
  257. package/dist/src/formats/xgmml/emit.js.map +1 -1
  258. package/dist/src/formats/xgmml/styles.d.ts +23 -3
  259. package/dist/src/formats/xgmml/styles.d.ts.map +1 -1
  260. package/dist/src/formats/xgmml/styles.js +277 -60
  261. package/dist/src/formats/xgmml/styles.js.map +1 -1
  262. package/dist/src/index.d.ts +6 -5
  263. package/dist/src/index.d.ts.map +1 -1
  264. package/dist/src/index.js +6 -5
  265. package/dist/src/index.js.map +1 -1
  266. package/dist/src/positions/convert.d.ts.map +1 -1
  267. package/dist/src/positions/convert.js +11 -1
  268. package/dist/src/positions/convert.js.map +1 -1
  269. package/dist/src/positions/extract.d.ts.map +1 -1
  270. package/dist/src/positions/extract.js +53 -1
  271. package/dist/src/positions/extract.js.map +1 -1
  272. package/dist/src/positions/index.d.ts +1 -1
  273. package/dist/src/positions/index.d.ts.map +1 -1
  274. package/dist/src/positions/types.d.ts +59 -0
  275. package/dist/src/positions/types.d.ts.map +1 -1
  276. package/dist/src/sources/builtins.d.ts +1 -1
  277. package/dist/src/sources/builtins.d.ts.map +1 -1
  278. package/dist/src/sources/builtins.js +8 -2
  279. package/dist/src/sources/builtins.js.map +1 -1
  280. package/dist/src/sources/context.d.ts.map +1 -1
  281. package/dist/src/sources/context.js +1 -0
  282. package/dist/src/sources/context.js.map +1 -1
  283. package/dist/src/sources/credentials.d.ts +50 -1
  284. package/dist/src/sources/credentials.d.ts.map +1 -1
  285. package/dist/src/sources/credentials.js +69 -0
  286. package/dist/src/sources/credentials.js.map +1 -1
  287. package/dist/src/sources/cypher/descriptor.d.ts.map +1 -1
  288. package/dist/src/sources/cypher/descriptor.js +5 -0
  289. package/dist/src/sources/cypher/descriptor.js.map +1 -1
  290. package/dist/src/sources/cypher/index.d.ts.map +1 -1
  291. package/dist/src/sources/cypher/index.js +125 -18
  292. package/dist/src/sources/cypher/index.js.map +1 -1
  293. package/dist/src/sources/cypher/params.d.ts +1 -1
  294. package/dist/src/sources/cypher/params.d.ts.map +1 -1
  295. package/dist/src/sources/cypher/query-builder.d.ts +17 -0
  296. package/dist/src/sources/cypher/query-builder.d.ts.map +1 -1
  297. package/dist/src/sources/cypher/query-builder.js +31 -0
  298. package/dist/src/sources/cypher/query-builder.js.map +1 -1
  299. package/dist/src/sources/ids.d.ts +5 -0
  300. package/dist/src/sources/ids.d.ts.map +1 -1
  301. package/dist/src/sources/ids.js +5 -0
  302. package/dist/src/sources/ids.js.map +1 -1
  303. package/dist/src/sources/params.d.ts +3 -0
  304. package/dist/src/sources/params.d.ts.map +1 -1
  305. package/dist/src/sources/rest/descriptor.d.ts.map +1 -1
  306. package/dist/src/sources/rest/descriptor.js +9 -0
  307. package/dist/src/sources/rest/descriptor.js.map +1 -1
  308. package/dist/src/sources/rest/openalex.d.ts +4 -2
  309. package/dist/src/sources/rest/openalex.d.ts.map +1 -1
  310. package/dist/src/sources/rest/openalex.js +4 -2
  311. package/dist/src/sources/rest/openalex.js.map +1 -1
  312. package/dist/src/sources/rest/source.d.ts.map +1 -1
  313. package/dist/src/sources/rest/source.js +38 -0
  314. package/dist/src/sources/rest/source.js.map +1 -1
  315. package/dist/src/sources/run.d.ts +2 -0
  316. package/dist/src/sources/run.d.ts.map +1 -1
  317. package/dist/src/sources/run.js +30 -3
  318. package/dist/src/sources/run.js.map +1 -1
  319. package/dist/src/sources/sigv4.d.ts +5 -3
  320. package/dist/src/sources/sigv4.d.ts.map +1 -1
  321. package/dist/src/sources/sigv4.js +6 -4
  322. package/dist/src/sources/sigv4.js.map +1 -1
  323. package/dist/src/sources/sparql/descriptor.d.ts +10 -0
  324. package/dist/src/sources/sparql/descriptor.d.ts.map +1 -0
  325. package/dist/src/sources/sparql/descriptor.js +64 -0
  326. package/dist/src/sources/sparql/descriptor.js.map +1 -0
  327. package/dist/src/sources/sparql/index.d.ts +28 -0
  328. package/dist/src/sources/sparql/index.d.ts.map +1 -0
  329. package/dist/src/sources/sparql/index.js +327 -0
  330. package/dist/src/sources/sparql/index.js.map +1 -0
  331. package/dist/src/sources/sparql/ntriples.d.ts +69 -0
  332. package/dist/src/sources/sparql/ntriples.d.ts.map +1 -0
  333. package/dist/src/sources/sparql/ntriples.js +180 -0
  334. package/dist/src/sources/sparql/ntriples.js.map +1 -0
  335. package/dist/src/sources/sparql/params.d.ts +27 -0
  336. package/dist/src/sources/sparql/params.d.ts.map +1 -0
  337. package/dist/src/sources/sparql/params.js +5 -0
  338. package/dist/src/sources/sparql/params.js.map +1 -0
  339. package/dist/src/sources/sparql/query.d.ts +73 -0
  340. package/dist/src/sources/sparql/query.d.ts.map +1 -0
  341. package/dist/src/sources/sparql/query.js +164 -0
  342. package/dist/src/sources/sparql/query.js.map +1 -0
  343. package/dist/src/sources/types.d.ts +60 -0
  344. package/dist/src/sources/types.d.ts.map +1 -1
  345. package/dist/src/styles/annotations.d.ts +61 -5
  346. package/dist/src/styles/annotations.d.ts.map +1 -1
  347. package/dist/src/styles/annotations.js +130 -22
  348. package/dist/src/styles/annotations.js.map +1 -1
  349. package/dist/src/styles/canon/bends.d.ts +46 -0
  350. package/dist/src/styles/canon/bends.d.ts.map +1 -1
  351. package/dist/src/styles/canon/bends.js +123 -0
  352. package/dist/src/styles/canon/bends.js.map +1 -1
  353. package/dist/src/styles/canon/color-tables.d.ts +6 -1
  354. package/dist/src/styles/canon/color-tables.d.ts.map +1 -1
  355. package/dist/src/styles/canon/color-tables.js +10 -4
  356. package/dist/src/styles/canon/color-tables.js.map +1 -1
  357. package/dist/src/styles/canon/color.d.ts +3 -1
  358. package/dist/src/styles/canon/color.d.ts.map +1 -1
  359. package/dist/src/styles/canon/color.js +103 -3
  360. package/dist/src/styles/canon/color.js.map +1 -1
  361. package/dist/src/styles/canon/enums.d.ts +2 -2
  362. package/dist/src/styles/canon/enums.d.ts.map +1 -1
  363. package/dist/src/styles/canon/enums.js +89 -7
  364. package/dist/src/styles/canon/enums.js.map +1 -1
  365. package/dist/src/styles/canon/graphviz.d.ts +12 -3
  366. package/dist/src/styles/canon/graphviz.d.ts.map +1 -1
  367. package/dist/src/styles/canon/graphviz.js +57 -9
  368. package/dist/src/styles/canon/graphviz.js.map +1 -1
  369. package/dist/src/styles/canon/number.d.ts +8 -0
  370. package/dist/src/styles/canon/number.d.ts.map +1 -1
  371. package/dist/src/styles/canon/number.js +18 -0
  372. package/dist/src/styles/canon/number.js.map +1 -1
  373. package/dist/src/styles/canon/text.d.ts +29 -2
  374. package/dist/src/styles/canon/text.d.ts.map +1 -1
  375. package/dist/src/styles/canon/text.js +156 -16
  376. package/dist/src/styles/canon/text.js.map +1 -1
  377. package/dist/src/styles/codes.d.ts +2 -0
  378. package/dist/src/styles/codes.d.ts.map +1 -1
  379. package/dist/src/styles/codes.js +2 -0
  380. package/dist/src/styles/codes.js.map +1 -1
  381. package/dist/src/styles/cyjs/cascade.d.ts.map +1 -1
  382. package/dist/src/styles/cyjs/cascade.js +1139 -79
  383. package/dist/src/styles/cyjs/cascade.js.map +1 -1
  384. package/dist/src/styles/cyjs/defaults-table.d.ts.map +1 -1
  385. package/dist/src/styles/cyjs/defaults-table.js +4 -0
  386. package/dist/src/styles/cyjs/defaults-table.js.map +1 -1
  387. package/dist/src/styles/cyjs/emit.d.ts.map +1 -1
  388. package/dist/src/styles/cyjs/emit.js +232 -10
  389. package/dist/src/styles/cyjs/emit.js.map +1 -1
  390. package/dist/src/styles/cyjs/face.d.ts +20 -0
  391. package/dist/src/styles/cyjs/face.d.ts.map +1 -0
  392. package/dist/src/styles/cyjs/face.js +332 -0
  393. package/dist/src/styles/cyjs/face.js.map +1 -0
  394. package/dist/src/styles/cyjs/mappers.d.ts +44 -1
  395. package/dist/src/styles/cyjs/mappers.d.ts.map +1 -1
  396. package/dist/src/styles/cyjs/mappers.js +475 -26
  397. package/dist/src/styles/cyjs/mappers.js.map +1 -1
  398. package/dist/src/styles/cyjs/routes.d.ts +53 -0
  399. package/dist/src/styles/cyjs/routes.d.ts.map +1 -0
  400. package/dist/src/styles/cyjs/routes.js +360 -0
  401. package/dist/src/styles/cyjs/routes.js.map +1 -0
  402. package/dist/src/styles/cytoscape/charts.d.ts +23 -0
  403. package/dist/src/styles/cytoscape/charts.d.ts.map +1 -0
  404. package/dist/src/styles/cytoscape/charts.js +560 -0
  405. package/dist/src/styles/cytoscape/charts.js.map +1 -0
  406. package/dist/src/styles/cytoscape/emit.d.ts.map +1 -1
  407. package/dist/src/styles/cytoscape/emit.js +156 -48
  408. package/dist/src/styles/cytoscape/emit.js.map +1 -1
  409. package/dist/src/styles/cytoscape/lexicon.d.ts +91 -3
  410. package/dist/src/styles/cytoscape/lexicon.d.ts.map +1 -1
  411. package/dist/src/styles/cytoscape/lexicon.js +387 -77
  412. package/dist/src/styles/cytoscape/lexicon.js.map +1 -1
  413. package/dist/src/styles/cytoscape/mappings.d.ts +30 -0
  414. package/dist/src/styles/cytoscape/mappings.d.ts.map +1 -1
  415. package/dist/src/styles/cytoscape/mappings.js +92 -0
  416. package/dist/src/styles/cytoscape/mappings.js.map +1 -1
  417. package/dist/src/styles/cytoscape/resolve.d.ts +42 -2
  418. package/dist/src/styles/cytoscape/resolve.d.ts.map +1 -1
  419. package/dist/src/styles/cytoscape/resolve.js +623 -17
  420. package/dist/src/styles/cytoscape/resolve.js.map +1 -1
  421. package/dist/src/styles/defaults.d.ts +46 -26
  422. package/dist/src/styles/defaults.d.ts.map +1 -1
  423. package/dist/src/styles/defaults.js +308 -71
  424. package/dist/src/styles/defaults.js.map +1 -1
  425. package/dist/src/styles/index.d.ts +4 -3
  426. package/dist/src/styles/index.d.ts.map +1 -1
  427. package/dist/src/styles/index.js +3 -2
  428. package/dist/src/styles/index.js.map +1 -1
  429. package/dist/src/styles/internal.d.ts +1 -0
  430. package/dist/src/styles/internal.d.ts.map +1 -1
  431. package/dist/src/styles/internal.js +1 -0
  432. package/dist/src/styles/internal.js.map +1 -1
  433. package/dist/src/styles/io/generic.d.ts.map +1 -1
  434. package/dist/src/styles/io/generic.js +56 -16
  435. package/dist/src/styles/io/generic.js.map +1 -1
  436. package/dist/src/styles/io/round-trip.d.ts +56 -0
  437. package/dist/src/styles/io/round-trip.d.ts.map +1 -0
  438. package/dist/src/styles/io/round-trip.js +138 -0
  439. package/dist/src/styles/io/round-trip.js.map +1 -0
  440. package/dist/src/styles/io/writer.d.ts.map +1 -1
  441. package/dist/src/styles/io/writer.js +6 -1
  442. package/dist/src/styles/io/writer.js.map +1 -1
  443. package/dist/src/styles/notes.d.ts.map +1 -1
  444. package/dist/src/styles/notes.js +1 -0
  445. package/dist/src/styles/notes.js.map +1 -1
  446. package/dist/src/styles/plan/features.d.ts +1 -1
  447. package/dist/src/styles/plan/features.d.ts.map +1 -1
  448. package/dist/src/styles/plan/features.js +22 -2
  449. package/dist/src/styles/plan/features.js.map +1 -1
  450. package/dist/src/styles/plan/index.d.ts +1 -1
  451. package/dist/src/styles/plan/index.d.ts.map +1 -1
  452. package/dist/src/styles/plan/index.js +1 -1
  453. package/dist/src/styles/plan/index.js.map +1 -1
  454. package/dist/src/styles/plan/plan.d.ts.map +1 -1
  455. package/dist/src/styles/plan/plan.js +61 -4
  456. package/dist/src/styles/plan/plan.js.map +1 -1
  457. package/dist/src/styles/plan/resolve.d.ts +11 -0
  458. package/dist/src/styles/plan/resolve.d.ts.map +1 -1
  459. package/dist/src/styles/plan/resolve.js +40 -4
  460. package/dist/src/styles/plan/resolve.js.map +1 -1
  461. package/dist/src/styles/slots.d.ts +14 -0
  462. package/dist/src/styles/slots.d.ts.map +1 -0
  463. package/dist/src/styles/slots.js +20 -0
  464. package/dist/src/styles/slots.js.map +1 -0
  465. package/dist/src/styles/types.d.ts +687 -6
  466. package/dist/src/styles/types.d.ts.map +1 -1
  467. package/dist/src/styles/vocabulary.d.ts +3 -2
  468. package/dist/src/styles/vocabulary.d.ts.map +1 -1
  469. package/dist/src/styles/vocabulary.js +224 -0
  470. package/dist/src/styles/vocabulary.js.map +1 -1
  471. package/dist/styles.js +30 -239
  472. package/dist/styles.js.map +1 -1
  473. package/dist/xgmml.js +3 -3
  474. package/package.json +27 -7
  475. package/src/formats/cx/importer.ts +6 -1
  476. package/src/formats/cx/styles.ts +143 -9
  477. package/src/formats/cx2/importer.ts +1 -0
  478. package/src/formats/cx2/styles.ts +3 -1
  479. package/src/formats/cys/importer.ts +1 -0
  480. package/src/formats/cys/styles.ts +27 -5
  481. package/src/formats/dot/drawing.ts +799 -0
  482. package/src/formats/dot/exporter.ts +37 -1
  483. package/src/formats/dot/importer.ts +192 -36
  484. package/src/formats/dot/index.ts +3 -1
  485. package/src/formats/dot/label-places.ts +241 -0
  486. package/src/formats/dot/names.ts +15 -0
  487. package/src/formats/dot/record.ts +336 -0
  488. package/src/formats/dot/styles.ts +1702 -149
  489. package/src/formats/gexf/dialog-metrics.ts +61 -0
  490. package/src/formats/gexf/importer.ts +50 -5
  491. package/src/formats/gexf/preview.ts +217 -0
  492. package/src/formats/gexf/schema.ts +2 -1
  493. package/src/formats/gexf/styles.ts +1099 -245
  494. package/src/formats/gml/importer.ts +291 -76
  495. package/src/formats/gml/index.ts +1 -1
  496. package/src/formats/gml/positions.ts +29 -7
  497. package/src/formats/gml/styles.ts +852 -110
  498. package/src/formats/graphml/styles-plain.ts +6 -15
  499. package/src/formats/graphml/styles-yed.ts +765 -176
  500. package/src/formats/graphml/styles-yfiles3.ts +487 -63
  501. package/src/formats/graphml/yfiles.ts +19 -6
  502. package/src/formats/json/dialect.ts +41 -5
  503. package/src/formats/json/importer.ts +59 -7
  504. package/src/formats/json/index.ts +1 -0
  505. package/src/formats/json/positions.ts +22 -5
  506. package/src/formats/json/styles.ts +2123 -171
  507. package/src/formats/pajek/draw.ts +469 -0
  508. package/src/formats/pajek/exporter.ts +81 -49
  509. package/src/formats/pajek/importer.ts +278 -103
  510. package/src/formats/pajek/index.ts +1 -0
  511. package/src/formats/pajek/styles.ts +1506 -133
  512. package/src/formats/pajek/syntax.ts +27 -2
  513. package/src/formats/xgmml/emit.ts +73 -5
  514. package/src/formats/xgmml/styles.ts +330 -71
  515. package/src/index.ts +12 -1
  516. package/src/positions/convert.ts +12 -1
  517. package/src/positions/extract.ts +55 -1
  518. package/src/positions/index.ts +1 -0
  519. package/src/positions/types.ts +60 -0
  520. package/src/sources/builtins.ts +8 -1
  521. package/src/sources/context.ts +1 -0
  522. package/src/sources/credentials.ts +90 -1
  523. package/src/sources/cypher/descriptor.ts +7 -1
  524. package/src/sources/cypher/index.ts +149 -18
  525. package/src/sources/cypher/params.ts +1 -1
  526. package/src/sources/cypher/query-builder.ts +33 -0
  527. package/src/sources/ids.ts +6 -0
  528. package/src/sources/params.ts +3 -0
  529. package/src/sources/rest/descriptor.ts +9 -0
  530. package/src/sources/rest/openalex.ts +4 -2
  531. package/src/sources/rest/source.ts +41 -0
  532. package/src/sources/run.ts +35 -3
  533. package/src/sources/sigv4.ts +6 -4
  534. package/src/sources/sparql/descriptor.ts +67 -0
  535. package/src/sources/sparql/index.ts +371 -0
  536. package/src/sources/sparql/ntriples.ts +219 -0
  537. package/src/sources/sparql/params.ts +28 -0
  538. package/src/sources/sparql/query.ts +216 -0
  539. package/src/sources/types.ts +68 -0
  540. package/src/styles/annotations.ts +201 -27
  541. package/src/styles/canon/bends.ts +137 -0
  542. package/src/styles/canon/color-tables.ts +10 -4
  543. package/src/styles/canon/color.ts +105 -3
  544. package/src/styles/canon/enums.ts +107 -8
  545. package/src/styles/canon/graphviz.ts +71 -10
  546. package/src/styles/canon/number.ts +19 -0
  547. package/src/styles/canon/text.ts +187 -16
  548. package/src/styles/codes.ts +2 -0
  549. package/src/styles/cyjs/cascade.ts +1303 -84
  550. package/src/styles/cyjs/defaults-table.ts +4 -0
  551. package/src/styles/cyjs/emit.ts +268 -14
  552. package/src/styles/cyjs/face.ts +372 -0
  553. package/src/styles/cyjs/mappers.ts +506 -27
  554. package/src/styles/cyjs/routes.ts +432 -0
  555. package/src/styles/cytoscape/charts.ts +684 -0
  556. package/src/styles/cytoscape/emit.ts +170 -48
  557. package/src/styles/cytoscape/lexicon.ts +431 -78
  558. package/src/styles/cytoscape/mappings.ts +108 -0
  559. package/src/styles/cytoscape/resolve.ts +741 -17
  560. package/src/styles/defaults.ts +417 -108
  561. package/src/styles/index.ts +5 -0
  562. package/src/styles/internal.ts +1 -0
  563. package/src/styles/io/generic.ts +79 -23
  564. package/src/styles/io/round-trip.ts +202 -0
  565. package/src/styles/io/writer.ts +6 -1
  566. package/src/styles/notes.ts +1 -0
  567. package/src/styles/plan/features.ts +23 -2
  568. package/src/styles/plan/index.ts +1 -1
  569. package/src/styles/plan/plan.ts +69 -5
  570. package/src/styles/plan/resolve.ts +47 -4
  571. package/src/styles/slots.ts +25 -0
  572. package/src/styles/types.ts +698 -5
  573. package/src/styles/vocabulary.ts +232 -2
  574. package/dist/chunks/block-Cu22ewuS.js.map +0 -1
  575. package/dist/chunks/choose-Cdx6Enl2.js +0 -57
  576. package/dist/chunks/choose-Cdx6Enl2.js.map +0 -1
  577. package/dist/chunks/codes-CV_Bhcyi.js.map +0 -1
  578. package/dist/chunks/convert-BcQ8_jMo.js.map +0 -1
  579. package/dist/chunks/credentials-BiQsnMTb.js.map +0 -1
  580. package/dist/chunks/descriptor-BJ-W0Jd-.js.map +0 -1
  581. package/dist/chunks/emit-CD8xnY8s.js.map +0 -1
  582. package/dist/chunks/export-CZ7VRm4I.js.map +0 -1
  583. package/dist/chunks/exporter-bxxjOrDZ.js.map +0 -1
  584. package/dist/chunks/format-BMS-1Nxb.js +0 -64
  585. package/dist/chunks/format-BMS-1Nxb.js.map +0 -1
  586. package/dist/chunks/generic-CP6YD34u.js.map +0 -1
  587. package/dist/chunks/importer-B87_fmVx.js.map +0 -1
  588. package/dist/chunks/importer-CB_zV5_L.js.map +0 -1
  589. package/dist/chunks/importer-CVT-JyDE.js.map +0 -1
  590. package/dist/chunks/importer-Cyy6UseH.js.map +0 -1
  591. package/dist/chunks/importer-DPZDN40-.js.map +0 -1
  592. package/dist/chunks/importer-e3huMZbm.js.map +0 -1
  593. package/dist/chunks/lexicon-u2SI5xcx.js.map +0 -1
  594. package/dist/chunks/sigv4-LkAzsLAu.js.map +0 -1
  595. package/dist/chunks/styles-CaABMoO1.js.map +0 -1
  596. package/dist/chunks/styles-P_gmFAOi.js +0 -770
  597. package/dist/chunks/styles-P_gmFAOi.js.map +0 -1
  598. package/dist/chunks/styles-yed-Cs1nmrjn.js.map +0 -1
  599. package/dist/chunks/writer-DvHTl36J.js +0 -449
  600. package/dist/chunks/writer-DvHTl36J.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { a0 as STYLES_NOT_IMPORTED_CODE } from "./report-CgdsL9Hb.js";
2
- import { f as formatF32 } from "./format-BMS-1Nxb.js";
1
+ import { a0 as STYLES_NOT_IMPORTED_CODE } from "./report-CwMfYa9J.js";
2
+ import { f as formatF32, p as pairFolding } from "./format-BXiAb-1h.js";
3
3
  const STYLE_ISSUE = Object.freeze({
4
4
  // ------------------------------------------------ reading values
5
5
  /** A value longer than 256 characters was not parsed. */
@@ -32,6 +32,8 @@ const STYLE_ISSUE = Object.freeze({
32
32
  INHERIT_COLOR: "W_STYLE_INHERIT_COLOR",
33
33
  /** A style property the vocabulary has no counterpart for was not carried. */
34
34
  NOT_CARRIED: "W_STYLE_NOT_CARRIED",
35
+ /** An annotation of a kind graph-io does not read (a group of annotations); its kinds are the samples. */
36
+ ANNOTATION_SKIPPED: "W_STYLE_ANNOTATION_SKIPPED",
35
37
  // ------------------------------------------------ reading declared styles
36
38
  /** A declared mapping that cannot be read. */
37
39
  BAD_MAPPING: "W_STYLE_BAD_MAPPING",
@@ -160,6 +162,17 @@ function canonNumber(raw, site, factor = 1) {
160
162
  }
161
163
  return num6$1(scaled);
162
164
  }
165
+ function canonSigned(raw, site) {
166
+ const value = finite(raw, site);
167
+ if (value === null) {
168
+ return null;
169
+ }
170
+ if (Math.abs(value) > MAX_STYLE_NUMBER) {
171
+ noteAt(site, STYLE_ISSUE.BAD_VALUE, typeof raw === "string" ? raw : String(raw));
172
+ return null;
173
+ }
174
+ return num6$1(value);
175
+ }
163
176
  function canonOpacity(raw, dialect, site) {
164
177
  const value = finite(raw, site);
165
178
  if (value === null) {
@@ -219,6 +232,7 @@ const PHRASES = /* @__PURE__ */ new Map([
219
232
  ["W_STYLE_EXTRA_LABELS", "elements have more than one label; the first was kept"],
220
233
  ["W_STYLE_INHERIT_COLOR", "inherited colors cannot be expressed"],
221
234
  ["W_STYLE_NOT_CARRIED", "style properties have no counterpart and were not carried"],
235
+ ["W_STYLE_ANNOTATION_SKIPPED", "annotations of a kind graph-io does not read were skipped"],
222
236
  ["W_STYLE_BAD_MAPPING", "mappings cannot be read"],
223
237
  ["W_STYLE_MAPPING_COLUMN_MISSING", "mappings read a column the file does not have"],
224
238
  ["W_STYLE_REFERENCE_CYCLE", "style references are circular or too deep"],
@@ -351,16 +365,34 @@ const SHAPES = {
351
365
  "roundedrectangle",
352
366
  "round-rect",
353
367
  "mrecord",
354
- "cut-rectangle",
355
368
  "round-tag",
356
- "bottom-round-rectangle"
369
+ "bottom-round-rectangle",
370
+ "bottomroundrectangle"
357
371
  ],
358
372
  triangle: ["triangle", "invtriangle", "round-triangle", "tag"],
359
373
  diamond: ["diamond", "rhombus", "mdiamond", "round-diamond"],
360
374
  pentagon: ["pentagon", "round-pentagon"],
361
- hexagon: ["hexagon", "hexagon2", "round-hexagon", "concave-hexagon", "septagon", "heptagon", "round-heptagon"],
362
- octagon: ["octagon", "doubleoctagon", "tripleoctagon", "round-octagon", "octagon2"],
363
- parallelogram: ["parallelogram", "parallelogram2", "rhomboid", "fat-arrow", "fatarrow"],
375
+ hexagon: [
376
+ "hexagon",
377
+ "hexagon2",
378
+ "round-hexagon",
379
+ "concave-hexagon",
380
+ "concavehexagon",
381
+ "septagon",
382
+ "heptagon",
383
+ "round-heptagon"
384
+ ],
385
+ // a cut rectangle is a rectangle with its four corners cut off: eight sides
386
+ octagon: [
387
+ "octagon",
388
+ "doubleoctagon",
389
+ "tripleoctagon",
390
+ "round-octagon",
391
+ "octagon2",
392
+ "cut-rectangle",
393
+ "cutrectangle"
394
+ ],
395
+ parallelogram: ["parallelogram", "parallelogram2", "rhomboid", "right-rhomboid", "fat-arrow", "fatarrow"],
364
396
  trapezoid: ["trapezoid", "trapezoid2", "invtrapezoid", "trapezium", "round-trapezoid"],
365
397
  star: ["star", "star5", "star6", "star8", "polygon"],
366
398
  vee: ["vee", "v"],
@@ -426,7 +458,32 @@ const POSITIONS = {
426
458
  "top-right": ["top-right", "north-east", "northeast"],
427
459
  "bottom-left": ["bottom-left", "south-west", "southwest"],
428
460
  "bottom-right": ["bottom-right", "south-east", "southeast"],
429
- "inside-top": ["inside-top"]
461
+ "inside-top": ["inside-top"],
462
+ "inside-bottom": ["inside-bottom"],
463
+ "inside-left": ["inside-left"],
464
+ "inside-right": ["inside-right"],
465
+ "inside-top-left": ["inside-top-left"],
466
+ "inside-top-right": ["inside-top-right"],
467
+ "inside-bottom-left": ["inside-bottom-left"],
468
+ "inside-bottom-right": ["inside-bottom-right"]
469
+ };
470
+ const BORDER_POSITIONS = {
471
+ inside: ["inside"],
472
+ center: ["center", "centre", "middle"],
473
+ outside: ["outside"]
474
+ };
475
+ const ARROW_SIDES = {
476
+ left: ["left"],
477
+ right: ["right"]
478
+ };
479
+ const TEXT_ALIGNS = {
480
+ left: ["left", "start"],
481
+ center: ["center", "centre", "middle"],
482
+ right: ["right", "end"]
483
+ };
484
+ const LABEL_FITS = {
485
+ inside: ["inside"],
486
+ bounds: ["bounds"]
430
487
  };
431
488
  const VIS$1 = {
432
489
  shape: {
@@ -435,9 +492,31 @@ const VIS$1 = {
435
492
  triangle: ["triangledown"],
436
493
  none: ["text"]
437
494
  },
438
- arrow: { inverted: ["inv-triangle"], square: ["box"] }
495
+ // curve and inv_curve: an arc at the end, bulging toward the node and away from it
496
+ arrow: { inverted: ["inv-triangle"], square: ["box"], "other:curve": ["curve"], "other:inv-curve": ["inv-curve"] }
439
497
  };
440
- const OVERRIDES = /* @__PURE__ */ new Map([["vis", VIS$1]]);
498
+ const CYJS$1 = {
499
+ arrow: {
500
+ "other:triangle-tee": ["triangle-tee"],
501
+ "other:triangle-cross": ["triangle-cross"],
502
+ "other:circle-triangle": ["circle-triangle"],
503
+ // a vee two thirds as long as its triangle (0.2 of the arrow width against 0.3)
504
+ "other:chevron": ["chevron"],
505
+ vee: ["triangle-backcurve"]
506
+ }
507
+ };
508
+ const GRAPHVIZ = {
509
+ arrow: { "other:curve": ["curve"], "other:inv-curve": ["icurve"] }
510
+ };
511
+ const YED = {
512
+ arrow: { vee: ["standard"] }
513
+ };
514
+ const OVERRIDES = /* @__PURE__ */ new Map([
515
+ ["vis", VIS$1],
516
+ ["graphviz", GRAPHVIZ],
517
+ ["cytoscape-js", CYJS$1],
518
+ ["yed", YED]
519
+ ]);
441
520
  const OPEN = /* @__PURE__ */ new Set(["shape", "borderStyle", "lineStyle", "arrow"]);
442
521
  function lookup(aliases) {
443
522
  const map = /* @__PURE__ */ new Map();
@@ -453,8 +532,12 @@ const COMMON = /* @__PURE__ */ new Map([
453
532
  ["borderStyle", lookup(BORDER_STYLES)],
454
533
  ["lineStyle", lookup(LINE_STYLES)],
455
534
  ["arrow", lookup(ARROWS)],
535
+ ["arrowSide", lookup(ARROW_SIDES)],
456
536
  ["weight", lookup(WEIGHTS)],
457
- ["position", lookup(POSITIONS)]
537
+ ["position", lookup(POSITIONS)],
538
+ ["labelFit", lookup(LABEL_FITS)],
539
+ ["borderPosition", lookup(BORDER_POSITIONS)],
540
+ ["textAlign", lookup(TEXT_ALIGNS)]
458
541
  ]);
459
542
  const DIALECT = new Map(
460
543
  Array.from(OVERRIDES, ([dialect, kinds]) => [
@@ -495,6 +578,13 @@ function dotLabelText(text, names, site) {
495
578
  if (site !== void 0) {
496
579
  spendAt(site, text.length);
497
580
  }
581
+ const out = replaceEscapes(
582
+ decodeEntities(substituteNames(text, names)),
583
+ (e) => e === "n" || e === "l" || e === "r" ? "\n" : e
584
+ );
585
+ return out.endsWith("\n") ? out.slice(0, -1) : out;
586
+ }
587
+ function substituteNames(text, names) {
498
588
  const subs = {
499
589
  N: names.node,
500
590
  G: names.graph,
@@ -502,9 +592,24 @@ function dotLabelText(text, names, site) {
502
592
  T: names.tail,
503
593
  H: names.head
504
594
  };
505
- const first = replaceEscapes(text, (e) => (Object.hasOwn(subs, e) ? subs[e] : void 0) ?? `\\${e}`);
506
- const out = replaceEscapes(first, (e) => e === "n" || e === "l" || e === "r" ? "\n" : e);
507
- return out.endsWith("\n") ? out.slice(0, -1) : out;
595
+ return replaceEscapes(text, (e) => (Object.hasOwn(subs, e) ? subs[e] : void 0) ?? `\\${e}`);
596
+ }
597
+ function dotLabelAlign(text, names) {
598
+ const parts = replaceEscapes(
599
+ substituteNames(text, names),
600
+ (e) => e === "n" || e === "l" || e === "r" ? `\0${e}\0` : "x"
601
+ ).split("\0");
602
+ const ends = parts.filter((_, i) => i % 2 === 1);
603
+ if (parts.at(-1) !== "") {
604
+ ends.push("n");
605
+ }
606
+ const count = (end) => ends.filter((e) => e === end).length;
607
+ const best = ["l", "r", "n"].filter((end) => count(end) === Math.max(count("l"), count("r"), count("n")));
608
+ const winner = best.length > 1 ? ends.find((e) => best.includes(e)) ?? "n" : best[0];
609
+ if (winner === "l") {
610
+ return "left";
611
+ }
612
+ return winner === "r" ? "right" : null;
508
613
  }
509
614
  function replaceEscapes(text, replace) {
510
615
  let out = "";
@@ -544,8 +649,12 @@ function entity(body) {
544
649
  function htmlLabelText(html, site) {
545
650
  spendAt(site, html.length);
546
651
  noteAt(site, STYLE_ISSUE.HTML_LABEL, html);
652
+ return htmlLabelSpans(html).map((s) => s.text).join("").trim();
653
+ }
654
+ const FONT_TAGS = /^<(\/?)(b|i|u|o|s|sub|sup|font)\b/i;
655
+ function htmlLabelSpans(html) {
547
656
  const body = html.startsWith("<") && html.endsWith(">") ? html.slice(1, -1) : html;
548
- let out = "";
657
+ const s = { spans: [], tags: [], out: "", open: [] };
549
658
  let i = 0;
550
659
  while (i < body.length) {
551
660
  const c = body[i];
@@ -554,20 +663,72 @@ function htmlLabelText(html, site) {
554
663
  if (close < 0) {
555
664
  break;
556
665
  }
557
- if (/^<br\b/i.test(body.slice(i, i + 4))) {
558
- out += "\n";
559
- }
666
+ readTag(s, body, i, close);
560
667
  i = close + 1;
561
- } else if (c === "&") {
562
- const [text, next] = entityAt(body, i);
563
- out += text;
564
- i = next;
565
668
  } else {
566
- out += c;
567
- i++;
669
+ const [text, next] = c === "&" ? entityAt(body, i) : [c, i + 1];
670
+ emitSpan(s, s.open.at(-1) === "table" ? "" : text);
671
+ i = next;
568
672
  }
569
673
  }
570
- return out.trim();
674
+ return s.spans;
675
+ }
676
+ function emitSpan(s, text) {
677
+ s.out += text;
678
+ const last = s.spans.at(-1);
679
+ if (last?.tags === s.tags) {
680
+ s.spans[s.spans.length - 1] = { text: last.text + text, tags: s.tags };
681
+ } else if (text !== "") {
682
+ s.spans.push({ text, tags: s.tags });
683
+ }
684
+ }
685
+ function lineHasText(s) {
686
+ return s.out.slice(s.out.lastIndexOf("\n") + 1).trim() !== "";
687
+ }
688
+ function readTag(s, body, i, close) {
689
+ const tag = /^<(\/?)(br|table|tr|td)\b/i.exec(body.slice(i, i + 7));
690
+ if (tag !== null) {
691
+ layoutTag(s, tag[2].toLowerCase(), tag[1] === "/");
692
+ return;
693
+ }
694
+ const font = FONT_TAGS.exec(body.slice(i, i + 6));
695
+ if (font !== null && font[1] === "/") {
696
+ s.tags = withoutLastTag(s.tags, font[2]);
697
+ } else if (font !== null && body[close - 1] !== "/") {
698
+ s.tags = [...s.tags, body.slice(i, close + 1)];
699
+ }
700
+ }
701
+ function layoutTag(s, name2, closing) {
702
+ if (name2 === "br" || name2 === "tr") {
703
+ if (name2 === "br" || !closing && lineHasText(s)) {
704
+ emitSpan(s, "\n");
705
+ }
706
+ } else if (closing) {
707
+ s.open.pop();
708
+ } else {
709
+ if (name2 === "td" && lineHasText(s)) {
710
+ emitSpan(s, " ");
711
+ }
712
+ s.open.push(name2 === "td" ? "td" : "table");
713
+ }
714
+ }
715
+ function withoutLastTag(tags, name2) {
716
+ const lower = name2.toLowerCase();
717
+ let at = tags.length - 1;
718
+ while (at >= 0 && /^<(\w+)/.exec(tags[at])?.[1].toLowerCase() !== lower) {
719
+ at--;
720
+ }
721
+ return at < 0 ? tags : [...tags.slice(0, at), ...tags.slice(at + 1)];
722
+ }
723
+ function decodeEntities(text) {
724
+ let out = "";
725
+ let i = 0;
726
+ for (let amp = text.indexOf("&"); amp >= 0; amp = text.indexOf("&", i)) {
727
+ const [decoded, next] = entityAt(text, amp);
728
+ out += text.slice(i, amp) + decoded;
729
+ i = next;
730
+ }
731
+ return out + text.slice(i);
571
732
  }
572
733
  function entityAt(body, i) {
573
734
  const near = body.slice(i + 1, i + 10).indexOf(";");
@@ -613,24 +774,140 @@ function recordLabelText(label, site) {
613
774
  const STYLE_PROPERTIES = Object.freeze({
614
775
  node: /* @__PURE__ */ new Map([
615
776
  ["fill", "color"],
777
+ ["fillGradient", "color"],
616
778
  ["borderColor", "color"],
617
779
  ["labelColor", "color"],
618
780
  ["fillOpacity", "opacity"],
619
781
  ["opacity", "opacity"],
782
+ ["borderOpacity", "opacity"],
620
783
  ["width", "number"],
621
784
  ["height", "number"],
622
785
  ["borderWidth", "number"],
623
786
  ["cornerRadius", "number"],
787
+ ["fillGradientAngle", "number"],
788
+ ["fillGradientColors", "text"],
789
+ ["fillGradientStops", "text"],
790
+ ["fillGradientKind", "text"],
624
791
  ["labelSize", "number"],
792
+ ["labelWrapWidth", "number"],
793
+ ["labelWrapTrailingSpace", "boolean"],
794
+ ["labelWrapEllipsis", "boolean"],
795
+ ["labelWrapAnywhere", "boolean"],
796
+ ["labelWrapSpaceCount", "number"],
797
+ ["labelRunAlign", "text"],
798
+ ["labelOffsetX", "signed"],
799
+ ["labelOffsetY", "signed"],
800
+ ["labelShiftX", "signed"],
801
+ ["labelShiftY", "signed"],
802
+ ["labelOpacity", "opacity"],
803
+ ["labelBackgroundOpacity", "opacity"],
804
+ ["labelFit", "labelFit"],
805
+ ["labelPaddingX", "number"],
806
+ ["labelPaddingY", "number"],
807
+ ["labelFitSquare", "boolean"],
625
808
  ["shape", "shape"],
809
+ ["shapePoints", "text"],
810
+ ["shapePointsStretch", "boolean"],
811
+ ["shapeParts", "text"],
812
+ ["shapeLines", "text"],
813
+ ["shapeLineWidth", "number"],
814
+ ["shapeTexts", "text"],
626
815
  ["borderStyle", "borderStyle"],
816
+ ["borderPosition", "borderPosition"],
817
+ ["borderWaveAmplitude", "number"],
818
+ ["borderWavePeriod", "number"],
819
+ ["outerBorderColor", "color"],
820
+ ["outerBorderWidth", "number"],
821
+ ["outerBorderOpacity", "opacity"],
822
+ ["outerBorderStyle", "borderStyle"],
823
+ ["outerBorderOffset", "number"],
824
+ ["underlayColor", "color"],
825
+ ["underlayOpacity", "opacity"],
826
+ ["underlayPadding", "number"],
827
+ ["underlayShape", "shape"],
828
+ ["underlayCornerRadius", "number"],
829
+ ["overlayColor", "color"],
830
+ ["overlayOpacity", "opacity"],
831
+ ["overlayPadding", "number"],
832
+ ["overlayShape", "shape"],
833
+ ["overlayCornerRadius", "number"],
627
834
  ["label", "text"],
628
835
  ["tooltip", "text"],
629
836
  ["labelFont", "text"],
630
837
  ["labelWeight", "weight"],
631
838
  ["labelItalic", "boolean"],
632
839
  ["labelPosition", "position"],
840
+ ["labelTextAlign", "textAlign"],
841
+ ["labelRuns", "text"],
842
+ ["labelMinScreenSize", "number"],
843
+ ["labelAvoidOverlap", "boolean"],
844
+ ["labelMinNodeScreenSize", "number"],
845
+ ["labelGridCellSize", "number"],
846
+ ["labelOnTop", "boolean"],
847
+ ["labelRotation", "number"],
848
+ ["labelBackground", "color"],
849
+ ["labelOutlineColor", "color"],
850
+ ["labelOutlineWidth", "number"],
851
+ ["labelBorderColor", "color"],
852
+ ["labelBorderWidth", "number"],
853
+ ["labelOutlineOpacity", "opacity"],
854
+ ["labelBorderOpacity", "opacity"],
855
+ ["labelPadding", "number"],
856
+ ["labelCornerRadius", "number"],
857
+ ["labelLineHeight", "number"],
633
858
  ["image", "text"],
859
+ ["imageFit", "text"],
860
+ ["imageFallback", "text"],
861
+ ["imageWidth", "number"],
862
+ ["imageHeight", "number"],
863
+ ["imagePositionX", "number"],
864
+ ["imagePositionY", "number"],
865
+ ["imageOffsetX", "signed"],
866
+ ["imageOffsetY", "signed"],
867
+ ["imageRepeat", "text"],
868
+ ["imageClip", "text"],
869
+ ["imageSmoothing", "boolean"],
870
+ ["imageAutoSize", "text"],
871
+ ["imageOpacity", "opacity"],
872
+ ["glyph", "text"],
873
+ ["glyphFont", "text"],
874
+ ["glyphSize", "number"],
875
+ ["glyphWeight", "weight"],
876
+ ["glyphColor", "color"],
877
+ ["pieColors", "text"],
878
+ ["pieSizes", "text"],
879
+ ["pieOpacities", "text"],
880
+ ["pieRadius", "number"],
881
+ ["pieHole", "number"],
882
+ ["pieRotation", "number"],
883
+ ["pieFitBox", "boolean"],
884
+ ["pieOffsetX", "signed"],
885
+ ["pieOffsetY", "signed"],
886
+ ["stripeColors", "text"],
887
+ ["stripeSizes", "text"],
888
+ ["stripeOpacities", "text"],
889
+ ["stripeDirection", "text"],
890
+ ["stripeSize", "number"],
891
+ ["chartKind", "text"],
892
+ ["chartValues", "text"],
893
+ ["chartColors", "text"],
894
+ ["chartMin", "signed"],
895
+ ["chartMax", "signed"],
896
+ ["chartHorizontal", "boolean"],
897
+ ["chartSize", "number"],
898
+ ["chartMargin", "signed"],
899
+ ["chartGap", "number"],
900
+ ["chartLineWidth", "number"],
901
+ ["chartBorderColor", "color"],
902
+ ["chartBorderWidth", "number"],
903
+ ["groupPadding", "number"],
904
+ ["groupPaddingRatio", "number"],
905
+ ["groupPaddingOf", "text"],
906
+ ["groupMinWidth", "number"],
907
+ ["groupMinHeight", "number"],
908
+ ["groupMinWidthBiasLeft", "number"],
909
+ ["groupMinHeightBiasTop", "number"],
910
+ ["groupIncludeLabels", "boolean"],
634
911
  ["visible", "boolean"]
635
912
  ]),
636
913
  edge: /* @__PURE__ */ new Map([
@@ -640,20 +917,114 @@ const STYLE_PROPERTIES = Object.freeze({
640
917
  ["labelColor", "color"],
641
918
  ["opacity", "opacity"],
642
919
  ["width", "number"],
920
+ ["minScreenWidth", "number"],
921
+ ["outlineWidth", "number"],
922
+ ["outlineColor", "color"],
923
+ ["outlineOpacity", "opacity"],
924
+ ["outlineStyle", "lineStyle"],
925
+ ["underlayColor", "color"],
926
+ ["underlayOpacity", "opacity"],
927
+ ["underlayPadding", "number"],
928
+ ["overlayColor", "color"],
929
+ ["overlayOpacity", "opacity"],
930
+ ["overlayPadding", "number"],
931
+ ["gradientColors", "text"],
932
+ ["gradientStops", "text"],
933
+ ["gradientKind", "text"],
643
934
  ["labelSize", "number"],
644
935
  ["arrowSize", "number"],
936
+ ["sourceArrowSize", "number"],
937
+ ["sourceArrowLength", "number"],
938
+ ["targetArrowLength", "number"],
939
+ ["sourceArrowWidth", "number"],
940
+ ["targetArrowWidth", "number"],
941
+ ["sourceArrowGap", "number"],
942
+ ["targetArrowGap", "number"],
943
+ ["sourceArrowSide", "arrowSide"],
944
+ ["targetArrowSide", "arrowSide"],
945
+ ["arrowPosition", "number"],
645
946
  ["lineStyle", "lineStyle"],
947
+ ["waveAmplitude", "number"],
948
+ ["wavePeriod", "number"],
646
949
  ["sourceArrow", "arrow"],
647
950
  ["targetArrow", "arrow"],
951
+ ["midTargetArrow", "arrow"],
952
+ ["midSourceArrow", "arrow"],
953
+ ["midTargetArrowColor", "color"],
954
+ ["midSourceArrowColor", "color"],
955
+ ["targetArrowImage", "text"],
956
+ ["sourceArrowImage", "text"],
957
+ ["midTargetArrowImage", "text"],
958
+ ["targetArrowImageWidth", "number"],
959
+ ["targetArrowImageHeight", "number"],
960
+ ["sourceArrowImageWidth", "number"],
961
+ ["sourceArrowImageHeight", "number"],
962
+ ["midTargetArrowImageWidth", "number"],
963
+ ["midTargetArrowImageHeight", "number"],
648
964
  ["curved", "boolean"],
649
965
  ["bends", "text"],
966
+ ["fanSpacing", "number"],
967
+ ["fanned", "boolean"],
968
+ ["bendCurve", "text"],
969
+ ["arcRadius", "number"],
970
+ ["supportModel", "text"],
971
+ ["supportSpringLength", "number"],
972
+ ["supportSpringConstant", "number"],
973
+ ["supportRepulsion", "number"],
974
+ ["supportCentralGravity", "number"],
975
+ ["nodeGap", "number"],
976
+ ["sourceNodeGap", "number"],
977
+ ["targetNodeGap", "number"],
978
+ ["sourcePort", "text"],
979
+ ["targetPort", "text"],
650
980
  ["label", "text"],
651
981
  ["tooltip", "text"],
652
982
  ["labelFont", "text"],
653
983
  ["labelWeight", "weight"],
984
+ ["labelTextAlign", "textAlign"],
985
+ ["labelRuns", "text"],
654
986
  ["labelItalic", "boolean"],
987
+ ["labelWrapWidth", "number"],
988
+ ["labelWrapEllipsis", "boolean"],
989
+ ["labelWrapAnywhere", "boolean"],
990
+ ["labelWrapSpaceCount", "number"],
991
+ ["labelRunAlign", "text"],
992
+ ["labelPosition", "position"],
993
+ ["labelRotation", "number"],
994
+ ["labelOffsetX", "signed"],
995
+ ["labelOffsetY", "signed"],
996
+ ["labelShiftX", "signed"],
997
+ ["labelShiftY", "signed"],
998
+ ["labelOpacity", "opacity"],
999
+ ["labelBackgroundOpacity", "opacity"],
1000
+ ["labelBackground", "color"],
1001
+ ["labelOutlineColor", "color"],
1002
+ ["labelOutlineWidth", "number"],
1003
+ ["labelBorderColor", "color"],
1004
+ ["labelBorderWidth", "number"],
1005
+ ["labelOutlineOpacity", "opacity"],
1006
+ ["labelBorderOpacity", "opacity"],
1007
+ ["labelPadding", "number"],
1008
+ ["labelCornerRadius", "number"],
1009
+ ["labelLineHeight", "number"],
655
1010
  ["sourceLabel", "text"],
656
1011
  ["targetLabel", "text"],
1012
+ ["sourceLabelOffset", "number"],
1013
+ ["targetLabelOffset", "number"],
1014
+ ["sourceLabelOffsetX", "signed"],
1015
+ ["sourceLabelOffsetY", "signed"],
1016
+ ["targetLabelOffsetX", "signed"],
1017
+ ["targetLabelOffsetY", "signed"],
1018
+ ["sourceLabelRotation", "number"],
1019
+ ["targetLabelRotation", "number"],
1020
+ ["sourceLabelSize", "number"],
1021
+ ["targetLabelSize", "number"],
1022
+ ["sourceLabelColor", "color"],
1023
+ ["targetLabelColor", "color"],
1024
+ ["sourceLabelFont", "text"],
1025
+ ["targetLabelFont", "text"],
1026
+ ["labelMinScreenSize", "number"],
1027
+ ["labelOnTop", "boolean"],
657
1028
  ["visible", "boolean"]
658
1029
  ]),
659
1030
  graph: /* @__PURE__ */ new Map([["background", "color"]])
@@ -674,10 +1045,12 @@ const STYLE_ENUMS = /* @__PURE__ */ new Map([
674
1045
  "trapezoid",
675
1046
  "star",
676
1047
  "vee",
1048
+ "polygon",
677
1049
  "none"
678
1050
  ]
679
1051
  ],
680
1052
  ["borderStyle", ["solid", "dashed", "dotted", "dash-dot", "double"]],
1053
+ ["borderPosition", ["inside", "center", "outside"]],
681
1054
  ["lineStyle", ["solid", "dashed", "dotted", "dash-dot", "long-dash", "double", "zigzag", "sinewave"]],
682
1055
  [
683
1056
  "arrow",
@@ -697,7 +1070,10 @@ const STYLE_ENUMS = /* @__PURE__ */ new Map([
697
1070
  "inverted"
698
1071
  ]
699
1072
  ],
1073
+ ["arrowSide", ["left", "right"]],
700
1074
  ["weight", ["normal", "bold"]],
1075
+ ["textAlign", ["left", "center", "right"]],
1076
+ ["labelFit", ["inside", "bounds"]],
701
1077
  [
702
1078
  "position",
703
1079
  [
@@ -710,7 +1086,14 @@ const STYLE_ENUMS = /* @__PURE__ */ new Map([
710
1086
  "top-right",
711
1087
  "bottom-left",
712
1088
  "bottom-right",
713
- "inside-top"
1089
+ "inside-top",
1090
+ "inside-bottom",
1091
+ "inside-left",
1092
+ "inside-right",
1093
+ "inside-top-left",
1094
+ "inside-top-right",
1095
+ "inside-bottom-left",
1096
+ "inside-bottom-right"
714
1097
  ]
715
1098
  ]
716
1099
  ]);
@@ -727,6 +1110,8 @@ function isStyleValue(target, property, value) {
727
1110
  return typeof value === "string" && /^#[0-9a-f]{6}$/.test(value);
728
1111
  case "number":
729
1112
  return typeof value === "number" && Number.isFinite(value) && value >= 0;
1113
+ case "signed":
1114
+ return typeof value === "number" && Number.isFinite(value);
730
1115
  case "opacity":
731
1116
  return typeof value === "number" && value >= 0 && value <= 1;
732
1117
  case "text":
@@ -898,7 +1283,18 @@ function matches(where, src, i, depth = 0) {
898
1283
  }
899
1284
  return false;
900
1285
  }
901
- const ENUM_KINDS = /* @__PURE__ */ new Set(["shape", "borderStyle", "lineStyle", "arrow", "weight", "position"]);
1286
+ const ENUM_KINDS = /* @__PURE__ */ new Set([
1287
+ "shape",
1288
+ "borderStyle",
1289
+ "lineStyle",
1290
+ "arrow",
1291
+ "arrowSide",
1292
+ "weight",
1293
+ "position",
1294
+ "labelFit",
1295
+ "borderPosition",
1296
+ "textAlign"
1297
+ ]);
902
1298
  function canonicalFor(target, property) {
903
1299
  const kind = STYLE_PROPERTIES[target].get(property);
904
1300
  const site = { notes: new StyleNotes(), target, property };
@@ -910,6 +1306,8 @@ function canonicalFor(target, property) {
910
1306
  return (raw) => typeof raw === "string" && /^#[0-9a-fA-F]{6}$/.test(raw) ? raw.toLowerCase() : null;
911
1307
  case "number":
912
1308
  return (raw) => canonNumber(raw, site);
1309
+ case "signed":
1310
+ return (raw) => canonSigned(raw, site);
913
1311
  case "opacity":
914
1312
  return (raw) => canonOpacity(raw, "css", site);
915
1313
  case "boolean":
@@ -1097,12 +1495,18 @@ function ruleValue(rule, property, canon, src, i) {
1097
1495
  return mapping2 === void 0 ? null : evalMapping(mapping2, canon, src, i);
1098
1496
  }
1099
1497
  function resolveStyles(extracted, target, property, snapshot) {
1498
+ return resolveRules(extracted.styles.rules, target, property, sourceOf(extracted, target, snapshot));
1499
+ }
1500
+ function matchPredicate(extracted, target, where, snapshot) {
1501
+ const src = sourceOf(extracted, target, snapshot);
1502
+ return Array.from({ length: src.n }, (_v, i) => matches(where, src, i));
1503
+ }
1504
+ function sourceOf(extracted, target, snapshot) {
1100
1505
  let n = extracted.fingerprint[target === "node" ? "nodes" : "edges"];
1101
1506
  if (snapshot !== void 0) {
1102
1507
  n = target === "node" ? snapshot.nodeCount : snapshot.edgeCount;
1103
1508
  }
1104
- const src = refSource(target, n, extracted.columns[target], extracted.features[target], snapshot);
1105
- return resolveRules(extracted.styles.rules, target, property, src);
1509
+ return refSource(target, n, extracted.columns[target], extracted.features[target], snapshot);
1106
1510
  }
1107
1511
  function within(a, b) {
1108
1512
  if (a === b) {
@@ -1133,10 +1537,10 @@ const CSS_COLORS = table(
1133
1537
  "aliceblue=f0f8ff antiquewhite=faebd7 aqua=00ffff aquamarine=7fffd4 azure=f0ffff beige=f5f5dc bisque=ffe4c4 black=000000 blanchedalmond=ffebcd blue=0000ff blueviolet=8a2be2 brown=a52a2a burlywood=deb887 cadetblue=5f9ea0 chartreuse=7fff00 chocolate=d2691e coral=ff7f50 cornflowerblue=6495ed cornsilk=fff8dc crimson=dc143c cyan=00ffff darkblue=00008b darkcyan=008b8b darkgoldenrod=b8860b darkgray=a9a9a9 darkgreen=006400 darkgrey=a9a9a9 darkkhaki=bdb76b darkmagenta=8b008b darkolivegreen=556b2f darkorange=ff8c00 darkorchid=9932cc darkred=8b0000 darksalmon=e9967a darkseagreen=8fbc8f darkslateblue=483d8b darkslategray=2f4f4f darkslategrey=2f4f4f darkturquoise=00ced1 darkviolet=9400d3 deeppink=ff1493 deepskyblue=00bfff dimgray=696969 dimgrey=696969 dodgerblue=1e90ff firebrick=b22222 floralwhite=fffaf0 forestgreen=228b22 fuchsia=ff00ff gainsboro=dcdcdc ghostwhite=f8f8ff gold=ffd700 goldenrod=daa520 gray=808080 green=008000 greenyellow=adff2f grey=808080 honeydew=f0fff0 hotpink=ff69b4 indianred=cd5c5c indigo=4b0082 ivory=fffff0 khaki=f0e68c lavender=e6e6fa lavenderblush=fff0f5 lawngreen=7cfc00 lemonchiffon=fffacd lightblue=add8e6 lightcoral=f08080 lightcyan=e0ffff lightgoldenrodyellow=fafad2 lightgray=d3d3d3 lightgreen=90ee90 lightgrey=d3d3d3 lightpink=ffb6c1 lightsalmon=ffa07a lightseagreen=20b2aa lightskyblue=87cefa lightslategray=778899 lightslategrey=778899 lightsteelblue=b0c4de lightyellow=ffffe0 lime=00ff00 limegreen=32cd32 linen=faf0e6 magenta=ff00ff maroon=800000 mediumaquamarine=66cdaa mediumblue=0000cd mediumorchid=ba55d3 mediumpurple=9370db mediumseagreen=3cb371 mediumslateblue=7b68ee mediumspringgreen=00fa9a mediumturquoise=48d1cc mediumvioletred=c71585 midnightblue=191970 mintcream=f5fffa mistyrose=ffe4e1 moccasin=ffe4b5 navajowhite=ffdead navy=000080 oldlace=fdf5e6 olive=808000 olivedrab=6b8e23 orange=ffa500 orangered=ff4500 orchid=da70d6 palegoldenrod=eee8aa palegreen=98fb98 paleturquoise=afeeee palevioletred=db7093 papayawhip=ffefd5 peachpuff=ffdab9 peru=cd853f pink=ffc0cb plum=dda0dd powderblue=b0e0e6 purple=800080 rebeccapurple=663399 red=ff0000 rosybrown=bc8f8f royalblue=4169e1 saddlebrown=8b4513 salmon=fa8072 sandybrown=f4a460 seagreen=2e8b57 seashell=fff5ee sienna=a0522d silver=c0c0c0 skyblue=87ceeb slateblue=6a5acd slategray=708090 slategrey=708090 snow=fffafa springgreen=00ff7f steelblue=4682b4 tan=d2b48c teal=008080 thistle=d8bfd8 tomato=ff6347 turquoise=40e0d0 violet=ee82ee wheat=f5deb3 white=ffffff whitesmoke=f5f5f5 yellow=ffff00 yellowgreen=9acd32"
1134
1538
  );
1135
1539
  const X11_COLORS = table(
1136
- "aliceblue=f0f8ff antiquewhite=faebd7 antiquewhite1=ffefdb antiquewhite2=eedfcc antiquewhite3=cdc0b0 antiquewhite4=8b8378 aqua=00ffff aquamarine=7fffd4 aquamarine1=7fffd4 aquamarine2=76eec6 aquamarine3=66cdaa aquamarine4=458b74 azure=f0ffff azure1=f0ffff azure2=e0eeee azure3=c1cdcd azure4=838b8b beige=f5f5dc bisque=ffe4c4 bisque1=ffe4c4 bisque2=eed5b7 bisque3=cdb79e bisque4=8b7d6b black=000000 blanchedalmond=ffebcd blue=0000ff blue1=0000ff blue2=0000ee blue3=0000cd blue4=00008b blueviolet=8a2be2 brown=a52a2a brown1=ff4040 brown2=ee3b3b brown3=cd3333 brown4=8b2323 burlywood=deb887 burlywood1=ffd39b burlywood2=eec591 burlywood3=cdaa7d burlywood4=8b7355 cadetblue=5f9ea0 cadetblue1=98f5ff cadetblue2=8ee5ee cadetblue3=7ac5cd cadetblue4=53868b chartreuse=7fff00 chartreuse1=7fff00 chartreuse2=76ee00 chartreuse3=66cd00 chartreuse4=458b00 chocolate=d2691e chocolate1=ff7f24 chocolate2=ee7621 chocolate3=cd661d chocolate4=8b4513 coral=ff7f50 coral1=ff7256 coral2=ee6a50 coral3=cd5b45 coral4=8b3e2f cornflowerblue=6495ed cornsilk=fff8dc cornsilk1=fff8dc cornsilk2=eee8cd cornsilk3=cdc8b1 cornsilk4=8b8878 crimson=dc143c cyan=00ffff cyan1=00ffff cyan2=00eeee cyan3=00cdcd cyan4=008b8b darkblue=00008b darkcyan=008b8b darkgoldenrod=b8860b darkgoldenrod1=ffb90f darkgoldenrod2=eead0e darkgoldenrod3=cd950c darkgoldenrod4=8b6508 darkgray=a9a9a9 darkgreen=006400 darkgrey=a9a9a9 darkkhaki=bdb76b darkmagenta=8b008b darkolivegreen=556b2f darkolivegreen1=caff70 darkolivegreen2=bcee68 darkolivegreen3=a2cd5a darkolivegreen4=6e8b3d darkorange=ff8c00 darkorange1=ff7f00 darkorange2=ee7600 darkorange3=cd6600 darkorange4=8b4500 darkorchid=9932cc darkorchid1=bf3eff darkorchid2=b23aee darkorchid3=9a32cd darkorchid4=68228b darkred=8b0000 darksalmon=e9967a darkseagreen=8fbc8f darkseagreen1=c1ffc1 darkseagreen2=b4eeb4 darkseagreen3=9bcd9b darkseagreen4=698b69 darkslateblue=483d8b darkslategray=2f4f4f darkslategray1=97ffff darkslategray2=8deeee darkslategray3=79cdcd darkslategray4=528b8b darkslategrey=2f4f4f darkturquoise=00ced1 darkviolet=9400d3 deeppink=ff1493 deeppink1=ff1493 deeppink2=ee1289 deeppink3=cd1076 deeppink4=8b0a50 deepskyblue=00bfff deepskyblue1=00bfff deepskyblue2=00b2ee deepskyblue3=009acd deepskyblue4=00688b dimgray=696969 dimgrey=696969 dodgerblue=1e90ff dodgerblue1=1e90ff dodgerblue2=1c86ee dodgerblue3=1874cd dodgerblue4=104e8b firebrick=b22222 firebrick1=ff3030 firebrick2=ee2c2c firebrick3=cd2626 firebrick4=8b1a1a floralwhite=fffaf0 forestgreen=228b22 fuchsia=ff00ff gainsboro=dcdcdc ghostwhite=f8f8ff gold=ffd700 gold1=ffd700 gold2=eec900 gold3=cdad00 gold4=8b7500 goldenrod=daa520 goldenrod1=ffc125 goldenrod2=eeb422 goldenrod3=cd9b1d goldenrod4=8b6914 gray=c0c0c0 gray0=000000 gray1=030303 gray10=1a1a1a gray100=ffffff gray11=1c1c1c gray12=1f1f1f gray13=212121 gray14=242424 gray15=262626 gray16=292929 gray17=2b2b2b gray18=2e2e2e gray19=303030 gray2=050505 gray20=333333 gray21=363636 gray22=383838 gray23=3b3b3b gray24=3d3d3d gray25=404040 gray26=424242 gray27=454545 gray28=474747 gray29=4a4a4a gray3=080808 gray30=4d4d4d gray31=4f4f4f gray32=525252 gray33=545454 gray34=575757 gray35=595959 gray36=5c5c5c gray37=5e5e5e gray38=616161 gray39=636363 gray4=0a0a0a gray40=666666 gray41=696969 gray42=6b6b6b gray43=6e6e6e gray44=707070 gray45=737373 gray46=757575 gray47=787878 gray48=7a7a7a gray49=7d7d7d gray5=0d0d0d gray50=7f7f7f gray51=828282 gray52=858585 gray53=878787 gray54=8a8a8a gray55=8c8c8c gray56=8f8f8f gray57=919191 gray58=949494 gray59=969696 gray6=0f0f0f gray60=999999 gray61=9c9c9c gray62=9e9e9e gray63=a1a1a1 gray64=a3a3a3 gray65=a6a6a6 gray66=a8a8a8 gray67=ababab gray68=adadad gray69=b0b0b0 gray7=121212 gray70=b3b3b3 gray71=b5b5b5 gray72=b8b8b8 gray73=bababa gray74=bdbdbd gray75=bfbfbf gray76=c2c2c2 gray77=c4c4c4 gray78=c7c7c7 gray79=c9c9c9 gray8=141414 gray80=cccccc gray81=cfcfcf gray82=d1d1d1 gray83=d4d4d4 gray84=d6d6d6 gray85=d9d9d9 gray86=dbdbdb gray87=dedede gray88=e0e0e0 gray89=e3e3e3 gray9=171717 gray90=e5e5e5 gray91=e8e8e8 gray92=ebebeb gray93=ededed gray94=f0f0f0 gray95=f2f2f2 gray96=f5f5f5 gray97=f7f7f7 gray98=fafafa gray99=fcfcfc green=00ff00 green1=00ff00 green2=00ee00 green3=00cd00 green4=008b00 greenyellow=adff2f grey=c0c0c0 grey0=000000 grey1=030303 grey10=1a1a1a grey100=ffffff grey11=1c1c1c grey12=1f1f1f grey13=212121 grey14=242424 grey15=262626 grey16=292929 grey17=2b2b2b grey18=2e2e2e grey19=303030 grey2=050505 grey20=333333 grey21=363636 grey22=383838 grey23=3b3b3b grey24=3d3d3d grey25=404040 grey26=424242 grey27=454545 grey28=474747 grey29=4a4a4a grey3=080808 grey30=4d4d4d grey31=4f4f4f grey32=525252 grey33=545454 grey34=575757 grey35=595959 grey36=5c5c5c grey37=5e5e5e grey38=616161 grey39=636363 grey4=0a0a0a grey40=666666 grey41=696969 grey42=6b6b6b grey43=6e6e6e grey44=707070 grey45=737373 grey46=757575 grey47=787878 grey48=7a7a7a grey49=7d7d7d grey5=0d0d0d grey50=7f7f7f grey51=828282 grey52=858585 grey53=878787 grey54=8a8a8a grey55=8c8c8c grey56=8f8f8f grey57=919191 grey58=949494 grey59=969696 grey6=0f0f0f grey60=999999 grey61=9c9c9c grey62=9e9e9e grey63=a1a1a1 grey64=a3a3a3 grey65=a6a6a6 grey66=a8a8a8 grey67=ababab grey68=adadad grey69=b0b0b0 grey7=121212 grey70=b3b3b3 grey71=b5b5b5 grey72=b8b8b8 grey73=bababa grey74=bdbdbd grey75=bfbfbf grey76=c2c2c2 grey77=c4c4c4 grey78=c7c7c7 grey79=c9c9c9 grey8=141414 grey80=cccccc grey81=cfcfcf grey82=d1d1d1 grey83=d4d4d4 grey84=d6d6d6 grey85=d9d9d9 grey86=dbdbdb grey87=dedede grey88=e0e0e0 grey89=e3e3e3 grey9=171717 grey90=e5e5e5 grey91=e8e8e8 grey92=ebebeb grey93=ededed grey94=f0f0f0 grey95=f2f2f2 grey96=f5f5f5 grey97=f7f7f7 grey98=fafafa grey99=fcfcfc honeydew=f0fff0 honeydew1=f0fff0 honeydew2=e0eee0 honeydew3=c1cdc1 honeydew4=838b83 hotpink=ff69b4 hotpink1=ff6eb4 hotpink2=ee6aa7 hotpink3=cd6090 hotpink4=8b3a62 indianred=cd5c5c indianred1=ff6a6a indianred2=ee6363 indianred3=cd5555 indianred4=8b3a3a indigo=4b0082 ivory=fffff0 ivory1=fffff0 ivory2=eeeee0 ivory3=cdcdc1 ivory4=8b8b83 khaki=f0e68c khaki1=fff68f khaki2=eee685 khaki3=cdc673 khaki4=8b864e lavender=e6e6fa lavenderblush=fff0f5 lavenderblush1=fff0f5 lavenderblush2=eee0e5 lavenderblush3=cdc1c5 lavenderblush4=8b8386 lawngreen=7cfc00 lemonchiffon=fffacd lemonchiffon1=fffacd lemonchiffon2=eee9bf lemonchiffon3=cdc9a5 lemonchiffon4=8b8970 lightblue=add8e6 lightblue1=bfefff lightblue2=b2dfee lightblue3=9ac0cd lightblue4=68838b lightcoral=f08080 lightcyan=e0ffff lightcyan1=e0ffff lightcyan2=d1eeee lightcyan3=b4cdcd lightcyan4=7a8b8b lightgoldenrod=eedd82 lightgoldenrod1=ffec8b lightgoldenrod2=eedc82 lightgoldenrod3=cdbe70 lightgoldenrod4=8b814c lightgoldenrodyellow=fafad2 lightgray=d3d3d3 lightgreen=90ee90 lightgrey=d3d3d3 lightpink=ffb6c1 lightpink1=ffaeb9 lightpink2=eea2ad lightpink3=cd8c95 lightpink4=8b5f65 lightsalmon=ffa07a lightsalmon1=ffa07a lightsalmon2=ee9572 lightsalmon3=cd8162 lightsalmon4=8b5742 lightseagreen=20b2aa lightskyblue=87cefa lightskyblue1=b0e2ff lightskyblue2=a4d3ee lightskyblue3=8db6cd lightskyblue4=607b8b lightslateblue=8470ff lightslategray=778899 lightslategrey=778899 lightsteelblue=b0c4de lightsteelblue1=cae1ff lightsteelblue2=bcd2ee lightsteelblue3=a2b5cd lightsteelblue4=6e7b8b lightyellow=ffffe0 lightyellow1=ffffe0 lightyellow2=eeeed1 lightyellow3=cdcdb4 lightyellow4=8b8b7a lime=00ff00 limegreen=32cd32 linen=faf0e6 magenta=ff00ff magenta1=ff00ff magenta2=ee00ee magenta3=cd00cd magenta4=8b008b maroon=b03060 maroon1=ff34b3 maroon2=ee30a7 maroon3=cd2990 maroon4=8b1c62 mediumaquamarine=66cdaa mediumblue=0000cd mediumorchid=ba55d3 mediumorchid1=e066ff mediumorchid2=d15fee mediumorchid3=b452cd mediumorchid4=7a378b mediumpurple=9370db mediumpurple1=ab82ff mediumpurple2=9f79ee mediumpurple3=8968cd mediumpurple4=5d478b mediumseagreen=3cb371 mediumslateblue=7b68ee mediumspringgreen=00fa9a mediumturquoise=48d1cc mediumvioletred=c71585 midnightblue=191970 mintcream=f5fffa mistyrose=ffe4e1 mistyrose1=ffe4e1 mistyrose2=eed5d2 mistyrose3=cdb7b5 mistyrose4=8b7d7b moccasin=ffe4b5 navajowhite=ffdead navajowhite1=ffdead navajowhite2=eecfa1 navajowhite3=cdb38b navajowhite4=8b795e navy=000080 navyblue=000080 oldlace=fdf5e6 olive=808000 olivedrab=6b8e23 olivedrab1=c0ff3e olivedrab2=b3ee3a olivedrab3=9acd32 olivedrab4=698b22 orange=ffa500 orange1=ffa500 orange2=ee9a00 orange3=cd8500 orange4=8b5a00 orangered=ff4500 orangered1=ff4500 orangered2=ee4000 orangered3=cd3700 orangered4=8b2500 orchid=da70d6 orchid1=ff83fa orchid2=ee7ae9 orchid3=cd69c9 orchid4=8b4789 palegoldenrod=eee8aa palegreen=98fb98 palegreen1=9aff9a palegreen2=90ee90 palegreen3=7ccd7c palegreen4=548b54 paleturquoise=afeeee paleturquoise1=bbffff paleturquoise2=aeeeee paleturquoise3=96cdcd paleturquoise4=668b8b palevioletred=db7093 palevioletred1=ff82ab palevioletred2=ee799f palevioletred3=cd6889 palevioletred4=8b475d papayawhip=ffefd5 peachpuff=ffdab9 peachpuff1=ffdab9 peachpuff2=eecbad peachpuff3=cdaf95 peachpuff4=8b7765 peru=cd853f pink=ffc0cb pink1=ffb5c5 pink2=eea9b8 pink3=cd919e pink4=8b636c plum=dda0dd plum1=ffbbff plum2=eeaeee plum3=cd96cd plum4=8b668b powderblue=b0e0e6 purple=a020f0 purple1=9b30ff purple2=912cee purple3=7d26cd purple4=551a8b rebeccapurple=663399 red=ff0000 red1=ff0000 red2=ee0000 red3=cd0000 red4=8b0000 rosybrown=bc8f8f rosybrown1=ffc1c1 rosybrown2=eeb4b4 rosybrown3=cd9b9b rosybrown4=8b6969 royalblue=4169e1 royalblue1=4876ff royalblue2=436eee royalblue3=3a5fcd royalblue4=27408b saddlebrown=8b4513 salmon=fa8072 salmon1=ff8c69 salmon2=ee8262 salmon3=cd7054 salmon4=8b4c39 sandybrown=f4a460 seagreen=2e8b57 seagreen1=54ff9f seagreen2=4eee94 seagreen3=43cd80 seagreen4=2e8b57 seashell=fff5ee seashell1=fff5ee seashell2=eee5de seashell3=cdc5bf seashell4=8b8682 sienna=a0522d sienna1=ff8247 sienna2=ee7942 sienna3=cd6839 sienna4=8b4726 silver=c0c0c0 skyblue=87ceeb skyblue1=87ceff skyblue2=7ec0ee skyblue3=6ca6cd skyblue4=4a708b slateblue=6a5acd slateblue1=836fff slateblue2=7a67ee slateblue3=6959cd slateblue4=473c8b slategray=708090 slategray1=c6e2ff slategray2=b9d3ee slategray3=9fb6cd slategray4=6c7b8b slategrey=708090 snow=fffafa snow1=fffafa snow2=eee9e9 snow3=cdc9c9 snow4=8b8989 springgreen=00ff7f springgreen1=00ff7f springgreen2=00ee76 springgreen3=00cd66 springgreen4=008b45 steelblue=4682b4 steelblue1=63b8ff steelblue2=5cacee steelblue3=4f94cd steelblue4=36648b tan=d2b48c tan1=ffa54f tan2=ee9a49 tan3=cd853f tan4=8b5a2b teal=008080 thistle=d8bfd8 thistle1=ffe1ff thistle2=eed2ee thistle3=cdb5cd thistle4=8b7b8b tomato=ff6347 tomato1=ff6347 tomato2=ee5c42 tomato3=cd4f39 tomato4=8b3626 turquoise=40e0d0 turquoise1=00f5ff turquoise2=00e5ee turquoise3=00c5cd turquoise4=00868b violet=ee82ee violetred=d02090 violetred1=ff3e96 violetred2=ee3a8c violetred3=cd3278 violetred4=8b2252 wheat=f5deb3 wheat1=ffe7ba wheat2=eed8ae wheat3=cdba96 wheat4=8b7e66 white=ffffff whitesmoke=f5f5f5 yellow=ffff00 yellow1=ffff00 yellow2=eeee00 yellow3=cdcd00 yellow4=8b8b00 yellowgreen=9acd32"
1540
+ "aliceblue=f0f8ff antiquewhite=faebd7 antiquewhite1=ffefdb antiquewhite2=eedfcc antiquewhite3=cdc0b0 antiquewhite4=8b8378 aqua=00ffff aquamarine=7fffd4 aquamarine1=7fffd4 aquamarine2=76eec6 aquamarine3=66cdaa aquamarine4=458b74 azure=f0ffff azure1=f0ffff azure2=e0eeee azure3=c1cdcd azure4=838b8b beige=f5f5dc bisque=ffe4c4 bisque1=ffe4c4 bisque2=eed5b7 bisque3=cdb79e bisque4=8b7d6b black=000000 blanchedalmond=ffebcd blue=0000ff blue1=0000ff blue2=0000ee blue3=0000cd blue4=00008b blueviolet=8a2be2 brown=a52a2a brown1=ff4040 brown2=ee3b3b brown3=cd3333 brown4=8b2323 burlywood=deb887 burlywood1=ffd39b burlywood2=eec591 burlywood3=cdaa7d burlywood4=8b7355 cadetblue=5f9ea0 cadetblue1=98f5ff cadetblue2=8ee5ee cadetblue3=7ac5cd cadetblue4=53868b chartreuse=7fff00 chartreuse1=7fff00 chartreuse2=76ee00 chartreuse3=66cd00 chartreuse4=458b00 chocolate=d2691e chocolate1=ff7f24 chocolate2=ee7621 chocolate3=cd661d chocolate4=8b4513 coral=ff7f50 coral1=ff7256 coral2=ee6a50 coral3=cd5b45 coral4=8b3e2f cornflowerblue=6495ed cornsilk=fff8dc cornsilk1=fff8dc cornsilk2=eee8cd cornsilk3=cdc8b1 cornsilk4=8b8878 crimson=dc143c cyan=00ffff cyan1=00ffff cyan2=00eeee cyan3=00cdcd cyan4=008b8b darkblue=00008b darkcyan=008b8b darkgoldenrod=b8860b darkgoldenrod1=ffb90f darkgoldenrod2=eead0e darkgoldenrod3=cd950c darkgoldenrod4=8b6508 darkgray=a9a9a9 darkgreen=006400 darkgrey=a9a9a9 darkkhaki=bdb76b darkmagenta=8b008b darkolivegreen=556b2f darkolivegreen1=caff70 darkolivegreen2=bcee68 darkolivegreen3=a2cd5a darkolivegreen4=6e8b3d darkorange=ff8c00 darkorange1=ff7f00 darkorange2=ee7600 darkorange3=cd6600 darkorange4=8b4500 darkorchid=9932cc darkorchid1=bf3eff darkorchid2=b23aee darkorchid3=9a32cd darkorchid4=68228b darkred=8b0000 darksalmon=e9967a darkseagreen=8fbc8f darkseagreen1=c1ffc1 darkseagreen2=b4eeb4 darkseagreen3=9bcd9b darkseagreen4=698b69 darkslateblue=483d8b darkslategray=2f4f4f darkslategray1=97ffff darkslategray2=8deeee darkslategray3=79cdcd darkslategray4=528b8b darkslategrey=2f4f4f darkturquoise=00ced1 darkviolet=9400d3 deeppink=ff1493 deeppink1=ff1493 deeppink2=ee1289 deeppink3=cd1076 deeppink4=8b0a50 deepskyblue=00bfff deepskyblue1=00bfff deepskyblue2=00b2ee deepskyblue3=009acd deepskyblue4=00688b dimgray=696969 dimgrey=696969 dodgerblue=1e90ff dodgerblue1=1e90ff dodgerblue2=1c86ee dodgerblue3=1874cd dodgerblue4=104e8b firebrick=b22222 firebrick1=ff3030 firebrick2=ee2c2c firebrick3=cd2626 firebrick4=8b1a1a floralwhite=fffaf0 forestgreen=228b22 fuchsia=ff00ff gainsboro=dcdcdc ghostwhite=f8f8ff gold=ffd700 gold1=ffd700 gold2=eec900 gold3=cdad00 gold4=8b7500 goldenrod=daa520 goldenrod1=ffc125 goldenrod2=eeb422 goldenrod3=cd9b1d goldenrod4=8b6914 gray=c0c0c0 gray0=000000 gray1=030303 gray10=1a1a1a gray100=ffffff gray11=1c1c1c gray12=1f1f1f gray13=212121 gray14=242424 gray15=262626 gray16=292929 gray17=2b2b2b gray18=2e2e2e gray19=303030 gray2=050505 gray20=333333 gray21=363636 gray22=383838 gray23=3b3b3b gray24=3d3d3d gray25=404040 gray26=424242 gray27=454545 gray28=474747 gray29=4a4a4a gray3=080808 gray30=4d4d4d gray31=4f4f4f gray32=525252 gray33=545454 gray34=575757 gray35=595959 gray36=5c5c5c gray37=5e5e5e gray38=616161 gray39=636363 gray4=0a0a0a gray40=666666 gray41=696969 gray42=6b6b6b gray43=6e6e6e gray44=707070 gray45=737373 gray46=757575 gray47=787878 gray48=7a7a7a gray49=7d7d7d gray5=0d0d0d gray50=7f7f7f gray51=828282 gray52=858585 gray53=878787 gray54=8a8a8a gray55=8c8c8c gray56=8f8f8f gray57=919191 gray58=949494 gray59=969696 gray6=0f0f0f gray60=999999 gray61=9c9c9c gray62=9e9e9e gray63=a1a1a1 gray64=a3a3a3 gray65=a6a6a6 gray66=a8a8a8 gray67=ababab gray68=adadad gray69=b0b0b0 gray7=121212 gray70=b3b3b3 gray71=b5b5b5 gray72=b8b8b8 gray73=bababa gray74=bdbdbd gray75=bfbfbf gray76=c2c2c2 gray77=c4c4c4 gray78=c7c7c7 gray79=c9c9c9 gray8=141414 gray80=cccccc gray81=cfcfcf gray82=d1d1d1 gray83=d4d4d4 gray84=d6d6d6 gray85=d9d9d9 gray86=dbdbdb gray87=dedede gray88=e0e0e0 gray89=e3e3e3 gray9=171717 gray90=e5e5e5 gray91=e8e8e8 gray92=ebebeb gray93=ededed gray94=f0f0f0 gray95=f2f2f2 gray96=f5f5f5 gray97=f7f7f7 gray98=fafafa gray99=fcfcfc green=00ff00 green1=00ff00 green2=00ee00 green3=00cd00 green4=008b00 greenyellow=adff2f grey=c0c0c0 grey0=000000 grey1=030303 grey10=1a1a1a grey100=ffffff grey11=1c1c1c grey12=1f1f1f grey13=212121 grey14=242424 grey15=262626 grey16=292929 grey17=2b2b2b grey18=2e2e2e grey19=303030 grey2=050505 grey20=333333 grey21=363636 grey22=383838 grey23=3b3b3b grey24=3d3d3d grey25=404040 grey26=424242 grey27=454545 grey28=474747 grey29=4a4a4a grey3=080808 grey30=4d4d4d grey31=4f4f4f grey32=525252 grey33=545454 grey34=575757 grey35=595959 grey36=5c5c5c grey37=5e5e5e grey38=616161 grey39=636363 grey4=0a0a0a grey40=666666 grey41=696969 grey42=6b6b6b grey43=6e6e6e grey44=707070 grey45=737373 grey46=757575 grey47=787878 grey48=7a7a7a grey49=7d7d7d grey5=0d0d0d grey50=7f7f7f grey51=828282 grey52=858585 grey53=878787 grey54=8a8a8a grey55=8c8c8c grey56=8f8f8f grey57=919191 grey58=949494 grey59=969696 grey6=0f0f0f grey60=999999 grey61=9c9c9c grey62=9e9e9e grey63=a1a1a1 grey64=a3a3a3 grey65=a6a6a6 grey66=a8a8a8 grey67=ababab grey68=adadad grey69=b0b0b0 grey7=121212 grey70=b3b3b3 grey71=b5b5b5 grey72=b8b8b8 grey73=bababa grey74=bdbdbd grey75=bfbfbf grey76=c2c2c2 grey77=c4c4c4 grey78=c7c7c7 grey79=c9c9c9 grey8=141414 grey80=cccccc grey81=cfcfcf grey82=d1d1d1 grey83=d4d4d4 grey84=d6d6d6 grey85=d9d9d9 grey86=dbdbdb grey87=dedede grey88=e0e0e0 grey89=e3e3e3 grey9=171717 grey90=e5e5e5 grey91=e8e8e8 grey92=ebebeb grey93=ededed grey94=f0f0f0 grey95=f2f2f2 grey96=f5f5f5 grey97=f7f7f7 grey98=fafafa grey99=fcfcfc honeydew=f0fff0 honeydew1=f0fff0 honeydew2=e0eee0 honeydew3=c1cdc1 honeydew4=838b83 hotpink=ff69b4 hotpink1=ff6eb4 hotpink2=ee6aa7 hotpink3=cd6090 hotpink4=8b3a62 indianred=cd5c5c indianred1=ff6a6a indianred2=ee6363 indianred3=cd5555 indianred4=8b3a3a indigo=4b0082 ivory=fffff0 ivory1=fffff0 ivory2=eeeee0 ivory3=cdcdc1 ivory4=8b8b83 khaki=f0e68c khaki1=fff68f khaki2=eee685 khaki3=cdc673 khaki4=8b864e lavender=e6e6fa lavenderblush=fff0f5 lavenderblush1=fff0f5 lavenderblush2=eee0e5 lavenderblush3=cdc1c5 lavenderblush4=8b8386 lawngreen=7cfc00 lemonchiffon=fffacd lemonchiffon1=fffacd lemonchiffon2=eee9bf lemonchiffon3=cdc9a5 lemonchiffon4=8b8970 lightblue=add8e6 lightblue1=bfefff lightblue2=b2dfee lightblue3=9ac0cd lightblue4=68838b lightcoral=f08080 lightcyan=e0ffff lightcyan1=e0ffff lightcyan2=d1eeee lightcyan3=b4cdcd lightcyan4=7a8b8b lightgoldenrod=eedd82 lightgoldenrod1=ffec8b lightgoldenrod2=eedc82 lightgoldenrod3=cdbe70 lightgoldenrod4=8b814c lightgoldenrodyellow=fafad2 lightgray=d3d3d3 lightgreen=90ee90 lightgrey=d3d3d3 lightpink=ffb6c1 lightpink1=ffaeb9 lightpink2=eea2ad lightpink3=cd8c95 lightpink4=8b5f65 lightsalmon=ffa07a lightsalmon1=ffa07a lightsalmon2=ee9572 lightsalmon3=cd8162 lightsalmon4=8b5742 lightseagreen=20b2aa lightskyblue=87cefa lightskyblue1=b0e2ff lightskyblue2=a4d3ee lightskyblue3=8db6cd lightskyblue4=607b8b lightslateblue=8470ff lightslategray=778899 lightslategrey=778899 lightsteelblue=b0c4de lightsteelblue1=cae1ff lightsteelblue2=bcd2ee lightsteelblue3=a2b5cd lightsteelblue4=6e7b8b lightyellow=ffffe0 lightyellow1=ffffe0 lightyellow2=eeeed1 lightyellow3=cdcdb4 lightyellow4=8b8b7a lime=00ff00 limegreen=32cd32 linen=faf0e6 magenta=ff00ff magenta1=ff00ff magenta2=ee00ee magenta3=cd00cd magenta4=8b008b maroon=b03060 maroon1=ff34b3 maroon2=ee30a7 maroon3=cd2990 maroon4=8b1c62 mediumaquamarine=66cdaa mediumblue=0000cd mediumorchid=ba55d3 mediumorchid1=e066ff mediumorchid2=d15fee mediumorchid3=b452cd mediumorchid4=7a378b mediumpurple=9370db mediumpurple1=ab82ff mediumpurple2=9f79ee mediumpurple3=8968cd mediumpurple4=5d478b mediumseagreen=3cb371 mediumslateblue=7b68ee mediumspringgreen=00fa9a mediumturquoise=48d1cc mediumvioletred=c71585 midnightblue=191970 mintcream=f5fffa mistyrose=ffe4e1 mistyrose1=ffe4e1 mistyrose2=eed5d2 mistyrose3=cdb7b5 mistyrose4=8b7d7b moccasin=ffe4b5 navajowhite=ffdead navajowhite1=ffdead navajowhite2=eecfa1 navajowhite3=cdb38b navajowhite4=8b795e navy=000080 navyblue=000080 oldlace=fdf5e6 olive=808000 olivedrab=6b8e23 olivedrab1=c0ff3e olivedrab2=b3ee3a olivedrab3=9acd32 olivedrab4=698b22 orange=ffa500 orange1=ffa500 orange2=ee9a00 orange3=cd8500 orange4=8b5a00 orangered=ff4500 orangered1=ff4500 orangered2=ee4000 orangered3=cd3700 orangered4=8b2500 orchid=da70d6 orchid1=ff83fa orchid2=ee7ae9 orchid3=cd69c9 orchid4=8b4789 palegoldenrod=eee8aa palegreen=98fb98 palegreen1=9aff9a palegreen2=90ee90 palegreen3=7ccd7c palegreen4=548b54 paleturquoise=afeeee paleturquoise1=bbffff paleturquoise2=aeeeee paleturquoise3=96cdcd paleturquoise4=668b8b palevioletred=db7093 palevioletred1=ff82ab palevioletred2=ee799f palevioletred3=cd6889 palevioletred4=8b475d papayawhip=ffefd5 peachpuff=ffdab9 peachpuff1=ffdab9 peachpuff2=eecbad peachpuff3=cdaf95 peachpuff4=8b7765 peru=cd853f pink=ffc0cb pink1=ffb5c5 pink2=eea9b8 pink3=cd919e pink4=8b636c plum=dda0dd plum1=ffbbff plum2=eeaeee plum3=cd96cd plum4=8b668b powderblue=b0e0e6 purple=a020f0 purple1=9b30ff purple2=912cee purple3=7d26cd purple4=551a8b rebeccapurple=663399 red=ff0000 red1=ff0000 red2=ee0000 red3=cd0000 red4=8b0000 rosybrown=bc8f8f rosybrown1=ffc1c1 rosybrown2=eeb4b4 rosybrown3=cd9b9b rosybrown4=8b6969 royalblue=4169e1 royalblue1=4876ff royalblue2=436eee royalblue3=3a5fcd royalblue4=27408b saddlebrown=8b4513 salmon=fa8072 salmon1=ff8c69 salmon2=ee8262 salmon3=cd7054 salmon4=8b4c39 sandybrown=f4a460 seagreen=2e8b57 seagreen1=54ff9f seagreen2=4eee94 seagreen3=43cd80 seagreen4=2e8b57 seashell=fff5ee seashell1=fff5ee seashell2=eee5de seashell3=cdc5bf seashell4=8b8682 sienna=a0522d sienna1=ff8247 sienna2=ee7942 sienna3=cd6839 sienna4=8b4726 silver=c0c0c0 skyblue=87ceeb skyblue1=87ceff skyblue2=7ec0ee skyblue3=6ca6cd skyblue4=4a708b slateblue=6a5acd slateblue1=836fff slateblue2=7a67ee slateblue3=6959cd slateblue4=473c8b slategray=708090 slategray1=c6e2ff slategray2=b9d3ee slategray3=9fb6cd slategray4=6c7b8b slategrey=708090 snow=fffafa snow1=fffafa snow2=eee9e9 snow3=cdc9c9 snow4=8b8989 springgreen=00ff7f springgreen1=00ff7f springgreen2=00ee76 springgreen3=00cd66 springgreen4=008b45 steelblue=4682b4 steelblue1=63b8ff steelblue2=5cacee steelblue3=4f94cd steelblue4=36648b tan=d2b48c tan1=ffa54f tan2=ee9a49 tan3=cd853f tan4=8b5a2b teal=008080 thistle=d8bfd8 thistle1=ffe1ff thistle2=eed2ee thistle3=cdb5cd thistle4=8b7b8b tomato=ff6347 tomato1=ff6347 tomato2=ee5c42 tomato3=cd4f39 tomato4=8b3626 turquoise=40e0d0 turquoise1=00f5ff turquoise2=00e5ee turquoise3=00c5cd turquoise4=00868b violet=ee82ee violetred=d02090 violetred1=ff3e96 violetred2=ee3a8c violetred3=cd3278 violetred4=8b2252 wheat=f5deb3 wheat1=ffe7ba wheat2=eed8ae wheat3=cdba96 wheat4=8b7e66 white=ffffff webgray=808080 webgreen=008000 webgrey=808080 webmaroon=800000 webpurple=800080 x11gray=bebebe x11green=00ff00 x11grey=bebebe x11maroon=b03060 x11purple=a020f0 whitesmoke=f5f5f5 yellow=ffff00 yellow1=ffff00 yellow2=eeee00 yellow3=cdcd00 yellow4=8b8b00 yellowgreen=9acd32"
1137
1541
  );
1138
1542
  const DVIPS_COLORS = table(
1139
- "GreenYellow=d9ff4f Yellow=ffff00 Goldenrod=ffe629 Dandelion=ffb529 Apricot=ffad7a Peach=ff804d Melon=ff8a80 YellowOrange=ff9400 Orange=ff6321 BurntOrange=ff7d00 Bittersweet=c20300 RedOrange=ff3b21 Mahogany=a60000 Maroon=ad0000 BrickRed=b80000 Red=ff0000 OrangeRed=ff0080 RubineRed=ff00de WildStrawberry=ff0a9c Salmon=ff789e CarnationPink=ff5eff Magenta=ff00ff VioletRed=ff30ff Rhodamine=ff2eff Mulberry=a314fa RedViolet=9600a8 Fuchsia=7303eb Lavender=ff85ff Thistle=e069ff Orchid=ad5cff DarkOrchid=9933cc Purple=8c24ff Plum=8000ff Violet=361fff RoyalPurple=4019ff BlueViolet=190df5 Periwinkle=6e73ff CadetBlue=616ec4 CornflowerBlue=59deff MidnightBlue=007091 NavyBlue=0f75ff RoyalBlue=0080ff Blue=0000ff Cerulean=0fe3ff Cyan=00ffff ProcessBlue=0affff SkyBlue=61ffe0 Turquoise=26ffcc TealBlue=1ffaa3 Aquamarine=2effb2 BlueGreen=26ffab Emerald=00ff80 JungleGreen=03ff7a SeaGreen=4fff80 Green=00ff00 ForestGreen=00e000 PineGreen=00bf29 LimeGreen=80ff00 YellowGreen=8fff42 SpringGreen=bdff3d OliveGreen=009900 RawSienna=8c0000 Sepia=4d0000 Brown=660000 Tan=db9470 Gray=808080 Black=000000 White=ffffff LightYellow=ffff99 LightCyan=ccffff LightMagenta=ffccff LightPurple=ccccff LightGreen=ccffb3 LightOrange=ffccb3 Canary=ffff7f LFadedGreen=e6ffcc Pink=ffd9f3 LSkyBlue=d9f3ff"
1543
+ "GreenYellow=d9ff4f Yellow=ffff00 Goldenrod=ffe629 Dandelion=ffb529 Apricot=ffad7a Peach=ff804d Melon=ff8a80 YellowOrange=ff9400 Orange=ff6321 BurntOrange=ff7d00 Bittersweet=c20300 RedOrange=ff3b21 Mahogany=a60000 Maroon=ad0000 BrickRed=b80000 Red=ff0000 OrangeRed=ff0080 RubineRed=ff00de WildStrawberry=ff0a9c Salmon=ff789e CarnationPink=ff5eff Magenta=ff00ff VioletRed=ff30ff Rhodamine=ff2eff Mulberry=a314fa RedViolet=9600a8 Fuchsia=7303eb Lavender=ff85ff Thistle=e069ff Orchid=ad5cff DarkOrchid=9933cc Purple=8c24ff Plum=8000ff Violet=361fff RoyalPurple=4019ff BlueViolet=190df5 Periwinkle=6e73ff CadetBlue=616ec4 CornflowerBlue=59deff MidnightBlue=007091 NavyBlue=0f75ff RoyalBlue=0080ff Blue=0000ff Cerulean=0fe3ff Cyan=00ffff ProcessBlue=0affff SkyBlue=61ffe0 Turquoise=26ffcc TealBlue=1ffaa3 Aquamarine=2effb2 BlueGreen=26ffab Emerald=00ff80 JungleGreen=03ff7a SeaGreen=4fff80 Green=00ff00 ForestGreen=00e000 PineGreen=00bf29 LimeGreen=80ff00 YellowGreen=8fff42 SpringGreen=bdff3d OliveGreen=009900 RawSienna=8c0000 Sepia=4d0000 Brown=660000 Tan=db9470 Gray=808080 Black=000000 White=ffffff LightYellow=ffff99 LightCyan=ccffff LightMagenta=ffccff LightPurple=ccccff LightGreen=ccffb3 LightOrange=ffd9bc Canary=ffff80 LFadedGreen=e6ffcc Pink=ffd9f2 LSkyBlue=d9f2ff"
1140
1544
  );
1141
1545
  const JAVA_COLORS = table(
1142
1546
  "black=000000 blue=0000ff cyan=00ffff darkgray=404040 dark_gray=404040 gray=808080 green=00ff00 lightgray=c0c0c0 light_gray=c0c0c0 magenta=ff00ff orange=ffc800 pink=ffafaf red=ff0000 white=ffffff yellow=ffff00"
@@ -1226,22 +1630,40 @@ function schemeColor(name2, scheme) {
1226
1630
  const index = /^\d{1,3}$/.test(name2) ? Number(name2) : 0;
1227
1631
  return colors !== void 0 && index >= 1 ? colors[index - 1] : void 0;
1228
1632
  }
1229
- function graphvizColor(raw, scheme, use) {
1633
+ function svgPenList(use) {
1634
+ return use === "line" ? { hex: "#fffffe", alpha: 0, unknown: false, list: null } : { hex: "#000000", alpha: 1, unknown: false, list: null };
1635
+ }
1636
+ function beforeSemicolon(text) {
1637
+ const semi = text.indexOf(";");
1638
+ return semi >= 0 ? text.slice(0, semi) : text;
1639
+ }
1640
+ function resolveColorText(raw, text, scheme, svgNames) {
1641
+ const svgName = svgNames && raw.startsWith(text) ? CSS_COLORS.get(text.toLowerCase()) : void 0;
1642
+ if (svgName !== void 0) {
1643
+ return { hex: svgName, alpha: 1 };
1644
+ }
1645
+ if (text === "") {
1646
+ return null;
1647
+ }
1648
+ const sc = scheme === null || scheme.trim() === "" ? "x11" : scheme.toLowerCase();
1649
+ return resolveOne(text, sc);
1650
+ }
1651
+ function graphvizColor(raw, scheme, use, svgNames = true) {
1230
1652
  let text = raw.replace(/^[ \t\r\n]+/, "");
1231
1653
  let list = null;
1232
1654
  const colon = text.indexOf(":");
1655
+ const pen = use === "line" || use === "text";
1233
1656
  if (colon >= 0) {
1234
1657
  text = text.slice(0, colon);
1235
- if (use !== "line") {
1236
- const semi = text.indexOf(";");
1237
- if (semi >= 0) {
1238
- text = text.slice(0, semi);
1239
- }
1658
+ if (svgNames && pen && raw.startsWith(text) && CSS_COLORS.has(text.toLowerCase())) {
1659
+ return svgPenList(use);
1660
+ }
1661
+ if (!pen) {
1662
+ text = beforeSemicolon(text);
1240
1663
  list = use === "fill" ? "gradient" : "lines";
1241
1664
  }
1242
1665
  }
1243
- const sc = scheme === null || scheme.trim() === "" ? "x11" : scheme.toLowerCase();
1244
- const resolved = text === "" ? null : resolveOne(text, sc);
1666
+ const resolved = resolveColorText(raw, text, scheme, svgNames);
1245
1667
  return resolved === null ? { hex: "#000000", alpha: 1, unknown: true, list } : { hex: resolved.hex, alpha: resolved.alpha, unknown: false, list };
1246
1668
  }
1247
1669
  function hex2(v2) {
@@ -1472,6 +1894,56 @@ function cssColor(text) {
1472
1894
  }
1473
1895
  return hexColor(text, false) ?? cssFunction(text);
1474
1896
  }
1897
+ function sigmaRgba(text) {
1898
+ const t = text.trim();
1899
+ const head = /^rgba?\s*\(/.exec(t);
1900
+ if (head === null || !t.endsWith(")")) {
1901
+ return null;
1902
+ }
1903
+ const parts = t.slice(head[0].length, -1).split(",");
1904
+ if (parts.length < 3) {
1905
+ return null;
1906
+ }
1907
+ const alpha = parts.slice(3).join(",").trimStart();
1908
+ const third = parts.length > 3 ? parts[2].trim() : parts[2].trimStart();
1909
+ const channels2 = [parts[0].trim(), parts[1].trim(), third];
1910
+ if (!channels2.every((c) => /^\d*$/.test(c)) || /[\n\r\u2028\u2029]/.test(alpha)) {
1911
+ return null;
1912
+ }
1913
+ return [channels2[0], channels2[1], channels2[2], alpha];
1914
+ }
1915
+ function sigmaColor(text) {
1916
+ const lower = text.toLowerCase();
1917
+ if (lower === "transparent") {
1918
+ return { color: "#000000", alpha: 0, read: true };
1919
+ }
1920
+ const named = CSS_COLORS.get(lower);
1921
+ if (named !== void 0) {
1922
+ return sigmaColor(named);
1923
+ }
1924
+ let rgb = [0, 0, 0];
1925
+ let a = 1;
1926
+ let read = false;
1927
+ if (text.startsWith("#")) {
1928
+ read = /^#(?:[\da-f]{3}|[\da-f]{6}|[\da-f]{8})$/i.test(text);
1929
+ const at = text.length === 4 ? [1, 1, 2, 2, 3, 3] : [1, 2, 3, 4, 5, 6];
1930
+ rgb = [0, 2, 4].map((k) => Number.parseInt(text.charAt(at[k]) + text.charAt(at[k + 1]), 16) || 0);
1931
+ if (text.length === 9) {
1932
+ a = Number.parseInt(text.slice(7, 9), 16) / 255;
1933
+ }
1934
+ } else {
1935
+ const m = sigmaRgba(text);
1936
+ if (m !== null) {
1937
+ read = true;
1938
+ rgb = [Number(m[0]), Number(m[1]), Number(m[2])];
1939
+ if (m[3]) {
1940
+ a = Number(m[3]);
1941
+ }
1942
+ }
1943
+ }
1944
+ const [r, g, b] = rgb.map((v2) => v2 & 255);
1945
+ return { color: rgbHex(r, g, b), alpha: (a * 255 & 255) / 255, read };
1946
+ }
1475
1947
  const PAJEK_CHANNEL = /^(?:\d+(?:\.\d*)?|\.\d+)$/;
1476
1948
  function pajekColor(text) {
1477
1949
  const named = DVIPS_COLORS.get(text);
@@ -1534,6 +2006,11 @@ function canonColor(raw, dialect, site, options = {}) {
1534
2006
  const v2 = raw >>> 0;
1535
2007
  return { color: rgbHex(v2 >>> 16 & 255, v2 >>> 8 & 255, v2 & 255), alpha: 1 };
1536
2008
  }
2009
+ if (dialect === "graphology" && typeof raw === "string" && raw.trim() === "") {
2010
+ spendAt(site, 1);
2011
+ noteAt(site, STYLE_ISSUE.BAD_VALUE, raw);
2012
+ return { color: "#000000", alpha: 1 };
2013
+ }
1537
2014
  const text = scalarText(raw, site);
1538
2015
  if (text === null) {
1539
2016
  return null;
@@ -1541,6 +2018,9 @@ function canonColor(raw, dialect, site, options = {}) {
1541
2018
  if (dialect === "graphviz" || dialect === "x11") {
1542
2019
  return graphvizCanon(text, dialect === "x11" ? "x11" : "graphviz", site, options);
1543
2020
  }
2021
+ if (dialect === "graphology") {
2022
+ return graphologyColor(raw, text, site);
2023
+ }
1544
2024
  const c = textColor(text.trim(), dialect);
1545
2025
  if (c === null) {
1546
2026
  noteAt(site, STYLE_ISSUE.BAD_VALUE, text);
@@ -1548,6 +2028,17 @@ function canonColor(raw, dialect, site, options = {}) {
1548
2028
  }
1549
2029
  return { color: c.hex, alpha: c.alpha };
1550
2030
  }
2031
+ function graphologyColor(raw, text, site) {
2032
+ if (typeof raw !== "string") {
2033
+ noteAt(site, STYLE_ISSUE.BAD_VALUE, text);
2034
+ return null;
2035
+ }
2036
+ const c = sigmaColor(text);
2037
+ if (!c.read) {
2038
+ noteAt(site, STYLE_ISSUE.BAD_VALUE, text);
2039
+ }
2040
+ return { color: c.color, alpha: c.alpha };
2041
+ }
1551
2042
  function objectColor(raw, dialect, site) {
1552
2043
  spendAt(site, 1);
1553
2044
  const c = dialect === "gexf" || dialect === "gephi" ? channels(raw) : null;
@@ -1558,10 +2049,11 @@ function objectColor(raw, dialect, site) {
1558
2049
  return { color: c.hex, alpha: c.alpha };
1559
2050
  }
1560
2051
  function graphvizCanon(text, dialect, site, options) {
1561
- const g = graphvizColor(text, dialect === "x11" ? null : options.scheme ?? null, options.use ?? "line");
2052
+ const x11 = dialect === "x11";
2053
+ const g = graphvizColor(text, x11 ? null : options.scheme ?? null, options.use ?? "line", !x11);
1562
2054
  if (g.unknown) {
1563
2055
  noteAt(site, STYLE_ISSUE.BAD_VALUE, text);
1564
- if (dialect === "x11") {
2056
+ if (x11) {
1565
2057
  return null;
1566
2058
  }
1567
2059
  }
@@ -1604,6 +2096,7 @@ function v(value, source) {
1604
2096
  }
1605
2097
  const CY = "cytoscape-impl vizmap-gui-impl default_vizmap.xml, style default, line";
1606
2098
  const CYL = "cytoscape-api BasicVisualLexicon.java line";
2099
+ const CY_WAVE = "cytoscape-impl ding-presentation-impl 3.10.5 org.cytoscape.ding.impl.strokes: ZigzagStroke (amplitude 10, a turn every 10) and SineWaveStroke (amplitude 10, wavelength 20)";
1607
2100
  const CYJS = "cytoscape.js 3.34.3 dist/cytoscape.cjs.js line";
1608
2101
  const GV = "graphviz.org/docs/attrs";
1609
2102
  const YED_QA = "yEd Q&A, How can I change the default nodes and/or default edges";
@@ -1613,18 +2106,61 @@ const YED_BG = "yFiles for Java 2.19 DefaultBackgroundRenderer API docs";
1613
2106
  const Y3 = "yFiles for HTML API docs,";
1614
2107
  const GEPHI = "gephi master 92e503df61a7";
1615
2108
  const VIS = "vis-network 10.1.2 vis-network.esm.js";
2109
+ const VIS9 = "vis-network 9.1.9 standalone/umd/vis-network.js";
1616
2110
  const SIGMA = "sigma 3.0.3 packages/sigma/src";
1617
- const GEXFJS = "github.com/raphv/gexf-js ebfd2a7213d3 js/gexfjs.js";
2111
+ const SIGMA4 = "sigma 4.0.1 dist/types-d8ce3382.esm.js";
1618
2112
  const PAJEK = "Pajek 6.02 reference manual";
1619
- const PAJEK_SHAPES = "the SHAPES.CFG Pajek writes when none exists (DrawEPS.htm), github.com/ohshane/radical-clustering 0f568f67893558035868b3db1bf365870ba52f6b shapes.cfg, SHAPE ELLIPSE";
1620
2113
  const OGDF = "ogdf master 1a40505ac006";
2114
+ const OGDF_SVG = "OGDF 2025.10 GraphIO::drawSVG with its default SVGSettings (graph-io/test/fidelity/oracles/gml-specimen-labels-p5.svg: ";
1621
2115
  const NX = "networkx 6da4704cbf32 networkx/drawing/nx_pylab.py line";
2116
+ const MEASURED = "measured in the program's own SVG export (graph-io/test/fidelity/oracles/";
2117
+ const PAJEK_SVG = `${MEASURED}pajek-`;
2118
+ const CYTOSCAPE_ARROWHEAD = {
2119
+ length: (size, width) => 2 * (6 * size + width),
2120
+ aspect: 0.5,
2121
+ shapes: {
2122
+ square: { length: 0.5, aspect: 1 },
2123
+ circle: { length: 0.5, aspect: 1 },
2124
+ "circle-open": { length: 0.5, aspect: 1 },
2125
+ // HALF_TOP's barb: 1.135 long and 1 to one side of its line
2126
+ half: { length: 0.5675, aspect: 0.881 },
2127
+ "other:half-bottom": { length: 0.5675, aspect: 0.881 },
2128
+ tee: { length: 0.1, aspect: 10 },
2129
+ // a square's outline, and a half circle (half a CIRCLE deep, as wide)
2130
+ "other:open-square": { length: 0.5, aspect: 1 },
2131
+ "other:half-circle": { length: 0.25, aspect: 2 },
2132
+ "other:open-half-circle": { length: 0.25, aspect: 2 }
2133
+ },
2134
+ source: `${MEASURED}cx-ndex-90f78bcd, cx2-u2os-hierarchy, cx2-signor-aml, cx2-syn-bypass, cx-syn-mappings: each arrow's unit glyph), Cytoscape 3.10.5`
2135
+ };
2136
+ const CYTOSCAPE_BEND_CURVE = v(
2137
+ "midpoints",
2138
+ "cytoscape-impl ding-presentation-impl GraphGraphics.java computeCubicPolyEdgePath (cubic pieces between the handles' midpoints, controls pulled toward each handle by CURVE_ELLIPTICAL)"
2139
+ );
2140
+ const CYTOSCAPE_LABEL_BOX = `${MEASURED}xgmml-specimen-labels: label-background-* boxes and the captions' two lines), Cytoscape 3.10.5`;
2141
+ const CYTOSCAPE_LABEL_PADDING = v(0, CYTOSCAPE_LABEL_BOX);
2142
+ const CYTOSCAPE_LABEL_LINE_HEIGHT = v(1, CYTOSCAPE_LABEL_BOX);
2143
+ const CYTOSCAPE_BORDER_INSIDE = v(
2144
+ "inside",
2145
+ `${MEASURED}cx2-repro-shared-interaction, cys-luad-vest-v2, cx2-synthetic-lethal), Cytoscape 3.10.5`
2146
+ );
2147
+ const DRAWIO_ARROWHEAD = {
2148
+ length: (size, width) => 6 * size + width,
2149
+ aspect: 1,
2150
+ source: `${MEASURED}graphml-*, draw.io 32.4.1 standing in for yEd)`
2151
+ };
2152
+ function cornerCap(tool) {
2153
+ const rule = `${CYJS} 4386`;
2154
+ return v(8, tool === void 0 ? rule : `${rule} (Cytoscape.js's rule; ${tool} states none)`);
2155
+ }
1622
2156
  const TOOL_DEFAULTS = new Map(
1623
2157
  [
1624
2158
  {
1625
2159
  tool: "cytoscape",
1626
2160
  version: "cytoscape-impl develop 6c63e97c5152 (3.11)",
1627
2161
  units: "px",
2162
+ roundedCornerRadius: cornerCap("cytoscape"),
2163
+ arrowhead: CYTOSCAPE_ARROWHEAD,
1628
2164
  node: {
1629
2165
  fill: v("#89d0f5", `${CY} 382`),
1630
2166
  fillOpacity: v(1, `${CY} 383`),
@@ -1634,29 +2170,44 @@ const TOOL_DEFAULTS = new Map(
1634
2170
  borderColor: v("#cccccc", `${CY} 392`),
1635
2171
  borderWidth: v(0, `${CY} 350`),
1636
2172
  borderStyle: v("solid", `${CY} 366`),
2173
+ borderPosition: CYTOSCAPE_BORDER_INSIDE,
2174
+ borderWaveAmplitude: v(10, CY_WAVE),
2175
+ borderWavePeriod: v(20, CY_WAVE),
1637
2176
  labelColor: v("#000000", `${CY} 395`),
1638
- labelFont: v("sans-serif", `${CY} 370`),
2177
+ labelFont: v("DejaVu Sans, sans-serif", `${CY} 370 (SansSerif, drawn in Java's face for it)`),
1639
2178
  labelWeight: v("normal", `${CY} 370`),
1640
2179
  labelItalic: v(false, `${CY} 370`),
1641
2180
  labelSize: v(12, `${CY} 371`),
1642
- labelPosition: v("center", `${CY} 380`)
2181
+ labelWrapWidth: v(200, `${CY} 372`),
2182
+ labelWrapTrailingSpace: v(
2183
+ true,
2184
+ `${MEASURED}cx-ndex-90f78bcd: each word is measured with the space after it), Cytoscape 3.10.5`
2185
+ ),
2186
+ labelPosition: v("center", `${CY} 380`),
2187
+ labelPadding: CYTOSCAPE_LABEL_PADDING,
2188
+ labelLineHeight: CYTOSCAPE_LABEL_LINE_HEIGHT
1643
2189
  },
1644
2190
  edge: {
1645
2191
  color: v("#848484", `${CY} 431`),
1646
2192
  width: v(2, `${CY} 417`),
1647
2193
  lineStyle: v("solid", `${CY} 438`),
2194
+ waveAmplitude: v(10, CY_WAVE),
2195
+ wavePeriod: v(20, CY_WAVE),
1648
2196
  opacity: v(1, `${CY} 423`),
1649
2197
  sourceArrow: v("none", `${CY} 437`),
1650
2198
  targetArrow: v("none", `${CY} 428`),
1651
2199
  sourceArrowColor: v("#000000", `${CY} 432`),
1652
2200
  targetArrowColor: v("#000000", `${CY} 432`),
1653
2201
  labelColor: v("#000000", `${CY} 415`),
1654
- labelFont: v("sans-serif", `${CY} 439`),
2202
+ labelFont: v("DejaVu Sans, sans-serif", `${CY} 439 (SansSerif, drawn in Java's face for it)`),
1655
2203
  labelWeight: v("normal", `${CY} 439`),
1656
2204
  labelItalic: v(false, `${CY} 439`),
1657
2205
  labelSize: v(10, `${CY} 439`),
2206
+ labelPadding: CYTOSCAPE_LABEL_PADDING,
2207
+ labelLineHeight: CYTOSCAPE_LABEL_LINE_HEIGHT,
1658
2208
  // EDGE_CURVED is true there, but it only rounds an edge's bends: an edge without bends is straight
1659
- curved: v(false, `${CY} 422`)
2209
+ curved: v(false, `${CY} 422`),
2210
+ bendCurve: CYTOSCAPE_BEND_CURVE
1660
2211
  },
1661
2212
  graph: { background: v("#ffffff", `${CY} 335`) },
1662
2213
  derived: [{ kind: "labelFromColumn", column: "name", source: `${CY} 406-408` }]
@@ -1665,6 +2216,8 @@ const TOOL_DEFAULTS = new Map(
1665
2216
  tool: "cytoscape-fallbacks",
1666
2217
  version: "cytoscape-api develop (3.11)",
1667
2218
  units: "px",
2219
+ roundedCornerRadius: cornerCap("cytoscape-fallbacks"),
2220
+ arrowhead: CYTOSCAPE_ARROWHEAD,
1668
2221
  node: {
1669
2222
  fill: v("#c80000", `${CYL} 83`),
1670
2223
  fillOpacity: v(1, `${CYL} 273`),
@@ -1673,24 +2226,39 @@ const TOOL_DEFAULTS = new Map(
1673
2226
  height: v(40, `${CYL} 163`),
1674
2227
  borderColor: v("#000000", `${CYL} 230`),
1675
2228
  borderWidth: v(2, `${CYL} 54`),
2229
+ borderPosition: CYTOSCAPE_BORDER_INSIDE,
2230
+ borderWaveAmplitude: v(10, CY_WAVE),
2231
+ borderWavePeriod: v(20, CY_WAVE),
1676
2232
  labelColor: v("#000000", `${CYL} 91`),
1677
- labelFont: v("sans-serif", `${CYL} 255`),
2233
+ labelFont: v("DejaVu Sans, sans-serif", `${CYL} 255 (SansSerif, drawn in Java's face for it)`),
1678
2234
  labelWeight: v("normal", `${CYL} 255`),
1679
2235
  labelItalic: v(false, `${CYL} 255`),
1680
2236
  labelSize: v(12, `${CYL} 55`),
1681
- labelPosition: v("center", `${CYL} 205`)
2237
+ labelWrapWidth: v(200, `${CYL} 196`),
2238
+ labelWrapTrailingSpace: v(
2239
+ true,
2240
+ `${MEASURED}cx-ndex-90f78bcd: each word is measured with the space after it), Cytoscape 3.10.5`
2241
+ ),
2242
+ labelPosition: v("center", `${CYL} 205`),
2243
+ labelPadding: CYTOSCAPE_LABEL_PADDING,
2244
+ labelLineHeight: CYTOSCAPE_LABEL_LINE_HEIGHT
1682
2245
  },
1683
2246
  edge: {
1684
2247
  color: v("#404040", `${CYL} 469`),
1685
2248
  width: v(1, `${CYL} 368`),
1686
2249
  lineStyle: v("solid", `${CYL} 392`),
2250
+ waveAmplitude: v(10, CY_WAVE),
2251
+ wavePeriod: v(20, CY_WAVE),
1687
2252
  sourceArrow: v("none", `${CYL} 487`),
1688
2253
  targetArrow: v("none", `${CYL} 493`),
1689
2254
  labelColor: v("#000000", `${CYL} 327`),
1690
- labelFont: v("sans-serif", `${CYL} 408`),
2255
+ labelFont: v("DejaVu Sans, sans-serif", `${CYL} 408 (SansSerif, drawn in Java's face for it)`),
1691
2256
  labelWeight: v("normal", `${CYL} 408`),
1692
2257
  labelItalic: v(false, `${CYL} 408`),
1693
- labelSize: v(10, `${CYL} 416`)
2258
+ labelSize: v(10, `${CYL} 416`),
2259
+ labelPadding: CYTOSCAPE_LABEL_PADDING,
2260
+ labelLineHeight: CYTOSCAPE_LABEL_LINE_HEIGHT,
2261
+ bendCurve: CYTOSCAPE_BEND_CURVE
1694
2262
  },
1695
2263
  graph: { background: v("#ffffff", `${CYL} 667`) },
1696
2264
  derived: []
@@ -1699,6 +2267,22 @@ const TOOL_DEFAULTS = new Map(
1699
2267
  tool: "cytoscape-js",
1700
2268
  version: "cytoscape.js 3.34.3",
1701
2269
  units: "px",
2270
+ roundedCornerRadius: cornerCap(),
2271
+ arrowhead: {
2272
+ // getArrowWidth, and the triangle's points at +-0.15, -0.3 of it
2273
+ length: (size, width) => 0.3 * Math.max((width * 13.37) ** 0.9, 29) * size,
2274
+ aspect: 1,
2275
+ // a tee is 0.1 of the arrow width deep, the triangle 0.3 long; triangle-tee reaches back to its bar
2276
+ // at 0.5, circle-triangle to 0.6 and triangle-cross to its cross line at 0.4 plus the line's width
2277
+ shapes: {
2278
+ tee: { length: 1 / 3, aspect: 3 },
2279
+ "other:triangle-tee": { length: 5 / 3, aspect: 0.6 },
2280
+ "other:triangle-cross": { length: 1.5, aspect: 0.66 },
2281
+ "other:circle-triangle": { length: 2, aspect: 0.5 },
2282
+ "other:chevron": { length: 2 / 3, aspect: 1.5 }
2283
+ },
2284
+ source: `${CYJS} 23497 (getArrowWidth), 22714-22716 (triangle), 22813-22814 (tee), 22627 (arrowShapeWidth)`
2285
+ },
1702
2286
  node: {
1703
2287
  fill: v("#999999", `${CYJS} 18536`),
1704
2288
  fillOpacity: v(1, `${CYJS} 18538`),
@@ -1708,17 +2292,42 @@ const TOOL_DEFAULTS = new Map(
1708
2292
  borderColor: v("#000000", `${CYJS} 18555`),
1709
2293
  borderWidth: v(0, `${CYJS} 18557`),
1710
2294
  borderStyle: v("solid", `${CYJS} 18558`),
2295
+ borderPosition: v("center", `${CYJS} 18563`),
2296
+ outerBorderColor: v("#999999", `${CYJS} 18564`),
2297
+ // the underlay and the overlay draw nothing until an opacity is set; then these
2298
+ underlayColor: v("#000000", `${CYJS} 18524`),
2299
+ underlayPadding: v(10, `${CYJS} 18525`),
2300
+ underlayShape: v("round-rectangle", `${CYJS} 18526`),
2301
+ overlayColor: v("#000000", `${CYJS} 18519`),
2302
+ overlayPadding: v(10, `${CYJS} 18520`),
2303
+ overlayShape: v("round-rectangle", `${CYJS} 18521`),
1711
2304
  opacity: v(1, `${CYJS} 18503`),
1712
2305
  labelColor: v("#000000", `${CYJS} 18474`),
1713
2306
  labelSize: v(16, `${CYJS} 18496`),
1714
2307
  labelFont: v("Helvetica Neue, Helvetica, sans-serif", `${CYJS} 18493`),
1715
2308
  labelWeight: v("normal", `${CYJS} 18495`),
1716
- labelPosition: v("top", `${CYJS} 18470-18471`)
2309
+ labelPosition: v("top", `${CYJS} 18470-18471`),
2310
+ // text-wrap: wrap measures `subline + word + wordSeparator` against text-max-width; ponytail: a
2311
+ // line's last word has no separator there, where graphty counts a space after it too
2312
+ labelWrapTrailingSpace: v(true, `${CYJS} 25218`)
1717
2313
  },
1718
2314
  edge: {
1719
2315
  color: v("#999999", `${CYJS} 18639`),
1720
2316
  sourceArrowColor: v("#999999", `${CYJS} 18639`),
1721
2317
  targetArrowColor: v("#999999", `${CYJS} 18639`),
2318
+ outlineColor: v("#000000", `${CYJS} 18644`),
2319
+ underlayColor: v("#000000", `${CYJS} 18524`),
2320
+ underlayPadding: v(10, `${CYJS} 18525`),
2321
+ overlayColor: v("#000000", `${CYJS} 18519`),
2322
+ overlayPadding: v(10, `${CYJS} 18520`),
2323
+ gradientKind: v("none", `${CYJS} 18640 (line-fill solid)`),
2324
+ midSourceArrowColor: v("#999999", `${CYJS} 18639`),
2325
+ midTargetArrowColor: v("#999999", `${CYJS} 18639`),
2326
+ // an edge's label is centered on the line's middle (recalculateEdgeLabelProjections)
2327
+ labelPosition: v("center", `${CYJS} 24942`),
2328
+ // a source or target label is centered on the line where it leaves its node, unless offset
2329
+ sourceLabelOffset: v(0, `${CYJS} 18511, 18515`),
2330
+ targetLabelOffset: v(0, `${CYJS} 18511, 18515`),
1722
2331
  width: v(3, `${CYJS} 18711`),
1723
2332
  lineStyle: v("solid", `${CYJS} 18638`),
1724
2333
  opacity: v(1, `${CYJS} 18503`),
@@ -1726,28 +2335,56 @@ const TOOL_DEFAULTS = new Map(
1726
2335
  targetArrow: v("none", `${CYJS} 18671`),
1727
2336
  arrowSize: v(1, `${CYJS} 18660`),
1728
2337
  curved: v(false, `${CYJS} 18658`),
2338
+ // control-point-step-size 40: a quadratic's middle is half as far out as its control point
2339
+ fanSpacing: v(20, `${CYJS} 18647`),
1729
2340
  labelColor: v("#000000", `${CYJS} 18474`),
1730
2341
  labelSize: v(16, `${CYJS} 18496`),
1731
2342
  labelFont: v("Helvetica Neue, Helvetica, sans-serif", `${CYJS} 18493`),
1732
2343
  labelWeight: v("normal", `${CYJS} 18495`)
1733
2344
  },
1734
- graph: {},
2345
+ graph: {
2346
+ // the canvas is cleared to transparent, so the page's default white shows through
2347
+ background: v("#ffffff", `${CYJS} 31537 (clearCanvas: clearRect)`)
2348
+ },
1735
2349
  derived: []
1736
2350
  },
1737
2351
  {
1738
2352
  tool: "graphviz",
1739
2353
  version: "graphviz main (16.1.0)",
1740
2354
  units: "px",
2355
+ roundedCornerRadius: cornerCap("graphviz"),
2356
+ arrowhead: {
2357
+ // ARROW_LENGTH 10 and the normal arrow's half width 0.35 of its length
2358
+ length: (size) => 10 * size,
2359
+ aspect: 0.7,
2360
+ // each arrow type's length factor and the half width its arrow_type_* function draws
2361
+ shapes: {
2362
+ tee: { length: 0.2, aspect: 5 },
2363
+ square: { length: 0.8, aspect: 1 },
2364
+ diamond: { length: 1.2, aspect: 2 / 3 },
2365
+ "diamond-open": { length: 1.2, aspect: 2 / 3 },
2366
+ circle: { length: 0.8, aspect: 1 },
2367
+ "circle-open": { length: 0.8, aspect: 1 },
2368
+ crow: { length: 1, aspect: 0.9 },
2369
+ vee: { length: 1, aspect: 0.9 },
2370
+ // the arc of curve and icurve, a half circle of radius half the arrow's length across its
2371
+ // stem (the stem is the line, carried on to the tip)
2372
+ "other:curve": { length: 0.5, aspect: 2 },
2373
+ "other:inv-curve": { length: 0.5, aspect: 2 }
2374
+ },
2375
+ source: "graphviz lib/common/arrows.c (ARROW_LENGTH 10, Arrowtypes lenfact, arrow_type_normal 0.35, arrow_type_crow 0.45, arrow_type_tee, arrow_type_box 0.4, arrow_type_diamond 1/3, arrow_type_dot, arrow_type_curve)"
2376
+ },
1741
2377
  node: {
1742
2378
  fillOpacity: v(0, `${GV}/style/ (default "", not filled)`),
1743
2379
  borderColor: v("#000000", `${GV}/color/`),
1744
2380
  borderWidth: v(1, `${GV}/penwidth/; lib/common/const.h line 77`),
2381
+ borderPosition: v("center", `${MEASURED}dot-synth-nodes), Graphviz strokes the node's own outline`),
1745
2382
  shape: v("ellipse", `${GV}/shape/; lib/common/const.h line 76`),
1746
2383
  width: v(54, `${GV}/width/ (0.75 inch); lib/common/const.h line 72`),
1747
2384
  height: v(36, `${GV}/height/ (0.5 inch); lib/common/const.h line 73`),
1748
2385
  labelColor: v("#000000", `${GV}/fontcolor/`),
1749
2386
  labelSize: v(14, `${GV}/fontsize/; lib/common/const.h line 61`),
1750
- labelFont: v("Times-Roman", `${GV}/fontname/; lib/common/const.h line 67`),
2387
+ labelFont: v("Times, serif", `${GV}/fontname/ (Times-Roman); lib/common/const.h line 67`),
1751
2388
  labelPosition: v("center", `${GV}/labelloc/`)
1752
2389
  },
1753
2390
  edge: {
@@ -1759,12 +2396,12 @@ const TOOL_DEFAULTS = new Map(
1759
2396
  arrowSize: v(1, `${GV}/arrowsize/`),
1760
2397
  labelColor: v("#000000", `${GV}/fontcolor/`),
1761
2398
  labelSize: v(14, `${GV}/fontsize/`),
1762
- labelFont: v("Times-Roman", `${GV}/fontname/`)
2399
+ labelFont: v("Times, serif", `${GV}/fontname/ (Times-Roman)`)
1763
2400
  },
1764
2401
  graph: {
1765
2402
  background: v(
1766
2403
  "#ffffff",
1767
- `${GV}/bgcolor/ (default none); lib/common/emit.c emit_background: no bgcolor paints white`
2404
+ `${GV}/bgcolor/ (default unset); lib/common/emit.c emit_background (an unset bgcolor paints the page white)`
1768
2405
  )
1769
2406
  },
1770
2407
  derived: [
@@ -1780,14 +2417,17 @@ const TOOL_DEFAULTS = new Map(
1780
2417
  tool: "yed",
1781
2418
  version: "yEd / yFiles for Java 2.19",
1782
2419
  units: "px",
2420
+ roundedCornerRadius: cornerCap("yed"),
2421
+ arrowhead: DRAWIO_ARROWHEAD,
1783
2422
  node: {
1784
2423
  fill: v("#ffcc00", `${YED_QA}; ${YED_CORPUS} of y:Fill color`),
1785
2424
  shape: v("rectangle", "yFiles for Java 2.19 ShapeNodeRealizer API docs"),
1786
2425
  borderColor: v("#000000", `${YED_CORPUS} of y:BorderStyle`),
1787
2426
  borderWidth: v(1, `${YED_CORPUS} of y:BorderStyle`),
1788
2427
  borderStyle: v("solid", `${YED_CORPUS} of y:BorderStyle`),
2428
+ borderPosition: v("center", `${MEASURED}graphml-*, draw.io 32.4.1 standing in for yEd)`),
1789
2429
  labelColor: v("#000000", `${YED_CORPUS} of y:NodeLabel`),
1790
- labelFont: v("Dialog", `${YED_CORPUS} of y:NodeLabel`),
2430
+ labelFont: v("DejaVu Sans, sans-serif", `${YED_CORPUS} of y:NodeLabel (Dialog's face)`),
1791
2431
  labelSize: v(12, `${YED_CORPUS} of y:NodeLabel`),
1792
2432
  labelWeight: v("normal", `${YED_CORPUS} of y:NodeLabel`),
1793
2433
  labelPosition: v("center", `${YED_CORPUS} of y:NodeLabel`)
@@ -1799,7 +2439,7 @@ const TOOL_DEFAULTS = new Map(
1799
2439
  sourceArrow: v("none", `${YED_EDGE} (defaults to Arrow.NONE)`),
1800
2440
  targetArrow: v("none", `${YED_EDGE} (defaults to Arrow.NONE)`),
1801
2441
  labelColor: v("#000000", `${YED_CORPUS} of y:EdgeLabel`),
1802
- labelFont: v("Dialog", `${YED_CORPUS} of y:EdgeLabel`),
2442
+ labelFont: v("DejaVu Sans, sans-serif", `${YED_CORPUS} of y:EdgeLabel (Dialog's face)`),
1803
2443
  labelSize: v(12, `${YED_CORPUS} of y:EdgeLabel`)
1804
2444
  },
1805
2445
  graph: {
@@ -1814,14 +2454,24 @@ const TOOL_DEFAULTS = new Map(
1814
2454
  tool: "yfiles3",
1815
2455
  version: "yFiles for HTML (API docs retrieved 2026-10-11)",
1816
2456
  units: "px",
2457
+ roundedCornerRadius: cornerCap("yfiles3"),
2458
+ arrowhead: DRAWIO_ARROWHEAD,
1817
2459
  node: {
1818
2460
  fill: v("#ffffff", `${Y3} ShapeNodeStyle fill`),
1819
2461
  borderColor: v("#000000", `${Y3} ShapeNodeStyle stroke`),
1820
2462
  borderWidth: v(1, `${Y3} ShapeNodeStyle stroke`),
2463
+ borderPosition: v(
2464
+ "center",
2465
+ `${MEASURED}graphml-yfiles-html-*, draw.io 32.4.1 standing in for yFiles)`
2466
+ ),
1821
2467
  shape: v("rectangle", `${Y3} ShapeNodeStyle shape`),
1822
2468
  labelColor: v("#000000", `${Y3} LabelStyle textFill`),
1823
2469
  labelFont: v("Arial", `${Y3} LabelStyle font`),
1824
- labelSize: v(12, `${Y3} LabelStyle font`)
2470
+ labelSize: v(12, `${Y3} LabelStyle font`),
2471
+ labelPosition: v(
2472
+ "center",
2473
+ `${Y3} IGraph.nodeDefaults labels layoutParameter (InteriorLabelModel center)`
2474
+ )
1825
2475
  },
1826
2476
  edge: {
1827
2477
  color: v("#000000", `${Y3} PolylineEdgeStyle stroke`),
@@ -1832,67 +2482,58 @@ const TOOL_DEFAULTS = new Map(
1832
2482
  labelFont: v("Arial", `${Y3} LabelStyle font`),
1833
2483
  labelSize: v(12, `${Y3} LabelStyle font`)
1834
2484
  },
1835
- graph: {},
2485
+ graph: {
2486
+ background: v("#ffffff", `${Y3} GraphComponent (a transparent canvas over the page's white)`)
2487
+ },
1836
2488
  derived: []
1837
2489
  },
1838
2490
  {
1839
2491
  tool: "gephi",
1840
2492
  version: "gephi 0.11.4-SNAPSHOT",
1841
2493
  units: "relative",
2494
+ roundedCornerRadius: cornerCap("gephi"),
2495
+ arrowhead: {
2496
+ length: (size, width) => 3.25 * width * size,
2497
+ aspect: 0.9,
2498
+ source: `${MEASURED}gexf-synth-nx-viz, widths 1 to 4), Gephi Toolkit 0.11.3`
2499
+ },
1842
2500
  node: {
1843
2501
  fill: v("#000000", "gephi/graphstore a4c790b2343e NodeImpl.java line 322"),
1844
- width: v(10, `${GEPHI} AbstractProcessor.java lines 195-198`),
1845
- height: v(10, `${GEPHI} AbstractProcessor.java lines 195-198`),
2502
+ width: v(20, `${GEPHI} AbstractProcessor.java lines 195-198 (size 10 is a radius)`),
2503
+ height: v(20, `${GEPHI} AbstractProcessor.java lines 195-198 (size 10 is a radius)`),
1846
2504
  shape: v("ellipse", "GEXF 1.3 viz shape default disc; Preview NodeRenderer"),
1847
- opacity: v(1, `${GEPHI} DefaultPreset.java line 87 (NODE_OPACITY 100)`),
1848
- // Preview hides labels (DefaultPreset.java line 106) and so does the Overview (VizConfig.java
1849
- // line 113); graph-io shows them as sigma.js and gexf-js do (see formats/gexf/styles.ts), in
1850
- // the color and font Gephi gives a label it shows
1851
- labelColor: v("#000000", `${GEPHI} DefaultPreset.java line 91 (DependantOriginalColor(BLACK))`),
1852
- labelFont: v("Arial", `${GEPHI} DefaultPreset.java line 93 (Arial plain 12)`),
1853
- // the size of a size-10 node's label; Preview scales it with the node (labelSizeFromWidth below)
1854
- labelSize: v(12, `${GEPHI} DefaultPreset.java line 93 (Arial plain 12)`),
2505
+ borderPosition: v(
2506
+ "inside",
2507
+ `${MEASURED}gexf-specimen-node-fills-borders-p3), Gephi Toolkit 0.11.3: the border is stroked on a circle of radius size - border / 2`
2508
+ ),
1855
2509
  labelPosition: v(
1856
2510
  "center",
1857
2511
  `${GEPHI} NodeLabelRenderer.java (a label is drawn centered on its node)`
2512
+ ),
2513
+ // a node drawn under another still shows its label (gexf-cns-wos n5 under n109: "Borner, K")
2514
+ labelOnTop: v(
2515
+ true,
2516
+ `${GEPHI} PreviewController (the node label items are drawn after every node); Gephi Toolkit 0.11.3 SVG export: g#node-labels after g#nodes`
1858
2517
  )
1859
2518
  },
1860
2519
  edge: {
1861
- curved: v(
1862
- true,
1863
- `${GEPHI} DefaultPreset.java line 66 (EDGE_CURVED true); EdgeRenderer.java line 117`
1864
- ),
1865
2520
  sourceArrow: v("none", `${GEPHI} DefaultPreset.java line 62`),
1866
2521
  targetArrow: v("none", `${GEPHI} DefaultPreset.java line 62`),
1867
- // the vocabulary's 1 is the tool's normal arrow: Preview's ARROW_SIZE 3, drawn 3 times the edge's
1868
- // weight long, as Cytoscape.js's arrow-scale 1 scales with the edge's width
1869
- arrowSize: v(
1870
- 1,
1871
- `${GEPHI} DefaultPreset.java line 62 (ARROW_SIZE 3); EdgeRenderer.java lines 255-256 (times the weight)`
2522
+ curved: v(true, `${GEPHI} DefaultPreset.java (EDGE_CURVED true); Gephi Toolkit 0.11.3 SVG export`),
2523
+ fanned: v(
2524
+ false,
2525
+ `${GEPHI} EdgeRenderer.java (each curved edge bows left of its own direction, siblings ignored); Gephi Toolkit 0.11.3 SVG export`
1872
2526
  ),
1873
- opacity: v(1, `${GEPHI} DefaultPreset.java line 71 (EDGE_OPACITY 100)`)
2527
+ arcRadius: v(
2528
+ 1 / 1.2,
2529
+ `${GEPHI} EdgeRenderer.java (CurvedEdgeRenderer: an arc through both node centers of radius length / ARC_CURVENESS, default 1.2)`
2530
+ )
1874
2531
  },
1875
2532
  graph: { background: v("#ffffff", `${GEPHI} VizConfig.java line 111`) },
1876
2533
  derived: [
1877
- {
1878
- kind: "labelFromColumn",
1879
- column: "label",
1880
- source: `${SIGMA}/settings.ts lines 119-126 (renderLabels); ${GEXFJS} lines 1019-1040`
1881
- },
1882
2534
  {
1883
2535
  kind: "colorFromEndNodes",
1884
- source: `${GEPHI} DefaultPreset.java line 65 (EdgeColor.Mode.MIXED); PreviewAPI types/EdgeColor.java lines 89-93`
1885
- },
1886
- {
1887
- kind: "borderFromFill",
1888
- darken: 0.498,
1889
- widthFactor: 0.08,
1890
- source: `${GEPHI} DefaultPreset.java lines 84, 86 (DependantColor DARKER, NODE_BORDER_FIXED false); PreviewAPI types/DependantColor.java lines 55, 85-86; Utils ColorUtils.java lines 22-34; PreviewPlugin renderers/SizeUtils.java lines 11, 33-38 (0.16 x size / 2 of a node drawn size x 2 wide, builders/NodeBuilder.java line 65)`
1891
- },
1892
- {
1893
- kind: "labelSizeFromWidth",
1894
- factor: 1.2,
1895
- source: `${GEPHI} DefaultPreset.java lines 93, 98 (Arial 12, NODE_LABEL_PROPORTIONAL_SIZE true); PreviewPlugin renderers/NodeLabelRenderer.java lines 165-173 (12 x the node drawn size x 2 wide x 0.05, builders/NodeBuilder.java line 65)`
2536
+ source: `${GEPHI} DefaultPreset.java (EDGE_COLOR EdgeColor.Mode.MIXED); Gephi Toolkit 0.11.3 SVG export`
1896
2537
  },
1897
2538
  {
1898
2539
  kind: "widthFromWeight",
@@ -1909,26 +2550,62 @@ const TOOL_DEFAULTS = new Map(
1909
2550
  tool: "vis-network",
1910
2551
  version: "vis-network 10.1.2",
1911
2552
  units: "px",
2553
+ roundedCornerRadius: cornerCap("vis-network"),
2554
+ arrowhead: {
2555
+ // EdgeBase.getArrowData: 15 * scaleFactor + 3 * width; ArrowHead's points at -1, +-0.3
2556
+ length: (size, width) => 15 * size + 3 * width,
2557
+ aspect: 0.6,
2558
+ // its bar is 0.15 of the arrow's length deep and as wide as the arrow is long; its box is 0.6 of the
2559
+ // length square, its circle 0.8 of the length across, and its curve and inv_curve arcs have a
2560
+ // radius of 0.4 of it
2561
+ shapes: {
2562
+ tee: { length: 0.15, aspect: 1 / 0.15 },
2563
+ square: { length: 0.6, aspect: 1 },
2564
+ circle: { length: 0.8, aspect: 1 },
2565
+ "other:curve": { length: 0.4, aspect: 2 },
2566
+ "other:inv-curve": { length: 0.4, aspect: 2 }
2567
+ },
2568
+ source: `${VIS} EdgeBase.getArrowData, ArrowHead, Bar, Box, Circle, Curve, InvertedCurve (measured on json-vis-unix, json-vis-world, json-vis-synth)`
2569
+ },
2570
+ nodeBorderOnScreen: v(
2571
+ true,
2572
+ `${VIS9} NodeBase.initContextForDraw and performStroke: borderWidth / view.scale, at most the node's width`
2573
+ ),
1912
2574
  node: {
1913
2575
  fill: v("#97c2fc", `${VIS} lines 32986-33110`),
1914
2576
  borderColor: v("#2b7ce9", `${VIS} lines 32986-33110`),
1915
2577
  borderWidth: v(1, `${VIS} lines 32986-33110`),
2578
+ // a canvas stroke along the node's own outline, half in and half out (NodeBase.performStroke)
2579
+ borderPosition: v("center", `${VIS9} NodeBase.performStroke: ctx.stroke() on the shape's own path`),
1916
2580
  shape: v("ellipse", `${VIS} lines 32986-33110`),
1917
2581
  labelColor: v("#343434", `${VIS} lines 32986-33110`),
1918
2582
  labelSize: v(14, `${VIS} lines 32986-33110`),
1919
2583
  labelFont: v("arial", `${VIS} lines 32986-33110`),
1920
- labelPosition: v("center", `${VIS} lines 32986-33110`)
2584
+ labelPosition: v("center", `${VIS} lines 32986-33110`),
2585
+ // Label.draw returns before drawing when the font is under drawThreshold - 1 px on screen
2586
+ labelMinScreenSize: v(4, `${VIS9} Label.draw, nodes scaling.label.drawThreshold 5`)
1921
2587
  },
1922
2588
  edge: {
1923
2589
  width: v(1, `${VIS} lines 25160-25290`),
2590
+ outlineColor: v("#6f6f6f", `${VIS} lines 25160-25290 (background.color)`),
1924
2591
  lineStyle: v("solid", `${VIS} lines 25160-25290 (dashes false)`),
1925
2592
  sourceArrow: v("none", `${VIS} lines 25160-25290`),
1926
2593
  targetArrow: v("none", `${VIS} lines 25160-25290`),
1927
2594
  labelColor: v("#343434", `${VIS} lines 25160-25290`),
1928
2595
  labelSize: v(14, `${VIS} lines 25160-25290`),
1929
- labelFont: v("arial", `${VIS} lines 25160-25290`)
2596
+ labelFont: v("arial", `${VIS} lines 25160-25290`),
2597
+ labelMinScreenSize: v(4, `${VIS9} Label.draw, edges scaling.label.drawThreshold 5`),
2598
+ // an edge label is drawn on the line, its letters stroked white 2 px wide (font.strokeWidth 2)
2599
+ labelPosition: v("center", `${VIS9} Edge.drawLabel (the label at the line's middle point)`),
2600
+ labelOutlineColor: v("#ffffff", `${VIS} lines 25160-25290 (font.strokeColor)`),
2601
+ labelOutlineWidth: v(2, `${VIS} lines 25160-25290 (font.strokeWidth)`)
2602
+ },
2603
+ graph: {
2604
+ background: v(
2605
+ "#ffffff",
2606
+ "vis-network 9.1.9 vis-network.esm.js line 32378 (clearRect: the page's white shows through)"
2607
+ )
1930
2608
  },
1931
- graph: {},
1932
2609
  derived: [
1933
2610
  { kind: "labelFromColumn", column: "label", source: `${VIS} lines 32986-33110` },
1934
2611
  { kind: "colorFromSourceNode", source: `${VIS} lines 25160-25290 (color.inherit "from")` }
@@ -1936,50 +2613,107 @@ const TOOL_DEFAULTS = new Map(
1936
2613
  },
1937
2614
  {
1938
2615
  tool: "sigma",
1939
- version: "sigma 3.0.3",
2616
+ version: "sigma 4.0.1",
1940
2617
  units: "relative",
2618
+ roundedCornerRadius: cornerCap("sigma"),
1941
2619
  node: {
1942
- fill: v("#999999", `${SIGMA}/settings.ts lines 119-126`),
2620
+ fill: v("#666666", `${SIGMA4} DEFAULT_NODE_DISPLAY_DATA (color "#666")`),
1943
2621
  shape: v("ellipse", `${SIGMA}/settings.ts lines 119-126`),
1944
- width: v(2, `${SIGMA}/sigma.ts line 76`),
1945
- height: v(2, `${SIGMA}/sigma.ts line 76`),
2622
+ width: v(20, `${SIGMA4} DEFAULT_NODE_DISPLAY_DATA (size 10 is a radius)`),
2623
+ height: v(20, `${SIGMA4} DEFAULT_NODE_DISPLAY_DATA (size 10 is a radius)`),
1946
2624
  labelColor: v("#000000", `${SIGMA}/settings.ts lines 119-126`),
1947
2625
  labelFont: v("Arial", `${SIGMA}/settings.ts lines 119-126`),
1948
- labelSize: v(14, `${SIGMA}/settings.ts lines 119-126`),
1949
- labelWeight: v("normal", `${SIGMA}/settings.ts lines 119-126`)
2626
+ // sigma 4 sets every node's labelSize to 12 before its styles run; the 14 in sigma.esm.js
2627
+ // (`defaultLabelSize`) is only reached by a node whose styles cleared it.
2628
+ labelSize: v(12, `${SIGMA4} DEFAULT_NODE_DISPLAY_DATA (labelSize 12)`),
2629
+ labelWeight: v("normal", `${SIGMA}/settings.ts lines 119-126`),
2630
+ labelPosition: v("right", `${SIGMA4} DEFAULT_NODE_DISPLAY_DATA (labelPosition "right")`),
2631
+ // sigma keeps the largest node's label per 100 px cell of its first framing; it avoids no overlap
2632
+ labelGridCellSize: v(
2633
+ 100,
2634
+ `${SIGMA4} LabelGrid.getLabelsToDisplay (labelDensity 1, labelGridCellSize 100)`
2635
+ ),
2636
+ labelOnTop: v(true, `${SIGMA4} labels are drawn by their own program after every node and edge`),
2637
+ // a node's label is drawn only while its node's rendered size (a radius) is 6 px or more
2638
+ labelMinNodeScreenSize: v(12, `${SIGMA4} renderLabels (labelRenderedSizeThreshold 6, a radius)`)
1950
2639
  },
1951
2640
  edge: {
1952
2641
  color: v("#cccccc", `${SIGMA}/settings.ts lines 119-126`),
1953
- width: v(0.5, `${SIGMA}/sigma.ts line 100`),
2642
+ // an edge of sigma's default size 1, drawn half as wide as its size (readSigmaRow)
2643
+ width: v(0.5, `${SIGMA4} DEFAULT_EDGE_DISPLAY_DATA (size 1)`),
2644
+ // an edge label (renderEdgeLabels) is drawn at its line's middle, 12 px, in #666
2645
+ labelColor: v("#666666", `${SIGMA4} DEFAULT_EDGE_DISPLAY_DATA (labelColor "#666")`),
2646
+ labelSize: v(12, "sigma 4.0.1 dist/sigma.esm.js line 2816 (DEFAULT_EDGE_LABEL_SIZE)"),
2647
+ labelPosition: v("center", "sigma 4.0.1 dist/sigma.esm.js line 3647 (the middle of its two ends)"),
1954
2648
  sourceArrow: v("none", `${SIGMA}/settings.ts lines 119-126 (type line)`),
1955
- targetArrow: v("none", `${SIGMA}/settings.ts lines 119-126 (type line)`)
2649
+ targetArrow: v("none", `${SIGMA}/settings.ts lines 119-126 (type line)`),
2650
+ // no edge is drawn thinner on screen, whatever its size (the shader's max(size, minEdgeThickness 1.7),
2651
+ // drawn half as wide as a node of that size is in radius, as readSigmaRow halves a size)
2652
+ minScreenWidth: v(
2653
+ 0.85,
2654
+ `${SIGMA4} edge program (pixelsThickness = max(size, minEdgeThickness 1.7))`
2655
+ )
2656
+ },
2657
+ graph: {
2658
+ background: v(
2659
+ "#ffffff",
2660
+ "sigma 4.0.1 dist/sigma.esm.js line 5202 (gl.clear to transparent: the page's white shows through)"
2661
+ )
1956
2662
  },
1957
- graph: {},
1958
2663
  derived: [{ kind: "labelFromColumn", column: "label", source: `${SIGMA}/settings.ts lines 119-126` }]
1959
2664
  },
1960
2665
  {
1961
2666
  tool: "pajek",
1962
2667
  version: "Pajek 6.02",
1963
- units: "relative",
2668
+ // PostScript points, the unit of Pajek's EPS and SVG export (formats/pajek/styles.ts)
2669
+ units: "px",
2670
+ roundedCornerRadius: cornerCap("pajek"),
2671
+ // a line's `s` (arrowSize) scales Pajek's arrowhead whatever its width: 6 x s long (tip to its back
2672
+ // corners) and 5 x s wide
2673
+ arrowhead: {
2674
+ length: (size) => 6 * size,
2675
+ aspect: 5 / 6,
2676
+ source: `${PAJEK_SVG}specimen-arrows: s 0.5, 1, 2, 3 and 5 draw arrowheads 3, 6, 12, 18 and 30 long, 2.5, 5, 10, 15 and 25 wide; football: s 4 and 9)`
2677
+ },
1964
2678
  node: {
1965
2679
  shape: v("ellipse", `${PAJEK} p. 85`),
1966
2680
  opacity: v(1, `${PAJEK} p. 87`),
1967
- borderColor: v("#000000", `${PAJEK}, vertex parameter bc (default Black)`),
1968
- borderWidth: v(0.2, `${PAJEK}, vertex parameter bw (default 1, against the default vertex size 5)`),
1969
- labelColor: v("#000000", `${PAJEK_SHAPES} (lc Black)`),
1970
- labelPosition: v("center", `${PAJEK_SHAPES} (lr 0); ${PAJEK} p. 85 (radius 0 is centered)`)
2681
+ // Pajek 6.02's own defaults, as its SVG export draws a vertex and label the file gives no
2682
+ // parameters for (the manual names these settings but not their values)
2683
+ borderColor: v("#660000", `${PAJEK_SVG}football, kdorola: every vertex without bc)`),
2684
+ borderWidth: v(0.5, `${PAJEK_SVG}football, kdorola: every vertex without bw)`),
2685
+ // an SVG stroke along the vertex's own outline, half in and half out
2686
+ borderPosition: v(
2687
+ "center",
2688
+ `${PAJEK_SVG}specimen-node-fills-borders-p3: bw 8 draws a vertex of size 36 44 across)`
2689
+ ),
2690
+ width: v(20, `${PAJEK_SVG}football, iliad: a vertex without s_size, x_fact or y_fact)`),
2691
+ height: v(20, `${PAJEK_SVG}football, iliad: a vertex without s_size, x_fact or y_fact)`),
2692
+ fill: v("#ffd9bc", `${PAJEK_SVG}football, kdorola: every vertex without ic)`),
2693
+ labelColor: v("#ad0000", `${PAJEK_SVG}football, 1crn: every label without lc)`),
2694
+ labelSize: v(15, `${PAJEK_SVG}football, 1crn: every label without fos)`),
2695
+ labelFont: v("Arial", `${PAJEK_SVG}football, 1crn: every label without font)`),
2696
+ labelWeight: v("bold", `${PAJEK_SVG}football, 1crn: every label is bold)`),
2697
+ // the text starts 20 from the center at lphi 285 and runs to the right, its baseline through
2698
+ // that point: its left edge's middle at 20 cos 285 across and 20 sin 285 less 0.3465 of its
2699
+ // size down (formats/pajek/styles.ts readLabelPosition)
2700
+ labelPosition: v("center", `${PAJEK_SVG}football, 1crn, specimen-labels: lr 20 lphi 285)`),
2701
+ labelOffsetX: v(5.176380902, `${PAJEK_SVG}football, 1crn, specimen-labels: lr 20 lphi 285)`),
2702
+ labelOffsetY: v(14.121016526, `${PAJEK_SVG}football, 1crn, specimen-labels: lr 20 lphi 285)`),
2703
+ labelShiftX: v(0.5, `${PAJEK_SVG}football, 1crn, specimen-labels: text-anchor start)`)
1971
2704
  },
1972
2705
  edge: {
1973
- color: v("#000000", `${PAJEK} p. 90`),
1974
- // No line width: Pajek's w is read as the file has it, not as a factor of the vertex size as bw is,
1975
- // so a default of 1 here, with no vertex size in the file, became the length every other length
1976
- // of the drawing was scaled by, and a border 0.2 wide was drawn far too thin to see.
2706
+ // an edge (undirected) is drawn twice the width of an arc; the arc rule below sets an arc's
2707
+ width: v(2, `${PAJEK_SVG}1crn, lin-rel4, synth-vertices: edges without w; c: w 0.5 drawn 1)`),
2708
+ color: v("#007091", `${PAJEK_SVG}1crn, lin-rel4, c: edges without c)`),
1977
2709
  lineStyle: v("solid", `${PAJEK} p. 90`),
1978
2710
  opacity: v(1, `${PAJEK} p. 87`),
1979
2711
  sourceArrow: v("none", `${PAJEK} p. 91`),
1980
2712
  targetArrow: v("none", `${PAJEK} p. 91 (edges have none)`)
1981
2713
  },
1982
- graph: {},
2714
+ graph: {
2715
+ background: v("#ffffff", `${PAJEK}, Draw window (assumed: a white background)`)
2716
+ },
1983
2717
  derived: [
1984
2718
  { kind: "labelFromColumn", column: "label", source: `${PAJEK}, vertex labels (drawn by default)` },
1985
2719
  { kind: "targetArrowOnDirected", arrow: "triangle", source: `${PAJEK} p. 91 (arcs)` }
@@ -1989,6 +2723,13 @@ const TOOL_DEFAULTS = new Map(
1989
2723
  tool: "ogdf",
1990
2724
  version: "ogdf master 1a40505ac006",
1991
2725
  units: "px",
2726
+ roundedCornerRadius: cornerCap("ogdf"),
2727
+ // OGDF's arrowhead is three times its line's width long and half as wide as it is long
2728
+ arrowhead: {
2729
+ length: (size, width) => 3 * width * size,
2730
+ aspect: 0.5,
2731
+ source: `${MEASURED}gml-specimen-arrows-p5.svg: lineWidth 1, 1.5 and 3 draw arrowheads 3, 4.5 and 9 long, 1.5, 2.25 and 4.5 wide)`
2732
+ },
1992
2733
  node: {
1993
2734
  fill: v("#ffffff", `${OGDF} LayoutStandards.cpp lines 38-45`),
1994
2735
  shape: v("rectangle", `${OGDF} LayoutStandards.cpp lines 38-45`),
@@ -1996,20 +2737,30 @@ const TOOL_DEFAULTS = new Map(
1996
2737
  height: v(20, `${OGDF} LayoutStandards.cpp lines 38-45`),
1997
2738
  borderColor: v("#000000", `${OGDF} LayoutStandards.cpp lines 38-45`),
1998
2739
  borderWidth: v(1, `${OGDF} LayoutStandards.cpp lines 38-45`),
1999
- borderStyle: v("solid", `${OGDF} LayoutStandards.cpp lines 38-45`)
2740
+ borderStyle: v("solid", `${OGDF} LayoutStandards.cpp lines 38-45`),
2741
+ // GraphIO::drawSVG's default SVGSettings: every label in one font, centered on its node
2742
+ labelColor: v("#000000", `${OGDF_SVG}fill #000000)`),
2743
+ labelFont: v("Arial", `${OGDF_SVG}font-family Arial)`),
2744
+ labelSize: v(10, `${OGDF_SVG}font-size 10)`),
2745
+ labelPosition: v("center", `${OGDF_SVG}text-anchor middle at the node's center)`)
2000
2746
  },
2001
2747
  edge: {
2002
2748
  color: v("#000000", `${OGDF} LayoutStandards.cpp lines 38-45`),
2003
2749
  width: v(1, `${OGDF} LayoutStandards.cpp lines 38-45`),
2004
- lineStyle: v("solid", `${OGDF} LayoutStandards.cpp lines 38-45`)
2750
+ lineStyle: v("solid", `${OGDF} LayoutStandards.cpp lines 38-45`),
2751
+ labelColor: v("#000000", `${OGDF_SVG}fill #000000)`),
2752
+ labelFont: v("Arial", `${OGDF_SVG}font-family Arial)`),
2753
+ labelSize: v(10, `${OGDF_SVG}font-size 10)`),
2754
+ labelPosition: v("center", `${OGDF_SVG}text-anchor middle on the line, dominant-baseline middle)`)
2005
2755
  },
2006
- graph: {},
2756
+ graph: { background: v("#ffffff", `${OGDF_SVG}no background: the page's white shows through)`) },
2007
2757
  derived: []
2008
2758
  },
2009
2759
  {
2010
2760
  tool: "networkx",
2011
2761
  version: "networkx 3.7 (main 6da4704cbf32)",
2012
2762
  units: "px",
2763
+ roundedCornerRadius: cornerCap("networkx"),
2013
2764
  node: {
2014
2765
  fill: v("#1f78b4", `${NX} 1378`),
2015
2766
  fillOpacity: v(1, `${NX} 549`),
@@ -2053,6 +2804,18 @@ const SCALAR_DTYPES = /* @__PURE__ */ new Set(["string", "dict", "bool", "i32",
2053
2804
  const COORDINATE = /^(?:x|y|z|_pos)$/i;
2054
2805
  const PARENT_COLUMN = "graphty.parent";
2055
2806
  const MIN_INDEX = 8;
2807
+ function hasFoldedPairs(snapshot) {
2808
+ const folding = pairFolding(snapshot);
2809
+ if (!folding.expanded) {
2810
+ return false;
2811
+ }
2812
+ for (let e = 0; e < snapshot.edgeCount; e++) {
2813
+ if (folding.folded(e)) {
2814
+ return true;
2815
+ }
2816
+ }
2817
+ return false;
2818
+ }
2056
2819
  function featuresOf(snapshot, target) {
2057
2820
  const table2 = target === "node" ? snapshot.nodes : snapshot.edges;
2058
2821
  const n = target === "node" ? snapshot.nodeCount : snapshot.edgeCount;
@@ -2071,7 +2834,7 @@ function featuresOf(snapshot, target) {
2071
2834
  out.push({ ref: { style: "group" }, values: group });
2072
2835
  }
2073
2836
  }
2074
- if (target === "node" && n > 0) {
2837
+ if (target === "node" && n > 0 && !hasFoldedPairs(snapshot)) {
2075
2838
  const kinds = snapshot.directed ? ["degree", "indegree", "outdegree"] : ["degree"];
2076
2839
  for (const k of kinds) {
2077
2840
  out.push({ ref: { computed: k }, values: degreeValues(snapshot, k) });
@@ -2801,54 +3564,58 @@ function blockStyles(block, snapshot, format, truth = {}, notes = [], tool = nul
2801
3564
  };
2802
3565
  }
2803
3566
  export {
2804
- MAX_STYLE_BLOCK_LENGTH as A,
2805
- STYLE_ENUMS as B,
2806
- STYLE_PROPERTIES as C,
2807
- DVIPS_COLORS as D,
2808
- htmlLabelText as E,
2809
- dotLabelText as F,
2810
- recordLabelText as G,
3567
+ writeStyleBlock as A,
3568
+ styleBlockLosses as B,
3569
+ canonicalFor as C,
3570
+ degreeValues as D,
3571
+ dataCell as E,
3572
+ htmlLabelText as F,
3573
+ dotLabelText as G,
2811
3574
  DOT_POINTS_PER_INCH as H,
2812
- interpolate as I,
2813
- within as J,
2814
- describeFeature as K,
2815
- refSource as L,
3575
+ recordLabelText as I,
3576
+ dotLabelAlign as J,
3577
+ htmlLabelSpans as K,
3578
+ DVIPS_COLORS as L,
2816
3579
  MAX_STYLE_VALUE_LENGTH as M,
2817
- isShortPredicate as N,
2818
- resolveRules as O,
2819
- matches as P,
2820
- evalContinuous as Q,
2821
- numberOf as R,
3580
+ interpolate as N,
3581
+ within as O,
3582
+ describeFeature as P,
3583
+ refSource as Q,
3584
+ isShortPredicate as R,
2822
3585
  STYLE_BLOCK_NAME as S,
2823
3586
  TOOL_DEFAULTS as T,
2824
- styleLengthUnit as U,
2825
- discreteLookup as V,
2826
- CSS_COLORS as W,
2827
- STYLE_ISSUE as a,
2828
- styleTag as b,
2829
- styleBlockLosses as c,
2830
- canonicalFor as d,
2831
- degreeValues as e,
2832
- dataCell as f,
2833
- canonColor as g,
2834
- canonNumber as h,
3587
+ resolveRules as U,
3588
+ matches as V,
3589
+ evalContinuous as W,
3590
+ numberOf as X,
3591
+ styleLengthUnit as Y,
3592
+ discreteLookup as Z,
3593
+ CSS_COLORS as _,
3594
+ canonEnum as a,
3595
+ STYLE_ISSUE as b,
3596
+ canonNumber as c,
3597
+ canonColor as d,
3598
+ colorOpacity as e,
3599
+ canonText as f,
3600
+ canonSigned as g,
3601
+ StyleNotes as h,
2835
3602
  num6$1 as i,
2836
3603
  canonOpacity as j,
2837
- scalarText as k,
2838
- canonEnum as l,
2839
- canonBoolean as m,
3604
+ canonBoolean as k,
3605
+ isStyleValue as l,
3606
+ parseStyleBlock as m,
2840
3607
  noteAt as n,
2841
- canonText as o,
3608
+ styleFingerprint as o,
2842
3609
  plainCell as p,
2843
- isStyleValue as q,
3610
+ blockStyles as q,
2844
3611
  resolveStyles as r,
2845
- styleFingerprint as s,
2846
- toolDefaults as t,
2847
- StyleNotes as u,
2848
- parseStyleBlock as v,
2849
- writeStyleBlock as w,
2850
- blockStyles as x,
2851
- colorOpacity as y,
2852
- featuresOf as z
3612
+ scalarText as s,
3613
+ featuresOf as t,
3614
+ MAX_STYLE_BLOCK_LENGTH as u,
3615
+ STYLE_ENUMS as v,
3616
+ STYLE_PROPERTIES as w,
3617
+ matchPredicate as x,
3618
+ toolDefaults as y,
3619
+ styleTag as z
2853
3620
  };
2854
- //# sourceMappingURL=block-Cu22ewuS.js.map
3621
+ //# sourceMappingURL=block-yl0f_qLO.js.map