@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.
- package/dist/chunks/approximations-3Q4TsdTh.js +40 -0
- package/dist/chunks/approximations-3Q4TsdTh.js.map +1 -0
- package/dist/chunks/block-JQiwViEt.js +2777 -0
- package/dist/chunks/block-JQiwViEt.js.map +1 -0
- package/dist/chunks/{choose-DvpbdRuz.js → choose-BemygfH8.js} +3 -2
- package/dist/chunks/{choose-DvpbdRuz.js.map → choose-BemygfH8.js.map} +1 -1
- package/dist/chunks/{constants-fT3E8JYY.js → constants-BFUR_CtU.js} +6 -2
- package/dist/chunks/constants-BFUR_CtU.js.map +1 -0
- package/dist/chunks/convert-BcQ8_jMo.js +59 -0
- package/dist/chunks/convert-BcQ8_jMo.js.map +1 -0
- package/dist/chunks/emit-DCwFLts5.js +3456 -0
- package/dist/chunks/emit-DCwFLts5.js.map +1 -0
- package/dist/chunks/{escape-B62ZGM_a.js → escape-B1rMftd9.js} +43 -20
- package/dist/chunks/escape-B1rMftd9.js.map +1 -0
- package/dist/chunks/{export-rKLeGQMo.js → export-D7IGzTG4.js} +196 -792
- package/dist/chunks/export-D7IGzTG4.js.map +1 -0
- package/dist/chunks/{exporter-BWwEuOPT.js → exporter-BtnqYuuj.js} +22 -12
- package/dist/chunks/exporter-BtnqYuuj.js.map +1 -0
- package/dist/chunks/{exporter-yLxKBvLE.js → exporter-ChPyhBOv.js} +4 -3
- package/dist/chunks/{exporter-yLxKBvLE.js.map → exporter-ChPyhBOv.js.map} +1 -1
- package/dist/chunks/{exporter-8hLNemFk.js → exporter-KEPxYUXD.js} +133 -74
- package/dist/chunks/exporter-KEPxYUXD.js.map +1 -0
- package/dist/chunks/{exporter-RVtXVetw.js → exporter-quPUCBiC.js} +1805 -287
- package/dist/chunks/exporter-quPUCBiC.js.map +1 -0
- package/dist/chunks/format-GDmO6m6Q.js +676 -0
- package/dist/chunks/format-GDmO6m6Q.js.map +1 -0
- package/dist/chunks/generic-BL06jrJf.js +1347 -0
- package/dist/chunks/generic-BL06jrJf.js.map +1 -0
- package/dist/chunks/{importer-WrGRZb0N.js → importer-B7r2owVf.js} +449 -102
- package/dist/chunks/importer-B7r2owVf.js.map +1 -0
- package/dist/chunks/{importer-Ht7LNg8L.js → importer-BFmOP96W.js} +116 -296
- package/dist/chunks/importer-BFmOP96W.js.map +1 -0
- package/dist/chunks/{importer-BbNb7eNg.js → importer-C2nzGhdV.js} +1390 -129
- package/dist/chunks/importer-C2nzGhdV.js.map +1 -0
- package/dist/chunks/{importer-Dz7tI8Sa.js → importer-CbX2_rNF.js} +617 -115
- package/dist/chunks/importer-CbX2_rNF.js.map +1 -0
- package/dist/chunks/{importer-D794XUTe.js → importer-CdzeN6X4.js} +31 -8
- package/dist/chunks/importer-CdzeN6X4.js.map +1 -0
- package/dist/chunks/{importer-xZ-3suY1.js → importer-ChKNC_GN.js} +791 -135
- package/dist/chunks/importer-ChKNC_GN.js.map +1 -0
- package/dist/chunks/{importer-C98dpSH4.js → importer-dwoYpSqb.js} +141 -82
- package/dist/chunks/importer-dwoYpSqb.js.map +1 -0
- package/dist/chunks/index-B9fdNpTA.js +4310 -0
- package/dist/chunks/index-B9fdNpTA.js.map +1 -0
- package/dist/chunks/{json-elements-DKSqpNW1.js → json-elements-C4FwgnH5.js} +123 -32
- package/dist/chunks/json-elements-C4FwgnH5.js.map +1 -0
- package/dist/chunks/lexicon-B-knUi-l.js +508 -0
- package/dist/chunks/lexicon-B-knUi-l.js.map +1 -0
- package/dist/chunks/{ontology-export-CtRXjg_i.js → ontology-export-BSpbY5FL.js} +3 -2
- package/dist/chunks/{ontology-export-CtRXjg_i.js.map → ontology-export-BSpbY5FL.js.map} +1 -1
- package/dist/chunks/{records-Cu4bxYOm.js → records-Nwz_rbNt.js} +2 -2
- package/dist/chunks/{records-Cu4bxYOm.js.map → records-Nwz_rbNt.js.map} +1 -1
- package/dist/chunks/styles-Brt9JMfs.js +690 -0
- package/dist/chunks/styles-Brt9JMfs.js.map +1 -0
- package/dist/chunks/styles-_N-C8S-U.js +2102 -0
- package/dist/chunks/styles-_N-C8S-U.js.map +1 -0
- package/dist/chunks/styles-yed-DAfcIkf7.js +842 -0
- package/dist/chunks/styles-yed-DAfcIkf7.js.map +1 -0
- package/dist/chunks/{text-DHOJXnED.js → text-CgzMqHQb.js} +2 -2
- package/dist/chunks/{text-DHOJXnED.js.map → text-CgzMqHQb.js.map} +1 -1
- package/dist/chunks/units-XMZFIFe1.js +19 -0
- package/dist/chunks/units-XMZFIFe1.js.map +1 -0
- package/dist/csv.js +5 -4
- package/dist/csv.js.map +1 -1
- package/dist/cx.js +1 -1
- package/dist/cx2.js +2 -2
- package/dist/cys.js +1 -1
- package/dist/dot.js +5 -2
- package/dist/dot.js.map +1 -1
- package/dist/gexf.js +292 -412
- package/dist/gexf.js.map +1 -1
- package/dist/gml.js +8 -3031
- package/dist/gml.js.map +1 -1
- package/dist/graph-io.js +354 -240
- package/dist/graph-io.js.map +1 -1
- package/dist/graphml.js +4 -2
- package/dist/graphml.js.map +1 -1
- package/dist/json.js +1 -1
- package/dist/neo4j.js +4 -3
- package/dist/neo4j.js.map +1 -1
- package/dist/obo.js +1 -1
- package/dist/pajek.js +4 -2
- package/dist/positions.d.ts +1 -0
- package/dist/positions.js +427 -0
- package/dist/positions.js.map +1 -0
- package/dist/src/common/codes.d.ts +6 -0
- package/dist/src/common/codes.d.ts.map +1 -1
- package/dist/src/common/codes.js +6 -0
- package/dist/src/common/codes.js.map +1 -1
- package/dist/src/common/escape.d.ts.map +1 -1
- package/dist/src/common/escape.js +4 -2
- package/dist/src/common/escape.js.map +1 -1
- package/dist/src/common/export.d.ts +10 -0
- package/dist/src/common/export.d.ts.map +1 -1
- package/dist/src/common/export.js +123 -100
- package/dist/src/common/export.js.map +1 -1
- package/dist/src/common/input.d.ts.map +1 -1
- package/dist/src/common/input.js +8 -1
- package/dist/src/common/input.js.map +1 -1
- package/dist/src/common/json-elements.d.ts +12 -9
- package/dist/src/common/json-elements.d.ts.map +1 -1
- package/dist/src/common/json-elements.js +160 -37
- package/dist/src/common/json-elements.js.map +1 -1
- package/dist/src/common/notes.d.ts +42 -0
- package/dist/src/common/notes.d.ts.map +1 -0
- package/dist/src/common/notes.js +72 -0
- package/dist/src/common/notes.js.map +1 -0
- package/dist/src/common/report.d.ts +18 -0
- package/dist/src/common/report.d.ts.map +1 -1
- package/dist/src/common/report.js +36 -1
- package/dist/src/common/report.js.map +1 -1
- package/dist/src/common/units.d.ts +24 -0
- package/dist/src/common/units.d.ts.map +1 -0
- package/dist/src/common/units.js +26 -0
- package/dist/src/common/units.js.map +1 -0
- package/dist/src/common/xml.d.ts +18 -0
- package/dist/src/common/xml.d.ts.map +1 -1
- package/dist/src/common/xml.js +42 -5
- package/dist/src/common/xml.js.map +1 -1
- package/dist/src/formats/cx/exporter.d.ts +6 -0
- package/dist/src/formats/cx/exporter.d.ts.map +1 -1
- package/dist/src/formats/cx/exporter.js +71 -8
- package/dist/src/formats/cx/exporter.js.map +1 -1
- package/dist/src/formats/cx/importer.d.ts +5 -2
- package/dist/src/formats/cx/importer.d.ts.map +1 -1
- package/dist/src/formats/cx/importer.js +102 -72
- package/dist/src/formats/cx/importer.js.map +1 -1
- package/dist/src/formats/cx/styles.d.ts +102 -0
- package/dist/src/formats/cx/styles.d.ts.map +1 -0
- package/dist/src/formats/cx/styles.js +225 -0
- package/dist/src/formats/cx/styles.js.map +1 -0
- package/dist/src/formats/cx2/exporter.d.ts +5 -0
- package/dist/src/formats/cx2/exporter.d.ts.map +1 -1
- package/dist/src/formats/cx2/exporter.js +181 -71
- package/dist/src/formats/cx2/exporter.js.map +1 -1
- package/dist/src/formats/cx2/importer.d.ts +4 -1
- package/dist/src/formats/cx2/importer.d.ts.map +1 -1
- package/dist/src/formats/cx2/importer.js +19 -1
- package/dist/src/formats/cx2/importer.js.map +1 -1
- package/dist/src/formats/cx2/styles.d.ts +18 -0
- package/dist/src/formats/cx2/styles.d.ts.map +1 -0
- package/dist/src/formats/cx2/styles.js +24 -0
- package/dist/src/formats/cx2/styles.js.map +1 -0
- package/dist/src/formats/cys/constants.d.ts +2 -0
- package/dist/src/formats/cys/constants.d.ts.map +1 -1
- package/dist/src/formats/cys/constants.js +2 -0
- package/dist/src/formats/cys/constants.js.map +1 -1
- package/dist/src/formats/cys/exporter.d.ts +6 -2
- package/dist/src/formats/cys/exporter.d.ts.map +1 -1
- package/dist/src/formats/cys/exporter.js +215 -53
- package/dist/src/formats/cys/exporter.js.map +1 -1
- package/dist/src/formats/cys/importer.d.ts +2 -1
- package/dist/src/formats/cys/importer.d.ts.map +1 -1
- package/dist/src/formats/cys/importer.js +119 -6
- package/dist/src/formats/cys/importer.js.map +1 -1
- package/dist/src/formats/cys/session.d.ts +2 -0
- package/dist/src/formats/cys/session.d.ts.map +1 -1
- package/dist/src/formats/cys/session.js +5 -0
- package/dist/src/formats/cys/session.js.map +1 -1
- package/dist/src/formats/cys/styles.d.ts +38 -0
- package/dist/src/formats/cys/styles.d.ts.map +1 -0
- package/dist/src/formats/cys/styles.js +213 -0
- package/dist/src/formats/cys/styles.js.map +1 -0
- package/dist/src/formats/cys/tables.d.ts +8 -3
- package/dist/src/formats/cys/tables.d.ts.map +1 -1
- package/dist/src/formats/cys/tables.js +88 -34
- package/dist/src/formats/cys/tables.js.map +1 -1
- package/dist/src/formats/dot/exporter.d.ts +2 -0
- package/dist/src/formats/dot/exporter.d.ts.map +1 -1
- package/dist/src/formats/dot/exporter.js +195 -81
- package/dist/src/formats/dot/exporter.js.map +1 -1
- package/dist/src/formats/dot/importer.d.ts.map +1 -1
- package/dist/src/formats/dot/importer.js +100 -20
- package/dist/src/formats/dot/importer.js.map +1 -1
- package/dist/src/formats/dot/index.d.ts +1 -0
- package/dist/src/formats/dot/index.d.ts.map +1 -1
- package/dist/src/formats/dot/index.js +1 -0
- package/dist/src/formats/dot/index.js.map +1 -1
- package/dist/src/formats/dot/positions.d.ts +14 -0
- package/dist/src/formats/dot/positions.d.ts.map +1 -0
- package/dist/src/formats/dot/positions.js +70 -0
- package/dist/src/formats/dot/positions.js.map +1 -0
- package/dist/src/formats/dot/styles.d.ts +82 -0
- package/dist/src/formats/dot/styles.d.ts.map +1 -0
- package/dist/src/formats/dot/styles.js +1484 -0
- package/dist/src/formats/dot/styles.js.map +1 -0
- package/dist/src/formats/gexf/exporter.d.ts.map +1 -1
- package/dist/src/formats/gexf/exporter.js +20 -5
- package/dist/src/formats/gexf/exporter.js.map +1 -1
- package/dist/src/formats/gexf/importer.d.ts +8 -1
- package/dist/src/formats/gexf/importer.d.ts.map +1 -1
- package/dist/src/formats/gexf/importer.js +251 -131
- package/dist/src/formats/gexf/importer.js.map +1 -1
- package/dist/src/formats/gexf/index.d.ts +8 -0
- package/dist/src/formats/gexf/index.d.ts.map +1 -1
- package/dist/src/formats/gexf/index.js +10 -2
- package/dist/src/formats/gexf/index.js.map +1 -1
- package/dist/src/formats/gexf/schema.d.ts +5 -0
- package/dist/src/formats/gexf/schema.d.ts.map +1 -1
- package/dist/src/formats/gexf/schema.js +5 -0
- package/dist/src/formats/gexf/schema.js.map +1 -1
- package/dist/src/formats/gexf/styles.d.ts +74 -0
- package/dist/src/formats/gexf/styles.d.ts.map +1 -0
- package/dist/src/formats/gexf/styles.js +604 -0
- package/dist/src/formats/gexf/styles.js.map +1 -0
- package/dist/src/formats/gml/exporter.d.ts +1 -5
- package/dist/src/formats/gml/exporter.d.ts.map +1 -1
- package/dist/src/formats/gml/exporter.js +19 -8
- package/dist/src/formats/gml/exporter.js.map +1 -1
- package/dist/src/formats/gml/importer.d.ts.map +1 -1
- package/dist/src/formats/gml/importer.js +4 -0
- package/dist/src/formats/gml/importer.js.map +1 -1
- package/dist/src/formats/gml/index.d.ts +2 -1
- package/dist/src/formats/gml/index.d.ts.map +1 -1
- package/dist/src/formats/gml/index.js +2 -1
- package/dist/src/formats/gml/index.js.map +1 -1
- package/dist/src/formats/gml/positions.d.ts +14 -0
- package/dist/src/formats/gml/positions.d.ts.map +1 -0
- package/dist/src/formats/gml/positions.js +46 -0
- package/dist/src/formats/gml/positions.js.map +1 -0
- package/dist/src/formats/gml/styles.d.ts +59 -0
- package/dist/src/formats/gml/styles.d.ts.map +1 -0
- package/dist/src/formats/gml/styles.js +1056 -0
- package/dist/src/formats/gml/styles.js.map +1 -0
- package/dist/src/formats/gml/syntax.d.ts +11 -0
- package/dist/src/formats/gml/syntax.d.ts.map +1 -1
- package/dist/src/formats/gml/syntax.js +151 -62
- package/dist/src/formats/gml/syntax.js.map +1 -1
- package/dist/src/formats/graphml/constants.d.ts +4 -0
- package/dist/src/formats/graphml/constants.d.ts.map +1 -1
- package/dist/src/formats/graphml/constants.js +5 -1
- package/dist/src/formats/graphml/constants.js.map +1 -1
- package/dist/src/formats/graphml/exporter.d.ts.map +1 -1
- package/dist/src/formats/graphml/exporter.js +133 -65
- package/dist/src/formats/graphml/exporter.js.map +1 -1
- package/dist/src/formats/graphml/importer.d.ts +4 -1
- package/dist/src/formats/graphml/importer.d.ts.map +1 -1
- package/dist/src/formats/graphml/importer.js +100 -44
- package/dist/src/formats/graphml/importer.js.map +1 -1
- package/dist/src/formats/graphml/index.d.ts +1 -0
- package/dist/src/formats/graphml/index.d.ts.map +1 -1
- package/dist/src/formats/graphml/index.js +1 -0
- package/dist/src/formats/graphml/index.js.map +1 -1
- package/dist/src/formats/graphml/styles-plain.d.ts +19 -0
- package/dist/src/formats/graphml/styles-plain.d.ts.map +1 -0
- package/dist/src/formats/graphml/styles-plain.js +187 -0
- package/dist/src/formats/graphml/styles-plain.js.map +1 -0
- package/dist/src/formats/graphml/styles-yed.d.ts +179 -0
- package/dist/src/formats/graphml/styles-yed.d.ts.map +1 -0
- package/dist/src/formats/graphml/styles-yed.js +1086 -0
- package/dist/src/formats/graphml/styles-yed.js.map +1 -0
- package/dist/src/formats/graphml/styles-yfiles3.d.ts +19 -0
- package/dist/src/formats/graphml/styles-yfiles3.d.ts.map +1 -0
- package/dist/src/formats/graphml/styles-yfiles3.js +508 -0
- package/dist/src/formats/graphml/styles-yfiles3.js.map +1 -0
- package/dist/src/formats/graphml/tree.d.ts.map +1 -1
- package/dist/src/formats/graphml/tree.js +34 -19
- package/dist/src/formats/graphml/tree.js.map +1 -1
- package/dist/src/formats/graphml/yfiles.d.ts +16 -2
- package/dist/src/formats/graphml/yfiles.d.ts.map +1 -1
- package/dist/src/formats/graphml/yfiles.js +83 -12
- package/dist/src/formats/graphml/yfiles.js.map +1 -1
- package/dist/src/formats/json/exporter.d.ts +5 -0
- package/dist/src/formats/json/exporter.d.ts.map +1 -1
- package/dist/src/formats/json/exporter.js +68 -25
- package/dist/src/formats/json/exporter.js.map +1 -1
- package/dist/src/formats/json/importer.d.ts +22 -3
- package/dist/src/formats/json/importer.d.ts.map +1 -1
- package/dist/src/formats/json/importer.js +439 -264
- package/dist/src/formats/json/importer.js.map +1 -1
- package/dist/src/formats/json/positions.d.ts +16 -0
- package/dist/src/formats/json/positions.d.ts.map +1 -0
- package/dist/src/formats/json/positions.js +44 -0
- package/dist/src/formats/json/positions.js.map +1 -0
- package/dist/src/formats/json/styles.d.ts +102 -0
- package/dist/src/formats/json/styles.d.ts.map +1 -0
- package/dist/src/formats/json/styles.js +1753 -0
- package/dist/src/formats/json/styles.js.map +1 -0
- package/dist/src/formats/neo4j/exporter.d.ts.map +1 -1
- package/dist/src/formats/neo4j/exporter.js +2 -1
- package/dist/src/formats/neo4j/exporter.js.map +1 -1
- package/dist/src/formats/pajek/exporter.d.ts +2 -0
- package/dist/src/formats/pajek/exporter.d.ts.map +1 -1
- package/dist/src/formats/pajek/exporter.js +142 -76
- package/dist/src/formats/pajek/exporter.js.map +1 -1
- package/dist/src/formats/pajek/importer.d.ts +4 -0
- package/dist/src/formats/pajek/importer.d.ts.map +1 -1
- package/dist/src/formats/pajek/importer.js +60 -6
- package/dist/src/formats/pajek/importer.js.map +1 -1
- package/dist/src/formats/pajek/index.d.ts +2 -0
- package/dist/src/formats/pajek/index.d.ts.map +1 -1
- package/dist/src/formats/pajek/index.js +2 -0
- package/dist/src/formats/pajek/index.js.map +1 -1
- package/dist/src/formats/pajek/styles.d.ts +50 -0
- package/dist/src/formats/pajek/styles.d.ts.map +1 -0
- package/dist/src/formats/pajek/styles.js +569 -0
- package/dist/src/formats/pajek/styles.js.map +1 -0
- package/dist/src/formats/pajek/syntax.d.ts +6 -0
- package/dist/src/formats/pajek/syntax.d.ts.map +1 -1
- package/dist/src/formats/pajek/syntax.js +6 -0
- package/dist/src/formats/pajek/syntax.js.map +1 -1
- package/dist/src/formats/xgmml/columns.d.ts.map +1 -1
- package/dist/src/formats/xgmml/columns.js +34 -9
- package/dist/src/formats/xgmml/columns.js.map +1 -1
- package/dist/src/formats/xgmml/constants.d.ts +2 -0
- package/dist/src/formats/xgmml/constants.d.ts.map +1 -1
- package/dist/src/formats/xgmml/constants.js +3 -1
- package/dist/src/formats/xgmml/constants.js.map +1 -1
- package/dist/src/formats/xgmml/document.d.ts +12 -8
- package/dist/src/formats/xgmml/document.d.ts.map +1 -1
- package/dist/src/formats/xgmml/document.js +56 -13
- package/dist/src/formats/xgmml/document.js.map +1 -1
- package/dist/src/formats/xgmml/emit.d.ts.map +1 -1
- package/dist/src/formats/xgmml/emit.js +12 -6
- package/dist/src/formats/xgmml/emit.js.map +1 -1
- package/dist/src/formats/xgmml/exporter.d.ts +3 -1
- package/dist/src/formats/xgmml/exporter.d.ts.map +1 -1
- package/dist/src/formats/xgmml/exporter.js +22 -9
- package/dist/src/formats/xgmml/exporter.js.map +1 -1
- package/dist/src/formats/xgmml/importer.d.ts +2 -1
- package/dist/src/formats/xgmml/importer.d.ts.map +1 -1
- package/dist/src/formats/xgmml/importer.js +31 -24
- package/dist/src/formats/xgmml/importer.js.map +1 -1
- package/dist/src/formats/xgmml/styles.d.ts +104 -0
- package/dist/src/formats/xgmml/styles.d.ts.map +1 -0
- package/dist/src/formats/xgmml/styles.js +310 -0
- package/dist/src/formats/xgmml/styles.js.map +1 -0
- package/dist/src/index.d.ts +9 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -7
- package/dist/src/index.js.map +1 -1
- package/dist/src/positions/codes.d.ts +31 -0
- package/dist/src/positions/codes.d.ts.map +1 -0
- package/dist/src/positions/codes.js +26 -0
- package/dist/src/positions/codes.js.map +1 -0
- package/dist/src/positions/convert.d.ts +58 -0
- package/dist/src/positions/convert.d.ts.map +1 -0
- package/dist/src/positions/convert.js +107 -0
- package/dist/src/positions/convert.js.map +1 -0
- package/dist/src/positions/extract.d.ts +27 -0
- package/dist/src/positions/extract.d.ts.map +1 -0
- package/dist/src/positions/extract.js +526 -0
- package/dist/src/positions/extract.js.map +1 -0
- package/dist/src/positions/index.d.ts +10 -0
- package/dist/src/positions/index.d.ts.map +1 -0
- package/dist/src/positions/index.js +9 -0
- package/dist/src/positions/index.js.map +1 -0
- package/dist/src/positions/types.d.ts +208 -0
- package/dist/src/positions/types.d.ts.map +1 -0
- package/dist/src/positions/types.js +10 -0
- package/dist/src/positions/types.js.map +1 -0
- package/dist/src/registry.d.ts +30 -0
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +130 -9
- package/dist/src/registry.js.map +1 -1
- package/dist/src/styles/annotations.d.ts +132 -0
- package/dist/src/styles/annotations.d.ts.map +1 -0
- package/dist/src/styles/annotations.js +320 -0
- package/dist/src/styles/annotations.js.map +1 -0
- package/dist/src/styles/budget.d.ts +45 -0
- package/dist/src/styles/budget.d.ts.map +1 -0
- package/dist/src/styles/budget.js +58 -0
- package/dist/src/styles/budget.js.map +1 -0
- package/dist/src/styles/canon/bends.d.ts +32 -0
- package/dist/src/styles/canon/bends.d.ts.map +1 -0
- package/dist/src/styles/canon/bends.js +74 -0
- package/dist/src/styles/canon/bends.js.map +1 -0
- package/dist/src/styles/canon/color-tables.d.ts +22 -0
- package/dist/src/styles/canon/color-tables.d.ts.map +1 -0
- package/dist/src/styles/canon/color-tables.js +369 -0
- package/dist/src/styles/canon/color-tables.js.map +1 -0
- package/dist/src/styles/canon/color.d.ts +66 -0
- package/dist/src/styles/canon/color.d.ts.map +1 -0
- package/dist/src/styles/canon/color.js +548 -0
- package/dist/src/styles/canon/color.js.map +1 -0
- package/dist/src/styles/canon/enums.d.ts +25 -0
- package/dist/src/styles/canon/enums.d.ts.map +1 -0
- package/dist/src/styles/canon/enums.js +187 -0
- package/dist/src/styles/canon/enums.js.map +1 -0
- package/dist/src/styles/canon/graphviz.d.ts +48 -0
- package/dist/src/styles/canon/graphviz.d.ts.map +1 -0
- package/dist/src/styles/canon/graphviz.js +160 -0
- package/dist/src/styles/canon/graphviz.js.map +1 -0
- package/dist/src/styles/canon/index.d.ts +13 -0
- package/dist/src/styles/canon/index.d.ts.map +1 -0
- package/dist/src/styles/canon/index.js +13 -0
- package/dist/src/styles/canon/index.js.map +1 -0
- package/dist/src/styles/canon/number.d.ts +59 -0
- package/dist/src/styles/canon/number.d.ts.map +1 -0
- package/dist/src/styles/canon/number.js +142 -0
- package/dist/src/styles/canon/number.js.map +1 -0
- package/dist/src/styles/canon/site.d.ts +51 -0
- package/dist/src/styles/canon/site.d.ts.map +1 -0
- package/dist/src/styles/canon/site.js +63 -0
- package/dist/src/styles/canon/site.js.map +1 -0
- package/dist/src/styles/canon/text.d.ts +61 -0
- package/dist/src/styles/canon/text.d.ts.map +1 -0
- package/dist/src/styles/canon/text.js +199 -0
- package/dist/src/styles/canon/text.js.map +1 -0
- package/dist/src/styles/codes.d.ts +95 -0
- package/dist/src/styles/codes.d.ts.map +1 -0
- package/dist/src/styles/codes.js +97 -0
- package/dist/src/styles/codes.js.map +1 -0
- package/dist/src/styles/cyjs/cascade.d.ts +134 -0
- package/dist/src/styles/cyjs/cascade.d.ts.map +1 -0
- package/dist/src/styles/cyjs/cascade.js +2252 -0
- package/dist/src/styles/cyjs/cascade.js.map +1 -0
- package/dist/src/styles/cyjs/defaults-table.d.ts +25 -0
- package/dist/src/styles/cyjs/defaults-table.d.ts.map +1 -0
- package/dist/src/styles/cyjs/defaults-table.js +76 -0
- package/dist/src/styles/cyjs/defaults-table.js.map +1 -0
- package/dist/src/styles/cyjs/emit.d.ts +82 -0
- package/dist/src/styles/cyjs/emit.d.ts.map +1 -0
- package/dist/src/styles/cyjs/emit.js +790 -0
- package/dist/src/styles/cyjs/emit.js.map +1 -0
- package/dist/src/styles/cyjs/index.d.ts +13 -0
- package/dist/src/styles/cyjs/index.d.ts.map +1 -0
- package/dist/src/styles/cyjs/index.js +13 -0
- package/dist/src/styles/cyjs/index.js.map +1 -0
- package/dist/src/styles/cyjs/live.d.ts +46 -0
- package/dist/src/styles/cyjs/live.d.ts.map +1 -0
- package/dist/src/styles/cyjs/live.js +108 -0
- package/dist/src/styles/cyjs/live.js.map +1 -0
- package/dist/src/styles/cyjs/mappers.d.ts +147 -0
- package/dist/src/styles/cyjs/mappers.d.ts.map +1 -0
- package/dist/src/styles/cyjs/mappers.js +744 -0
- package/dist/src/styles/cyjs/mappers.js.map +1 -0
- package/dist/src/styles/cyjs/selector.d.ts +113 -0
- package/dist/src/styles/cyjs/selector.d.ts.map +1 -0
- package/dist/src/styles/cyjs/selector.js +611 -0
- package/dist/src/styles/cyjs/selector.js.map +1 -0
- package/dist/src/styles/cyjs/stylesheet-text.d.ts +37 -0
- package/dist/src/styles/cyjs/stylesheet-text.d.ts.map +1 -0
- package/dist/src/styles/cyjs/stylesheet-text.js +181 -0
- package/dist/src/styles/cyjs/stylesheet-text.js.map +1 -0
- package/dist/src/styles/cytoscape/emit.d.ts +125 -0
- package/dist/src/styles/cytoscape/emit.d.ts.map +1 -0
- package/dist/src/styles/cytoscape/emit.js +1025 -0
- package/dist/src/styles/cytoscape/emit.js.map +1 -0
- package/dist/src/styles/cytoscape/index.d.ts +10 -0
- package/dist/src/styles/cytoscape/index.d.ts.map +1 -0
- package/dist/src/styles/cytoscape/index.js +10 -0
- package/dist/src/styles/cytoscape/index.js.map +1 -0
- package/dist/src/styles/cytoscape/lexicon.d.ts +49 -0
- package/dist/src/styles/cytoscape/lexicon.d.ts.map +1 -0
- package/dist/src/styles/cytoscape/lexicon.js +603 -0
- package/dist/src/styles/cytoscape/lexicon.js.map +1 -0
- package/dist/src/styles/cytoscape/mappings.d.ts +171 -0
- package/dist/src/styles/cytoscape/mappings.d.ts.map +1 -0
- package/dist/src/styles/cytoscape/mappings.js +460 -0
- package/dist/src/styles/cytoscape/mappings.js.map +1 -0
- package/dist/src/styles/cytoscape/resolve.d.ts +137 -0
- package/dist/src/styles/cytoscape/resolve.d.ts.map +1 -0
- package/dist/src/styles/cytoscape/resolve.js +381 -0
- package/dist/src/styles/cytoscape/resolve.js.map +1 -0
- package/dist/src/styles/cytoscape/translate.d.ts +50 -0
- package/dist/src/styles/cytoscape/translate.d.ts.map +1 -0
- package/dist/src/styles/cytoscape/translate.js +156 -0
- package/dist/src/styles/cytoscape/translate.js.map +1 -0
- package/dist/src/styles/defaults.d.ts +90 -0
- package/dist/src/styles/defaults.d.ts.map +1 -0
- package/dist/src/styles/defaults.js +414 -0
- package/dist/src/styles/defaults.js.map +1 -0
- package/dist/src/styles/index.d.ts +15 -0
- package/dist/src/styles/index.d.ts.map +1 -0
- package/dist/src/styles/index.js +14 -0
- package/dist/src/styles/index.js.map +1 -0
- package/dist/src/styles/internal.d.ts +17 -0
- package/dist/src/styles/internal.d.ts.map +1 -0
- package/dist/src/styles/internal.js +16 -0
- package/dist/src/styles/internal.js.map +1 -0
- package/dist/src/styles/io/approximations.d.ts +24 -0
- package/dist/src/styles/io/approximations.d.ts.map +1 -0
- package/dist/src/styles/io/approximations.js +51 -0
- package/dist/src/styles/io/approximations.js.map +1 -0
- package/dist/src/styles/io/block.d.ts +166 -0
- package/dist/src/styles/io/block.d.ts.map +1 -0
- package/dist/src/styles/io/block.js +930 -0
- package/dist/src/styles/io/block.js.map +1 -0
- package/dist/src/styles/io/generic.d.ts +88 -0
- package/dist/src/styles/io/generic.d.ts.map +1 -0
- package/dist/src/styles/io/generic.js +516 -0
- package/dist/src/styles/io/generic.js.map +1 -0
- package/dist/src/styles/io/index.d.ts +8 -0
- package/dist/src/styles/io/index.d.ts.map +1 -0
- package/dist/src/styles/io/index.js +7 -0
- package/dist/src/styles/io/index.js.map +1 -0
- package/dist/src/styles/io/writer.d.ts +80 -0
- package/dist/src/styles/io/writer.d.ts.map +1 -0
- package/dist/src/styles/io/writer.js +596 -0
- package/dist/src/styles/io/writer.js.map +1 -0
- package/dist/src/styles/notes.d.ts +47 -0
- package/dist/src/styles/notes.d.ts.map +1 -0
- package/dist/src/styles/notes.js +140 -0
- package/dist/src/styles/notes.js.map +1 -0
- package/dist/src/styles/plan/classes.d.ts +31 -0
- package/dist/src/styles/plan/classes.d.ts.map +1 -0
- package/dist/src/styles/plan/classes.js +139 -0
- package/dist/src/styles/plan/classes.js.map +1 -0
- package/dist/src/styles/plan/continuous.d.ts +32 -0
- package/dist/src/styles/plan/continuous.d.ts.map +1 -0
- package/dist/src/styles/plan/continuous.js +165 -0
- package/dist/src/styles/plan/continuous.js.map +1 -0
- package/dist/src/styles/plan/discrete.d.ts +39 -0
- package/dist/src/styles/plan/discrete.d.ts.map +1 -0
- package/dist/src/styles/plan/discrete.js +127 -0
- package/dist/src/styles/plan/discrete.js.map +1 -0
- package/dist/src/styles/plan/families.d.ts +31 -0
- package/dist/src/styles/plan/families.d.ts.map +1 -0
- package/dist/src/styles/plan/families.js +95 -0
- package/dist/src/styles/plan/families.js.map +1 -0
- package/dist/src/styles/plan/features.d.ts +58 -0
- package/dist/src/styles/plan/features.d.ts.map +1 -0
- package/dist/src/styles/plan/features.js +185 -0
- package/dist/src/styles/plan/features.js.map +1 -0
- package/dist/src/styles/plan/index.d.ts +7 -0
- package/dist/src/styles/plan/index.d.ts.map +1 -0
- package/dist/src/styles/plan/index.js +7 -0
- package/dist/src/styles/plan/index.js.map +1 -0
- package/dist/src/styles/plan/plan.d.ts +71 -0
- package/dist/src/styles/plan/plan.d.ts.map +1 -0
- package/dist/src/styles/plan/plan.js +893 -0
- package/dist/src/styles/plan/plan.js.map +1 -0
- package/dist/src/styles/plan/resolve.d.ts +137 -0
- package/dist/src/styles/plan/resolve.d.ts.map +1 -0
- package/dist/src/styles/plan/resolve.js +587 -0
- package/dist/src/styles/plan/resolve.js.map +1 -0
- package/dist/src/styles/types.d.ts +702 -0
- package/dist/src/styles/types.d.ts.map +1 -0
- package/dist/src/styles/types.js +10 -0
- package/dist/src/styles/types.js.map +1 -0
- package/dist/src/styles/vocabulary.d.ts +41 -0
- package/dist/src/styles/vocabulary.d.ts.map +1 -0
- package/dist/src/styles/vocabulary.js +140 -0
- package/dist/src/styles/vocabulary.js.map +1 -0
- package/dist/src/types.d.ts +64 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/styles.d.ts +1 -0
- package/dist/styles.js +322 -0
- package/dist/styles.js.map +1 -0
- package/dist/xgmml.js +5 -4
- package/dist/xgmml.js.map +1 -1
- package/package.json +13 -2
- package/src/common/codes.ts +7 -0
- package/src/common/escape.ts +5 -2
- package/src/common/export.ts +179 -140
- package/src/common/input.ts +8 -4
- package/src/common/json-elements.ts +169 -38
- package/src/common/notes.ts +94 -0
- package/src/common/report.ts +41 -1
- package/src/common/units.ts +42 -0
- package/src/common/xml.ts +45 -5
- package/src/formats/cx/exporter.ts +95 -11
- package/src/formats/cx/importer.ts +126 -90
- package/src/formats/cx/styles.ts +304 -0
- package/src/formats/cx2/exporter.ts +234 -77
- package/src/formats/cx2/importer.ts +19 -1
- package/src/formats/cx2/styles.ts +29 -0
- package/src/formats/cys/constants.ts +3 -0
- package/src/formats/cys/exporter.ts +246 -60
- package/src/formats/cys/importer.ts +125 -9
- package/src/formats/cys/session.ts +6 -0
- package/src/formats/cys/styles.ts +254 -0
- package/src/formats/cys/tables.ts +117 -48
- package/src/formats/dot/exporter.ts +262 -126
- package/src/formats/dot/importer.ts +111 -20
- package/src/formats/dot/index.ts +1 -0
- package/src/formats/dot/positions.ts +77 -0
- package/src/formats/dot/styles.ts +1741 -0
- package/src/formats/gexf/exporter.ts +27 -11
- package/src/formats/gexf/importer.ts +308 -158
- package/src/formats/gexf/index.ts +10 -0
- package/src/formats/gexf/schema.ts +5 -0
- package/src/formats/gexf/styles.ts +719 -0
- package/src/formats/gml/exporter.ts +33 -14
- package/src/formats/gml/importer.ts +4 -0
- package/src/formats/gml/index.ts +2 -1
- package/src/formats/gml/positions.ts +52 -0
- package/src/formats/gml/styles.ts +1248 -0
- package/src/formats/gml/syntax.ts +173 -62
- package/src/formats/graphml/constants.ts +5 -0
- package/src/formats/graphml/exporter.ts +163 -71
- package/src/formats/graphml/importer.ts +119 -45
- package/src/formats/graphml/index.ts +1 -0
- package/src/formats/graphml/styles-plain.ts +236 -0
- package/src/formats/graphml/styles-yed.ts +1221 -0
- package/src/formats/graphml/styles-yfiles3.ts +573 -0
- package/src/formats/graphml/tree.ts +36 -20
- package/src/formats/graphml/yfiles.ts +89 -13
- package/src/formats/json/exporter.ts +76 -26
- package/src/formats/json/importer.ts +541 -322
- package/src/formats/json/positions.ts +50 -0
- package/src/formats/json/styles.ts +2082 -0
- package/src/formats/neo4j/exporter.ts +2 -1
- package/src/formats/pajek/exporter.ts +195 -106
- package/src/formats/pajek/importer.ts +78 -9
- package/src/formats/pajek/index.ts +2 -0
- package/src/formats/pajek/styles.ts +685 -0
- package/src/formats/pajek/syntax.ts +7 -0
- package/src/formats/xgmml/columns.ts +39 -9
- package/src/formats/xgmml/constants.ts +3 -0
- package/src/formats/xgmml/document.ts +54 -12
- package/src/formats/xgmml/emit.ts +11 -6
- package/src/formats/xgmml/exporter.ts +32 -13
- package/src/formats/xgmml/importer.ts +43 -29
- package/src/formats/xgmml/styles.ts +400 -0
- package/src/index.ts +16 -0
- package/src/positions/codes.ts +32 -0
- package/src/positions/convert.ts +123 -0
- package/src/positions/extract.ts +619 -0
- package/src/positions/index.ts +23 -0
- package/src/positions/types.ts +221 -0
- package/src/registry.ts +179 -8
- package/src/styles/annotations.ts +478 -0
- package/src/styles/budget.ts +60 -0
- package/src/styles/canon/bends.ts +84 -0
- package/src/styles/canon/color-tables.ts +386 -0
- package/src/styles/canon/color.ts +624 -0
- package/src/styles/canon/enums.ts +211 -0
- package/src/styles/canon/graphviz.ts +189 -0
- package/src/styles/canon/index.ts +13 -0
- package/src/styles/canon/number.ts +152 -0
- package/src/styles/canon/site.ts +87 -0
- package/src/styles/canon/text.ts +221 -0
- package/src/styles/codes.ts +104 -0
- package/src/styles/cyjs/cascade.ts +2670 -0
- package/src/styles/cyjs/defaults-table.ts +82 -0
- package/src/styles/cyjs/emit.ts +951 -0
- package/src/styles/cyjs/index.ts +37 -0
- package/src/styles/cyjs/live.ts +147 -0
- package/src/styles/cyjs/mappers.ts +879 -0
- package/src/styles/cyjs/selector.ts +778 -0
- package/src/styles/cyjs/stylesheet-text.ts +214 -0
- package/src/styles/cytoscape/emit.ts +1264 -0
- package/src/styles/cytoscape/index.ts +40 -0
- package/src/styles/cytoscape/lexicon.ts +656 -0
- package/src/styles/cytoscape/mappings.ts +603 -0
- package/src/styles/cytoscape/resolve.ts +521 -0
- package/src/styles/cytoscape/translate.ts +237 -0
- package/src/styles/defaults.ts +504 -0
- package/src/styles/index.ts +57 -0
- package/src/styles/internal.ts +17 -0
- package/src/styles/io/approximations.ts +47 -0
- package/src/styles/io/block.ts +1138 -0
- package/src/styles/io/generic.ts +687 -0
- package/src/styles/io/index.ts +18 -0
- package/src/styles/io/writer.ts +745 -0
- package/src/styles/notes.ts +165 -0
- package/src/styles/plan/classes.ts +166 -0
- package/src/styles/plan/continuous.ts +218 -0
- package/src/styles/plan/discrete.ts +165 -0
- package/src/styles/plan/families.ts +115 -0
- package/src/styles/plan/features.ts +234 -0
- package/src/styles/plan/index.ts +7 -0
- package/src/styles/plan/plan.ts +1129 -0
- package/src/styles/plan/resolve.ts +685 -0
- package/src/styles/types.ts +814 -0
- package/src/styles/vocabulary.ts +172 -0
- package/src/types.ts +76 -1
- package/dist/chunks/constants-fT3E8JYY.js.map +0 -1
- package/dist/chunks/escape-B62ZGM_a.js.map +0 -1
- package/dist/chunks/export-rKLeGQMo.js.map +0 -1
- package/dist/chunks/exporter-8hLNemFk.js.map +0 -1
- package/dist/chunks/exporter-BWwEuOPT.js.map +0 -1
- package/dist/chunks/exporter-RVtXVetw.js.map +0 -1
- package/dist/chunks/importer-BbNb7eNg.js.map +0 -1
- package/dist/chunks/importer-C98dpSH4.js.map +0 -1
- package/dist/chunks/importer-D794XUTe.js.map +0 -1
- package/dist/chunks/importer-Dz7tI8Sa.js.map +0 -1
- package/dist/chunks/importer-Ht7LNg8L.js.map +0 -1
- package/dist/chunks/importer-WrGRZb0N.js.map +0 -1
- package/dist/chunks/importer-xZ-3suY1.js.map +0 -1
- package/dist/chunks/json-elements-DKSqpNW1.js.map +0 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -20,14 +20,14 @@ export { CSV_CAPABILITIES, CSV_ISSUE, CSV_LOSS, type CsvColumnRef, csvExporter,
|
|
|
20
20
|
export { CX_CAPABILITIES, CX_ISSUE, CX_LOSS, cxExporter, type CxExportOptions, cxImporter, type CxImportOptions, } from "./formats/cx/index.js";
|
|
21
21
|
export { CX2_CAPABILITIES, CX2_ISSUE, CX2_LOSS, cx2Exporter, type Cx2ExportOptions, cx2Importer, type Cx2ImportOptions, } from "./formats/cx2/index.js";
|
|
22
22
|
export { CYS_CAPABILITIES, CYS_ISSUE, CYS_LOSS, cysExporter, type CysExportOptions, cysImporter, type CysImportOptions, } from "./formats/cys/index.js";
|
|
23
|
-
export { DOT_ISSUE, DOT_LOSS, dotExporter, type DotExportOptions, dotImporter, type DotImportOptions, } from "./formats/dot/index.js";
|
|
24
|
-
export { GEXF_1_2_CAPABILITIES, GEXF_ISSUE, GEXF_LOSS, gexfExporter, type GexfExportOptions, gexfImporter, type GexfImportOptions, type GexfVersion, } from "./formats/gexf/index.js";
|
|
25
|
-
export { GML_ISSUE, GML_LOSS, gmlExporter, type GmlExportOptions, gmlImporter, type GmlImportOptions, } from "./formats/gml/index.js";
|
|
26
|
-
export { GRAPHML_ISSUE, GRAPHML_LOSS, graphmlExporter, type GraphmlExportOptions, graphmlImporter, type GraphmlImportOptions, } from "./formats/graphml/index.js";
|
|
23
|
+
export { DOT_ISSUE, DOT_LOSS, DOT_STYLE_BLOCK_ATTRIBUTE, DOT_STYLE_CAPABILITIES, dotExporter, type DotExportOptions, dotImporter, type DotImportOptions, } from "./formats/dot/index.js";
|
|
24
|
+
export { GEXF_1_2_CAPABILITIES, GEXF_ISSUE, GEXF_LOSS, GEXF_STYLE_CAPABILITIES, gexfExporter, type GexfExportOptions, gexfImporter, type GexfImportOptions, type GexfVersion, GRAPHTY_XML_NAMESPACE, } from "./formats/gexf/index.js";
|
|
25
|
+
export { GML_ISSUE, GML_LOSS, GML_STYLE_BLOCK_KEY, GML_STYLE_CAPABILITIES, gmlExporter, type GmlExportOptions, gmlImporter, type GmlImportOptions, } from "./formats/gml/index.js";
|
|
26
|
+
export { GRAPHML_ISSUE, GRAPHML_LOSS, GRAPHML_STYLE_CAPABILITIES, graphmlExporter, type GraphmlExportOptions, graphmlImporter, type GraphmlImportOptions, } from "./formats/graphml/index.js";
|
|
27
27
|
export { dialectCapabilities, JSON_DIALECTS, JSON_ISSUE, JSON_LOSS, jsonCapabilities, type JsonDialect, jsonExporter, type JsonExportOptions, type JsonImportDialect, jsonImporter, type JsonImportOptions, type JsonShapeMeta, jsonShapeOf, } from "./formats/json/index.js";
|
|
28
28
|
export { exportNeo4jFiles, ID_SPACE_COLUMN, LABELS_COLUMN, NEO4J_CAPABILITIES, NEO4J_ISSUE, NEO4J_LOSS, neo4jExporter, type Neo4jExportOptions, type Neo4jFile, neo4jImporter, type Neo4jImportOptions, ORIGINAL_ID_COLUMN, TYPE_COLUMN, } from "./formats/neo4j/index.js";
|
|
29
29
|
export { OBO_CAPABILITIES, OBO_ISSUE, OBO_LOSS, oboExporter, type OboExportOptions, oboImporter, type OboImportOptions, } from "./formats/obo/index.js";
|
|
30
|
-
export { PAJEK_ISSUE, PAJEK_LOSS, pajekExporter, type PajekExportOptions, pajekImporter, type PajekImportOptions, } from "./formats/pajek/index.js";
|
|
30
|
+
export { PAJEK_ISSUE, PAJEK_LOSS, PAJEK_STYLE_CAPABILITIES, PAJEK_STYLE_COMMENT, pajekExporter, type PajekExportOptions, pajekImporter, type PajekImportOptions, } from "./formats/pajek/index.js";
|
|
31
31
|
export { XGMML_ISSUE, XGMML_LOSS, xgmmlExporter, type XgmmlExportOptions, xgmmlImporter, type XgmmlImportOptions, } from "./formats/xgmml/index.js";
|
|
32
32
|
export { BAD_DEFAULT_CODE, BAD_OPTIONS_CODE, declareCompanion, declareResolved, PRECISION_CODE, RENAMED_CODE, type ResolvedDeclaration, ROLE_TAKEN_CODE, UNKNOWN_TYPE_CODE, } from "./common/attributes.js";
|
|
33
33
|
export * from "./common/codes.js";
|
|
@@ -37,9 +37,11 @@ export { formatDecimal, formatF32, formatF64, formatGmlReal, formatInteger } fro
|
|
|
37
37
|
export { canonicalId, coerceId, coerceIdText, ID_MERGED_CODE, IdCoercer, isCanonicalIntegerText, } from "./common/ids.js";
|
|
38
38
|
export { decodeEntryName, inputLength, INVALID_UTF8_CODE, isImportInput, LineReader, type ReadOptions, readText, textChunks, throwIfAborted, } from "./common/input.js";
|
|
39
39
|
export { chooseGraph, DEFAULT_ERROR_LIMIT, forDecodedText, graphChosen, type ImportFormatDefaults, reportSinkOptions, reportUnusedOptions, type ResolvedExportOptions, type ResolvedImportOptions, resolveExportOptions, resolveImportOptions, SINK_OPTION_CODE, } from "./common/options.js";
|
|
40
|
-
export { ImportReportBuilder, isAbortError, type IssueLocation, type MutableCounts, PARSE_ERROR_CODE, } from "./common/report.js";
|
|
40
|
+
export { ImportReportBuilder, isAbortError, type IssueLocation, keptForStyles, type MutableCounts, PARSE_ERROR_CODE, } from "./common/report.js";
|
|
41
41
|
export { inferTextDtype, isNumericText, parseTextCell, TextCellWriter, type TextDtype, WIDENING_UNSUPPORTED_CODE, } from "./common/text.js";
|
|
42
42
|
export { edgeWeights, type ExplicitWeights, explicitWeights, isWeightField, parseWeightText, } from "./common/weights.js";
|
|
43
43
|
export { collectBytes, decodeChunks, DEFAULT_CHUNK_BYTES, encodeChunks, joinText, type TextParts, toReadableStream, } from "./common/writer.js";
|
|
44
|
-
export { hasIllegalXmlChar, tokenizeXml, type XmlHandler, xmlIllegalTextNotes, type XmlRepairs, XmlSyntaxError, XmlTokenizer, } from "./common/xml.js";
|
|
44
|
+
export { hasIllegalXmlChar, MAX_XML_DEPTH, tokenizeXml, type XmlHandler, xmlIllegalTextNotes, XmlNestingError, type XmlRepairs, XmlSyntaxError, XmlTokenizer, } from "./common/xml.js";
|
|
45
|
+
export type { StyleImportOptions } from "./styles/io/generic.js";
|
|
46
|
+
export type { ExporterStyleInput, ExporterStyleOptions } from "./styles/io/writer.js";
|
|
45
47
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,EACH,KAAK,MAAM,EACX,YAAY,EACZ,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,aAAa,GAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGjH,OAAO,EAAE,KAAK,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAG9G,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,WAA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BAAmB,EACnB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,mBAAmB,EACnB,YAAY,EACZ,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,aAAa,EAClB,gBAAgB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,KAAK,SAAS,EACd,yBAAyB,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACH,WAAW,EACX,KAAK,eAAe,EACpB,eAAe,EACf,aAAa,EACb,eAAe,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,KAAK,SAAS,EACd,gBAAgB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,KAAK,UAAU,EACf,mBAAmB,EACnB,eAAe,EACf,KAAK,UAAU,EACf,cAAc,EACd,YAAY,GACf,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -30,14 +30,14 @@ export { CSV_CAPABILITIES, CSV_ISSUE, CSV_LOSS, csvExporter, csvImporter, } from
|
|
|
30
30
|
export { CX_CAPABILITIES, CX_ISSUE, CX_LOSS, cxExporter, cxImporter, } from "./formats/cx/index.js";
|
|
31
31
|
export { CX2_CAPABILITIES, CX2_ISSUE, CX2_LOSS, cx2Exporter, cx2Importer, } from "./formats/cx2/index.js";
|
|
32
32
|
export { CYS_CAPABILITIES, CYS_ISSUE, CYS_LOSS, cysExporter, cysImporter, } from "./formats/cys/index.js";
|
|
33
|
-
export { DOT_ISSUE, DOT_LOSS, dotExporter, dotImporter, } from "./formats/dot/index.js";
|
|
34
|
-
export { GEXF_1_2_CAPABILITIES, GEXF_ISSUE, GEXF_LOSS, gexfExporter, gexfImporter, } from "./formats/gexf/index.js";
|
|
35
|
-
export { GML_ISSUE, GML_LOSS, gmlExporter, gmlImporter, } from "./formats/gml/index.js";
|
|
36
|
-
export { GRAPHML_ISSUE, GRAPHML_LOSS, graphmlExporter, graphmlImporter, } from "./formats/graphml/index.js";
|
|
33
|
+
export { DOT_ISSUE, DOT_LOSS, DOT_STYLE_BLOCK_ATTRIBUTE, DOT_STYLE_CAPABILITIES, dotExporter, dotImporter, } from "./formats/dot/index.js";
|
|
34
|
+
export { GEXF_1_2_CAPABILITIES, GEXF_ISSUE, GEXF_LOSS, GEXF_STYLE_CAPABILITIES, gexfExporter, gexfImporter, GRAPHTY_XML_NAMESPACE, } from "./formats/gexf/index.js";
|
|
35
|
+
export { GML_ISSUE, GML_LOSS, GML_STYLE_BLOCK_KEY, GML_STYLE_CAPABILITIES, gmlExporter, gmlImporter, } from "./formats/gml/index.js";
|
|
36
|
+
export { GRAPHML_ISSUE, GRAPHML_LOSS, GRAPHML_STYLE_CAPABILITIES, graphmlExporter, graphmlImporter, } from "./formats/graphml/index.js";
|
|
37
37
|
export { dialectCapabilities, JSON_DIALECTS, JSON_ISSUE, JSON_LOSS, jsonCapabilities, jsonExporter, jsonImporter, jsonShapeOf, } from "./formats/json/index.js";
|
|
38
38
|
export { exportNeo4jFiles, ID_SPACE_COLUMN, LABELS_COLUMN, NEO4J_CAPABILITIES, NEO4J_ISSUE, NEO4J_LOSS, neo4jExporter, neo4jImporter, ORIGINAL_ID_COLUMN, TYPE_COLUMN, } from "./formats/neo4j/index.js";
|
|
39
39
|
export { OBO_CAPABILITIES, OBO_ISSUE, OBO_LOSS, oboExporter, oboImporter, } from "./formats/obo/index.js";
|
|
40
|
-
export { PAJEK_ISSUE, PAJEK_LOSS, pajekExporter, pajekImporter, } from "./formats/pajek/index.js";
|
|
40
|
+
export { PAJEK_ISSUE, PAJEK_LOSS, PAJEK_STYLE_CAPABILITIES, PAJEK_STYLE_COMMENT, pajekExporter, pajekImporter, } from "./formats/pajek/index.js";
|
|
41
41
|
export { XGMML_ISSUE, XGMML_LOSS, xgmmlExporter, xgmmlImporter, } from "./formats/xgmml/index.js";
|
|
42
42
|
// ============================================================ shared helpers for plugin authors (8.4, 8.5, 8.6)
|
|
43
43
|
export { BAD_DEFAULT_CODE, BAD_OPTIONS_CODE, declareCompanion, declareResolved, PRECISION_CODE, RENAMED_CODE, ROLE_TAKEN_CODE, UNKNOWN_TYPE_CODE, } from "./common/attributes.js";
|
|
@@ -48,9 +48,9 @@ export { formatDecimal, formatF32, formatF64, formatGmlReal, formatInteger } fro
|
|
|
48
48
|
export { canonicalId, coerceId, coerceIdText, ID_MERGED_CODE, IdCoercer, isCanonicalIntegerText, } from "./common/ids.js";
|
|
49
49
|
export { decodeEntryName, inputLength, INVALID_UTF8_CODE, isImportInput, LineReader, readText, textChunks, throwIfAborted, } from "./common/input.js";
|
|
50
50
|
export { chooseGraph, DEFAULT_ERROR_LIMIT, forDecodedText, graphChosen, reportSinkOptions, reportUnusedOptions, resolveExportOptions, resolveImportOptions, SINK_OPTION_CODE, } from "./common/options.js";
|
|
51
|
-
export { ImportReportBuilder, isAbortError, PARSE_ERROR_CODE, } from "./common/report.js";
|
|
51
|
+
export { ImportReportBuilder, isAbortError, keptForStyles, PARSE_ERROR_CODE, } from "./common/report.js";
|
|
52
52
|
export { inferTextDtype, isNumericText, parseTextCell, TextCellWriter, WIDENING_UNSUPPORTED_CODE, } from "./common/text.js";
|
|
53
53
|
export { edgeWeights, explicitWeights, isWeightField, parseWeightText, } from "./common/weights.js";
|
|
54
54
|
export { collectBytes, decodeChunks, DEFAULT_CHUNK_BYTES, encodeChunks, joinText, toReadableStream, } from "./common/writer.js";
|
|
55
|
-
export { hasIllegalXmlChar, tokenizeXml, xmlIllegalTextNotes, XmlSyntaxError, XmlTokenizer, } from "./common/xml.js";
|
|
55
|
+
export { hasIllegalXmlChar, MAX_XML_DEPTH, tokenizeXml, xmlIllegalTextNotes, XmlNestingError, XmlSyntaxError, XmlTokenizer, } from "./common/xml.js";
|
|
56
56
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,uFAAuF;AACvF,iGAAiG;AACjG,qGAAqG;AACrG,iGAAiG;AACjG,0BAA0B;AAC1B,OAAO,EAEH,YAAY,EACZ,gBAAgB,EAGhB,aAAa,GAChB,MAAM,uBAAuB,CAAC;AAE/B,6FAA6F;AAC7F,OAAO,EAAE,gBAAgB,EAAwD,MAAM,yBAAyB,CAAC;AAEjH,gFAAgF;AAChF,OAAO,EAAuB,gBAAgB,EAAE,aAAa,EAAqB,MAAM,qBAAqB,CAAC;AAE9G,wFAAwF;AACxF,OAAO,EAQH,WAAW,GAMd,MAAM,YAAY,CAAC;AAEpB,kGAAkG;AAClG,OAAO,EACH,WAAW,EACX,WAAW,EACX,kBAAkB,GAIrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEH,WAAW,EACX,cAAc,EACd,aAAa,EAEb,WAAW,EAEX,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EAEnB,cAAc,EACd,eAAe,EACf,WAAW,EAGX,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EAEX,QAAQ,EACR,KAAK,EACL,iBAAiB,EACjB,mBAAmB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,WAAW,EAEX,aAAa,EAEb,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,WAAW,EAEX,oBAAoB,GAEvB,MAAM,YAAY,CAAC;AAEpB,kFAAkF;AAClF,OAAO,EACH,gBAAgB,E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B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,WAAW,EAEX,iBAAiB,EACjB,mBAAmB,EAGnB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,mBAAmB,EACnB,YAAY,EAEZ,aAAa,EAEb,gBAAgB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EAEd,yBAAyB,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACH,WAAW,EAEX,eAAe,EACf,aAAa,EACb,eAAe,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EAER,gBAAgB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACH,iBAAiB,EACjB,aAAa,EACb,WAAW,EAEX,mBAAmB,EACnB,eAAe,EAEf,cAAc,EACd,YAAY,GACf,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The note codes of `extractPositions()`. Singular `W_POSITION_*` codes are about some nodes,
|
|
3
|
+
* plural `W_POSITIONS_*` codes about the file as a whole. Keys drop the `W_` and `POSITION_` /
|
|
4
|
+
* `POSITIONS_` prefixes.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Every code a `PositionNote` carries.
|
|
8
|
+
* @category Positions
|
|
9
|
+
*/
|
|
10
|
+
export declare const POSITION_ISSUE: Readonly<{
|
|
11
|
+
/** Every placed node sits on one point; the coordinates are dropped and `usable` is false. */
|
|
12
|
+
readonly STACKED: "W_POSITION_STACKED";
|
|
13
|
+
/** Some nodes have no position. */
|
|
14
|
+
readonly PARTIAL: "W_POSITION_PARTIAL";
|
|
15
|
+
/** Some coordinates are not finite numbers; those nodes count as unplaced. */
|
|
16
|
+
readonly NON_FINITE: "W_POSITION_NON_FINITE";
|
|
17
|
+
/** The file mixes 2- and 3-coordinate positions. */
|
|
18
|
+
readonly DIMS_MIXED: "W_POSITION_DIMS_MIXED";
|
|
19
|
+
/** A top-left coordinate has no width or height, so it was not moved to the center. */
|
|
20
|
+
readonly ANCHOR_NO_SIZE: "W_POSITION_ANCHOR_NO_SIZE";
|
|
21
|
+
/** The file holds more than one view (layout); only the first is used. */
|
|
22
|
+
readonly OTHER_VIEWS: "W_POSITION_OTHER_VIEWS";
|
|
23
|
+
/** The file has position-like columns this format does not read (plain `x` / `y`). */
|
|
24
|
+
readonly NOT_READ: "W_POSITIONS_NOT_READ";
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* A code of `POSITION_ISSUE`.
|
|
28
|
+
* @category Positions
|
|
29
|
+
*/
|
|
30
|
+
export type PositionNoteCode = (typeof POSITION_ISSUE)[keyof typeof POSITION_ISSUE];
|
|
31
|
+
//# sourceMappingURL=codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../../src/positions/codes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc;IACvB,8FAA8F;;IAE9F,mCAAmC;;IAEnC,8EAA8E;;IAE9E,oDAAoD;;IAEpD,uFAAuF;;IAEvF,0EAA0E;;IAE1E,sFAAsF;;EAE/E,CAAC;AAEZ;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The note codes of `extractPositions()`. Singular `W_POSITION_*` codes are about some nodes,
|
|
3
|
+
* plural `W_POSITIONS_*` codes about the file as a whole. Keys drop the `W_` and `POSITION_` /
|
|
4
|
+
* `POSITIONS_` prefixes.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Every code a `PositionNote` carries.
|
|
8
|
+
* @category Positions
|
|
9
|
+
*/
|
|
10
|
+
export const POSITION_ISSUE = Object.freeze({
|
|
11
|
+
/** Every placed node sits on one point; the coordinates are dropped and `usable` is false. */
|
|
12
|
+
STACKED: "W_POSITION_STACKED",
|
|
13
|
+
/** Some nodes have no position. */
|
|
14
|
+
PARTIAL: "W_POSITION_PARTIAL",
|
|
15
|
+
/** Some coordinates are not finite numbers; those nodes count as unplaced. */
|
|
16
|
+
NON_FINITE: "W_POSITION_NON_FINITE",
|
|
17
|
+
/** The file mixes 2- and 3-coordinate positions. */
|
|
18
|
+
DIMS_MIXED: "W_POSITION_DIMS_MIXED",
|
|
19
|
+
/** A top-left coordinate has no width or height, so it was not moved to the center. */
|
|
20
|
+
ANCHOR_NO_SIZE: "W_POSITION_ANCHOR_NO_SIZE",
|
|
21
|
+
/** The file holds more than one view (layout); only the first is used. */
|
|
22
|
+
OTHER_VIEWS: "W_POSITION_OTHER_VIEWS",
|
|
23
|
+
/** The file has position-like columns this format does not read (plain `x` / `y`). */
|
|
24
|
+
NOT_READ: "W_POSITIONS_NOT_READ",
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=codes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.js","sourceRoot":"","sources":["../../../src/positions/codes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IACxC,8FAA8F;IAC9F,OAAO,EAAE,oBAAoB;IAC7B,mCAAmC;IACnC,OAAO,EAAE,oBAAoB;IAC7B,8EAA8E;IAC9E,UAAU,EAAE,uBAAuB;IACnC,oDAAoD;IACpD,UAAU,EAAE,uBAAuB;IACnC,uFAAuF;IACvF,cAAc,EAAE,2BAA2B;IAC3C,0EAA0E;IAC1E,WAAW,EAAE,wBAAwB;IACrC,sFAAsF;IACtF,QAAQ,EAAE,sBAAsB;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The coordinate conversions between a file's spelling and the neutral convention (center, y up):
|
|
3
|
+
* the y flip, the top-left anchor shift, and `toFilePositions()`, the inverse a writer uses. Format
|
|
4
|
+
* modules import from here, so they never pull in the reader.
|
|
5
|
+
*/
|
|
6
|
+
import type { PositionColumnExtra } from "./types.js";
|
|
7
|
+
/**
|
|
8
|
+
* A y that grows downward as one that grows upward, and back: a negation that never yields -0.
|
|
9
|
+
* @param y - the coordinate
|
|
10
|
+
* @returns the flipped coordinate
|
|
11
|
+
* @category Positions
|
|
12
|
+
*/
|
|
13
|
+
export declare function flipY(y: number): number;
|
|
14
|
+
/**
|
|
15
|
+
* One coordinate from a file's spelling into the neutral convention, in place.
|
|
16
|
+
* @param p - x, y, z as the file wrote them; becomes the node's center, y up
|
|
17
|
+
* @param extra - how the file spells it
|
|
18
|
+
* @param size - the node's width and height, for a top-left anchor; null when unknown
|
|
19
|
+
* @param realZ - whether the file has a z that differs between nodes
|
|
20
|
+
*/
|
|
21
|
+
export declare function toNeutral(p: [number, number, number], extra: PositionColumnExtra, size: readonly [number, number] | null, realZ: boolean): void;
|
|
22
|
+
/**
|
|
23
|
+
* Neutral coordinates (center, y up, as `extractPositions()` returns them) back into a column
|
|
24
|
+
* spelled as `extra` declares, for a writer: the y flip, Pajek's z origin and yEd's top-left corner
|
|
25
|
+
* are undone. Rows that are NaN stay NaN.
|
|
26
|
+
* @param coords - x, y, z per node
|
|
27
|
+
* @param extra - the spelling of the column to write
|
|
28
|
+
* @param sizes - each node's width and height, needed for a top-left anchor
|
|
29
|
+
* @param sizes.width - widths by node index
|
|
30
|
+
* @param sizes.height - heights by node index
|
|
31
|
+
* @returns a new array, x, y, z per node in the file's spelling
|
|
32
|
+
* @category Positions
|
|
33
|
+
*/
|
|
34
|
+
export declare function toFilePositions(coords: Float64Array, extra: PositionColumnExtra, sizes?: {
|
|
35
|
+
width: Float64Array;
|
|
36
|
+
height: Float64Array;
|
|
37
|
+
}): Float64Array;
|
|
38
|
+
/**
|
|
39
|
+
* The median of some numbers.
|
|
40
|
+
* @param values - the numbers, reordered in place
|
|
41
|
+
* @returns the median, or null for none
|
|
42
|
+
* @category Positions
|
|
43
|
+
*/
|
|
44
|
+
export declare function median(values: number[]): number | null;
|
|
45
|
+
/**
|
|
46
|
+
* Neutral coordinates (center, y up) as a built-in format's writer expects its position column, so
|
|
47
|
+
* a graph whose positions are in the neutral form is written the way up its program draws it.
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const column = writtenPositions("gml", coords); // y flipped for GML
|
|
51
|
+
* ```
|
|
52
|
+
* @param format - the format being written
|
|
53
|
+
* @param coords - x, y, z per node; NaN for a node with no position
|
|
54
|
+
* @returns the coordinates to write (the same array when the format needs no conversion)
|
|
55
|
+
* @category Positions
|
|
56
|
+
*/
|
|
57
|
+
export declare function writtenPositions(format: string, coords: Float64Array): Float64Array;
|
|
58
|
+
//# sourceMappingURL=convert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../src/positions/convert.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEvC;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACrB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAC3B,KAAK,EAAE,mBAAmB,EAC1B,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,EACtC,KAAK,EAAE,OAAO,GACf,IAAI,CAWN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC3B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,mBAAmB,EAC1B,KAAK,CAAC,EAAE;IAAE,KAAK,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GACtD,YAAY,CAoBd;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAOtD;AAaD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,YAAY,CAGnF"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The coordinate conversions between a file's spelling and the neutral convention (center, y up):
|
|
3
|
+
* the y flip, the top-left anchor shift, and `toFilePositions()`, the inverse a writer uses. Format
|
|
4
|
+
* modules import from here, so they never pull in the reader.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A y that grows downward as one that grows upward, and back: a negation that never yields -0.
|
|
8
|
+
* @param y - the coordinate
|
|
9
|
+
* @returns the flipped coordinate
|
|
10
|
+
* @category Positions
|
|
11
|
+
*/
|
|
12
|
+
export function flipY(y) {
|
|
13
|
+
return y === 0 ? 0 : -y;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* One coordinate from a file's spelling into the neutral convention, in place.
|
|
17
|
+
* @param p - x, y, z as the file wrote them; becomes the node's center, y up
|
|
18
|
+
* @param extra - how the file spells it
|
|
19
|
+
* @param size - the node's width and height, for a top-left anchor; null when unknown
|
|
20
|
+
* @param realZ - whether the file has a z that differs between nodes
|
|
21
|
+
*/
|
|
22
|
+
export function toNeutral(p, extra, size, realZ) {
|
|
23
|
+
if (extra.anchor === "top-left" && size !== null) {
|
|
24
|
+
p[0] += size[0] / 2;
|
|
25
|
+
p[1] += extra.yAxis === "down" ? size[1] / 2 : -size[1] / 2;
|
|
26
|
+
}
|
|
27
|
+
p[2] = realZ ? p[2] - (extra.zOrigin ?? 0) : 0;
|
|
28
|
+
if (extra.yAxis === "down") {
|
|
29
|
+
// with a real z this turns the drawing 180 degrees about x, so a 3D shape is never mirrored
|
|
30
|
+
p[1] = flipY(p[1]);
|
|
31
|
+
p[2] = flipY(p[2]);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Neutral coordinates (center, y up, as `extractPositions()` returns them) back into a column
|
|
36
|
+
* spelled as `extra` declares, for a writer: the y flip, Pajek's z origin and yEd's top-left corner
|
|
37
|
+
* are undone. Rows that are NaN stay NaN.
|
|
38
|
+
* @param coords - x, y, z per node
|
|
39
|
+
* @param extra - the spelling of the column to write
|
|
40
|
+
* @param sizes - each node's width and height, needed for a top-left anchor
|
|
41
|
+
* @param sizes.width - widths by node index
|
|
42
|
+
* @param sizes.height - heights by node index
|
|
43
|
+
* @returns a new array, x, y, z per node in the file's spelling
|
|
44
|
+
* @category Positions
|
|
45
|
+
*/
|
|
46
|
+
export function toFilePositions(coords, extra, sizes) {
|
|
47
|
+
const out = new Float64Array(coords.length);
|
|
48
|
+
const down = extra.yAxis === "down";
|
|
49
|
+
for (let i = 0; i < coords.length; i += 3) {
|
|
50
|
+
let y = coords[i + 1];
|
|
51
|
+
let z = coords[i + 2];
|
|
52
|
+
if (down) {
|
|
53
|
+
y = flipY(y);
|
|
54
|
+
z = flipY(z);
|
|
55
|
+
}
|
|
56
|
+
out[i] = coords[i];
|
|
57
|
+
out[i + 1] = y;
|
|
58
|
+
out[i + 2] = z === 0 && extra.sourceDims !== 3 ? 0 : z + (extra.zOrigin ?? 0);
|
|
59
|
+
const row = i / 3;
|
|
60
|
+
if (extra.anchor === "top-left" && sizes !== undefined) {
|
|
61
|
+
out[i] -= sizes.width[row] / 2;
|
|
62
|
+
out[i + 1] -= down ? sizes.height[row] / 2 : -sizes.height[row] / 2;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The median of some numbers.
|
|
69
|
+
* @param values - the numbers, reordered in place
|
|
70
|
+
* @returns the median, or null for none
|
|
71
|
+
* @category Positions
|
|
72
|
+
*/
|
|
73
|
+
export function median(values) {
|
|
74
|
+
if (values.length === 0) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
values.sort((a, b) => a - b);
|
|
78
|
+
const mid = values.length >> 1;
|
|
79
|
+
return values.length % 2 === 1 ? values[mid] : (values[mid - 1] + values[mid]) / 2;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* How each built-in writer that writes the position column as it stands spells a coordinate:
|
|
83
|
+
* GML (y down, as yEd draws it) and Pajek (y down, z centered on 0.5). Every other built-in writer
|
|
84
|
+
* either converts the neutral form itself (JSON, XGMML, CX, CX2, Cytoscape sessions, yEd graphics
|
|
85
|
+
* in a styled GraphML) or writes a y-up format (GEXF, DOT).
|
|
86
|
+
*/
|
|
87
|
+
const WRITTEN_SPELLING = {
|
|
88
|
+
gml: { yAxis: "down" },
|
|
89
|
+
pajek: { yAxis: "down", zOrigin: 0.5 },
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Neutral coordinates (center, y up) as a built-in format's writer expects its position column, so
|
|
93
|
+
* a graph whose positions are in the neutral form is written the way up its program draws it.
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* const column = writtenPositions("gml", coords); // y flipped for GML
|
|
97
|
+
* ```
|
|
98
|
+
* @param format - the format being written
|
|
99
|
+
* @param coords - x, y, z per node; NaN for a node with no position
|
|
100
|
+
* @returns the coordinates to write (the same array when the format needs no conversion)
|
|
101
|
+
* @category Positions
|
|
102
|
+
*/
|
|
103
|
+
export function writtenPositions(format, coords) {
|
|
104
|
+
const spelling = WRITTEN_SPELLING[format];
|
|
105
|
+
return spelling === undefined ? coords : toFilePositions(coords, spelling);
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=convert.js.map
|
|
@@ -0,0 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CAAC,CAAC;QACxE,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,MAAgB;IACnC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;IAC/B,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AACvF,CAAC;AAED;;;;;GAKG;AACH,MAAM,gBAAgB,GAAkD;IACpE,GAAG,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IACtB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;CACzC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc,EAAE,MAAoB;IACjE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `extractPositions()`: any format's stored node coordinates in the neutral convention (center,
|
|
3
|
+
* y up, the file's unit, 3 components). The snapshot's role-`position` column keeps the values the
|
|
4
|
+
* file wrote; this reads them through the spelling the column's `meta.extra` (or the importer's
|
|
5
|
+
* `positions()` hook) declares.
|
|
6
|
+
*/
|
|
7
|
+
import type { GraphSnapshot } from "@graphty/graph-format";
|
|
8
|
+
import type { GraphImporter, ImportReport } from "../types.js";
|
|
9
|
+
import type { ExtractPositionsOptions, FilePositions } from "./types.js";
|
|
10
|
+
/**
|
|
11
|
+
* A file's stored node coordinates in the neutral convention: each node's center, y up, in the
|
|
12
|
+
* file's own unit. Call it with the importer that read the snapshot and the report it returned.
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const { snapshot, report } = await importGraph(text, { format: "gml" });
|
|
16
|
+
* const positions = extractPositions(gmlImporter, snapshot, report);
|
|
17
|
+
* if (positions?.usable) console.log(positions.coords.subarray(0, 3)); // node 0's x, y, z
|
|
18
|
+
* ```
|
|
19
|
+
* @param importer - the importer that read the snapshot (its `positions()` hook, when it has one, says how the coordinates are spelled)
|
|
20
|
+
* @param snapshot - the imported graph
|
|
21
|
+
* @param report - the import's report
|
|
22
|
+
* @param options - `signal` to abort
|
|
23
|
+
* @returns the positions, or null when the file stores none and has no position-like columns
|
|
24
|
+
* @category Positions
|
|
25
|
+
*/
|
|
26
|
+
export declare function extractPositions(importer: GraphImporter, snapshot: GraphSnapshot, report: ImportReport, options?: ExtractPositionsOptions): FilePositions | null;
|
|
27
|
+
//# sourceMappingURL=extract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../src/positions/extract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAU,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAInE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG/D,OAAO,KAAK,EACR,uBAAuB,EAEvB,aAAa,EAKhB,MAAM,YAAY,CAAC;AAmCpB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC5B,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE,uBAA4B,GACtC,aAAa,GAAG,IAAI,CAsCtB"}
|