@graphty/graph-io 0.3.11 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/dist/chunks/{importer-9PxhqH4v.js → importer-CXEiicAN.js} +4 -1
- package/dist/chunks/{importer-9PxhqH4v.js.map → importer-CXEiicAN.js.map} +1 -1
- package/dist/chunks/{importer-C3HcYWAn.js → importer-D7ZcGCeb.js} +16 -6
- package/dist/chunks/importer-D7ZcGCeb.js.map +1 -0
- package/dist/dot.js +1 -1
- package/dist/gexf.js +4 -0
- package/dist/gexf.js.map +1 -1
- package/dist/gml.js +15 -3
- package/dist/gml.js.map +1 -1
- package/dist/graph-io.js +4 -4
- package/dist/graphml.js +1 -1
- package/dist/src/formats/dot/importer.d.ts +5 -0
- package/dist/src/formats/dot/importer.d.ts.map +1 -1
- package/dist/src/formats/dot/importer.js +11 -5
- package/dist/src/formats/dot/importer.js.map +1 -1
- package/dist/src/formats/gexf/importer.d.ts.map +1 -1
- package/dist/src/formats/gexf/importer.js +8 -1
- package/dist/src/formats/gexf/importer.js.map +1 -1
- package/dist/src/formats/gml/importer.d.ts +1 -1
- package/dist/src/formats/gml/importer.d.ts.map +1 -1
- package/dist/src/formats/gml/importer.js +13 -3
- package/dist/src/formats/gml/importer.js.map +1 -1
- package/dist/src/formats/graphml/importer.d.ts.map +1 -1
- package/dist/src/formats/graphml/importer.js +5 -0
- package/dist/src/formats/graphml/importer.js.map +1 -1
- package/package.json +2 -2
- package/src/formats/dot/importer.ts +25 -4
- package/src/formats/gexf/importer.ts +9 -1
- package/src/formats/gml/importer.ts +18 -3
- package/src/formats/graphml/importer.ts +5 -0
- package/dist/chunks/importer-C3HcYWAn.js.map +0 -1
package/README.md
CHANGED
|
@@ -194,10 +194,15 @@ losses and format rules, in addition to the table:
|
|
|
194
194
|
numbers inside them (GML cannot keep int versus real inside a record). The spec's node ids are
|
|
195
195
|
integers; a string id is imported under the `ids` rule with one `W_GML_STRING_ID` per file, and
|
|
196
196
|
the exporter writes integers only (`sanitizeIds: "mangle"` renumbers and keeps the original in `graphty_originalId`); column names
|
|
197
|
-
outside `[A-Za-z][0-9A-Za-z_]*` are refused or mangled (`sanitizeKeys`).
|
|
197
|
+
outside `[A-Za-z][0-9A-Za-z_]*` are refused or mangled (`sanitizeKeys`). A `directed` or
|
|
198
|
+
`multigraph` flag written as a quoted integer (`directed "1"`) is read as that integer with a
|
|
199
|
+
`W_GML_FLAG_VALUE` warning. The `directed` key's value as the file wrote it is kept in
|
|
200
|
+
`meta.extra.gml.directed` (absent when the file has no `directed` key), so a reader can tell
|
|
201
|
+
`directed 0` from a file that relies on the specification's default.
|
|
198
202
|
- **DOT**: a Graphviz-faithful parser (grammar violations are fatal, as in Graphviz); clusters are
|
|
199
203
|
container nodes with the `parent` role; ports are kept; HTML strings keep their brackets; `pos`
|
|
200
|
-
maps to the position role
|
|
204
|
+
maps to the position role (and a trailing `!` to `pin`) unless `positions: false` keeps it as the
|
|
205
|
+
text the file wrote, like any other attribute. Mixed direction is folded per `onMixedDirection`; a text with a
|
|
201
206
|
backslash before a quote or a line break, or at its end, cannot be written (`E_DOT_TRAILING_BACKSLASH`: Graphviz's
|
|
202
207
|
scanner consumes backslash pairs, so such a text has no quoted spelling).
|
|
203
208
|
- **Pajek**: `*Vertices N` bounds the id space (ids 1..N; a 0-based file is detected and reported;
|
|
@@ -3294,6 +3294,9 @@ function resolveYfiles(options) {
|
|
|
3294
3294
|
}
|
|
3295
3295
|
function sniffGraphml(head) {
|
|
3296
3296
|
const text2 = new TextDecoder("utf-8", { fatal: false }).decode(head.subarray(0, SNIFF_BYTES));
|
|
3297
|
+
if (!/^\uFEFF?\s*</.test(text2)) {
|
|
3298
|
+
return 0;
|
|
3299
|
+
}
|
|
3297
3300
|
const root = text2.indexOf("<graphml");
|
|
3298
3301
|
if (root >= 0) {
|
|
3299
3302
|
return text2.includes(GRAPHML_NAMESPACE, root) ? 1 : 0.9;
|
|
@@ -3332,4 +3335,4 @@ export {
|
|
|
3332
3335
|
graphmlImporter as b,
|
|
3333
3336
|
graphmlExporter as g
|
|
3334
3337
|
};
|
|
3335
|
-
//# sourceMappingURL=importer-
|
|
3338
|
+
//# sourceMappingURL=importer-CXEiicAN.js.map
|