@graphty/graph-io 0.3.25 → 0.3.27
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.
- package/README.md +49 -414
- package/dist/chunks/children-CL3Cy0ez.js.map +1 -1
- package/dist/chunks/choose-DrXtu_96.js +56 -0
- package/dist/chunks/choose-DrXtu_96.js.map +1 -0
- package/dist/chunks/constants-ikG85dT8.js +231 -0
- package/dist/chunks/constants-ikG85dT8.js.map +1 -0
- package/dist/chunks/{escape-B-tkk_Cl.js → escape-D1HPTUrP.js} +390 -99
- package/dist/chunks/escape-D1HPTUrP.js.map +1 -0
- package/dist/chunks/export-CHd4tQE2.js +4333 -0
- package/dist/chunks/export-CHd4tQE2.js.map +1 -0
- package/dist/chunks/{importer-eUREhBGj.js → exporter-D23CKNqF.js} +4969 -3201
- package/dist/chunks/exporter-D23CKNqF.js.map +1 -0
- package/dist/chunks/{exporter-DIeGJXAZ.js → exporter-DfWTgrti.js} +23 -21
- package/dist/chunks/exporter-DfWTgrti.js.map +1 -0
- package/dist/chunks/exporter-DhtW6FxK.js +3465 -0
- package/dist/chunks/exporter-DhtW6FxK.js.map +1 -0
- package/dist/chunks/{exporter-BGrsWamJ.js → exporter-IHv4nkCm.js} +38 -229
- package/dist/chunks/exporter-IHv4nkCm.js.map +1 -0
- package/dist/chunks/{importer-BWY2FFc5.js → importer-B1wmPQjr.js} +255 -77
- package/dist/chunks/importer-B1wmPQjr.js.map +1 -0
- package/dist/chunks/{importer-D_e7e7LX.js → importer-B2W_58pz.js} +399 -146
- package/dist/chunks/importer-B2W_58pz.js.map +1 -0
- package/dist/chunks/importer-BSALvkui.js +2811 -0
- package/dist/chunks/importer-BSALvkui.js.map +1 -0
- package/dist/chunks/{importer-vi3bSdtw.js → importer-BVRE--Un.js} +510 -77
- package/dist/chunks/importer-BVRE--Un.js.map +1 -0
- package/dist/chunks/{importer-DET1tg6s.js → importer-CIAzt-wo.js} +1689 -312
- package/dist/chunks/importer-CIAzt-wo.js.map +1 -0
- package/dist/chunks/{importer-DIrbbnAf.js → importer-DpEW5zeG.js} +585 -226
- package/dist/chunks/importer-DpEW5zeG.js.map +1 -0
- package/dist/chunks/{importer-zGLo8Dg_.js → importer-z_FL4VMb.js} +488 -161
- package/dist/chunks/importer-z_FL4VMb.js.map +1 -0
- package/dist/chunks/json-elements-BAmNBZok.js +1225 -0
- package/dist/chunks/json-elements-BAmNBZok.js.map +1 -0
- package/dist/chunks/ontology-export-Bab4eUA8.js +357 -0
- package/dist/chunks/ontology-export-Bab4eUA8.js.map +1 -0
- package/dist/chunks/{records-dbRkxwaq.js → records-CdlvL4RO.js} +298 -114
- package/dist/chunks/records-CdlvL4RO.js.map +1 -0
- package/dist/chunks/{text-Dr0Ifpag.js → text-DzXjAiTl.js} +29 -11
- package/dist/chunks/text-DzXjAiTl.js.map +1 -0
- package/dist/chunks/{writer-C7flM-Ih.js → writer-DxjgHwSe.js} +19 -1
- package/dist/chunks/writer-DxjgHwSe.js.map +1 -0
- package/dist/csv.js +952 -262
- package/dist/csv.js.map +1 -1
- package/dist/cx.js +6 -3
- package/dist/cx2.js +2 -2
- package/dist/cys.js +6 -3
- package/dist/dot.js +1 -1
- package/dist/gexf.js +554 -122
- package/dist/gexf.js.map +1 -1
- package/dist/gml.js +344 -87
- package/dist/gml.js.map +1 -1
- package/dist/graph-io.js +1105 -213
- package/dist/graph-io.js.map +1 -1
- package/dist/graphml.js +3 -2
- package/dist/graphml.js.map +1 -1
- package/dist/json.js +3 -2
- package/dist/neo4j.js +565 -158
- package/dist/neo4j.js.map +1 -1
- package/dist/obo.js +6 -3
- package/dist/pajek.js +1 -1
- package/dist/src/children.d.ts +18 -6
- package/dist/src/children.d.ts.map +1 -1
- package/dist/src/children.js +6 -3
- package/dist/src/children.js.map +1 -1
- package/dist/src/common/attributes.d.ts +29 -11
- package/dist/src/common/attributes.d.ts.map +1 -1
- package/dist/src/common/attributes.js +25 -7
- package/dist/src/common/attributes.js.map +1 -1
- package/dist/src/common/cell-budget.d.ts +9 -2
- package/dist/src/common/cell-budget.d.ts.map +1 -1
- package/dist/src/common/cell-budget.js +11 -3
- package/dist/src/common/cell-budget.js.map +1 -1
- package/dist/src/common/choose.d.ts +19 -0
- package/dist/src/common/choose.d.ts.map +1 -0
- package/dist/src/common/choose.js +72 -0
- package/dist/src/common/choose.js.map +1 -0
- package/dist/src/common/codes.d.ts +456 -66
- package/dist/src/common/codes.d.ts.map +1 -1
- package/dist/src/common/codes.js +458 -66
- package/dist/src/common/codes.js.map +1 -1
- package/dist/src/common/compare.d.ts +81 -0
- package/dist/src/common/compare.d.ts.map +1 -0
- package/dist/src/common/compare.js +394 -0
- package/dist/src/common/compare.js.map +1 -0
- package/dist/src/common/cx-export.d.ts +123 -0
- package/dist/src/common/cx-export.d.ts.map +1 -0
- package/dist/src/common/cx-export.js +334 -0
- package/dist/src/common/cx-export.js.map +1 -0
- package/dist/src/common/declared-types.d.ts +22 -2
- package/dist/src/common/declared-types.d.ts.map +1 -1
- package/dist/src/common/declared-types.js +21 -3
- package/dist/src/common/declared-types.js.map +1 -1
- package/dist/src/common/direction.d.ts +74 -50
- package/dist/src/common/direction.d.ts.map +1 -1
- package/dist/src/common/direction.js +47 -27
- package/dist/src/common/direction.js.map +1 -1
- package/dist/src/common/escape.d.ts +21 -9
- package/dist/src/common/escape.d.ts.map +1 -1
- package/dist/src/common/escape.js +39 -22
- package/dist/src/common/escape.js.map +1 -1
- package/dist/src/common/export.d.ts +144 -32
- package/dist/src/common/export.d.ts.map +1 -1
- package/dist/src/common/export.js +216 -42
- package/dist/src/common/export.js.map +1 -1
- package/dist/src/common/format.d.ts +23 -1
- package/dist/src/common/format.d.ts.map +1 -1
- package/dist/src/common/format.js +26 -1
- package/dist/src/common/format.js.map +1 -1
- package/dist/src/common/ids.d.ts +9 -2
- package/dist/src/common/ids.d.ts.map +1 -1
- package/dist/src/common/ids.js +6 -2
- package/dist/src/common/ids.js.map +1 -1
- package/dist/src/common/input.d.ts +122 -28
- package/dist/src/common/input.d.ts.map +1 -1
- package/dist/src/common/input.js +890 -124
- package/dist/src/common/input.js.map +1 -1
- package/dist/src/common/json-elements.d.ts +144 -20
- package/dist/src/common/json-elements.d.ts.map +1 -1
- package/dist/src/common/json-elements.js +869 -189
- package/dist/src/common/json-elements.js.map +1 -1
- package/dist/src/common/line-format.d.ts +90 -0
- package/dist/src/common/line-format.d.ts.map +1 -0
- package/dist/src/common/line-format.js +185 -0
- package/dist/src/common/line-format.js.map +1 -0
- package/dist/src/common/lists.d.ts +6 -1
- package/dist/src/common/lists.d.ts.map +1 -1
- package/dist/src/common/lists.js +3 -1
- package/dist/src/common/lists.js.map +1 -1
- package/dist/src/common/ontology-export.d.ts +167 -0
- package/dist/src/common/ontology-export.d.ts.map +1 -0
- package/dist/src/common/ontology-export.js +359 -0
- package/dist/src/common/ontology-export.js.map +1 -0
- package/dist/src/common/ontology.d.ts +25 -3
- package/dist/src/common/ontology.d.ts.map +1 -1
- package/dist/src/common/ontology.js +30 -9
- package/dist/src/common/ontology.js.map +1 -1
- package/dist/src/common/options.d.ts +62 -12
- package/dist/src/common/options.d.ts.map +1 -1
- package/dist/src/common/options.js +89 -11
- package/dist/src/common/options.js.map +1 -1
- package/dist/src/common/plural.d.ts +31 -0
- package/dist/src/common/plural.d.ts.map +1 -0
- package/dist/src/common/plural.js +46 -0
- package/dist/src/common/plural.js.map +1 -0
- package/dist/src/common/report.d.ts +72 -14
- package/dist/src/common/report.d.ts.map +1 -1
- package/dist/src/common/report.js +146 -22
- package/dist/src/common/report.js.map +1 -1
- package/dist/src/common/temporal.d.ts +22 -5
- package/dist/src/common/temporal.d.ts.map +1 -1
- package/dist/src/common/temporal.js +13 -2
- package/dist/src/common/temporal.js.map +1 -1
- package/dist/src/common/text.d.ts +39 -23
- package/dist/src/common/text.d.ts.map +1 -1
- package/dist/src/common/text.js +51 -21
- package/dist/src/common/text.js.map +1 -1
- package/dist/src/common/weights.d.ts +37 -4
- package/dist/src/common/weights.d.ts.map +1 -1
- package/dist/src/common/weights.js +61 -2
- package/dist/src/common/weights.js.map +1 -1
- package/dist/src/common/writer.d.ts +19 -3
- package/dist/src/common/writer.d.ts.map +1 -1
- package/dist/src/common/writer.js +30 -2
- package/dist/src/common/writer.js.map +1 -1
- package/dist/src/common/xml.d.ts +125 -9
- package/dist/src/common/xml.d.ts.map +1 -1
- package/dist/src/common/xml.js +402 -85
- package/dist/src/common/xml.js.map +1 -1
- package/dist/src/common/zip.d.ts +44 -4
- package/dist/src/common/zip.d.ts.map +1 -1
- package/dist/src/common/zip.js +134 -5
- package/dist/src/common/zip.js.map +1 -1
- package/dist/src/formats/csv/exporter.d.ts +80 -24
- package/dist/src/formats/csv/exporter.d.ts.map +1 -1
- package/dist/src/formats/csv/exporter.js +146 -33
- package/dist/src/formats/csv/exporter.js.map +1 -1
- package/dist/src/formats/csv/header.d.ts +38 -9
- package/dist/src/formats/csv/header.d.ts.map +1 -1
- package/dist/src/formats/csv/header.js +46 -10
- package/dist/src/formats/csv/header.js.map +1 -1
- package/dist/src/formats/csv/importer.d.ts +187 -37
- package/dist/src/formats/csv/importer.d.ts.map +1 -1
- package/dist/src/formats/csv/importer.js +835 -204
- package/dist/src/formats/csv/importer.js.map +1 -1
- package/dist/src/formats/csv/index.d.ts +100 -19
- package/dist/src/formats/csv/index.d.ts.map +1 -1
- package/dist/src/formats/csv/index.js +94 -21
- package/dist/src/formats/csv/index.js.map +1 -1
- package/dist/src/formats/csv/records.d.ts +95 -10
- package/dist/src/formats/csv/records.d.ts.map +1 -1
- package/dist/src/formats/csv/records.js +333 -122
- package/dist/src/formats/csv/records.js.map +1 -1
- package/dist/src/formats/csv/values.d.ts +1 -0
- package/dist/src/formats/csv/values.d.ts.map +1 -1
- package/dist/src/formats/csv/values.js +1 -0
- package/dist/src/formats/csv/values.js.map +1 -1
- package/dist/src/formats/cx/exporter.d.ts +102 -0
- package/dist/src/formats/cx/exporter.d.ts.map +1 -0
- package/dist/src/formats/cx/exporter.js +1217 -0
- package/dist/src/formats/cx/exporter.js.map +1 -0
- package/dist/src/formats/cx/importer.d.ts +79 -32
- package/dist/src/formats/cx/importer.d.ts.map +1 -1
- package/dist/src/formats/cx/importer.js +682 -287
- package/dist/src/formats/cx/importer.js.map +1 -1
- package/dist/src/formats/cx/index.d.ts +4 -3
- package/dist/src/formats/cx/index.d.ts.map +1 -1
- package/dist/src/formats/cx/index.js +4 -3
- package/dist/src/formats/cx/index.js.map +1 -1
- package/dist/src/formats/cx2/exporter.d.ts +29 -11
- package/dist/src/formats/cx2/exporter.d.ts.map +1 -1
- package/dist/src/formats/cx2/exporter.js +39 -268
- package/dist/src/formats/cx2/exporter.js.map +1 -1
- package/dist/src/formats/cx2/importer.d.ts +78 -28
- package/dist/src/formats/cx2/importer.d.ts.map +1 -1
- package/dist/src/formats/cx2/importer.js +227 -80
- package/dist/src/formats/cx2/importer.js.map +1 -1
- package/dist/src/formats/cx2/index.d.ts +2 -1
- package/dist/src/formats/cx2/index.d.ts.map +1 -1
- package/dist/src/formats/cx2/index.js +2 -1
- package/dist/src/formats/cx2/index.js.map +1 -1
- package/dist/src/formats/cys/constants.d.ts +66 -17
- package/dist/src/formats/cys/constants.d.ts.map +1 -1
- package/dist/src/formats/cys/constants.js +59 -18
- package/dist/src/formats/cys/constants.js.map +1 -1
- package/dist/src/formats/cys/exporter.d.ts +118 -0
- package/dist/src/formats/cys/exporter.d.ts.map +1 -0
- package/dist/src/formats/cys/exporter.js +1072 -0
- package/dist/src/formats/cys/exporter.js.map +1 -0
- package/dist/src/formats/cys/importer.d.ts +22 -8
- package/dist/src/formats/cys/importer.d.ts.map +1 -1
- package/dist/src/formats/cys/importer.js +510 -149
- package/dist/src/formats/cys/importer.js.map +1 -1
- package/dist/src/formats/cys/index.d.ts +4 -2
- package/dist/src/formats/cys/index.d.ts.map +1 -1
- package/dist/src/formats/cys/index.js +4 -2
- package/dist/src/formats/cys/index.js.map +1 -1
- package/dist/src/formats/cys/session.d.ts +46 -7
- package/dist/src/formats/cys/session.d.ts.map +1 -1
- package/dist/src/formats/cys/session.js +101 -27
- package/dist/src/formats/cys/session.js.map +1 -1
- package/dist/src/formats/cys/tables.d.ts +9 -2
- package/dist/src/formats/cys/tables.d.ts.map +1 -1
- package/dist/src/formats/cys/tables.js +29 -7
- package/dist/src/formats/cys/tables.js.map +1 -1
- package/dist/src/formats/dot/exporter.d.ts +42 -14
- package/dist/src/formats/dot/exporter.d.ts.map +1 -1
- package/dist/src/formats/dot/exporter.js +56 -29
- package/dist/src/formats/dot/exporter.js.map +1 -1
- package/dist/src/formats/dot/importer.d.ts +91 -29
- package/dist/src/formats/dot/importer.d.ts.map +1 -1
- package/dist/src/formats/dot/importer.js +190 -39
- package/dist/src/formats/dot/importer.js.map +1 -1
- package/dist/src/formats/dot/index.d.ts +2 -1
- package/dist/src/formats/dot/index.d.ts.map +1 -1
- package/dist/src/formats/dot/index.js +2 -1
- package/dist/src/formats/dot/index.js.map +1 -1
- package/dist/src/formats/dot/names.d.ts +44 -11
- package/dist/src/formats/dot/names.d.ts.map +1 -1
- package/dist/src/formats/dot/names.js +44 -11
- package/dist/src/formats/dot/names.js.map +1 -1
- package/dist/src/formats/dot/tokenizer.d.ts +9 -2
- package/dist/src/formats/dot/tokenizer.d.ts.map +1 -1
- package/dist/src/formats/dot/tokenizer.js +20 -5
- package/dist/src/formats/dot/tokenizer.js.map +1 -1
- package/dist/src/formats/gexf/exporter.d.ts +46 -15
- package/dist/src/formats/gexf/exporter.d.ts.map +1 -1
- package/dist/src/formats/gexf/exporter.js +45 -15
- package/dist/src/formats/gexf/exporter.js.map +1 -1
- package/dist/src/formats/gexf/importer.d.ts +87 -23
- package/dist/src/formats/gexf/importer.d.ts.map +1 -1
- package/dist/src/formats/gexf/importer.js +471 -90
- package/dist/src/formats/gexf/importer.js.map +1 -1
- package/dist/src/formats/gexf/index.d.ts +84 -21
- package/dist/src/formats/gexf/index.d.ts.map +1 -1
- package/dist/src/formats/gexf/index.js +80 -23
- package/dist/src/formats/gexf/index.js.map +1 -1
- package/dist/src/formats/gexf/schema.d.ts +67 -15
- package/dist/src/formats/gexf/schema.d.ts.map +1 -1
- package/dist/src/formats/gexf/schema.js +59 -13
- package/dist/src/formats/gexf/schema.js.map +1 -1
- package/dist/src/formats/gml/exporter.d.ts +69 -21
- package/dist/src/formats/gml/exporter.d.ts.map +1 -1
- package/dist/src/formats/gml/exporter.js +74 -29
- package/dist/src/formats/gml/exporter.js.map +1 -1
- package/dist/src/formats/gml/importer.d.ts +116 -25
- package/dist/src/formats/gml/importer.d.ts.map +1 -1
- package/dist/src/formats/gml/importer.js +290 -61
- package/dist/src/formats/gml/importer.js.map +1 -1
- package/dist/src/formats/gml/index.d.ts +87 -24
- package/dist/src/formats/gml/index.d.ts.map +1 -1
- package/dist/src/formats/gml/index.js +79 -26
- package/dist/src/formats/gml/index.js.map +1 -1
- package/dist/src/formats/gml/syntax.d.ts +67 -18
- package/dist/src/formats/gml/syntax.d.ts.map +1 -1
- package/dist/src/formats/gml/syntax.js +110 -28
- package/dist/src/formats/gml/syntax.js.map +1 -1
- package/dist/src/formats/graphml/constants.d.ts +174 -44
- package/dist/src/formats/graphml/constants.d.ts.map +1 -1
- package/dist/src/formats/graphml/constants.js +165 -44
- package/dist/src/formats/graphml/constants.js.map +1 -1
- package/dist/src/formats/graphml/exporter.d.ts +17 -9
- package/dist/src/formats/graphml/exporter.d.ts.map +1 -1
- package/dist/src/formats/graphml/exporter.js +33 -12
- package/dist/src/formats/graphml/exporter.js.map +1 -1
- package/dist/src/formats/graphml/importer.d.ts +19 -7
- package/dist/src/formats/graphml/importer.d.ts.map +1 -1
- package/dist/src/formats/graphml/importer.js +466 -39
- package/dist/src/formats/graphml/importer.js.map +1 -1
- package/dist/src/formats/graphml/index.d.ts +2 -1
- package/dist/src/formats/graphml/index.d.ts.map +1 -1
- package/dist/src/formats/graphml/index.js +2 -1
- package/dist/src/formats/graphml/index.js.map +1 -1
- package/dist/src/formats/graphml/tree.d.ts +6 -2
- package/dist/src/formats/graphml/tree.d.ts.map +1 -1
- package/dist/src/formats/graphml/tree.js +6 -2
- package/dist/src/formats/graphml/tree.js.map +1 -1
- package/dist/src/formats/graphml/yfiles.d.ts +8 -3
- package/dist/src/formats/graphml/yfiles.d.ts.map +1 -1
- package/dist/src/formats/graphml/yfiles.js +36 -15
- package/dist/src/formats/graphml/yfiles.js.map +1 -1
- package/dist/src/formats/json/dialect.d.ts +88 -24
- package/dist/src/formats/json/dialect.d.ts.map +1 -1
- package/dist/src/formats/json/dialect.js +109 -19
- package/dist/src/formats/json/dialect.js.map +1 -1
- package/dist/src/formats/json/exporter.d.ts +134 -22
- package/dist/src/formats/json/exporter.d.ts.map +1 -1
- package/dist/src/formats/json/exporter.js +135 -54
- package/dist/src/formats/json/exporter.js.map +1 -1
- package/dist/src/formats/json/importer.d.ts +173 -52
- package/dist/src/formats/json/importer.d.ts.map +1 -1
- package/dist/src/formats/json/importer.js +899 -220
- package/dist/src/formats/json/importer.js.map +1 -1
- package/dist/src/formats/json/index.d.ts +3 -2
- package/dist/src/formats/json/index.d.ts.map +1 -1
- package/dist/src/formats/json/index.js +3 -2
- package/dist/src/formats/json/index.js.map +1 -1
- package/dist/src/formats/json/obographs-export.d.ts +68 -0
- package/dist/src/formats/json/obographs-export.d.ts.map +1 -0
- package/dist/src/formats/json/obographs-export.js +941 -0
- package/dist/src/formats/json/obographs-export.js.map +1 -0
- package/dist/src/formats/json/obographs.d.ts +26 -0
- package/dist/src/formats/json/obographs.d.ts.map +1 -1
- package/dist/src/formats/json/obographs.js +297 -80
- package/dist/src/formats/json/obographs.js.map +1 -1
- package/dist/src/formats/neo4j/exporter.d.ts +109 -21
- package/dist/src/formats/neo4j/exporter.d.ts.map +1 -1
- package/dist/src/formats/neo4j/exporter.js +239 -86
- package/dist/src/formats/neo4j/exporter.js.map +1 -1
- package/dist/src/formats/neo4j/header.d.ts +17 -4
- package/dist/src/formats/neo4j/header.d.ts.map +1 -1
- package/dist/src/formats/neo4j/header.js +36 -4
- package/dist/src/formats/neo4j/header.js.map +1 -1
- package/dist/src/formats/neo4j/importer.d.ts +107 -27
- package/dist/src/formats/neo4j/importer.d.ts.map +1 -1
- package/dist/src/formats/neo4j/importer.js +415 -63
- package/dist/src/formats/neo4j/importer.js.map +1 -1
- package/dist/src/formats/neo4j/index.d.ts +73 -23
- package/dist/src/formats/neo4j/index.d.ts.map +1 -1
- package/dist/src/formats/neo4j/index.js +65 -25
- package/dist/src/formats/neo4j/index.js.map +1 -1
- package/dist/src/formats/obo/exporter.d.ts +150 -0
- package/dist/src/formats/obo/exporter.d.ts.map +1 -0
- package/dist/src/formats/obo/exporter.js +1736 -0
- package/dist/src/formats/obo/exporter.js.map +1 -0
- package/dist/src/formats/obo/importer.d.ts +95 -19
- package/dist/src/formats/obo/importer.d.ts.map +1 -1
- package/dist/src/formats/obo/importer.js +475 -104
- package/dist/src/formats/obo/importer.js.map +1 -1
- package/dist/src/formats/obo/index.d.ts +6 -3
- package/dist/src/formats/obo/index.d.ts.map +1 -1
- package/dist/src/formats/obo/index.js +6 -3
- package/dist/src/formats/obo/index.js.map +1 -1
- package/dist/src/formats/obo/syntax.d.ts +108 -4
- package/dist/src/formats/obo/syntax.d.ts.map +1 -1
- package/dist/src/formats/obo/syntax.js +211 -34
- package/dist/src/formats/obo/syntax.js.map +1 -1
- package/dist/src/formats/pajek/exporter.d.ts +54 -16
- package/dist/src/formats/pajek/exporter.d.ts.map +1 -1
- package/dist/src/formats/pajek/exporter.js +67 -35
- package/dist/src/formats/pajek/exporter.js.map +1 -1
- package/dist/src/formats/pajek/importer.d.ts +84 -22
- package/dist/src/formats/pajek/importer.d.ts.map +1 -1
- package/dist/src/formats/pajek/importer.js +303 -83
- package/dist/src/formats/pajek/importer.js.map +1 -1
- package/dist/src/formats/pajek/index.d.ts +2 -1
- package/dist/src/formats/pajek/index.d.ts.map +1 -1
- package/dist/src/formats/pajek/index.js +2 -1
- package/dist/src/formats/pajek/index.js.map +1 -1
- package/dist/src/formats/pajek/syntax.d.ts +77 -14
- package/dist/src/formats/pajek/syntax.d.ts.map +1 -1
- package/dist/src/formats/pajek/syntax.js +186 -54
- package/dist/src/formats/pajek/syntax.js.map +1 -1
- package/dist/src/formats/xgmml/columns.d.ts +1 -0
- package/dist/src/formats/xgmml/columns.d.ts.map +1 -1
- package/dist/src/formats/xgmml/columns.js +4 -0
- package/dist/src/formats/xgmml/columns.js.map +1 -1
- package/dist/src/formats/xgmml/constants.d.ts +186 -56
- package/dist/src/formats/xgmml/constants.d.ts.map +1 -1
- package/dist/src/formats/xgmml/constants.js +181 -57
- package/dist/src/formats/xgmml/constants.js.map +1 -1
- package/dist/src/formats/xgmml/document.d.ts +65 -11
- package/dist/src/formats/xgmml/document.d.ts.map +1 -1
- package/dist/src/formats/xgmml/document.js +157 -28
- package/dist/src/formats/xgmml/document.js.map +1 -1
- package/dist/src/formats/xgmml/emit.d.ts +61 -3
- package/dist/src/formats/xgmml/emit.d.ts.map +1 -1
- package/dist/src/formats/xgmml/emit.js +129 -26
- package/dist/src/formats/xgmml/emit.js.map +1 -1
- package/dist/src/formats/xgmml/exporter.d.ts +13 -6
- package/dist/src/formats/xgmml/exporter.d.ts.map +1 -1
- package/dist/src/formats/xgmml/exporter.js +21 -22
- package/dist/src/formats/xgmml/exporter.js.map +1 -1
- package/dist/src/formats/xgmml/importer.d.ts +33 -12
- package/dist/src/formats/xgmml/importer.d.ts.map +1 -1
- package/dist/src/formats/xgmml/importer.js +35 -72
- package/dist/src/formats/xgmml/importer.js.map +1 -1
- package/dist/src/formats/xgmml/index.d.ts +1 -0
- package/dist/src/formats/xgmml/index.d.ts.map +1 -1
- package/dist/src/formats/xgmml/index.js +1 -0
- package/dist/src/formats/xgmml/index.js.map +1 -1
- package/dist/src/formats/xgmml/values.d.ts +8 -1
- package/dist/src/formats/xgmml/values.d.ts.map +1 -1
- package/dist/src/formats/xgmml/values.js +8 -3
- package/dist/src/formats/xgmml/values.js.map +1 -1
- package/dist/src/index.d.ts +23 -18
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +28 -16
- package/dist/src/index.js.map +1 -1
- package/dist/src/registry.d.ts +478 -92
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +807 -88
- package/dist/src/registry.js.map +1 -1
- package/dist/src/sniff.d.ts +61 -19
- package/dist/src/sniff.d.ts.map +1 -1
- package/dist/src/sniff.js +121 -29
- package/dist/src/sniff.js.map +1 -1
- package/dist/src/types.d.ts +362 -112
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +28 -7
- package/dist/src/types.js.map +1 -1
- package/dist/xgmml.js +2 -2
- package/docs/samples/README.md +25 -0
- package/docs/samples/got-edges.csv +353 -0
- package/docs/samples/got-network.graphml +1384 -0
- package/docs/samples/got-nodes.csv +108 -0
- package/docs/samples/got.cx +930 -0
- package/docs/samples/got.cx2 +465 -0
- package/docs/samples/got.gexf +471 -0
- package/docs/samples/got.gml +2650 -0
- package/docs/samples/got.json +2546 -0
- package/docs/samples/got.net +461 -0
- package/docs/samples/movies-nodes.csv +9 -0
- package/docs/samples/movies-rels.csv +8 -0
- package/docs/samples/networks.cys +0 -0
- package/docs/samples/proteins.xgmml +9 -0
- package/docs/samples/teams.gv +24 -0
- package/docs/samples/vehicles.obo +25 -0
- package/package.json +9 -4
- package/src/children.ts +18 -6
- package/src/common/attributes.ts +29 -11
- package/src/common/cell-budget.ts +11 -3
- package/src/common/choose.ts +89 -0
- package/src/common/codes.ts +490 -66
- package/src/common/compare.ts +472 -0
- package/src/common/cx-export.ts +432 -0
- package/src/common/declared-types.ts +40 -6
- package/src/common/direction.ts +78 -51
- package/src/common/escape.ts +39 -22
- package/src/common/export.ts +284 -47
- package/src/common/format.ts +30 -1
- package/src/common/ids.ts +14 -3
- package/src/common/input.ts +1057 -134
- package/src/common/json-elements.ts +1035 -199
- package/src/common/line-format.ts +249 -0
- package/src/common/lists.ts +7 -2
- package/src/common/ontology-export.ts +461 -0
- package/src/common/ontology.ts +31 -9
- package/src/common/options.ts +110 -15
- package/src/common/plural.ts +49 -0
- package/src/common/report.ts +168 -25
- package/src/common/temporal.ts +22 -5
- package/src/common/text.ts +62 -23
- package/src/common/weights.ts +74 -4
- package/src/common/writer.ts +37 -3
- package/src/common/xml.ts +479 -90
- package/src/common/zip.ts +169 -7
- package/src/formats/csv/exporter.ts +202 -47
- package/src/formats/csv/header.ts +50 -11
- package/src/formats/csv/importer.ts +1133 -245
- package/src/formats/csv/index.ts +106 -19
- package/src/formats/csv/records.ts +396 -122
- package/src/formats/csv/values.ts +1 -0
- package/src/formats/cx/exporter.ts +1483 -0
- package/src/formats/cx/importer.ts +890 -302
- package/src/formats/cx/index.ts +4 -3
- package/src/formats/cx2/exporter.ts +62 -339
- package/src/formats/cx2/importer.ts +318 -87
- package/src/formats/cx2/index.ts +2 -1
- package/src/formats/cys/constants.ts +62 -17
- package/src/formats/cys/exporter.ts +1368 -0
- package/src/formats/cys/importer.ts +659 -157
- package/src/formats/cys/index.ts +4 -2
- package/src/formats/cys/session.ts +142 -34
- package/src/formats/cys/tables.ts +47 -9
- package/src/formats/dot/exporter.ts +83 -37
- package/src/formats/dot/importer.ts +248 -54
- package/src/formats/dot/index.ts +2 -1
- package/src/formats/dot/names.ts +44 -11
- package/src/formats/dot/tokenizer.ts +25 -6
- package/src/formats/gexf/exporter.ts +57 -18
- package/src/formats/gexf/importer.ts +636 -105
- package/src/formats/gexf/index.ts +90 -21
- package/src/formats/gexf/schema.ts +67 -15
- package/src/formats/gml/exporter.ts +90 -36
- package/src/formats/gml/importer.ts +388 -67
- package/src/formats/gml/index.ts +85 -24
- package/src/formats/gml/syntax.ts +113 -28
- package/src/formats/graphml/constants.ts +178 -44
- package/src/formats/graphml/exporter.ts +52 -18
- package/src/formats/graphml/importer.ts +640 -60
- package/src/formats/graphml/index.ts +2 -1
- package/src/formats/graphml/tree.ts +6 -2
- package/src/formats/graphml/yfiles.ts +37 -15
- package/src/formats/json/dialect.ts +128 -29
- package/src/formats/json/exporter.ts +205 -68
- package/src/formats/json/importer.ts +1163 -253
- package/src/formats/json/index.ts +3 -1
- package/src/formats/json/obographs-export.ts +1197 -0
- package/src/formats/json/obographs.ts +353 -92
- package/src/formats/neo4j/exporter.ts +321 -102
- package/src/formats/neo4j/header.ts +44 -6
- package/src/formats/neo4j/importer.ts +512 -73
- package/src/formats/neo4j/index.ts +75 -23
- package/src/formats/obo/exporter.ts +2210 -0
- package/src/formats/obo/importer.ts +622 -109
- package/src/formats/obo/index.ts +6 -3
- package/src/formats/obo/syntax.ts +232 -37
- package/src/formats/pajek/exporter.ts +90 -42
- package/src/formats/pajek/importer.ts +407 -93
- package/src/formats/pajek/index.ts +2 -1
- package/src/formats/pajek/syntax.ts +216 -55
- package/src/formats/xgmml/columns.ts +10 -0
- package/src/formats/xgmml/constants.ts +183 -56
- package/src/formats/xgmml/document.ts +212 -34
- package/src/formats/xgmml/emit.ts +175 -34
- package/src/formats/xgmml/exporter.ts +36 -28
- package/src/formats/xgmml/importer.ts +64 -86
- package/src/formats/xgmml/index.ts +1 -0
- package/src/formats/xgmml/values.ts +12 -4
- package/src/index.ts +81 -11
- package/src/registry.ts +1121 -135
- package/src/sniff.ts +163 -32
- package/src/types.ts +385 -114
- package/dist/chunks/escape-B-tkk_Cl.js.map +0 -1
- package/dist/chunks/export-Bh60Dv-n.js +0 -582
- package/dist/chunks/export-Bh60Dv-n.js.map +0 -1
- package/dist/chunks/exporter-BGrsWamJ.js.map +0 -1
- package/dist/chunks/exporter-DIeGJXAZ.js.map +0 -1
- package/dist/chunks/importer-BWY2FFc5.js.map +0 -1
- package/dist/chunks/importer-DD-xv9_Y.js +0 -1471
- package/dist/chunks/importer-DD-xv9_Y.js.map +0 -1
- package/dist/chunks/importer-DET1tg6s.js.map +0 -1
- package/dist/chunks/importer-DEcKhsmQ.js +0 -1614
- package/dist/chunks/importer-DEcKhsmQ.js.map +0 -1
- package/dist/chunks/importer-DIrbbnAf.js.map +0 -1
- package/dist/chunks/importer-D_e7e7LX.js.map +0 -1
- package/dist/chunks/importer-eUREhBGj.js.map +0 -1
- package/dist/chunks/importer-vi3bSdtw.js.map +0 -1
- package/dist/chunks/importer-zGLo8Dg_.js.map +0 -1
- package/dist/chunks/json-elements-DDS8N2Dd.js +0 -779
- package/dist/chunks/json-elements-DDS8N2Dd.js.map +0 -1
- package/dist/chunks/ontology-BnrJ4I98.js +0 -113
- package/dist/chunks/ontology-BnrJ4I98.js.map +0 -1
- package/dist/chunks/records-dbRkxwaq.js.map +0 -1
- package/dist/chunks/report-B1z4WT9e.js +0 -2372
- package/dist/chunks/report-B1z4WT9e.js.map +0 -1
- package/dist/chunks/text-Dr0Ifpag.js.map +0 -1
- package/dist/chunks/weights-Dzba96G3.js +0 -176
- package/dist/chunks/weights-Dzba96G3.js.map +0 -1
- package/dist/chunks/writer-C7flM-Ih.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The DOT / Graphviz subpath entry (`@graphty/graph-io/dot
|
|
2
|
+
* The DOT / Graphviz subpath entry (`@graphty/graph-io/dot`): the importer and
|
|
3
3
|
* exporter plugins with their option types and issue / loss codes.
|
|
4
|
+
* @module @graphty/graph-io/dot
|
|
4
5
|
*/
|
|
5
6
|
export { DOT_LOSS, dotExporter } from "./exporter.js";
|
|
6
7
|
export { DOT_ISSUE, dotImporter } from "./importer.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/formats/dot/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/formats/dot/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC"}
|
|
@@ -4,26 +4,59 @@
|
|
|
4
4
|
* gives a fixed meaning to.
|
|
5
5
|
*/
|
|
6
6
|
import { type ColumnOriginInput } from "@graphty/graph-format";
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* The format name.
|
|
9
|
+
* @category Plugin helpers
|
|
10
|
+
*/
|
|
8
11
|
export declare const DOT_FORMAT = "dot";
|
|
9
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The origin recorded on every column the importer declares.
|
|
14
|
+
* @category Plugin helpers
|
|
15
|
+
*/
|
|
10
16
|
export declare const DOT_ORIGIN: ColumnOriginInput;
|
|
11
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The bool node column marking a cluster's container node.
|
|
19
|
+
* @category Plugin helpers
|
|
20
|
+
*/
|
|
12
21
|
export declare const CLUSTER_COLUMN = "graphty.cluster";
|
|
13
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* The u32 node column (role parent, refersTo node) holding a member's cluster.
|
|
24
|
+
* @category Plugin helpers
|
|
25
|
+
*/
|
|
14
26
|
export declare const PARENT_COLUMN = "graphty.parent";
|
|
15
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* The string edge column (role sourcePort) holding an edge's tail port.
|
|
29
|
+
* @category Plugin helpers
|
|
30
|
+
*/
|
|
16
31
|
export declare const SOURCE_PORT_COLUMN = "graphty.sourcePort";
|
|
17
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* The string edge column (role targetPort) holding an edge's head port.
|
|
34
|
+
* @category Plugin helpers
|
|
35
|
+
*/
|
|
18
36
|
export declare const TARGET_PORT_COLUMN = "graphty.targetPort";
|
|
19
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* The attribute that is the display label (kept as text with role label).
|
|
39
|
+
* @category Plugin helpers
|
|
40
|
+
*/
|
|
20
41
|
export declare const LABEL_ATTRIBUTE = "label";
|
|
21
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* The node attribute holding a position, mapped to the position role column (design section 5.2).
|
|
44
|
+
* @category Plugin helpers
|
|
45
|
+
*/
|
|
22
46
|
export declare const POS_ATTRIBUTE = "pos";
|
|
23
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* The edge attribute cgraph uses as an edge's identity within its endpoints, mapped to the edge id role.
|
|
49
|
+
* @category Plugin helpers
|
|
50
|
+
*/
|
|
24
51
|
export declare const KEY_ATTRIBUTE = "key";
|
|
25
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* The node attribute a `!` suffix of `pos` sets (Graphviz's own spelling of a pinned position).
|
|
54
|
+
* @category Plugin helpers
|
|
55
|
+
*/
|
|
26
56
|
export declare const PIN_ATTRIBUTE = "pin";
|
|
27
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* The key under meta.extra holding the format's graph flags (`{ strict: true }`).
|
|
59
|
+
* @category Plugin helpers
|
|
60
|
+
*/
|
|
28
61
|
export declare const DOT_META_KEY = "dot";
|
|
29
62
|
//# sourceMappingURL=names.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../../../src/formats/dot/names.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D
|
|
1
|
+
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../../../src/formats/dot/names.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAQ,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,iBAAyD,CAAC;AAEnF;;;GAGG;AACH,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAQ,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAQ,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAQ,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAQ,CAAC"}
|
|
@@ -3,26 +3,59 @@
|
|
|
3
3
|
* format-owned columns (design section 5.6: `graphty.` prefix) and the attribute names the format
|
|
4
4
|
* gives a fixed meaning to.
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* The format name.
|
|
8
|
+
* @category Plugin helpers
|
|
9
|
+
*/
|
|
7
10
|
export const DOT_FORMAT = "dot";
|
|
8
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The origin recorded on every column the importer declares.
|
|
13
|
+
* @category Plugin helpers
|
|
14
|
+
*/
|
|
9
15
|
export const DOT_ORIGIN = Object.freeze({ format: DOT_FORMAT });
|
|
10
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* The bool node column marking a cluster's container node.
|
|
18
|
+
* @category Plugin helpers
|
|
19
|
+
*/
|
|
11
20
|
export const CLUSTER_COLUMN = "graphty.cluster";
|
|
12
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* The u32 node column (role parent, refersTo node) holding a member's cluster.
|
|
23
|
+
* @category Plugin helpers
|
|
24
|
+
*/
|
|
13
25
|
export const PARENT_COLUMN = "graphty.parent";
|
|
14
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* The string edge column (role sourcePort) holding an edge's tail port.
|
|
28
|
+
* @category Plugin helpers
|
|
29
|
+
*/
|
|
15
30
|
export const SOURCE_PORT_COLUMN = "graphty.sourcePort";
|
|
16
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* The string edge column (role targetPort) holding an edge's head port.
|
|
33
|
+
* @category Plugin helpers
|
|
34
|
+
*/
|
|
17
35
|
export const TARGET_PORT_COLUMN = "graphty.targetPort";
|
|
18
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* The attribute that is the display label (kept as text with role label).
|
|
38
|
+
* @category Plugin helpers
|
|
39
|
+
*/
|
|
19
40
|
export const LABEL_ATTRIBUTE = "label";
|
|
20
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* The node attribute holding a position, mapped to the position role column (design section 5.2).
|
|
43
|
+
* @category Plugin helpers
|
|
44
|
+
*/
|
|
21
45
|
export const POS_ATTRIBUTE = "pos";
|
|
22
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* The edge attribute cgraph uses as an edge's identity within its endpoints, mapped to the edge id role.
|
|
48
|
+
* @category Plugin helpers
|
|
49
|
+
*/
|
|
23
50
|
export const KEY_ATTRIBUTE = "key";
|
|
24
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* The node attribute a `!` suffix of `pos` sets (Graphviz's own spelling of a pinned position).
|
|
53
|
+
* @category Plugin helpers
|
|
54
|
+
*/
|
|
25
55
|
export const PIN_ATTRIBUTE = "pin";
|
|
26
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* The key under meta.extra holding the format's graph flags (`{ strict: true }`).
|
|
58
|
+
* @category Plugin helpers
|
|
59
|
+
*/
|
|
27
60
|
export const DOT_META_KEY = "dot";
|
|
28
61
|
//# sourceMappingURL=names.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../../../src/formats/dot/names.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH
|
|
1
|
+
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../../../src/formats/dot/names.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC;AAEhC;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAsB,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;AAEnF;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEhD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEvD;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAEvD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AAEvC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC"}
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
*/
|
|
11
11
|
/** The kinds of token. */
|
|
12
12
|
type DotTokenKind = "id" | "punct" | "eof";
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* One token of a DOT document.
|
|
15
|
+
* @category Plugin helpers
|
|
16
|
+
*/
|
|
14
17
|
export interface DotToken {
|
|
15
18
|
/** The kind. */
|
|
16
19
|
readonly kind: DotTokenKind;
|
|
@@ -26,7 +29,10 @@ export interface DotToken {
|
|
|
26
29
|
/** The 1-based line the token starts on. */
|
|
27
30
|
readonly line: number;
|
|
28
31
|
}
|
|
29
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* The error the lexer and parser throw for a grammar violation; the importer turns it into a fatal parse-error.
|
|
34
|
+
* @category Plugin helpers
|
|
35
|
+
*/
|
|
30
36
|
export declare class DotSyntaxError extends Error {
|
|
31
37
|
/** The 1-based line of the violation. */
|
|
32
38
|
readonly line: number;
|
|
@@ -39,6 +45,7 @@ export declare class DotSyntaxError extends Error {
|
|
|
39
45
|
}
|
|
40
46
|
/**
|
|
41
47
|
* A pull lexer over one DOT document with arbitrary lookahead.
|
|
48
|
+
* @category Plugin helpers
|
|
42
49
|
*/
|
|
43
50
|
export declare class DotTokenizer {
|
|
44
51
|
private readonly text;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../../../../src/formats/dot/tokenizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,0BAA0B;AAC1B,KAAK,YAAY,GAAG,IAAI,GAAG,OAAO,GAAG,KAAK,CAAC;AAE3C
|
|
1
|
+
{"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../../../../src/formats/dot/tokenizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,0BAA0B;AAC1B,KAAK,YAAY,GAAG,IAAI,GAAG,OAAO,GAAG,KAAK,CAAC;AAE3C;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACrB,gBAAgB;IAChB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACrC,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAK5C;AAqCD;;;GAGG;AACH,qBAAa,YAAY;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAE9B,OAAO,CAAC,GAAG,CAAK;IAEhB,OAAO,CAAC,IAAI,CAAK;IAEjB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;IAE5C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmD;IAE/E;;;;;OAKG;gBACS,IAAI,EAAE,MAAM,EAAE,WAAW,GAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAW;IAK9F;;;;OAIG;IACH,IAAI,CAAC,CAAC,SAAI,GAAG,QAAQ;IAOrB;;;OAGG;IACH,IAAI,IAAI,QAAQ;IAKhB;;;OAGG;IACH,OAAO,CAAC,GAAG;IAsDX;;;;;OAKG;IACH,OAAO,CAAC,OAAO;IA0Bf;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM;IAiDd;;;;;;OAMG;IACH,OAAO,CAAC,IAAI;IAoBZ;;OAEG;IACH,OAAO,CAAC,UAAU;IA+ClB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAM5B;;OAEG;IACH,OAAO,CAAC,aAAa;IAWrB;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAgB3B"}
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
* distinguished here: the parser matches a bare id case-insensitively, since a quoted `"node"` is
|
|
9
9
|
* an ordinary id. Line numbers are 1-based and attached to every token for the report.
|
|
10
10
|
*/
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The error the lexer and parser throw for a grammar violation; the importer turns it into a fatal parse-error.
|
|
13
|
+
* @category Plugin helpers
|
|
14
|
+
*/
|
|
12
15
|
export class DotSyntaxError extends Error {
|
|
13
16
|
/**
|
|
14
17
|
* Create a syntax error.
|
|
@@ -29,15 +32,19 @@ const EOF_TOKEN_TEXT = "";
|
|
|
29
32
|
* @returns true for an identifier start
|
|
30
33
|
*/
|
|
31
34
|
function isIdentifierStart(c) {
|
|
32
|
-
return (c >= 65 && c <= 90) || (c >= 97 && c <= 122) || c === 95 || c >= 128;
|
|
35
|
+
return (c >= 65 && c <= 90) || (c >= 97 && c <= 122) || c === 95 || (c >= 128 && c !== BOM_CODE);
|
|
33
36
|
}
|
|
37
|
+
/** U+FEFF: a byte order mark, which only the decoder strips from the very start of the input. */
|
|
38
|
+
const BOM_CODE = 0xfeff;
|
|
34
39
|
/**
|
|
35
|
-
* Whether a UTF-16 code unit may continue a bare DOT identifier.
|
|
40
|
+
* Whether a UTF-16 code unit may continue a bare DOT identifier. A U+FEFF inside an identifier
|
|
41
|
+
* run stays part of it, as Graphviz keeps its bytes (in its `\200-\377` range); only a U+FEFF
|
|
42
|
+
* between tokens is skipped as a stray BOM.
|
|
36
43
|
* @param c - the code unit
|
|
37
44
|
* @returns true for an identifier character
|
|
38
45
|
*/
|
|
39
46
|
function isIdentifierPart(c) {
|
|
40
|
-
return isIdentifierStart(c) || isDigit(c);
|
|
47
|
+
return isIdentifierStart(c) || isDigit(c) || c === BOM_CODE;
|
|
41
48
|
}
|
|
42
49
|
/**
|
|
43
50
|
* Whether a code unit is an ASCII digit.
|
|
@@ -49,6 +56,7 @@ function isDigit(c) {
|
|
|
49
56
|
}
|
|
50
57
|
/**
|
|
51
58
|
* A pull lexer over one DOT document with arbitrary lookahead.
|
|
59
|
+
* @category Plugin helpers
|
|
52
60
|
*/
|
|
53
61
|
export class DotTokenizer {
|
|
54
62
|
/**
|
|
@@ -163,7 +171,9 @@ export class DotTokenizer {
|
|
|
163
171
|
}
|
|
164
172
|
this.pos = end;
|
|
165
173
|
const numeral = text.slice(start, end);
|
|
166
|
-
|
|
174
|
+
const after = text.charCodeAt(end); // NOSONAR(S7758): reads UTF-16 code units on purpose
|
|
175
|
+
// a letter (`1e3`) or a second dot (`1.2.3`) right after the numeral: Graphviz splits there
|
|
176
|
+
if (end < text.length && (isIdentifierStart(after) || after === 0x2e) && this.onAmbiguity !== null) {
|
|
167
177
|
// Graphviz: "syntax ambiguity - badly delimited number '1e' ... splits into two tokens"
|
|
168
178
|
this.onAmbiguity(numeral, line);
|
|
169
179
|
}
|
|
@@ -279,6 +289,11 @@ export class DotTokenizer {
|
|
|
279
289
|
this.pos++;
|
|
280
290
|
continue;
|
|
281
291
|
}
|
|
292
|
+
if (c === BOM_CODE) {
|
|
293
|
+
// a U+FEFF after the start (concatenated files) is whitespace; the shared text check reports it
|
|
294
|
+
this.pos++;
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
282
297
|
if (c === 0x2f) {
|
|
283
298
|
const d = text.charCodeAt(this.pos + 1);
|
|
284
299
|
if (d === 0x2f) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenizer.js","sourceRoot":"","sources":["../../../../src/formats/dot/tokenizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"tokenizer.js","sourceRoot":"","sources":["../../../../src/formats/dot/tokenizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAyBH;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IAIrC;;;;OAIG;IACH,YAAY,OAAe,EAAE,IAAY;QACrC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CACJ;AAED,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,CAAS;IAChC,OAAO,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC;AACrG,CAAC;AAED,iGAAiG;AACjG,MAAM,QAAQ,GAAG,MAAM,CAAC;AAExB;;;;;;GAMG;AACH,SAAS,gBAA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I,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YAC5B,MAAM,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACpC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;gBAC3B,OAAO;YACX,CAAC;YACD,IAAI,CAAC,GAAG,EAAE,CAAC;QACf,CAAC;IACL,CAAC;IAED;;OAEG;IACK,gBAAgB;QACpB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACtB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACrB,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC1B,MAAM,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7B,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;gBAChD,IAAI,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO;YACX,CAAC;YACD,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;gBAChE,IAAI,CAAC,IAAI,EAAE,CAAC;YAChB,CAAC;QACL,CAAC;QACD,MAAM,IAAI,cAAc,CAAC,4BAA4B,EAAE,SAAS,CAAC,CAAC;IACtE,CAAC;CACJ"}
|
|
@@ -13,14 +13,23 @@
|
|
|
13
13
|
* timestamps and no typed lists; role columns of an unexpected shape; roles the format cannot
|
|
14
14
|
* carry; attribute titles the importer would rename).
|
|
15
15
|
*/
|
|
16
|
-
import { type ExportCapabilities, type GraphExporter } from "../../types.js";
|
|
16
|
+
import { type CommonExportOptions, type ExportCapabilities, type GraphExporter } from "../../types.js";
|
|
17
17
|
import { type GexfVersion } from "./schema.js";
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The format-specific options of the GEXF exporter.
|
|
20
|
+
* @category Built-in formats
|
|
21
|
+
*/
|
|
22
|
+
export interface GexfExportOptions extends CommonExportOptions {
|
|
23
|
+
/**
|
|
24
|
+
* The GEXF version to write.
|
|
25
|
+
* @defaultValue "1.3"
|
|
26
|
+
*/
|
|
21
27
|
version?: GexfVersion | undefined;
|
|
22
28
|
}
|
|
23
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* LossNote codes specific to the GEXF exporter, next to the shared LOSS codes.
|
|
31
|
+
* @category Built-in formats
|
|
32
|
+
*/
|
|
24
33
|
export declare const GEXF_LOSS: Readonly<{
|
|
25
34
|
/** GEXF 1.2 has no parallel-edge `kind`; the kind column is dropped. */
|
|
26
35
|
KIND_DROPPED: "W_GEXF_KIND_DROPPED";
|
|
@@ -30,29 +39,51 @@ export declare const GEXF_LOSS: Readonly<{
|
|
|
30
39
|
LIST_SEPARATOR: "W_LIST_SEPARATOR";
|
|
31
40
|
/** A role column of a shape GEXF cannot map (a string `start`, a 2-component color); written as a plain attribute. */
|
|
32
41
|
ROLE_SHAPE: "W_ROLE_SHAPE";
|
|
33
|
-
/** A temporal extension table without the element / start / end / value columns
|
|
42
|
+
/** A temporal extension table without the element / start / end / value columns. */
|
|
34
43
|
TEMPORAL_TABLE_SHAPE: "W_TEMPORAL_TABLE_SHAPE";
|
|
35
|
-
/** An attribute
|
|
44
|
+
/** An attribute's name is one GEXF reserves, so a GEXF import would give it another name. */
|
|
36
45
|
ATTRIBUTE_RENAMED: "W_ATTRIBUTE_RENAMED";
|
|
37
46
|
/** A cell, default or option the declared type cannot express (skipped). */
|
|
38
47
|
VALUE_UNWRITABLE: "W_VALUE_UNWRITABLE";
|
|
39
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* An attribute type that this GEXF version does not have (GEXF 1.2 has no date, dateTime or typed lists) is
|
|
50
|
+
* written as the nearest type it has.
|
|
51
|
+
*/
|
|
40
52
|
DECLARED_TYPE: "W_DECLARED_TYPE";
|
|
41
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* A node id that reads back as a different type: a number that is not an integer comes back as text, and text that
|
|
55
|
+
* looks like an integer ("42") comes back as a number, unless you read the file with `ids: "string"` or `ids:
|
|
56
|
+
* "keep"`.
|
|
57
|
+
*/
|
|
42
58
|
ID_TEXT_TYPE: "W_ID_TEXT_TYPE";
|
|
43
59
|
/** A numeric edge id column: GEXF edge ids read back as strings. */
|
|
44
60
|
EDGE_ID_TEXT: "W_GEXF_EDGE_ID_TEXT";
|
|
45
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* A visual attribute (position, color, size, thickness) is stored at more precision than GEXF keeps; it reads back
|
|
63
|
+
* as a 32-bit float.
|
|
64
|
+
*/
|
|
46
65
|
VIZ_DTYPE: "W_GEXF_VIZ_DTYPE";
|
|
47
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* An attribute named `weight` without the weight role reads back as the edge weight, because GEXF reads weights
|
|
68
|
+
* from `weight` by default.
|
|
69
|
+
*/
|
|
48
70
|
WEIGHT_KEY_CLASH: "W_WEIGHT_KEY_CLASH";
|
|
49
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* A text attribute stored as a dictionary, without a declared list of allowed values, reads back with its distinct
|
|
73
|
+
* values as that list.
|
|
74
|
+
*/
|
|
50
75
|
OPTIONS_GAINED: "W_OPTIONS_GAINED";
|
|
51
|
-
/** A
|
|
76
|
+
/** A text value holds a character XML 1.0 forbids (most control characters); the save fails with E_COLUMN_TYPE. */
|
|
52
77
|
XML_ILLEGAL_CHAR: "E_XML_ILLEGAL_CHAR";
|
|
53
78
|
}>;
|
|
54
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* The GEXF exporter; `capabilities` describes the default 1.3 output.
|
|
81
|
+
* @category Built-in formats
|
|
82
|
+
*/
|
|
55
83
|
export declare const gexfExporter: GraphExporter<GexfExportOptions>;
|
|
56
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* The capabilities of a 1.2 export, for callers that pass `version: "1.2"`.
|
|
86
|
+
* @category Built-in formats
|
|
87
|
+
*/
|
|
57
88
|
export declare const GEXF_1_2_CAPABILITIES: ExportCapabilities;
|
|
58
89
|
//# sourceMappingURL=exporter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../../src/formats/gexf/exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../../src/formats/gexf/exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAiB,MAAM,gBAAgB,CAAC;AACtH,OAAO,EAKH,KAAK,WAAW,EAWnB,MAAM,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;IAC1D;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACrC;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS;IAClB,wEAAwE;;IAExE,gFAAgF;;IAEhF,mGAAmG;;IAEnG,sHAAsH;;IAEtH,oFAAoF;;IAEpF,6FAA6F;;IAE7F,4EAA4E;;IAE5E;;;OAGG;;IAEH;;;;OAIG;;IAEH,oEAAoE;;IAEpE;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH,mHAAmH;;EAErH,CAAC;AAqnDH;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,iBAAiB,CA+BxD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,kBAAqC,CAAC"}
|
|
@@ -22,12 +22,16 @@ import { formatF32, formatF64, formatInteger } from "../../common/format.js";
|
|
|
22
22
|
import { isCanonicalIntegerText } from "../../common/ids.js";
|
|
23
23
|
import { joinListText } from "../../common/lists.js";
|
|
24
24
|
import { resolveExportOptions } from "../../common/options.js";
|
|
25
|
+
import { agree, plural } from "../../common/plural.js";
|
|
25
26
|
import { formatTemporal, formatTimeValue } from "../../common/temporal.js";
|
|
26
27
|
import { explicitWeights } from "../../common/weights.js";
|
|
27
28
|
import { encodeChunks, joinText } from "../../common/writer.js";
|
|
28
29
|
import { xmlIllegalTextNotes } from "../../common/xml.js";
|
|
29
30
|
import { canonicalScalarType, GEXF_FORMAT, GEXF_NAMESPACES, isListType, isScalarType, NODE_COLUMNS, OPEN_END, OPEN_START, parseTemporalTableName, RESERVED_EDGE_NAMES, RESERVED_NODE_NAMES, TEMPORAL_COLUMNS, VIZ_NAMESPACE, } from "./schema.js";
|
|
30
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* LossNote codes specific to the GEXF exporter, next to the shared LOSS codes.
|
|
33
|
+
* @category Built-in formats
|
|
34
|
+
*/
|
|
31
35
|
export const GEXF_LOSS = Object.freeze({
|
|
32
36
|
/** GEXF 1.2 has no parallel-edge `kind`; the kind column is dropped. */
|
|
33
37
|
KIND_DROPPED: "W_GEXF_KIND_DROPPED",
|
|
@@ -37,25 +41,41 @@ export const GEXF_LOSS = Object.freeze({
|
|
|
37
41
|
LIST_SEPARATOR: "W_LIST_SEPARATOR",
|
|
38
42
|
/** A role column of a shape GEXF cannot map (a string `start`, a 2-component color); written as a plain attribute. */
|
|
39
43
|
ROLE_SHAPE: "W_ROLE_SHAPE",
|
|
40
|
-
/** A temporal extension table without the element / start / end / value columns
|
|
44
|
+
/** A temporal extension table without the element / start / end / value columns. */
|
|
41
45
|
TEMPORAL_TABLE_SHAPE: "W_TEMPORAL_TABLE_SHAPE",
|
|
42
|
-
/** An attribute
|
|
46
|
+
/** An attribute's name is one GEXF reserves, so a GEXF import would give it another name. */
|
|
43
47
|
ATTRIBUTE_RENAMED: "W_ATTRIBUTE_RENAMED",
|
|
44
48
|
/** A cell, default or option the declared type cannot express (skipped). */
|
|
45
49
|
VALUE_UNWRITABLE: "W_VALUE_UNWRITABLE",
|
|
46
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* An attribute type that this GEXF version does not have (GEXF 1.2 has no date, dateTime or typed lists) is
|
|
52
|
+
* written as the nearest type it has.
|
|
53
|
+
*/
|
|
47
54
|
DECLARED_TYPE: "W_DECLARED_TYPE",
|
|
48
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* A node id that reads back as a different type: a number that is not an integer comes back as text, and text that
|
|
57
|
+
* looks like an integer ("42") comes back as a number, unless you read the file with `ids: "string"` or `ids:
|
|
58
|
+
* "keep"`.
|
|
59
|
+
*/
|
|
49
60
|
ID_TEXT_TYPE: LOSS.ID_TEXT_TYPE,
|
|
50
61
|
/** A numeric edge id column: GEXF edge ids read back as strings. */
|
|
51
62
|
EDGE_ID_TEXT: "W_GEXF_EDGE_ID_TEXT",
|
|
52
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* A visual attribute (position, color, size, thickness) is stored at more precision than GEXF keeps; it reads back
|
|
65
|
+
* as a 32-bit float.
|
|
66
|
+
*/
|
|
53
67
|
VIZ_DTYPE: "W_GEXF_VIZ_DTYPE",
|
|
54
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* An attribute named `weight` without the weight role reads back as the edge weight, because GEXF reads weights
|
|
70
|
+
* from `weight` by default.
|
|
71
|
+
*/
|
|
55
72
|
WEIGHT_KEY_CLASH: LOSS.WEIGHT_KEY_CLASH,
|
|
56
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* A text attribute stored as a dictionary, without a declared list of allowed values, reads back with its distinct
|
|
75
|
+
* values as that list.
|
|
76
|
+
*/
|
|
57
77
|
OPTIONS_GAINED: LOSS.OPTIONS_GAINED,
|
|
58
|
-
/** A
|
|
78
|
+
/** A text value holds a character XML 1.0 forbids (most control characters); the save fails with E_COLUMN_TYPE. */
|
|
59
79
|
XML_ILLEGAL_CHAR: LOSS.XML_ILLEGAL_CHAR,
|
|
60
80
|
});
|
|
61
81
|
const DTYPES_KEPT = ["f32", "f64", "i32", "bool", "dict", "string"];
|
|
@@ -122,7 +142,8 @@ function planExport(snapshot, options) {
|
|
|
122
142
|
temporalText: true,
|
|
123
143
|
positionDtype: "f32",
|
|
124
144
|
roles: MAPPED_ROLES,
|
|
125
|
-
|
|
145
|
+
// GEXF 1.2 has no edge kind: the kind column is dropped (W_GEXF_KIND_DROPPED), not renamed
|
|
146
|
+
roleNames: version === "1.2" ? ROLE_NAMES_1_2 : ROLE_NAMES,
|
|
126
147
|
}),
|
|
127
148
|
];
|
|
128
149
|
const note = (code, message, column = null, count = null) => {
|
|
@@ -137,7 +158,7 @@ function planExport(snapshot, options) {
|
|
|
137
158
|
}
|
|
138
159
|
}
|
|
139
160
|
if (typeChanges > 0) {
|
|
140
|
-
note(GEXF_LOSS.ID_TEXT_TYPE, `${typeChanges} node id(
|
|
161
|
+
note(GEXF_LOSS.ID_TEXT_TYPE, `${typeChanges} node id${plural(typeChanges)} ${agree(typeChanges, "changes", "change")} type when read back under ids: "canonical" (string ids that are integer text, non-integer numbers); the file's idtype is not honored by the importer`, null, typeChanges);
|
|
141
162
|
}
|
|
142
163
|
const edgeIds = snapshot.edges.byRole("id");
|
|
143
164
|
if (edgeIds !== null && edgeIds.dtype !== "string" && edgeIds.dtype !== "dict") {
|
|
@@ -323,6 +344,8 @@ const ROLE_NAMES = Object.freeze({
|
|
|
323
344
|
parent: NODE_COLUMNS.parent,
|
|
324
345
|
parents: NODE_COLUMNS.parents,
|
|
325
346
|
});
|
|
347
|
+
/** ROLE_NAMES without the edge kind, which GEXF 1.2 cannot write. */
|
|
348
|
+
const ROLE_NAMES_1_2 = Object.freeze(Object.fromEntries(Object.entries(ROLE_NAMES).filter(([role]) => role !== "kind")));
|
|
326
349
|
/**
|
|
327
350
|
* Find the role columns of a table; a role column of the wrong shape is noted and left to the
|
|
328
351
|
* attribute pass.
|
|
@@ -707,7 +730,7 @@ function collectAttributes(snapshot, domain, roles, tables, version, note) {
|
|
|
707
730
|
note(GEXF_LOSS.DECLARED_TYPE, `${domain} column "${name}" is declared ${typed.dropped}, which GEXF ${version} lacks; written as ${typed.type}`, name, null);
|
|
708
731
|
}
|
|
709
732
|
if (domain === "edge" && column !== null && column.meta.role === null && title === DEFAULT_WEIGHT_TITLE) {
|
|
710
|
-
note(GEXF_LOSS.WEIGHT_KEY_CLASH, `edge column "${name}" is written as an attribute titled "${title}", which the importer reads as
|
|
733
|
+
note(GEXF_LOSS.WEIGHT_KEY_CLASH, `edge column "${name}" is written as an attribute titled "${title}", which the importer reads as the edge weight (weightFrom); it reads back as the weight, not as a column`, name, column.length - column.nullCount);
|
|
711
734
|
}
|
|
712
735
|
const reimportName = reserved.has(title) ? `${title}#${id}` : title;
|
|
713
736
|
if (reimportName !== name) {
|
|
@@ -816,7 +839,7 @@ function declaredTexts(column, domain, typed, version, note) {
|
|
|
816
839
|
}
|
|
817
840
|
}
|
|
818
841
|
if (count > 0) {
|
|
819
|
-
note(GEXF_LOSS.LIST_SEPARATOR, `${domain} column "${name}": ${count} row(
|
|
842
|
+
note(GEXF_LOSS.LIST_SEPARATOR, `${domain} column "${name}": ${count} row${plural(count)} ${agree(count, "holds", "hold")} an item containing "|", the 1.2 list separator`, name, count);
|
|
820
843
|
}
|
|
821
844
|
}
|
|
822
845
|
return { defaultText, optionsText };
|
|
@@ -1415,9 +1438,13 @@ function graphExtraText(snapshot, key) {
|
|
|
1415
1438
|
const value = gexfExtra[key];
|
|
1416
1439
|
return typeof value === "string" ? value : null;
|
|
1417
1440
|
}
|
|
1418
|
-
/**
|
|
1441
|
+
/**
|
|
1442
|
+
* The GEXF exporter; `capabilities` describes the default 1.3 output.
|
|
1443
|
+
* @category Built-in formats
|
|
1444
|
+
*/
|
|
1419
1445
|
export const gexfExporter = Object.freeze({
|
|
1420
1446
|
format: GEXF_FORMAT,
|
|
1447
|
+
options: Object.freeze(["version"]),
|
|
1421
1448
|
capabilities: CAPABILITIES_1_3,
|
|
1422
1449
|
/**
|
|
1423
1450
|
* Pre-flight: what export() would lose.
|
|
@@ -1447,6 +1474,9 @@ export const gexfExporter = Object.freeze({
|
|
|
1447
1474
|
return joinText(writeGexf(snapshot, options));
|
|
1448
1475
|
},
|
|
1449
1476
|
});
|
|
1450
|
-
/**
|
|
1477
|
+
/**
|
|
1478
|
+
* The capabilities of a 1.2 export, for callers that pass `version: "1.2"`.
|
|
1479
|
+
* @category Built-in formats
|
|
1480
|
+
*/
|
|
1451
1481
|
export const GEXF_1_2_CAPABILITIES = CAPABILITIES_1_2;
|
|
1452
1482
|
//# sourceMappingURL=exporter.js.map
|