@graphty/graph-io 0.3.18 → 0.3.20

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 (235) hide show
  1. package/README.md +80 -2
  2. package/dist/chunks/{escape-D-gZWO26.js → escape-B-tkk_Cl.js} +74 -16
  3. package/dist/chunks/escape-B-tkk_Cl.js.map +1 -0
  4. package/dist/chunks/{writer-GAdltGmC.js → export-Bh60Dv-n.js} +7 -252
  5. package/dist/chunks/export-Bh60Dv-n.js.map +1 -0
  6. package/dist/chunks/exporter-BGrsWamJ.js +736 -0
  7. package/dist/chunks/exporter-BGrsWamJ.js.map +1 -0
  8. package/dist/chunks/exporter-DIeGJXAZ.js +834 -0
  9. package/dist/chunks/exporter-DIeGJXAZ.js.map +1 -0
  10. package/dist/chunks/{importer-Br_QeAeE.js → importer-BWY2FFc5.js} +28 -6
  11. package/dist/chunks/importer-BWY2FFc5.js.map +1 -0
  12. package/dist/chunks/importer-BaQpCEcJ.js +2194 -0
  13. package/dist/chunks/importer-BaQpCEcJ.js.map +1 -0
  14. package/dist/chunks/importer-DD-xv9_Y.js +1471 -0
  15. package/dist/chunks/importer-DD-xv9_Y.js.map +1 -0
  16. package/dist/chunks/{importer-aNJfe0qu.js → importer-DEcKhsmQ.js} +2 -2
  17. package/dist/chunks/{importer-aNJfe0qu.js.map → importer-DEcKhsmQ.js.map} +1 -1
  18. package/dist/chunks/{importer-DHagxvDD.js → importer-DIrbbnAf.js} +6 -4
  19. package/dist/chunks/{importer-DHagxvDD.js.map → importer-DIrbbnAf.js.map} +1 -1
  20. package/dist/chunks/importer-D_e7e7LX.js +3055 -0
  21. package/dist/chunks/importer-D_e7e7LX.js.map +1 -0
  22. package/dist/chunks/{importer-Du5crN9l.js → importer-Wv4C4gaF.js} +278 -82
  23. package/dist/chunks/importer-Wv4C4gaF.js.map +1 -0
  24. package/dist/chunks/importer-vi3bSdtw.js +1713 -0
  25. package/dist/chunks/importer-vi3bSdtw.js.map +1 -0
  26. package/dist/chunks/{importer-d0uQxFp6.js → importer-zGLo8Dg_.js} +6 -4
  27. package/dist/chunks/{importer-d0uQxFp6.js.map → importer-zGLo8Dg_.js.map} +1 -1
  28. package/dist/chunks/json-elements-DDS8N2Dd.js +779 -0
  29. package/dist/chunks/json-elements-DDS8N2Dd.js.map +1 -0
  30. package/dist/chunks/{records-Bk9jgodz.js → records-dbRkxwaq.js} +2 -2
  31. package/dist/chunks/{records-Bk9jgodz.js.map → records-dbRkxwaq.js.map} +1 -1
  32. package/dist/chunks/{report-BOk0p5y8.js → report-B1z4WT9e.js} +143 -111
  33. package/dist/chunks/{report-BOk0p5y8.js.map → report-B1z4WT9e.js.map} +1 -1
  34. package/dist/chunks/weights-Dzba96G3.js +176 -0
  35. package/dist/chunks/weights-Dzba96G3.js.map +1 -0
  36. package/dist/chunks/writer-C7flM-Ih.js +77 -0
  37. package/dist/chunks/writer-C7flM-Ih.js.map +1 -0
  38. package/dist/csv.js +6 -4
  39. package/dist/csv.js.map +1 -1
  40. package/dist/cx.d.ts +1 -0
  41. package/dist/cx.js +6 -0
  42. package/dist/cx.js.map +1 -0
  43. package/dist/cx2.d.ts +1 -0
  44. package/dist/cx2.js +10 -0
  45. package/dist/cx2.js.map +1 -0
  46. package/dist/cys.d.ts +1 -0
  47. package/dist/cys.js +6 -0
  48. package/dist/cys.js.map +1 -0
  49. package/dist/dot.js +1 -1
  50. package/dist/gexf.js +16 -4
  51. package/dist/gexf.js.map +1 -1
  52. package/dist/gml.js +13 -14
  53. package/dist/gml.js.map +1 -1
  54. package/dist/graph-io.js +302 -399
  55. package/dist/graph-io.js.map +1 -1
  56. package/dist/graphml.js +1 -1
  57. package/dist/json.js +1 -1
  58. package/dist/neo4j.js +6 -4
  59. package/dist/neo4j.js.map +1 -1
  60. package/dist/obo.js +1 -1
  61. package/dist/pajek.js +1 -1
  62. package/dist/src/common/cell-budget.d.ts +84 -0
  63. package/dist/src/common/cell-budget.d.ts.map +1 -0
  64. package/dist/src/common/cell-budget.js +138 -0
  65. package/dist/src/common/cell-budget.js.map +1 -0
  66. package/dist/src/common/input.d.ts +10 -0
  67. package/dist/src/common/input.d.ts.map +1 -1
  68. package/dist/src/common/input.js +39 -0
  69. package/dist/src/common/input.js.map +1 -1
  70. package/dist/src/common/json-elements.d.ts +286 -0
  71. package/dist/src/common/json-elements.d.ts.map +1 -0
  72. package/dist/src/common/json-elements.js +926 -0
  73. package/dist/src/common/json-elements.js.map +1 -0
  74. package/dist/src/common/options.d.ts +6 -0
  75. package/dist/src/common/options.d.ts.map +1 -1
  76. package/dist/src/common/options.js +1 -1
  77. package/dist/src/common/options.js.map +1 -1
  78. package/dist/src/common/xml.d.ts +37 -3
  79. package/dist/src/common/xml.d.ts.map +1 -1
  80. package/dist/src/common/xml.js +86 -6
  81. package/dist/src/common/xml.js.map +1 -1
  82. package/dist/src/common/zip.d.ts +92 -0
  83. package/dist/src/common/zip.d.ts.map +1 -0
  84. package/dist/src/common/zip.js +399 -0
  85. package/dist/src/common/zip.js.map +1 -0
  86. package/dist/src/formats/cx/importer.d.ts +133 -0
  87. package/dist/src/formats/cx/importer.d.ts.map +1 -0
  88. package/dist/src/formats/cx/importer.js +2220 -0
  89. package/dist/src/formats/cx/importer.js.map +1 -0
  90. package/dist/src/formats/cx/index.d.ts +7 -0
  91. package/dist/src/formats/cx/index.d.ts.map +1 -0
  92. package/dist/src/formats/cx/index.js +7 -0
  93. package/dist/src/formats/cx/index.js.map +1 -0
  94. package/dist/src/formats/cx2/exporter.d.ts +59 -0
  95. package/dist/src/formats/cx2/exporter.d.ts.map +1 -0
  96. package/dist/src/formats/cx2/exporter.js +864 -0
  97. package/dist/src/formats/cx2/exporter.js.map +1 -0
  98. package/dist/src/formats/cx2/importer.d.ts +169 -0
  99. package/dist/src/formats/cx2/importer.d.ts.map +1 -0
  100. package/dist/src/formats/cx2/importer.js +1652 -0
  101. package/dist/src/formats/cx2/importer.js.map +1 -0
  102. package/dist/src/formats/cx2/index.d.ts +7 -0
  103. package/dist/src/formats/cx2/index.d.ts.map +1 -0
  104. package/dist/src/formats/cx2/index.js +7 -0
  105. package/dist/src/formats/cx2/index.js.map +1 -0
  106. package/dist/src/formats/cys/constants.d.ts +68 -0
  107. package/dist/src/formats/cys/constants.d.ts.map +1 -0
  108. package/dist/src/formats/cys/constants.js +76 -0
  109. package/dist/src/formats/cys/constants.js.map +1 -0
  110. package/dist/src/formats/cys/importer.d.ts +38 -0
  111. package/dist/src/formats/cys/importer.d.ts.map +1 -0
  112. package/dist/src/formats/cys/importer.js +830 -0
  113. package/dist/src/formats/cys/importer.js.map +1 -0
  114. package/dist/src/formats/cys/index.d.ts +7 -0
  115. package/dist/src/formats/cys/index.d.ts.map +1 -0
  116. package/dist/src/formats/cys/index.js +7 -0
  117. package/dist/src/formats/cys/index.js.map +1 -0
  118. package/dist/src/formats/cys/session.d.ts +132 -0
  119. package/dist/src/formats/cys/session.d.ts.map +1 -0
  120. package/dist/src/formats/cys/session.js +315 -0
  121. package/dist/src/formats/cys/session.js.map +1 -0
  122. package/dist/src/formats/cys/tables.d.ts +90 -0
  123. package/dist/src/formats/cys/tables.d.ts.map +1 -0
  124. package/dist/src/formats/cys/tables.js +293 -0
  125. package/dist/src/formats/cys/tables.js.map +1 -0
  126. package/dist/src/formats/dot/exporter.d.ts +2 -0
  127. package/dist/src/formats/dot/exporter.d.ts.map +1 -1
  128. package/dist/src/formats/dot/exporter.js +12 -0
  129. package/dist/src/formats/dot/exporter.js.map +1 -1
  130. package/dist/src/formats/dot/importer.js +6 -2
  131. package/dist/src/formats/dot/importer.js.map +1 -1
  132. package/dist/src/formats/gexf/exporter.d.ts +2 -0
  133. package/dist/src/formats/gexf/exporter.d.ts.map +1 -1
  134. package/dist/src/formats/gexf/exporter.js +6 -0
  135. package/dist/src/formats/gexf/exporter.js.map +1 -1
  136. package/dist/src/formats/gexf/importer.d.ts +0 -2
  137. package/dist/src/formats/gexf/importer.d.ts.map +1 -1
  138. package/dist/src/formats/gexf/importer.js +1 -3
  139. package/dist/src/formats/gexf/importer.js.map +1 -1
  140. package/dist/src/formats/gexf/index.d.ts +1 -1
  141. package/dist/src/formats/gexf/index.js +2 -2
  142. package/dist/src/formats/gexf/index.js.map +1 -1
  143. package/dist/src/formats/gml/exporter.d.ts +0 -8
  144. package/dist/src/formats/gml/exporter.d.ts.map +1 -1
  145. package/dist/src/formats/gml/exporter.js +8 -18
  146. package/dist/src/formats/gml/exporter.js.map +1 -1
  147. package/dist/src/formats/json/importer.d.ts.map +1 -1
  148. package/dist/src/formats/json/importer.js +6 -104
  149. package/dist/src/formats/json/importer.js.map +1 -1
  150. package/dist/src/formats/xgmml/columns.d.ts +152 -0
  151. package/dist/src/formats/xgmml/columns.d.ts.map +1 -0
  152. package/dist/src/formats/xgmml/columns.js +593 -0
  153. package/dist/src/formats/xgmml/columns.js.map +1 -0
  154. package/dist/src/formats/xgmml/constants.d.ts +196 -0
  155. package/dist/src/formats/xgmml/constants.d.ts.map +1 -0
  156. package/dist/src/formats/xgmml/constants.js +197 -0
  157. package/dist/src/formats/xgmml/constants.js.map +1 -0
  158. package/dist/src/formats/xgmml/document.d.ts +361 -0
  159. package/dist/src/formats/xgmml/document.d.ts.map +1 -0
  160. package/dist/src/formats/xgmml/document.js +695 -0
  161. package/dist/src/formats/xgmml/document.js.map +1 -0
  162. package/dist/src/formats/xgmml/emit.d.ts +341 -0
  163. package/dist/src/formats/xgmml/emit.d.ts.map +1 -0
  164. package/dist/src/formats/xgmml/emit.js +1275 -0
  165. package/dist/src/formats/xgmml/emit.js.map +1 -0
  166. package/dist/src/formats/xgmml/exporter.d.ts +24 -0
  167. package/dist/src/formats/xgmml/exporter.d.ts.map +1 -0
  168. package/dist/src/formats/xgmml/exporter.js +999 -0
  169. package/dist/src/formats/xgmml/exporter.js.map +1 -0
  170. package/dist/src/formats/xgmml/importer.d.ts +58 -0
  171. package/dist/src/formats/xgmml/importer.d.ts.map +1 -0
  172. package/dist/src/formats/xgmml/importer.js +360 -0
  173. package/dist/src/formats/xgmml/importer.js.map +1 -0
  174. package/dist/src/formats/xgmml/index.d.ts +8 -0
  175. package/dist/src/formats/xgmml/index.d.ts.map +1 -0
  176. package/dist/src/formats/xgmml/index.js +8 -0
  177. package/dist/src/formats/xgmml/index.js.map +1 -0
  178. package/dist/src/formats/xgmml/values.d.ts +60 -0
  179. package/dist/src/formats/xgmml/values.d.ts.map +1 -0
  180. package/dist/src/formats/xgmml/values.js +148 -0
  181. package/dist/src/formats/xgmml/values.js.map +1 -0
  182. package/dist/src/index.d.ts +4 -0
  183. package/dist/src/index.d.ts.map +1 -1
  184. package/dist/src/index.js +4 -0
  185. package/dist/src/index.js.map +1 -1
  186. package/dist/src/registry.d.ts +7 -0
  187. package/dist/src/registry.d.ts.map +1 -1
  188. package/dist/src/registry.js +30 -10
  189. package/dist/src/registry.js.map +1 -1
  190. package/dist/src/sniff.d.ts +1 -1
  191. package/dist/src/sniff.d.ts.map +1 -1
  192. package/dist/src/sniff.js +4 -0
  193. package/dist/src/sniff.js.map +1 -1
  194. package/dist/xgmml.d.ts +1 -0
  195. package/dist/xgmml.js +9 -0
  196. package/dist/xgmml.js.map +1 -0
  197. package/package.json +25 -2
  198. package/src/common/cell-budget.ts +170 -0
  199. package/src/common/input.ts +40 -0
  200. package/src/common/json-elements.ts +1147 -0
  201. package/src/common/options.ts +1 -1
  202. package/src/common/xml.ts +127 -6
  203. package/src/common/zip.ts +472 -0
  204. package/src/formats/cx/importer.ts +2733 -0
  205. package/src/formats/cx/index.ts +7 -0
  206. package/src/formats/cx2/exporter.ts +1036 -0
  207. package/src/formats/cx2/importer.ts +2187 -0
  208. package/src/formats/cx2/index.ts +7 -0
  209. package/src/formats/cys/constants.ts +99 -0
  210. package/src/formats/cys/importer.ts +1100 -0
  211. package/src/formats/cys/index.ts +7 -0
  212. package/src/formats/cys/session.ts +428 -0
  213. package/src/formats/cys/tables.ts +400 -0
  214. package/src/formats/dot/exporter.ts +17 -0
  215. package/src/formats/dot/importer.ts +6 -2
  216. package/src/formats/gexf/exporter.ts +11 -0
  217. package/src/formats/gexf/importer.ts +1 -2
  218. package/src/formats/gexf/index.ts +1 -1
  219. package/src/formats/gml/exporter.ts +8 -19
  220. package/src/formats/json/importer.ts +6 -105
  221. package/src/formats/xgmml/columns.ts +747 -0
  222. package/src/formats/xgmml/constants.ts +265 -0
  223. package/src/formats/xgmml/document.ts +975 -0
  224. package/src/formats/xgmml/emit.ts +1563 -0
  225. package/src/formats/xgmml/exporter.ts +1215 -0
  226. package/src/formats/xgmml/importer.ts +491 -0
  227. package/src/formats/xgmml/index.ts +8 -0
  228. package/src/formats/xgmml/values.ts +183 -0
  229. package/src/index.ts +19 -0
  230. package/src/registry.ts +46 -15
  231. package/src/sniff.ts +18 -1
  232. package/dist/chunks/escape-D-gZWO26.js.map +0 -1
  233. package/dist/chunks/importer-Br_QeAeE.js.map +0 -1
  234. package/dist/chunks/importer-Du5crN9l.js.map +0 -1
  235. package/dist/chunks/writer-GAdltGmC.js.map +0 -1
