@graphty/graph-io 0.3.43 → 0.3.44

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 (674) hide show
  1. package/dist/chunks/approximations-3Q4TsdTh.js +40 -0
  2. package/dist/chunks/approximations-3Q4TsdTh.js.map +1 -0
  3. package/dist/chunks/block-JQiwViEt.js +2777 -0
  4. package/dist/chunks/block-JQiwViEt.js.map +1 -0
  5. package/dist/chunks/{choose-DvpbdRuz.js → choose-BemygfH8.js} +3 -2
  6. package/dist/chunks/{choose-DvpbdRuz.js.map → choose-BemygfH8.js.map} +1 -1
  7. package/dist/chunks/{constants-fT3E8JYY.js → constants-BFUR_CtU.js} +6 -2
  8. package/dist/chunks/constants-BFUR_CtU.js.map +1 -0
  9. package/dist/chunks/convert-BcQ8_jMo.js +59 -0
  10. package/dist/chunks/convert-BcQ8_jMo.js.map +1 -0
  11. package/dist/chunks/emit-DCwFLts5.js +3456 -0
  12. package/dist/chunks/emit-DCwFLts5.js.map +1 -0
  13. package/dist/chunks/{escape-B62ZGM_a.js → escape-B1rMftd9.js} +43 -20
  14. package/dist/chunks/escape-B1rMftd9.js.map +1 -0
  15. package/dist/chunks/{export-rKLeGQMo.js → export-D7IGzTG4.js} +196 -792
  16. package/dist/chunks/export-D7IGzTG4.js.map +1 -0
  17. package/dist/chunks/{exporter-BWwEuOPT.js → exporter-BtnqYuuj.js} +22 -12
  18. package/dist/chunks/exporter-BtnqYuuj.js.map +1 -0
  19. package/dist/chunks/{exporter-yLxKBvLE.js → exporter-ChPyhBOv.js} +4 -3
  20. package/dist/chunks/{exporter-yLxKBvLE.js.map → exporter-ChPyhBOv.js.map} +1 -1
  21. package/dist/chunks/{exporter-8hLNemFk.js → exporter-KEPxYUXD.js} +133 -74
  22. package/dist/chunks/exporter-KEPxYUXD.js.map +1 -0
  23. package/dist/chunks/{exporter-RVtXVetw.js → exporter-quPUCBiC.js} +1805 -287
  24. package/dist/chunks/exporter-quPUCBiC.js.map +1 -0
  25. package/dist/chunks/format-GDmO6m6Q.js +676 -0
  26. package/dist/chunks/format-GDmO6m6Q.js.map +1 -0
  27. package/dist/chunks/generic-BL06jrJf.js +1347 -0
  28. package/dist/chunks/generic-BL06jrJf.js.map +1 -0
  29. package/dist/chunks/{importer-WrGRZb0N.js → importer-B7r2owVf.js} +449 -102
  30. package/dist/chunks/importer-B7r2owVf.js.map +1 -0
  31. package/dist/chunks/{importer-Ht7LNg8L.js → importer-BFmOP96W.js} +116 -296
  32. package/dist/chunks/importer-BFmOP96W.js.map +1 -0
  33. package/dist/chunks/{importer-BbNb7eNg.js → importer-C2nzGhdV.js} +1390 -129
  34. package/dist/chunks/importer-C2nzGhdV.js.map +1 -0
  35. package/dist/chunks/{importer-Dz7tI8Sa.js → importer-CbX2_rNF.js} +617 -115
  36. package/dist/chunks/importer-CbX2_rNF.js.map +1 -0
  37. package/dist/chunks/{importer-D794XUTe.js → importer-CdzeN6X4.js} +31 -8
  38. package/dist/chunks/importer-CdzeN6X4.js.map +1 -0
  39. package/dist/chunks/{importer-xZ-3suY1.js → importer-ChKNC_GN.js} +791 -135
  40. package/dist/chunks/importer-ChKNC_GN.js.map +1 -0
  41. package/dist/chunks/{importer-C98dpSH4.js → importer-dwoYpSqb.js} +141 -82
  42. package/dist/chunks/importer-dwoYpSqb.js.map +1 -0
  43. package/dist/chunks/index-B9fdNpTA.js +4310 -0
  44. package/dist/chunks/index-B9fdNpTA.js.map +1 -0
  45. package/dist/chunks/{json-elements-DKSqpNW1.js → json-elements-C4FwgnH5.js} +123 -32
  46. package/dist/chunks/json-elements-C4FwgnH5.js.map +1 -0
  47. package/dist/chunks/lexicon-B-knUi-l.js +508 -0
  48. package/dist/chunks/lexicon-B-knUi-l.js.map +1 -0
  49. package/dist/chunks/{ontology-export-CtRXjg_i.js → ontology-export-BSpbY5FL.js} +3 -2
  50. package/dist/chunks/{ontology-export-CtRXjg_i.js.map → ontology-export-BSpbY5FL.js.map} +1 -1
  51. package/dist/chunks/{records-Cu4bxYOm.js → records-Nwz_rbNt.js} +2 -2
  52. package/dist/chunks/{records-Cu4bxYOm.js.map → records-Nwz_rbNt.js.map} +1 -1
  53. package/dist/chunks/styles-Brt9JMfs.js +690 -0
  54. package/dist/chunks/styles-Brt9JMfs.js.map +1 -0
  55. package/dist/chunks/styles-_N-C8S-U.js +2102 -0
  56. package/dist/chunks/styles-_N-C8S-U.js.map +1 -0
  57. package/dist/chunks/styles-yed-DAfcIkf7.js +842 -0
  58. package/dist/chunks/styles-yed-DAfcIkf7.js.map +1 -0
  59. package/dist/chunks/{text-DHOJXnED.js → text-CgzMqHQb.js} +2 -2
  60. package/dist/chunks/{text-DHOJXnED.js.map → text-CgzMqHQb.js.map} +1 -1
  61. package/dist/chunks/units-XMZFIFe1.js +19 -0
  62. package/dist/chunks/units-XMZFIFe1.js.map +1 -0
  63. package/dist/csv.js +5 -4
  64. package/dist/csv.js.map +1 -1
  65. package/dist/cx.js +1 -1
  66. package/dist/cx2.js +2 -2
  67. package/dist/cys.js +1 -1
  68. package/dist/dot.js +5 -2
  69. package/dist/dot.js.map +1 -1
  70. package/dist/gexf.js +292 -412
  71. package/dist/gexf.js.map +1 -1
  72. package/dist/gml.js +8 -3031
  73. package/dist/gml.js.map +1 -1
  74. package/dist/graph-io.js +354 -240
  75. package/dist/graph-io.js.map +1 -1
  76. package/dist/graphml.js +4 -2
  77. package/dist/graphml.js.map +1 -1
  78. package/dist/json.js +1 -1
  79. package/dist/neo4j.js +4 -3
  80. package/dist/neo4j.js.map +1 -1
  81. package/dist/obo.js +1 -1
  82. package/dist/pajek.js +4 -2
  83. package/dist/positions.d.ts +1 -0
  84. package/dist/positions.js +427 -0
  85. package/dist/positions.js.map +1 -0
  86. package/dist/src/common/codes.d.ts +6 -0
  87. package/dist/src/common/codes.d.ts.map +1 -1
  88. package/dist/src/common/codes.js +6 -0
  89. package/dist/src/common/codes.js.map +1 -1
  90. package/dist/src/common/escape.d.ts.map +1 -1
  91. package/dist/src/common/escape.js +4 -2
  92. package/dist/src/common/escape.js.map +1 -1
  93. package/dist/src/common/export.d.ts +10 -0
  94. package/dist/src/common/export.d.ts.map +1 -1
  95. package/dist/src/common/export.js +123 -100
  96. package/dist/src/common/export.js.map +1 -1
  97. package/dist/src/common/input.d.ts.map +1 -1
  98. package/dist/src/common/input.js +8 -1
  99. package/dist/src/common/input.js.map +1 -1
  100. package/dist/src/common/json-elements.d.ts +12 -9
  101. package/dist/src/common/json-elements.d.ts.map +1 -1
  102. package/dist/src/common/json-elements.js +160 -37
  103. package/dist/src/common/json-elements.js.map +1 -1
  104. package/dist/src/common/notes.d.ts +42 -0
  105. package/dist/src/common/notes.d.ts.map +1 -0
  106. package/dist/src/common/notes.js +72 -0
  107. package/dist/src/common/notes.js.map +1 -0
  108. package/dist/src/common/report.d.ts +18 -0
  109. package/dist/src/common/report.d.ts.map +1 -1
  110. package/dist/src/common/report.js +36 -1
  111. package/dist/src/common/report.js.map +1 -1
  112. package/dist/src/common/units.d.ts +24 -0
  113. package/dist/src/common/units.d.ts.map +1 -0
  114. package/dist/src/common/units.js +26 -0
  115. package/dist/src/common/units.js.map +1 -0
  116. package/dist/src/common/xml.d.ts +18 -0
  117. package/dist/src/common/xml.d.ts.map +1 -1
  118. package/dist/src/common/xml.js +42 -5
  119. package/dist/src/common/xml.js.map +1 -1
  120. package/dist/src/formats/cx/exporter.d.ts +6 -0
  121. package/dist/src/formats/cx/exporter.d.ts.map +1 -1
  122. package/dist/src/formats/cx/exporter.js +71 -8
  123. package/dist/src/formats/cx/exporter.js.map +1 -1
  124. package/dist/src/formats/cx/importer.d.ts +5 -2
  125. package/dist/src/formats/cx/importer.d.ts.map +1 -1
  126. package/dist/src/formats/cx/importer.js +102 -72
  127. package/dist/src/formats/cx/importer.js.map +1 -1
  128. package/dist/src/formats/cx/styles.d.ts +102 -0
  129. package/dist/src/formats/cx/styles.d.ts.map +1 -0
  130. package/dist/src/formats/cx/styles.js +225 -0
  131. package/dist/src/formats/cx/styles.js.map +1 -0
  132. package/dist/src/formats/cx2/exporter.d.ts +5 -0
  133. package/dist/src/formats/cx2/exporter.d.ts.map +1 -1
  134. package/dist/src/formats/cx2/exporter.js +181 -71
  135. package/dist/src/formats/cx2/exporter.js.map +1 -1
  136. package/dist/src/formats/cx2/importer.d.ts +4 -1
  137. package/dist/src/formats/cx2/importer.d.ts.map +1 -1
  138. package/dist/src/formats/cx2/importer.js +19 -1
  139. package/dist/src/formats/cx2/importer.js.map +1 -1
  140. package/dist/src/formats/cx2/styles.d.ts +18 -0
  141. package/dist/src/formats/cx2/styles.d.ts.map +1 -0
  142. package/dist/src/formats/cx2/styles.js +24 -0
  143. package/dist/src/formats/cx2/styles.js.map +1 -0
  144. package/dist/src/formats/cys/constants.d.ts +2 -0
  145. package/dist/src/formats/cys/constants.d.ts.map +1 -1
  146. package/dist/src/formats/cys/constants.js +2 -0
  147. package/dist/src/formats/cys/constants.js.map +1 -1
  148. package/dist/src/formats/cys/exporter.d.ts +6 -2
  149. package/dist/src/formats/cys/exporter.d.ts.map +1 -1
  150. package/dist/src/formats/cys/exporter.js +215 -53
  151. package/dist/src/formats/cys/exporter.js.map +1 -1
  152. package/dist/src/formats/cys/importer.d.ts +2 -1
  153. package/dist/src/formats/cys/importer.d.ts.map +1 -1
  154. package/dist/src/formats/cys/importer.js +119 -6
  155. package/dist/src/formats/cys/importer.js.map +1 -1
  156. package/dist/src/formats/cys/session.d.ts +2 -0
  157. package/dist/src/formats/cys/session.d.ts.map +1 -1
  158. package/dist/src/formats/cys/session.js +5 -0
  159. package/dist/src/formats/cys/session.js.map +1 -1
  160. package/dist/src/formats/cys/styles.d.ts +38 -0
  161. package/dist/src/formats/cys/styles.d.ts.map +1 -0
  162. package/dist/src/formats/cys/styles.js +213 -0
  163. package/dist/src/formats/cys/styles.js.map +1 -0
  164. package/dist/src/formats/cys/tables.d.ts +8 -3
  165. package/dist/src/formats/cys/tables.d.ts.map +1 -1
  166. package/dist/src/formats/cys/tables.js +88 -34
  167. package/dist/src/formats/cys/tables.js.map +1 -1
  168. package/dist/src/formats/dot/exporter.d.ts +2 -0
  169. package/dist/src/formats/dot/exporter.d.ts.map +1 -1
  170. package/dist/src/formats/dot/exporter.js +195 -81
  171. package/dist/src/formats/dot/exporter.js.map +1 -1
  172. package/dist/src/formats/dot/importer.d.ts.map +1 -1
  173. package/dist/src/formats/dot/importer.js +100 -20
  174. package/dist/src/formats/dot/importer.js.map +1 -1
  175. package/dist/src/formats/dot/index.d.ts +1 -0
  176. package/dist/src/formats/dot/index.d.ts.map +1 -1
  177. package/dist/src/formats/dot/index.js +1 -0
  178. package/dist/src/formats/dot/index.js.map +1 -1
  179. package/dist/src/formats/dot/positions.d.ts +14 -0
  180. package/dist/src/formats/dot/positions.d.ts.map +1 -0
  181. package/dist/src/formats/dot/positions.js +70 -0
  182. package/dist/src/formats/dot/positions.js.map +1 -0
  183. package/dist/src/formats/dot/styles.d.ts +82 -0
  184. package/dist/src/formats/dot/styles.d.ts.map +1 -0
  185. package/dist/src/formats/dot/styles.js +1484 -0
  186. package/dist/src/formats/dot/styles.js.map +1 -0
  187. package/dist/src/formats/gexf/exporter.d.ts.map +1 -1
  188. package/dist/src/formats/gexf/exporter.js +20 -5
  189. package/dist/src/formats/gexf/exporter.js.map +1 -1
  190. package/dist/src/formats/gexf/importer.d.ts +8 -1
  191. package/dist/src/formats/gexf/importer.d.ts.map +1 -1
  192. package/dist/src/formats/gexf/importer.js +251 -131
  193. package/dist/src/formats/gexf/importer.js.map +1 -1
  194. package/dist/src/formats/gexf/index.d.ts +8 -0
  195. package/dist/src/formats/gexf/index.d.ts.map +1 -1
  196. package/dist/src/formats/gexf/index.js +10 -2
  197. package/dist/src/formats/gexf/index.js.map +1 -1
  198. package/dist/src/formats/gexf/schema.d.ts +5 -0
  199. package/dist/src/formats/gexf/schema.d.ts.map +1 -1
  200. package/dist/src/formats/gexf/schema.js +5 -0
  201. package/dist/src/formats/gexf/schema.js.map +1 -1
  202. package/dist/src/formats/gexf/styles.d.ts +74 -0
  203. package/dist/src/formats/gexf/styles.d.ts.map +1 -0
  204. package/dist/src/formats/gexf/styles.js +604 -0
  205. package/dist/src/formats/gexf/styles.js.map +1 -0
  206. package/dist/src/formats/gml/exporter.d.ts +1 -5
  207. package/dist/src/formats/gml/exporter.d.ts.map +1 -1
  208. package/dist/src/formats/gml/exporter.js +19 -8
  209. package/dist/src/formats/gml/exporter.js.map +1 -1
  210. package/dist/src/formats/gml/importer.d.ts.map +1 -1
  211. package/dist/src/formats/gml/importer.js +4 -0
  212. package/dist/src/formats/gml/importer.js.map +1 -1
  213. package/dist/src/formats/gml/index.d.ts +2 -1
  214. package/dist/src/formats/gml/index.d.ts.map +1 -1
  215. package/dist/src/formats/gml/index.js +2 -1
  216. package/dist/src/formats/gml/index.js.map +1 -1
  217. package/dist/src/formats/gml/positions.d.ts +14 -0
  218. package/dist/src/formats/gml/positions.d.ts.map +1 -0
  219. package/dist/src/formats/gml/positions.js +46 -0
  220. package/dist/src/formats/gml/positions.js.map +1 -0
  221. package/dist/src/formats/gml/styles.d.ts +59 -0
  222. package/dist/src/formats/gml/styles.d.ts.map +1 -0
  223. package/dist/src/formats/gml/styles.js +1056 -0
  224. package/dist/src/formats/gml/styles.js.map +1 -0
  225. package/dist/src/formats/gml/syntax.d.ts +11 -0
  226. package/dist/src/formats/gml/syntax.d.ts.map +1 -1
  227. package/dist/src/formats/gml/syntax.js +151 -62
  228. package/dist/src/formats/gml/syntax.js.map +1 -1
  229. package/dist/src/formats/graphml/constants.d.ts +4 -0
  230. package/dist/src/formats/graphml/constants.d.ts.map +1 -1
  231. package/dist/src/formats/graphml/constants.js +5 -1
  232. package/dist/src/formats/graphml/constants.js.map +1 -1
  233. package/dist/src/formats/graphml/exporter.d.ts.map +1 -1
  234. package/dist/src/formats/graphml/exporter.js +133 -65
  235. package/dist/src/formats/graphml/exporter.js.map +1 -1
  236. package/dist/src/formats/graphml/importer.d.ts +4 -1
  237. package/dist/src/formats/graphml/importer.d.ts.map +1 -1
  238. package/dist/src/formats/graphml/importer.js +100 -44
  239. package/dist/src/formats/graphml/importer.js.map +1 -1
  240. package/dist/src/formats/graphml/index.d.ts +1 -0
  241. package/dist/src/formats/graphml/index.d.ts.map +1 -1
  242. package/dist/src/formats/graphml/index.js +1 -0
  243. package/dist/src/formats/graphml/index.js.map +1 -1
  244. package/dist/src/formats/graphml/styles-plain.d.ts +19 -0
  245. package/dist/src/formats/graphml/styles-plain.d.ts.map +1 -0
  246. package/dist/src/formats/graphml/styles-plain.js +187 -0
  247. package/dist/src/formats/graphml/styles-plain.js.map +1 -0
  248. package/dist/src/formats/graphml/styles-yed.d.ts +179 -0
  249. package/dist/src/formats/graphml/styles-yed.d.ts.map +1 -0
  250. package/dist/src/formats/graphml/styles-yed.js +1086 -0
  251. package/dist/src/formats/graphml/styles-yed.js.map +1 -0
  252. package/dist/src/formats/graphml/styles-yfiles3.d.ts +19 -0
  253. package/dist/src/formats/graphml/styles-yfiles3.d.ts.map +1 -0
  254. package/dist/src/formats/graphml/styles-yfiles3.js +508 -0
  255. package/dist/src/formats/graphml/styles-yfiles3.js.map +1 -0
  256. package/dist/src/formats/graphml/tree.d.ts.map +1 -1
  257. package/dist/src/formats/graphml/tree.js +34 -19
  258. package/dist/src/formats/graphml/tree.js.map +1 -1
  259. package/dist/src/formats/graphml/yfiles.d.ts +16 -2
  260. package/dist/src/formats/graphml/yfiles.d.ts.map +1 -1
  261. package/dist/src/formats/graphml/yfiles.js +83 -12
  262. package/dist/src/formats/graphml/yfiles.js.map +1 -1
  263. package/dist/src/formats/json/exporter.d.ts +5 -0
  264. package/dist/src/formats/json/exporter.d.ts.map +1 -1
  265. package/dist/src/formats/json/exporter.js +68 -25
  266. package/dist/src/formats/json/exporter.js.map +1 -1
  267. package/dist/src/formats/json/importer.d.ts +22 -3
  268. package/dist/src/formats/json/importer.d.ts.map +1 -1
  269. package/dist/src/formats/json/importer.js +439 -264
  270. package/dist/src/formats/json/importer.js.map +1 -1
  271. package/dist/src/formats/json/positions.d.ts +16 -0
  272. package/dist/src/formats/json/positions.d.ts.map +1 -0
  273. package/dist/src/formats/json/positions.js +44 -0
  274. package/dist/src/formats/json/positions.js.map +1 -0
  275. package/dist/src/formats/json/styles.d.ts +102 -0
  276. package/dist/src/formats/json/styles.d.ts.map +1 -0
  277. package/dist/src/formats/json/styles.js +1753 -0
  278. package/dist/src/formats/json/styles.js.map +1 -0
  279. package/dist/src/formats/neo4j/exporter.d.ts.map +1 -1
  280. package/dist/src/formats/neo4j/exporter.js +2 -1
  281. package/dist/src/formats/neo4j/exporter.js.map +1 -1
  282. package/dist/src/formats/pajek/exporter.d.ts +2 -0
  283. package/dist/src/formats/pajek/exporter.d.ts.map +1 -1
  284. package/dist/src/formats/pajek/exporter.js +142 -76
  285. package/dist/src/formats/pajek/exporter.js.map +1 -1
  286. package/dist/src/formats/pajek/importer.d.ts +4 -0
  287. package/dist/src/formats/pajek/importer.d.ts.map +1 -1
  288. package/dist/src/formats/pajek/importer.js +60 -6
  289. package/dist/src/formats/pajek/importer.js.map +1 -1
  290. package/dist/src/formats/pajek/index.d.ts +2 -0
  291. package/dist/src/formats/pajek/index.d.ts.map +1 -1
  292. package/dist/src/formats/pajek/index.js +2 -0
  293. package/dist/src/formats/pajek/index.js.map +1 -1
  294. package/dist/src/formats/pajek/styles.d.ts +50 -0
  295. package/dist/src/formats/pajek/styles.d.ts.map +1 -0
  296. package/dist/src/formats/pajek/styles.js +569 -0
  297. package/dist/src/formats/pajek/styles.js.map +1 -0
  298. package/dist/src/formats/pajek/syntax.d.ts +6 -0
  299. package/dist/src/formats/pajek/syntax.d.ts.map +1 -1
  300. package/dist/src/formats/pajek/syntax.js +6 -0
  301. package/dist/src/formats/pajek/syntax.js.map +1 -1
  302. package/dist/src/formats/xgmml/columns.d.ts.map +1 -1
  303. package/dist/src/formats/xgmml/columns.js +34 -9
  304. package/dist/src/formats/xgmml/columns.js.map +1 -1
  305. package/dist/src/formats/xgmml/constants.d.ts +2 -0
  306. package/dist/src/formats/xgmml/constants.d.ts.map +1 -1
  307. package/dist/src/formats/xgmml/constants.js +3 -1
  308. package/dist/src/formats/xgmml/constants.js.map +1 -1
  309. package/dist/src/formats/xgmml/document.d.ts +12 -8
  310. package/dist/src/formats/xgmml/document.d.ts.map +1 -1
  311. package/dist/src/formats/xgmml/document.js +56 -13
  312. package/dist/src/formats/xgmml/document.js.map +1 -1
  313. package/dist/src/formats/xgmml/emit.d.ts.map +1 -1
  314. package/dist/src/formats/xgmml/emit.js +12 -6
  315. package/dist/src/formats/xgmml/emit.js.map +1 -1
  316. package/dist/src/formats/xgmml/exporter.d.ts +3 -1
  317. package/dist/src/formats/xgmml/exporter.d.ts.map +1 -1
  318. package/dist/src/formats/xgmml/exporter.js +22 -9
  319. package/dist/src/formats/xgmml/exporter.js.map +1 -1
  320. package/dist/src/formats/xgmml/importer.d.ts +2 -1
  321. package/dist/src/formats/xgmml/importer.d.ts.map +1 -1
  322. package/dist/src/formats/xgmml/importer.js +31 -24
  323. package/dist/src/formats/xgmml/importer.js.map +1 -1
  324. package/dist/src/formats/xgmml/styles.d.ts +104 -0
  325. package/dist/src/formats/xgmml/styles.d.ts.map +1 -0
  326. package/dist/src/formats/xgmml/styles.js +310 -0
  327. package/dist/src/formats/xgmml/styles.js.map +1 -0
  328. package/dist/src/index.d.ts +9 -7
  329. package/dist/src/index.d.ts.map +1 -1
  330. package/dist/src/index.js +7 -7
  331. package/dist/src/index.js.map +1 -1
  332. package/dist/src/positions/codes.d.ts +31 -0
  333. package/dist/src/positions/codes.d.ts.map +1 -0
  334. package/dist/src/positions/codes.js +26 -0
  335. package/dist/src/positions/codes.js.map +1 -0
  336. package/dist/src/positions/convert.d.ts +58 -0
  337. package/dist/src/positions/convert.d.ts.map +1 -0
  338. package/dist/src/positions/convert.js +107 -0
  339. package/dist/src/positions/convert.js.map +1 -0
  340. package/dist/src/positions/extract.d.ts +27 -0
  341. package/dist/src/positions/extract.d.ts.map +1 -0
  342. package/dist/src/positions/extract.js +526 -0
  343. package/dist/src/positions/extract.js.map +1 -0
  344. package/dist/src/positions/index.d.ts +10 -0
  345. package/dist/src/positions/index.d.ts.map +1 -0
  346. package/dist/src/positions/index.js +9 -0
  347. package/dist/src/positions/index.js.map +1 -0
  348. package/dist/src/positions/types.d.ts +208 -0
  349. package/dist/src/positions/types.d.ts.map +1 -0
  350. package/dist/src/positions/types.js +10 -0
  351. package/dist/src/positions/types.js.map +1 -0
  352. package/dist/src/registry.d.ts +30 -0
  353. package/dist/src/registry.d.ts.map +1 -1
  354. package/dist/src/registry.js +130 -9
  355. package/dist/src/registry.js.map +1 -1
  356. package/dist/src/styles/annotations.d.ts +132 -0
  357. package/dist/src/styles/annotations.d.ts.map +1 -0
  358. package/dist/src/styles/annotations.js +320 -0
  359. package/dist/src/styles/annotations.js.map +1 -0
  360. package/dist/src/styles/budget.d.ts +45 -0
  361. package/dist/src/styles/budget.d.ts.map +1 -0
  362. package/dist/src/styles/budget.js +58 -0
  363. package/dist/src/styles/budget.js.map +1 -0
  364. package/dist/src/styles/canon/bends.d.ts +32 -0
  365. package/dist/src/styles/canon/bends.d.ts.map +1 -0
  366. package/dist/src/styles/canon/bends.js +74 -0
  367. package/dist/src/styles/canon/bends.js.map +1 -0
  368. package/dist/src/styles/canon/color-tables.d.ts +22 -0
  369. package/dist/src/styles/canon/color-tables.d.ts.map +1 -0
  370. package/dist/src/styles/canon/color-tables.js +369 -0
  371. package/dist/src/styles/canon/color-tables.js.map +1 -0
  372. package/dist/src/styles/canon/color.d.ts +66 -0
  373. package/dist/src/styles/canon/color.d.ts.map +1 -0
  374. package/dist/src/styles/canon/color.js +548 -0
  375. package/dist/src/styles/canon/color.js.map +1 -0
  376. package/dist/src/styles/canon/enums.d.ts +25 -0
  377. package/dist/src/styles/canon/enums.d.ts.map +1 -0
  378. package/dist/src/styles/canon/enums.js +187 -0
  379. package/dist/src/styles/canon/enums.js.map +1 -0
  380. package/dist/src/styles/canon/graphviz.d.ts +48 -0
  381. package/dist/src/styles/canon/graphviz.d.ts.map +1 -0
  382. package/dist/src/styles/canon/graphviz.js +160 -0
  383. package/dist/src/styles/canon/graphviz.js.map +1 -0
  384. package/dist/src/styles/canon/index.d.ts +13 -0
  385. package/dist/src/styles/canon/index.d.ts.map +1 -0
  386. package/dist/src/styles/canon/index.js +13 -0
  387. package/dist/src/styles/canon/index.js.map +1 -0
  388. package/dist/src/styles/canon/number.d.ts +59 -0
  389. package/dist/src/styles/canon/number.d.ts.map +1 -0
  390. package/dist/src/styles/canon/number.js +142 -0
  391. package/dist/src/styles/canon/number.js.map +1 -0
  392. package/dist/src/styles/canon/site.d.ts +51 -0
  393. package/dist/src/styles/canon/site.d.ts.map +1 -0
  394. package/dist/src/styles/canon/site.js +63 -0
  395. package/dist/src/styles/canon/site.js.map +1 -0
  396. package/dist/src/styles/canon/text.d.ts +61 -0
  397. package/dist/src/styles/canon/text.d.ts.map +1 -0
  398. package/dist/src/styles/canon/text.js +199 -0
  399. package/dist/src/styles/canon/text.js.map +1 -0
  400. package/dist/src/styles/codes.d.ts +95 -0
  401. package/dist/src/styles/codes.d.ts.map +1 -0
  402. package/dist/src/styles/codes.js +97 -0
  403. package/dist/src/styles/codes.js.map +1 -0
  404. package/dist/src/styles/cyjs/cascade.d.ts +134 -0
  405. package/dist/src/styles/cyjs/cascade.d.ts.map +1 -0
  406. package/dist/src/styles/cyjs/cascade.js +2252 -0
  407. package/dist/src/styles/cyjs/cascade.js.map +1 -0
  408. package/dist/src/styles/cyjs/defaults-table.d.ts +25 -0
  409. package/dist/src/styles/cyjs/defaults-table.d.ts.map +1 -0
  410. package/dist/src/styles/cyjs/defaults-table.js +76 -0
  411. package/dist/src/styles/cyjs/defaults-table.js.map +1 -0
  412. package/dist/src/styles/cyjs/emit.d.ts +82 -0
  413. package/dist/src/styles/cyjs/emit.d.ts.map +1 -0
  414. package/dist/src/styles/cyjs/emit.js +790 -0
  415. package/dist/src/styles/cyjs/emit.js.map +1 -0
  416. package/dist/src/styles/cyjs/index.d.ts +13 -0
  417. package/dist/src/styles/cyjs/index.d.ts.map +1 -0
  418. package/dist/src/styles/cyjs/index.js +13 -0
  419. package/dist/src/styles/cyjs/index.js.map +1 -0
  420. package/dist/src/styles/cyjs/live.d.ts +46 -0
  421. package/dist/src/styles/cyjs/live.d.ts.map +1 -0
  422. package/dist/src/styles/cyjs/live.js +108 -0
  423. package/dist/src/styles/cyjs/live.js.map +1 -0
  424. package/dist/src/styles/cyjs/mappers.d.ts +147 -0
  425. package/dist/src/styles/cyjs/mappers.d.ts.map +1 -0
  426. package/dist/src/styles/cyjs/mappers.js +744 -0
  427. package/dist/src/styles/cyjs/mappers.js.map +1 -0
  428. package/dist/src/styles/cyjs/selector.d.ts +113 -0
  429. package/dist/src/styles/cyjs/selector.d.ts.map +1 -0
  430. package/dist/src/styles/cyjs/selector.js +611 -0
  431. package/dist/src/styles/cyjs/selector.js.map +1 -0
  432. package/dist/src/styles/cyjs/stylesheet-text.d.ts +37 -0
  433. package/dist/src/styles/cyjs/stylesheet-text.d.ts.map +1 -0
  434. package/dist/src/styles/cyjs/stylesheet-text.js +181 -0
  435. package/dist/src/styles/cyjs/stylesheet-text.js.map +1 -0
  436. package/dist/src/styles/cytoscape/emit.d.ts +125 -0
  437. package/dist/src/styles/cytoscape/emit.d.ts.map +1 -0
  438. package/dist/src/styles/cytoscape/emit.js +1025 -0
  439. package/dist/src/styles/cytoscape/emit.js.map +1 -0
  440. package/dist/src/styles/cytoscape/index.d.ts +10 -0
  441. package/dist/src/styles/cytoscape/index.d.ts.map +1 -0
  442. package/dist/src/styles/cytoscape/index.js +10 -0
  443. package/dist/src/styles/cytoscape/index.js.map +1 -0
  444. package/dist/src/styles/cytoscape/lexicon.d.ts +49 -0
  445. package/dist/src/styles/cytoscape/lexicon.d.ts.map +1 -0
  446. package/dist/src/styles/cytoscape/lexicon.js +603 -0
  447. package/dist/src/styles/cytoscape/lexicon.js.map +1 -0
  448. package/dist/src/styles/cytoscape/mappings.d.ts +171 -0
  449. package/dist/src/styles/cytoscape/mappings.d.ts.map +1 -0
  450. package/dist/src/styles/cytoscape/mappings.js +460 -0
  451. package/dist/src/styles/cytoscape/mappings.js.map +1 -0
  452. package/dist/src/styles/cytoscape/resolve.d.ts +137 -0
  453. package/dist/src/styles/cytoscape/resolve.d.ts.map +1 -0
  454. package/dist/src/styles/cytoscape/resolve.js +381 -0
  455. package/dist/src/styles/cytoscape/resolve.js.map +1 -0
  456. package/dist/src/styles/cytoscape/translate.d.ts +50 -0
  457. package/dist/src/styles/cytoscape/translate.d.ts.map +1 -0
  458. package/dist/src/styles/cytoscape/translate.js +156 -0
  459. package/dist/src/styles/cytoscape/translate.js.map +1 -0
  460. package/dist/src/styles/defaults.d.ts +90 -0
  461. package/dist/src/styles/defaults.d.ts.map +1 -0
  462. package/dist/src/styles/defaults.js +414 -0
  463. package/dist/src/styles/defaults.js.map +1 -0
  464. package/dist/src/styles/index.d.ts +15 -0
  465. package/dist/src/styles/index.d.ts.map +1 -0
  466. package/dist/src/styles/index.js +14 -0
  467. package/dist/src/styles/index.js.map +1 -0
  468. package/dist/src/styles/internal.d.ts +17 -0
  469. package/dist/src/styles/internal.d.ts.map +1 -0
  470. package/dist/src/styles/internal.js +16 -0
  471. package/dist/src/styles/internal.js.map +1 -0
  472. package/dist/src/styles/io/approximations.d.ts +24 -0
  473. package/dist/src/styles/io/approximations.d.ts.map +1 -0
  474. package/dist/src/styles/io/approximations.js +51 -0
  475. package/dist/src/styles/io/approximations.js.map +1 -0
  476. package/dist/src/styles/io/block.d.ts +166 -0
  477. package/dist/src/styles/io/block.d.ts.map +1 -0
  478. package/dist/src/styles/io/block.js +930 -0
  479. package/dist/src/styles/io/block.js.map +1 -0
  480. package/dist/src/styles/io/generic.d.ts +88 -0
  481. package/dist/src/styles/io/generic.d.ts.map +1 -0
  482. package/dist/src/styles/io/generic.js +516 -0
  483. package/dist/src/styles/io/generic.js.map +1 -0
  484. package/dist/src/styles/io/index.d.ts +8 -0
  485. package/dist/src/styles/io/index.d.ts.map +1 -0
  486. package/dist/src/styles/io/index.js +7 -0
  487. package/dist/src/styles/io/index.js.map +1 -0
  488. package/dist/src/styles/io/writer.d.ts +80 -0
  489. package/dist/src/styles/io/writer.d.ts.map +1 -0
  490. package/dist/src/styles/io/writer.js +596 -0
  491. package/dist/src/styles/io/writer.js.map +1 -0
  492. package/dist/src/styles/notes.d.ts +47 -0
  493. package/dist/src/styles/notes.d.ts.map +1 -0
  494. package/dist/src/styles/notes.js +140 -0
  495. package/dist/src/styles/notes.js.map +1 -0
  496. package/dist/src/styles/plan/classes.d.ts +31 -0
  497. package/dist/src/styles/plan/classes.d.ts.map +1 -0
  498. package/dist/src/styles/plan/classes.js +139 -0
  499. package/dist/src/styles/plan/classes.js.map +1 -0
  500. package/dist/src/styles/plan/continuous.d.ts +32 -0
  501. package/dist/src/styles/plan/continuous.d.ts.map +1 -0
  502. package/dist/src/styles/plan/continuous.js +165 -0
  503. package/dist/src/styles/plan/continuous.js.map +1 -0
  504. package/dist/src/styles/plan/discrete.d.ts +39 -0
  505. package/dist/src/styles/plan/discrete.d.ts.map +1 -0
  506. package/dist/src/styles/plan/discrete.js +127 -0
  507. package/dist/src/styles/plan/discrete.js.map +1 -0
  508. package/dist/src/styles/plan/families.d.ts +31 -0
  509. package/dist/src/styles/plan/families.d.ts.map +1 -0
  510. package/dist/src/styles/plan/families.js +95 -0
  511. package/dist/src/styles/plan/families.js.map +1 -0
  512. package/dist/src/styles/plan/features.d.ts +58 -0
  513. package/dist/src/styles/plan/features.d.ts.map +1 -0
  514. package/dist/src/styles/plan/features.js +185 -0
  515. package/dist/src/styles/plan/features.js.map +1 -0
  516. package/dist/src/styles/plan/index.d.ts +7 -0
  517. package/dist/src/styles/plan/index.d.ts.map +1 -0
  518. package/dist/src/styles/plan/index.js +7 -0
  519. package/dist/src/styles/plan/index.js.map +1 -0
  520. package/dist/src/styles/plan/plan.d.ts +71 -0
  521. package/dist/src/styles/plan/plan.d.ts.map +1 -0
  522. package/dist/src/styles/plan/plan.js +893 -0
  523. package/dist/src/styles/plan/plan.js.map +1 -0
  524. package/dist/src/styles/plan/resolve.d.ts +137 -0
  525. package/dist/src/styles/plan/resolve.d.ts.map +1 -0
  526. package/dist/src/styles/plan/resolve.js +587 -0
  527. package/dist/src/styles/plan/resolve.js.map +1 -0
  528. package/dist/src/styles/types.d.ts +702 -0
  529. package/dist/src/styles/types.d.ts.map +1 -0
  530. package/dist/src/styles/types.js +10 -0
  531. package/dist/src/styles/types.js.map +1 -0
  532. package/dist/src/styles/vocabulary.d.ts +41 -0
  533. package/dist/src/styles/vocabulary.d.ts.map +1 -0
  534. package/dist/src/styles/vocabulary.js +140 -0
  535. package/dist/src/styles/vocabulary.js.map +1 -0
  536. package/dist/src/types.d.ts +64 -1
  537. package/dist/src/types.d.ts.map +1 -1
  538. package/dist/src/types.js.map +1 -1
  539. package/dist/styles.d.ts +1 -0
  540. package/dist/styles.js +322 -0
  541. package/dist/styles.js.map +1 -0
  542. package/dist/xgmml.js +5 -4
  543. package/dist/xgmml.js.map +1 -1
  544. package/package.json +13 -2
  545. package/src/common/codes.ts +7 -0
  546. package/src/common/escape.ts +5 -2
  547. package/src/common/export.ts +179 -140
  548. package/src/common/input.ts +8 -4
  549. package/src/common/json-elements.ts +169 -38
  550. package/src/common/notes.ts +94 -0
  551. package/src/common/report.ts +41 -1
  552. package/src/common/units.ts +42 -0
  553. package/src/common/xml.ts +45 -5
  554. package/src/formats/cx/exporter.ts +95 -11
  555. package/src/formats/cx/importer.ts +126 -90
  556. package/src/formats/cx/styles.ts +304 -0
  557. package/src/formats/cx2/exporter.ts +234 -77
  558. package/src/formats/cx2/importer.ts +19 -1
  559. package/src/formats/cx2/styles.ts +29 -0
  560. package/src/formats/cys/constants.ts +3 -0
  561. package/src/formats/cys/exporter.ts +246 -60
  562. package/src/formats/cys/importer.ts +125 -9
  563. package/src/formats/cys/session.ts +6 -0
  564. package/src/formats/cys/styles.ts +254 -0
  565. package/src/formats/cys/tables.ts +117 -48
  566. package/src/formats/dot/exporter.ts +262 -126
  567. package/src/formats/dot/importer.ts +111 -20
  568. package/src/formats/dot/index.ts +1 -0
  569. package/src/formats/dot/positions.ts +77 -0
  570. package/src/formats/dot/styles.ts +1741 -0
  571. package/src/formats/gexf/exporter.ts +27 -11
  572. package/src/formats/gexf/importer.ts +308 -158
  573. package/src/formats/gexf/index.ts +10 -0
  574. package/src/formats/gexf/schema.ts +5 -0
  575. package/src/formats/gexf/styles.ts +719 -0
  576. package/src/formats/gml/exporter.ts +33 -14
  577. package/src/formats/gml/importer.ts +4 -0
  578. package/src/formats/gml/index.ts +2 -1
  579. package/src/formats/gml/positions.ts +52 -0
  580. package/src/formats/gml/styles.ts +1248 -0
  581. package/src/formats/gml/syntax.ts +173 -62
  582. package/src/formats/graphml/constants.ts +5 -0
  583. package/src/formats/graphml/exporter.ts +163 -71
  584. package/src/formats/graphml/importer.ts +119 -45
  585. package/src/formats/graphml/index.ts +1 -0
  586. package/src/formats/graphml/styles-plain.ts +236 -0
  587. package/src/formats/graphml/styles-yed.ts +1221 -0
  588. package/src/formats/graphml/styles-yfiles3.ts +573 -0
  589. package/src/formats/graphml/tree.ts +36 -20
  590. package/src/formats/graphml/yfiles.ts +89 -13
  591. package/src/formats/json/exporter.ts +76 -26
  592. package/src/formats/json/importer.ts +541 -322
  593. package/src/formats/json/positions.ts +50 -0
  594. package/src/formats/json/styles.ts +2082 -0
  595. package/src/formats/neo4j/exporter.ts +2 -1
  596. package/src/formats/pajek/exporter.ts +195 -106
  597. package/src/formats/pajek/importer.ts +78 -9
  598. package/src/formats/pajek/index.ts +2 -0
  599. package/src/formats/pajek/styles.ts +685 -0
  600. package/src/formats/pajek/syntax.ts +7 -0
  601. package/src/formats/xgmml/columns.ts +39 -9
  602. package/src/formats/xgmml/constants.ts +3 -0
  603. package/src/formats/xgmml/document.ts +54 -12
  604. package/src/formats/xgmml/emit.ts +11 -6
  605. package/src/formats/xgmml/exporter.ts +32 -13
  606. package/src/formats/xgmml/importer.ts +43 -29
  607. package/src/formats/xgmml/styles.ts +400 -0
  608. package/src/index.ts +16 -0
  609. package/src/positions/codes.ts +32 -0
  610. package/src/positions/convert.ts +123 -0
  611. package/src/positions/extract.ts +619 -0
  612. package/src/positions/index.ts +23 -0
  613. package/src/positions/types.ts +221 -0
  614. package/src/registry.ts +179 -8
  615. package/src/styles/annotations.ts +478 -0
  616. package/src/styles/budget.ts +60 -0
  617. package/src/styles/canon/bends.ts +84 -0
  618. package/src/styles/canon/color-tables.ts +386 -0
  619. package/src/styles/canon/color.ts +624 -0
  620. package/src/styles/canon/enums.ts +211 -0
  621. package/src/styles/canon/graphviz.ts +189 -0
  622. package/src/styles/canon/index.ts +13 -0
  623. package/src/styles/canon/number.ts +152 -0
  624. package/src/styles/canon/site.ts +87 -0
  625. package/src/styles/canon/text.ts +221 -0
  626. package/src/styles/codes.ts +104 -0
  627. package/src/styles/cyjs/cascade.ts +2670 -0
  628. package/src/styles/cyjs/defaults-table.ts +82 -0
  629. package/src/styles/cyjs/emit.ts +951 -0
  630. package/src/styles/cyjs/index.ts +37 -0
  631. package/src/styles/cyjs/live.ts +147 -0
  632. package/src/styles/cyjs/mappers.ts +879 -0
  633. package/src/styles/cyjs/selector.ts +778 -0
  634. package/src/styles/cyjs/stylesheet-text.ts +214 -0
  635. package/src/styles/cytoscape/emit.ts +1264 -0
  636. package/src/styles/cytoscape/index.ts +40 -0
  637. package/src/styles/cytoscape/lexicon.ts +656 -0
  638. package/src/styles/cytoscape/mappings.ts +603 -0
  639. package/src/styles/cytoscape/resolve.ts +521 -0
  640. package/src/styles/cytoscape/translate.ts +237 -0
  641. package/src/styles/defaults.ts +504 -0
  642. package/src/styles/index.ts +57 -0
  643. package/src/styles/internal.ts +17 -0
  644. package/src/styles/io/approximations.ts +47 -0
  645. package/src/styles/io/block.ts +1138 -0
  646. package/src/styles/io/generic.ts +687 -0
  647. package/src/styles/io/index.ts +18 -0
  648. package/src/styles/io/writer.ts +745 -0
  649. package/src/styles/notes.ts +165 -0
  650. package/src/styles/plan/classes.ts +166 -0
  651. package/src/styles/plan/continuous.ts +218 -0
  652. package/src/styles/plan/discrete.ts +165 -0
  653. package/src/styles/plan/families.ts +115 -0
  654. package/src/styles/plan/features.ts +234 -0
  655. package/src/styles/plan/index.ts +7 -0
  656. package/src/styles/plan/plan.ts +1129 -0
  657. package/src/styles/plan/resolve.ts +685 -0
  658. package/src/styles/types.ts +814 -0
  659. package/src/styles/vocabulary.ts +172 -0
  660. package/src/types.ts +76 -1
  661. package/dist/chunks/constants-fT3E8JYY.js.map +0 -1
  662. package/dist/chunks/escape-B62ZGM_a.js.map +0 -1
  663. package/dist/chunks/export-rKLeGQMo.js.map +0 -1
  664. package/dist/chunks/exporter-8hLNemFk.js.map +0 -1
  665. package/dist/chunks/exporter-BWwEuOPT.js.map +0 -1
  666. package/dist/chunks/exporter-RVtXVetw.js.map +0 -1
  667. package/dist/chunks/importer-BbNb7eNg.js.map +0 -1
  668. package/dist/chunks/importer-C98dpSH4.js.map +0 -1
  669. package/dist/chunks/importer-D794XUTe.js.map +0 -1
  670. package/dist/chunks/importer-Dz7tI8Sa.js.map +0 -1
  671. package/dist/chunks/importer-Ht7LNg8L.js.map +0 -1
  672. package/dist/chunks/importer-WrGRZb0N.js.map +0 -1
  673. package/dist/chunks/importer-xZ-3suY1.js.map +0 -1
  674. package/dist/chunks/json-elements-DKSqpNW1.js.map +0 -1
