@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
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { e as explicitWeights } from "./export-Cha4dRFz.js";
|
|
2
|
+
import { b as STYLE_ISSUE, h as StyleNotes, Q as refSource, U as resolveRules, w as STYLE_PROPERTIES, i as num6, D as degreeValues, C as canonicalFor, y as toolDefaults, l as isStyleValue, W as evalContinuous, X as numberOf, Z as discreteLookup, n as noteAt, S as STYLE_BLOCK_NAME, p as plainCell } from "./block-iptrlMBb.js";
|
|
3
|
+
import { e as escapeXmlAttribute } from "./escape-CuCIzNMB.js";
|
|
4
|
+
import { j as javaFamily, J as JAVA_MONO, a as JAVA_SERIF, b as JAVA_SANS, v as vpStep, c as colorParser, C as CYTOSCAPE_LEXICON, s as sizeParser, d as cytoscapeLabelPlace, i as isUncarriedVp, e as arrowSizeParser, f as arrowProportion, g as arrowGap, o as opacityParser, h as cytoscapeLabelMove, k as cytoscapeLabelBase, l as halfBack, N as NODE_SIZE_VP, n as normalizeVisualProperties } from "./lexicon-Clf4QIyl.js";
|
|
5
|
+
import { d as canonBends } from "./bends-BGXjv_U4.js";
|
|
6
|
+
import { t as takeFromBlock } from "./round-trip-Zm3_ivgq.js";
|
|
7
|
+
import { M as MIXED_DIRECTION_CODE, D as DIRECTION_FORCED_CODE, b as DIRECTION_REFUSED_CODE, S as SINK_OPTION_CODE, O as OPTION_IGNORED_CODE, I as ID_MERGED_CODE, R as ROLE_TAKEN_CODE, C as COLUMN_RENAMED_CODE, W as AMBIGUOUS_GRAPH_NAME_CODE, Y as GRAPH_NOT_FOUND_CODE, i as MULTIPLE_GRAPHS_CODE, c as STRAY_TEXT_CODE, d as UNKNOWN_ELEMENT_CODE, U as UNKNOWN_ATTR_TYPE_CODE, aA as EQUATION_AS_TEXT_CODE, a1 as PARENT_CYCLE_CODE, m as UNKNOWN_PARENT_CODE, l as DUPLICATE_ATTRIBUTE_CODE, f as DANGLING_REFERENCE_CODE, P as PRECISION_CODE, a2 as WIDENED_CODE, T as BAD_VALUE_CODE, j as DUPLICATE_EDGE_ID_CODE, k as DUPLICATE_NODE_CODE, n as MISSING_ENDPOINT_CODE, o as MISSING_ID_CODE, N as NO_GRAPH_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, E as EMPTY_INPUT_CODE, X as XML_NESTING_CODE, w as XML_SYNTAX_CODE, y as ELEMENT_ISSUE, z as INPUT_ISSUE, aH as STORAGE_CLASS_CODE, ak as WEIGHT_KEY_CLASH_CODE, a9 as ROLE_ASSUMED_CODE, aw as COLUMN_RENAMED_LOSS_CODE, A as ID_TEXT_TYPE_CODE, al as MUTUAL_EXPANDED_CODE, G as PARENTS_DROPPED_CODE, F as ROLE_DROPPED_CODE, aJ as TEMPORAL_TEXT_DROPPED_CODE, aI as TEMPORAL_DROPPED_CODE, ab as XML_ILLEGAL_CHAR_CODE } from "./report-CwMfYa9J.js";
|
|
5
8
|
function emptyCytoscapeStyle() {
|
|
6
9
|
const target = () => ({
|
|
7
10
|
defaults: /* @__PURE__ */ new Map(),
|
|
@@ -11,6 +14,54 @@ function emptyCytoscapeStyle() {
|
|
|
11
14
|
});
|
|
12
15
|
return { network: { defaults: /* @__PURE__ */ new Map() }, node: target(), edge: target() };
|
|
13
16
|
}
|
|
17
|
+
const SHARED_COLUMNS = /* @__PURE__ */ new Map([
|
|
18
|
+
["shared name", "name"],
|
|
19
|
+
["shared interaction", "interaction"]
|
|
20
|
+
]);
|
|
21
|
+
function sharedColumnFallback(style, has) {
|
|
22
|
+
for (const [vp, m] of style.mappings) {
|
|
23
|
+
const plain = SHARED_COLUMNS.get(m.column);
|
|
24
|
+
if (plain !== void 0 && !has(m.column) && has(plain)) {
|
|
25
|
+
style.mappings.set(vp, { ...m, column: plain });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function weightColumnFallback(style, weightFrom, table) {
|
|
30
|
+
const kept = weightFrom === null || table.has(weightFrom) ? void 0 : table.byRole("weight")?.meta.name;
|
|
31
|
+
if (kept === void 0) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
for (const [vp, m] of style.mappings) {
|
|
35
|
+
if (m.column === weightFrom) {
|
|
36
|
+
style.mappings.set(vp, { ...m, column: kept });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function numericFamily(type) {
|
|
41
|
+
const t = (type ?? "").toLowerCase().replace(/^list_of_/, "").replace(/^java\.lang\./, "");
|
|
42
|
+
if (t === "integer" || t === "long" || t === "int" || t === "short") {
|
|
43
|
+
return "integral";
|
|
44
|
+
}
|
|
45
|
+
if (t === "double" || t === "float" || t === "real") {
|
|
46
|
+
return "floating";
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
function dropMismatchedKeys(style, typeOf2, notes, target) {
|
|
51
|
+
for (const [vp, m] of style.mappings) {
|
|
52
|
+
if (m.kind !== "discrete" || m.table.length === 0) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const key = numericFamily(m.type);
|
|
56
|
+
const column = numericFamily(typeOf2(m.column));
|
|
57
|
+
if (key !== null && column !== null && key !== column) {
|
|
58
|
+
style.mappings.set(vp, { ...m, table: [] });
|
|
59
|
+
notes.add(STYLE_ISSUE.BAD_MAPPING, target, m.column, {
|
|
60
|
+
sample: `${vp}: ${key} keys on a ${column} column`
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
14
65
|
const NUMERIC_TYPES = /* @__PURE__ */ new Set(["integer", "long", "double", "float", "int", "short"]);
|
|
15
66
|
const DECIMAL = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/;
|
|
16
67
|
function typedKey(raw, type) {
|
|
@@ -297,6 +348,7 @@ function cytoscapeStyleFromCx2(visualProperties, visualEditorProperties, notes)
|
|
|
297
348
|
}
|
|
298
349
|
style.node.dependencies.set("nodeSizeLocked", own(editor, "nodeSizeLocked") === true);
|
|
299
350
|
style.edge.dependencies.set("arrowColorMatchesEdge", own(editor, "arrowColorMatchesEdge") === true);
|
|
351
|
+
style.node.dependencies.set("nodeCustomGraphicsSizeSync", own(editor, "nodeCustomGraphicsSizeSync") !== false);
|
|
300
352
|
for (const [target, key] of [
|
|
301
353
|
["node", "nodeMapping"],
|
|
302
354
|
["edge", "edgeMapping"]
|
|
@@ -312,6 +364,12 @@ function cytoscapeStyleFromCx2(visualProperties, visualEditorProperties, notes)
|
|
|
312
364
|
}
|
|
313
365
|
}
|
|
314
366
|
lockedSizeFromWidth(style.node);
|
|
367
|
+
for (const part of [style.edge.defaults, style.edge.mappings]) {
|
|
368
|
+
if (part.has("EDGE_CONTROL_POINTS") && !part.has("EDGE_BEND")) {
|
|
369
|
+
part.set("EDGE_BEND", part.get("EDGE_CONTROL_POINTS"));
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
style.edge.bypassAliases.set("EDGE_CONTROL_POINTS", "EDGE_BEND");
|
|
315
373
|
return style;
|
|
316
374
|
}
|
|
317
375
|
function lockedSizeFromWidth(node) {
|
|
@@ -346,6 +404,22 @@ function enumOut(table, near, upper, cytoscape = /* @__PURE__ */ new Set()) {
|
|
|
346
404
|
return Object.hasOwn(near, s) ? near[s] : Object.values(table)[0];
|
|
347
405
|
};
|
|
348
406
|
}
|
|
407
|
+
const BORDER_POSITION = "borderPosition";
|
|
408
|
+
const FIXED = {
|
|
409
|
+
node: /* @__PURE__ */ new Map([
|
|
410
|
+
[BORDER_POSITION, "inside"],
|
|
411
|
+
["borderWaveAmplitude", 10],
|
|
412
|
+
["borderWavePeriod", 20],
|
|
413
|
+
["labelPadding", 0],
|
|
414
|
+
["labelLineHeight", 1]
|
|
415
|
+
]),
|
|
416
|
+
edge: /* @__PURE__ */ new Map([
|
|
417
|
+
["waveAmplitude", 10],
|
|
418
|
+
["wavePeriod", 20],
|
|
419
|
+
["labelPadding", 0],
|
|
420
|
+
["labelLineHeight", 1]
|
|
421
|
+
])
|
|
422
|
+
};
|
|
349
423
|
const DESKTOP_SHAPES = {
|
|
350
424
|
ellipse: "ELLIPSE",
|
|
351
425
|
rectangle: "RECTANGLE",
|
|
@@ -382,7 +456,6 @@ const NEAR_LINES = { "dash-dot": "dashed", "long-dash": "dashed", zigzag: "solid
|
|
|
382
456
|
const DESKTOP_ARROWS = {
|
|
383
457
|
none: "NONE",
|
|
384
458
|
triangle: "DELTA",
|
|
385
|
-
vee: "ARROW",
|
|
386
459
|
tee: "T",
|
|
387
460
|
diamond: "DIAMOND",
|
|
388
461
|
circle: "CIRCLE",
|
|
@@ -390,7 +463,9 @@ const DESKTOP_ARROWS = {
|
|
|
390
463
|
"triangle-open": "OPEN_DELTA",
|
|
391
464
|
"diamond-open": "OPEN_DIAMOND",
|
|
392
465
|
"circle-open": "OPEN_CIRCLE",
|
|
393
|
-
half: "HALF_TOP"
|
|
466
|
+
half: "HALF_TOP",
|
|
467
|
+
"other:cross-delta": "CROSS_DELTA",
|
|
468
|
+
"other:cross-open-delta": "CROSS_OPEN_DELTA"
|
|
394
469
|
};
|
|
395
470
|
const CX2_ARROWS = {
|
|
396
471
|
none: "none",
|
|
@@ -403,10 +478,14 @@ const CX2_ARROWS = {
|
|
|
403
478
|
"triangle-open": "open-triangle",
|
|
404
479
|
"diamond-open": "open-diamond",
|
|
405
480
|
"circle-open": "open-circle",
|
|
406
|
-
half: "half-top"
|
|
481
|
+
half: "half-top",
|
|
482
|
+
// as Cytoscape 3.10.5 writes CROSS_DELTA and CROSS_OPEN_DELTA in CX2
|
|
483
|
+
"other:cross-delta": "triangle-cross",
|
|
484
|
+
"other:cross-open-delta": "cross_open_delta"
|
|
407
485
|
};
|
|
408
486
|
const NEAR_ARROWS = { crow: "vee", inverted: "triangle" };
|
|
409
|
-
const
|
|
487
|
+
const DESKTOP_NEAR_ARROWS = { crow: "ARROW", inverted: "DELTA", vee: "ARROW" };
|
|
488
|
+
const CY_OTHER_ARROWS = /* @__PURE__ */ new Set(["open-square", "open-half-circle", "half-circle", "half-bottom"]);
|
|
410
489
|
const CY_OTHER_LINES = /* @__PURE__ */ new Set([
|
|
411
490
|
"backward-slash",
|
|
412
491
|
"forward-slash",
|
|
@@ -415,30 +494,49 @@ const CY_OTHER_LINES = /* @__PURE__ */ new Set([
|
|
|
415
494
|
"contiguous-arrow"
|
|
416
495
|
]);
|
|
417
496
|
const CY_OTHER_BORDERS = /* @__PURE__ */ new Set([...CY_OTHER_LINES, "zigzag", "sinewave"]);
|
|
418
|
-
const
|
|
419
|
-
center: "C,C
|
|
420
|
-
top: "N,S
|
|
421
|
-
bottom: "S,N
|
|
422
|
-
left: "W,E
|
|
423
|
-
right: "E,W
|
|
424
|
-
"top-left": "NW,SE
|
|
425
|
-
"top-right": "NE,SW
|
|
426
|
-
"bottom-left": "SW,NE
|
|
427
|
-
"bottom-right": "SE,NW,
|
|
497
|
+
const POSITION_ANCHORS = {
|
|
498
|
+
center: ["C", "C"],
|
|
499
|
+
top: ["N", "S"],
|
|
500
|
+
bottom: ["S", "N"],
|
|
501
|
+
left: ["W", "E"],
|
|
502
|
+
right: ["E", "W"],
|
|
503
|
+
"top-left": ["NW", "SE"],
|
|
504
|
+
"top-right": ["NE", "SW"],
|
|
505
|
+
"bottom-left": ["SW", "NE"],
|
|
506
|
+
"bottom-right": ["SE", "NW"],
|
|
507
|
+
"inside-top": ["N", "N"],
|
|
508
|
+
"inside-bottom": ["S", "S"],
|
|
509
|
+
"inside-left": ["W", "W"],
|
|
510
|
+
"inside-right": ["E", "E"],
|
|
511
|
+
"inside-top-left": ["NW", "NW"],
|
|
512
|
+
"inside-top-right": ["NE", "NE"],
|
|
513
|
+
"inside-bottom-left": ["SW", "SW"],
|
|
514
|
+
"inside-bottom-right": ["SE", "SE"]
|
|
428
515
|
};
|
|
429
|
-
const
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
516
|
+
const DESKTOP_POSITIONS = Object.fromEntries(
|
|
517
|
+
Object.entries(POSITION_ANCHORS).map(([k, [node, label]]) => [k, `${node},${label},c,0.00,0.00`])
|
|
518
|
+
);
|
|
519
|
+
const CX2_WORDS = {
|
|
520
|
+
C: ["center", "center"],
|
|
521
|
+
N: ["center", "top"],
|
|
522
|
+
S: ["center", "bottom"],
|
|
523
|
+
W: ["left", "center"],
|
|
524
|
+
E: ["right", "center"],
|
|
525
|
+
NW: ["left", "top"],
|
|
526
|
+
NE: ["right", "top"],
|
|
527
|
+
SW: ["left", "bottom"],
|
|
528
|
+
SE: ["right", "bottom"]
|
|
439
529
|
};
|
|
440
530
|
const desktopNumber = String;
|
|
441
531
|
const cx2Number = (v) => v;
|
|
532
|
+
function whole(write) {
|
|
533
|
+
return (v, approx) => {
|
|
534
|
+
if (typeof v === "number" && !Number.isInteger(v)) {
|
|
535
|
+
approx();
|
|
536
|
+
}
|
|
537
|
+
return write(v, approx);
|
|
538
|
+
};
|
|
539
|
+
}
|
|
442
540
|
const textOut = String;
|
|
443
541
|
const desktopBool = (v) => String(v === true);
|
|
444
542
|
const opacity255 = (v, approx) => {
|
|
@@ -454,6 +552,7 @@ const WRITERS = {
|
|
|
454
552
|
["fill", { vp: "NODE_FILL_COLOR", write: colorOut }],
|
|
455
553
|
["fillOpacity", { vp: "NODE_TRANSPARENCY", write: opacity255 }],
|
|
456
554
|
["borderColor", { vp: "NODE_BORDER_PAINT", write: colorOut }],
|
|
555
|
+
["borderOpacity", { vp: "NODE_BORDER_TRANSPARENCY", write: opacity255 }],
|
|
457
556
|
["borderWidth", { vp: "NODE_BORDER_WIDTH", write: desktopNumber }],
|
|
458
557
|
[
|
|
459
558
|
"borderStyle",
|
|
@@ -467,8 +566,10 @@ const WRITERS = {
|
|
|
467
566
|
["height", { vp: "NODE_HEIGHT", write: desktopNumber }],
|
|
468
567
|
["label", { vp: "NODE_LABEL", write: textOut }],
|
|
469
568
|
["labelColor", { vp: "NODE_LABEL_COLOR", write: colorOut }],
|
|
470
|
-
["labelSize", { vp: "NODE_LABEL_FONT_SIZE", write: desktopNumber }],
|
|
569
|
+
["labelSize", { vp: "NODE_LABEL_FONT_SIZE", write: whole(desktopNumber) }],
|
|
570
|
+
["labelWrapWidth", { vp: "NODE_LABEL_WIDTH", write: desktopNumber }],
|
|
471
571
|
["labelPosition", { vp: "NODE_LABEL_POSITION", write: enumOut(DESKTOP_POSITIONS, {}, false) }],
|
|
572
|
+
["labelRotation", { vp: "NODE_LABEL_ROTATION", write: desktopNumber }],
|
|
472
573
|
["tooltip", { vp: "NODE_TOOLTIP", write: textOut }],
|
|
473
574
|
["visible", { vp: "NODE_VISIBLE", write: desktopBool }]
|
|
474
575
|
]),
|
|
@@ -487,14 +588,14 @@ const WRITERS = {
|
|
|
487
588
|
"sourceArrow",
|
|
488
589
|
{
|
|
489
590
|
vp: "EDGE_SOURCE_ARROW_SHAPE",
|
|
490
|
-
write: enumOut(DESKTOP_ARROWS,
|
|
591
|
+
write: enumOut(DESKTOP_ARROWS, DESKTOP_NEAR_ARROWS, true, CY_OTHER_ARROWS)
|
|
491
592
|
}
|
|
492
593
|
],
|
|
493
594
|
[
|
|
494
595
|
"targetArrow",
|
|
495
596
|
{
|
|
496
597
|
vp: "EDGE_TARGET_ARROW_SHAPE",
|
|
497
|
-
write: enumOut(DESKTOP_ARROWS,
|
|
598
|
+
write: enumOut(DESKTOP_ARROWS, DESKTOP_NEAR_ARROWS, true, CY_OTHER_ARROWS)
|
|
498
599
|
}
|
|
499
600
|
],
|
|
500
601
|
["sourceArrowColor", { vp: "EDGE_SOURCE_ARROW_UNSELECTED_PAINT", write: colorOut }],
|
|
@@ -502,7 +603,7 @@ const WRITERS = {
|
|
|
502
603
|
["curved", { vp: "EDGE_CURVED", write: desktopBool }],
|
|
503
604
|
["label", { vp: "EDGE_LABEL", write: textOut }],
|
|
504
605
|
["labelColor", { vp: "EDGE_LABEL_COLOR", write: colorOut }],
|
|
505
|
-
["labelSize", { vp: "EDGE_LABEL_FONT_SIZE", write: desktopNumber }],
|
|
606
|
+
["labelSize", { vp: "EDGE_LABEL_FONT_SIZE", write: whole(desktopNumber) }],
|
|
506
607
|
["tooltip", { vp: "EDGE_TOOLTIP", write: textOut }],
|
|
507
608
|
["visible", { vp: "EDGE_VISIBLE", write: desktopBool }]
|
|
508
609
|
])
|
|
@@ -512,6 +613,7 @@ const WRITERS = {
|
|
|
512
613
|
["fill", { vp: "NODE_BACKGROUND_COLOR", write: colorOut }],
|
|
513
614
|
["fillOpacity", { vp: "NODE_BACKGROUND_OPACITY", write: cx2Number }],
|
|
514
615
|
["borderColor", { vp: "NODE_BORDER_COLOR", write: colorOut }],
|
|
616
|
+
["borderOpacity", { vp: "NODE_BORDER_OPACITY", write: cx2Number }],
|
|
515
617
|
["borderWidth", { vp: "NODE_BORDER_WIDTH", write: cx2Number }],
|
|
516
618
|
[
|
|
517
619
|
"borderStyle",
|
|
@@ -531,8 +633,10 @@ const WRITERS = {
|
|
|
531
633
|
["height", { vp: "NODE_HEIGHT", write: cx2Number }],
|
|
532
634
|
["label", { vp: "NODE_LABEL", write: textOut }],
|
|
533
635
|
["labelColor", { vp: "NODE_LABEL_COLOR", write: colorOut }],
|
|
534
|
-
["labelSize", { vp: "NODE_LABEL_FONT_SIZE", write: cx2Number }],
|
|
636
|
+
["labelSize", { vp: "NODE_LABEL_FONT_SIZE", write: whole(cx2Number) }],
|
|
637
|
+
["labelWrapWidth", { vp: "NODE_LABEL_MAX_WIDTH", write: cx2Number }],
|
|
535
638
|
["labelPosition", { vp: "NODE_LABEL_POSITION", write: cx2Position }],
|
|
639
|
+
["labelRotation", { vp: "NODE_LABEL_ROTATION", write: cx2Number }],
|
|
536
640
|
["visible", { vp: "NODE_VISIBILITY", write: (v) => v === true ? "element" : "none" }]
|
|
537
641
|
]),
|
|
538
642
|
edge: /* @__PURE__ */ new Map([
|
|
@@ -565,16 +669,18 @@ const WRITERS = {
|
|
|
565
669
|
["curved", { vp: "EDGE_CURVED", write: (v) => v === true }],
|
|
566
670
|
["label", { vp: "EDGE_LABEL", write: textOut }],
|
|
567
671
|
["labelColor", { vp: "EDGE_LABEL_COLOR", write: colorOut }],
|
|
568
|
-
["labelSize", { vp: "EDGE_LABEL_FONT_SIZE", write: cx2Number }],
|
|
672
|
+
["labelSize", { vp: "EDGE_LABEL_FONT_SIZE", write: whole(cx2Number) }],
|
|
569
673
|
["visible", { vp: "EDGE_VISIBILITY", write: (v) => v === true ? "element" : "none" }]
|
|
570
674
|
])
|
|
571
675
|
}
|
|
572
676
|
};
|
|
573
677
|
function cx2Position(v) {
|
|
574
|
-
const [
|
|
678
|
+
const [node, label] = Object.hasOwn(POSITION_ANCHORS, String(v)) ? POSITION_ANCHORS[String(v)] : ["C", "C"];
|
|
679
|
+
const [h, vert] = CX2_WORDS[node];
|
|
680
|
+
const [ha, va] = CX2_WORDS[label];
|
|
575
681
|
return {
|
|
576
|
-
HORIZONTAL_ALIGN:
|
|
577
|
-
VERTICAL_ALIGN:
|
|
682
|
+
HORIZONTAL_ALIGN: ha,
|
|
683
|
+
VERTICAL_ALIGN: va,
|
|
578
684
|
HORIZONTAL_ANCHOR: h,
|
|
579
685
|
VERTICAL_ANCHOR: vert,
|
|
580
686
|
MARGIN_X: 0,
|
|
@@ -585,9 +691,10 @@ function cx2Position(v) {
|
|
|
585
691
|
const FONT_PROPS = ["labelFont", "labelWeight", "labelItalic"];
|
|
586
692
|
const FONT_VP = { node: "NODE_LABEL_FONT_FACE", edge: "EDGE_LABEL_FONT_FACE" };
|
|
587
693
|
const CSS_TO_JAVA = {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
694
|
+
// the families the reader gives Java's logical fonts
|
|
695
|
+
[JAVA_SANS]: "SansSerif",
|
|
696
|
+
[JAVA_SERIF]: "Serif",
|
|
697
|
+
[JAVA_MONO]: "Monospaced"
|
|
591
698
|
};
|
|
592
699
|
function fontOut(dialect, family, weight, italic, approx) {
|
|
593
700
|
const bold = weight === "bold";
|
|
@@ -600,11 +707,14 @@ function fontOut(dialect, family, weight, italic, approx) {
|
|
|
600
707
|
return { FONT_FAMILY: fam, FONT_STYLE: it ? "italic" : "normal", FONT_WEIGHT: bold ? "bold" : "normal" };
|
|
601
708
|
}
|
|
602
709
|
const first = fam.includes(",") ? fam.split(",")[0].trim() : fam;
|
|
603
|
-
const
|
|
710
|
+
const asWritten = Object.hasOwn(CSS_TO_JAVA, first) ? CSS_TO_JAVA[first] : first;
|
|
711
|
+
const java = Object.hasOwn(CSS_TO_JAVA, fam) ? CSS_TO_JAVA[fam] : asWritten;
|
|
604
712
|
if (fontReadsAs(java) !== fam) {
|
|
605
713
|
approx();
|
|
606
714
|
}
|
|
607
|
-
|
|
715
|
+
const style = javaFontStyle(bold, it);
|
|
716
|
+
const face = style === "plain" ? java : `${java}.${style}`;
|
|
717
|
+
return `${face},${bold ? "bold" : "plain"},12`;
|
|
608
718
|
}
|
|
609
719
|
function javaFontStyle(bold, italic) {
|
|
610
720
|
if (!bold && !italic) {
|
|
@@ -613,8 +723,7 @@ function javaFontStyle(bold, italic) {
|
|
|
613
723
|
return (bold ? "bold" : "") + (italic ? "italic" : "");
|
|
614
724
|
}
|
|
615
725
|
function fontReadsAs(name) {
|
|
616
|
-
|
|
617
|
-
return JAVA_FONTS.get(family.toLowerCase()) ?? family;
|
|
726
|
+
return javaFamily(name.replace(/\.(?:bold|italic|plain|bolditalic)$/i, ""));
|
|
618
727
|
}
|
|
619
728
|
function defaultColumnName(target, ref) {
|
|
620
729
|
if ("style" in ref) {
|
|
@@ -672,11 +781,27 @@ function targetEmit(target, extracted, snapshot, options, notes) {
|
|
|
672
781
|
}
|
|
673
782
|
};
|
|
674
783
|
}
|
|
784
|
+
const DRAWN_SO = /* @__PURE__ */ new Map([
|
|
785
|
+
// it measures each word with a space after it when it wraps a label
|
|
786
|
+
["labelWrapTrailingSpace", true],
|
|
787
|
+
// it curves an edge through its bends' midpoints
|
|
788
|
+
["bendCurve", "midpoints"]
|
|
789
|
+
]);
|
|
790
|
+
function drawnSo(p, values) {
|
|
791
|
+
const way = DRAWN_SO.get(p);
|
|
792
|
+
return way !== void 0 && values.every((v) => v === null || v === way);
|
|
793
|
+
}
|
|
675
794
|
function emitTarget(e, style, bypasses, columns) {
|
|
676
795
|
const { target, notes, truth } = e;
|
|
677
796
|
const writers = WRITERS[e.options.dialect][target];
|
|
678
797
|
for (const [p, values] of truth) {
|
|
679
|
-
|
|
798
|
+
const fixed = FIXED[target].get(p);
|
|
799
|
+
if (fixed !== void 0) {
|
|
800
|
+
const other = values.filter((v) => v !== null && v !== fixed).length;
|
|
801
|
+
if (other > 0) {
|
|
802
|
+
notes.add(STYLE_ISSUE.APPROXIMATED, target, p, { count: other });
|
|
803
|
+
}
|
|
804
|
+
} else if (!writers.has(p) && !FONT_PROPS.includes(p) && !drawnSo(p, values)) {
|
|
680
805
|
const count = values.filter((v) => v !== null).length;
|
|
681
806
|
notes.add(STYLE_ISSUE.NOT_WRITTEN, target, p, { count: Math.max(count, 1) });
|
|
682
807
|
}
|
|
@@ -747,15 +872,30 @@ function addBypasses(e, model, writers, bypasses) {
|
|
|
747
872
|
continue;
|
|
748
873
|
}
|
|
749
874
|
const drawn = resolveRules(modelRules, target, p, e.src);
|
|
875
|
+
const step = drawnStep(model.map.get(p), w.vp, STYLE_PROPERTIES[target].get(p));
|
|
876
|
+
let rounded = 0;
|
|
750
877
|
for (let i = 0; i < e.n; i++) {
|
|
751
878
|
const v = want[i];
|
|
752
879
|
if (v !== null && v !== drawn[i]) {
|
|
753
880
|
bypasses[i] ??= /* @__PURE__ */ new Map();
|
|
754
881
|
bypasses[i]?.set(w.vp, w.write(v, e.approx(p)));
|
|
882
|
+
} else if (offStep(v, step)) {
|
|
883
|
+
rounded++;
|
|
755
884
|
}
|
|
756
885
|
}
|
|
886
|
+
if (rounded > 0) {
|
|
887
|
+
e.notes.add(STYLE_ISSUE.APPROXIMATED, target, p, { count: rounded });
|
|
888
|
+
}
|
|
757
889
|
}
|
|
758
890
|
}
|
|
891
|
+
function drawnStep(m, vp, kind) {
|
|
892
|
+
const ramp = m?.kind === "continuous" && m.step === void 0;
|
|
893
|
+
const passthrough = m?.kind === "passthrough" && PASSTHROUGH_SAFE.has(kind ?? "");
|
|
894
|
+
return ramp || passthrough ? vpStep(vp) : void 0;
|
|
895
|
+
}
|
|
896
|
+
function offStep(v, step) {
|
|
897
|
+
return step !== void 0 && typeof v === "number" && num6(Math.round(v / step) * step) !== v;
|
|
898
|
+
}
|
|
759
899
|
function buildModel(target, rules, writers, notes, carrying) {
|
|
760
900
|
const model = { set: /* @__PURE__ */ new Map(), map: /* @__PURE__ */ new Map(), mappedBy: /* @__PURE__ */ new Map() };
|
|
761
901
|
const flatten = (p, id) => {
|
|
@@ -814,7 +954,11 @@ function cytoscapeMapping(e, p, m, w, columns) {
|
|
|
814
954
|
return {
|
|
815
955
|
kind: "discrete",
|
|
816
956
|
column,
|
|
817
|
-
type:
|
|
957
|
+
type: keyType(
|
|
958
|
+
e,
|
|
959
|
+
m.by,
|
|
960
|
+
m.table.map(([k]) => k)
|
|
961
|
+
),
|
|
818
962
|
table: m.table.map(([k, v]) => [k, write(v)])
|
|
819
963
|
};
|
|
820
964
|
}
|
|
@@ -864,7 +1008,16 @@ function passthroughMapping(e, p, by, column, write) {
|
|
|
864
1008
|
}
|
|
865
1009
|
}
|
|
866
1010
|
const table = Array.from(seen);
|
|
867
|
-
return {
|
|
1011
|
+
return {
|
|
1012
|
+
kind: "discrete",
|
|
1013
|
+
column,
|
|
1014
|
+
type: keyType(
|
|
1015
|
+
e,
|
|
1016
|
+
by,
|
|
1017
|
+
table.map(([k]) => k)
|
|
1018
|
+
),
|
|
1019
|
+
table
|
|
1020
|
+
};
|
|
868
1021
|
}
|
|
869
1022
|
function cx2Points(m, approx) {
|
|
870
1023
|
let changed = false;
|
|
@@ -884,6 +1037,18 @@ function cx2Points(m, approx) {
|
|
|
884
1037
|
function isScalar(v) {
|
|
885
1038
|
return typeof v === "string" || typeof v === "boolean" || typeof v === "number" && Number.isFinite(v);
|
|
886
1039
|
}
|
|
1040
|
+
function keyType(e, by, keys) {
|
|
1041
|
+
const type = typeOf(keys);
|
|
1042
|
+
if (type !== "integer") {
|
|
1043
|
+
return type;
|
|
1044
|
+
}
|
|
1045
|
+
if (!("data" in by)) {
|
|
1046
|
+
return "double";
|
|
1047
|
+
}
|
|
1048
|
+
const meta = (e.target === "node" ? e.snapshot.nodes : e.snapshot.edges).get(by.data)?.meta;
|
|
1049
|
+
const floating = (meta?.dtype === "f32" || meta?.dtype === "f64") && meta.origin?.type !== "long";
|
|
1050
|
+
return floating ? "double" : type;
|
|
1051
|
+
}
|
|
887
1052
|
function typeOf(values) {
|
|
888
1053
|
let numbers = 0;
|
|
889
1054
|
let integers = 0;
|
|
@@ -1086,7 +1251,12 @@ function mappingXml(m) {
|
|
|
1086
1251
|
];
|
|
1087
1252
|
}
|
|
1088
1253
|
function cytoscapeWritableProperties(target, dialect) {
|
|
1089
|
-
return [
|
|
1254
|
+
return [
|
|
1255
|
+
...WRITERS[dialect][target].keys(),
|
|
1256
|
+
...FONT_PROPS,
|
|
1257
|
+
...FIXED[target].keys(),
|
|
1258
|
+
...target === "node" ? ["labelWrapTrailingSpace"] : ["bendCurve"]
|
|
1259
|
+
];
|
|
1090
1260
|
}
|
|
1091
1261
|
function cytoscapeElementProperties(target, value, dialect, approx) {
|
|
1092
1262
|
const out = /* @__PURE__ */ new Map();
|
|
@@ -1112,7 +1282,396 @@ function cytoscapeElementProperties(target, value, dialect, approx) {
|
|
|
1112
1282
|
}
|
|
1113
1283
|
return out;
|
|
1114
1284
|
}
|
|
1285
|
+
const CHART_ACROSS = 0.9;
|
|
1286
|
+
const RING_HOLE = 0.4;
|
|
1287
|
+
const SLOTS = Array.from({ length: 9 }, (_, k) => `NODE_CUSTOMGRAPHICS_${String(k + 1)}`);
|
|
1288
|
+
const CHART_CLASS = /^org\.cytoscape\.(PieChart|RingChart|BarChart|LineChart|BoxChart|HeatMapChart)$/;
|
|
1289
|
+
function chartOf(raw) {
|
|
1290
|
+
if (typeof raw === "object" && raw !== null && !Array.isArray(raw)) {
|
|
1291
|
+
const o = raw;
|
|
1292
|
+
const kind2 = CHART_CLASS.exec(typeof o.name === "string" ? o.name : "")?.[1];
|
|
1293
|
+
return kind2 !== void 0 && typeof o.properties === "object" && o.properties !== null ? { kind: kind2, ring: kind2 === "RingChart", options: o.properties } : null;
|
|
1294
|
+
}
|
|
1295
|
+
if (typeof raw !== "string") {
|
|
1296
|
+
return null;
|
|
1297
|
+
}
|
|
1298
|
+
const m = /^(org\.cytoscape\.\w+):(\{.*\})\s*$/s.exec(raw.trim());
|
|
1299
|
+
const kind = m === null ? void 0 : CHART_CLASS.exec(m[1])?.[1];
|
|
1300
|
+
if (m === null || kind === void 0) {
|
|
1301
|
+
return null;
|
|
1302
|
+
}
|
|
1303
|
+
try {
|
|
1304
|
+
const options = JSON.parse(m[2]);
|
|
1305
|
+
return typeof options === "object" && options !== null ? { kind, ring: kind === "RingChart", options } : null;
|
|
1306
|
+
} catch {
|
|
1307
|
+
return null;
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
const ANCHORS = {
|
|
1311
|
+
C: [0, 0],
|
|
1312
|
+
N: [0, -1],
|
|
1313
|
+
NE: [1, -1],
|
|
1314
|
+
E: [1, 0],
|
|
1315
|
+
SE: [1, 1],
|
|
1316
|
+
S: [0, 1],
|
|
1317
|
+
SW: [-1, 1],
|
|
1318
|
+
W: [-1, 0],
|
|
1319
|
+
NW: [-1, -1]
|
|
1320
|
+
};
|
|
1321
|
+
function positionOf(raw) {
|
|
1322
|
+
let parts;
|
|
1323
|
+
if (typeof raw === "string") {
|
|
1324
|
+
const p = raw.split(",");
|
|
1325
|
+
parts = [p[0], p[1], p[3], p[4]];
|
|
1326
|
+
} else if (typeof raw === "object" && raw !== null) {
|
|
1327
|
+
const o = raw;
|
|
1328
|
+
parts = [o.ENTITY_ANCHOR, o.GRAPHICS_ANCHOR, o.MARGIN_X, o.MARGIN_Y];
|
|
1329
|
+
} else {
|
|
1330
|
+
return null;
|
|
1331
|
+
}
|
|
1332
|
+
const anchor = (v) => typeof v === "string" ? ANCHORS[v.trim().toUpperCase()] : void 0;
|
|
1333
|
+
const [node, chart] = [anchor(parts[0]), anchor(parts[1])];
|
|
1334
|
+
const [x, y] = [Number(parts[2] ?? 0), Number(parts[3] ?? 0)];
|
|
1335
|
+
return node === void 0 || chart === void 0 ? null : { node, chart, x: Number.isFinite(x) ? x : 0, y: Number.isFinite(y) ? y : 0 };
|
|
1336
|
+
}
|
|
1337
|
+
function valuesOf(columns, value) {
|
|
1338
|
+
const first = columns.length === 1 ? value(columns[0]) : void 0;
|
|
1339
|
+
const raw = Array.isArray(first) ? first : columns.map((c) => value(c));
|
|
1340
|
+
return raw.map((v) => typeof v === "number" ? v : Number(v));
|
|
1341
|
+
}
|
|
1342
|
+
function readCytoscapeCharts(out, n, graphicOf, value, sizeSync) {
|
|
1343
|
+
const col = (property) => {
|
|
1344
|
+
const existing = out[property];
|
|
1345
|
+
if (existing !== void 0) {
|
|
1346
|
+
return existing;
|
|
1347
|
+
}
|
|
1348
|
+
const fresh = new Array(n).fill(null);
|
|
1349
|
+
out[property] = fresh;
|
|
1350
|
+
return fresh;
|
|
1351
|
+
};
|
|
1352
|
+
for (let i = 0; i < n; i++) {
|
|
1353
|
+
const slot = SLOTS.findIndex((vp) => chartOf(graphicOf(vp, i)) !== null);
|
|
1354
|
+
const chart = slot < 0 ? null : chartOf(graphicOf(SLOTS[slot], i));
|
|
1355
|
+
if (chart === null) {
|
|
1356
|
+
continue;
|
|
1357
|
+
}
|
|
1358
|
+
const [w, h] = [out.width?.[i], out.height?.[i]];
|
|
1359
|
+
chartOnNode(
|
|
1360
|
+
chart,
|
|
1361
|
+
{
|
|
1362
|
+
put: (property, v) => {
|
|
1363
|
+
col(property)[i] = v;
|
|
1364
|
+
},
|
|
1365
|
+
get: (property) => out[property]?.[i],
|
|
1366
|
+
graphic: (name) => graphicOf(`${name}_${String(slot + 1)}`, i),
|
|
1367
|
+
value: (column) => value(column, i),
|
|
1368
|
+
w: typeof w === "number" ? w : null,
|
|
1369
|
+
h: typeof h === "number" ? h : null
|
|
1370
|
+
},
|
|
1371
|
+
sizeSync
|
|
1372
|
+
);
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
function shorterSide(node) {
|
|
1376
|
+
return node.w !== null && node.h !== null ? Math.min(node.w, node.h) : null;
|
|
1377
|
+
}
|
|
1378
|
+
function chartOnNode(chart, node, sizeSync) {
|
|
1379
|
+
const { options } = chart;
|
|
1380
|
+
const colors = Array.isArray(options.cy_colors) ? options.cy_colors.map(String) : [];
|
|
1381
|
+
const columns = Array.isArray(options.cy_dataColumns) ? options.cy_dataColumns.map(String) : [];
|
|
1382
|
+
const values = valuesOf(columns, node.value);
|
|
1383
|
+
if (chart.kind === "PieChart" || chart.kind === "RingChart") {
|
|
1384
|
+
pieOnNode(chart.ring, options, values, colors, node, sizeSync);
|
|
1385
|
+
return;
|
|
1386
|
+
}
|
|
1387
|
+
const own2 = Number(node.graphic("NODE_CUSTOMGRAPHICS_SIZE"));
|
|
1388
|
+
const side = shorterSide(node);
|
|
1389
|
+
const ownSize = own2 > 0;
|
|
1390
|
+
const fitted = sizeSync || !ownSize;
|
|
1391
|
+
const box = side === null ? null : { disc: CHART_ACROSS * (fitted ? side : own2), side };
|
|
1392
|
+
for (const [property, v] of Object.entries(plotChart(chart.kind, options, values, colors, box))) {
|
|
1393
|
+
node.put(property, v);
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
function pieSlices(values, colors) {
|
|
1397
|
+
const total = values.reduce((sum, v) => sum + (Number.isFinite(v) && v > 0 ? v : 0), 0);
|
|
1398
|
+
return values.flatMap(
|
|
1399
|
+
(v, k) => Number.isFinite(v) && v > 0 && colors[k] !== void 0 ? [{ color: colors[k].toLowerCase(), size: v / total }] : []
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1402
|
+
function pieOnNode(ring, options, values, colors, node, sizeSync) {
|
|
1403
|
+
const slices = pieSlices(values, colors);
|
|
1404
|
+
if (slices.length === 0) {
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1407
|
+
const start = Number(options.cy_startAngle ?? 0);
|
|
1408
|
+
const from = Number.isFinite(start) ? start : 0;
|
|
1409
|
+
const reversed = [...slices].reverse();
|
|
1410
|
+
node.put("pieColors", reversed.map((s) => s.color).join(" "));
|
|
1411
|
+
node.put("pieSizes", reversed.map((s) => String(num6(s.size))).join(" "));
|
|
1412
|
+
const own2 = Number(node.graphic("NODE_CUSTOMGRAPHICS_SIZE"));
|
|
1413
|
+
const side = shorterSide(node);
|
|
1414
|
+
const ownSize = own2 > 0;
|
|
1415
|
+
const fitted = sizeSync || !ownSize || side === null || side <= 0;
|
|
1416
|
+
node.put("pieRadius", fitted ? CHART_ACROSS : num6(CHART_ACROSS * own2 / side));
|
|
1417
|
+
pieOffset(node, fitted, own2);
|
|
1418
|
+
node.put("pieRotation", num6(((90 - from) % 360 + 360) % 360));
|
|
1419
|
+
const texts = pieItemLabels(options, values, colors, node.value, {
|
|
1420
|
+
start: from,
|
|
1421
|
+
radius: CHART_ACROSS * (fitted || side === null ? 1 : own2 / side) * (side ?? 0) / 2,
|
|
1422
|
+
dx: Number(node.get("pieOffsetX") ?? 0),
|
|
1423
|
+
dy: Number(node.get("pieOffsetY") ?? 0),
|
|
1424
|
+
w: node.w,
|
|
1425
|
+
h: node.h
|
|
1426
|
+
});
|
|
1427
|
+
if (texts !== null && (node.get("shapeTexts") ?? null) === null) {
|
|
1428
|
+
node.put("shapeTexts", texts);
|
|
1429
|
+
}
|
|
1430
|
+
if (ring) {
|
|
1431
|
+
const hole = Number(options.cy_holeSize ?? RING_HOLE);
|
|
1432
|
+
node.put("pieHole", Number.isFinite(hole) ? Math.max(0, Math.min(1, hole)) : RING_HOLE);
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
function pieOffset(node, fitted, own2) {
|
|
1436
|
+
const at = positionOf(node.graphic("NODE_CUSTOMGRAPHICS_POSITION"));
|
|
1437
|
+
const { w, h } = node;
|
|
1438
|
+
if (at === null || w === null || h === null) {
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
const disc = CHART_ACROSS * (fitted ? Math.min(w, h) : own2);
|
|
1442
|
+
const dx = at.node[0] * disc / 2 - at.chart[0] * w / 2 + at.x;
|
|
1443
|
+
const dy = at.node[1] * disc / 2 - at.chart[1] * h / 2 + at.y;
|
|
1444
|
+
if (dx !== 0 || dy !== 0) {
|
|
1445
|
+
node.put("pieOffsetX", num6(dx));
|
|
1446
|
+
node.put("pieOffsetY", num6(dy));
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
const ITEM_LABEL_RADIUS = 0.62;
|
|
1450
|
+
const ITEM_LABEL_FONT_SIZE = 1;
|
|
1451
|
+
const CHART_LABEL_COLOR = "#404040";
|
|
1452
|
+
function itemLabelsOf(options, value) {
|
|
1453
|
+
if (options.cy_showItemLabels !== true) {
|
|
1454
|
+
return null;
|
|
1455
|
+
}
|
|
1456
|
+
const column = typeof options.cy_itemLabelsColumn === "string" ? value(options.cy_itemLabelsColumn) : void 0;
|
|
1457
|
+
const list = Array.isArray(column) ? column : options.cy_itemLabels;
|
|
1458
|
+
return Array.isArray(list) ? list.map((v) => v === null || v === void 0 ? "" : String(v)) : null;
|
|
1459
|
+
}
|
|
1460
|
+
function pieItemLabels(options, values, colors, value, at) {
|
|
1461
|
+
const labels = itemLabelsOf(options, value);
|
|
1462
|
+
const { w, h } = at;
|
|
1463
|
+
if (labels === null || w === null || h === null) {
|
|
1464
|
+
return null;
|
|
1465
|
+
}
|
|
1466
|
+
const drawn = w > 0 && h > 0 && at.radius > 0;
|
|
1467
|
+
if (!drawn) {
|
|
1468
|
+
return null;
|
|
1469
|
+
}
|
|
1470
|
+
const shown = values.map((v, k) => Number.isFinite(v) && v > 0 && colors[k] !== void 0);
|
|
1471
|
+
const total = values.reduce((sum, v, k) => sum + (shown[k] ? v : 0), 0);
|
|
1472
|
+
const size = Number(options.cy_itemLabelFontSize ?? ITEM_LABEL_FONT_SIZE);
|
|
1473
|
+
const texts = [];
|
|
1474
|
+
let from = at.start;
|
|
1475
|
+
values.forEach((v, k) => {
|
|
1476
|
+
if (!shown[k]) {
|
|
1477
|
+
return;
|
|
1478
|
+
}
|
|
1479
|
+
const sweep = 360 * v / total;
|
|
1480
|
+
const mid = (from + sweep / 2) * Math.PI / 180;
|
|
1481
|
+
from += sweep;
|
|
1482
|
+
const text = labels[k] ?? "";
|
|
1483
|
+
if (text === "") {
|
|
1484
|
+
return;
|
|
1485
|
+
}
|
|
1486
|
+
const x = at.dx + ITEM_LABEL_RADIUS * at.radius * Math.cos(mid);
|
|
1487
|
+
const y = -at.dy + ITEM_LABEL_RADIUS * at.radius * Math.sin(mid);
|
|
1488
|
+
texts.push([
|
|
1489
|
+
num6(x / (w / 2)),
|
|
1490
|
+
num6(y / (h / 2)),
|
|
1491
|
+
text,
|
|
1492
|
+
{
|
|
1493
|
+
size: num6((Number.isFinite(size) && size > 0 ? size : ITEM_LABEL_FONT_SIZE) / h),
|
|
1494
|
+
color: CHART_LABEL_COLOR
|
|
1495
|
+
}
|
|
1496
|
+
]);
|
|
1497
|
+
});
|
|
1498
|
+
return texts.length === 0 ? null : JSON.stringify(texts);
|
|
1499
|
+
}
|
|
1500
|
+
const CHART_UNIT = 0.5;
|
|
1501
|
+
const CHART_INSET = 0.9;
|
|
1502
|
+
const PLOT_INSET = 1;
|
|
1503
|
+
const HEAT_MAP_INSET = 2;
|
|
1504
|
+
const BAR_OUTLINE = { color: "#404040", width: 0.25 };
|
|
1505
|
+
const BAR_MARGIN = 0.025;
|
|
1506
|
+
const LINE_MARGIN = -0.0125;
|
|
1507
|
+
const RANGE_HEADROOM = 0.1;
|
|
1508
|
+
function mix(a, b, t) {
|
|
1509
|
+
const rgb = (c) => [1, 3, 5].map((k) => Number.parseInt(c.slice(k, k + 2), 16));
|
|
1510
|
+
const [x, y] = [rgb(a), rgb(b)];
|
|
1511
|
+
if ([...x, ...y].some((v) => !Number.isFinite(v))) {
|
|
1512
|
+
return a;
|
|
1513
|
+
}
|
|
1514
|
+
const u = Math.max(0, Math.min(1, t));
|
|
1515
|
+
return `#${x.map(
|
|
1516
|
+
(v, k) => Math.round(v + (y[k] - v) * u).toString(16).padStart(2, "0")
|
|
1517
|
+
).join("")}`;
|
|
1518
|
+
}
|
|
1519
|
+
function scaleColor(colors, v, range) {
|
|
1520
|
+
const [up, zero, down] = [colors[0], colors[1] ?? colors[0], colors[2] ?? colors[0]];
|
|
1521
|
+
if (v >= 0) {
|
|
1522
|
+
return mix(zero, up, range[1] > 0 ? v / range[1] : 0);
|
|
1523
|
+
}
|
|
1524
|
+
return mix(zero, down, range[0] < 0 ? v / range[0] : 0);
|
|
1525
|
+
}
|
|
1526
|
+
function boxStats(values) {
|
|
1527
|
+
const v = [...values].sort((a, b) => a - b);
|
|
1528
|
+
const median = (list) => {
|
|
1529
|
+
const m = list.length / 2;
|
|
1530
|
+
return list.length % 2 === 1 ? list[Math.floor(m)] : (list[m - 1] + list[m]) / 2;
|
|
1531
|
+
};
|
|
1532
|
+
const half = Math.ceil(v.length / 2);
|
|
1533
|
+
const [q1, q3] = [median(v.slice(0, half)), median(v.slice(v.length - half))];
|
|
1534
|
+
const reach = 1.5 * (q3 - q1);
|
|
1535
|
+
const inside = v.filter((x) => x >= q1 - reach && x <= q3 + reach);
|
|
1536
|
+
return [inside[0], q1, median(v), q3, inside.at(-1) ?? q3];
|
|
1537
|
+
}
|
|
1538
|
+
function plotSize(kind, box) {
|
|
1539
|
+
const sized = box !== null && box.side > 0;
|
|
1540
|
+
if (!sized) {
|
|
1541
|
+
return {};
|
|
1542
|
+
}
|
|
1543
|
+
const inset = CHART_INSET + (kind === "HeatMapChart" ? HEAT_MAP_INSET : PLOT_INSET);
|
|
1544
|
+
return { chartSize: num6(Math.max(0, box.disc - inset) / box.side) };
|
|
1545
|
+
}
|
|
1546
|
+
function chartOutline(options) {
|
|
1547
|
+
const color = typeof options.cy_borderColor === "string" ? options.cy_borderColor : BAR_OUTLINE.color;
|
|
1548
|
+
return {
|
|
1549
|
+
chartBorderColor: color.toLowerCase(),
|
|
1550
|
+
chartBorderWidth: num6(CHART_UNIT * (Number(options.cy_borderWidth ?? BAR_OUTLINE.width) || 0))
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
function barChart(options, finite, colors, range, horizontal) {
|
|
1554
|
+
const type = typeof options.cy_type === "string" ? options.cy_type : "GROUPED";
|
|
1555
|
+
const stacked = type === "STACKED";
|
|
1556
|
+
return {
|
|
1557
|
+
chartKind: stacked ? "stacked-bar" : "bar",
|
|
1558
|
+
chartValues: finite.join(" "),
|
|
1559
|
+
chartColors: finite.map((v, k) => barColor(type, colors, v, k, range)).join(" "),
|
|
1560
|
+
chartMin: range[0],
|
|
1561
|
+
chartMax: range[1],
|
|
1562
|
+
// Cytoscape lays a stacked bar's values across the node when its orientation says up
|
|
1563
|
+
chartHorizontal: stacked ? !horizontal : horizontal,
|
|
1564
|
+
chartMargin: BAR_MARGIN,
|
|
1565
|
+
chartGap: num6(Math.max(0, Math.min(1, Number(options.cy_separation ?? 0) || 0)))
|
|
1566
|
+
};
|
|
1567
|
+
}
|
|
1568
|
+
function barColor(type, colors, v, k, range) {
|
|
1569
|
+
if (type === "HEAT_STRIPS") {
|
|
1570
|
+
return scaleColor(colors, v, range);
|
|
1571
|
+
}
|
|
1572
|
+
if (type === "UP_DOWN") {
|
|
1573
|
+
return colors[v >= 0 ? 0 : colors.length - 1].toLowerCase();
|
|
1574
|
+
}
|
|
1575
|
+
return colors[Math.min(k, colors.length - 1)].toLowerCase();
|
|
1576
|
+
}
|
|
1577
|
+
function plotChart(kind, options, values, colors, box) {
|
|
1578
|
+
const finite = values.filter((v) => Number.isFinite(v));
|
|
1579
|
+
if (finite.length === 0 || colors.length === 0) {
|
|
1580
|
+
return {};
|
|
1581
|
+
}
|
|
1582
|
+
const given = Array.isArray(options.cy_range) ? options.cy_range.map(Number) : [];
|
|
1583
|
+
const global = options.cy_globalRange !== false && given.length === 2 && given.every((v) => Number.isFinite(v));
|
|
1584
|
+
const auto = [Math.min(0, ...finite), Math.max(0, ...finite)];
|
|
1585
|
+
auto[1] += RANGE_HEADROOM * (auto[1] - auto[0]);
|
|
1586
|
+
const range = global ? [given[0], given[1]] : auto;
|
|
1587
|
+
const horizontal = options.cy_orientation === "HORIZONTAL";
|
|
1588
|
+
const out = plotSize(kind, box);
|
|
1589
|
+
const outline = chartOutline(options);
|
|
1590
|
+
switch (kind) {
|
|
1591
|
+
case "BarChart":
|
|
1592
|
+
Object.assign(out, outline, barChart(options, finite, colors, range, horizontal));
|
|
1593
|
+
break;
|
|
1594
|
+
case "LineChart":
|
|
1595
|
+
Object.assign(out, {
|
|
1596
|
+
chartKind: "line",
|
|
1597
|
+
chartValues: finite.join(" "),
|
|
1598
|
+
chartColors: colors[0].toLowerCase(),
|
|
1599
|
+
chartMin: range[0],
|
|
1600
|
+
chartMax: num6(range[1] + (global ? RANGE_HEADROOM * (range[1] - range[0]) : 0)),
|
|
1601
|
+
chartMargin: LINE_MARGIN,
|
|
1602
|
+
chartLineWidth: num6(CHART_UNIT * (Number(options.cy_lineWidth ?? 1) || 0))
|
|
1603
|
+
});
|
|
1604
|
+
break;
|
|
1605
|
+
case "BoxChart":
|
|
1606
|
+
Object.assign(out, outline, {
|
|
1607
|
+
chartKind: "box",
|
|
1608
|
+
chartValues: boxStats(finite).map(num6).join(" "),
|
|
1609
|
+
chartColors: `${colors[0].toLowerCase()} #000000`,
|
|
1610
|
+
chartMin: range[0],
|
|
1611
|
+
chartMax: range[1],
|
|
1612
|
+
chartHorizontal: horizontal,
|
|
1613
|
+
chartMargin: BAR_MARGIN,
|
|
1614
|
+
chartLineWidth: num6(CHART_UNIT * BAR_OUTLINE.width)
|
|
1615
|
+
});
|
|
1616
|
+
break;
|
|
1617
|
+
case "HeatMapChart": {
|
|
1618
|
+
const cells = horizontal ? [...finite].reverse() : finite;
|
|
1619
|
+
Object.assign(out, {
|
|
1620
|
+
chartKind: "cells",
|
|
1621
|
+
chartValues: cells.join(" "),
|
|
1622
|
+
chartColors: cells.map((v) => scaleColor(colors, v, range)).join(" "),
|
|
1623
|
+
chartHorizontal: !horizontal
|
|
1624
|
+
});
|
|
1625
|
+
break;
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
return out;
|
|
1629
|
+
}
|
|
1630
|
+
const EDGE_STACKING_DENSITY_VP = "EDGE_STACKING_DENSITY";
|
|
1631
|
+
const EDGE_STACKING_VP = "EDGE_STACKING";
|
|
1632
|
+
const AUTOROTATE_VP = "EDGE_LABEL_AUTOROTATE";
|
|
1633
|
+
function withoutKey(m, key) {
|
|
1634
|
+
return new Map([...m].filter(([k]) => k !== key));
|
|
1635
|
+
}
|
|
1636
|
+
const EDGE_STACKING_DENSITY_DEFAULT = 0.5;
|
|
1637
|
+
function edgeEnds(snapshot, nodes) {
|
|
1638
|
+
const nodeSize = Array.from({ length: snapshot.nodeCount }, (_, i) => {
|
|
1639
|
+
const sides = [nodes.width?.[i], nodes.height?.[i]].filter((v) => typeof v === "number");
|
|
1640
|
+
return sides.length === 0 ? null : Math.max(...sides);
|
|
1641
|
+
});
|
|
1642
|
+
const nodeBox = Array.from({ length: snapshot.nodeCount }, (_, i) => {
|
|
1643
|
+
const [w, h, b] = [nodes.width?.[i], nodes.height?.[i], nodes.borderWidth?.[i]];
|
|
1644
|
+
return typeof w === "number" && typeof h === "number" ? [w, h, typeof b === "number" ? b : 0] : null;
|
|
1645
|
+
});
|
|
1646
|
+
const position = snapshot.nodes.byRole("position");
|
|
1647
|
+
const down = position?.meta.extra?.yAxis === "down";
|
|
1648
|
+
const nodeAt = Array.from({ length: snapshot.nodeCount }, (_, i) => {
|
|
1649
|
+
const v = position?.isSet(i) === true ? position.value(i) : null;
|
|
1650
|
+
return v === null ? null : [v[0], down ? v[1] : -v[1]];
|
|
1651
|
+
});
|
|
1652
|
+
const { src, dst } = snapshot.edgeList();
|
|
1653
|
+
return { source: src, target: dst, nodeSize, nodeBox, nodeAt };
|
|
1654
|
+
}
|
|
1115
1655
|
const NODE_SIZE_FALLBACK = 50;
|
|
1656
|
+
const LOCK_PARENT = /* @__PURE__ */ new Map([
|
|
1657
|
+
["NODE_FILL_COLOR", "NODE_PAINT"],
|
|
1658
|
+
["NODE_BORDER_PAINT", "NODE_PAINT"],
|
|
1659
|
+
["NODE_WIDTH", "NODE_SIZE"],
|
|
1660
|
+
["NODE_HEIGHT", "NODE_SIZE"],
|
|
1661
|
+
["EDGE_UNSELECTED_PAINT", "EDGE_PAINT"],
|
|
1662
|
+
["EDGE_STROKE_UNSELECTED_PAINT", "EDGE_UNSELECTED_PAINT"],
|
|
1663
|
+
["EDGE_SOURCE_ARROW_UNSELECTED_PAINT", "EDGE_UNSELECTED_PAINT"],
|
|
1664
|
+
["EDGE_TARGET_ARROW_UNSELECTED_PAINT", "EDGE_UNSELECTED_PAINT"]
|
|
1665
|
+
]);
|
|
1666
|
+
function lockedValue(b, vp) {
|
|
1667
|
+
for (let p = vp; p !== void 0; p = LOCK_PARENT.get(p)) {
|
|
1668
|
+
const v = b.get(p);
|
|
1669
|
+
if (v !== void 0 && v !== null) {
|
|
1670
|
+
return v;
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
return void 0;
|
|
1674
|
+
}
|
|
1116
1675
|
function vpUsage(style, bypasses) {
|
|
1117
1676
|
const bypassed = /* @__PURE__ */ new Set();
|
|
1118
1677
|
for (const b of bypasses) {
|
|
@@ -1127,6 +1686,11 @@ function vpUsage(style, bypasses) {
|
|
|
1127
1686
|
bypassed.add(to);
|
|
1128
1687
|
}
|
|
1129
1688
|
}
|
|
1689
|
+
for (const [child, parent] of LOCK_PARENT) {
|
|
1690
|
+
if (bypassed.has(parent)) {
|
|
1691
|
+
bypassed.add(child);
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1130
1694
|
const used = /* @__PURE__ */ new Set([...style.defaults.keys(), ...style.mappings.keys(), ...bypassed]);
|
|
1131
1695
|
return { used, bypassed };
|
|
1132
1696
|
}
|
|
@@ -1143,7 +1707,7 @@ function chooseVps(target, style, used) {
|
|
|
1143
1707
|
chosen.delete("height");
|
|
1144
1708
|
}
|
|
1145
1709
|
if (target === "edge" && style.dependencies.get("arrowColorMatchesEdge") === true) {
|
|
1146
|
-
if (used.has("EDGE_UNSELECTED_PAINT")) {
|
|
1710
|
+
if (used.has("EDGE_UNSELECTED_PAINT") || used.has("EDGE_STROKE_UNSELECTED_PAINT")) {
|
|
1147
1711
|
chosen.set("color", ["EDGE_UNSELECTED_PAINT", colorParser]);
|
|
1148
1712
|
}
|
|
1149
1713
|
chosen.delete("sourceArrowColor");
|
|
@@ -1151,7 +1715,7 @@ function chooseVps(target, style, used) {
|
|
|
1151
1715
|
}
|
|
1152
1716
|
return chosen;
|
|
1153
1717
|
}
|
|
1154
|
-
function parseMapping(m, parse, site) {
|
|
1718
|
+
function parseMapping(m, parse, site, vp) {
|
|
1155
1719
|
switch (m.kind) {
|
|
1156
1720
|
case "passthrough":
|
|
1157
1721
|
return { kind: "passthrough", column: m.column };
|
|
@@ -1165,8 +1729,11 @@ function parseMapping(m, parse, site) {
|
|
|
1165
1729
|
}
|
|
1166
1730
|
return { kind: "discrete", column: m.column, table };
|
|
1167
1731
|
}
|
|
1168
|
-
default:
|
|
1169
|
-
|
|
1732
|
+
default: {
|
|
1733
|
+
const step = vpStep(vp);
|
|
1734
|
+
const points = parsePoints(m.points, parse, site);
|
|
1735
|
+
return { kind: "continuous", column: m.column, points, ...step === void 0 ? {} : { step } };
|
|
1736
|
+
}
|
|
1170
1737
|
}
|
|
1171
1738
|
}
|
|
1172
1739
|
function parsePoints(raw, parse, site) {
|
|
@@ -1202,7 +1769,7 @@ function evalMapping(m, value, parse, site) {
|
|
|
1202
1769
|
return j < 0 ? null : m.table[j][1];
|
|
1203
1770
|
}
|
|
1204
1771
|
default:
|
|
1205
|
-
return evalContinuous(m.points, numberOf(value));
|
|
1772
|
+
return evalContinuous(m.points, numberOf(value), m.step);
|
|
1206
1773
|
}
|
|
1207
1774
|
}
|
|
1208
1775
|
function resolver(target, style, elements, notes, budget) {
|
|
@@ -1223,7 +1790,7 @@ function resolver(target, style, elements, notes, budget) {
|
|
|
1223
1790
|
return b.get(from);
|
|
1224
1791
|
}
|
|
1225
1792
|
}
|
|
1226
|
-
return
|
|
1793
|
+
return lockedValue(b, vp);
|
|
1227
1794
|
};
|
|
1228
1795
|
const mappingOf = (vp, parse, property) => {
|
|
1229
1796
|
const raw = style.mappings.get(vp);
|
|
@@ -1235,7 +1802,7 @@ function resolver(target, style, elements, notes, budget) {
|
|
|
1235
1802
|
if (m === void 0) {
|
|
1236
1803
|
const entries = raw.kind === "discrete" ? raw.table.length : 0;
|
|
1237
1804
|
budget?.spend(target, 1 + entries + (raw.kind === "continuous" ? raw.points.length : 0));
|
|
1238
|
-
m = parseMapping(raw, parse, ruleSite(property));
|
|
1805
|
+
m = parseMapping(raw, parse, ruleSite(property), vp);
|
|
1239
1806
|
parsed.set(key, m);
|
|
1240
1807
|
}
|
|
1241
1808
|
return m;
|
|
@@ -1262,7 +1829,7 @@ function resolveCytoscape(target, style, elements, options = {}) {
|
|
|
1262
1829
|
const n = elements.count;
|
|
1263
1830
|
const { used, bypassed } = vpUsage(s, elements.bypasses ?? []);
|
|
1264
1831
|
const chosen = chooseVps(target, s, used);
|
|
1265
|
-
const { one } = resolver(target, s, elements, notes, options.budget);
|
|
1832
|
+
const { one, bypass } = resolver(target, s, elements, notes, options.budget);
|
|
1266
1833
|
const out = {};
|
|
1267
1834
|
const column = (vp, parse, property) => {
|
|
1268
1835
|
options.budget?.spend(target, n);
|
|
@@ -1277,24 +1844,352 @@ function resolveCytoscape(target, style, elements, options = {}) {
|
|
|
1277
1844
|
}
|
|
1278
1845
|
if (target === "node" && s.dependencies.get("nodeSizeLocked") === true) {
|
|
1279
1846
|
const size = column(NODE_SIZE_VP, sizeParser, "width").map((v) => v ?? NODE_SIZE_FALLBACK);
|
|
1280
|
-
|
|
1281
|
-
|
|
1847
|
+
const own2 = (vp, property) => size.map((v, i) => {
|
|
1848
|
+
const b = bypass(i, vp);
|
|
1849
|
+
const parsed = b === void 0 || b === null ? null : sizeParser(b, { notes, target, property, element: i });
|
|
1850
|
+
return parsed ?? v;
|
|
1851
|
+
});
|
|
1852
|
+
out.width = own2("NODE_WIDTH", "width");
|
|
1853
|
+
out.height = own2("NODE_HEIGHT", "height");
|
|
1854
|
+
}
|
|
1855
|
+
labelDress(target, out, one, n, elements.ends);
|
|
1856
|
+
if (target === "node") {
|
|
1857
|
+
squashHexagons(out);
|
|
1858
|
+
const raw = (v) => {
|
|
1859
|
+
if (typeof v === "string" || typeof v === "number") {
|
|
1860
|
+
return String(v);
|
|
1861
|
+
}
|
|
1862
|
+
return typeof v === "object" && v !== null ? JSON.stringify(v) : null;
|
|
1863
|
+
};
|
|
1864
|
+
readCytoscapeCharts(
|
|
1865
|
+
out,
|
|
1866
|
+
n,
|
|
1867
|
+
(slot, i) => {
|
|
1868
|
+
const v = one(slot, raw, "pieColors", i);
|
|
1869
|
+
return typeof v === "string" && v.startsWith("{") ? JSON.parse(v) : v;
|
|
1870
|
+
},
|
|
1871
|
+
(column2, i) => elements.value(column2, i),
|
|
1872
|
+
s.dependencies.get("nodeCustomGraphicsSizeSync") !== false
|
|
1873
|
+
);
|
|
1874
|
+
}
|
|
1875
|
+
if (target === "edge" && s.dependencies.get("arrowColorMatchesEdge") === true && !used.has("EDGE_UNSELECTED_PAINT") && used.has("EDGE_STROKE_UNSELECTED_PAINT")) {
|
|
1876
|
+
const paint = toolDefaults("cytoscape-fallbacks")?.edge.color?.value ?? null;
|
|
1877
|
+
out.color = Array.from({ length: n }, (_, i) => one("EDGE_UNSELECTED_PAINT", colorParser, "color", i) ?? paint);
|
|
1282
1878
|
}
|
|
1283
1879
|
if (target === "edge" && s.dependencies.get("arrowColorMatchesEdge") === true && out.color !== void 0) {
|
|
1284
|
-
|
|
1285
|
-
|
|
1880
|
+
const lineVp = chosen.get("color")?.[0];
|
|
1881
|
+
const unbypassed = resolver(target, s, { ...elements, bypasses: [] }, notes, options.budget).one;
|
|
1882
|
+
const arrows = lineVp === "EDGE_LINE_COLOR" ? Array.from({ length: n }, (_, i) => unbypassed(lineVp, colorParser, "color", i)) : out.color;
|
|
1883
|
+
out.sourceArrowColor = arrows.slice();
|
|
1884
|
+
out.targetArrowColor = arrows.slice();
|
|
1885
|
+
const own2 = [
|
|
1886
|
+
["color", "EDGE_STROKE_UNSELECTED_PAINT"],
|
|
1887
|
+
["sourceArrowColor", "EDGE_SOURCE_ARROW_UNSELECTED_PAINT"],
|
|
1888
|
+
["targetArrowColor", "EDGE_TARGET_ARROW_UNSELECTED_PAINT"],
|
|
1889
|
+
["sourceArrowColor", "EDGE_SOURCE_ARROW_COLOR"],
|
|
1890
|
+
["targetArrowColor", "EDGE_TARGET_ARROW_COLOR"]
|
|
1891
|
+
];
|
|
1892
|
+
for (const [prop, vp] of own2) {
|
|
1893
|
+
out[prop] = (out[prop] ?? []).map((v, i) => {
|
|
1894
|
+
const b = bypass(i, vp);
|
|
1895
|
+
const site = { notes, target, property: prop, element: i };
|
|
1896
|
+
return (b === void 0 || b === null ? null : colorParser(b, site)) ?? v;
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1286
1899
|
}
|
|
1287
1900
|
noteUncarried(target, s, used, bypassed, notes);
|
|
1288
|
-
fillToolDefaults(target, out, n, options.defaults ?? null);
|
|
1289
1901
|
if (target === "edge") {
|
|
1290
|
-
|
|
1902
|
+
const bends = column(EDGE_BEND_VP, bendsParser, "bends");
|
|
1903
|
+
if (bends.some((v) => v !== null)) {
|
|
1904
|
+
out.bends = bends;
|
|
1905
|
+
}
|
|
1906
|
+
const curvedAsSet = out.curved?.slice();
|
|
1907
|
+
straightenBendless(out, one, n, elements.ends);
|
|
1908
|
+
loopHandles(out, one, curvedAsSet, elements.ends);
|
|
1909
|
+
arrowProportions(out, column);
|
|
1291
1910
|
}
|
|
1911
|
+
fillToolDefaults(target, out, n, options.defaults ?? null);
|
|
1292
1912
|
return out;
|
|
1293
1913
|
}
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1914
|
+
const rawText = (v) => {
|
|
1915
|
+
if (typeof v === "string" || typeof v === "number" || typeof v === "boolean") {
|
|
1916
|
+
return String(v);
|
|
1917
|
+
}
|
|
1918
|
+
return typeof v === "object" && v !== null ? JSON.stringify(v) : null;
|
|
1919
|
+
};
|
|
1920
|
+
function labelDress(target, out, one, n, ends) {
|
|
1921
|
+
const vp = (name) => `${target === "node" ? "NODE" : "EDGE"}_LABEL_${name}`;
|
|
1922
|
+
const columns = {};
|
|
1923
|
+
const put = (property, i, v) => {
|
|
1924
|
+
let column = columns[property];
|
|
1925
|
+
if (column === void 0) {
|
|
1926
|
+
column = new Array(n).fill(null);
|
|
1927
|
+
columns[property] = column;
|
|
1928
|
+
}
|
|
1929
|
+
column[i] = v;
|
|
1930
|
+
};
|
|
1931
|
+
for (let i = 0; i < n; i++) {
|
|
1932
|
+
labelBox(vp, one, i, put);
|
|
1933
|
+
const placed = one(vp("POSITION"), rawText, "labelPlace", i);
|
|
1934
|
+
const raw = typeof placed === "string" && placed.startsWith("{") ? JSON.parse(placed) : placed;
|
|
1935
|
+
const place = cytoscapeLabelPlace(raw, { notes: new StyleNotes(), target, property: "labelPosition" });
|
|
1936
|
+
if (place !== null) {
|
|
1937
|
+
placeLabel(target, place, i, out, put, ends);
|
|
1938
|
+
}
|
|
1939
|
+
if (target === "edge") {
|
|
1940
|
+
autorotate(one, i, out, n, ends);
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
const kept = (property, v) => v !== null && v !== 0 && (v !== "center" || property === "labelPosition" && target === "edge");
|
|
1944
|
+
for (const [property, values] of Object.entries(columns)) {
|
|
1945
|
+
if (values.some((v) => kept(property, v))) {
|
|
1946
|
+
out[property] = values;
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
function labelBox(vp, one, i, put) {
|
|
1951
|
+
const shape = one(vp("BACKGROUND_SHAPE"), rawText, "labelBackgroundShape", i);
|
|
1952
|
+
if (typeof shape !== "string" || shape.trim().toUpperCase() === "NONE") {
|
|
1953
|
+
return;
|
|
1954
|
+
}
|
|
1955
|
+
put("labelBackground", i, one(vp("BACKGROUND_COLOR"), colorParser, "labelBackground", i) ?? "#b6b6b6");
|
|
1956
|
+
const [t, o] = [vp("BACKGROUND_TRANSPARENCY"), vp("BACKGROUND_OPACITY")];
|
|
1957
|
+
const opacity = one(t, opacityParser(t), "labelBackgroundOpacity", i) ?? one(o, opacityParser(o), "labelBackgroundOpacity", i);
|
|
1958
|
+
put("labelBackgroundOpacity", i, opacity ?? 1);
|
|
1959
|
+
if (shape.trim().toUpperCase().replace("-", "_") === "ROUND_RECTANGLE") {
|
|
1960
|
+
const size = one(vp("FONT_SIZE"), sizeParser, "labelSize", i);
|
|
1961
|
+
const defaultSize = vp("FONT_SIZE").startsWith("EDGE") ? 10 : 12;
|
|
1962
|
+
put("labelCornerRadius", i, num6(LABEL_CORNER_PER_SIZE * (typeof size === "number" ? size : defaultSize)));
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
const LABEL_CORNER_PER_SIZE = 0.1455;
|
|
1966
|
+
function placeLabel(target, place, i, out, put, ends) {
|
|
1967
|
+
let move;
|
|
1968
|
+
if (target === "node") {
|
|
1969
|
+
const [w, h] = [out.width?.[i], out.height?.[i]];
|
|
1970
|
+
move = cytoscapeLabelMove(place, typeof w === "number" ? w : 0, typeof h === "number" ? h : 0);
|
|
1971
|
+
put("labelPosition", i, cytoscapeLabelBase(place));
|
|
1972
|
+
} else {
|
|
1973
|
+
const [ax, ay] = lineEnd(ends, i, place.node[0]);
|
|
1974
|
+
move = {
|
|
1975
|
+
offset: [ax + place.offset[0], ay + place.offset[1]],
|
|
1976
|
+
shift: [halfBack(place.label[0]), halfBack(place.label[1])]
|
|
1977
|
+
};
|
|
1978
|
+
put("labelPosition", i, "center");
|
|
1979
|
+
}
|
|
1980
|
+
put("labelOffsetX", i, num6(move.offset[0]));
|
|
1981
|
+
put("labelOffsetY", i, num6(move.offset[1]));
|
|
1982
|
+
put("labelShiftX", i, move.shift[0]);
|
|
1983
|
+
put("labelShiftY", i, move.shift[1]);
|
|
1984
|
+
put("labelTextAlign", i, place.justify);
|
|
1985
|
+
}
|
|
1986
|
+
function autorotate(one, e, out, n, ends) {
|
|
1987
|
+
const on = one(AUTOROTATE_VP, rawText, "labelRotation", e);
|
|
1988
|
+
const [si, ti] = [ends?.source[e], ends?.target[e]];
|
|
1989
|
+
const [s, t] = [si === void 0 ? null : ends?.nodeAt?.[si], ti === void 0 ? null : ends?.nodeAt?.[ti]];
|
|
1990
|
+
if (String(on).toLowerCase() !== "true" || !s || !t || s[0] === t[0] && s[1] === t[1]) {
|
|
1991
|
+
return;
|
|
1992
|
+
}
|
|
1993
|
+
const a = Math.atan2(t[1] - s[1], t[0] - s[0]) * 180 / Math.PI;
|
|
1994
|
+
let upright = a;
|
|
1995
|
+
if (a > 90) {
|
|
1996
|
+
upright = a - 180;
|
|
1997
|
+
} else if (a <= -90) {
|
|
1998
|
+
upright = a + 180;
|
|
1999
|
+
}
|
|
2000
|
+
out.labelRotation ??= new Array(n).fill(null);
|
|
2001
|
+
const column = out.labelRotation;
|
|
2002
|
+
const own2 = column[e];
|
|
2003
|
+
column[e] = num6(((upright + (typeof own2 === "number" ? own2 : 0)) % 360 + 360) % 360);
|
|
2004
|
+
}
|
|
2005
|
+
function lineEnd(ends, e, side) {
|
|
2006
|
+
const [si, ti] = [ends?.source[e], ends?.target[e]];
|
|
2007
|
+
const [s, t] = [si === void 0 ? null : ends?.nodeAt?.[si], ti === void 0 ? null : ends?.nodeAt?.[ti]];
|
|
2008
|
+
if (side === 0 || s === null || s === void 0 || t === null || t === void 0) {
|
|
2009
|
+
return [0, 0];
|
|
2010
|
+
}
|
|
2011
|
+
const length = Math.hypot(t[0] - s[0], t[1] - s[1]);
|
|
2012
|
+
if (length === 0) {
|
|
2013
|
+
return [0, 0];
|
|
2014
|
+
}
|
|
2015
|
+
const [ux, uy] = [(t[0] - s[0]) / length, (t[1] - s[1]) / length];
|
|
2016
|
+
const reach = (node) => {
|
|
2017
|
+
const box = node === void 0 ? null : ends?.nodeBox?.[node];
|
|
2018
|
+
if (box === null || box === void 0) {
|
|
2019
|
+
return 0;
|
|
2020
|
+
}
|
|
2021
|
+
const [a, b] = [box[0] / 2, box[1] / 2];
|
|
2022
|
+
return a === 0 || b === 0 ? 0 : a * b / Math.hypot(b * ux, a * uy);
|
|
2023
|
+
};
|
|
2024
|
+
const from = reach(si);
|
|
2025
|
+
const to = length - reach(ti);
|
|
2026
|
+
const along = (side < 0 ? from : to) - (from + to) / 2;
|
|
2027
|
+
return [ux * along, uy * along];
|
|
2028
|
+
}
|
|
2029
|
+
const HEXAGON_ASPECT = Math.sqrt(3) / 2;
|
|
2030
|
+
function squashHexagons(out) {
|
|
2031
|
+
const { shape, height } = out;
|
|
2032
|
+
if (shape === void 0 || height === void 0 || !shape.includes("hexagon")) {
|
|
2033
|
+
return;
|
|
2034
|
+
}
|
|
2035
|
+
const border = out.borderWidth;
|
|
2036
|
+
out.height = height.map((h, i) => {
|
|
2037
|
+
if (shape[i] !== "hexagon" || typeof h !== "number") {
|
|
2038
|
+
return h;
|
|
2039
|
+
}
|
|
2040
|
+
const b = border?.[i];
|
|
2041
|
+
const w = typeof b === "number" ? Math.min(b, h) : 0;
|
|
2042
|
+
return (h - w) * HEXAGON_ASPECT + w;
|
|
2043
|
+
});
|
|
2044
|
+
}
|
|
2045
|
+
function arrowProportions(out, column) {
|
|
2046
|
+
const size = out.arrowSize;
|
|
2047
|
+
const own2 = column("EDGE_SOURCE_ARROW_SIZE", arrowSizeParser, "sourceArrowSize").map((v) => v ?? 1);
|
|
2048
|
+
if (own2.some((v, i) => v !== (size?.[i] ?? 1))) {
|
|
2049
|
+
out.sourceArrowSize = own2;
|
|
2050
|
+
}
|
|
2051
|
+
for (const [prop, vp, side] of [
|
|
2052
|
+
["sourceArrowLength", "EDGE_SOURCE_ARROW_SHAPE", "length"],
|
|
2053
|
+
["targetArrowLength", "EDGE_TARGET_ARROW_SHAPE", "length"],
|
|
2054
|
+
["sourceArrowWidth", "EDGE_SOURCE_ARROW_SHAPE", "width"],
|
|
2055
|
+
["targetArrowWidth", "EDGE_TARGET_ARROW_SHAPE", "width"]
|
|
2056
|
+
]) {
|
|
2057
|
+
const values = column(vp, arrowProportion(side), prop).map((v) => v === 1 ? null : v);
|
|
2058
|
+
if (values.some((v) => v !== null)) {
|
|
2059
|
+
out[prop] = values;
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
for (const [prop, vp] of [
|
|
2063
|
+
["sourceArrowGap", "EDGE_SOURCE_ARROW_SHAPE"],
|
|
2064
|
+
["targetArrowGap", "EDGE_TARGET_ARROW_SHAPE"]
|
|
2065
|
+
]) {
|
|
2066
|
+
const values = column(vp, arrowGap, prop).map((v) => v === 0 ? null : v);
|
|
2067
|
+
if (values.some((v) => v !== null)) {
|
|
2068
|
+
out[prop] = values;
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
function straightenBendless(out, one, n, ends) {
|
|
2073
|
+
const curved = out.curved ?? new Array(n).fill(null);
|
|
2074
|
+
const bent = (i) => one(EDGE_BEND_VP, bendParser, "curved", i) === true;
|
|
2075
|
+
const haystack = (i) => String(one(EDGE_STACKING_VP, rawText, "fanned", i) ?? "").toUpperCase() === "HAYSTACK";
|
|
2076
|
+
const place = ends === void 0 ? /* @__PURE__ */ new Map() : fanPlaces(ends, curved.length, bent, haystack);
|
|
2077
|
+
const fanned = new Set(place.keys());
|
|
2078
|
+
const rounds = (i) => fanned.has(i) || bent(i);
|
|
2079
|
+
const rounded = curved.map((c, i) => {
|
|
2080
|
+
if (c === null) {
|
|
2081
|
+
return rounds(i) ? true : null;
|
|
2082
|
+
}
|
|
2083
|
+
return c === true || fanned.has(i) ? rounds(i) : c;
|
|
2084
|
+
});
|
|
2085
|
+
if (out.curved !== void 0 || rounded.includes(true)) {
|
|
2086
|
+
out.curved = rounded;
|
|
2087
|
+
}
|
|
2088
|
+
if (ends?.nodeSize === void 0 || fanned.size === 0) {
|
|
2089
|
+
return;
|
|
2090
|
+
}
|
|
2091
|
+
const { source, target, nodeSize } = ends;
|
|
2092
|
+
out.fanSpacing = curved.map((_, i) => {
|
|
2093
|
+
const size = Math.max(nodeSize[source[i]] ?? Number.NaN, nodeSize[target[i]] ?? Number.NaN);
|
|
2094
|
+
if (out.curved?.[i] !== true || !fanned.has(i) || bent(i) || !Number.isFinite(size)) {
|
|
2095
|
+
return null;
|
|
2096
|
+
}
|
|
2097
|
+
const read = one(EDGE_STACKING_DENSITY_VP, sizeParser, "fanSpacing", i);
|
|
2098
|
+
const density = Math.min(1, typeof read === "number" ? read : EDGE_STACKING_DENSITY_DEFAULT);
|
|
2099
|
+
return size * density;
|
|
2100
|
+
});
|
|
2101
|
+
fanAnchors(out, ends, place);
|
|
2102
|
+
}
|
|
2103
|
+
function fanPlaces(ends, count, bent, haystack) {
|
|
2104
|
+
const place = /* @__PURE__ */ new Map();
|
|
2105
|
+
const first = /* @__PURE__ */ new Map();
|
|
2106
|
+
for (const i of newestFirst(count, ends.created?.edge)) {
|
|
2107
|
+
const [s, t] = [ends.source[i], ends.target[i]];
|
|
2108
|
+
if (s === t || haystack(i)) {
|
|
2109
|
+
continue;
|
|
2110
|
+
}
|
|
2111
|
+
const key = `${Math.min(s, t)},${Math.max(s, t)}`;
|
|
2112
|
+
const f = first.get(key);
|
|
2113
|
+
if (f === void 0) {
|
|
2114
|
+
first.set(key, { f: i, k: 0 });
|
|
2115
|
+
} else if (!bent(f.f)) {
|
|
2116
|
+
f.k++;
|
|
2117
|
+
place.set(i, f.k);
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
return place;
|
|
2121
|
+
}
|
|
2122
|
+
function newestFirst(count, created) {
|
|
2123
|
+
const walk = Array.from({ length: count }, (_, i) => i);
|
|
2124
|
+
walk.sort(created === void 0 ? (a, b) => b - a : (a, b) => created[b] - created[a]);
|
|
2125
|
+
return walk;
|
|
2126
|
+
}
|
|
2127
|
+
function fanAnchors(out, ends, place) {
|
|
2128
|
+
const { created, nodeAt, source, target } = ends;
|
|
2129
|
+
const spacing = out.fanSpacing?.slice();
|
|
2130
|
+
if (created === void 0 || nodeAt === void 0 || spacing === void 0) {
|
|
2131
|
+
return;
|
|
2132
|
+
}
|
|
2133
|
+
const bends = out.bends?.slice() ?? new Array(source.length).fill(null);
|
|
2134
|
+
const bendCurve = out.bendCurve?.slice() ?? new Array(source.length).fill(null);
|
|
2135
|
+
let changed = false;
|
|
2136
|
+
for (const [i, k] of place) {
|
|
2137
|
+
const [s, t] = [source[i], target[i]];
|
|
2138
|
+
const [ps, pt, f] = [nodeAt[s], nodeAt[t], spacing[i]];
|
|
2139
|
+
if (ps === null || ps === void 0 || pt === null || pt === void 0 || typeof f !== "number") {
|
|
2140
|
+
continue;
|
|
2141
|
+
}
|
|
2142
|
+
const len = Math.hypot(pt[0] - ps[0], pt[1] - ps[1]);
|
|
2143
|
+
if (len === 0) {
|
|
2144
|
+
continue;
|
|
2145
|
+
}
|
|
2146
|
+
const sign = created.node[s] > created.node[t] ? 1 : -1;
|
|
2147
|
+
const [nx, ny] = [sign * (pt[0] - ps[0]) / len, sign * (pt[1] - ps[1]) / len];
|
|
2148
|
+
const offset = Math.ceil(k / 2) * (k % 2 === 0 ? 1 : -1) * 2 * f;
|
|
2149
|
+
const [vx, vy] = [offset * ny, -offset * nx];
|
|
2150
|
+
const across = (vx * (pt[1] - ps[1]) - vy * (pt[0] - ps[0])) / (len * len);
|
|
2151
|
+
bends[i] = `0.5,${String(Math.round(across * 1e6) / 1e6 || 0)}`;
|
|
2152
|
+
bendCurve[i] = "bezier";
|
|
2153
|
+
spacing[i] = null;
|
|
2154
|
+
changed = true;
|
|
2155
|
+
}
|
|
2156
|
+
if (changed) {
|
|
2157
|
+
out.bends = bends;
|
|
2158
|
+
out.bendCurve = bendCurve;
|
|
2159
|
+
out.fanSpacing = spacing;
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
function loopHandles(out, one, curvedAsSet, ends) {
|
|
2163
|
+
const box = ends?.nodeBox;
|
|
2164
|
+
if (ends === void 0 || box === void 0) {
|
|
2165
|
+
return;
|
|
2166
|
+
}
|
|
2167
|
+
const bends = out.bends?.slice() ?? new Array(ends.source.length).fill(null);
|
|
2168
|
+
const curved = out.curved?.slice() ?? new Array(ends.source.length).fill(null);
|
|
2169
|
+
const earlier = /* @__PURE__ */ new Map();
|
|
2170
|
+
const fraction = (v) => String(Math.round(v * 1e4) / 1e4 || 0);
|
|
2171
|
+
let changed = false;
|
|
2172
|
+
for (let i = ends.source.length - 1; i >= 0; i--) {
|
|
2173
|
+
const node = ends.source[i];
|
|
2174
|
+
const b = box[node];
|
|
2175
|
+
if (node !== ends.target[i] || bends[i] !== null) {
|
|
2176
|
+
continue;
|
|
2177
|
+
}
|
|
2178
|
+
const rank = earlier.get(node) ?? 0;
|
|
2179
|
+
earlier.set(node, rank + 1);
|
|
2180
|
+
if (b === null || b === void 0 || b[0] <= 0 || b[1] <= 0) {
|
|
2181
|
+
continue;
|
|
2182
|
+
}
|
|
2183
|
+
const read = one(EDGE_STACKING_DENSITY_VP, sizeParser, "fanSpacing", i);
|
|
2184
|
+
const density = Math.min(1, typeof read === "number" ? read : EDGE_STACKING_DENSITY_DEFAULT);
|
|
2185
|
+
const reach = (rank + 3) * (Math.max(b[0], b[1]) + b[2]) / 2 * 2 * density;
|
|
2186
|
+
bends[i] = `${fraction(-reach / (b[0] / 2))},0 0,${fraction(reach / (b[1] / 2))}`;
|
|
2187
|
+
curved[i] = curvedAsSet?.[i] !== false;
|
|
2188
|
+
changed = true;
|
|
2189
|
+
}
|
|
2190
|
+
if (changed) {
|
|
2191
|
+
out.bends = bends;
|
|
2192
|
+
out.curved = curved;
|
|
1298
2193
|
}
|
|
1299
2194
|
}
|
|
1300
2195
|
const EDGE_BEND_VP = "EDGE_BEND";
|
|
@@ -1305,6 +2200,26 @@ const bendParser = (raw) => {
|
|
|
1305
2200
|
}
|
|
1306
2201
|
return Array.isArray(raw) ? raw.length > 0 : raw !== null && raw !== void 0 && typeof raw === "object";
|
|
1307
2202
|
};
|
|
2203
|
+
const bendsParser = (input, site) => {
|
|
2204
|
+
const raw = Array.isArray(input) ? input.map((h) => {
|
|
2205
|
+
const o = h ?? {};
|
|
2206
|
+
return `${Number(o.sin)},${Number(o.cos)},${Number(o.ratio)}`;
|
|
2207
|
+
}).join("|") : input;
|
|
2208
|
+
if (typeof raw !== "string" || !bendParser(raw)) {
|
|
2209
|
+
return null;
|
|
2210
|
+
}
|
|
2211
|
+
const points = [];
|
|
2212
|
+
for (const handle of raw.trim().split("|")) {
|
|
2213
|
+
const [c, sin, ratio] = handle.split(",").map((t) => Number(t.trim()));
|
|
2214
|
+
if (![c, sin, ratio].every((v) => Number.isFinite(v))) {
|
|
2215
|
+
noteAt(site, STYLE_ISSUE.BAD_VALUE, raw.slice(0, 64));
|
|
2216
|
+
return null;
|
|
2217
|
+
}
|
|
2218
|
+
const fraction = (v) => String(Math.round(v * 1e4) / 1e4 || 0);
|
|
2219
|
+
points.push(`${fraction(ratio * c)},${fraction(-ratio * sin)}`);
|
|
2220
|
+
}
|
|
2221
|
+
return points.join(" ");
|
|
2222
|
+
};
|
|
1308
2223
|
const INERT_DEFAULT = /NullCustomGraphics|^255$|^0(?:\.0+)?$|^$|^C,C,c,0\.00,0\.00$|^false$/;
|
|
1309
2224
|
function noteUncarried(target, s, used, bypassed, notes) {
|
|
1310
2225
|
for (const vp of used) {
|
|
@@ -1348,7 +2263,15 @@ function cytoscapeBackground(style, notes) {
|
|
|
1348
2263
|
function resolveCytoscapeBypasses(target, maps, options = {}) {
|
|
1349
2264
|
const notes = options.notes ?? new StyleNotes();
|
|
1350
2265
|
const style = emptyCytoscapeStyle();
|
|
1351
|
-
const elements = {
|
|
2266
|
+
const elements = {
|
|
2267
|
+
count: maps.length,
|
|
2268
|
+
value: options.value ?? (() => null),
|
|
2269
|
+
// Cytoscape 3.10.5 draws an XGMML edge's EDGE_LABEL_AUTOROTATE true level, where it turns the same edge read
|
|
2270
|
+
// from CX, CX2 or a session along its line (the label-autorotate-true edge of the edge-labels and
|
|
2271
|
+
// mappings-bypass-p13 sheets in its SVG): its XGMML reader does not apply it, so neither does graph-io
|
|
2272
|
+
bypasses: maps.map((m) => m?.has(AUTOROTATE_VP) === true ? withoutKey(m, AUTOROTATE_VP) : m),
|
|
2273
|
+
ends: options.ends
|
|
2274
|
+
};
|
|
1352
2275
|
const out = resolveCytoscape(target, style, elements, { notes, budget: options.budget });
|
|
1353
2276
|
if (target === "node" && out.width === void 0) {
|
|
1354
2277
|
const size = maps.map((m) => {
|
|
@@ -1386,8 +2309,12 @@ function cytoscapeRules(target, style, elements, options = {}) {
|
|
|
1386
2309
|
const columns = /* @__PURE__ */ new Map();
|
|
1387
2310
|
const byColumn = /* @__PURE__ */ new Map();
|
|
1388
2311
|
const reading = { target, refOf, elements, columns, notes, budget: options.budget };
|
|
1389
|
-
const add = (props,
|
|
1390
|
-
const
|
|
2312
|
+
const add = (props, vp, parse) => {
|
|
2313
|
+
const raw = s.mappings.get(vp);
|
|
2314
|
+
if (raw === void 0) {
|
|
2315
|
+
return;
|
|
2316
|
+
}
|
|
2317
|
+
const parsed = parseMapping(raw, parse, site(props[0]), vp);
|
|
1391
2318
|
const mapping = neutralMapping(parsed, props[0], parse, reading);
|
|
1392
2319
|
const key = `${raw.kind}\0${raw.column}`;
|
|
1393
2320
|
let rule = byColumn.get(key);
|
|
@@ -1400,14 +2327,10 @@ function cytoscapeRules(target, style, elements, options = {}) {
|
|
|
1400
2327
|
}
|
|
1401
2328
|
};
|
|
1402
2329
|
for (const [prop, [vp, parse]] of chosen) {
|
|
1403
|
-
|
|
1404
|
-
if (raw !== void 0) {
|
|
1405
|
-
add(matched && prop === "color" ? ["color", "sourceArrowColor", "targetArrowColor"] : [prop], raw, parse);
|
|
1406
|
-
}
|
|
2330
|
+
add(matched && prop === "color" ? ["color", "sourceArrowColor", "targetArrowColor"] : [prop], vp, parse);
|
|
1407
2331
|
}
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
add(["width", "height"], size, sizeParser);
|
|
2332
|
+
if (locked) {
|
|
2333
|
+
add(["width", "height"], NODE_SIZE_VP, sizeParser);
|
|
1411
2334
|
}
|
|
1412
2335
|
const rules = [];
|
|
1413
2336
|
if (Object.keys(set).length > 0) {
|
|
@@ -1454,7 +2377,7 @@ function neutralMapping(m, property, parse, reading) {
|
|
|
1454
2377
|
return { kind: "discrete", by, table: m.table };
|
|
1455
2378
|
}
|
|
1456
2379
|
if (m.kind === "continuous") {
|
|
1457
|
-
return { kind: "continuous", by, points: m.points };
|
|
2380
|
+
return { kind: "continuous", by, points: m.points, ...m.step === void 0 ? {} : { step: m.step } };
|
|
1458
2381
|
}
|
|
1459
2382
|
const plain = "style" in by ? styleCell : canonicalFor(target, property);
|
|
1460
2383
|
const n = elements.count;
|
|
@@ -1739,8 +2662,13 @@ function readXgmmlStyles(snapshot, context, settings) {
|
|
|
1739
2662
|
const table = target === "node" ? snapshot.nodes : snapshot.edges;
|
|
1740
2663
|
const n = target === "node" ? snapshot.nodeCount : snapshot.edgeCount;
|
|
1741
2664
|
const maps = graphicsBypasses(table, target, n, notes);
|
|
1742
|
-
const values = maps.some((m) => m !== null) ? resolveCytoscapeBypasses(target, maps, {
|
|
1743
|
-
|
|
2665
|
+
const values = maps.some((m) => m !== null) ? resolveCytoscapeBypasses(target, maps, {
|
|
2666
|
+
notes,
|
|
2667
|
+
budget: context.budget,
|
|
2668
|
+
value: (column, i) => table.has(column) ? plainCell(table.value(column, i)) : null,
|
|
2669
|
+
...target === "edge" ? { ends: edgeEnds(snapshot, out.node.values) } : {}
|
|
2670
|
+
}) : {};
|
|
2671
|
+
drawnAsDesktop(snapshot, target, out.node.values, values, settings);
|
|
1744
2672
|
exactFromBlock(snapshot, target, values);
|
|
1745
2673
|
out[target] = { values: nonEmpty(values) };
|
|
1746
2674
|
}
|
|
@@ -1755,56 +2683,111 @@ function readXgmmlStyles(snapshot, context, settings) {
|
|
|
1755
2683
|
notes: notes.list()
|
|
1756
2684
|
};
|
|
1757
2685
|
}
|
|
1758
|
-
function
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
2686
|
+
function drawnAsDesktop(snapshot, target, nodes, values, settings) {
|
|
2687
|
+
const table = target === "node" ? snapshot.nodes : snapshot.edges;
|
|
2688
|
+
const n = target === "node" ? snapshot.nodeCount : snapshot.edgeCount;
|
|
2689
|
+
const desktop = settings.tool === "cytoscape";
|
|
2690
|
+
if (target === "edge" && desktop) {
|
|
2691
|
+
bendsAtOrigin(snapshot, values);
|
|
2692
|
+
}
|
|
2693
|
+
hiddenToVisible(table, settings.hiddenColumn ?? null, n, values);
|
|
2694
|
+
hideWhatCytoscapeHides(snapshot, target, nodes, values);
|
|
2695
|
+
if (target === "node") {
|
|
2696
|
+
if (desktop && values.label === void 0 && !snapshot.graph.has(STYLE_BLOCK_NAME)) {
|
|
2697
|
+
nameLabels(table, n, values);
|
|
2698
|
+
}
|
|
1765
2699
|
}
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
2700
|
+
}
|
|
2701
|
+
function bendsAtOrigin(snapshot, values) {
|
|
2702
|
+
const { bends } = values;
|
|
2703
|
+
const position = snapshot.nodes.byRole("position");
|
|
2704
|
+
if (bends === void 0 || position === null) {
|
|
1769
2705
|
return;
|
|
1770
2706
|
}
|
|
1771
|
-
const
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
let held = want.get(property);
|
|
1775
|
-
if (held === void 0) {
|
|
1776
|
-
held = resolveStyles(ex, target, property, snapshot);
|
|
1777
|
-
want.set(property, held);
|
|
1778
|
-
}
|
|
1779
|
-
return held;
|
|
2707
|
+
const center = (i) => {
|
|
2708
|
+
const v = position.isSet(i) ? position.value(i) : null;
|
|
2709
|
+
return v === null ? null : [v[0], v[1]];
|
|
1780
2710
|
};
|
|
1781
|
-
const
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
dialect,
|
|
1787
|
-
() => void 0
|
|
1788
|
-
)
|
|
1789
|
-
);
|
|
1790
|
-
const readBack = resolveCytoscapeBypasses(target, written, { notes: new StyleNotes() });
|
|
1791
|
-
for (const [property, native] of Object.entries(values)) {
|
|
1792
|
-
const back = readBack[property];
|
|
1793
|
-
if (native !== void 0 && back !== void 0) {
|
|
1794
|
-
values[property] = withBlockValues(native, back, exact(property));
|
|
2711
|
+
const { src, dst } = snapshot.edgeList();
|
|
2712
|
+
values.bends = bends.map((v, e) => {
|
|
2713
|
+
const [s, t] = [center(src[e]), center(dst[e])];
|
|
2714
|
+
if (typeof v !== "string" || s === null || t === null) {
|
|
2715
|
+
return v;
|
|
1795
2716
|
}
|
|
2717
|
+
const handles = v.trim().split(/\s+/).length;
|
|
2718
|
+
return canonBends(
|
|
2719
|
+
s,
|
|
2720
|
+
t,
|
|
2721
|
+
Array.from({ length: handles }, () => [0, 0]),
|
|
2722
|
+
false
|
|
2723
|
+
) ?? v;
|
|
2724
|
+
});
|
|
2725
|
+
}
|
|
2726
|
+
function nameLabels(table, n, values) {
|
|
2727
|
+
const label = table.byRole("label")?.meta.name ?? null;
|
|
2728
|
+
const text = (column, i) => {
|
|
2729
|
+
const v = column !== null && table.has(column) ? plainCell(table.value(column, i)) : null;
|
|
2730
|
+
return typeof v === "string" || typeof v === "number" ? String(v) : null;
|
|
2731
|
+
};
|
|
2732
|
+
const labels = Array.from({ length: n }, (_v, i) => text("name", i) ?? text(label, i));
|
|
2733
|
+
if (labels.some((v) => v !== null)) {
|
|
2734
|
+
values.label = labels;
|
|
1796
2735
|
}
|
|
1797
2736
|
}
|
|
1798
|
-
function
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
2737
|
+
function readXgmmlFileStyles(snapshot, context) {
|
|
2738
|
+
return readXgmmlStyles(snapshot, context, { tool: "cytoscape" });
|
|
2739
|
+
}
|
|
2740
|
+
function exactFromBlock(snapshot, target, values, dialect = "desktop", created) {
|
|
2741
|
+
const text = snapshot.graph.has(STYLE_BLOCK_NAME) ? plainCell(snapshot.graph.value(STYLE_BLOCK_NAME, 0)) : null;
|
|
2742
|
+
if (typeof text !== "string") {
|
|
2743
|
+
return;
|
|
1805
2744
|
}
|
|
1806
|
-
|
|
2745
|
+
takeFromBlock(snapshot, text, "xgmml", (t, block) => {
|
|
2746
|
+
if (t !== target) {
|
|
2747
|
+
return null;
|
|
2748
|
+
}
|
|
2749
|
+
const n = target === "node" ? snapshot.nodeCount : snapshot.edgeCount;
|
|
2750
|
+
const written = Array.from(
|
|
2751
|
+
{ length: n },
|
|
2752
|
+
(_v, i) => cytoscapeElementProperties(
|
|
2753
|
+
target,
|
|
2754
|
+
(property) => block(target, property)[i] ?? null,
|
|
2755
|
+
dialect,
|
|
2756
|
+
() => void 0
|
|
2757
|
+
)
|
|
2758
|
+
);
|
|
2759
|
+
const ends = target === "edge" ? {
|
|
2760
|
+
ends: {
|
|
2761
|
+
...edgeEnds(snapshot, {
|
|
2762
|
+
width: block("node", "width"),
|
|
2763
|
+
height: block("node", "height"),
|
|
2764
|
+
borderWidth: block("node", "borderWidth")
|
|
2765
|
+
}),
|
|
2766
|
+
...created === void 0 ? {} : { created }
|
|
2767
|
+
}
|
|
2768
|
+
} : {};
|
|
2769
|
+
const readBack = resolveCytoscapeBypasses(target, written, { notes: new StyleNotes(), ...ends });
|
|
2770
|
+
return {
|
|
2771
|
+
values,
|
|
2772
|
+
properties: Object.keys(values).filter((p) => values[p] !== void 0 && readBack[p] !== void 0),
|
|
2773
|
+
readBack: (i) => (property) => readBack[property]?.[i] ?? null,
|
|
2774
|
+
// a fan spacing, a curve or a loop's handles only desktop's fanning and looping give (graphty wrote none:
|
|
2775
|
+
// EDGE_CURVED defaults to true there) is graphty's own default again, and so is a label's place beside its
|
|
2776
|
+
// node, which desktop's anchors spell as an offset and a shift
|
|
2777
|
+
take: (property, wanted) => wanted !== null || BLOCK_DEFAULTED.has(property)
|
|
2778
|
+
};
|
|
2779
|
+
});
|
|
1807
2780
|
}
|
|
2781
|
+
const BLOCK_DEFAULTED = /* @__PURE__ */ new Set([
|
|
2782
|
+
"fanSpacing",
|
|
2783
|
+
"curved",
|
|
2784
|
+
"bends",
|
|
2785
|
+
"bendCurve",
|
|
2786
|
+
"labelOffsetX",
|
|
2787
|
+
"labelOffsetY",
|
|
2788
|
+
"labelShiftX",
|
|
2789
|
+
"labelShiftY"
|
|
2790
|
+
]);
|
|
1808
2791
|
function hiddenToVisible(table, column, n, values) {
|
|
1809
2792
|
if (column === null || !table.has(column)) {
|
|
1810
2793
|
return;
|
|
@@ -1820,6 +2803,82 @@ function hiddenToVisible(table, column, n, values) {
|
|
|
1820
2803
|
values.visible = visible;
|
|
1821
2804
|
}
|
|
1822
2805
|
}
|
|
2806
|
+
function hideGroupsCytoscapeHides(snapshot, values) {
|
|
2807
|
+
const parent = snapshot.nodes.byRole("parent");
|
|
2808
|
+
if (parent === null || snapshot.graph.has(STYLE_BLOCK_NAME)) {
|
|
2809
|
+
return;
|
|
2810
|
+
}
|
|
2811
|
+
const n = snapshot.nodeCount;
|
|
2812
|
+
const members = membersOf(parent, n);
|
|
2813
|
+
if (members.size === 0) {
|
|
2814
|
+
return;
|
|
2815
|
+
}
|
|
2816
|
+
const network = snapshot.meta.extra?.xgmml?.graphId;
|
|
2817
|
+
const visible = values.visible === void 0 ? new Array(n).fill(null) : [...values.visible];
|
|
2818
|
+
for (const [group, inside] of members) {
|
|
2819
|
+
if (!collapsedIn(snapshot, group, network)) {
|
|
2820
|
+
visible[group] = false;
|
|
2821
|
+
continue;
|
|
2822
|
+
}
|
|
2823
|
+
for (const i of insideAtAnyDepth(group, inside, members)) {
|
|
2824
|
+
visible[i] = false;
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
values.visible = visible;
|
|
2828
|
+
}
|
|
2829
|
+
function hideWhatCytoscapeHides(snapshot, target, nodes, values) {
|
|
2830
|
+
if (target === "node") {
|
|
2831
|
+
hideGroupsCytoscapeHides(snapshot, values);
|
|
2832
|
+
} else {
|
|
2833
|
+
hideEdgesOfHiddenNodes(snapshot, nodes, values);
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2836
|
+
function hideEdgesOfHiddenNodes(snapshot, nodes, values) {
|
|
2837
|
+
const shown = nodes.visible;
|
|
2838
|
+
if (shown === void 0 || !shown.includes(false) || snapshot.graph.has(STYLE_BLOCK_NAME)) {
|
|
2839
|
+
return;
|
|
2840
|
+
}
|
|
2841
|
+
const { src, dst } = snapshot.edgeList();
|
|
2842
|
+
const visible = values.visible === void 0 ? new Array(src.length).fill(null) : [...values.visible];
|
|
2843
|
+
for (let e = 0; e < src.length; e++) {
|
|
2844
|
+
if (shown[src[e]] === false || shown[dst[e]] === false) {
|
|
2845
|
+
visible[e] = false;
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
values.visible = visible;
|
|
2849
|
+
}
|
|
2850
|
+
function membersOf(parent, n) {
|
|
2851
|
+
const members = /* @__PURE__ */ new Map();
|
|
2852
|
+
for (let i = 0; i < n; i++) {
|
|
2853
|
+
const g = parent.isSet(i) ? plainCell(parent.value(i)) : null;
|
|
2854
|
+
if (typeof g === "number" && g !== i) {
|
|
2855
|
+
members.set(g, [...members.get(g) ?? [], i]);
|
|
2856
|
+
}
|
|
2857
|
+
}
|
|
2858
|
+
return members;
|
|
2859
|
+
}
|
|
2860
|
+
function insideAtAnyDepth(group, inside, members) {
|
|
2861
|
+
const stack = [...inside];
|
|
2862
|
+
const seen = /* @__PURE__ */ new Set([group]);
|
|
2863
|
+
const out = /* @__PURE__ */ new Set();
|
|
2864
|
+
for (let i = stack.pop(); i !== void 0; i = stack.pop()) {
|
|
2865
|
+
if (!seen.has(i)) {
|
|
2866
|
+
seen.add(i);
|
|
2867
|
+
out.add(i);
|
|
2868
|
+
stack.push(...members.get(i) ?? []);
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
return out;
|
|
2872
|
+
}
|
|
2873
|
+
function collapsedIn(snapshot, group, network) {
|
|
2874
|
+
if (typeof network !== "string" || !snapshot.nodes.has(SUBGRAPH_COLUMN)) {
|
|
2875
|
+
return false;
|
|
2876
|
+
}
|
|
2877
|
+
const sub = plainCell(snapshot.nodes.value(SUBGRAPH_COLUMN, group));
|
|
2878
|
+
const atts = sub !== null && typeof sub === "object" ? sub.atts : null;
|
|
2879
|
+
const collapsed = atts !== null && typeof atts === "object" ? atts["__groupCollapsed.SUID"] : null;
|
|
2880
|
+
return Array.isArray(collapsed) && collapsed.some((v) => String(v) === network);
|
|
2881
|
+
}
|
|
1823
2882
|
function nonEmpty(values) {
|
|
1824
2883
|
const out = {};
|
|
1825
2884
|
for (const [p, col] of Object.entries(values)) {
|
|
@@ -1829,22 +2888,30 @@ function nonEmpty(values) {
|
|
|
1829
2888
|
}
|
|
1830
2889
|
return out;
|
|
1831
2890
|
}
|
|
1832
|
-
function graphStyleOf(snapshot, notes) {
|
|
1833
|
-
const
|
|
1834
|
-
const
|
|
1835
|
-
|
|
1836
|
-
return {};
|
|
2891
|
+
function graphStyleOf(snapshot, notes, style) {
|
|
2892
|
+
const merged = emptyCytoscapeStyle();
|
|
2893
|
+
for (const [k, v] of style?.network.defaults ?? []) {
|
|
2894
|
+
merged.network.defaults.set(k, v);
|
|
1837
2895
|
}
|
|
1838
|
-
const
|
|
1839
|
-
|
|
1840
|
-
if (k.startsWith("NETWORK_")) {
|
|
1841
|
-
style.network.defaults.set(k, v);
|
|
1842
|
-
}
|
|
2896
|
+
for (const [k, v] of networkBypasses(snapshot, notes)) {
|
|
2897
|
+
merged.network.defaults.set(k, v);
|
|
1843
2898
|
}
|
|
1844
|
-
const background = cytoscapeBackground(
|
|
2899
|
+
const background = cytoscapeBackground(merged, notes);
|
|
1845
2900
|
return background === null ? {} : { background };
|
|
1846
2901
|
}
|
|
2902
|
+
function networkBypasses(snapshot, notes) {
|
|
2903
|
+
const name = graphicsColumnOf(snapshot.graph);
|
|
2904
|
+
const g = name === null ? null : plainCell(snapshot.graph.value(name, 0));
|
|
2905
|
+
if (g === null || typeof g !== "object" || Array.isArray(g)) {
|
|
2906
|
+
return [];
|
|
2907
|
+
}
|
|
2908
|
+
const locked = Object.hasOwn(g, "lockedVisualProperties") ? g.lockedVisualProperties : void 0;
|
|
2909
|
+
return [g, locked].flatMap(
|
|
2910
|
+
(layer) => [...normalizeVisualProperties("node", layer, notes)].filter(([k]) => k.startsWith("NETWORK_"))
|
|
2911
|
+
);
|
|
2912
|
+
}
|
|
1847
2913
|
const XGMML_STYLE_CAPABILITIES = Object.freeze({
|
|
2914
|
+
tool: "cytoscape",
|
|
1848
2915
|
node: Object.freeze(cytoscapeWritableProperties("node", "desktop")),
|
|
1849
2916
|
edge: Object.freeze(cytoscapeWritableProperties("edge", "desktop")),
|
|
1850
2917
|
graph: Object.freeze(["background"]),
|
|
@@ -1945,27 +3012,83 @@ function bypassesOf(table, n, namespace) {
|
|
|
1945
3012
|
}
|
|
1946
3013
|
return { maps, names: columns.map((c) => c.meta.name) };
|
|
1947
3014
|
}
|
|
1948
|
-
function
|
|
3015
|
+
function fitMappingsToColumns(style, target, table, read) {
|
|
3016
|
+
const { notes } = read;
|
|
3017
|
+
sharedColumnFallback(style[target], (column) => table.has(column));
|
|
3018
|
+
if (target === "edge") {
|
|
3019
|
+
weightColumnFallback(style.edge, read.weightFrom, table);
|
|
3020
|
+
}
|
|
3021
|
+
if (read.dialect !== "cx2") {
|
|
3022
|
+
dropMismatchedKeys(style[target], (column) => table.get(column)?.meta.origin?.type ?? null, notes, target);
|
|
3023
|
+
}
|
|
3024
|
+
for (const m of style[target].mappings.values()) {
|
|
3025
|
+
if (!table.has(m.column) && !(target === "edge" && read.weights !== null && m.column === read.weightFrom)) {
|
|
3026
|
+
notes.add(STYLE_ISSUE.MAPPING_COLUMN_MISSING, target, m.column, { sample: m.kind });
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3030
|
+
function keptWeights(snapshot, weightFrom) {
|
|
3031
|
+
if (weightFrom === null || snapshot.edges.has(weightFrom) || snapshot.edges.byRole("weight") !== null) {
|
|
3032
|
+
return null;
|
|
3033
|
+
}
|
|
3034
|
+
const weights = explicitWeights(snapshot);
|
|
3035
|
+
return weights.weighted ? weights : null;
|
|
3036
|
+
}
|
|
3037
|
+
function javaHashOrder(ids) {
|
|
3038
|
+
const keys = ids.map((k) => typeof k === "string" && /^\d{1,15}$/.test(k) ? Number(k) : k);
|
|
3039
|
+
if (!keys.every((k) => typeof k === "number" && Number.isSafeInteger(k) && k >= 0)) {
|
|
3040
|
+
return null;
|
|
3041
|
+
}
|
|
3042
|
+
let capacity = 16;
|
|
3043
|
+
while (keys.length > 0.75 * capacity) {
|
|
3044
|
+
capacity *= 2;
|
|
3045
|
+
}
|
|
3046
|
+
const bucket = (k) => {
|
|
3047
|
+
const h = (k % 2 ** 32 ^ Math.floor(k / 2 ** 32)) >>> 0;
|
|
3048
|
+
return (h ^ h >>> 16) & capacity - 1;
|
|
3049
|
+
};
|
|
3050
|
+
const order = keys.map((_, i) => i).sort((a, b) => bucket(keys[a]) - bucket(keys[b]) || a - b);
|
|
3051
|
+
const rank = new Array(keys.length);
|
|
3052
|
+
order.forEach((i, r) => {
|
|
3053
|
+
rank[i] = r;
|
|
3054
|
+
});
|
|
3055
|
+
return rank;
|
|
3056
|
+
}
|
|
3057
|
+
function hashCreationOrder(snapshot) {
|
|
3058
|
+
const ids = snapshot.edges.byRole("id");
|
|
3059
|
+
if (ids === null) {
|
|
3060
|
+
return null;
|
|
3061
|
+
}
|
|
3062
|
+
const node = javaHashOrder(Array.from({ length: snapshot.nodeCount }, (_, i) => snapshot.ids.idOf(i)));
|
|
3063
|
+
const edge = javaHashOrder(Array.from({ length: snapshot.edgeCount }, (_, i) => ids.value(i)));
|
|
3064
|
+
return node === null || edge === null ? null : { node, edge };
|
|
3065
|
+
}
|
|
3066
|
+
function readDeclaredStyles(snapshot, context, style, namespace, notes, dialect = "desktop", read = {}) {
|
|
3067
|
+
const weightFrom = read.weightFrom ?? null;
|
|
3068
|
+
const created = read.hashOrder === true ? hashCreationOrder(snapshot) ?? void 0 : void 0;
|
|
1949
3069
|
const out = { node: { values: {} }, edge: { values: {} } };
|
|
1950
3070
|
const readFrom = { node: [], edge: [] };
|
|
1951
3071
|
for (const target of ["node", "edge"]) {
|
|
1952
3072
|
context.signal?.throwIfAborted();
|
|
1953
3073
|
const table = target === "node" ? snapshot.nodes : snapshot.edges;
|
|
1954
3074
|
const n = target === "node" ? snapshot.nodeCount : snapshot.edgeCount;
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
notes.add(STYLE_ISSUE.MAPPING_COLUMN_MISSING, target, m.column, { sample: m.kind });
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
3075
|
+
const weights = target === "edge" ? keptWeights(snapshot, weightFrom) : null;
|
|
3076
|
+
fitMappingsToColumns(style, target, table, { notes, dialect, weightFrom, weights });
|
|
1960
3077
|
const { maps, names } = bypassesOf(table, n, namespace);
|
|
1961
3078
|
readFrom[target] = names;
|
|
1962
3079
|
const elements = {
|
|
1963
3080
|
count: n,
|
|
1964
|
-
value: (column, i) =>
|
|
1965
|
-
|
|
3081
|
+
value: (column, i) => {
|
|
3082
|
+
if (weights !== null && column === weightFrom) {
|
|
3083
|
+
return weights.isExplicit(i) ? weights.value(i) : null;
|
|
3084
|
+
}
|
|
3085
|
+
return table.has(column) ? plainCell(table.value(column, i)) : null;
|
|
3086
|
+
},
|
|
3087
|
+
bypasses: maps,
|
|
3088
|
+
...target === "edge" ? { ends: { ...edgeEnds(snapshot, out.node.values), ...created === void 0 ? {} : { created } } } : {}
|
|
1966
3089
|
};
|
|
1967
3090
|
const values = resolveCytoscape(target, style, elements, { notes, budget: context.budget });
|
|
1968
|
-
exactFromBlock(snapshot, target, values, dialect);
|
|
3091
|
+
exactFromBlock(snapshot, target, values, dialect, created);
|
|
1969
3092
|
const { rules, columns } = cytoscapeRules(target, style, elements, { notes, budget: context.budget });
|
|
1970
3093
|
out[target] = { values: nonEmpty(values), rules, columns };
|
|
1971
3094
|
}
|
|
@@ -1993,10 +3116,14 @@ function readCxStyles(snapshot, context) {
|
|
|
1993
3116
|
count: otherViews
|
|
1994
3117
|
});
|
|
1995
3118
|
}
|
|
1996
|
-
return readDeclaredStyles(snapshot, context, style, "cx.bypass", notes
|
|
3119
|
+
return readDeclaredStyles(snapshot, context, style, "cx.bypass", notes, "desktop", {
|
|
3120
|
+
weightFrom: kept?.weightFrom ?? null,
|
|
3121
|
+
hashOrder: kept?.collection !== true
|
|
3122
|
+
});
|
|
1997
3123
|
}
|
|
1998
3124
|
function cytoscapeWriteCapabilities(dialect) {
|
|
1999
3125
|
return Object.freeze({
|
|
3126
|
+
tool: "cytoscape",
|
|
2000
3127
|
node: Object.freeze(cytoscapeWritableProperties("node", dialect)),
|
|
2001
3128
|
edge: Object.freeze(cytoscapeWritableProperties("edge", dialect)),
|
|
2002
3129
|
graph: Object.freeze(["background"]),
|
|
@@ -2046,9 +3173,10 @@ function withMappedColumns(snapshot, styled) {
|
|
|
2046
3173
|
return out;
|
|
2047
3174
|
}
|
|
2048
3175
|
export {
|
|
3176
|
+
exactFromBlock as $,
|
|
2049
3177
|
EXTENSIONS as A,
|
|
2050
3178
|
emitCytoscapeStyle as B,
|
|
2051
|
-
|
|
3179
|
+
CX_STYLE_CAPABILITIES as C,
|
|
2052
3180
|
lossOf as D,
|
|
2053
3181
|
EDGE_ID_COLUMN as E,
|
|
2054
3182
|
FORMAT as F,
|
|
@@ -2056,40 +3184,44 @@ export {
|
|
|
2056
3184
|
cytoscapeVizmapXml as H,
|
|
2057
3185
|
INTERACTION_COLUMN as I,
|
|
2058
3186
|
readXgmmlStyles as J,
|
|
2059
|
-
|
|
3187
|
+
weightColumnFallback as K,
|
|
2060
3188
|
LABEL_COLUMN as L,
|
|
2061
3189
|
META_KEY as M,
|
|
2062
3190
|
NESTED_NETWORK_COLUMN as N,
|
|
2063
|
-
|
|
3191
|
+
graphStyleOf as O,
|
|
2064
3192
|
POSITION_COLUMN as P,
|
|
2065
|
-
|
|
2066
|
-
|
|
3193
|
+
emptyCytoscapeStyle as Q,
|
|
3194
|
+
sharedColumnFallback as R,
|
|
2067
3195
|
SUBGRAPH_COLUMN as S,
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
3196
|
+
dropMismatchedKeys as T,
|
|
3197
|
+
edgeEnds as U,
|
|
3198
|
+
graphicsBypasses as V,
|
|
3199
|
+
resolveCytoscape as W,
|
|
2072
3200
|
XGMML_ISSUE as X,
|
|
2073
|
-
|
|
3201
|
+
hiddenToVisible as Y,
|
|
2074
3202
|
Z_COLUMN as Z,
|
|
3203
|
+
hideWhatCytoscapeHides as _,
|
|
2075
3204
|
XGMML_LOSS as a,
|
|
2076
|
-
|
|
3205
|
+
cytoscapeRules as a0,
|
|
3206
|
+
nonEmpty as a1,
|
|
3207
|
+
typedKey as a2,
|
|
3208
|
+
blockAspect as b,
|
|
2077
3209
|
cytoscapeStyledExport as c,
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
3210
|
+
cytoscapeCxAspect as d,
|
|
3211
|
+
cytoscapeCx2Aspects as e,
|
|
3212
|
+
styledGraphicsNotes as f,
|
|
3213
|
+
XGMML_STYLE_CAPABILITIES as g,
|
|
3214
|
+
XLINK_NAMESPACE as h,
|
|
3215
|
+
CY_NAMESPACE as i,
|
|
3216
|
+
XGMML_NAMESPACE as j,
|
|
3217
|
+
styledGraphGraphics as k,
|
|
3218
|
+
styledGraphics as l,
|
|
3219
|
+
PARENT_COLUMN as m,
|
|
3220
|
+
PARENTS_COLUMN as n,
|
|
3221
|
+
NETWORK_POINTER_COLUMN as o,
|
|
3222
|
+
NETWORKS_COLUMN as p,
|
|
3223
|
+
XGMML_ORIGIN_NAMESPACE as q,
|
|
3224
|
+
CYTOSCAPE_ORIGIN_NAMESPACE as r,
|
|
2093
3225
|
snapshotBlock as s,
|
|
2094
3226
|
readCxStyles as t,
|
|
2095
3227
|
blockOfAspect as u,
|
|
@@ -2099,4 +3231,4 @@ export {
|
|
|
2099
3231
|
readXgmmlFileStyles as y,
|
|
2100
3232
|
MIME_TYPES as z
|
|
2101
3233
|
};
|
|
2102
|
-
//# sourceMappingURL=styles-
|
|
3234
|
+
//# sourceMappingURL=styles-CCs214_3.js.map
|