@graphty/graph-io 0.3.47 → 0.3.49
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-wWjCRzKj.js → approximations-Bzn3L-je.js} +2 -2
- package/dist/chunks/{approximations-wWjCRzKj.js.map → approximations-Bzn3L-je.js.map} +1 -1
- package/dist/chunks/bends-BGXjv_U4.js +129 -0
- package/dist/chunks/bends-BGXjv_U4.js.map +1 -0
- package/dist/chunks/{block-DiGq58c3.js → block-iptrlMBb.js} +947 -134
- package/dist/chunks/block-iptrlMBb.js.map +1 -0
- package/dist/chunks/choose-CczZJaX_.js +717 -0
- package/dist/chunks/choose-CczZJaX_.js.map +1 -0
- package/dist/chunks/codes-BE2xir2k.js +157 -0
- package/dist/chunks/codes-BE2xir2k.js.map +1 -0
- package/dist/chunks/{constants-BKwqelYD.js → constants-CKkYLPtt.js} +2 -2
- package/dist/chunks/{constants-BKwqelYD.js.map → constants-CKkYLPtt.js.map} +1 -1
- package/dist/chunks/context-C3p0RQxR.js +664 -0
- package/dist/chunks/context-C3p0RQxR.js.map +1 -0
- package/dist/chunks/{convert-BcQ8_jMo.js → convert-Ct2zelbQ.js} +7 -2
- package/dist/chunks/convert-Ct2zelbQ.js.map +1 -0
- package/dist/chunks/credentials-DXHx7nwR.js +349 -0
- package/dist/chunks/credentials-DXHx7nwR.js.map +1 -0
- package/dist/chunks/cx-export-Bt6NoqTQ.js +259 -0
- package/dist/chunks/cx-export-Bt6NoqTQ.js.map +1 -0
- package/dist/chunks/descriptor-B28U25x4.js +60 -0
- package/dist/chunks/descriptor-B28U25x4.js.map +1 -0
- package/dist/chunks/descriptor-C-YDhtsn.js +48 -0
- package/dist/chunks/descriptor-C-YDhtsn.js.map +1 -0
- package/dist/chunks/descriptor-DLA5kINx.js +142 -0
- package/dist/chunks/descriptor-DLA5kINx.js.map +1 -0
- package/dist/chunks/{emit-CwU8cUmG.js → emit-BwHQkZle.js} +1690 -103
- package/dist/chunks/emit-BwHQkZle.js.map +1 -0
- package/dist/chunks/{escape-CgzxiYPg.js → escape-CuCIzNMB.js} +12 -12
- package/dist/chunks/{escape-CgzxiYPg.js.map → escape-CuCIzNMB.js.map} +1 -1
- package/dist/chunks/{export-BvqAXCKh.js → export-Cha4dRFz.js} +48 -1780
- package/dist/chunks/export-Cha4dRFz.js.map +1 -0
- package/dist/chunks/{exporter--Mk9gXCJ.js → exporter-BP6otMO6.js} +6 -4
- package/dist/chunks/{exporter--Mk9gXCJ.js.map → exporter-BP6otMO6.js.map} +1 -1
- package/dist/chunks/{exporter-CrDWIyiq.js → exporter-D2CETOMK.js} +1222 -154
- package/dist/chunks/exporter-D2CETOMK.js.map +1 -0
- package/dist/chunks/{exporter-DndFlGSa.js → exporter-D9yMtocA.js} +7 -6
- package/dist/chunks/{exporter-DndFlGSa.js.map → exporter-D9yMtocA.js.map} +1 -1
- package/dist/chunks/exporter-_jrBTnos.js +1009 -0
- package/dist/chunks/exporter-_jrBTnos.js.map +1 -0
- package/dist/chunks/{exporter-CJgfhF-l.js → exporter-nDfxIK5D.js} +9 -7
- package/dist/chunks/{exporter-CJgfhF-l.js.map → exporter-nDfxIK5D.js.map} +1 -1
- package/dist/chunks/format-BXiAb-1h.js +408 -0
- package/dist/chunks/format-BXiAb-1h.js.map +1 -0
- package/dist/chunks/{generic-Dq1ntt9q.js → generic-ymWCETAJ.js} +387 -31
- package/dist/chunks/generic-ymWCETAJ.js.map +1 -0
- package/dist/chunks/{importer-CMmeMWlC.js → importer-B92x1xY5.js} +15 -263
- package/dist/chunks/importer-B92x1xY5.js.map +1 -0
- package/dist/chunks/{importer-DiZRmOQG.js → importer-CT9mJ1nn.js} +328 -90
- package/dist/chunks/importer-CT9mJ1nn.js.map +1 -0
- package/dist/chunks/{importer-COTK9Tsl.js → importer-DaLTjbds.js} +116 -1099
- package/dist/chunks/importer-DaLTjbds.js.map +1 -0
- package/dist/chunks/{importer-iFYPEKaJ.js → importer-GREKMdIf.js} +28 -16
- package/dist/chunks/importer-GREKMdIf.js.map +1 -0
- package/dist/chunks/{importer-BSvfrX_h.js → importer-PqaaKKnY.js} +23 -1016
- package/dist/chunks/importer-PqaaKKnY.js.map +1 -0
- package/dist/chunks/{importer-yh_aBCU6.js → importer-Vn5QvmmJ.js} +66 -12
- package/dist/chunks/importer-Vn5QvmmJ.js.map +1 -0
- package/dist/chunks/{importer-e6LGpqHB.js → importer-vRq4h3j5.js} +1470 -354
- package/dist/chunks/importer-vRq4h3j5.js.map +1 -0
- package/dist/chunks/input-CAxt_aV-.js +1397 -0
- package/dist/chunks/input-CAxt_aV-.js.map +1 -0
- package/dist/chunks/{json-elements-DJZRZ6jd.js → json-elements-Cq76WjnZ.js} +4 -4
- package/dist/chunks/{json-elements-DJZRZ6jd.js.map → json-elements-Cq76WjnZ.js.map} +1 -1
- package/dist/chunks/{lexicon-CT69Kd87.js → lexicon-Clf4QIyl.js} +299 -77
- package/dist/chunks/lexicon-Clf4QIyl.js.map +1 -0
- package/dist/chunks/{ontology-export-G4MqRdux.js → ontology-export-OMo91mb0.js} +4 -3
- package/dist/chunks/{ontology-export-G4MqRdux.js.map → ontology-export-OMo91mb0.js.map} +1 -1
- package/dist/chunks/{records-CiaWZrFH.js → records-NJiYvekn.js} +2 -2
- package/dist/chunks/{records-CiaWZrFH.js.map → records-NJiYvekn.js.map} +1 -1
- package/dist/chunks/{format-BpQBx8MZ.js → report-CwMfYa9J.js} +70 -127
- package/dist/chunks/report-CwMfYa9J.js.map +1 -0
- package/dist/chunks/round-trip-Zm3_ivgq.js +79 -0
- package/dist/chunks/round-trip-Zm3_ivgq.js.map +1 -0
- package/dist/chunks/sigv4-EokFic1V.js +247 -0
- package/dist/chunks/sigv4-EokFic1V.js.map +1 -0
- package/dist/chunks/{styles-BQnsga7p.js → styles-CCs214_3.js} +1300 -168
- package/dist/chunks/styles-CCs214_3.js.map +1 -0
- package/dist/chunks/styles-Cm62yyQX.js +2812 -0
- package/dist/chunks/styles-Cm62yyQX.js.map +1 -0
- package/dist/chunks/styles-DPQQIig4.js +1928 -0
- package/dist/chunks/styles-DPQQIig4.js.map +1 -0
- package/dist/chunks/styles-yed-UMFdNqze.js +1213 -0
- package/dist/chunks/styles-yed-UMFdNqze.js.map +1 -0
- package/dist/chunks/{text-CzJNFOS9.js → text-ystE2bYi.js} +2 -2
- package/dist/chunks/{text-CzJNFOS9.js.map → text-ystE2bYi.js.map} +1 -1
- package/dist/csv.js +7 -5
- package/dist/csv.js.map +1 -1
- package/dist/cx.js +5 -4
- package/dist/cx.js.map +1 -1
- package/dist/cx2.js +2 -2
- package/dist/cys.js +1 -1
- package/dist/dot.js +5 -4
- package/dist/dot.js.map +1 -1
- package/dist/gexf.js +42 -10
- package/dist/gexf.js.map +1 -1
- package/dist/gml.js +850 -193
- package/dist/gml.js.map +1 -1
- package/dist/graph-io.js +1189 -220
- package/dist/graph-io.js.map +1 -1
- package/dist/graphml.js +3 -3
- package/dist/json.js +3 -2
- package/dist/neo4j.js +6 -4
- package/dist/neo4j.js.map +1 -1
- package/dist/obo.js +1 -1
- package/dist/pajek.js +1 -1
- package/dist/positions.js +45 -3
- package/dist/positions.js.map +1 -1
- package/dist/sources-cypher.d.ts +1 -0
- package/dist/sources-cypher.js +1351 -0
- package/dist/sources-cypher.js.map +1 -0
- package/dist/sources-ndex.d.ts +1 -0
- package/dist/sources-ndex.js +278 -0
- package/dist/sources-ndex.js.map +1 -0
- package/dist/sources-rest.d.ts +1 -0
- package/dist/sources-rest.js +1377 -0
- package/dist/sources-rest.js.map +1 -0
- package/dist/sources-sparql.d.ts +1 -0
- package/dist/sources-sparql.js +405 -0
- package/dist/sources-sparql.js.map +1 -0
- package/dist/src/common/report.d.ts +6 -3
- package/dist/src/common/report.d.ts.map +1 -1
- package/dist/src/common/report.js +15 -9
- package/dist/src/common/report.js.map +1 -1
- package/dist/src/formats/cx/importer.d.ts.map +1 -1
- package/dist/src/formats/cx/importer.js +5 -1
- package/dist/src/formats/cx/importer.js.map +1 -1
- package/dist/src/formats/cx/styles.d.ts +24 -1
- package/dist/src/formats/cx/styles.d.ts.map +1 -1
- package/dist/src/formats/cx/styles.js +118 -11
- package/dist/src/formats/cx/styles.js.map +1 -1
- package/dist/src/formats/cx2/importer.d.ts.map +1 -1
- package/dist/src/formats/cx2/importer.js +1 -0
- package/dist/src/formats/cx2/importer.js.map +1 -1
- package/dist/src/formats/cx2/styles.d.ts.map +1 -1
- package/dist/src/formats/cx2/styles.js +3 -1
- package/dist/src/formats/cx2/styles.js.map +1 -1
- package/dist/src/formats/cys/importer.d.ts.map +1 -1
- package/dist/src/formats/cys/importer.js +1 -0
- package/dist/src/formats/cys/importer.js.map +1 -1
- package/dist/src/formats/cys/styles.d.ts +2 -0
- package/dist/src/formats/cys/styles.d.ts.map +1 -1
- package/dist/src/formats/cys/styles.js +15 -7
- package/dist/src/formats/cys/styles.js.map +1 -1
- package/dist/src/formats/dot/drawing.d.ts +98 -0
- package/dist/src/formats/dot/drawing.d.ts.map +1 -0
- package/dist/src/formats/dot/drawing.js +734 -0
- package/dist/src/formats/dot/drawing.js.map +1 -0
- package/dist/src/formats/dot/importer.d.ts.map +1 -1
- package/dist/src/formats/dot/importer.js +108 -31
- package/dist/src/formats/dot/importer.js.map +1 -1
- package/dist/src/formats/dot/label-places.d.ts +34 -0
- package/dist/src/formats/dot/label-places.d.ts.map +1 -0
- package/dist/src/formats/dot/label-places.js +179 -0
- package/dist/src/formats/dot/label-places.js.map +1 -0
- package/dist/src/formats/dot/record.d.ts +50 -0
- package/dist/src/formats/dot/record.d.ts.map +1 -0
- package/dist/src/formats/dot/record.js +275 -0
- package/dist/src/formats/dot/record.js.map +1 -0
- package/dist/src/formats/dot/styles.d.ts +62 -2
- package/dist/src/formats/dot/styles.d.ts.map +1 -1
- package/dist/src/formats/dot/styles.js +1457 -120
- package/dist/src/formats/dot/styles.js.map +1 -1
- package/dist/src/formats/gexf/dialog-metrics.d.ts +15 -0
- package/dist/src/formats/gexf/dialog-metrics.d.ts.map +1 -0
- package/dist/src/formats/gexf/dialog-metrics.js +59 -0
- package/dist/src/formats/gexf/dialog-metrics.js.map +1 -0
- package/dist/src/formats/gexf/importer.d.ts +7 -0
- package/dist/src/formats/gexf/importer.d.ts.map +1 -1
- package/dist/src/formats/gexf/importer.js +41 -5
- package/dist/src/formats/gexf/importer.js.map +1 -1
- package/dist/src/formats/gexf/preview.d.ts +77 -0
- package/dist/src/formats/gexf/preview.d.ts.map +1 -0
- package/dist/src/formats/gexf/preview.js +191 -0
- package/dist/src/formats/gexf/preview.js.map +1 -0
- package/dist/src/formats/gexf/schema.d.ts.map +1 -1
- package/dist/src/formats/gexf/schema.js +2 -1
- package/dist/src/formats/gexf/schema.js.map +1 -1
- package/dist/src/formats/gexf/styles.d.ts +60 -16
- package/dist/src/formats/gexf/styles.d.ts.map +1 -1
- package/dist/src/formats/gexf/styles.js +883 -131
- package/dist/src/formats/gexf/styles.js.map +1 -1
- package/dist/src/formats/gml/importer.d.ts +5 -2
- package/dist/src/formats/gml/importer.d.ts.map +1 -1
- package/dist/src/formats/gml/importer.js +258 -71
- package/dist/src/formats/gml/importer.js.map +1 -1
- package/dist/src/formats/gml/index.d.ts +1 -1
- package/dist/src/formats/gml/index.d.ts.map +1 -1
- package/dist/src/formats/gml/index.js +1 -1
- package/dist/src/formats/gml/index.js.map +1 -1
- package/dist/src/formats/gml/positions.d.ts +7 -0
- package/dist/src/formats/gml/positions.d.ts.map +1 -1
- package/dist/src/formats/gml/positions.js +29 -7
- package/dist/src/formats/gml/positions.js.map +1 -1
- package/dist/src/formats/gml/styles.d.ts.map +1 -1
- package/dist/src/formats/gml/styles.js +756 -103
- package/dist/src/formats/gml/styles.js.map +1 -1
- package/dist/src/formats/graphml/styles-plain.d.ts.map +1 -1
- package/dist/src/formats/graphml/styles-plain.js +8 -12
- package/dist/src/formats/graphml/styles-plain.js.map +1 -1
- package/dist/src/formats/graphml/styles-yed.d.ts +21 -15
- package/dist/src/formats/graphml/styles-yed.d.ts.map +1 -1
- package/dist/src/formats/graphml/styles-yed.js +749 -148
- package/dist/src/formats/graphml/styles-yed.js.map +1 -1
- package/dist/src/formats/graphml/styles-yfiles3.d.ts +1 -1
- package/dist/src/formats/graphml/styles-yfiles3.d.ts.map +1 -1
- package/dist/src/formats/graphml/styles-yfiles3.js +429 -64
- package/dist/src/formats/graphml/styles-yfiles3.js.map +1 -1
- package/dist/src/formats/graphml/yfiles.d.ts +3 -3
- package/dist/src/formats/graphml/yfiles.d.ts.map +1 -1
- package/dist/src/formats/graphml/yfiles.js +16 -6
- package/dist/src/formats/graphml/yfiles.js.map +1 -1
- package/dist/src/formats/json/dialect.d.ts +3 -2
- package/dist/src/formats/json/dialect.d.ts.map +1 -1
- package/dist/src/formats/json/dialect.js +39 -5
- package/dist/src/formats/json/dialect.js.map +1 -1
- package/dist/src/formats/json/importer.d.ts +13 -2
- package/dist/src/formats/json/importer.d.ts.map +1 -1
- package/dist/src/formats/json/importer.js +42 -6
- package/dist/src/formats/json/importer.js.map +1 -1
- package/dist/src/formats/json/index.d.ts +1 -1
- package/dist/src/formats/json/index.d.ts.map +1 -1
- package/dist/src/formats/json/index.js +1 -1
- package/dist/src/formats/json/index.js.map +1 -1
- package/dist/src/formats/json/positions.d.ts +5 -2
- package/dist/src/formats/json/positions.d.ts.map +1 -1
- package/dist/src/formats/json/positions.js +20 -4
- package/dist/src/formats/json/positions.js.map +1 -1
- package/dist/src/formats/json/styles.d.ts +12 -1
- package/dist/src/formats/json/styles.d.ts.map +1 -1
- package/dist/src/formats/json/styles.js +1755 -136
- package/dist/src/formats/json/styles.js.map +1 -1
- package/dist/src/formats/pajek/draw.d.ts +96 -0
- package/dist/src/formats/pajek/draw.d.ts.map +1 -0
- package/dist/src/formats/pajek/draw.js +372 -0
- package/dist/src/formats/pajek/draw.js.map +1 -0
- package/dist/src/formats/pajek/exporter.d.ts.map +1 -1
- package/dist/src/formats/pajek/exporter.js +70 -51
- package/dist/src/formats/pajek/exporter.js.map +1 -1
- package/dist/src/formats/pajek/importer.d.ts +9 -0
- package/dist/src/formats/pajek/importer.d.ts.map +1 -1
- package/dist/src/formats/pajek/importer.js +233 -102
- package/dist/src/formats/pajek/importer.js.map +1 -1
- package/dist/src/formats/pajek/index.d.ts +1 -0
- package/dist/src/formats/pajek/index.d.ts.map +1 -1
- package/dist/src/formats/pajek/index.js.map +1 -1
- package/dist/src/formats/pajek/styles.d.ts +15 -7
- package/dist/src/formats/pajek/styles.d.ts.map +1 -1
- package/dist/src/formats/pajek/styles.js +1279 -114
- package/dist/src/formats/pajek/styles.js.map +1 -1
- package/dist/src/formats/pajek/syntax.d.ts +10 -1
- package/dist/src/formats/pajek/syntax.d.ts.map +1 -1
- package/dist/src/formats/pajek/syntax.js +26 -2
- package/dist/src/formats/pajek/syntax.js.map +1 -1
- package/dist/src/formats/xgmml/emit.d.ts +1 -0
- package/dist/src/formats/xgmml/emit.d.ts.map +1 -1
- package/dist/src/formats/xgmml/emit.js +65 -5
- package/dist/src/formats/xgmml/emit.js.map +1 -1
- package/dist/src/formats/xgmml/styles.d.ts +23 -3
- package/dist/src/formats/xgmml/styles.d.ts.map +1 -1
- package/dist/src/formats/xgmml/styles.js +278 -60
- package/dist/src/formats/xgmml/styles.js.map +1 -1
- package/dist/src/index.d.ts +10 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/positions/convert.d.ts.map +1 -1
- package/dist/src/positions/convert.js +11 -1
- package/dist/src/positions/convert.js.map +1 -1
- package/dist/src/positions/extract.d.ts.map +1 -1
- package/dist/src/positions/extract.js +53 -1
- package/dist/src/positions/extract.js.map +1 -1
- package/dist/src/positions/index.d.ts +1 -1
- package/dist/src/positions/index.d.ts.map +1 -1
- package/dist/src/positions/types.d.ts +59 -0
- package/dist/src/positions/types.d.ts.map +1 -1
- package/dist/src/registry.d.ts +173 -1
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +196 -1
- package/dist/src/registry.js.map +1 -1
- package/dist/src/sources/builtins.d.ts +11 -0
- package/dist/src/sources/builtins.d.ts.map +1 -0
- package/dist/src/sources/builtins.js +53 -0
- package/dist/src/sources/builtins.js.map +1 -0
- package/dist/src/sources/codes.d.ts +230 -0
- package/dist/src/sources/codes.d.ts.map +1 -0
- package/dist/src/sources/codes.js +58 -0
- package/dist/src/sources/codes.js.map +1 -0
- package/dist/src/sources/context.d.ts +112 -0
- package/dist/src/sources/context.d.ts.map +1 -0
- package/dist/src/sources/context.js +740 -0
- package/dist/src/sources/context.js.map +1 -0
- package/dist/src/sources/credentials.d.ts +179 -0
- package/dist/src/sources/credentials.d.ts.map +1 -0
- package/dist/src/sources/credentials.js +301 -0
- package/dist/src/sources/credentials.js.map +1 -0
- package/dist/src/sources/cypher/descriptor.d.ts +21 -0
- package/dist/src/sources/cypher/descriptor.d.ts.map +1 -0
- package/dist/src/sources/cypher/descriptor.js +124 -0
- package/dist/src/sources/cypher/descriptor.js.map +1 -0
- package/dist/src/sources/cypher/flatten.d.ts +72 -0
- package/dist/src/sources/cypher/flatten.d.ts.map +1 -0
- package/dist/src/sources/cypher/flatten.js +279 -0
- package/dist/src/sources/cypher/flatten.js.map +1 -0
- package/dist/src/sources/cypher/index.d.ts +33 -0
- package/dist/src/sources/cypher/index.d.ts.map +1 -0
- package/dist/src/sources/cypher/index.js +511 -0
- package/dist/src/sources/cypher/index.js.map +1 -0
- package/dist/src/sources/cypher/params.d.ts +40 -0
- package/dist/src/sources/cypher/params.d.ts.map +1 -0
- package/dist/src/sources/cypher/params.js +6 -0
- package/dist/src/sources/cypher/params.js.map +1 -0
- package/dist/src/sources/cypher/profiles.d.ts +44 -0
- package/dist/src/sources/cypher/profiles.d.ts.map +1 -0
- package/dist/src/sources/cypher/profiles.js +61 -0
- package/dist/src/sources/cypher/profiles.js.map +1 -0
- package/dist/src/sources/cypher/query-builder.d.ts +123 -0
- package/dist/src/sources/cypher/query-builder.d.ts.map +1 -0
- package/dist/src/sources/cypher/query-builder.js +267 -0
- package/dist/src/sources/cypher/query-builder.js.map +1 -0
- package/dist/src/sources/cypher/transports/bolt.d.ts +21 -0
- package/dist/src/sources/cypher/transports/bolt.d.ts.map +1 -0
- package/dist/src/sources/cypher/transports/bolt.js +185 -0
- package/dist/src/sources/cypher/transports/bolt.js.map +1 -0
- package/dist/src/sources/cypher/transports/neptune-analytics.d.ts +15 -0
- package/dist/src/sources/cypher/transports/neptune-analytics.d.ts.map +1 -0
- package/dist/src/sources/cypher/transports/neptune-analytics.js +38 -0
- package/dist/src/sources/cypher/transports/neptune-analytics.js.map +1 -0
- package/dist/src/sources/cypher/transports/neptune-https.d.ts +31 -0
- package/dist/src/sources/cypher/transports/neptune-https.d.ts.map +1 -0
- package/dist/src/sources/cypher/transports/neptune-https.js +104 -0
- package/dist/src/sources/cypher/transports/neptune-https.js.map +1 -0
- package/dist/src/sources/cypher/transports/query-api.d.ts +14 -0
- package/dist/src/sources/cypher/transports/query-api.d.ts.map +1 -0
- package/dist/src/sources/cypher/transports/query-api.js +80 -0
- package/dist/src/sources/cypher/transports/query-api.js.map +1 -0
- package/dist/src/sources/cypher/transports/transport.d.ts +78 -0
- package/dist/src/sources/cypher/transports/transport.d.ts.map +1 -0
- package/dist/src/sources/cypher/transports/transport.js +77 -0
- package/dist/src/sources/cypher/transports/transport.js.map +1 -0
- package/dist/src/sources/cypher/types-map.d.ts +91 -0
- package/dist/src/sources/cypher/types-map.d.ts.map +1 -0
- package/dist/src/sources/cypher/types-map.js +306 -0
- package/dist/src/sources/cypher/types-map.js.map +1 -0
- package/dist/src/sources/define.d.ts +47 -0
- package/dist/src/sources/define.d.ts.map +1 -0
- package/dist/src/sources/define.js +173 -0
- package/dist/src/sources/define.js.map +1 -0
- package/dist/src/sources/fail.d.ts +33 -0
- package/dist/src/sources/fail.d.ts.map +1 -0
- package/dist/src/sources/fail.js +49 -0
- package/dist/src/sources/fail.js.map +1 -0
- package/dist/src/sources/ids.d.ts +69 -0
- package/dist/src/sources/ids.d.ts.map +1 -0
- package/dist/src/sources/ids.js +69 -0
- package/dist/src/sources/ids.js.map +1 -0
- package/dist/src/sources/ndex/client.d.ts +31 -0
- package/dist/src/sources/ndex/client.d.ts.map +1 -0
- package/dist/src/sources/ndex/client.js +90 -0
- package/dist/src/sources/ndex/client.js.map +1 -0
- package/dist/src/sources/ndex/descriptor.d.ts +10 -0
- package/dist/src/sources/ndex/descriptor.d.ts.map +1 -0
- package/dist/src/sources/ndex/descriptor.js +55 -0
- package/dist/src/sources/ndex/descriptor.js.map +1 -0
- package/dist/src/sources/ndex/expand.d.ts +20 -0
- package/dist/src/sources/ndex/expand.d.ts.map +1 -0
- package/dist/src/sources/ndex/expand.js +87 -0
- package/dist/src/sources/ndex/expand.js.map +1 -0
- package/dist/src/sources/ndex/index.d.ts +25 -0
- package/dist/src/sources/ndex/index.d.ts.map +1 -0
- package/dist/src/sources/ndex/index.js +191 -0
- package/dist/src/sources/ndex/index.js.map +1 -0
- package/dist/src/sources/ndex/params.d.ts +17 -0
- package/dist/src/sources/ndex/params.d.ts.map +1 -0
- package/dist/src/sources/ndex/params.js +6 -0
- package/dist/src/sources/ndex/params.js.map +1 -0
- package/dist/src/sources/ndex/share-url.d.ts +40 -0
- package/dist/src/sources/ndex/share-url.d.ts.map +1 -0
- package/dist/src/sources/ndex/share-url.js +64 -0
- package/dist/src/sources/ndex/share-url.js.map +1 -0
- package/dist/src/sources/params.d.ts +31 -0
- package/dist/src/sources/params.d.ts.map +1 -0
- package/dist/src/sources/params.js +6 -0
- package/dist/src/sources/params.js.map +1 -0
- package/dist/src/sources/registry.d.ts +118 -0
- package/dist/src/sources/registry.d.ts.map +1 -0
- package/dist/src/sources/registry.js +193 -0
- package/dist/src/sources/registry.js.map +1 -0
- package/dist/src/sources/rest/descriptor.d.ts +16 -0
- package/dist/src/sources/rest/descriptor.d.ts.map +1 -0
- package/dist/src/sources/rest/descriptor.js +76 -0
- package/dist/src/sources/rest/descriptor.js.map +1 -0
- package/dist/src/sources/rest/index.d.ts +14 -0
- package/dist/src/sources/rest/index.d.ts.map +1 -0
- package/dist/src/sources/rest/index.js +13 -0
- package/dist/src/sources/rest/index.js.map +1 -0
- package/dist/src/sources/rest/mapping.d.ts +30 -0
- package/dist/src/sources/rest/mapping.d.ts.map +1 -0
- package/dist/src/sources/rest/mapping.js +362 -0
- package/dist/src/sources/rest/mapping.js.map +1 -0
- package/dist/src/sources/rest/openalex.d.ts +27 -0
- package/dist/src/sources/rest/openalex.d.ts.map +1 -0
- package/dist/src/sources/rest/openalex.js +269 -0
- package/dist/src/sources/rest/openalex.js.map +1 -0
- package/dist/src/sources/rest/paging.d.ts +53 -0
- package/dist/src/sources/rest/paging.d.ts.map +1 -0
- package/dist/src/sources/rest/paging.js +138 -0
- package/dist/src/sources/rest/paging.js.map +1 -0
- package/dist/src/sources/rest/params.d.ts +216 -0
- package/dist/src/sources/rest/params.d.ts.map +1 -0
- package/dist/src/sources/rest/params.js +7 -0
- package/dist/src/sources/rest/params.js.map +1 -0
- package/dist/src/sources/rest/records.d.ts +41 -0
- package/dist/src/sources/rest/records.d.ts.map +1 -0
- package/dist/src/sources/rest/records.js +240 -0
- package/dist/src/sources/rest/records.js.map +1 -0
- package/dist/src/sources/rest/samples/deps-dev.d.ts +10 -0
- package/dist/src/sources/rest/samples/deps-dev.d.ts.map +1 -0
- package/dist/src/sources/rest/samples/deps-dev.js +47 -0
- package/dist/src/sources/rest/samples/deps-dev.js.map +1 -0
- package/dist/src/sources/rest/samples/string.d.ts +9 -0
- package/dist/src/sources/rest/samples/string.d.ts.map +1 -0
- package/dist/src/sources/rest/samples/string.js +42 -0
- package/dist/src/sources/rest/samples/string.js.map +1 -0
- package/dist/src/sources/rest/selectors.d.ts +41 -0
- package/dist/src/sources/rest/selectors.d.ts.map +1 -0
- package/dist/src/sources/rest/selectors.js +81 -0
- package/dist/src/sources/rest/selectors.js.map +1 -0
- package/dist/src/sources/rest/source.d.ts +67 -0
- package/dist/src/sources/rest/source.d.ts.map +1 -0
- package/dist/src/sources/rest/source.js +650 -0
- package/dist/src/sources/rest/source.js.map +1 -0
- package/dist/src/sources/rest/templates.d.ts +38 -0
- package/dist/src/sources/rest/templates.d.ts.map +1 -0
- package/dist/src/sources/rest/templates.js +125 -0
- package/dist/src/sources/rest/templates.js.map +1 -0
- package/dist/src/sources/run.d.ts +93 -0
- package/dist/src/sources/run.d.ts.map +1 -0
- package/dist/src/sources/run.js +673 -0
- package/dist/src/sources/run.js.map +1 -0
- package/dist/src/sources/sha256.d.ts +12 -0
- package/dist/src/sources/sha256.d.ts.map +1 -0
- package/dist/src/sources/sha256.js +95 -0
- package/dist/src/sources/sha256.js.map +1 -0
- package/dist/src/sources/sigv4.d.ts +26 -0
- package/dist/src/sources/sigv4.d.ts.map +1 -0
- package/dist/src/sources/sigv4.js +184 -0
- package/dist/src/sources/sigv4.js.map +1 -0
- package/dist/src/sources/sparql/descriptor.d.ts +10 -0
- package/dist/src/sources/sparql/descriptor.d.ts.map +1 -0
- package/dist/src/sources/sparql/descriptor.js +64 -0
- package/dist/src/sources/sparql/descriptor.js.map +1 -0
- package/dist/src/sources/sparql/index.d.ts +28 -0
- package/dist/src/sources/sparql/index.d.ts.map +1 -0
- package/dist/src/sources/sparql/index.js +314 -0
- package/dist/src/sources/sparql/index.js.map +1 -0
- package/dist/src/sources/sparql/ntriples.d.ts +69 -0
- package/dist/src/sources/sparql/ntriples.d.ts.map +1 -0
- package/dist/src/sources/sparql/ntriples.js +180 -0
- package/dist/src/sources/sparql/ntriples.js.map +1 -0
- package/dist/src/sources/sparql/params.d.ts +27 -0
- package/dist/src/sources/sparql/params.d.ts.map +1 -0
- package/dist/src/sources/sparql/params.js +5 -0
- package/dist/src/sources/sparql/params.js.map +1 -0
- package/dist/src/sources/sparql/query.d.ts +72 -0
- package/dist/src/sources/sparql/query.d.ts.map +1 -0
- package/dist/src/sources/sparql/query.js +113 -0
- package/dist/src/sources/sparql/query.js.map +1 -0
- package/dist/src/sources/testing.d.ts +96 -0
- package/dist/src/sources/testing.d.ts.map +1 -0
- package/dist/src/sources/testing.js +138 -0
- package/dist/src/sources/testing.js.map +1 -0
- package/dist/src/sources/types.d.ts +696 -0
- package/dist/src/sources/types.d.ts.map +1 -0
- package/dist/src/sources/types.js +10 -0
- package/dist/src/sources/types.js.map +1 -0
- package/dist/src/styles/annotations.d.ts +61 -5
- package/dist/src/styles/annotations.d.ts.map +1 -1
- package/dist/src/styles/annotations.js +130 -22
- package/dist/src/styles/annotations.js.map +1 -1
- package/dist/src/styles/canon/bends.d.ts +46 -0
- package/dist/src/styles/canon/bends.d.ts.map +1 -1
- package/dist/src/styles/canon/bends.js +123 -0
- package/dist/src/styles/canon/bends.js.map +1 -1
- package/dist/src/styles/canon/color-tables.d.ts +6 -1
- package/dist/src/styles/canon/color-tables.d.ts.map +1 -1
- package/dist/src/styles/canon/color-tables.js +10 -4
- package/dist/src/styles/canon/color-tables.js.map +1 -1
- package/dist/src/styles/canon/color.d.ts +3 -1
- package/dist/src/styles/canon/color.d.ts.map +1 -1
- package/dist/src/styles/canon/color.js +103 -3
- package/dist/src/styles/canon/color.js.map +1 -1
- package/dist/src/styles/canon/enums.d.ts +2 -2
- package/dist/src/styles/canon/enums.d.ts.map +1 -1
- package/dist/src/styles/canon/enums.js +82 -7
- package/dist/src/styles/canon/enums.js.map +1 -1
- package/dist/src/styles/canon/graphviz.d.ts +12 -3
- package/dist/src/styles/canon/graphviz.d.ts.map +1 -1
- package/dist/src/styles/canon/graphviz.js +57 -9
- package/dist/src/styles/canon/graphviz.js.map +1 -1
- package/dist/src/styles/canon/number.d.ts +8 -0
- package/dist/src/styles/canon/number.d.ts.map +1 -1
- package/dist/src/styles/canon/number.js +18 -0
- package/dist/src/styles/canon/number.js.map +1 -1
- package/dist/src/styles/canon/text.d.ts +29 -2
- package/dist/src/styles/canon/text.d.ts.map +1 -1
- package/dist/src/styles/canon/text.js +156 -16
- package/dist/src/styles/canon/text.js.map +1 -1
- package/dist/src/styles/codes.d.ts +2 -0
- package/dist/src/styles/codes.d.ts.map +1 -1
- package/dist/src/styles/codes.js +2 -0
- package/dist/src/styles/codes.js.map +1 -1
- package/dist/src/styles/cyjs/cascade.d.ts.map +1 -1
- package/dist/src/styles/cyjs/cascade.js +1037 -35
- package/dist/src/styles/cyjs/cascade.js.map +1 -1
- package/dist/src/styles/cyjs/defaults-table.d.ts.map +1 -1
- package/dist/src/styles/cyjs/defaults-table.js +5 -0
- package/dist/src/styles/cyjs/defaults-table.js.map +1 -1
- package/dist/src/styles/cyjs/emit.d.ts.map +1 -1
- package/dist/src/styles/cyjs/emit.js +216 -12
- package/dist/src/styles/cyjs/emit.js.map +1 -1
- package/dist/src/styles/cyjs/face.d.ts +20 -0
- package/dist/src/styles/cyjs/face.d.ts.map +1 -0
- package/dist/src/styles/cyjs/face.js +332 -0
- package/dist/src/styles/cyjs/face.js.map +1 -0
- package/dist/src/styles/cyjs/mappers.d.ts +48 -2
- package/dist/src/styles/cyjs/mappers.d.ts.map +1 -1
- package/dist/src/styles/cyjs/mappers.js +463 -26
- package/dist/src/styles/cyjs/mappers.js.map +1 -1
- package/dist/src/styles/cyjs/routes.d.ts +53 -0
- package/dist/src/styles/cyjs/routes.d.ts.map +1 -0
- package/dist/src/styles/cyjs/routes.js +360 -0
- package/dist/src/styles/cyjs/routes.js.map +1 -0
- package/dist/src/styles/cytoscape/charts.d.ts +23 -0
- package/dist/src/styles/cytoscape/charts.d.ts.map +1 -0
- package/dist/src/styles/cytoscape/charts.js +560 -0
- package/dist/src/styles/cytoscape/charts.js.map +1 -0
- package/dist/src/styles/cytoscape/emit.d.ts.map +1 -1
- package/dist/src/styles/cytoscape/emit.js +204 -44
- package/dist/src/styles/cytoscape/emit.js.map +1 -1
- package/dist/src/styles/cytoscape/lexicon.d.ts +97 -3
- package/dist/src/styles/cytoscape/lexicon.d.ts.map +1 -1
- package/dist/src/styles/cytoscape/lexicon.js +413 -79
- package/dist/src/styles/cytoscape/lexicon.js.map +1 -1
- package/dist/src/styles/cytoscape/mappings.d.ts +30 -0
- package/dist/src/styles/cytoscape/mappings.d.ts.map +1 -1
- package/dist/src/styles/cytoscape/mappings.js +92 -0
- package/dist/src/styles/cytoscape/mappings.js.map +1 -1
- package/dist/src/styles/cytoscape/resolve.d.ts +46 -3
- package/dist/src/styles/cytoscape/resolve.d.ts.map +1 -1
- package/dist/src/styles/cytoscape/resolve.js +632 -22
- package/dist/src/styles/cytoscape/resolve.js.map +1 -1
- package/dist/src/styles/cytoscape/translate.d.ts.map +1 -1
- package/dist/src/styles/cytoscape/translate.js +10 -10
- package/dist/src/styles/cytoscape/translate.js.map +1 -1
- package/dist/src/styles/defaults.d.ts +50 -0
- package/dist/src/styles/defaults.d.ts.map +1 -1
- package/dist/src/styles/defaults.js +315 -37
- package/dist/src/styles/defaults.js.map +1 -1
- package/dist/src/styles/index.d.ts +4 -3
- package/dist/src/styles/index.d.ts.map +1 -1
- package/dist/src/styles/index.js +3 -2
- package/dist/src/styles/index.js.map +1 -1
- package/dist/src/styles/internal.d.ts +1 -0
- package/dist/src/styles/internal.d.ts.map +1 -1
- package/dist/src/styles/internal.js +1 -0
- package/dist/src/styles/internal.js.map +1 -1
- package/dist/src/styles/io/block.d.ts.map +1 -1
- package/dist/src/styles/io/block.js +9 -0
- package/dist/src/styles/io/block.js.map +1 -1
- package/dist/src/styles/io/generic.d.ts.map +1 -1
- package/dist/src/styles/io/generic.js +56 -16
- package/dist/src/styles/io/generic.js.map +1 -1
- package/dist/src/styles/io/round-trip.d.ts +56 -0
- package/dist/src/styles/io/round-trip.d.ts.map +1 -0
- package/dist/src/styles/io/round-trip.js +138 -0
- package/dist/src/styles/io/round-trip.js.map +1 -0
- package/dist/src/styles/io/writer.d.ts.map +1 -1
- package/dist/src/styles/io/writer.js +13 -4
- package/dist/src/styles/io/writer.js.map +1 -1
- package/dist/src/styles/notes.d.ts.map +1 -1
- package/dist/src/styles/notes.js +1 -0
- package/dist/src/styles/notes.js.map +1 -1
- package/dist/src/styles/plan/features.d.ts +1 -1
- package/dist/src/styles/plan/features.d.ts.map +1 -1
- package/dist/src/styles/plan/features.js +22 -2
- package/dist/src/styles/plan/features.js.map +1 -1
- package/dist/src/styles/plan/index.d.ts +1 -1
- package/dist/src/styles/plan/index.d.ts.map +1 -1
- package/dist/src/styles/plan/index.js +1 -1
- package/dist/src/styles/plan/index.js.map +1 -1
- package/dist/src/styles/plan/plan.d.ts.map +1 -1
- package/dist/src/styles/plan/plan.js +61 -4
- package/dist/src/styles/plan/plan.js.map +1 -1
- package/dist/src/styles/plan/resolve.d.ts +13 -1
- package/dist/src/styles/plan/resolve.d.ts.map +1 -1
- package/dist/src/styles/plan/resolve.js +53 -6
- package/dist/src/styles/plan/resolve.js.map +1 -1
- package/dist/src/styles/slots.d.ts +14 -0
- package/dist/src/styles/slots.d.ts.map +1 -0
- package/dist/src/styles/slots.js +20 -0
- package/dist/src/styles/slots.js.map +1 -0
- package/dist/src/styles/types.d.ts +638 -5
- package/dist/src/styles/types.d.ts.map +1 -1
- package/dist/src/styles/vocabulary.d.ts +3 -2
- package/dist/src/styles/vocabulary.d.ts.map +1 -1
- package/dist/src/styles/vocabulary.js +218 -1
- package/dist/src/styles/vocabulary.js.map +1 -1
- package/dist/src/types.d.ts +19 -5
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/styles.js +29 -238
- package/dist/styles.js.map +1 -1
- package/dist/xgmml.js +3 -3
- package/docs/samples/people.json +6 -0
- package/package.json +53 -8
- package/src/common/report.ts +27 -7
- package/src/formats/cx/importer.ts +6 -1
- package/src/formats/cx/styles.ts +144 -9
- package/src/formats/cx2/importer.ts +1 -0
- package/src/formats/cx2/styles.ts +3 -1
- package/src/formats/cys/importer.ts +1 -0
- package/src/formats/cys/styles.ts +27 -5
- package/src/formats/dot/drawing.ts +799 -0
- package/src/formats/dot/importer.ts +120 -35
- package/src/formats/dot/label-places.ts +228 -0
- package/src/formats/dot/record.ts +336 -0
- package/src/formats/dot/styles.ts +1657 -154
- package/src/formats/gexf/dialog-metrics.ts +61 -0
- package/src/formats/gexf/importer.ts +50 -5
- package/src/formats/gexf/preview.ts +217 -0
- package/src/formats/gexf/schema.ts +2 -1
- package/src/formats/gexf/styles.ts +1144 -142
- package/src/formats/gml/importer.ts +291 -76
- package/src/formats/gml/index.ts +1 -1
- package/src/formats/gml/positions.ts +29 -7
- package/src/formats/gml/styles.ts +854 -111
- package/src/formats/graphml/styles-plain.ts +8 -23
- package/src/formats/graphml/styles-yed.ts +821 -159
- package/src/formats/graphml/styles-yfiles3.ts +485 -63
- package/src/formats/graphml/yfiles.ts +19 -6
- package/src/formats/json/dialect.ts +41 -5
- package/src/formats/json/importer.ts +59 -7
- package/src/formats/json/index.ts +1 -0
- package/src/formats/json/positions.ts +22 -5
- package/src/formats/json/styles.ts +2041 -185
- package/src/formats/pajek/draw.ts +458 -0
- package/src/formats/pajek/exporter.ts +81 -49
- package/src/formats/pajek/importer.ts +278 -103
- package/src/formats/pajek/index.ts +1 -0
- package/src/formats/pajek/styles.ts +1382 -133
- package/src/formats/pajek/syntax.ts +27 -2
- package/src/formats/xgmml/emit.ts +73 -5
- package/src/formats/xgmml/styles.ts +331 -71
- package/src/index.ts +94 -0
- package/src/positions/convert.ts +12 -1
- package/src/positions/extract.ts +55 -1
- package/src/positions/index.ts +1 -0
- package/src/positions/types.ts +60 -0
- package/src/registry.ts +326 -1
- package/src/sources/builtins.ts +63 -0
- package/src/sources/codes.ts +235 -0
- package/src/sources/context.ts +894 -0
- package/src/sources/credentials.ts +409 -0
- package/src/sources/cypher/descriptor.ts +131 -0
- package/src/sources/cypher/flatten.ts +323 -0
- package/src/sources/cypher/index.ts +628 -0
- package/src/sources/cypher/params.ts +41 -0
- package/src/sources/cypher/profiles.ts +78 -0
- package/src/sources/cypher/query-builder.ts +327 -0
- package/src/sources/cypher/transports/bolt.ts +228 -0
- package/src/sources/cypher/transports/neptune-analytics.ts +41 -0
- package/src/sources/cypher/transports/neptune-https.ts +122 -0
- package/src/sources/cypher/transports/query-api.ts +100 -0
- package/src/sources/cypher/transports/transport.ts +139 -0
- package/src/sources/cypher/types-map.ts +418 -0
- package/src/sources/define.ts +195 -0
- package/src/sources/fail.ts +70 -0
- package/src/sources/ids.ts +80 -0
- package/src/sources/ndex/client.ts +102 -0
- package/src/sources/ndex/descriptor.ts +64 -0
- package/src/sources/ndex/expand.ts +100 -0
- package/src/sources/ndex/index.ts +235 -0
- package/src/sources/ndex/params.ts +17 -0
- package/src/sources/ndex/share-url.ts +84 -0
- package/src/sources/params.ts +32 -0
- package/src/sources/registry.ts +325 -0
- package/src/sources/rest/descriptor.ts +79 -0
- package/src/sources/rest/index.ts +22 -0
- package/src/sources/rest/mapping.ts +401 -0
- package/src/sources/rest/openalex.ts +288 -0
- package/src/sources/rest/paging.ts +180 -0
- package/src/sources/rest/params.ts +243 -0
- package/src/sources/rest/records.ts +289 -0
- package/src/sources/rest/samples/deps-dev.ts +49 -0
- package/src/sources/rest/samples/string.ts +44 -0
- package/src/sources/rest/selectors.ts +91 -0
- package/src/sources/rest/source.ts +776 -0
- package/src/sources/rest/templates.ts +151 -0
- package/src/sources/run.ts +793 -0
- package/src/sources/sha256.ts +99 -0
- package/src/sources/sigv4.ts +209 -0
- package/src/sources/sparql/descriptor.ts +67 -0
- package/src/sources/sparql/index.ts +356 -0
- package/src/sources/sparql/ntriples.ts +219 -0
- package/src/sources/sparql/params.ts +28 -0
- package/src/sources/sparql/query.ts +162 -0
- package/src/sources/testing.ts +210 -0
- package/src/sources/types.ts +776 -0
- package/src/styles/annotations.ts +201 -27
- package/src/styles/canon/bends.ts +137 -0
- package/src/styles/canon/color-tables.ts +10 -4
- package/src/styles/canon/color.ts +105 -3
- package/src/styles/canon/enums.ts +99 -8
- package/src/styles/canon/graphviz.ts +71 -10
- package/src/styles/canon/number.ts +19 -0
- package/src/styles/canon/text.ts +187 -16
- package/src/styles/codes.ts +2 -0
- package/src/styles/cyjs/cascade.ts +1193 -38
- package/src/styles/cyjs/defaults-table.ts +5 -0
- package/src/styles/cyjs/emit.ts +247 -16
- package/src/styles/cyjs/face.ts +372 -0
- package/src/styles/cyjs/mappers.ts +498 -28
- package/src/styles/cyjs/routes.ts +432 -0
- package/src/styles/cytoscape/charts.ts +684 -0
- package/src/styles/cytoscape/emit.ts +220 -44
- package/src/styles/cytoscape/lexicon.ts +459 -80
- package/src/styles/cytoscape/mappings.ts +108 -0
- package/src/styles/cytoscape/resolve.ts +763 -23
- package/src/styles/cytoscape/translate.ts +11 -11
- package/src/styles/defaults.ts +436 -38
- package/src/styles/index.ts +5 -0
- package/src/styles/internal.ts +1 -0
- package/src/styles/io/block.ts +10 -0
- package/src/styles/io/generic.ts +79 -23
- package/src/styles/io/round-trip.ts +202 -0
- package/src/styles/io/writer.ts +14 -4
- package/src/styles/notes.ts +1 -0
- package/src/styles/plan/features.ts +23 -2
- package/src/styles/plan/index.ts +1 -1
- package/src/styles/plan/plan.ts +69 -5
- package/src/styles/plan/resolve.ts +61 -6
- package/src/styles/slots.ts +25 -0
- package/src/styles/types.ts +658 -4
- package/src/styles/vocabulary.ts +226 -3
- package/src/types.ts +19 -5
- package/dist/chunks/block-DiGq58c3.js.map +0 -1
- package/dist/chunks/choose--jM0yYCo.js +0 -57
- package/dist/chunks/choose--jM0yYCo.js.map +0 -1
- package/dist/chunks/convert-BcQ8_jMo.js.map +0 -1
- package/dist/chunks/emit-CwU8cUmG.js.map +0 -1
- package/dist/chunks/export-BvqAXCKh.js.map +0 -1
- package/dist/chunks/exporter-CrDWIyiq.js.map +0 -1
- package/dist/chunks/format-BpQBx8MZ.js.map +0 -1
- package/dist/chunks/generic-Dq1ntt9q.js.map +0 -1
- package/dist/chunks/importer-BSvfrX_h.js.map +0 -1
- package/dist/chunks/importer-CMmeMWlC.js.map +0 -1
- package/dist/chunks/importer-COTK9Tsl.js.map +0 -1
- package/dist/chunks/importer-DiZRmOQG.js.map +0 -1
- package/dist/chunks/importer-e6LGpqHB.js.map +0 -1
- package/dist/chunks/importer-iFYPEKaJ.js.map +0 -1
- package/dist/chunks/importer-yh_aBCU6.js.map +0 -1
- package/dist/chunks/lexicon-CT69Kd87.js.map +0 -1
- package/dist/chunks/styles-BQnsga7p.js.map +0 -1
- package/dist/chunks/styles-D3fRphrO.js +0 -690
- package/dist/chunks/styles-D3fRphrO.js.map +0 -1
- package/dist/chunks/styles-yed-BF5x3_Y5.js +0 -842
- package/dist/chunks/styles-yed-BF5x3_Y5.js.map +0 -1
- package/dist/chunks/writer-DMKvthQE.js +0 -448
- package/dist/chunks/writer-DMKvthQE.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choose-CczZJaX_.js","sources":["../../src/formats/dot/drawing.ts","../../src/common/choose.ts"],"sourcesContent":["/**\n * Two parts of how Graphviz draws a node that its attributes alone do not say: the font a `fontname` picks, and the\n * corners of a `shape=polygon` node.\n *\n * - Fonts (`lib/common/ps_font_equiv.h`): a PostScript name such as `Helvetica-Bold` or `Times-Italic` (any case)\n * is that family at that weight and slant, drawn by a generic family when the machine lacks it. Any other name\n * goes to fontconfig as it is, which draws a family it does not have in its default, sans-serif face.\n * - Polygons (`poly_init`, `lib/common/shapes.c`): `sides` corners of a regular polygon, widened by `distortion`\n * toward the top or the bottom, sheared by `skew` and turned by `orientation` degrees, then stretched to the\n * node's box. Corners that reach past the box after the turn make the node larger.\n */\n\n/** A family a CSS font list falls back to. */\nconst GENERIC_FAMILIES: ReadonlySet<string> = new Set([\n \"serif\",\n \"sans-serif\",\n \"monospace\",\n \"cursive\",\n \"fantasy\",\n \"system-ui\",\n]);\n\n/** The PostScript font families Graphviz knows, by the name before the dash, lowercase: the family and its generic. */\nconst POSTSCRIPT_FAMILIES: ReadonlyMap<string, readonly [string, string]> = new Map([\n [\"avantgarde\", [\"URW Gothic\", \"sans-serif\"]],\n [\"bookman\", [\"URW Bookman\", \"serif\"]],\n [\"courier\", [\"Courier\", \"monospace\"]],\n [\"helvetica\", [\"Helvetica\", \"sans-serif\"]],\n [\"helvetica-narrow\", [\"Helvetica\", \"sans-serif\"]],\n [\"newcenturyschlbk\", [\"Century Schoolbook\", \"serif\"]],\n [\"palatino\", [\"Palatino\", \"serif\"]],\n [\"symbol\", [\"Symbol\", \"fantasy\"]],\n [\"times\", [\"Times\", \"serif\"]],\n [\"zapfchancery\", [\"URW Chancery\", \"serif\"]],\n [\"zapfdingbats\", [\"Dingbats\", \"fantasy\"]],\n]);\n\n/** The weight and slant suffixes of the PostScript names, lowercase. */\nconst POSTSCRIPT_STYLES: ReadonlyMap<string, readonly [bold: boolean, italic: boolean]> = new Map([\n [\"\", [false, false]],\n [\"roman\", [false, false]],\n [\"book\", [false, false]],\n [\"light\", [false, false]],\n [\"bold\", [true, false]],\n [\"demi\", [true, false]],\n [\"italic\", [false, true]],\n [\"oblique\", [false, true]],\n [\"bookoblique\", [false, true]],\n [\"lightitalic\", [false, true]],\n [\"mediumitalic\", [false, true]],\n [\"bolditalic\", [true, true]],\n [\"boldoblique\", [true, true]],\n [\"demiitalic\", [true, true]],\n [\"demioblique\", [true, true]],\n]);\n\n/** A font as graphty draws it: a CSS family list, and whether it is bold and italic. */\ninterface GraphvizFont {\n /** The families, the last a generic one. */\n readonly family: string;\n readonly bold: boolean;\n readonly italic: boolean;\n}\n\n/**\n * The font a Graphviz `fontname` draws.\n * @param name - the `fontname` value\n * @returns the families, weight and slant\n */\nexport function graphvizFont(name: string): GraphvizFont {\n const trimmed = name.trim();\n // a fontconfig pattern (`DejaVu Sans:bold`) is written into the SVG as it is, a family no viewer has, so the\n // drawing falls back to the viewer's default face\n if (trimmed.includes(\":\")) {\n return { family: \"Times, serif\", bold: false, italic: false };\n }\n const ps = postscriptFont(trimmed);\n if (ps !== null) {\n return ps;\n }\n const last = trimmed.split(\",\").at(-1)?.trim().toLowerCase() ?? \"\";\n return { family: GENERIC_FAMILIES.has(last) ? trimmed : `${trimmed}, sans-serif`, bold: false, italic: false };\n}\n\n/**\n * The font a PostScript font name such as `Helvetica-Bold` or `Times-Italic` (any case) names: its family with a\n * generic one after it, its weight and its slant (`lib/common/ps_font_equiv.h`). Pajek writes its `font` into its SVG\n * export as given, which the pinned fonts resolve the same way.\n * @param name - the name, trimmed\n * @returns the font, or null for a name that is not a PostScript font name\n */\nexport function postscriptFont(name: string): GraphvizFont | null {\n const lower = name.toLowerCase();\n for (const [base, [family, generic]] of POSTSCRIPT_FAMILIES) {\n if (lower === base || lower.startsWith(`${base}-`)) {\n const style = POSTSCRIPT_STYLES.get(lower.slice(base.length + 1));\n if (style !== undefined) {\n return { family: `${family}, ${generic}`, bold: style[0], italic: style[1] };\n }\n }\n }\n return null;\n}\n\n/** How each PostScript family is spelled, with the suffixes of its upright, bold and slanted faces. */\nconst POSTSCRIPT_NAMES: readonly { family: string; name: string; plain: string; bold: string; slant: string }[] = [\n { family: \"URW Gothic\", name: \"AvantGarde\", plain: \"Book\", bold: \"Demi\", slant: \"Oblique\" },\n { family: \"URW Bookman\", name: \"Bookman\", plain: \"Light\", bold: \"Demi\", slant: \"Italic\" },\n { family: \"Courier\", name: \"Courier\", plain: \"\", bold: \"Bold\", slant: \"Oblique\" },\n { family: \"Helvetica\", name: \"Helvetica\", plain: \"\", bold: \"Bold\", slant: \"Oblique\" },\n { family: \"Century Schoolbook\", name: \"NewCenturySchlbk\", plain: \"Roman\", bold: \"Bold\", slant: \"Italic\" },\n { family: \"Palatino\", name: \"Palatino\", plain: \"Roman\", bold: \"Bold\", slant: \"Italic\" },\n { family: \"Times\", name: \"Times\", plain: \"Roman\", bold: \"Bold\", slant: \"Italic\" },\n];\n\n/**\n * The `fontname` that draws a font in Graphviz: a PostScript name for a family Graphviz knows by one, the family\n * alone when the list only adds a generic fallback (which Graphviz falls back to anyway), else the list as it is.\n * @param family - the CSS family list\n * @param bold - whether it is bold\n * @param italic - whether it is italic\n * @returns the name\n */\nexport function graphvizFontName(family: string, bold: boolean, italic: boolean): string {\n const parts = family.split(\",\").map((p) => p.trim());\n if (parts.length !== 2 || !GENERIC_FAMILIES.has(parts[1].toLowerCase())) {\n return family;\n }\n const ps = POSTSCRIPT_NAMES.find((p) => p.family.toLowerCase() === parts[0].toLowerCase());\n if (ps === undefined) {\n return parts[0];\n }\n const slant = italic ? ps.slant : \"\";\n const suffix = bold ? `${ps.bold}${slant}` : slant || ps.plain;\n return suffix === \"\" ? ps.name : `${ps.name}-${suffix}`;\n}\n\n/** A `shape=polygon` node's form: Graphviz's polygon attributes. */\ninterface GraphvizPolygon {\n readonly sides: number;\n readonly distortion: number;\n readonly skew: number;\n /** Degrees, counter-clockwise. */\n readonly orientation: number;\n}\n\n/**\n * The corners of a Graphviz polygon as fractions of the half width and half height of the box Graphviz fits it to\n * (y up): a regular polygon's corners lie on the box's ellipse, and a distorted, skewed or turned one may reach past\n * the box, which Graphviz then grows to hold it.\n * @param polygon - the polygon's attributes\n * @returns the corners, in Graphviz's order\n */\nexport function graphvizPolygonCorners(polygon: GraphvizPolygon): [number, number][] {\n const { sides, distortion, skew, orientation } = polygon;\n const sector = (2 * Math.PI) / sides;\n const sideLength = Math.sin(sector / 2);\n const skewDist = Math.hypot(Math.abs(distortion) + Math.abs(skew), 1);\n const gDistortion = (distortion * Math.SQRT2) / Math.cos(sector / 2);\n const gSkew = skew / 2;\n let angle = (sector - Math.PI) / 2;\n let rx = 0.5 * Math.cos(angle);\n let ry = 0.5 * Math.sin(angle);\n angle += (Math.PI - sector) / 2;\n const corners: [number, number][] = [];\n for (let i = 0; i < sides; i++) {\n angle += sector;\n rx += sideLength * Math.cos(angle);\n ry += sideLength * Math.sin(angle);\n const px = rx * (skewDist + ry * gDistortion) + ry * gSkew;\n const alpha = (orientation * Math.PI) / 180 + Math.atan2(ry, px);\n const r = Math.hypot(px, ry);\n // Graphviz's corners are fractions of the box's whole width; twice that is a fraction of the half width\n corners.push([2 * r * Math.cos(alpha), 2 * r * Math.sin(alpha)]);\n }\n return corners;\n}\n\n/**\n * Whether a polygon is drawn as a plain box: four sides, no distortion or skew, turned by a multiple of 90 degrees\n * (Graphviz then fits the label exactly, with no ellipse around it).\n * @param polygon - the polygon's attributes\n * @returns true for a box\n */\nexport function isGraphvizBox(polygon: GraphvizPolygon): boolean {\n return (\n polygon.sides === 4 &&\n Math.abs(polygon.orientation % 90) < 0.5 &&\n polygon.distortion === 0 &&\n polygon.skew === 0\n );\n}\n\n/** Graphviz's built-in shapes that are polygons of their own sides, distortion, skew and orientation (`shapes.c`). */\nexport const GRAPHVIZ_POLYGON_SHAPES: ReadonlyMap<string, GraphvizPolygon> = new Map(\n (\n [\n [\"triangle\", 3, 0, 0, 0],\n [\"invtriangle\", 3, 0, 0, 180],\n [\"trapezium\", 4, -0.4, 0, 0],\n [\"invtrapezium\", 4, -0.4, 0, 180],\n [\"parallelogram\", 4, 0, 0.6, 0],\n [\"house\", 5, -0.64, 0, 0],\n [\"invhouse\", 5, -0.64, 0, 180],\n [\"pentagon\", 5, 0, 0, 0],\n [\"septagon\", 7, 0, 0, 0],\n // a distorted ellipse is drawn as a polygon of 120 sides\n [\"egg\", 120, -0.3, 0, 0],\n ] as const\n ).map(([name, sides, distortion, skew, orientation]) => [name, { sides, distortion, skew, orientation }]),\n);\n\n/** A point in points, relative to a node's center, y up. */\ntype GlyphPoint = readonly [number, number];\n\n/**\n * A Graphviz shape drawn as pieces of its own (`round_corners`, lib/common/shapes.c): its outline, further closed\n * pieces beside it, and open lines, every point in points relative to the node's center, y up.\n */\ninterface GraphvizGlyph {\n /** The outline the node's fill and border follow. */\n readonly outline: readonly GlyphPoint[];\n /** Further closed pieces, filled and outlined as the outline is (an `assembly`'s second bar). */\n readonly parts: readonly (readonly GlyphPoint[])[];\n /** Open lines in the pen's color (a `promoter`'s baseline, a `box3d`'s edges); one ending where it starts is closed. */\n readonly lines: readonly (readonly GlyphPoint[])[];\n /** Whether the outline is filled with no line round it (an `underline`, whose line is its lines alone). */\n readonly unstroked?: boolean;\n /** How far out from the outline a ring round it is drawn, line to line (an `insulator`'s open square). */\n readonly ring?: number;\n}\n\n/**\n * A synthetic-biology shape's baseline across the node's middle.\n * @param W - half the node's width\n * @returns the line\n */\nconst baseline = (W: number): GlyphPoint[] => [\n [-W, 0],\n [W, 0],\n];\n\n/** The bow tie of a ribosome or protease site (shapes.c's `RIBOSITE`, `PROTEASESITE`), 6 by 6 points. */\nconst BOW_TIE: readonly GlyphPoint[] = [\n [3, 6],\n [3, 7.5],\n [1.5, 9],\n [3, 10.5],\n [3, 12],\n [1.5, 12],\n [0, 10.5],\n [-1.5, 12],\n [-3, 12],\n [-3, 10.5],\n [-1.5, 9],\n [-3, 7.5],\n [-3, 6],\n [-1.5, 6],\n [0, 7.5],\n [1.5, 6],\n];\n\n/** The octagon of an RNA or protein stability element (shapes.c's `RNASTAB`, `PROTEINSTAB`), 6 by 6 points. */\nconst OCTAGON: readonly GlyphPoint[] = [\n [1.5, 6],\n [3, 7.5],\n [3, 10.5],\n [1.5, 12],\n [-1.5, 12],\n [-3, 10.5],\n [-3, 7.5],\n [-1.5, 6],\n];\n\n/** A stem drawn as two short dashes from the baseline up to a glyph 6 points above it. */\nconst DASHED_STEM: readonly GlyphPoint[][] = [\n [\n [0, 0],\n [0, 1.5],\n ],\n [\n [0, 3],\n [0, 4.5],\n ],\n];\n\n/**\n * A bar 6 points tall.\n * @param x0 - its left\n * @param x1 - its right\n * @param y - its bottom\n * @returns its corners\n */\nconst bar = (x0: number, x1: number, y: number): GlyphPoint[] => [\n [x0, y],\n [x1, y],\n [x1, y + 6],\n [x0, y + 6],\n];\n\n// Each shape's pieces at a node W by H points from its center (half its width and height). Graphviz draws the\n// decorations a fixed number of points across whatever the node's size, and the synthetic-biology glyphs on a\n// baseline through the node's middle, most of them a fixed size (measured with Graphviz 14.1.2's `neato -n2 -Tsvg`\n// at 36 x 36, 72 x 36, 36 x 72 and 108 x 54 points).\nconst GLYPHS: ReadonlyMap<string, (W: number, H: number) => GraphvizGlyph> = new Map<\n string,\n (W: number, H: number) => GraphvizGlyph\n>([\n [\n \"box3d\",\n (W, H) => ({\n outline: [\n [W, H],\n [-W + 4, H],\n [-W, H - 4],\n [-W, -H],\n [W - 4, -H],\n [W, -H + 4],\n ],\n parts: [],\n lines: [\n [\n [W - 4, H - 4],\n [-W, H - 4],\n ],\n [\n [W - 4, H - 4],\n [W - 4, -H],\n ],\n [\n [W - 4, H - 4],\n [W, H],\n ],\n ],\n }),\n ],\n [\n \"tab\",\n (W, H) => ({\n outline: [\n [W, H],\n [-W + 12, H],\n [-W + 12, H + 4],\n [-W, H + 4],\n [-W, -H],\n [W, -H],\n ],\n parts: [],\n lines: [\n [\n [-W, H],\n [-W + 12, H],\n ],\n ],\n }),\n ],\n [\n \"folder\",\n (W, H) => ({\n outline: [\n [W, H],\n [W - 3, H + 4],\n [W - 24, H + 4],\n [W - 27, H],\n [-W, H],\n [-W, -H],\n [W, -H],\n ],\n parts: [],\n lines: [],\n }),\n ],\n [\n \"component\",\n (W, H) => ({\n outline: [\n [W, H],\n [-W, H],\n [-W, H - 4],\n [-W - 4, H - 4],\n [-W - 4, H - 8],\n [-W, H - 8],\n [-W, -H + 8],\n [-W - 4, -H + 8],\n [-W - 4, -H + 4],\n [-W, -H + 4],\n [-W, -H],\n [W, -H],\n ],\n parts: [],\n lines: [\n [\n [-W, H - 4],\n [-W + 4, H - 4],\n [-W + 4, H - 8],\n [-W, H - 8],\n ],\n [\n [-W, -H + 8],\n [-W + 4, -H + 8],\n [-W + 4, -H + 4],\n [-W, -H + 4],\n ],\n ],\n }),\n ],\n [\n \"note\",\n (W, H) => ({\n outline: [\n [W - 6, H],\n [-W, H],\n [-W, -H],\n [W, -H],\n [W, H - 6],\n ],\n parts: [],\n lines: [\n [\n [W - 6, H],\n [W - 6, H - 6],\n ],\n [\n [W, H - 6],\n [W - 6, H - 6],\n ],\n ],\n }),\n ],\n [\n \"underline\",\n (W, H) => ({\n outline: [\n [W, H],\n [-W, H],\n [-W, -H],\n [W, -H],\n ],\n parts: [],\n lines: [\n [\n [-W, -H],\n [W, -H],\n ],\n ],\n unstroked: true,\n }),\n ],\n [\n \"cds\",\n (W, H) => ({\n outline: [\n [W - 12, H - 6],\n [-W, H - 6],\n [-W, -H + 6],\n [W - 12, -H + 6],\n [W, 0],\n ],\n parts: [],\n lines: [],\n }),\n ],\n [\n \"larrow\",\n (W, H) => ({\n outline: [\n [W, H - 6],\n [-W + 18, H - 6],\n [-W + 18, H],\n [-W, 0],\n [-W + 18, -H],\n [-W + 18, -H + 6],\n [W, -H + 6],\n ],\n parts: [],\n lines: [],\n }),\n ],\n [\n \"rarrow\",\n (W, H) => ({\n outline: [\n [W - 18, H - 6],\n [-W, H - 6],\n [-W, -H + 6],\n [W - 18, -H + 6],\n [W - 18, -H],\n [W, 0],\n [W - 18, H],\n ],\n parts: [],\n lines: [],\n }),\n ],\n [\n \"lpromoter\",\n (W, H) => ({\n outline: [\n [W, H - 6],\n [-W + 18, H - 6],\n [-W + 18, H],\n [-W, 0],\n [-W + 18, -H],\n [-W + 18, -H + 6],\n [W - 18, -H + 6],\n [W - 18, -H],\n [W, -H],\n ],\n parts: [],\n lines: [],\n }),\n ],\n [\n \"rpromoter\",\n (W, H) => ({\n outline: [\n [W - 18, H - 6],\n [-W, H - 6],\n [-W, -H],\n [-W + 18, -H],\n [-W + 18, -H + 6],\n [W - 18, -H + 6],\n [W - 18, -H],\n [W, 0],\n [W - 18, H],\n ],\n parts: [],\n lines: [],\n }),\n ],\n [\n \"promoter\",\n (W) => ({\n outline: [\n [W / 4, 18],\n [-W / 2, 18],\n [-W / 2, 0],\n [-W / 2 + 6, 0],\n [-W / 2 + 6, 12],\n [W / 4, 12],\n [W / 4, 9],\n [W / 4 + 12, 15],\n [W / 4, 21],\n ],\n parts: [],\n lines: [baseline(W)],\n }),\n ],\n [\n \"terminator\",\n (W) => ({\n outline: [\n [3, 0],\n [3, 6],\n [9, 6],\n [9, 12],\n [-9, 12],\n [-9, 6],\n [-3, 6],\n [-3, 0],\n ],\n parts: [],\n lines: [baseline(W)],\n }),\n ],\n [\n \"utr\",\n (W) => ({\n outline: [\n [9, 0],\n [9, 3],\n [3, 9],\n [-3, 9],\n [-9, 3],\n [-9, 0],\n ],\n parts: [],\n lines: [baseline(W)],\n }),\n ],\n [\n \"primersite\",\n (W) => ({\n outline: [\n [12, 3],\n [0, 15],\n [0, 9],\n [-W / 2, 9],\n [-W / 2, 3],\n ],\n parts: [],\n lines: [baseline(W)],\n }),\n ],\n [\n \"restrictionsite\",\n (W) => {\n const [a, b] = [W / 4, W / 4 + 6];\n return {\n outline: [\n [b, 3],\n [-a, 3],\n [-a, 9],\n [-b, 9],\n [-b, -3],\n [a, -3],\n [a, -9],\n [b, -9],\n ],\n parts: [],\n lines: [\n [\n [-W, 0],\n [-b, 0],\n ],\n [\n [b, 0],\n [W, 0],\n ],\n ],\n };\n },\n ],\n [\n \"fivepoverhang\",\n (W) => ({\n outline: bar(-W, -W + 24, 1.5),\n parts: [bar(-W + 12, -W + 24, -7.5)],\n lines: [\n [\n [-W + 24, 0],\n [W, 0],\n ],\n ],\n }),\n ],\n [\n \"threepoverhang\",\n (W) => ({\n outline: bar(W - 24, W, 1.5),\n parts: [bar(W - 24, W - 12, -7.5)],\n lines: [\n [\n [-W, 0],\n [W - 24, 0],\n ],\n ],\n }),\n ],\n [\n \"noverhang\",\n (W) => ({\n outline: bar(-13.5, -1.5, 1.5),\n parts: [bar(-13.5, -1.5, -7.5), bar(1.5, 13.5, -7.5), bar(1.5, 13.5, 1.5)],\n lines: [\n [\n [13.5, 0],\n [W, 0],\n ],\n [\n [-13.5, 0],\n [-W, 0],\n ],\n ],\n }),\n ],\n [\n \"assembly\",\n (W) => ({\n outline: bar(-12, 12, 1.5),\n parts: [bar(-12, 12, -7.5)],\n lines: [\n [\n [12, 0],\n [W, 0],\n ],\n [\n [-W, 0],\n [-12, 0],\n ],\n ],\n }),\n ],\n [\n \"signature\",\n (W, H) => ({\n outline: [\n [W, H - 6],\n [-W, H - 6],\n [-W, -H + 6],\n [W, -H + 6],\n ],\n parts: [],\n lines: [\n [\n [-W + 3, 1.5],\n [-W + 6, -1.5],\n ],\n [\n [-W + 3, -1.5],\n [-W + 6, 1.5],\n ],\n [\n [-W + 3, -H + 9],\n [W - 3, -H + 9],\n ],\n ],\n }),\n ],\n [\n \"insulator\",\n (W) => ({\n outline: [\n [6, 6],\n [6, -6],\n [-6, -6],\n [-6, 6],\n ],\n parts: [],\n // the square 3 points round it is a ring\n ring: 3,\n lines: [\n [\n [9, 0],\n [W, 0],\n ],\n [\n [-W, 0],\n [-9, 0],\n ],\n ],\n }),\n ],\n [\"ribosite\", (W) => ({ outline: BOW_TIE, parts: [], lines: [...DASHED_STEM, baseline(W)] })],\n [\"rnastab\", (W) => ({ outline: OCTAGON, parts: [], lines: [...DASHED_STEM, baseline(W)] })],\n [\n \"proteasesite\",\n (W) => ({\n outline: BOW_TIE,\n parts: [],\n lines: [\n [\n [0, 7.5],\n [0, 0],\n ],\n baseline(W),\n ],\n }),\n ],\n [\n \"proteinstab\",\n (W) => ({\n outline: OCTAGON,\n parts: [],\n lines: [\n [\n [0, 6],\n [0, 0],\n ],\n baseline(W),\n ],\n }),\n ],\n]);\n\n/** The shapes Graphviz draws as pieces of their own (`GLYPHS`). */\nexport const GRAPHVIZ_GLYPH_SHAPES: ReadonlySet<string> = new Set(GLYPHS.keys());\n\n/** The shapes among them that are boxes with a decoration, which Graphviz fits the label inside exactly, as a box. */\nexport const GRAPHVIZ_DECORATED_BOXES: ReadonlySet<string> = new Set([\n \"box3d\",\n \"tab\",\n \"folder\",\n \"component\",\n \"note\",\n \"underline\",\n \"cds\",\n \"larrow\",\n \"rarrow\",\n \"lpromoter\",\n \"rpromoter\",\n]);\n\n/** Graphviz's default node size in points, 0.75 by 0.5 inch, for a node that states none. */\nconst DEFAULT_SIZE = [54, 36] as const;\n\n/**\n * The pieces Graphviz draws a shape as at a size, or null for a shape it draws otherwise.\n * @param shape - the shape name, lowercase\n * @param width - the node's width in points, or null for Graphviz's default\n * @param height - its height in points, or null for the default\n * @returns the pieces\n */\nexport function graphvizGlyph(shape: string, width: number | null, height: number | null): GraphvizGlyph | null {\n const glyph = GLYPHS.get(shape);\n const w = width !== null && width > 0 ? width : DEFAULT_SIZE[0];\n const h = height !== null && height > 0 ? height : DEFAULT_SIZE[1];\n return glyph === undefined ? null : glyph(w / 2, h / 2);\n}\n","/**\n * The graph choice of an importer that can read every graph of a file (importAll) but has no cheap\n * listing: `graphIndex` / `graphName` passed to its import() directly, as the registry would honor\n * them, so a caller with its own builder is not silently given the first graph.\n */\n\nimport { GraphBuilder, type GraphSink } from \"@graphty/graph-format\";\n\nimport {\n type CommonImportOptions,\n type GraphChoiceOptions,\n type GraphImporter,\n type ImportInput,\n type ImportReport,\n} from \"../types.js\";\nimport { chooseGraph } from \"./options.js\";\nimport { ImportReportBuilder } from \"./report.js\";\n\n/**\n * Read the graph `graphIndex` or `graphName` chooses into the sink: every graph is read once into a\n * scratch builder to learn the names (E_GRAPH_NOT_FOUND lists them), then the input again with the\n * chosen graph going to the sink.\n * @param importer - the importer, which has importAll()\n * @param input - the input\n * @param sink - the caller's sink\n * @param options - the import options, with the choice\n * @returns the chosen graph's report\n */\nexport async function importChosenGraph<O>(\n importer: GraphImporter<O>,\n input: ImportInput,\n sink: GraphSink,\n options: (O & CommonImportOptions & GraphChoiceOptions) | undefined,\n): Promise<ImportReport> {\n const importAll = importer.importAll?.bind(importer);\n if (importAll === undefined) {\n return importer.import(input, sink, options);\n }\n const replay = await replayable(input);\n const scratch: GraphBuilder[] = [];\n await importAll(replay, (i) => (scratch[i] = new GraphBuilder({ directed: false })), {\n ...options,\n onProgress: undefined,\n } as O & CommonImportOptions);\n const names = scratch.map((b) => {\n try {\n return b.freeze().meta.name;\n } catch {\n return null;\n }\n });\n const chosen = chooseGraph(names, options, new ImportReportBuilder(importer.format, 0));\n const reports = await importAll(\n replay,\n (i) => (i === chosen ? sink : new GraphBuilder({ directed: false })),\n options,\n );\n return reports[chosen];\n}\n\n/**\n * The input as a string or bytes that can be read twice.\n * @param input - the input\n * @returns the same text or bytes, or the stream's bytes\n */\nasync function replayable(input: ImportInput): Promise<string | Uint8Array> {\n if (typeof input === \"string\" || input instanceof Uint8Array) {\n return input;\n }\n const parts: Uint8Array[] = [];\n const encoder = new TextEncoder();\n if (typeof (input as ReadableStream<Uint8Array>).getReader === \"function\") {\n const reader = (input as ReadableStream<Uint8Array>).getReader();\n for (let r = await reader.read(); !r.done; r = await reader.read()) {\n parts.push(r.value);\n }\n } else {\n for await (const chunk of input as AsyncIterable<string | Uint8Array>) {\n parts.push(typeof chunk === \"string\" ? encoder.encode(chunk) : chunk);\n }\n }\n const out = new Uint8Array(parts.reduce((n, p) => n + p.byteLength, 0));\n let offset = 0;\n for (const part of parts) {\n out.set(part, offset);\n offset += part.byteLength;\n }\n return out;\n}\n"],"names":[],"mappings":";;;AAaA,MAAM,uCAA4C,IAAI;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AAGD,MAAM,0CAA0E,IAAI;AAAA,EAChF,CAAC,cAAc,CAAC,cAAc,YAAY,CAAC;AAAA,EAC3C,CAAC,WAAW,CAAC,eAAe,OAAO,CAAC;AAAA,EACpC,CAAC,WAAW,CAAC,WAAW,WAAW,CAAC;AAAA,EACpC,CAAC,aAAa,CAAC,aAAa,YAAY,CAAC;AAAA,EACzC,CAAC,oBAAoB,CAAC,aAAa,YAAY,CAAC;AAAA,EAChD,CAAC,oBAAoB,CAAC,sBAAsB,OAAO,CAAC;AAAA,EACpD,CAAC,YAAY,CAAC,YAAY,OAAO,CAAC;AAAA,EAClC,CAAC,UAAU,CAAC,UAAU,SAAS,CAAC;AAAA,EAChC,CAAC,SAAS,CAAC,SAAS,OAAO,CAAC;AAAA,EAC5B,CAAC,gBAAgB,CAAC,gBAAgB,OAAO,CAAC;AAAA,EAC1C,CAAC,gBAAgB,CAAC,YAAY,SAAS,CAAC;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AI,aAAa,EAAE,UAAU,OAAO;AAAA,IAClE;AAAA,EAAA;AAEJ,SAAO,QAAQ,MAAM;AACzB;AAOA,eAAe,WAAW,OAAkD;AACxE,MAAI,OAAO,UAAU,YAAY,iBAAiB,YAAY;AAC1D,WAAO;AAAA,EACX;AACA,QAAM,QAAsB,CAAA;AAC5B,QAAM,UAAU,IAAI,YAAA;AACpB,MAAI,OAAQ,MAAqC,cAAc,YAAY;AACvE,UAAM,SAAU,MAAqC,UAAA;AACrD,aAAS,IAAI,MAAM,OAAO,KAAA,GAAQ,CAAC,EAAE,MAAM,IAAI,MAAM,OAAO,KAAA,GAAQ;AAChE,YAAM,KAAK,EAAE,KAAK;AAAA,IACtB;AAAA,EACJ,OAAO;AACH,qBAAiB,SAAS,OAA6C;AACnE,YAAM,KAAK,OAAO,UAAU,WAAW,QAAQ,OAAO,KAAK,IAAI,KAAK;AAAA,IACxE;AAAA,EACJ;AACA,QAAM,MAAM,IAAI,WAAW,MAAM,OAAO,CAAC,GAAG,MAAM,IAAI,EAAE,YAAY,CAAC,CAAC;AACtE,MAAI,SAAS;AACb,aAAW,QAAQ,OAAO;AACtB,QAAI,IAAI,MAAM,MAAM;AACpB,cAAU,KAAK;AAAA,EACnB;AACA,SAAO;AACX;"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { aa as FETCH_CODE } from "./report-CwMfYa9J.js";
|
|
2
|
+
const CYPHER_PARAMS = [
|
|
3
|
+
{ name: "query", plainName: "Query", type: "query", language: "cypher" },
|
|
4
|
+
{
|
|
5
|
+
name: "mode",
|
|
6
|
+
plainName: "Mode",
|
|
7
|
+
type: "enum",
|
|
8
|
+
values: [
|
|
9
|
+
{ value: "query", label: "Query" },
|
|
10
|
+
{ value: "all", label: "Everything" },
|
|
11
|
+
{ value: "neighborhood", label: "Neighborhood" }
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{ name: "ids", plainName: "Seed ids", type: "node-id" },
|
|
15
|
+
{ name: "depth", plainName: "Depth", type: "integer", default: 1, min: 1, max: 10 },
|
|
16
|
+
{ name: "labels", plainName: "Labels", type: "string", role: "filter", advanced: true },
|
|
17
|
+
{ name: "relationshipTypes", plainName: "Relationship types", type: "string", role: "filter", advanced: true },
|
|
18
|
+
{ name: "idProperty", plainName: "Id property", type: "string", advanced: true },
|
|
19
|
+
{ name: "database", plainName: "Database", type: "string" },
|
|
20
|
+
{
|
|
21
|
+
name: "long",
|
|
22
|
+
plainName: "Large integers",
|
|
23
|
+
type: "enum",
|
|
24
|
+
advanced: true,
|
|
25
|
+
values: [
|
|
26
|
+
{ value: "f64", label: "Number" },
|
|
27
|
+
{ value: "string", label: "Text" }
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{ name: "countFirst", plainName: "Count first", type: "boolean", advanced: true },
|
|
31
|
+
{ name: "pageSize", plainName: "Page size", type: "integer", default: 1e3, min: 1, max: 1e5, advanced: true }
|
|
32
|
+
];
|
|
33
|
+
const CYPHER_FEATURES = ["expand", "probe", "validate", "page"];
|
|
34
|
+
const TRANSPORT_PARAM = {
|
|
35
|
+
name: "transport",
|
|
36
|
+
plainName: "Transport",
|
|
37
|
+
type: "enum",
|
|
38
|
+
values: [
|
|
39
|
+
{ value: "query-api", label: "Neo4j Query API" },
|
|
40
|
+
{ value: "bolt", label: "Bolt" },
|
|
41
|
+
{ value: "neptune-https", label: "Neptune Database" },
|
|
42
|
+
{ value: "neptune-analytics", label: "Neptune Analytics" }
|
|
43
|
+
]
|
|
44
|
+
};
|
|
45
|
+
const CYPHER_DESCRIPTOR = Object.freeze({
|
|
46
|
+
plainName: "Cypher database",
|
|
47
|
+
kind: "database",
|
|
48
|
+
version: 1,
|
|
49
|
+
auth: ["basic", "bearer", "aws-sigv4"],
|
|
50
|
+
authRequired: "optional",
|
|
51
|
+
features: CYPHER_FEATURES,
|
|
52
|
+
params: [...CYPHER_PARAMS, TRANSPORT_PARAM]
|
|
53
|
+
});
|
|
54
|
+
const NEO4J_DESCRIPTOR = Object.freeze({
|
|
55
|
+
plainName: "Neo4j",
|
|
56
|
+
kind: "database",
|
|
57
|
+
version: 1,
|
|
58
|
+
auth: ["basic", "bearer"],
|
|
59
|
+
authRequired: "optional",
|
|
60
|
+
features: CYPHER_FEATURES,
|
|
61
|
+
params: [
|
|
62
|
+
...CYPHER_PARAMS,
|
|
63
|
+
{
|
|
64
|
+
// no default: a bolt: or bolt+s: endpoint picks Bolt, any other the Query API
|
|
65
|
+
...TRANSPORT_PARAM,
|
|
66
|
+
values: TRANSPORT_PARAM.values?.filter((v) => v.value === "query-api" || v.value === "bolt")
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
samples: [
|
|
70
|
+
{
|
|
71
|
+
id: "neo4j-movies",
|
|
72
|
+
plainName: "Neo4j demo: movies",
|
|
73
|
+
endpoint: "https://demo.neo4jlabs.com:7473",
|
|
74
|
+
params: { database: "movies", mode: "all" },
|
|
75
|
+
publicLogin: { username: "movies", password: "movies" },
|
|
76
|
+
// NOSONAR(S2068): the public login Neo4j publishes for its demo server
|
|
77
|
+
counts: { nodes: 171, edges: 253 }
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "hetionet",
|
|
81
|
+
plainName: "Hetionet",
|
|
82
|
+
endpoint: "bolt+s://neo4j.het.io:7687",
|
|
83
|
+
params: { transport: "bolt", mode: "neighborhood", idProperty: "name", ids: ["Metformin"], depth: 1 },
|
|
84
|
+
counts: { nodes: 47031, edges: 2250197 },
|
|
85
|
+
whole: false
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
const NEPTUNE_DESCRIPTOR = Object.freeze({
|
|
90
|
+
plainName: "Amazon Neptune",
|
|
91
|
+
kind: "database",
|
|
92
|
+
version: 1,
|
|
93
|
+
auth: ["aws-sigv4"],
|
|
94
|
+
authRequired: "optional",
|
|
95
|
+
features: CYPHER_FEATURES,
|
|
96
|
+
params: [
|
|
97
|
+
...CYPHER_PARAMS,
|
|
98
|
+
{
|
|
99
|
+
// no default: a neptune-graph host picks Neptune Analytics, any other Neptune Database
|
|
100
|
+
...TRANSPORT_PARAM,
|
|
101
|
+
values: TRANSPORT_PARAM.values?.filter((v) => v.value.startsWith("neptune"))
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
// Neptune sends no CORS headers (Database), or is not shown to (Analytics)
|
|
105
|
+
runtimes: { browser: { supported: false, reason: "cors" }, worker: { supported: false, reason: "cors" } }
|
|
106
|
+
});
|
|
107
|
+
const SOURCE_ISSUE = Object.freeze({
|
|
108
|
+
/** Another HTTP status, or an unreachable host (Node). Params: `url`, `status`. */
|
|
109
|
+
E_FETCH: FETCH_CODE,
|
|
110
|
+
/** The browser refused the request and hid why. Params: `url`, `cause`. */
|
|
111
|
+
E_SOURCE_BLOCKED: "E_SOURCE_BLOCKED",
|
|
112
|
+
/** 401 or a database login failure. Params: `origin`, `status`, `scheme`, `serverCode`. */
|
|
113
|
+
E_SOURCE_AUTH: "E_SOURCE_AUTH",
|
|
114
|
+
/** 403 or a database authorization failure. Params: `status`, `serverCode`. */
|
|
115
|
+
E_SOURCE_FORBIDDEN: "E_SOURCE_FORBIDDEN",
|
|
116
|
+
/** The named item does not exist. Params: `what`, `value`. */
|
|
117
|
+
E_SOURCE_NOT_FOUND: "E_SOURCE_NOT_FOUND",
|
|
118
|
+
/** 429 after the retries. Params: `retryAfterMs`. */
|
|
119
|
+
E_SOURCE_QUOTA: "E_SOURCE_QUOTA",
|
|
120
|
+
/** `timeoutMs` passed, or the server's own timeout. Params: `timeoutMs`, `serverSide`. */
|
|
121
|
+
E_SOURCE_TIMEOUT: "E_SOURCE_TIMEOUT",
|
|
122
|
+
/** The server rejected the query. Params: `serverCode`, `line`, `column`, `serverMessage`. */
|
|
123
|
+
E_SOURCE_QUERY: "E_SOURCE_QUERY",
|
|
124
|
+
/** The result holds no node, relationship or path. Params: `columns`. */
|
|
125
|
+
E_SOURCE_NOT_A_GRAPH: "E_SOURCE_NOT_A_GRAPH",
|
|
126
|
+
/** A response body of the wrong shape. Params: `expected`, `contentType`. */
|
|
127
|
+
E_SOURCE_RESPONSE: "E_SOURCE_RESPONSE",
|
|
128
|
+
/** A redirect, or a changed origin, while a credential was attached. Params: `from`, `to`. */
|
|
129
|
+
E_SOURCE_REDIRECT: "E_SOURCE_REDIRECT",
|
|
130
|
+
/** The source cannot run in this runtime. Params: `runtime`, `reason`, `package`. */
|
|
131
|
+
E_SOURCE_RUNTIME: "E_SOURCE_RUNTIME",
|
|
132
|
+
/** A parameter or option is invalid. Params: `name`, `reason`. */
|
|
133
|
+
E_SOURCE_PARAM: "E_SOURCE_PARAM",
|
|
134
|
+
/** A cap was reached under `onLimit: "error"`. Params: `limit`, `value`. */
|
|
135
|
+
E_SOURCE_LIMIT: "E_SOURCE_LIMIT",
|
|
136
|
+
/** No source has that id. Params: `id`, `known`. */
|
|
137
|
+
E_SOURCE_UNKNOWN: "E_SOURCE_UNKNOWN",
|
|
138
|
+
/** The source lacks the feature. Params: `feature`, `needs`. */
|
|
139
|
+
E_SOURCE_UNSUPPORTED: "E_SOURCE_UNSUPPORTED",
|
|
140
|
+
/** A malformed source at registration. Params: `id`, `reason`. */
|
|
141
|
+
E_SOURCE_INVALID: "E_SOURCE_INVALID",
|
|
142
|
+
/** A cap stopped the load; what came first is kept. Params: `limit`, `value`. */
|
|
143
|
+
W_SOURCE_LIMIT: "W_SOURCE_LIMIT",
|
|
144
|
+
/** A later page needs a credential; the pages before it are kept. Params: `origin`, `status`. */
|
|
145
|
+
W_SOURCE_AUTH: "W_SOURCE_AUTH",
|
|
146
|
+
/** The request succeeded after retries. Params: `attempts`, `statuses`. */
|
|
147
|
+
W_SOURCE_RETRIED: "W_SOURCE_RETRIED",
|
|
148
|
+
/** A server value with no dtype. Params: `type`, `column`, `as`. */
|
|
149
|
+
W_SOURCE_VALUE: "W_SOURCE_VALUE"
|
|
150
|
+
});
|
|
151
|
+
export {
|
|
152
|
+
CYPHER_DESCRIPTOR as C,
|
|
153
|
+
NEO4J_DESCRIPTOR as N,
|
|
154
|
+
SOURCE_ISSUE as S,
|
|
155
|
+
NEPTUNE_DESCRIPTOR as a
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=codes-BE2xir2k.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes-BE2xir2k.js","sources":["../../src/sources/cypher/descriptor.ts","../../src/sources/codes.ts"],"sourcesContent":["/**\n * The descriptors of the Cypher source and its presets: catalog data, available without loading\n * the sources' code.\n */\n\nimport { type SourceDescriptor, type SourceFeature, type SourceParamDescriptor } from \"../types.js\";\n\n/** The parameters every Cypher source shares. */\nconst CYPHER_PARAMS: readonly SourceParamDescriptor[] = [\n { name: \"query\", plainName: \"Query\", type: \"query\", language: \"cypher\" },\n {\n name: \"mode\",\n plainName: \"Mode\",\n type: \"enum\",\n values: [\n { value: \"query\", label: \"Query\" },\n { value: \"all\", label: \"Everything\" },\n { value: \"neighborhood\", label: \"Neighborhood\" },\n ],\n },\n { name: \"ids\", plainName: \"Seed ids\", type: \"node-id\" },\n { name: \"depth\", plainName: \"Depth\", type: \"integer\", default: 1, min: 1, max: 10 },\n { name: \"labels\", plainName: \"Labels\", type: \"string\", role: \"filter\", advanced: true },\n { name: \"relationshipTypes\", plainName: \"Relationship types\", type: \"string\", role: \"filter\", advanced: true },\n { name: \"idProperty\", plainName: \"Id property\", type: \"string\", advanced: true },\n { name: \"database\", plainName: \"Database\", type: \"string\" },\n {\n name: \"long\",\n plainName: \"Large integers\",\n type: \"enum\",\n advanced: true,\n values: [\n { value: \"f64\", label: \"Number\" },\n { value: \"string\", label: \"Text\" },\n ],\n },\n { name: \"countFirst\", plainName: \"Count first\", type: \"boolean\", advanced: true },\n { name: \"pageSize\", plainName: \"Page size\", type: \"integer\", default: 1000, min: 1, max: 100000, advanced: true },\n];\n\n/** What every Cypher source can do: expand, probe, validate, and page a capped load. */\nconst CYPHER_FEATURES: readonly SourceFeature[] = [\"expand\", \"probe\", \"validate\", \"page\"];\n\n/** The transport parameter of the generic source. */\nconst TRANSPORT_PARAM: SourceParamDescriptor = {\n name: \"transport\",\n plainName: \"Transport\",\n type: \"enum\",\n values: [\n { value: \"query-api\", label: \"Neo4j Query API\" },\n { value: \"bolt\", label: \"Bolt\" },\n { value: \"neptune-https\", label: \"Neptune Database\" },\n { value: \"neptune-analytics\", label: \"Neptune Analytics\" },\n ],\n};\n\n/**\n * The descriptor of the generic `cypher` source. Experimental.\n * @category Network sources\n */\nexport const CYPHER_DESCRIPTOR: SourceDescriptor = Object.freeze({\n plainName: \"Cypher database\",\n kind: \"database\",\n version: 1,\n auth: [\"basic\", \"bearer\", \"aws-sigv4\"],\n authRequired: \"optional\",\n features: CYPHER_FEATURES,\n params: [...CYPHER_PARAMS, TRANSPORT_PARAM],\n});\n\n/**\n * The descriptor of the `neo4j` preset. Experimental.\n * @category Network sources\n */\nexport const NEO4J_DESCRIPTOR: SourceDescriptor = Object.freeze({\n plainName: \"Neo4j\",\n kind: \"database\",\n version: 1,\n auth: [\"basic\", \"bearer\"],\n authRequired: \"optional\",\n features: CYPHER_FEATURES,\n params: [\n ...CYPHER_PARAMS,\n {\n // no default: a bolt: or bolt+s: endpoint picks Bolt, any other the Query API\n ...TRANSPORT_PARAM,\n values: TRANSPORT_PARAM.values?.filter((v) => v.value === \"query-api\" || v.value === \"bolt\"),\n },\n ],\n samples: [\n {\n id: \"neo4j-movies\",\n plainName: \"Neo4j demo: movies\",\n endpoint: \"https://demo.neo4jlabs.com:7473\",\n params: { database: \"movies\", mode: \"all\" },\n publicLogin: { username: \"movies\", password: \"movies\" }, // NOSONAR(S2068): the public login Neo4j publishes for its demo server\n counts: { nodes: 171, edges: 253 },\n },\n {\n id: \"hetionet\",\n plainName: \"Hetionet\",\n endpoint: \"bolt+s://neo4j.het.io:7687\",\n params: { transport: \"bolt\", mode: \"neighborhood\", idProperty: \"name\", ids: [\"Metformin\"], depth: 1 },\n counts: { nodes: 47031, edges: 2250197 },\n whole: false,\n },\n ],\n});\n\n/**\n * The descriptor of the `neptune` preset. Experimental.\n * @category Network sources\n */\nexport const NEPTUNE_DESCRIPTOR: SourceDescriptor = Object.freeze({\n plainName: \"Amazon Neptune\",\n kind: \"database\",\n version: 1,\n auth: [\"aws-sigv4\"],\n authRequired: \"optional\",\n features: CYPHER_FEATURES,\n params: [\n ...CYPHER_PARAMS,\n {\n // no default: a neptune-graph host picks Neptune Analytics, any other Neptune Database\n ...TRANSPORT_PARAM,\n values: TRANSPORT_PARAM.values?.filter((v) => v.value.startsWith(\"neptune\")),\n },\n ],\n // Neptune sends no CORS headers (Database), or is not shown to (Analytics)\n runtimes: { browser: { supported: false, reason: \"cors\" }, worker: { supported: false, reason: \"cors\" } },\n});\n","/**\n * The issue codes of network sources (design section 8). Every failure a source or the framework\n * raises is an ImportIssue with one of these codes and machine-readable `params`; graph-io writes\n * no reader-facing sentence. The English `message` is for logs.\n *\n * Experimental, with the source contract.\n */\n\nimport { FETCH_CODE } from \"../common/codes.js\";\n\n/**\n * Every issue code a network source can report, keyed by itself, so `SOURCE_ISSUE.E_SOURCE_AUTH`\n * autocompletes and `keyof typeof SOURCE_ISSUE` is the code union. Experimental.\n * @category Network sources\n */\nexport const SOURCE_ISSUE = Object.freeze({\n /** Another HTTP status, or an unreachable host (Node). Params: `url`, `status`. */\n E_FETCH: FETCH_CODE,\n /** The browser refused the request and hid why. Params: `url`, `cause`. */\n E_SOURCE_BLOCKED: \"E_SOURCE_BLOCKED\",\n /** 401 or a database login failure. Params: `origin`, `status`, `scheme`, `serverCode`. */\n E_SOURCE_AUTH: \"E_SOURCE_AUTH\",\n /** 403 or a database authorization failure. Params: `status`, `serverCode`. */\n E_SOURCE_FORBIDDEN: \"E_SOURCE_FORBIDDEN\",\n /** The named item does not exist. Params: `what`, `value`. */\n E_SOURCE_NOT_FOUND: \"E_SOURCE_NOT_FOUND\",\n /** 429 after the retries. Params: `retryAfterMs`. */\n E_SOURCE_QUOTA: \"E_SOURCE_QUOTA\",\n /** `timeoutMs` passed, or the server's own timeout. Params: `timeoutMs`, `serverSide`. */\n E_SOURCE_TIMEOUT: \"E_SOURCE_TIMEOUT\",\n /** The server rejected the query. Params: `serverCode`, `line`, `column`, `serverMessage`. */\n E_SOURCE_QUERY: \"E_SOURCE_QUERY\",\n /** The result holds no node, relationship or path. Params: `columns`. */\n E_SOURCE_NOT_A_GRAPH: \"E_SOURCE_NOT_A_GRAPH\",\n /** A response body of the wrong shape. Params: `expected`, `contentType`. */\n E_SOURCE_RESPONSE: \"E_SOURCE_RESPONSE\",\n /** A redirect, or a changed origin, while a credential was attached. Params: `from`, `to`. */\n E_SOURCE_REDIRECT: \"E_SOURCE_REDIRECT\",\n /** The source cannot run in this runtime. Params: `runtime`, `reason`, `package`. */\n E_SOURCE_RUNTIME: \"E_SOURCE_RUNTIME\",\n /** A parameter or option is invalid. Params: `name`, `reason`. */\n E_SOURCE_PARAM: \"E_SOURCE_PARAM\",\n /** A cap was reached under `onLimit: \"error\"`. Params: `limit`, `value`. */\n E_SOURCE_LIMIT: \"E_SOURCE_LIMIT\",\n /** No source has that id. Params: `id`, `known`. */\n E_SOURCE_UNKNOWN: \"E_SOURCE_UNKNOWN\",\n /** The source lacks the feature. Params: `feature`, `needs`. */\n E_SOURCE_UNSUPPORTED: \"E_SOURCE_UNSUPPORTED\",\n /** A malformed source at registration. Params: `id`, `reason`. */\n E_SOURCE_INVALID: \"E_SOURCE_INVALID\",\n /** A cap stopped the load; what came first is kept. Params: `limit`, `value`. */\n W_SOURCE_LIMIT: \"W_SOURCE_LIMIT\",\n /** A later page needs a credential; the pages before it are kept. Params: `origin`, `status`. */\n W_SOURCE_AUTH: \"W_SOURCE_AUTH\",\n /** The request succeeded after retries. Params: `attempts`, `statuses`. */\n W_SOURCE_RETRIED: \"W_SOURCE_RETRIED\",\n /** A server value with no dtype. Params: `type`, `column`, `as`. */\n W_SOURCE_VALUE: \"W_SOURCE_VALUE\",\n} as const);\n\n/**\n * A network source issue code. Experimental.\n * @category Network sources\n */\nexport type SourceIssueCode = keyof typeof SOURCE_ISSUE;\n\n/**\n * Why `E_SOURCE_BLOCKED` was raised, as far as a page can tell. Open: handle unknown values.\n * @category Network sources\n */\nexport type SourceBlockedCause = \"cors\" | \"unreachable\" | \"local-network\" | \"unknown\" | (string & {}); // NOSONAR(S4335): open string union, keeps the known names autocompleting\n\n/**\n * The `params` of each source issue code. Every URL is origin and path only. Experimental.\n * @category Network sources\n */\nexport interface SourceIssueParams {\n /** Another status, or an unreachable host. */\n readonly E_FETCH: {\n /** The address, origin and path only. */\n readonly url: string;\n /** The HTTP status, or null when there was none. */\n readonly status: number | null;\n };\n /** Refused by the browser. */\n readonly E_SOURCE_BLOCKED: {\n /** The address, origin and path only. */\n readonly url: string;\n /** Why, as far as the page can tell. */\n readonly cause: SourceBlockedCause;\n };\n /** A credential is needed or was refused. */\n readonly E_SOURCE_AUTH: {\n /** The origin that asked for a credential. */\n readonly origin: string;\n /** The HTTP status, or null when there was none. */\n readonly status: number | null;\n /** The authentication scheme the server named, or null. */\n readonly scheme: string | null;\n /** The service's own code, passed through, or null. */\n readonly serverCode: string | null;\n /** Set by graphty-element when the credential came from its store. */\n readonly stored?: boolean;\n };\n /** Not allowed. */\n readonly E_SOURCE_FORBIDDEN: {\n /** The HTTP status, or null when there was none. */\n readonly status: number | null;\n /** The service's own code, passed through, or null. */\n readonly serverCode: string | null;\n };\n /** No such item. */\n readonly E_SOURCE_NOT_FOUND: {\n /** What was looked up (`url`, `network`, `node`). */\n readonly what: string;\n /** The value that reached the cap, or what was looked up. */\n readonly value: string;\n };\n /** Out of quota. */\n readonly E_SOURCE_QUOTA: {\n /** How long the service asked to wait, when readable. */\n readonly retryAfterMs: number | null;\n };\n /** Took too long. */\n readonly E_SOURCE_TIMEOUT: {\n /** The time limit, or null for the server's own. */\n readonly timeoutMs: number | null;\n /** Whether the server timed the query out. */\n readonly serverSide: boolean;\n };\n /** The query was refused. */\n readonly E_SOURCE_QUERY: {\n /** The service's own code, passed through, or null. */\n readonly serverCode: string | null;\n /** The query line the server named, or null. */\n readonly line: number | null;\n /** The query column the server named, or null. */\n readonly column: number | null;\n /** The server's message from a JSON 4xx body, at most 500 characters, or null. */\n readonly serverMessage: string | null;\n };\n /** Scalars only. */\n readonly E_SOURCE_NOT_A_GRAPH: {\n /** The result's column names. */\n readonly columns: readonly string[];\n };\n /** Wrong body. */\n readonly E_SOURCE_RESPONSE: {\n /** What shape was expected (`json`, `graph-file`, `link-header`). */\n readonly expected: string;\n /** The response's Content-Type, or null. */\n readonly contentType: string | null;\n };\n /** A redirect with a credential; `to` is null in a browser, which hides it. */\n readonly E_SOURCE_REDIRECT: {\n /** Where the request was going, origin and path. */\n readonly from: string;\n /** Where it was sent instead, or null when the browser hides it. */\n readonly to: string | null;\n };\n /** Cannot run here. */\n readonly E_SOURCE_RUNTIME: {\n /** The runtime it ran in. */\n readonly runtime: string;\n /** Why, as a code. */\n readonly reason: string;\n /** The optional package that is missing. */\n readonly package?: string;\n };\n /** A bad parameter or option. */\n readonly E_SOURCE_PARAM: {\n /** The parameter or option's name. */\n readonly name: string;\n /** Why, as a code. */\n readonly reason: string;\n };\n /** A cap under onLimit \"error\". */\n readonly E_SOURCE_LIMIT: {\n /** The cap's option name (`maxNodes`, `maxBytes`, ...). */\n readonly limit: string;\n /** The value that reached the cap, or what was looked up. */\n readonly value: number;\n };\n /** No such source. */\n readonly E_SOURCE_UNKNOWN: {\n /** The source id. */\n readonly id: string;\n /** The ids that are registered. */\n readonly known: readonly string[];\n };\n /** The source lacks the feature. */\n readonly E_SOURCE_UNSUPPORTED: {\n /** The feature asked for. */\n readonly feature: string;\n /** What it needs, when known. */\n readonly needs?: string;\n };\n /** A malformed source. */\n readonly E_SOURCE_INVALID: {\n /** The source id. */\n readonly id: string;\n /** Why, as a code. */\n readonly reason: string;\n };\n /** A cap stopped the load. */\n readonly W_SOURCE_LIMIT: {\n /** The cap's option name (`maxNodes`, `maxBytes`, ...). */\n readonly limit: string;\n /** The value that reached the cap, or what was looked up. */\n readonly value: number;\n };\n /** A later page needs a credential. */\n readonly W_SOURCE_AUTH: {\n /** The origin that asked for a credential. */\n readonly origin: string;\n /** The HTTP status, or null when there was none. */\n readonly status: number | null;\n };\n /** Retried. */\n readonly W_SOURCE_RETRIED: {\n /** How many attempts were made. */\n readonly attempts: number;\n /** The status of each failed attempt, null for a network failure. */\n readonly statuses: readonly (number | null)[];\n };\n /** A value with no dtype. */\n readonly W_SOURCE_VALUE: {\n /** The server's value type. */\n readonly type: string;\n /** The column (of the query, or of the graph) involved. */\n readonly column: string;\n /** What the value was kept as. */\n readonly as: string;\n };\n}\n"],"names":[],"mappings":";AAQA,MAAM,gBAAkD;AAAA,EACpD,EAAE,MAAM,SAAS,WAAW,SAAS,MAAM,SAAS,UAAU,SAAA;AAAA,EAC9D;AAAA,IACI,MAAM;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,IACN,QAAQ;AAAA,MACJ,EAAE,OAAO,SAAS,OAAO,QAAA;AAAA,MACzB,EAAE,OAAO,OAAO,OAAO,aAAA;AAAA,MACvB,EAAE,OAAO,gBAAgB,OAAO,eAAA;AAAA,IAAe;AAAA,EACnD;AAAA,EAEJ,EAAE,MAAM,OAAO,WAAW,YAAY,MAAM,UAAA;AAAA,EAC5C,EAAE,MAAM,SAAS,WAAW,SAAS,MAAM,WAAW,SAAS,GAAG,KAAK,GAAG,KAAK,GAAA;AAAA,EAC/E,EAAE,MAAM,UAAU,WAAW,UAAU,MAAM,UAAU,MAAM,UAAU,UAAU,KAAA;AAAA,EACjF,EAAE,MAAM,qBAAqB,WAAW,sBAAsB,MAAM,UAAU,MAAM,UAAU,UAAU,KAAA;AAAA,EACxG,EAAE,MAAM,cAAc,WAAW,eAAe,MAAM,UAAU,UAAU,KAAA;AAAA,EAC1E,EAAE,MAAM,YAAY,WAAW,YAAY,MAAM,SAAA;AAAA,EACjD;AAAA,IACI,MAAM;AAAA,IACN,WAAW;AAAA,IACX,M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AAAA;AAAA,EAEtB,mBAAmB;AAAA;AAAA,EAEnB,mBAAmB;AAAA;AAAA,EAEnB,kBAAkB;AAAA;AAAA,EAElB,gBAAgB;AAAA;AAAA,EAEhB,gBAAgB;AAAA;AAAA,EAEhB,kBAAkB;AAAA;AAAA,EAElB,sBAAsB;AAAA;AAAA,EAEtB,kBAAkB;AAAA;AAAA,EAElB,gBAAgB;AAAA;AAAA,EAEhB,eAAe;AAAA;AAAA,EAEf,kBAAkB;AAAA;AAAA,EAElB,gBAAgB;AACpB,CAAU;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MIXED_DIRECTION_CODE, D as DIRECTION_FORCED_CODE, b as DIRECTION_REFUSED_CODE, S as SINK_OPTION_CODE, P as PRECISION_CODE, B as BAD_DEFAULT_CODE, U as UNKNOWN_ATTR_TYPE_CODE, R as ROLE_TAKEN_CODE, C as COLUMN_RENAMED_CODE, O as OPTION_IGNORED_CODE, I as ID_MERGED_CODE, c as STRAY_TEXT_CODE, d as UNKNOWN_ELEMENT_CODE, e as UNKNOWN_XML_ATTRIBUTE_CODE, f as DANGLING_REFERENCE_CODE, H as HYPEREDGE_CODE, g as COUNT_MISMATCH_CODE, h as COUNT_HINT_CODE, i as MULTIPLE_GRAPHS_CODE, j as DUPLICATE_EDGE_ID_CODE, k as DUPLICATE_NODE_CODE, l as DUPLICATE_ATTRIBUTE_CODE, m as UNKNOWN_PARENT_CODE, n as MISSING_ENDPOINT_CODE, o as MISSING_ID_CODE, q as DUPLICATE_KEY_CODE, N as NO_GRAPH_CODE, E as EMPTY_INPUT_CODE, r as ENCODING_CONFLICT_CODE, s as UNKNOWN_ENCODING_CODE, t as ENCODING_FALLBACK_CODE, u as INVALID_ENCODING_CODE, v as INVALID_UTF8_CODE, X as XML_NESTING_CODE, w as XML_SYNTAX_CODE, x as COLUMN_TYPE_CODE, y as ELEMENT_ISSUE, z as INPUT_ISSUE, A as ID_TEXT_TYPE_CODE, F as ROLE_DROPPED_CODE, G as PARENTS_DROPPED_CODE, J as MUTUAL_AS_UNDIRECTED_CODE } from "./
|
|
1
|
+
import { M as MIXED_DIRECTION_CODE, D as DIRECTION_FORCED_CODE, b as DIRECTION_REFUSED_CODE, S as SINK_OPTION_CODE, P as PRECISION_CODE, B as BAD_DEFAULT_CODE, U as UNKNOWN_ATTR_TYPE_CODE, R as ROLE_TAKEN_CODE, C as COLUMN_RENAMED_CODE, O as OPTION_IGNORED_CODE, I as ID_MERGED_CODE, c as STRAY_TEXT_CODE, d as UNKNOWN_ELEMENT_CODE, e as UNKNOWN_XML_ATTRIBUTE_CODE, f as DANGLING_REFERENCE_CODE, H as HYPEREDGE_CODE, g as COUNT_MISMATCH_CODE, h as COUNT_HINT_CODE, i as MULTIPLE_GRAPHS_CODE, j as DUPLICATE_EDGE_ID_CODE, k as DUPLICATE_NODE_CODE, l as DUPLICATE_ATTRIBUTE_CODE, m as UNKNOWN_PARENT_CODE, n as MISSING_ENDPOINT_CODE, o as MISSING_ID_CODE, q as DUPLICATE_KEY_CODE, N as NO_GRAPH_CODE, E as EMPTY_INPUT_CODE, r as ENCODING_CONFLICT_CODE, s as UNKNOWN_ENCODING_CODE, t as ENCODING_FALLBACK_CODE, u as INVALID_ENCODING_CODE, v as INVALID_UTF8_CODE, X as XML_NESTING_CODE, w as XML_SYNTAX_CODE, x as COLUMN_TYPE_CODE, y as ELEMENT_ISSUE, z as INPUT_ISSUE, A as ID_TEXT_TYPE_CODE, F as ROLE_DROPPED_CODE, G as PARENTS_DROPPED_CODE, J as MUTUAL_AS_UNDIRECTED_CODE } from "./report-CwMfYa9J.js";
|
|
2
2
|
const GRAPHML_NAMESPACE = "http://graphml.graphdrawing.org/xmlns";
|
|
3
3
|
const YFILES_NAMESPACE = "http://www.yworks.com/xml/graphml";
|
|
4
4
|
const XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance";
|
|
@@ -232,4 +232,4 @@ export {
|
|
|
232
232
|
EXTENSIONS as f,
|
|
233
233
|
ORIGINAL_ID_COLUMN as g
|
|
234
234
|
};
|
|
235
|
-
//# sourceMappingURL=constants-
|
|
235
|
+
//# sourceMappingURL=constants-CKkYLPtt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants-BKwqelYD.js","sources":["../../src/formats/graphml/constants.ts"],"sourcesContent":["/**\n * What the GraphML importer and exporter share: the namespace, the format facts, the reserved\n * column names of the XML-attribute-derived columns, the `meta.extra`\n * keys the importer records for the exporter, and the issue and loss codes.\n */\n\nimport {\n BAD_DEFAULT_CODE,\n COLUMN_RENAMED_CODE,\n COLUMN_TYPE_CODE,\n COUNT_HINT_CODE,\n COUNT_MISMATCH_CODE,\n DANGLING_REFERENCE_CODE,\n DIRECTION_FORCED_CODE,\n DIRECTION_REFUSED_CODE,\n DUPLICATE_ATTRIBUTE_CODE,\n DUPLICATE_EDGE_ID_CODE,\n DUPLICATE_KEY_CODE,\n DUPLICATE_NODE_CODE,\n ELEMENT_ISSUE,\n EMPTY_INPUT_CODE,\n ENCODING_CONFLICT_CODE,\n ENCODING_FALLBACK_CODE,\n HYPEREDGE_CODE,\n ID_MERGED_CODE,\n ID_TEXT_TYPE_CODE,\n INPUT_ISSUE,\n INVALID_ENCODING_CODE,\n INVALID_UTF8_CODE,\n MISSING_ENDPOINT_CODE,\n MISSING_ID_CODE,\n MIXED_DIRECTION_CODE,\n MULTIPLE_GRAPHS_CODE,\n MUTUAL_AS_UNDIRECTED_CODE,\n NO_GRAPH_CODE,\n OPTION_IGNORED_CODE,\n PARENTS_DROPPED_CODE,\n PRECISION_CODE,\n ROLE_DROPPED_CODE,\n ROLE_TAKEN_CODE,\n SINK_OPTION_CODE,\n STRAY_TEXT_CODE,\n UNKNOWN_ATTR_TYPE_CODE,\n UNKNOWN_ELEMENT_CODE,\n UNKNOWN_ENCODING_CODE,\n UNKNOWN_PARENT_CODE,\n UNKNOWN_XML_ATTRIBUTE_CODE,\n XML_NESTING_CODE,\n XML_SYNTAX_CODE,\n} from \"../../common/codes.js\";\n\n/**\n * The GraphML namespace.\n * @category Plugin helpers\n */\nexport const GRAPHML_NAMESPACE = \"http://graphml.graphdrawing.org/xmlns\";\n\n/**\n * The yFiles extension namespace, declared as `xmlns:y` when a yfiles column is written.\n * @category Plugin helpers\n */\nexport const YFILES_NAMESPACE = \"http://www.yworks.com/xml/graphml\";\n\n/**\n * The XML Schema instance namespace and the schema location the exporter writes.\n * @category Plugin helpers\n */\nexport const XSI_NAMESPACE = \"http://www.w3.org/2001/XMLSchema-instance\";\n\n/**\n * The GraphML schema location written by the exporter.\n * @category Plugin helpers\n */\nexport const SCHEMA_LOCATION =\n \"http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd\";\n\n/**\n * The format name.\n * @category Plugin helpers\n */\nexport const FORMAT = \"graphml\";\n\n/**\n * File extensions.\n * @category Plugin helpers\n */\nexport const EXTENSIONS: readonly string[] = Object.freeze([\".graphml\", \".xml\"]);\n\n/**\n * MIME types.\n * @category Plugin helpers\n */\nexport const MIME_TYPES: readonly string[] = Object.freeze([\"application/graphml+xml\", \"application/xml\", \"text/xml\"]);\n\n/**\n * The `attr.name` of the node key that carries ids rewritten by `sanitizeIds: \"mangle\"`.\n * @category Plugin helpers\n */\nexport const ORIGINAL_ID_ATTRIBUTE = \"graphty:originalId\";\n\n/**\n * The node column that keeps original ids when `restoreMangledIds` is off.\n * @category Plugin helpers\n */\nexport const ORIGINAL_ID_COLUMN = \"graphty.originalId\";\n\n/**\n * The edge column of the `id` XML attribute (role id, unique).\n * @category Plugin helpers\n */\nexport const EDGE_ID_COLUMN = \"id\";\n\n/**\n * The edge columns of the `sourceport` / `targetport` XML attributes (roles sourcePort / targetPort).\n * @category Plugin helpers\n */\nexport const SOURCE_PORT_COLUMN = \"sourceport\";\n\n/**\n * The edge column of the `targetport` XML attribute.\n * @category Plugin helpers\n */\nexport const TARGET_PORT_COLUMN = \"targetport\";\n\n/**\n * The node column of the containing node of a nested graph (u32, role parent, refersTo node).\n * @category Plugin helpers\n */\nexport const PARENT_COLUMN = \"parent\";\n\n/**\n * The bool node column marking the hub nodes synthesized for hyperedges under `hyperedges: \"star\"`.\n * @category Plugin helpers\n */\nexport const HYPEREDGE_HUB_COLUMN = \"graphty.hyperedge\";\n\n/**\n * The column name a node key titled `label` receives the `label` role under.\n * @category Plugin helpers\n */\nexport const LABEL_COLUMN = \"label\";\n\n/**\n * Edge column names reserved for the XML-attribute-derived columns; a key titled like one is renamed `<name>#<id>`.\n * @category Plugin helpers\n */\nexport const RESERVED_EDGE_NAMES: ReadonlySet<string> = new Set([\n EDGE_ID_COLUMN,\n SOURCE_PORT_COLUMN,\n TARGET_PORT_COLUMN,\n]);\n\n/**\n * Node column names reserved for the XML-derived columns.\n * @category Plugin helpers\n */\nexport const RESERVED_NODE_NAMES: ReadonlySet<string> = new Set([PARENT_COLUMN]);\n\n/**\n * The `meta.extra` key under which the importer records what the exporter needs.\n * @category Plugin helpers\n */\nexport const META_KEY = \"graphml\";\n\n/**\n * What the importer stores under `meta.extra.graphml`.\n * @category Plugin helpers\n */\nexport interface GraphmlMeta {\n /** The top-level `<graph id>`, or null. */\n readonly graphId: string | null;\n /** The top-level `edgedefault` as written, so a mixed file re-exports with the same layout. */\n readonly edgedefault: \"directed\" | \"undirected\" | null;\n /** The `xmlns:<prefix>` declarations of the root element (yFiles and the like). */\n readonly namespaces: Readonly<Record<string, string>>;\n}\n\n/**\n * The issue codes the GraphML importer records, by name: the codes shared\n * with the other importers and the GraphML-specific ones. A key is the code\n * without its severity and format prefixes.\n * @category Built-in formats\n */\nexport const GRAPHML_ISSUE = Object.freeze({\n ...INPUT_ISSUE,\n ...ELEMENT_ISSUE,\n /**\n * A value that does not parse as the type its attribute declares (\"x\" in an integer attribute). The value is\n * left unset; the node or edge is kept.\n */\n COLUMN_TYPE: COLUMN_TYPE_CODE,\n /** The input is not well-formed XML. The import stops. */\n XML_SYNTAX: XML_SYNTAX_CODE,\n /** Elements are nested more than 100,000 deep. The import stops. */\n XML_NESTING: XML_NESTING_CODE,\n /** The input is not valid UTF-8. The import stops. */\n INVALID_UTF8: INVALID_UTF8_CODE,\n /**\n * Some bytes are not valid in the encoding that was chosen (by a byte order mark, the file's declaration or the\n * `encoding` option). The import stops.\n */\n INVALID_ENCODING: INVALID_ENCODING_CODE,\n /** Bytes that are not UTF-8 and declare no encoding were read as windows-1252. */\n ENCODING_FALLBACK: ENCODING_FALLBACK_CODE,\n /** A declared encoding the platform cannot decode was ignored. */\n UNKNOWN_ENCODING: UNKNOWN_ENCODING_CODE,\n /** A declared encoding the byte order mark contradicts (the mark wins). */\n ENCODING_CONFLICT: ENCODING_CONFLICT_CODE,\n /** The input holds no XML at all: it is empty, whitespace or a byte order mark only. The import stops. */\n EMPTY_INPUT: EMPTY_INPUT_CODE,\n /** The root element is not `<graphml>`. The import stops. */\n NOT_GRAPHML: \"E_NOT_GRAPHML\",\n /** The `<graphml>` root is in a namespace other than GraphML's; it is read as GraphML. */\n NAMESPACE: \"W_GRAPHML_NAMESPACE\",\n /** The document has no `<graph>`. The import stops. */\n NO_GRAPH: NO_GRAPH_CODE,\n /** A `<key>` without an id. */\n KEY_MISSING_ID: \"E_GRAPHML_KEY_MISSING_ID\",\n /** Two `<key>` elements with the same id. */\n DUPLICATE_KEY: DUPLICATE_KEY_CODE,\n /** A key declared for hyperedges, ports or endpoints (never used). */\n KEY_DOMAIN_UNSUPPORTED: \"W_GRAPHML_KEY_DOMAIN_UNSUPPORTED\",\n /** A `<node>` without an id. */\n MISSING_ID: MISSING_ID_CODE,\n /** An `<edge>` without a source or a target. */\n MISSING_ENDPOINT: MISSING_ENDPOINT_CODE,\n /** An edge endpoint that names no declared node under `addMissingNodes: false`; the edge is skipped. */\n UNKNOWN_NODE: \"E_UNKNOWN_NODE\",\n /** An edge endpoint that names a nested `<graph>`, not a node; a node of that id is created. */\n GRAPH_ENDPOINT: \"W_GRAPHML_GRAPH_ENDPOINT\",\n /** The nodes of a nested graph whose container node was skipped lose their parent. */\n UNKNOWN_PARENT: UNKNOWN_PARENT_CODE,\n /** Two `<data>` of one key on one element, two `<default>` in one key, or two weight keys; one is kept. */\n DUPLICATE_ATTRIBUTE: DUPLICATE_ATTRIBUTE_CODE,\n /** A `<data>` whose key was never declared. */\n UNKNOWN_KEY: \"E_GRAPHML_UNKNOWN_KEY\",\n /** A `<key>` declared after `<data>` that used it; those values were already reported and dropped. */\n KEY_DECLARED_LATE: \"W_GRAPHML_KEY_DECLARED_LATE\",\n /** A `<data>` whose key is declared for another domain. */\n KEY_DOMAIN: \"W_GRAPHML_KEY_DOMAIN\",\n /** A `<data>` without a key attribute. */\n DATA_MISSING_KEY: \"E_GRAPHML_DATA_MISSING_KEY\",\n /** A `<key>` whose `for` is not a GraphML domain. */\n KEY_FOR_INVALID: \"E_GRAPHML_KEY_FOR_INVALID\",\n /** Data of a nested `<graph>`; only the top-level graph has attributes. */\n NESTED_GRAPH_DATA: \"W_GRAPHML_NESTED_GRAPH_DATA\",\n /** Data of a hyperedge expanded to a star or clique. */\n HYPEREDGE_DATA_DROPPED: \"W_GRAPHML_HYPEREDGE_DATA_DROPPED\",\n /** Nested elements in the `<data>` of a typed (non-yfiles) key. */\n DATA_NESTED: \"E_GRAPHML_DATA_NESTED\",\n /** Nested elements in the `<data>` of an untyped key; they are kept as their XML text. */\n DATA_STRUCTURED: \"W_GRAPHML_DATA_STRUCTURED\",\n /** A `<node>` declared twice. */\n DUPLICATE_NODE: DUPLICATE_NODE_CODE,\n /** An edge id already used by another edge. */\n DUPLICATE_EDGE_ID: DUPLICATE_EDGE_ID_CODE,\n /** A `directed` attribute that is neither true nor false. */\n INVALID_DIRECTED: \"E_GRAPHML_INVALID_DIRECTED\",\n /** An `edgedefault` that is neither directed nor undirected. */\n INVALID_EDGEDEFAULT: \"E_GRAPHML_INVALID_EDGEDEFAULT\",\n /** A `<graph>` without edgedefault; the `defaultDirected` option applies. */\n EDGEDEFAULT_MISSING: \"W_GRAPHML_EDGEDEFAULT_MISSING\",\n /**\n * The file holds more than one top-level `<graph>`; their nodes and edges are merged into one graph.\n * `importAllGraphs()` reads every one.\n */\n MULTIPLE_GRAPHS: MULTIPLE_GRAPHS_CODE,\n /**\n * A node or edge count the file announces is too large to reserve room for; it is ignored and the elements are\n * read as they come.\n */\n COUNT_HINT: COUNT_HINT_CODE,\n /**\n * A `parse.nodes` or `parse.edges` count disagrees with what the graph holds. The elements are read as they are.\n */\n COUNT_MISMATCH: COUNT_MISMATCH_CODE,\n /** A hyperedge under `hyperedges: \"error\"`. */\n HYPEREDGE: HYPEREDGE_CODE,\n /** Hyperedges skipped under `hyperedges: \"skip\"`. */\n HYPEREDGE_SKIPPED: \"W_GRAPHML_HYPEREDGE_SKIPPED\",\n /** An endpoint of a hyperedge without a node, or with an unknown type. */\n HYPEREDGE_ENDPOINT: \"E_GRAPHML_HYPEREDGE_ENDPOINT\",\n /** `<port>` declarations (and their data) are not kept; sourceport / targetport edge attributes are. */\n PORT_DECLARATION: \"W_GRAPHML_PORT_DECLARATION\",\n /** A `sourceport` / `targetport` naming a port its node does not declare (once, with the count). */\n DANGLING_REFERENCE: DANGLING_REFERENCE_CODE,\n /** A `<graph>` inside an `<edge>` (legal GraphML): it and the nodes and edges it holds are dropped. */\n EDGE_GRAPH_DROPPED: \"W_GRAPHML_EDGE_GRAPH_DROPPED\",\n /** A `<node>` whose id is that of a hub `hyperedges: \"star\"` created; the node is merged into the hub. */\n HUB_ID_CLASH: \"W_GRAPHML_HUB_ID_CLASH\",\n /** A `graphty:originalId` value that is not text, or arrives after the node was added (after its nested graph). */\n ORIGINAL_ID_IGNORED: \"W_GRAPHML_ORIGINAL_ID_IGNORED\",\n /** A yFiles graphics value (a geometry coordinate, a width) that is not a number; it is not mapped. */\n YFILES_VALUE: \"W_GRAPHML_YFILES_VALUE\",\n /**\n * A GraphML `parse.*` attribute (`parse.nodeids`, `parse.order`, ...) that graph-io does not act on; the file is\n * read normally.\n */\n PARSE_HINT_IGNORED: \"W_GRAPHML_PARSE_HINT_IGNORED\",\n /** An XML attribute GraphML does not define (or the importer does not keep) on an element; it is not kept. */\n UNKNOWN_XML_ATTRIBUTE: UNKNOWN_XML_ATTRIBUTE_CODE,\n /** A `<locator>` element. */\n LOCATOR_DROPPED: \"W_GRAPHML_LOCATOR_DROPPED\",\n /** A `<desc>` of a node, an edge or a hyperedge. */\n DESC_DROPPED: \"W_GRAPHML_DESC_DROPPED\",\n /** An element the GraphML schema does not define at that place. */\n UNKNOWN_ELEMENT: UNKNOWN_ELEMENT_CODE,\n /** Non-whitespace text where the schema allows only elements. */\n STRAY_TEXT: STRAY_TEXT_CODE,\n /** Two distinct id texts merged into one number under `ids: \"number\"`. */\n ID_MERGED: ID_MERGED_CODE,\n /** You set an option this format does not use; it had no effect. The message names the option. */\n OPTION_IGNORED: OPTION_IGNORED_CODE,\n /** A yFiles key under `yfiles: \"skip\"`. */\n YFILES_SKIPPED: \"W_GRAPHML_YFILES_SKIPPED\",\n /**\n * An attribute was renamed `<name>#<suffix>` because another attribute already has its name, for example\n * two attributes declared with the same name.\n */\n COLUMN_RENAMED: COLUMN_RENAMED_CODE,\n /**\n * You read into a graph builder that already has an id, label or position attribute, so this file's one is kept as\n * a plain attribute.\n */\n ROLE_TAKEN: ROLE_TAKEN_CODE,\n /** A declared type the format does not define (kept as string). */\n UNKNOWN_ATTR_TYPE: UNKNOWN_ATTR_TYPE_CODE,\n /** A default that does not parse as the declared type. */\n BAD_DEFAULT: BAD_DEFAULT_CODE,\n /** An integer beyond 2^53 was stored as the nearest 64-bit float; pass `long: \"string\"` to keep every digit. */\n PRECISION: PRECISION_CODE,\n /**\n * You read into your own graph builder, which was created with a different `addMissingNodes`, `duplicateEdges`,\n * `selfLoops` or `weightDtype` than the option you passed; the builder's setting applies.\n */\n SINK_OPTION: SINK_OPTION_CODE,\n /**\n * You read into a graph builder whose direction is already set, or which already holds edges, so the file is read\n * with the builder's direction instead of its own.\n */\n DIRECTION_REFUSED: DIRECTION_REFUSED_CODE,\n /** Edges of the other direction were read with the direction `onMixedDirection` chose. */\n DIRECTION_FORCED: DIRECTION_FORCED_CODE,\n /**\n * The graph has both directed and undirected edges and `onMixedDirection` is \"error\". An import stops; a save to a\n * format that holds one direction per file fails with E_DIRECTED. Pass \"directed\" or \"undirected\" to read or write\n * it anyway.\n */\n MIXED_DIRECTION: MIXED_DIRECTION_CODE,\n});\n\n/**\n * Loss note codes of the GraphML importer (report.lossy) and exporter (check()): the GraphML\n * ones; the generic ones (dtypes, lists, json text, positions, visual and temporal roles,\n * extension tables, id charsets, the weight key clash, name changes) are those of `LOSS`.\n * @category Built-in formats\n */\nexport const GRAPHML_LOSS = Object.freeze({\n /** YFiles nested XML kept as a JSON tree: structure preserved, not byte-exact. */\n YFILES_JSON: \"W_GRAPHML_YFILES_JSON\",\n /** A mutual pair written as one undirected edge; the mark is lost. */\n MUTUAL_AS_UNDIRECTED: MUTUAL_AS_UNDIRECTED_CODE,\n /** A `parents` (multi-parent) column cannot be written as nested graphs. */\n PARENTS_DROPPED: PARENTS_DROPPED_CODE,\n /** An attribute with a role the format has no place for is written as a plain attribute; the role is lost. */\n ROLE_DROPPED: ROLE_DROPPED_CODE,\n /** Containment order differs from index order; node indices change after a round trip. */\n HIERARCHY_REORDERED: \"W_GRAPHML_HIERARCHY_REORDERED\",\n /** Nodes whose parent chain never reaches a root are written at the top level. */\n PARENT_CYCLE: \"W_GRAPHML_PARENT_CYCLE\",\n /** Node ids that read back as a different type, such as the text \"7\" as the number 7. */\n ID_TEXT_TYPE: ID_TEXT_TYPE_CODE,\n /** A numeric edge id column reads back as string. */\n EDGE_ID_TEXT: \"W_GRAPHML_EDGE_ID_TEXT\",\n /** A `yfiles.*` graphics column that no longer matches its yFiles tree: only the tree is written. */\n YFILES_GRAPHICS_STALE: \"W_GRAPHML_YFILES_GRAPHICS_STALE\",\n /** A yEd graphics value that is not valid XML; the save fails with E_COLUMN_TYPE. */\n YFILES_TREE: \"E_GRAPHML_YFILES_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;AAAA,EAEnB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlB,iBAAiB;AACrB,CAAC;AAQM,MAAM,eAAe,OAAO,OAAO;AAAA;AAAA,EAEtC,aAAa;AAAA;AAAA,EAEb,sBAAsB;AAAA;AAAA,EAEtB,iBAAiB;AAAA;AAAA,EAEjB,cAAc;AAAA;AAAA,EAEd,qBAAqB;AAAA;AAAA,EAErB,cAAc;AAAA;AAAA,EAEd,cAAc;AAAA;AAAA,EAEd,cAAc;AAAA;AAAA,EAEd,uBAAuB;AAAA;AAAA,EAEvB,aAAa;AACjB,CAAC;"}
|
|
1
|
+
{"version":3,"file":"constants-CKkYLPtt.js","sources":["../../src/formats/graphml/constants.ts"],"sourcesContent":["/**\n * What the GraphML importer and exporter share: the namespace, the format facts, the reserved\n * column names of the XML-attribute-derived columns, the `meta.extra`\n * keys the importer records for the exporter, and the issue and loss codes.\n */\n\nimport {\n BAD_DEFAULT_CODE,\n COLUMN_RENAMED_CODE,\n COLUMN_TYPE_CODE,\n COUNT_HINT_CODE,\n COUNT_MISMATCH_CODE,\n DANGLING_REFERENCE_CODE,\n DIRECTION_FORCED_CODE,\n DIRECTION_REFUSED_CODE,\n DUPLICATE_ATTRIBUTE_CODE,\n DUPLICATE_EDGE_ID_CODE,\n DUPLICATE_KEY_CODE,\n DUPLICATE_NODE_CODE,\n ELEMENT_ISSUE,\n EMPTY_INPUT_CODE,\n ENCODING_CONFLICT_CODE,\n ENCODING_FALLBACK_CODE,\n HYPEREDGE_CODE,\n ID_MERGED_CODE,\n ID_TEXT_TYPE_CODE,\n INPUT_ISSUE,\n INVALID_ENCODING_CODE,\n INVALID_UTF8_CODE,\n MISSING_ENDPOINT_CODE,\n MISSING_ID_CODE,\n MIXED_DIRECTION_CODE,\n MULTIPLE_GRAPHS_CODE,\n MUTUAL_AS_UNDIRECTED_CODE,\n NO_GRAPH_CODE,\n OPTION_IGNORED_CODE,\n PARENTS_DROPPED_CODE,\n PRECISION_CODE,\n ROLE_DROPPED_CODE,\n ROLE_TAKEN_CODE,\n SINK_OPTION_CODE,\n STRAY_TEXT_CODE,\n UNKNOWN_ATTR_TYPE_CODE,\n UNKNOWN_ELEMENT_CODE,\n UNKNOWN_ENCODING_CODE,\n UNKNOWN_PARENT_CODE,\n UNKNOWN_XML_ATTRIBUTE_CODE,\n XML_NESTING_CODE,\n XML_SYNTAX_CODE,\n} from \"../../common/codes.js\";\n\n/**\n * The GraphML namespace.\n * @category Plugin helpers\n */\nexport const GRAPHML_NAMESPACE = \"http://graphml.graphdrawing.org/xmlns\";\n\n/**\n * The yFiles extension namespace, declared as `xmlns:y` when a yfiles column is written.\n * @category Plugin helpers\n */\nexport const YFILES_NAMESPACE = \"http://www.yworks.com/xml/graphml\";\n\n/**\n * The XML Schema instance namespace and the schema location the exporter writes.\n * @category Plugin helpers\n */\nexport const XSI_NAMESPACE = \"http://www.w3.org/2001/XMLSchema-instance\";\n\n/**\n * The GraphML schema location written by the exporter.\n * @category Plugin helpers\n */\nexport const SCHEMA_LOCATION =\n \"http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd\";\n\n/**\n * The format name.\n * @category Plugin helpers\n */\nexport const FORMAT = \"graphml\";\n\n/**\n * File extensions.\n * @category Plugin helpers\n */\nexport const EXTENSIONS: readonly string[] = Object.freeze([\".graphml\", \".xml\"]);\n\n/**\n * MIME types.\n * @category Plugin helpers\n */\nexport const MIME_TYPES: readonly string[] = Object.freeze([\"application/graphml+xml\", \"application/xml\", \"text/xml\"]);\n\n/**\n * The `attr.name` of the node key that carries ids rewritten by `sanitizeIds: \"mangle\"`.\n * @category Plugin helpers\n */\nexport const ORIGINAL_ID_ATTRIBUTE = \"graphty:originalId\";\n\n/**\n * The node column that keeps original ids when `restoreMangledIds` is off.\n * @category Plugin helpers\n */\nexport const ORIGINAL_ID_COLUMN = \"graphty.originalId\";\n\n/**\n * The edge column of the `id` XML attribute (role id, unique).\n * @category Plugin helpers\n */\nexport const EDGE_ID_COLUMN = \"id\";\n\n/**\n * The edge columns of the `sourceport` / `targetport` XML attributes (roles sourcePort / targetPort).\n * @category Plugin helpers\n */\nexport const SOURCE_PORT_COLUMN = \"sourceport\";\n\n/**\n * The edge column of the `targetport` XML attribute.\n * @category Plugin helpers\n */\nexport const TARGET_PORT_COLUMN = \"targetport\";\n\n/**\n * The node column of the containing node of a nested graph (u32, role parent, refersTo node).\n * @category Plugin helpers\n */\nexport const PARENT_COLUMN = \"parent\";\n\n/**\n * The bool node column marking the hub nodes synthesized for hyperedges under `hyperedges: \"star\"`.\n * @category Plugin helpers\n */\nexport const HYPEREDGE_HUB_COLUMN = \"graphty.hyperedge\";\n\n/**\n * The column name a node key titled `label` receives the `label` role under.\n * @category Plugin helpers\n */\nexport const LABEL_COLUMN = \"label\";\n\n/**\n * Edge column names reserved for the XML-attribute-derived columns; a key titled like one is renamed `<name>#<id>`.\n * @category Plugin helpers\n */\nexport const RESERVED_EDGE_NAMES: ReadonlySet<string> = new Set([\n EDGE_ID_COLUMN,\n SOURCE_PORT_COLUMN,\n TARGET_PORT_COLUMN,\n]);\n\n/**\n * Node column names reserved for the XML-derived columns.\n * @category Plugin helpers\n */\nexport const RESERVED_NODE_NAMES: ReadonlySet<string> = new Set([PARENT_COLUMN]);\n\n/**\n * The `meta.extra` key under which the importer records what the exporter needs.\n * @category Plugin helpers\n */\nexport const META_KEY = \"graphml\";\n\n/**\n * What the importer stores under `meta.extra.graphml`.\n * @category Plugin helpers\n */\nexport interface GraphmlMeta {\n /** The top-level `<graph id>`, or null. */\n readonly graphId: string | null;\n /** The top-level `edgedefault` as written, so a mixed file re-exports with the same layout. */\n readonly edgedefault: \"directed\" | \"undirected\" | null;\n /** The `xmlns:<prefix>` declarations of the root element (yFiles and the like). */\n readonly namespaces: Readonly<Record<string, string>>;\n}\n\n/**\n * The issue codes the GraphML importer records, by name: the codes shared\n * with the other importers and the GraphML-specific ones. A key is the code\n * without its severity and format prefixes.\n * @category Built-in formats\n */\nexport const GRAPHML_ISSUE = Object.freeze({\n ...INPUT_ISSUE,\n ...ELEMENT_ISSUE,\n /**\n * A value that does not parse as the type its attribute declares (\"x\" in an integer attribute). The value is\n * left unset; the node or edge is kept.\n */\n COLUMN_TYPE: COLUMN_TYPE_CODE,\n /** The input is not well-formed XML. The import stops. */\n XML_SYNTAX: XML_SYNTAX_CODE,\n /** Elements are nested more than 100,000 deep. The import stops. */\n XML_NESTING: XML_NESTING_CODE,\n /** The input is not valid UTF-8. The import stops. */\n INVALID_UTF8: INVALID_UTF8_CODE,\n /**\n * Some bytes are not valid in the encoding that was chosen (by a byte order mark, the file's declaration or the\n * `encoding` option). The import stops.\n */\n INVALID_ENCODING: INVALID_ENCODING_CODE,\n /** Bytes that are not UTF-8 and declare no encoding were read as windows-1252. */\n ENCODING_FALLBACK: ENCODING_FALLBACK_CODE,\n /** A declared encoding the platform cannot decode was ignored. */\n UNKNOWN_ENCODING: UNKNOWN_ENCODING_CODE,\n /** A declared encoding the byte order mark contradicts (the mark wins). */\n ENCODING_CONFLICT: ENCODING_CONFLICT_CODE,\n /** The input holds no XML at all: it is empty, whitespace or a byte order mark only. The import stops. */\n EMPTY_INPUT: EMPTY_INPUT_CODE,\n /** The root element is not `<graphml>`. The import stops. */\n NOT_GRAPHML: \"E_NOT_GRAPHML\",\n /** The `<graphml>` root is in a namespace other than GraphML's; it is read as GraphML. */\n NAMESPACE: \"W_GRAPHML_NAMESPACE\",\n /** The document has no `<graph>`. The import stops. */\n NO_GRAPH: NO_GRAPH_CODE,\n /** A `<key>` without an id. */\n KEY_MISSING_ID: \"E_GRAPHML_KEY_MISSING_ID\",\n /** Two `<key>` elements with the same id. */\n DUPLICATE_KEY: DUPLICATE_KEY_CODE,\n /** A key declared for hyperedges, ports or endpoints (never used). */\n KEY_DOMAIN_UNSUPPORTED: \"W_GRAPHML_KEY_DOMAIN_UNSUPPORTED\",\n /** A `<node>` without an id. */\n MISSING_ID: MISSING_ID_CODE,\n /** An `<edge>` without a source or a target. */\n MISSING_ENDPOINT: MISSING_ENDPOINT_CODE,\n /** An edge endpoint that names no declared node under `addMissingNodes: false`; the edge is skipped. */\n UNKNOWN_NODE: \"E_UNKNOWN_NODE\",\n /** An edge endpoint that names a nested `<graph>`, not a node; a node of that id is created. */\n GRAPH_ENDPOINT: \"W_GRAPHML_GRAPH_ENDPOINT\",\n /** The nodes of a nested graph whose container node was skipped lose their parent. */\n UNKNOWN_PARENT: UNKNOWN_PARENT_CODE,\n /** Two `<data>` of one key on one element, two `<default>` in one key, or two weight keys; one is kept. */\n DUPLICATE_ATTRIBUTE: DUPLICATE_ATTRIBUTE_CODE,\n /** A `<data>` whose key was never declared. */\n UNKNOWN_KEY: \"E_GRAPHML_UNKNOWN_KEY\",\n /** A `<key>` declared after `<data>` that used it; those values were already reported and dropped. */\n KEY_DECLARED_LATE: \"W_GRAPHML_KEY_DECLARED_LATE\",\n /** A `<data>` whose key is declared for another domain. */\n KEY_DOMAIN: \"W_GRAPHML_KEY_DOMAIN\",\n /** A `<data>` without a key attribute. */\n DATA_MISSING_KEY: \"E_GRAPHML_DATA_MISSING_KEY\",\n /** A `<key>` whose `for` is not a GraphML domain. */\n KEY_FOR_INVALID: \"E_GRAPHML_KEY_FOR_INVALID\",\n /** Data of a nested `<graph>`; only the top-level graph has attributes. */\n NESTED_GRAPH_DATA: \"W_GRAPHML_NESTED_GRAPH_DATA\",\n /** Data of a hyperedge expanded to a star or clique. */\n HYPEREDGE_DATA_DROPPED: \"W_GRAPHML_HYPEREDGE_DATA_DROPPED\",\n /** Nested elements in the `<data>` of a typed (non-yfiles) key. */\n DATA_NESTED: \"E_GRAPHML_DATA_NESTED\",\n /** Nested elements in the `<data>` of an untyped key; they are kept as their XML text. */\n DATA_STRUCTURED: \"W_GRAPHML_DATA_STRUCTURED\",\n /** A `<node>` declared twice. */\n DUPLICATE_NODE: DUPLICATE_NODE_CODE,\n /** An edge id already used by another edge. */\n DUPLICATE_EDGE_ID: DUPLICATE_EDGE_ID_CODE,\n /** A `directed` attribute that is neither true nor false. */\n INVALID_DIRECTED: \"E_GRAPHML_INVALID_DIRECTED\",\n /** An `edgedefault` that is neither directed nor undirected. */\n INVALID_EDGEDEFAULT: \"E_GRAPHML_INVALID_EDGEDEFAULT\",\n /** A `<graph>` without edgedefault; the `defaultDirected` option applies. */\n EDGEDEFAULT_MISSING: \"W_GRAPHML_EDGEDEFAULT_MISSING\",\n /**\n * The file holds more than one top-level `<graph>`; their nodes and edges are merged into one graph.\n * `importAllGraphs()` reads every one.\n */\n MULTIPLE_GRAPHS: MULTIPLE_GRAPHS_CODE,\n /**\n * A node or edge count the file announces is too large to reserve room for; it is ignored and the elements are\n * read as they come.\n */\n COUNT_HINT: COUNT_HINT_CODE,\n /**\n * A `parse.nodes` or `parse.edges` count disagrees with what the graph holds. The elements are read as they are.\n */\n COUNT_MISMATCH: COUNT_MISMATCH_CODE,\n /** A hyperedge under `hyperedges: \"error\"`. */\n HYPEREDGE: HYPEREDGE_CODE,\n /** Hyperedges skipped under `hyperedges: \"skip\"`. */\n HYPEREDGE_SKIPPED: \"W_GRAPHML_HYPEREDGE_SKIPPED\",\n /** An endpoint of a hyperedge without a node, or with an unknown type. */\n HYPEREDGE_ENDPOINT: \"E_GRAPHML_HYPEREDGE_ENDPOINT\",\n /** `<port>` declarations (and their data) are not kept; sourceport / targetport edge attributes are. */\n PORT_DECLARATION: \"W_GRAPHML_PORT_DECLARATION\",\n /** A `sourceport` / `targetport` naming a port its node does not declare (once, with the count). */\n DANGLING_REFERENCE: DANGLING_REFERENCE_CODE,\n /** A `<graph>` inside an `<edge>` (legal GraphML): it and the nodes and edges it holds are dropped. */\n EDGE_GRAPH_DROPPED: \"W_GRAPHML_EDGE_GRAPH_DROPPED\",\n /** A `<node>` whose id is that of a hub `hyperedges: \"star\"` created; the node is merged into the hub. */\n HUB_ID_CLASH: \"W_GRAPHML_HUB_ID_CLASH\",\n /** A `graphty:originalId` value that is not text, or arrives after the node was added (after its nested graph). */\n ORIGINAL_ID_IGNORED: \"W_GRAPHML_ORIGINAL_ID_IGNORED\",\n /** A yFiles graphics value (a geometry coordinate, a width) that is not a number; it is not mapped. */\n YFILES_VALUE: \"W_GRAPHML_YFILES_VALUE\",\n /**\n * A GraphML `parse.*` attribute (`parse.nodeids`, `parse.order`, ...) that graph-io does not act on; the file is\n * read normally.\n */\n PARSE_HINT_IGNORED: \"W_GRAPHML_PARSE_HINT_IGNORED\",\n /** An XML attribute GraphML does not define (or the importer does not keep) on an element; it is not kept. */\n UNKNOWN_XML_ATTRIBUTE: UNKNOWN_XML_ATTRIBUTE_CODE,\n /** A `<locator>` element. */\n LOCATOR_DROPPED: \"W_GRAPHML_LOCATOR_DROPPED\",\n /** A `<desc>` of a node, an edge or a hyperedge. */\n DESC_DROPPED: \"W_GRAPHML_DESC_DROPPED\",\n /** An element the GraphML schema does not define at that place. */\n UNKNOWN_ELEMENT: UNKNOWN_ELEMENT_CODE,\n /** Non-whitespace text where the schema allows only elements. */\n STRAY_TEXT: STRAY_TEXT_CODE,\n /** Two distinct id texts merged into one number under `ids: \"number\"`. */\n ID_MERGED: ID_MERGED_CODE,\n /** You set an option this format does not use; it had no effect. The message names the option. */\n OPTION_IGNORED: OPTION_IGNORED_CODE,\n /** A yFiles key under `yfiles: \"skip\"`. */\n YFILES_SKIPPED: \"W_GRAPHML_YFILES_SKIPPED\",\n /**\n * An attribute was renamed `<name>#<suffix>` because another attribute already has its name, for example\n * two attributes declared with the same name.\n */\n COLUMN_RENAMED: COLUMN_RENAMED_CODE,\n /**\n * You read into a graph builder that already has an id, label or position attribute, so this file's one is kept as\n * a plain attribute.\n */\n ROLE_TAKEN: ROLE_TAKEN_CODE,\n /** A declared type the format does not define (kept as string). */\n UNKNOWN_ATTR_TYPE: UNKNOWN_ATTR_TYPE_CODE,\n /** A default that does not parse as the declared type. */\n BAD_DEFAULT: BAD_DEFAULT_CODE,\n /** An integer beyond 2^53 was stored as the nearest 64-bit float; pass `long: \"string\"` to keep every digit. */\n PRECISION: PRECISION_CODE,\n /**\n * You read into your own graph builder, which was created with a different `addMissingNodes`, `duplicateEdges`,\n * `selfLoops` or `weightDtype` than the option you passed; the builder's setting applies.\n */\n SINK_OPTION: SINK_OPTION_CODE,\n /**\n * You read into a graph builder whose direction is already set, or which already holds edges, so the file is read\n * with the builder's direction instead of its own.\n */\n DIRECTION_REFUSED: DIRECTION_REFUSED_CODE,\n /** Edges of the other direction were read with the direction `onMixedDirection` chose. */\n DIRECTION_FORCED: DIRECTION_FORCED_CODE,\n /**\n * The graph has both directed and undirected edges and `onMixedDirection` is \"error\". An import stops; a save to a\n * format that holds one direction per file fails with E_DIRECTED. Pass \"directed\" or \"undirected\" to read or write\n * it anyway.\n */\n MIXED_DIRECTION: MIXED_DIRECTION_CODE,\n});\n\n/**\n * Loss note codes of the GraphML importer (report.lossy) and exporter (check()): the GraphML\n * ones; the generic ones (dtypes, lists, json text, positions, visual and temporal roles,\n * extension tables, id charsets, the weight key clash, name changes) are those of `LOSS`.\n * @category Built-in formats\n */\nexport const GRAPHML_LOSS = Object.freeze({\n /** YFiles nested XML kept as a JSON tree: structure preserved, not byte-exact. */\n YFILES_JSON: \"W_GRAPHML_YFILES_JSON\",\n /** A mutual pair written as one undirected edge; the mark is lost. */\n MUTUAL_AS_UNDIRECTED: MUTUAL_AS_UNDIRECTED_CODE,\n /** A `parents` (multi-parent) column cannot be written as nested graphs. */\n PARENTS_DROPPED: PARENTS_DROPPED_CODE,\n /** An attribute with a role the format has no place for is written as a plain attribute; the role is lost. */\n ROLE_DROPPED: ROLE_DROPPED_CODE,\n /** Containment order differs from index order; node indices change after a round trip. */\n HIERARCHY_REORDERED: \"W_GRAPHML_HIERARCHY_REORDERED\",\n /** Nodes whose parent chain never reaches a root are written at the top level. */\n PARENT_CYCLE: \"W_GRAPHML_PARENT_CYCLE\",\n /** Node ids that read back as a different type, such as the text \"7\" as the number 7. */\n ID_TEXT_TYPE: ID_TEXT_TYPE_CODE,\n /** A numeric edge id column reads back as string. */\n EDGE_ID_TEXT: \"W_GRAPHML_EDGE_ID_TEXT\",\n /** A `yfiles.*` graphics column that no longer matches its yFiles tree: only the tree is written. */\n YFILES_GRAPHICS_STALE: \"W_GRAPHML_YFILES_GRAPHICS_STALE\",\n /** A yEd graphics value that is not valid XML; the save fails with E_COLUMN_TYPE. */\n YFILES_TREE: \"E_GRAPHML_YFILES_TREE\",\n});\n"],"names":[],"mappings":";AAuDO,MAAM,oBAAoB;AAM1B,MAAM,mBAAmB;AAMzB,MAAM,gBAAgB;AAMtB,MAAM,kBACT;AAMG,MAAM,SAAS;AAMf,MAAM,aAAgC,OAAO,OAAO,CAAC,YAAY,MAAM,CAAC;AAMxE,MAAM,aAAgC,OAAO,OAAO,CAAC,2BAA2B,mBAAmB,UAAU,CAAC;AAM9G,MAAM,wBAAwB;AAM9B,MAAM,qBAAqB;AAM3B,MAAM,iBAAiB;AAMvB,MAAM,qBAAqB;AAM3B,MAAM,qBAAqB;AAM3B,MAAM,gBAAgB;AAMtB,MAAM,uBAAuB;AAM7B,MAAM,eAAe;AAMrB,MAAM,0CAA+C,IAAI;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AAMM,MAAM,sBAA2C,oBAAI,IAAI,CAAC,aAAa,CAAC;AAMxE,MAAM,WAAW;AAqBjB,MAAM,gBAAgB,OAAO,OAAO;AAAA,EACvC,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,EAKH,aAAa;AAAA;AAAA,EAEb,YAAY;AAAA;AAAA,EAEZ,aAAa;AAAA;AAAA,EAEb,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA,EAKd,kBAAkB;AAAA;AAAA,EAElB,mBAAmB;AAAA;AAAA,EAEnB,kBAAkB;AAAA;AAAA,EAElB,mBAAmB;AAAA;AAAA,EAEnB,aAAa;AAAA;AAAA,EAEb,aAAa;AAAA;AAAA,EAEb,WAAW;AAAA;AAAA,EAEX,UAAU;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