@graphty/graph-io 0.3.42 → 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-CpRyHZ3H.js → exporter-quPUCBiC.js} +1807 -288
- 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 +295 -414
- 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 +23 -7
- 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 +441 -265
- 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 +30 -13
- 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 +543 -323
- 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-CpRyHZ3H.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
|
@@ -9,17 +9,19 @@
|
|
|
9
9
|
* `defaultDirected` option), then `cy:directed` per edge, overruling Cytoscape, which ignores the
|
|
10
10
|
* root attribute. Ids are kept as written (`ids: "keep"`), so `"1"`, `"01"` and `" 1 "` stay three
|
|
11
11
|
* nodes. Positions are stored y-up (Cytoscape writes screen coordinates). Graphics values are kept
|
|
12
|
-
* as a json column,
|
|
12
|
+
* as a json column; asked for styles, the importer reads them as Cytoscape's resolved visual properties
|
|
13
|
+
* (styles.ts), with Cytoscape desktop's default style for what an element leaves unset.
|
|
13
14
|
*/
|
|
14
15
|
import { GraphFormatError } from "@graphty/graph-format";
|
|
15
16
|
import { textChunks, throwIfAborted } from "../../common/input.js";
|
|
16
17
|
import { chooseGraph, graphChosen, reportSinkOptions, reportUnusedOptions, resolveImportOptions, } from "../../common/options.js";
|
|
17
18
|
import { agree, elementCount } from "../../common/plural.js";
|
|
18
19
|
import { ImportReportBuilder } from "../../common/report.js";
|
|
19
|
-
import { isWhitespace, tokenizeXml, xmlDeclaredEncoding, XmlSyntaxError } from "../../common/xml.js";
|
|
20
|
-
import { EXTENSIONS, FORMAT, MIME_TYPES, XGMML_ISSUE } from "./constants.js";
|
|
20
|
+
import { isWhitespace, tokenizeXml, xmlDeclaredEncoding, XmlNestingError, XmlSyntaxError, } from "../../common/xml.js";
|
|
21
|
+
import { EXTENSIONS, FORMAT, MIME_TYPES, XGMML_ISSUE, XGMML_NAMESPACE } from "./constants.js";
|
|
21
22
|
import { XgmmlParser } from "./document.js";
|
|
22
23
|
import { dialectOf, graphsOf, membersOf, XgmmlEmitter, } from "./emit.js";
|
|
24
|
+
import { readXgmmlFileStyles } from "./styles.js";
|
|
23
25
|
/** The per-format defaults: ids as written, undirected by the DTD, the edge `weight` attribute. */
|
|
24
26
|
const FORMAT_DEFAULTS = {
|
|
25
27
|
ids: "keep",
|
|
@@ -95,14 +97,15 @@ function booleanOption(name, value, fallback) {
|
|
|
95
97
|
* @returns the document
|
|
96
98
|
*/
|
|
97
99
|
export async function parseXgmml(input, report, common, options) {
|
|
98
|
-
const repairs = repairsOf(options, report);
|
|
99
100
|
const parser = new XgmmlParser(report);
|
|
100
101
|
const seen = { content: false };
|
|
101
102
|
try {
|
|
102
|
-
await tokenizeXml(watch(textChunks(input, report, { ...common, declaredEncoding: xmlDeclaredEncoding, xml: true }), seen), parser,
|
|
103
|
+
await tokenizeXml(watch(textChunks(input, report, { ...common, declaredEncoding: xmlDeclaredEncoding, xml: true }), seen), parser, xmlRepairs(report, options));
|
|
103
104
|
}
|
|
104
105
|
catch (err) {
|
|
105
|
-
|
|
106
|
+
if (err instanceof XmlSyntaxError) {
|
|
107
|
+
failSyntax(report, err, seen.content);
|
|
108
|
+
}
|
|
106
109
|
throw err;
|
|
107
110
|
}
|
|
108
111
|
const doc = parser.document();
|
|
@@ -113,39 +116,40 @@ export async function parseXgmml(input, report, common, options) {
|
|
|
113
116
|
}
|
|
114
117
|
/**
|
|
115
118
|
* The XML repairs the options switch on, each reporting where it repaired.
|
|
116
|
-
* @param options - the XGMML options
|
|
117
119
|
* @param report - the report
|
|
120
|
+
* @param options - the XGMML options
|
|
118
121
|
* @returns the repairs
|
|
119
122
|
*/
|
|
120
|
-
function
|
|
123
|
+
function xmlRepairs(report, options) {
|
|
124
|
+
const ampersand = (line) => {
|
|
125
|
+
report.warning("parse-error", XGMML_ISSUE.AMPERSAND_REPAIRED, "a bare & was read as &", { line });
|
|
126
|
+
};
|
|
127
|
+
const surrogate = (line) => {
|
|
128
|
+
report.warning("parse-error", XGMML_ISSUE.SURROGATE_PAIRED, "two surrogate character references were joined into one character", { line });
|
|
129
|
+
};
|
|
121
130
|
return {
|
|
122
131
|
bareAmpersand: booleanOption("repairBareAmpersands", options?.repairBareAmpersands, false)
|
|
123
|
-
?
|
|
124
|
-
report.warning("parse-error", XGMML_ISSUE.AMPERSAND_REPAIRED, "a bare & was read as &", { line });
|
|
125
|
-
}
|
|
132
|
+
? ampersand
|
|
126
133
|
: undefined,
|
|
127
134
|
surrogatePair: booleanOption("pairSurrogateReferences", options?.pairSurrogateReferences, false)
|
|
128
|
-
?
|
|
129
|
-
report.warning("parse-error", XGMML_ISSUE.SURROGATE_PAIRED, "two surrogate character references were joined into one character", { line });
|
|
130
|
-
}
|
|
135
|
+
? surrogate
|
|
131
136
|
: undefined,
|
|
132
137
|
};
|
|
133
138
|
}
|
|
134
139
|
/**
|
|
135
|
-
*
|
|
136
|
-
* malformed. Any other error is left to the caller.
|
|
137
|
-
* @param err - the error the tokenizer threw
|
|
138
|
-
* @param content - whether non-whitespace text was seen
|
|
140
|
+
* Fails the report for an XML syntax error: an empty input, nesting too deep, or broken XML.
|
|
139
141
|
* @param report - the report
|
|
142
|
+
* @param err - the error
|
|
143
|
+
* @param content - whether the input held anything but white space
|
|
144
|
+
* @returns never: it throws the report's ImportError
|
|
140
145
|
*/
|
|
141
|
-
function
|
|
142
|
-
if (!(err instanceof XmlSyntaxError)) {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
146
|
+
function failSyntax(report, err, content) {
|
|
145
147
|
if (!content) {
|
|
146
148
|
report.fail(XGMML_ISSUE.EMPTY_INPUT, "the input is empty");
|
|
147
149
|
}
|
|
148
|
-
report.fail(XGMML_ISSUE.XML_SYNTAX, err.message, {
|
|
150
|
+
return report.fail(err instanceof XmlNestingError ? XGMML_ISSUE.XML_NESTING : XGMML_ISSUE.XML_SYNTAX, err.message, {
|
|
151
|
+
line: err.line,
|
|
152
|
+
});
|
|
149
153
|
}
|
|
150
154
|
/**
|
|
151
155
|
* Pass text chunks through while noting non-whitespace content.
|
|
@@ -318,7 +322,9 @@ function sniffXgmml(head) {
|
|
|
318
322
|
}
|
|
319
323
|
const tagEnd = text.indexOf(">", root.index);
|
|
320
324
|
const tag = text.slice(root.index, tagEnd < 0 ? undefined : tagEnd);
|
|
321
|
-
|
|
325
|
+
// the XGMML namespace declared on the root, as a whole attribute value
|
|
326
|
+
const namespaces = [...tag.matchAll(/\bxmlns(?::[\w.-]+)?\s*=\s*(["'])([^"']*)\1/g)].map((m) => m[2]);
|
|
327
|
+
return namespaces.includes(XGMML_NAMESPACE) ? 0.95 : 0.5;
|
|
322
328
|
}
|
|
323
329
|
/**
|
|
324
330
|
* The XGMML importer.
|
|
@@ -339,5 +345,6 @@ export const xgmmlImporter = Object.freeze({
|
|
|
339
345
|
import: importXgmml,
|
|
340
346
|
importAll: importAllXgmml,
|
|
341
347
|
listGraphs: listXgmmlGraphs,
|
|
348
|
+
styles: readXgmmlFileStyles,
|
|
342
349
|
});
|
|
343
350
|
//# sourceMappingURL=importer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importer.js","sourceRoot":"","sources":["../../../../src/formats/xgmml/importer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAAkB,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACH,WAAW,EACX,WAAW,EAEX,iBAAiB,EACjB,mBAAmB,EAEnB,oBAAoB,GACvB,MAAM,yBA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C,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACpE,uEAAuE;IACvE,MAAM,UAAU,GAAG,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC,8CAA8C,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,OAAO,UAAU,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAsC,MAAM,CAAC,MAAM,CAAC;IAC1E,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACnB,kBAAkB;QAClB,cAAc;QACd,yBAAyB;QACzB,sBAAsB;QACtB,KAAK;KACR,CAAC;IACF,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,UAAU;IACrB,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,WAAW;IACnB,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE,eAAe;IAC3B,MAAM,EAAE,mBAAmB;CAC9B,CAAC,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The styles of XGMML files and Cytoscape 2.x session networks: Cytoscape writes every element's RESOLVED visual
|
|
3
|
+
* properties into its `<graphics>` (XML attributes in the old spelling, nested `<att>` elements named for the visual
|
|
4
|
+
* property, and the locked ones under `lockedVisualProperties`), and no style. The reader turns those values into
|
|
5
|
+
* the neutral vocabulary; the planner explains them. The writer does the reverse from what graphty draws.
|
|
6
|
+
*/
|
|
7
|
+
import type { GraphSnapshot } from "@graphty/graph-format";
|
|
8
|
+
import { type CytoscapeDialect } from "../../styles/cytoscape/emit.js";
|
|
9
|
+
import { type CytoscapeBypass } from "../../styles/cytoscape/resolve.js";
|
|
10
|
+
import type { ExporterStyleInput } from "../../styles/io/writer.js";
|
|
11
|
+
import { StyleNotes } from "../../styles/notes.js";
|
|
12
|
+
import type { ImporterStyles, StyleColumn, StyleProperty, StyleReadContext, StyleTarget, StyleTool, StyleWriteCapabilities } from "../../styles/types.js";
|
|
13
|
+
import type { LossNote } from "../../types.js";
|
|
14
|
+
type Table = GraphSnapshot["nodes"];
|
|
15
|
+
/**
|
|
16
|
+
* Each element's visual properties from its graphics: the graphics values normalized to visual property names, the
|
|
17
|
+
* locked ones (`lockedVisualProperties`, a session view's bypasses) on top.
|
|
18
|
+
* @param table - the node or edge table
|
|
19
|
+
* @param target - nodes or edges
|
|
20
|
+
* @param n - the element count
|
|
21
|
+
* @param notes - where too-deep nesting is noted
|
|
22
|
+
* @returns per element, its visual properties (null without graphics)
|
|
23
|
+
*/
|
|
24
|
+
export declare function graphicsBypasses(table: Table, target: StyleTarget, n: number, notes: StyleNotes): CytoscapeBypass[];
|
|
25
|
+
/** What the XGMML style reader is told by its caller. */
|
|
26
|
+
interface XgmmlStyleSettings {
|
|
27
|
+
/** Whose defaults fill what the file leaves unset. */
|
|
28
|
+
readonly tool: StyleTool;
|
|
29
|
+
/** A bool column marking hidden elements (a Cytoscape 2.x session's hidden state), or null. */
|
|
30
|
+
readonly hiddenColumn?: string | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The styles of a graph whose elements carry Cytoscape's resolved visual properties in their graphics.
|
|
34
|
+
* @param snapshot - the graph
|
|
35
|
+
* @param context - the budget and cancel signal
|
|
36
|
+
* @param settings - the tool and the hidden-state column
|
|
37
|
+
* @returns the styles (canonical values, no declared rules)
|
|
38
|
+
*/
|
|
39
|
+
export declare function readXgmmlStyles(snapshot: GraphSnapshot, context: StyleReadContext, settings: XgmmlStyleSettings): ImporterStyles;
|
|
40
|
+
/**
|
|
41
|
+
* The styles of an XGMML file: its elements' resolved values, with Cytoscape desktop's default style beneath.
|
|
42
|
+
* @param snapshot - the graph
|
|
43
|
+
* @param context - the budget and cancel signal
|
|
44
|
+
* @returns the styles
|
|
45
|
+
*/
|
|
46
|
+
export declare function readXgmmlFileStyles(snapshot: GraphSnapshot, context: StyleReadContext): ImporterStyles;
|
|
47
|
+
/**
|
|
48
|
+
* For a file graphty wrote: where an element's value is what the writer's nearest Cytoscape value of the
|
|
49
|
+
* `graphty.styles` block's value reads back as (a font family list written as its first family, a shape Cytoscape
|
|
50
|
+
* does not have), the block's exact value is the truth, so a re-import gives the same rules. A value that differs
|
|
51
|
+
* from what graphty wrote (another program edited it) stays the truth.
|
|
52
|
+
* @param snapshot - the graph
|
|
53
|
+
* @param target - nodes or edges
|
|
54
|
+
* @param values - the values per property, changed in place
|
|
55
|
+
* @param dialect - the Cytoscape dialect the file's values are written in
|
|
56
|
+
*/
|
|
57
|
+
export declare function exactFromBlock(snapshot: GraphSnapshot, target: StyleTarget, values: Partial<Record<string, StyleColumn>>, dialect?: CytoscapeDialect): void;
|
|
58
|
+
/**
|
|
59
|
+
* Marks the elements a hidden-state column holds true as not visible.
|
|
60
|
+
* @param table - the node or edge table
|
|
61
|
+
* @param column - the bool column, or null
|
|
62
|
+
* @param n - the element count
|
|
63
|
+
* @param values - the values per property, changed in place
|
|
64
|
+
*/
|
|
65
|
+
export declare function hiddenToVisible(table: Table, column: string | null, n: number, values: Partial<Record<string, StyleColumn>>): void;
|
|
66
|
+
/**
|
|
67
|
+
* The properties with at least one value.
|
|
68
|
+
* @param values - per property, each element's value
|
|
69
|
+
* @returns the same without all-null properties
|
|
70
|
+
*/
|
|
71
|
+
export declare function nonEmpty(values: Partial<Record<string, StyleColumn>>): Partial<Record<StyleProperty, StyleColumn>>;
|
|
72
|
+
/**
|
|
73
|
+
* What the XGMML writer holds natively: every visual property Cytoscape keeps per element, and the graph's
|
|
74
|
+
* background. The block and the tagged values go into graph and element `<att>`s.
|
|
75
|
+
*/
|
|
76
|
+
export declare const XGMML_STYLE_CAPABILITIES: StyleWriteCapabilities;
|
|
77
|
+
/**
|
|
78
|
+
* One element's graphics record for a file written with styles: what graphty draws as Cytoscape visual properties,
|
|
79
|
+
* the six classic ones also as XML attributes (the importer reads both alike), over the kept graphics' visual
|
|
80
|
+
* properties no neutral property carries (custom graphics, label widths) and edge bends.
|
|
81
|
+
* @param target - nodes or edges
|
|
82
|
+
* @param styles - the exporter's style input
|
|
83
|
+
* @param i - the element index
|
|
84
|
+
* @param kept - the element's kept graphics record, or null
|
|
85
|
+
* @returns the record, or null when there is nothing to write
|
|
86
|
+
*/
|
|
87
|
+
export declare function styledGraphics(target: StyleTarget, styles: ExporterStyleInput, i: number, kept: Record<string, unknown> | null): Record<string, unknown> | null;
|
|
88
|
+
/**
|
|
89
|
+
* What writing every element's graphics with styles loses: each value written as the nearest one Cytoscape allows,
|
|
90
|
+
* counted per element.
|
|
91
|
+
* @param styles - the exporter's style input
|
|
92
|
+
* @param snapshot - the graph
|
|
93
|
+
* @returns the loss notes
|
|
94
|
+
*/
|
|
95
|
+
export declare function styledGraphicsNotes(styles: ExporterStyleInput, snapshot: GraphSnapshot): LossNote[];
|
|
96
|
+
/**
|
|
97
|
+
* The graph's graphics record for a file written with styles: the kept record with the background replaced.
|
|
98
|
+
* @param styles - the exporter's style input
|
|
99
|
+
* @param kept - the kept graph graphics, or null
|
|
100
|
+
* @returns the record, or null
|
|
101
|
+
*/
|
|
102
|
+
export declare function styledGraphGraphics(styles: ExporterStyleInput, kept: Record<string, unknown> | null): Record<string, unknown> | null;
|
|
103
|
+
export {};
|
|
104
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/formats/xgmml/styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EACH,KAAK,gBAAgB,EAGxB,MAAM,gCAAgC,CAAC;AA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wBAAgB,eAAe,CAC3B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,GAC7C,IAAI,CAcN;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAQlH;AA0BD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,sBAKrC,CAAC;AAkBH;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC1B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,kBAAkB,EAC1B,CAAC,EAAE,MAAM,EACT,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GACrC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAwBhC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ,EAAE,CAgBnG;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,kBAAkB,EAC1B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GACrC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAOhC"}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The styles of XGMML files and Cytoscape 2.x session networks: Cytoscape writes every element's RESOLVED visual
|
|
3
|
+
* properties into its `<graphics>` (XML attributes in the old spelling, nested `<att>` elements named for the visual
|
|
4
|
+
* property, and the locked ones under `lockedVisualProperties`), and no style. The reader turns those values into
|
|
5
|
+
* the neutral vocabulary; the planner explains them. The writer does the reverse from what graphty draws.
|
|
6
|
+
*/
|
|
7
|
+
import { STYLE_ISSUE } from "../../styles/codes.js";
|
|
8
|
+
import { cytoscapeElementProperties, cytoscapeWritableProperties, } from "../../styles/cytoscape/emit.js";
|
|
9
|
+
import { normalizeVisualProperties } from "../../styles/cytoscape/lexicon.js";
|
|
10
|
+
import { emptyCytoscapeStyle } from "../../styles/cytoscape/mappings.js";
|
|
11
|
+
import { cytoscapeBackground, resolveCytoscapeBypasses } from "../../styles/cytoscape/resolve.js";
|
|
12
|
+
import { blockStyles, parseStyleBlock, STYLE_BLOCK_NAME } from "../../styles/io/block.js";
|
|
13
|
+
import { StyleNotes } from "../../styles/notes.js";
|
|
14
|
+
import { styleFingerprint } from "../../styles/plan/features.js";
|
|
15
|
+
import { plainCell, resolveStyles } from "../../styles/plan/resolve.js";
|
|
16
|
+
import { lossOf } from "../cx/styles.js";
|
|
17
|
+
import { GRAPHICS_COLUMN, XGMML_ORIGIN_NAMESPACE } from "./constants.js";
|
|
18
|
+
/**
|
|
19
|
+
* The name of a table's graphics column: the json column the XGMML reader keeps `<graphics>` in.
|
|
20
|
+
* @param table - the node, edge or graph table
|
|
21
|
+
* @returns the column's name, or null
|
|
22
|
+
*/
|
|
23
|
+
function graphicsColumnOf(table) {
|
|
24
|
+
for (const col of table) {
|
|
25
|
+
const { origin } = col.meta;
|
|
26
|
+
if (col.dtype === "json" && origin?.type === "graphics" && origin.namespace === XGMML_ORIGIN_NAMESPACE) {
|
|
27
|
+
return col.meta.name;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return table.get(GRAPHICS_COLUMN)?.dtype === "json" ? GRAPHICS_COLUMN : null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Each element's visual properties from its graphics: the graphics values normalized to visual property names, the
|
|
34
|
+
* locked ones (`lockedVisualProperties`, a session view's bypasses) on top.
|
|
35
|
+
* @param table - the node or edge table
|
|
36
|
+
* @param target - nodes or edges
|
|
37
|
+
* @param n - the element count
|
|
38
|
+
* @param notes - where too-deep nesting is noted
|
|
39
|
+
* @returns per element, its visual properties (null without graphics)
|
|
40
|
+
*/
|
|
41
|
+
export function graphicsBypasses(table, target, n, notes) {
|
|
42
|
+
const out = new Array(n).fill(null);
|
|
43
|
+
const name = graphicsColumnOf(table);
|
|
44
|
+
if (name === null) {
|
|
45
|
+
return out;
|
|
46
|
+
}
|
|
47
|
+
for (let i = 0; i < n; i++) {
|
|
48
|
+
const g = plainCell(table.value(name, i));
|
|
49
|
+
if (g === null || typeof g !== "object" || Array.isArray(g)) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const map = normalizeVisualProperties(target, g, notes);
|
|
53
|
+
const locked = Object.hasOwn(g, "lockedVisualProperties")
|
|
54
|
+
? g.lockedVisualProperties
|
|
55
|
+
: undefined;
|
|
56
|
+
if (locked !== null && typeof locked === "object") {
|
|
57
|
+
for (const [k, v] of normalizeVisualProperties(target, locked, notes)) {
|
|
58
|
+
map.set(k, v);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
out[i] = map.size > 0 ? map : null;
|
|
62
|
+
}
|
|
63
|
+
return out;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The styles of a graph whose elements carry Cytoscape's resolved visual properties in their graphics.
|
|
67
|
+
* @param snapshot - the graph
|
|
68
|
+
* @param context - the budget and cancel signal
|
|
69
|
+
* @param settings - the tool and the hidden-state column
|
|
70
|
+
* @returns the styles (canonical values, no declared rules)
|
|
71
|
+
*/
|
|
72
|
+
export function readXgmmlStyles(snapshot, context, settings) {
|
|
73
|
+
const notes = new StyleNotes();
|
|
74
|
+
const out = { node: { values: {} }, edge: { values: {} } };
|
|
75
|
+
for (const target of ["node", "edge"]) {
|
|
76
|
+
context.signal?.throwIfAborted();
|
|
77
|
+
const table = target === "node" ? snapshot.nodes : snapshot.edges;
|
|
78
|
+
const n = target === "node" ? snapshot.nodeCount : snapshot.edgeCount;
|
|
79
|
+
const maps = graphicsBypasses(table, target, n, notes);
|
|
80
|
+
const values = maps.some((m) => m !== null)
|
|
81
|
+
? resolveCytoscapeBypasses(target, maps, { notes, budget: context.budget })
|
|
82
|
+
: {};
|
|
83
|
+
hiddenToVisible(table, settings.hiddenColumn ?? null, n, values);
|
|
84
|
+
exactFromBlock(snapshot, target, values);
|
|
85
|
+
out[target] = { values: nonEmpty(values) };
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
canonical: true,
|
|
89
|
+
dialect: "cytoscape",
|
|
90
|
+
tool: settings.tool,
|
|
91
|
+
units: "px",
|
|
92
|
+
node: out.node,
|
|
93
|
+
edge: out.edge,
|
|
94
|
+
graph: graphStyleOf(snapshot, notes),
|
|
95
|
+
notes: notes.list(),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The styles of an XGMML file: its elements' resolved values, with Cytoscape desktop's default style beneath.
|
|
100
|
+
* @param snapshot - the graph
|
|
101
|
+
* @param context - the budget and cancel signal
|
|
102
|
+
* @returns the styles
|
|
103
|
+
*/
|
|
104
|
+
export function readXgmmlFileStyles(snapshot, context) {
|
|
105
|
+
return readXgmmlStyles(snapshot, context, { tool: "cytoscape" });
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* For a file graphty wrote: where an element's value is what the writer's nearest Cytoscape value of the
|
|
109
|
+
* `graphty.styles` block's value reads back as (a font family list written as its first family, a shape Cytoscape
|
|
110
|
+
* does not have), the block's exact value is the truth, so a re-import gives the same rules. A value that differs
|
|
111
|
+
* from what graphty wrote (another program edited it) stays the truth.
|
|
112
|
+
* @param snapshot - the graph
|
|
113
|
+
* @param target - nodes or edges
|
|
114
|
+
* @param values - the values per property, changed in place
|
|
115
|
+
* @param dialect - the Cytoscape dialect the file's values are written in
|
|
116
|
+
*/
|
|
117
|
+
export function exactFromBlock(snapshot, target, values, dialect = "desktop") {
|
|
118
|
+
const text = snapshot.graph.has(STYLE_BLOCK_NAME) ? plainCell(snapshot.graph.value(STYLE_BLOCK_NAME, 0)) : null;
|
|
119
|
+
if (typeof text !== "string") {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const parsed = parseStyleBlock(text, styleFingerprint(snapshot));
|
|
123
|
+
const ex = parsed.ok ? blockStyles(parsed.block, snapshot, "xgmml") : null;
|
|
124
|
+
if (ex === null) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const n = target === "node" ? snapshot.nodeCount : snapshot.edgeCount;
|
|
128
|
+
const want = new Map();
|
|
129
|
+
const exact = (property) => {
|
|
130
|
+
let held = want.get(property);
|
|
131
|
+
if (held === undefined) {
|
|
132
|
+
held = resolveStyles(ex, target, property, snapshot);
|
|
133
|
+
want.set(property, held);
|
|
134
|
+
}
|
|
135
|
+
return held;
|
|
136
|
+
};
|
|
137
|
+
// What each element's exact values are written as, read back the way the file is read.
|
|
138
|
+
const written = Array.from({ length: n }, (_v, i) => cytoscapeElementProperties(target, (property) => exact(property)[i] ?? null, dialect, () => undefined));
|
|
139
|
+
const readBack = resolveCytoscapeBypasses(target, written, { notes: new StyleNotes() });
|
|
140
|
+
for (const [property, native] of Object.entries(values)) {
|
|
141
|
+
const back = readBack[property];
|
|
142
|
+
if (native !== undefined && back !== undefined) {
|
|
143
|
+
values[property] = withBlockValues(native, back, exact(property));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* A property's values with the block's exact value wherever the file's value is what the writer wrote for it.
|
|
149
|
+
* @param native - the file's values
|
|
150
|
+
* @param back - what the writer wrote for the block's values, read back
|
|
151
|
+
* @param w - the block's values
|
|
152
|
+
* @returns the values, the file's own array when none changes
|
|
153
|
+
*/
|
|
154
|
+
function withBlockValues(native, back, w) {
|
|
155
|
+
let changed = null;
|
|
156
|
+
for (let i = 0; i < native.length; i++) {
|
|
157
|
+
if (w[i] !== null && native[i] !== w[i] && native[i] === back[i]) {
|
|
158
|
+
changed ?? (changed = [...native]);
|
|
159
|
+
changed[i] = w[i];
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return changed ?? native;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Marks the elements a hidden-state column holds true as not visible.
|
|
166
|
+
* @param table - the node or edge table
|
|
167
|
+
* @param column - the bool column, or null
|
|
168
|
+
* @param n - the element count
|
|
169
|
+
* @param values - the values per property, changed in place
|
|
170
|
+
*/
|
|
171
|
+
export function hiddenToVisible(table, column, n, values) {
|
|
172
|
+
if (column === null || !table.has(column)) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
let visible = null;
|
|
176
|
+
for (let i = 0; i < n; i++) {
|
|
177
|
+
if (plainCell(table.value(column, i)) === true) {
|
|
178
|
+
visible ?? (visible = values.visible === undefined ? new Array(n).fill(null) : [...values.visible]);
|
|
179
|
+
visible[i] = false;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (visible !== null) {
|
|
183
|
+
values.visible = visible;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* The properties with at least one value.
|
|
188
|
+
* @param values - per property, each element's value
|
|
189
|
+
* @returns the same without all-null properties
|
|
190
|
+
*/
|
|
191
|
+
export function nonEmpty(values) {
|
|
192
|
+
const out = {};
|
|
193
|
+
for (const [p, col] of Object.entries(values)) {
|
|
194
|
+
if (col?.some((v) => v !== null) === true) {
|
|
195
|
+
out[p] = col;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return out;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* The graph's background from its own graphics (`NETWORK_BACKGROUND_PAINT`).
|
|
202
|
+
* @param snapshot - the graph
|
|
203
|
+
* @param notes - where a bad value is noted
|
|
204
|
+
* @returns the graph style
|
|
205
|
+
*/
|
|
206
|
+
function graphStyleOf(snapshot, notes) {
|
|
207
|
+
const name = graphicsColumnOf(snapshot.graph);
|
|
208
|
+
const g = name === null ? null : plainCell(snapshot.graph.value(name, 0));
|
|
209
|
+
if (g === null || typeof g !== "object") {
|
|
210
|
+
return {};
|
|
211
|
+
}
|
|
212
|
+
const style = emptyCytoscapeStyle();
|
|
213
|
+
for (const [k, v] of normalizeVisualProperties("node", g, notes)) {
|
|
214
|
+
if (k.startsWith("NETWORK_")) {
|
|
215
|
+
style.network.defaults.set(k, v);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
const background = cytoscapeBackground(style, notes);
|
|
219
|
+
return background === null ? {} : { background };
|
|
220
|
+
}
|
|
221
|
+
// ------------------------------------------------------------------ writing
|
|
222
|
+
/**
|
|
223
|
+
* What the XGMML writer holds natively: every visual property Cytoscape keeps per element, and the graph's
|
|
224
|
+
* background. The block and the tagged values go into graph and element `<att>`s.
|
|
225
|
+
*/
|
|
226
|
+
export const XGMML_STYLE_CAPABILITIES = Object.freeze({
|
|
227
|
+
node: Object.freeze(cytoscapeWritableProperties("node", "desktop")),
|
|
228
|
+
edge: Object.freeze(cytoscapeWritableProperties("edge", "desktop")),
|
|
229
|
+
graph: Object.freeze(["background"]),
|
|
230
|
+
block: "attributes",
|
|
231
|
+
});
|
|
232
|
+
/** The visual properties Cytoscape also writes as `<graphics>` XML attributes, in its old spelling. */
|
|
233
|
+
const XML_ATTRIBUTES = {
|
|
234
|
+
node: [
|
|
235
|
+
["NODE_SHAPE", "type"],
|
|
236
|
+
["NODE_HEIGHT", "h"],
|
|
237
|
+
["NODE_WIDTH", "w"],
|
|
238
|
+
["NODE_FILL_COLOR", "fill"],
|
|
239
|
+
["NODE_BORDER_WIDTH", "width"],
|
|
240
|
+
["NODE_BORDER_PAINT", "outline"],
|
|
241
|
+
],
|
|
242
|
+
edge: [
|
|
243
|
+
["EDGE_WIDTH", "width"],
|
|
244
|
+
["EDGE_STROKE_UNSELECTED_PAINT", "fill"],
|
|
245
|
+
],
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* One element's graphics record for a file written with styles: what graphty draws as Cytoscape visual properties,
|
|
249
|
+
* the six classic ones also as XML attributes (the importer reads both alike), over the kept graphics' visual
|
|
250
|
+
* properties no neutral property carries (custom graphics, label widths) and edge bends.
|
|
251
|
+
* @param target - nodes or edges
|
|
252
|
+
* @param styles - the exporter's style input
|
|
253
|
+
* @param i - the element index
|
|
254
|
+
* @param kept - the element's kept graphics record, or null
|
|
255
|
+
* @returns the record, or null when there is nothing to write
|
|
256
|
+
*/
|
|
257
|
+
export function styledGraphics(target, styles, i, kept) {
|
|
258
|
+
const vps = cytoscapeElementProperties(target, (p) => styles.picture(target, p)[i] ?? null, "desktop", () => undefined);
|
|
259
|
+
const out = {};
|
|
260
|
+
for (const [vp, attribute] of XML_ATTRIBUTES[target]) {
|
|
261
|
+
if (vps.has(vp)) {
|
|
262
|
+
out[attribute] = String(vps.get(vp));
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
for (const [k, v] of Object.entries(kept ?? {})) {
|
|
266
|
+
// a kept visual property the picture does not write, or the edge's bends; old-spelling and nested keys
|
|
267
|
+
// would be read before the picture's values and contradict them
|
|
268
|
+
if (k === "Line" || (/^[A-Z][A-Z_0-9]+$/.test(k) && !vps.has(k))) {
|
|
269
|
+
out[k] = v;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
for (const [vp, v] of vps) {
|
|
273
|
+
out[vp] = String(v);
|
|
274
|
+
}
|
|
275
|
+
return Object.keys(out).length === 0 ? null : out;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* What writing every element's graphics with styles loses: each value written as the nearest one Cytoscape allows,
|
|
279
|
+
* counted per element.
|
|
280
|
+
* @param styles - the exporter's style input
|
|
281
|
+
* @param snapshot - the graph
|
|
282
|
+
* @returns the loss notes
|
|
283
|
+
*/
|
|
284
|
+
export function styledGraphicsNotes(styles, snapshot) {
|
|
285
|
+
const notes = new StyleNotes();
|
|
286
|
+
for (const target of ["node", "edge"]) {
|
|
287
|
+
const n = target === "node" ? snapshot.nodeCount : snapshot.edgeCount;
|
|
288
|
+
for (let i = 0; i < n; i++) {
|
|
289
|
+
cytoscapeElementProperties(target, (p) => styles.picture(target, p)[i] ?? null, "desktop", (p) => {
|
|
290
|
+
notes.add(STYLE_ISSUE.APPROXIMATED, target, p, { element: i });
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return notes.list().map(lossOf);
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* The graph's graphics record for a file written with styles: the kept record with the background replaced.
|
|
298
|
+
* @param styles - the exporter's style input
|
|
299
|
+
* @param kept - the kept graph graphics, or null
|
|
300
|
+
* @returns the record, or null
|
|
301
|
+
*/
|
|
302
|
+
export function styledGraphGraphics(styles, kept) {
|
|
303
|
+
const { background } = styles.rules.styles.graph;
|
|
304
|
+
const out = { ...kept };
|
|
305
|
+
if (background !== undefined) {
|
|
306
|
+
out.NETWORK_BACKGROUND_PAINT = background.toUpperCase();
|
|
307
|
+
}
|
|
308
|
+
return Object.keys(out).length === 0 ? null : out;
|
|
309
|
+
}
|
|
310
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/formats/xgmml/styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAEH,0BAA0B,EAC1B,2BAA2B,GAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAwB,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AACxH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE1F,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB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