From 0d9328b9e5587e1a00606d4f0390680d44bef020 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 8 Feb 2024 22:21:56 -0800 Subject: [PATCH 001/109] fix nested connection implicit delete --- ci/release/changelogs/next.md | 1 + d2compiler/compile_test.go | 11 + d2ir/d2ir.go | 17 +- .../delete-nested-connection.exp.json | 265 ++++++++++++++++++ 4 files changed, 289 insertions(+), 5 deletions(-) create mode 100644 testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.exp.json diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 2d39449f0..f3a19c971 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -4,4 +4,5 @@ #### Bugfixes ⛑️ +- Fixes `null` being set on a nested shape not working in certain cases when connections also pointed to that shape [1830](https://github.com/terrastruct/d2/pull/1830) - Fixes edge case of bad import syntax crashing using d2 as a library [1829](https://github.com/terrastruct/d2/pull/1829) diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index c74398934..8e2304049 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -3239,6 +3239,17 @@ y: null assert.Equal(t, 0, len(g.Edges)) }, }, + { + name: "delete-nested-connection", + run: func(t *testing.T) { + g, _ := assertCompile(t, ` +a -> b.c +b.c: null +`, "") + assert.Equal(t, 2, len(g.Objects)) + assert.Equal(t, 0, len(g.Edges)) + }, + }, { name: "delete-multiple-connections", run: func(t *testing.T) { diff --git a/d2ir/d2ir.go b/d2ir/d2ir.go index 5a21c549e..227fa69f9 100644 --- a/d2ir/d2ir.go +++ b/d2ir/d2ir.go @@ -950,13 +950,20 @@ func (m *Map) DeleteField(ida ...string) *Field { } if len(rest) == 0 { for _, fr := range f.References { - for _, e := range m.Edges { - for _, er := range e.References { - if er.Context_ == fr.Context_ { - m.DeleteEdge(e.ID) - break + currM := m + for currM != nil { + for _, e := range currM.Edges { + for _, er := range e.References { + if er.Context_ == fr.Context_ { + currM.DeleteEdge(e.ID) + break + } } } + if NodeBoardKind(currM) != "" { + break + } + currM = ParentMap(currM) } } m.Fields = append(m.Fields[:i], m.Fields[i+1:]...) diff --git a/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.exp.json b/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.exp.json new file mode 100644 index 000000000..ab4289ac1 --- /dev/null +++ b/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.exp.json @@ -0,0 +1,265 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,0:0:0-3:0:20", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:0:1-1:8:9", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:0:1-1:8:9", + "src": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:0:1-1:1:2", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:0:1-1:1:2", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:5:6-1:8:9", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:5:6-1:6:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:7:8-1:8:9", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,2:0:10-2:9:19", + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,2:0:10-2:3:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,2:0:10-2:1:11", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,2:2:12-2:3:13", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "null": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,2:5:15-2:9:19" + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:0:1-1:1:2", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:0:1-1:1:2", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:5:6-1:8:9", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:5:6-1:6:7", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,1:7:8-1:8:9", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,2:0:10-2:3:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,2:0:10-2:1:11", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/nulls/implicit/delete-nested-connection.d2,2:2:12-2:3:13", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": null +} From 3129df1c02465c2357124ea70bd5433f1481f848 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 9 Feb 2024 10:34:25 -0800 Subject: [PATCH 002/109] fix deleting imported edge --- d2oracle/edit.go | 77 ++-- d2oracle/edit_test.go | 28 ++ d2oracle/get.go | 12 +- .../d2oracle/TestDelete/import/3.exp.json | 203 +++++++++++ testdata/d2oracle/TestSet/import/9.exp.json | 336 ++++++++++++++++++ 5 files changed, 620 insertions(+), 36 deletions(-) create mode 100644 testdata/d2oracle/TestDelete/import/3.exp.json create mode 100644 testdata/d2oracle/TestSet/import/9.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 076e5d6ea..339f56a32 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -383,7 +383,7 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) break } obj = o - imported = IsImported(baseAST, obj) + imported = IsImportedObj(baseAST, obj) var maybeNewScope *d2ast.Map if baseAST != g.AST || imported { @@ -476,6 +476,7 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) appendMapKey(scope, mk) return nil } + // TODO what if the edge is imported, how does this work? var ok bool edge, ok = obj.HasEdge(mk) if !ok { @@ -868,45 +869,52 @@ func Delete(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, return g, nil } - refs := e.References - if len(boardPath) > 0 { - refs := getWriteableEdgeRefs(e, baseAST) - if len(refs) != len(e.References) { - mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) - } - } + imported := IsImportedEdge(baseAST, e) - if _, ok := mk.Value.Unbox().(*d2ast.Null); !ok { - ref := refs[0] - var refEdges []*d2ast.Edge - for _, ref := range refs { - refEdges = append(refEdges, ref.Edge) - } - ensureNode(g, refEdges, ref.ScopeObj, ref.Scope, ref.MapKey, ref.MapKey.Edges[ref.MapKeyEdgeIndex].Src, true) - ensureNode(g, refEdges, ref.ScopeObj, ref.Scope, ref.MapKey, ref.MapKey.Edges[ref.MapKeyEdgeIndex].Dst, false) - - for i := len(e.References) - 1; i >= 0; i-- { - ref := e.References[i] - deleteEdge(g, ref.Scope, ref.MapKey, ref.MapKeyEdgeIndex) + if imported { + mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) + appendMapKey(baseAST, mk) + } else { + refs := e.References + if len(boardPath) > 0 { + refs := getWriteableEdgeRefs(e, baseAST) + if len(refs) != len(e.References) { + mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) + } } - edges, ok := obj.FindEdges(mk) - if ok { - for _, e2 := range edges { - if e2.Index <= e.Index { - continue - } - for i := len(e2.References) - 1; i >= 0; i-- { - ref := e2.References[i] - if ref.MapKey.EdgeIndex != nil { - *ref.MapKey.EdgeIndex.Int-- + if _, ok := mk.Value.Unbox().(*d2ast.Null); !ok { + ref := refs[0] + var refEdges []*d2ast.Edge + for _, ref := range refs { + refEdges = append(refEdges, ref.Edge) + } + ensureNode(g, refEdges, ref.ScopeObj, ref.Scope, ref.MapKey, ref.MapKey.Edges[ref.MapKeyEdgeIndex].Src, true) + ensureNode(g, refEdges, ref.ScopeObj, ref.Scope, ref.MapKey, ref.MapKey.Edges[ref.MapKeyEdgeIndex].Dst, false) + + for i := len(e.References) - 1; i >= 0; i-- { + ref := e.References[i] + deleteEdge(g, ref.Scope, ref.MapKey, ref.MapKeyEdgeIndex) + } + + edges, ok := obj.FindEdges(mk) + if ok { + for _, e2 := range edges { + if e2.Index <= e.Index { + continue + } + for i := len(e2.References) - 1; i >= 0; i-- { + ref := e2.References[i] + if ref.MapKey.EdgeIndex != nil { + *ref.MapKey.EdgeIndex.Int-- + } } } } + } else { + // NOTE: it only needs to be after the last ref, but perhaps simplest and cleanest to append all nulls at the end + appendMapKey(baseAST, mk) } - } else { - // NOTE: it only needs to be after the last ref, but perhaps simplest and cleanest to append all nulls at the end - appendMapKey(baseAST, mk) } if len(boardPath) > 0 { replaced := ReplaceBoardNode(g.AST, baseAST, boardPath) @@ -925,10 +933,9 @@ func Delete(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, return g, nil } - imported := IsImported(baseAST, obj) + imported := IsImportedObj(baseAST, obj) if imported { - println(d2format.Format(boardG.AST)) mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) appendMapKey(baseAST, mk) } else { diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 198cc83dc..452488f16 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -2171,6 +2171,20 @@ layers: { b.style.fill: red } } +`, + }, + { + name: "import/9", + + text: `...@yo +`, + fsTexts: map[string]string{ + "yo.d2": `a -> b`, + }, + key: `(a -> b).style.stroke`, + value: go2.Pointer(`red`), + exp: `...@yo +(a -> b).style.stroke: red `, }, } @@ -7205,6 +7219,20 @@ scenarios: { x: null } } +`, + }, + { + name: "import/3", + + text: `...@meow +`, + fsTexts: map[string]string{ + "meow.d2": `a -> b +`, + }, + key: `(a -> b)[0]`, + exp: `...@meow +(a -> b)[0]: null `, }, } diff --git a/d2oracle/get.go b/d2oracle/get.go index 6e5721ee8..c33a46597 100644 --- a/d2oracle/get.go +++ b/d2oracle/get.go @@ -140,7 +140,7 @@ func GetParentID(g *d2graph.Graph, boardPath []string, absID string) (string, er return obj.Parent.AbsID(), nil } -func IsImported(ast *d2ast.Map, obj *d2graph.Object) bool { +func IsImportedObj(ast *d2ast.Map, obj *d2graph.Object) bool { for _, ref := range obj.References { if ref.Key.Range.Path != ast.Range.Path { return true @@ -150,6 +150,16 @@ func IsImported(ast *d2ast.Map, obj *d2graph.Object) bool { return false } +func IsImportedEdge(ast *d2ast.Map, edge *d2graph.Edge) bool { + for _, ref := range edge.References { + if ref.Edge.Range.Path != ast.Range.Path { + return true + } + } + + return false +} + func GetObj(g *d2graph.Graph, boardPath []string, absID string) *d2graph.Object { g = GetBoardGraph(g, boardPath) if g == nil { diff --git a/testdata/d2oracle/TestDelete/import/3.exp.json b/testdata/d2oracle/TestDelete/import/3.exp.json new file mode 100644 index 000000000..90559179d --- /dev/null +++ b/testdata/d2oracle/TestDelete/import/3.exp.json @@ -0,0 +1,203 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "index.d2,0:0:0-2:0:27", + "nodes": [ + { + "import": { + "range": "index.d2,0:0:0-0:8:8", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:8:8", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + } + }, + { + "map_key": { + "range": "index.d2,1:0:9-1:17:26", + "edges": [ + { + "range": "index.d2,1:1:10-1:7:16", + "src": { + "range": "index.d2,1:1:10-1:2:11", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:1:10-1:2:11", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "index.d2,1:6:15-1:7:16", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:6:15-1:7:16", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "index.d2,1:8:17-1:11:20", + "int": 0, + "glob": false + }, + "primary": {}, + "value": { + "null": { + "range": "index.d2,1:13:22-1:17:26" + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "meow.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "meow.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "meow.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "meow.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/import/9.exp.json b/testdata/d2oracle/TestSet/import/9.exp.json new file mode 100644 index 000000000..98c4629b6 --- /dev/null +++ b/testdata/d2oracle/TestSet/import/9.exp.json @@ -0,0 +1,336 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "index.d2,0:0:0-2:0:34", + "nodes": [ + { + "import": { + "range": "index.d2,0:0:0-0:6:6", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:6:6", + "value": [ + { + "string": "yo", + "raw_string": "yo" + } + ] + } + } + ] + } + }, + { + "map_key": { + "range": "index.d2,1:0:7-1:26:33", + "edges": [ + { + "range": "index.d2,1:1:8-1:7:14", + "src": { + "range": "index.d2,1:1:8-1:2:9", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:1:8-1:2:9", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "index.d2,1:6:13-1:7:14", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:6:13-1:7:14", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_key": { + "range": "index.d2,1:9:16-1:21:28", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:9:16-1:14:21", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,1:15:22-1:21:28", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "index.d2,1:23:30-1:26:33", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "index": 1, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "red" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "yo.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "yo.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "index.d2,1:1:8-1:2:9", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:1:8-1:2:9", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "yo.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "yo.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "index.d2,1:6:13-1:7:14", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:6:13-1:7:14", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 706951b85b497e59dddd324ef6243ca610363848 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 9 Feb 2024 11:49:25 -0800 Subject: [PATCH 003/109] fix d2oracle.set on imported edge --- d2oracle/edit.go | 4 +- d2oracle/edit_test.go | 4 +- testdata/d2oracle/TestSet/import/9.exp.json | 44 ++++++--------------- 3 files changed, 15 insertions(+), 37 deletions(-) diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 339f56a32..71fa327dd 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -476,14 +476,14 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) appendMapKey(scope, mk) return nil } - // TODO what if the edge is imported, how does this work? var ok bool edge, ok = obj.HasEdge(mk) if !ok { return errors.New("edge not found") } + imported = IsImportedEdge(baseAST, edge) refs := edge.References - if baseAST != g.AST { + if baseAST != g.AST || imported { refs = getWriteableEdgeRefs(edge, baseAST) } onlyInChain := true diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 452488f16..ab0737e38 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -2181,10 +2181,10 @@ layers: { fsTexts: map[string]string{ "yo.d2": `a -> b`, }, - key: `(a -> b).style.stroke`, + key: `(a -> b)[0].style.stroke`, value: go2.Pointer(`red`), exp: `...@yo -(a -> b).style.stroke: red +(a -> b)[0].style.stroke: red `, }, } diff --git a/testdata/d2oracle/TestSet/import/9.exp.json b/testdata/d2oracle/TestSet/import/9.exp.json index 98c4629b6..3c942e675 100644 --- a/testdata/d2oracle/TestSet/import/9.exp.json +++ b/testdata/d2oracle/TestSet/import/9.exp.json @@ -3,7 +3,7 @@ "name": "", "isFolderOnly": false, "ast": { - "range": "index.d2,0:0:0-2:0:34", + "range": "index.d2,0:0:0-2:0:37", "nodes": [ { "import": { @@ -27,7 +27,7 @@ }, { "map_key": { - "range": "index.d2,1:0:7-1:26:33", + "range": "index.d2,1:0:7-1:29:36", "edges": [ { "range": "index.d2,1:1:8-1:7:14", @@ -67,12 +67,17 @@ "dst_arrow": ">" } ], + "edge_index": { + "range": "index.d2,1:8:15-1:11:18", + "int": 0, + "glob": false + }, "edge_key": { - "range": "index.d2,1:9:16-1:21:28", + "range": "index.d2,1:12:19-1:24:31", "path": [ { "unquoted_string": { - "range": "index.d2,1:9:16-1:14:21", + "range": "index.d2,1:12:19-1:17:24", "value": [ { "string": "style", @@ -83,7 +88,7 @@ }, { "unquoted_string": { - "range": "index.d2,1:15:22-1:21:28", + "range": "index.d2,1:18:25-1:24:31", "value": [ { "string": "stroke", @@ -97,7 +102,7 @@ "primary": {}, "value": { "unquoted_string": { - "range": "index.d2,1:23:30-1:26:33", + "range": "index.d2,1:26:33-1:29:36", "value": [ { "string": "red", @@ -142,34 +147,7 @@ "references": [ { "map_key_edge_index": 0 - } - ], - "attributes": { - "label": { - "value": "" }, - "labelDimensions": { - "width": 0, - "height": 0 - }, - "style": {}, - "near_key": null, - "shape": { - "value": "" - }, - "direction": { - "value": "" - }, - "constraint": null - }, - "zIndex": 0 - }, - { - "index": 1, - "isCurve": false, - "src_arrow": false, - "dst_arrow": true, - "references": [ { "map_key_edge_index": 0 } From 994a67de14d7c5737fc849a7b402f35d4cb83a04 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sat, 10 Feb 2024 10:43:43 -0800 Subject: [PATCH 004/109] fix deleting imported attributes --- d2oracle/edit.go | 38 ++- d2oracle/edit_test.go | 44 ++++ .../d2oracle/TestDelete/import/4.exp.json | 183 +++++++++++++++ .../d2oracle/TestDelete/import/5.exp.json | 219 ++++++++++++++++++ .../d2oracle/TestDelete/import/6.exp.json | 216 +++++++++++++++++ 5 files changed, 690 insertions(+), 10 deletions(-) create mode 100644 testdata/d2oracle/TestDelete/import/4.exp.json create mode 100644 testdata/d2oracle/TestDelete/import/5.exp.json create mode 100644 testdata/d2oracle/TestDelete/import/6.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 71fa327dd..0a7746c66 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -847,7 +847,7 @@ func Delete(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, baseAST = boardG.BaseAST } - g2, err := deleteReserved(g, mk) + g2, err := deleteReserved(g, baseAST, mk) if err != nil { return nil, err } @@ -1185,7 +1185,7 @@ func renameConflictsToParent(g *d2graph.Graph, key *d2ast.KeyPath) (*d2graph.Gra return g, nil } -func deleteReserved(g *d2graph.Graph, mk *d2ast.Key) (*d2graph.Graph, error) { +func deleteReserved(g *d2graph.Graph, baseAST *d2ast.Map, mk *d2ast.Key) (*d2graph.Graph, error) { targetKey := mk.Key if len(mk.Edges) == 1 { if mk.EdgeKey == nil { @@ -1212,14 +1212,21 @@ func deleteReserved(g *d2graph.Graph, mk *d2ast.Key) (*d2graph.Graph, error) { if !ok { return g, nil } + imported := IsImportedEdge(baseAST, e) - if err := deleteEdgeField(g, e, targetKey.Path[len(targetKey.Path)-1].Unbox().ScalarString()); err != nil { - return nil, err + if imported { + mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) + appendMapKey(baseAST, mk) + } else { + if err := deleteEdgeField(g, e, targetKey.Path[len(targetKey.Path)-1].Unbox().ScalarString()); err != nil { + return nil, err + } } return recompile(g) } isStyleKey := false + imported := false for _, id := range d2graph.Key(targetKey) { _, ok := d2graph.ReservedKeywords[id] if ok { @@ -1228,9 +1235,14 @@ func deleteReserved(g *d2graph.Graph, mk *d2ast.Key) (*d2graph.Graph, error) { continue } if isStyleKey { - err := deleteObjField(g, obj, id) - if err != nil { - return nil, err + if imported { + mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) + appendMapKey(baseAST, mk) + } else { + err := deleteObjField(g, obj, id) + if err != nil { + return nil, err + } } } @@ -1242,9 +1254,14 @@ func deleteReserved(g *d2graph.Graph, mk *d2ast.Key) (*d2graph.Graph, error) { id == "left" || id == "top" || id == "link" { - err := deleteObjField(g, obj, id) - if err != nil { - return nil, err + if imported { + mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) + appendMapKey(baseAST, mk) + } else { + err := deleteObjField(g, obj, id) + if err != nil { + return nil, err + } } } break @@ -1253,6 +1270,7 @@ func deleteReserved(g *d2graph.Graph, mk *d2ast.Key) (*d2graph.Graph, error) { if !ok { return nil, fmt.Errorf("object not found") } + imported = IsImportedObj(baseAST, obj) } return recompile(g) diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index ab0737e38..c6fa04950 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -7233,6 +7233,50 @@ scenarios: { key: `(a -> b)[0]`, exp: `...@meow (a -> b)[0]: null +`, + }, + { + name: "import/4", + + text: `...@meow +`, + fsTexts: map[string]string{ + "meow.d2": `a.link: https://google.com +`, + }, + key: `a.link`, + exp: `...@meow +a.link: null +`, + }, + { + name: "import/5", + + text: `...@meow +`, + fsTexts: map[string]string{ + "meow.d2": `a -> b: { + target-arrowhead: 1 +} +`, + }, + key: `(a -> b)[0].target-arrowhead`, + exp: `...@meow +(a -> b)[0].target-arrowhead: null +`, + }, + { + name: "import/6", + + text: `...@meow +`, + fsTexts: map[string]string{ + "meow.d2": `a.style.fill: red +`, + }, + key: `a.style.fill`, + exp: `...@meow +a.style.fill: null `, }, } diff --git a/testdata/d2oracle/TestDelete/import/4.exp.json b/testdata/d2oracle/TestDelete/import/4.exp.json new file mode 100644 index 000000000..5b7c67fb5 --- /dev/null +++ b/testdata/d2oracle/TestDelete/import/4.exp.json @@ -0,0 +1,183 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "index.d2,0:0:0-2:0:22", + "nodes": [ + { + "import": { + "range": "index.d2,0:0:0-0:8:8", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:8:8", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + } + }, + { + "map_key": { + "range": "index.d2,1:0:9-1:12:21", + "key": { + "range": "index.d2,1:0:9-1:6:15", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:0:9-1:1:10", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,1:2:11-1:6:15", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "null": { + "range": "index.d2,1:8:17-1:12:21" + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "meow.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "meow.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "meow.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "index.d2,1:0:9-1:6:15", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:0:9-1:1:10", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,1:2:11-1:6:15", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestDelete/import/5.exp.json b/testdata/d2oracle/TestDelete/import/5.exp.json new file mode 100644 index 000000000..b0315b772 --- /dev/null +++ b/testdata/d2oracle/TestDelete/import/5.exp.json @@ -0,0 +1,219 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "index.d2,0:0:0-2:0:44", + "nodes": [ + { + "import": { + "range": "index.d2,0:0:0-0:8:8", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:8:8", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + } + }, + { + "map_key": { + "range": "index.d2,1:0:9-1:34:43", + "edges": [ + { + "range": "index.d2,1:1:10-1:7:16", + "src": { + "range": "index.d2,1:1:10-1:2:11", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:1:10-1:2:11", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "index.d2,1:6:15-1:7:16", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:6:15-1:7:16", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "index.d2,1:8:17-1:11:20", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "index.d2,1:12:21-1:28:37", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:12:21-1:28:37", + "value": [ + { + "string": "target-arrowhead", + "raw_string": "target-arrowhead" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "null": { + "range": "index.d2,1:30:39-1:34:43" + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "meow.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "meow.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "meow.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "meow.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestDelete/import/6.exp.json b/testdata/d2oracle/TestDelete/import/6.exp.json new file mode 100644 index 000000000..24ad58cdf --- /dev/null +++ b/testdata/d2oracle/TestDelete/import/6.exp.json @@ -0,0 +1,216 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "index.d2,0:0:0-2:0:28", + "nodes": [ + { + "import": { + "range": "index.d2,0:0:0-0:8:8", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:8:8", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + } + }, + { + "map_key": { + "range": "index.d2,1:0:9-1:18:27", + "key": { + "range": "index.d2,1:0:9-1:12:21", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:0:9-1:1:10", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,1:2:11-1:7:16", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,1:8:17-1:12:21", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "null": { + "range": "index.d2,1:14:23-1:18:27" + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "meow.d2,0:0:0-0:12:12", + "path": [ + { + "unquoted_string": { + "range": "meow.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "meow.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "meow.d2,0:8:8-0:12:12", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "index.d2,1:0:9-1:12:21", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:0:9-1:1:10", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,1:2:11-1:7:16", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "index.d2,1:8:17-1:12:21", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 77aa38b0efe5d97f9c5f9c6af119edeb7ea44c0c Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 14 Feb 2024 14:18:50 -0800 Subject: [PATCH 005/109] fix label near setting --- d2oracle/edit.go | 17 +- d2oracle/edit_test.go | 70 +++++++ .../d2oracle/TestSet/label-near/1.exp.json | 159 +++++++++++++++ .../d2oracle/TestSet/label-near/2.exp.json | 163 +++++++++++++++ .../d2oracle/TestSet/label-near/3.exp.json | 159 +++++++++++++++ .../d2oracle/TestSet/label-near/4.exp.json | 187 ++++++++++++++++++ .../d2oracle/TestSet/label-near/5.exp.json | 187 ++++++++++++++++++ 7 files changed, 939 insertions(+), 3 deletions(-) create mode 100644 testdata/d2oracle/TestSet/label-near/1.exp.json create mode 100644 testdata/d2oracle/TestSet/label-near/2.exp.json create mode 100644 testdata/d2oracle/TestSet/label-near/3.exp.json create mode 100644 testdata/d2oracle/TestSet/label-near/4.exp.json create mode 100644 testdata/d2oracle/TestSet/label-near/5.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 0a7746c66..859b4281d 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -771,9 +771,20 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) } } case "label": - if inlined(&attrs.Label) { - attrs.Label.MapKey.SetScalar(mk.Value.ScalarBox()) - return nil + if len(mk.Key.Path[reservedIndex:]) > 1 { + reservedTargetKey = mk.Key.Path[reservedIndex+1].Unbox().ScalarString() + switch reservedTargetKey { + case "near": + if inlined(attrs.LabelPosition) { + attrs.LabelPosition.MapKey.SetScalar(mk.Value.ScalarBox()) + return nil + } + } + } else { + if inlined(&attrs.Label) { + attrs.Label.MapKey.SetScalar(mk.Value.ScalarBox()) + return nil + } } } } diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index c6fa04950..f7068decc 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -2185,6 +2185,76 @@ layers: { value: go2.Pointer(`red`), exp: `...@yo (a -> b)[0].style.stroke: red +`, + }, + { + name: "label-near/1", + + text: `x +`, + key: `x.label.near`, + value: go2.Pointer(`bottom-right`), + exp: `x: {label.near: bottom-right} +`, + }, + { + name: "label-near/2", + + text: `x.label.near: bottom-left +`, + key: `x.label.near`, + value: go2.Pointer(`bottom-right`), + exp: `x.label.near: bottom-right +`, + }, + { + name: "label-near/3", + + text: `x: { + label.near: bottom-left +} +`, + key: `x.label.near`, + value: go2.Pointer(`bottom-right`), + exp: `x: { + label.near: bottom-right +} +`, + }, + { + name: "label-near/4", + + text: `x: { + label: hi { + near: bottom-left + } +} +`, + key: `x.label.near`, + value: go2.Pointer(`bottom-right`), + exp: `x: { + label: hi { + near: bottom-right + } +} +`, + }, + { + name: "label-near/5", + + text: `x: hi { + label: { + near: bottom-left + } +} +`, + key: `x.label.near`, + value: go2.Pointer(`bottom-right`), + exp: `x: hi { + label: { + near: bottom-right + } +} `, }, } diff --git a/testdata/d2oracle/TestSet/label-near/1.exp.json b/testdata/d2oracle/TestSet/label-near/1.exp.json new file mode 100644 index 000000000..5a4b9b691 --- /dev/null +++ b/testdata/d2oracle/TestSet/label-near/1.exp.json @@ -0,0 +1,159 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:0:0-1:0:30", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:0:0-0:29:29", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:3:3-0:29:29", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:4:4-0:28:28", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:4:4-0:14:14", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:4:4-0:9:9", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:10:10-0:14:14", + "value": [ + { + "string": "near", + "raw_string": "near" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:16:16-0:28:28", + "value": [ + { + "string": "bottom-right", + "raw_string": "bottom-right" + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/1.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null, + "labelPosition": { + "value": "bottom-right" + } + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/label-near/2.exp.json b/testdata/d2oracle/TestSet/label-near/2.exp.json new file mode 100644 index 000000000..2352d151b --- /dev/null +++ b/testdata/d2oracle/TestSet/label-near/2.exp.json @@ -0,0 +1,163 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:0:0-1:0:27", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:0:0-0:26:26", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:0:0-0:12:12", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:8:8-0:12:12", + "value": [ + { + "string": "near", + "raw_string": "near" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:14:14-0:26:26", + "value": [ + { + "string": "bottom-right", + "raw_string": "bottom-right" + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:0:0-0:12:12", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/2.d2,0:8:8-0:12:12", + "value": [ + { + "string": "near", + "raw_string": "near" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null, + "labelPosition": { + "value": "bottom-right" + } + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/label-near/3.exp.json b/testdata/d2oracle/TestSet/label-near/3.exp.json new file mode 100644 index 000000000..1a3e49305 --- /dev/null +++ b/testdata/d2oracle/TestSet/label-near/3.exp.json @@ -0,0 +1,159 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,0:0:0-3:0:34", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,0:0:0-2:1:33", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,0:3:3-2:1:33", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,1:2:7-1:26:31", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,1:2:7-1:12:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,1:2:7-1:7:12", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,1:8:13-1:12:17", + "value": [ + { + "string": "near", + "raw_string": "near" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,1:14:19-1:26:31", + "value": [ + { + "string": "bottom-right", + "raw_string": "bottom-right" + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/3.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null, + "labelPosition": { + "value": "bottom-right" + } + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/label-near/4.exp.json b/testdata/d2oracle/TestSet/label-near/4.exp.json new file mode 100644 index 000000000..b259afc2c --- /dev/null +++ b/testdata/d2oracle/TestSet/label-near/4.exp.json @@ -0,0 +1,187 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,0:0:0-5:0:48", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,0:0:0-4:1:47", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,0:3:3-4:1:47", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,1:2:7-3:3:45", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,1:2:7-1:7:12", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,1:2:7-1:7:12", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,1:9:14-1:11:16", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + }, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,1:12:17-3:3:45", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,2:4:23-2:22:41", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,2:4:23-2:8:27", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,2:4:23-2:8:27", + "value": [ + { + "string": "near", + "raw_string": "near" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,2:10:29-2:22:41", + "value": [ + { + "string": "bottom-right", + "raw_string": "bottom-right" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/4.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "hi" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null, + "labelPosition": { + "value": "bottom-right" + } + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/label-near/5.exp.json b/testdata/d2oracle/TestSet/label-near/5.exp.json new file mode 100644 index 000000000..ab5708901 --- /dev/null +++ b/testdata/d2oracle/TestSet/label-near/5.exp.json @@ -0,0 +1,187 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,0:0:0-5:0:48", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,0:0:0-4:1:47", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,0:3:3-0:5:5", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + }, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,0:6:6-4:1:47", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,1:2:10-3:3:45", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,1:2:10-1:7:15", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,1:2:10-1:7:15", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,1:9:17-3:3:45", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,2:4:23-2:22:41", + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,2:4:23-2:8:27", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,2:4:23-2:8:27", + "value": [ + { + "string": "near", + "raw_string": "near" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,2:10:29-2:22:41", + "value": [ + { + "string": "bottom-right", + "raw_string": "bottom-right" + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/label-near/5.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "hi" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null, + "labelPosition": { + "value": "bottom-right" + } + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 4db1f721345c1210ba53c2d2bcfe4c33e3855f14 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 14 Feb 2024 16:46:47 -0800 Subject: [PATCH 006/109] allow underlines for connections --- ci/release/changelogs/next.md | 6 +- d2exporter/export.go | 3 + d2renderers/d2svg/d2svg.go | 3 + e2etests/testdata/txtar.txt | 6 + .../connection-underline/dagre/board.exp.json | 178 ++++++++++++++++++ .../connection-underline/dagre/sketch.exp.svg | 107 +++++++++++ .../connection-underline/elk/board.exp.json | 169 +++++++++++++++++ .../connection-underline/elk/sketch.exp.svg | 107 +++++++++++ 8 files changed, 577 insertions(+), 2 deletions(-) create mode 100644 e2etests/testdata/txtar/connection-underline/dagre/board.exp.json create mode 100644 e2etests/testdata/txtar/connection-underline/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/connection-underline/elk/board.exp.json create mode 100644 e2etests/testdata/txtar/connection-underline/elk/sketch.exp.svg diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index f3a19c971..d0bb47702 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -1,8 +1,10 @@ #### Features 🚀 +- `style.underline` works on connections [#1836](https://github.com/terrastruct/d2/pull/1836) + #### Improvements 🧹 #### Bugfixes ⛑️ -- Fixes `null` being set on a nested shape not working in certain cases when connections also pointed to that shape [1830](https://github.com/terrastruct/d2/pull/1830) -- Fixes edge case of bad import syntax crashing using d2 as a library [1829](https://github.com/terrastruct/d2/pull/1829) +- Fixes `null` being set on a nested shape not working in certain cases when connections also pointed to that shape [#1830](https://github.com/terrastruct/d2/pull/1830) +- Fixes edge case of bad import syntax crashing using d2 as a library [#1829](https://github.com/terrastruct/d2/pull/1829) diff --git a/d2exporter/export.go b/d2exporter/export.go index 6c25d5b8f..d01147af9 100644 --- a/d2exporter/export.go +++ b/d2exporter/export.go @@ -345,6 +345,9 @@ func toConnection(edge *d2graph.Edge, theme *d2themes.Theme) d2target.Connection if edge.Style.Bold != nil { connection.Bold, _ = strconv.ParseBool(edge.Style.Bold.Value) } + if edge.Style.Underline != nil { + connection.Underline, _ = strconv.ParseBool(edge.Style.Underline.Value) + } if theme != nil && theme.SpecialRules.Mono { connection.FontFamily = "mono" } diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 68e2f1852..41674e125 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -588,6 +588,9 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co } else if connection.Italic { fontClass += "-italic" } + if connection.Underline { + fontClass += " text-underline" + } if connection.Fill != color.Empty { rectEl := d2themes.NewThemableElement("rect") rectEl.X, rectEl.Y = labelTL.X, labelTL.Y diff --git a/e2etests/testdata/txtar.txt b/e2etests/testdata/txtar.txt index fc009ca2b..cdcdb0557 100644 --- a/e2etests/testdata/txtar.txt +++ b/e2etests/testdata/txtar.txt @@ -164,3 +164,9 @@ monsters: { } costumes.monster -> monsters.id + +-- connection-underline -- + +a -> b: hi { + style.underline: true +} diff --git a/e2etests/testdata/txtar/connection-underline/dagre/board.exp.json b/e2etests/testdata/txtar/connection-underline/dagre/board.exp.json new file mode 100644 index 000000000..93d7d24b3 --- /dev/null +++ b/e2etests/testdata/txtar/connection-underline/dagre/board.exp.json @@ -0,0 +1,178 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 0, + "y": 0 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 0, + "y": 187 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a -> b)[0]", + "src": "a", + "srcArrow": "none", + "dst": "b", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "hi", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": true, + "labelWidth": 13, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 26.5, + "y": 65.5 + }, + { + "x": 26.5, + "y": 114.30000305175781 + }, + { + "x": 26.5, + "y": 138.6999969482422 + }, + { + "x": 26.5, + "y": 187.5 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/connection-underline/dagre/sketch.exp.svg b/e2etests/testdata/txtar/connection-underline/dagre/sketch.exp.svg new file mode 100644 index 000000000..c830546b7 --- /dev/null +++ b/e2etests/testdata/txtar/connection-underline/dagre/sketch.exp.svg @@ -0,0 +1,107 @@ +ab hi + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/connection-underline/elk/board.exp.json b/e2etests/testdata/txtar/connection-underline/elk/board.exp.json new file mode 100644 index 000000000..a1cde3b44 --- /dev/null +++ b/e2etests/testdata/txtar/connection-underline/elk/board.exp.json @@ -0,0 +1,169 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 12, + "y": 239 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a -> b)[0]", + "src": "a", + "srcArrow": "none", + "dst": "b", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "hi", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": true, + "labelWidth": 13, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 38.5, + "y": 78 + }, + { + "x": 38.5, + "y": 239 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/connection-underline/elk/sketch.exp.svg b/e2etests/testdata/txtar/connection-underline/elk/sketch.exp.svg new file mode 100644 index 000000000..c9917bd07 --- /dev/null +++ b/e2etests/testdata/txtar/connection-underline/elk/sketch.exp.svg @@ -0,0 +1,107 @@ +ab hi + + + + + \ No newline at end of file From 3563b15933e1799cfda4605a89238aee590255c6 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 14 Feb 2024 17:59:34 -0800 Subject: [PATCH 007/109] no inheriting label --- ci/release/changelogs/next.md | 2 + d2compiler/compile_test.go | 16 ++ d2ir/compile.go | 3 + .../boards/no-inherit-label.exp.json | 255 ++++++++++++++++++ 4 files changed, 276 insertions(+) create mode 100644 testdata/d2compiler/TestCompile2/boards/no-inherit-label.exp.json diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index d0bb47702..dc7a43bea 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -4,6 +4,8 @@ #### Improvements 🧹 +- Boards no longer inherit `label` fields from parents. [#1838](https://github.com/terrastruct/d2/pull/1838) + #### Bugfixes ⛑️ - Fixes `null` being set on a nested shape not working in certain cases when connections also pointed to that shape [#1830](https://github.com/terrastruct/d2/pull/1830) diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index 8e2304049..e14aacc03 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -2991,6 +2991,22 @@ steps: { assert.True(t, g.IsFolderOnly) }, }, + { + name: "no-inherit-label", + run: func(t *testing.T) { + g, _ := assertCompile(t, ` +label: hi + +steps: { + 1: { + RJ + } +} +`, "") + assert.True(t, g.Root.Label.MapKey != nil) + assert.True(t, g.Steps[0].Root.Label.MapKey == nil) + }, + }, { name: "scenarios_edge_index", run: func(t *testing.T) { diff --git a/d2ir/compile.go b/d2ir/compile.go index 37d3445a9..c3e05f4fc 100644 --- a/d2ir/compile.go +++ b/d2ir/compile.go @@ -361,6 +361,9 @@ func (c *compiler) overlay(base *Map, f *Field) { return } base = base.CopyBase(f) + // Certain fields should never carry forward. + // If you give your scenario a label, you don't want all steps in a scenario to be labeled the same. + base.DeleteField("label") OverlayMap(base, f.Map()) f.Composite = base } diff --git a/testdata/d2compiler/TestCompile2/boards/no-inherit-label.exp.json b/testdata/d2compiler/TestCompile2/boards/no-inherit-label.exp.json new file mode 100644 index 000000000..bfffea2c7 --- /dev/null +++ b/testdata/d2compiler/TestCompile2/boards/no-inherit-label.exp.json @@ -0,0 +1,255 @@ +{ + "graph": { + "name": "", + "isFolderOnly": true, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,0:0:0-8:0:41", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,1:0:1-1:9:10", + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,1:0:1-1:5:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,1:0:1-1:5:6", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,1:7:8-1:9:10", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,3:0:12-7:1:40", + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,3:0:12-3:5:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,3:0:12-3:5:17", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,3:7:19-7:1:40", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,4:2:23-6:3:38", + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,4:2:23-4:3:24", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,4:2:23-4:3:24", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,4:5:26-6:3:38", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,5:4:32-5:6:34", + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,5:4:32-5:6:34", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,5:4:32-5:6:34", + "value": [ + { + "string": "RJ", + "raw_string": "RJ" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "hi" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": null, + "steps": [ + { + "name": "1", + "isFolderOnly": false, + "ast": { + "range": ",1:0:0-2:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "RJ" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "RJ", + "id_val": "RJ", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,5:4:32-5:6:34", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/boards/no-inherit-label.d2,5:4:32-5:6:34", + "value": [ + { + "string": "RJ", + "raw_string": "RJ" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "RJ" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + } + ] + }, + "err": null +} From 277b1ac3f5112abeab8750806b689ee893494406 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 23 Feb 2024 12:12:42 -0800 Subject: [PATCH 008/109] test name flag --- e2etests/report/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2etests/report/main.go b/e2etests/report/main.go index 481cc9fd1..50aa97b40 100644 --- a/e2etests/report/main.go +++ b/e2etests/report/main.go @@ -37,9 +37,11 @@ func main() { vFlag := false testCaseFlag := "" testSetFlag := "" + testNameFlag := "" cpuProfileFlag := false memProfileFlag := false flag.BoolVar(&deltaFlag, "delta", false, "Generate the report only for cases that changed.") + flag.StringVar(&testNameFlag, "test-name", "E2E", "Name of e2e tests. Defaults to E2E") flag.StringVar(&testSetFlag, "test-set", "", "Only run set of tests matching this string. e.g. regressions") flag.StringVar(&testCaseFlag, "test-case", "", "Only run tests matching this string. e.g. all_shapes") flag.BoolVar(&cpuProfileFlag, "cpuprofile", false, "Profile test cpu usage. `go tool pprof out/cpu.prof`") @@ -52,7 +54,7 @@ func main() { if vFlag { vString = "-v" } - testMatchString := fmt.Sprintf("-run=TestE2E/%s/%s", testSetFlag, testCaseFlag) + testMatchString := fmt.Sprintf("-run=Test%s/%s/%s", testNameFlag, testSetFlag, testCaseFlag) cpuProfileStr := "" if cpuProfileFlag { From c8fcd11cd437c0b417828bf23d13c86bde2da5cf Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 26 Feb 2024 17:52:25 -0800 Subject: [PATCH 009/109] fix arrowhead fill --- d2oracle/edit.go | 4 +- d2oracle/edit_test.go | 44 +++ .../TestSet/edge-arrowhead-filled/1.exp.json | 283 ++++++++++++++ .../TestSet/edge-arrowhead-filled/2.exp.json | 344 ++++++++++++++++++ .../TestSet/edge-arrowhead-filled/3.exp.json | 327 +++++++++++++++++ 5 files changed, 1000 insertions(+), 2 deletions(-) create mode 100644 testdata/d2oracle/TestSet/edge-arrowhead-filled/1.exp.json create mode 100644 testdata/d2oracle/TestSet/edge-arrowhead-filled/2.exp.json create mode 100644 testdata/d2oracle/TestSet/edge-arrowhead-filled/3.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 859b4281d..a395443ca 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -653,8 +653,8 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) } if arrowhead != nil { if reservedTargetKey == "" { - if len(mk.Key.Path[reservedIndex:]) != 2 { - return errors.New("malformed style setting, expected 2 part path") + if len(mk.Key.Path[reservedIndex:]) < 2 { + return errors.New("malformed style setting, expected >= 2 part path") } reservedTargetKey = mk.Key.Path[reservedIndex+1].Unbox().ScalarString() } diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index f7068decc..dd0dc054d 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -1518,6 +1518,50 @@ a.b -> a.c: {style.animated: true} value: go2.Pointer(`diamond`), exp: `x -> y: {target-arrowhead.shape: diamond} +`, + }, + { + name: "edge-arrowhead-filled/1", + text: `x -> y +`, + key: `(x -> y)[0].target-arrowhead.style.filled`, + value: go2.Pointer(`true`), + + exp: `x -> y: {target-arrowhead.style.filled: true} +`, + }, + { + name: "edge-arrowhead-filled/2", + text: `x -> y: { + target-arrowhead: * { + shape: diamond + } +} +`, + key: `(x -> y)[0].target-arrowhead.style.filled`, + value: go2.Pointer(`true`), + + exp: `x -> y: { + target-arrowhead: * { + shape: diamond + style.filled: true + } +} +`, + }, + { + name: "edge-arrowhead-filled/3", + text: `x -> y: { + target-arrowhead.shape: diamond +} +`, + key: `(x -> y)[0].target-arrowhead.style.filled`, + value: go2.Pointer(`true`), + + exp: `x -> y: { + target-arrowhead.shape: diamond + target-arrowhead.style.filled: true +} `, }, { diff --git a/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.exp.json b/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.exp.json new file mode 100644 index 000000000..6414372f0 --- /dev/null +++ b/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.exp.json @@ -0,0 +1,283 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:0:0-1:0:46", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:0:0-0:45:45", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:0:0-0:6:6", + "src": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:8:8-0:45:45", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:9:9-0:44:44", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:9:9-0:38:38", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:9:9-0:25:25", + "value": [ + { + "string": "target-arrowhead", + "raw_string": "target-arrowhead" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:26:26-0:31:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:32:32-0:38:38", + "value": [ + { + "string": "filled", + "raw_string": "filled" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "boolean": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:40:40-0:44:44", + "value": true + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "dstArrowhead": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "filled": { + "value": "true" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "y", + "id_val": "y", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/1.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "y" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.exp.json b/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.exp.json new file mode 100644 index 000000000..dd24e2e43 --- /dev/null +++ b/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.exp.json @@ -0,0 +1,344 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:0:0-6:0:82", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:0:0-5:1:81", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:0:0-0:6:6", + "src": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:8:8-5:1:81", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,1:2:12-4:3:79", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,1:2:12-1:18:28", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,1:2:12-1:18:28", + "value": [ + { + "string": "target-arrowhead", + "raw_string": "target-arrowhead" + } + ] + } + } + ] + }, + "primary": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,1:20:30-1:21:31", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ] + } + }, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,1:22:32-4:3:79", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,2:4:38-2:18:52", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,2:4:38-2:9:43", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,2:4:38-2:9:43", + "value": [ + { + "string": "shape", + "raw_string": "shape" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,2:11:45-2:18:52", + "value": [ + { + "string": "diamond", + "raw_string": "diamond" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,3:4:57-3:22:75", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,3:4:57-3:16:69", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,3:4:57-3:9:62", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,3:10:63-3:16:69", + "value": [ + { + "string": "filled", + "raw_string": "filled" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "boolean": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,3:18:71-3:22:75", + "value": true + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "dstArrowhead": { + "label": { + "value": "*" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "filled": { + "value": "true" + } + }, + "near_key": null, + "shape": { + "value": "diamond" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "y", + "id_val": "y", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/2.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "y" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.exp.json b/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.exp.json new file mode 100644 index 000000000..d6077911e --- /dev/null +++ b/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.exp.json @@ -0,0 +1,327 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:0:0-4:0:84", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:0:0-3:1:83", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:0:0-0:6:6", + "src": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:8:8-3:1:83", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,1:2:12-1:33:43", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,1:2:12-1:24:34", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,1:2:12-1:18:28", + "value": [ + { + "string": "target-arrowhead", + "raw_string": "target-arrowhead" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,1:19:29-1:24:34", + "value": [ + { + "string": "shape", + "raw_string": "shape" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,1:26:36-1:33:43", + "value": [ + { + "string": "diamond", + "raw_string": "diamond" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,2:2:46-2:37:81", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,2:2:46-2:31:75", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,2:2:46-2:18:62", + "value": [ + { + "string": "target-arrowhead", + "raw_string": "target-arrowhead" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,2:19:63-2:24:68", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,2:25:69-2:31:75", + "value": [ + { + "string": "filled", + "raw_string": "filled" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "boolean": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,2:33:77-2:37:81", + "value": true + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "dstArrowhead": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "filled": { + "value": "true" + } + }, + "near_key": null, + "shape": { + "value": "diamond" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "y", + "id_val": "y", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/3.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "y" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 9444a632eb82908e68f9db3935ab4a9658403100 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 26 Feb 2024 20:08:44 -0800 Subject: [PATCH 010/109] fix again --- d2oracle/edit.go | 12 + d2oracle/edit_test.go | 36 ++ .../TestSet/edge-arrowhead-filled/4.exp.json | 327 +++++++++++++++++ .../TestSet/edge-arrowhead-filled/5.exp.json | 345 ++++++++++++++++++ 4 files changed, 720 insertions(+) create mode 100644 testdata/d2oracle/TestSet/edge-arrowhead-filled/4.exp.json create mode 100644 testdata/d2oracle/TestSet/edge-arrowhead-filled/5.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index a395443ca..91f4ad597 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -647,8 +647,14 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) case "source-arrowhead", "target-arrowhead": var arrowhead *d2graph.Attributes if reservedKey == "source-arrowhead" { + if edge.SrcArrowhead != nil { + attrs = *edge.SrcArrowhead + } arrowhead = edge.SrcArrowhead } else { + if edge.DstArrowhead != nil { + attrs = *edge.DstArrowhead + } arrowhead = edge.DstArrowhead } if arrowhead != nil { @@ -669,6 +675,12 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) arrowhead.Label.MapKey.SetScalar(mk.Value.ScalarBox()) return nil } + case "style": + reservedTargetKey = mk.Key.Path[len(mk.Key.Path)-1].Unbox().ScalarString() + if inlined(attrs.Style.Filled) { + attrs.Style.Filled.MapKey.SetScalar(mk.Value.ScalarBox()) + return nil + } } } case "style": diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index dd0dc054d..5d963b80b 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -1562,6 +1562,42 @@ a.b -> a.c: {style.animated: true} target-arrowhead.shape: diamond target-arrowhead.style.filled: true } +`, + }, + { + name: "edge-arrowhead-filled/4", + text: `x -> y: { + target-arrowhead.shape: diamond + target-arrowhead.style.filled: true +} +`, + key: `(x -> y)[0].target-arrowhead.style.filled`, + value: go2.Pointer(`false`), + + exp: `x -> y: { + target-arrowhead.shape: diamond + target-arrowhead.style.filled: false +} +`, + }, + { + name: "edge-arrowhead-filled/5", + text: `x -> y: { + target-arrowhead.shape: diamond + target-arrowhead.style: { + filled: false + } +} +`, + key: `(x -> y)[0].target-arrowhead.style.filled`, + value: go2.Pointer(`true`), + + exp: `x -> y: { + target-arrowhead.shape: diamond + target-arrowhead.style: { + filled: true + } +} `, }, { diff --git a/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.exp.json b/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.exp.json new file mode 100644 index 000000000..cf40b23a1 --- /dev/null +++ b/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.exp.json @@ -0,0 +1,327 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:0:0-4:0:85", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:0:0-3:1:84", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:0:0-0:6:6", + "src": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:8:8-3:1:84", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,1:2:12-1:33:43", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,1:2:12-1:24:34", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,1:2:12-1:18:28", + "value": [ + { + "string": "target-arrowhead", + "raw_string": "target-arrowhead" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,1:19:29-1:24:34", + "value": [ + { + "string": "shape", + "raw_string": "shape" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,1:26:36-1:33:43", + "value": [ + { + "string": "diamond", + "raw_string": "diamond" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,2:2:46-2:38:82", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,2:2:46-2:31:75", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,2:2:46-2:18:62", + "value": [ + { + "string": "target-arrowhead", + "raw_string": "target-arrowhead" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,2:19:63-2:24:68", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,2:25:69-2:31:75", + "value": [ + { + "string": "filled", + "raw_string": "filled" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "boolean": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,2:33:77-2:38:82", + "value": false + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "dstArrowhead": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "filled": { + "value": "false" + } + }, + "near_key": null, + "shape": { + "value": "diamond" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "y", + "id_val": "y", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/4.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "y" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.exp.json b/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.exp.json new file mode 100644 index 000000000..9e5f0ae80 --- /dev/null +++ b/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.exp.json @@ -0,0 +1,345 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:0:0-6:0:95", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:0:0-5:1:94", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:0:0-0:6:6", + "src": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:8:8-5:1:94", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,1:2:12-1:33:43", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,1:2:12-1:24:34", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,1:2:12-1:18:28", + "value": [ + { + "string": "target-arrowhead", + "raw_string": "target-arrowhead" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,1:19:29-1:24:34", + "value": [ + { + "string": "shape", + "raw_string": "shape" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,1:26:36-1:33:43", + "value": [ + { + "string": "diamond", + "raw_string": "diamond" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,2:2:46-4:3:92", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,2:2:46-2:24:68", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,2:2:46-2:18:62", + "value": [ + { + "string": "target-arrowhead", + "raw_string": "target-arrowhead" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,2:19:63-2:24:68", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,2:26:70-4:3:92", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,3:4:76-3:16:88", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,3:4:76-3:10:82", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,3:4:76-3:10:82", + "value": [ + { + "string": "filled", + "raw_string": "filled" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "boolean": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,3:12:84-3:16:88", + "value": true + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "dstArrowhead": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "filled": { + "value": "true" + } + }, + "near_key": null, + "shape": { + "value": "diamond" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "y", + "id_val": "y", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-arrowhead-filled/5.d2,0:5:5-0:6:6", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "y" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 49a42edeec5a9fbb0ed698de41f03aacf73180da Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Tue, 27 Feb 2024 13:16:22 -0800 Subject: [PATCH 011/109] prevent near special --- ci/release/changelogs/next.md | 3 ++- d2compiler/compile.go | 8 ++++++++ d2compiler/compile_test.go | 11 +++++++++++ testdata/d2compiler/TestCompile/near_special.exp.json | 11 +++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 testdata/d2compiler/TestCompile/near_special.exp.json diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index dc7a43bea..94b2f7ad6 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -4,7 +4,8 @@ #### Improvements 🧹 -- Boards no longer inherit `label` fields from parents. [#1838](https://github.com/terrastruct/d2/pull/1838) +- Boards no longer inherit `label` fields from parents [#1838](https://github.com/terrastruct/d2/pull/1838) +- Prevents `near` targeting a child of a special object like grid cells, which wasn't doing anything [#1851](https://github.com/terrastruct/d2/pull/1851) #### Bugfixes ⛑️ diff --git a/d2compiler/compile.go b/d2compiler/compile.go index 5b314470f..9610ea6c3 100644 --- a/d2compiler/compile.go +++ b/d2compiler/compile.go @@ -1097,6 +1097,14 @@ func (c *compiler) validateNear(g *d2graph.Graph) { continue } } + if nearObj.ClosestGridDiagram() != nil { + c.errorf(obj.NearKey, "near keys cannot be set to descendants of special objects, like grid cells") + continue + } + if nearObj.OuterSequenceDiagram() != nil { + c.errorf(obj.NearKey, "near keys cannot be set to descendants of special objects, like sequence diagram actors") + continue + } } else if isConst { if obj.Parent != g.Root { c.errorf(obj.NearKey, "constant near keys can only be set on root level shapes") diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index e14aacc03..38d1fe051 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -1607,6 +1607,17 @@ d2/testdata/d2compiler/TestCompile/near-invalid.d2:14:9: near keys cannot be set `, expErr: `d2/testdata/d2compiler/TestCompile/near_bad_constant.d2:1:9: near key "txop-center" must be the absolute path to a shape or one of the following constants: top-left, top-center, top-right, center-left, center-right, bottom-left, bottom-center, bottom-right`, }, + { + name: "near_special", + + text: `x.near: z.x +z: { + grid-rows: 1 + x +} +`, + expErr: `d2/testdata/d2compiler/TestCompile/near_special.d2:1:9: near keys cannot be set to descendants of special objects, like grid cells`, + }, { name: "near_bad_connected", diff --git a/testdata/d2compiler/TestCompile/near_special.exp.json b/testdata/d2compiler/TestCompile/near_special.exp.json new file mode 100644 index 000000000..ac5aadb33 --- /dev/null +++ b/testdata/d2compiler/TestCompile/near_special.exp.json @@ -0,0 +1,11 @@ +{ + "graph": null, + "err": { + "errs": [ + { + "range": "d2/testdata/d2compiler/TestCompile/near_special.d2,0:8:8-0:11:11", + "errmsg": "d2/testdata/d2compiler/TestCompile/near_special.d2:1:9: near keys cannot be set to descendants of special objects, like grid cells" + } + ] + } +} From 113db2fc38dd635791aa68ba7fb35a23cc611680 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 4 Mar 2024 17:32:05 -0800 Subject: [PATCH 012/109] delete nested label/icon fields --- d2oracle/edit.go | 21 +++- d2oracle/edit_test.go | 18 +++ .../d2oracle/TestDelete/label-near.exp.json | 106 ++++++++++++++++++ .../d2oracle/TestDelete/label-near/1.exp.json | 106 ++++++++++++++++++ .../d2oracle/TestDelete/label-near/2.exp.json | 106 ++++++++++++++++++ 5 files changed, 352 insertions(+), 5 deletions(-) create mode 100644 testdata/d2oracle/TestDelete/label-near.exp.json create mode 100644 testdata/d2oracle/TestDelete/label-near/1.exp.json create mode 100644 testdata/d2oracle/TestDelete/label-near/2.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 91f4ad597..05c0df3b0 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -1248,16 +1248,23 @@ func deleteReserved(g *d2graph.Graph, baseAST *d2ast.Map, mk *d2ast.Key) (*d2gra return recompile(g) } - isStyleKey := false + isNestedKey := false imported := false - for _, id := range d2graph.Key(targetKey) { + parts := d2graph.Key(targetKey) + for i, id := range parts { _, ok := d2graph.ReservedKeywords[id] if ok { if id == "style" { - isStyleKey = true + isNestedKey = true continue } - if isStyleKey { + if id == "label" || id == "icon" { + if i < len(parts)-1 { + isNestedKey = true + continue + } + } + if isNestedKey { if imported { mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) appendMapKey(baseAST, mk) @@ -1306,6 +1313,8 @@ func deleteMapField(m *d2ast.Map, field string) { if n.MapKey.Key.Path[0].Unbox().ScalarString() == field { deleteFromMap(m, n.MapKey) } else if n.MapKey.Key.Path[0].Unbox().ScalarString() == "style" || + n.MapKey.Key.Path[0].Unbox().ScalarString() == "label" || + n.MapKey.Key.Path[0].Unbox().ScalarString() == "icon" || n.MapKey.Key.Path[0].Unbox().ScalarString() == "source-arrowhead" || n.MapKey.Key.Path[0].Unbox().ScalarString() == "target-arrowhead" { if n.MapKey.Value.Map != nil { @@ -1354,7 +1363,9 @@ func deleteObjField(g *d2graph.Graph, obj *d2graph.Object, field string) error { ref.Key.Path[len(ref.Key.Path)-2].Unbox().ScalarString() == obj.ID) || (len(ref.Key.Path) >= 3 && ref.Key.Path[len(ref.Key.Path)-1].Unbox().ScalarString() == field && - ref.Key.Path[len(ref.Key.Path)-2].Unbox().ScalarString() == "style" && + (ref.Key.Path[len(ref.Key.Path)-2].Unbox().ScalarString() == "style" || + ref.Key.Path[len(ref.Key.Path)-2].Unbox().ScalarString() == "label" || + ref.Key.Path[len(ref.Key.Path)-2].Unbox().ScalarString() == "icon") && ref.Key.Path[len(ref.Key.Path)-3].Unbox().ScalarString() == obj.ID) { tmpNodes := make([]d2ast.MapNodeBox, len(ref.Scope.Nodes)) copy(tmpNodes, ref.Scope.Nodes) diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 5d963b80b..15e816377 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -7427,6 +7427,24 @@ a.link: null key: `a.style.fill`, exp: `...@meow a.style.fill: null +`, + }, + { + name: "label-near/1", + + text: `yes: {label.near: center-center} +`, + key: `yes.label.near`, + exp: `yes +`, + }, + { + name: "label-near/2", + + text: `yes.label.near: center-center +`, + key: `yes.label.near`, + exp: `yes `, }, } diff --git a/testdata/d2oracle/TestDelete/label-near.exp.json b/testdata/d2oracle/TestDelete/label-near.exp.json new file mode 100644 index 000000000..5f1e33021 --- /dev/null +++ b/testdata/d2oracle/TestDelete/label-near.exp.json @@ -0,0 +1,106 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/label-near.d2,0:0:0-1:0:4", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near.d2,0:0:0-0:3:3", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/label-near.d2,0:0:0-0:3:3", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "yes", + "id_val": "yes", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/label-near.d2,0:0:0-0:3:3", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "yes" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestDelete/label-near/1.exp.json b/testdata/d2oracle/TestDelete/label-near/1.exp.json new file mode 100644 index 000000000..6243ba4b4 --- /dev/null +++ b/testdata/d2oracle/TestDelete/label-near/1.exp.json @@ -0,0 +1,106 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/1.d2,0:0:0-1:0:4", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/1.d2,0:0:0-0:3:3", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/1.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/1.d2,0:0:0-0:3:3", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "yes", + "id_val": "yes", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/1.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/1.d2,0:0:0-0:3:3", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "yes" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestDelete/label-near/2.exp.json b/testdata/d2oracle/TestDelete/label-near/2.exp.json new file mode 100644 index 000000000..9decfa8ed --- /dev/null +++ b/testdata/d2oracle/TestDelete/label-near/2.exp.json @@ -0,0 +1,106 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/2.d2,0:0:0-1:0:4", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/2.d2,0:0:0-0:3:3", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/2.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/2.d2,0:0:0-0:3:3", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "yes", + "id_val": "yes", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/2.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/label-near/2.d2,0:0:0-0:3:3", + "value": [ + { + "string": "yes", + "raw_string": "yes" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "yes" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 453c24388a9fd35897b65d0d5c5b8a22f6925040 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 4 Mar 2024 17:51:05 -0800 Subject: [PATCH 013/109] d2ir: fix glob applications on edges --- ci/release/changelogs/next.md | 1 + d2ast/d2ast.go | 1 + d2compiler/compile_test.go | 23 + d2ir/compile.go | 1 + d2ir/d2ir.go | 2 +- d2ir/filter_test.go | 15 + d2ir/import_test.go | 2 +- d2oracle/edit.go | 27 +- d2oracle/edit_test.go | 68 + d2oracle/get.go | 8 + .../TestCompile2/globs/override-edge.exp.json | 478 ++ .../globs/override-edge/1.exp.json | 403 ++ .../globs/override-edge/2.exp.json | 479 ++ .../d2ir/TestCompile/filters/edge.exp.json | 1365 ----- .../filters/label-filter/2.exp.json | 847 +-- .../filters/label-filter/3.exp.json | 941 ++++ .../patterns/alixander-review/6.exp.json | 483 -- .../patterns/edge-glob-index.exp.json | 4602 ----------------- .../patterns/glob-edge-glob-index.exp.json | 3822 -------------- .../TestDelete/connection-glob.exp.json | 312 ++ .../d2oracle/TestDelete/glob-child/1.exp.json | 212 + .../d2oracle/TestSet/glob-field/1.exp.json | 290 ++ .../d2oracle/TestSet/glob-field/2.exp.json | 479 ++ .../d2oracle/TestSet/glob-field/3.exp.json | 479 ++ 24 files changed, 4667 insertions(+), 10673 deletions(-) create mode 100644 testdata/d2compiler/TestCompile2/globs/override-edge.exp.json create mode 100644 testdata/d2compiler/TestCompile2/globs/override-edge/1.exp.json create mode 100644 testdata/d2compiler/TestCompile2/globs/override-edge/2.exp.json create mode 100644 testdata/d2ir/TestCompile/filters/label-filter/3.exp.json create mode 100644 testdata/d2oracle/TestDelete/connection-glob.exp.json create mode 100644 testdata/d2oracle/TestDelete/glob-child/1.exp.json create mode 100644 testdata/d2oracle/TestSet/glob-field/1.exp.json create mode 100644 testdata/d2oracle/TestSet/glob-field/2.exp.json create mode 100644 testdata/d2oracle/TestSet/glob-field/3.exp.json diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 94b2f7ad6..9a1c1d525 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -9,5 +9,6 @@ #### Bugfixes ⛑️ +- Fixes styles in connections not overriding styles set by globs [#1857](https://github.com/terrastruct/d2/pull/1857) - Fixes `null` being set on a nested shape not working in certain cases when connections also pointed to that shape [#1830](https://github.com/terrastruct/d2/pull/1830) - Fixes edge case of bad import syntax crashing using d2 as a library [#1829](https://github.com/terrastruct/d2/pull/1829) diff --git a/d2ast/d2ast.go b/d2ast/d2ast.go index 85a530c88..388997043 100644 --- a/d2ast/d2ast.go +++ b/d2ast/d2ast.go @@ -1025,6 +1025,7 @@ type EdgeIndex struct { } func (ei1 *EdgeIndex) Equals(ei2 *EdgeIndex) bool { + // TODO probably should be checking the values, but will wait until something breaks to change if ei1.Int != ei2.Int { return false } diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index 38d1fe051..ec746e839 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -4367,6 +4367,29 @@ container_2: { assert.Equal(t, 4, len(g.Objects)) }, }, + { + name: "override-edge/1", + run: func(t *testing.T) { + g, _ := assertCompile(t, ` +(* -> *)[*].style.stroke: red +(* -> *)[*].style.stroke: green +a -> b +`, ``) + assert.Equal(t, "green", g.Edges[0].Attributes.Style.Stroke.Value) + }, + }, + { + name: "override-edge/2", + run: func(t *testing.T) { + g, _ := assertCompile(t, ` +(* -> *)[*].style.stroke: red +a -> b: {style.stroke: green} +a -> b +`, ``) + assert.Equal(t, "green", g.Edges[0].Attributes.Style.Stroke.Value) + assert.Equal(t, "red", g.Edges[1].Attributes.Style.Stroke.Value) + }, + }, } for _, tc := range tca { diff --git a/d2ir/compile.go b/d2ir/compile.go index c3e05f4fc..bbbe60489 100644 --- a/d2ir/compile.go +++ b/d2ir/compile.go @@ -413,6 +413,7 @@ func (c *compiler) ampersandFilterMap(dst *Map, ast, scopeAST *d2ast.Map) bool { ks = d2format.Format(d2ast.MakeKeyPath(BoardIDA(dst))) } delete(gctx.appliedFields, ks) + delete(gctx.appliedEdges, ks) return false } } diff --git a/d2ir/d2ir.go b/d2ir/d2ir.go index 227fa69f9..c742a48f0 100644 --- a/d2ir/d2ir.go +++ b/d2ir/d2ir.go @@ -1094,7 +1094,7 @@ func (m *Map) getEdges(eid *EdgeID, refctx *RefContext, gctx *globContext, ea *[ } gctx.appliedEdges[ks] = struct{}{} } - *ea = append(*ea, ea2...) + *ea = append(*ea, e) } } } diff --git a/d2ir/filter_test.go b/d2ir/filter_test.go index 63375b816..06e926416 100644 --- a/d2ir/filter_test.go +++ b/d2ir/filter_test.go @@ -150,6 +150,21 @@ x -> y assertQuery(t, m, 0, 0, 0.1, "(x -> y)[1].style.opacity") }, }, + { + name: "label-filter/3", + run: func(t testing.TB) { + m, err := compile(t, ` +(* -> *)[*]: { + &label: hi + style.opacity: 0.1 +} + +x -> y: hi +`) + assert.Success(t, err) + assertQuery(t, m, 0, 0, 0.1, "(x -> y)[0].style.opacity") + }, + }, { name: "lazy-filter", run: func(t testing.TB) { diff --git a/d2ir/import_test.go b/d2ir/import_test.go index 81a3e3f50..d67f5950d 100644 --- a/d2ir/import_test.go +++ b/d2ir/import_test.go @@ -232,7 +232,7 @@ label: meow`, _, err := compileFS(t, "index.d2", map[string]string{ "index.d2": "...@'./../x.d2'", }) - assert.ErrorString(t, err, `index.d2:1:1: failed to import "../x.d2": stat ../x.d2: invalid argument`) + assert.ErrorString(t, err, `index.d2:1:1: failed to import "../x.d2": open ../x.d2: invalid argument`) }, }, { diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 05c0df3b0..6d3bea97f 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -497,16 +497,19 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) onlyInChain = false } } - // If a ref has an exact match on this key, just change the value - tmp1 := *ref.MapKey - tmp2 := *mk - noVal1 := &tmp1 - noVal2 := &tmp2 - noVal1.Value = d2ast.ValueBox{} - noVal2.Value = d2ast.ValueBox{} - if noVal1.D2OracleEquals(noVal2) { - ref.MapKey.Value = mk.Value - return nil + + if ref.MapKey.EdgeIndex == nil || !ref.MapKey.EdgeIndex.Glob { + // If a ref has an exact match on this key, just change the value + tmp1 := *ref.MapKey + tmp2 := *mk + noVal1 := &tmp1 + noVal2 := &tmp2 + noVal1.Value = d2ast.ValueBox{} + noVal2.Value = d2ast.ValueBox{} + if noVal1.D2OracleEquals(noVal2) { + ref.MapKey.Value = mk.Value + return nil + } } } if onlyInChain { @@ -575,6 +578,10 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) if s.MapKey.Range.Path != baseAST.Range.Path { return false } + // Globs are also not writeable + if s.MapKey.HasGlob() { + return false + } } return s != nil && s.MapKey != nil && !ir.InClass(s.MapKey) } diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 15e816377..a5743234d 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -2335,6 +2335,48 @@ layers: { near: bottom-right } } +`, + }, + { + name: "glob-field/1", + + text: `*.style.fill: red +a +b +`, + key: `a.style.fill`, + value: go2.Pointer(`blue`), + exp: `*.style.fill: red +a: {style.fill: blue} +b +`, + }, + { + name: "glob-field/2", + + text: `(* -> *)[*].style.stroke: red +a -> b +a -> b +`, + key: `(a -> b)[0].style.stroke`, + value: go2.Pointer(`blue`), + exp: `(* -> *)[*].style.stroke: red +a -> b: {style.stroke: blue} +a -> b +`, + }, + { + name: "glob-field/3", + + text: `(* -> *)[*].style.stroke: red +a -> b: {style.stroke: blue} +a -> b +`, + key: `(a -> b)[0].style.stroke`, + value: go2.Pointer(`green`), + exp: `(* -> *)[*].style.stroke: red +a -> b: {style.stroke: green} +a -> b `, }, } @@ -7445,6 +7487,32 @@ a.style.fill: null `, key: `yes.label.near`, exp: `yes +`, + }, + { + name: "connection-glob", + + text: `* -> * +a +b +`, + key: `(a -> b)[0]`, + exp: `* -> * +a +b +(a -> b)[0]: null +`, + }, + { + name: "glob-child/1", + + text: `*.b +a +`, + key: `a.b`, + exp: `*.b +a +a.b: null `, }, } diff --git a/d2oracle/get.go b/d2oracle/get.go index c33a46597..6b8b2e259 100644 --- a/d2oracle/get.go +++ b/d2oracle/get.go @@ -142,6 +142,9 @@ func GetParentID(g *d2graph.Graph, boardPath []string, absID string) (string, er func IsImportedObj(ast *d2ast.Map, obj *d2graph.Object) bool { for _, ref := range obj.References { + if ref.Key.HasGlob() { + return true + } if ref.Key.Range.Path != ast.Range.Path { return true } @@ -150,8 +153,13 @@ func IsImportedObj(ast *d2ast.Map, obj *d2graph.Object) bool { return false } +// Globs count as imported for now +// TODO Probably rename later func IsImportedEdge(ast *d2ast.Map, edge *d2graph.Edge) bool { for _, ref := range edge.References { + if ref.Edge.Src.HasGlob() || ref.Edge.Dst.HasGlob() { + return true + } if ref.Edge.Range.Path != ast.Range.Path { return true } diff --git a/testdata/d2compiler/TestCompile2/globs/override-edge.exp.json b/testdata/d2compiler/TestCompile2/globs/override-edge.exp.json new file mode 100644 index 000000000..21decc39b --- /dev/null +++ b/testdata/d2compiler/TestCompile2/globs/override-edge.exp.json @@ -0,0 +1,478 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,0:0:0-4:0:68", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:0:1-1:29:30", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:1:2-1:7:8", + "src": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:1:2-1:2:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:1:2-1:2:3", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:6:7-1:7:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:6:7-1:7:8", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:8:9-1:11:12", + "int": null, + "glob": true + }, + "edge_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:12:13-1:24:25", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:12:13-1:17:18", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:18:19-1:24:25", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,1:26:27-1:29:30", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:0:31-2:29:60", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:0:31-2:6:37", + "src": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:0:31-2:1:32", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:0:31-2:1:32", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:5:36-2:6:37", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:5:36-2:6:37", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:8:39-2:29:60", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:9:40-2:28:59", + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:9:40-2:21:52", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:9:40-2:14:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:15:46-2:21:52", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:23:54-2:28:59", + "value": [ + { + "string": "green", + "raw_string": "green" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,3:0:61-3:6:67", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,3:0:61-3:6:67", + "src": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,3:0:61-3:1:62", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,3:0:61-3:1:62", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,3:5:66-3:6:67", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,3:5:66-3:6:67", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "green" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "index": 1, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:0:31-2:1:32", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:0:31-2:1:32", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,3:0:61-3:1:62", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,3:0:61-3:1:62", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:5:36-2:6:37", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,2:5:36-2:6:37", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,3:5:66-3:6:67", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge.d2,3:5:66-3:6:67", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": null +} diff --git a/testdata/d2compiler/TestCompile2/globs/override-edge/1.exp.json b/testdata/d2compiler/TestCompile2/globs/override-edge/1.exp.json new file mode 100644 index 000000000..fed08dc94 --- /dev/null +++ b/testdata/d2compiler/TestCompile2/globs/override-edge/1.exp.json @@ -0,0 +1,403 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,0:0:0-4:0:70", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:0:1-1:29:30", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:1:2-1:7:8", + "src": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:1:2-1:2:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:1:2-1:2:3", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:6:7-1:7:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:6:7-1:7:8", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:8:9-1:11:12", + "int": null, + "glob": true + }, + "edge_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:12:13-1:24:25", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:12:13-1:17:18", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:18:19-1:24:25", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,1:26:27-1:29:30", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:0:31-2:31:62", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:1:32-2:7:38", + "src": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:1:32-2:2:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:1:32-2:2:33", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:6:37-2:7:38", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:6:37-2:7:38", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:8:39-2:11:42", + "int": null, + "glob": true + }, + "edge_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:12:43-2:24:55", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:12:43-2:17:48", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:18:49-2:24:55", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,2:26:57-2:31:62", + "value": [ + { + "string": "green", + "raw_string": "green" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,3:0:63-3:6:69", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,3:0:63-3:6:69", + "src": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,3:0:63-3:1:64", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,3:0:63-3:1:64", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,3:5:68-3:6:69", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,3:5:68-3:6:69", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "green" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,3:0:63-3:1:64", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,3:0:63-3:1:64", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,3:5:68-3:6:69", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/1.d2,3:5:68-3:6:69", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": null +} diff --git a/testdata/d2compiler/TestCompile2/globs/override-edge/2.exp.json b/testdata/d2compiler/TestCompile2/globs/override-edge/2.exp.json new file mode 100644 index 000000000..28e9b1036 --- /dev/null +++ b/testdata/d2compiler/TestCompile2/globs/override-edge/2.exp.json @@ -0,0 +1,479 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,0:0:0-4:0:68", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:0:1-1:29:30", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:1:2-1:7:8", + "src": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:1:2-1:2:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:1:2-1:2:3", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:6:7-1:7:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:6:7-1:7:8", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:8:9-1:11:12", + "int": null, + "glob": true + }, + "edge_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:12:13-1:24:25", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:12:13-1:17:18", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:18:19-1:24:25", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,1:26:27-1:29:30", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:0:31-2:29:60", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:0:31-2:6:37", + "src": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:0:31-2:1:32", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:0:31-2:1:32", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:5:36-2:6:37", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:5:36-2:6:37", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:8:39-2:29:60", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:9:40-2:28:59", + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:9:40-2:21:52", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:9:40-2:14:45", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:15:46-2:21:52", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:23:54-2:28:59", + "value": [ + { + "string": "green", + "raw_string": "green" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,3:0:61-3:6:67", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,3:0:61-3:6:67", + "src": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,3:0:61-3:1:62", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,3:0:61-3:1:62", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,3:5:66-3:6:67", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,3:5:66-3:6:67", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "green" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "index": 1, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "red" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:0:31-2:1:32", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:0:31-2:1:32", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,3:0:61-3:1:62", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,3:0:61-3:1:62", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:5:36-2:6:37", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,2:5:36-2:6:37", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,3:5:66-3:6:67", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/globs/override-edge/2.d2,3:5:66-3:6:67", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": null +} diff --git a/testdata/d2ir/TestCompile/filters/edge.exp.json b/testdata/d2ir/TestCompile/filters/edge.exp.json index 836b33ce8..b975d17d3 100644 --- a/testdata/d2ir/TestCompile/filters/edge.exp.json +++ b/testdata/d2ir/TestCompile/filters/edge.exp.json @@ -824,510 +824,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - }, - "key_path": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:7:93", - "src": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/filters/edge.d2,6:0:86-10:1:203", - "edges": [ - { - "range": "TestCompile/filters/edge.d2,6:1:87-6:7:93", - "src": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/filters/edge.d2,6:8:94-6:11:97", - "int": null, - "glob": true - }, - "primary": {}, - "value": { - "map": { - "range": "TestCompile/filters/edge.d2,6:13:99-10:1:203", - "nodes": [ - { - "map_key": { - "range": "TestCompile/filters/edge.d2,7:1:102-7:33:134", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:24:125", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:18:119", - "value": [ - { - "string": "source-arrowhead", - "raw_string": "source-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:19:120-7:24:125", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:26:127-7:33:134", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - { - "map_key": { - "range": "TestCompile/filters/edge.d2,8:1:136-8:33:168", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:24:159", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:18:153", - "value": [ - { - "string": "target-arrowhead", - "raw_string": "target-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:19:154-8:24:159", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:26:161-8:33:168", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - { - "map_key": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:32:201", - "key": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "value": [ - { - "string": "label", - "raw_string": "label" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:8:177-9:32:201", - "value": [ - { - "string": "diamond shape arrowheads", - "raw_string": "diamond shape arrowheads" - } - ] - } - } - } - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - }, - "key_path": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:7:93", - "src": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/filters/edge.d2,6:0:86-10:1:203", - "edges": [ - { - "range": "TestCompile/filters/edge.d2,6:1:87-6:7:93", - "src": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/filters/edge.d2,6:8:94-6:11:97", - "int": null, - "glob": true - }, - "primary": {}, - "value": { - "map": { - "range": "TestCompile/filters/edge.d2,6:13:99-10:1:203", - "nodes": [ - { - "map_key": { - "range": "TestCompile/filters/edge.d2,7:1:102-7:33:134", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:24:125", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:18:119", - "value": [ - { - "string": "source-arrowhead", - "raw_string": "source-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:19:120-7:24:125", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:26:127-7:33:134", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - { - "map_key": { - "range": "TestCompile/filters/edge.d2,8:1:136-8:33:168", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:24:159", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:18:153", - "value": [ - { - "string": "target-arrowhead", - "raw_string": "target-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:19:154-8:24:159", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:26:161-8:33:168", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - { - "map_key": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:32:201", - "key": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "value": [ - { - "string": "label", - "raw_string": "label" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:8:177-9:32:201", - "value": [ - { - "string": "diamond shape arrowheads", - "raw_string": "diamond shape arrowheads" - } - ] - } - } - } - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] }, @@ -1774,92 +1270,6 @@ "due_to_glob": false, "due_to_lazy_glob": false }, - { - "string": { - "range": "TestCompile/filters/edge.d2,7:19:120-7:24:125", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - }, - "key_path": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:24:125", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:18:119", - "value": [ - { - "string": "source-arrowhead", - "raw_string": "source-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:19:120-7:24:125", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "context": { - "edge": null, - "key": { - "range": "TestCompile/filters/edge.d2,7:1:102-7:33:134", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:24:125", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:18:119", - "value": [ - { - "string": "source-arrowhead", - "raw_string": "source-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:19:120-7:24:125", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:26:127-7:33:134", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, { "string": { "range": "TestCompile/filters/edge.d2,7:19:120-7:24:125", @@ -2037,92 +1447,6 @@ "due_to_glob": false, "due_to_lazy_glob": false }, - { - "string": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:18:119", - "value": [ - { - "string": "source-arrowhead", - "raw_string": "source-arrowhead" - } - ] - }, - "key_path": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:24:125", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:18:119", - "value": [ - { - "string": "source-arrowhead", - "raw_string": "source-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:19:120-7:24:125", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "context": { - "edge": null, - "key": { - "range": "TestCompile/filters/edge.d2,7:1:102-7:33:134", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:24:125", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:18:119", - "value": [ - { - "string": "source-arrowhead", - "raw_string": "source-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:19:120-7:24:125", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:26:127-7:33:134", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, { "string": { "range": "TestCompile/filters/edge.d2,7:2:103-7:18:119", @@ -2314,92 +1638,6 @@ "due_to_glob": false, "due_to_lazy_glob": false }, - { - "string": { - "range": "TestCompile/filters/edge.d2,8:19:154-8:24:159", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - }, - "key_path": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:24:159", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:18:153", - "value": [ - { - "string": "target-arrowhead", - "raw_string": "target-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:19:154-8:24:159", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "context": { - "edge": null, - "key": { - "range": "TestCompile/filters/edge.d2,8:1:136-8:33:168", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:24:159", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:18:153", - "value": [ - { - "string": "target-arrowhead", - "raw_string": "target-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:19:154-8:24:159", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:26:161-8:33:168", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, { "string": { "range": "TestCompile/filters/edge.d2,8:19:154-8:24:159", @@ -2577,92 +1815,6 @@ "due_to_glob": false, "due_to_lazy_glob": false }, - { - "string": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:18:153", - "value": [ - { - "string": "target-arrowhead", - "raw_string": "target-arrowhead" - } - ] - }, - "key_path": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:24:159", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:18:153", - "value": [ - { - "string": "target-arrowhead", - "raw_string": "target-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:19:154-8:24:159", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "context": { - "edge": null, - "key": { - "range": "TestCompile/filters/edge.d2,8:1:136-8:33:168", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:24:159", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:18:153", - "value": [ - { - "string": "target-arrowhead", - "raw_string": "target-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:19:154-8:24:159", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:26:161-8:33:168", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, { "string": { "range": "TestCompile/filters/edge.d2,8:2:137-8:18:153", @@ -2765,69 +1917,6 @@ } }, "references": [ - { - "string": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "value": [ - { - "string": "label", - "raw_string": "label" - } - ] - }, - "key_path": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "value": [ - { - "string": "label", - "raw_string": "label" - } - ] - } - } - ] - }, - "context": { - "edge": null, - "key": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:32:201", - "key": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "value": [ - { - "string": "label", - "raw_string": "label" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:8:177-9:32:201", - "value": [ - { - "string": "diamond shape arrowheads", - "raw_string": "diamond shape arrowheads" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, { "string": { "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", @@ -3304,233 +2393,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:7:93", - "src": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/filters/edge.d2,6:0:86-10:1:203", - "edges": [ - { - "range": "TestCompile/filters/edge.d2,6:1:87-6:7:93", - "src": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/filters/edge.d2,6:8:94-6:11:97", - "int": null, - "glob": true - }, - "primary": {}, - "value": { - "map": { - "range": "TestCompile/filters/edge.d2,6:13:99-10:1:203", - "nodes": [ - { - "map_key": { - "range": "TestCompile/filters/edge.d2,7:1:102-7:33:134", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:24:125", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:18:119", - "value": [ - { - "string": "source-arrowhead", - "raw_string": "source-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:19:120-7:24:125", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:26:127-7:33:134", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - { - "map_key": { - "range": "TestCompile/filters/edge.d2,8:1:136-8:33:168", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:24:159", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:18:153", - "value": [ - { - "string": "target-arrowhead", - "raw_string": "target-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:19:154-8:24:159", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:26:161-8:33:168", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - { - "map_key": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:32:201", - "key": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "value": [ - { - "string": "label", - "raw_string": "label" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:8:177-9:32:201", - "value": [ - { - "string": "diamond shape arrowheads", - "raw_string": "diamond shape arrowheads" - } - ] - } - } - } - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] }, @@ -3865,233 +2727,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:7:93", - "src": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/filters/edge.d2,6:0:86-10:1:203", - "edges": [ - { - "range": "TestCompile/filters/edge.d2,6:1:87-6:7:93", - "src": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:1:87-6:2:88", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,6:6:92-6:7:93", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/filters/edge.d2,6:8:94-6:11:97", - "int": null, - "glob": true - }, - "primary": {}, - "value": { - "map": { - "range": "TestCompile/filters/edge.d2,6:13:99-10:1:203", - "nodes": [ - { - "map_key": { - "range": "TestCompile/filters/edge.d2,7:1:102-7:33:134", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:24:125", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:2:103-7:18:119", - "value": [ - { - "string": "source-arrowhead", - "raw_string": "source-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:19:120-7:24:125", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,7:26:127-7:33:134", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - { - "map_key": { - "range": "TestCompile/filters/edge.d2,8:1:136-8:33:168", - "ampersand": true, - "key": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:24:159", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:2:137-8:18:153", - "value": [ - { - "string": "target-arrowhead", - "raw_string": "target-arrowhead" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:19:154-8:24:159", - "value": [ - { - "string": "shape", - "raw_string": "shape" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,8:26:161-8:33:168", - "value": [ - { - "string": "diamond", - "raw_string": "diamond" - } - ] - } - } - } - }, - { - "map_key": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:32:201", - "key": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:1:170-9:6:175", - "value": [ - { - "string": "label", - "raw_string": "label" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/filters/edge.d2,9:8:177-9:32:201", - "value": [ - { - "string": "diamond shape arrowheads", - "raw_string": "diamond shape arrowheads" - } - ] - } - } - } - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } diff --git a/testdata/d2ir/TestCompile/filters/label-filter/2.exp.json b/testdata/d2ir/TestCompile/filters/label-filter/2.exp.json index 2ead5445f..0fc2941dc 100644 --- a/testdata/d2ir/TestCompile/filters/label-filter/2.exp.json +++ b/testdata/d2ir/TestCompile/filters/label-filter/2.exp.json @@ -693,179 +693,6 @@ "due_to_glob": true, "due_to_lazy_glob": true }, - { - "string": { - "range": "TestCompile/filters/label-filter/2.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - }, - "key_path": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:25:26", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:7:8", - "src": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/filters/label-filter/2.d2,1:0:1-1:30:31", - "edges": [ - { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:7:8", - "src": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/filters/label-filter/2.d2,1:8:9-1:11:12", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:25:26", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "number": { - "range": "TestCompile/filters/label-filter/2.d2,1:27:28-1:30:31", - "raw": "0.1", - "value": "1/10" - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": true - }, { "string": { "range": "TestCompile/filters/label-filter/2.d2,5:8:69-5:15:76", @@ -1126,179 +953,6 @@ "due_to_glob": true, "due_to_lazy_glob": true }, - { - "string": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:25:26", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:7:8", - "src": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/filters/label-filter/2.d2,1:0:1-1:30:31", - "edges": [ - { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:7:8", - "src": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/filters/label-filter/2.d2,1:8:9-1:11:12", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:25:26", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "number": { - "range": "TestCompile/filters/label-filter/2.d2,1:27:28-1:30:31", - "raw": "0.1", - "value": "1/10" - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": true - }, { "string": { "range": "TestCompile/filters/label-filter/2.d2,5:2:63-5:7:68", @@ -1807,13 +1461,13 @@ { "context": { "edge": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:7:8", + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:7:40", "src": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", "path": [ { "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", "value": [ { "string": "*", @@ -1829,11 +1483,11 @@ }, "src_arrow": "", "dst": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", "path": [ { "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", "value": [ { "string": "*", @@ -1850,16 +1504,16 @@ "dst_arrow": ">" }, "key": { - "range": "TestCompile/filters/label-filter/2.d2,1:0:1-1:30:31", + "range": "TestCompile/filters/label-filter/2.d2,3:0:33-6:1:81", "edges": [ { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:7:8", + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:7:40", "src": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", "path": [ { "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:1:2-1:2:3", + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", "value": [ { "string": "*", @@ -1875,11 +1529,11 @@ }, "src_arrow": "", "dst": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", "path": [ { "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:6:7-1:7:8", + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", "value": [ { "string": "*", @@ -1897,43 +1551,90 @@ } ], "edge_index": { - "range": "TestCompile/filters/label-filter/2.d2,1:8:9-1:11:12", + "range": "TestCompile/filters/label-filter/2.d2,3:8:41-3:11:44", "int": null, "glob": true }, - "edge_key": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:25:26", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/filters/label-filter/2.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - } - } - ] - }, "primary": {}, "value": { - "number": { - "range": "TestCompile/filters/label-filter/2.d2,1:27:28-1:30:31", - "raw": "0.1", - "value": "1/10" + "map": { + "range": "TestCompile/filters/label-filter/2.d2,3:13:46-6:1:81", + "nodes": [ + { + "map_key": { + "range": "TestCompile/filters/label-filter/2.d2,4:2:50-4:12:60", + "ampersand": true, + "key": { + "range": "TestCompile/filters/label-filter/2.d2,4:3:51-4:8:56", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,4:3:51-4:8:56", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,4:10:58-4:12:60", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/filters/label-filter/2.d2,5:2:63-5:18:79", + "key": { + "range": "TestCompile/filters/label-filter/2.d2,5:2:63-5:15:76", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,5:2:63-5:7:68", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,5:8:69-5:15:76", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/filters/label-filter/2.d2,5:17:78-5:18:79", + "raw": "1", + "value": "1" + } + } + } + } + ] } } } @@ -2921,6 +2622,374 @@ }, "due_to_glob": true, "due_to_lazy_glob": true + }, + { + "context": { + "edge": { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:7:40", + "src": { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/filters/label-filter/2.d2,3:0:33-6:1:81", + "edges": [ + { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:7:40", + "src": { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/filters/label-filter/2.d2,3:8:41-3:11:44", + "int": null, + "glob": true + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/filters/label-filter/2.d2,3:13:46-6:1:81", + "nodes": [ + { + "map_key": { + "range": "TestCompile/filters/label-filter/2.d2,4:2:50-4:12:60", + "ampersand": true, + "key": { + "range": "TestCompile/filters/label-filter/2.d2,4:3:51-4:8:56", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,4:3:51-4:8:56", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,4:10:58-4:12:60", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/filters/label-filter/2.d2,5:2:63-5:18:79", + "key": { + "range": "TestCompile/filters/label-filter/2.d2,5:2:63-5:15:76", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,5:2:63-5:7:68", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,5:8:69-5:15:76", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/filters/label-filter/2.d2,5:17:78-5:18:79", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "context": { + "edge": { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:7:40", + "src": { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/filters/label-filter/2.d2,3:0:33-6:1:81", + "edges": [ + { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:7:40", + "src": { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,3:1:34-3:2:35", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,3:6:39-3:7:40", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/filters/label-filter/2.d2,3:8:41-3:11:44", + "int": null, + "glob": true + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/filters/label-filter/2.d2,3:13:46-6:1:81", + "nodes": [ + { + "map_key": { + "range": "TestCompile/filters/label-filter/2.d2,4:2:50-4:12:60", + "ampersand": true, + "key": { + "range": "TestCompile/filters/label-filter/2.d2,4:3:51-4:8:56", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,4:3:51-4:8:56", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,4:10:58-4:12:60", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/filters/label-filter/2.d2,5:2:63-5:18:79", + "key": { + "range": "TestCompile/filters/label-filter/2.d2,5:2:63-5:15:76", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,5:2:63-5:7:68", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/2.d2,5:8:69-5:15:76", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/filters/label-filter/2.d2,5:17:78-5:18:79", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true } ] } diff --git a/testdata/d2ir/TestCompile/filters/label-filter/3.exp.json b/testdata/d2ir/TestCompile/filters/label-filter/3.exp.json new file mode 100644 index 000000000..868349959 --- /dev/null +++ b/testdata/d2ir/TestCompile/filters/label-filter/3.exp.json @@ -0,0 +1,941 @@ +{ + "fields": [ + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:6:59", + "src": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:10:63", + "edges": [ + { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:6:59", + "src": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:8:61-6:10:63", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "y", + "references": [ + { + "string": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:6:59", + "src": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:10:63", + "edges": [ + { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:6:59", + "src": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:8:61-6:10:63", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "x" + ], + "src_arrow": false, + "dst_path": [ + "y" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "primary": { + "value": { + "range": "TestCompile/filters/label-filter/3.d2,6:8:61-6:10:63", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/filters/label-filter/3.d2,3:17:46-3:20:49", + "raw": "0.1", + "value": "1/10" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/filters/label-filter/3.d2,3:8:37-3:15:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:15:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:7:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:8:37-3:15:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:20:49", + "key": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:15:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:7:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:8:37-3:15:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/filters/label-filter/3.d2,3:17:46-3:20:49", + "raw": "0.1", + "value": "1/10" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:7:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:15:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:7:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:8:37-3:15:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:20:49", + "key": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:15:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:7:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:8:37-3:15:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/filters/label-filter/3.d2,3:17:46-3:20:49", + "raw": "0.1", + "value": "1/10" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:6:59", + "src": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:10:63", + "edges": [ + { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:6:59", + "src": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:0:53-6:1:54", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:5:58-6:6:59", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,6:8:61-6:10:63", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "context": { + "edge": { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:7:8", + "src": { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:2:3", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:2:3", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/3.d2,1:6:7-1:7:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,1:6:7-1:7:8", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/filters/label-filter/3.d2,1:0:1-4:1:51", + "edges": [ + { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:7:8", + "src": { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:2:3", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:2:3", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/3.d2,1:6:7-1:7:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,1:6:7-1:7:8", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/filters/label-filter/3.d2,1:8:9-1:11:12", + "int": null, + "glob": true + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/filters/label-filter/3.d2,1:13:14-4:1:51", + "nodes": [ + { + "map_key": { + "range": "TestCompile/filters/label-filter/3.d2,2:2:18-2:12:28", + "ampersand": true, + "key": { + "range": "TestCompile/filters/label-filter/3.d2,2:3:19-2:8:24", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,2:3:19-2:8:24", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,2:10:26-2:12:28", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:20:49", + "key": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:15:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:7:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:8:37-3:15:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/filters/label-filter/3.d2,3:17:46-3:20:49", + "raw": "0.1", + "value": "1/10" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "context": { + "edge": { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:7:8", + "src": { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:2:3", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:2:3", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/3.d2,1:6:7-1:7:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,1:6:7-1:7:8", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/filters/label-filter/3.d2,1:0:1-4:1:51", + "edges": [ + { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:7:8", + "src": { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:2:3", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,1:1:2-1:2:3", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/filters/label-filter/3.d2,1:6:7-1:7:8", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,1:6:7-1:7:8", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/filters/label-filter/3.d2,1:8:9-1:11:12", + "int": null, + "glob": true + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/filters/label-filter/3.d2,1:13:14-4:1:51", + "nodes": [ + { + "map_key": { + "range": "TestCompile/filters/label-filter/3.d2,2:2:18-2:12:28", + "ampersand": true, + "key": { + "range": "TestCompile/filters/label-filter/3.d2,2:3:19-2:8:24", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,2:3:19-2:8:24", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,2:10:26-2:12:28", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:20:49", + "key": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:15:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:2:31-3:7:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/filters/label-filter/3.d2,3:8:37-3:15:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/filters/label-filter/3.d2,3:17:46-3:20:49", + "raw": "0.1", + "value": "1/10" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/alixander-review/6.exp.json b/testdata/d2ir/TestCompile/patterns/alixander-review/6.exp.json index e30ee4789..de8c8b7c4 100644 --- a/testdata/d2ir/TestCompile/patterns/alixander-review/6.exp.json +++ b/testdata/d2ir/TestCompile/patterns/alixander-review/6.exp.json @@ -692,179 +692,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": true - }, - { - "string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:25:26", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:7:8", - "src": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:0:1-1:30:31", - "edges": [ - { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:7:8", - "src": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:8:9-1:11:12", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:25:26", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "number": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:27:28-1:30:31", - "raw": "0.1", - "value": "1/10" - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": true } ] } @@ -1044,179 +871,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": true - }, - { - "string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:25:26", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:7:8", - "src": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:0:1-1:30:31", - "edges": [ - { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:7:8", - "src": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:8:9-1:11:12", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:25:26", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "number": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:27:28-1:30:31", - "raw": "0.1", - "value": "1/10" - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": true } ] } @@ -1457,143 +1111,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": true - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:7:8", - "src": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:0:1-1:30:31", - "edges": [ - { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:7:8", - "src": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:1:2-1:2:3", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:6:7-1:7:8", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:8:9-1:11:12", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:25:26", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:12:13-1:17:18", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:18:19-1:25:26", - "value": [ - { - "string": "opacity", - "raw_string": "opacity" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "number": { - "range": "TestCompile/patterns/alixander-review/6.d2,1:27:28-1:30:31", - "raw": "0.1", - "value": "1/10" - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": true } ] }, diff --git a/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json b/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json index 03bd3132f..c35f511d5 100644 --- a/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json +++ b/testdata/d2ir/TestCompile/patterns/edge-glob-index.exp.json @@ -800,930 +800,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] }, @@ -2527,930 +1603,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -3653,336 +1805,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -4154,336 +1976,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -4706,264 +2198,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] }, @@ -5164,336 +2398,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -5665,336 +2569,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -6217,264 +2791,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] }, @@ -6675,336 +2991,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -7176,336 +3162,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -7728,264 +3384,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:0:21-3:27:48", - "edges": [ - { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:7:28", - "src": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:1:22-3:2:23", - "value": [ - { - "string": "a", - "raw_string": "a" - } - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:6:27-3:7:28", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:8:29-3:11:32", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:22:43", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:12:33-3:17:38", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:18:39-3:22:43", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/edge-glob-index.d2,3:24:45-3:27:48", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } diff --git a/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json b/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json index 1d9dceda1..10b67da74 100644 --- a/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json +++ b/testdata/d2ir/TestCompile/patterns/glob-edge-glob-index.exp.json @@ -1431,966 +1431,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] }, @@ -2716,348 +1756,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -3235,348 +1933,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -3805,276 +2161,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] }, @@ -4281,348 +2367,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -4800,348 +2544,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -5370,276 +2772,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] }, @@ -5846,348 +2978,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -6365,348 +3155,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - }, - "key_path": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] } @@ -6935,276 +3383,6 @@ }, "due_to_glob": true, "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false - }, - { - "context": { - "edge": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - }, - "key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:0:28-4:27:55", - "edges": [ - { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:7:35", - "src": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:1:29-4:2:30", - "value": [ - { - "string": "*", - "raw_string": "*" - } - ], - "pattern": [ - "*" - ] - } - } - ] - }, - "src_arrow": "", - "dst": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:6:34-4:7:35", - "value": [ - { - "string": "b", - "raw_string": "b" - } - ] - } - } - ] - }, - "dst_arrow": ">" - } - ], - "edge_index": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:8:36-4:11:39", - "int": null, - "glob": true - }, - "edge_key": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:22:50", - "path": [ - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:12:40-4:17:45", - "value": [ - { - "string": "style", - "raw_string": "style" - } - ] - } - }, - { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:18:46-4:22:50", - "value": [ - { - "string": "fill", - "raw_string": "fill" - } - ] - } - } - ] - }, - "primary": {}, - "value": { - "unquoted_string": { - "range": "TestCompile/patterns/glob-edge-glob-index.d2,4:24:52-4:27:55", - "value": [ - { - "string": "red", - "raw_string": "red" - } - ] - } - } - } - }, - "due_to_glob": true, - "due_to_lazy_glob": false } ] }, diff --git a/testdata/d2oracle/TestDelete/connection-glob.exp.json b/testdata/d2oracle/TestDelete/connection-glob.exp.json new file mode 100644 index 000000000..f1fb79d61 --- /dev/null +++ b/testdata/d2oracle/TestDelete/connection-glob.exp.json @@ -0,0 +1,312 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,0:0:0-4:0:29", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,0:0:0-0:6:6", + "src": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,0:5:5-0:6:6", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,1:0:7-1:1:8", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,2:0:9-2:1:10", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,2:0:9-2:1:10", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,2:0:9-2:1:10", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,3:0:11-3:17:28", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,3:1:12-3:7:18", + "src": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,3:1:12-3:2:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,3:1:12-3:2:13", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,3:6:17-3:7:18", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,3:6:17-3:7:18", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,3:8:19-3:11:22", + "int": 0, + "glob": false + }, + "primary": {}, + "value": { + "null": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,3:13:24-3:17:28" + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,1:0:7-1:1:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,1:0:7-1:1:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,2:0:9-2:1:10", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/connection-glob.d2,2:0:9-2:1:10", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestDelete/glob-child/1.exp.json b/testdata/d2oracle/TestDelete/glob-child/1.exp.json new file mode 100644 index 000000000..415c0c798 --- /dev/null +++ b/testdata/d2oracle/TestDelete/glob-child/1.exp.json @@ -0,0 +1,212 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,0:0:0-3:0:16", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,0:0:0-0:3:3", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,0:2:2-0:3:3", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,1:0:4-1:1:5", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,1:0:4-1:1:5", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,1:0:4-1:1:5", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,2:0:6-2:9:15", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,2:0:6-2:3:9", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,2:0:6-2:1:7", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,2:2:8-2:3:9", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "null": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,2:5:11-2:9:15" + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,1:0:4-1:1:5", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,1:0:4-1:1:5", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,2:0:6-2:3:9", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,2:0:6-2:1:7", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/glob-child/1.d2,2:2:8-2:3:9", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/glob-field/1.exp.json b/testdata/d2oracle/TestSet/glob-field/1.exp.json new file mode 100644 index 000000000..ef0bae2ce --- /dev/null +++ b/testdata/d2oracle/TestSet/glob-field/1.exp.json @@ -0,0 +1,290 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,0:0:0-3:0:42", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,0:0:0-0:17:17", + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,0:0:0-0:12:12", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,0:8:8-0:12:12", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,0:14:14-0:17:17", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:0:18-1:21:39", + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:0:18-1:1:19", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:0:18-1:1:19", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:3:21-1:21:39", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:4:22-1:20:38", + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:4:22-1:14:32", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:4:22-1:9:27", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:10:28-1:14:32", + "value": [ + { + "string": "fill", + "raw_string": "fill" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:16:34-1:20:38", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,2:0:40-2:1:41", + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,2:0:40-2:1:41", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,2:0:40-2:1:41", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:0:18-1:1:19", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,1:0:18-1:1:19", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "fill": { + "value": "blue" + } + }, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,2:0:40-2:1:41", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/1.d2,2:0:40-2:1:41", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "fill": { + "value": "red" + } + }, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/glob-field/2.exp.json b/testdata/d2oracle/TestSet/glob-field/2.exp.json new file mode 100644 index 000000000..c4f0ab737 --- /dev/null +++ b/testdata/d2oracle/TestSet/glob-field/2.exp.json @@ -0,0 +1,479 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:0:0-3:0:66", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:0:0-0:29:29", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:1:1-0:7:7", + "src": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:12:12-0:24:24", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:18:18-0:24:24", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,0:26:26-0:29:29", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:0:30-1:28:58", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:0:30-1:6:36", + "src": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:0:30-1:1:31", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:0:30-1:1:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:5:35-1:6:36", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:5:35-1:6:36", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:8:38-1:28:58", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:9:39-1:27:57", + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:9:39-1:21:51", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:9:39-1:14:44", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:15:45-1:21:51", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:23:53-1:27:57", + "value": [ + { + "string": "blue", + "raw_string": "blue" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,2:0:59-2:6:65", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,2:0:59-2:6:65", + "src": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,2:0:59-2:1:60", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,2:0:59-2:1:60", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,2:5:64-2:6:65", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,2:5:64-2:6:65", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "blue" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "index": 1, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "red" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:0:30-1:1:31", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:0:30-1:1:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,2:0:59-2:1:60", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,2:0:59-2:1:60", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:5:35-1:6:36", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,1:5:35-1:6:36", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,2:5:64-2:6:65", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/2.d2,2:5:64-2:6:65", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/glob-field/3.exp.json b/testdata/d2oracle/TestSet/glob-field/3.exp.json new file mode 100644 index 000000000..290195f8f --- /dev/null +++ b/testdata/d2oracle/TestSet/glob-field/3.exp.json @@ -0,0 +1,479 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:0:0-3:0:67", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:0:0-0:29:29", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:1:1-0:7:7", + "src": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:12:12-0:24:24", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:18:18-0:24:24", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,0:26:26-0:29:29", + "value": [ + { + "string": "red", + "raw_string": "red" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:0:30-1:29:59", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:0:30-1:6:36", + "src": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:0:30-1:1:31", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:0:30-1:1:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:5:35-1:6:36", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:5:35-1:6:36", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:8:38-1:29:59", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:9:39-1:28:58", + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:9:39-1:21:51", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:9:39-1:14:44", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:15:45-1:21:51", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:23:53-1:28:58", + "value": [ + { + "string": "green", + "raw_string": "green" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,2:0:60-2:6:66", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,2:0:60-2:6:66", + "src": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,2:0:60-2:1:61", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,2:0:60-2:1:61", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,2:5:65-2:6:66", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,2:5:65-2:6:66", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "green" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "index": 1, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "red" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:0:30-1:1:31", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:0:30-1:1:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,2:0:60-2:1:61", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,2:0:60-2:1:61", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:5:35-1:6:36", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,1:5:35-1:6:36", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,2:5:65-2:6:66", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-field/3.d2,2:5:65-2:6:66", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From ba207e79cb2519dafb096df170c708217421521d Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 6 Mar 2024 22:55:20 -0800 Subject: [PATCH 014/109] go 1.21 --- go.mod | 2 +- go.sum | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e27c6847d..f4f03f220 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module oss.terrastruct.com/d2 -go 1.20 +go 1.21 require ( cdr.dev/slog v1.4.2-0.20221206192828-e4803b10ae17 diff --git a/go.sum b/go.sum index f39bc661f..7019bc8fe 100644 --- a/go.sum +++ b/go.sum @@ -3,21 +3,26 @@ cdr.dev/slog v1.4.2-0.20221206192828-e4803b10ae17/go.mod h1:YPVZsUbRMaLaPgme0Rzl cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= git.sr.ht/~sbinet/gg v0.5.0 h1:6V43j30HM623V329xA9Ntq+WJrMjDxRjuAB1LFWF5m8= +git.sr.ht/~sbinet/gg v0.5.0/go.mod h1:G2C0eRESqlKhS7ErsNey6HHrqU1PwsnCQlekFi9Q2Oo= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM= github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw= +github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink= +github.com/alecthomas/assert/v2 v2.2.1/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= github.com/alecthomas/chroma/v2 v2.5.0 h1:CQCdj1BiBV17sD4Bd32b/Bzuiq/EqoNTrnIhyQAZ+Rk= github.com/alecthomas/chroma/v2 v2.5.0/go.mod h1:yrkMI9807G1ROx13fhe1v6PN2DDeaR73L3d+1nmYQtw= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss= github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/campoy/embedmd v1.0.0 h1:V4kI2qTJJLf4J29RzI/MAt2c3Bl4dQSYPuflzwFH2hY= +github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= @@ -26,6 +31,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -78,8 +84,11 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/liberation v0.3.1 h1:9RPT2NhUpxQ7ukUvz3jeUckmN42T9D9TpjtQcqK/ceM= +github.com/go-fonts/liberation v0.3.1/go.mod h1:jdJ+cqF+F4SUL2V+qxBth8fvBpBDS7yloUL5Fi8GTGY= github.com/go-latex/latex v0.0.0-20230307184459-12ec69307ad9 h1:NxXI5pTAtpEaU49bpLpQoDsu1zrteW/vxzTz8Cd2UAs= +github.com/go-latex/latex v0.0.0-20230307184459-12ec69307ad9/go.mod h1:gWuR/CrFDDeVRFQwHPvsv9soJVB/iqymhuZQuJ3a9OM= github.com/go-pdf/fpdf v0.8.0 h1:IJKpdaagnWUeSkUFUjTcSzTppFxmv8ucGQyNPQWxYOQ= +github.com/go-pdf/fpdf v0.8.0/go.mod h1:gfqhcNwXrsd3XYKte9a7vM3smvU/jB4ZRDrmWSxpfdc= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= @@ -120,6 +129,7 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/h2non/filetype v1.1.1/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= @@ -318,3 +328,4 @@ nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+ oss.terrastruct.com/util-go v0.0.0-20231101220827-55b3812542c2 h1:n6y6RoZCgZDchN4gLGlzNRO1Jdf9xOGGqohDBph5BG8= oss.terrastruct.com/util-go v0.0.0-20231101220827-55b3812542c2/go.mod h1:eMWv0sOtD9T2RUl90DLWfuShZCYp4NrsqNpI8eqO6U4= rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= From 993e3691e216346ca04b00ffc8cceb18c7c32938 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 6 Mar 2024 23:03:07 -0800 Subject: [PATCH 015/109] 1.22 --- docs/CONTRIBUTING.md | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index b1b0f6ded..f1be97999 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -68,7 +68,7 @@ git submodule update --recursive ## Logistics -- Use Go 1.20. +- Use Go 1.22. - Please sign your commits ([https://github.com/terrastruct/d2/pull/557#issuecomment-1367468730](https://github.com/terrastruct/d2/pull/557#issuecomment-1367468730)). - D2 uses Issues as TODOs. No auto-closing on staleness. diff --git a/go.mod b/go.mod index f4f03f220..106bc616b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module oss.terrastruct.com/d2 -go 1.21 +go 1.22 require ( cdr.dev/slog v1.4.2-0.20221206192828-e4803b10ae17 From 3b87b73dd92590b68fc1c4a9be50d5a1ab42bffd Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 6 Mar 2024 23:24:12 -0800 Subject: [PATCH 016/109] d2oracle: fix deleting imported fields --- d2oracle/edit.go | 83 +++++--- d2oracle/edit_test.go | 28 +++ .../d2oracle/TestDelete/import/7.exp.json | 103 ++++++++++ .../d2oracle/TestDelete/import/8.exp.json | 179 ++++++++++++++++++ 4 files changed, 364 insertions(+), 29 deletions(-) create mode 100644 testdata/d2oracle/TestDelete/import/7.exp.json create mode 100644 testdata/d2oracle/TestDelete/import/8.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 6d3bea97f..967cedf00 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -1244,13 +1244,13 @@ func deleteReserved(g *d2graph.Graph, baseAST *d2ast.Map, mk *d2ast.Key) (*d2gra } imported := IsImportedEdge(baseAST, e) - if imported { + deleted, err := deleteEdgeField(g, baseAST, e, targetKey.Path[len(targetKey.Path)-1].Unbox().ScalarString()) + if err != nil { + return nil, err + } + if !deleted && imported { mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) appendMapKey(baseAST, mk) - } else { - if err := deleteEdgeField(g, e, targetKey.Path[len(targetKey.Path)-1].Unbox().ScalarString()); err != nil { - return nil, err - } } return recompile(g) } @@ -1272,15 +1272,15 @@ func deleteReserved(g *d2graph.Graph, baseAST *d2ast.Map, mk *d2ast.Key) (*d2gra } } if isNestedKey { - if imported { + deleted, err := deleteObjField(g, baseAST, obj, id) + if err != nil { + return nil, err + } + if !deleted && imported { mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) appendMapKey(baseAST, mk) - } else { - err := deleteObjField(g, obj, id) - if err != nil { - return nil, err - } } + continue } if id == "near" || @@ -1291,14 +1291,14 @@ func deleteReserved(g *d2graph.Graph, baseAST *d2ast.Map, mk *d2ast.Key) (*d2gra id == "left" || id == "top" || id == "link" { - if imported { + deleted, err := deleteObjField(g, baseAST, obj, id) + if err != nil { + return nil, err + } + if !deleted && imported { mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) appendMapKey(baseAST, mk) } else { - err := deleteObjField(g, obj, id) - if err != nil { - return nil, err - } } } break @@ -1313,7 +1313,7 @@ func deleteReserved(g *d2graph.Graph, baseAST *d2ast.Map, mk *d2ast.Key) (*d2gra return recompile(g) } -func deleteMapField(m *d2ast.Map, field string) { +func deleteMapField(m *d2ast.Map, field string) (deleted bool) { for i := 0; i < len(m.Nodes); i++ { n := m.Nodes[i] if n.MapKey != nil && n.MapKey.Key != nil { @@ -1325,44 +1325,66 @@ func deleteMapField(m *d2ast.Map, field string) { n.MapKey.Key.Path[0].Unbox().ScalarString() == "source-arrowhead" || n.MapKey.Key.Path[0].Unbox().ScalarString() == "target-arrowhead" { if n.MapKey.Value.Map != nil { - deleteMapField(n.MapKey.Value.Map, field) + deleted2 := deleteMapField(n.MapKey.Value.Map, field) + if deleted2 { + deleted = true + } if len(n.MapKey.Value.Map.Nodes) == 0 { - deleteFromMap(m, n.MapKey) + deleted2 := deleteFromMap(m, n.MapKey) + if deleted2 { + deleted = true + } } } else if len(n.MapKey.Key.Path) == 2 && n.MapKey.Key.Path[1].Unbox().ScalarString() == field { - deleteFromMap(m, n.MapKey) + deleted2 := deleteFromMap(m, n.MapKey) + if deleted2 { + deleted = true + } } } } } + return deleted } -func deleteEdgeField(g *d2graph.Graph, e *d2graph.Edge, field string) error { +func deleteEdgeField(g *d2graph.Graph, ast *d2ast.Map, e *d2graph.Edge, field string) (deleted bool, _ error) { for _, ref := range e.References { // Edge chains can't have fields if len(ref.MapKey.Edges) > 1 { continue } + if ref.MapKey.Range.Path != ast.Range.Path { + continue + } if ref.MapKey.Value.Map != nil { - deleteMapField(ref.MapKey.Value.Map, field) + deleted2 := deleteMapField(ref.MapKey.Value.Map, field) + if deleted2 { + deleted = true + } } else if ref.MapKey.EdgeKey != nil && ref.MapKey.EdgeKey.Path[len(ref.MapKey.EdgeKey.Path)-1].Unbox().ScalarString() == field { // It's always safe to delete, since edge references must coexist with edge definition elsewhere - deleteFromMap(ref.Scope, ref.MapKey) + deleted2 := deleteFromMap(ref.Scope, ref.MapKey) + if deleted2 { + deleted = true + } } } - return nil + return deleted, nil } -func deleteObjField(g *d2graph.Graph, obj *d2graph.Object, field string) error { +func deleteObjField(g *d2graph.Graph, ast *d2ast.Map, obj *d2graph.Object, field string) (deleted bool, _ error) { objK, err := d2parser.ParseKey(obj.AbsID()) if err != nil { - return err + return false, err } objGK := d2graph.Key(objK) for _, ref := range obj.References { if ref.InEdge() { continue } + if ref.Key.Range.Path != ast.Range.Path { + continue + } if ref.MapKey.Value.Map != nil { deleteMapField(ref.MapKey.Value.Map, field) } else if (len(ref.Key.Path) >= 2 && @@ -1377,10 +1399,13 @@ func deleteObjField(g *d2graph.Graph, obj *d2graph.Object, field string) error { tmpNodes := make([]d2ast.MapNodeBox, len(ref.Scope.Nodes)) copy(tmpNodes, ref.Scope.Nodes) // If I delete this, will the object still exist? - deleteFromMap(ref.Scope, ref.MapKey) + deleted2 := deleteFromMap(ref.Scope, ref.MapKey) + if deleted2 { + deleted = true + } g2, err := recompile(g) if err != nil { - return err + return false, err } if _, ok := g2.Root.HasChild(objGK); !ok { // Nope, so can't delete it, just remove the field then @@ -1391,7 +1416,7 @@ func deleteObjField(g *d2graph.Graph, obj *d2graph.Object, field string) error { } } - return nil + return deleted, nil } func deleteObject(g *d2graph.Graph, baseAST *d2ast.Map, key *d2ast.KeyPath, obj *d2graph.Object) (*d2graph.Graph, error) { diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index a5743234d..72e30a992 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -7469,6 +7469,34 @@ a.link: null key: `a.style.fill`, exp: `...@meow a.style.fill: null +`, + }, + { + name: "import/7", + + text: `...@meow +a.label.near: center-center +`, + fsTexts: map[string]string{ + "meow.d2": `a +`, + }, + key: `a.label.near`, + exp: `...@meow +`, + }, + { + name: "import/8", + + text: `...@meow +(a -> b)[0].style.stroke: red +`, + fsTexts: map[string]string{ + "meow.d2": `a -> b +`, + }, + key: `(a -> b)[0].style.stroke`, + exp: `...@meow `, }, { diff --git a/testdata/d2oracle/TestDelete/import/7.exp.json b/testdata/d2oracle/TestDelete/import/7.exp.json new file mode 100644 index 000000000..aaf6a4fa1 --- /dev/null +++ b/testdata/d2oracle/TestDelete/import/7.exp.json @@ -0,0 +1,103 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "index.d2,0:0:0-1:0:9", + "nodes": [ + { + "import": { + "range": "index.d2,0:0:0-0:8:8", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:8:8", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "meow.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "meow.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestDelete/import/8.exp.json b/testdata/d2oracle/TestDelete/import/8.exp.json new file mode 100644 index 000000000..9cd9e2256 --- /dev/null +++ b/testdata/d2oracle/TestDelete/import/8.exp.json @@ -0,0 +1,179 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "index.d2,0:0:0-1:0:9", + "nodes": [ + { + "import": { + "range": "index.d2,0:0:0-0:8:8", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:4:4-0:8:8", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "meow.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "meow.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "meow.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "meow.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 86549a0b5654efff02673f75b428450ac2a82d1a Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 14 Mar 2024 09:50:11 -0700 Subject: [PATCH 017/109] d2oracle: fix set with classes setting labels --- d2oracle/edit.go | 13 + d2oracle/edit_test.go | 77 ++++ .../TestSet/class-with-label.exp.json | 324 +++++++++++++++ .../TestSet/edge-class-with-label.exp.json | 377 ++++++++++++++++++ .../d2oracle/TestSet/glob-with-label.exp.json | 245 ++++++++++++ .../d2oracle/TestSet/var-with-label.exp.json | 238 +++++++++++ 6 files changed, 1274 insertions(+) create mode 100644 testdata/d2oracle/TestSet/class-with-label.exp.json create mode 100644 testdata/d2oracle/TestSet/edge-class-with-label.exp.json create mode 100644 testdata/d2oracle/TestSet/glob-with-label.exp.json create mode 100644 testdata/d2oracle/TestSet/var-with-label.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 6d3bea97f..3f1a84be0 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -429,6 +429,19 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) break } } + } else { + // Even if not imported or different board, a label can be not writeable if it's in a class or var or glob + // In those cases, the label is not a direct object reference + found := false + for _, ref := range obj.References { + if ref.MapKey == obj.Label.MapKey { + found = true + break + } + } + if !found { + writeableLabelMK = false + } } var m *d2ast.Map if objK != nil { diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index a5743234d..036affcfb 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -1177,6 +1177,83 @@ b } } b: {style.fill: green} +`, + }, + { + name: "class-with-label", + text: `classes: { + user: { + label: "" + } +} + +a.class: user +`, + key: `a.style.opacity`, + value: go2.Pointer(`0.5`), + exp: `classes: { + user: { + label: "" + } +} + +a.class: user +a.style.opacity: 0.5 +`, + }, + { + name: "edge-class-with-label", + text: `classes: { + user: { + label: "" + } +} + +a -> b: { + class: user +} +`, + key: `(a -> b)[0].style.opacity`, + value: go2.Pointer(`0.5`), + exp: `classes: { + user: { + label: "" + } +} + +a -> b: { + class: user + style.opacity: 0.5 +} +`, + }, + { + name: "var-with-label", + text: `vars: { + user: "" +} + +a: ${user} +`, + key: `a.style.opacity`, + value: go2.Pointer(`0.5`), + exp: `vars: { + user: "" +} + +a: ${user} {style.opacity: 0.5} +`, + }, + { + name: "glob-with-label", + text: `*.label: "" +a +`, + key: `a.style.opacity`, + value: go2.Pointer(`0.5`), + exp: `*.label: "" +a +a.style.opacity: 0.5 `, }, { diff --git a/testdata/d2oracle/TestSet/class-with-label.exp.json b/testdata/d2oracle/TestSet/class-with-label.exp.json new file mode 100644 index 000000000..1cfcb550d --- /dev/null +++ b/testdata/d2oracle/TestSet/class-with-label.exp.json @@ -0,0 +1,324 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,0:0:0-8:0:77", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,0:0:0-4:1:40", + "key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,0:9:9-4:1:40", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,1:2:13-3:3:38", + "key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,1:2:13-1:6:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,1:2:13-1:6:17", + "value": [ + { + "string": "user", + "raw_string": "user" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,1:8:19-3:3:38", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,2:4:25-2:13:34", + "key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,2:4:25-2:9:30", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,2:4:25-2:9:30", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "double_quoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,2:11:32-2:13:34", + "value": null + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,6:0:42-6:13:55", + "key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,6:0:42-6:7:49", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,6:0:42-6:1:43", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,6:2:44-6:7:49", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,6:9:51-6:13:55", + "value": [ + { + "string": "user", + "raw_string": "user" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,7:0:56-7:20:76", + "key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,7:0:56-7:15:71", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,7:0:56-7:1:57", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,7:2:58-7:7:63", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,7:8:64-7:15:71", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,7:17:73-7:20:76", + "raw": "0.5", + "value": "1/2" + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,6:0:42-6:7:49", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,6:0:42-6:1:43", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,6:2:44-6:7:49", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,7:0:56-7:15:71", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,7:0:56-7:1:57", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,7:2:58-7:7:63", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/class-with-label.d2,7:8:64-7:15:71", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "opacity": { + "value": "0.5" + } + }, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null, + "classes": [ + "user" + ] + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/edge-class-with-label.exp.json b/testdata/d2oracle/TestSet/edge-class-with-label.exp.json new file mode 100644 index 000000000..fde7a3b65 --- /dev/null +++ b/testdata/d2oracle/TestSet/edge-class-with-label.exp.json @@ -0,0 +1,377 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,0:0:0-10:0:89", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,0:0:0-4:1:40", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,0:0:0-0:7:7", + "value": [ + { + "string": "classes", + "raw_string": "classes" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,0:9:9-4:1:40", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,1:2:13-3:3:38", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,1:2:13-1:6:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,1:2:13-1:6:17", + "value": [ + { + "string": "user", + "raw_string": "user" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,1:8:19-3:3:38", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,2:4:25-2:13:34", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,2:4:25-2:9:30", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,2:4:25-2:9:30", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "double_quoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,2:11:32-2:13:34", + "value": null + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:0:42-9:1:88", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:0:42-6:6:48", + "src": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:0:42-6:1:43", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:0:42-6:1:43", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:5:47-6:6:48", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:5:47-6:6:48", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:8:50-9:1:88", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,7:2:54-7:13:65", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,7:2:54-7:7:59", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,7:2:54-7:7:59", + "value": [ + { + "string": "class", + "raw_string": "class" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,7:9:61-7:13:65", + "value": [ + { + "string": "user", + "raw_string": "user" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,8:2:68-8:20:86", + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,8:2:68-8:15:81", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,8:2:68-8:7:73", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,8:8:74-8:15:81", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,8:17:83-8:20:86", + "raw": "0.5", + "value": "1/2" + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "opacity": { + "value": "0.5" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null, + "classes": [ + "user" + ] + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:0:42-6:1:43", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:0:42-6:1:43", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:5:47-6:6:48", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/edge-class-with-label.d2,6:5:47-6:6:48", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/glob-with-label.exp.json b/testdata/d2oracle/TestSet/glob-with-label.exp.json new file mode 100644 index 000000000..f41339c5c --- /dev/null +++ b/testdata/d2oracle/TestSet/glob-with-label.exp.json @@ -0,0 +1,245 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,0:0:0-3:0:35", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,0:0:0-0:11:11", + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,0:0:0-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,0:2:2-0:7:7", + "value": [ + { + "string": "label", + "raw_string": "label" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "double_quoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,0:9:9-0:11:11", + "value": null + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,1:0:12-1:1:13", + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,1:0:12-1:1:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,1:0:12-1:1:13", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,2:0:14-2:20:34", + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,2:0:14-2:15:29", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,2:2:16-2:7:21", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,2:8:22-2:15:29", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,2:17:31-2:20:34", + "raw": "0.5", + "value": "1/2" + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,1:0:12-1:1:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,1:0:12-1:1:13", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,2:0:14-2:15:29", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,2:0:14-2:1:15", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,2:2:16-2:7:21", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/glob-with-label.d2,2:8:22-2:15:29", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "opacity": { + "value": "0.5" + } + }, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/var-with-label.exp.json b/testdata/d2oracle/TestSet/var-with-label.exp.json new file mode 100644 index 000000000..c31d31557 --- /dev/null +++ b/testdata/d2oracle/TestSet/var-with-label.exp.json @@ -0,0 +1,238 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,0:0:0-5:0:54", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,0:0:0-2:1:20", + "key": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,0:0:0-0:4:4", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,0:0:0-0:4:4", + "value": [ + { + "string": "vars", + "raw_string": "vars" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,0:6:6-2:1:20", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,1:2:10-1:10:18", + "key": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,1:2:10-1:6:14", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,1:2:10-1:6:14", + "value": [ + { + "string": "user", + "raw_string": "user" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "double_quoted_string": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,1:8:16-1:10:18", + "value": null + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:0:22-4:31:53", + "key": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:0:22-4:1:23", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:0:22-4:1:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:3:25-4:4:26", + "value": [ + { + "substitution": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:3:25-4:10:32", + "spread": false, + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:5:27-4:9:31", + "value": [ + { + "string": "user", + "raw_string": "user" + } + ] + } + } + ] + } + } + ] + } + }, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:11:33-4:31:53", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:12:34-4:30:52", + "key": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:12:34-4:25:47", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:12:34-4:17:39", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:18:40-4:25:47", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:27:49-4:30:52", + "raw": "0.5", + "value": "1/2" + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:0:22-4:1:23", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/var-with-label.d2,4:0:22-4:1:23", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "opacity": { + "value": "0.5" + } + }, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 382f4986888fcd7653d88d7f740b1fa2c6f4e07b Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 15 Mar 2024 10:00:40 -0700 Subject: [PATCH 018/109] add shape hierarchy --- d2compiler/compile_test.go | 8 + d2renderers/d2svg/d2svg.go | 2 +- d2target/d2target.go | 3 + .../TestCompile/shape-hierarchy.exp.json | 312 ++++++++++++++++++ 4 files changed, 324 insertions(+), 1 deletion(-) create mode 100644 testdata/d2compiler/TestCompile/shape-hierarchy.exp.json diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index ec746e839..1ec2b7c0b 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -2848,6 +2848,14 @@ y.source-arrowhead.shape: cf-one expErr: `d2/testdata/d2compiler/TestCompile/no_arrowheads_in_shape.d2:1:3: "target-arrowhead" can only be used on connections d2/testdata/d2compiler/TestCompile/no_arrowheads_in_shape.d2:2:3: "source-arrowhead" can only be used on connections`, }, + { + name: "shape-hierarchy", + text: `x: { + shape: hierarchy + a -> b +} +`, + }, } for _, tc := range testCases { diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 41674e125..b36ad0380 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -1036,7 +1036,7 @@ func drawShape(writer, appendixWriter io.Writer, diagramHash string, targetShape fmt.Fprint(writer, el.Render()) // TODO should standardize "" to rectangle - case d2target.ShapeRectangle, d2target.ShapeSequenceDiagram, "": + case d2target.ShapeRectangle, d2target.ShapeSequenceDiagram, d2target.ShapeHierarchy, "": borderRadius := math.MaxFloat64 if targetShape.BorderRadius != 0 { borderRadius = float64(targetShape.BorderRadius) diff --git a/d2target/d2target.go b/d2target/d2target.go index f9153faa2..575492001 100644 --- a/d2target/d2target.go +++ b/d2target/d2target.go @@ -881,6 +881,7 @@ const ( ShapeSQLTable = "sql_table" ShapeImage = "image" ShapeSequenceDiagram = "sequence_diagram" + ShapeHierarchy = "hierarchy" ) var Shapes = []string{ @@ -907,6 +908,7 @@ var Shapes = []string{ ShapeSQLTable, ShapeImage, ShapeSequenceDiagram, + ShapeHierarchy, } func IsShape(s string) bool { @@ -974,6 +976,7 @@ var DSL_SHAPE_TO_SHAPE_TYPE = map[string]string{ ShapeSQLTable: shape.TABLE_TYPE, ShapeImage: shape.IMAGE_TYPE, ShapeSequenceDiagram: shape.SQUARE_TYPE, + ShapeHierarchy: shape.SQUARE_TYPE, } var SHAPE_TYPE_TO_DSL_SHAPE map[string]string diff --git a/testdata/d2compiler/TestCompile/shape-hierarchy.exp.json b/testdata/d2compiler/TestCompile/shape-hierarchy.exp.json new file mode 100644 index 000000000..a2f5aca09 --- /dev/null +++ b/testdata/d2compiler/TestCompile/shape-hierarchy.exp.json @@ -0,0 +1,312 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,0:0:0-4:0:35", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,0:0:0-3:1:34", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,0:3:3-3:1:34", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,1:2:7-1:18:23", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,1:2:7-1:7:12", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,1:2:7-1:7:12", + "value": [ + { + "string": "shape", + "raw_string": "shape" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,1:9:14-1:18:23", + "value": [ + { + "string": "hierarchy", + "raw_string": "hierarchy" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,2:2:26-2:8:32", + "edges": [ + { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,2:2:26-2:8:32", + "src": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,2:2:26-2:3:27", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,2:2:26-2:3:27", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,2:7:31-2:8:32", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,2:7:31-2:8:32", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "hierarchy" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,2:2:26-2:3:27", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,2:2:26-2:3:27", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,2:7:31-2:8:32", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/shape-hierarchy.d2,2:7:31-2:8:32", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": null +} From 823f6dc82f403984bb0adaf8733f5b3cb7c3d1e6 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 15 Mar 2024 14:55:18 -0700 Subject: [PATCH 019/109] treat hierarchy same as rect --- d2graph/d2graph.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index b70c887bd..31aaf1a03 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -470,7 +470,7 @@ func (obj *Object) GetFill() string { return color.N7 } - if shape == "" || strings.EqualFold(shape, d2target.ShapeSquare) || strings.EqualFold(shape, d2target.ShapeCircle) || strings.EqualFold(shape, d2target.ShapeOval) || strings.EqualFold(shape, d2target.ShapeRectangle) { + if shape == "" || strings.EqualFold(shape, d2target.ShapeSquare) || strings.EqualFold(shape, d2target.ShapeCircle) || strings.EqualFold(shape, d2target.ShapeOval) || strings.EqualFold(shape, d2target.ShapeRectangle) || strings.EqualFold(shape, d2target.ShapeHierarchy) { if level == 1 { if !obj.IsContainer() { return color.B6 From 4ffe2409a71c613a9d9d03eac6b3263b6a87938e Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 15 Mar 2024 15:26:00 -0700 Subject: [PATCH 020/109] validate position keywords --- d2compiler/compile.go | 21 +++++++++++++++++++ d2compiler/compile_test.go | 12 +++++++++++ .../fixed-pos-shape-hierarchy.exp.json | 15 +++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.exp.json diff --git a/d2compiler/compile.go b/d2compiler/compile.go index 9610ea6c3..664512b5a 100644 --- a/d2compiler/compile.go +++ b/d2compiler/compile.go @@ -90,6 +90,7 @@ func (c *compiler) compileBoard(g *d2graph.Graph, ir *d2ir.Map) *d2graph.Graph { c.validateLabels(g) c.validateNear(g) c.validateEdges(g) + c.validatePositionsCompatibility(g) c.compileBoardsField(g, ir, "layers") c.compileBoardsField(g, ir, "scenarios") @@ -1130,6 +1131,26 @@ func (c *compiler) validateNear(g *d2graph.Graph) { } +func (c *compiler) validatePositionsCompatibility(g *d2graph.Graph) { + for _, o := range g.Objects { + for _, pos := range []*d2graph.Scalar{o.Top, o.Left} { + if pos != nil { + if o.Parent != nil { + if strings.EqualFold(o.Parent.Shape.Value, d2target.ShapeHierarchy) { + c.errorf(pos.MapKey, `position keywords cannot be used with shape "hierarchy"`) + } + if o.OuterSequenceDiagram() != nil { + c.errorf(pos.MapKey, `position keywords cannot be used inside shape "sequence_diagram"`) + } + if o.Parent.GridColumns != nil || o.Parent.GridRows != nil { + c.errorf(pos.MapKey, `position keywords cannot be used with grids`) + } + } + } + } + } +} + func (c *compiler) validateEdges(g *d2graph.Graph) { for _, edge := range g.Edges { // edges from a grid to something outside is ok diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index 1ec2b7c0b..b43dec1e1 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -2856,6 +2856,18 @@ d2/testdata/d2compiler/TestCompile/no_arrowheads_in_shape.d2:2:3: "source-arrowh } `, }, + { + name: "fixed-pos-shape-hierarchy", + text: `x: { + shape: hierarchy + a -> b + a.top: 20 + a.left: 20 +} +`, + expErr: `d2/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.d2:4:2: position keywords cannot be used with shape "hierarchy" +d2/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.d2:5:2: position keywords cannot be used with shape "hierarchy"`, + }, } for _, tc := range testCases { diff --git a/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.exp.json b/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.exp.json new file mode 100644 index 000000000..e2ac1e6ee --- /dev/null +++ b/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.exp.json @@ -0,0 +1,15 @@ +{ + "graph": null, + "err": { + "errs": [ + { + "range": "d2/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.d2,3:1:34-3:10:43", + "errmsg": "d2/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.d2:4:2: position keywords cannot be used with shape \"hierarchy\"" + }, + { + "range": "d2/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.d2,4:1:45-4:11:55", + "errmsg": "d2/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.d2:5:2: position keywords cannot be used with shape \"hierarchy\"" + } + ] + } +} From ae247ae10875543f5e894e77196729eab5d01098 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Mon, 18 Mar 2024 14:45:30 -0700 Subject: [PATCH 021/109] update md fill and font-color --- d2renderers/d2svg/d2svg.go | 4 +- e2etests/stable_test.go | 4 +- .../markdown_stroke_fill/dagre/board.exp.json | 8 +- .../markdown_stroke_fill/dagre/sketch.exp.svg | 558 +++++++++--------- .../markdown_stroke_fill/elk/board.exp.json | 8 +- .../markdown_stroke_fill/elk/sketch.exp.svg | 558 +++++++++--------- 6 files changed, 571 insertions(+), 569 deletions(-) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index b36ad0380..6906c4d68 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -1370,7 +1370,9 @@ func drawShape(writer, appendixWriter io.Writer, diagramHash string, targetShape if targetShape.FontSize != textmeasure.MarkdownFontSize { styles = append(styles, fmt.Sprintf("font-size:%vpx", targetShape.FontSize)) } - + if targetShape.Fill != "" && targetShape.Fill != "transparent" { + styles = append(styles, fmt.Sprintf(`background-color:%s`, targetShape.Fill)) + } if !color.IsThemeColor(targetShape.Color) { styles = append(styles, fmt.Sprintf(`color:%s`, targetShape.Color)) } diff --git a/e2etests/stable_test.go b/e2etests/stable_test.go index 59a58208d..0b8ed4af1 100644 --- a/e2etests/stable_test.go +++ b/e2etests/stable_test.go @@ -1925,7 +1925,7 @@ a line of text and an walk into a bar. | { - style.stroke: darkorange + style.font-color: darkorange } container -> no container @@ -1935,7 +1935,7 @@ they did it in style | no container.style: { - stroke: red + font-color: red fill: "#CEEDEE" } `, diff --git a/e2etests/testdata/stable/markdown_stroke_fill/dagre/board.exp.json b/e2etests/testdata/stable/markdown_stroke_fill/dagre/board.exp.json index 93b639665..9c152eae3 100644 --- a/e2etests/testdata/stable/markdown_stroke_fill/dagre/board.exp.json +++ b/e2etests/testdata/stable/markdown_stroke_fill/dagre/board.exp.json @@ -58,7 +58,7 @@ "strokeWidth": 2, "borderRadius": 0, "fill": "transparent", - "stroke": "darkorange", + "stroke": "N1", "shadow": false, "3d": false, "multiple": false, @@ -75,7 +75,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", - "color": "N1", + "color": "darkorange", "italic": false, "bold": false, "underline": false, @@ -98,7 +98,7 @@ "strokeWidth": 2, "borderRadius": 0, "fill": "#CEEDEE", - "stroke": "red", + "stroke": "N1", "shadow": false, "3d": false, "multiple": false, @@ -115,7 +115,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", - "color": "N1", + "color": "red", "italic": false, "bold": false, "underline": false, diff --git a/e2etests/testdata/stable/markdown_stroke_fill/dagre/sketch.exp.svg b/e2etests/testdata/stable/markdown_stroke_fill/dagre/sketch.exp.svg index fec09481b..4a8c6a24d 100644 --- a/e2etests/testdata/stable/markdown_stroke_fill/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/markdown_stroke_fill/dagre/sketch.exp.svg @@ -1,20 +1,20 @@ -container

they did it in style

-

a header

+container

they did it in style

+

a header

a line of text and an

{
 	indented: "block",
@@ -845,7 +845,7 @@
 }
 

walk into a bar.

-
+
diff --git a/e2etests/testdata/stable/markdown_stroke_fill/elk/board.exp.json b/e2etests/testdata/stable/markdown_stroke_fill/elk/board.exp.json index 152457511..3a3f429c3 100644 --- a/e2etests/testdata/stable/markdown_stroke_fill/elk/board.exp.json +++ b/e2etests/testdata/stable/markdown_stroke_fill/elk/board.exp.json @@ -58,7 +58,7 @@ "strokeWidth": 2, "borderRadius": 0, "fill": "transparent", - "stroke": "darkorange", + "stroke": "N1", "shadow": false, "3d": false, "multiple": false, @@ -75,7 +75,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", - "color": "N1", + "color": "darkorange", "italic": false, "bold": false, "underline": false, @@ -98,7 +98,7 @@ "strokeWidth": 2, "borderRadius": 0, "fill": "#CEEDEE", - "stroke": "red", + "stroke": "N1", "shadow": false, "3d": false, "multiple": false, @@ -115,7 +115,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", - "color": "N1", + "color": "red", "italic": false, "bold": false, "underline": false, diff --git a/e2etests/testdata/stable/markdown_stroke_fill/elk/sketch.exp.svg b/e2etests/testdata/stable/markdown_stroke_fill/elk/sketch.exp.svg index 24bea82fe..4c439878d 100644 --- a/e2etests/testdata/stable/markdown_stroke_fill/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/markdown_stroke_fill/elk/sketch.exp.svg @@ -1,20 +1,20 @@ -container

they did it in style

-

a header

+container

they did it in style

+

a header

a line of text and an

{
 	indented: "block",
@@ -845,7 +845,7 @@
 }
 

walk into a bar.

-
+
From c76bc9f368be9763cca191e92b486511689d5063 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Mon, 18 Mar 2024 15:51:54 -0700 Subject: [PATCH 022/109] changelog --- ci/release/changelogs/next.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 9a1c1d525..b99feeaea 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -12,3 +12,4 @@ - Fixes styles in connections not overriding styles set by globs [#1857](https://github.com/terrastruct/d2/pull/1857) - Fixes `null` being set on a nested shape not working in certain cases when connections also pointed to that shape [#1830](https://github.com/terrastruct/d2/pull/1830) - Fixes edge case of bad import syntax crashing using d2 as a library [#1829](https://github.com/terrastruct/d2/pull/1829) +- Fixes `style.fill` not applying to markdown [#1872](https://github.com/terrastruct/d2/pull/1872) From 59f10060907c2054521619d659b23b1747a06f55 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 20 Mar 2024 15:52:15 -0700 Subject: [PATCH 023/109] make get writeable refs public --- d2oracle/edit.go | 32 +++++++------------------------- d2oracle/get.go | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 376fb9e16..ec622e415 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -199,7 +199,7 @@ func ReconnectEdge(g *d2graph.Graph, boardPath []string, edgeKey string, srcKey, refs := edge.References if baseAST != g.AST { - refs = getWriteableEdgeRefs(edge, baseAST) + refs = GetWriteableEdgeRefs(edge, baseAST) if len(refs) == 0 || refs[0].ScopeAST != baseAST { // TODO null return nil, OutsideScopeError{} @@ -387,7 +387,7 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) var maybeNewScope *d2ast.Map if baseAST != g.AST || imported { - writeableRefs := getWriteableRefs(obj, baseAST) + writeableRefs := GetWriteableRefs(obj, baseAST) for _, ref := range writeableRefs { if ref.MapKey != nil && ref.MapKey.Value.Map != nil { maybeNewScope = ref.MapKey.Value.Map @@ -414,7 +414,7 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) writeableLabelMK := true var objK *d2ast.Key if baseAST != g.AST || imported { - writeableRefs := getWriteableRefs(obj, baseAST) + writeableRefs := GetWriteableRefs(obj, baseAST) if len(writeableRefs) > 0 { objK = writeableRefs[0].MapKey } @@ -497,7 +497,7 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) imported = IsImportedEdge(baseAST, edge) refs := edge.References if baseAST != g.AST || imported { - refs = getWriteableEdgeRefs(edge, baseAST) + refs = GetWriteableEdgeRefs(edge, baseAST) } onlyInChain := true for _, ref := range refs { @@ -920,7 +920,7 @@ func Delete(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, } else { refs := e.References if len(boardPath) > 0 { - refs := getWriteableEdgeRefs(e, baseAST) + refs := GetWriteableEdgeRefs(e, baseAST) if len(refs) != len(e.References) { mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) } @@ -991,7 +991,7 @@ func Delete(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, return g, nil } if len(boardPath) > 0 { - writeableRefs := getWriteableRefs(obj, baseAST) + writeableRefs := GetWriteableRefs(obj, baseAST) if len(writeableRefs) != len(obj.References) { mk.Value = d2ast.MakeValueBox(&d2ast.Null{}) } @@ -1759,7 +1759,7 @@ func move(g *d2graph.Graph, boardPath []string, key, newKey string, includeDesce } if len(boardPath) > 0 { - writeableRefs := getWriteableRefs(obj, baseAST) + writeableRefs := GetWriteableRefs(obj, baseAST) if len(writeableRefs) != len(obj.References) { return nil, OutsideScopeError{} } @@ -3226,21 +3226,3 @@ func filterReservedPath(path []*d2ast.StringBox) (filtered []*d2ast.StringBox) { } return } - -func getWriteableRefs(obj *d2graph.Object, writeableAST *d2ast.Map) (out []d2graph.Reference) { - for i, ref := range obj.References { - if ref.ScopeAST == writeableAST && ref.Key.Range.Path == writeableAST.Range.Path { - out = append(out, obj.References[i]) - } - } - return -} - -func getWriteableEdgeRefs(edge *d2graph.Edge, writeableAST *d2ast.Map) (out []d2graph.EdgeReference) { - for i, ref := range edge.References { - if ref.ScopeAST == writeableAST { - out = append(out, edge.References[i]) - } - } - return -} diff --git a/d2oracle/get.go b/d2oracle/get.go index 6b8b2e259..3883bc24e 100644 --- a/d2oracle/get.go +++ b/d2oracle/get.go @@ -245,3 +245,21 @@ func GetID(key string) string { return d2format.Format(d2ast.RawString(mk.Key.Path[len(mk.Key.Path)-1].Unbox().ScalarString(), true)) } + +func GetWriteableRefs(obj *d2graph.Object, writeableAST *d2ast.Map) (out []d2graph.Reference) { + for i, ref := range obj.References { + if ref.ScopeAST == writeableAST && ref.Key.Range.Path == writeableAST.Range.Path { + out = append(out, obj.References[i]) + } + } + return +} + +func GetWriteableEdgeRefs(edge *d2graph.Edge, writeableAST *d2ast.Map) (out []d2graph.EdgeReference) { + for i, ref := range edge.References { + if ref.ScopeAST == writeableAST { + out = append(out, edge.References[i]) + } + } + return +} From 600bc093bbf6631b0a3f4ef482c57d18de53f4cb Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 20 Mar 2024 16:03:09 -0700 Subject: [PATCH 024/109] prevent cycle in d2chaos sequence diagram --- d2chaos/d2chaos.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/d2chaos/d2chaos.go b/d2chaos/d2chaos.go index 96f9cd906..bf6961d4e 100644 --- a/d2chaos/d2chaos.go +++ b/d2chaos/d2chaos.go @@ -137,6 +137,9 @@ func (gs *dslGenState) edge() error { if err != nil { return err } + if src == dst && gs.nodeShapes[dst] == d2target.ShapeSequenceDiagram { + break + } if gs.findOuterSequenceDiagram(src) == gs.findOuterSequenceDiagram(dst) { break } From b18e6ee0c4c1122d8b8fbf552c0e906d25ba8717 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 20 Mar 2024 16:10:48 -0700 Subject: [PATCH 025/109] ta --- .../testdata/TestCLI_E2E/empty-base.exp.svg | 166 +++++++++--------- 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg b/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg index 8606e515d..9e791f1e1 100644 --- a/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg +++ b/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg @@ -1,9 +1,9 @@ ab +}]]>ab -abdc - +abdc + - - -abdce + + +abdce From 07156b14b21c3a6ec5446e451b247b352ec112b4 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 20 Mar 2024 16:18:44 -0700 Subject: [PATCH 026/109] what --- .../testdata/TestCLI_E2E/empty-base.exp.svg | 166 +++++++++--------- 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg b/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg index 9e791f1e1..8606e515d 100644 --- a/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg +++ b/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg @@ -1,9 +1,9 @@ ab +}]]>ab -abdc - +abdc + - - -abdce + + +abdce From 2187bf78a86a13d341844d4bb18cee26813a1e48 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 20 Mar 2024 16:21:40 -0700 Subject: [PATCH 027/109] fix --- d2chaos/d2chaos.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/d2chaos/d2chaos.go b/d2chaos/d2chaos.go index bf6961d4e..42445a974 100644 --- a/d2chaos/d2chaos.go +++ b/d2chaos/d2chaos.go @@ -137,9 +137,6 @@ func (gs *dslGenState) edge() error { if err != nil { return err } - if src == dst && gs.nodeShapes[dst] == d2target.ShapeSequenceDiagram { - break - } if gs.findOuterSequenceDiagram(src) == gs.findOuterSequenceDiagram(dst) { break } @@ -149,6 +146,10 @@ func (gs *dslGenState) edge() error { } } + if src == dst && gs.nodeShapes[dst] == d2target.ShapeSequenceDiagram { + return nil + } + srcArrow := "-" if gs.randBool() { srcArrow = "<" From f55dd43303c36cd97c5dcd7e411a85e5863baafd Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sun, 24 Mar 2024 14:47:33 -0700 Subject: [PATCH 028/109] d2oracle: fix deleting nested board --- d2oracle/edit.go | 11 +- d2oracle/edit_test.go | 18 ++ .../TestDelete/delete-layer-style.exp.json | 222 ++++++++++++++++++ 3 files changed, 249 insertions(+), 2 deletions(-) create mode 100644 testdata/d2oracle/TestDelete/delete-layer-style.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index ec622e415..9404848a8 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -890,7 +890,7 @@ func Delete(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, baseAST = boardG.BaseAST } - g2, err := deleteReserved(g, baseAST, mk) + g2, err := deleteReserved(g, boardPath, baseAST, mk) if err != nil { return nil, err } @@ -1228,7 +1228,7 @@ func renameConflictsToParent(g *d2graph.Graph, key *d2ast.KeyPath) (*d2graph.Gra return g, nil } -func deleteReserved(g *d2graph.Graph, baseAST *d2ast.Map, mk *d2ast.Key) (*d2graph.Graph, error) { +func deleteReserved(g *d2graph.Graph, boardPath []string, baseAST *d2ast.Map, mk *d2ast.Key) (*d2graph.Graph, error) { targetKey := mk.Key if len(mk.Edges) == 1 { if mk.EdgeKey == nil { @@ -1243,6 +1243,13 @@ func deleteReserved(g *d2graph.Graph, baseAST *d2ast.Map, mk *d2ast.Key) (*d2gra var e *d2graph.Edge obj := g.Root + if len(boardPath) > 0 { + boardG := GetBoardGraph(g, boardPath) + if boardG == nil { + return nil, fmt.Errorf("board %v not found", boardPath) + } + obj = boardG.Root + } if len(mk.Edges) == 1 { if mk.Key != nil { var ok bool diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index f1185b780..aefc50eb5 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -7618,6 +7618,24 @@ a exp: `*.b a a.b: null +`, + }, + { + name: "delete-layer-style", + + text: `layers: { + x: { + a.style.fill: red + } +} +`, + boardPath: []string{"x"}, + key: `a.style.fill`, + exp: `layers: { + x: { + a + } +} `, }, } diff --git a/testdata/d2oracle/TestDelete/delete-layer-style.exp.json b/testdata/d2oracle/TestDelete/delete-layer-style.exp.json new file mode 100644 index 000000000..20456afbb --- /dev/null +++ b/testdata/d2oracle/TestDelete/delete-layer-style.exp.json @@ -0,0 +1,222 @@ +{ + "graph": { + "name": "", + "isFolderOnly": true, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,0:0:0-5:0:29", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,0:0:0-4:1:28", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,0:8:8-4:1:28", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,1:2:12-3:3:26", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,1:2:12-1:3:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,1:2:12-1:3:13", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,1:5:15-3:3:26", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,2:4:21-2:5:22", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,2:4:21-2:5:22", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,2:4:21-2:5:22", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": null, + "layers": [ + { + "name": "x", + "isFolderOnly": false, + "ast": { + "range": ",1:0:0-2:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,2:4:21-2:5:22", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-style.d2,2:4:21-2:5:22", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + } + ] + }, + "err": "" +} From 3d75165fd6e085ced845e7305330ec412beb3ace Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sun, 24 Mar 2024 14:50:58 -0700 Subject: [PATCH 029/109] delete imported --- d2oracle/edit_test.go | 39 ++++ .../delete-imported-layer-obj.exp.json | 177 ++++++++++++++++++ .../TestDelete/delete-layer-obj.exp.json | 89 +++++++++ 3 files changed, 305 insertions(+) create mode 100644 testdata/d2oracle/TestDelete/delete-imported-layer-obj.exp.json create mode 100644 testdata/d2oracle/TestDelete/delete-layer-obj.exp.json diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index aefc50eb5..19f494591 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -7618,6 +7618,45 @@ a exp: `*.b a a.b: null +`, + }, + { + name: "delete-imported-layer-obj", + + text: `layers: { + x: { + ...@meow + } +} +`, + fsTexts: map[string]string{ + "meow.d2": `a +`, + }, + boardPath: []string{"x"}, + key: `a`, + exp: `layers: { + x: { + ...@meow + a: null + } +} +`, + }, + { + name: "delete-layer-obj", + + text: `layers: { + x: { + a + } +} +`, + boardPath: []string{"x"}, + key: `a`, + exp: `layers: { + x +} `, }, { diff --git a/testdata/d2oracle/TestDelete/delete-imported-layer-obj.exp.json b/testdata/d2oracle/TestDelete/delete-imported-layer-obj.exp.json new file mode 100644 index 000000000..30afa7877 --- /dev/null +++ b/testdata/d2oracle/TestDelete/delete-imported-layer-obj.exp.json @@ -0,0 +1,177 @@ +{ + "graph": { + "name": "", + "isFolderOnly": true, + "ast": { + "range": "index.d2,0:0:0-6:0:48", + "nodes": [ + { + "map_key": { + "range": "index.d2,0:0:0-5:1:47", + "key": { + "range": "index.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "index.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "index.d2,0:8:8-5:1:47", + "nodes": [ + { + "map_key": { + "range": "index.d2,1:2:12-4:3:45", + "key": { + "range": "index.d2,1:2:12-1:3:13", + "path": [ + { + "unquoted_string": { + "range": "index.d2,1:2:12-1:3:13", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "index.d2,1:5:15-4:3:45", + "nodes": [ + { + "import": { + "range": "index.d2,2:4:21-2:12:29", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "index.d2,2:8:25-2:12:29", + "value": [ + { + "string": "meow", + "raw_string": "meow" + } + ] + } + } + ] + } + }, + { + "map_key": { + "range": "index.d2,3:4:34-3:11:41", + "key": { + "range": "index.d2,3:4:34-3:5:35", + "path": [ + { + "unquoted_string": { + "range": "index.d2,3:4:34-3:5:35", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "null": { + "range": "index.d2,3:7:37-3:11:41" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": null, + "layers": [ + { + "name": "x", + "isFolderOnly": true, + "ast": { + "range": ",1:0:0-2:0:0", + "nodes": null + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": null + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestDelete/delete-layer-obj.exp.json b/testdata/d2oracle/TestDelete/delete-layer-obj.exp.json new file mode 100644 index 000000000..5db3c1df3 --- /dev/null +++ b/testdata/d2oracle/TestDelete/delete-layer-obj.exp.json @@ -0,0 +1,89 @@ +{ + "graph": { + "name": "", + "isFolderOnly": true, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-obj.d2,0:0:0-3:0:16", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-obj.d2,0:0:0-2:1:15", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-obj.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-obj.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-obj.d2,0:8:8-2:1:15", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-obj.d2,1:2:12-1:3:13", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-obj.d2,1:2:12-1:3:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-layer-obj.d2,1:2:12-1:3:13", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": null + }, + "err": "" +} From 5b56c5aa11fe3571af19a2835af2b1a683cbfcf5 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sun, 24 Mar 2024 14:53:01 -0700 Subject: [PATCH 030/109] another test --- d2oracle/edit_test.go | 20 ++ .../TestDelete/delete-not-layer-obj.exp.json | 291 ++++++++++++++++++ 2 files changed, 311 insertions(+) create mode 100644 testdata/d2oracle/TestDelete/delete-not-layer-obj.exp.json diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 19f494591..3bb567b13 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -7641,6 +7641,26 @@ a.b: null a: null } } +`, + }, + { + name: "delete-not-layer-obj", + + text: `b.style.fill: red +layers: { + x: { + a + } +} +`, + key: `b.style.fill`, + exp: `b + +layers: { + x: { + a + } +} `, }, { diff --git a/testdata/d2oracle/TestDelete/delete-not-layer-obj.exp.json b/testdata/d2oracle/TestDelete/delete-not-layer-obj.exp.json new file mode 100644 index 000000000..37074912a --- /dev/null +++ b/testdata/d2oracle/TestDelete/delete-not-layer-obj.exp.json @@ -0,0 +1,291 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,0:0:0-7:0:32", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,0:0:0-0:1:1", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,0:0:0-0:1:1", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,2:0:3-6:1:31", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,2:0:3-2:6:9", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,2:0:3-2:6:9", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,2:8:11-6:1:31", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,3:2:15-5:3:29", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,3:2:15-3:3:16", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,3:2:15-3:3:16", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,3:5:18-5:3:29", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,4:4:24-4:5:25", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,4:4:24-4:5:25", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,4:4:24-4:5:25", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,0:0:0-0:1:1", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "layers": [ + { + "name": "x", + "isFolderOnly": false, + "ast": { + "range": ",1:0:0-2:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,4:4:24-4:5:25", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/delete-not-layer-obj.d2,4:4:24-4:5:25", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + } + ] + }, + "err": "" +} From 318f8df3ef072f08f4e56002fe636396b3e928d0 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 25 Mar 2024 09:37:54 -0700 Subject: [PATCH 031/109] update outdated readme example --- README.md | 65 ++++++++---- docs/assets/example.svg | 214 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 260 insertions(+), 19 deletions(-) create mode 100644 docs/assets/example.svg diff --git a/README.md b/README.md index ebf199e30..1ab3e40d9 100644 --- a/README.md +++ b/README.md @@ -46,34 +46,61 @@ https://user-images.githubusercontent.com/3120367/206125010-bd1fea8e-248a-43e7-8 ## What does D2 look like? ```d2 -# Actors -hans: Hans Niemann +vars: { + d2-config: { + layout-engine: elk + # Terminal theme code + theme-id: 300 + } +} +network: { + cell tower: { + satellites: { + shape: stored_data + style.multiple: true + } -defendants: { - mc: Magnus Carlsen - playmagnus: Play Magnus Group - chesscom: Chess.com - naka: Hikaru Nakamura + transmitter - mc -> playmagnus: Owns majority - playmagnus <-> chesscom: Merger talks - chesscom -> naka: Sponsoring + satellites -> transmitter: send + satellites -> transmitter: send + satellites -> transmitter: send + } + + online portal: { + ui: {shape: hexagon} + } + + data processor: { + storage: { + shape: cylinder + style.multiple: true + } + } + + cell tower.transmitter -> data processor.storage: phone logs } -# Accusations -hans -> defendants: 'sueing for $100M' +user: { + shape: person + width: 130 +} -# Claim -defendants.naka -> hans: Accused of cheating on his stream -defendants.mc -> hans: Lost then withdrew with accusations -defendants.chesscom -> hans: 72 page report of cheating +user -> network.cell tower: make call +user -> network.online portal.ui: access { + style.stroke-dash: 3 +} + +api server -> network.online portal.ui: display +api server -> logs: persist +logs: {shape: page; style.multiple: true} + +network.data processor -> api server ``` > There is syntax highlighting with the editor plugins linked below. -
D2 render example - -> Rendered with the TALA layout engine. +D2 render example > For more examples, see [./docs/examples](./docs/examples). diff --git a/docs/assets/example.svg b/docs/assets/example.svg new file mode 100644 index 000000000..1e0fd8c9e --- /dev/null +++ b/docs/assets/example.svg @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +NETWORKUSERAPI SERVERLOGSCELL TOWERONLINE PORTALDATA PROCESSORSATELLITESTRANSMITTERUISTORAGE SENDSENDSENDPHONE LOGSMAKE CALL ACCESSDISPLAYPERSIST + + + + + + + + + + From cf9cfa15c7850ee2e898e8faa4535504a2c4b773 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 25 Mar 2024 09:40:24 -0700 Subject: [PATCH 032/109] update --- README.md | 4 +- docs/assets/example.svg | 344 +++++++++++++++++++++------------------- docs/assets/syntax.png | Bin 86106 -> 0 bytes 3 files changed, 183 insertions(+), 165 deletions(-) delete mode 100644 docs/assets/syntax.png diff --git a/README.md b/README.md index 1ab3e40d9..52b257077 100644 --- a/README.md +++ b/README.md @@ -98,10 +98,10 @@ logs: {shape: page; style.multiple: true} network.data processor -> api server ``` -> There is syntax highlighting with the editor plugins linked below. - D2 render example +> Open in [playground](https://play.d2lang.com/?script=rVLLTsQwDLznKyJxbrWwtyLxFdyR1Zg2ahpHibvLCvXfcdqGfSHthVv8yIxn7APE1OhvpbV5qVryn7ZbQ60dnGjiCn1nPTYa3bCkn_Q7xtF6cJp7HFG3ZHCpLGFlTaP3u51kZjUrj3ykOKyYLTr5REeMhSMBS84yppKRXA9B-BJTRPNhgKEU-OSwHifHNjjp4DitxLNa-SP4NFpmjOoGXVdvl2VBR2_-sWeZgLwTp3SgyOCKnsnKa5PU4xd05OfyIWvTIVKLKdHZExEOHd4Z0p4E3oi2h25s8Ge764uZs4Rr4vqXMfQkAhx1SVanplQWtU0QMCbyEh-t4b7Rz_td6cuo267ryzWPMMiFgHN3XVdu1dkmaPM8K-EiLnGkASsDScj2mQqCFcvj4RGUsSnI_d70Z2GrCptYrVHZTRADXv80VWgL0bVvGfJMoH4A) + > For more examples, see [./docs/examples](./docs/examples). ## Quickstart diff --git a/docs/assets/example.svg b/docs/assets/example.svg index 1e0fd8c9e..5e8340add 100644 --- a/docs/assets/example.svg +++ b/docs/assets/example.svg @@ -1,17 +1,24 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ab + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/none-fill/elk/board.exp.json b/e2etests/testdata/txtar/none-fill/elk/board.exp.json new file mode 100644 index 000000000..444981e85 --- /dev/null +++ b/e2etests/testdata/txtar/none-fill/elk/board.exp.json @@ -0,0 +1,140 @@ +{ + "name": "", + "config": { + "sketch": null, + "themeID": 302, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "fillPattern": "none", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 85, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "fillPattern": "paper", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/none-fill/elk/sketch.exp.svg b/e2etests/testdata/txtar/none-fill/elk/sketch.exp.svg new file mode 100644 index 000000000..3eeaac7f5 --- /dev/null +++ b/e2etests/testdata/txtar/none-fill/elk/sketch.exp.svg @@ -0,0 +1,1160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ab + + + + \ No newline at end of file diff --git a/testdata/d2compiler/TestCompile/invalid-fill-pattern.exp.json b/testdata/d2compiler/TestCompile/invalid-fill-pattern.exp.json index 3d31630e8..11cdc33e5 100644 --- a/testdata/d2compiler/TestCompile/invalid-fill-pattern.exp.json +++ b/testdata/d2compiler/TestCompile/invalid-fill-pattern.exp.json @@ -4,7 +4,7 @@ "errs": [ { "range": "d2/testdata/d2compiler/TestCompile/invalid-fill-pattern.d2,2:18:33-2:23:38", - "errmsg": "d2/testdata/d2compiler/TestCompile/invalid-fill-pattern.d2:3:19: expected \"fill-pattern\" to be one of: dots, lines, grain, paper" + "errmsg": "d2/testdata/d2compiler/TestCompile/invalid-fill-pattern.d2:3:19: expected \"fill-pattern\" to be one of: none, dots, lines, grain, paper" } ] } From 06e335799e129a2f2e38381d17c4297a03d21d03 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 25 Mar 2024 20:52:47 -0500 Subject: [PATCH 038/109] add test --- d2oracle/edit_test.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 3bb567b13..c34f72e39 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -2454,6 +2454,29 @@ a -> b exp: `(* -> *)[*].style.stroke: red a -> b: {style.stroke: green} a -> b +`, + }, + { + name: "nested-edge-chained", + + text: `a: { + b: { + c + } +} + +x -> a.b -> a.b.c +`, + key: `(a.b -> a.b.c)[0].style.stroke`, + value: go2.Pointer(`green`), + exp: `a: { + b: { + c + } +} + +x -> a.b -> a.b.c +(a.b -> a.b.c)[0].style.stroke: green `, }, } From 6826ee4f69873704bfe432e9aae2a935b9d2c409 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 29 Mar 2024 00:16:42 -0700 Subject: [PATCH 039/109] fix --- d2oracle/edit.go | 16 +- d2oracle/edit_test.go | 27 +- .../TestSet/nested-edge-chained.exp.json | 1053 +++++++++++++++ .../TestSet/nested-edge-chained/1.exp.json | 1053 +++++++++++++++ .../TestSet/nested-edge-chained/2.exp.json | 1127 +++++++++++++++++ 5 files changed, 3273 insertions(+), 3 deletions(-) create mode 100644 testdata/d2oracle/TestSet/nested-edge-chained.exp.json create mode 100644 testdata/d2oracle/TestSet/nested-edge-chained/1.exp.json create mode 100644 testdata/d2oracle/TestSet/nested-edge-chained/2.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 9404848a8..17ea7caae 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -500,7 +500,11 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) refs = GetWriteableEdgeRefs(edge, baseAST) } onlyInChain := true - for _, ref := range refs { + var earliestRef *d2graph.EdgeReference + for i, ref := range refs { + if earliestRef == nil || ref.MapKey.Range.Before(earliestRef.MapKey.Range) { + earliestRef = &refs[i] + } // TODO merge flat edgekeys // E.g. this can group into a map // (y -> z)[0].style.opacity: 0.4 @@ -526,7 +530,15 @@ func _set(g *d2graph.Graph, baseAST *d2ast.Map, key string, tag, value *string) } } if onlyInChain { - appendMapKey(scope, mk) + if earliestRef != nil && scope.Range.Before(earliestRef.MapKey.Range) { + // Since the original mk was trimmed to common, we set to the edge that + // the ref's scope is in + mk.Edges[0] = earliestRef.Edge + // We can't reference an edge before it's been defined + earliestRef.Scope.InsertAfter(earliestRef.MapKey, mk) + } else { + appendMapKey(scope, mk) + } return nil } attrs = edge.Attributes diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index c34f72e39..51046b753 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -2457,7 +2457,7 @@ a -> b `, }, { - name: "nested-edge-chained", + name: "nested-edge-chained/1", text: `a: { b: { @@ -2477,6 +2477,31 @@ x -> a.b -> a.b.c x -> a.b -> a.b.c (a.b -> a.b.c)[0].style.stroke: green +`, + }, + { + name: "nested-edge-chained/2", + + text: `z: { + a: { + b: { + c + } + } + x -> a.b -> a.b.c +} +`, + key: `(z.a.b -> z.a.b.c)[0].style.stroke`, + value: go2.Pointer(`green`), + exp: `z: { + a: { + b: { + c + } + } + x -> a.b -> a.b.c + (a.b -> a.b.c)[0].style.stroke: green +} `, }, } diff --git a/testdata/d2oracle/TestSet/nested-edge-chained.exp.json b/testdata/d2oracle/TestSet/nested-edge-chained.exp.json new file mode 100644 index 000000000..15c90b207 --- /dev/null +++ b/testdata/d2oracle/TestSet/nested-edge-chained.exp.json @@ -0,0 +1,1053 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,0:0:0-8:0:81", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,0:0:0-4:1:23", + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,0:3:3-4:1:23", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,1:2:7-3:3:21", + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,1:2:7-1:3:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,1:2:7-1:3:8", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,1:5:10-3:3:21", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,2:4:16-2:5:17", + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,2:4:16-2:5:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,2:4:16-2:5:17", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:0:25-6:17:42", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:0:25-6:8:33", + "src": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:0:25-6:1:26", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:0:25-6:1:26", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:17:42", + "src": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:12:37-6:17:42", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:12:37-6:13:38", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:14:39-6:15:40", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:16:41-6:17:42", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:0:43-7:37:80", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:1:44-7:13:56", + "src": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:1:44-7:4:47", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:1:44-7:2:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:3:46-7:4:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:8:51-7:13:56", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:8:51-7:9:52", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:10:53-7:11:54", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:12:55-7:13:56", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:14:57-7:17:60", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:18:61-7:30:73", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:18:61-7:23:66", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:24:67-7:30:73", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:32:75-7:37:80", + "value": [ + { + "string": "green", + "raw_string": "green" + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 1 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "green" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:12:37-6:17:42", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:12:37-6:13:38", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:14:39-6:15:40", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:16:41-6:17:42", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:1:44-7:4:47", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:1:44-7:2:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:3:46-7:4:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:8:51-7:13:56", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:8:51-7:9:52", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:10:53-7:11:54", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:12:55-7:13:56", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,1:2:7-1:3:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,1:2:7-1:3:8", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:12:37-6:17:42", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:12:37-6:13:38", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:14:39-6:15:40", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:16:41-6:17:42", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:1:44-7:4:47", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:1:44-7:2:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:3:46-7:4:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:8:51-7:13:56", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:8:51-7:9:52", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:10:53-7:11:54", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:12:55-7:13:56", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "c", + "id_val": "c", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,2:4:16-2:5:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,2:4:16-2:5:17", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:12:37-6:17:42", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:12:37-6:13:38", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:14:39-6:15:40", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:16:41-6:17:42", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 2, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:8:51-7:13:56", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:8:51-7:9:52", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:10:53-7:11:54", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,7:12:55-7:13:56", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 2, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "c" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:0:25-6:1:26", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained.d2,6:0:25-6:1:26", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/nested-edge-chained/1.exp.json b/testdata/d2oracle/TestSet/nested-edge-chained/1.exp.json new file mode 100644 index 000000000..892a665c1 --- /dev/null +++ b/testdata/d2oracle/TestSet/nested-edge-chained/1.exp.json @@ -0,0 +1,1053 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,0:0:0-8:0:81", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,0:0:0-4:1:23", + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,0:3:3-4:1:23", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,1:2:7-3:3:21", + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,1:2:7-1:3:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,1:2:7-1:3:8", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,1:5:10-3:3:21", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,2:4:16-2:5:17", + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,2:4:16-2:5:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,2:4:16-2:5:17", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:0:25-6:17:42", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:0:25-6:8:33", + "src": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:0:25-6:1:26", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:0:25-6:1:26", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:17:42", + "src": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:12:37-6:17:42", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:12:37-6:13:38", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:14:39-6:15:40", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:16:41-6:17:42", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:0:43-7:37:80", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:1:44-7:13:56", + "src": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:1:44-7:4:47", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:1:44-7:2:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:3:46-7:4:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:8:51-7:13:56", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:8:51-7:9:52", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:10:53-7:11:54", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:12:55-7:13:56", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:14:57-7:17:60", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:18:61-7:30:73", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:18:61-7:23:66", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:24:67-7:30:73", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:32:75-7:37:80", + "value": [ + { + "string": "green", + "raw_string": "green" + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 1 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "green" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:12:37-6:17:42", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:12:37-6:13:38", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:14:39-6:15:40", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:16:41-6:17:42", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:1:44-7:4:47", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:1:44-7:2:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:3:46-7:4:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:8:51-7:13:56", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:8:51-7:9:52", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:10:53-7:11:54", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:12:55-7:13:56", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,1:2:7-1:3:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,1:2:7-1:3:8", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:8:33", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:5:30-6:6:31", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:7:32-6:8:33", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:12:37-6:17:42", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:12:37-6:13:38", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:14:39-6:15:40", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:16:41-6:17:42", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:1:44-7:4:47", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:1:44-7:2:45", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:3:46-7:4:47", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:8:51-7:13:56", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:8:51-7:9:52", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:10:53-7:11:54", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:12:55-7:13:56", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "c", + "id_val": "c", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,2:4:16-2:5:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,2:4:16-2:5:17", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:12:37-6:17:42", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:12:37-6:13:38", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:14:39-6:15:40", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:16:41-6:17:42", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 2, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:8:51-7:13:56", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:8:51-7:9:52", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:10:53-7:11:54", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,7:12:55-7:13:56", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 2, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "c" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:0:25-6:1:26", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/1.d2,6:0:25-6:1:26", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/nested-edge-chained/2.exp.json b/testdata/d2oracle/TestSet/nested-edge-chained/2.exp.json new file mode 100644 index 000000000..162b3f2a5 --- /dev/null +++ b/testdata/d2oracle/TestSet/nested-edge-chained/2.exp.json @@ -0,0 +1,1127 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,0:0:0-9:0:101", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,0:0:0-8:1:100", + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,0:3:3-8:1:100", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,1:2:7-5:3:38", + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,1:2:7-1:3:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,1:2:7-1:3:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,1:5:10-5:3:38", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,2:4:16-4:5:34", + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,2:4:16-2:5:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,2:4:16-2:5:17", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,2:7:19-4:5:34", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,3:6:27-3:7:28", + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,3:6:27-3:7:28", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:2:41-6:19:58", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:2:41-6:10:49", + "src": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:2:41-6:3:42", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:2:41-6:3:42", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:10:49", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:8:47", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:9:48-6:10:49", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:19:58", + "src": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:10:49", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:8:47", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:9:48-6:10:49", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:14:53-6:19:58", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:14:53-6:15:54", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:16:55-6:17:56", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:18:57-6:19:58", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:2:61-7:39:98", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:3:62-7:15:74", + "src": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:3:62-7:6:65", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:3:62-7:4:63", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:5:64-7:6:65", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:10:69-7:15:74", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:10:69-7:11:70", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:12:71-7:13:72", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:14:73-7:15:74", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:16:75-7:19:78", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:20:79-7:32:91", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:20:79-7:25:84", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:26:85-7:32:91", + "value": [ + { + "string": "stroke", + "raw_string": "stroke" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:34:93-7:39:98", + "value": [ + { + "string": "green", + "raw_string": "green" + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 1 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "stroke": { + "value": "green" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "z", + "id_val": "z", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "z", + "raw_string": "z" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "z" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,1:2:7-1:3:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,1:2:7-1:3:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:10:49", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:8:47", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:9:48-6:10:49", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:10:49", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:8:47", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:9:48-6:10:49", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:14:53-6:19:58", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:14:53-6:15:54", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:16:55-6:17:56", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:18:57-6:19:58", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:3:62-7:6:65", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:3:62-7:4:63", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:5:64-7:6:65", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:10:69-7:15:74", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:10:69-7:11:70", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:12:71-7:13:72", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:14:73-7:15:74", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,2:4:16-2:5:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,2:4:16-2:5:17", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:10:49", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:8:47", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:9:48-6:10:49", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:10:49", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:7:46-6:8:47", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:9:48-6:10:49", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:14:53-6:19:58", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:14:53-6:15:54", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:16:55-6:17:56", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:18:57-6:19:58", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:3:62-7:6:65", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:3:62-7:4:63", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:5:64-7:6:65", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:10:69-7:15:74", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:10:69-7:11:70", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:12:71-7:13:72", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:14:73-7:15:74", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 1, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "c", + "id_val": "c", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,3:6:27-3:7:28", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,3:6:27-3:7:28", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:14:53-6:19:58", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:14:53-6:15:54", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:16:55-6:17:56", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:18:57-6:19:58", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 2, + "map_key_edge_index": 1 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:10:69-7:15:74", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:10:69-7:11:70", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:12:71-7:13:72", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,7:14:73-7:15:74", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "key_path_index": 2, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "c" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:2:41-6:3:42", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/nested-edge-chained/2.d2,6:2:41-6:3:42", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 9ed7093527cd522315c6a284a34da5a1237cd42f Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 29 Mar 2024 00:40:22 -0700 Subject: [PATCH 040/109] test --- d2compiler/compile.go | 16 +- d2compiler/compile_test.go | 18 ++ .../vars/basic/double-border.exp.json | 234 ++++++++++++++++++ .../vars/basic/invalid-double-border.exp.json | 11 + 4 files changed, 271 insertions(+), 8 deletions(-) create mode 100644 testdata/d2compiler/TestCompile2/vars/basic/double-border.exp.json create mode 100644 testdata/d2compiler/TestCompile2/vars/basic/invalid-double-border.exp.json diff --git a/d2compiler/compile.go b/d2compiler/compile.go index 664512b5a..a1ff2de63 100644 --- a/d2compiler/compile.go +++ b/d2compiler/compile.go @@ -338,11 +338,11 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) { } if obj.Parent != nil { - if obj.Parent.Shape.Value == d2target.ShapeSQLTable { + if strings.EqualFold(obj.Parent.Shape.Value, d2target.ShapeSQLTable) { c.errorf(f.LastRef().AST(), "sql_table columns cannot have children") return } - if obj.Parent.Shape.Value == d2target.ShapeClass { + if strings.EqualFold(obj.Parent.Shape.Value, d2target.ShapeClass) { c.errorf(f.LastRef().AST(), "class fields cannot have children") return } @@ -511,7 +511,7 @@ func (c *compiler) compileReserved(attrs *d2graph.Attributes, f *d2ir.Field) { return } attrs.Shape.Value = scalar.ScalarString() - if attrs.Shape.Value == d2target.ShapeCode { + if strings.EqualFold(attrs.Shape.Value, d2target.ShapeCode) { // Explicit code shape is plaintext. attrs.Language = d2target.ShapeText } @@ -1009,12 +1009,12 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) { } } if obj.Style.DoubleBorder != nil { - if obj.Shape.Value != "" && obj.Shape.Value != d2target.ShapeSquare && obj.Shape.Value != d2target.ShapeRectangle && obj.Shape.Value != d2target.ShapeCircle && obj.Shape.Value != d2target.ShapeOval { + if obj.Shape.Value != "" && !strings.EqualFold(obj.Shape.Value, d2target.ShapeSquare) && !strings.EqualFold(obj.Shape.Value, d2target.ShapeRectangle) && !strings.EqualFold(obj.Shape.Value, d2target.ShapeCircle) && !strings.EqualFold(obj.Shape.Value, d2target.ShapeOval) { c.errorf(obj.Style.DoubleBorder.MapKey, `key "double-border" can only be applied to squares, rectangles, circles, ovals`) } } case "shape": - if obj.Shape.Value == d2target.ShapeImage && obj.Icon == nil { + if strings.EqualFold(obj.Shape.Value, d2target.ShapeImage) && obj.Icon == nil { c.errorf(f.LastPrimaryKey(), `image shape must include an "icon" field`) } @@ -1024,14 +1024,14 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) { c.errorf(f.LastPrimaryKey(), fmt.Sprintf(`invalid shape, can only set "%s" for arrowheads`, obj.Shape.Value)) } case "constraint": - if obj.Shape.Value != d2target.ShapeSQLTable { + if !strings.EqualFold(obj.Shape.Value, d2target.ShapeSQLTable) { c.errorf(f.LastPrimaryKey(), `"constraint" keyword can only be used in "sql_table" shapes`) } } return } - if obj.Shape.Value == d2target.ShapeImage { + if strings.EqualFold(obj.Shape.Value, d2target.ShapeImage) { c.errorf(f.LastRef().AST(), "image shapes cannot have children.") return } @@ -1044,7 +1044,7 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) { func (c *compiler) validateLabels(g *d2graph.Graph) { for _, obj := range g.Objects { - if obj.Shape.Value != d2target.ShapeText { + if !strings.EqualFold(obj.Shape.Value, d2target.ShapeText) { continue } if obj.Attributes.Language != "" { diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index bd2f9530d..7ce85198f 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -3482,6 +3482,24 @@ hi: "1 ${x} 2" assert.Equal(t, "1 im a var 2", g.Objects[0].Label.Value) }, }, + { + name: "double-border", + run: func(t *testing.T) { + assertCompile(t, ` +a.shape: Circle +a.style.double-border: true +`, "") + }, + }, + { + name: "invalid-double-border", + run: func(t *testing.T) { + assertCompile(t, ` +a.shape: hexagon +a.style.double-border: true +`, `d2/testdata/d2compiler/TestCompile2/vars/basic/invalid-double-border.d2:3:1: key "double-border" can only be applied to squares, rectangles, circles, ovals`) + }, + }, { name: "single-quoted", run: func(t *testing.T) { diff --git a/testdata/d2compiler/TestCompile2/vars/basic/double-border.exp.json b/testdata/d2compiler/TestCompile2/vars/basic/double-border.exp.json new file mode 100644 index 000000000..8b7f30d5d --- /dev/null +++ b/testdata/d2compiler/TestCompile2/vars/basic/double-border.exp.json @@ -0,0 +1,234 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,0:0:0-3:0:45", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,1:0:1-1:15:16", + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,1:0:1-1:7:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,1:0:1-1:1:2", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,1:2:3-1:7:8", + "value": [ + { + "string": "shape", + "raw_string": "shape" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,1:9:10-1:15:16", + "value": [ + { + "string": "Circle", + "raw_string": "Circle" + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,2:0:17-2:27:44", + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,2:0:17-2:21:38", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,2:0:17-2:1:18", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,2:2:19-2:7:24", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,2:8:25-2:21:38", + "value": [ + { + "string": "double-border", + "raw_string": "double-border" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "boolean": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,2:23:40-2:27:44", + "value": true + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,1:0:1-1:7:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,1:0:1-1:1:2", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,1:2:3-1:7:8", + "value": [ + { + "string": "shape", + "raw_string": "shape" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + }, + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,2:0:17-2:21:38", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,2:0:17-2:1:18", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,2:2:19-2:7:24", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/double-border.d2,2:8:25-2:21:38", + "value": [ + { + "string": "double-border", + "raw_string": "double-border" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "doubleBorder": { + "value": "true" + } + }, + "near_key": null, + "shape": { + "value": "Circle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": null +} diff --git a/testdata/d2compiler/TestCompile2/vars/basic/invalid-double-border.exp.json b/testdata/d2compiler/TestCompile2/vars/basic/invalid-double-border.exp.json new file mode 100644 index 000000000..6bbe158b3 --- /dev/null +++ b/testdata/d2compiler/TestCompile2/vars/basic/invalid-double-border.exp.json @@ -0,0 +1,11 @@ +{ + "graph": null, + "err": { + "errs": [ + { + "range": "d2/testdata/d2compiler/TestCompile2/vars/basic/invalid-double-border.d2,2:0:18-2:27:45", + "errmsg": "d2/testdata/d2compiler/TestCompile2/vars/basic/invalid-double-border.d2:3:1: key \"double-border\" can only be applied to squares, rectangles, circles, ovals" + } + ] + } +} From 5266797f8894dfb57199a2ffe00f002906d64823 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 29 Mar 2024 00:43:13 -0700 Subject: [PATCH 041/109] changelog --- ci/release/changelogs/next.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index e7803a445..0d7fc98ef 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -14,3 +14,4 @@ - Fixes `null` being set on a nested shape not working in certain cases when connections also pointed to that shape [#1830](https://github.com/terrastruct/d2/pull/1830) - Fixes edge case of bad import syntax crashing using d2 as a library [#1829](https://github.com/terrastruct/d2/pull/1829) - Fixes `style.fill` not applying to markdown [#1872](https://github.com/terrastruct/d2/pull/1872) +- Fixes compiler erroring on certain styles when the shape's `shape` value is not all lowercase (e.g. `Circle`) [#1887](https://github.com/terrastruct/d2/pull/1887) From 25c8f9744e62aa86ae09d2505fd157042914d9d1 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Tue, 9 Apr 2024 09:38:22 -0700 Subject: [PATCH 042/109] upgrade ws --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 106bc616b..6007260b1 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( golang.org/x/tools v0.16.0 golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 gonum.org/v1/plot v0.14.0 - nhooyr.io/websocket v1.8.10 + nhooyr.io/websocket v1.8.11 oss.terrastruct.com/util-go v0.0.0-20231101220827-55b3812542c2 ) diff --git a/go.sum b/go.sum index 7019bc8fe..506a6e30f 100644 --- a/go.sum +++ b/go.sum @@ -323,8 +323,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= -nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= +nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0= +nhooyr.io/websocket v1.8.11/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= oss.terrastruct.com/util-go v0.0.0-20231101220827-55b3812542c2 h1:n6y6RoZCgZDchN4gLGlzNRO1Jdf9xOGGqohDBph5BG8= oss.terrastruct.com/util-go v0.0.0-20231101220827-55b3812542c2/go.mod h1:eMWv0sOtD9T2RUl90DLWfuShZCYp4NrsqNpI8eqO6U4= rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= From 6ea88eaad22bc866f635e2ecfcfd7941379ffd94 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Tue, 9 Apr 2024 09:51:14 -0700 Subject: [PATCH 043/109] cli: apply theme to pdf exports --- ci/release/changelogs/next.md | 1 + d2cli/main.go | 9 +++++---- e2etests-cli/main_test.go | 12 ++++++++++++ .../TestCLI_E2E/internal_linked_pdf.exp.pdf | Bin 66069 -> 66068 bytes .../testdata/TestCLI_E2E/no-nav-pdf.exp.pdf | Bin 96035 -> 96034 bytes .../testdata/TestCLI_E2E/no-nav-pptx.exp.pptx | Bin 122135 -> 122126 bytes .../TestCLI_E2E/renamed-board.exp.pdf | Bin 109973 -> 109975 bytes .../testdata/TestCLI_E2E/theme-pdf.exp.pdf | Bin 0 -> 17306 bytes 8 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 e2etests-cli/testdata/TestCLI_E2E/theme-pdf.exp.pdf diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 0d7fc98ef..3ce0badec 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -10,6 +10,7 @@ #### Bugfixes ⛑️ +- Theme flags on CLI apply to PDFs [#1894](https://github.com/terrastruct/d2/pull/1894) - Fixes styles in connections not overriding styles set by globs [#1857](https://github.com/terrastruct/d2/pull/1857) - Fixes `null` being set on a nested shape not working in certain cases when connections also pointed to that shape [#1830](https://github.com/terrastruct/d2/pull/1830) - Fixes edge case of bad import syntax crashing using d2 as a library [#1829](https://github.com/terrastruct/d2/pull/1829) diff --git a/d2cli/main.go b/d2cli/main.go index 34ba5a717..93a103db9 100644 --- a/d2cli/main.go +++ b/d2cli/main.go @@ -936,10 +936,11 @@ func renderPDF(ctx context.Context, ms *xmain.State, plugin d2plugin.Plugin, opt } svg, err = d2svg.Render(diagram, &d2svg.RenderOpts{ - Pad: opts.Pad, - Sketch: opts.Sketch, - Center: opts.Center, - Scale: scale, + Pad: opts.Pad, + Sketch: opts.Sketch, + Center: opts.Center, + Scale: scale, + ThemeID: opts.ThemeID, }) if err != nil { return nil, err diff --git a/e2etests-cli/main_test.go b/e2etests-cli/main_test.go index a47f2f819..5a2f925d7 100644 --- a/e2etests-cli/main_test.go +++ b/e2etests-cli/main_test.go @@ -765,6 +765,18 @@ i used to read assert.Testdata(t, ".svg", svg) }, }, + { + name: "theme-pdf", + skipCI: true, + run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) { + writeFile(t, dir, "in.d2", `x -> y`) + err := runTestMain(t, ctx, dir, env, "--theme=5", "in.d2", "out.pdf") + assert.Success(t, err) + + pdf := readFile(t, dir, "out.pdf") + testdataIgnoreDiff(t, ".pdf", pdf) + }, + }, { name: "renamed-board", skipCI: true, diff --git a/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf index 4cf0f8d375cf10f549fc44c635014860e5eaa480..29ec7f45fed8a988fb97ad792e70a8f4f52bf2bf 100644 GIT binary patch delta 1019 zcmbQ*!ZM|WWkV=qy@{P2S8+*EYGN)|1>=$lv0jG_1&-V=?y_{WdihT6?CKwl`&Rzv z&Y9#U(Ea1dSJkbyj*$^*krL0$k9aHC9k!eFgST9|tbftg>CcRN=bcHjPci$NoT+D| zZJhmFz~4j4Ge?*|Izgp#`2i0hd2@@u4y8vGJ55h*vhjSf+9G4iXP5o+H&p8_ejeoh zZAs~cBcD>fKV0@`7MJwvdCq-1{vXTs_~>)WV`ajUwR5k0_$DtG_DSn;iRkp--0ycZ zzS3u4`2U|pBP4FKBvU?PJ*y#4%kMc!eiO{^-T0X)Xy3$lgS%ofuh1jTz{1)sLi}1< zZ=P-LzIaA}zp;W>$g`$xwdnHOOV&<5ySzs)ZS(arzP0+Zmzzi%M?d$_6X;dB);ZhM zz{u3#l9YriuYY;tM3uOIioY3ky`LCbeEYuX^l$cGlFO@Ql`Ku=onMBqAY`FA2%~O)i%q>&Q5)Dl(Qw&UvP0i8_k`q%BO-+mwO$^Nq zk_;@33{s3!6^slO3>1QZI!saw4b6-#6H`)53=&N(5)DlgQ;ZBOOp;TREzHf#Oj1%4 z&5aB#k|(eIm!@uFU}9itUAbTLCi3o{HcV?#>}F%xr4y%uJe>MV`TA$sfKPBJhu zG(mT!fswI=1-d21<|a_h2)#gM7#;zJff2f16BC%lP`&lQ;4m>Yz;LyRIi~MSEX^=1 zF*7zs*K1^Eh~XGxQ*#6KP%t$!HaFHlbD^235r%=$lzFsbd0xjPyUFRwU&-~|kFYJ$F`K#Ry zlgtH=IL1`gp0p@#a(52)bq-z6+&*9DDg_!ff+?S|-o=oo<@cN!rCt?Vp>{n zo^9^Fct(J~ucGwex6WdKUrj0 z=B?Jdc+Endrq|^*yWZcZpVj{CZN{@2#`W}IwdYGRmZW)9?=rKFgo zCYzZg8X6c|m>MN17#S)UCSegCK)AKm{^)88XKh=n*)^?C0m+U8YdZ~ zSfr(x8WAy0t|%rG;tG%}t1_`h|%DVmIdfrW_~x|pG%g*k?pv5^6W zn29;2UJG+fb(Y2!5WV$qCm9$4{eo_wk+Fp(x|p%K2~;yeud#&%hDS^cOn@PW;%x&H z6PU$Nz4btO6H@~WSDTn)`p(4C48syLV`Fr^MrMW>jxjbhH$)EwQ!}7XG|*gVW@?0C YpqZ($sloKajEtTf7F?>TuKsRZ093z5egFUf diff --git a/e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf index 0c8250ecc5433ced4e94f68666f52a827575e8c7..1051f9022e25ae704139f72e395d7330a98eebb2 100644 GIT binary patch delta 1064 zcmZXRc}Nsd9LJr)vb9wcrCQO(TCptGH*emXnP*@@nnzxhWf>al%q}V2TG?S+VMVk> zGTD?}kkUez;S`+;m9$viMA_vZ5~a`qL8+P58g?-A{(5|W@5}pq-mCiPeeR?8)$OAk zC@#)WRJ_qC!JN<1X-J9y$O<%cN-*AH5Yimnu z&wP^IaBy1O>$l0@Z{G>s?>=66tUWr_IQ2X(s@^%P%Dw8)i8Lbm`!vd(M*llikq06Z zGXkgZ!qD8pp}kvPd3~Aa<@NJt50$k?oilnJxzZ#s0%XuC2=&6WMpZ%NolYLe5O6 zA2p2JUX?hg=6KfyDTl)-vz+7HCEqgnsXflk^WyxclKyEFZCdZl_@(ZV* z>Na&|D0yKNP+JT6aOKiQ>Uu5^MUL1JA{gb{u-z{49KaG5FvCMJUu5i1kcb3X8ZtDX z7a3xbk;E_@ORSQFfE5c?23sWv1SHx-f#*0R*{nQd1d)cUQeQ-gkq96_02zLY8HSj& zbyB>w*hWu}kA(pKH&c>|sfu8p2E&V9OB;S~2oeZTJ{ME79fD>A7=|Uf3<*G&aSW@= zcuv=a9xv@V2w9K#@N)cR@?f)CP5?OpYRewGk@CMTVtAbhVp&et<^Nnf(sg(k5KnZ} z80hUV#JWp34r;r|^D$au4s$%#zz7`6lIfa|U}5>V${zfOxnj(ir9tC*}G@jpH^%k2-UzQs95m52D!m`0V=lm@9S zi-v!c`$9|aH)%t=`Yk>E8Ckx*H_qA7YXc%e%9- zDUY3APRurGORhQn-qH>^1wnb|&?cK;6UELfP69b5nS8tt zoK@Yv)V`$$rYszZb8c03%QCF{N0oDQKyX+X+B#x+}>I$CYJmQU(ZLQgISMm&L8Dcm}Ml zdc_<-JvS7G&q&$~06iA>qHL+Y0JLmI1|k{^B4^SgBtR^R(7<7AGU%Y%q(g+T96>sY z^$aEqWHM!{wW3}$AR`v_SjSU=(-ABZj%P782vi_?Xyi>s79zr6B;70ohA4tC;t{2k z#Vcg0_4!7v&L%R;wec9@e>`c84OGZ^22LEt!pMGK1j-9Y^4UOwT=26XLKI3Xi$ItL z1z2iC12m3<{u)MVDxH~#zyTH|{xA@$`SCUU2M8&oSn8jM2mqvnZ~^5U31~%m2qjbu z!t4RiEM@~@)oS8D2kW&PT7gh2m1fgS&dKXtSJ?wut_Ej=s-Yo}9LL_~7> GYS}OD98XpN diff --git a/e2etests-cli/testdata/TestCLI_E2E/no-nav-pptx.exp.pptx b/e2etests-cli/testdata/TestCLI_E2E/no-nav-pptx.exp.pptx index 0d0f5f7cc2b57084d8e9d765205b9e6a30a5b645..9f70349684bf2d660e09fe059631609123d9bb6d 100644 GIT binary patch delta 476 zcmV<20VDpGx(ANB2Y|Ez7RP_hZrd;rgztF@f_I6ulKzCS6`&1rYJdQB(Oy|{BeUTj z$aN&WeIdGH;x@M)$20qJhqSggle6R*QZ~Ww=%(eAfLB2qKkVqY{ay2sl8n-8X@iFy zogvek{$i`5P$9uX3K0?-$QOhVGCAwBP;o~Oh*2<>)d8H$ZHV9}XCHqS0!9ybszu8qlBS(^CKbT;mCz&GI+vHzii(x@dWqQzg)3 z%0`^tWOcq@e!kt`(Z1u|Rl~0ue!b_{;vE-@{2(}AHa&yzd|&W&wo~DA)q6LZQ+(SS1TKoTJGQB^em7;4rbaZW%3JglN-;fvm7=veh^T z_|U$JSBWX^GL$M5G00&VZ zC^Bk1k-LsmWNDW;W2!U44Yl+(AM}<{4l^R*gID@VgZebTU+-^22}XF)%cs}3*;dAN z<@{Eca-hhRG{3yls(jykzB}I2zH7Qo)pk|8JGNWC-SYpMs@XB|rdf8rg1kf9KTG`^ zd!@V-M@_j-KvC z`U$_!xp0U$9)9iKwmOI{^48T8m)@Ll{}IsAylECk_*S`%Rmsz{G z=Vi1|>~xM-!n(;mmMtqM&1_kFzI2}D!5w)8=YRd5mOeqvuhwh+F;2beHSPv4Up&x! z;US@J!<%ZsSNWq(j{io_jg_A-HFaE=Kl#e+vaLCtQF-^jwp`tv8yDjY z(dN2&I`cWkdSe3vlwb-vofl;&@by>S(a3Gxvo;=od|Yg5*xSBu{~Ff6^=@(CF#A*Y z#34YyORQ73(q!8?=VG59)&kp_FS=OppBC(ne-p$RJkM9xEk*C*9aK#w~?S_50h;dEKb5Y5X>|ahLu3T799oQ~lZ1Su^yxwpD1KY%z*V zGiH4jwDg%kmSS-0+Ve|I{S4N9j_HyAnDKYZ!6KH)eSG)2`dT(Vnmy}^U+UK{wRe(C zlm0S>?dki*$IZI+#dF@jKNI)Aw~Uzku5`84inG3-ImFj2+jn96l6i`Pj(OLwKi_ox zk-zooWvphF$82s(SQx0D?9EUUU-~o2E6>LAk4=K@mn{YF5^evnO8-8iUv>K`!lc>FbJ@1fWn(HFrVxFnXODrmS^0bPM4H+|Va-BGc+?o5d?`Dn`8Lc%nUPREX+;N z^_rL)TA(}7%+k~p-GP>-#>NI3s1_R*6~t%(Xfch_13zw zs5ekmB6xPTWlPw~S;n`XTluOv-pngF|Lgy>^ngoC>|*DivWoc@(Qh#2;vwS`9zDGN z&XRr3a{J~VXEswVd$ebZLg&9V-g`5{PnQMmx?OIY_|?z0QtkAF8Dr4JC4`qGL&R?|7^I~{5dGeZ}Q5c2L4O=r_@R%`$lA3x$>t~AnM_dz<1}~CLSpX+MpUCChWcK z+)SCd+EcT;Hi{Wdoy)tjXR)xv{R+Qh-*;@Si%7IPF!7yjQ|evewyt`u)xBP?-u~Zk zEa|`}b{+P+x3zUduB@3W{^fo9-@VT>w#K{;+Zw#O`Ziiw4hxq^|Qf`LL1m%e9WqFGW(vO%I@lA)17 zqNSmsxmk*3VycF*8dH zR{%rWX!=Bu5eDeW&5X@4JYr^Mg5g>Va}$H<53#wz%+k~p-4&Lm#zq#XRv8*t8X8+p ZH(bjo%xFB_buFV8has1$s;j>n7XT7&uRQ<& diff --git a/e2etests-cli/testdata/TestCLI_E2E/theme-pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/theme-pdf.exp.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f76bc25b539d9675f8c9ccae039ffb5bdb1c0fde GIT binary patch literal 17306 zcmeHv2V4`|w)aj5y@-GaQXHiS7E&M~QG_5(qzWn)kP-q?6FLG)5Csc@l_myr;b@kU_ zRn+)YAq+%waOKm`KyTYmr$T6RduJ*i{NJ1E=?h`uS_?k33DwcXeiJPa+Jk`$@ahB= z%x@B!=Zb^C=!eHV9MsyBqzcenSY>QX5*N0?<}s;9H> zJ_t+1!+m^wy{Yyde1V9o(MF~ytbpzWN$(`veGo6*lMRBM(!sZ4CP+^~gqYj46X?f?&@;pwuTd#{jk zh8igSGlBVsJ{>9lc=c5Ld0*Ea#mUM|mmjs45W7Cb2ckVM2M({RUwjW_B3f)I;-S&CRh!=o7)de=ospRXmsYtI614{Lotq@)d-JXM(wZRYJr^=3&}X}gXkd~fMTr@K=B^c&Q0w-;5ESRw(hGk;6A^%U@vT#6}Sg>fftr4;Dtz`!V3~!?iv{Q(1bMf;e);E zeyIP_%faannnMenS!VlNJ$%WY=2z}0e%`F@ge?m;&n#YCJgHyBMW@kO1b+Mb-u_t{ z{i2Ego|t|&GnV>)GP7^YgKaJgg8atHVX3n0*%u-a)mU5A!p%CIx+=VR+0!>uU7Yv% zLIeVay&pNl`xcwdCiYIbP7SXHt;3O2AsiM@f=C3S4Fsk zfDcB>?9HV&Sy%tUk>V67gktqa4Ve{gUh(!{AjRs+a0N&(I}ZSYwFv@QfcS$=@S9!m zxBVWc4(|znFm1js-w0R;N5BzTTi#bGB*nJUwsnhFgpRZYPa!taw*(QpldkSxEcOCt z8F7$2aKzH6^l(dw>1o1Z$Gq%bxr+%K6PmBx!M@>?k05UnSlV{8UP^QxF|ygbYss;t zit?`SkE_++SbE&5Ha@`5OzXW|gG*xCZ0+8G0}a`ioUbX_ai>$RSoZInnVChmacH7c zYU5t>$w+g(L};8|ljg{OC#IY{#-X~uu4ZQ5weEmJ*qZs>Y9 zyqYh=fA4Hx|3u{8w%I3jP2;PXg`*<{ZtEx4OG({c)L863I#dUO1*PI8TPEIVkzef@ z>ztxrpqb`|oKx^gu`1eXof^LO&c~b&UKwF3vJO|0{5zhdbo34C2UJU7rHyrgDpk6=7gUr8?Nx>$BG4Ko*aXHq#TpuTSC z?#>dgHXe$e`gu%l-8RHbgt)~OVu0IwPBW&-} z8@=o(<$irp&DP5we^p=cDu^a}vRa|@Ih|;*b$IU?-k$n<-n2tY<%J~l`A1%LuX?~) zbuVRRO*HP|`2@c(lDOUyr-N>-RWE$id7oWQ$!Uvp+IH#e)gz~UtZp&GRlA_KiyPU{QkX?q6G;+&Q+or`$lFzk)krNtbGz^ra59$2ToRR4%mK zsFFX~W*n{U^4c}TO4z?F=mnQ1f-|;dbyl~UbnhUvAZ=jYfueH@0 z_xVZZVybMi2o|{mH6dv&u6$Wiblmiq5mID;R3W$Kg|3u>_Nl9D{cdeLjDCLJzMWV< zxV-CuV5?Mmf{jCxl}L=r?SL^ePwe>`f=g}R?Tn>7$Z$N*2Z@N9+qg2+HGA)Ml{c#1 z+l`kbj@MK~d6p!{zD{&kPnI+8ta@=W^w;879A1|{)z<;Jw;y<~9!xOmjP5(TvA&X5 z|8O{`#{O#e8tT@YH!Mc3)=pS0kLc}3ZqmQ1d?E6`$r(~2YAZn_WQ5e|DeEs4+>-}^@}S0 zSs2K+fS-)*@8Q5reE)4A2;&Z{8u5EHs1B`Dg&Ba+pgQbqU`T%x4q^%TAMqdw^DQ1^ zyExzA!Jl1~{{?vP8?WFi9we&$T|9`#{eTBe+_!Zvtq7fxl(I9!V(9}6R^_#!bq1tjVr(q0 zIJ`@uT-Uxkijw=Rj)_PlH0x9nXwB!iMO9rrco3=@lISTs4TumM|{#oVTVSd(&QeW@w@^hF__J zaE_hCon$GMIzS+h3x&qki-S{k(t|G3Ttau;ow?0QPLKDtBx^l;c{gwW`$rueZK)Sa zRDLbo|GI7K^xLj9&%FFs8|^%Y@2|&GFBUqsf4=hRadUq^x22BG-9<$O+k+eVXkna9 zd)im$6n&t(P9JN}ObP}8w$ptk{ckIqUywaA{8O(D&fMDULE=pK#V2o^Kj-yr!3M59 zkG-G0&vd`Y!96B*Vqza9!s$TE=X*q^sceVc{X5J?lk>#fKKErYlnb%fExiUYEsm9$ z)pKQwypo{goyWTr#}yRc+)H>hJni**Q*y9!^qzjYL090K!r@xtTr%bJy6C+6%AuD{ zhprUJREo=N>uPdZm0poqs`4f=wpu0V%_wR^UsRXk`Y^-ey62QE?1f6#>he{W5M3eJ%=C8MP zLJ^~h>zb}EDz!f|Wd_ofN+V{E&9V?x zH!jbtivIZc{F4Wd)K1*uOK5iuSdV|MotU&*$=RPG(a+02OPacR#_|fF&rqWl*F4&{){mNXIUc*Wf}R*vBp2dFP%Jp}}oywyf66w{nU1FKZcUd_);{ zopp?0;FMSH5St*%o;ZhzQVLFep|H4rO!~tkzF%Cg+~&b;%c(_f?>2fMGG2ZxE40i{ z>cP_VDwV~(=U-kK9k7{=+jBL`{p?-Ii3Kb4okJGejnf-5Gn&e0pl2r6b03G{^hMwZILZ`Xc%|C3IS5HHwN9 zroDHKDKD8a#F4dTr70U*sqVb{#odGk0m-%i}B02M>Ya(XNQW`wRnk$Nuo*t{(D?I^A zAxpJy@O2-q8dT(+YDb#SN9>)P?(40C-R}AMZ7Z|Z{{c4qDO$4A%)ymP`8GIc=)n#X zFN7=bSlAE$5)B~|h^$bgJI&jY6<_)$!V8D*Tzq}Zsopv?4?4}06<2|q{-OK65ZHxd z&>lXlFtWKf9Dk;;!gw$USRn2L!7-Sh>9K45JUo3Mm?!uf5^ZT>@8bsH*s;Ce!U7OM zorw81C@}bv6&m4TW_*mRy+RXtg@6nJ*op*4MF9C60GClfSOGAU5I~m~KwJJ_S23KU z3)d?m0V7Pfr`>Oz@2s2`^RRT00DvCDy#1+8c4e7XmAU|6gdfi2ryXmXC0}L;CNR}G zz)>75z(3LH2qiuG7yx$A;mH6SQJJ~uG9brc@+V^OtFRbmm3w89)WmeRO2{seqPt05 zo<%QtMR()4Tu04%w36P=E8jcKM=U)O)-G-Z%YF+lAS)w)k^%tNP#^`i-*X~>VSxnZ zu;u;_R-XFwK5KX+mPW|BQ|vK&Fq+UIhJgA%;P1D+?Y+{!TSXUa7GV_f00feJ1`O%} z9$|1M8u@-~_EJbc*G8>EnKTiAL^0$M62jowKYi|yo*#U5XRxm6~fd0BjG{P|3Gi1U3jo z|4?05+;YUsKPhBnHsB=oyhHbsQ5*kDfsj|QTSj%=Z=S#Jy z)OEIki)4d7n-ea|OnZj7Ii-dA7hb#Dy!Xncg|@rkwykKtcIlb*M32oEH+QSNjaFaY zevfna*_g3KpSV+REC%pLX>uv!UHi)(gWV4|EGGpydOJKb^*m3LA%0FN)IZ7=P*pLI zplA-yzkPNg?vUllCpVu+(QIx=8iX&@R)ZIF_(03snmaBjRdxwpXneFlc)ui|Jc&zQ zG+xjmnzSisZ|Kmc=I6g?mo2EFK!7uE%g`_Pjj`xT3(8yz$)Lk6c8bo3Dos^{0HMqd}#p&j6H3;lTP;mb{dA}bbDI*&9D%%=~% z``X8M)&9-|93fuUV<&vt$&bvs}cl-|@? z6g+WY&!pmx<=JO%2(v}AU!1Y@(gxMtvUmA=(YAxe0ckV&XWX|$gespKdfZb>3)SD( z`$dRijMEm^242k5LQYgltv-7t-@nx(N>cX0f#JdX?-x0Y%4m01)xtIge?BUMA&()g zx%X#V2{SK3hr)k}A;=VcC>NZLk^8FWVd8=`P)r2dRzwhVGFz{@Kzf0>#enog zoI}|`;020t1_+=SiNIWh5eCdf!4@P&7`P(IhJXu6HUUb!OftB^3ltC%Jb!`CnkYuq zK#U7%<^*fPbt?giC4dld1O$O|mx_~9Q@z8bG-{{23T7YJZ!3xi^j~}9MpI2jdJAR? z#>DO=!UZ&R@5pRuk`YF7ygoTC39h3n3xya`cr<}ny$-nX?v-UfbC=_boz*yY9_Dlav8=6SNVfb4J3P7gDGk1liThH!&qeKJvY-BLiJ!Rl3Cq0avdMEJ|wU1*1VB z8~nT1gvfM#wr?9*eCK@V#*Tx9vS#Qlwyh7MyX>RPt}P7>|oEb#SJ} zc}fJ}#%UF$p7)r9jOgdB&O?q=Xo;BH*{tMfjqVNXE-(G&}WA>hcv%tbK(0_s`| zl8X!KLZYh*gC>W2H;A$P2?2zXD9fMtH=pf9+M9l*yj1MM950<$Fp?R<-$)@o$jP)D z)-D<7hlDPoE@qAGez5-5=3ksnMK5`>Y_e#DI-MxrF>2f^)7~H8OXDFMgMFf4Jql6; zIlMpyDJ%+FPz)i&QC{GIBu9cW6oY_B(E$!f@&)j81;8RwOhBJ7BOW|e1it^9yG!o^ zMWNG~v-z#XQ*XLQ%N;VcDkbu?Xv<~ijNQgRHJ?3euxeC8f-NuNbuj3k-~DUjMDfT( zdRls8^@-70QbnLoZp&+r>-hZ1AfKSAz)Re6Y$a5RF|ZZAX0~aX)+TP_!?UldW8y}W zW*)q{UAyCX;yQF~W8=Vn*)w3KcP=v^^q1{%UecAxC$O3Aneqv#DnfgATAlQ4$c&d& zD=*n6yqcn2DdDFZAnu~hkITl{b9v?{3W@uP$NH_wEW2V@{?teO;kE~T*R_&%*hp~k zzG~U^VMB2canSeW^VD{^0$Z#0-hr2m7u1uoGv_-)kU+2w`Tlu~mh&^oVAoSTkFBa} zYC;e2ed?TEE)&#wYPPYYD?C5Qzs1>_jqcSn_!(HI_U8wd*4pr-CQg}!eY`*SrrE(m zCb3AfFlfxCQ)~?zjSJ2r-}g_R2o9cTaZ3)&>V1?cR}nusd8A?Nj(_nT%B!XgtAr(0mj|t@_BhRax&u(qr=Mp8UiG48^XhkfCy*c<(%JNs*mdVPH zG(}ADN1l&(K5>^`CcU1te#f4}X(4{pmlu!Gk4v#}bwnKEMu_eHoCCjZycb|LQc{W@ z4smb1o8VTTmHn%a<6zCcXqn#{Vk+MH_iE;U-cOV~TcA$be=ut(EVs`kiiFi{sc&9v zD$90Jp1#L}^6c`EwDz`;&tq}62m0~T1yf^B9&gyu;#{yGo)AIi!-peMvajg_d3)-c zwO3}0Mi0x-1eTu|*ZfMPBA(hlwYzKNB(3>DvnIuW4gWj6K+$YZ{!qeDb*+$yw#)S# z2ffj(15sbZE(D7`pw2QbRVDIy`{2lt$ps&+bOab5oT-{SFg<`yCfe+)%W0%Jd?6SB zJlkgQt% z+xe%Z{mzR%tr{`Zms<3du9pJ?Br1tSJjai?Od@O z(Sgt^+K54hvY39qmgNkop*nUU$z-rEWO6E~_(H#%X1Z;1W8Fw&TaT77U|d0g4mes) zgaeMzaP09Pxea_s8-Ewi0|3{i_|V2B=A5DO$es0oOA?O2!*TaN(Mbai$MVDI74VGa z30)mBPBFj$hB60;ha=p7qLaQudNeN_;Ff>`+=T(lw!C5R-+cck660?w6%^=zfznC< zBzWxSY^-$Sisdqy^sQl{>-weF%_x}$+eZ&4kPv3rfab6XV{qA|&Gb}6t9wszo+ae(w zE--jXk(>m)kY&8WtNwHGlMrUs`@d^abWq|6&&bz4`5!`mLq^2t zuG#s?QT>qDt$mScCzTk}aaxVJex08_`%lj0FXki%25Mf~Tcsn|g$SA3XgaSJs%Wpl zNbi!cG6!9Je0J8_h^RG63@=VjOj-)4SR%%}cL@2XsML~Ts&5D|<^Z4+6Qwoa6+cye zL>P{(v<0nqt_NkJK-dhBH4xwf>OVJsCK-@QGTpdRx1;PNUW+^nyU!bx$&nczkRe^d z6DxOA=IUW+ z!B5Wxc>x_wzn|}c0U6>1Qd)%>#9dnmQu*J*{X!7YOFII&O^ZM!KfQosl`Vsp?v?#y zhA+h7T_f{+XS^ovi#zqvPU#jb8sN3VhA`YhC*_5BB?r2 z2~I>+RaFNEdwT-L9)l;^!x<1xFoA`fY!-oU-WP?rhD+cNoDR%#gK@v-eX^zC=m#e) zLrQb=Kp&U`UHCr)us{W>&hXD1u=8>G(5!r6*88b&I+TY4)zOja$jaAc zl|WzW_V7UvpAEDyq2EUc^oBFBF%V9bkCk`5aKJggcvU>)1pQW~1}E*at02!WWmp1^ z1oOr^zLv3WU^%jmZ_2Q6hVqYPcvb?<5A6tQKaPRH5HUZEfyI*G)T!_LVsV6@#=xo( zexip}XJvSO-&Yl*{?iz$xS!{ts!D)UTYl)PPWZVmQ5Al{_xpCR;^9oQAIfmVpJat+ zrEh=V4xSq6$8q7D9Q=>-z!C`G^5^Sq53AoB&gO?-J9Y`8vh<6#pwWCG9LzB*AC3L{ d1Z;!0SV%&#_x5Gm0+ygo!1F06=$YyB{TF$u7()O6 literal 0 HcmV?d00001 From e9ab2f54a228449b8ca594b3fff3d94e79ff3e1a Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Tue, 9 Apr 2024 09:57:14 -0700 Subject: [PATCH 044/109] upgrade fsnotify --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 6007260b1..e0fd76f87 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/dsoprea/go-exif/v3 v3.0.1 github.com/dsoprea/go-png-image-structure/v2 v2.0.0-20210512210324-29b889a6093d github.com/ericpauley/go-quantize v0.0.0-20200331213906-ae555eb2afa4 - github.com/fsnotify/fsnotify v1.7.0 + github.com/fsnotify/fsnotify v1.7.1-0.20240403050945-7086bea086b7 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 github.com/jung-kurt/gofpdf v1.16.2 github.com/lucasb-eyer/go-colorful v1.2.0 @@ -54,7 +54,7 @@ require ( go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.16.0 // indirect golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/term v0.15.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 506a6e30f..6383c6a18 100644 --- a/go.sum +++ b/go.sum @@ -75,8 +75,8 @@ github.com/ericpauley/go-quantize v0.0.0-20200331213906-ae555eb2afa4 h1:BBade+Jl github.com/ericpauley/go-quantize v0.0.0-20200331213906-ae555eb2afa4/go.mod h1:H7chHJglrhPPzetLdzBleF8d22WYOv7UM/lEKYiwlKM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.7.1-0.20240403050945-7086bea086b7 h1:5ZeiG5gIjLqPKLl+f5zv++9ZO2oxA6hmZ3e7G0mMW1M= +github.com/fsnotify/fsnotify v1.7.1-0.20240403050945-7086bea086b7/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs= github.com/go-errors/errors v1.1.1/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs= @@ -251,8 +251,8 @@ golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= From 5abda40ca651f3625f8a01ffc23614fa470dabe1 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 10 Apr 2024 08:50:51 -0700 Subject: [PATCH 045/109] allow minimum dimensions to be less than label dimensions --- ci/release/changelogs/next.md | 1 + d2graph/d2graph.go | 33 ++- d2layouts/d2dagrelayout/layout.go | 8 + d2layouts/d2elklayout/layout.go | 8 + .../glob_dimensions/dagre/board.exp.json | 150 ++++++------- .../glob_dimensions/dagre/sketch.exp.svg | 198 +++++++++--------- .../glob_dimensions/elk/board.exp.json | 106 +++++----- .../glob_dimensions/elk/sketch.exp.svg | 198 +++++++++--------- .../just-width/dagre/board.exp.json | 4 +- .../just-width/dagre/sketch.exp.svg | 156 +++++++------- .../regression/just-width/elk/board.exp.json | 4 +- .../regression/just-width/elk/sketch.exp.svg | 156 +++++++------- .../simple_grid_edges/dagre/board.exp.json | 18 +- .../simple_grid_edges/dagre/sketch.exp.svg | 176 ++++++++-------- .../simple_grid_edges/elk/board.exp.json | 18 +- .../simple_grid_edges/elk/sketch.exp.svg | 176 ++++++++-------- e2etests/testdata/txtar.txt | 7 + .../dagre/board.exp.json | 89 ++++++++ .../dagre/sketch.exp.svg | 95 +++++++++ .../elk/board.exp.json | 89 ++++++++ .../elk/sketch.exp.svg | 95 +++++++++ 21 files changed, 1094 insertions(+), 691 deletions(-) create mode 100644 e2etests/testdata/txtar/width-smaller-than-label/dagre/board.exp.json create mode 100644 e2etests/testdata/txtar/width-smaller-than-label/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/width-smaller-than-label/elk/board.exp.json create mode 100644 e2etests/testdata/txtar/width-smaller-than-label/elk/sketch.exp.svg diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 3ce0badec..69ef0268b 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -5,6 +5,7 @@ #### Improvements 🧹 +- Dimensions can be set less than label dimensions [#1901](https://github.com/terrastruct/d2/pull/1901) - Boards no longer inherit `label` fields from parents [#1838](https://github.com/terrastruct/d2/pull/1838) - Prevents `near` targeting a child of a special object like grid cells, which wasn't doing anything [#1851](https://github.com/terrastruct/d2/pull/1851) diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 39394035a..da808ecfd 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -1048,15 +1048,6 @@ func (obj *Object) GetDefaultSize(mtexts []*d2target.MText, ruler *textmeasure.R // resizes the object to fit content of the given width and height in its inner box with the given padding. // this accounts for the shape of the object, and if there is a desired width or height set for the object func (obj *Object) SizeToContent(contentWidth, contentHeight, paddingX, paddingY float64) { - var desiredWidth int - var desiredHeight int - if obj.WidthAttr != nil { - desiredWidth, _ = strconv.Atoi(obj.WidthAttr.Value) - } - if obj.HeightAttr != nil { - desiredHeight, _ = strconv.Atoi(obj.HeightAttr.Value) - } - dslShape := strings.ToLower(obj.Shape.Value) shapeType := d2target.DSL_SHAPE_TO_SHAPE_TYPE[dslShape] s := shape.NewShape(shapeType, geo.NewBox(geo.NewPoint(0, 0), contentWidth, contentHeight)) @@ -1068,8 +1059,28 @@ func (obj *Object) SizeToContent(contentWidth, contentHeight, paddingX, paddingY } else { fitWidth, fitHeight = s.GetDimensionsToFit(contentWidth, contentHeight, paddingX, paddingY) } - obj.Width = math.Max(float64(desiredWidth), fitWidth) - obj.Height = math.Max(float64(desiredHeight), fitHeight) + + var desiredWidth int + if obj.WidthAttr != nil { + desiredWidth, _ = strconv.Atoi(obj.WidthAttr.Value) + obj.Width = float64(desiredWidth) + } else { + obj.Width = fitWidth + } + + var desiredHeight int + if obj.HeightAttr != nil { + desiredHeight, _ = strconv.Atoi(obj.HeightAttr.Value) + obj.Height = float64(desiredHeight) + } else { + obj.Height = fitHeight + } + + if obj.SQLTable != nil || obj.Class != nil || obj.Language != "" { + obj.Width = math.Max(float64(desiredWidth), fitWidth) + obj.Height = math.Max(float64(desiredHeight), fitHeight) + } + if s.AspectRatio1() { sideLength := math.Max(obj.Width, obj.Height) obj.Width = sideLength diff --git a/d2layouts/d2dagrelayout/layout.go b/d2layouts/d2dagrelayout/layout.go index b367e404c..29653c9a1 100644 --- a/d2layouts/d2dagrelayout/layout.go +++ b/d2layouts/d2dagrelayout/layout.go @@ -571,6 +571,14 @@ func positionLabelsIcons(obj *d2graph.Object) { obj.LabelPosition = go2.Pointer(label.InsideMiddleCenter.String()) } } + + if float64(obj.LabelDimensions.Width) > obj.Width || float64(obj.LabelDimensions.Height) > obj.Height { + if len(obj.ChildrenArray) > 0 { + obj.LabelPosition = go2.Pointer(label.OutsideTopCenter.String()) + } else { + obj.LabelPosition = go2.Pointer(label.OutsideBottomCenter.String()) + } + } } func getRanks(g *d2graph.Graph, isHorizontal bool) (ranks [][]*d2graph.Object, objectRanks, startingParentRanks, endingParentRanks map[*d2graph.Object]int) { diff --git a/d2layouts/d2elklayout/layout.go b/d2layouts/d2elklayout/layout.go index 2c0b45a9f..5dfe0c607 100644 --- a/d2layouts/d2elklayout/layout.go +++ b/d2layouts/d2elklayout/layout.go @@ -1149,4 +1149,12 @@ func positionLabelsIcons(obj *d2graph.Object) { obj.LabelPosition = go2.Pointer(label.InsideMiddleCenter.String()) } } + + if float64(obj.LabelDimensions.Width) > obj.Width || float64(obj.LabelDimensions.Height) > obj.Height { + if len(obj.ChildrenArray) > 0 { + obj.LabelPosition = go2.Pointer(label.OutsideTopCenter.String()) + } else { + obj.LabelPosition = go2.Pointer(label.OutsideBottomCenter.String()) + } + } } diff --git a/e2etests/testdata/regression/glob_dimensions/dagre/board.exp.json b/e2etests/testdata/regression/glob_dimensions/dagre/board.exp.json index fb2291435..bb38e0c9f 100644 --- a/e2etests/testdata/regression/glob_dimensions/dagre/board.exp.json +++ b/e2etests/testdata/regression/glob_dimensions/dagre/board.exp.json @@ -7,11 +7,11 @@ "id": "start", "type": "oval", "pos": { - "x": 138, + "x": 148, "y": 0 }, - "width": 30, - "height": 30, + "width": 10, + "height": 10, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -40,7 +40,7 @@ "underline": false, "labelWidth": 9, "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "OUTSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 1 }, @@ -49,10 +49,10 @@ "type": "rectangle", "pos": { "x": 18, - "y": 150 + "y": 130 }, "width": 259, - "height": 548, + "height": 509, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -89,11 +89,11 @@ "id": "Check PIN.start", "type": "oval", "pos": { - "x": 138, - "y": 180 + "x": 148, + "y": 160 }, - "width": 30, - "height": 30, + "width": 10, + "height": 10, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -122,7 +122,7 @@ "underline": false, "labelWidth": 9, "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "OUTSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 2 }, @@ -131,7 +131,7 @@ "type": "rectangle", "pos": { "x": 98, - "y": 310 + "y": 270 }, "width": 111, "height": 66, @@ -172,7 +172,7 @@ "type": "diamond", "pos": { "x": 143, - "y": 497 + "y": 457 }, "width": 20, "height": 20, @@ -211,11 +211,11 @@ "id": "Check PIN.end", "type": "oval", "pos": { - "x": 138, - "y": 638 + "x": 148, + "y": 598 }, - "width": 30, - "height": 30, + "width": 10, + "height": 10, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -244,7 +244,7 @@ "underline": false, "labelWidth": 9, "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "OUTSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 2 }, @@ -253,7 +253,7 @@ "type": "rectangle", "pos": { "x": 133, - "y": 839 + "y": 779 }, "width": 159, "height": 66, @@ -294,7 +294,7 @@ "type": "rectangle", "pos": { "x": 227, - "y": 1026 + "y": 966 }, "width": 89, "height": 66, @@ -335,7 +335,7 @@ "type": "rectangle", "pos": { "x": 119, - "y": 1213 + "y": 1153 }, "width": 68, "height": 66, @@ -399,19 +399,19 @@ "route": [ { "x": 153, - "y": 30 + "y": 36 }, { "x": 153, - "y": 70 + "y": 55.20000076293945 }, { "x": 153, - "y": 85.80000305175781 + "y": 65.80000305175781 }, { "x": 153, - "y": 109 + "y": 89 } ], "isCurve": true, @@ -446,19 +446,19 @@ "route": [ { "x": 153, - "y": 210 + "y": 196 }, { "x": 153, - "y": 250 + "y": 215.1999969482422 + }, + { + "x": 153, + "y": 230 }, { "x": 153, "y": 270 - }, - { - "x": 153, - "y": 310 } ], "isCurve": true, @@ -493,19 +493,19 @@ "route": [ { "x": 127.75, - "y": 375.5 + "y": 335.5 }, { "x": 90.1500015258789, - "y": 424.29998779296875 + "y": 384.29998779296875 }, { "x": 94.19999694824219, - "y": 449.6000061035156 + "y": 409.6000061035156 }, { "x": 148, - "y": 502 + "y": 462 } ], "isCurve": true, @@ -540,19 +540,19 @@ "route": [ { "x": 158, - "y": 502 + "y": 462 }, { "x": 200, - "y": 449.6000061035156 + "y": 409.6000061035156 }, { "x": 203.10000610351562, - "y": 424.29998779296875 + "y": 384.29998779296875 }, { "x": 173.5, - "y": 375.5 + "y": 335.5 } ], "isCurve": true, @@ -587,19 +587,19 @@ "route": [ { "x": 153, - "y": 517 + "y": 477 }, { "x": 153, - "y": 565.4000244140625 + "y": 525.4000244140625 }, { "x": 153, - "y": 589.5999755859375 + "y": 549.5999755859375 }, { "x": 153, - "y": 638 + "y": 598 } ], "isCurve": true, @@ -634,19 +634,19 @@ "route": [ { "x": 212.75, - "y": 697.5 + "y": 638.5 }, { "x": 212.75, - "y": 762.2999877929688 + "y": 702.5 }, { "x": 212.75, - "y": 790.7000122070312 + "y": 730.7000122070312 }, { "x": 212.75, - "y": 839.5 + "y": 779.5 } ], "isCurve": true, @@ -681,19 +681,19 @@ "route": [ { "x": 233.5, - "y": 904.5 + "y": 844.5 }, { "x": 263.8999938964844, - "y": 953.2999877929688 + "y": 893.2999877929688 }, { "x": 271.5, - "y": 977.7000122070312 + "y": 917.7000122070312 }, { "x": 271.5, - "y": 1026.5 + "y": 966.5 } ], "isCurve": true, @@ -728,55 +728,55 @@ "route": [ { "x": 67.75, - "y": 697.5 + "y": 638.5 }, { "x": 67.75, - "y": 762.2999877929688 + "y": 702.5 }, { "x": 67.75, - "y": 797.2000122070312 + "y": 737.2000122070312 }, { "x": 67.75, - "y": 825.25 + "y": 765.25 }, { "x": 67.75, - "y": 853.2999877929688 + "y": 793.2999877929688 }, { "x": 67.75, - "y": 890.7000122070312 + "y": 830.7000122070312 }, { "x": 67.75, - "y": 918.75 + "y": 858.75 }, { "x": 67.75, - "y": 946.7999877929688 + "y": 886.7999877929688 }, { "x": 67.75, - "y": 984.2000122070312 + "y": 924.2000122070312 }, { "x": 67.75, - "y": 1012.25 + "y": 952.25 }, { "x": 67.75, - "y": 1040.300048828125 + "y": 980.2999877929688 }, { "x": 78.75, - "y": 1164.699951171875 + "y": 1104.699951171875 }, { "x": 122.75, - "y": 1213.5 + "y": 1153.5 } ], "isCurve": true, @@ -811,31 +811,31 @@ "route": [ { "x": 192, - "y": 904.5 + "y": 844.5 }, { "x": 161.60000610351562, - "y": 953.2999877929688 + "y": 893.2999877929688 }, { "x": 154, - "y": 984.2000122070312 + "y": 924.2000122070312 }, { "x": 154, - "y": 1012.25 + "y": 952.25 }, { "x": 154, - "y": 1040.300048828125 + "y": 980.2999877929688 }, { "x": 153.8000030517578, - "y": 1164.699951171875 + "y": 1104.699951171875 }, { "x": 153, - "y": 1213.5 + "y": 1153.5 } ], "isCurve": true, @@ -870,19 +870,19 @@ "route": [ { "x": 271.5, - "y": 1091.5 + "y": 1031.5 }, { "x": 271.5, - "y": 1140.300048828125 + "y": 1080.300048828125 }, { "x": 254.5, - "y": 1165.9000244140625 + "y": 1105.9000244140625 }, { "x": 186.5, - "y": 1219.5 + "y": 1159.5 } ], "isCurve": true, diff --git a/e2etests/testdata/regression/glob_dimensions/dagre/sketch.exp.svg b/e2etests/testdata/regression/glob_dimensions/dagre/sketch.exp.svg index 5952fed42..2032a09f1 100644 --- a/e2etests/testdata/regression/glob_dimensions/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/glob_dimensions/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ -Check PINSearch NetworkReadyOffEnter PIN /check PIN[pin invalid][pin OK][pin OK]network foundpower offpower offpower off - - - - - - - - - - - - - - - - - + .d2-4250727366 .fill-N1{fill:#0A0F25;} + .d2-4250727366 .fill-N2{fill:#676C7E;} + .d2-4250727366 .fill-N3{fill:#9499AB;} + .d2-4250727366 .fill-N4{fill:#CFD2DD;} + .d2-4250727366 .fill-N5{fill:#DEE1EB;} + .d2-4250727366 .fill-N6{fill:#EEF1F8;} + .d2-4250727366 .fill-N7{fill:#FFFFFF;} + .d2-4250727366 .fill-B1{fill:#0D32B2;} + .d2-4250727366 .fill-B2{fill:#0D32B2;} + .d2-4250727366 .fill-B3{fill:#E3E9FD;} + .d2-4250727366 .fill-B4{fill:#E3E9FD;} + .d2-4250727366 .fill-B5{fill:#EDF0FD;} + .d2-4250727366 .fill-B6{fill:#F7F8FE;} + .d2-4250727366 .fill-AA2{fill:#4A6FF3;} + .d2-4250727366 .fill-AA4{fill:#EDF0FD;} + .d2-4250727366 .fill-AA5{fill:#F7F8FE;} + .d2-4250727366 .fill-AB4{fill:#EDF0FD;} + .d2-4250727366 .fill-AB5{fill:#F7F8FE;} + .d2-4250727366 .stroke-N1{stroke:#0A0F25;} + .d2-4250727366 .stroke-N2{stroke:#676C7E;} + .d2-4250727366 .stroke-N3{stroke:#9499AB;} + .d2-4250727366 .stroke-N4{stroke:#CFD2DD;} + .d2-4250727366 .stroke-N5{stroke:#DEE1EB;} + .d2-4250727366 .stroke-N6{stroke:#EEF1F8;} + .d2-4250727366 .stroke-N7{stroke:#FFFFFF;} + .d2-4250727366 .stroke-B1{stroke:#0D32B2;} + .d2-4250727366 .stroke-B2{stroke:#0D32B2;} + .d2-4250727366 .stroke-B3{stroke:#E3E9FD;} + .d2-4250727366 .stroke-B4{stroke:#E3E9FD;} + .d2-4250727366 .stroke-B5{stroke:#EDF0FD;} + .d2-4250727366 .stroke-B6{stroke:#F7F8FE;} + .d2-4250727366 .stroke-AA2{stroke:#4A6FF3;} + .d2-4250727366 .stroke-AA4{stroke:#EDF0FD;} + .d2-4250727366 .stroke-AA5{stroke:#F7F8FE;} + .d2-4250727366 .stroke-AB4{stroke:#EDF0FD;} + .d2-4250727366 .stroke-AB5{stroke:#F7F8FE;} + .d2-4250727366 .background-color-N1{background-color:#0A0F25;} + .d2-4250727366 .background-color-N2{background-color:#676C7E;} + .d2-4250727366 .background-color-N3{background-color:#9499AB;} + .d2-4250727366 .background-color-N4{background-color:#CFD2DD;} + .d2-4250727366 .background-color-N5{background-color:#DEE1EB;} + .d2-4250727366 .background-color-N6{background-color:#EEF1F8;} + .d2-4250727366 .background-color-N7{background-color:#FFFFFF;} + .d2-4250727366 .background-color-B1{background-color:#0D32B2;} + .d2-4250727366 .background-color-B2{background-color:#0D32B2;} + .d2-4250727366 .background-color-B3{background-color:#E3E9FD;} + .d2-4250727366 .background-color-B4{background-color:#E3E9FD;} + .d2-4250727366 .background-color-B5{background-color:#EDF0FD;} + .d2-4250727366 .background-color-B6{background-color:#F7F8FE;} + .d2-4250727366 .background-color-AA2{background-color:#4A6FF3;} + .d2-4250727366 .background-color-AA4{background-color:#EDF0FD;} + .d2-4250727366 .background-color-AA5{background-color:#F7F8FE;} + .d2-4250727366 .background-color-AB4{background-color:#EDF0FD;} + .d2-4250727366 .background-color-AB5{background-color:#F7F8FE;} + .d2-4250727366 .color-N1{color:#0A0F25;} + .d2-4250727366 .color-N2{color:#676C7E;} + .d2-4250727366 .color-N3{color:#9499AB;} + .d2-4250727366 .color-N4{color:#CFD2DD;} + .d2-4250727366 .color-N5{color:#DEE1EB;} + .d2-4250727366 .color-N6{color:#EEF1F8;} + .d2-4250727366 .color-N7{color:#FFFFFF;} + .d2-4250727366 .color-B1{color:#0D32B2;} + .d2-4250727366 .color-B2{color:#0D32B2;} + .d2-4250727366 .color-B3{color:#E3E9FD;} + .d2-4250727366 .color-B4{color:#E3E9FD;} + .d2-4250727366 .color-B5{color:#EDF0FD;} + .d2-4250727366 .color-B6{color:#F7F8FE;} + .d2-4250727366 .color-AA2{color:#4A6FF3;} + .d2-4250727366 .color-AA4{color:#EDF0FD;} + .d2-4250727366 .color-AA5{color:#F7F8FE;} + .d2-4250727366 .color-AB4{color:#EDF0FD;} + .d2-4250727366 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>Check PINSearch NetworkReadyOffEnter PIN /check PIN[pin invalid][pin OK][pin OK]network foundpower offpower offpower off + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/glob_dimensions/elk/board.exp.json b/e2etests/testdata/regression/glob_dimensions/elk/board.exp.json index aec42cecc..61b314cc0 100644 --- a/e2etests/testdata/regression/glob_dimensions/elk/board.exp.json +++ b/e2etests/testdata/regression/glob_dimensions/elk/board.exp.json @@ -7,11 +7,11 @@ "id": "start", "type": "oval", "pos": { - "x": 153, + "x": 163, "y": 12 }, - "width": 30, - "height": 30, + "width": 10, + "height": 10, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -40,7 +40,7 @@ "underline": false, "labelWidth": 9, "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "OUTSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 1 }, @@ -49,10 +49,10 @@ "type": "rectangle", "pos": { "x": 37, - "y": 112 + "y": 118 }, "width": 262, - "height": 658, + "height": 670, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -89,11 +89,11 @@ "id": "Check PIN.start", "type": "oval", "pos": { - "x": 151, - "y": 162 + "x": 161, + "y": 168 }, - "width": 30, - "height": 30, + "width": 10, + "height": 10, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -122,7 +122,7 @@ "underline": false, "labelWidth": 9, "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "OUTSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 2 }, @@ -131,7 +131,7 @@ "type": "rectangle", "pos": { "x": 111, - "y": 262 + "y": 274 }, "width": 111, "height": 66, @@ -172,7 +172,7 @@ "type": "diamond", "pos": { "x": 156, - "y": 509 + "y": 521 }, "width": 20, "height": 20, @@ -211,11 +211,11 @@ "id": "Check PIN.end", "type": "oval", "pos": { - "x": 151, - "y": 690 + "x": 161, + "y": 702 }, - "width": 30, - "height": 30, + "width": 10, + "height": 10, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -244,7 +244,7 @@ "underline": false, "labelWidth": 9, "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "OUTSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 2 }, @@ -253,7 +253,7 @@ "type": "rectangle", "pos": { "x": 29, - "y": 941 + "y": 959 }, "width": 159, "height": 66, @@ -294,7 +294,7 @@ "type": "rectangle", "pos": { "x": 15, - "y": 1178 + "y": 1196 }, "width": 89, "height": 66, @@ -335,7 +335,7 @@ "type": "rectangle", "pos": { "x": 95, - "y": 1415 + "y": 1433 }, "width": 120, "height": 66, @@ -398,12 +398,12 @@ "labelPercentage": 0, "route": [ { - "x": 169, - "y": 42 + "x": 168.5, + "y": 48 }, { - "x": 168, - "y": 112 + "x": 168.5, + "y": 118 } ], "animated": false, @@ -436,12 +436,12 @@ "labelPercentage": 0, "route": [ { - "x": 167, - "y": 192 + "x": 166.5, + "y": 204 }, { - "x": 166, - "y": 262 + "x": 166.5, + "y": 274 } ], "animated": false, @@ -475,19 +475,19 @@ "route": [ { "x": 123.5, - "y": 328 + "y": 340 }, { "x": 123.5, - "y": 469 + "y": 481 }, { "x": 163.16600036621094, - "y": 469 + "y": 481 }, { "x": 163, - "y": 512 + "y": 524 } ], "animated": false, @@ -521,19 +521,19 @@ "route": [ { "x": 170, - "y": 513 + "y": 525 }, { "x": 169.83299255371094, - "y": 469 + "y": 481 }, { "x": 209.5, - "y": 469 + "y": 481 }, { "x": 209.5, - "y": 328 + "y": 340 } ], "animated": false, @@ -567,11 +567,11 @@ "route": [ { "x": 166, - "y": 528 + "y": 540 }, { "x": 167, - "y": 690 + "y": 702 } ], "animated": false, @@ -605,11 +605,11 @@ "route": [ { "x": 108.75, - "y": 770 + "y": 788 }, { "x": 108.75, - "y": 941 + "y": 959 } ], "animated": false, @@ -643,11 +643,11 @@ "route": [ { "x": 60, - "y": 1007 + "y": 1025 }, { "x": 60, - "y": 1178 + "y": 1196 } ], "animated": false, @@ -681,19 +681,19 @@ "route": [ { "x": 240.99899291992188, - "y": 770 + "y": 788 }, { "x": 240.99899291992188, - "y": 1375 + "y": 1393 }, { "x": 185.25, - "y": 1375 + "y": 1393 }, { "x": 185.25, - "y": 1415 + "y": 1433 } ], "animated": false, @@ -727,11 +727,11 @@ "route": [ { "x": 157.5, - "y": 1007 + "y": 1025 }, { "x": 157.5, - "y": 1415 + "y": 1433 } ], "animated": false, @@ -765,19 +765,19 @@ "route": [ { "x": 60, - "y": 1244 + "y": 1262 }, { "x": 60, - "y": 1375 + "y": 1393 }, { "x": 125.25, - "y": 1375 + "y": 1393 }, { "x": 125.25, - "y": 1415 + "y": 1433 } ], "animated": false, diff --git a/e2etests/testdata/regression/glob_dimensions/elk/sketch.exp.svg b/e2etests/testdata/regression/glob_dimensions/elk/sketch.exp.svg index d834ef015..7e94b6ce3 100644 --- a/e2etests/testdata/regression/glob_dimensions/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/glob_dimensions/elk/sketch.exp.svg @@ -1,23 +1,23 @@ -Check PINSearch NetworkReadyOffEnter PIN /check PIN[pin invalid][pin OK][pin OK]network foundpower offpower offpower off - - - - - - - - - - - - - - - - - + .d2-2779426373 .fill-N1{fill:#0A0F25;} + .d2-2779426373 .fill-N2{fill:#676C7E;} + .d2-2779426373 .fill-N3{fill:#9499AB;} + .d2-2779426373 .fill-N4{fill:#CFD2DD;} + .d2-2779426373 .fill-N5{fill:#DEE1EB;} + .d2-2779426373 .fill-N6{fill:#EEF1F8;} + .d2-2779426373 .fill-N7{fill:#FFFFFF;} + .d2-2779426373 .fill-B1{fill:#0D32B2;} + .d2-2779426373 .fill-B2{fill:#0D32B2;} + .d2-2779426373 .fill-B3{fill:#E3E9FD;} + .d2-2779426373 .fill-B4{fill:#E3E9FD;} + .d2-2779426373 .fill-B5{fill:#EDF0FD;} + .d2-2779426373 .fill-B6{fill:#F7F8FE;} + .d2-2779426373 .fill-AA2{fill:#4A6FF3;} + .d2-2779426373 .fill-AA4{fill:#EDF0FD;} + .d2-2779426373 .fill-AA5{fill:#F7F8FE;} + .d2-2779426373 .fill-AB4{fill:#EDF0FD;} + .d2-2779426373 .fill-AB5{fill:#F7F8FE;} + .d2-2779426373 .stroke-N1{stroke:#0A0F25;} + .d2-2779426373 .stroke-N2{stroke:#676C7E;} + .d2-2779426373 .stroke-N3{stroke:#9499AB;} + .d2-2779426373 .stroke-N4{stroke:#CFD2DD;} + .d2-2779426373 .stroke-N5{stroke:#DEE1EB;} + .d2-2779426373 .stroke-N6{stroke:#EEF1F8;} + .d2-2779426373 .stroke-N7{stroke:#FFFFFF;} + .d2-2779426373 .stroke-B1{stroke:#0D32B2;} + .d2-2779426373 .stroke-B2{stroke:#0D32B2;} + .d2-2779426373 .stroke-B3{stroke:#E3E9FD;} + .d2-2779426373 .stroke-B4{stroke:#E3E9FD;} + .d2-2779426373 .stroke-B5{stroke:#EDF0FD;} + .d2-2779426373 .stroke-B6{stroke:#F7F8FE;} + .d2-2779426373 .stroke-AA2{stroke:#4A6FF3;} + .d2-2779426373 .stroke-AA4{stroke:#EDF0FD;} + .d2-2779426373 .stroke-AA5{stroke:#F7F8FE;} + .d2-2779426373 .stroke-AB4{stroke:#EDF0FD;} + .d2-2779426373 .stroke-AB5{stroke:#F7F8FE;} + .d2-2779426373 .background-color-N1{background-color:#0A0F25;} + .d2-2779426373 .background-color-N2{background-color:#676C7E;} + .d2-2779426373 .background-color-N3{background-color:#9499AB;} + .d2-2779426373 .background-color-N4{background-color:#CFD2DD;} + .d2-2779426373 .background-color-N5{background-color:#DEE1EB;} + .d2-2779426373 .background-color-N6{background-color:#EEF1F8;} + .d2-2779426373 .background-color-N7{background-color:#FFFFFF;} + .d2-2779426373 .background-color-B1{background-color:#0D32B2;} + .d2-2779426373 .background-color-B2{background-color:#0D32B2;} + .d2-2779426373 .background-color-B3{background-color:#E3E9FD;} + .d2-2779426373 .background-color-B4{background-color:#E3E9FD;} + .d2-2779426373 .background-color-B5{background-color:#EDF0FD;} + .d2-2779426373 .background-color-B6{background-color:#F7F8FE;} + .d2-2779426373 .background-color-AA2{background-color:#4A6FF3;} + .d2-2779426373 .background-color-AA4{background-color:#EDF0FD;} + .d2-2779426373 .background-color-AA5{background-color:#F7F8FE;} + .d2-2779426373 .background-color-AB4{background-color:#EDF0FD;} + .d2-2779426373 .background-color-AB5{background-color:#F7F8FE;} + .d2-2779426373 .color-N1{color:#0A0F25;} + .d2-2779426373 .color-N2{color:#676C7E;} + .d2-2779426373 .color-N3{color:#9499AB;} + .d2-2779426373 .color-N4{color:#CFD2DD;} + .d2-2779426373 .color-N5{color:#DEE1EB;} + .d2-2779426373 .color-N6{color:#EEF1F8;} + .d2-2779426373 .color-N7{color:#FFFFFF;} + .d2-2779426373 .color-B1{color:#0D32B2;} + .d2-2779426373 .color-B2{color:#0D32B2;} + .d2-2779426373 .color-B3{color:#E3E9FD;} + .d2-2779426373 .color-B4{color:#E3E9FD;} + .d2-2779426373 .color-B5{color:#EDF0FD;} + .d2-2779426373 .color-B6{color:#F7F8FE;} + .d2-2779426373 .color-AA2{color:#4A6FF3;} + .d2-2779426373 .color-AA4{color:#EDF0FD;} + .d2-2779426373 .color-AA5{color:#F7F8FE;} + .d2-2779426373 .color-AB4{color:#EDF0FD;} + .d2-2779426373 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>Check PINSearch NetworkReadyOffEnter PIN /check PIN[pin invalid][pin OK][pin OK]network foundpower offpower offpower off + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/just-width/dagre/board.exp.json b/e2etests/testdata/regression/just-width/dagre/board.exp.json index c1f63d1f6..d7d37e01c 100644 --- a/e2etests/testdata/regression/just-width/dagre/board.exp.json +++ b/e2etests/testdata/regression/just-width/dagre/board.exp.json @@ -10,7 +10,7 @@ "x": 0, "y": 0 }, - "width": 262, + "width": 100, "height": 61, "opacity": 1, "strokeDash": 0, @@ -40,7 +40,7 @@ "underline": false, "labelWidth": 262, "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "OUTSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 1 } diff --git a/e2etests/testdata/regression/just-width/dagre/sketch.exp.svg b/e2etests/testdata/regression/just-width/dagre/sketch.exp.svg index 7133b6e3f..de3a16878 100644 --- a/e2etests/testdata/regression/just-width/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/just-width/dagre/sketch.exp.svg @@ -1,9 +1,9 @@ -teamwork: having someone to blame - - + .d2-3251595454 .fill-N1{fill:#0A0F25;} + .d2-3251595454 .fill-N2{fill:#676C7E;} + .d2-3251595454 .fill-N3{fill:#9499AB;} + .d2-3251595454 .fill-N4{fill:#CFD2DD;} + .d2-3251595454 .fill-N5{fill:#DEE1EB;} + .d2-3251595454 .fill-N6{fill:#EEF1F8;} + .d2-3251595454 .fill-N7{fill:#FFFFFF;} + .d2-3251595454 .fill-B1{fill:#0D32B2;} + .d2-3251595454 .fill-B2{fill:#0D32B2;} + .d2-3251595454 .fill-B3{fill:#E3E9FD;} + .d2-3251595454 .fill-B4{fill:#E3E9FD;} + .d2-3251595454 .fill-B5{fill:#EDF0FD;} + .d2-3251595454 .fill-B6{fill:#F7F8FE;} + .d2-3251595454 .fill-AA2{fill:#4A6FF3;} + .d2-3251595454 .fill-AA4{fill:#EDF0FD;} + .d2-3251595454 .fill-AA5{fill:#F7F8FE;} + .d2-3251595454 .fill-AB4{fill:#EDF0FD;} + .d2-3251595454 .fill-AB5{fill:#F7F8FE;} + .d2-3251595454 .stroke-N1{stroke:#0A0F25;} + .d2-3251595454 .stroke-N2{stroke:#676C7E;} + .d2-3251595454 .stroke-N3{stroke:#9499AB;} + .d2-3251595454 .stroke-N4{stroke:#CFD2DD;} + .d2-3251595454 .stroke-N5{stroke:#DEE1EB;} + .d2-3251595454 .stroke-N6{stroke:#EEF1F8;} + .d2-3251595454 .stroke-N7{stroke:#FFFFFF;} + .d2-3251595454 .stroke-B1{stroke:#0D32B2;} + .d2-3251595454 .stroke-B2{stroke:#0D32B2;} + .d2-3251595454 .stroke-B3{stroke:#E3E9FD;} + .d2-3251595454 .stroke-B4{stroke:#E3E9FD;} + .d2-3251595454 .stroke-B5{stroke:#EDF0FD;} + .d2-3251595454 .stroke-B6{stroke:#F7F8FE;} + .d2-3251595454 .stroke-AA2{stroke:#4A6FF3;} + .d2-3251595454 .stroke-AA4{stroke:#EDF0FD;} + .d2-3251595454 .stroke-AA5{stroke:#F7F8FE;} + .d2-3251595454 .stroke-AB4{stroke:#EDF0FD;} + .d2-3251595454 .stroke-AB5{stroke:#F7F8FE;} + .d2-3251595454 .background-color-N1{background-color:#0A0F25;} + .d2-3251595454 .background-color-N2{background-color:#676C7E;} + .d2-3251595454 .background-color-N3{background-color:#9499AB;} + .d2-3251595454 .background-color-N4{background-color:#CFD2DD;} + .d2-3251595454 .background-color-N5{background-color:#DEE1EB;} + .d2-3251595454 .background-color-N6{background-color:#EEF1F8;} + .d2-3251595454 .background-color-N7{background-color:#FFFFFF;} + .d2-3251595454 .background-color-B1{background-color:#0D32B2;} + .d2-3251595454 .background-color-B2{background-color:#0D32B2;} + .d2-3251595454 .background-color-B3{background-color:#E3E9FD;} + .d2-3251595454 .background-color-B4{background-color:#E3E9FD;} + .d2-3251595454 .background-color-B5{background-color:#EDF0FD;} + .d2-3251595454 .background-color-B6{background-color:#F7F8FE;} + .d2-3251595454 .background-color-AA2{background-color:#4A6FF3;} + .d2-3251595454 .background-color-AA4{background-color:#EDF0FD;} + .d2-3251595454 .background-color-AA5{background-color:#F7F8FE;} + .d2-3251595454 .background-color-AB4{background-color:#EDF0FD;} + .d2-3251595454 .background-color-AB5{background-color:#F7F8FE;} + .d2-3251595454 .color-N1{color:#0A0F25;} + .d2-3251595454 .color-N2{color:#676C7E;} + .d2-3251595454 .color-N3{color:#9499AB;} + .d2-3251595454 .color-N4{color:#CFD2DD;} + .d2-3251595454 .color-N5{color:#DEE1EB;} + .d2-3251595454 .color-N6{color:#EEF1F8;} + .d2-3251595454 .color-N7{color:#FFFFFF;} + .d2-3251595454 .color-B1{color:#0D32B2;} + .d2-3251595454 .color-B2{color:#0D32B2;} + .d2-3251595454 .color-B3{color:#E3E9FD;} + .d2-3251595454 .color-B4{color:#E3E9FD;} + .d2-3251595454 .color-B5{color:#EDF0FD;} + .d2-3251595454 .color-B6{color:#F7F8FE;} + .d2-3251595454 .color-AA2{color:#4A6FF3;} + .d2-3251595454 .color-AA4{color:#EDF0FD;} + .d2-3251595454 .color-AA5{color:#F7F8FE;} + .d2-3251595454 .color-AB4{color:#EDF0FD;} + .d2-3251595454 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>teamwork: having someone to blame + + \ No newline at end of file diff --git a/e2etests/testdata/regression/just-width/elk/board.exp.json b/e2etests/testdata/regression/just-width/elk/board.exp.json index f88d632ff..90db64280 100644 --- a/e2etests/testdata/regression/just-width/elk/board.exp.json +++ b/e2etests/testdata/regression/just-width/elk/board.exp.json @@ -10,7 +10,7 @@ "x": 12, "y": 12 }, - "width": 262, + "width": 100, "height": 61, "opacity": 1, "strokeDash": 0, @@ -40,7 +40,7 @@ "underline": false, "labelWidth": 262, "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "OUTSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 1 } diff --git a/e2etests/testdata/regression/just-width/elk/sketch.exp.svg b/e2etests/testdata/regression/just-width/elk/sketch.exp.svg index 4125f4e3f..3856d882c 100644 --- a/e2etests/testdata/regression/just-width/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/just-width/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -teamwork: having someone to blame - - + .d2-1014957270 .fill-N1{fill:#0A0F25;} + .d2-1014957270 .fill-N2{fill:#676C7E;} + .d2-1014957270 .fill-N3{fill:#9499AB;} + .d2-1014957270 .fill-N4{fill:#CFD2DD;} + .d2-1014957270 .fill-N5{fill:#DEE1EB;} + .d2-1014957270 .fill-N6{fill:#EEF1F8;} + .d2-1014957270 .fill-N7{fill:#FFFFFF;} + .d2-1014957270 .fill-B1{fill:#0D32B2;} + .d2-1014957270 .fill-B2{fill:#0D32B2;} + .d2-1014957270 .fill-B3{fill:#E3E9FD;} + .d2-1014957270 .fill-B4{fill:#E3E9FD;} + .d2-1014957270 .fill-B5{fill:#EDF0FD;} + .d2-1014957270 .fill-B6{fill:#F7F8FE;} + .d2-1014957270 .fill-AA2{fill:#4A6FF3;} + .d2-1014957270 .fill-AA4{fill:#EDF0FD;} + .d2-1014957270 .fill-AA5{fill:#F7F8FE;} + .d2-1014957270 .fill-AB4{fill:#EDF0FD;} + .d2-1014957270 .fill-AB5{fill:#F7F8FE;} + .d2-1014957270 .stroke-N1{stroke:#0A0F25;} + .d2-1014957270 .stroke-N2{stroke:#676C7E;} + .d2-1014957270 .stroke-N3{stroke:#9499AB;} + .d2-1014957270 .stroke-N4{stroke:#CFD2DD;} + .d2-1014957270 .stroke-N5{stroke:#DEE1EB;} + .d2-1014957270 .stroke-N6{stroke:#EEF1F8;} + .d2-1014957270 .stroke-N7{stroke:#FFFFFF;} + .d2-1014957270 .stroke-B1{stroke:#0D32B2;} + .d2-1014957270 .stroke-B2{stroke:#0D32B2;} + .d2-1014957270 .stroke-B3{stroke:#E3E9FD;} + .d2-1014957270 .stroke-B4{stroke:#E3E9FD;} + .d2-1014957270 .stroke-B5{stroke:#EDF0FD;} + .d2-1014957270 .stroke-B6{stroke:#F7F8FE;} + .d2-1014957270 .stroke-AA2{stroke:#4A6FF3;} + .d2-1014957270 .stroke-AA4{stroke:#EDF0FD;} + .d2-1014957270 .stroke-AA5{stroke:#F7F8FE;} + .d2-1014957270 .stroke-AB4{stroke:#EDF0FD;} + .d2-1014957270 .stroke-AB5{stroke:#F7F8FE;} + .d2-1014957270 .background-color-N1{background-color:#0A0F25;} + .d2-1014957270 .background-color-N2{background-color:#676C7E;} + .d2-1014957270 .background-color-N3{background-color:#9499AB;} + .d2-1014957270 .background-color-N4{background-color:#CFD2DD;} + .d2-1014957270 .background-color-N5{background-color:#DEE1EB;} + .d2-1014957270 .background-color-N6{background-color:#EEF1F8;} + .d2-1014957270 .background-color-N7{background-color:#FFFFFF;} + .d2-1014957270 .background-color-B1{background-color:#0D32B2;} + .d2-1014957270 .background-color-B2{background-color:#0D32B2;} + .d2-1014957270 .background-color-B3{background-color:#E3E9FD;} + .d2-1014957270 .background-color-B4{background-color:#E3E9FD;} + .d2-1014957270 .background-color-B5{background-color:#EDF0FD;} + .d2-1014957270 .background-color-B6{background-color:#F7F8FE;} + .d2-1014957270 .background-color-AA2{background-color:#4A6FF3;} + .d2-1014957270 .background-color-AA4{background-color:#EDF0FD;} + .d2-1014957270 .background-color-AA5{background-color:#F7F8FE;} + .d2-1014957270 .background-color-AB4{background-color:#EDF0FD;} + .d2-1014957270 .background-color-AB5{background-color:#F7F8FE;} + .d2-1014957270 .color-N1{color:#0A0F25;} + .d2-1014957270 .color-N2{color:#676C7E;} + .d2-1014957270 .color-N3{color:#9499AB;} + .d2-1014957270 .color-N4{color:#CFD2DD;} + .d2-1014957270 .color-N5{color:#DEE1EB;} + .d2-1014957270 .color-N6{color:#EEF1F8;} + .d2-1014957270 .color-N7{color:#FFFFFF;} + .d2-1014957270 .color-B1{color:#0D32B2;} + .d2-1014957270 .color-B2{color:#0D32B2;} + .d2-1014957270 .color-B3{color:#E3E9FD;} + .d2-1014957270 .color-B4{color:#E3E9FD;} + .d2-1014957270 .color-B5{color:#EDF0FD;} + .d2-1014957270 .color-B6{color:#F7F8FE;} + .d2-1014957270 .color-AA2{color:#4A6FF3;} + .d2-1014957270 .color-AA4{color:#EDF0FD;} + .d2-1014957270 .color-AA5{color:#F7F8FE;} + .d2-1014957270 .color-AB4{color:#EDF0FD;} + .d2-1014957270 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>teamwork: having someone to blame + + \ No newline at end of file diff --git a/e2etests/testdata/stable/simple_grid_edges/dagre/board.exp.json b/e2etests/testdata/stable/simple_grid_edges/dagre/board.exp.json index 3247aa247..52e639ce5 100644 --- a/e2etests/testdata/stable/simple_grid_edges/dagre/board.exp.json +++ b/e2etests/testdata/stable/simple_grid_edges/dagre/board.exp.json @@ -192,7 +192,7 @@ "x": 480, "y": 0 }, - "width": 120, + "width": 100, "height": 60, "opacity": 1, "strokeDash": 0, @@ -408,7 +408,7 @@ "x": 480, "y": 65 }, - "width": 120, + "width": 100, "height": 30, "opacity": 1, "strokeDash": 0, @@ -632,7 +632,7 @@ "x": 480, "y": 100 }, - "width": 120, + "width": 100, "height": 60, "opacity": 1, "strokeDash": 0, @@ -852,7 +852,7 @@ "x": 480, "y": 165 }, - "width": 120, + "width": 100, "height": 30, "opacity": 1, "strokeDash": 0, @@ -1188,7 +1188,7 @@ "x": 480, "y": 200 }, - "width": 120, + "width": 100, "height": 60, "opacity": 1, "strokeDash": 0, @@ -1539,11 +1539,11 @@ "labelPercentage": 0, "route": [ { - "x": 540, + "x": 530, "y": 100 }, { - "x": 540, + "x": 530, "y": 60 } ], @@ -1580,11 +1580,11 @@ "labelPercentage": 0, "route": [ { - "x": 540, + "x": 530, "y": 160 }, { - "x": 540, + "x": 530, "y": 200 } ], diff --git a/e2etests/testdata/stable/simple_grid_edges/dagre/sketch.exp.svg b/e2etests/testdata/stable/simple_grid_edges/dagre/sketch.exp.svg index a6635f2aa..31595c534 100644 --- a/e2etests/testdata/stable/simple_grid_edges/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/simple_grid_edges/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ -npm i -g@forge/cliSet up anAtlassian siteView the helloworld appforgetunnelforgeloginforgecreateforgedeployforgeinstallHot reloadchanges?Step 1Step 2Step 3Step 4forgedeploy⬤ Forge CLI⬤ Required⬤ Optional YesNo - + .d2-29674933 .fill-N1{fill:#0A0F25;} + .d2-29674933 .fill-N2{fill:#676C7E;} + .d2-29674933 .fill-N3{fill:#9499AB;} + .d2-29674933 .fill-N4{fill:#CFD2DD;} + .d2-29674933 .fill-N5{fill:#DEE1EB;} + .d2-29674933 .fill-N6{fill:#EEF1F8;} + .d2-29674933 .fill-N7{fill:#FFFFFF;} + .d2-29674933 .fill-B1{fill:#0D32B2;} + .d2-29674933 .fill-B2{fill:#0D32B2;} + .d2-29674933 .fill-B3{fill:#E3E9FD;} + .d2-29674933 .fill-B4{fill:#E3E9FD;} + .d2-29674933 .fill-B5{fill:#EDF0FD;} + .d2-29674933 .fill-B6{fill:#F7F8FE;} + .d2-29674933 .fill-AA2{fill:#4A6FF3;} + .d2-29674933 .fill-AA4{fill:#EDF0FD;} + .d2-29674933 .fill-AA5{fill:#F7F8FE;} + .d2-29674933 .fill-AB4{fill:#EDF0FD;} + .d2-29674933 .fill-AB5{fill:#F7F8FE;} + .d2-29674933 .stroke-N1{stroke:#0A0F25;} + .d2-29674933 .stroke-N2{stroke:#676C7E;} + .d2-29674933 .stroke-N3{stroke:#9499AB;} + .d2-29674933 .stroke-N4{stroke:#CFD2DD;} + .d2-29674933 .stroke-N5{stroke:#DEE1EB;} + .d2-29674933 .stroke-N6{stroke:#EEF1F8;} + .d2-29674933 .stroke-N7{stroke:#FFFFFF;} + .d2-29674933 .stroke-B1{stroke:#0D32B2;} + .d2-29674933 .stroke-B2{stroke:#0D32B2;} + .d2-29674933 .stroke-B3{stroke:#E3E9FD;} + .d2-29674933 .stroke-B4{stroke:#E3E9FD;} + .d2-29674933 .stroke-B5{stroke:#EDF0FD;} + .d2-29674933 .stroke-B6{stroke:#F7F8FE;} + .d2-29674933 .stroke-AA2{stroke:#4A6FF3;} + .d2-29674933 .stroke-AA4{stroke:#EDF0FD;} + .d2-29674933 .stroke-AA5{stroke:#F7F8FE;} + .d2-29674933 .stroke-AB4{stroke:#EDF0FD;} + .d2-29674933 .stroke-AB5{stroke:#F7F8FE;} + .d2-29674933 .background-color-N1{background-color:#0A0F25;} + .d2-29674933 .background-color-N2{background-color:#676C7E;} + .d2-29674933 .background-color-N3{background-color:#9499AB;} + .d2-29674933 .background-color-N4{background-color:#CFD2DD;} + .d2-29674933 .background-color-N5{background-color:#DEE1EB;} + .d2-29674933 .background-color-N6{background-color:#EEF1F8;} + .d2-29674933 .background-color-N7{background-color:#FFFFFF;} + .d2-29674933 .background-color-B1{background-color:#0D32B2;} + .d2-29674933 .background-color-B2{background-color:#0D32B2;} + .d2-29674933 .background-color-B3{background-color:#E3E9FD;} + .d2-29674933 .background-color-B4{background-color:#E3E9FD;} + .d2-29674933 .background-color-B5{background-color:#EDF0FD;} + .d2-29674933 .background-color-B6{background-color:#F7F8FE;} + .d2-29674933 .background-color-AA2{background-color:#4A6FF3;} + .d2-29674933 .background-color-AA4{background-color:#EDF0FD;} + .d2-29674933 .background-color-AA5{background-color:#F7F8FE;} + .d2-29674933 .background-color-AB4{background-color:#EDF0FD;} + .d2-29674933 .background-color-AB5{background-color:#F7F8FE;} + .d2-29674933 .color-N1{color:#0A0F25;} + .d2-29674933 .color-N2{color:#676C7E;} + .d2-29674933 .color-N3{color:#9499AB;} + .d2-29674933 .color-N4{color:#CFD2DD;} + .d2-29674933 .color-N5{color:#DEE1EB;} + .d2-29674933 .color-N6{color:#EEF1F8;} + .d2-29674933 .color-N7{color:#FFFFFF;} + .d2-29674933 .color-B1{color:#0D32B2;} + .d2-29674933 .color-B2{color:#0D32B2;} + .d2-29674933 .color-B3{color:#E3E9FD;} + .d2-29674933 .color-B4{color:#E3E9FD;} + .d2-29674933 .color-B5{color:#EDF0FD;} + .d2-29674933 .color-B6{color:#F7F8FE;} + .d2-29674933 .color-AA2{color:#4A6FF3;} + .d2-29674933 .color-AA4{color:#EDF0FD;} + .d2-29674933 .color-AA5{color:#F7F8FE;} + .d2-29674933 .color-AB4{color:#EDF0FD;} + .d2-29674933 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>npm i -g@forge/cliSet up anAtlassian siteView the helloworld appforgetunnelforgeloginforgecreateforgedeployforgeinstallHot reloadchanges?Step 1Step 2Step 3Step 4forgedeploy⬤ Forge CLI⬤ Required⬤ Optional YesNo + - + - + - + - - + + \ No newline at end of file diff --git a/e2etests/testdata/stable/simple_grid_edges/elk/board.exp.json b/e2etests/testdata/stable/simple_grid_edges/elk/board.exp.json index 3247aa247..52e639ce5 100644 --- a/e2etests/testdata/stable/simple_grid_edges/elk/board.exp.json +++ b/e2etests/testdata/stable/simple_grid_edges/elk/board.exp.json @@ -192,7 +192,7 @@ "x": 480, "y": 0 }, - "width": 120, + "width": 100, "height": 60, "opacity": 1, "strokeDash": 0, @@ -408,7 +408,7 @@ "x": 480, "y": 65 }, - "width": 120, + "width": 100, "height": 30, "opacity": 1, "strokeDash": 0, @@ -632,7 +632,7 @@ "x": 480, "y": 100 }, - "width": 120, + "width": 100, "height": 60, "opacity": 1, "strokeDash": 0, @@ -852,7 +852,7 @@ "x": 480, "y": 165 }, - "width": 120, + "width": 100, "height": 30, "opacity": 1, "strokeDash": 0, @@ -1188,7 +1188,7 @@ "x": 480, "y": 200 }, - "width": 120, + "width": 100, "height": 60, "opacity": 1, "strokeDash": 0, @@ -1539,11 +1539,11 @@ "labelPercentage": 0, "route": [ { - "x": 540, + "x": 530, "y": 100 }, { - "x": 540, + "x": 530, "y": 60 } ], @@ -1580,11 +1580,11 @@ "labelPercentage": 0, "route": [ { - "x": 540, + "x": 530, "y": 160 }, { - "x": 540, + "x": 530, "y": 200 } ], diff --git a/e2etests/testdata/stable/simple_grid_edges/elk/sketch.exp.svg b/e2etests/testdata/stable/simple_grid_edges/elk/sketch.exp.svg index a6635f2aa..31595c534 100644 --- a/e2etests/testdata/stable/simple_grid_edges/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/simple_grid_edges/elk/sketch.exp.svg @@ -1,23 +1,23 @@ -npm i -g@forge/cliSet up anAtlassian siteView the helloworld appforgetunnelforgeloginforgecreateforgedeployforgeinstallHot reloadchanges?Step 1Step 2Step 3Step 4forgedeploy⬤ Forge CLI⬤ Required⬤ Optional YesNo - + .d2-29674933 .fill-N1{fill:#0A0F25;} + .d2-29674933 .fill-N2{fill:#676C7E;} + .d2-29674933 .fill-N3{fill:#9499AB;} + .d2-29674933 .fill-N4{fill:#CFD2DD;} + .d2-29674933 .fill-N5{fill:#DEE1EB;} + .d2-29674933 .fill-N6{fill:#EEF1F8;} + .d2-29674933 .fill-N7{fill:#FFFFFF;} + .d2-29674933 .fill-B1{fill:#0D32B2;} + .d2-29674933 .fill-B2{fill:#0D32B2;} + .d2-29674933 .fill-B3{fill:#E3E9FD;} + .d2-29674933 .fill-B4{fill:#E3E9FD;} + .d2-29674933 .fill-B5{fill:#EDF0FD;} + .d2-29674933 .fill-B6{fill:#F7F8FE;} + .d2-29674933 .fill-AA2{fill:#4A6FF3;} + .d2-29674933 .fill-AA4{fill:#EDF0FD;} + .d2-29674933 .fill-AA5{fill:#F7F8FE;} + .d2-29674933 .fill-AB4{fill:#EDF0FD;} + .d2-29674933 .fill-AB5{fill:#F7F8FE;} + .d2-29674933 .stroke-N1{stroke:#0A0F25;} + .d2-29674933 .stroke-N2{stroke:#676C7E;} + .d2-29674933 .stroke-N3{stroke:#9499AB;} + .d2-29674933 .stroke-N4{stroke:#CFD2DD;} + .d2-29674933 .stroke-N5{stroke:#DEE1EB;} + .d2-29674933 .stroke-N6{stroke:#EEF1F8;} + .d2-29674933 .stroke-N7{stroke:#FFFFFF;} + .d2-29674933 .stroke-B1{stroke:#0D32B2;} + .d2-29674933 .stroke-B2{stroke:#0D32B2;} + .d2-29674933 .stroke-B3{stroke:#E3E9FD;} + .d2-29674933 .stroke-B4{stroke:#E3E9FD;} + .d2-29674933 .stroke-B5{stroke:#EDF0FD;} + .d2-29674933 .stroke-B6{stroke:#F7F8FE;} + .d2-29674933 .stroke-AA2{stroke:#4A6FF3;} + .d2-29674933 .stroke-AA4{stroke:#EDF0FD;} + .d2-29674933 .stroke-AA5{stroke:#F7F8FE;} + .d2-29674933 .stroke-AB4{stroke:#EDF0FD;} + .d2-29674933 .stroke-AB5{stroke:#F7F8FE;} + .d2-29674933 .background-color-N1{background-color:#0A0F25;} + .d2-29674933 .background-color-N2{background-color:#676C7E;} + .d2-29674933 .background-color-N3{background-color:#9499AB;} + .d2-29674933 .background-color-N4{background-color:#CFD2DD;} + .d2-29674933 .background-color-N5{background-color:#DEE1EB;} + .d2-29674933 .background-color-N6{background-color:#EEF1F8;} + .d2-29674933 .background-color-N7{background-color:#FFFFFF;} + .d2-29674933 .background-color-B1{background-color:#0D32B2;} + .d2-29674933 .background-color-B2{background-color:#0D32B2;} + .d2-29674933 .background-color-B3{background-color:#E3E9FD;} + .d2-29674933 .background-color-B4{background-color:#E3E9FD;} + .d2-29674933 .background-color-B5{background-color:#EDF0FD;} + .d2-29674933 .background-color-B6{background-color:#F7F8FE;} + .d2-29674933 .background-color-AA2{background-color:#4A6FF3;} + .d2-29674933 .background-color-AA4{background-color:#EDF0FD;} + .d2-29674933 .background-color-AA5{background-color:#F7F8FE;} + .d2-29674933 .background-color-AB4{background-color:#EDF0FD;} + .d2-29674933 .background-color-AB5{background-color:#F7F8FE;} + .d2-29674933 .color-N1{color:#0A0F25;} + .d2-29674933 .color-N2{color:#676C7E;} + .d2-29674933 .color-N3{color:#9499AB;} + .d2-29674933 .color-N4{color:#CFD2DD;} + .d2-29674933 .color-N5{color:#DEE1EB;} + .d2-29674933 .color-N6{color:#EEF1F8;} + .d2-29674933 .color-N7{color:#FFFFFF;} + .d2-29674933 .color-B1{color:#0D32B2;} + .d2-29674933 .color-B2{color:#0D32B2;} + .d2-29674933 .color-B3{color:#E3E9FD;} + .d2-29674933 .color-B4{color:#E3E9FD;} + .d2-29674933 .color-B5{color:#EDF0FD;} + .d2-29674933 .color-B6{color:#F7F8FE;} + .d2-29674933 .color-AA2{color:#4A6FF3;} + .d2-29674933 .color-AA4{color:#EDF0FD;} + .d2-29674933 .color-AA5{color:#F7F8FE;} + .d2-29674933 .color-AB4{color:#EDF0FD;} + .d2-29674933 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>npm i -g@forge/cliSet up anAtlassian siteView the helloworld appforgetunnelforgeloginforgecreateforgedeployforgeinstallHot reloadchanges?Step 1Step 2Step 3Step 4forgedeploy⬤ Forge CLI⬤ Required⬤ Optional YesNo + - + - + - + - - + + \ No newline at end of file diff --git a/e2etests/testdata/txtar.txt b/e2etests/testdata/txtar.txt index 8982b8da7..e6d17bf6d 100644 --- a/e2etests/testdata/txtar.txt +++ b/e2etests/testdata/txtar.txt @@ -181,3 +181,10 @@ vars: { } a.style.fill-pattern: none b + +-- width-smaller-than-label -- +b: hello there cat { + shape: person + width: 64 + height: 66 +} diff --git a/e2etests/testdata/txtar/width-smaller-than-label/dagre/board.exp.json b/e2etests/testdata/txtar/width-smaller-than-label/dagre/board.exp.json new file mode 100644 index 000000000..e7a9496a4 --- /dev/null +++ b/e2etests/testdata/txtar/width-smaller-than-label/dagre/board.exp.json @@ -0,0 +1,89 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "b", + "type": "person", + "pos": { + "x": 0, + "y": 0 + }, + "width": 64, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "hello there cat", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 101, + "labelHeight": 21, + "labelPosition": "OUTSIDE_BOTTOM_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/width-smaller-than-label/dagre/sketch.exp.svg b/e2etests/testdata/txtar/width-smaller-than-label/dagre/sketch.exp.svg new file mode 100644 index 000000000..6b61707bb --- /dev/null +++ b/e2etests/testdata/txtar/width-smaller-than-label/dagre/sketch.exp.svg @@ -0,0 +1,95 @@ +hello there cat + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/width-smaller-than-label/elk/board.exp.json b/e2etests/testdata/txtar/width-smaller-than-label/elk/board.exp.json new file mode 100644 index 000000000..605a1b81b --- /dev/null +++ b/e2etests/testdata/txtar/width-smaller-than-label/elk/board.exp.json @@ -0,0 +1,89 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "b", + "type": "person", + "pos": { + "x": 12, + "y": 12 + }, + "width": 64, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "hello there cat", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 101, + "labelHeight": 21, + "labelPosition": "OUTSIDE_BOTTOM_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/width-smaller-than-label/elk/sketch.exp.svg b/e2etests/testdata/txtar/width-smaller-than-label/elk/sketch.exp.svg new file mode 100644 index 000000000..89d6e2411 --- /dev/null +++ b/e2etests/testdata/txtar/width-smaller-than-label/elk/sketch.exp.svg @@ -0,0 +1,95 @@ +hello there cat + + + \ No newline at end of file From 2a550861518a337cb2b539a410cfc81e72c913c1 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 10 Apr 2024 20:57:55 -0700 Subject: [PATCH 046/109] update windows script --- ci/release/aws/ensure.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ci/release/aws/ensure.sh b/ci/release/aws/ensure.sh index 19ab6141b..794675998 100755 --- a/ci/release/aws/ensure.sh +++ b/ci/release/aws/ensure.sh @@ -241,8 +241,9 @@ create_windows_amd64() { 'Name=instance-state-name,Values=pending,running,stopping,stopped' "Name=tag:Name,Values=$REMOTE_NAME" \ | jq -r '.Reservations[].Instances[].State.Name') if [ -z "$state" ]; then + # public AMIs are deprecated every few months so just search the latest Windows Server one for recreating sh_c aws ec2 run-instances \ - --image-id=ami-0c5300e833c2b32f3 \ + --image-id=ami-03ea14ccbeab7b2d5 \ --count=1 \ --instance-type=t3.medium \ --security-groups=windows \ @@ -441,19 +442,22 @@ init_remote_windows() { header "$REMOTE_NAME" wait_remote_host_windows + # rsync was broken in this script last ran on 4/10/24. + # had to upgrade with `pacman -Syyu rsync` after + init_ps1=$(cat < script` and then open it with vim FGCOLOR=3 bigheader "WARNING: WINDOWS INITIALIZATION MUST BE COMPLETED MANUALLY OVER RDP AND POWERSHELL!" warn '1. Obtain Windows RDP password with:' From 58ff19c9b2b6d1ddaea717073358e24372776b99 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 10 Apr 2024 21:17:42 -0700 Subject: [PATCH 047/109] v0.6.4 --- ci/release/changelogs/next.md | 14 -------------- ci/release/changelogs/v0.6.4.md | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 ci/release/changelogs/v0.6.4.md diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 69ef0268b..f3c0d2a77 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -1,19 +1,5 @@ #### Features 🚀 -- `style.underline` works on connections [#1836](https://github.com/terrastruct/d2/pull/1836) -- `none` is added as an accepted value for `fill-pattern`. Previously there was no way to cancel the `fill-pattern` on select objects set by a theme that applies it (Origami) [#1882](https://github.com/terrastruct/d2/pull/1882) - #### Improvements 🧹 -- Dimensions can be set less than label dimensions [#1901](https://github.com/terrastruct/d2/pull/1901) -- Boards no longer inherit `label` fields from parents [#1838](https://github.com/terrastruct/d2/pull/1838) -- Prevents `near` targeting a child of a special object like grid cells, which wasn't doing anything [#1851](https://github.com/terrastruct/d2/pull/1851) - #### Bugfixes ⛑️ - -- Theme flags on CLI apply to PDFs [#1894](https://github.com/terrastruct/d2/pull/1894) -- Fixes styles in connections not overriding styles set by globs [#1857](https://github.com/terrastruct/d2/pull/1857) -- Fixes `null` being set on a nested shape not working in certain cases when connections also pointed to that shape [#1830](https://github.com/terrastruct/d2/pull/1830) -- Fixes edge case of bad import syntax crashing using d2 as a library [#1829](https://github.com/terrastruct/d2/pull/1829) -- Fixes `style.fill` not applying to markdown [#1872](https://github.com/terrastruct/d2/pull/1872) -- Fixes compiler erroring on certain styles when the shape's `shape` value is not all lowercase (e.g. `Circle`) [#1887](https://github.com/terrastruct/d2/pull/1887) diff --git a/ci/release/changelogs/v0.6.4.md b/ci/release/changelogs/v0.6.4.md new file mode 100644 index 000000000..69ef0268b --- /dev/null +++ b/ci/release/changelogs/v0.6.4.md @@ -0,0 +1,19 @@ +#### Features 🚀 + +- `style.underline` works on connections [#1836](https://github.com/terrastruct/d2/pull/1836) +- `none` is added as an accepted value for `fill-pattern`. Previously there was no way to cancel the `fill-pattern` on select objects set by a theme that applies it (Origami) [#1882](https://github.com/terrastruct/d2/pull/1882) + +#### Improvements 🧹 + +- Dimensions can be set less than label dimensions [#1901](https://github.com/terrastruct/d2/pull/1901) +- Boards no longer inherit `label` fields from parents [#1838](https://github.com/terrastruct/d2/pull/1838) +- Prevents `near` targeting a child of a special object like grid cells, which wasn't doing anything [#1851](https://github.com/terrastruct/d2/pull/1851) + +#### Bugfixes ⛑️ + +- Theme flags on CLI apply to PDFs [#1894](https://github.com/terrastruct/d2/pull/1894) +- Fixes styles in connections not overriding styles set by globs [#1857](https://github.com/terrastruct/d2/pull/1857) +- Fixes `null` being set on a nested shape not working in certain cases when connections also pointed to that shape [#1830](https://github.com/terrastruct/d2/pull/1830) +- Fixes edge case of bad import syntax crashing using d2 as a library [#1829](https://github.com/terrastruct/d2/pull/1829) +- Fixes `style.fill` not applying to markdown [#1872](https://github.com/terrastruct/d2/pull/1872) +- Fixes compiler erroring on certain styles when the shape's `shape` value is not all lowercase (e.g. `Circle`) [#1887](https://github.com/terrastruct/d2/pull/1887) From 45a68d034cb4ecfc1a310c60174813fe21c4d0d7 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 10 Apr 2024 21:19:34 -0700 Subject: [PATCH 048/109] 0.6.4 --- .../testdata/all_shapes/sketch.exp.svg | 2 +- .../testdata/all_shapes_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/animated/sketch.exp.svg | 2 +- .../testdata/animated_dark/sketch.exp.svg | 2 +- .../testdata/arrowheads/sketch.exp.svg | 2 +- .../testdata/arrowheads_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/basic/sketch.exp.svg | 2 +- .../testdata/basic_dark/sketch.exp.svg | 2 +- .../testdata/child_to_child/sketch.exp.svg | 2 +- .../child_to_child_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/class/sketch.exp.svg | 2 +- .../sketch.exp.svg | 2 +- .../testdata/class_dark/sketch.exp.svg | 2 +- .../testdata/connection_label/sketch.exp.svg | 2 +- .../connection_label_dark/sketch.exp.svg | 2 +- .../testdata/crows_feet/sketch.exp.svg | 2 +- .../testdata/crows_feet_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/dots-3d/sketch.exp.svg | 2 +- .../d2sketch/testdata/dots-all/sketch.exp.svg | 2 +- .../testdata/dots-multiple/sketch.exp.svg | 2 +- .../testdata/dots-real/sketch.exp.svg | 2 +- .../testdata/double-border/sketch.exp.svg | 2 +- .../testdata/elk_corners/sketch.exp.svg | 2 +- .../long_arrowhead_label/sketch.exp.svg | 2 +- .../d2sketch/testdata/opacity/sketch.exp.svg | 2 +- .../testdata/opacity_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/overlay/sketch.exp.svg | 2 +- .../testdata/paper-real/sketch.exp.svg | 2 +- .../testdata/root-fill/sketch.exp.svg | 2 +- .../testdata/sql_tables/sketch.exp.svg | 2 +- .../testdata/sql_tables_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/terminal/sketch.exp.svg | 2 +- .../d2sketch/testdata/twitter/sketch.exp.svg | 2 +- .../testdata/twitter_dark/sketch.exp.svg | 2 +- .../testdata/unfilled_triangle/sketch.exp.svg | 2 +- .../diagram_wider_than_tooltip/sketch.exp.svg | 2 +- .../testdata/internal-links/sketch.exp.svg | 2 +- .../appendix/testdata/links/sketch.exp.svg | 2 +- .../testdata/links_dark/sketch.exp.svg | 2 +- .../testdata/tooltip_fill/sketch.exp.svg | 2 +- .../tooltip_wider_than_diagram/sketch.exp.svg | 2 +- .../testdata/all_shapes/dark_theme.exp.svg | 2 +- .../testdata/animated/dark_theme.exp.svg | 2 +- .../testdata/arrowheads/dark_theme.exp.svg | 2 +- .../testdata/basic/dark_theme.exp.svg | 2 +- .../child_to_child/dark_theme.exp.svg | 2 +- .../testdata/class/dark_theme.exp.svg | 2 +- .../testdata/code/dark_theme.exp.svg | 2 +- .../connection_label/dark_theme.exp.svg | 2 +- .../testdata/opacity/dark_theme.exp.svg | 2 +- .../testdata/overlay/dark_theme.exp.svg | 2 +- .../testdata/sql_tables/dark_theme.exp.svg | 2 +- .../testdata/twitter/dark_theme.exp.svg | 2 +- .../testdata/TestCLI_E2E/abspath.exp.svg | 2 +- .../testdata/TestCLI_E2E/animation.exp.svg | 2 +- .../board_import/hello-world-x-y.exp.svg | 2 +- .../board_import/hello-world-x.exp.svg | 2 +- .../board_import/hello-world.exp.svg | 2 +- .../testdata/TestCLI_E2E/center.exp.svg | 2 +- .../testdata/TestCLI_E2E/chain_import.exp.svg | 2 +- .../testdata/TestCLI_E2E/empty-base.exp.svg | 2 +- .../TestCLI_E2E/hello_world_png.exp.png | Bin 15387 -> 15387 bytes .../TestCLI_E2E/hello_world_png_pad.exp.png | Bin 73590 -> 73590 bytes .../hello_world_png_sketch.exp.png | Bin 28841 -> 28841 bytes .../testdata/TestCLI_E2E/import.exp.svg | 2 +- .../TestCLI_E2E/import_spread_nested.exp.svg | 2 +- .../testdata/TestCLI_E2E/import_vars.exp.svg | 2 +- .../TestCLI_E2E/internal_linked_pdf.exp.pdf | Bin 66068 -> 66068 bytes .../TestCLI_E2E/layer-link/index.exp.svg | 2 +- .../TestCLI_E2E/layer-link/test2.exp.svg | 2 +- .../TestCLI_E2E/multiboard/life/index.exp.svg | 2 +- .../multiboard/life/layers/broker.exp.svg | 2 +- .../multiboard/life/layers/core.exp.svg | 2 +- .../multiboard/life/layers/stocks.exp.svg | 2 +- .../multiboard/life/scenarios/why.exp.svg | 2 +- .../multiboard/life_index_d2/index.exp.svg | 2 +- .../life_index_d2/layers/broker.exp.svg | 2 +- .../life_index_d2/layers/core.exp.svg | 2 +- .../life_index_d2/layers/stocks.exp.svg | 2 +- .../life_index_d2/scenarios/why.exp.svg | 2 +- .../testdata/TestCLI_E2E/no-nav-pdf.exp.pdf | Bin 96034 -> 96034 bytes .../testdata/TestCLI_E2E/no-nav-pptx.exp.pptx | Bin 122126 -> 122126 bytes .../TestCLI_E2E/renamed-board.exp.pdf | Bin 109975 -> 109975 bytes .../testdata/TestCLI_E2E/stdin.exp.svg | 2 +- .../testdata/TestCLI_E2E/target-b.exp.svg | 2 +- .../TestCLI_E2E/target-nested-index.exp.svg | 2 +- .../TestCLI_E2E/target-nested-index2.exp.svg | 2 +- .../target-nested-with-special-chars.exp.svg | 2 +- .../testdata/TestCLI_E2E/target-root.exp.svg | 2 +- .../TestCLI_E2E/theme-override.exp.svg | 2 +- .../testdata/TestCLI_E2E/theme-pdf.exp.pdf | Bin 17306 -> 17306 bytes .../TestCLI_E2E/vars-animation.exp.svg | 2 +- .../testdata/TestCLI_E2E/vars-config.exp.svg | 2 +- .../testdata/TestCLI_E2E/with-font.exp.svg | 2 +- .../measured/empty-class/dagre/sketch.exp.svg | 2 +- .../measured/empty-shape/dagre/sketch.exp.svg | 2 +- .../empty-sql_table/dagre/sketch.exp.svg | 2 +- .../testdata/patterns/3d/dagre/sketch.exp.svg | 2 +- .../patterns/all_shapes/dagre/sketch.exp.svg | 2 +- .../patterns/multiple/dagre/sketch.exp.svg | 2 +- .../patterns/paper/dagre/sketch.exp.svg | 2 +- .../patterns/real-lines/dagre/sketch.exp.svg | 2 +- .../patterns/real/dagre/sketch.exp.svg | 2 +- .../root-dots-with-fill/dagre/sketch.exp.svg | 2 +- .../patterns/root-dots/dagre/sketch.exp.svg | 2 +- .../patterns/shape/dagre/sketch.exp.svg | 2 +- .../ampersand-escape/dagre/sketch.exp.svg | 2 +- .../ampersand-escape/elk/sketch.exp.svg | 2 +- .../arrowhead_font_color/dagre/sketch.exp.svg | 2 +- .../arrowhead_font_color/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../bold_edge_label/dagre/sketch.exp.svg | 2 +- .../bold_edge_label/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../cloud_shaped_grid/dagre/sketch.exp.svg | 2 +- .../cloud_shaped_grid/elk/sketch.exp.svg | 2 +- .../code_font_size/dagre/sketch.exp.svg | 2 +- .../code_font_size/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../code_leading_newlines/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../code_trailing_newlines/elk/sketch.exp.svg | 2 +- .../cylinder_grid_label/dagre/sketch.exp.svg | 2 +- .../cylinder_grid_label/elk/sketch.exp.svg | 2 +- .../dagre-disconnect/dagre/sketch.exp.svg | 2 +- .../dagre-disconnect/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../dagre_broken_arrowhead/elk/sketch.exp.svg | 2 +- .../dagre_child_id_id/dagre/sketch.exp.svg | 2 +- .../dagre_child_id_id/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre_special_ids/dagre/sketch.exp.svg | 2 +- .../dagre_special_ids/elk/sketch.exp.svg | 2 +- .../disclaimer/dagre/sketch.exp.svg | 2 +- .../regression/disclaimer/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../elk_alignment/dagre/sketch.exp.svg | 2 +- .../elk_alignment/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../elk_loop_panic/dagre/sketch.exp.svg | 2 +- .../elk_loop_panic/elk/sketch.exp.svg | 2 +- .../regression/elk_order/dagre/sketch.exp.svg | 2 +- .../regression/elk_order/elk/sketch.exp.svg | 2 +- .../empty_class_height/dagre/sketch.exp.svg | 2 +- .../empty_class_height/elk/sketch.exp.svg | 2 +- .../empty_nested_grid/dagre/sketch.exp.svg | 2 +- .../empty_nested_grid/elk/sketch.exp.svg | 2 +- .../empty_sequence/dagre/sketch.exp.svg | 2 +- .../empty_sequence/elk/sketch.exp.svg | 2 +- .../glob_dimensions/dagre/sketch.exp.svg | 2 +- .../glob_dimensions/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../grid_in_constant_near/elk/sketch.exp.svg | 2 +- .../regression/grid_oom/dagre/sketch.exp.svg | 2 +- .../regression/grid_oom/elk/sketch.exp.svg | 2 +- .../grid_panic/dagre/sketch.exp.svg | 2 +- .../regression/grid_panic/elk/sketch.exp.svg | 2 +- .../grid_rows_gap_bug/dagre/sketch.exp.svg | 2 +- .../grid_rows_gap_bug/elk/sketch.exp.svg | 2 +- .../grid_with_latex/dagre/sketch.exp.svg | 2 +- .../grid_with_latex/elk/sketch.exp.svg | 2 +- .../regression/hex-fill/dagre/sketch.exp.svg | 2 +- .../regression/hex-fill/elk/sketch.exp.svg | 2 +- .../icons_on_top/dagre/sketch.exp.svg | 2 +- .../icons_on_top/elk/sketch.exp.svg | 2 +- .../just-width/dagre/sketch.exp.svg | 2 +- .../regression/just-width/elk/sketch.exp.svg | 2 +- .../link_with_ampersand/dagre/sketch.exp.svg | 2 +- .../link_with_ampersand/elk/sketch.exp.svg | 2 +- .../long_arrowhead_label/dagre/sketch.exp.svg | 2 +- .../long_arrowhead_label/elk/sketch.exp.svg | 2 +- .../md_font_weight/dagre/sketch.exp.svg | 2 +- .../md_font_weight/elk/sketch.exp.svg | 2 +- .../md_h1_li_li/dagre/sketch.exp.svg | 2 +- .../regression/md_h1_li_li/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../nested_layout_bug/dagre/sketch.exp.svg | 2 +- .../nested_layout_bug/elk/sketch.exp.svg | 2 +- .../nested_steps/dagre/sketch.exp.svg | 2 +- .../nested_steps/elk/sketch.exp.svg | 2 +- .../regression/no-lexer/dagre/sketch.exp.svg | 2 +- .../regression/no-lexer/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../opacity-on-label/dagre/sketch.exp.svg | 2 +- .../opacity-on-label/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../overlapping-edge-label/elk/sketch.exp.svg | 2 +- .../query_param_escape/dagre/sketch.exp.svg | 2 +- .../query_param_escape/elk/sketch.exp.svg | 2 +- .../root-container/dagre/sketch.exp.svg | 2 +- .../root-container/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../regression/slow_grid/dagre/sketch.exp.svg | 2 +- .../regression/slow_grid/elk/sketch.exp.svg | 2 +- .../sql_table_overflow/dagre/sketch.exp.svg | 2 +- .../sql_table_overflow/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../unconnected/dagre/sketch.exp.svg | 2 +- .../regression/unconnected/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../root/border-radius/dagre/sketch.exp.svg | 2 +- .../root/border-radius/elk/sketch.exp.svg | 2 +- .../root/double-border/dagre/sketch.exp.svg | 2 +- .../root/double-border/elk/sketch.exp.svg | 2 +- .../even-stroke-width/dagre/sketch.exp.svg | 2 +- .../root/even-stroke-width/elk/sketch.exp.svg | 2 +- .../testdata/root/fill/dagre/sketch.exp.svg | 2 +- .../testdata/root/fill/elk/sketch.exp.svg | 2 +- .../root/stroke-dash/dagre/sketch.exp.svg | 2 +- .../root/stroke-dash/elk/sketch.exp.svg | 2 +- .../root/stroke-no-width/dagre/sketch.exp.svg | 2 +- .../root/stroke-no-width/elk/sketch.exp.svg | 2 +- .../root/stroke-width/dagre/sketch.exp.svg | 2 +- .../root/stroke-width/elk/sketch.exp.svg | 2 +- .../sanity/1_to_2/dagre/sketch.exp.svg | 2 +- .../testdata/sanity/1_to_2/elk/sketch.exp.svg | 2 +- .../sanity/basic/dagre/sketch.exp.svg | 2 +- .../testdata/sanity/basic/elk/sketch.exp.svg | 2 +- .../child_to_child/dagre/sketch.exp.svg | 2 +- .../sanity/child_to_child/elk/sketch.exp.svg | 2 +- .../connection_label/dagre/sketch.exp.svg | 2 +- .../connection_label/elk/sketch.exp.svg | 2 +- .../sanity/empty/dagre/sketch.exp.svg | 2 +- .../testdata/sanity/empty/elk/sketch.exp.svg | 2 +- .../3d_fill_and_stroke/dagre/sketch.exp.svg | 2 +- .../3d_fill_and_stroke/elk/sketch.exp.svg | 2 +- .../stable/all_shapes/dagre/sketch.exp.svg | 2 +- .../stable/all_shapes/elk/sketch.exp.svg | 2 +- .../all_shapes_link/dagre/sketch.exp.svg | 2 +- .../stable/all_shapes_link/elk/sketch.exp.svg | 2 +- .../all_shapes_multiple/dagre/sketch.exp.svg | 2 +- .../all_shapes_multiple/elk/sketch.exp.svg | 2 +- .../all_shapes_shadow/dagre/sketch.exp.svg | 2 +- .../all_shapes_shadow/elk/sketch.exp.svg | 2 +- .../stable/animated/dagre/sketch.exp.svg | 2 +- .../stable/animated/elk/sketch.exp.svg | 2 +- .../stable/array-classes/dagre/sketch.exp.svg | 2 +- .../stable/array-classes/elk/sketch.exp.svg | 2 +- .../arrowhead_adjustment/dagre/sketch.exp.svg | 2 +- .../arrowhead_adjustment/elk/sketch.exp.svg | 2 +- .../arrowhead_labels/dagre/sketch.exp.svg | 2 +- .../arrowhead_labels/elk/sketch.exp.svg | 2 +- .../arrowhead_scaling/dagre/sketch.exp.svg | 2 +- .../arrowhead_scaling/elk/sketch.exp.svg | 2 +- .../basic-tooltips/dagre/sketch.exp.svg | 2 +- .../stable/basic-tooltips/elk/sketch.exp.svg | 2 +- .../stable/binary_tree/dagre/sketch.exp.svg | 2 +- .../stable/binary_tree/elk/sketch.exp.svg | 2 +- .../stable/bold-mono/dagre/sketch.exp.svg | 2 +- .../stable/bold-mono/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/border-radius/dagre/sketch.exp.svg | 2 +- .../stable/border-radius/elk/sketch.exp.svg | 2 +- .../testdata/stable/br/dagre/sketch.exp.svg | 2 +- .../testdata/stable/br/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/chaos2/dagre/sketch.exp.svg | 2 +- .../testdata/stable/chaos2/elk/sketch.exp.svg | 2 +- .../circle_arrowhead/dagre/sketch.exp.svg | 2 +- .../circle_arrowhead/elk/sketch.exp.svg | 2 +- .../circular_dependency/dagre/sketch.exp.svg | 2 +- .../circular_dependency/elk/sketch.exp.svg | 2 +- .../stable/class/dagre/sketch.exp.svg | 2 +- .../testdata/stable/class/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/classes/dagre/sketch.exp.svg | 2 +- .../stable/classes/elk/sketch.exp.svg | 2 +- .../stable/code_snippet/dagre/sketch.exp.svg | 2 +- .../stable/code_snippet/elk/sketch.exp.svg | 2 +- .../complex-layers/dagre/sketch.exp.svg | 2 +- .../stable/complex-layers/elk/sketch.exp.svg | 2 +- .../connected_container/dagre/sketch.exp.svg | 2 +- .../connected_container/elk/sketch.exp.svg | 2 +- .../constant_near_stress/dagre/sketch.exp.svg | 2 +- .../constant_near_stress/elk/sketch.exp.svg | 2 +- .../constant_near_title/dagre/sketch.exp.svg | 2 +- .../constant_near_title/elk/sketch.exp.svg | 2 +- .../container_edges/dagre/sketch.exp.svg | 2 +- .../stable/container_edges/elk/sketch.exp.svg | 2 +- .../crow_foot_arrowhead/dagre/sketch.exp.svg | 2 +- .../crow_foot_arrowhead/elk/sketch.exp.svg | 2 +- .../stable/cycle-order/dagre/sketch.exp.svg | 2 +- .../stable/cycle-order/elk/sketch.exp.svg | 2 +- .../stable/dagger_grid/dagre/sketch.exp.svg | 2 +- .../stable/dagger_grid/elk/sketch.exp.svg | 2 +- .../dagre-container/dagre/sketch.exp.svg | 2 +- .../stable/dagre-container/elk/sketch.exp.svg | 2 +- .../stable/dagre_spacing/dagre/sketch.exp.svg | 2 +- .../stable/dagre_spacing/elk/sketch.exp.svg | 2 +- .../dagre_spacing_right/dagre/sketch.exp.svg | 2 +- .../dagre_spacing_right/elk/sketch.exp.svg | 2 +- .../stable/dense/dagre/sketch.exp.svg | 2 +- .../testdata/stable/dense/elk/sketch.exp.svg | 2 +- .../different_subgraphs/dagre/sketch.exp.svg | 2 +- .../different_subgraphs/elk/sketch.exp.svg | 2 +- .../stable/direction/dagre/sketch.exp.svg | 2 +- .../stable/direction/elk/sketch.exp.svg | 2 +- .../edge-label-overflow/dagre/sketch.exp.svg | 2 +- .../edge-label-overflow/elk/sketch.exp.svg | 2 +- .../elk_border_radius/dagre/sketch.exp.svg | 2 +- .../elk_border_radius/elk/sketch.exp.svg | 2 +- .../elk_container_height/dagre/sketch.exp.svg | 2 +- .../elk_container_height/elk/sketch.exp.svg | 2 +- .../stable/elk_shim/dagre/sketch.exp.svg | 2 +- .../stable/elk_shim/elk/sketch.exp.svg | 2 +- .../stable/ent2d2_basic/dagre/sketch.exp.svg | 2 +- .../stable/ent2d2_basic/elk/sketch.exp.svg | 2 +- .../stable/ent2d2_right/dagre/sketch.exp.svg | 2 +- .../stable/ent2d2_right/elk/sketch.exp.svg | 2 +- .../executive_grid/dagre/sketch.exp.svg | 2 +- .../stable/executive_grid/elk/sketch.exp.svg | 2 +- .../stable/font_colors/dagre/sketch.exp.svg | 2 +- .../stable/font_colors/elk/sketch.exp.svg | 2 +- .../stable/font_sizes/dagre/sketch.exp.svg | 2 +- .../stable/font_sizes/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../giant_markdown_test/dagre/sketch.exp.svg | 2 +- .../giant_markdown_test/elk/sketch.exp.svg | 2 +- .../stable/grid_animated/dagre/sketch.exp.svg | 2 +- .../stable/grid_animated/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../grid_edge_across_cell/elk/sketch.exp.svg | 2 +- .../stable/grid_even/dagre/sketch.exp.svg | 2 +- .../stable/grid_even/elk/sketch.exp.svg | 2 +- .../stable/grid_gap/dagre/sketch.exp.svg | 2 +- .../stable/grid_gap/elk/sketch.exp.svg | 2 +- .../stable/grid_icon/dagre/sketch.exp.svg | 2 +- .../stable/grid_icon/elk/sketch.exp.svg | 2 +- .../grid_label_positions/dagre/sketch.exp.svg | 2 +- .../grid_label_positions/elk/sketch.exp.svg | 2 +- .../grid_large_checkered/dagre/sketch.exp.svg | 2 +- .../grid_large_checkered/elk/sketch.exp.svg | 2 +- .../stable/grid_nested/dagre/sketch.exp.svg | 2 +- .../stable/grid_nested/elk/sketch.exp.svg | 2 +- .../grid_nested_gap0/dagre/sketch.exp.svg | 2 +- .../grid_nested_gap0/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../grid_outside_labels/dagre/sketch.exp.svg | 2 +- .../grid_outside_labels/elk/sketch.exp.svg | 2 +- .../stable/grid_tests/dagre/sketch.exp.svg | 2 +- .../stable/grid_tests/elk/sketch.exp.svg | 2 +- .../stable/hexagon_3d/dagre/sketch.exp.svg | 2 +- .../stable/hexagon_3d/elk/sketch.exp.svg | 2 +- .../testdata/stable/hr/dagre/sketch.exp.svg | 2 +- .../testdata/stable/hr/elk/sketch.exp.svg | 2 +- .../icon-containers/dagre/sketch.exp.svg | 2 +- .../stable/icon-containers/elk/sketch.exp.svg | 2 +- .../stable/icon-label/dagre/sketch.exp.svg | 2 +- .../stable/icon-label/elk/sketch.exp.svg | 2 +- .../icon_positions/dagre/sketch.exp.svg | 2 +- .../stable/icon_positions/elk/sketch.exp.svg | 2 +- .../stable/images/dagre/sketch.exp.svg | 2 +- .../testdata/stable/images/elk/sketch.exp.svg | 2 +- .../stable/investigate/dagre/sketch.exp.svg | 2 +- .../stable/investigate/elk/sketch.exp.svg | 2 +- .../stable/label-near/dagre/sketch.exp.svg | 2 +- .../stable/label-near/elk/sketch.exp.svg | 2 +- .../label_positions/dagre/sketch.exp.svg | 2 +- .../stable/label_positions/elk/sketch.exp.svg | 2 +- .../stable/large_arch/dagre/sketch.exp.svg | 2 +- .../stable/large_arch/elk/sketch.exp.svg | 2 +- .../stable/latex/dagre/sketch.exp.svg | 2 +- .../testdata/stable/latex/elk/sketch.exp.svg | 2 +- .../legend_with_near_key/dagre/sketch.exp.svg | 2 +- .../legend_with_near_key/elk/sketch.exp.svg | 2 +- .../testdata/stable/li1/dagre/sketch.exp.svg | 2 +- .../testdata/stable/li1/elk/sketch.exp.svg | 2 +- .../testdata/stable/li2/dagre/sketch.exp.svg | 2 +- .../testdata/stable/li2/elk/sketch.exp.svg | 2 +- .../testdata/stable/li3/dagre/sketch.exp.svg | 2 +- .../testdata/stable/li3/elk/sketch.exp.svg | 2 +- .../testdata/stable/li4/dagre/sketch.exp.svg | 2 +- .../testdata/stable/li4/elk/sketch.exp.svg | 2 +- .../stable/links/dagre/sketch.exp.svg | 2 +- .../testdata/stable/links/elk/sketch.exp.svg | 2 +- .../stable/lone_h1/dagre/sketch.exp.svg | 2 +- .../stable/lone_h1/elk/sketch.exp.svg | 2 +- .../stable/markdown/dagre/sketch.exp.svg | 2 +- .../stable/markdown/elk/sketch.exp.svg | 2 +- .../markdown_stroke_fill/dagre/sketch.exp.svg | 2 +- .../markdown_stroke_fill/elk/sketch.exp.svg | 2 +- .../md_2space_newline/dagre/sketch.exp.svg | 2 +- .../md_2space_newline/elk/sketch.exp.svg | 2 +- .../md_backslash_newline/dagre/sketch.exp.svg | 2 +- .../md_backslash_newline/elk/sketch.exp.svg | 2 +- .../md_code_block_fenced/dagre/sketch.exp.svg | 2 +- .../md_code_block_fenced/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../md_code_block_indented/elk/sketch.exp.svg | 2 +- .../md_code_inline/dagre/sketch.exp.svg | 2 +- .../stable/md_code_inline/elk/sketch.exp.svg | 2 +- .../md_fontsize_10/dagre/sketch.exp.svg | 2 +- .../stable/md_fontsize_10/elk/sketch.exp.svg | 2 +- .../stable/md_mixed/dagre/sketch.exp.svg | 2 +- .../stable/md_mixed/elk/sketch.exp.svg | 2 +- .../stable/mono-edge/dagre/sketch.exp.svg | 2 +- .../stable/mono-edge/elk/sketch.exp.svg | 2 +- .../stable/mono-font/dagre/sketch.exp.svg | 2 +- .../stable/mono-font/elk/sketch.exp.svg | 2 +- .../multiline_text/dagre/sketch.exp.svg | 2 +- .../stable/multiline_text/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../multiple_box_selection/elk/sketch.exp.svg | 2 +- .../multiple_offset/dagre/sketch.exp.svg | 2 +- .../stable/multiple_offset/elk/sketch.exp.svg | 2 +- .../multiple_offset_left/dagre/sketch.exp.svg | 2 +- .../multiple_offset_left/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../multiple_person_label/elk/sketch.exp.svg | 2 +- .../multiple_trees/dagre/sketch.exp.svg | 2 +- .../stable/multiple_trees/elk/sketch.exp.svg | 2 +- .../stable/n22_e32/dagre/sketch.exp.svg | 2 +- .../stable/n22_e32/elk/sketch.exp.svg | 2 +- .../stable/near-alone/dagre/sketch.exp.svg | 2 +- .../stable/near-alone/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../nested_diagram_types/dagre/sketch.exp.svg | 2 +- .../nested_diagram_types/elk/sketch.exp.svg | 2 +- .../nested_shape_labels/dagre/sketch.exp.svg | 2 +- .../nested_shape_labels/elk/sketch.exp.svg | 2 +- .../stable/nesting_power/dagre/sketch.exp.svg | 2 +- .../stable/nesting_power/elk/sketch.exp.svg | 2 +- .../number_connections/dagre/sketch.exp.svg | 2 +- .../number_connections/elk/sketch.exp.svg | 2 +- .../one_container_loop/dagre/sketch.exp.svg | 2 +- .../one_container_loop/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../outside_bottom_labels/elk/sketch.exp.svg | 2 +- .../stable/ovals/dagre/sketch.exp.svg | 2 +- .../testdata/stable/ovals/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../testdata/stable/p/dagre/sketch.exp.svg | 2 +- e2etests/testdata/stable/p/elk/sketch.exp.svg | 2 +- .../stable/people/dagre/sketch.exp.svg | 2 +- .../testdata/stable/people/elk/sketch.exp.svg | 2 +- .../testdata/stable/pre/dagre/sketch.exp.svg | 2 +- .../testdata/stable/pre/elk/sketch.exp.svg | 2 +- .../self-referencing/dagre/sketch.exp.svg | 2 +- .../self-referencing/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../sequence_diagram_note/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../sequence_diagram_real/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../sequence_diagram_span/elk/sketch.exp.svg | 2 +- .../sequence_diagrams/dagre/sketch.exp.svg | 2 +- .../sequence_diagrams/elk/sketch.exp.svg | 2 +- .../simple_grid_edges/dagre/sketch.exp.svg | 2 +- .../simple_grid_edges/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/sql_tables/dagre/sketch.exp.svg | 2 +- .../stable/sql_tables/elk/sketch.exp.svg | 2 +- .../stable/square_3d/dagre/sketch.exp.svg | 2 +- .../stable/square_3d/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/stylish/dagre/sketch.exp.svg | 2 +- .../stable/stylish/elk/sketch.exp.svg | 2 +- .../stable/teleport_grid/dagre/sketch.exp.svg | 2 +- .../stable/teleport_grid/elk/sketch.exp.svg | 2 +- .../text_font_sizes/dagre/sketch.exp.svg | 2 +- .../stable/text_font_sizes/elk/sketch.exp.svg | 2 +- .../transparent_3d/dagre/sketch.exp.svg | 2 +- .../stable/transparent_3d/elk/sketch.exp.svg | 2 +- .../unfilled_triangle/dagre/sketch.exp.svg | 2 +- .../unfilled_triangle/elk/sketch.exp.svg | 2 +- .../unnamed_only_height/dagre/sketch.exp.svg | 2 +- .../unnamed_only_height/elk/sketch.exp.svg | 2 +- .../unnamed_only_width/dagre/sketch.exp.svg | 2 +- .../unnamed_only_width/elk/sketch.exp.svg | 2 +- .../stable/us_map/dagre/sketch.exp.svg | 2 +- .../testdata/stable/us_map/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../themes/origami/dagre/sketch.exp.svg | 2 +- .../themes/origami/elk/sketch.exp.svg | 2 +- .../themes/terminal/dagre/sketch.exp.svg | 2 +- .../themes/terminal/elk/sketch.exp.svg | 2 +- .../terminal_grayscale/dagre/sketch.exp.svg | 2 +- .../terminal_grayscale/elk/sketch.exp.svg | 2 +- .../container_icon_label/dagre/sketch.exp.svg | 2 +- .../container_icon_label/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../shape_set_width_height/elk/sketch.exp.svg | 2 +- .../connection-underline/dagre/sketch.exp.svg | 2 +- .../connection-underline/elk/sketch.exp.svg | 2 +- .../txtar/none-fill/dagre/sketch.exp.svg | 2 +- .../txtar/none-fill/elk/sketch.exp.svg | 2 +- .../txtar/sql-icon/dagre/sketch.exp.svg | 2 +- .../txtar/sql-icon/elk/sketch.exp.svg | 2 +- .../theme-overrides/dagre/sketch.exp.svg | 2 +- .../txtar/theme-overrides/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../unicode/chinese/dagre/sketch.exp.svg | 2 +- .../unicode/chinese/elk/sketch.exp.svg | 2 +- .../unicode/emojis/dagre/sketch.exp.svg | 2 +- .../unicode/emojis/elk/sketch.exp.svg | 2 +- .../japanese-basic/dagre/sketch.exp.svg | 2 +- .../unicode/japanese-basic/elk/sketch.exp.svg | 2 +- .../japanese-full/dagre/sketch.exp.svg | 2 +- .../unicode/japanese-full/elk/sketch.exp.svg | 2 +- .../japanese-mixed/dagre/sketch.exp.svg | 2 +- .../unicode/japanese-mixed/elk/sketch.exp.svg | 2 +- .../unicode/korean/dagre/sketch.exp.svg | 2 +- .../unicode/korean/elk/sketch.exp.svg | 2 +- .../mixed-language-2/dagre/sketch.exp.svg | 2 +- .../mixed-language-2/elk/sketch.exp.svg | 2 +- .../mixed-language/dagre/sketch.exp.svg | 2 +- .../unicode/mixed-language/elk/sketch.exp.svg | 2 +- .../unicode/with-style/dagre/sketch.exp.svg | 2 +- .../unicode/with-style/elk/sketch.exp.svg | 2 +- lib/version/version.go | 2 +- 595 files changed, 587 insertions(+), 587 deletions(-) diff --git a/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg b/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg index 84ace1a20..ba245ef99 100644 --- a/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg @@ -1,4 +1,4 @@ -Homedog1dog3 + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/nested-spread-substitutions-regression/elk/board.exp.json b/e2etests/testdata/txtar/nested-spread-substitutions-regression/elk/board.exp.json new file mode 100644 index 000000000..6505afcec --- /dev/null +++ b/e2etests/testdata/txtar/nested-spread-substitutions-regression/elk/board.exp.json @@ -0,0 +1,210 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "ok", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 197, + "height": 333, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Home", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 68, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "ok.dog1", + "type": "oval", + "pos": { + "x": 62, + "y": 62 + }, + "width": 97, + "height": 97, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "dog1", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 35, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "ok.dog3", + "type": "rectangle", + "pos": { + "x": 70, + "y": 229 + }, + "width": 80, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "dog3", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 35, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + } + ], + "connections": [ + { + "id": "ok.(dog1 -> dog3)[0]", + "src": "ok.dog1", + "srcArrow": "none", + "dst": "ok.dog3", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 111, + "y": 159 + }, + { + "x": 110, + "y": 229 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/nested-spread-substitutions-regression/elk/sketch.exp.svg b/e2etests/testdata/txtar/nested-spread-substitutions-regression/elk/sketch.exp.svg new file mode 100644 index 000000000..fc53a8475 --- /dev/null +++ b/e2etests/testdata/txtar/nested-spread-substitutions-regression/elk/sketch.exp.svg @@ -0,0 +1,104 @@ +Homedog1dog3 + + + + + \ No newline at end of file From 676e7d2e1860bb19c0314c2f68428702bd51d091 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 17 Apr 2024 14:49:47 -0700 Subject: [PATCH 055/109] add test --- d2compiler/compile_test.go | 52 +- .../TestCompile/vars-in-imports.exp.json | 530 ++++++++++++++++++ 2 files changed, 580 insertions(+), 2 deletions(-) create mode 100644 testdata/d2compiler/TestCompile/vars-in-imports.exp.json diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index 7ce85198f..9a360bf0c 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -10,6 +10,7 @@ import ( "oss.terrastruct.com/util-go/assert" "oss.terrastruct.com/util-go/diff" + "oss.terrastruct.com/util-go/mapfs" "oss.terrastruct.com/d2/d2compiler" "oss.terrastruct.com/d2/d2format" @@ -23,6 +24,8 @@ func TestCompile(t *testing.T) { testCases := []struct { name string text string + // For tests that use imports, define `index.d2` as text and other files here + files map[string]string expErr string assertions func(t *testing.T, g *d2graph.Graph) @@ -2868,15 +2871,60 @@ d2/testdata/d2compiler/TestCompile/no_arrowheads_in_shape.d2:2:3: "source-arrowh expErr: `d2/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.d2:4:2: position keywords cannot be used with shape "hierarchy" d2/testdata/d2compiler/TestCompile/fixed-pos-shape-hierarchy.d2:5:2: position keywords cannot be used with shape "hierarchy"`, }, + { + name: "vars-in-imports", + text: `dev: { + vars: { + env: Dev + } + ...@template.d2 +} + +qa: { + vars: { + env: Qa + } + ...@template.d2 +} +`, + files: map[string]string{ + "template.d2": `env: { + label: ${env} Environment + vm: { + label: My Virtual machine! + } +}`, + }, + assertions: func(t *testing.T, g *d2graph.Graph) { + tassert.Equal(t, "dev.env", g.Objects[1].AbsID()) + tassert.Equal(t, "Dev Environment", g.Objects[1].Label.Value) + tassert.Equal(t, "qa.env", g.Objects[2].AbsID()) + tassert.Equal(t, "Qa Environment", g.Objects[2].Label.Value) + }, + }, } for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() - + opts := &d2compiler.CompileOptions{} + if tc.files != nil { + tc.files["index.d2"] = tc.text + renamed := make(map[string]string) + for file, content := range tc.files { + renamed[fmt.Sprintf("d2/testdata/d2compiler/TestCompile/%v", file)] = content + } + fs, err := mapfs.New(renamed) + assert.Success(t, err) + t.Cleanup(func() { + err = fs.Close() + assert.Success(t, err) + }) + opts.FS = fs + } d2Path := fmt.Sprintf("d2/testdata/d2compiler/%v.d2", t.Name()) - g, _, err := d2compiler.Compile(d2Path, strings.NewReader(tc.text), nil) + g, _, err := d2compiler.Compile(d2Path, strings.NewReader(tc.text), opts) if tc.expErr != "" { if err == nil { t.Fatalf("expected error with: %q", tc.expErr) diff --git a/testdata/d2compiler/TestCompile/vars-in-imports.exp.json b/testdata/d2compiler/TestCompile/vars-in-imports.exp.json new file mode 100644 index 000000000..31dc0f878 --- /dev/null +++ b/testdata/d2compiler/TestCompile/vars-in-imports.exp.json @@ -0,0 +1,530 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,0:0:0-13:0:107", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,0:0:0-5:1:53", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,0:0:0-0:3:3", + "value": [ + { + "string": "dev", + "raw_string": "dev" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,0:5:5-5:1:53", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,1:2:9-3:3:33", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,1:2:9-1:6:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,1:2:9-1:6:13", + "value": [ + { + "string": "vars", + "raw_string": "vars" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,1:8:15-3:3:33", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,2:4:21-2:12:29", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,2:4:21-2:7:24", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,2:4:21-2:7:24", + "value": [ + { + "string": "env", + "raw_string": "env" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,2:9:26-2:12:29", + "value": [ + { + "string": "Dev", + "raw_string": "Dev" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "import": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,4:2:36-4:17:51", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,4:6:40-4:14:48", + "value": [ + { + "string": "template", + "raw_string": "template" + } + ] + } + } + ] + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,7:0:55-12:1:106", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,7:0:55-7:2:57", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,7:0:55-7:2:57", + "value": [ + { + "string": "qa", + "raw_string": "qa" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,7:4:59-12:1:106", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,8:2:63-10:3:86", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,8:2:63-8:6:67", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,8:2:63-8:6:67", + "value": [ + { + "string": "vars", + "raw_string": "vars" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,8:8:69-10:3:86", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,9:4:75-9:11:82", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,9:4:75-9:7:78", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,9:4:75-9:7:78", + "value": [ + { + "string": "env", + "raw_string": "env" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,9:9:80-9:11:82", + "value": [ + { + "string": "Qa", + "raw_string": "Qa" + } + ] + } + } + } + } + ] + } + } + } + }, + { + "import": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,11:2:89-11:17:104", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,11:6:93-11:14:101", + "value": [ + { + "string": "template", + "raw_string": "template" + } + ] + } + } + ] + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "dev", + "id_val": "dev", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,0:0:0-0:3:3", + "value": [ + { + "string": "dev", + "raw_string": "dev" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "dev" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "env", + "id_val": "env", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/template.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/template.d2,0:0:0-0:3:3", + "value": [ + { + "string": "env", + "raw_string": "env" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "Dev Environment" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "env", + "id_val": "env", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/template.d2,0:0:0-0:3:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/template.d2,0:0:0-0:3:3", + "value": [ + { + "string": "env", + "raw_string": "env" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "Dev Environment" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "vm", + "id_val": "vm", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/template.d2,2:2:37-2:4:39", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/template.d2,2:2:37-2:4:39", + "value": [ + { + "string": "vm", + "raw_string": "vm" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "My Virtual machine!" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "vm", + "id_val": "vm", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/template.d2,2:2:37-2:4:39", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/template.d2,2:2:37-2:4:39", + "value": [ + { + "string": "vm", + "raw_string": "vm" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "My Virtual machine!" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "qa", + "id_val": "qa", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,7:0:55-7:2:57", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/vars-in-imports.d2,7:0:55-7:2:57", + "value": [ + { + "string": "qa", + "raw_string": "qa" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "qa" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": null +} From 26fd14455dab649a254c5e4f32a40bcd9ca20f9d Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 17 Apr 2024 15:55:39 -0700 Subject: [PATCH 056/109] d2ir: fix substitutions in imports --- ci/release/changelogs/next.md | 1 + d2ir/compile.go | 5 ++--- d2ir/import.go | 11 +++-------- .../d2compiler/TestCompile/vars-in-imports.exp.json | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 498d06ed6..58fe48b56 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -6,3 +6,4 @@ - Fix executable plugins that implement standalone router [#1910](https://github.com/terrastruct/d2/pull/1910) - Fix compiler error with multiple nested spread substitutions [#1913](https://github.com/terrastruct/d2/pull/1913) +- Fix substitutions from imports into different scopes [#1914](https://github.com/terrastruct/d2/pull/1914) diff --git a/d2ir/compile.go b/d2ir/compile.go index 995f48432..273637a9d 100644 --- a/d2ir/compile.go +++ b/d2ir/compile.go @@ -31,8 +31,7 @@ type compiler struct { imports []string // importStack is used to detect cyclic imports. importStack []string - // importCache enables reuse of files imported multiple times. - importCache map[string]*Map + seenImports map[string]struct{} utf16Pos bool // Stack of globs that must be recomputed at each new object in and below the current scope. @@ -62,7 +61,7 @@ func Compile(ast *d2ast.Map, opts *CompileOptions) (*Map, []string, error) { err: &d2parser.ParseError{}, fs: opts.FS, - importCache: make(map[string]*Map), + seenImports: make(map[string]struct{}), utf16Pos: opts.UTF16Pos, } m := &Map{} diff --git a/d2ir/import.go b/d2ir/import.go index b933298dd..c415cf138 100644 --- a/d2ir/import.go +++ b/d2ir/import.go @@ -82,16 +82,11 @@ func (c *compiler) __import(imp *d2ast.Import) (*Map, bool) { // Only get immediate imports. if len(c.importStack) == 2 { - if _, ok := c.importCache[impPath]; !ok { + if _, ok := c.seenImports[impPath]; !ok { c.imports = append(c.imports, imp.PathWithPre()) } } - ir, ok := c.importCache[impPath] - if ok { - return ir, true - } - var f fs.File var err error if c.fs == nil { @@ -113,13 +108,13 @@ func (c *compiler) __import(imp *d2ast.Import) (*Map, bool) { return nil, false } - ir = &Map{} + ir := &Map{} ir.initRoot() ir.parent.(*Field).References[0].Context_.Scope = ast c.compileMap(ir, ast, ast) - c.importCache[impPath] = ir + c.seenImports[impPath] = struct{}{} return ir, true } diff --git a/testdata/d2compiler/TestCompile/vars-in-imports.exp.json b/testdata/d2compiler/TestCompile/vars-in-imports.exp.json index 31dc0f878..05c63f5e3 100644 --- a/testdata/d2compiler/TestCompile/vars-in-imports.exp.json +++ b/testdata/d2compiler/TestCompile/vars-in-imports.exp.json @@ -371,7 +371,7 @@ ], "attributes": { "label": { - "value": "Dev Environment" + "value": "Qa Environment" }, "labelDimensions": { "width": 0, From 79ce3d16e8a1582a33b5245783db013f15e0ae7f Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 17 Apr 2024 19:48:55 -0700 Subject: [PATCH 057/109] 0.6.5 --- ci/release/changelogs/next.md | 4 +--- lib/version/version.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 58fe48b56..69fa03ddd 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -1,6 +1,4 @@ -#### Features 🚀 - -#### Improvements 🧹 +Hotfix for 0.6.4 breaking plugins, along with 2 other compiler bugfixes. #### Bugfixes ⛑️ diff --git a/lib/version/version.go b/lib/version/version.go index 56206d2eb..4a749cf54 100644 --- a/lib/version/version.go +++ b/lib/version/version.go @@ -3,7 +3,7 @@ package version import "regexp" // Pre-built binaries will have version set correctly during build time. -var Version = "v0.6.4-HEAD" +var Version = "v0.6.5-HEAD" func OnlyNumbers() string { re, err := regexp.Compile("[0-9]+.[0-9]+.[0-9]+") From a08190f73b8f3c28c18cc97b8ded90a38ab5febd Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 17 Apr 2024 19:50:13 -0700 Subject: [PATCH 058/109] 0.6.5 --- .../testdata/all_shapes/sketch.exp.svg | 2 +- .../testdata/all_shapes_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/animated/sketch.exp.svg | 2 +- .../testdata/animated_dark/sketch.exp.svg | 2 +- .../testdata/arrowheads/sketch.exp.svg | 2 +- .../testdata/arrowheads_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/basic/sketch.exp.svg | 2 +- .../testdata/basic_dark/sketch.exp.svg | 2 +- .../testdata/child_to_child/sketch.exp.svg | 2 +- .../child_to_child_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/class/sketch.exp.svg | 2 +- .../sketch.exp.svg | 2 +- .../testdata/class_dark/sketch.exp.svg | 2 +- .../testdata/connection_label/sketch.exp.svg | 2 +- .../connection_label_dark/sketch.exp.svg | 2 +- .../testdata/crows_feet/sketch.exp.svg | 2 +- .../testdata/crows_feet_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/dots-3d/sketch.exp.svg | 2 +- .../d2sketch/testdata/dots-all/sketch.exp.svg | 2 +- .../testdata/dots-multiple/sketch.exp.svg | 2 +- .../testdata/dots-real/sketch.exp.svg | 2 +- .../testdata/double-border/sketch.exp.svg | 2 +- .../testdata/elk_corners/sketch.exp.svg | 2 +- .../long_arrowhead_label/sketch.exp.svg | 2 +- .../d2sketch/testdata/opacity/sketch.exp.svg | 2 +- .../testdata/opacity_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/overlay/sketch.exp.svg | 2 +- .../testdata/paper-real/sketch.exp.svg | 2 +- .../testdata/root-fill/sketch.exp.svg | 2 +- .../testdata/sql_tables/sketch.exp.svg | 2 +- .../testdata/sql_tables_dark/sketch.exp.svg | 2 +- .../d2sketch/testdata/terminal/sketch.exp.svg | 2 +- .../d2sketch/testdata/twitter/sketch.exp.svg | 2 +- .../testdata/twitter_dark/sketch.exp.svg | 2 +- .../testdata/unfilled_triangle/sketch.exp.svg | 2 +- .../diagram_wider_than_tooltip/sketch.exp.svg | 2 +- .../testdata/internal-links/sketch.exp.svg | 2 +- .../appendix/testdata/links/sketch.exp.svg | 2 +- .../testdata/links_dark/sketch.exp.svg | 2 +- .../testdata/tooltip_fill/sketch.exp.svg | 2 +- .../tooltip_wider_than_diagram/sketch.exp.svg | 2 +- .../testdata/all_shapes/dark_theme.exp.svg | 2 +- .../testdata/animated/dark_theme.exp.svg | 2 +- .../testdata/arrowheads/dark_theme.exp.svg | 2 +- .../testdata/basic/dark_theme.exp.svg | 2 +- .../child_to_child/dark_theme.exp.svg | 2 +- .../testdata/class/dark_theme.exp.svg | 2 +- .../testdata/code/dark_theme.exp.svg | 2 +- .../connection_label/dark_theme.exp.svg | 2 +- .../testdata/opacity/dark_theme.exp.svg | 2 +- .../testdata/overlay/dark_theme.exp.svg | 2 +- .../testdata/sql_tables/dark_theme.exp.svg | 2 +- .../testdata/twitter/dark_theme.exp.svg | 2 +- .../testdata/TestCLI_E2E/abspath.exp.svg | 2 +- .../testdata/TestCLI_E2E/animation.exp.svg | 2 +- .../board_import/hello-world-x-y.exp.svg | 2 +- .../board_import/hello-world-x.exp.svg | 2 +- .../board_import/hello-world.exp.svg | 2 +- .../testdata/TestCLI_E2E/center.exp.svg | 2 +- .../testdata/TestCLI_E2E/chain_import.exp.svg | 2 +- .../testdata/TestCLI_E2E/empty-base.exp.svg | 2 +- .../TestCLI_E2E/hello_world_png.exp.png | Bin 15387 -> 15387 bytes .../TestCLI_E2E/hello_world_png_pad.exp.png | Bin 73590 -> 73590 bytes .../hello_world_png_sketch.exp.png | Bin 28841 -> 28841 bytes .../testdata/TestCLI_E2E/import.exp.svg | 2 +- .../TestCLI_E2E/import_spread_nested.exp.svg | 2 +- .../testdata/TestCLI_E2E/import_vars.exp.svg | 2 +- .../TestCLI_E2E/internal_linked_pdf.exp.pdf | Bin 66068 -> 66068 bytes .../TestCLI_E2E/layer-link/index.exp.svg | 2 +- .../TestCLI_E2E/layer-link/test2.exp.svg | 2 +- .../TestCLI_E2E/multiboard/life/index.exp.svg | 2 +- .../multiboard/life/layers/broker.exp.svg | 2 +- .../multiboard/life/layers/core.exp.svg | 2 +- .../multiboard/life/layers/stocks.exp.svg | 2 +- .../multiboard/life/scenarios/why.exp.svg | 2 +- .../multiboard/life_index_d2/index.exp.svg | 2 +- .../life_index_d2/layers/broker.exp.svg | 2 +- .../life_index_d2/layers/core.exp.svg | 2 +- .../life_index_d2/layers/stocks.exp.svg | 2 +- .../life_index_d2/scenarios/why.exp.svg | 2 +- .../testdata/TestCLI_E2E/no-nav-pdf.exp.pdf | Bin 96034 -> 96034 bytes .../testdata/TestCLI_E2E/no-nav-pptx.exp.pptx | Bin 122126 -> 122127 bytes .../TestCLI_E2E/renamed-board.exp.pdf | Bin 109975 -> 109975 bytes .../testdata/TestCLI_E2E/stdin.exp.svg | 2 +- .../testdata/TestCLI_E2E/target-b.exp.svg | 2 +- .../TestCLI_E2E/target-nested-index.exp.svg | 2 +- .../TestCLI_E2E/target-nested-index2.exp.svg | 2 +- .../target-nested-with-special-chars.exp.svg | 2 +- .../testdata/TestCLI_E2E/target-root.exp.svg | 2 +- .../TestCLI_E2E/theme-override.exp.svg | 2 +- .../testdata/TestCLI_E2E/theme-pdf.exp.pdf | Bin 17306 -> 17306 bytes .../TestCLI_E2E/vars-animation.exp.svg | 2 +- .../testdata/TestCLI_E2E/vars-config.exp.svg | 2 +- .../testdata/TestCLI_E2E/with-font.exp.svg | 2 +- .../measured/empty-class/dagre/sketch.exp.svg | 2 +- .../measured/empty-shape/dagre/sketch.exp.svg | 2 +- .../empty-sql_table/dagre/sketch.exp.svg | 2 +- .../testdata/patterns/3d/dagre/sketch.exp.svg | 2 +- .../patterns/all_shapes/dagre/sketch.exp.svg | 2 +- .../patterns/multiple/dagre/sketch.exp.svg | 2 +- .../patterns/paper/dagre/sketch.exp.svg | 2 +- .../patterns/real-lines/dagre/sketch.exp.svg | 2 +- .../patterns/real/dagre/sketch.exp.svg | 2 +- .../root-dots-with-fill/dagre/sketch.exp.svg | 2 +- .../patterns/root-dots/dagre/sketch.exp.svg | 2 +- .../patterns/shape/dagre/sketch.exp.svg | 2 +- .../ampersand-escape/dagre/sketch.exp.svg | 2 +- .../ampersand-escape/elk/sketch.exp.svg | 2 +- .../arrowhead_font_color/dagre/sketch.exp.svg | 2 +- .../arrowhead_font_color/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../bold_edge_label/dagre/sketch.exp.svg | 2 +- .../bold_edge_label/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../cloud_shaped_grid/dagre/sketch.exp.svg | 2 +- .../cloud_shaped_grid/elk/sketch.exp.svg | 2 +- .../code_font_size/dagre/sketch.exp.svg | 2 +- .../code_font_size/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../code_leading_newlines/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../code_trailing_newlines/elk/sketch.exp.svg | 2 +- .../cylinder_grid_label/dagre/sketch.exp.svg | 2 +- .../cylinder_grid_label/elk/sketch.exp.svg | 2 +- .../dagre-disconnect/dagre/sketch.exp.svg | 2 +- .../dagre-disconnect/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../dagre_broken_arrowhead/elk/sketch.exp.svg | 2 +- .../dagre_child_id_id/dagre/sketch.exp.svg | 2 +- .../dagre_child_id_id/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre_special_ids/dagre/sketch.exp.svg | 2 +- .../dagre_special_ids/elk/sketch.exp.svg | 2 +- .../disclaimer/dagre/sketch.exp.svg | 2 +- .../regression/disclaimer/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../elk_alignment/dagre/sketch.exp.svg | 2 +- .../elk_alignment/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../elk_loop_panic/dagre/sketch.exp.svg | 2 +- .../elk_loop_panic/elk/sketch.exp.svg | 2 +- .../regression/elk_order/dagre/sketch.exp.svg | 2 +- .../regression/elk_order/elk/sketch.exp.svg | 2 +- .../empty_class_height/dagre/sketch.exp.svg | 2 +- .../empty_class_height/elk/sketch.exp.svg | 2 +- .../empty_nested_grid/dagre/sketch.exp.svg | 2 +- .../empty_nested_grid/elk/sketch.exp.svg | 2 +- .../empty_sequence/dagre/sketch.exp.svg | 2 +- .../empty_sequence/elk/sketch.exp.svg | 2 +- .../glob_dimensions/dagre/sketch.exp.svg | 2 +- .../glob_dimensions/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../grid_in_constant_near/elk/sketch.exp.svg | 2 +- .../regression/grid_oom/dagre/sketch.exp.svg | 2 +- .../regression/grid_oom/elk/sketch.exp.svg | 2 +- .../grid_panic/dagre/sketch.exp.svg | 2 +- .../regression/grid_panic/elk/sketch.exp.svg | 2 +- .../grid_rows_gap_bug/dagre/sketch.exp.svg | 2 +- .../grid_rows_gap_bug/elk/sketch.exp.svg | 2 +- .../grid_with_latex/dagre/sketch.exp.svg | 2 +- .../grid_with_latex/elk/sketch.exp.svg | 2 +- .../regression/hex-fill/dagre/sketch.exp.svg | 2 +- .../regression/hex-fill/elk/sketch.exp.svg | 2 +- .../icons_on_top/dagre/sketch.exp.svg | 2 +- .../icons_on_top/elk/sketch.exp.svg | 2 +- .../just-width/dagre/sketch.exp.svg | 2 +- .../regression/just-width/elk/sketch.exp.svg | 2 +- .../link_with_ampersand/dagre/sketch.exp.svg | 2 +- .../link_with_ampersand/elk/sketch.exp.svg | 2 +- .../long_arrowhead_label/dagre/sketch.exp.svg | 2 +- .../long_arrowhead_label/elk/sketch.exp.svg | 2 +- .../md_font_weight/dagre/sketch.exp.svg | 2 +- .../md_font_weight/elk/sketch.exp.svg | 2 +- .../md_h1_li_li/dagre/sketch.exp.svg | 2 +- .../regression/md_h1_li_li/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../nested_layout_bug/dagre/sketch.exp.svg | 2 +- .../nested_layout_bug/elk/sketch.exp.svg | 2 +- .../nested_steps/dagre/sketch.exp.svg | 2 +- .../nested_steps/elk/sketch.exp.svg | 2 +- .../regression/no-lexer/dagre/sketch.exp.svg | 2 +- .../regression/no-lexer/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../opacity-on-label/dagre/sketch.exp.svg | 2 +- .../opacity-on-label/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../overlapping-edge-label/elk/sketch.exp.svg | 2 +- .../query_param_escape/dagre/sketch.exp.svg | 2 +- .../query_param_escape/elk/sketch.exp.svg | 2 +- .../root-container/dagre/sketch.exp.svg | 2 +- .../root-container/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../regression/slow_grid/dagre/sketch.exp.svg | 2 +- .../regression/slow_grid/elk/sketch.exp.svg | 2 +- .../sql_table_overflow/dagre/sketch.exp.svg | 2 +- .../sql_table_overflow/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../unconnected/dagre/sketch.exp.svg | 2 +- .../regression/unconnected/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../root/border-radius/dagre/sketch.exp.svg | 2 +- .../root/border-radius/elk/sketch.exp.svg | 2 +- .../root/double-border/dagre/sketch.exp.svg | 2 +- .../root/double-border/elk/sketch.exp.svg | 2 +- .../even-stroke-width/dagre/sketch.exp.svg | 2 +- .../root/even-stroke-width/elk/sketch.exp.svg | 2 +- .../testdata/root/fill/dagre/sketch.exp.svg | 2 +- .../testdata/root/fill/elk/sketch.exp.svg | 2 +- .../root/stroke-dash/dagre/sketch.exp.svg | 2 +- .../root/stroke-dash/elk/sketch.exp.svg | 2 +- .../root/stroke-no-width/dagre/sketch.exp.svg | 2 +- .../root/stroke-no-width/elk/sketch.exp.svg | 2 +- .../root/stroke-width/dagre/sketch.exp.svg | 2 +- .../root/stroke-width/elk/sketch.exp.svg | 2 +- .../sanity/1_to_2/dagre/sketch.exp.svg | 2 +- .../testdata/sanity/1_to_2/elk/sketch.exp.svg | 2 +- .../sanity/basic/dagre/sketch.exp.svg | 2 +- .../testdata/sanity/basic/elk/sketch.exp.svg | 2 +- .../child_to_child/dagre/sketch.exp.svg | 2 +- .../sanity/child_to_child/elk/sketch.exp.svg | 2 +- .../connection_label/dagre/sketch.exp.svg | 2 +- .../connection_label/elk/sketch.exp.svg | 2 +- .../sanity/empty/dagre/sketch.exp.svg | 2 +- .../testdata/sanity/empty/elk/sketch.exp.svg | 2 +- .../3d_fill_and_stroke/dagre/sketch.exp.svg | 2 +- .../3d_fill_and_stroke/elk/sketch.exp.svg | 2 +- .../stable/all_shapes/dagre/sketch.exp.svg | 2 +- .../stable/all_shapes/elk/sketch.exp.svg | 2 +- .../all_shapes_link/dagre/sketch.exp.svg | 2 +- .../stable/all_shapes_link/elk/sketch.exp.svg | 2 +- .../all_shapes_multiple/dagre/sketch.exp.svg | 2 +- .../all_shapes_multiple/elk/sketch.exp.svg | 2 +- .../all_shapes_shadow/dagre/sketch.exp.svg | 2 +- .../all_shapes_shadow/elk/sketch.exp.svg | 2 +- .../stable/animated/dagre/sketch.exp.svg | 2 +- .../stable/animated/elk/sketch.exp.svg | 2 +- .../stable/array-classes/dagre/sketch.exp.svg | 2 +- .../stable/array-classes/elk/sketch.exp.svg | 2 +- .../arrowhead_adjustment/dagre/sketch.exp.svg | 2 +- .../arrowhead_adjustment/elk/sketch.exp.svg | 2 +- .../arrowhead_labels/dagre/sketch.exp.svg | 2 +- .../arrowhead_labels/elk/sketch.exp.svg | 2 +- .../arrowhead_scaling/dagre/sketch.exp.svg | 2 +- .../arrowhead_scaling/elk/sketch.exp.svg | 2 +- .../basic-tooltips/dagre/sketch.exp.svg | 2 +- .../stable/basic-tooltips/elk/sketch.exp.svg | 2 +- .../stable/binary_tree/dagre/sketch.exp.svg | 2 +- .../stable/binary_tree/elk/sketch.exp.svg | 2 +- .../stable/bold-mono/dagre/sketch.exp.svg | 2 +- .../stable/bold-mono/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/border-radius/dagre/sketch.exp.svg | 2 +- .../stable/border-radius/elk/sketch.exp.svg | 2 +- .../testdata/stable/br/dagre/sketch.exp.svg | 2 +- .../testdata/stable/br/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/chaos2/dagre/sketch.exp.svg | 2 +- .../testdata/stable/chaos2/elk/sketch.exp.svg | 2 +- .../circle_arrowhead/dagre/sketch.exp.svg | 2 +- .../circle_arrowhead/elk/sketch.exp.svg | 2 +- .../circular_dependency/dagre/sketch.exp.svg | 2 +- .../circular_dependency/elk/sketch.exp.svg | 2 +- .../stable/class/dagre/sketch.exp.svg | 2 +- .../testdata/stable/class/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/classes/dagre/sketch.exp.svg | 2 +- .../stable/classes/elk/sketch.exp.svg | 2 +- .../stable/code_snippet/dagre/sketch.exp.svg | 2 +- .../stable/code_snippet/elk/sketch.exp.svg | 2 +- .../complex-layers/dagre/sketch.exp.svg | 2 +- .../stable/complex-layers/elk/sketch.exp.svg | 2 +- .../connected_container/dagre/sketch.exp.svg | 2 +- .../connected_container/elk/sketch.exp.svg | 2 +- .../constant_near_stress/dagre/sketch.exp.svg | 2 +- .../constant_near_stress/elk/sketch.exp.svg | 2 +- .../constant_near_title/dagre/sketch.exp.svg | 2 +- .../constant_near_title/elk/sketch.exp.svg | 2 +- .../container_edges/dagre/sketch.exp.svg | 2 +- .../stable/container_edges/elk/sketch.exp.svg | 2 +- .../crow_foot_arrowhead/dagre/sketch.exp.svg | 2 +- .../crow_foot_arrowhead/elk/sketch.exp.svg | 2 +- .../stable/cycle-order/dagre/sketch.exp.svg | 2 +- .../stable/cycle-order/elk/sketch.exp.svg | 2 +- .../stable/dagger_grid/dagre/sketch.exp.svg | 2 +- .../stable/dagger_grid/elk/sketch.exp.svg | 2 +- .../dagre-container/dagre/sketch.exp.svg | 2 +- .../stable/dagre-container/elk/sketch.exp.svg | 2 +- .../stable/dagre_spacing/dagre/sketch.exp.svg | 2 +- .../stable/dagre_spacing/elk/sketch.exp.svg | 2 +- .../dagre_spacing_right/dagre/sketch.exp.svg | 2 +- .../dagre_spacing_right/elk/sketch.exp.svg | 2 +- .../stable/dense/dagre/sketch.exp.svg | 2 +- .../testdata/stable/dense/elk/sketch.exp.svg | 2 +- .../different_subgraphs/dagre/sketch.exp.svg | 2 +- .../different_subgraphs/elk/sketch.exp.svg | 2 +- .../stable/direction/dagre/sketch.exp.svg | 2 +- .../stable/direction/elk/sketch.exp.svg | 2 +- .../edge-label-overflow/dagre/sketch.exp.svg | 2 +- .../edge-label-overflow/elk/sketch.exp.svg | 2 +- .../elk_border_radius/dagre/sketch.exp.svg | 2 +- .../elk_border_radius/elk/sketch.exp.svg | 2 +- .../elk_container_height/dagre/sketch.exp.svg | 2 +- .../elk_container_height/elk/sketch.exp.svg | 2 +- .../stable/elk_shim/dagre/sketch.exp.svg | 2 +- .../stable/elk_shim/elk/sketch.exp.svg | 2 +- .../stable/ent2d2_basic/dagre/sketch.exp.svg | 2 +- .../stable/ent2d2_basic/elk/sketch.exp.svg | 2 +- .../stable/ent2d2_right/dagre/sketch.exp.svg | 2 +- .../stable/ent2d2_right/elk/sketch.exp.svg | 2 +- .../executive_grid/dagre/sketch.exp.svg | 2 +- .../stable/executive_grid/elk/sketch.exp.svg | 2 +- .../stable/font_colors/dagre/sketch.exp.svg | 2 +- .../stable/font_colors/elk/sketch.exp.svg | 2 +- .../stable/font_sizes/dagre/sketch.exp.svg | 2 +- .../stable/font_sizes/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../giant_markdown_test/dagre/sketch.exp.svg | 2 +- .../giant_markdown_test/elk/sketch.exp.svg | 2 +- .../stable/grid_animated/dagre/sketch.exp.svg | 2 +- .../stable/grid_animated/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../grid_edge_across_cell/elk/sketch.exp.svg | 2 +- .../stable/grid_even/dagre/sketch.exp.svg | 2 +- .../stable/grid_even/elk/sketch.exp.svg | 2 +- .../stable/grid_gap/dagre/sketch.exp.svg | 2 +- .../stable/grid_gap/elk/sketch.exp.svg | 2 +- .../stable/grid_icon/dagre/sketch.exp.svg | 2 +- .../stable/grid_icon/elk/sketch.exp.svg | 2 +- .../grid_label_positions/dagre/sketch.exp.svg | 2 +- .../grid_label_positions/elk/sketch.exp.svg | 2 +- .../grid_large_checkered/dagre/sketch.exp.svg | 2 +- .../grid_large_checkered/elk/sketch.exp.svg | 2 +- .../stable/grid_nested/dagre/sketch.exp.svg | 2 +- .../stable/grid_nested/elk/sketch.exp.svg | 2 +- .../grid_nested_gap0/dagre/sketch.exp.svg | 2 +- .../grid_nested_gap0/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../grid_outside_labels/dagre/sketch.exp.svg | 2 +- .../grid_outside_labels/elk/sketch.exp.svg | 2 +- .../stable/grid_tests/dagre/sketch.exp.svg | 2 +- .../stable/grid_tests/elk/sketch.exp.svg | 2 +- .../stable/hexagon_3d/dagre/sketch.exp.svg | 2 +- .../stable/hexagon_3d/elk/sketch.exp.svg | 2 +- .../testdata/stable/hr/dagre/sketch.exp.svg | 2 +- .../testdata/stable/hr/elk/sketch.exp.svg | 2 +- .../icon-containers/dagre/sketch.exp.svg | 2 +- .../stable/icon-containers/elk/sketch.exp.svg | 2 +- .../stable/icon-label/dagre/sketch.exp.svg | 2 +- .../stable/icon-label/elk/sketch.exp.svg | 2 +- .../icon_positions/dagre/sketch.exp.svg | 2 +- .../stable/icon_positions/elk/sketch.exp.svg | 2 +- .../stable/images/dagre/sketch.exp.svg | 2 +- .../testdata/stable/images/elk/sketch.exp.svg | 2 +- .../stable/investigate/dagre/sketch.exp.svg | 2 +- .../stable/investigate/elk/sketch.exp.svg | 2 +- .../stable/label-near/dagre/sketch.exp.svg | 2 +- .../stable/label-near/elk/sketch.exp.svg | 2 +- .../label_positions/dagre/sketch.exp.svg | 2 +- .../stable/label_positions/elk/sketch.exp.svg | 2 +- .../stable/large_arch/dagre/sketch.exp.svg | 2 +- .../stable/large_arch/elk/sketch.exp.svg | 2 +- .../stable/latex/dagre/sketch.exp.svg | 2 +- .../testdata/stable/latex/elk/sketch.exp.svg | 2 +- .../legend_with_near_key/dagre/sketch.exp.svg | 2 +- .../legend_with_near_key/elk/sketch.exp.svg | 2 +- .../testdata/stable/li1/dagre/sketch.exp.svg | 2 +- .../testdata/stable/li1/elk/sketch.exp.svg | 2 +- .../testdata/stable/li2/dagre/sketch.exp.svg | 2 +- .../testdata/stable/li2/elk/sketch.exp.svg | 2 +- .../testdata/stable/li3/dagre/sketch.exp.svg | 2 +- .../testdata/stable/li3/elk/sketch.exp.svg | 2 +- .../testdata/stable/li4/dagre/sketch.exp.svg | 2 +- .../testdata/stable/li4/elk/sketch.exp.svg | 2 +- .../stable/links/dagre/sketch.exp.svg | 2 +- .../testdata/stable/links/elk/sketch.exp.svg | 2 +- .../stable/lone_h1/dagre/sketch.exp.svg | 2 +- .../stable/lone_h1/elk/sketch.exp.svg | 2 +- .../stable/markdown/dagre/sketch.exp.svg | 2 +- .../stable/markdown/elk/sketch.exp.svg | 2 +- .../markdown_stroke_fill/dagre/sketch.exp.svg | 2 +- .../markdown_stroke_fill/elk/sketch.exp.svg | 2 +- .../md_2space_newline/dagre/sketch.exp.svg | 2 +- .../md_2space_newline/elk/sketch.exp.svg | 2 +- .../md_backslash_newline/dagre/sketch.exp.svg | 2 +- .../md_backslash_newline/elk/sketch.exp.svg | 2 +- .../md_code_block_fenced/dagre/sketch.exp.svg | 2 +- .../md_code_block_fenced/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../md_code_block_indented/elk/sketch.exp.svg | 2 +- .../md_code_inline/dagre/sketch.exp.svg | 2 +- .../stable/md_code_inline/elk/sketch.exp.svg | 2 +- .../md_fontsize_10/dagre/sketch.exp.svg | 2 +- .../stable/md_fontsize_10/elk/sketch.exp.svg | 2 +- .../stable/md_mixed/dagre/sketch.exp.svg | 2 +- .../stable/md_mixed/elk/sketch.exp.svg | 2 +- .../stable/mono-edge/dagre/sketch.exp.svg | 2 +- .../stable/mono-edge/elk/sketch.exp.svg | 2 +- .../stable/mono-font/dagre/sketch.exp.svg | 2 +- .../stable/mono-font/elk/sketch.exp.svg | 2 +- .../multiline_text/dagre/sketch.exp.svg | 2 +- .../stable/multiline_text/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../multiple_box_selection/elk/sketch.exp.svg | 2 +- .../multiple_offset/dagre/sketch.exp.svg | 2 +- .../stable/multiple_offset/elk/sketch.exp.svg | 2 +- .../multiple_offset_left/dagre/sketch.exp.svg | 2 +- .../multiple_offset_left/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../multiple_person_label/elk/sketch.exp.svg | 2 +- .../multiple_trees/dagre/sketch.exp.svg | 2 +- .../stable/multiple_trees/elk/sketch.exp.svg | 2 +- .../stable/n22_e32/dagre/sketch.exp.svg | 2 +- .../stable/n22_e32/elk/sketch.exp.svg | 2 +- .../stable/near-alone/dagre/sketch.exp.svg | 2 +- .../stable/near-alone/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../nested_diagram_types/dagre/sketch.exp.svg | 2 +- .../nested_diagram_types/elk/sketch.exp.svg | 2 +- .../nested_shape_labels/dagre/sketch.exp.svg | 2 +- .../nested_shape_labels/elk/sketch.exp.svg | 2 +- .../stable/nesting_power/dagre/sketch.exp.svg | 2 +- .../stable/nesting_power/elk/sketch.exp.svg | 2 +- .../number_connections/dagre/sketch.exp.svg | 2 +- .../number_connections/elk/sketch.exp.svg | 2 +- .../one_container_loop/dagre/sketch.exp.svg | 2 +- .../one_container_loop/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../outside_bottom_labels/elk/sketch.exp.svg | 2 +- .../stable/ovals/dagre/sketch.exp.svg | 2 +- .../testdata/stable/ovals/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../testdata/stable/p/dagre/sketch.exp.svg | 2 +- e2etests/testdata/stable/p/elk/sketch.exp.svg | 2 +- .../stable/people/dagre/sketch.exp.svg | 2 +- .../testdata/stable/people/elk/sketch.exp.svg | 2 +- .../testdata/stable/pre/dagre/sketch.exp.svg | 2 +- .../testdata/stable/pre/elk/sketch.exp.svg | 2 +- .../self-referencing/dagre/sketch.exp.svg | 2 +- .../self-referencing/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../sequence_diagram_note/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../sequence_diagram_real/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../sequence_diagram_span/elk/sketch.exp.svg | 2 +- .../sequence_diagrams/dagre/sketch.exp.svg | 2 +- .../sequence_diagrams/elk/sketch.exp.svg | 2 +- .../simple_grid_edges/dagre/sketch.exp.svg | 2 +- .../simple_grid_edges/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/sql_tables/dagre/sketch.exp.svg | 2 +- .../stable/sql_tables/elk/sketch.exp.svg | 2 +- .../stable/square_3d/dagre/sketch.exp.svg | 2 +- .../stable/square_3d/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/stylish/dagre/sketch.exp.svg | 2 +- .../stable/stylish/elk/sketch.exp.svg | 2 +- .../stable/teleport_grid/dagre/sketch.exp.svg | 2 +- .../stable/teleport_grid/elk/sketch.exp.svg | 2 +- .../text_font_sizes/dagre/sketch.exp.svg | 2 +- .../stable/text_font_sizes/elk/sketch.exp.svg | 2 +- .../transparent_3d/dagre/sketch.exp.svg | 2 +- .../stable/transparent_3d/elk/sketch.exp.svg | 2 +- .../unfilled_triangle/dagre/sketch.exp.svg | 2 +- .../unfilled_triangle/elk/sketch.exp.svg | 2 +- .../unnamed_only_height/dagre/sketch.exp.svg | 2 +- .../unnamed_only_height/elk/sketch.exp.svg | 2 +- .../unnamed_only_width/dagre/sketch.exp.svg | 2 +- .../unnamed_only_width/elk/sketch.exp.svg | 2 +- .../stable/us_map/dagre/sketch.exp.svg | 2 +- .../testdata/stable/us_map/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../themes/origami/dagre/sketch.exp.svg | 2 +- .../themes/origami/elk/sketch.exp.svg | 2 +- .../themes/terminal/dagre/sketch.exp.svg | 2 +- .../themes/terminal/elk/sketch.exp.svg | 2 +- .../terminal_grayscale/dagre/sketch.exp.svg | 2 +- .../terminal_grayscale/elk/sketch.exp.svg | 2 +- .../container_icon_label/dagre/sketch.exp.svg | 2 +- .../container_icon_label/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../shape_set_width_height/elk/sketch.exp.svg | 2 +- .../connection-underline/dagre/sketch.exp.svg | 2 +- .../connection-underline/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../txtar/none-fill/dagre/sketch.exp.svg | 2 +- .../txtar/none-fill/elk/sketch.exp.svg | 2 +- .../txtar/sql-icon/dagre/sketch.exp.svg | 2 +- .../txtar/sql-icon/elk/sketch.exp.svg | 2 +- .../theme-overrides/dagre/sketch.exp.svg | 2 +- .../txtar/theme-overrides/elk/sketch.exp.svg | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../unicode/chinese/dagre/sketch.exp.svg | 2 +- .../unicode/chinese/elk/sketch.exp.svg | 2 +- .../unicode/emojis/dagre/sketch.exp.svg | 2 +- .../unicode/emojis/elk/sketch.exp.svg | 2 +- .../japanese-basic/dagre/sketch.exp.svg | 2 +- .../unicode/japanese-basic/elk/sketch.exp.svg | 2 +- .../japanese-full/dagre/sketch.exp.svg | 2 +- .../unicode/japanese-full/elk/sketch.exp.svg | 2 +- .../japanese-mixed/dagre/sketch.exp.svg | 2 +- .../unicode/japanese-mixed/elk/sketch.exp.svg | 2 +- .../unicode/korean/dagre/sketch.exp.svg | 2 +- .../unicode/korean/elk/sketch.exp.svg | 2 +- .../mixed-language-2/dagre/sketch.exp.svg | 2 +- .../mixed-language-2/elk/sketch.exp.svg | 2 +- .../mixed-language/dagre/sketch.exp.svg | 2 +- .../unicode/mixed-language/elk/sketch.exp.svg | 2 +- .../unicode/with-style/dagre/sketch.exp.svg | 2 +- .../unicode/with-style/elk/sketch.exp.svg | 2 +- 596 files changed, 588 insertions(+), 588 deletions(-) diff --git a/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg b/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg index ba245ef99..c847c50bd 100644 --- a/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/all_shapes/sketch.exp.svg @@ -1,4 +1,4 @@ - -`, svgURL, pngURL) +` + sampleSVG := fmt.Sprintf(template, svgURL, pngURL) l := simplelog.FromLibLog(ctx) - out, err := BundleLocal(ctx, l, []byte(sampleSVG), false) + // It doesn't matter what the inputPath is for absolute paths + out, err := BundleLocal(ctx, l, "asdf", []byte(sampleSVG), false) if err != nil { t.Fatal(err) } @@ -208,6 +211,47 @@ width="328" height="587" viewBox="-100 -131 328 587">Check PINSearch NetworkReadyOffEnter PIN /check PIN[pin invalid][pin OK][pin OK]network foundpower offpower offpower off + + - + diff --git a/e2etests/testdata/regression/glob_dimensions/elk/board.exp.json b/e2etests/testdata/regression/glob_dimensions/elk/board.exp.json index 61b314cc0..d6f22abdc 100644 --- a/e2etests/testdata/regression/glob_dimensions/elk/board.exp.json +++ b/e2etests/testdata/regression/glob_dimensions/elk/board.exp.json @@ -40,7 +40,7 @@ "underline": false, "labelWidth": 9, "labelHeight": 21, - "labelPosition": "OUTSIDE_BOTTOM_CENTER", + "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 }, @@ -49,10 +49,10 @@ "type": "rectangle", "pos": { "x": 37, - "y": 118 + "y": 103 }, "width": 262, - "height": 670, + "height": 655, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -90,7 +90,7 @@ "type": "oval", "pos": { "x": 161, - "y": 168 + "y": 153 }, "width": 10, "height": 10, @@ -122,7 +122,7 @@ "underline": false, "labelWidth": 9, "labelHeight": 21, - "labelPosition": "OUTSIDE_BOTTOM_CENTER", + "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 2 }, @@ -131,7 +131,7 @@ "type": "rectangle", "pos": { "x": 111, - "y": 274 + "y": 244 }, "width": 111, "height": 66, @@ -172,7 +172,7 @@ "type": "diamond", "pos": { "x": 156, - "y": 521 + "y": 491 }, "width": 20, "height": 20, @@ -212,7 +212,7 @@ "type": "oval", "pos": { "x": 161, - "y": 702 + "y": 672 }, "width": 10, "height": 10, @@ -253,7 +253,7 @@ "type": "rectangle", "pos": { "x": 29, - "y": 959 + "y": 929 }, "width": 159, "height": 66, @@ -294,7 +294,7 @@ "type": "rectangle", "pos": { "x": 15, - "y": 1196 + "y": 1166 }, "width": 89, "height": 66, @@ -335,7 +335,7 @@ "type": "rectangle", "pos": { "x": 95, - "y": 1433 + "y": 1403 }, "width": 120, "height": 66, @@ -398,12 +398,12 @@ "labelPercentage": 0, "route": [ { - "x": 168.5, - "y": 48 + "x": 169, + "y": 22 }, { - "x": 168.5, - "y": 118 + "x": 168, + "y": 103 } ], "animated": false, @@ -436,12 +436,12 @@ "labelPercentage": 0, "route": [ { - "x": 166.5, - "y": 204 + "x": 167, + "y": 163 }, { - "x": 166.5, - "y": 274 + "x": 166, + "y": 244 } ], "animated": false, @@ -475,19 +475,19 @@ "route": [ { "x": 123.5, - "y": 340 + "y": 310 }, { "x": 123.5, - "y": 481 + "y": 451 }, { "x": 163.16600036621094, - "y": 481 + "y": 451 }, { "x": 163, - "y": 524 + "y": 494 } ], "animated": false, @@ -521,19 +521,19 @@ "route": [ { "x": 170, - "y": 525 + "y": 495 }, { "x": 169.83299255371094, - "y": 481 + "y": 451 }, { "x": 209.5, - "y": 481 + "y": 451 }, { "x": 209.5, - "y": 340 + "y": 310 } ], "animated": false, @@ -567,11 +567,11 @@ "route": [ { "x": 166, - "y": 540 + "y": 510 }, { "x": 167, - "y": 702 + "y": 672 } ], "animated": false, @@ -605,11 +605,11 @@ "route": [ { "x": 108.75, - "y": 788 + "y": 758 }, { "x": 108.75, - "y": 959 + "y": 929 } ], "animated": false, @@ -643,11 +643,11 @@ "route": [ { "x": 60, - "y": 1025 + "y": 995 }, { "x": 60, - "y": 1196 + "y": 1166 } ], "animated": false, @@ -681,19 +681,19 @@ "route": [ { "x": 240.99899291992188, - "y": 788 + "y": 758 }, { "x": 240.99899291992188, - "y": 1393 + "y": 1363 }, { "x": 185.25, - "y": 1393 + "y": 1363 }, { "x": 185.25, - "y": 1433 + "y": 1403 } ], "animated": false, @@ -727,11 +727,11 @@ "route": [ { "x": 157.5, - "y": 1025 + "y": 995 }, { "x": 157.5, - "y": 1433 + "y": 1403 } ], "animated": false, @@ -765,19 +765,19 @@ "route": [ { "x": 60, - "y": 1262 + "y": 1232 }, { "x": 60, - "y": 1393 + "y": 1363 }, { "x": 125.25, - "y": 1393 + "y": 1363 }, { "x": 125.25, - "y": 1433 + "y": 1403 } ], "animated": false, diff --git a/e2etests/testdata/regression/glob_dimensions/elk/sketch.exp.svg b/e2etests/testdata/regression/glob_dimensions/elk/sketch.exp.svg index d1f0af7b2..0079d186d 100644 --- a/e2etests/testdata/regression/glob_dimensions/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/glob_dimensions/elk/sketch.exp.svg @@ -1,23 +1,23 @@ -Check PINSearch NetworkReadyOffEnter PIN /check PIN[pin invalid][pin OK][pin OK]network foundpower offpower offpower off - - - - - - - - - - - - - - - - - + .d2-1524816052 .fill-N1{fill:#0A0F25;} + .d2-1524816052 .fill-N2{fill:#676C7E;} + .d2-1524816052 .fill-N3{fill:#9499AB;} + .d2-1524816052 .fill-N4{fill:#CFD2DD;} + .d2-1524816052 .fill-N5{fill:#DEE1EB;} + .d2-1524816052 .fill-N6{fill:#EEF1F8;} + .d2-1524816052 .fill-N7{fill:#FFFFFF;} + .d2-1524816052 .fill-B1{fill:#0D32B2;} + .d2-1524816052 .fill-B2{fill:#0D32B2;} + .d2-1524816052 .fill-B3{fill:#E3E9FD;} + .d2-1524816052 .fill-B4{fill:#E3E9FD;} + .d2-1524816052 .fill-B5{fill:#EDF0FD;} + .d2-1524816052 .fill-B6{fill:#F7F8FE;} + .d2-1524816052 .fill-AA2{fill:#4A6FF3;} + .d2-1524816052 .fill-AA4{fill:#EDF0FD;} + .d2-1524816052 .fill-AA5{fill:#F7F8FE;} + .d2-1524816052 .fill-AB4{fill:#EDF0FD;} + .d2-1524816052 .fill-AB5{fill:#F7F8FE;} + .d2-1524816052 .stroke-N1{stroke:#0A0F25;} + .d2-1524816052 .stroke-N2{stroke:#676C7E;} + .d2-1524816052 .stroke-N3{stroke:#9499AB;} + .d2-1524816052 .stroke-N4{stroke:#CFD2DD;} + .d2-1524816052 .stroke-N5{stroke:#DEE1EB;} + .d2-1524816052 .stroke-N6{stroke:#EEF1F8;} + .d2-1524816052 .stroke-N7{stroke:#FFFFFF;} + .d2-1524816052 .stroke-B1{stroke:#0D32B2;} + .d2-1524816052 .stroke-B2{stroke:#0D32B2;} + .d2-1524816052 .stroke-B3{stroke:#E3E9FD;} + .d2-1524816052 .stroke-B4{stroke:#E3E9FD;} + .d2-1524816052 .stroke-B5{stroke:#EDF0FD;} + .d2-1524816052 .stroke-B6{stroke:#F7F8FE;} + .d2-1524816052 .stroke-AA2{stroke:#4A6FF3;} + .d2-1524816052 .stroke-AA4{stroke:#EDF0FD;} + .d2-1524816052 .stroke-AA5{stroke:#F7F8FE;} + .d2-1524816052 .stroke-AB4{stroke:#EDF0FD;} + .d2-1524816052 .stroke-AB5{stroke:#F7F8FE;} + .d2-1524816052 .background-color-N1{background-color:#0A0F25;} + .d2-1524816052 .background-color-N2{background-color:#676C7E;} + .d2-1524816052 .background-color-N3{background-color:#9499AB;} + .d2-1524816052 .background-color-N4{background-color:#CFD2DD;} + .d2-1524816052 .background-color-N5{background-color:#DEE1EB;} + .d2-1524816052 .background-color-N6{background-color:#EEF1F8;} + .d2-1524816052 .background-color-N7{background-color:#FFFFFF;} + .d2-1524816052 .background-color-B1{background-color:#0D32B2;} + .d2-1524816052 .background-color-B2{background-color:#0D32B2;} + .d2-1524816052 .background-color-B3{background-color:#E3E9FD;} + .d2-1524816052 .background-color-B4{background-color:#E3E9FD;} + .d2-1524816052 .background-color-B5{background-color:#EDF0FD;} + .d2-1524816052 .background-color-B6{background-color:#F7F8FE;} + .d2-1524816052 .background-color-AA2{background-color:#4A6FF3;} + .d2-1524816052 .background-color-AA4{background-color:#EDF0FD;} + .d2-1524816052 .background-color-AA5{background-color:#F7F8FE;} + .d2-1524816052 .background-color-AB4{background-color:#EDF0FD;} + .d2-1524816052 .background-color-AB5{background-color:#F7F8FE;} + .d2-1524816052 .color-N1{color:#0A0F25;} + .d2-1524816052 .color-N2{color:#676C7E;} + .d2-1524816052 .color-N3{color:#9499AB;} + .d2-1524816052 .color-N4{color:#CFD2DD;} + .d2-1524816052 .color-N5{color:#DEE1EB;} + .d2-1524816052 .color-N6{color:#EEF1F8;} + .d2-1524816052 .color-N7{color:#FFFFFF;} + .d2-1524816052 .color-B1{color:#0D32B2;} + .d2-1524816052 .color-B2{color:#0D32B2;} + .d2-1524816052 .color-B3{color:#E3E9FD;} + .d2-1524816052 .color-B4{color:#E3E9FD;} + .d2-1524816052 .color-B5{color:#EDF0FD;} + .d2-1524816052 .color-B6{color:#F7F8FE;} + .d2-1524816052 .color-AA2{color:#4A6FF3;} + .d2-1524816052 .color-AA4{color:#EDF0FD;} + .d2-1524816052 .color-AA5{color:#F7F8FE;} + .d2-1524816052 .color-AB4{color:#EDF0FD;} + .d2-1524816052 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>Check PINSearch NetworkReadyOffEnter PIN /check PIN[pin invalid][pin OK][pin OK]network foundpower offpower offpower off + + + + + + + + + + + + + + + + + \ No newline at end of file From 0a9b0f936e9eb586f86c75b45a94857553f3ad95 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 2 May 2024 21:56:23 -0600 Subject: [PATCH 068/109] update notable --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8863097bd..dcbb5846d 100644 --- a/README.md +++ b/README.md @@ -291,6 +291,9 @@ Do you have or see an open-source project with `.d2` files? Please submit a PR a this selected list of featured projects using D2. - [ElasticSearch](https://github.com/elastic/beats/blob/main/libbeat/publisher/queue/proxy/diagrams/broker.d2) +- [Sourcegraph](https://handbook.sourcegraph.com/departments/engineering/managed-services/telemetry-gateway/#dev-architecture-diagram) +- [Temporal](https://github.com/temporalio/temporal/blob/0be2681c994470c7c61ea88e4fcef89bb4024e58/docs/_assets/matching-context.d2) +- [Coder](https://coder.com/blog/managing-templates-in-coder) - [UC Berkeley](https://github.com/ucb-bar/hammer/blob/2b5c04d7b7d9ee3c73575efcd7ee0698bd5bfa88/doc/Hammer-Use/hier.d2) - [Coronacheck](https://github.com/minvws/nl-covid19-coronacheck-app-ios/blob/e1567e9d1633b3273c537a105bff0e7d3a57ecfe/Diagrams/client-side-datamodel.d2) From 4274f102648837e78560dad86e72aaade835efac Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Tue, 14 May 2024 20:36:41 -0700 Subject: [PATCH 069/109] dont render unnecessarily with opacity 0 --- ci/release/changelogs/next.md | 2 + d2renderers/d2svg/d2svg.go | 4 +- e2etests/testdata/txtar.txt | 18 + .../opacity-zero-route/dagre/board.exp.json | 497 ++++++++++++++++++ .../opacity-zero-route/dagre/sketch.exp.svg | 104 ++++ .../opacity-zero-route/elk/board.exp.json | 497 ++++++++++++++++++ .../opacity-zero-route/elk/sketch.exp.svg | 104 ++++ 7 files changed, 1224 insertions(+), 2 deletions(-) create mode 100644 e2etests/testdata/txtar/opacity-zero-route/dagre/board.exp.json create mode 100644 e2etests/testdata/txtar/opacity-zero-route/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/opacity-zero-route/elk/board.exp.json create mode 100644 e2etests/testdata/txtar/opacity-zero-route/elk/sketch.exp.svg diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index c81cdb0bd..10845d9dd 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -2,6 +2,8 @@ #### Improvements 🧹 +- Opacity 0 shapes no longer have a label mask which made any segment of connections going through them lower opacity [#1940](https://github.com/terrastruct/d2/pull/1940) + #### Bugfixes ⛑️ - Local relative icons are relative to the d2 file instead of CLI invoke path [#1924](https://github.com/terrastruct/d2/pull/1924) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 6906c4d68..db551fc50 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -1213,7 +1213,7 @@ func drawShape(writer, appendixWriter io.Writer, diagramHash string, targetShape // Closes the class=shape fmt.Fprint(writer, ``) - if targetShape.Icon != nil && targetShape.Type != d2target.ShapeImage { + if targetShape.Icon != nil && targetShape.Type != d2target.ShapeImage && targetShape.Opacity != 0 { iconPosition := label.FromString(targetShape.IconPosition) var box *geo.Box if iconPosition.IsOutside() { @@ -1234,7 +1234,7 @@ func drawShape(writer, appendixWriter io.Writer, diagramHash string, targetShape ) } - if targetShape.Label != "" { + if targetShape.Label != "" && targetShape.Opacity != 0 { labelPosition := label.FromString(targetShape.LabelPosition) var box *geo.Box if labelPosition.IsOutside() { diff --git a/e2etests/testdata/txtar.txt b/e2etests/testdata/txtar.txt index 60366a5a5..e83781992 100644 --- a/e2etests/testdata/txtar.txt +++ b/e2etests/testdata/txtar.txt @@ -213,3 +213,21 @@ ok: { } dog1 -> dog3 } + +-- opacity-zero-route -- +grid: { + *.style.opacity: 0 + grid-columns: 3 + a + b + c + d + e + f + g + h + + d.style.opacity: 1 +} + +out -> grid.d diff --git a/e2etests/testdata/txtar/opacity-zero-route/dagre/board.exp.json b/e2etests/testdata/txtar/opacity-zero-route/dagre/board.exp.json new file mode 100644 index 000000000..c4f256797 --- /dev/null +++ b/e2etests/testdata/txtar/opacity-zero-route/dagre/board.exp.json @@ -0,0 +1,497 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "grid", + "type": "rectangle", + "pos": { + "x": 0, + "y": 0 + }, + "width": 361, + "height": 398, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "grid", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 44, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "grid.a", + "type": "rectangle", + "pos": { + "x": 60, + "y": 60 + }, + "width": 53, + "height": 66, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.b", + "type": "rectangle", + "pos": { + "x": 60, + "y": 166 + }, + "width": 53, + "height": 66, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.c", + "type": "rectangle", + "pos": { + "x": 60, + "y": 272 + }, + "width": 53, + "height": 66, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.d", + "type": "rectangle", + "pos": { + "x": 153, + "y": 60 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "d", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.e", + "type": "rectangle", + "pos": { + "x": 153, + "y": 166 + }, + "width": 54, + "height": 66, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "e", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.f", + "type": "rectangle", + "pos": { + "x": 153, + "y": 272 + }, + "width": 54, + "height": 66, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "f", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 6, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.g", + "type": "rectangle", + "pos": { + "x": 247, + "y": 60 + }, + "width": 54, + "height": 119, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "g", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.h", + "type": "rectangle", + "pos": { + "x": 247, + "y": 219 + }, + "width": 54, + "height": 119, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "h", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "out", + "type": "rectangle", + "pos": { + "x": 421, + "y": 166 + }, + "width": 69, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "out", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 24, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(out -> grid.d)[0]", + "src": "out", + "srcArrow": "none", + "dst": "grid.d", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 421, + "y": 186 + }, + { + "x": 207, + "y": 103 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/opacity-zero-route/dagre/sketch.exp.svg b/e2etests/testdata/txtar/opacity-zero-route/dagre/sketch.exp.svg new file mode 100644 index 000000000..a30ccdea9 --- /dev/null +++ b/e2etests/testdata/txtar/opacity-zero-route/dagre/sketch.exp.svg @@ -0,0 +1,104 @@ +gridoutd + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/opacity-zero-route/elk/board.exp.json b/e2etests/testdata/txtar/opacity-zero-route/elk/board.exp.json new file mode 100644 index 000000000..583020b29 --- /dev/null +++ b/e2etests/testdata/txtar/opacity-zero-route/elk/board.exp.json @@ -0,0 +1,497 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "grid", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 361, + "height": 398, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "grid", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 44, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "grid.a", + "type": "rectangle", + "pos": { + "x": 72, + "y": 72 + }, + "width": 53, + "height": 66, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.b", + "type": "rectangle", + "pos": { + "x": 72, + "y": 178 + }, + "width": 53, + "height": 66, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.c", + "type": "rectangle", + "pos": { + "x": 72, + "y": 284 + }, + "width": 53, + "height": 66, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.d", + "type": "rectangle", + "pos": { + "x": 165, + "y": 72 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "d", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.e", + "type": "rectangle", + "pos": { + "x": 165, + "y": 178 + }, + "width": 54, + "height": 66, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "e", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.f", + "type": "rectangle", + "pos": { + "x": 165, + "y": 284 + }, + "width": 54, + "height": 66, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "f", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 6, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.g", + "type": "rectangle", + "pos": { + "x": 259, + "y": 72 + }, + "width": 54, + "height": 119, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "g", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.h", + "type": "rectangle", + "pos": { + "x": 259, + "y": 231 + }, + "width": 54, + "height": 119, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "h", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "out", + "type": "rectangle", + "pos": { + "x": 393, + "y": 178 + }, + "width": 69, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "out", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 24, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(out -> grid.d)[0]", + "src": "out", + "srcArrow": "none", + "dst": "grid.d", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 393, + "y": 195 + }, + { + "x": 219, + "y": 117 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/opacity-zero-route/elk/sketch.exp.svg b/e2etests/testdata/txtar/opacity-zero-route/elk/sketch.exp.svg new file mode 100644 index 000000000..b7c4dcdf6 --- /dev/null +++ b/e2etests/testdata/txtar/opacity-zero-route/elk/sketch.exp.svg @@ -0,0 +1,104 @@ +gridoutd + + + + + \ No newline at end of file From a7f83f702981079333fd3dfd413286ce9fbcc8f5 Mon Sep 17 00:00:00 2001 From: Daniel Suh Date: Tue, 14 May 2024 16:10:19 -0400 Subject: [PATCH 070/109] bezier curves work? --- d2renderers/d2svg/d2svg.go | 210 ++++++- e2etests/testdata/txtar.txt | 7 + .../dagre/board.exp.json | 571 ++++++++++++++++++ .../dagre/sketch.exp.svg | 107 ++++ .../elk/board.exp.json | 558 +++++++++++++++++ .../elk/sketch.exp.svg | 107 ++++ 6 files changed, 1559 insertions(+), 1 deletion(-) create mode 100644 e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json create mode 100644 e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json create mode 100644 e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 6906c4d68..707a922df 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -11,6 +11,7 @@ import ( "html" "io" "sort" + "strconv" "strings" "math" @@ -494,6 +495,192 @@ func makeLabelMask(labelTL *geo.Point, width, height int, opacity float64) strin ) } +func splitBezierCurve(p1, p2, p3, p4 *geo.Point, t0, t1 float64) (geo.Point, geo.Point, geo.Point, geo.Point) { + u0, u1 := 1 - t0, 1 - t1 + + q1 := geo.Point { + X: (u0 * u0 * u0) * p1.X + (3 * t0 * u0 * u0) * p2.X + (3 * t0 * t0 * u0) * p3.X + t0 * t0 * t0 * p4.X, + Y: (u0 * u0 * u0) * p1.Y + (3 * t0 * u0 * u0) * p2.Y + (3 * t0 * t0 * u0) * p3.Y + t0 * t0 * t0 * p4.Y, + } + q2 := geo.Point { + X: (u0 * u0 * u1) * p1.X + (2 * t0 * u0 * u1 + u0 * u0 * t1) * p2.X + (t0 * t0 * u1 + 2 * u0 * t0 * t1) * p3.X + t0 * t0 * t1 * p4.X, + Y: (u0 * u0 * u1) * p1.Y + (2 * t0 * u0 * u1 + u0 * u0 * t1) * p2.Y + (t0 * t0 * u1 + 2 * u0 * t0 * t1) * p3.Y + t0 * t0 * t1 * p4.Y, + } + q3 := geo.Point{ + X: (u0 * u1 * u1) * p1.X + (t0 * u1 * u1 + 2 * u0 * t1 * u1) * p2.X + (2 * t0 * t1 * u1 + u0 * t1 * t1) * p3.X + t0 * t1 * t1 * p4.X, + Y: (u0 * u1 * u1) * p1.Y + (t0 * u1 * u1 + 2 * u0 * t1 * u1) * p2.Y + (2 * t0 * t1 * u1 + u0 * t1 * t1) * p3.Y + t0 * t1 * t1 * p4.Y, + } + q4 := geo.Point{ + X: (u1 * u1 * u1) * p1.X + (3 * t1 * u1 * u1) * p2.X + (3 * t1 * t1 * u1) * p3.X + t1 * t1 * t1 * p4.X, + Y: (u1 * u1 * u1) * p1.Y + (3 * t1 * u1 * u1) * p2.Y + (3 * t1 * t1 * u1) * p3.Y + t1 * t1 * t1 * p4.Y, + } + + return q1, q2, q3, q4 +} + +func splitPath(path string, percentage float64) (string, string) { + var sumPathLens, curPathLen, x, y, pathLength float64 + var prevPosition geo.Point + var path1, path2 string + var increment int + + pathData := strings.Split(path, " ") + + for i := 0; i < len(pathData); { + switch pathData[i] { + case "M": + x, _ = strconv.ParseFloat(pathData[i + 1], 64) + y, _ = strconv.ParseFloat(pathData[i + 2], 64) + + increment = 3 + case "L": + x, _ = strconv.ParseFloat(pathData[i + 1], 64) + y, _ = strconv.ParseFloat(pathData[i + 2], 64) + + pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + + increment = 3 + case "C": + x, _ = strconv.ParseFloat(pathData[i + 5], 64) + y, _ = strconv.ParseFloat(pathData[i + 6], 64) + + pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + + increment = 7 + case "S": + x, _ = strconv.ParseFloat(pathData[i + 3], 64) + y, _ = strconv.ParseFloat(pathData[i + 4], 64) + + pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + + increment = 5 + default: + panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) + } + + prevPosition = geo.Point{X: x, Y: y}; + i += increment; + } + fmt.Println(pathLength); + + i := 0 + + for ; i < len(pathData); { + switch pathData[i] { + case "M": + x, _ = strconv.ParseFloat(pathData[i + 1], 64) + y, _ = strconv.ParseFloat(pathData[i + 2], 64) + + if sumPathLens + curPathLen < pathLength * percentage { + path1 += fmt.Sprintf("M %s %s ", pathData[i + 1], pathData[i + 2]) + } + + increment = 3 + case "L": + x, _ = strconv.ParseFloat(pathData[i + 1], 64) + y, _ = strconv.ParseFloat(pathData[i + 2], 64) + + curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + + if sumPathLens + curPathLen < pathLength * percentage { + path1 += fmt.Sprintf("L %s %s ", pathData[i + 1], pathData[i + 2]) + } + + increment = 3 + case "C": + x, _ = strconv.ParseFloat(pathData[i + 5], 64) + y, _ = strconv.ParseFloat(pathData[i + 6], 64) + + curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + + if sumPathLens + curPathLen < pathLength * percentage { + path1 += fmt.Sprintf("C %s %s %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4], pathData[i + 5], pathData[i + 6]); + } + + increment = 7 + case "S": + x, _ = strconv.ParseFloat(pathData[i + 3], 64) + y, _ = strconv.ParseFloat(pathData[i + 4], 64) + + curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + + if sumPathLens + curPathLen < pathLength * percentage { + path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4]) + } + + increment = 5 + default: + panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) + } + + sumPathLens += curPathLen + + if sumPathLens >= pathLength * percentage { + t := (pathLength * percentage - sumPathLens + curPathLen) / curPathLen + fmt.Println(t) + + switch(pathData[i]) { + case "L": + path1 += fmt.Sprintf("L %f %f ", (x - prevPosition.X) * t + prevPosition.X, (y - prevPosition.Y) * t + prevPosition.Y) + path2 += fmt.Sprintf("M %f %f L %f %f ", (x - prevPosition.X) * t + prevPosition.X, (y - prevPosition.Y) * t + prevPosition.Y, x, y) + case "C": + h1x, _ := strconv.ParseFloat(pathData[i + 1], 64) + h1y, _ := strconv.ParseFloat(pathData[i + 2], 64) + h2x, _ := strconv.ParseFloat(pathData[i + 3], 64) + h2y, _ := strconv.ParseFloat(pathData[i + 4], 64) + p1x, _ := strconv.ParseFloat(pathData[i + 5], 64) + p1y, _ := strconv.ParseFloat(pathData[i + 6], 64) + + heading1 := geo.Point{X: h1x, Y: h1y} + heading2 := geo.Point{X: h2x, Y: h2y} + nextPoint := geo.Point{X: p1x, Y: p1y} + + _, q2, q3, q4 := splitBezierCurve(&prevPosition, &heading1, &heading2, &nextPoint, 0, 0.5) + + path1 += fmt.Sprintf("C %f %f %f %f %f %f ", q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y); + + case "S": + path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4]) + default: + panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) + } + + i += increment + prevPosition = geo.Point{X: x, Y: y} + break + } + + i += increment + prevPosition = geo.Point{X: x, Y: y} + } + + for ; i < len(pathData); { + switch pathData[i] { + case "M": + path2 += fmt.Sprintf("M %s %s ", pathData[i + 1], pathData[i + 2]) + increment = 3 + case "L": + path2 += fmt.Sprintf("L %s %s ", pathData[i + 1], pathData[i + 2]) + increment = 3 + case "C": + path2 += fmt.Sprintf("C %s %s %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4], pathData[i + 5], pathData[i + 6]); + increment = 7 + case "S": + path2 += fmt.Sprintf("S %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4]) + increment = 5 + default: + panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) + } + + i += increment + } + + fmt.Println(path1); + fmt.Println(path2); + + return path1, path2 +} + func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Connection, markers map[string]struct{}, idToShape map[string]d2target.Shape, sketchRunner *d2sketch.Runner) (labelMask string, _ error) { opacityStyle := "" if connection.Opacity != 1.0 { @@ -549,6 +736,9 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co srcAdj, dstAdj := getArrowheadAdjustments(connection, idToShape) path := pathData(connection, srcAdj, dstAdj) mask := fmt.Sprintf(`mask="url(#%s)"`, labelMaskID) + + path1, path2 := splitPath(path, 0.5); + if sketchRunner != nil { out, err := d2sketch.Connection(sketchRunner, connection, path, mask) if err != nil { @@ -575,7 +765,25 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co pathEl.ClassName = fmt.Sprintf("connection%s", animatedClass) pathEl.Style = connection.CSSStyle() pathEl.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) - fmt.Fprint(writer, pathEl.Render()) + // fmt.Fprint(writer, pathEl.Render()) + + pathEl1 := d2themes.NewThemableElement("path") + pathEl1.D = path1 + pathEl1.Fill = color.None + pathEl1.Stroke = connection.Stroke + pathEl1.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl1.Style = connection.CSSStyle() + pathEl1.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) + fmt.Fprint(writer, pathEl1.Render()) + + pathEl2 := d2themes.NewThemableElement("path") + pathEl2.D = path2 + pathEl2.Fill = color.None + pathEl2.Stroke = connection.Stroke + pathEl2.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl2.Style = connection.CSSStyle() + pathEl2.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) + fmt.Fprint(writer, pathEl2.Render()) } if connection.Label != "" { diff --git a/e2etests/testdata/txtar.txt b/e2etests/testdata/txtar.txt index 60366a5a5..70a47a43b 100644 --- a/e2etests/testdata/txtar.txt +++ b/e2etests/testdata/txtar.txt @@ -213,3 +213,10 @@ ok: { } dog1 -> dog3 } + +-- bidirectional_connection_animation -- +a <-> b: {style.animated: true} +a <-> c: {style.animated: true} +a <-> d: {style.animated: true} +a <-> e: {style.animated: true} +f <-> g: {style.animated: true} diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json new file mode 100644 index 000000000..1c4c39898 --- /dev/null +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json @@ -0,0 +1,571 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 170, + "y": 0 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 0, + "y": 166 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "c", + "type": "rectangle", + "pos": { + "x": 113, + "y": 166 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "d", + "type": "rectangle", + "pos": { + "x": 226, + "y": 166 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "d", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "e", + "type": "rectangle", + "pos": { + "x": 340, + "y": 166 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "e", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "f", + "type": "rectangle", + "pos": { + "x": 455, + "y": 0 + }, + "width": 51, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "f", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 6, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "g", + "type": "rectangle", + "pos": { + "x": 453, + "y": 166 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "g", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a <-> b)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "b", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 169.75, + "y": 45.957000732421875 + }, + { + "x": 55.14899826049805, + "y": 101.99099731445312 + }, + { + "x": 26.5, + "y": 126 + }, + { + "x": 26.5, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> c)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "c", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 173.5, + "y": 66 + }, + { + "x": 146.3000030517578, + "y": 106 + }, + { + "x": 139.5, + "y": 126 + }, + { + "x": 139.5, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> d)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "d", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 219, + "y": 66 + }, + { + "x": 246.1999969482422, + "y": 106 + }, + { + "x": 253, + "y": 126 + }, + { + "x": 253, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> e)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "e", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 222.5, + "y": 46 + }, + { + "x": 337.70001220703125, + "y": 102 + }, + { + "x": 366.5, + "y": 126 + }, + { + "x": 366.5, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(f <-> g)[0]", + "src": "f", + "srcArrow": "triangle", + "dst": "g", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 480, + "y": 66 + }, + { + "x": 480, + "y": 106 + }, + { + "x": 480, + "y": 126 + }, + { + "x": 480, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg new file mode 100644 index 000000000..8bf7169d7 --- /dev/null +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg @@ -0,0 +1,107 @@ +abcdefg + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json new file mode 100644 index 000000000..e121ae7ac --- /dev/null +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json @@ -0,0 +1,558 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 68, + "y": 12 + }, + "width": 160, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 12, + "y": 208 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "c", + "type": "rectangle", + "pos": { + "x": 85, + "y": 208 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "d", + "type": "rectangle", + "pos": { + "x": 158, + "y": 208 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "d", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "e", + "type": "rectangle", + "pos": { + "x": 232, + "y": 208 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "e", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "f", + "type": "rectangle", + "pos": { + "x": 306, + "y": 12 + }, + "width": 51, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "f", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 6, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "g", + "type": "rectangle", + "pos": { + "x": 305, + "y": 208 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "g", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a <-> b)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "b", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 100.25, + "y": 78 + }, + { + "x": 100.25, + "y": 118 + }, + { + "x": 38.5, + "y": 118 + }, + { + "x": 38.5, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> c)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "c", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 132.25, + "y": 78 + }, + { + "x": 132.25, + "y": 168 + }, + { + "x": 111.5, + "y": 168 + }, + { + "x": 111.5, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> d)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "d", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 164.25, + "y": 78 + }, + { + "x": 164.25, + "y": 168 + }, + { + "x": 185, + "y": 168 + }, + { + "x": 185, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> e)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "e", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 196.25, + "y": 78 + }, + { + "x": 196.25, + "y": 118 + }, + { + "x": 258.5, + "y": 118 + }, + { + "x": 258.5, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(f <-> g)[0]", + "src": "f", + "srcArrow": "triangle", + "dst": "g", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 332, + "y": 78 + }, + { + "x": 332, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg new file mode 100644 index 000000000..eb9196aad --- /dev/null +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg @@ -0,0 +1,107 @@ +abcdefg + + + + + + + + + \ No newline at end of file From 9544a48f80bc5297e2a01f1be14485f6c9ab8b6b Mon Sep 17 00:00:00 2001 From: Daniel Suh Date: Tue, 14 May 2024 16:28:44 -0400 Subject: [PATCH 071/109] seems to be working --- d2renderers/d2svg/d2svg.go | 63 +++++++++++-------- .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- 3 files changed, 38 insertions(+), 29 deletions(-) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 707a922df..9dc4b7acd 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -635,12 +635,17 @@ func splitPath(path string, percentage float64) (string, string) { heading2 := geo.Point{X: h2x, Y: h2y} nextPoint := geo.Point{X: p1x, Y: p1y} - _, q2, q3, q4 := splitBezierCurve(&prevPosition, &heading1, &heading2, &nextPoint, 0, 0.5) + q1, q2, q3, q4 := splitBezierCurve(&prevPosition, &heading1, &heading2, &nextPoint, 0, 0.5) path1 += fmt.Sprintf("C %f %f %f %f %f %f ", q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y); + q1, q2, q3, q4 = splitBezierCurve(&prevPosition, &heading1, &heading2, &nextPoint, 0.5, 1) + + path2 += fmt.Sprintf("M %f %f C %f %f %f %f %f %f ", q1.X, q1.Y, q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y); + case "S": path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4]) + path2 += fmt.Sprintf("M %s %s ", pathData[i + 3], pathData[i + 4]) default: panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) } @@ -736,8 +741,6 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co srcAdj, dstAdj := getArrowheadAdjustments(connection, idToShape) path := pathData(connection, srcAdj, dstAdj) mask := fmt.Sprintf(`mask="url(#%s)"`, labelMaskID) - - path1, path2 := splitPath(path, 0.5); if sketchRunner != nil { out, err := d2sketch.Connection(sketchRunner, connection, path, mask) @@ -758,32 +761,38 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co animatedClass = " animated-connection" } - pathEl := d2themes.NewThemableElement("path") - pathEl.D = path - pathEl.Fill = color.None - pathEl.Stroke = connection.Stroke - pathEl.ClassName = fmt.Sprintf("connection%s", animatedClass) - pathEl.Style = connection.CSSStyle() - pathEl.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) - // fmt.Fprint(writer, pathEl.Render()) + // if connection is not animated or is a directed connection + if !connection.Animated || ((connection.DstArrow == d2target.NoArrowhead && connection.SrcArrow != d2target.NoArrowhead) || (connection.DstArrow != d2target.NoArrowhead && connection.SrcArrow == d2target.NoArrowhead)) { + pathEl := d2themes.NewThemableElement("path") + pathEl.D = path + pathEl.Fill = color.None + pathEl.Stroke = connection.Stroke + pathEl.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl.Style = connection.CSSStyle() + pathEl.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) + fmt.Fprint(writer, pathEl.Render()) + } else { + path1, path2 := splitPath(path, 0.5); - pathEl1 := d2themes.NewThemableElement("path") - pathEl1.D = path1 - pathEl1.Fill = color.None - pathEl1.Stroke = connection.Stroke - pathEl1.ClassName = fmt.Sprintf("connection%s", animatedClass) - pathEl1.Style = connection.CSSStyle() - pathEl1.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) - fmt.Fprint(writer, pathEl1.Render()) + pathEl1 := d2themes.NewThemableElement("path") + pathEl1.D = path1 + pathEl1.Fill = color.None + pathEl1.Stroke = connection.Stroke + pathEl1.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl1.Style = connection.CSSStyle() + pathEl1.Style += "animation-direction: reverse;" + pathEl1.Attributes = fmt.Sprintf("%s%s", markerStart, mask) + fmt.Fprint(writer, pathEl1.Render()) - pathEl2 := d2themes.NewThemableElement("path") - pathEl2.D = path2 - pathEl2.Fill = color.None - pathEl2.Stroke = connection.Stroke - pathEl2.ClassName = fmt.Sprintf("connection%s", animatedClass) - pathEl2.Style = connection.CSSStyle() - pathEl2.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) - fmt.Fprint(writer, pathEl2.Render()) + pathEl2 := d2themes.NewThemableElement("path") + pathEl2.D = path2 + pathEl2.Fill = color.None + pathEl2.Stroke = connection.Stroke + pathEl2.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl2.Style = connection.CSSStyle() + pathEl2.Attributes = fmt.Sprintf("%s%s", markerEnd, mask) + fmt.Fprint(writer, pathEl2.Render()) + } } if connection.Label != "" { diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg index 8bf7169d7..5c7dc4c21 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg @@ -95,7 +95,7 @@ .d2-4137793201 .color-AA4{color:#EDF0FD;} .d2-4137793201 .color-AA5{color:#F7F8FE;} .d2-4137793201 .color-AB4{color:#EDF0FD;} - .d2-4137793201 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdefg + .d2-4137793201 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdefg diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg index eb9196aad..2beadaab6 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg @@ -95,7 +95,7 @@ .d2-2098060027 .color-AA4{color:#EDF0FD;} .d2-2098060027 .color-AA5{color:#F7F8FE;} .d2-2098060027 .color-AB4{color:#EDF0FD;} - .d2-2098060027 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdefg + .d2-2098060027 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdefg From a487f954c6d0f9ec4e871f538ecf157d59a1cbfd Mon Sep 17 00:00:00 2001 From: Daniel Suh Date: Tue, 14 May 2024 16:40:20 -0400 Subject: [PATCH 072/109] final commit before refactoring --- d2renderers/d2svg/d2svg.go | 1 + 1 file changed, 1 insertion(+) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 9dc4b7acd..ef2e7bd1a 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -496,6 +496,7 @@ func makeLabelMask(labelTL *geo.Point, width, height int, opacity float64) strin } func splitBezierCurve(p1, p2, p3, p4 *geo.Point, t0, t1 float64) (geo.Point, geo.Point, geo.Point, geo.Point) { + // Given control points p1, p2, p3, p4, calculate the bezier segment from t0 -> t1 where {0 <= t0 < t1 <= 1} u0, u1 := 1 - t0, 1 - t1 q1 := geo.Point { From 5b9e5ac9c1f525a5417b06563387320f286b4b81 Mon Sep 17 00:00:00 2001 From: Daniel Suh Date: Tue, 14 May 2024 16:43:49 -0400 Subject: [PATCH 073/109] removed prints --- d2renderers/d2svg/d2svg.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index ef2e7bd1a..614c9ed9c 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -562,7 +562,6 @@ func splitPath(path string, percentage float64) (string, string) { prevPosition = geo.Point{X: x, Y: y}; i += increment; } - fmt.Println(pathLength); i := 0 @@ -680,9 +679,6 @@ func splitPath(path string, percentage float64) (string, string) { i += increment } - - fmt.Println(path1); - fmt.Println(path2); return path1, path2 } From 8a38e0d9e91866e2d666b2939ab1476df6903eee Mon Sep 17 00:00:00 2001 From: Daniel Suh Date: Tue, 14 May 2024 17:08:25 -0400 Subject: [PATCH 074/109] format --- d2renderers/d2svg/d2svg.go | 252 +++++++++++++++++++------------------ 1 file changed, 133 insertions(+), 119 deletions(-) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 614c9ed9c..598da23af 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -497,189 +497,203 @@ func makeLabelMask(labelTL *geo.Point, width, height int, opacity float64) strin func splitBezierCurve(p1, p2, p3, p4 *geo.Point, t0, t1 float64) (geo.Point, geo.Point, geo.Point, geo.Point) { // Given control points p1, p2, p3, p4, calculate the bezier segment from t0 -> t1 where {0 <= t0 < t1 <= 1} - u0, u1 := 1 - t0, 1 - t1 - - q1 := geo.Point { - X: (u0 * u0 * u0) * p1.X + (3 * t0 * u0 * u0) * p2.X + (3 * t0 * t0 * u0) * p3.X + t0 * t0 * t0 * p4.X, - Y: (u0 * u0 * u0) * p1.Y + (3 * t0 * u0 * u0) * p2.Y + (3 * t0 * t0 * u0) * p3.Y + t0 * t0 * t0 * p4.Y, + u0, u1 := 1-t0, 1-t1 + + q1 := geo.Point{ + X: (u0*u0*u0)*p1.X + (3*t0*u0*u0)*p2.X + (3*t0*t0*u0)*p3.X + t0*t0*t0*p4.X, + Y: (u0*u0*u0)*p1.Y + (3*t0*u0*u0)*p2.Y + (3*t0*t0*u0)*p3.Y + t0*t0*t0*p4.Y, } - q2 := geo.Point { - X: (u0 * u0 * u1) * p1.X + (2 * t0 * u0 * u1 + u0 * u0 * t1) * p2.X + (t0 * t0 * u1 + 2 * u0 * t0 * t1) * p3.X + t0 * t0 * t1 * p4.X, - Y: (u0 * u0 * u1) * p1.Y + (2 * t0 * u0 * u1 + u0 * u0 * t1) * p2.Y + (t0 * t0 * u1 + 2 * u0 * t0 * t1) * p3.Y + t0 * t0 * t1 * p4.Y, + q2 := geo.Point{ + X: (u0*u0*u1)*p1.X + (2*t0*u0*u1+u0*u0*t1)*p2.X + (t0*t0*u1+2*u0*t0*t1)*p3.X + t0*t0*t1*p4.X, + Y: (u0*u0*u1)*p1.Y + (2*t0*u0*u1+u0*u0*t1)*p2.Y + (t0*t0*u1+2*u0*t0*t1)*p3.Y + t0*t0*t1*p4.Y, } q3 := geo.Point{ - X: (u0 * u1 * u1) * p1.X + (t0 * u1 * u1 + 2 * u0 * t1 * u1) * p2.X + (2 * t0 * t1 * u1 + u0 * t1 * t1) * p3.X + t0 * t1 * t1 * p4.X, - Y: (u0 * u1 * u1) * p1.Y + (t0 * u1 * u1 + 2 * u0 * t1 * u1) * p2.Y + (2 * t0 * t1 * u1 + u0 * t1 * t1) * p3.Y + t0 * t1 * t1 * p4.Y, + X: (u0*u1*u1)*p1.X + (t0*u1*u1+2*u0*t1*u1)*p2.X + (2*t0*t1*u1+u0*t1*t1)*p3.X + t0*t1*t1*p4.X, + Y: (u0*u1*u1)*p1.Y + (t0*u1*u1+2*u0*t1*u1)*p2.Y + (2*t0*t1*u1+u0*t1*t1)*p3.Y + t0*t1*t1*p4.Y, } q4 := geo.Point{ - X: (u1 * u1 * u1) * p1.X + (3 * t1 * u1 * u1) * p2.X + (3 * t1 * t1 * u1) * p3.X + t1 * t1 * t1 * p4.X, - Y: (u1 * u1 * u1) * p1.Y + (3 * t1 * u1 * u1) * p2.Y + (3 * t1 * t1 * u1) * p3.Y + t1 * t1 * t1 * p4.Y, + X: (u1*u1*u1)*p1.X + (3*t1*u1*u1)*p2.X + (3*t1*t1*u1)*p3.X + t1*t1*t1*p4.X, + Y: (u1*u1*u1)*p1.Y + (3*t1*u1*u1)*p2.Y + (3*t1*t1*u1)*p3.Y + t1*t1*t1*p4.Y, } return q1, q2, q3, q4 } +func addToPath(path *string, pathType *string, i int, pathData []string) int { + var increment int + + switch *pathType { + case "M": + *path += fmt.Sprintf("M %s %s ", pathData[i+1], pathData[i+2]) + increment = 3 + case "L": + *path += fmt.Sprintf("L %s %s ", pathData[i+1], pathData[i+2]) + increment = 3 + case "C": + *path += fmt.Sprintf("C %s %s %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4], pathData[i+5], pathData[i+6]) + increment = 7 + case "S": + *path += fmt.Sprintf("S %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4]) + increment = 5 + default: + panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) + } + + return increment +} + +func pathLength(pathData []string) float64 { + var x, y, pathLength float64 + var increment int + var prevPosition geo.Point + + for i := 0; i < len(pathData); { + switch pathData[i] { + case "M": + x, _ = strconv.ParseFloat(pathData[i+1], 64) + y, _ = strconv.ParseFloat(pathData[i+2], 64) + + increment = 3 + case "L": + x, _ = strconv.ParseFloat(pathData[i+1], 64) + y, _ = strconv.ParseFloat(pathData[i+2], 64) + + pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + + increment = 3 + case "C": + x, _ = strconv.ParseFloat(pathData[i+5], 64) + y, _ = strconv.ParseFloat(pathData[i+6], 64) + + pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + + increment = 7 + case "S": + x, _ = strconv.ParseFloat(pathData[i+3], 64) + y, _ = strconv.ParseFloat(pathData[i+4], 64) + + pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + + increment = 5 + default: + panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) + } + + prevPosition = geo.Point{X: x, Y: y} + i += increment + } + + return pathLength +} + func splitPath(path string, percentage float64) (string, string) { - var sumPathLens, curPathLen, x, y, pathLength float64 + var sumPathLens, curPathLen, x, y float64 var prevPosition geo.Point var path1, path2 string var increment int pathData := strings.Split(path, " ") - - for i := 0; i < len(pathData); { - switch pathData[i] { - case "M": - x, _ = strconv.ParseFloat(pathData[i + 1], 64) - y, _ = strconv.ParseFloat(pathData[i + 2], 64) - - increment = 3 - case "L": - x, _ = strconv.ParseFloat(pathData[i + 1], 64) - y, _ = strconv.ParseFloat(pathData[i + 2], 64) - - pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - - increment = 3 - case "C": - x, _ = strconv.ParseFloat(pathData[i + 5], 64) - y, _ = strconv.ParseFloat(pathData[i + 6], 64) - - pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + pathLen := pathLength(pathData) - increment = 7 - case "S": - x, _ = strconv.ParseFloat(pathData[i + 3], 64) - y, _ = strconv.ParseFloat(pathData[i + 4], 64) - - pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - - increment = 5 - default: - panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) - } - - prevPosition = geo.Point{X: x, Y: y}; - i += increment; - } - i := 0 - - for ; i < len(pathData); { + + for i < len(pathData) { switch pathData[i] { case "M": - x, _ = strconv.ParseFloat(pathData[i + 1], 64) - y, _ = strconv.ParseFloat(pathData[i + 2], 64) + x, _ = strconv.ParseFloat(pathData[i+1], 64) + y, _ = strconv.ParseFloat(pathData[i+2], 64) - if sumPathLens + curPathLen < pathLength * percentage { - path1 += fmt.Sprintf("M %s %s ", pathData[i + 1], pathData[i + 2]) + if sumPathLens+curPathLen < pathLen*percentage { + path1 += fmt.Sprintf("M %s %s ", pathData[i+1], pathData[i+2]) } - + increment = 3 case "L": - x, _ = strconv.ParseFloat(pathData[i + 1], 64) - y, _ = strconv.ParseFloat(pathData[i + 2], 64) - + x, _ = strconv.ParseFloat(pathData[i+1], 64) + y, _ = strconv.ParseFloat(pathData[i+2], 64) + curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - if sumPathLens + curPathLen < pathLength * percentage { - path1 += fmt.Sprintf("L %s %s ", pathData[i + 1], pathData[i + 2]) + if sumPathLens+curPathLen < pathLen*percentage { + path1 += fmt.Sprintf("L %s %s ", pathData[i+1], pathData[i+2]) } - + increment = 3 case "C": - x, _ = strconv.ParseFloat(pathData[i + 5], 64) - y, _ = strconv.ParseFloat(pathData[i + 6], 64) + x, _ = strconv.ParseFloat(pathData[i+5], 64) + y, _ = strconv.ParseFloat(pathData[i+6], 64) curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - - if sumPathLens + curPathLen < pathLength * percentage { - path1 += fmt.Sprintf("C %s %s %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4], pathData[i + 5], pathData[i + 6]); + + if sumPathLens+curPathLen < pathLen*percentage { + path1 += fmt.Sprintf("C %s %s %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4], pathData[i+5], pathData[i+6]) } increment = 7 case "S": - x, _ = strconv.ParseFloat(pathData[i + 3], 64) - y, _ = strconv.ParseFloat(pathData[i + 4], 64) - + x, _ = strconv.ParseFloat(pathData[i+3], 64) + y, _ = strconv.ParseFloat(pathData[i+4], 64) + curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - - if sumPathLens + curPathLen < pathLength * percentage { - path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4]) + + if sumPathLens+curPathLen < pathLen*percentage { + path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4]) } - + increment = 5 default: panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) } - + sumPathLens += curPathLen - if sumPathLens >= pathLength * percentage { - t := (pathLength * percentage - sumPathLens + curPathLen) / curPathLen - fmt.Println(t) + if sumPathLens >= pathLen*percentage { + t := (pathLen*percentage - sumPathLens + curPathLen) / curPathLen - switch(pathData[i]) { + switch pathData[i] { case "L": - path1 += fmt.Sprintf("L %f %f ", (x - prevPosition.X) * t + prevPosition.X, (y - prevPosition.Y) * t + prevPosition.Y) - path2 += fmt.Sprintf("M %f %f L %f %f ", (x - prevPosition.X) * t + prevPosition.X, (y - prevPosition.Y) * t + prevPosition.Y, x, y) + path1 += fmt.Sprintf("L %f %f ", (x-prevPosition.X)*t+prevPosition.X, (y-prevPosition.Y)*t+prevPosition.Y) + path2 += fmt.Sprintf("M %f %f L %f %f ", (x-prevPosition.X)*t+prevPosition.X, (y-prevPosition.Y)*t+prevPosition.Y, x, y) case "C": - h1x, _ := strconv.ParseFloat(pathData[i + 1], 64) - h1y, _ := strconv.ParseFloat(pathData[i + 2], 64) - h2x, _ := strconv.ParseFloat(pathData[i + 3], 64) - h2y, _ := strconv.ParseFloat(pathData[i + 4], 64) - p1x, _ := strconv.ParseFloat(pathData[i + 5], 64) - p1y, _ := strconv.ParseFloat(pathData[i + 6], 64) + h1x, _ := strconv.ParseFloat(pathData[i+1], 64) + h1y, _ := strconv.ParseFloat(pathData[i+2], 64) + h2x, _ := strconv.ParseFloat(pathData[i+3], 64) + h2y, _ := strconv.ParseFloat(pathData[i+4], 64) heading1 := geo.Point{X: h1x, Y: h1y} heading2 := geo.Point{X: h2x, Y: h2y} - nextPoint := geo.Point{X: p1x, Y: p1y} - + nextPoint := geo.Point{X: x, Y: y} + q1, q2, q3, q4 := splitBezierCurve(&prevPosition, &heading1, &heading2, &nextPoint, 0, 0.5) - - path1 += fmt.Sprintf("C %f %f %f %f %f %f ", q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y); - + path1 += fmt.Sprintf("C %f %f %f %f %f %f ", q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y) + q1, q2, q3, q4 = splitBezierCurve(&prevPosition, &heading1, &heading2, &nextPoint, 0.5, 1) - - path2 += fmt.Sprintf("M %f %f C %f %f %f %f %f %f ", q1.X, q1.Y, q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y); - + path2 += fmt.Sprintf("M %f %f C %f %f %f %f %f %f ", q1.X, q1.Y, q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y) + case "S": - path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4]) - path2 += fmt.Sprintf("M %s %s ", pathData[i + 3], pathData[i + 4]) + // Skip S curves because they are shorter and we can split along the connection to the next path instead + path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4]) + path2 += fmt.Sprintf("M %s %s ", pathData[i+3], pathData[i+4]) default: panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) } - + i += increment prevPosition = geo.Point{X: x, Y: y} break - } + } i += increment prevPosition = geo.Point{X: x, Y: y} } - for ; i < len(pathData); { - switch pathData[i] { - case "M": - path2 += fmt.Sprintf("M %s %s ", pathData[i + 1], pathData[i + 2]) - increment = 3 - case "L": - path2 += fmt.Sprintf("L %s %s ", pathData[i + 1], pathData[i + 2]) - increment = 3 - case "C": - path2 += fmt.Sprintf("C %s %s %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4], pathData[i + 5], pathData[i + 6]); - increment = 7 - case "S": - path2 += fmt.Sprintf("S %s %s %s %s ", pathData[i + 1], pathData[i + 2], pathData[i + 3], pathData[i + 4]) - increment = 5 - default: - panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) - } + for i < len(pathData) { + pathType := pathData[i] + increment := addToPath(&path2, &pathType, i, pathData) i += increment } - + return path1, path2 } @@ -738,7 +752,7 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co srcAdj, dstAdj := getArrowheadAdjustments(connection, idToShape) path := pathData(connection, srcAdj, dstAdj) mask := fmt.Sprintf(`mask="url(#%s)"`, labelMaskID) - + if sketchRunner != nil { out, err := d2sketch.Connection(sketchRunner, connection, path, mask) if err != nil { @@ -769,7 +783,7 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co pathEl.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) fmt.Fprint(writer, pathEl.Render()) } else { - path1, path2 := splitPath(path, 0.5); + path1, path2 := splitPath(path, 0.5) pathEl1 := d2themes.NewThemableElement("path") pathEl1.D = path1 From 49df5b81c07bfa57d824b471eaa493ec18b2252a Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Tue, 14 May 2024 18:21:44 -0400 Subject: [PATCH 075/109] shorten code --- d2renderers/d2svg/d2svg.go | 56 ++++++++++++-------------------------- 1 file changed, 18 insertions(+), 38 deletions(-) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 598da23af..594569ddc 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -495,7 +495,7 @@ func makeLabelMask(labelTL *geo.Point, width, height int, opacity float64) strin ) } -func splitBezierCurve(p1, p2, p3, p4 *geo.Point, t0, t1 float64) (geo.Point, geo.Point, geo.Point, geo.Point) { +func bezierCurveSegment(p1, p2, p3, p4 *geo.Point, t0, t1 float64) (geo.Point, geo.Point, geo.Point, geo.Point) { // Given control points p1, p2, p3, p4, calculate the bezier segment from t0 -> t1 where {0 <= t0 < t1 <= 1} u0, u1 := 1-t0, 1-t1 @@ -591,6 +591,7 @@ func splitPath(path string, percentage float64) (string, string) { var prevPosition geo.Point var path1, path2 string var increment int + var pastHalf bool = false pathData := strings.Split(path, " ") pathLen := pathLength(pathData) @@ -598,62 +599,47 @@ func splitPath(path string, percentage float64) (string, string) { i := 0 for i < len(pathData) { + switch pathData[i] { case "M": x, _ = strconv.ParseFloat(pathData[i+1], 64) y, _ = strconv.ParseFloat(pathData[i+2], 64) - - if sumPathLens+curPathLen < pathLen*percentage { - path1 += fmt.Sprintf("M %s %s ", pathData[i+1], pathData[i+2]) - } - - increment = 3 case "L": x, _ = strconv.ParseFloat(pathData[i+1], 64) y, _ = strconv.ParseFloat(pathData[i+2], 64) curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - - if sumPathLens+curPathLen < pathLen*percentage { - path1 += fmt.Sprintf("L %s %s ", pathData[i+1], pathData[i+2]) - } - - increment = 3 case "C": x, _ = strconv.ParseFloat(pathData[i+5], 64) y, _ = strconv.ParseFloat(pathData[i+6], 64) curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - - if sumPathLens+curPathLen < pathLen*percentage { - path1 += fmt.Sprintf("C %s %s %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4], pathData[i+5], pathData[i+6]) - } - - increment = 7 case "S": x, _ = strconv.ParseFloat(pathData[i+3], 64) y, _ = strconv.ParseFloat(pathData[i+4], 64) curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - - if sumPathLens+curPathLen < pathLen*percentage { - path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4]) - } - - increment = 5 default: panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) } + if pastHalf { + increment = addToPath(&path2, &pathData[i], i, pathData) + } else if sumPathLens+curPathLen < pathLen*percentage { + increment = addToPath(&path1, &pathData[i], i, pathData) + } + sumPathLens += curPathLen - if sumPathLens >= pathLen*percentage { + if !pastHalf && sumPathLens >= pathLen*percentage { t := (pathLen*percentage - sumPathLens + curPathLen) / curPathLen switch pathData[i] { case "L": path1 += fmt.Sprintf("L %f %f ", (x-prevPosition.X)*t+prevPosition.X, (y-prevPosition.Y)*t+prevPosition.Y) path2 += fmt.Sprintf("M %f %f L %f %f ", (x-prevPosition.X)*t+prevPosition.X, (y-prevPosition.Y)*t+prevPosition.Y, x, y) + + increment = 3 case "C": h1x, _ := strconv.ParseFloat(pathData[i+1], 64) h1y, _ := strconv.ParseFloat(pathData[i+2], 64) @@ -664,36 +650,30 @@ func splitPath(path string, percentage float64) (string, string) { heading2 := geo.Point{X: h2x, Y: h2y} nextPoint := geo.Point{X: x, Y: y} - q1, q2, q3, q4 := splitBezierCurve(&prevPosition, &heading1, &heading2, &nextPoint, 0, 0.5) + q1, q2, q3, q4 := bezierCurveSegment(&prevPosition, &heading1, &heading2, &nextPoint, 0, 0.5) path1 += fmt.Sprintf("C %f %f %f %f %f %f ", q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y) - q1, q2, q3, q4 = splitBezierCurve(&prevPosition, &heading1, &heading2, &nextPoint, 0.5, 1) + q1, q2, q3, q4 = bezierCurveSegment(&prevPosition, &heading1, &heading2, &nextPoint, 0.5, 1) path2 += fmt.Sprintf("M %f %f C %f %f %f %f %f %f ", q1.X, q1.Y, q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y) + increment = 7 case "S": // Skip S curves because they are shorter and we can split along the connection to the next path instead path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4]) path2 += fmt.Sprintf("M %s %s ", pathData[i+3], pathData[i+4]) + + increment = 5 default: panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) } - i += increment - prevPosition = geo.Point{X: x, Y: y} - break + pastHalf = true } i += increment prevPosition = geo.Point{X: x, Y: y} } - for i < len(pathData) { - pathType := pathData[i] - increment := addToPath(&path2, &pathType, i, pathData) - - i += increment - } - return path1, path2 } From 97975425e19d6839b5237e917b18c11ee6b4bd10 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Tue, 14 May 2024 18:44:43 -0400 Subject: [PATCH 076/109] final changes --- d2renderers/d2svg/d2svg.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 594569ddc..9b2484433 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -495,8 +495,8 @@ func makeLabelMask(labelTL *geo.Point, width, height int, opacity float64) strin ) } +// Given control points p1, p2, p3, p4, calculate the segment of this bezier curve from t0 -> t1 where {0 <= t0 < t1 <= 1} func bezierCurveSegment(p1, p2, p3, p4 *geo.Point, t0, t1 float64) (geo.Point, geo.Point, geo.Point, geo.Point) { - // Given control points p1, p2, p3, p4, calculate the bezier segment from t0 -> t1 where {0 <= t0 < t1 <= 1} u0, u1 := 1-t0, 1-t1 q1 := geo.Point{ @@ -519,29 +519,31 @@ func bezierCurveSegment(p1, p2, p3, p4 *geo.Point, t0, t1 float64) (geo.Point, g return q1, q2, q3, q4 } -func addToPath(path *string, pathType *string, i int, pathData []string) int { +// Adds a certain line/curve to an existing SVG path string. offsetIdx and pathData provides the points needed +func addToPath(path *string, pathType *string, offsetIdx int, pathData []string) int { var increment int switch *pathType { case "M": - *path += fmt.Sprintf("M %s %s ", pathData[i+1], pathData[i+2]) + *path += fmt.Sprintf("M %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]) increment = 3 case "L": - *path += fmt.Sprintf("L %s %s ", pathData[i+1], pathData[i+2]) + *path += fmt.Sprintf("L %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]) increment = 3 case "C": - *path += fmt.Sprintf("C %s %s %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4], pathData[i+5], pathData[i+6]) + *path += fmt.Sprintf("C %s %s %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4], pathData[offsetIdx+5], pathData[offsetIdx+6]) increment = 7 case "S": - *path += fmt.Sprintf("S %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4]) + *path += fmt.Sprintf("S %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4]) increment = 5 default: - panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) + panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[offsetIdx])) } return increment } +// This function finds the length of a path in SVG notation func pathLength(pathData []string) float64 { var x, y, pathLength float64 var increment int @@ -586,13 +588,14 @@ func pathLength(pathData []string) float64 { return pathLength } +// Splits a SVG path into two SVG paths, with the first path being ~{percentage}% of the path func splitPath(path string, percentage float64) (string, string) { var sumPathLens, curPathLen, x, y float64 var prevPosition geo.Point var path1, path2 string var increment int - var pastHalf bool = false + pastHalf := false pathData := strings.Split(path, " ") pathLen := pathLength(pathData) From 4abe7fb71cb8173abbe3f75e56476efa376f564a Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Tue, 14 May 2024 19:50:32 -0400 Subject: [PATCH 077/109] passes tests Signed-off-by: Daniel Suh <23denial@gmail.com> --- e2etests/testdata/stable/animated/dagre/sketch.exp.svg | 2 +- e2etests/testdata/stable/animated/elk/sketch.exp.svg | 2 +- .../stable/sql_table_tooltip_animated/dagre/sketch.exp.svg | 2 +- .../stable/sql_table_tooltip_animated/elk/sketch.exp.svg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e2etests/testdata/stable/animated/dagre/sketch.exp.svg b/e2etests/testdata/stable/animated/dagre/sketch.exp.svg index dc10385f0..94ca46c77 100644 --- a/e2etests/testdata/stable/animated/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/animated/dagre/sketch.exp.svg @@ -102,7 +102,7 @@ .d2-3267239171 .color-AA4{color:#EDF0FD;} .d2-3267239171 .color-AA5{color:#F7F8FE;} .d2-3267239171 .color-AB4{color:#EDF0FD;} - .d2-3267239171 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>your love life will behappyharmoniousboredomimmortalityFridayMondayInsomniaSleepWakeDreamListenTalk hear + .d2-3267239171 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>your love life will behappyharmoniousboredomimmortalityFridayMondayInsomniaSleepWakeDreamListenTalk hear diff --git a/e2etests/testdata/stable/animated/elk/sketch.exp.svg b/e2etests/testdata/stable/animated/elk/sketch.exp.svg index 02e88aef7..bffee0710 100644 --- a/e2etests/testdata/stable/animated/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/animated/elk/sketch.exp.svg @@ -102,7 +102,7 @@ .d2-838869033 .color-AA4{color:#EDF0FD;} .d2-838869033 .color-AA5{color:#F7F8FE;} .d2-838869033 .color-AB4{color:#EDF0FD;} - .d2-838869033 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>your love life will behappyharmoniousboredomimmortalityFridayMondayInsomniaSleepWakeDreamListenTalk hear + .d2-838869033 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>your love life will behappyharmoniousboredomimmortalityFridayMondayInsomniaSleepWakeDreamListenTalk hear diff --git a/e2etests/testdata/stable/sql_table_tooltip_animated/dagre/sketch.exp.svg b/e2etests/testdata/stable/sql_table_tooltip_animated/dagre/sketch.exp.svg index 0cd9b646b..a6b122b6a 100644 --- a/e2etests/testdata/stable/sql_table_tooltip_animated/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/sql_table_tooltip_animated/dagre/sketch.exp.svg @@ -98,7 +98,7 @@ .d2-3096218097 .color-AA4{color:#EDF0FD;} .d2-3096218097 .color-AA5{color:#F7F8FE;} .d2-3096218097 .color-AB4{color:#EDF0FD;} - .d2-3096218097 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>xyPKabFK I like turtles + .d2-3096218097 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>xyPKabFK I like turtles diff --git a/e2etests/testdata/stable/sql_table_tooltip_animated/elk/sketch.exp.svg b/e2etests/testdata/stable/sql_table_tooltip_animated/elk/sketch.exp.svg index 4acd2e6e4..698aafa98 100644 --- a/e2etests/testdata/stable/sql_table_tooltip_animated/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/sql_table_tooltip_animated/elk/sketch.exp.svg @@ -98,7 +98,7 @@ .d2-3579465052 .color-AA4{color:#EDF0FD;} .d2-3579465052 .color-AA5{color:#F7F8FE;} .d2-3579465052 .color-AB4{color:#EDF0FD;} - .d2-3579465052 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>xyPKabFK I like turtles + .d2-3579465052 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>xyPKabFK I like turtles From c2347859a28b22e68759eeb495663344778c9442 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Thu, 16 May 2024 23:14:15 -0400 Subject: [PATCH 078/109] fixed requested changes --- d2renderers/d2svg/d2svg.go | 119 ++++++------- e2etests/testdata/txtar.txt | 1 + .../dagre/board.exp.json | 124 ++++++++++++++ .../dagre/sketch.exp.svg | 157 +++++++++--------- .../elk/board.exp.json | 87 ++++++++++ .../elk/sketch.exp.svg | 157 +++++++++--------- lib/svg/path.go | 25 +++ 7 files changed, 458 insertions(+), 212 deletions(-) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 15253b895..918b6c2bf 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -495,58 +495,49 @@ func makeLabelMask(labelTL *geo.Point, width, height int, opacity float64) strin ) } -// Given control points p1, p2, p3, p4, calculate the segment of this bezier curve from t0 -> t1 where {0 <= t0 < t1 <= 1} -func bezierCurveSegment(p1, p2, p3, p4 *geo.Point, t0, t1 float64) (geo.Point, geo.Point, geo.Point, geo.Point) { - u0, u1 := 1-t0, 1-t1 +// Gets a certain line/curve's SVG path string. offsetIdx and pathData provides the points needed +func getSVGPathString(path *string, pathType *string, offsetIdx int, pathData []string) (string, error) { + var returnPath string - q1 := geo.Point{ - X: (u0*u0*u0)*p1.X + (3*t0*u0*u0)*p2.X + (3*t0*t0*u0)*p3.X + t0*t0*t0*p4.X, - Y: (u0*u0*u0)*p1.Y + (3*t0*u0*u0)*p2.Y + (3*t0*t0*u0)*p3.Y + t0*t0*t0*p4.Y, - } - q2 := geo.Point{ - X: (u0*u0*u1)*p1.X + (2*t0*u0*u1+u0*u0*t1)*p2.X + (t0*t0*u1+2*u0*t0*t1)*p3.X + t0*t0*t1*p4.X, - Y: (u0*u0*u1)*p1.Y + (2*t0*u0*u1+u0*u0*t1)*p2.Y + (t0*t0*u1+2*u0*t0*t1)*p3.Y + t0*t0*t1*p4.Y, - } - q3 := geo.Point{ - X: (u0*u1*u1)*p1.X + (t0*u1*u1+2*u0*t1*u1)*p2.X + (2*t0*t1*u1+u0*t1*t1)*p3.X + t0*t1*t1*p4.X, - Y: (u0*u1*u1)*p1.Y + (t0*u1*u1+2*u0*t1*u1)*p2.Y + (2*t0*t1*u1+u0*t1*t1)*p3.Y + t0*t1*t1*p4.Y, - } - q4 := geo.Point{ - X: (u1*u1*u1)*p1.X + (3*t1*u1*u1)*p2.X + (3*t1*t1*u1)*p3.X + t1*t1*t1*p4.X, - Y: (u1*u1*u1)*p1.Y + (3*t1*u1*u1)*p2.Y + (3*t1*t1*u1)*p3.Y + t1*t1*t1*p4.Y, + switch *pathType { + case "M": + returnPath = fmt.Sprintf("M %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]) + case "L": + returnPath = fmt.Sprintf("L %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]) + case "C": + returnPath = fmt.Sprintf("C %s %s %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4], pathData[offsetIdx+5], pathData[offsetIdx+6]) + case "S": + returnPath = fmt.Sprintf("S %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4]) + default: + return "", fmt.Errorf("unknown svg path command \"%s\"", pathData[offsetIdx]) } - return q1, q2, q3, q4 + return returnPath, nil } -// Adds a certain line/curve to an existing SVG path string. offsetIdx and pathData provides the points needed -func addToPath(path *string, pathType *string, offsetIdx int, pathData []string) int { +// Gets how much to increment by on an SVG string to get to the next path command +func getPathStringIncrement(pathType *string) (int, error) { var increment int switch *pathType { case "M": - *path += fmt.Sprintf("M %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]) increment = 3 case "L": - *path += fmt.Sprintf("L %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]) increment = 3 case "C": - *path += fmt.Sprintf("C %s %s %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4], pathData[offsetIdx+5], pathData[offsetIdx+6]) increment = 7 case "S": - *path += fmt.Sprintf("S %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4]) increment = 5 default: - panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[offsetIdx])) + return 0, fmt.Errorf("unknown svg path command \"%s\"", *pathType) } - return increment + return increment, nil } // This function finds the length of a path in SVG notation -func pathLength(pathData []string) float64 { +func pathLength(pathData []string) (float64, error) { var x, y, pathLength float64 - var increment int var prevPosition geo.Point for i := 0; i < len(pathData); { @@ -554,50 +545,51 @@ func pathLength(pathData []string) float64 { case "M": x, _ = strconv.ParseFloat(pathData[i+1], 64) y, _ = strconv.ParseFloat(pathData[i+2], 64) - - increment = 3 case "L": x, _ = strconv.ParseFloat(pathData[i+1], 64) y, _ = strconv.ParseFloat(pathData[i+2], 64) pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - - increment = 3 case "C": x, _ = strconv.ParseFloat(pathData[i+5], 64) y, _ = strconv.ParseFloat(pathData[i+6], 64) pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - - increment = 7 case "S": x, _ = strconv.ParseFloat(pathData[i+3], 64) y, _ = strconv.ParseFloat(pathData[i+4], 64) pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - - increment = 5 default: - panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) + return 0, fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) } prevPosition = geo.Point{X: x, Y: y} + increment, err := getPathStringIncrement(&pathData[i]) + + if err != nil { + return 0, err + } + i += increment } - return pathLength + return pathLength, nil } // Splits a SVG path into two SVG paths, with the first path being ~{percentage}% of the path -func splitPath(path string, percentage float64) (string, string) { +func splitPath(path string, percentage float64) (string, string, error) { var sumPathLens, curPathLen, x, y float64 var prevPosition geo.Point var path1, path2 string - var increment int pastHalf := false pathData := strings.Split(path, " ") - pathLen := pathLength(pathData) + pathLen, err := pathLength(pathData) + + if err != nil { + return "", "", err + } i := 0 @@ -623,13 +615,24 @@ func splitPath(path string, percentage float64) (string, string) { curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) default: - panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) + return "", "", fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) } if pastHalf { - increment = addToPath(&path2, &pathData[i], i, pathData) + curPath, err := getSVGPathString(&path2, &pathData[i], i, pathData) + path2 += curPath + + if err != nil { + return "", "", err + } + } else if sumPathLens+curPathLen < pathLen*percentage { - increment = addToPath(&path1, &pathData[i], i, pathData) + curPath, err := getSVGPathString(&path2, &pathData[i], i, pathData) + path1 += curPath + + if err != nil { + return "", "", err + } } sumPathLens += curPathLen @@ -641,8 +644,6 @@ func splitPath(path string, percentage float64) (string, string) { case "L": path1 += fmt.Sprintf("L %f %f ", (x-prevPosition.X)*t+prevPosition.X, (y-prevPosition.Y)*t+prevPosition.Y) path2 += fmt.Sprintf("M %f %f L %f %f ", (x-prevPosition.X)*t+prevPosition.X, (y-prevPosition.Y)*t+prevPosition.Y, x, y) - - increment = 3 case "C": h1x, _ := strconv.ParseFloat(pathData[i+1], 64) h1y, _ := strconv.ParseFloat(pathData[i+2], 64) @@ -653,31 +654,33 @@ func splitPath(path string, percentage float64) (string, string) { heading2 := geo.Point{X: h2x, Y: h2y} nextPoint := geo.Point{X: x, Y: y} - q1, q2, q3, q4 := bezierCurveSegment(&prevPosition, &heading1, &heading2, &nextPoint, 0, 0.5) + q1, q2, q3, q4 := svg.BezierCurveSegment(&prevPosition, &heading1, &heading2, &nextPoint, 0, 0.5) path1 += fmt.Sprintf("C %f %f %f %f %f %f ", q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y) - q1, q2, q3, q4 = bezierCurveSegment(&prevPosition, &heading1, &heading2, &nextPoint, 0.5, 1) + q1, q2, q3, q4 = svg.BezierCurveSegment(&prevPosition, &heading1, &heading2, &nextPoint, 0.5, 1) path2 += fmt.Sprintf("M %f %f C %f %f %f %f %f %f ", q1.X, q1.Y, q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y) - - increment = 7 case "S": // Skip S curves because they are shorter and we can split along the connection to the next path instead path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4]) path2 += fmt.Sprintf("M %s %s ", pathData[i+3], pathData[i+4]) - - increment = 5 default: - panic(fmt.Sprintf("unknown svg path command \"%s\"", pathData[i])) + return "", "", fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) } pastHalf = true } + increment, err := getPathStringIncrement(&pathData[i]) + + if err != nil { + return "", "", err + } + i += increment prevPosition = geo.Point{X: x, Y: y} } - return path1, path2 + return path1, path2, nil } func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Connection, markers map[string]struct{}, idToShape map[string]d2target.Shape, sketchRunner *d2sketch.Runner) (labelMask string, _ error) { @@ -766,7 +769,11 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co pathEl.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) fmt.Fprint(writer, pathEl.Render()) } else { - path1, path2 := splitPath(path, 0.5) + path1, path2, err := splitPath(path, 0.5) + + if err != nil { + return "", err + } pathEl1 := d2themes.NewThemableElement("path") pathEl1.D = path1 diff --git a/e2etests/testdata/txtar.txt b/e2etests/testdata/txtar.txt index b5b0bece6..706a29a47 100644 --- a/e2etests/testdata/txtar.txt +++ b/e2etests/testdata/txtar.txt @@ -220,6 +220,7 @@ a <-> c: {style.animated: true} a <-> d: {style.animated: true} a <-> e: {style.animated: true} f <-> g: {style.animated: true} +x -- x: {style.animated: true} -- opacity-zero-route -- grid: { diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json index 1c4c39898..16c3d88b9 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json @@ -289,6 +289,47 @@ "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 566, + "y": 0 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "x", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 } ], "connections": [ @@ -526,6 +567,89 @@ "tooltip": "", "icon": null, "zIndex": 0 + }, + { + "id": "(x -- x)[0]", + "src": "x", + "srcArrow": "none", + "dst": "x", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 619.166015625, + "y": 16 + }, + { + "x": 639.9660034179688, + "y": 3.1989998817443848 + }, + { + "x": 646.5, + "y": 0 + }, + { + "x": 648.5, + "y": 0 + }, + { + "x": 650.5, + "y": 0 + }, + { + "x": 653.166015625, + "y": 6.599999904632568 + }, + { + "x": 655.166015625, + "y": 16.5 + }, + { + "x": 657.166015625, + "y": 26.399999618530273 + }, + { + "x": 657.166015625, + "y": 39.599998474121094 + }, + { + "x": 655.166015625, + "y": 49.5 + }, + { + "x": 653.166015625, + "y": 59.400001525878906 + }, + { + "x": 639.9660034179688, + "y": 62.79999923706055 + }, + { + "x": 619.166015625, + "y": 50 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 } ], "root": { diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg index 5c7dc4c21..030120280 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg @@ -1,16 +1,16 @@ -abcdefg - + .d2-2972989750 .fill-N1{fill:#0A0F25;} + .d2-2972989750 .fill-N2{fill:#676C7E;} + .d2-2972989750 .fill-N3{fill:#9499AB;} + .d2-2972989750 .fill-N4{fill:#CFD2DD;} + .d2-2972989750 .fill-N5{fill:#DEE1EB;} + .d2-2972989750 .fill-N6{fill:#EEF1F8;} + .d2-2972989750 .fill-N7{fill:#FFFFFF;} + .d2-2972989750 .fill-B1{fill:#0D32B2;} + .d2-2972989750 .fill-B2{fill:#0D32B2;} + .d2-2972989750 .fill-B3{fill:#E3E9FD;} + .d2-2972989750 .fill-B4{fill:#E3E9FD;} + .d2-2972989750 .fill-B5{fill:#EDF0FD;} + .d2-2972989750 .fill-B6{fill:#F7F8FE;} + .d2-2972989750 .fill-AA2{fill:#4A6FF3;} + .d2-2972989750 .fill-AA4{fill:#EDF0FD;} + .d2-2972989750 .fill-AA5{fill:#F7F8FE;} + .d2-2972989750 .fill-AB4{fill:#EDF0FD;} + .d2-2972989750 .fill-AB5{fill:#F7F8FE;} + .d2-2972989750 .stroke-N1{stroke:#0A0F25;} + .d2-2972989750 .stroke-N2{stroke:#676C7E;} + .d2-2972989750 .stroke-N3{stroke:#9499AB;} + .d2-2972989750 .stroke-N4{stroke:#CFD2DD;} + .d2-2972989750 .stroke-N5{stroke:#DEE1EB;} + .d2-2972989750 .stroke-N6{stroke:#EEF1F8;} + .d2-2972989750 .stroke-N7{stroke:#FFFFFF;} + .d2-2972989750 .stroke-B1{stroke:#0D32B2;} + .d2-2972989750 .stroke-B2{stroke:#0D32B2;} + .d2-2972989750 .stroke-B3{stroke:#E3E9FD;} + .d2-2972989750 .stroke-B4{stroke:#E3E9FD;} + .d2-2972989750 .stroke-B5{stroke:#EDF0FD;} + .d2-2972989750 .stroke-B6{stroke:#F7F8FE;} + .d2-2972989750 .stroke-AA2{stroke:#4A6FF3;} + .d2-2972989750 .stroke-AA4{stroke:#EDF0FD;} + .d2-2972989750 .stroke-AA5{stroke:#F7F8FE;} + .d2-2972989750 .stroke-AB4{stroke:#EDF0FD;} + .d2-2972989750 .stroke-AB5{stroke:#F7F8FE;} + .d2-2972989750 .background-color-N1{background-color:#0A0F25;} + .d2-2972989750 .background-color-N2{background-color:#676C7E;} + .d2-2972989750 .background-color-N3{background-color:#9499AB;} + .d2-2972989750 .background-color-N4{background-color:#CFD2DD;} + .d2-2972989750 .background-color-N5{background-color:#DEE1EB;} + .d2-2972989750 .background-color-N6{background-color:#EEF1F8;} + .d2-2972989750 .background-color-N7{background-color:#FFFFFF;} + .d2-2972989750 .background-color-B1{background-color:#0D32B2;} + .d2-2972989750 .background-color-B2{background-color:#0D32B2;} + .d2-2972989750 .background-color-B3{background-color:#E3E9FD;} + .d2-2972989750 .background-color-B4{background-color:#E3E9FD;} + .d2-2972989750 .background-color-B5{background-color:#EDF0FD;} + .d2-2972989750 .background-color-B6{background-color:#F7F8FE;} + .d2-2972989750 .background-color-AA2{background-color:#4A6FF3;} + .d2-2972989750 .background-color-AA4{background-color:#EDF0FD;} + .d2-2972989750 .background-color-AA5{background-color:#F7F8FE;} + .d2-2972989750 .background-color-AB4{background-color:#EDF0FD;} + .d2-2972989750 .background-color-AB5{background-color:#F7F8FE;} + .d2-2972989750 .color-N1{color:#0A0F25;} + .d2-2972989750 .color-N2{color:#676C7E;} + .d2-2972989750 .color-N3{color:#9499AB;} + .d2-2972989750 .color-N4{color:#CFD2DD;} + .d2-2972989750 .color-N5{color:#DEE1EB;} + .d2-2972989750 .color-N6{color:#EEF1F8;} + .d2-2972989750 .color-N7{color:#FFFFFF;} + .d2-2972989750 .color-B1{color:#0D32B2;} + .d2-2972989750 .color-B2{color:#0D32B2;} + .d2-2972989750 .color-B3{color:#E3E9FD;} + .d2-2972989750 .color-B4{color:#E3E9FD;} + .d2-2972989750 .color-B5{color:#EDF0FD;} + .d2-2972989750 .color-B6{color:#F7F8FE;} + .d2-2972989750 .color-AA2{color:#4A6FF3;} + .d2-2972989750 .color-AA4{color:#EDF0FD;} + .d2-2972989750 .color-AA5{color:#F7F8FE;} + .d2-2972989750 .color-AB4{color:#EDF0FD;} + .d2-2972989750 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdefgx + @@ -104,4 +104,5 @@ + \ No newline at end of file diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json index e121ae7ac..85d12fc27 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json @@ -289,6 +289,47 @@ "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 427, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "x", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 } ], "connections": [ @@ -513,6 +554,52 @@ "tooltip": "", "icon": null, "zIndex": 0 + }, + { + "id": "(x -- x)[0]", + "src": "x", + "srcArrow": "none", + "dst": "x", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 427.5, + "y": 34 + }, + { + "x": 377.5, + "y": 34 + }, + { + "x": 377.5, + "y": 56 + }, + { + "x": 427.5, + "y": 56 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 } ], "root": { diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg index 2beadaab6..5bdfdd2c5 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg @@ -1,16 +1,16 @@ -abcdefg - + .d2-2574831872 .fill-N1{fill:#0A0F25;} + .d2-2574831872 .fill-N2{fill:#676C7E;} + .d2-2574831872 .fill-N3{fill:#9499AB;} + .d2-2574831872 .fill-N4{fill:#CFD2DD;} + .d2-2574831872 .fill-N5{fill:#DEE1EB;} + .d2-2574831872 .fill-N6{fill:#EEF1F8;} + .d2-2574831872 .fill-N7{fill:#FFFFFF;} + .d2-2574831872 .fill-B1{fill:#0D32B2;} + .d2-2574831872 .fill-B2{fill:#0D32B2;} + .d2-2574831872 .fill-B3{fill:#E3E9FD;} + .d2-2574831872 .fill-B4{fill:#E3E9FD;} + .d2-2574831872 .fill-B5{fill:#EDF0FD;} + .d2-2574831872 .fill-B6{fill:#F7F8FE;} + .d2-2574831872 .fill-AA2{fill:#4A6FF3;} + .d2-2574831872 .fill-AA4{fill:#EDF0FD;} + .d2-2574831872 .fill-AA5{fill:#F7F8FE;} + .d2-2574831872 .fill-AB4{fill:#EDF0FD;} + .d2-2574831872 .fill-AB5{fill:#F7F8FE;} + .d2-2574831872 .stroke-N1{stroke:#0A0F25;} + .d2-2574831872 .stroke-N2{stroke:#676C7E;} + .d2-2574831872 .stroke-N3{stroke:#9499AB;} + .d2-2574831872 .stroke-N4{stroke:#CFD2DD;} + .d2-2574831872 .stroke-N5{stroke:#DEE1EB;} + .d2-2574831872 .stroke-N6{stroke:#EEF1F8;} + .d2-2574831872 .stroke-N7{stroke:#FFFFFF;} + .d2-2574831872 .stroke-B1{stroke:#0D32B2;} + .d2-2574831872 .stroke-B2{stroke:#0D32B2;} + .d2-2574831872 .stroke-B3{stroke:#E3E9FD;} + .d2-2574831872 .stroke-B4{stroke:#E3E9FD;} + .d2-2574831872 .stroke-B5{stroke:#EDF0FD;} + .d2-2574831872 .stroke-B6{stroke:#F7F8FE;} + .d2-2574831872 .stroke-AA2{stroke:#4A6FF3;} + .d2-2574831872 .stroke-AA4{stroke:#EDF0FD;} + .d2-2574831872 .stroke-AA5{stroke:#F7F8FE;} + .d2-2574831872 .stroke-AB4{stroke:#EDF0FD;} + .d2-2574831872 .stroke-AB5{stroke:#F7F8FE;} + .d2-2574831872 .background-color-N1{background-color:#0A0F25;} + .d2-2574831872 .background-color-N2{background-color:#676C7E;} + .d2-2574831872 .background-color-N3{background-color:#9499AB;} + .d2-2574831872 .background-color-N4{background-color:#CFD2DD;} + .d2-2574831872 .background-color-N5{background-color:#DEE1EB;} + .d2-2574831872 .background-color-N6{background-color:#EEF1F8;} + .d2-2574831872 .background-color-N7{background-color:#FFFFFF;} + .d2-2574831872 .background-color-B1{background-color:#0D32B2;} + .d2-2574831872 .background-color-B2{background-color:#0D32B2;} + .d2-2574831872 .background-color-B3{background-color:#E3E9FD;} + .d2-2574831872 .background-color-B4{background-color:#E3E9FD;} + .d2-2574831872 .background-color-B5{background-color:#EDF0FD;} + .d2-2574831872 .background-color-B6{background-color:#F7F8FE;} + .d2-2574831872 .background-color-AA2{background-color:#4A6FF3;} + .d2-2574831872 .background-color-AA4{background-color:#EDF0FD;} + .d2-2574831872 .background-color-AA5{background-color:#F7F8FE;} + .d2-2574831872 .background-color-AB4{background-color:#EDF0FD;} + .d2-2574831872 .background-color-AB5{background-color:#F7F8FE;} + .d2-2574831872 .color-N1{color:#0A0F25;} + .d2-2574831872 .color-N2{color:#676C7E;} + .d2-2574831872 .color-N3{color:#9499AB;} + .d2-2574831872 .color-N4{color:#CFD2DD;} + .d2-2574831872 .color-N5{color:#DEE1EB;} + .d2-2574831872 .color-N6{color:#EEF1F8;} + .d2-2574831872 .color-N7{color:#FFFFFF;} + .d2-2574831872 .color-B1{color:#0D32B2;} + .d2-2574831872 .color-B2{color:#0D32B2;} + .d2-2574831872 .color-B3{color:#E3E9FD;} + .d2-2574831872 .color-B4{color:#E3E9FD;} + .d2-2574831872 .color-B5{color:#EDF0FD;} + .d2-2574831872 .color-B6{color:#F7F8FE;} + .d2-2574831872 .color-AA2{color:#4A6FF3;} + .d2-2574831872 .color-AA4{color:#EDF0FD;} + .d2-2574831872 .color-AA5{color:#F7F8FE;} + .d2-2574831872 .color-AB4{color:#EDF0FD;} + .d2-2574831872 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>abcdefgx + @@ -104,4 +104,5 @@ + \ No newline at end of file diff --git a/lib/svg/path.go b/lib/svg/path.go index cc3ac8ef2..eddbb970f 100644 --- a/lib/svg/path.go +++ b/lib/svg/path.go @@ -114,3 +114,28 @@ func GetStrokeDashAttributes(strokeWidth, dashGapSize float64) (float64, float64 scaledGapSize := scale * scaledDashSize return scaledDashSize, scaledGapSize } + +// Given control points p1, p2, p3, p4, calculate the segment of this bezier curve from t0 -> t1 where {0 <= t0 < t1 <= 1}. +// Uses De Casteljau's algorithm, referenced: https://stackoverflow.com/questions/11703283/cubic-bezier-curve-segment/11704152#11704152 +func BezierCurveSegment(p1, p2, p3, p4 *geo.Point, t0, t1 float64) (geo.Point, geo.Point, geo.Point, geo.Point) { + u0, u1 := 1-t0, 1-t1 + + q1 := geo.Point{ + X: (u0*u0*u0)*p1.X + (3*t0*u0*u0)*p2.X + (3*t0*t0*u0)*p3.X + t0*t0*t0*p4.X, + Y: (u0*u0*u0)*p1.Y + (3*t0*u0*u0)*p2.Y + (3*t0*t0*u0)*p3.Y + t0*t0*t0*p4.Y, + } + q2 := geo.Point{ + X: (u0*u0*u1)*p1.X + (2*t0*u0*u1+u0*u0*t1)*p2.X + (t0*t0*u1+2*u0*t0*t1)*p3.X + t0*t0*t1*p4.X, + Y: (u0*u0*u1)*p1.Y + (2*t0*u0*u1+u0*u0*t1)*p2.Y + (t0*t0*u1+2*u0*t0*t1)*p3.Y + t0*t0*t1*p4.Y, + } + q3 := geo.Point{ + X: (u0*u1*u1)*p1.X + (t0*u1*u1+2*u0*t1*u1)*p2.X + (2*t0*t1*u1+u0*t1*t1)*p3.X + t0*t1*t1*p4.X, + Y: (u0*u1*u1)*p1.Y + (t0*u1*u1+2*u0*t1*u1)*p2.Y + (2*t0*t1*u1+u0*t1*t1)*p3.Y + t0*t1*t1*p4.Y, + } + q4 := geo.Point{ + X: (u1*u1*u1)*p1.X + (3*t1*u1*u1)*p2.X + (3*t1*t1*u1)*p3.X + t1*t1*t1*p4.X, + Y: (u1*u1*u1)*p1.Y + (3*t1*u1*u1)*p2.Y + (3*t1*t1*u1)*p3.Y + t1*t1*t1*p4.Y, + } + + return q1, q2, q3, q4 +} From 99f5596e8d7064bf36f106cfb1a1e4d64396d396 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Thu, 16 May 2024 23:41:50 -0400 Subject: [PATCH 079/109] shortened for loops --- ci/release/changelogs/next.md | 1 + d2renderers/d2svg/d2svg.go | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 10845d9dd..f0d6d64d8 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -3,6 +3,7 @@ #### Improvements 🧹 - Opacity 0 shapes no longer have a label mask which made any segment of connections going through them lower opacity [#1940](https://github.com/terrastruct/d2/pull/1940) +- Bidirectional connections are now animated in opposite directions rather than one direction [#1939](https://github.com/terrastruct/d2/pull/1939) #### Bugfixes ⛑️ diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 918b6c2bf..2a500574b 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -539,8 +539,9 @@ func getPathStringIncrement(pathType *string) (int, error) { func pathLength(pathData []string) (float64, error) { var x, y, pathLength float64 var prevPosition geo.Point + var increment int - for i := 0; i < len(pathData); { + for i := 0; i < len(pathData); i += increment { switch pathData[i] { case "M": x, _ = strconv.ParseFloat(pathData[i+1], 64) @@ -565,13 +566,13 @@ func pathLength(pathData []string) (float64, error) { } prevPosition = geo.Point{X: x, Y: y} - increment, err := getPathStringIncrement(&pathData[i]) + + incr, err := getPathStringIncrement(&pathData[i]) + increment = incr if err != nil { return 0, err } - - i += increment } return pathLength, nil @@ -582,6 +583,7 @@ func splitPath(path string, percentage float64) (string, string, error) { var sumPathLens, curPathLen, x, y float64 var prevPosition geo.Point var path1, path2 string + var increment int pastHalf := false pathData := strings.Split(path, " ") @@ -591,9 +593,7 @@ func splitPath(path string, percentage float64) (string, string, error) { return "", "", err } - i := 0 - - for i < len(pathData) { + for i := 0; i < len(pathData); i += increment { switch pathData[i] { case "M": @@ -670,13 +670,13 @@ func splitPath(path string, percentage float64) (string, string, error) { pastHalf = true } - increment, err := getPathStringIncrement(&pathData[i]) + incr, err := getPathStringIncrement(&pathData[i]) + increment = incr if err != nil { return "", "", err } - i += increment prevPosition = geo.Point{X: x, Y: y} } From c39a22682dead1e7d9ece46eb38edc374cbb7092 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Fri, 17 May 2024 13:36:38 -0400 Subject: [PATCH 080/109] fix sketch circle --- d2renderers/d2sketch/sketch.go | 7 + e2etests/testdata/txtar.txt | 16 ++ .../dagre/board.exp.json | 186 ++++++++++++++++++ .../dagre/sketch.exp.svg | 104 ++++++++++ .../elk/board.exp.json | 177 +++++++++++++++++ .../elk/sketch.exp.svg | 104 ++++++++++ 6 files changed, 594 insertions(+) create mode 100644 e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/board.exp.json create mode 100644 e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/board.exp.json create mode 100644 e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/sketch.exp.svg diff --git a/d2renderers/d2sketch/sketch.go b/d2renderers/d2sketch/sketch.go index 38918c88b..ee984e8f1 100644 --- a/d2renderers/d2sketch/sketch.go +++ b/d2renderers/d2sketch/sketch.go @@ -802,6 +802,13 @@ func ArrowheadJS(r *Runner, arrowhead d2target.Arrowhead, stroke string, strokeW stroke, BG_COLOR, ) + case d2target.CircleArrowhead: + arrowJS = fmt.Sprintf( + `node = rc.circle(-2, 0, 8, { strokeWidth: %d, stroke: "%s", fill: "%s", fillStyle: "solid", fillWeight: 1, seed: 5 })`, + strokeWidth, + stroke, + BG_COLOR, + ) } return } diff --git a/e2etests/testdata/txtar.txt b/e2etests/testdata/txtar.txt index 60366a5a5..6ed66eb79 100644 --- a/e2etests/testdata/txtar.txt +++ b/e2etests/testdata/txtar.txt @@ -213,3 +213,19 @@ ok: { } dog1 -> dog3 } + +-- sketch-mode-circle-arrowhead -- +vars: { + d2-config: { + sketch: true + } +} + +a +b +a <-> b: { + source-arrowhead: { + shape: circle + style.filled: false + } +} diff --git a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/board.exp.json b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/board.exp.json new file mode 100644 index 000000000..4fecabf21 --- /dev/null +++ b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/board.exp.json @@ -0,0 +1,186 @@ +{ + "name": "", + "config": { + "sketch": true, + "themeID": null, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, + "isFolderOnly": false, + "fontFamily": "HandDrawn", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 1, + "y": 0 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 0, + "y": 166 + }, + "width": 55, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 10, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a <-> b)[0]", + "src": "a", + "srcArrow": "circle", + "dst": "b", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 27.5, + "y": 66 + }, + { + "x": 27.5, + "y": 106 + }, + { + "x": 27.5, + "y": 126 + }, + { + "x": 27.5, + "y": 166 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/sketch.exp.svg b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/sketch.exp.svg new file mode 100644 index 000000000..5ea080412 --- /dev/null +++ b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/sketch.exp.svg @@ -0,0 +1,104 @@ + + + + + + + + +ab + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/board.exp.json b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/board.exp.json new file mode 100644 index 000000000..6608f9b0c --- /dev/null +++ b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/board.exp.json @@ -0,0 +1,177 @@ +{ + "name": "", + "config": { + "sketch": true, + "themeID": null, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, + "isFolderOnly": false, + "fontFamily": "HandDrawn", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 12, + "y": 148 + }, + "width": 55, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 10, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a <-> b)[0]", + "src": "a", + "srcArrow": "circle", + "dst": "b", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 39.5, + "y": 78 + }, + { + "x": 39.5, + "y": 148 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/sketch.exp.svg b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/sketch.exp.svg new file mode 100644 index 000000000..6fa094674 --- /dev/null +++ b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/sketch.exp.svg @@ -0,0 +1,104 @@ + + + + + + + + +ab + + + + \ No newline at end of file From cb70b523103fc0bfe8c5eea0f88586bf1dd6c2b8 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Fri, 17 May 2024 13:42:26 -0400 Subject: [PATCH 081/109] added fix into bugfixes next.md --- ci/release/changelogs/next.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index c81cdb0bd..d8ddc3af2 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -6,3 +6,4 @@ - Local relative icons are relative to the d2 file instead of CLI invoke path [#1924](https://github.com/terrastruct/d2/pull/1924) - Custom label positions weren't being read when the width was smaller than the label [#1928](https://github.com/terrastruct/d2/pull/1928) +- Using circle shape for arrowheads no longer removes all arrowheads along path From 1ff3f87020f2a30f341639231479e29eb069ac48 Mon Sep 17 00:00:00 2001 From: Daniel Suh <63919918+23danielsuh@users.noreply.github.com> Date: Fri, 17 May 2024 13:45:42 -0400 Subject: [PATCH 082/109] Update next.md --- ci/release/changelogs/next.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index d8ddc3af2..d87830ad8 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -6,4 +6,4 @@ - Local relative icons are relative to the d2 file instead of CLI invoke path [#1924](https://github.com/terrastruct/d2/pull/1924) - Custom label positions weren't being read when the width was smaller than the label [#1928](https://github.com/terrastruct/d2/pull/1928) -- Using circle shape for arrowheads no longer removes all arrowheads along path +- Using circle shape for arrowheads no longer removes all arrowheads along path [#1942](https://github.com/terrastruct/d2/pull/1942) From f8003a0775376fb543db24f3ccda043b0a92f7ad Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Sat, 18 May 2024 12:52:04 -0400 Subject: [PATCH 083/109] refactor --- d2renderers/d2svg/d2svg.go | 60 +++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 2a500574b..8ad3e6b30 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -496,23 +496,19 @@ func makeLabelMask(labelTL *geo.Point, width, height int, opacity float64) strin } // Gets a certain line/curve's SVG path string. offsetIdx and pathData provides the points needed -func getSVGPathString(path *string, pathType *string, offsetIdx int, pathData []string) (string, error) { - var returnPath string - +func getSVGPathString(pathType *string, offsetIdx int, pathData []string) (string, error) { switch *pathType { case "M": - returnPath = fmt.Sprintf("M %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]) + return fmt.Sprintf("M %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]), nil case "L": - returnPath = fmt.Sprintf("L %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]) + return fmt.Sprintf("L %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]), nil case "C": - returnPath = fmt.Sprintf("C %s %s %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4], pathData[offsetIdx+5], pathData[offsetIdx+6]) + return fmt.Sprintf("C %s %s %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4], pathData[offsetIdx+5], pathData[offsetIdx+6]), nil case "S": - returnPath = fmt.Sprintf("S %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4]) + return fmt.Sprintf("S %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4]), nil default: return "", fmt.Errorf("unknown svg path command \"%s\"", pathData[offsetIdx]) } - - return returnPath, nil } // Gets how much to increment by on an SVG string to get to the next path command @@ -568,17 +564,18 @@ func pathLength(pathData []string) (float64, error) { prevPosition = geo.Point{X: x, Y: y} incr, err := getPathStringIncrement(&pathData[i]) - increment = incr if err != nil { return 0, err } + + increment = incr } return pathLength, nil } -// Splits a SVG path into two SVG paths, with the first path being ~{percentage}% of the path +// Splits an SVG path into two SVG paths, with the first path being ~{percentage}% of the path func splitPath(path string, percentage float64) (string, string, error) { var sumPathLens, curPathLen, x, y float64 var prevPosition geo.Point @@ -618,21 +615,15 @@ func splitPath(path string, percentage float64) (string, string, error) { return "", "", fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) } + curPath, err := getSVGPathString(&pathData[i], i, pathData) + if err != nil { + return "", "", err + } + if pastHalf { - curPath, err := getSVGPathString(&path2, &pathData[i], i, pathData) path2 += curPath - - if err != nil { - return "", "", err - } - } else if sumPathLens+curPathLen < pathLen*percentage { - curPath, err := getSVGPathString(&path2, &pathData[i], i, pathData) path1 += curPath - - if err != nil { - return "", "", err - } } sumPathLens += curPathLen @@ -671,12 +662,12 @@ func splitPath(path string, percentage float64) (string, string, error) { } incr, err := getPathStringIncrement(&pathData[i]) - increment = incr if err != nil { return "", "", err } + increment = incr prevPosition = geo.Point{X: x, Y: y} } @@ -758,17 +749,9 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co animatedClass = " animated-connection" } - // if connection is not animated or is a directed connection - if !connection.Animated || ((connection.DstArrow == d2target.NoArrowhead && connection.SrcArrow != d2target.NoArrowhead) || (connection.DstArrow != d2target.NoArrowhead && connection.SrcArrow == d2target.NoArrowhead)) { - pathEl := d2themes.NewThemableElement("path") - pathEl.D = path - pathEl.Fill = color.None - pathEl.Stroke = connection.Stroke - pathEl.ClassName = fmt.Sprintf("connection%s", animatedClass) - pathEl.Style = connection.CSSStyle() - pathEl.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) - fmt.Fprint(writer, pathEl.Render()) - } else { + // If connection is animated and bidirectional + if connection.Animated && ((connection.DstArrow == d2target.NoArrowhead && connection.SrcArrow == d2target.NoArrowhead) || (connection.DstArrow != d2target.NoArrowhead && connection.SrcArrow != d2target.NoArrowhead)) { + // There is no pure CSS way to animate bidirectional connections in two directions, so we split it up path1, path2, err := splitPath(path, 0.5) if err != nil { @@ -793,6 +776,15 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co pathEl2.Style = connection.CSSStyle() pathEl2.Attributes = fmt.Sprintf("%s%s", markerEnd, mask) fmt.Fprint(writer, pathEl2.Render()) + } else { + pathEl := d2themes.NewThemableElement("path") + pathEl.D = path + pathEl.Fill = color.None + pathEl.Stroke = connection.Stroke + pathEl.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl.Style = connection.CSSStyle() + pathEl.Attributes = fmt.Sprintf("%s%s%s", markerStart, markerEnd, mask) + fmt.Fprint(writer, pathEl.Render()) } } From e978d4772b763164171288ff9089beab43e799aa Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Sat, 18 May 2024 13:59:46 -0400 Subject: [PATCH 084/109] centers circle for sketch --- ci/release/changelogs/next.md | 2 +- d2renderers/d2sketch/sketch.go | 2 +- e2etests/testdata/txtar.txt | 10 + .../dagre/board.exp.json | 217 ++++++++++++++++++ .../dagre/sketch.exp.svg | 161 ++++++------- .../elk/board.exp.json | 199 ++++++++++++++++ .../elk/sketch.exp.svg | 161 ++++++------- 7 files changed, 592 insertions(+), 160 deletions(-) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index c5a0c1d9f..78fb742e6 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -8,4 +8,4 @@ - Local relative icons are relative to the d2 file instead of CLI invoke path [#1924](https://github.com/terrastruct/d2/pull/1924) - Custom label positions weren't being read when the width was smaller than the label [#1928](https://github.com/terrastruct/d2/pull/1928) -- Using circle shape for arrowheads no longer removes all arrowheads along path [#1942](https://github.com/terrastruct/d2/pull/1942) +- Using `shape: circle` for arrowheads no longer removes all arrowheads along path [#1942](https://github.com/terrastruct/d2/pull/1942) diff --git a/d2renderers/d2sketch/sketch.go b/d2renderers/d2sketch/sketch.go index ee984e8f1..3ab9e8c27 100644 --- a/d2renderers/d2sketch/sketch.go +++ b/d2renderers/d2sketch/sketch.go @@ -804,7 +804,7 @@ func ArrowheadJS(r *Runner, arrowhead d2target.Arrowhead, stroke string, strokeW ) case d2target.CircleArrowhead: arrowJS = fmt.Sprintf( - `node = rc.circle(-2, 0, 8, { strokeWidth: %d, stroke: "%s", fill: "%s", fillStyle: "solid", fillWeight: 1, seed: 5 })`, + `node = rc.circle(-2, -1, 8, { strokeWidth: %d, stroke: "%s", fill: "%s", fillStyle: "solid", fillWeight: 1, seed: 5 })`, strokeWidth, stroke, BG_COLOR, diff --git a/e2etests/testdata/txtar.txt b/e2etests/testdata/txtar.txt index 038853de6..882a24a78 100644 --- a/e2etests/testdata/txtar.txt +++ b/e2etests/testdata/txtar.txt @@ -248,3 +248,13 @@ a <-> b: { } } +x +y +z +x <-> y <-> z: { + source-arrowhead: { + shape: circle + style.filled: false + } + direction: right +} diff --git a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/board.exp.json b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/board.exp.json index 4fecabf21..6e64ad35a 100644 --- a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/board.exp.json +++ b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/board.exp.json @@ -92,6 +92,129 @@ "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 115, + "y": 0 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "x", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "y", + "type": "rectangle", + "pos": { + "x": 115, + "y": 166 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "y", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "z", + "type": "rectangle", + "pos": { + "x": 116, + "y": 332 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "z", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 } ], "connections": [ @@ -141,6 +264,100 @@ "tooltip": "", "icon": null, "zIndex": 0 + }, + { + "id": "(x <-> y)[0]", + "src": "x", + "srcArrow": "circle", + "dst": "y", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 142, + "y": 66 + }, + { + "x": 142, + "y": 106 + }, + { + "x": 142, + "y": 126 + }, + { + "x": 142, + "y": 166 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(y <-> z)[0]", + "src": "y", + "srcArrow": "circle", + "dst": "z", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 142, + "y": 232 + }, + { + "x": 142, + "y": 272 + }, + { + "x": 142, + "y": 292 + }, + { + "x": 142, + "y": 332 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 } ], "root": { diff --git a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/sketch.exp.svg b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/sketch.exp.svg index 5ea080412..cc3a74131 100644 --- a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/dagre/sketch.exp.svg @@ -1,10 +1,10 @@ - + .d2-2958031725 .fill-N1{fill:#0A0F25;} + .d2-2958031725 .fill-N2{fill:#676C7E;} + .d2-2958031725 .fill-N3{fill:#9499AB;} + .d2-2958031725 .fill-N4{fill:#CFD2DD;} + .d2-2958031725 .fill-N5{fill:#DEE1EB;} + .d2-2958031725 .fill-N6{fill:#EEF1F8;} + .d2-2958031725 .fill-N7{fill:#FFFFFF;} + .d2-2958031725 .fill-B1{fill:#0D32B2;} + .d2-2958031725 .fill-B2{fill:#0D32B2;} + .d2-2958031725 .fill-B3{fill:#E3E9FD;} + .d2-2958031725 .fill-B4{fill:#E3E9FD;} + .d2-2958031725 .fill-B5{fill:#EDF0FD;} + .d2-2958031725 .fill-B6{fill:#F7F8FE;} + .d2-2958031725 .fill-AA2{fill:#4A6FF3;} + .d2-2958031725 .fill-AA4{fill:#EDF0FD;} + .d2-2958031725 .fill-AA5{fill:#F7F8FE;} + .d2-2958031725 .fill-AB4{fill:#EDF0FD;} + .d2-2958031725 .fill-AB5{fill:#F7F8FE;} + .d2-2958031725 .stroke-N1{stroke:#0A0F25;} + .d2-2958031725 .stroke-N2{stroke:#676C7E;} + .d2-2958031725 .stroke-N3{stroke:#9499AB;} + .d2-2958031725 .stroke-N4{stroke:#CFD2DD;} + .d2-2958031725 .stroke-N5{stroke:#DEE1EB;} + .d2-2958031725 .stroke-N6{stroke:#EEF1F8;} + .d2-2958031725 .stroke-N7{stroke:#FFFFFF;} + .d2-2958031725 .stroke-B1{stroke:#0D32B2;} + .d2-2958031725 .stroke-B2{stroke:#0D32B2;} + .d2-2958031725 .stroke-B3{stroke:#E3E9FD;} + .d2-2958031725 .stroke-B4{stroke:#E3E9FD;} + .d2-2958031725 .stroke-B5{stroke:#EDF0FD;} + .d2-2958031725 .stroke-B6{stroke:#F7F8FE;} + .d2-2958031725 .stroke-AA2{stroke:#4A6FF3;} + .d2-2958031725 .stroke-AA4{stroke:#EDF0FD;} + .d2-2958031725 .stroke-AA5{stroke:#F7F8FE;} + .d2-2958031725 .stroke-AB4{stroke:#EDF0FD;} + .d2-2958031725 .stroke-AB5{stroke:#F7F8FE;} + .d2-2958031725 .background-color-N1{background-color:#0A0F25;} + .d2-2958031725 .background-color-N2{background-color:#676C7E;} + .d2-2958031725 .background-color-N3{background-color:#9499AB;} + .d2-2958031725 .background-color-N4{background-color:#CFD2DD;} + .d2-2958031725 .background-color-N5{background-color:#DEE1EB;} + .d2-2958031725 .background-color-N6{background-color:#EEF1F8;} + .d2-2958031725 .background-color-N7{background-color:#FFFFFF;} + .d2-2958031725 .background-color-B1{background-color:#0D32B2;} + .d2-2958031725 .background-color-B2{background-color:#0D32B2;} + .d2-2958031725 .background-color-B3{background-color:#E3E9FD;} + .d2-2958031725 .background-color-B4{background-color:#E3E9FD;} + .d2-2958031725 .background-color-B5{background-color:#EDF0FD;} + .d2-2958031725 .background-color-B6{background-color:#F7F8FE;} + .d2-2958031725 .background-color-AA2{background-color:#4A6FF3;} + .d2-2958031725 .background-color-AA4{background-color:#EDF0FD;} + .d2-2958031725 .background-color-AA5{background-color:#F7F8FE;} + .d2-2958031725 .background-color-AB4{background-color:#EDF0FD;} + .d2-2958031725 .background-color-AB5{background-color:#F7F8FE;} + .d2-2958031725 .color-N1{color:#0A0F25;} + .d2-2958031725 .color-N2{color:#676C7E;} + .d2-2958031725 .color-N3{color:#9499AB;} + .d2-2958031725 .color-N4{color:#CFD2DD;} + .d2-2958031725 .color-N5{color:#DEE1EB;} + .d2-2958031725 .color-N6{color:#EEF1F8;} + .d2-2958031725 .color-N7{color:#FFFFFF;} + .d2-2958031725 .color-B1{color:#0D32B2;} + .d2-2958031725 .color-B2{color:#0D32B2;} + .d2-2958031725 .color-B3{color:#E3E9FD;} + .d2-2958031725 .color-B4{color:#E3E9FD;} + .d2-2958031725 .color-B5{color:#EDF0FD;} + .d2-2958031725 .color-B6{color:#F7F8FE;} + .d2-2958031725 .color-AA2{color:#4A6FF3;} + .d2-2958031725 .color-AA4{color:#EDF0FD;} + .d2-2958031725 .color-AA5{color:#F7F8FE;} + .d2-2958031725 .color-AB4{color:#EDF0FD;} + .d2-2958031725 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> @@ -97,8 +97,11 @@ -ab - +abxyz + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/board.exp.json b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/board.exp.json index 6608f9b0c..aeccd4631 100644 --- a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/board.exp.json +++ b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/board.exp.json @@ -92,6 +92,129 @@ "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 87, + "y": 12 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "x", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "y", + "type": "rectangle", + "pos": { + "x": 87, + "y": 148 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "y", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "z", + "type": "rectangle", + "pos": { + "x": 87, + "y": 284 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "z", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 } ], "connections": [ @@ -132,6 +255,82 @@ "tooltip": "", "icon": null, "zIndex": 0 + }, + { + "id": "(x <-> y)[0]", + "src": "x", + "srcArrow": "circle", + "dst": "y", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 114, + "y": 78 + }, + { + "x": 114, + "y": 148 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(y <-> z)[0]", + "src": "y", + "srcArrow": "circle", + "dst": "z", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 114, + "y": 214 + }, + { + "x": 114, + "y": 284 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 } ], "root": { diff --git a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/sketch.exp.svg b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/sketch.exp.svg index 6fa094674..ccf71925b 100644 --- a/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/sketch-mode-circle-arrowhead/elk/sketch.exp.svg @@ -1,10 +1,10 @@ - + .d2-2407024038 .fill-N1{fill:#0A0F25;} + .d2-2407024038 .fill-N2{fill:#676C7E;} + .d2-2407024038 .fill-N3{fill:#9499AB;} + .d2-2407024038 .fill-N4{fill:#CFD2DD;} + .d2-2407024038 .fill-N5{fill:#DEE1EB;} + .d2-2407024038 .fill-N6{fill:#EEF1F8;} + .d2-2407024038 .fill-N7{fill:#FFFFFF;} + .d2-2407024038 .fill-B1{fill:#0D32B2;} + .d2-2407024038 .fill-B2{fill:#0D32B2;} + .d2-2407024038 .fill-B3{fill:#E3E9FD;} + .d2-2407024038 .fill-B4{fill:#E3E9FD;} + .d2-2407024038 .fill-B5{fill:#EDF0FD;} + .d2-2407024038 .fill-B6{fill:#F7F8FE;} + .d2-2407024038 .fill-AA2{fill:#4A6FF3;} + .d2-2407024038 .fill-AA4{fill:#EDF0FD;} + .d2-2407024038 .fill-AA5{fill:#F7F8FE;} + .d2-2407024038 .fill-AB4{fill:#EDF0FD;} + .d2-2407024038 .fill-AB5{fill:#F7F8FE;} + .d2-2407024038 .stroke-N1{stroke:#0A0F25;} + .d2-2407024038 .stroke-N2{stroke:#676C7E;} + .d2-2407024038 .stroke-N3{stroke:#9499AB;} + .d2-2407024038 .stroke-N4{stroke:#CFD2DD;} + .d2-2407024038 .stroke-N5{stroke:#DEE1EB;} + .d2-2407024038 .stroke-N6{stroke:#EEF1F8;} + .d2-2407024038 .stroke-N7{stroke:#FFFFFF;} + .d2-2407024038 .stroke-B1{stroke:#0D32B2;} + .d2-2407024038 .stroke-B2{stroke:#0D32B2;} + .d2-2407024038 .stroke-B3{stroke:#E3E9FD;} + .d2-2407024038 .stroke-B4{stroke:#E3E9FD;} + .d2-2407024038 .stroke-B5{stroke:#EDF0FD;} + .d2-2407024038 .stroke-B6{stroke:#F7F8FE;} + .d2-2407024038 .stroke-AA2{stroke:#4A6FF3;} + .d2-2407024038 .stroke-AA4{stroke:#EDF0FD;} + .d2-2407024038 .stroke-AA5{stroke:#F7F8FE;} + .d2-2407024038 .stroke-AB4{stroke:#EDF0FD;} + .d2-2407024038 .stroke-AB5{stroke:#F7F8FE;} + .d2-2407024038 .background-color-N1{background-color:#0A0F25;} + .d2-2407024038 .background-color-N2{background-color:#676C7E;} + .d2-2407024038 .background-color-N3{background-color:#9499AB;} + .d2-2407024038 .background-color-N4{background-color:#CFD2DD;} + .d2-2407024038 .background-color-N5{background-color:#DEE1EB;} + .d2-2407024038 .background-color-N6{background-color:#EEF1F8;} + .d2-2407024038 .background-color-N7{background-color:#FFFFFF;} + .d2-2407024038 .background-color-B1{background-color:#0D32B2;} + .d2-2407024038 .background-color-B2{background-color:#0D32B2;} + .d2-2407024038 .background-color-B3{background-color:#E3E9FD;} + .d2-2407024038 .background-color-B4{background-color:#E3E9FD;} + .d2-2407024038 .background-color-B5{background-color:#EDF0FD;} + .d2-2407024038 .background-color-B6{background-color:#F7F8FE;} + .d2-2407024038 .background-color-AA2{background-color:#4A6FF3;} + .d2-2407024038 .background-color-AA4{background-color:#EDF0FD;} + .d2-2407024038 .background-color-AA5{background-color:#F7F8FE;} + .d2-2407024038 .background-color-AB4{background-color:#EDF0FD;} + .d2-2407024038 .background-color-AB5{background-color:#F7F8FE;} + .d2-2407024038 .color-N1{color:#0A0F25;} + .d2-2407024038 .color-N2{color:#676C7E;} + .d2-2407024038 .color-N3{color:#9499AB;} + .d2-2407024038 .color-N4{color:#CFD2DD;} + .d2-2407024038 .color-N5{color:#DEE1EB;} + .d2-2407024038 .color-N6{color:#EEF1F8;} + .d2-2407024038 .color-N7{color:#FFFFFF;} + .d2-2407024038 .color-B1{color:#0D32B2;} + .d2-2407024038 .color-B2{color:#0D32B2;} + .d2-2407024038 .color-B3{color:#E3E9FD;} + .d2-2407024038 .color-B4{color:#E3E9FD;} + .d2-2407024038 .color-B5{color:#EDF0FD;} + .d2-2407024038 .color-B6{color:#F7F8FE;} + .d2-2407024038 .color-AA2{color:#4A6FF3;} + .d2-2407024038 .color-AA4{color:#EDF0FD;} + .d2-2407024038 .color-AA5{color:#F7F8FE;} + .d2-2407024038 .color-AB4{color:#EDF0FD;} + .d2-2407024038 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> @@ -97,8 +97,11 @@ -ab - +abxyz + + + + \ No newline at end of file From 207272790291238c2fe3be9abd3426a4541c2a29 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Sat, 18 May 2024 20:11:08 -0400 Subject: [PATCH 085/109] add specification in next.md --- ci/release/changelogs/next.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 78fb742e6..0d237aa22 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -8,4 +8,4 @@ - Local relative icons are relative to the d2 file instead of CLI invoke path [#1924](https://github.com/terrastruct/d2/pull/1924) - Custom label positions weren't being read when the width was smaller than the label [#1928](https://github.com/terrastruct/d2/pull/1928) -- Using `shape: circle` for arrowheads no longer removes all arrowheads along path [#1942](https://github.com/terrastruct/d2/pull/1942) +- Using `shape: circle` for arrowheads no longer removes all arrowheads along path in sketch mode [#1942](https://github.com/terrastruct/d2/pull/1942) From a9ee07708c9ed1d6aff79b4c902c4344a1400c6a Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Sat, 18 May 2024 20:27:26 -0400 Subject: [PATCH 086/109] refactor --- d2renderers/d2svg/d2svg.go | 41 ++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 8ad3e6b30..9faf2a361 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -496,8 +496,8 @@ func makeLabelMask(labelTL *geo.Point, width, height int, opacity float64) strin } // Gets a certain line/curve's SVG path string. offsetIdx and pathData provides the points needed -func getSVGPathString(pathType *string, offsetIdx int, pathData []string) (string, error) { - switch *pathType { +func getSVGPathString(pathType string, offsetIdx int, pathData []string) (string, error) { + switch pathType { case "M": return fmt.Sprintf("M %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]), nil case "L": @@ -512,23 +512,19 @@ func getSVGPathString(pathType *string, offsetIdx int, pathData []string) (strin } // Gets how much to increment by on an SVG string to get to the next path command -func getPathStringIncrement(pathType *string) (int, error) { - var increment int - - switch *pathType { +func getPathStringIncrement(pathType string) (int, error) { + switch pathType { case "M": - increment = 3 + return 3, nil case "L": - increment = 3 + return 3, nil case "C": - increment = 7 + return 7, nil case "S": - increment = 5 + return 5, nil default: - return 0, fmt.Errorf("unknown svg path command \"%s\"", *pathType) + return 0, fmt.Errorf("unknown svg path command \"%s\"", pathType) } - - return increment, nil } // This function finds the length of a path in SVG notation @@ -563,7 +559,7 @@ func pathLength(pathData []string) (float64, error) { prevPosition = geo.Point{X: x, Y: y} - incr, err := getPathStringIncrement(&pathData[i]) + incr, err := getPathStringIncrement(pathData[i]) if err != nil { return 0, err @@ -591,7 +587,6 @@ func splitPath(path string, percentage float64) (string, string, error) { } for i := 0; i < len(pathData); i += increment { - switch pathData[i] { case "M": x, _ = strconv.ParseFloat(pathData[i+1], 64) @@ -615,20 +610,18 @@ func splitPath(path string, percentage float64) (string, string, error) { return "", "", fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) } - curPath, err := getSVGPathString(&pathData[i], i, pathData) + curPath, err := getSVGPathString(pathData[i], i, pathData) if err != nil { return "", "", err } - if pastHalf { - path2 += curPath - } else if sumPathLens+curPathLen < pathLen*percentage { - path1 += curPath - } - sumPathLens += curPathLen - if !pastHalf && sumPathLens >= pathLen*percentage { + if pastHalf { // add to path2 + path2 += curPath + } else if sumPathLens < pathLen*percentage { // add to path1 + path1 += curPath + } else { // transition from path1 -> path2 t := (pathLen*percentage - sumPathLens + curPathLen) / curPathLen switch pathData[i] { @@ -661,7 +654,7 @@ func splitPath(path string, percentage float64) (string, string, error) { pastHalf = true } - incr, err := getPathStringIncrement(&pathData[i]) + incr, err := getPathStringIncrement(pathData[i]) if err != nil { return "", "", err From 368fc938d15abb88cd52add9544b40de0ce90da4 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Mon, 20 May 2024 07:39:06 -0400 Subject: [PATCH 087/109] make paths normal --- d2renderers/d2sketch/sketch.go | 71 +++++-- d2renderers/d2svg/d2svg.go | 175 +---------------- e2etests/testdata/txtar.txt | 6 + .../dagre/board.exp.json | 122 ++++++------ .../dagre/sketch.exp.svg | 180 +++++++++--------- .../elk/board.exp.json | 90 +++++---- .../elk/sketch.exp.svg | 180 +++++++++--------- lib/svg/path.go | 179 +++++++++++++++++ 8 files changed, 548 insertions(+), 455 deletions(-) diff --git a/d2renderers/d2sketch/sketch.go b/d2renderers/d2sketch/sketch.go index 3ab9e8c27..8c2ec056e 100644 --- a/d2renderers/d2sketch/sketch.go +++ b/d2renderers/d2sketch/sketch.go @@ -6,6 +6,7 @@ import ( "fmt" "regexp" "strings" + "unicode" _ "embed" @@ -327,23 +328,71 @@ func Connection(r *Runner, connection d2target.Connection, path, attrs string) ( if err != nil { return "", err } - output := "" + + finalPath := "" + + insertSpacesAfterLetters := func(s string) { + output := "" + for i := 0; i < len(s); i++ { + if s[i] != ',' { + output += string(s[i]) + } + if unicode.IsLetter(rune(s[i])) { + output += " " + } + } + fmt.Println("PATH", output) + finalPath += output + } + fmt.Println() + + for i := 0; i < len(paths); i++ { + insertSpacesAfterLetters(paths[i]) + } + animatedClass := "" if connection.Animated { animatedClass = " animated-connection" } - pathEl := d2themes.NewThemableElement("path") - pathEl.Fill = color.None - pathEl.Stroke = connection.Stroke - pathEl.ClassName = fmt.Sprintf("connection%s", animatedClass) - pathEl.Style = connection.CSSStyle() - pathEl.Attributes = attrs - for _, p := range paths { - pathEl.D = p - output += pathEl.Render() + // If connection is animated and bidirectional + if connection.Animated && ((connection.DstArrow == d2target.NoArrowhead && connection.SrcArrow == d2target.NoArrowhead) || (connection.DstArrow != d2target.NoArrowhead && connection.SrcArrow != d2target.NoArrowhead)) { + // There is no pure CSS way to animate bidirectional connections in two directions, so we split it up + path1, path2, err := svg.SplitPath(path, 0.5) + + if err != nil { + return "", err + } + + pathEl1 := d2themes.NewThemableElement("path") + pathEl1.D = path1 + pathEl1.Fill = color.None + pathEl1.Stroke = connection.Stroke + pathEl1.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl1.Style = connection.CSSStyle() + pathEl1.Style += "animation-direction: reverse;" + pathEl1.Attributes = attrs + + pathEl2 := d2themes.NewThemableElement("path") + pathEl2.D = path2 + pathEl2.Fill = color.None + pathEl2.Stroke = connection.Stroke + pathEl2.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl2.Style = connection.CSSStyle() + pathEl2.Attributes = attrs + // return pathEl1.Render(), nil + return pathEl2.Render(), nil + // return pathEl1.Render() + " " + pathEl2.Render(), nil + } else { + pathEl := d2themes.NewThemableElement("path") + pathEl.D = finalPath + pathEl.Fill = color.None + pathEl.Stroke = connection.Stroke + pathEl.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl.Style = connection.CSSStyle() + pathEl.Attributes = attrs + return pathEl.Render(), nil } - return output, nil } // TODO cleanup diff --git a/d2renderers/d2svg/d2svg.go b/d2renderers/d2svg/d2svg.go index 9faf2a361..9360c3eed 100644 --- a/d2renderers/d2svg/d2svg.go +++ b/d2renderers/d2svg/d2svg.go @@ -11,7 +11,6 @@ import ( "html" "io" "sort" - "strconv" "strings" "math" @@ -495,178 +494,6 @@ func makeLabelMask(labelTL *geo.Point, width, height int, opacity float64) strin ) } -// Gets a certain line/curve's SVG path string. offsetIdx and pathData provides the points needed -func getSVGPathString(pathType string, offsetIdx int, pathData []string) (string, error) { - switch pathType { - case "M": - return fmt.Sprintf("M %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]), nil - case "L": - return fmt.Sprintf("L %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]), nil - case "C": - return fmt.Sprintf("C %s %s %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4], pathData[offsetIdx+5], pathData[offsetIdx+6]), nil - case "S": - return fmt.Sprintf("S %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4]), nil - default: - return "", fmt.Errorf("unknown svg path command \"%s\"", pathData[offsetIdx]) - } -} - -// Gets how much to increment by on an SVG string to get to the next path command -func getPathStringIncrement(pathType string) (int, error) { - switch pathType { - case "M": - return 3, nil - case "L": - return 3, nil - case "C": - return 7, nil - case "S": - return 5, nil - default: - return 0, fmt.Errorf("unknown svg path command \"%s\"", pathType) - } -} - -// This function finds the length of a path in SVG notation -func pathLength(pathData []string) (float64, error) { - var x, y, pathLength float64 - var prevPosition geo.Point - var increment int - - for i := 0; i < len(pathData); i += increment { - switch pathData[i] { - case "M": - x, _ = strconv.ParseFloat(pathData[i+1], 64) - y, _ = strconv.ParseFloat(pathData[i+2], 64) - case "L": - x, _ = strconv.ParseFloat(pathData[i+1], 64) - y, _ = strconv.ParseFloat(pathData[i+2], 64) - - pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - case "C": - x, _ = strconv.ParseFloat(pathData[i+5], 64) - y, _ = strconv.ParseFloat(pathData[i+6], 64) - - pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - case "S": - x, _ = strconv.ParseFloat(pathData[i+3], 64) - y, _ = strconv.ParseFloat(pathData[i+4], 64) - - pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - default: - return 0, fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) - } - - prevPosition = geo.Point{X: x, Y: y} - - incr, err := getPathStringIncrement(pathData[i]) - - if err != nil { - return 0, err - } - - increment = incr - } - - return pathLength, nil -} - -// Splits an SVG path into two SVG paths, with the first path being ~{percentage}% of the path -func splitPath(path string, percentage float64) (string, string, error) { - var sumPathLens, curPathLen, x, y float64 - var prevPosition geo.Point - var path1, path2 string - var increment int - - pastHalf := false - pathData := strings.Split(path, " ") - pathLen, err := pathLength(pathData) - - if err != nil { - return "", "", err - } - - for i := 0; i < len(pathData); i += increment { - switch pathData[i] { - case "M": - x, _ = strconv.ParseFloat(pathData[i+1], 64) - y, _ = strconv.ParseFloat(pathData[i+2], 64) - case "L": - x, _ = strconv.ParseFloat(pathData[i+1], 64) - y, _ = strconv.ParseFloat(pathData[i+2], 64) - - curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - case "C": - x, _ = strconv.ParseFloat(pathData[i+5], 64) - y, _ = strconv.ParseFloat(pathData[i+6], 64) - - curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - case "S": - x, _ = strconv.ParseFloat(pathData[i+3], 64) - y, _ = strconv.ParseFloat(pathData[i+4], 64) - - curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) - default: - return "", "", fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) - } - - curPath, err := getSVGPathString(pathData[i], i, pathData) - if err != nil { - return "", "", err - } - - sumPathLens += curPathLen - - if pastHalf { // add to path2 - path2 += curPath - } else if sumPathLens < pathLen*percentage { // add to path1 - path1 += curPath - } else { // transition from path1 -> path2 - t := (pathLen*percentage - sumPathLens + curPathLen) / curPathLen - - switch pathData[i] { - case "L": - path1 += fmt.Sprintf("L %f %f ", (x-prevPosition.X)*t+prevPosition.X, (y-prevPosition.Y)*t+prevPosition.Y) - path2 += fmt.Sprintf("M %f %f L %f %f ", (x-prevPosition.X)*t+prevPosition.X, (y-prevPosition.Y)*t+prevPosition.Y, x, y) - case "C": - h1x, _ := strconv.ParseFloat(pathData[i+1], 64) - h1y, _ := strconv.ParseFloat(pathData[i+2], 64) - h2x, _ := strconv.ParseFloat(pathData[i+3], 64) - h2y, _ := strconv.ParseFloat(pathData[i+4], 64) - - heading1 := geo.Point{X: h1x, Y: h1y} - heading2 := geo.Point{X: h2x, Y: h2y} - nextPoint := geo.Point{X: x, Y: y} - - q1, q2, q3, q4 := svg.BezierCurveSegment(&prevPosition, &heading1, &heading2, &nextPoint, 0, 0.5) - path1 += fmt.Sprintf("C %f %f %f %f %f %f ", q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y) - - q1, q2, q3, q4 = svg.BezierCurveSegment(&prevPosition, &heading1, &heading2, &nextPoint, 0.5, 1) - path2 += fmt.Sprintf("M %f %f C %f %f %f %f %f %f ", q1.X, q1.Y, q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y) - case "S": - // Skip S curves because they are shorter and we can split along the connection to the next path instead - path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4]) - path2 += fmt.Sprintf("M %s %s ", pathData[i+3], pathData[i+4]) - default: - return "", "", fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) - } - - pastHalf = true - } - - incr, err := getPathStringIncrement(pathData[i]) - - if err != nil { - return "", "", err - } - - increment = incr - prevPosition = geo.Point{X: x, Y: y} - } - - return path1, path2, nil -} - func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Connection, markers map[string]struct{}, idToShape map[string]d2target.Shape, sketchRunner *d2sketch.Runner) (labelMask string, _ error) { opacityStyle := "" if connection.Opacity != 1.0 { @@ -745,7 +572,7 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co // If connection is animated and bidirectional if connection.Animated && ((connection.DstArrow == d2target.NoArrowhead && connection.SrcArrow == d2target.NoArrowhead) || (connection.DstArrow != d2target.NoArrowhead && connection.SrcArrow != d2target.NoArrowhead)) { // There is no pure CSS way to animate bidirectional connections in two directions, so we split it up - path1, path2, err := splitPath(path, 0.5) + path1, path2, err := svg.SplitPath(path, 0.5) if err != nil { return "", err diff --git a/e2etests/testdata/txtar.txt b/e2etests/testdata/txtar.txt index 19692fcd8..351eea8a1 100644 --- a/e2etests/testdata/txtar.txt +++ b/e2etests/testdata/txtar.txt @@ -215,6 +215,12 @@ ok: { } -- bidirectional_connection_animation -- +vars: { + d2-config: { + sketch: true + } +} + a <-> b: {style.animated: true} a <-> c: {style.animated: true} a <-> d: {style.animated: true} diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json index 16c3d88b9..09c09cfbe 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json @@ -1,16 +1,24 @@ { "name": "", + "config": { + "sketch": true, + "themeID": null, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, "isFolderOnly": false, - "fontFamily": "SourceSansPro", + "fontFamily": "HandDrawn", "shapes": [ { "id": "a", "type": "rectangle", "pos": { - "x": 170, + "x": 172, "y": 0 }, - "width": 53, + "width": 54, "height": 66, "opacity": 1, "strokeDash": 0, @@ -38,7 +46,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 8, + "labelWidth": 9, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -51,7 +59,7 @@ "x": 0, "y": 166 }, - "width": 53, + "width": 55, "height": 66, "opacity": 1, "strokeDash": 0, @@ -79,7 +87,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 8, + "labelWidth": 10, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -89,10 +97,10 @@ "id": "c", "type": "rectangle", "pos": { - "x": 113, + "x": 115, "y": 166 }, - "width": 53, + "width": 54, "height": 66, "opacity": 1, "strokeDash": 0, @@ -120,7 +128,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 8, + "labelWidth": 9, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -130,10 +138,10 @@ "id": "d", "type": "rectangle", "pos": { - "x": 226, + "x": 229, "y": 166 }, - "width": 54, + "width": 55, "height": 66, "opacity": 1, "strokeDash": 0, @@ -161,7 +169,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 9, + "labelWidth": 10, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -171,7 +179,7 @@ "id": "e", "type": "rectangle", "pos": { - "x": 340, + "x": 344, "y": 166 }, "width": 53, @@ -212,10 +220,10 @@ "id": "f", "type": "rectangle", "pos": { - "x": 455, + "x": 457, "y": 0 }, - "width": 51, + "width": 54, "height": 66, "opacity": 1, "strokeDash": 0, @@ -243,7 +251,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 6, + "labelWidth": 9, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -253,7 +261,7 @@ "id": "g", "type": "rectangle", "pos": { - "x": 453, + "x": 457, "y": 166 }, "width": 54, @@ -294,10 +302,10 @@ "id": "x", "type": "rectangle", "pos": { - "x": 566, + "x": 571, "y": 0 }, - "width": 53, + "width": 54, "height": 66, "opacity": 1, "strokeDash": 0, @@ -325,7 +333,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 8, + "labelWidth": 9, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -358,19 +366,19 @@ "labelPercentage": 0, "route": [ { - "x": 169.75, - "y": 45.957000732421875 + "x": 172.5, + "y": 46 }, { - "x": 55.14899826049805, - "y": 101.99099731445312 + "x": 56.5, + "y": 102 }, { - "x": 26.5, + "x": 27.5, "y": 126 }, { - "x": 26.5, + "x": 27.5, "y": 166 } ], @@ -405,19 +413,19 @@ "labelPercentage": 0, "route": [ { - "x": 173.5, + "x": 176, "y": 66 }, { - "x": 146.3000030517578, + "x": 148.8000030517578, "y": 106 }, { - "x": 139.5, + "x": 142, "y": 126 }, { - "x": 139.5, + "x": 142, "y": 166 } ], @@ -452,19 +460,19 @@ "labelPercentage": 0, "route": [ { - "x": 219, + "x": 222.5, "y": 66 }, { - "x": 246.1999969482422, + "x": 249.6999969482422, "y": 106 }, { - "x": 253, + "x": 256.5, "y": 126 }, { - "x": 253, + "x": 256.5, "y": 166 } ], @@ -499,19 +507,19 @@ "labelPercentage": 0, "route": [ { - "x": 222.5, - "y": 46 + "x": 226.25, + "y": 46.08599853515625 }, { - "x": 337.70001220703125, - "y": 102 + "x": 341.6499938964844, + "y": 102.01699829101562 }, { - "x": 366.5, + "x": 370.5, "y": 126 }, { - "x": 366.5, + "x": 370.5, "y": 166 } ], @@ -546,19 +554,19 @@ "labelPercentage": 0, "route": [ { - "x": 480, + "x": 484, "y": 66 }, { - "x": 480, + "x": 484, "y": 106 }, { - "x": 480, + "x": 484, "y": 126 }, { - "x": 480, + "x": 484, "y": 166 } ], @@ -593,55 +601,55 @@ "labelPercentage": 0, "route": [ { - "x": 619.166015625, + "x": 624.666015625, "y": 16 }, { - "x": 639.9660034179688, + "x": 646.2659912109375, "y": 3.1989998817443848 }, { - "x": 646.5, + "x": 653, "y": 0 }, { - "x": 648.5, + "x": 655, "y": 0 }, { - "x": 650.5, + "x": 657, "y": 0 }, { - "x": 653.166015625, + "x": 659.666015625, "y": 6.599999904632568 }, { - "x": 655.166015625, + "x": 661.666015625, "y": 16.5 }, { - "x": 657.166015625, + "x": 663.666015625, "y": 26.399999618530273 }, { - "x": 657.166015625, + "x": 663.666015625, "y": 39.599998474121094 }, { - "x": 655.166015625, + "x": 661.666015625, "y": 49.5 }, { - "x": 653.166015625, + "x": 659.666015625, "y": 59.400001525878906 }, { - "x": 639.9660034179688, + "x": 646.2659912109375, "y": 62.79999923706055 }, { - "x": 619.166015625, + "x": 624.666015625, "y": 50 } ], diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg index 030120280..02f9b9fa1 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg @@ -1,16 +1,16 @@ -abcdefgx - - - - - - - - - + .d2-3469083568 .fill-N1{fill:#0A0F25;} + .d2-3469083568 .fill-N2{fill:#676C7E;} + .d2-3469083568 .fill-N3{fill:#9499AB;} + .d2-3469083568 .fill-N4{fill:#CFD2DD;} + .d2-3469083568 .fill-N5{fill:#DEE1EB;} + .d2-3469083568 .fill-N6{fill:#EEF1F8;} + .d2-3469083568 .fill-N7{fill:#FFFFFF;} + .d2-3469083568 .fill-B1{fill:#0D32B2;} + .d2-3469083568 .fill-B2{fill:#0D32B2;} + .d2-3469083568 .fill-B3{fill:#E3E9FD;} + .d2-3469083568 .fill-B4{fill:#E3E9FD;} + .d2-3469083568 .fill-B5{fill:#EDF0FD;} + .d2-3469083568 .fill-B6{fill:#F7F8FE;} + .d2-3469083568 .fill-AA2{fill:#4A6FF3;} + .d2-3469083568 .fill-AA4{fill:#EDF0FD;} + .d2-3469083568 .fill-AA5{fill:#F7F8FE;} + .d2-3469083568 .fill-AB4{fill:#EDF0FD;} + .d2-3469083568 .fill-AB5{fill:#F7F8FE;} + .d2-3469083568 .stroke-N1{stroke:#0A0F25;} + .d2-3469083568 .stroke-N2{stroke:#676C7E;} + .d2-3469083568 .stroke-N3{stroke:#9499AB;} + .d2-3469083568 .stroke-N4{stroke:#CFD2DD;} + .d2-3469083568 .stroke-N5{stroke:#DEE1EB;} + .d2-3469083568 .stroke-N6{stroke:#EEF1F8;} + .d2-3469083568 .stroke-N7{stroke:#FFFFFF;} + .d2-3469083568 .stroke-B1{stroke:#0D32B2;} + .d2-3469083568 .stroke-B2{stroke:#0D32B2;} + .d2-3469083568 .stroke-B3{stroke:#E3E9FD;} + .d2-3469083568 .stroke-B4{stroke:#E3E9FD;} + .d2-3469083568 .stroke-B5{stroke:#EDF0FD;} + .d2-3469083568 .stroke-B6{stroke:#F7F8FE;} + .d2-3469083568 .stroke-AA2{stroke:#4A6FF3;} + .d2-3469083568 .stroke-AA4{stroke:#EDF0FD;} + .d2-3469083568 .stroke-AA5{stroke:#F7F8FE;} + .d2-3469083568 .stroke-AB4{stroke:#EDF0FD;} + .d2-3469083568 .stroke-AB5{stroke:#F7F8FE;} + .d2-3469083568 .background-color-N1{background-color:#0A0F25;} + .d2-3469083568 .background-color-N2{background-color:#676C7E;} + .d2-3469083568 .background-color-N3{background-color:#9499AB;} + .d2-3469083568 .background-color-N4{background-color:#CFD2DD;} + .d2-3469083568 .background-color-N5{background-color:#DEE1EB;} + .d2-3469083568 .background-color-N6{background-color:#EEF1F8;} + .d2-3469083568 .background-color-N7{background-color:#FFFFFF;} + .d2-3469083568 .background-color-B1{background-color:#0D32B2;} + .d2-3469083568 .background-color-B2{background-color:#0D32B2;} + .d2-3469083568 .background-color-B3{background-color:#E3E9FD;} + .d2-3469083568 .background-color-B4{background-color:#E3E9FD;} + .d2-3469083568 .background-color-B5{background-color:#EDF0FD;} + .d2-3469083568 .background-color-B6{background-color:#F7F8FE;} + .d2-3469083568 .background-color-AA2{background-color:#4A6FF3;} + .d2-3469083568 .background-color-AA4{background-color:#EDF0FD;} + .d2-3469083568 .background-color-AA5{background-color:#F7F8FE;} + .d2-3469083568 .background-color-AB4{background-color:#EDF0FD;} + .d2-3469083568 .background-color-AB5{background-color:#F7F8FE;} + .d2-3469083568 .color-N1{color:#0A0F25;} + .d2-3469083568 .color-N2{color:#676C7E;} + .d2-3469083568 .color-N3{color:#9499AB;} + .d2-3469083568 .color-N4{color:#CFD2DD;} + .d2-3469083568 .color-N5{color:#DEE1EB;} + .d2-3469083568 .color-N6{color:#EEF1F8;} + .d2-3469083568 .color-N7{color:#FFFFFF;} + .d2-3469083568 .color-B1{color:#0D32B2;} + .d2-3469083568 .color-B2{color:#0D32B2;} + .d2-3469083568 .color-B3{color:#E3E9FD;} + .d2-3469083568 .color-B4{color:#E3E9FD;} + .d2-3469083568 .color-B5{color:#EDF0FD;} + .d2-3469083568 .color-B6{color:#F7F8FE;} + .d2-3469083568 .color-AA2{color:#4A6FF3;} + .d2-3469083568 .color-AA4{color:#EDF0FD;} + .d2-3469083568 .color-AA5{color:#F7F8FE;} + .d2-3469083568 .color-AB4{color:#EDF0FD;} + .d2-3469083568 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> + + + + + + + +abcdefgx + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json index 85d12fc27..9eadf807d 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json @@ -1,13 +1,21 @@ { "name": "", + "config": { + "sketch": true, + "themeID": null, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, "isFolderOnly": false, - "fontFamily": "SourceSansPro", + "fontFamily": "HandDrawn", "shapes": [ { "id": "a", "type": "rectangle", "pos": { - "x": 68, + "x": 71, "y": 12 }, "width": 160, @@ -38,7 +46,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 8, + "labelWidth": 9, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -51,7 +59,7 @@ "x": 12, "y": 208 }, - "width": 53, + "width": 55, "height": 66, "opacity": 1, "strokeDash": 0, @@ -79,7 +87,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 8, + "labelWidth": 10, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -89,10 +97,10 @@ "id": "c", "type": "rectangle", "pos": { - "x": 85, + "x": 87, "y": 208 }, - "width": 53, + "width": 54, "height": 66, "opacity": 1, "strokeDash": 0, @@ -120,7 +128,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 8, + "labelWidth": 9, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -130,10 +138,10 @@ "id": "d", "type": "rectangle", "pos": { - "x": 158, + "x": 161, "y": 208 }, - "width": 54, + "width": 55, "height": 66, "opacity": 1, "strokeDash": 0, @@ -161,7 +169,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 9, + "labelWidth": 10, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -171,7 +179,7 @@ "id": "e", "type": "rectangle", "pos": { - "x": 232, + "x": 236, "y": 208 }, "width": 53, @@ -212,10 +220,10 @@ "id": "f", "type": "rectangle", "pos": { - "x": 306, + "x": 309, "y": 12 }, - "width": 51, + "width": 54, "height": 66, "opacity": 1, "strokeDash": 0, @@ -243,7 +251,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 6, + "labelWidth": 9, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -253,7 +261,7 @@ "id": "g", "type": "rectangle", "pos": { - "x": 305, + "x": 309, "y": 208 }, "width": 54, @@ -294,10 +302,10 @@ "id": "x", "type": "rectangle", "pos": { - "x": 427, + "x": 433, "y": 12 }, - "width": 53, + "width": 54, "height": 66, "opacity": 1, "strokeDash": 0, @@ -325,7 +333,7 @@ "italic": false, "bold": true, "underline": false, - "labelWidth": 8, + "labelWidth": 9, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -358,19 +366,19 @@ "labelPercentage": 0, "route": [ { - "x": 100.25, + "x": 103.25, "y": 78 }, { - "x": 100.25, + "x": 103.25, "y": 118 }, { - "x": 38.5, + "x": 39.5, "y": 118 }, { - "x": 38.5, + "x": 39.5, "y": 208 } ], @@ -404,19 +412,19 @@ "labelPercentage": 0, "route": [ { - "x": 132.25, + "x": 135.25, "y": 78 }, { - "x": 132.25, + "x": 135.25, "y": 168 }, { - "x": 111.5, + "x": 114, "y": 168 }, { - "x": 111.5, + "x": 114, "y": 208 } ], @@ -450,19 +458,19 @@ "labelPercentage": 0, "route": [ { - "x": 164.25, + "x": 167.25, "y": 78 }, { - "x": 164.25, + "x": 167.25, "y": 168 }, { - "x": 185, + "x": 188.5, "y": 168 }, { - "x": 185, + "x": 188.5, "y": 208 } ], @@ -496,19 +504,19 @@ "labelPercentage": 0, "route": [ { - "x": 196.25, + "x": 199.25, "y": 78 }, { - "x": 196.25, + "x": 199.25, "y": 118 }, { - "x": 258.5, + "x": 262.5, "y": 118 }, { - "x": 258.5, + "x": 262.5, "y": 208 } ], @@ -542,11 +550,11 @@ "labelPercentage": 0, "route": [ { - "x": 332, + "x": 336, "y": 78 }, { - "x": 332, + "x": 336, "y": 208 } ], @@ -580,19 +588,19 @@ "labelPercentage": 0, "route": [ { - "x": 427.5, + "x": 433, "y": 34 }, { - "x": 377.5, + "x": 383, "y": 34 }, { - "x": 377.5, + "x": 383, "y": 56 }, { - "x": 427.5, + "x": 433, "y": 56 } ], diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg index 5bdfdd2c5..4c6c71efb 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg @@ -1,16 +1,16 @@ -abcdefgx - - - - - - - - - + .d2-2501036534 .fill-N1{fill:#0A0F25;} + .d2-2501036534 .fill-N2{fill:#676C7E;} + .d2-2501036534 .fill-N3{fill:#9499AB;} + .d2-2501036534 .fill-N4{fill:#CFD2DD;} + .d2-2501036534 .fill-N5{fill:#DEE1EB;} + .d2-2501036534 .fill-N6{fill:#EEF1F8;} + .d2-2501036534 .fill-N7{fill:#FFFFFF;} + .d2-2501036534 .fill-B1{fill:#0D32B2;} + .d2-2501036534 .fill-B2{fill:#0D32B2;} + .d2-2501036534 .fill-B3{fill:#E3E9FD;} + .d2-2501036534 .fill-B4{fill:#E3E9FD;} + .d2-2501036534 .fill-B5{fill:#EDF0FD;} + .d2-2501036534 .fill-B6{fill:#F7F8FE;} + .d2-2501036534 .fill-AA2{fill:#4A6FF3;} + .d2-2501036534 .fill-AA4{fill:#EDF0FD;} + .d2-2501036534 .fill-AA5{fill:#F7F8FE;} + .d2-2501036534 .fill-AB4{fill:#EDF0FD;} + .d2-2501036534 .fill-AB5{fill:#F7F8FE;} + .d2-2501036534 .stroke-N1{stroke:#0A0F25;} + .d2-2501036534 .stroke-N2{stroke:#676C7E;} + .d2-2501036534 .stroke-N3{stroke:#9499AB;} + .d2-2501036534 .stroke-N4{stroke:#CFD2DD;} + .d2-2501036534 .stroke-N5{stroke:#DEE1EB;} + .d2-2501036534 .stroke-N6{stroke:#EEF1F8;} + .d2-2501036534 .stroke-N7{stroke:#FFFFFF;} + .d2-2501036534 .stroke-B1{stroke:#0D32B2;} + .d2-2501036534 .stroke-B2{stroke:#0D32B2;} + .d2-2501036534 .stroke-B3{stroke:#E3E9FD;} + .d2-2501036534 .stroke-B4{stroke:#E3E9FD;} + .d2-2501036534 .stroke-B5{stroke:#EDF0FD;} + .d2-2501036534 .stroke-B6{stroke:#F7F8FE;} + .d2-2501036534 .stroke-AA2{stroke:#4A6FF3;} + .d2-2501036534 .stroke-AA4{stroke:#EDF0FD;} + .d2-2501036534 .stroke-AA5{stroke:#F7F8FE;} + .d2-2501036534 .stroke-AB4{stroke:#EDF0FD;} + .d2-2501036534 .stroke-AB5{stroke:#F7F8FE;} + .d2-2501036534 .background-color-N1{background-color:#0A0F25;} + .d2-2501036534 .background-color-N2{background-color:#676C7E;} + .d2-2501036534 .background-color-N3{background-color:#9499AB;} + .d2-2501036534 .background-color-N4{background-color:#CFD2DD;} + .d2-2501036534 .background-color-N5{background-color:#DEE1EB;} + .d2-2501036534 .background-color-N6{background-color:#EEF1F8;} + .d2-2501036534 .background-color-N7{background-color:#FFFFFF;} + .d2-2501036534 .background-color-B1{background-color:#0D32B2;} + .d2-2501036534 .background-color-B2{background-color:#0D32B2;} + .d2-2501036534 .background-color-B3{background-color:#E3E9FD;} + .d2-2501036534 .background-color-B4{background-color:#E3E9FD;} + .d2-2501036534 .background-color-B5{background-color:#EDF0FD;} + .d2-2501036534 .background-color-B6{background-color:#F7F8FE;} + .d2-2501036534 .background-color-AA2{background-color:#4A6FF3;} + .d2-2501036534 .background-color-AA4{background-color:#EDF0FD;} + .d2-2501036534 .background-color-AA5{background-color:#F7F8FE;} + .d2-2501036534 .background-color-AB4{background-color:#EDF0FD;} + .d2-2501036534 .background-color-AB5{background-color:#F7F8FE;} + .d2-2501036534 .color-N1{color:#0A0F25;} + .d2-2501036534 .color-N2{color:#676C7E;} + .d2-2501036534 .color-N3{color:#9499AB;} + .d2-2501036534 .color-N4{color:#CFD2DD;} + .d2-2501036534 .color-N5{color:#DEE1EB;} + .d2-2501036534 .color-N6{color:#EEF1F8;} + .d2-2501036534 .color-N7{color:#FFFFFF;} + .d2-2501036534 .color-B1{color:#0D32B2;} + .d2-2501036534 .color-B2{color:#0D32B2;} + .d2-2501036534 .color-B3{color:#E3E9FD;} + .d2-2501036534 .color-B4{color:#E3E9FD;} + .d2-2501036534 .color-B5{color:#EDF0FD;} + .d2-2501036534 .color-B6{color:#F7F8FE;} + .d2-2501036534 .color-AA2{color:#4A6FF3;} + .d2-2501036534 .color-AA4{color:#EDF0FD;} + .d2-2501036534 .color-AA5{color:#F7F8FE;} + .d2-2501036534 .color-AB4{color:#EDF0FD;} + .d2-2501036534 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> + + + + + + + +abcdefgx + + + + + + + + + \ No newline at end of file diff --git a/lib/svg/path.go b/lib/svg/path.go index eddbb970f..f3d2d6606 100644 --- a/lib/svg/path.go +++ b/lib/svg/path.go @@ -3,6 +3,7 @@ package svg import ( "fmt" "math" + "strconv" "strings" "oss.terrastruct.com/d2/lib/geo" @@ -139,3 +140,181 @@ func BezierCurveSegment(p1, p2, p3, p4 *geo.Point, t0, t1 float64) (geo.Point, g return q1, q2, q3, q4 } + +// Gets a certain line/curve's SVG path string. offsetIdx and pathData provides the points needed +func getSVGPathString(pathType string, offsetIdx int, pathData []string) (string, error) { + switch pathType { + case "M": + return fmt.Sprintf("M %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]), nil + case "L": + return fmt.Sprintf("L %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2]), nil + case "C": + return fmt.Sprintf("C %s %s %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4], pathData[offsetIdx+5], pathData[offsetIdx+6]), nil + case "S": + return fmt.Sprintf("S %s %s %s %s ", pathData[offsetIdx+1], pathData[offsetIdx+2], pathData[offsetIdx+3], pathData[offsetIdx+4]), nil + default: + return "", fmt.Errorf("unknown svg path command \"%s\"", pathData[offsetIdx]) + } +} + +// Gets how much to increment by on an SVG string to get to the next path command +func getPathStringIncrement(pathType string) (int, error) { + switch pathType { + case "M": + return 3, nil + case "L": + return 3, nil + case "C": + return 7, nil + case "S": + return 5, nil + default: + return 0, fmt.Errorf("unknown svg path command \"%s\"", pathType) + } +} + +// This function finds the length of a path in SVG notation +func pathLength(pathData []string) (float64, error) { + var x, y, pathLength float64 + var prevPosition geo.Point + var increment int + + for i := 0; i < len(pathData); i += increment { + switch pathData[i] { + case "M": + x, _ = strconv.ParseFloat(pathData[i+1], 64) + y, _ = strconv.ParseFloat(pathData[i+2], 64) + case "L": + x, _ = strconv.ParseFloat(pathData[i+1], 64) + y, _ = strconv.ParseFloat(pathData[i+2], 64) + + pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + case "C": + x, _ = strconv.ParseFloat(pathData[i+5], 64) + y, _ = strconv.ParseFloat(pathData[i+6], 64) + + pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + case "S": + x, _ = strconv.ParseFloat(pathData[i+3], 64) + y, _ = strconv.ParseFloat(pathData[i+4], 64) + + pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + default: + fmt.Println("hello", pathData[i]) + return 0, fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) + } + + prevPosition = geo.Point{X: x, Y: y} + + incr, err := getPathStringIncrement(pathData[i]) + + if err != nil { + return 0, err + } + + increment = incr + } + + return pathLength, nil +} + +// Splits an SVG path into two SVG paths, with the first path being ~{percentage}% of the path +func SplitPath(path string, percentage float64) (string, string, error) { + var sumPathLens, curPathLen, x, y float64 + var prevPosition geo.Point + var path1, path2 string + var increment int + + pastHalf := false + pathData := strings.Split(path, " ") + pathLen, err := pathLength(pathData) + fmt.Println("pathLen:", pathLen) + + if err != nil { + return "", "", err + } + + for i := 0; i < len(pathData); i += increment { + switch pathData[i] { + case "M": + x, _ = strconv.ParseFloat(pathData[i+1], 64) + y, _ = strconv.ParseFloat(pathData[i+2], 64) + + curPathLen = 0 + case "L": + x, _ = strconv.ParseFloat(pathData[i+1], 64) + y, _ = strconv.ParseFloat(pathData[i+2], 64) + + curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + case "C": + x, _ = strconv.ParseFloat(pathData[i+5], 64) + y, _ = strconv.ParseFloat(pathData[i+6], 64) + + curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + case "S": + x, _ = strconv.ParseFloat(pathData[i+3], 64) + y, _ = strconv.ParseFloat(pathData[i+4], 64) + + curPathLen = geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) + default: + return "", "", fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) + } + + curPath, err := getSVGPathString(pathData[i], i, pathData) + if err != nil { + return "", "", err + } + + sumPathLens += curPathLen + + if pastHalf { // add to path2 + path2 += curPath + } else if sumPathLens < pathLen*percentage { // add to path1 + path1 += curPath + } else { // transition from path1 -> path2 + t := (pathLen*percentage - sumPathLens + curPathLen) / curPathLen + + switch pathData[i] { + case "M": + path2 += fmt.Sprintf("M %s %s ", pathData[i+3], pathData[i+4]) + case "L": + path1 += fmt.Sprintf("L %f %f ", (x-prevPosition.X)*t+prevPosition.X, (y-prevPosition.Y)*t+prevPosition.Y) + path2 += fmt.Sprintf("M %f %f L %f %f ", (x-prevPosition.X)*t+prevPosition.X, (y-prevPosition.Y)*t+prevPosition.Y, x, y) + case "C": + h1x, _ := strconv.ParseFloat(pathData[i+1], 64) + h1y, _ := strconv.ParseFloat(pathData[i+2], 64) + h2x, _ := strconv.ParseFloat(pathData[i+3], 64) + h2y, _ := strconv.ParseFloat(pathData[i+4], 64) + + heading1 := geo.Point{X: h1x, Y: h1y} + heading2 := geo.Point{X: h2x, Y: h2y} + nextPoint := geo.Point{X: x, Y: y} + + q1, q2, q3, q4 := BezierCurveSegment(&prevPosition, &heading1, &heading2, &nextPoint, 0, 0.5) + path1 += fmt.Sprintf("C %f %f %f %f %f %f ", q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y) + + q1, q2, q3, q4 = BezierCurveSegment(&prevPosition, &heading1, &heading2, &nextPoint, 0.5, 1) + path2 += fmt.Sprintf("M %f %f C %f %f %f %f %f %f ", q1.X, q1.Y, q2.X, q2.Y, q3.X, q3.Y, q4.X, q4.Y) + case "S": + // Skip S curves because they are shorter and we can split along the connection to the next path instead + path1 += fmt.Sprintf("S %s %s %s %s ", pathData[i+1], pathData[i+2], pathData[i+3], pathData[i+4]) + path2 += fmt.Sprintf("M %s %s ", pathData[i+3], pathData[i+4]) + default: + return "", "", fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) + } + + pastHalf = true + } + + incr, err := getPathStringIncrement(pathData[i]) + + if err != nil { + return "", "", err + } + + increment = incr + prevPosition = geo.Point{X: x, Y: y} + } + + return path1, path2, nil +} From aa8ce9463ee5de826c51a3e60bb68d3563f717d6 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Mon, 20 May 2024 12:43:47 -0400 Subject: [PATCH 088/109] pass e2e tests --- d2renderers/d2sketch/sketch.go | 98 ++- .../d2sketch/testdata/animated/sketch.exp.svg | 2 +- .../testdata/animated_dark/sketch.exp.svg | 2 +- .../TestCLI_E2E/internal_linked_pdf.exp.pdf | Bin 66068 -> 66068 bytes .../testdata/TestCLI_E2E/no-nav-pdf.exp.pdf | Bin 96034 -> 96034 bytes .../testdata/TestCLI_E2E/no-nav-pptx.exp.pptx | Bin 122127 -> 122131 bytes .../TestCLI_E2E/renamed-board.exp.pdf | Bin 109975 -> 109975 bytes .../testdata/TestCLI_E2E/theme-pdf.exp.pdf | Bin 17306 -> 17306 bytes e2etests/testdata/txtar.txt | 22 +- .../dagre/board.exp.json | 695 +++++++++++++++++ .../dagre/sketch.exp.svg | 108 +++ .../elk/board.exp.json | 645 ++++++++++++++++ .../elk/sketch.exp.svg | 108 +++ .../dagre/sketch.exp.svg | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 703 ++++++++++++++++++ .../dagre/sketch.exp.svg | 116 +++ .../elk/board.exp.json | 653 ++++++++++++++++ .../elk/sketch.exp.svg | 116 +++ lib/svg/path.go | 2 - 20 files changed, 3208 insertions(+), 66 deletions(-) create mode 100644 e2etests/testdata/txtar/bidirectional-connection-animation/dagre/board.exp.json create mode 100644 e2etests/testdata/txtar/bidirectional-connection-animation/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/bidirectional-connection-animation/elk/board.exp.json create mode 100644 e2etests/testdata/txtar/bidirectional-connection-animation/elk/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/sketch-bidirectional-connection-animation/dagre/board.exp.json create mode 100644 e2etests/testdata/txtar/sketch-bidirectional-connection-animation/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/txtar/sketch-bidirectional-connection-animation/elk/board.exp.json create mode 100644 e2etests/testdata/txtar/sketch-bidirectional-connection-animation/elk/sketch.exp.svg diff --git a/d2renderers/d2sketch/sketch.go b/d2renderers/d2sketch/sketch.go index 8c2ec056e..ea768d948 100644 --- a/d2renderers/d2sketch/sketch.go +++ b/d2renderers/d2sketch/sketch.go @@ -6,7 +6,6 @@ import ( "fmt" "regexp" "strings" - "unicode" _ "embed" @@ -322,76 +321,69 @@ func Paths(r *Runner, shape d2target.Shape, paths []string) (string, error) { } func Connection(r *Runner, connection d2target.Connection, path, attrs string) (string, error) { - roughness := 0.5 - js := fmt.Sprintf(`node = rc.path("%s", {roughness: %f, seed: 1});`, path, roughness) - paths, err := computeRoughPathData(r, js) - if err != nil { - return "", err - } - - finalPath := "" - - insertSpacesAfterLetters := func(s string) { - output := "" - for i := 0; i < len(s); i++ { - if s[i] != ',' { - output += string(s[i]) - } - if unicode.IsLetter(rune(s[i])) { - output += " " - } - } - fmt.Println("PATH", output) - finalPath += output - } - fmt.Println() - - for i := 0; i < len(paths); i++ { - insertSpacesAfterLetters(paths[i]) - } - animatedClass := "" if connection.Animated { animatedClass = " animated-connection" } // If connection is animated and bidirectional - if connection.Animated && ((connection.DstArrow == d2target.NoArrowhead && connection.SrcArrow == d2target.NoArrowhead) || (connection.DstArrow != d2target.NoArrowhead && connection.SrcArrow != d2target.NoArrowhead)) { - // There is no pure CSS way to animate bidirectional connections in two directions, so we split it up - path1, path2, err := svg.SplitPath(path, 0.5) + if connection.Animated { + if (connection.DstArrow == d2target.NoArrowhead && connection.SrcArrow == d2target.NoArrowhead) || (connection.DstArrow != d2target.NoArrowhead && connection.SrcArrow != d2target.NoArrowhead) { + // There is no pure CSS way to animate bidirectional connections in two directions, so we split it up + path1, path2, err := svg.SplitPath(path, 0.5) + if err != nil { + return "", err + } + + pathEl1 := d2themes.NewThemableElement("path") + pathEl1.D = path1 + pathEl1.Fill = color.None + pathEl1.Stroke = connection.Stroke + pathEl1.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl1.Style = connection.CSSStyle() + pathEl1.Style += "animation-direction: reverse;" + pathEl1.Attributes = attrs + + pathEl2 := d2themes.NewThemableElement("path") + pathEl2.D = path2 + pathEl2.Fill = color.None + pathEl2.Stroke = connection.Stroke + pathEl2.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl2.Style = connection.CSSStyle() + pathEl2.Attributes = attrs + return pathEl1.Render() + " " + pathEl2.Render(), nil + } else { + pathEl := d2themes.NewThemableElement("path") + pathEl.D = path + pathEl.Fill = color.None + pathEl.Stroke = connection.Stroke + pathEl.ClassName = fmt.Sprintf("connection%s", animatedClass) + pathEl.Style = connection.CSSStyle() + pathEl.Attributes = attrs + return pathEl.Render(), nil + } + } else { + roughness := 0.5 + js := fmt.Sprintf(`node = rc.path("%s", {roughness: %f, seed: 1});`, path, roughness) + paths, err := computeRoughPathData(r, js) if err != nil { return "", err } - pathEl1 := d2themes.NewThemableElement("path") - pathEl1.D = path1 - pathEl1.Fill = color.None - pathEl1.Stroke = connection.Stroke - pathEl1.ClassName = fmt.Sprintf("connection%s", animatedClass) - pathEl1.Style = connection.CSSStyle() - pathEl1.Style += "animation-direction: reverse;" - pathEl1.Attributes = attrs + output := "" - pathEl2 := d2themes.NewThemableElement("path") - pathEl2.D = path2 - pathEl2.Fill = color.None - pathEl2.Stroke = connection.Stroke - pathEl2.ClassName = fmt.Sprintf("connection%s", animatedClass) - pathEl2.Style = connection.CSSStyle() - pathEl2.Attributes = attrs - // return pathEl1.Render(), nil - return pathEl2.Render(), nil - // return pathEl1.Render() + " " + pathEl2.Render(), nil - } else { pathEl := d2themes.NewThemableElement("path") - pathEl.D = finalPath pathEl.Fill = color.None pathEl.Stroke = connection.Stroke pathEl.ClassName = fmt.Sprintf("connection%s", animatedClass) pathEl.Style = connection.CSSStyle() pathEl.Attributes = attrs - return pathEl.Render(), nil + for _, p := range paths { + pathEl.D = p + output += pathEl.Render() + } + return output, nil } } diff --git a/d2renderers/d2sketch/testdata/animated/sketch.exp.svg b/d2renderers/d2sketch/testdata/animated/sketch.exp.svg index fecf1bfd8..819d95394 100644 --- a/d2renderers/d2sketch/testdata/animated/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/animated/sketch.exp.svg @@ -110,7 +110,7 @@ -wintersummertreessnowsun +wintersummertreessnowsun diff --git a/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg b/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg index 1178e671f..4b24c1970 100644 --- a/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/animated_dark/sketch.exp.svg @@ -108,7 +108,7 @@ -wintersummertreessnowsun +wintersummertreessnowsun diff --git a/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf index 7c1a8847dd2ac8f9e0ca68c8b64454c881ad6aa4..0cdc62313ebfc74ccc5bfd27165fa0be382d4342 100644 GIT binary patch delta 185 zcmbQz!ZM|WWy1%F$?LioF&b?S?0M=x*)z=m$W@*^C#`7n?>mbWCf9WvO#UFTh|y&8 zWXWwllg;jcxXPR7q&-rZJom5jWWj$1lkfdCob33|n$dW2?LR|C!^!LarK*}585kOw z7@8Pqa_Rf#r?@1Rq$+5*SQ!}@nHa$3He3ETXVSK`v{Wzv0fjsTE-=H`)YQ}fP0ZBP M*wS+PY(~aP061zv!~g&Q delta 181 zcmbQz!ZM|WWy1%F$^6}m7>zb>>fYuvxgyg5$W`9F`^F=c$@jYqCV!Av#Avd4vgA|$ z$r(35T;S?HhsXOCOiJKW;C2!`_GWkc=Gyxsj4Q1=7yFgmWF1U zT>8HGDK3d6sR|k{Rz?O!CI)c1&6fYonY0ZpOcV@2Kp{_o3(PP!H8-$C6Eih4HaDI= In~|{+0AqbW8~^|S diff --git a/e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf index 73d6e3754de3b03f34ccfa42dc02e1106a3ad970..f577774c3e1de114d89311eeb80e01d27d33e8f8 100644 GIT binary patch delta 55 zcmZ4Vj&;#H)`l&NN+qhMMh1pPCWgkAnq2z6`6(`mC8-J;E>=bcMkWSux$W*HjJKHp D-OUfb delta 55 zcmZ4Vj&;#H)`l&NN+qf$hUSKrCYFXKnq2z6`6(`mC8-J;E>=bcMkWSux$W*HjJKHp D;CT<( diff --git a/e2etests-cli/testdata/TestCLI_E2E/no-nav-pptx.exp.pptx b/e2etests-cli/testdata/TestCLI_E2E/no-nav-pptx.exp.pptx index cf1579ac5ebe9fbd46d2730a5db52a1a9aeeb295..2adb5e28d5956d553b099a2ea147da14e037039a 100644 GIT binary patch delta 482 zcmV<80UiF2x(AcG2Y|Ez7RP_jZreN%#P4|uf_I6O;_pL2*b2}FIW<6lx@fN~xsloM zAINoNy?r6NV(d1z9@jJT;|^(U?@rE=S4i0ezoT8tDFLs7Hh$dEultAQ10@-y*U|~ryA>`z&&qBo=Js?KGSXKvcGPfauKRJK<9Fmim+mJ>U zrFxMgu%7e(nFEwsqGSuSiIqw(uv%4YJSJNpS~0NTz++}z+c8?b2+8Gl14UuiWM^=W z@UDFouM($hs(G5GcDgP0p7V}4$9_oN|9vn&|Xy_J4!RdD5?OGZ7+%8ZXen`Z<1<9xZ=-(n3Vcs0vkZs>}wj_bPR zjn2hDlT$Y0{64Gl?e^3C{(%lX?>7zquj%=|>&2!M8{Y7Z;CwFG_X_d{+WlVY-`FeV zt(cMsV@UII^`+YNS2Fwx00960P)i30qNc06paB2?ahIRF0Ufv6$N{nw38JQ}yPyF8 Y0CAU<+yPJl#FysW0V4(^%K-oY0Qd&(fdBvi delta 473 zcmV;~0Ve*Fx(AQC2Y|Ez7RP_hZrd;rgztF@f_I6OVl)k5D?l6M)BpkMqP?=@MrI@a zfLuq?+ZUoMCT@M}aXhmhcSvh{H`#%_LQKZH9c^k(2{`4oas7^d+dotvDM=`umVD+U8taF|$AH;k4nLbU1PKz7(U*&3V! zT#T>g*~FAg36JAgkJmZga^A2Xk6*s#+Ldw3)hVD|9^Gms(BJ@_KjM}ZRm^n!`3n>l zd(|bNB1rVHb4upGs!x9b6~qh7qmMcf_BNy;sb~Tk@4BZ52^`8rkRBXFiJ-}7@IdZc zQjw)o5{&6~kgl(lxA~y=jB?l@6Fz!vo(Hxh|UDfJS!TGZ38RRN2wEeTx|FKufTQMaO zdLQTI(sQ-*FQfY%00960P)i30s#Lz`oB;p;Ww*h|0nZZ&s#Lz`oB;p;WtW-U0Z;+J Pm+IUBBL*PL0RR91`&i$R diff --git a/e2etests-cli/testdata/TestCLI_E2E/renamed-board.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/renamed-board.exp.pdf index 581e72d2a77bca16b0b2e4c6277e2d32a38184d9..8628441e39da91d8d9cb4e692eaace5947a46ef7 100644 GIT binary patch delta 70 zcmbP!n{E1SwuUW?Nh_yMUdd=MJz*uI;q=2R8854v8W|WGnHU;dYI5oO=BKzMmZU0Z UxL6q(7?~Kr<+kr$#dwDa0Fjm#QUCw| delta 70 zcmbP!n{E1SwuUW?Nh_yMS;?qBJz*uI(e%SB8854v7@8Yenphf|XmaWM=BKzMmZU0Z UxL6q(7?~Kr<+kr$#dwDa0F-wZZ2$lO diff --git a/e2etests-cli/testdata/TestCLI_E2E/theme-pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/theme-pdf.exp.pdf index 01c7166e15d8e436c7ba1a17db06e0b1c1cb8e93..ffd681ab13e139e54fb0dfd923bc8e4b3cfd4071 100644 GIT binary patch delta 52 zcmbQ$&N!=`al dog3 } --- bidirectional_connection_animation -- -vars: { - d2-config: { - sketch: true - } -} - +-- bidirectional-connection-animation -- a <-> b: {style.animated: true} a <-> c: {style.animated: true} a <-> d: {style.animated: true} @@ -272,3 +266,17 @@ x <-> y <-> z: { } direction: right } + +-- sketch-bidirectional-connection-animation -- +vars: { + d2-config: { + sketch: true + } +} + +a <-> b: {style.animated: true} +a <-> c: {style.animated: true} +a <-> d: {style.animated: true} +a <-> e +f <-> g: {style.animated: true} +x -- x: {style.animated: true} \ No newline at end of file diff --git a/e2etests/testdata/txtar/bidirectional-connection-animation/dagre/board.exp.json b/e2etests/testdata/txtar/bidirectional-connection-animation/dagre/board.exp.json new file mode 100644 index 000000000..16c3d88b9 --- /dev/null +++ b/e2etests/testdata/txtar/bidirectional-connection-animation/dagre/board.exp.json @@ -0,0 +1,695 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 170, + "y": 0 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 0, + "y": 166 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "c", + "type": "rectangle", + "pos": { + "x": 113, + "y": 166 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "d", + "type": "rectangle", + "pos": { + "x": 226, + "y": 166 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "d", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "e", + "type": "rectangle", + "pos": { + "x": 340, + "y": 166 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "e", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "f", + "type": "rectangle", + "pos": { + "x": 455, + "y": 0 + }, + "width": 51, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "f", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 6, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "g", + "type": "rectangle", + "pos": { + "x": 453, + "y": 166 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "g", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 566, + "y": 0 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "x", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a <-> b)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "b", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 169.75, + "y": 45.957000732421875 + }, + { + "x": 55.14899826049805, + "y": 101.99099731445312 + }, + { + "x": 26.5, + "y": 126 + }, + { + "x": 26.5, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> c)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "c", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 173.5, + "y": 66 + }, + { + "x": 146.3000030517578, + "y": 106 + }, + { + "x": 139.5, + "y": 126 + }, + { + "x": 139.5, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> d)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "d", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 219, + "y": 66 + }, + { + "x": 246.1999969482422, + "y": 106 + }, + { + "x": 253, + "y": 126 + }, + { + "x": 253, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> e)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "e", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 222.5, + "y": 46 + }, + { + "x": 337.70001220703125, + "y": 102 + }, + { + "x": 366.5, + "y": 126 + }, + { + "x": 366.5, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(f <-> g)[0]", + "src": "f", + "srcArrow": "triangle", + "dst": "g", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 480, + "y": 66 + }, + { + "x": 480, + "y": 106 + }, + { + "x": 480, + "y": 126 + }, + { + "x": 480, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(x -- x)[0]", + "src": "x", + "srcArrow": "none", + "dst": "x", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 619.166015625, + "y": 16 + }, + { + "x": 639.9660034179688, + "y": 3.1989998817443848 + }, + { + "x": 646.5, + "y": 0 + }, + { + "x": 648.5, + "y": 0 + }, + { + "x": 650.5, + "y": 0 + }, + { + "x": 653.166015625, + "y": 6.599999904632568 + }, + { + "x": 655.166015625, + "y": 16.5 + }, + { + "x": 657.166015625, + "y": 26.399999618530273 + }, + { + "x": 657.166015625, + "y": 39.599998474121094 + }, + { + "x": 655.166015625, + "y": 49.5 + }, + { + "x": 653.166015625, + "y": 59.400001525878906 + }, + { + "x": 639.9660034179688, + "y": 62.79999923706055 + }, + { + "x": 619.166015625, + "y": 50 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/bidirectional-connection-animation/dagre/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional-connection-animation/dagre/sketch.exp.svg new file mode 100644 index 000000000..030120280 --- /dev/null +++ b/e2etests/testdata/txtar/bidirectional-connection-animation/dagre/sketch.exp.svg @@ -0,0 +1,108 @@ +abcdefgx + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/bidirectional-connection-animation/elk/board.exp.json b/e2etests/testdata/txtar/bidirectional-connection-animation/elk/board.exp.json new file mode 100644 index 000000000..85d12fc27 --- /dev/null +++ b/e2etests/testdata/txtar/bidirectional-connection-animation/elk/board.exp.json @@ -0,0 +1,645 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 68, + "y": 12 + }, + "width": 160, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 12, + "y": 208 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "c", + "type": "rectangle", + "pos": { + "x": 85, + "y": 208 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "d", + "type": "rectangle", + "pos": { + "x": 158, + "y": 208 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "d", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "e", + "type": "rectangle", + "pos": { + "x": 232, + "y": 208 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "e", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "f", + "type": "rectangle", + "pos": { + "x": 306, + "y": 12 + }, + "width": 51, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "f", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 6, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "g", + "type": "rectangle", + "pos": { + "x": 305, + "y": 208 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "g", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 427, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "x", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a <-> b)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "b", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 100.25, + "y": 78 + }, + { + "x": 100.25, + "y": 118 + }, + { + "x": 38.5, + "y": 118 + }, + { + "x": 38.5, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> c)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "c", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 132.25, + "y": 78 + }, + { + "x": 132.25, + "y": 168 + }, + { + "x": 111.5, + "y": 168 + }, + { + "x": 111.5, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> d)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "d", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 164.25, + "y": 78 + }, + { + "x": 164.25, + "y": 168 + }, + { + "x": 185, + "y": 168 + }, + { + "x": 185, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> e)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "e", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 196.25, + "y": 78 + }, + { + "x": 196.25, + "y": 118 + }, + { + "x": 258.5, + "y": 118 + }, + { + "x": 258.5, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(f <-> g)[0]", + "src": "f", + "srcArrow": "triangle", + "dst": "g", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 332, + "y": 78 + }, + { + "x": 332, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(x -- x)[0]", + "src": "x", + "srcArrow": "none", + "dst": "x", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 427.5, + "y": 34 + }, + { + "x": 377.5, + "y": 34 + }, + { + "x": 377.5, + "y": 56 + }, + { + "x": 427.5, + "y": 56 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/bidirectional-connection-animation/elk/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional-connection-animation/elk/sketch.exp.svg new file mode 100644 index 000000000..5bdfdd2c5 --- /dev/null +++ b/e2etests/testdata/txtar/bidirectional-connection-animation/elk/sketch.exp.svg @@ -0,0 +1,108 @@ +abcdefgx + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg index 02f9b9fa1..8feb1399c 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg @@ -103,7 +103,7 @@ -abcdefgx +abcdefgx diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg index 4c6c71efb..85a25830d 100644 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg @@ -103,7 +103,7 @@ -abcdefgx +abcdefgx diff --git a/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/dagre/board.exp.json b/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/dagre/board.exp.json new file mode 100644 index 000000000..d4be34b71 --- /dev/null +++ b/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/dagre/board.exp.json @@ -0,0 +1,703 @@ +{ + "name": "", + "config": { + "sketch": true, + "themeID": null, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, + "isFolderOnly": false, + "fontFamily": "HandDrawn", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 172, + "y": 0 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 0, + "y": 166 + }, + "width": 55, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 10, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "c", + "type": "rectangle", + "pos": { + "x": 115, + "y": 166 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "d", + "type": "rectangle", + "pos": { + "x": 229, + "y": 166 + }, + "width": 55, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "d", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 10, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "e", + "type": "rectangle", + "pos": { + "x": 344, + "y": 166 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "e", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "f", + "type": "rectangle", + "pos": { + "x": 457, + "y": 0 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "f", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "g", + "type": "rectangle", + "pos": { + "x": 457, + "y": 166 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "g", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 571, + "y": 0 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "x", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a <-> b)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "b", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 172.5, + "y": 46 + }, + { + "x": 56.5, + "y": 102 + }, + { + "x": 27.5, + "y": 126 + }, + { + "x": 27.5, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> c)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "c", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 176, + "y": 66 + }, + { + "x": 148.8000030517578, + "y": 106 + }, + { + "x": 142, + "y": 126 + }, + { + "x": 142, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> d)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "d", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 222.5, + "y": 66 + }, + { + "x": 249.6999969482422, + "y": 106 + }, + { + "x": 256.5, + "y": 126 + }, + { + "x": 256.5, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> e)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "e", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 226.25, + "y": 46.08599853515625 + }, + { + "x": 341.6499938964844, + "y": 102.01699829101562 + }, + { + "x": 370.5, + "y": 126 + }, + { + "x": 370.5, + "y": 166 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(f <-> g)[0]", + "src": "f", + "srcArrow": "triangle", + "dst": "g", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 484, + "y": 66 + }, + { + "x": 484, + "y": 106 + }, + { + "x": 484, + "y": 126 + }, + { + "x": 484, + "y": 166 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(x -- x)[0]", + "src": "x", + "srcArrow": "none", + "dst": "x", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 624.666015625, + "y": 16 + }, + { + "x": 646.2659912109375, + "y": 3.1989998817443848 + }, + { + "x": 653, + "y": 0 + }, + { + "x": 655, + "y": 0 + }, + { + "x": 657, + "y": 0 + }, + { + "x": 659.666015625, + "y": 6.599999904632568 + }, + { + "x": 661.666015625, + "y": 16.5 + }, + { + "x": 663.666015625, + "y": 26.399999618530273 + }, + { + "x": 663.666015625, + "y": 39.599998474121094 + }, + { + "x": 661.666015625, + "y": 49.5 + }, + { + "x": 659.666015625, + "y": 59.400001525878906 + }, + { + "x": 646.2659912109375, + "y": 62.79999923706055 + }, + { + "x": 624.666015625, + "y": 50 + } + ], + "isCurve": true, + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/dagre/sketch.exp.svg b/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/dagre/sketch.exp.svg new file mode 100644 index 000000000..01ae7f387 --- /dev/null +++ b/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/dagre/sketch.exp.svg @@ -0,0 +1,116 @@ + + + + + + + + +abcdefgx + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/elk/board.exp.json b/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/elk/board.exp.json new file mode 100644 index 000000000..5abaaf205 --- /dev/null +++ b/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/elk/board.exp.json @@ -0,0 +1,653 @@ +{ + "name": "", + "config": { + "sketch": true, + "themeID": null, + "darkThemeID": null, + "pad": null, + "center": null, + "layoutEngine": null + }, + "isFolderOnly": false, + "fontFamily": "HandDrawn", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 71, + "y": 12 + }, + "width": 160, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 12, + "y": 208 + }, + "width": 55, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 10, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "c", + "type": "rectangle", + "pos": { + "x": 87, + "y": 208 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "d", + "type": "rectangle", + "pos": { + "x": 161, + "y": 208 + }, + "width": 55, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "d", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 10, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "e", + "type": "rectangle", + "pos": { + "x": 236, + "y": 208 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "e", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "f", + "type": "rectangle", + "pos": { + "x": 309, + "y": 12 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "f", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "g", + "type": "rectangle", + "pos": { + "x": 309, + "y": 208 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "g", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 433, + "y": 12 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "x", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a <-> b)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "b", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 103.25, + "y": 78 + }, + { + "x": 103.25, + "y": 118 + }, + { + "x": 39.5, + "y": 118 + }, + { + "x": 39.5, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> c)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "c", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 135.25, + "y": 78 + }, + { + "x": 135.25, + "y": 168 + }, + { + "x": 114, + "y": 168 + }, + { + "x": 114, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> d)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "d", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 167.25, + "y": 78 + }, + { + "x": 167.25, + "y": 168 + }, + { + "x": 188.5, + "y": 168 + }, + { + "x": 188.5, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a <-> e)[0]", + "src": "a", + "srcArrow": "triangle", + "dst": "e", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 199.25, + "y": 78 + }, + { + "x": 199.25, + "y": 118 + }, + { + "x": 262.5, + "y": 118 + }, + { + "x": 262.5, + "y": 208 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(f <-> g)[0]", + "src": "f", + "srcArrow": "triangle", + "dst": "g", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 336, + "y": 78 + }, + { + "x": 336, + "y": 208 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(x -- x)[0]", + "src": "x", + "srcArrow": "none", + "dst": "x", + "dstArrow": "none", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 433, + "y": 34 + }, + { + "x": 383, + "y": 34 + }, + { + "x": 383, + "y": 56 + }, + { + "x": 433, + "y": 56 + } + ], + "animated": true, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/elk/sketch.exp.svg b/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/elk/sketch.exp.svg new file mode 100644 index 000000000..9603d3358 --- /dev/null +++ b/e2etests/testdata/txtar/sketch-bidirectional-connection-animation/elk/sketch.exp.svg @@ -0,0 +1,116 @@ + + + + + + + + +abcdefgx + + + + + + + + + + \ No newline at end of file diff --git a/lib/svg/path.go b/lib/svg/path.go index f3d2d6606..56201c8ce 100644 --- a/lib/svg/path.go +++ b/lib/svg/path.go @@ -200,7 +200,6 @@ func pathLength(pathData []string) (float64, error) { pathLength += geo.EuclideanDistance(prevPosition.X, prevPosition.Y, x, y) default: - fmt.Println("hello", pathData[i]) return 0, fmt.Errorf("unknown svg path command \"%s\"", pathData[i]) } @@ -228,7 +227,6 @@ func SplitPath(path string, percentage float64) (string, string, error) { pastHalf := false pathData := strings.Split(path, " ") pathLen, err := pathLength(pathData) - fmt.Println("pathLen:", pathLen) if err != nil { return "", "", err From 92417196c9dcf9e6463094b611b06f65ffa79308 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Mon, 20 May 2024 12:58:27 -0400 Subject: [PATCH 089/109] revert changes from testing --- .../TestCLI_E2E/internal_linked_pdf.exp.pdf | Bin 66068 -> 66068 bytes .../testdata/TestCLI_E2E/no-nav-pdf.exp.pdf | Bin 96034 -> 96034 bytes .../testdata/TestCLI_E2E/no-nav-pptx.exp.pptx | Bin 122131 -> 122127 bytes .../TestCLI_E2E/renamed-board.exp.pdf | Bin 109975 -> 109975 bytes .../testdata/TestCLI_E2E/theme-pdf.exp.pdf | Bin 17306 -> 17306 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf index 0cdc62313ebfc74ccc5bfd27165fa0be382d4342..7c1a8847dd2ac8f9e0ca68c8b64454c881ad6aa4 100644 GIT binary patch delta 181 zcmbQz!ZM|WWy1%F$^6}m7>zb>>fYuvxgyg5$W`9F`^F=c$@jYqCV!Av#Avd4vgA|$ z$r(35T;S?HhsXOCOiJKW;C2!`_GWkc=Gyxsj4Q1=7yFgmWF1U zT>8HGDK3d6sR|k{Rz?O!CI)c1&6fYonY0ZpOcV@2Kp{_o3(PP!H8-$C6Eih4HaDI= In~|{+0AqbW8~^|S delta 185 zcmbQz!ZM|WWy1%F$?LioF&b?S?0M=x*)z=m$W@*^C#`7n?>mbWCf9WvO#UFTh|y&8 zWXWwllg;jcxXPR7q&-rZJom5jWWj$1lkfdCob33|n$dW2?LR|C!^!LarK*}585kOw z7@8Pqa_Rf#r?@1Rq$+5*SQ!}@nHa$3He3ETXVSK`v{Wzv0fjsTE-=H`)YQ}fP0ZBP M*wS+PY(~aP061zv!~g&Q diff --git a/e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/no-nav-pdf.exp.pdf index f577774c3e1de114d89311eeb80e01d27d33e8f8..73d6e3754de3b03f34ccfa42dc02e1106a3ad970 100644 GIT binary patch delta 55 zcmZ4Vj&;#H)`l&NN+qf$hUSKrCYFXKnq2z6`6(`mC8-J;E>=bcMkWSux$W*HjJKHp D;CT<( delta 55 zcmZ4Vj&;#H)`l&NN+qhMMh1pPCWgkAnq2z6`6(`mC8-J;E>=bcMkWSux$W*HjJKHp D-OUfb diff --git a/e2etests-cli/testdata/TestCLI_E2E/no-nav-pptx.exp.pptx b/e2etests-cli/testdata/TestCLI_E2E/no-nav-pptx.exp.pptx index 2adb5e28d5956d553b099a2ea147da14e037039a..cf1579ac5ebe9fbd46d2730a5db52a1a9aeeb295 100644 GIT binary patch delta 473 zcmV;~0Ve*Fx(AQC2Y|Ez7RP_hZrd;rgztF@f_I6OVl)k5D?l6M)BpkMqP?=@MrI@a zfLuq?+ZUoMCT@M}aXhmhcSvh{H`#%_LQKZH9c^k(2{`4oas7^d+dotvDM=`umVD+U8taF|$AH;k4nLbU1PKz7(U*&3V! zT#T>g*~FAg36JAgkJmZga^A2Xk6*s#+Ldw3)hVD|9^Gms(BJ@_KjM}ZRm^n!`3n>l zd(|bNB1rVHb4upGs!x9b6~qh7qmMcf_BNy;sb~Tk@4BZ52^`8rkRBXFiJ-}7@IdZc zQjw)o5{&6~kgl(lxA~y=jB?l@6Fz!vo(Hxh|UDfJS!TGZ38RRN2wEeTx|FKufTQMaO zdLQTI(sQ-*FQfY%00960P)i30s#Lz`oB;p;Ww*h|0nZZ&s#Lz`oB;p;WtW-U0Z;+J Pm+IUBBL*PL0RR91`&i$R delta 482 zcmV<80UiF2x(AcG2Y|Ez7RP_jZreN%#P4|uf_I6O;_pL2*b2}FIW<6lx@fN~xsloM zAINoNy?r6NV(d1z9@jJT;|^(U?@rE=S4i0ezoT8tDFLs7Hh$dEultAQ10@-y*U|~ryA>`z&&qBo=Js?KGSXKvcGPfauKRJK<9Fmim+mJ>U zrFxMgu%7e(nFEwsqGSuSiIqw(uv%4YJSJNpS~0NTz++}z+c8?b2+8Gl14UuiWM^=W z@UDFouM($hs(G5GcDgP0p7V}4$9_oN|9vn&|Xy_J4!RdD5?OGZ7+%8ZXen`Z<1<9xZ=-(n3Vcs0vkZs>}wj_bPR zjn2hDlT$Y0{64Gl?e^3C{(%lX?>7zquj%=|>&2!M8{Y7Z;CwFG_X_d{+WlVY-`FeV zt(cMsV@UII^`+YNS2Fwx00960P)i30qNc06paB2?ahIRF0Ufv6$N{nw38JQ}yPyF8 Y0CAU<+yPJl#FysW0V4(^%K-oY0Qd&(fdBvi diff --git a/e2etests-cli/testdata/TestCLI_E2E/renamed-board.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/renamed-board.exp.pdf index 8628441e39da91d8d9cb4e692eaace5947a46ef7..581e72d2a77bca16b0b2e4c6277e2d32a38184d9 100644 GIT binary patch delta 70 zcmbP!n{E1SwuUW?Nh_yMS;?qBJz*uI(e%SB8854v7@8Yenphf|XmaWM=BKzMmZU0Z UxL6q(7?~Kr<+kr$#dwDa0F-wZZ2$lO delta 70 zcmbP!n{E1SwuUW?Nh_yMUdd=MJz*uI;q=2R8854v8W|WGnHU;dYI5oO=BKzMmZU0Z UxL6q(7?~Kr<+kr$#dwDa0Fjm#QUCw| diff --git a/e2etests-cli/testdata/TestCLI_E2E/theme-pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/theme-pdf.exp.pdf index ffd681ab13e139e54fb0dfd923bc8e4b3cfd4071..01c7166e15d8e436c7ba1a17db06e0b1c1cb8e93 100644 GIT binary patch delta 52 zcmbQ$&N!=`al Date: Mon, 20 May 2024 13:02:28 -0400 Subject: [PATCH 090/109] delete old bidirectional test --- .../dagre/board.exp.json | 703 ------------------ .../dagre/sketch.exp.svg | 116 --- .../elk/board.exp.json | 653 ---------------- .../elk/sketch.exp.svg | 116 --- 4 files changed, 1588 deletions(-) delete mode 100644 e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json delete mode 100644 e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg delete mode 100644 e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json delete mode 100644 e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json deleted file mode 100644 index 09c09cfbe..000000000 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/board.exp.json +++ /dev/null @@ -1,703 +0,0 @@ -{ - "name": "", - "config": { - "sketch": true, - "themeID": null, - "darkThemeID": null, - "pad": null, - "center": null, - "layoutEngine": null - }, - "isFolderOnly": false, - "fontFamily": "HandDrawn", - "shapes": [ - { - "id": "a", - "type": "rectangle", - "pos": { - "x": 172, - "y": 0 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "a", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "b", - "type": "rectangle", - "pos": { - "x": 0, - "y": 166 - }, - "width": 55, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "b", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 10, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "c", - "type": "rectangle", - "pos": { - "x": 115, - "y": 166 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "c", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "d", - "type": "rectangle", - "pos": { - "x": 229, - "y": 166 - }, - "width": 55, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "d", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 10, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "e", - "type": "rectangle", - "pos": { - "x": 344, - "y": 166 - }, - "width": 53, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "e", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 8, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "f", - "type": "rectangle", - "pos": { - "x": 457, - "y": 0 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "f", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "g", - "type": "rectangle", - "pos": { - "x": 457, - "y": 166 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "g", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "x", - "type": "rectangle", - "pos": { - "x": 571, - "y": 0 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "x", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - } - ], - "connections": [ - { - "id": "(a <-> b)[0]", - "src": "a", - "srcArrow": "triangle", - "dst": "b", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 172.5, - "y": 46 - }, - { - "x": 56.5, - "y": 102 - }, - { - "x": 27.5, - "y": 126 - }, - { - "x": 27.5, - "y": 166 - } - ], - "isCurve": true, - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(a <-> c)[0]", - "src": "a", - "srcArrow": "triangle", - "dst": "c", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 176, - "y": 66 - }, - { - "x": 148.8000030517578, - "y": 106 - }, - { - "x": 142, - "y": 126 - }, - { - "x": 142, - "y": 166 - } - ], - "isCurve": true, - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(a <-> d)[0]", - "src": "a", - "srcArrow": "triangle", - "dst": "d", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 222.5, - "y": 66 - }, - { - "x": 249.6999969482422, - "y": 106 - }, - { - "x": 256.5, - "y": 126 - }, - { - "x": 256.5, - "y": 166 - } - ], - "isCurve": true, - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(a <-> e)[0]", - "src": "a", - "srcArrow": "triangle", - "dst": "e", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 226.25, - "y": 46.08599853515625 - }, - { - "x": 341.6499938964844, - "y": 102.01699829101562 - }, - { - "x": 370.5, - "y": 126 - }, - { - "x": 370.5, - "y": 166 - } - ], - "isCurve": true, - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(f <-> g)[0]", - "src": "f", - "srcArrow": "triangle", - "dst": "g", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 484, - "y": 66 - }, - { - "x": 484, - "y": 106 - }, - { - "x": 484, - "y": 126 - }, - { - "x": 484, - "y": 166 - } - ], - "isCurve": true, - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(x -- x)[0]", - "src": "x", - "srcArrow": "none", - "dst": "x", - "dstArrow": "none", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 624.666015625, - "y": 16 - }, - { - "x": 646.2659912109375, - "y": 3.1989998817443848 - }, - { - "x": 653, - "y": 0 - }, - { - "x": 655, - "y": 0 - }, - { - "x": 657, - "y": 0 - }, - { - "x": 659.666015625, - "y": 6.599999904632568 - }, - { - "x": 661.666015625, - "y": 16.5 - }, - { - "x": 663.666015625, - "y": 26.399999618530273 - }, - { - "x": 663.666015625, - "y": 39.599998474121094 - }, - { - "x": 661.666015625, - "y": 49.5 - }, - { - "x": 659.666015625, - "y": 59.400001525878906 - }, - { - "x": 646.2659912109375, - "y": 62.79999923706055 - }, - { - "x": 624.666015625, - "y": 50 - } - ], - "isCurve": true, - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - } - ], - "root": { - "id": "", - "type": "", - "pos": { - "x": 0, - "y": 0 - }, - "width": 0, - "height": 0, - "opacity": 0, - "strokeDash": 0, - "strokeWidth": 0, - "borderRadius": 0, - "fill": "N7", - "stroke": "", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "", - "fontSize": 0, - "fontFamily": "", - "language": "", - "color": "", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "zIndex": 0, - "level": 0 - } -} diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg deleted file mode 100644 index 8feb1399c..000000000 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/dagre/sketch.exp.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - -abcdefgx - - - - - - - - - - \ No newline at end of file diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json deleted file mode 100644 index 9eadf807d..000000000 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/board.exp.json +++ /dev/null @@ -1,653 +0,0 @@ -{ - "name": "", - "config": { - "sketch": true, - "themeID": null, - "darkThemeID": null, - "pad": null, - "center": null, - "layoutEngine": null - }, - "isFolderOnly": false, - "fontFamily": "HandDrawn", - "shapes": [ - { - "id": "a", - "type": "rectangle", - "pos": { - "x": 71, - "y": 12 - }, - "width": 160, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "a", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "b", - "type": "rectangle", - "pos": { - "x": 12, - "y": 208 - }, - "width": 55, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "b", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 10, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "c", - "type": "rectangle", - "pos": { - "x": 87, - "y": 208 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "c", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "d", - "type": "rectangle", - "pos": { - "x": 161, - "y": 208 - }, - "width": 55, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "d", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 10, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "e", - "type": "rectangle", - "pos": { - "x": 236, - "y": 208 - }, - "width": 53, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "e", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 8, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "f", - "type": "rectangle", - "pos": { - "x": 309, - "y": 12 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "f", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "g", - "type": "rectangle", - "pos": { - "x": 309, - "y": 208 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "g", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "x", - "type": "rectangle", - "pos": { - "x": 433, - "y": 12 - }, - "width": 54, - "height": 66, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B6", - "stroke": "B1", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "x", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 9, - "labelHeight": 21, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - } - ], - "connections": [ - { - "id": "(a <-> b)[0]", - "src": "a", - "srcArrow": "triangle", - "dst": "b", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 103.25, - "y": 78 - }, - { - "x": 103.25, - "y": 118 - }, - { - "x": 39.5, - "y": 118 - }, - { - "x": 39.5, - "y": 208 - } - ], - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(a <-> c)[0]", - "src": "a", - "srcArrow": "triangle", - "dst": "c", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 135.25, - "y": 78 - }, - { - "x": 135.25, - "y": 168 - }, - { - "x": 114, - "y": 168 - }, - { - "x": 114, - "y": 208 - } - ], - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(a <-> d)[0]", - "src": "a", - "srcArrow": "triangle", - "dst": "d", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 167.25, - "y": 78 - }, - { - "x": 167.25, - "y": 168 - }, - { - "x": 188.5, - "y": 168 - }, - { - "x": 188.5, - "y": 208 - } - ], - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(a <-> e)[0]", - "src": "a", - "srcArrow": "triangle", - "dst": "e", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 199.25, - "y": 78 - }, - { - "x": 199.25, - "y": 118 - }, - { - "x": 262.5, - "y": 118 - }, - { - "x": 262.5, - "y": 208 - } - ], - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(f <-> g)[0]", - "src": "f", - "srcArrow": "triangle", - "dst": "g", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 336, - "y": 78 - }, - { - "x": 336, - "y": 208 - } - ], - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(x -- x)[0]", - "src": "x", - "srcArrow": "none", - "dst": "x", - "dstArrow": "none", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 433, - "y": 34 - }, - { - "x": 383, - "y": 34 - }, - { - "x": 383, - "y": 56 - }, - { - "x": 433, - "y": 56 - } - ], - "animated": true, - "tooltip": "", - "icon": null, - "zIndex": 0 - } - ], - "root": { - "id": "", - "type": "", - "pos": { - "x": 0, - "y": 0 - }, - "width": 0, - "height": 0, - "opacity": 0, - "strokeDash": 0, - "strokeWidth": 0, - "borderRadius": 0, - "fill": "N7", - "stroke": "", - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "", - "fontSize": 0, - "fontFamily": "", - "language": "", - "color": "", - "italic": false, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "zIndex": 0, - "level": 0 - } -} diff --git a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg b/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg deleted file mode 100644 index 85a25830d..000000000 --- a/e2etests/testdata/txtar/bidirectional_connection_animation/elk/sketch.exp.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - -abcdefgx - - - - - - - - - - \ No newline at end of file From 4f996e90aa9546e2f84a7979db412ee207db3990 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Mon, 20 May 2024 13:07:18 -0400 Subject: [PATCH 091/109] update next.md --- ci/release/changelogs/next.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 2728467b1..2a14269f7 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -4,6 +4,7 @@ - Opacity 0 shapes no longer have a label mask which made any segment of connections going through them lower opacity [#1940](https://github.com/terrastruct/d2/pull/1940) - Bidirectional connections are now animated in opposite directions rather than one direction [#1939](https://github.com/terrastruct/d2/pull/1939) +- Animated connections in sketch mode are now generated in normal mode to fix imperfections in the path #### Bugfixes ⛑️ From b20fa51d4d463913db0a445568c075b7f1768990 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Mon, 20 May 2024 13:08:24 -0400 Subject: [PATCH 092/109] update next.md --- ci/release/changelogs/next.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 2a14269f7..e69beabcc 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -4,7 +4,7 @@ - Opacity 0 shapes no longer have a label mask which made any segment of connections going through them lower opacity [#1940](https://github.com/terrastruct/d2/pull/1940) - Bidirectional connections are now animated in opposite directions rather than one direction [#1939](https://github.com/terrastruct/d2/pull/1939) -- Animated connections in sketch mode are now generated in normal mode to fix imperfections in the path +- Animated connections in sketch mode are now generated in normal mode to fix imperfections in the path [#1944](https://github.com/terrastruct/d2/pull/1944) #### Bugfixes ⛑️ From 2a11e71dc95af3f5433cb215d206aa5707045134 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Mon, 20 May 2024 14:42:41 -0400 Subject: [PATCH 093/109] fixed comment --- d2renderers/d2sketch/sketch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2renderers/d2sketch/sketch.go b/d2renderers/d2sketch/sketch.go index ea768d948..edb8f547c 100644 --- a/d2renderers/d2sketch/sketch.go +++ b/d2renderers/d2sketch/sketch.go @@ -326,8 +326,8 @@ func Connection(r *Runner, connection d2target.Connection, path, attrs string) ( animatedClass = " animated-connection" } - // If connection is animated and bidirectional if connection.Animated { + // If connection is animated and bidirectional if (connection.DstArrow == d2target.NoArrowhead && connection.SrcArrow == d2target.NoArrowhead) || (connection.DstArrow != d2target.NoArrowhead && connection.SrcArrow != d2target.NoArrowhead) { // There is no pure CSS way to animate bidirectional connections in two directions, so we split it up path1, path2, err := svg.SplitPath(path, 0.5) From 4989a9590607d7d1076fce0be220474fcee606bb Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 23 May 2024 13:20:06 -0600 Subject: [PATCH 094/109] do not run imgbundler unnecessarily --- lib/imgbundler/imgbundler.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/imgbundler/imgbundler.go b/lib/imgbundler/imgbundler.go index 908b93b57..46352de3f 100644 --- a/lib/imgbundler/imgbundler.go +++ b/lib/imgbundler/imgbundler.go @@ -52,6 +52,10 @@ func bundle(ctx context.Context, l simplelog.Logger, inputPath string, svg []byt imgs := imageRegex.FindAllSubmatch(svg, -1) imgs = filterImageElements(imgs, isRemote) + if len(imgs) == 0 { + return svg, nil + } + ctx, cancel := context.WithTimeout(ctx, time.Minute*5) defer cancel() From 470bfaf25066028e72e05a56892f293380576f93 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Thu, 23 May 2024 15:47:50 -0400 Subject: [PATCH 095/109] removed change from next.md --- ci/release/changelogs/next.md | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index e69beabcc..2728467b1 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -4,7 +4,6 @@ - Opacity 0 shapes no longer have a label mask which made any segment of connections going through them lower opacity [#1940](https://github.com/terrastruct/d2/pull/1940) - Bidirectional connections are now animated in opposite directions rather than one direction [#1939](https://github.com/terrastruct/d2/pull/1939) -- Animated connections in sketch mode are now generated in normal mode to fix imperfections in the path [#1944](https://github.com/terrastruct/d2/pull/1944) #### Bugfixes ⛑️ From d285ef8db921706da2cfe3089b5601d37b2216b3 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sun, 26 May 2024 09:31:22 -0600 Subject: [PATCH 096/109] fix edge delete reserve in layer --- d2oracle/edit.go | 2 +- d2oracle/edit_test.go | 35 ++ .../TestDelete/edge-in-layer.exp.json | 489 ++++++++++++++++++ .../TestDelete/edge-out-layer.exp.json | 279 ++++++++++ 4 files changed, 804 insertions(+), 1 deletion(-) create mode 100644 testdata/d2oracle/TestDelete/edge-in-layer.exp.json create mode 100644 testdata/d2oracle/TestDelete/edge-out-layer.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 827942d7e..93a5e9f68 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -1265,7 +1265,7 @@ func deleteReserved(g *d2graph.Graph, boardPath []string, baseAST *d2ast.Map, mk if len(mk.Edges) == 1 { if mk.Key != nil { var ok bool - obj, ok = g.Root.HasChild(d2graph.Key(mk.Key)) + obj, ok = obj.HasChild(d2graph.Key(mk.Key)) if !ok { return g, nil } diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 072eac68d..ad9c8026a 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -7759,6 +7759,41 @@ layers: { a } } +`, + }, + { + name: "edge-out-layer", + + text: `x: { + a -> b +} +`, + key: `x.(a -> b)[0].style.stroke`, + exp: `x: { + a -> b +} +`, + }, + { + name: "edge-in-layer", + + text: `layers: { + test: { + x: { + a -> b + } + } +} +`, + boardPath: []string{"test"}, + key: `x.(a -> b)[0].style.stroke`, + exp: `layers: { + test: { + x: { + a -> b + } + } +} `, }, } diff --git a/testdata/d2oracle/TestDelete/edge-in-layer.exp.json b/testdata/d2oracle/TestDelete/edge-in-layer.exp.json new file mode 100644 index 000000000..7ca8459d9 --- /dev/null +++ b/testdata/d2oracle/TestDelete/edge-in-layer.exp.json @@ -0,0 +1,489 @@ +{ + "graph": { + "name": "", + "isFolderOnly": true, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,0:0:0-7:0:54", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,0:0:0-6:1:53", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,0:8:8-6:1:53", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,1:2:12-5:3:51", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,1:2:12-1:6:16", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,1:2:12-1:6:16", + "value": [ + { + "string": "test", + "raw_string": "test" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,1:8:18-5:3:51", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,2:4:24-4:5:47", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,2:4:24-2:5:25", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,2:4:24-2:5:25", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,2:7:27-4:5:47", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,3:6:35-3:12:41", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,3:6:35-3:12:41", + "src": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,3:6:35-3:7:36", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,3:6:35-3:7:36", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,3:11:40-3:12:41", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,3:11:40-3:12:41", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": null, + "layers": [ + { + "name": "test", + "isFolderOnly": false, + "ast": { + "range": ",1:0:0-2:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": ",1:0:0-2:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "edges": [ + { + "range": ",0:0:0-0:0:0", + "src": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,2:4:24-2:5:25", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,2:4:24-2:5:25", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,3:6:35-3:7:36", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,3:6:35-3:7:36", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,3:11:40-3:12:41", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-in-layer.d2,3:11:40-3:12:41", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestDelete/edge-out-layer.exp.json b/testdata/d2oracle/TestDelete/edge-out-layer.exp.json new file mode 100644 index 000000000..f71127261 --- /dev/null +++ b/testdata/d2oracle/TestDelete/edge-out-layer.exp.json @@ -0,0 +1,279 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,0:0:0-3:0:16", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,0:0:0-2:1:15", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,0:3:3-2:1:15", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,1:2:7-1:8:13", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,1:2:7-1:8:13", + "src": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,1:2:7-1:3:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,1:2:7-1:3:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,1:7:12-1:8:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,1:7:12-1:8:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,1:2:7-1:3:8", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,1:2:7-1:3:8", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,1:7:12-1:8:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-out-layer.d2,1:7:12-1:8:13", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From dcf14353805f2bc6242d0d78e513490b12c8988d Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 29 May 2024 11:39:03 -0600 Subject: [PATCH 097/109] fix delete with near in layer --- d2ir/d2ir.go | 7 +- d2oracle/edit.go | 19 +- d2oracle/edit_test.go | 42 ++++ .../d2oracle/TestCreate/layers-basic.exp.json | 2 +- .../TestCreate/layers-edge-duplicate.exp.json | 2 +- .../d2oracle/TestCreate/layers-edge.exp.json | 2 +- .../TestCreate/scenarios-basic.exp.json | 2 +- .../scenarios-edge-inherited.exp.json | 2 +- .../TestCreate/scenarios-edge.exp.json | 2 +- .../d2oracle/TestCreate/steps-basic.exp.json | 2 +- .../TestCreate/steps-conflict.exp.json | 2 +- .../d2oracle/TestCreate/steps-edge.exp.json | 2 +- .../delete-imported-layer-obj.exp.json | 2 +- .../TestDelete/delete-layer-style.exp.json | 2 +- .../TestDelete/delete-not-layer-obj.exp.json | 2 +- .../TestDelete/edge-in-layer.exp.json | 4 +- .../d2oracle/TestDelete/import/2.exp.json | 2 +- .../TestDelete/label-near-in-layer.exp.json | 222 ++++++++++++++++++ .../d2oracle/TestDelete/layers-basic.exp.json | 2 +- .../TestDelete/scenarios-basic.exp.json | 2 +- .../scenarios-edge-inherited.exp.json | 2 +- .../TestDelete/scenarios-inherited.exp.json | 2 +- .../TestDelete/update-near-in-layer.exp.json | 222 ++++++++++++++++++ .../d2oracle/TestMove/layers-basic.exp.json | 4 +- .../TestReconnectEdge/layers-basic.exp.json | 2 +- .../scenarios-basic.exp.json | 2 +- .../scenarios-outer-scope.exp.json | 2 +- .../d2oracle/TestRename/layers-basic.exp.json | 2 +- .../TestRename/scenarios-basic.exp.json | 2 +- .../TestRename/scenarios-conflict.exp.json | 2 +- testdata/d2oracle/TestSet/import/8.exp.json | 6 +- .../layers-unusable-ref-style.exp.json | 6 +- .../TestSet/layers-usable-ref-style.exp.json | 6 +- .../TestSet/scenarios-arrowhead.exp.json | 6 +- .../TestSet/scenarios-edge-set.exp.json | 6 +- .../scenarios-existing-edge-set.exp.json | 6 +- .../scenarios-label-primary-missing.exp.json | 6 +- .../TestSet/scenarios-label-primary.exp.json | 6 +- .../TestSet/scenarios-multiple.exp.json | 6 +- ...scenarios-nested-usable-ref-style.exp.json | 8 +- .../scenarios-unusable-ref-style.exp.json | 6 +- .../scenarios-usable-ref-style.exp.json | 6 +- 42 files changed, 569 insertions(+), 71 deletions(-) create mode 100644 testdata/d2oracle/TestDelete/label-near-in-layer.exp.json create mode 100644 testdata/d2oracle/TestDelete/update-near-in-layer.exp.json diff --git a/d2ir/d2ir.go b/d2ir/d2ir.go index c742a48f0..1ab518acc 100644 --- a/d2ir/d2ir.go +++ b/d2ir/d2ir.go @@ -1355,11 +1355,8 @@ func (m *Map) AST() d2ast.Node { if m == nil { return nil } - astMap := &d2ast.Map{} - if m.Root() { - astMap.Range = d2ast.MakeRange(",0:0:0-1:0:0") - } else { - astMap.Range = d2ast.MakeRange(",1:0:0-2:0:0") + astMap := &d2ast.Map{ + Range: d2ast.MakeRange(",0:0:0-1:0:0"), } for _, f := range m.Fields { astMap.Nodes = append(astMap.Nodes, d2ast.MakeMapNodeBox(f.AST().(d2ast.MapNode))) diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 93a5e9f68..ce2410349 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -981,7 +981,10 @@ func Delete(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, return recompile(boardG) } - prevG, _ := recompile(boardG) + prevG, err := recompile(boardG) + if err != nil { + return nil, err + } obj, ok := boardG.Root.HasChild(d2graph.Key(mk.Key)) if !ok { @@ -1758,7 +1761,10 @@ func move(g *d2graph.Graph, boardPath []string, key, newKey string, includeDesce return recompile(g) } - prevG, _ := recompile(boardG) + prevG, err := recompile(boardG) + if err != nil { + return nil, err + } ak := d2graph.Key(mk.Key) ak2 := d2graph.Key(mk2.Key) @@ -2282,8 +2288,17 @@ func updateNear(prevG, g *d2graph.Graph, from, to *string, includeDescendants bo if len(n.MapKey.Key.Path) == 0 { continue } + if len(n.MapKey.Key.Path) > 1 { + if n.MapKey.Key.Path[len(n.MapKey.Key.Path)-2].Unbox().ScalarString() == "label" || + n.MapKey.Key.Path[len(n.MapKey.Key.Path)-2].Unbox().ScalarString() == "icon" { + continue + } + } if n.MapKey.Key.Path[len(n.MapKey.Key.Path)-1].Unbox().ScalarString() == "near" { k := n.MapKey.Value.ScalarBox().Unbox().ScalarString() + if _, ok := d2graph.NearConstants[k]; ok { + continue + } if strings.EqualFold(k, *from) && to == nil { deleteFromMap(obj.Map, n.MapKey) } else { diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index ad9c8026a..cda153960 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -7794,6 +7794,48 @@ layers: { } } } +`, + }, + { + name: "label-near-in-layer", + + text: `layers: { + x: { + y: { + label.near: center-center + } + a + } +} +`, + boardPath: []string{"x"}, + key: `y`, + exp: `layers: { + x: { + a + } +} +`, + }, + { + name: "update-near-in-layer", + + text: `layers: { + x: { + y: { + near: a + } + a + } +} +`, + boardPath: []string{"x"}, + key: `y`, + exp: `layers: { + x: { + a + } +} `, }, } diff --git a/testdata/d2oracle/TestCreate/layers-basic.exp.json b/testdata/d2oracle/TestCreate/layers-basic.exp.json index 202a1fdf8..fd96eec76 100644 --- a/testdata/d2oracle/TestCreate/layers-basic.exp.json +++ b/testdata/d2oracle/TestCreate/layers-basic.exp.json @@ -210,7 +210,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestCreate/layers-edge-duplicate.exp.json b/testdata/d2oracle/TestCreate/layers-edge-duplicate.exp.json index 6ed250186..3d0e35b9f 100644 --- a/testdata/d2oracle/TestCreate/layers-edge-duplicate.exp.json +++ b/testdata/d2oracle/TestCreate/layers-edge-duplicate.exp.json @@ -355,7 +355,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestCreate/layers-edge.exp.json b/testdata/d2oracle/TestCreate/layers-edge.exp.json index 71fd6031a..d21cbdf87 100644 --- a/testdata/d2oracle/TestCreate/layers-edge.exp.json +++ b/testdata/d2oracle/TestCreate/layers-edge.exp.json @@ -233,7 +233,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestCreate/scenarios-basic.exp.json b/testdata/d2oracle/TestCreate/scenarios-basic.exp.json index 44f44d42a..e6f6e4791 100644 --- a/testdata/d2oracle/TestCreate/scenarios-basic.exp.json +++ b/testdata/d2oracle/TestCreate/scenarios-basic.exp.json @@ -278,7 +278,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestCreate/scenarios-edge-inherited.exp.json b/testdata/d2oracle/TestCreate/scenarios-edge-inherited.exp.json index 7d4a47a62..bf7c7c758 100644 --- a/testdata/d2oracle/TestCreate/scenarios-edge-inherited.exp.json +++ b/testdata/d2oracle/TestCreate/scenarios-edge-inherited.exp.json @@ -332,7 +332,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestCreate/scenarios-edge.exp.json b/testdata/d2oracle/TestCreate/scenarios-edge.exp.json index ed4cf7c75..090920158 100644 --- a/testdata/d2oracle/TestCreate/scenarios-edge.exp.json +++ b/testdata/d2oracle/TestCreate/scenarios-edge.exp.json @@ -301,7 +301,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestCreate/steps-basic.exp.json b/testdata/d2oracle/TestCreate/steps-basic.exp.json index 1d1ef21ff..394b6c479 100644 --- a/testdata/d2oracle/TestCreate/steps-basic.exp.json +++ b/testdata/d2oracle/TestCreate/steps-basic.exp.json @@ -278,7 +278,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestCreate/steps-conflict.exp.json b/testdata/d2oracle/TestCreate/steps-conflict.exp.json index 5f561da19..faa16fc82 100644 --- a/testdata/d2oracle/TestCreate/steps-conflict.exp.json +++ b/testdata/d2oracle/TestCreate/steps-conflict.exp.json @@ -278,7 +278,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestCreate/steps-edge.exp.json b/testdata/d2oracle/TestCreate/steps-edge.exp.json index d97d8265a..3298522ab 100644 --- a/testdata/d2oracle/TestCreate/steps-edge.exp.json +++ b/testdata/d2oracle/TestCreate/steps-edge.exp.json @@ -301,7 +301,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestDelete/delete-imported-layer-obj.exp.json b/testdata/d2oracle/TestDelete/delete-imported-layer-obj.exp.json index 30afa7877..108e9f705 100644 --- a/testdata/d2oracle/TestDelete/delete-imported-layer-obj.exp.json +++ b/testdata/d2oracle/TestDelete/delete-imported-layer-obj.exp.json @@ -142,7 +142,7 @@ "name": "x", "isFolderOnly": true, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": null }, "root": { diff --git a/testdata/d2oracle/TestDelete/delete-layer-style.exp.json b/testdata/d2oracle/TestDelete/delete-layer-style.exp.json index 20456afbb..4756b825d 100644 --- a/testdata/d2oracle/TestDelete/delete-layer-style.exp.json +++ b/testdata/d2oracle/TestDelete/delete-layer-style.exp.json @@ -118,7 +118,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestDelete/delete-not-layer-obj.exp.json b/testdata/d2oracle/TestDelete/delete-not-layer-obj.exp.json index 37074912a..6471d0958 100644 --- a/testdata/d2oracle/TestDelete/delete-not-layer-obj.exp.json +++ b/testdata/d2oracle/TestDelete/delete-not-layer-obj.exp.json @@ -187,7 +187,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestDelete/edge-in-layer.exp.json b/testdata/d2oracle/TestDelete/edge-in-layer.exp.json index 7ca8459d9..403548280 100644 --- a/testdata/d2oracle/TestDelete/edge-in-layer.exp.json +++ b/testdata/d2oracle/TestDelete/edge-in-layer.exp.json @@ -170,7 +170,7 @@ "name": "test", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -193,7 +193,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestDelete/import/2.exp.json b/testdata/d2oracle/TestDelete/import/2.exp.json index cb388a8be..03dae3eb1 100644 --- a/testdata/d2oracle/TestDelete/import/2.exp.json +++ b/testdata/d2oracle/TestDelete/import/2.exp.json @@ -256,7 +256,7 @@ "name": "y", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestDelete/label-near-in-layer.exp.json b/testdata/d2oracle/TestDelete/label-near-in-layer.exp.json new file mode 100644 index 000000000..28bc88fa7 --- /dev/null +++ b/testdata/d2oracle/TestDelete/label-near-in-layer.exp.json @@ -0,0 +1,222 @@ +{ + "graph": { + "name": "", + "isFolderOnly": true, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,0:0:0-5:0:29", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,0:0:0-4:1:28", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,0:8:8-4:1:28", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,1:2:12-3:3:26", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,1:2:12-1:3:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,1:2:12-1:3:13", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,1:5:15-3:3:26", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,2:4:21-2:5:22", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,2:4:21-2:5:22", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,2:4:21-2:5:22", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": null, + "layers": [ + { + "name": "x", + "isFolderOnly": false, + "ast": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,2:4:21-2:5:22", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/label-near-in-layer.d2,2:4:21-2:5:22", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestDelete/layers-basic.exp.json b/testdata/d2oracle/TestDelete/layers-basic.exp.json index 9278c3367..b8f5f3fce 100644 --- a/testdata/d2oracle/TestDelete/layers-basic.exp.json +++ b/testdata/d2oracle/TestDelete/layers-basic.exp.json @@ -187,7 +187,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestDelete/scenarios-basic.exp.json b/testdata/d2oracle/TestDelete/scenarios-basic.exp.json index 987593d7c..40a69618b 100644 --- a/testdata/d2oracle/TestDelete/scenarios-basic.exp.json +++ b/testdata/d2oracle/TestDelete/scenarios-basic.exp.json @@ -187,7 +187,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestDelete/scenarios-edge-inherited.exp.json b/testdata/d2oracle/TestDelete/scenarios-edge-inherited.exp.json index 6672e7686..51771025c 100644 --- a/testdata/d2oracle/TestDelete/scenarios-edge-inherited.exp.json +++ b/testdata/d2oracle/TestDelete/scenarios-edge-inherited.exp.json @@ -364,7 +364,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestDelete/scenarios-inherited.exp.json b/testdata/d2oracle/TestDelete/scenarios-inherited.exp.json index 1ce389a36..26752dc82 100644 --- a/testdata/d2oracle/TestDelete/scenarios-inherited.exp.json +++ b/testdata/d2oracle/TestDelete/scenarios-inherited.exp.json @@ -237,7 +237,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestDelete/update-near-in-layer.exp.json b/testdata/d2oracle/TestDelete/update-near-in-layer.exp.json new file mode 100644 index 000000000..c30b0d330 --- /dev/null +++ b/testdata/d2oracle/TestDelete/update-near-in-layer.exp.json @@ -0,0 +1,222 @@ +{ + "graph": { + "name": "", + "isFolderOnly": true, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,0:0:0-5:0:29", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,0:0:0-4:1:28", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,0:0:0-0:6:6", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,0:8:8-4:1:28", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,1:2:12-3:3:26", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,1:2:12-1:3:13", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,1:2:12-1:3:13", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,1:5:15-3:3:26", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,2:4:21-2:5:22", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,2:4:21-2:5:22", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,2:4:21-2:5:22", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": null, + "layers": [ + { + "name": "x", + "isFolderOnly": false, + "ast": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,2:4:21-2:5:22", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/update-near-in-layer.d2,2:4:21-2:5:22", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestMove/layers-basic.exp.json b/testdata/d2oracle/TestMove/layers-basic.exp.json index bf5bea56b..1ebf31684 100644 --- a/testdata/d2oracle/TestMove/layers-basic.exp.json +++ b/testdata/d2oracle/TestMove/layers-basic.exp.json @@ -216,7 +216,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -239,7 +239,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestReconnectEdge/layers-basic.exp.json b/testdata/d2oracle/TestReconnectEdge/layers-basic.exp.json index 6e537fb03..9a8fbf16b 100644 --- a/testdata/d2oracle/TestReconnectEdge/layers-basic.exp.json +++ b/testdata/d2oracle/TestReconnectEdge/layers-basic.exp.json @@ -256,7 +256,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestReconnectEdge/scenarios-basic.exp.json b/testdata/d2oracle/TestReconnectEdge/scenarios-basic.exp.json index 983bd873c..9f986050c 100644 --- a/testdata/d2oracle/TestReconnectEdge/scenarios-basic.exp.json +++ b/testdata/d2oracle/TestReconnectEdge/scenarios-basic.exp.json @@ -256,7 +256,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestReconnectEdge/scenarios-outer-scope.exp.json b/testdata/d2oracle/TestReconnectEdge/scenarios-outer-scope.exp.json index 0f368f97c..2e1e86126 100644 --- a/testdata/d2oracle/TestReconnectEdge/scenarios-outer-scope.exp.json +++ b/testdata/d2oracle/TestReconnectEdge/scenarios-outer-scope.exp.json @@ -233,7 +233,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestRename/layers-basic.exp.json b/testdata/d2oracle/TestRename/layers-basic.exp.json index 043603d54..3ed3c1f79 100644 --- a/testdata/d2oracle/TestRename/layers-basic.exp.json +++ b/testdata/d2oracle/TestRename/layers-basic.exp.json @@ -187,7 +187,7 @@ "name": "y", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestRename/scenarios-basic.exp.json b/testdata/d2oracle/TestRename/scenarios-basic.exp.json index 6e32f9fd3..3189b8434 100644 --- a/testdata/d2oracle/TestRename/scenarios-basic.exp.json +++ b/testdata/d2oracle/TestRename/scenarios-basic.exp.json @@ -187,7 +187,7 @@ "name": "y", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestRename/scenarios-conflict.exp.json b/testdata/d2oracle/TestRename/scenarios-conflict.exp.json index 3d7328605..0a968b476 100644 --- a/testdata/d2oracle/TestRename/scenarios-conflict.exp.json +++ b/testdata/d2oracle/TestRename/scenarios-conflict.exp.json @@ -187,7 +187,7 @@ "name": "y", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/import/8.exp.json b/testdata/d2oracle/TestSet/import/8.exp.json index 6c3a722e8..c4e4373ba 100644 --- a/testdata/d2oracle/TestSet/import/8.exp.json +++ b/testdata/d2oracle/TestSet/import/8.exp.json @@ -239,7 +239,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -262,7 +262,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -285,7 +285,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/layers-unusable-ref-style.exp.json b/testdata/d2oracle/TestSet/layers-unusable-ref-style.exp.json index b6e8eafa6..39dd972b0 100644 --- a/testdata/d2oracle/TestSet/layers-unusable-ref-style.exp.json +++ b/testdata/d2oracle/TestSet/layers-unusable-ref-style.exp.json @@ -238,7 +238,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -283,7 +283,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -306,7 +306,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/layers-usable-ref-style.exp.json b/testdata/d2oracle/TestSet/layers-usable-ref-style.exp.json index fc68d6cdf..157eadec4 100644 --- a/testdata/d2oracle/TestSet/layers-usable-ref-style.exp.json +++ b/testdata/d2oracle/TestSet/layers-usable-ref-style.exp.json @@ -233,7 +233,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -256,7 +256,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -279,7 +279,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/scenarios-arrowhead.exp.json b/testdata/d2oracle/TestSet/scenarios-arrowhead.exp.json index 168961d59..6227312a5 100644 --- a/testdata/d2oracle/TestSet/scenarios-arrowhead.exp.json +++ b/testdata/d2oracle/TestSet/scenarios-arrowhead.exp.json @@ -644,7 +644,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -821,7 +821,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -844,7 +844,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/scenarios-edge-set.exp.json b/testdata/d2oracle/TestSet/scenarios-edge-set.exp.json index 8ea7ca279..681028ae3 100644 --- a/testdata/d2oracle/TestSet/scenarios-edge-set.exp.json +++ b/testdata/d2oracle/TestSet/scenarios-edge-set.exp.json @@ -370,7 +370,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -481,7 +481,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -504,7 +504,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/scenarios-existing-edge-set.exp.json b/testdata/d2oracle/TestSet/scenarios-existing-edge-set.exp.json index 0294a412c..5f85a1b48 100644 --- a/testdata/d2oracle/TestSet/scenarios-existing-edge-set.exp.json +++ b/testdata/d2oracle/TestSet/scenarios-existing-edge-set.exp.json @@ -378,7 +378,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -533,7 +533,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -556,7 +556,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/scenarios-label-primary-missing.exp.json b/testdata/d2oracle/TestSet/scenarios-label-primary-missing.exp.json index 9dd6fd8f1..cef4033e3 100644 --- a/testdata/d2oracle/TestSet/scenarios-label-primary-missing.exp.json +++ b/testdata/d2oracle/TestSet/scenarios-label-primary-missing.exp.json @@ -270,7 +270,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -303,7 +303,7 @@ }, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -326,7 +326,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/scenarios-label-primary.exp.json b/testdata/d2oracle/TestSet/scenarios-label-primary.exp.json index 8399c247e..532add34b 100644 --- a/testdata/d2oracle/TestSet/scenarios-label-primary.exp.json +++ b/testdata/d2oracle/TestSet/scenarios-label-primary.exp.json @@ -293,7 +293,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -326,7 +326,7 @@ }, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -349,7 +349,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/scenarios-multiple.exp.json b/testdata/d2oracle/TestSet/scenarios-multiple.exp.json index 66e45390d..f49af2dfc 100644 --- a/testdata/d2oracle/TestSet/scenarios-multiple.exp.json +++ b/testdata/d2oracle/TestSet/scenarios-multiple.exp.json @@ -293,7 +293,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -316,7 +316,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -339,7 +339,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/scenarios-nested-usable-ref-style.exp.json b/testdata/d2oracle/TestSet/scenarios-nested-usable-ref-style.exp.json index 10d0c34ab..b201b16cc 100644 --- a/testdata/d2oracle/TestSet/scenarios-nested-usable-ref-style.exp.json +++ b/testdata/d2oracle/TestSet/scenarios-nested-usable-ref-style.exp.json @@ -356,7 +356,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -379,7 +379,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -412,7 +412,7 @@ }, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -435,7 +435,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/scenarios-unusable-ref-style.exp.json b/testdata/d2oracle/TestSet/scenarios-unusable-ref-style.exp.json index 1b3c4bce4..8b8ef383c 100644 --- a/testdata/d2oracle/TestSet/scenarios-unusable-ref-style.exp.json +++ b/testdata/d2oracle/TestSet/scenarios-unusable-ref-style.exp.json @@ -238,7 +238,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -261,7 +261,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -284,7 +284,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2oracle/TestSet/scenarios-usable-ref-style.exp.json b/testdata/d2oracle/TestSet/scenarios-usable-ref-style.exp.json index 446504d3b..c99418180 100644 --- a/testdata/d2oracle/TestSet/scenarios-usable-ref-style.exp.json +++ b/testdata/d2oracle/TestSet/scenarios-usable-ref-style.exp.json @@ -253,7 +253,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -286,7 +286,7 @@ }, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -309,7 +309,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { From 798182eb78581f307084df3c576779c88d0410e2 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 29 May 2024 11:49:50 -0600 Subject: [PATCH 098/109] ta=1 --- .../TestCompile/link-board-key-nested.exp.json | 2 +- .../TestCompile/link-board-mixed.exp.json | 8 ++++---- .../TestCompile/link-board-nested.exp.json | 8 ++++---- .../TestCompile/link-board-ok.exp.json | 2 +- .../TestCompile/link-board-underscore.exp.json | 16 ++++++++-------- .../boards/isFolderOnly-shapes.exp.json | 2 +- .../TestCompile2/boards/isFolderOnly.exp.json | 18 +++++++++--------- .../boards/no-inherit-label.exp.json | 2 +- .../TestCompile2/boards/recursive.exp.json | 14 +++++++------- .../TestCompile2/boards/root.exp.json | 4 ++-- .../boards/scenarios_edge_index.exp.json | 6 +++--- .../alixander-lazy-globs-review/1.exp.json | 6 +++--- .../alixander-lazy-globs-review/2.exp.json | 10 +++++----- .../nulls/multiboard/scenario.exp.json | 2 +- .../TestCompile2/vars/boards/layer-2.exp.json | 4 ++-- .../TestCompile2/vars/boards/layer.exp.json | 2 +- .../TestCompile2/vars/boards/overlay.exp.json | 8 ++++---- .../TestCompile2/vars/boards/replace.exp.json | 4 ++-- .../TestCompile2/vars/boards/scenario.exp.json | 4 ++-- 19 files changed, 61 insertions(+), 61 deletions(-) diff --git a/testdata/d2compiler/TestCompile/link-board-key-nested.exp.json b/testdata/d2compiler/TestCompile/link-board-key-nested.exp.json index 971dbe905..7b906e66c 100644 --- a/testdata/d2compiler/TestCompile/link-board-key-nested.exp.json +++ b/testdata/d2compiler/TestCompile/link-board-key-nested.exp.json @@ -296,7 +296,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile/link-board-mixed.exp.json b/testdata/d2compiler/TestCompile/link-board-mixed.exp.json index 04736c781..739e2f29f 100644 --- a/testdata/d2compiler/TestCompile/link-board-mixed.exp.json +++ b/testdata/d2compiler/TestCompile/link-board-mixed.exp.json @@ -421,7 +421,7 @@ "name": "cat", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -677,7 +677,7 @@ "name": "green", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -710,7 +710,7 @@ }, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -764,7 +764,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile/link-board-nested.exp.json b/testdata/d2compiler/TestCompile/link-board-nested.exp.json index 54bf396b1..1107c09ff 100644 --- a/testdata/d2compiler/TestCompile/link-board-nested.exp.json +++ b/testdata/d2compiler/TestCompile/link-board-nested.exp.json @@ -280,7 +280,7 @@ "name": "x", "isFolderOnly": true, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -303,7 +303,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -326,7 +326,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -392,7 +392,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile/link-board-ok.exp.json b/testdata/d2compiler/TestCompile/link-board-ok.exp.json index f092c5be6..4548844ea 100644 --- a/testdata/d2compiler/TestCompile/link-board-ok.exp.json +++ b/testdata/d2compiler/TestCompile/link-board-ok.exp.json @@ -222,7 +222,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile/link-board-underscore.exp.json b/testdata/d2compiler/TestCompile/link-board-underscore.exp.json index 58829cf3d..fb21164d4 100644 --- a/testdata/d2compiler/TestCompile/link-board-underscore.exp.json +++ b/testdata/d2compiler/TestCompile/link-board-underscore.exp.json @@ -333,7 +333,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -378,7 +378,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -401,7 +401,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -424,7 +424,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -483,7 +483,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -609,7 +609,7 @@ "name": "x", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -632,7 +632,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -691,7 +691,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/boards/isFolderOnly-shapes.exp.json b/testdata/d2compiler/TestCompile2/boards/isFolderOnly-shapes.exp.json index 3205a49da..cd20cadf7 100644 --- a/testdata/d2compiler/TestCompile2/boards/isFolderOnly-shapes.exp.json +++ b/testdata/d2compiler/TestCompile2/boards/isFolderOnly-shapes.exp.json @@ -151,7 +151,7 @@ "name": "1", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/boards/isFolderOnly.exp.json b/testdata/d2compiler/TestCompile2/boards/isFolderOnly.exp.json index 75999c067..f62edd25b 100644 --- a/testdata/d2compiler/TestCompile2/boards/isFolderOnly.exp.json +++ b/testdata/d2compiler/TestCompile2/boards/isFolderOnly.exp.json @@ -318,7 +318,7 @@ "name": "one", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -420,7 +420,7 @@ "name": "two", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -465,7 +465,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -488,7 +488,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -538,7 +538,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -583,7 +583,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -710,7 +710,7 @@ "name": "seinfeld", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -812,7 +812,7 @@ "name": "missoula", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -857,7 +857,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/boards/no-inherit-label.exp.json b/testdata/d2compiler/TestCompile2/boards/no-inherit-label.exp.json index bfffea2c7..54890fce4 100644 --- a/testdata/d2compiler/TestCompile2/boards/no-inherit-label.exp.json +++ b/testdata/d2compiler/TestCompile2/boards/no-inherit-label.exp.json @@ -151,7 +151,7 @@ "name": "1", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/boards/recursive.exp.json b/testdata/d2compiler/TestCompile2/boards/recursive.exp.json index 7d087020c..8324c327d 100644 --- a/testdata/d2compiler/TestCompile2/boards/recursive.exp.json +++ b/testdata/d2compiler/TestCompile2/boards/recursive.exp.json @@ -372,7 +372,7 @@ "name": "one", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -474,7 +474,7 @@ "name": "two", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -519,7 +519,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -542,7 +542,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -614,7 +614,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -770,7 +770,7 @@ "name": "seinfeld", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -939,7 +939,7 @@ "name": "missoula", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/boards/root.exp.json b/testdata/d2compiler/TestCompile2/boards/root.exp.json index ae5deb1ec..d610fe2e0 100644 --- a/testdata/d2compiler/TestCompile2/boards/root.exp.json +++ b/testdata/d2compiler/TestCompile2/boards/root.exp.json @@ -239,7 +239,7 @@ "name": "one", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -341,7 +341,7 @@ "name": "two", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/boards/scenarios_edge_index.exp.json b/testdata/d2compiler/TestCompile2/boards/scenarios_edge_index.exp.json index 1310e7d72..4fa49ab8b 100644 --- a/testdata/d2compiler/TestCompile2/boards/scenarios_edge_index.exp.json +++ b/testdata/d2compiler/TestCompile2/boards/scenarios_edge_index.exp.json @@ -347,7 +347,7 @@ "name": "1", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -436,7 +436,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -459,7 +459,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.exp.json b/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.exp.json index c3895ff2c..9d857a0fc 100644 --- a/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.exp.json +++ b/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/1.exp.json @@ -436,7 +436,7 @@ "name": "next", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -459,7 +459,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -482,7 +482,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.exp.json b/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.exp.json index a2f7e9adc..24f29b12f 100644 --- a/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.exp.json +++ b/testdata/d2compiler/TestCompile2/globs/alixander-lazy-globs-review/2.exp.json @@ -201,7 +201,7 @@ "name": "b", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -224,7 +224,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -247,7 +247,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -312,7 +312,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -335,7 +335,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/nulls/multiboard/scenario.exp.json b/testdata/d2compiler/TestCompile2/nulls/multiboard/scenario.exp.json index 821e51b86..4e804caff 100644 --- a/testdata/d2compiler/TestCompile2/nulls/multiboard/scenario.exp.json +++ b/testdata/d2compiler/TestCompile2/nulls/multiboard/scenario.exp.json @@ -191,7 +191,7 @@ "name": "a", "isFolderOnly": true, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": null }, "root": { diff --git a/testdata/d2compiler/TestCompile2/vars/boards/layer-2.exp.json b/testdata/d2compiler/TestCompile2/vars/boards/layer-2.exp.json index 7f72e74ba..deafde506 100644 --- a/testdata/d2compiler/TestCompile2/vars/boards/layer-2.exp.json +++ b/testdata/d2compiler/TestCompile2/vars/boards/layer-2.exp.json @@ -348,7 +348,7 @@ "name": "l", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -371,7 +371,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/vars/boards/layer.exp.json b/testdata/d2compiler/TestCompile2/vars/boards/layer.exp.json index 4306c2469..651a8f2ec 100644 --- a/testdata/d2compiler/TestCompile2/vars/boards/layer.exp.json +++ b/testdata/d2compiler/TestCompile2/vars/boards/layer.exp.json @@ -205,7 +205,7 @@ "name": "l", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/vars/boards/overlay.exp.json b/testdata/d2compiler/TestCompile2/vars/boards/overlay.exp.json index 6dcdda361..0344bf673 100644 --- a/testdata/d2compiler/TestCompile2/vars/boards/overlay.exp.json +++ b/testdata/d2compiler/TestCompile2/vars/boards/overlay.exp.json @@ -531,7 +531,7 @@ "name": "l2", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -554,7 +554,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -782,7 +782,7 @@ "name": "l", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -805,7 +805,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/vars/boards/replace.exp.json b/testdata/d2compiler/TestCompile2/vars/boards/replace.exp.json index 1ade3446e..a43035991 100644 --- a/testdata/d2compiler/TestCompile2/vars/boards/replace.exp.json +++ b/testdata/d2compiler/TestCompile2/vars/boards/replace.exp.json @@ -267,7 +267,7 @@ "name": "l", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -290,7 +290,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { diff --git a/testdata/d2compiler/TestCompile2/vars/boards/scenario.exp.json b/testdata/d2compiler/TestCompile2/vars/boards/scenario.exp.json index b529b2127..3e7cfeca1 100644 --- a/testdata/d2compiler/TestCompile2/vars/boards/scenario.exp.json +++ b/testdata/d2compiler/TestCompile2/vars/boards/scenario.exp.json @@ -205,7 +205,7 @@ "name": "l", "isFolderOnly": false, "ast": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { @@ -228,7 +228,7 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-2:0:0", + "range": ",0:0:0-1:0:0", "nodes": [ { "map_key": { From 65a865355aa3190afd87f7b3197f8089fefe82e0 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 30 May 2024 16:25:37 -0700 Subject: [PATCH 099/109] add 2 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index dcbb5846d..41b472a74 100644 --- a/README.md +++ b/README.md @@ -293,6 +293,9 @@ this selected list of featured projects using D2. - [ElasticSearch](https://github.com/elastic/beats/blob/main/libbeat/publisher/queue/proxy/diagrams/broker.d2) - [Sourcegraph](https://handbook.sourcegraph.com/departments/engineering/managed-services/telemetry-gateway/#dev-architecture-diagram) - [Temporal](https://github.com/temporalio/temporal/blob/0be2681c994470c7c61ea88e4fcef89bb4024e58/docs/_assets/matching-context.d2) +- [Tauri](https://v2.tauri.app/concept/inter-process-communication/) + - Rust GUI framework (78.5k stars) +- [Intellij](https://github.com/JetBrains/intellij-community/blob/45bcfc17a3f3e0d8548bc69e922d4ca97ac21b2b/platform/settings/docs/topics/overview.md) - [Coder](https://coder.com/blog/managing-templates-in-coder) - [UC Berkeley](https://github.com/ucb-bar/hammer/blob/2b5c04d7b7d9ee3c73575efcd7ee0698bd5bfa88/doc/Hammer-Use/hier.d2) From 15ba701576b3c6b2bec03dc26b74e7284e68441f Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 3 Jun 2024 13:11:45 -0600 Subject: [PATCH 100/109] d2oracle: glob null edges --- d2ir/compile.go | 7 +- d2ir/pattern_test.go | 12 + .../patterns/edge-glob-null.exp.json | 473 ++++++++++++++++++ 3 files changed, 491 insertions(+), 1 deletion(-) create mode 100644 testdata/d2ir/TestCompile/patterns/edge-glob-null.exp.json diff --git a/d2ir/compile.go b/d2ir/compile.go index 273637a9d..6d5145b53 100644 --- a/d2ir/compile.go +++ b/d2ir/compile.go @@ -991,7 +991,7 @@ func (c *compiler) compileEdges(refctx *RefContext) { func (c *compiler) _compileEdges(refctx *RefContext) { eida := NewEdgeIDs(refctx.Key) for i, eid := range eida { - if refctx.Key != nil && refctx.Key.Value.Null != nil { + if !eid.Glob && (refctx.Key.Primary.Null != nil || refctx.Key.Value.Null != nil) { refctx.ScopeMap.DeleteEdge(eid) continue } @@ -1016,6 +1016,11 @@ func (c *compiler) _compileEdges(refctx *RefContext) { }) refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Src, refctx, c) refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Dst, refctx, c) + + if refctx.Key.Primary.Null != nil || refctx.Key.Value.Null != nil { + refctx.ScopeMap.DeleteEdge(e.ID) + continue + } } } else { var err error diff --git a/d2ir/pattern_test.go b/d2ir/pattern_test.go index 941db0785..a8a835f2c 100644 --- a/d2ir/pattern_test.go +++ b/d2ir/pattern_test.go @@ -310,6 +310,18 @@ layers.x: { wrapper.p } assertQuery(t, m, 0, 0, nil, "layers.x.wrapper.p") }, }, + { + name: "edge-glob-null", + run: func(t testing.TB) { + m, err := compile(t, `a -> b +(* -> *)[*]: null +x -> y +`) + assert.Success(t, err) + // 4 fields and 0 edges + assertQuery(t, m, 4, 0, nil, "") + }, + }, { name: "double-glob/edge/1", run: func(t testing.TB) { diff --git a/testdata/d2ir/TestCompile/patterns/edge-glob-null.exp.json b/testdata/d2ir/TestCompile/patterns/edge-glob-null.exp.json new file mode 100644 index 000000000..a61325deb --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/edge-glob-null.exp.json @@ -0,0 +1,473 @@ +{ + "fields": [ + { + "name": "a", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "b", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:6:6", + "src": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:6:31", + "src": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:6:31", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:6:31", + "src": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "y", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:6:31", + "src": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:6:31", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:6:31", + "src": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:0:25-2:1:26", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-null.d2,2:5:30-2:6:31", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": [] +} From b2451eb30c7a2d2d9ca135b629bce49a055d718e Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 3 Jun 2024 13:18:20 -0600 Subject: [PATCH 101/109] fix d2chaos --- d2chaos/d2chaos.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2chaos/d2chaos.go b/d2chaos/d2chaos.go index 42445a974..337ac24ae 100644 --- a/d2chaos/d2chaos.go +++ b/d2chaos/d2chaos.go @@ -269,7 +269,7 @@ func (gs *dslGenState) randStr(n int, inKey bool) string { func (gs *dslGenState) randShape() string { for { s := shapes[gs.rand.Intn(len(shapes))] - if s != d2target.ShapeImage { + if s != d2target.ShapeImage && s != d2target.ShapeText { return s } } From 65a3dadfbaf7fcf6dfa69049444a15f9b9e99bf4 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 3 Jun 2024 13:27:33 -0600 Subject: [PATCH 102/109] move up --- d2ir/compile.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/d2ir/compile.go b/d2ir/compile.go index 6d5145b53..c147daf36 100644 --- a/d2ir/compile.go +++ b/d2ir/compile.go @@ -1009,6 +1009,10 @@ func (c *compiler) _compileEdges(refctx *RefContext) { continue } for _, e := range ea { + if refctx.Key.Primary.Null != nil || refctx.Key.Value.Null != nil { + refctx.ScopeMap.DeleteEdge(e.ID) + continue + } e.References = append(e.References, &EdgeReference{ Context_: refctx, DueToGlob_: len(c.globRefContextStack) > 0, @@ -1016,11 +1020,6 @@ func (c *compiler) _compileEdges(refctx *RefContext) { }) refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Src, refctx, c) refctx.ScopeMap.appendFieldReferences(0, refctx.Edge.Dst, refctx, c) - - if refctx.Key.Primary.Null != nil || refctx.Key.Value.Null != nil { - refctx.ScopeMap.DeleteEdge(e.ID) - continue - } } } else { var err error From abc03ae616635cddcb6ad276d5fe5572135e68b8 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sat, 1 Jun 2024 23:12:30 -0700 Subject: [PATCH 103/109] add test --- d2oracle/edit_test.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index cda153960..798d1d0d3 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -2518,6 +2518,38 @@ x -> a.b -> a.b.c # hi style.stroke: green } +`, + }, + { + name: "scenario-grandchild", + + text: `a -> b + +scenarios: { + x: { + scenarios: { + c: { + (a -> b)[0].style.bold: true + } + } + } +} +`, + key: `(a -> b)[0].style.stroke-width`, + value: go2.Pointer(`3`), + boardPath: []string{"x", "c"}, + exp: `a -> b + +scenarios: { + x: { + scenarios: { + c: { + (a -> b)[0].style.bold: true + (a -> b)[0].style.stroke-width: 3 + } + } + } +} `, }, } From 613980ef69420f72dea676bd568389e5c5f3e392 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sun, 2 Jun 2024 20:31:42 -0700 Subject: [PATCH 104/109] d2oracle:fix nested scenario --- d2compiler/compile.go | 3 +- d2oracle/edit_test.go | 36 +- .../d2oracle/TestSet/scenario-child.exp.json | 792 ++++++++++ .../TestSet/scenario-grandchild.exp.json | 1395 +++++++++++++++++ 4 files changed, 2219 insertions(+), 7 deletions(-) create mode 100644 testdata/d2oracle/TestSet/scenario-child.exp.json create mode 100644 testdata/d2oracle/TestSet/scenario-grandchild.exp.json diff --git a/d2compiler/compile.go b/d2compiler/compile.go index a1ff2de63..dcf690903 100644 --- a/d2compiler/compile.go +++ b/d2compiler/compile.go @@ -69,6 +69,7 @@ func compileIR(ast *d2ast.Map, m *d2ir.Map) (*d2graph.Graph, error) { g := d2graph.NewGraph() g.AST = ast + g.BaseAST = ast c.compileBoard(g, m) if len(c.err.Errors) > 0 { return nil, c.err @@ -122,7 +123,7 @@ func (c *compiler) compileBoardsField(g *d2graph.Graph, ir *d2ir.Map, fieldName g2 := d2graph.NewGraph() g2.Parent = g g2.AST = f.Map().AST().(*d2ast.Map) - g2.BaseAST = findFieldAST(g.AST, f) + g2.BaseAST = findFieldAST(g.BaseAST, f) c.compileBoard(g2, f.Map()) g2.Name = f.Name switch fieldName { diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 798d1d0d3..30d73a9ef 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -2521,20 +2521,44 @@ x -> a.b -> a.b.c `, }, { - name: "scenario-grandchild", + name: "scenario-child", text: `a -> b scenarios: { x: { - scenarios: { - c: { - (a -> b)[0].style.bold: true - } - } + hi } } `, + key: `(a -> b)[0].style.stroke-width`, + value: go2.Pointer(`3`), + boardPath: []string{"x"}, + exp: `a -> b + +scenarios: { + x: { + hi + (a -> b)[0].style.stroke-width: 3 + } +} +`, + }, + { + name: "scenario-grandchild", + + text: `a -> b + +scenarios: { + x: { + scenarios: { + c: { + (a -> b)[0].style.bold: true + } + } + } +} + `, key: `(a -> b)[0].style.stroke-width`, value: go2.Pointer(`3`), boardPath: []string{"x", "c"}, diff --git a/testdata/d2oracle/TestSet/scenario-child.exp.json b/testdata/d2oracle/TestSet/scenario-child.exp.json new file mode 100644 index 000000000..e2c9e891e --- /dev/null +++ b/testdata/d2oracle/TestSet/scenario-child.exp.json @@ -0,0 +1,792 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:0:0-8:0:79", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:0:0-0:6:6", + "src": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,2:0:8-7:1:78", + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,2:0:8-2:9:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,2:0:8-2:9:17", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,2:11:19-7:1:78", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,3:2:23-6:3:76", + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,3:2:23-3:3:24", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,3:2:23-3:3:24", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,3:5:26-6:3:76", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,4:4:32-4:6:34", + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,4:4:32-4:6:34", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,4:4:32-4:6:34", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:4:39-5:37:72", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:5:40-5:11:46", + "src": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:5:40-5:6:41", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:5:40-5:6:41", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:10:45-5:11:46", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:10:45-5:11:46", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:12:47-5:15:50", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:16:51-5:34:69", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:16:51-5:21:56", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:22:57-5:34:69", + "value": [ + { + "string": "stroke-width", + "raw_string": "stroke-width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:36:71-5:37:72", + "raw": "3", + "value": "3" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "scenarios": [ + { + "name": "x", + "isFolderOnly": false, + "ast": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "hi" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "edges": [ + { + "range": ",0:0:0-0:0:0", + "src": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "style" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "stroke-width" + } + ] + } + } + ] + }, + "primary": { + "number": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:36:71-5:37:72", + "raw": "3", + "value": "3" + } + }, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "strokeWidth": { + "value": "3" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:5:40-5:6:41", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:5:40-5:6:41", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:10:45-5:11:46", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,5:10:45-5:11:46", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "hi", + "id_val": "hi", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,4:4:32-4:6:34", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-child.d2,4:4:32-4:6:34", + "value": [ + { + "string": "hi", + "raw_string": "hi" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "hi" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + } + ] + }, + "err": "" +} diff --git a/testdata/d2oracle/TestSet/scenario-grandchild.exp.json b/testdata/d2oracle/TestSet/scenario-grandchild.exp.json new file mode 100644 index 000000000..0f8d74762 --- /dev/null +++ b/testdata/d2oracle/TestSet/scenario-grandchild.exp.json @@ -0,0 +1,1395 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-12:0:155", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-0:6:6", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-0:6:6", + "src": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,2:0:8-11:1:154", + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,2:0:8-2:9:17", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,2:0:8-2:9:17", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,2:11:19-11:1:154", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,3:2:23-10:3:152", + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,3:2:23-3:3:24", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,3:2:23-3:3:24", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,3:5:26-10:3:152", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,4:4:32-9:5:148", + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,4:4:32-4:13:41", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,4:4:32-4:13:41", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,4:15:43-9:5:148", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,5:6:51-8:7:142", + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,5:6:51-5:7:52", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,5:6:51-5:7:52", + "value": [ + { + "string": "c", + "raw_string": "c" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,5:9:54-8:7:142", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:8:64-6:36:92", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:9:65-6:15:71", + "src": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:9:65-6:10:66", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:9:65-6:10:66", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:14:70-6:15:71", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:14:70-6:15:71", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:16:72-6:19:75", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:20:76-6:30:86", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:20:76-6:25:81", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:26:82-6:30:86", + "value": [ + { + "string": "bold", + "raw_string": "bold" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "boolean": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:32:88-6:36:92", + "value": true + } + } + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:8:101-7:41:134", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:9:102-7:15:108", + "src": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:9:102-7:10:103", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:9:102-7:10:103", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:14:107-7:15:108", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:14:107-7:15:108", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:16:109-7:19:112", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:20:113-7:38:131", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:20:113-7:25:118", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:26:119-7:38:131", + "value": [ + { + "string": "stroke-width", + "raw_string": "stroke-width" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:40:133-7:41:134", + "raw": "3", + "value": "3" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "scenarios": [ + { + "name": "x", + "isFolderOnly": false, + "ast": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "c" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "edges": [ + { + "range": ",0:0:0-0:0:0", + "src": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "style" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "bold" + } + ] + } + } + ] + }, + "primary": { + "boolean": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:32:88-6:36:92", + "value": true + } + }, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "stroke-width" + } + ] + } + } + ] + }, + "primary": { + "number": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:40:133-7:41:134", + "raw": "3", + "value": "3" + } + }, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "edges": [ + { + "range": ",0:0:0-0:0:0", + "src": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "scenarios": [ + { + "name": "c", + "isFolderOnly": false, + "ast": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "edges": [ + { + "range": ",0:0:0-0:0:0", + "src": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "style" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "bold" + } + ] + } + } + ] + }, + "primary": { + "boolean": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:32:88-6:36:92", + "value": true + } + }, + "value": {} + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "stroke-width" + } + ] + } + } + ] + }, + "primary": { + "number": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:40:133-7:41:134", + "raw": "3", + "value": "3" + } + }, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": [ + { + "index": 0, + "isCurve": false, + "src_arrow": false, + "dst_arrow": true, + "references": [ + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + }, + { + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": { + "strokeWidth": { + "value": "3" + }, + "bold": { + "value": "true" + } + }, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:9:65-6:10:66", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:9:65-6:10:66", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:9:102-7:10:103", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:9:102-7:10:103", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "b", + "id_val": "b", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:5:5-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,0:5:5-0:6:6", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:14:70-6:15:71", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,6:14:70-6:15:71", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + }, + { + "key": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:14:107-7:15:108", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestSet/scenario-grandchild.d2,7:14:107-7:15:108", + "value": [ + { + "string": "b", + "raw_string": "b" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": 0 + } + ], + "attributes": { + "label": { + "value": "b" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + } + ] + } + ] + }, + "err": "" +} From e25954abff38ad83b9a98df6994e62f0f84599be Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Tue, 4 Jun 2024 16:10:06 -0600 Subject: [PATCH 105/109] add prior changelog --- ci/release/changelogs/next.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 2728467b1..83d4dc6be 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -10,3 +10,4 @@ - Local relative icons are relative to the d2 file instead of CLI invoke path [#1924](https://github.com/terrastruct/d2/pull/1924) - Custom label positions weren't being read when the width was smaller than the label [#1928](https://github.com/terrastruct/d2/pull/1928) - Using `shape: circle` for arrowheads no longer removes all arrowheads along path in sketch mode [#1942](https://github.com/terrastruct/d2/pull/1942) +- Globs to null connections work [#1965](https://github.com/terrastruct/d2/pull/1965) From abe9230bcec305fcb7953029c82c9bb442c5323f Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 5 Jun 2024 11:14:52 -0600 Subject: [PATCH 106/109] save --- ci/release/changelogs/next.md | 1 + d2ast/d2ast.go | 3 - d2ir/compile.go | 3 + d2ir/pattern_test.go | 61 + .../edge-glob-style-inherit/1.exp.json | 4166 +++ .../edge-glob-style-inherit/2.exp.json | 25179 ++++++++++++++++ .../field-glob-style-inherit.exp.json | 2828 ++ 7 files changed, 32238 insertions(+), 3 deletions(-) create mode 100644 testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/1.exp.json create mode 100644 testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/2.exp.json create mode 100644 testdata/d2ir/TestCompile/patterns/field-glob-style-inherit.exp.json diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 83d4dc6be..9df546a71 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -11,3 +11,4 @@ - Custom label positions weren't being read when the width was smaller than the label [#1928](https://github.com/terrastruct/d2/pull/1928) - Using `shape: circle` for arrowheads no longer removes all arrowheads along path in sketch mode [#1942](https://github.com/terrastruct/d2/pull/1942) - Globs to null connections work [#1965](https://github.com/terrastruct/d2/pull/1965) +- Edge globs setting styles inherit correctly in child boards [#1967](https://github.com/terrastruct/d2/pull/1967) diff --git a/d2ast/d2ast.go b/d2ast/d2ast.go index 388997043..705e840ed 100644 --- a/d2ast/d2ast.go +++ b/d2ast/d2ast.go @@ -862,9 +862,6 @@ func (mk *Key) HasTripleGlob() bool { return true } } - if mk.EdgeIndex != nil && mk.EdgeIndex.Glob { - return true - } if mk.EdgeKey.HasTripleGlob() { return true } diff --git a/d2ir/compile.go b/d2ir/compile.go index c147daf36..1d7028c2c 100644 --- a/d2ir/compile.go +++ b/d2ir/compile.go @@ -392,6 +392,9 @@ func (g *globContext) prefixed(dst *Map) *globContext { if len(prefix.Path) > 0 { g2.refctx.Key.Key = prefix } + if !g2.refctx.Key.HasTripleGlob() && g2.refctx.Key.EdgeKey != nil { + prefix.Path = append(prefix.Path, g2.refctx.Key.EdgeKey.Path...) + } return g2 } diff --git a/d2ir/pattern_test.go b/d2ir/pattern_test.go index a8a835f2c..8cc32c6cf 100644 --- a/d2ir/pattern_test.go +++ b/d2ir/pattern_test.go @@ -322,6 +322,67 @@ x -> y assertQuery(t, m, 4, 0, nil, "") }, }, + { + name: "field-glob-style-inherit", + run: func(t testing.TB) { + m, err := compile(t, `*.style.opacity: 0 +x: { + style.opacity: 1 +} + +scenarios: { + 1: { + x + } +} +`) + assert.Success(t, err) + assertQuery(t, m, 0, 0, 1, "x.style.opacity") + assertQuery(t, m, 0, 0, 1, "scenarios.1.x.style.opacity") + }, + }, + { + name: "edge-glob-style-inherit/1", + run: func(t testing.TB) { + m, err := compile(t, `(* -> *)[*].style.opacity: 0 +x -> y: { + style.opacity: 1 +} + +scenarios: { + 1: { + x + } +} +`) + assert.Success(t, err) + assertQuery(t, m, 0, 0, 1, "(x -> y)[0].style.opacity") + assertQuery(t, m, 0, 0, 1, "scenarios.1.(x -> y)[0].style.opacity") + }, + }, + { + name: "edge-glob-style-inherit/2", + run: func(t testing.TB) { + m, err := compile(t, `*.style.opacity: 0 +(* -> *)[*].style.opacity: 0 +x -> y + +steps: { + 1: { + x.style.opacity: 1 + } + 2: { + (x -> y)[0].style.opacity: 1 + } + 3: { + y.style.opacity: 1 + } +} +`) + assert.Success(t, err) + assertQuery(t, m, 0, 0, 1, "steps.3.(x -> y)[0].style.opacity") + }, + }, { name: "double-glob/edge/1", run: func(t testing.TB) { diff --git a/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/1.exp.json b/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/1.exp.json new file mode 100644 index 000000000..b78377170 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/1.exp.json @@ -0,0 +1,4166 @@ +{ + "fields": [ + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-3:1:59", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:8:37-3:1:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:18:57", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "y", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-3:1:59", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:8:37-3:1:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:18:57", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "scenarios", + "composite": { + "fields": [ + { + "name": "1", + "composite": { + "fields": [ + { + "name": "x", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-3:1:59", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:8:37-3:1:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:18:57", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "y", + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-3:1:59", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:8:37-3:1:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:18:57", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "composite": { + "fields": null, + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "x" + ], + "src_arrow": false, + "dst_path": [ + "y" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:18:57", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:18:57", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-3:1:59", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:8:37-3:1:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:18:57", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ] + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:2:76-6:3:77", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:2:76-6:3:77", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:2:76-6:3:77", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:2:76-8:3:90", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:2:76-6:3:77", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:2:76-6:3:77", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:5:79-8:3:90", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,5:0:61-5:9:70", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,5:0:61-5:9:70", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,5:0:61-5:9:70", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,5:0:61-9:1:92", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,5:0:61-5:9:70", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,5:0:61-5:9:70", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,5:11:72-9:1:92", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:2:76-8:3:90", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:2:76-6:3:77", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:2:76-6:3:77", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,6:5:79-8:3:90", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,7:4:85-7:5:86", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "x" + ], + "src_arrow": false, + "dst_path": [ + "y" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:18:57", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:18:57", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-3:1:59", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:6:35", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:0:29-1:1:30", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:5:34-1:6:35", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,1:8:37-3:1:59", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:18:57", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:15:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:2:41-2:7:46", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:8:47-2:15:54", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,2:17:56-2:18:57", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:0:0-0:28:28", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:7:7", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:1:1-0:2:2", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:6:6-0:7:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:8:8-0:11:11", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:25:25", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:12:12-0:17:17", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:18:18-0:25:25", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/1.d2,0:27:27-0:28:28", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/2.exp.json b/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/2.exp.json new file mode 100644 index 000000000..bfd84a1da --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/edge-glob-style-inherit/2.exp.json @@ -0,0 +1,25179 @@ +{ + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "y", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "steps", + "composite": { + "fields": [ + { + "name": "1", + "composite": { + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "y", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "composite": { + "fields": null, + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "x" + ], + "src_arrow": false, + "dst_path": [ + "y" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ] + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:2:67-5:3:68", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:2:67-5:3:68", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:2:67-5:3:68", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:2:67-7:3:98", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:2:67-5:3:68", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:2:67-5:3:68", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:5:70-7:3:98", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + }, + { + "name": "2", + "composite": { + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "y", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "composite": { + "fields": [], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "x" + ], + "src_arrow": false, + "dst_path": [ + "y" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ] + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:2:101-8:3:102", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:2:101-8:3:102", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:2:101-8:3:102", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:2:101-10:3:142", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:2:101-8:3:102", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:2:101-8:3:102", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:5:104-10:3:142", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + }, + { + "name": "3", + "composite": { + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "y", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:21:171-12:22:172", + "raw": "1", + "value": "1" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:12:162-12:19:169", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:19:169", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:5:155", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:6:156-12:11:161", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:12:162-12:19:169", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:22:172", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:19:169", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:5:155", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:6:156-12:11:161", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:12:162-12:19:169", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:21:171-12:22:172", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:6:156-12:11:161", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:19:169", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:5:155", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:6:156-12:11:161", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:12:162-12:19:169", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:22:172", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:19:169", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:5:155", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:6:156-12:11:161", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:12:162-12:19:169", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:21:171-12:22:172", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:5:155", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:19:169", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:5:155", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:6:156-12:11:161", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:12:162-12:19:169", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:22:172", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:19:169", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:5:155", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:6:156-12:11:161", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:12:162-12:19:169", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:21:171-12:22:172", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "composite": { + "fields": [], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "x" + ], + "src_arrow": false, + "dst_path": [ + "y" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ] + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:2:145-11:3:146", + "value": [ + { + "string": "3", + "raw_string": "3" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:2:145-11:3:146", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:2:145-11:3:146", + "value": [ + { + "string": "3", + "raw_string": "3" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:2:145-13:3:176", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:2:145-11:3:146", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:2:145-11:3:146", + "value": [ + { + "string": "3", + "raw_string": "3" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:5:148-13:3:176", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:22:172", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:19:169", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:5:155", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:6:156-12:11:161", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:12:162-12:19:169", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:21:171-12:22:172", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,4:0:56-4:5:61", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,4:0:56-4:5:61", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,4:0:56-4:5:61", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,4:0:56-14:1:178", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,4:0:56-4:5:61", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,4:0:56-4:5:61", + "value": [ + { + "string": "steps", + "raw_string": "steps" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,4:7:63-14:1:178", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:2:67-7:3:98", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:2:67-5:3:68", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:2:67-5:3:68", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,5:5:70-7:3:98", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:22:94", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:19:91", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:4:76-6:5:77", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:6:78-6:11:83", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:12:84-6:19:91", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,6:21:93-6:22:94", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:2:101-10:3:142", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:2:101-8:3:102", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:2:101-8:3:102", + "value": [ + { + "string": "2", + "raw_string": "2" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,8:5:104-10:3:142", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:4:110-9:32:138", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:11:117", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:5:111-9:6:112", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:10:116-9:11:117", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:12:118-9:15:121", + "int": 0, + "glob": false + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:29:135", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:16:122-9:21:127", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:22:128-9:29:135", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,9:31:137-9:32:138", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:2:145-13:3:176", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:2:145-11:3:146", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:2:145-11:3:146", + "value": [ + { + "string": "3", + "raw_string": "3" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,11:5:148-13:3:176", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:22:172", + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:19:169", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:4:154-12:5:155", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:6:156-12:11:161", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:12:162-12:19:169", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,12:21:171-12:22:172", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "2" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "steps" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "3" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": [ + { + "edge_id": { + "src_path": [ + "x" + ], + "src_arrow": false, + "dst_path": [ + "y" + ], + "dst_arrow": true, + "index": 0, + "glob": false + }, + "map": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:6:54", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:0:48-2:1:49", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,2:5:53-2:6:54", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "context": { + "edge": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + }, + "key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:0:19-1:28:47", + "edges": [ + { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:7:26", + "src": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:1:20-1:2:21", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:6:25-1:7:26", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:8:27-1:11:30", + "int": null, + "glob": true + }, + "edge_key": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:25:44", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:12:31-1:17:36", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:18:37-1:25:44", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/edge-glob-style-inherit/2.d2,1:27:46-1:28:47", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ] +} diff --git a/testdata/d2ir/TestCompile/patterns/field-glob-style-inherit.exp.json b/testdata/d2ir/TestCompile/patterns/field-glob-style-inherit.exp.json new file mode 100644 index 000000000..554e30926 --- /dev/null +++ b/testdata/d2ir/TestCompile/patterns/field-glob-style-inherit.exp.json @@ -0,0 +1,2828 @@ +{ + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:17:41-2:18:42", + "raw": "1", + "value": "1" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:15:39", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:18:42", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:15:39", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:17:41-2:18:42", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:15:39", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:18:42", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:15:39", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:17:41-2:18:42", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-1:1:20", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-1:1:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-1:1:20", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-3:1:44", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-1:1:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-1:1:20", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:3:22-3:1:44", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:18:42", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:15:39", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:17:41-2:18:42", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + }, + { + "name": "scenarios", + "composite": { + "fields": [ + { + "name": "1", + "composite": { + "fields": [ + { + "name": "x", + "composite": { + "fields": [ + { + "name": "style", + "composite": { + "fields": [ + { + "name": "opacity", + "primary": { + "value": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:17:41-2:18:42", + "raw": "1", + "value": "1" + } + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:15:39", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:18:42", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:15:39", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:17:41-2:18:42", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:15:39", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:18:42", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:15:39", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:17:41-2:18:42", + "raw": "1", + "value": "1" + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:15:15", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-1:1:20", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-1:1:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-1:1:20", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-3:1:44", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-1:1:20", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:0:19-1:1:20", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,1:3:22-3:1:44", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:18:42", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:15:39", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:2:26-2:7:31", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:8:32-2:15:39", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,2:17:41-2:18:42", + "raw": "1", + "value": "1" + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:2:61-6:3:62", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:2:61-6:3:62", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:2:61-6:3:62", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:2:61-8:3:75", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:2:61-6:3:62", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:2:61-6:3:62", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:5:64-8:3:75", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null + }, + "references": [ + { + "string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,5:0:46-5:9:55", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + }, + "key_path": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,5:0:46-5:9:55", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,5:0:46-5:9:55", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,5:0:46-9:1:77", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,5:0:46-5:9:55", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,5:0:46-5:9:55", + "value": [ + { + "string": "scenarios", + "raw_string": "scenarios" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,5:11:57-9:1:77", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:2:61-8:3:75", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:2:61-6:3:62", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:2:61-6:3:62", + "value": [ + { + "string": "1", + "raw_string": "1" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,6:5:64-8:3:75", + "nodes": [ + { + "map_key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "path": [ + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,7:4:70-7:5:71", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + }, + "due_to_glob": false, + "due_to_lazy_glob": false + }, + { + "string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + }, + "key_path": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "context": { + "edge": null, + "key": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:18:18", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "scenarios" + } + ] + } + }, + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "1" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:0:0-0:1:1", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:2:2-0:7:7", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:8:8-0:15:15", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "TestCompile/patterns/field-glob-style-inherit.d2,0:17:17-0:18:18", + "raw": "0", + "value": "0" + } + } + } + }, + "due_to_glob": true, + "due_to_lazy_glob": true + } + ] + } + ], + "edges": null +} From bd7a3d572a5bb800f336b8609f75087fc8b32d7f Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 5 Jun 2024 12:59:21 -0600 Subject: [PATCH 107/109] d2oracle.Delete: do not null non-glob-created edges --- d2oracle/edit.go | 5 +- d2oracle/edit_test.go | 15 + d2oracle/get.go | 5 +- .../TestDelete/edge-with-glob.exp.json | 264 ++++++++++++++++++ 4 files changed, 286 insertions(+), 3 deletions(-) create mode 100644 testdata/d2oracle/TestDelete/edge-with-glob.exp.json diff --git a/d2oracle/edit.go b/d2oracle/edit.go index ce2410349..cc84983d9 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -949,7 +949,10 @@ func Delete(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, for i := len(e.References) - 1; i >= 0; i-- { ref := e.References[i] - deleteEdge(g, ref.Scope, ref.MapKey, ref.MapKeyEdgeIndex) + // Leave glob setters alone + if !(ref.MapKey.EdgeIndex != nil && ref.MapKey.EdgeIndex.Glob) { + deleteEdge(g, ref.Scope, ref.MapKey, ref.MapKeyEdgeIndex) + } } edges, ok := obj.FindEdges(mk) diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 30d73a9ef..bbab7f2e8 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -7892,6 +7892,21 @@ layers: { a } } +`, + }, + { + name: "edge-with-glob", + + text: `x -> y +y + +(* -> *)[*].style.opacity: 0.8 +`, + key: `(x -> y)[0]`, + exp: `x +y + +(* -> *)[*].style.opacity: 0.8 `, }, } diff --git a/d2oracle/get.go b/d2oracle/get.go index 3883bc24e..3d3daf957 100644 --- a/d2oracle/get.go +++ b/d2oracle/get.go @@ -153,11 +153,12 @@ func IsImportedObj(ast *d2ast.Map, obj *d2graph.Object) bool { return false } -// Globs count as imported for now +// Glob creations count as imported for now // TODO Probably rename later func IsImportedEdge(ast *d2ast.Map, edge *d2graph.Edge) bool { for _, ref := range edge.References { - if ref.Edge.Src.HasGlob() || ref.Edge.Dst.HasGlob() { + // If edge index, the glob is just setting something, not responsible for creating the edge + if (ref.Edge.Src.HasGlob() || ref.Edge.Dst.HasGlob()) && ref.MapKey.EdgeIndex == nil { return true } if ref.Edge.Range.Path != ast.Range.Path { diff --git a/testdata/d2oracle/TestDelete/edge-with-glob.exp.json b/testdata/d2oracle/TestDelete/edge-with-glob.exp.json new file mode 100644 index 000000000..1fffd7e42 --- /dev/null +++ b/testdata/d2oracle/TestDelete/edge-with-glob.exp.json @@ -0,0 +1,264 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,0:0:0-4:0:36", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,0:0:0-0:1:1", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,1:0:2-1:1:3", + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,1:0:2-1:1:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,1:0:2-1:1:3", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:0:5-3:30:35", + "edges": [ + { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:1:6-3:7:12", + "src": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:1:6-3:2:7", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:1:6-3:2:7", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "src_arrow": "", + "dst": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:6:11-3:7:12", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:6:11-3:7:12", + "value": [ + { + "string": "*", + "raw_string": "*" + } + ], + "pattern": [ + "*" + ] + } + } + ] + }, + "dst_arrow": ">" + } + ], + "edge_index": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:8:13-3:11:16", + "int": null, + "glob": true + }, + "edge_key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:12:17-3:25:30", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:12:17-3:17:22", + "value": [ + { + "string": "style", + "raw_string": "style" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:18:23-3:25:30", + "value": [ + { + "string": "opacity", + "raw_string": "opacity" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "number": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,3:27:32-3:30:35", + "raw": "0.8", + "value": "4/5" + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "x", + "id_val": "x", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,0:0:0-0:1:1", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "x" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + { + "id": "y", + "id_val": "y", + "references": [ + { + "key": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,1:0:2-1:1:3", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2oracle/TestDelete/edge-with-glob.d2,1:0:2-1:1:3", + "value": [ + { + "string": "y", + "raw_string": "y" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "y" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + }, + "err": "" +} From 31f2ca66b8cd09985d6d0a44712c6d401cf3f893 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 5 Jun 2024 15:11:07 -0600 Subject: [PATCH 108/109] test --- d2compiler/compile_test.go | 16 + .../TestCompile/spread-import-link.exp.json | 539 ++++++++++++++++++ 2 files changed, 555 insertions(+) create mode 100644 testdata/d2compiler/TestCompile/spread-import-link.exp.json diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index 9a360bf0c..2350f1aba 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -2902,6 +2902,22 @@ qa: { tassert.Equal(t, "Qa Environment", g.Objects[2].Label.Value) }, }, + { + name: "spread-import-link", + text: `k + +layers: { + x: {...@x} +}`, + files: map[string]string{ + "x.d2": `a.link: layers.b +layers: { + b: { + d + } +}`, + }, + }, } for _, tc := range testCases { diff --git a/testdata/d2compiler/TestCompile/spread-import-link.exp.json b/testdata/d2compiler/TestCompile/spread-import-link.exp.json new file mode 100644 index 000000000..e78eb6e03 --- /dev/null +++ b/testdata/d2compiler/TestCompile/spread-import-link.exp.json @@ -0,0 +1,539 @@ +{ + "graph": { + "name": "", + "isFolderOnly": false, + "ast": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,0:0:0-4:1:22", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,0:0:0-0:1:1", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,0:0:0-0:1:1", + "value": [ + { + "string": "k", + "raw_string": "k" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + }, + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:0:3-4:1:22", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:0:3-2:6:9", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:0:3-2:6:9", + "value": [ + { + "string": "layers", + "raw_string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:8:11-4:1:22", + "nodes": [ + { + "map_key": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:2:15-3:7:20", + "key": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:2:15-3:3:16", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:2:15-3:3:16", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": ",1:0:0-1:0:0", + "nodes": [ + { + "import": { + "range": ",1:0:0-1:0:0", + "spread": true, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:6:19-3:7:20", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + } + } + ] + }, + "import": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:5:18-3:7:20", + "spread": false, + "pre": "", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:6:19-3:7:20", + "value": [ + { + "string": "x", + "raw_string": "x" + } + ] + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "k", + "id_val": "k", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,0:0:0-0:1:1", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,0:0:0-0:1:1", + "value": [ + { + "string": "k", + "raw_string": "k" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "k" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "layers": [ + { + "name": "x", + "isFolderOnly": false, + "ast": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "a" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "link" + } + ] + } + } + ] + }, + "primary": { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "root.layers.x.layers.b" + } + ] + } + }, + "value": {} + } + } + ] + } + } + } + }, + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "layers" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "b" + } + ] + } + } + ] + }, + "primary": {}, + "value": { + "map": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "d" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + } + } + } + } + ] + } + } + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "a", + "id_val": "a", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/x.d2,0:0:0-0:6:6", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/x.d2,0:0:0-0:1:1", + "value": [ + { + "string": "a", + "raw_string": "a" + } + ] + } + }, + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/x.d2,0:2:2-0:6:6", + "value": [ + { + "string": "link", + "raw_string": "link" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "a" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "link": { + "value": "root.layers.x.layers.b" + }, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ], + "layers": [ + { + "name": "b", + "isFolderOnly": false, + "ast": { + "range": ",0:0:0-1:0:0", + "nodes": [ + { + "map_key": { + "range": ",0:0:0-0:0:0", + "key": { + "range": ",0:0:0-0:0:0", + "path": [ + { + "unquoted_string": { + "range": ",0:0:0-0:0:0", + "value": [ + { + "string": "d" + } + ] + } + } + ] + }, + "primary": {}, + "value": {} + } + } + ] + }, + "root": { + "id": "", + "id_val": "", + "attributes": { + "label": { + "value": "" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + }, + "edges": null, + "objects": [ + { + "id": "d", + "id_val": "d", + "references": [ + { + "key": { + "range": "d2/testdata/d2compiler/TestCompile/x.d2,3:4:38-3:5:39", + "path": [ + { + "unquoted_string": { + "range": "d2/testdata/d2compiler/TestCompile/x.d2,3:4:38-3:5:39", + "value": [ + { + "string": "d", + "raw_string": "d" + } + ] + } + } + ] + }, + "key_path_index": 0, + "map_key_edge_index": -1 + } + ], + "attributes": { + "label": { + "value": "d" + }, + "labelDimensions": { + "width": 0, + "height": 0 + }, + "style": {}, + "near_key": null, + "shape": { + "value": "rectangle" + }, + "direction": { + "value": "" + }, + "constraint": null + }, + "zIndex": 0 + } + ] + } + ] + } + ] + }, + "err": null +} From d2ec7cd19c90668cebcc2424dc5cd4493aa611b7 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 5 Jun 2024 22:22:47 -0600 Subject: [PATCH 109/109] fix --- ci/release/changelogs/next.md | 1 + d2ir/compile.go | 1 + .../TestCompile/spread-import-link.exp.json | 32 ++++--------------- 3 files changed, 9 insertions(+), 25 deletions(-) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 9df546a71..56fb4e6b1 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -12,3 +12,4 @@ - Using `shape: circle` for arrowheads no longer removes all arrowheads along path in sketch mode [#1942](https://github.com/terrastruct/d2/pull/1942) - Globs to null connections work [#1965](https://github.com/terrastruct/d2/pull/1965) - Edge globs setting styles inherit correctly in child boards [#1967](https://github.com/terrastruct/d2/pull/1967) +- Board links imported with spread imports work [#1972](https://github.com/terrastruct/d2/pull/1972) diff --git a/d2ir/compile.go b/d2ir/compile.go index 1d7028c2c..b05cda85c 100644 --- a/d2ir/compile.go +++ b/d2ir/compile.go @@ -512,6 +512,7 @@ func (c *compiler) compileMap(dst *Map, ast, scopeAST *d2ast.Map) { } OverlayMap(dst, impn.Map()) + c.updateLinks(dst) if impnf, ok := impn.(*Field); ok { if impnf.Primary_ != nil { diff --git a/testdata/d2compiler/TestCompile/spread-import-link.exp.json b/testdata/d2compiler/TestCompile/spread-import-link.exp.json index e78eb6e03..a3fbe8c23 100644 --- a/testdata/d2compiler/TestCompile/spread-import-link.exp.json +++ b/testdata/d2compiler/TestCompile/spread-import-link.exp.json @@ -3,7 +3,7 @@ "name": "", "isFolderOnly": false, "ast": { - "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,0:0:0-4:1:22", + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,0:0:0-4:1:27", "nodes": [ { "map_key": { @@ -30,7 +30,7 @@ }, { "map_key": { - "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:0:3-4:1:22", + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:0:3-4:1:27", "key": { "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:0:3-2:6:9", "path": [ @@ -50,11 +50,11 @@ "primary": {}, "value": { "map": { - "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:8:11-4:1:22", + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,2:8:11-4:1:27", "nodes": [ { "map_key": { - "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:2:15-3:7:20", + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:2:15-3:12:25", "key": { "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:2:15-3:3:16", "path": [ @@ -74,17 +74,17 @@ "primary": {}, "value": { "map": { - "range": ",1:0:0-1:0:0", + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:5:18-3:12:25", "nodes": [ { "import": { - "range": ",1:0:0-1:0:0", + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:6:19-3:11:24", "spread": true, "pre": "", "path": [ { "unquoted_string": { - "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:6:19-3:7:20", + "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:10:23-3:11:24", "value": [ { "string": "x", @@ -97,24 +97,6 @@ } } ] - }, - "import": { - "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:5:18-3:7:20", - "spread": false, - "pre": "", - "path": [ - { - "unquoted_string": { - "range": "d2/testdata/d2compiler/TestCompile/spread-import-link.d2,3:6:19-3:7:20", - "value": [ - { - "string": "x", - "raw_string": "x" - } - ] - } - } - ] } } }