package/dist/cx.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/formats/cx/index.js";
package/dist/cx.js ADDED
@@ -0,0 +1,6 @@
1
+ import { C, c } from "./chunks/importer-BaQpCEcJ.js";
2
+ export {
3
+ C as CX_ISSUE,
4
+ c as cxImporter
5
+ };
6
+ //# sourceMappingURL=cx.js.map
package/dist/cx.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cx.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/cx2.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/formats/cx2/index.js";
package/dist/cx2.js ADDED
@@ -0,0 +1,10 @@
1
+ import { C, a, c } from "./chunks/exporter-BGrsWamJ.js";
2
+ import { C as C2, c as c2 } from "./chunks/importer-vi3bSdtw.js";
3
+ export {
4
+ C as CX2_CAPABILITIES,
5
+ C2 as CX2_ISSUE,
6
+ a as CX2_LOSS,
7
+ c as cx2Exporter,
8
+ c2 as cx2Importer
9
+ };
10
+ //# sourceMappingURL=cx2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cx2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/cys.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/formats/cys/index.js";
package/dist/cys.js ADDED
@@ -0,0 +1,6 @@
1
+ import { C, c } from "./chunks/importer-DD-xv9_Y.js";
2
+ export {
3
+ C as CYS_ISSUE,
4
+ c as cysImporter
5
+ };
6
+ //# sourceMappingURL=cys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cys.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/dot.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, a, d, b } from "./chunks/importer-Br_QeAeE.js";
1
+ import { D, a, d, b } from "./chunks/importer-BWY2FFc5.js";
2
2
  export {
3
3
  D as DOT_ISSUE,
4
4
  a as DOT_LOSS,
package/dist/gexf.js CHANGED
@@ -1,7 +1,9 @@
1
- import { aF as TIME_TEXT_ROLE, aG as TIME_TEXT_SUFFIX, aD as resolveImportOptions, I as ImportReportBuilder, aA as reportSinkOptions, aB as reportUnusedOptions, t as textChunks, am as XML_SYNTAX_CODE, a as throwIfAborted, J as IdCoercer, q as DirectionResolver, a7 as STRAY_TEXT_CODE, T as NO_GRAPH_CODE, g as COUNT_HINT_CODE, aH as declareAttribute, as as declareResolved, N as MISSING_ID_CODE, p as DUPLICATE_NODE_CODE, ah as UNKNOWN_PARENT_CODE, M as MISSING_ENDPOINT_CODE, n as DUPLICATE_EDGE_ID_CODE, aI as parseDeclaredTemporal, ar as declareCompanion, aJ as parseDeclaredValue, aK as losesPrecision, _ as PRECISION_CODE, aL as parseTimeText, aM as splitListText, af as UNKNOWN_ELEMENT_CODE, v as ID_MERGED_CODE, aN as timeTextCompanion, aO as parseDecimalText, ay as pairFolding, aC as resolveExportOptions, aP as formatTimeValue, aQ as mapDeclaredType, aR as joinListText, aS as formatTemporal, aw as isCanonicalIntegerText, O as MIXED_DIRECTION_CODE, k as DIRECTION_FORCED_CODE, l as DIRECTION_REFUSED_CODE, a3 as SINK_OPTION_CODE, V as OPTION_IGNORED_CODE, a2 as ROLE_TAKEN_CODE, C as COLUMN_RENAMED_CODE, d as BAD_OPTIONS_CODE, c as BAD_DEFAULT_CODE, ae as UNKNOWN_ATTR_TYPE_CODE, ag as UNKNOWN_ENCODING_CODE, s as ENCODING_FALLBACK_CODE, z as INVALID_ENCODING_CODE, F as INVALID_UTF8_CODE } from "./chunks/report-BOk0p5y8.js";
1
+ import { aI as TIME_TEXT_ROLE, aJ as TIME_TEXT_SUFFIX, v as resolveImportOptions, w as ImportReportBuilder, F as reportSinkOptions, z as reportUnusedOptions, x as textChunks, aw as XML_SYNTAX_CODE, y as throwIfAborted, K as IdCoercer, J as DirectionResolver, au as STRAY_TEXT_CODE, N as NO_GRAPH_CODE, ai as COUNT_HINT_CODE, i as DUPLICATE_ATTRIBUTE_CODE, aK as declareAttribute, L as declareResolved, f as MISSING_ID_CODE, d as DUPLICATE_NODE_CODE, U as UNKNOWN_PARENT_CODE, e as MISSING_ENDPOINT_CODE, c as DUPLICATE_EDGE_ID_CODE, aL as parseDeclaredTemporal, aA as declareCompanion, aM as parseDeclaredValue, aN as losesPrecision, P as PRECISION_CODE, aO as parseTimeText, aP as splitListText, Y as UNKNOWN_ELEMENT_CODE, I as ID_MERGED_CODE, aQ as timeTextCompanion, aH as parseDecimalText, X as pairFolding, V as resolveExportOptions, aR as formatTimeValue, aS as mapDeclaredType, aT as joinListText, aU as formatTemporal, aE as isCanonicalIntegerText, af as MIXED_DIRECTION_CODE, D as DIRECTION_FORCED_CODE, a as DIRECTION_REFUSED_CODE, S as SINK_OPTION_CODE, O as OPTION_IGNORED_CODE, R as ROLE_TAKEN_CODE, C as COLUMN_RENAMED_CODE, ah as BAD_OPTIONS_CODE, Z as BAD_DEFAULT_CODE, k as UNKNOWN_ATTR_TYPE_CODE, q as UNKNOWN_ENCODING_CODE, E as ENCODING_FALLBACK_CODE, r as INVALID_ENCODING_CODE, s as INVALID_UTF8_CODE } from "./chunks/report-B1z4WT9e.js";
2
2
  import { GraphFormatError, INVALID_INDEX, MAX_COUNT } from "@graphty/graph-format";
3
- import { m as isWeightField, p as parseWeightText, c as capabilities, L as LOSS, n as joinText, e as encodeChunks, s as sanitizeIds, f as explicitWeights, a as checkCapabilities, h as formatF32, i as formatF64, k as formatInteger } from "./chunks/writer-GAdltGmC.js";
4
- import { t as tokenizeXml, d as xmlDeclaredEncoding, X as XmlSyntaxError, l as localName, e as isWhitespace, x as xmlIllegalTextNotes, f as escapeXmlText, g as escapeXmlAttribute } from "./chunks/escape-D-gZWO26.js";
3
+ import { i as isWeightField, p as parseWeightText, e as explicitWeights, f as formatF32, a as formatF64, d as formatInteger } from "./chunks/weights-Dzba96G3.js";
4
+ import { t as tokenizeXml, f as xmlDeclaredEncoding, X as XmlSyntaxError, l as localName, g as isWhitespace, x as xmlIllegalTextNotes, a as escapeXmlText, e as escapeXmlAttribute } from "./chunks/escape-B-tkk_Cl.js";
5
+ import { c as capabilities, L as LOSS, s as sanitizeIds, a as checkCapabilities } from "./chunks/export-Bh60Dv-n.js";
6
+ import { j as joinText, e as encodeChunks } from "./chunks/writer-C7flM-Ih.js";
5
7
  const GEXF_FORMAT = "gexf";
6
8
  const GEXF_NAMESPACES = {
7
9
  "1.2": { gexf: "http://www.gexf.net/1.2draft", viz: "http://www.gexf.net/1.2draft/viz" },
@@ -275,7 +277,6 @@ const EDGE_TYPE_CODE = "E_GEXF_EDGE_TYPE";
275
277
  const ATTRIBUTES_CLASS_CODE = "E_GEXF_ATTRIBUTES_CLASS";
276
278
  const ATTRIBUTE_ID_CODE = "E_GEXF_ATTRIBUTE_ID";
277
279
  const HEADER_VALUE_CODE = "W_GEXF_HEADER_VALUE";
278
- const DUPLICATE_ATTRIBUTE_CODE = "W_GEXF_DUPLICATE_ATTRIBUTE";
279
280
  const ATTRIBUTE_TYPE_CODE = "W_GEXF_ATTRIBUTE_TYPE";
280
281
  const UNKNOWN_ATTRIBUTE_CODE = "W_GEXF_UNKNOWN_ATTRIBUTE";
281
282
  const ATTVALUE_SHAPE_CODE = "W_GEXF_ATTVALUE_SHAPE";
@@ -2219,6 +2220,8 @@ const GEXF_LOSS = Object.freeze({
2219
2220
  DECLARED_TYPE: "W_DECLARED_TYPE",
2220
2221
  /** A node id whose text reads back as the other type under the canonical rule (design section 4.1): a non-integer number, a string of integer text. */
2221
2222
  ID_TEXT_TYPE: LOSS.ID_TEXT_TYPE,
2223
+ /** A numeric edge id column: GEXF edge ids read back as strings. */
2224
+ EDGE_ID_TEXT: "W_GEXF_EDGE_ID_TEXT",
2222
2225
  /** A viz role column (position, color, size, thickness) that is not f32; the importer reads viz values as f32. */
2223
2226
  VIZ_DTYPE: "W_GEXF_VIZ_DTYPE",
2224
2227
  /** A plain `weight` edge column reads back as THE weight (the importer's weightFrom default). */
@@ -2303,6 +2306,15 @@ function planExport(snapshot, options) {
2303
2306
  typeChanges
2304
2307
  );
2305
2308
  }
2309
+ const edgeIds = snapshot.edges.byRole("id");
2310
+ if (edgeIds !== null && edgeIds.dtype !== "string" && edgeIds.dtype !== "dict") {
2311
+ note(
2312
+ GEXF_LOSS.EDGE_ID_TEXT,
2313
+ `edge id column "${edgeIds.meta.name}" is ${edgeIds.dtype}; GEXF edge ids read back as strings`,
2314
+ edgeIds.meta.name,
2315
+ snapshot.edgeCount - edgeIds.nullCount
2316
+ );
2317
+ }
2306
2318
  const tables = collectTemporalTables(snapshot, version, note);
2307
2319
  const nodeRoles = collectRoles(snapshot.nodes, "node", note);
2308
2320
  const edgeRoles = collectRoles(snapshot.edges, "edge", note);