@@ -0,0 +1,611 @@
1
+ /**
2
+ * Cytoscape.js's selector grammar, parsed the way Cytoscape.js 3.x parses it, by index in one pass. The grammar is
3
+ * Cytoscape.js's own: the same tokens tried in the same order (group, state, `#id`, `.class`, `[a]`, `[a op v]`,
4
+ * `[?a]`, `[[degree op n]]`, then the separators `,` `->` `<->` `>` and a space, and the subject `$`), building the
5
+ * same query structure, so a selector that is valid there is valid here and selects the same elements.
6
+ *
7
+ * Two of Cytoscape.js's behaviors are kept on purpose because files depend on them:
8
+ * - an invalid selector keeps what was parsed before the error. A selector whose first token fails has one empty
9
+ * query and matches every node and edge; `node:not(.a)` keeps `node` and matches every node.
10
+ * - a string value is kept as written between its quotes: `[a = "x\"y"]` compares with `x\"y`.
11
+ */
12
+ /** Every state selector Cytoscape.js 3.x knows. */
13
+ const CYJS_STATES = new Set([
14
+ "selected",
15
+ "unselected",
16
+ "selectable",
17
+ "unselectable",
18
+ "locked",
19
+ "unlocked",
20
+ "visible",
21
+ "hidden",
22
+ "transparent",
23
+ "grabbed",
24
+ "free",
25
+ "removed",
26
+ "inside",
27
+ "grabbable",
28
+ "ungrabbable",
29
+ "animated",
30
+ "unanimated",
31
+ "parent",
32
+ "childless",
33
+ "child",
34
+ "orphan",
35
+ "nonorphan",
36
+ "compound",
37
+ "loop",
38
+ "simple",
39
+ "active",
40
+ "inactive",
41
+ "backgrounding",
42
+ "nonbackgrounding",
43
+ ]);
44
+ /** The longest selector parsed; a longer one is treated as invalid (and noted by the caller). */
45
+ const MAX_SELECTOR_LENGTH = 1 << 22;
46
+ /** Cytoscape.js's escapable meta characters. */
47
+ const META = new Set("!\"#$%&'()*+,./:;<=>?@[]^`{|}~");
48
+ /** The base comparison operators, longest first so a scan takes `>=` before `>`. */
49
+ const BASE_OPS = ["!=", ">=", "<=", "*=", "^=", "$=", "=", ">", "<"];
50
+ const META_FIELDS = ["indegree", "outdegree", "degree"];
51
+ /**
52
+ * Whether a character is a JavaScript regular expression word character.
53
+ * @param c - the character
54
+ * @returns true for `[A-Za-z0-9_]`
55
+ */
56
+ function isWord(c) {
57
+ if (c === undefined) {
58
+ return false;
59
+ }
60
+ const k = c.codePointAt(0) ?? 0;
61
+ return (k >= 48 && k <= 57) || (k >= 65 && k <= 90) || (k >= 97 && k <= 122) || k === 95;
62
+ }
63
+ /**
64
+ * Whether a character is JavaScript regular expression whitespace (`\s`).
65
+ * @param c - the character
66
+ * @returns true for whitespace
67
+ */
68
+ function isSpace(c) {
69
+ return c !== undefined && /\s/.test(c);
70
+ }
71
+ /** The text being parsed and the position reached. */
72
+ class Cursor {
73
+ constructor(text) {
74
+ this.text = text;
75
+ this.pos = 0;
76
+ }
77
+ /**
78
+ * The end of a run of whitespace.
79
+ * @param from - where the run starts
80
+ * @returns the first position after it
81
+ */
82
+ spaceEnd(from) {
83
+ let i = from;
84
+ while (i < this.text.length && isSpace(this.text[i])) {
85
+ i++;
86
+ }
87
+ return i;
88
+ }
89
+ /**
90
+ * A name at `from`: word characters, `-`, and `.` when `dots` (Cytoscape.js's variable and id tokens), or a
91
+ * backslash before a meta character.
92
+ * @param from - the start
93
+ * @param dots - whether `.` belongs to the name
94
+ * @returns the raw name and its end, or null when there is none
95
+ */
96
+ name(from, dots) {
97
+ let i = from;
98
+ const t = this.text;
99
+ while (i < t.length) {
100
+ const c = t[i];
101
+ if (isWord(c) || c === "-" || (dots && c === ".")) {
102
+ i++;
103
+ }
104
+ else if (c === "\\" && i + 1 < t.length && META.has(t[i + 1])) {
105
+ i += 2;
106
+ }
107
+ else {
108
+ break;
109
+ }
110
+ }
111
+ return i > from ? { raw: t.slice(from, i), end: i } : null;
112
+ }
113
+ /**
114
+ * A number literal at `from` (Cytoscape.js's `[-+]?(\d+|\d*\.\d+)([Ee][+-]?\d+)?`). Both readings of the
115
+ * mantissa are returned, longest first, because the regular expression backtracks to the shorter one.
116
+ * @param from - the start
117
+ * @returns the possible ends, longest first
118
+ */
119
+ numberEnds(from) {
120
+ const t = this.text;
121
+ let i = from;
122
+ if (t[i] === "+" || t[i] === "-") {
123
+ i++;
124
+ }
125
+ const digits = (k) => {
126
+ let j = k;
127
+ while (j < t.length && t[j] >= "0" && t[j] <= "9") {
128
+ j++;
129
+ }
130
+ return j;
131
+ };
132
+ const mantissas = [];
133
+ const intEnd = digits(i);
134
+ if (intEnd > i) {
135
+ mantissas.push(intEnd);
136
+ }
137
+ // \d*\.\d+
138
+ if (t[intEnd] === ".") {
139
+ const fracEnd = digits(intEnd + 1);
140
+ if (fracEnd > intEnd + 1) {
141
+ mantissas.unshift(fracEnd);
142
+ }
143
+ }
144
+ const ends = [];
145
+ for (const m of mantissas) {
146
+ if (t[m] === "e" || t[m] === "E") {
147
+ let j = m + 1;
148
+ if (t[j] === "+" || t[j] === "-") {
149
+ j++;
150
+ }
151
+ const expEnd = digits(j);
152
+ if (expEnd > j) {
153
+ ends.push(expEnd);
154
+ }
155
+ }
156
+ ends.push(m);
157
+ }
158
+ return ends;
159
+ }
160
+ /**
161
+ * The possible ends of a quoted string at `from`: every quote that may close it, longest first (a quote after a
162
+ * backslash may also be escaped; the first quote with no backslash before it must close the string).
163
+ * @param from - the opening quote
164
+ * @returns the possible ends (after the closing quote), longest first
165
+ */
166
+ stringEnds(from) {
167
+ const t = this.text;
168
+ const q = t[from];
169
+ const ends = [];
170
+ for (let i = from + 1; i < t.length; i++) {
171
+ if (t[i] !== q) {
172
+ continue;
173
+ }
174
+ ends.push(i + 1);
175
+ if (t[i - 1] !== "\\" || i - 1 === from) {
176
+ break;
177
+ }
178
+ }
179
+ return ends.reverse();
180
+ }
181
+ /**
182
+ * A comparison operator at `from`: `!` and `@` flags, then a base operator (`!` before a base that holds `!`
183
+ * is not allowed).
184
+ * @param from - the start
185
+ * @returns the operator text and its end, or null
186
+ */
187
+ op(from) {
188
+ const t = this.text;
189
+ let i = from;
190
+ let prefix = "";
191
+ if (t[i] === "!" && t[i + 1] !== "=") {
192
+ prefix += "!";
193
+ i++;
194
+ }
195
+ if (t[i] === "@") {
196
+ prefix += "@";
197
+ i++;
198
+ }
199
+ for (const base of BASE_OPS) {
200
+ if (t.startsWith(base, i)) {
201
+ if (prefix.includes("!") && base === "!=") {
202
+ return null;
203
+ }
204
+ return { text: prefix + base, end: i + base.length };
205
+ }
206
+ }
207
+ return null;
208
+ }
209
+ }
210
+ /**
211
+ * A name with its backslash escapes of meta characters removed.
212
+ * @param raw - the name as written
213
+ * @returns the name
214
+ */
215
+ function cleanMeta(raw) {
216
+ let out = "";
217
+ let i = 0;
218
+ while (i < raw.length) {
219
+ const escaped = raw[i] === "\\" && i + 1 < raw.length && META.has(raw[i + 1]);
220
+ out += escaped ? raw[i + 1] : raw[i];
221
+ i += escaped ? 2 : 1;
222
+ }
223
+ return out;
224
+ }
225
+ /**
226
+ * Splits an operator into its base and its flags.
227
+ * @param text - the operator as written
228
+ * @returns the base operator and the `!` and `@` flags
229
+ */
230
+ function splitOp(text) {
231
+ let op = text;
232
+ let not = false;
233
+ let ci = false;
234
+ if (op.includes("!")) {
235
+ op = op.replace("!", "");
236
+ not = true;
237
+ }
238
+ if (op.includes("@")) {
239
+ op = op.replace("@", "");
240
+ ci = true;
241
+ }
242
+ return { op: op, not, ci };
243
+ }
244
+ /**
245
+ * Replaces the last query of the selector.
246
+ * @param b - the selector being built
247
+ * @param q - the replacement
248
+ */
249
+ function replaceLast(b, q) {
250
+ b.queries[b.queries.length - 1] = q;
251
+ }
252
+ /**
253
+ * The last query of the selector (a selector always has one).
254
+ * @param b - the selector being built
255
+ * @returns the query
256
+ */
257
+ function lastQuery(b) {
258
+ return b.queries.at(-1);
259
+ }
260
+ /**
261
+ * The compound separators (`>` and a space) as Cytoscape.js fills them.
262
+ * @param kind - child or descendant
263
+ * @returns the fill function
264
+ */
265
+ function compoundFill(kind) {
266
+ return (b, query) => {
267
+ if (b.subject === null) {
268
+ const outer = { checks: [] };
269
+ const inner = { checks: [] };
270
+ const left = lastQuery(b);
271
+ outer.checks.push(kind === "child"
272
+ ? { type: "child", parent: left, child: inner }
273
+ : { type: "descendant", ancestor: left, descendant: inner });
274
+ replaceLast(b, outer);
275
+ b.compoundCount++;
276
+ return inner;
277
+ }
278
+ if (b.subject === query) {
279
+ const compound = { checks: [] };
280
+ const left = lastQuery(b);
281
+ const right = { checks: [] };
282
+ const subject = { checks: query.checks };
283
+ const inner = { checks: [] };
284
+ const outer = { checks: [{ type: "true" }] };
285
+ query.checks = [{ type: "true" }];
286
+ right.checks.push(kind === "child"
287
+ ? { type: "parent", parent: outer, child: inner }
288
+ : { type: "ancestor", ancestor: outer, descendant: inner });
289
+ compound.checks.push({ type: "split", left, right, subject });
290
+ replaceLast(b, compound);
291
+ b.subject = subject;
292
+ b.compoundCount++;
293
+ return inner;
294
+ }
295
+ const outer = { checks: query.checks };
296
+ const inner = { checks: [] };
297
+ query.checks = [
298
+ kind === "child"
299
+ ? { type: "parent", parent: outer, child: inner }
300
+ : { type: "ancestor", ancestor: outer, descendant: inner },
301
+ ];
302
+ b.compoundCount++;
303
+ return inner;
304
+ };
305
+ }
306
+ /**
307
+ * The first of Cytoscape.js's expressions that matches at the cursor, in its order.
308
+ * @param c - the cursor
309
+ * @returns the token, or null when none matches (the selector is invalid)
310
+ */
311
+ function nextToken(c) {
312
+ const ch = c.text[c.pos];
313
+ return (groupToken(c) ??
314
+ (ch === ":" ? stateToken(c) : null) ??
315
+ (ch === "#" || ch === "." ? nameToken(c, ch) : null) ??
316
+ (ch === "[" ? dataToken(c, c.pos) : null) ??
317
+ separatorToken(c) ??
318
+ (ch === "$" ? subjectToken(c) : null));
319
+ }
320
+ /**
321
+ * A check that fills the query with a fixed check.
322
+ * @param end - where the token ends
323
+ * @param check - the check
324
+ * @returns the token
325
+ */
326
+ function checkToken(end, check) {
327
+ return {
328
+ end,
329
+ fill: (_b, q) => {
330
+ q.checks.push(check);
331
+ return null;
332
+ },
333
+ };
334
+ }
335
+ /**
336
+ * A group: `node`, `edge` or `*`.
337
+ * @param c - the cursor
338
+ * @returns the token, or null
339
+ */
340
+ function groupToken(c) {
341
+ const i = c.pos;
342
+ for (const [g, value] of [
343
+ ["node", "nodes"],
344
+ ["edge", "edges"],
345
+ ["*", "*"],
346
+ ]) {
347
+ if (c.text.startsWith(g, i)) {
348
+ return checkToken(i + g.length, { type: "group", value });
349
+ }
350
+ }
351
+ return null;
352
+ }
353
+ /**
354
+ * A state: the longest state name that is a prefix after the `:`.
355
+ * @param c - the cursor
356
+ * @returns the token, or null
357
+ */
358
+ function stateToken(c) {
359
+ const i = c.pos;
360
+ let best = null;
361
+ for (const s of CYJS_STATES) {
362
+ if (c.text.startsWith(s, i + 1) && (best === null || s.length > best.length)) {
363
+ best = s;
364
+ }
365
+ }
366
+ return best === null ? null : checkToken(i + 1 + best.length, { type: "state", value: best });
367
+ }
368
+ /**
369
+ * An id (`#`) or a class (`.`).
370
+ * @param c - the cursor
371
+ * @param ch - the `#` or `.`
372
+ * @returns the token, or null
373
+ */
374
+ function nameToken(c, ch) {
375
+ const n = c.name(c.pos + 1, ch === "#");
376
+ if (n === null) {
377
+ return null;
378
+ }
379
+ return checkToken(n.end, { type: ch === "#" ? "id" : "class", value: cleanMeta(n.raw) });
380
+ }
381
+ /**
382
+ * A separator: `\s*,\s*`, `\s+->\s+`, `\s+<->\s+`, `\s+>\s+` or `\s+`.
383
+ * @param c - the cursor
384
+ * @returns the token, or null
385
+ */
386
+ function separatorToken(c) {
387
+ const t = c.text;
388
+ const i = c.pos;
389
+ const ws = c.spaceEnd(i);
390
+ if (t[ws] === ",") {
391
+ return { end: c.spaceEnd(ws + 1), fill: nextQuery };
392
+ }
393
+ if (ws === i) {
394
+ return null;
395
+ }
396
+ for (const [sep, kind] of [
397
+ ["->", "directed"],
398
+ ["<->", "undirected"],
399
+ [">", "child"],
400
+ ]) {
401
+ const after = t.startsWith(sep, ws) ? c.spaceEnd(ws + sep.length) : -1;
402
+ if (after > ws + sep.length) {
403
+ return { end: after, fill: kind === "child" ? compoundFill("child") : edgeFill(kind) };
404
+ }
405
+ }
406
+ return { end: ws, fill: compoundFill("descendant") };
407
+ }
408
+ /**
409
+ * Starts the next query of a selector list (`,`).
410
+ * @param b - the selector being built
411
+ * @returns the new query
412
+ */
413
+ function nextQuery(b) {
414
+ b.counts.push({ edgeCount: b.edgeCount, compoundCount: b.compoundCount, subject: b.subject });
415
+ b.subject = null;
416
+ b.edgeCount = 0;
417
+ b.compoundCount = 0;
418
+ const next = { checks: [] };
419
+ b.queries.push(next);
420
+ return next;
421
+ }
422
+ /**
423
+ * The subject marker `$`: the query it follows is the one the selector selects.
424
+ * @param c - the cursor
425
+ * @returns the token
426
+ */
427
+ function subjectToken(c) {
428
+ return {
429
+ end: c.pos + 1,
430
+ fill: (b, q) => {
431
+ if (b.subject !== null && b.subject !== q) {
432
+ return false;
433
+ }
434
+ b.subject = q;
435
+ const top = lastQuery(b);
436
+ const first = top.checks.at(0);
437
+ if (first?.type === "directedEdge") {
438
+ top.checks[0] = { type: "nodeTarget", source: first.source, target: first.target };
439
+ }
440
+ else if (first?.type === "undirectedEdge") {
441
+ top.checks[0] = { type: "nodeNeighbor", node: first.nodes[1], neighbor: first.nodes[0] };
442
+ }
443
+ return null;
444
+ },
445
+ };
446
+ }
447
+ /**
448
+ * The edge separators (`->`, `<->`) as Cytoscape.js fills them.
449
+ * @param kind - directed or undirected
450
+ * @returns the fill function
451
+ */
452
+ function edgeFill(kind) {
453
+ return (b, query) => {
454
+ const target = { checks: [] };
455
+ const outer = { checks: [] };
456
+ if (b.subject === null) {
457
+ outer.checks.push(kind === "directed"
458
+ ? { type: "directedEdge", source: query, target }
459
+ : { type: "undirectedEdge", nodes: [query, target] });
460
+ replaceLast(b, outer);
461
+ b.edgeCount++;
462
+ return target;
463
+ }
464
+ if (kind === "directed") {
465
+ outer.checks.push({ type: "nodeSource", source: query, target });
466
+ replaceLast(b, outer);
467
+ b.edgeCount++;
468
+ return target;
469
+ }
470
+ outer.checks.push({ type: "nodeNeighbor", node: query, neighbor: target });
471
+ replaceLast(b, outer);
472
+ return target;
473
+ };
474
+ }
475
+ /**
476
+ * A `[...]` token at `i`: data existence, a data comparison, a data boolean or a metadata comparison, tried in
477
+ * Cytoscape.js's order.
478
+ * @param c - the cursor
479
+ * @param i - the position of `[`
480
+ * @returns the token, or null
481
+ */
482
+ function dataToken(c, i) {
483
+ const inner = c.spaceEnd(i + 1);
484
+ return compareToken(c, inner) ?? boolToken(c, inner) ?? (c.text[i + 1] === "[" ? metaToken(c, i) : null);
485
+ }
486
+ /**
487
+ * `[a]` or `[a op value]`.
488
+ * @param c - the cursor
489
+ * @param inner - the position after `[` and its whitespace
490
+ * @returns the token, or null
491
+ */
492
+ function compareToken(c, inner) {
493
+ const t = c.text;
494
+ const v = c.name(inner, true);
495
+ if (v === null) {
496
+ return null;
497
+ }
498
+ const field = cleanMeta(v.raw);
499
+ const afterName = c.spaceEnd(v.end);
500
+ if (t[afterName] === "]") {
501
+ return checkToken(afterName + 1, { type: "exist", field });
502
+ }
503
+ const op = c.op(afterName);
504
+ if (op === null) {
505
+ return null;
506
+ }
507
+ const at = c.spaceEnd(op.end);
508
+ const quoted = t[at] === '"' || t[at] === "'";
509
+ const end = (quoted ? c.stringEnds(at) : c.numberEnds(at)).find((x) => t[c.spaceEnd(x)] === "]");
510
+ if (end === undefined) {
511
+ return null;
512
+ }
513
+ const literal = t.slice(at, end);
514
+ const value = quoted ? literal.slice(1, -1) : Number.parseFloat(literal);
515
+ const { op: base, not, ci } = splitOp(op.text);
516
+ return checkToken(c.spaceEnd(end) + 1, { type: "compare", field, op: base, not, ci, value });
517
+ }
518
+ /**
519
+ * `[?a]`, `[!a]` or `[^a]`.
520
+ * @param c - the cursor
521
+ * @param inner - the position after `[` and its whitespace
522
+ * @returns the token, or null
523
+ */
524
+ function boolToken(c, inner) {
525
+ const t = c.text;
526
+ const flag = t[inner];
527
+ if (flag !== "?" && flag !== "!" && flag !== "^") {
528
+ return null;
529
+ }
530
+ const n = c.name(c.spaceEnd(inner + 1), true);
531
+ const close = n === null ? -1 : c.spaceEnd(n.end);
532
+ if (n === null || t[close] !== "]") {
533
+ return null;
534
+ }
535
+ return checkToken(close + 1, { type: "bool", field: cleanMeta(n.raw), op: flag });
536
+ }
537
+ /**
538
+ * `[[degree op n]]`.
539
+ * @param c - the cursor
540
+ * @param i - the position of the first `[`
541
+ * @returns the token, or null
542
+ */
543
+ function metaToken(c, i) {
544
+ const t = c.text;
545
+ const at = c.spaceEnd(i + 2);
546
+ const field = META_FIELDS.find((f) => t.startsWith(f, at));
547
+ const op = field === undefined ? null : c.op(c.spaceEnd(at + field.length));
548
+ if (field === undefined || op === null) {
549
+ return null;
550
+ }
551
+ const numAt = c.spaceEnd(op.end);
552
+ const end = c.numberEnds(numAt).find((x) => {
553
+ const close = c.spaceEnd(x);
554
+ return t[close] === "]" && t[close + 1] === "]";
555
+ });
556
+ if (end === undefined) {
557
+ return null;
558
+ }
559
+ const value = Number.parseFloat(t.slice(numAt, end));
560
+ const { op: base, not, ci } = splitOp(op.text);
561
+ return checkToken(c.spaceEnd(end) + 2, { type: "meta", field, op: base, not, ci, value });
562
+ }
563
+ /**
564
+ * Whether a selector is blank: white space only.
565
+ * @param text - the selector
566
+ * @returns true when blank
567
+ */
568
+ function isBlank(text) {
569
+ return /^\s*$/.test(text.length > 1024 ? text.slice(0, 1024) : text) && text.trim() === "";
570
+ }
571
+ /**
572
+ * Parses a selector the way Cytoscape.js does.
573
+ * @param text - the selector
574
+ * @returns the queries and whether Cytoscape.js rejects the selector
575
+ */
576
+ export function parseCyjsSelector(text) {
577
+ // a missing or blank selector matches nothing
578
+ if (typeof text !== "string" || isBlank(text)) {
579
+ return { queries: [], invalid: false };
580
+ }
581
+ if (text.length > MAX_SELECTOR_LENGTH) {
582
+ return { queries: [], invalid: true };
583
+ }
584
+ const c = new Cursor(text);
585
+ const first = { checks: [] };
586
+ const b = { queries: [first], subject: null, edgeCount: 0, compoundCount: 0, counts: [] };
587
+ let current = first;
588
+ c.pos = c.spaceEnd(0);
589
+ for (;;) {
590
+ const tok = nextToken(c);
591
+ if (tok === null) {
592
+ return { queries: b.queries, invalid: true };
593
+ }
594
+ const next = tok.fill(b, current);
595
+ if (next === false) {
596
+ return { queries: b.queries, invalid: true };
597
+ }
598
+ if (next !== null) {
599
+ current = next;
600
+ }
601
+ c.pos = tok.end;
602
+ if (c.spaceEnd(c.pos) >= text.length) {
603
+ break;
604
+ }
605
+ }
606
+ b.counts.push({ edgeCount: b.edgeCount, compoundCount: b.compoundCount, subject: b.subject });
607
+ // a query may hold one edge or compound relation, not both and not two edges
608
+ const invalid = b.counts.some((k) => (k.compoundCount > 0 && k.edgeCount > 0) || k.edgeCount > 1);
609
+ return { queries: b.queries, invalid };
610
+ }
611
+ //# sourceMappingURL=selector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selector.js","sourceRoot":"","sources":["../../../../src/styles/cyjs/selector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAyHH,mDAAmD;AACnD,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC;IAC7C,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,QAAQ;IACR,UAAU;IACV,SAAS;IACT,QAAQ;IACR,aAAa;IACb,SAAS;IACT,MAAM;IACN,SAAS;IACT,QAAQ;IACR,WAAW;IACX,aAAa;IACb,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,WAAW;IACX,OAAO;IACP,QAAQ;IACR,WAAW;IACX,UAAU;IACV,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,eAAe;IACf,kBAAkB;CACrB,CAAC,CAAC;AAEH,iGAAiG;AACjG,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,CAAC;AAEpC,gDAAgD;AAChD,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,gCAAgC,CAAC,CAAC;AACvD,oFAAoF;AACpF,MAAM,QAAQ,GAAsB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxF,MAAM,WAAW,GAAqD,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AAE1G;;;;GAIG;AACH,SAAS,MAAM,CAAC,CAAqB;IACjC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,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,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QACjD,CAAC;QACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAChB,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;QACD,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;QAChB,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACnC,MAAM;QACV,CAAC;IACL,CAAC;IACD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9F,6EAA6E;IAC7E,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAClG,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * A Cytoscape.js stylesheet written as text (`node { background-color: red; } edge[w > 2] { width: 4 }`), read the
3
+ * way Cytoscape.js 3.34's `appendFromString` reads it, in linear passes instead of its backtracking patterns:
4
+ *
5
+ * - comments `/* ... *\/` holding at least one character are removed first;
6
+ * - each block is the text before the first `{` (the selector) and the text up to the next `}` (the properties);
7
+ * an empty block takes the `}` and runs to the next one;
8
+ * - a block whose selector Cytoscape.js rejects is skipped; text with no further block stops the reading;
9
+ * - each property is `name: value` ending at `;` or at the end of the block, on one line; a property name is
10
+ * taken as written (no camel case), and a block with a property that does not have this shape stops the reading.
11
+ */
12
+ /** One block of a stylesheet: its selector and its properties in order. */
13
+ export interface CyjsSheetEntry {
14
+ /** The selector as written. */
15
+ readonly selector: unknown;
16
+ /** `[name, value]` in order. */
17
+ readonly properties: readonly (readonly [string, unknown])[];
18
+ /** Whether property names are taken as written (text) or camel case is also read (JSON). */
19
+ readonly dashOnly: boolean;
20
+ }
21
+ /**
22
+ * Why reading a text stylesheet stopped early, or null.
23
+ * @category Styles
24
+ */
25
+ export type CyjsSheetStop = "NO_BLOCK" | "BAD_PROPERTY" | null;
26
+ /**
27
+ * Reads a text stylesheet into blocks the way Cytoscape.js does.
28
+ * @param text - the stylesheet
29
+ * @returns the blocks Cytoscape.js keeps, in order, and why reading stopped early (or null)
30
+ */
31
+ export declare function parseCyjsStylesheetText(text: string): {
32
+ /** The blocks Cytoscape.js keeps, in order. */
33
+ entries: CyjsSheetEntry[];
34
+ /** Why reading stopped early, or null. */
35
+ stop: CyjsSheetStop;
36
+ };
37
+ //# sourceMappingURL=stylesheet-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stylesheet-text.d.ts","sourceRoot":"","sources":["../../../../src/styles/cyjs/stylesheet-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC3B,+BAA+B;IAC/B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,gCAAgC;IAChC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC7D,4FAA4F;IAC5F,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,cAAc,GAAG,IAAI,CAAC;AAsH/D;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG;IACnD,+CAA+C;IAC/C,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,0CAA0C;IAC1C,IAAI,EAAE,aAAa,CAAC;CACvB,CAqCA"}