diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md
index 0e994225b..9b2b5cafd 100644
--- a/ci/release/changelogs/next.md
+++ b/ci/release/changelogs/next.md
@@ -3,6 +3,8 @@
#### Improvements ๐งน
- Use shape specific sizing for grid containers [#1294](https://github.com/terrastruct/d2/pull/1294)
+- Grid diagrams now support nested shapes or grid diagrams [#1309](https://github.com/terrastruct/d2/pull/1309)
+- Grid diagrams will now also use `grid-gap`, `vertical-gap`, and `horizontal-gap` for padding [#1309](https://github.com/terrastruct/d2/pull/1309)
- Watch mode browser uses an error favicon to easily indicate compiler errors. Thanks @sinyo-matu ! [#1240](https://github.com/terrastruct/d2/pull/1240)
- Improves grid layout performance when there are many similarly sized shapes. [#1315](https://github.com/terrastruct/d2/pull/1315)
diff --git a/d2compiler/compile.go b/d2compiler/compile.go
index 9a08a6b75..d9eb109fe 100644
--- a/d2compiler/compile.go
+++ b/d2compiler/compile.go
@@ -841,13 +841,6 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) {
if !in && arrowheadIn {
c.errorf(f.LastPrimaryKey(), fmt.Sprintf(`invalid shape, can only set "%s" for arrowheads`, obj.Shape.Value))
}
- case "grid-rows", "grid-columns", "grid-gap", "vertical-gap", "horizontal-gap":
- for _, child := range obj.ChildrenArray {
- if child.IsContainer() {
- c.errorf(f.LastPrimaryKey(),
- fmt.Sprintf(`%#v can only be used on containers with one level of nesting right now. (%#v has nested %#v)`, keyword, child.AbsID(), child.ChildrenArray[0].ID))
- }
- }
}
return
}
diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go
index b82b256a1..188fd5225 100644
--- a/d2compiler/compile_test.go
+++ b/d2compiler/compile_test.go
@@ -2373,11 +2373,17 @@ d2/testdata/d2compiler/TestCompile/grid_edge.d2:6:2: edges in grid diagrams are
a
b
c
- d.invalid descendant
+ d.valid descendant
+ e: {
+ grid-rows: 1
+ grid-columns: 2
+
+ a
+ b
+ }
}
`,
- expErr: `d2/testdata/d2compiler/TestCompile/grid_nested.d2:2:2: "grid-rows" can only be used on containers with one level of nesting right now. ("hey.d" has nested "invalid descendant")
-d2/testdata/d2compiler/TestCompile/grid_nested.d2:3:2: "grid-columns" can only be used on containers with one level of nesting right now. ("hey.d" has nested "invalid descendant")`,
+ expErr: ``,
},
{
name: "classes",
diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go
index aa211bb7e..b713df92f 100644
--- a/d2graph/d2graph.go
+++ b/d2graph/d2graph.go
@@ -1,6 +1,7 @@
package d2graph
import (
+ "bytes"
"context"
"errors"
"fmt"
@@ -1815,3 +1816,104 @@ func (g *Graph) ApplyTheme(themeID int64) error {
g.Theme = &theme
return nil
}
+
+func (obj *Object) MoveWithDescendants(dx, dy float64) {
+ obj.TopLeft.X += dx
+ obj.TopLeft.Y += dy
+ for _, child := range obj.ChildrenArray {
+ child.MoveWithDescendants(dx, dy)
+ }
+}
+
+func (obj *Object) MoveWithDescendantsTo(x, y float64) {
+ dx := x - obj.TopLeft.X
+ dy := y - obj.TopLeft.Y
+ obj.MoveWithDescendants(dx, dy)
+}
+
+func (parent *Object) removeChild(child *Object) {
+ delete(parent.Children, strings.ToLower(child.ID))
+ for i := 0; i < len(parent.ChildrenArray); i++ {
+ if parent.ChildrenArray[i] == child {
+ parent.ChildrenArray = append(parent.ChildrenArray[:i], parent.ChildrenArray[i+1:]...)
+ break
+ }
+ }
+}
+
+// remove obj and all descendants from graph, as a new Graph
+func (g *Graph) ExtractAsNestedGraph(obj *Object) *Graph {
+ descendantObjects, edges := pluckObjAndEdges(g, obj)
+
+ tempGraph := NewGraph()
+ tempGraph.Root.ChildrenArray = []*Object{obj}
+ tempGraph.Root.Children[strings.ToLower(obj.ID)] = obj
+
+ for _, descendantObj := range descendantObjects {
+ descendantObj.Graph = tempGraph
+ }
+ tempGraph.Objects = descendantObjects
+ tempGraph.Edges = edges
+
+ obj.Parent.removeChild(obj)
+ obj.Parent = tempGraph.Root
+
+ return tempGraph
+}
+
+func pluckObjAndEdges(g *Graph, obj *Object) (descendantsObjects []*Object, edges []*Edge) {
+ for i := 0; i < len(g.Edges); i++ {
+ edge := g.Edges[i]
+ if edge.Src == obj || edge.Dst == obj {
+ edges = append(edges, edge)
+ g.Edges = append(g.Edges[:i], g.Edges[i+1:]...)
+ i--
+ }
+ }
+
+ for i := 0; i < len(g.Objects); i++ {
+ temp := g.Objects[i]
+ if temp.AbsID() == obj.AbsID() {
+ descendantsObjects = append(descendantsObjects, obj)
+ g.Objects = append(g.Objects[:i], g.Objects[i+1:]...)
+ for _, child := range obj.ChildrenArray {
+ subObjects, subEdges := pluckObjAndEdges(g, child)
+ descendantsObjects = append(descendantsObjects, subObjects...)
+ edges = append(edges, subEdges...)
+ }
+ break
+ }
+ }
+
+ return descendantsObjects, edges
+}
+
+func (g *Graph) InjectNestedGraph(tempGraph *Graph, parent *Object) {
+ obj := tempGraph.Root.ChildrenArray[0]
+ obj.MoveWithDescendantsTo(0, 0)
+ obj.Parent = parent
+ for _, obj := range tempGraph.Objects {
+ obj.Graph = g
+ }
+ g.Objects = append(g.Objects, tempGraph.Objects...)
+ parent.Children[strings.ToLower(obj.ID)] = obj
+ parent.ChildrenArray = append(parent.ChildrenArray, obj)
+ g.Edges = append(g.Edges, tempGraph.Edges...)
+}
+
+func (g *Graph) PrintString() string {
+ buf := &bytes.Buffer{}
+ fmt.Fprint(buf, "Objects: [")
+ for _, obj := range g.Objects {
+ fmt.Fprintf(buf, "%#v @(%v)", obj.AbsID(), obj.TopLeft.ToString())
+ }
+ fmt.Fprint(buf, "]")
+ return buf.String()
+}
+
+func (obj *Object) IterDescendants(apply func(parent, child *Object)) {
+ for _, c := range obj.ChildrenArray {
+ apply(obj, c)
+ c.IterDescendants(apply)
+ }
+}
diff --git a/d2layouts/d2grid/grid_diagram.go b/d2layouts/d2grid/grid_diagram.go
index c8b0c28a3..bb02ca94b 100644
--- a/d2layouts/d2grid/grid_diagram.go
+++ b/d2layouts/d2grid/grid_diagram.go
@@ -5,6 +5,7 @@ import (
"strings"
"oss.terrastruct.com/d2/d2graph"
+ "oss.terrastruct.com/d2/lib/geo"
)
type gridDiagram struct {
@@ -95,22 +96,30 @@ func newGridDiagram(root *d2graph.Object) *gridDiagram {
gd.horizontalGap, _ = strconv.Atoi(root.HorizontalGap.Value)
}
+ for _, o := range gd.objects {
+ o.TopLeft = geo.NewPoint(0, 0)
+ }
+
return &gd
}
func (gd *gridDiagram) shift(dx, dy float64) {
for _, obj := range gd.objects {
- obj.TopLeft.X += dx
- obj.TopLeft.Y += dy
+ obj.MoveWithDescendants(dx, dy)
}
}
func (gd *gridDiagram) cleanup(obj *d2graph.Object, graph *d2graph.Graph) {
obj.Children = make(map[string]*d2graph.Object)
obj.ChildrenArray = make([]*d2graph.Object, 0)
- for _, child := range gd.objects {
- obj.Children[strings.ToLower(child.ID)] = child
- obj.ChildrenArray = append(obj.ChildrenArray, child)
+
+ restore := func(parent, child *d2graph.Object) {
+ parent.Children[strings.ToLower(child.ID)] = child
+ parent.ChildrenArray = append(parent.ChildrenArray, child)
+ graph.Objects = append(graph.Objects, child)
+ }
+ for _, child := range gd.objects {
+ restore(obj, child)
+ child.IterDescendants(restore)
}
- graph.Objects = append(graph.Objects, gd.objects...)
}
diff --git a/d2layouts/d2grid/layout.go b/d2layouts/d2grid/layout.go
index 5566bff49..5ddc75839 100644
--- a/d2layouts/d2grid/layout.go
+++ b/d2layouts/d2grid/layout.go
@@ -33,7 +33,7 @@ const (
// 7. Put grid children back in correct location
func Layout(ctx context.Context, g *d2graph.Graph, layout d2graph.LayoutGraph) d2graph.LayoutGraph {
return func(ctx context.Context, g *d2graph.Graph) error {
- gridDiagrams, objectOrder, err := withoutGridDiagrams(ctx, g)
+ gridDiagrams, objectOrder, err := withoutGridDiagrams(ctx, g, layout)
if err != nil {
return err
}
@@ -49,10 +49,105 @@ func Layout(ctx context.Context, g *d2graph.Graph, layout d2graph.LayoutGraph) d
}
}
-func withoutGridDiagrams(ctx context.Context, g *d2graph.Graph) (gridDiagrams map[string]*gridDiagram, objectOrder map[string]int, err error) {
+func withoutGridDiagrams(ctx context.Context, g *d2graph.Graph, layout d2graph.LayoutGraph) (gridDiagrams map[string]*gridDiagram, objectOrder map[string]int, err error) {
toRemove := make(map[*d2graph.Object]struct{})
gridDiagrams = make(map[string]*gridDiagram)
+ objectOrder = make(map[string]int)
+ for i, obj := range g.Objects {
+ objectOrder[obj.AbsID()] = i
+ }
+
+ var processGrid func(obj *d2graph.Object) error
+ processGrid = func(obj *d2graph.Object) error {
+ for _, child := range obj.ChildrenArray {
+ if child.IsGridDiagram() {
+ if err := processGrid(child); err != nil {
+ return err
+ }
+ } else if len(child.ChildrenArray) > 0 {
+ tempGraph := g.ExtractAsNestedGraph(child)
+ if err := layout(ctx, tempGraph); err != nil {
+ return err
+ }
+ g.InjectNestedGraph(tempGraph, obj)
+
+ sort.SliceStable(g.Objects, func(i, j int) bool {
+ return objectOrder[g.Objects[i].AbsID()] < objectOrder[g.Objects[j].AbsID()]
+ })
+ sort.SliceStable(child.ChildrenArray, func(i, j int) bool {
+ return objectOrder[child.ChildrenArray[i].AbsID()] < objectOrder[child.ChildrenArray[j].AbsID()]
+ })
+ sort.SliceStable(obj.ChildrenArray, func(i, j int) bool {
+ return objectOrder[obj.ChildrenArray[i].AbsID()] < objectOrder[obj.ChildrenArray[j].AbsID()]
+ })
+
+ for _, o := range tempGraph.Objects {
+ toRemove[o] = struct{}{}
+ }
+ }
+ }
+
+ gd, err := layoutGrid(g, obj)
+ if err != nil {
+ return err
+ }
+ obj.Children = make(map[string]*d2graph.Object)
+ obj.ChildrenArray = nil
+
+ if obj.Box != nil {
+ // CONTAINER_PADDING is default, but use gap value if set
+ horizontalPadding, verticalPadding := CONTAINER_PADDING, CONTAINER_PADDING
+ if obj.GridGap != nil || obj.HorizontalGap != nil {
+ horizontalPadding = gd.horizontalGap
+ }
+ if obj.GridGap != nil || obj.VerticalGap != nil {
+ verticalPadding = gd.verticalGap
+ }
+ // size shape according to grid
+ obj.SizeToContent(float64(gd.width), float64(gd.height), float64(2*horizontalPadding), float64(2*verticalPadding))
+
+ // compute where the grid should be placed inside shape
+ dslShape := strings.ToLower(obj.Shape.Value)
+ shapeType := d2target.DSL_SHAPE_TO_SHAPE_TYPE[dslShape]
+ s := shape.NewShape(shapeType, geo.NewBox(geo.NewPoint(0, 0), obj.Width, obj.Height))
+ innerBox := s.GetInnerBox()
+ if innerBox.TopLeft.X != 0 || innerBox.TopLeft.Y != 0 {
+ gd.shift(innerBox.TopLeft.X, innerBox.TopLeft.Y)
+ }
+
+ var dx, dy float64
+ if obj.LabelDimensions.Width != 0 {
+ labelWidth := float64(obj.LabelDimensions.Width) + 2*label.PADDING
+ if labelWidth > obj.Width {
+ dx = (labelWidth - obj.Width) / 2
+ obj.Width = labelWidth
+ }
+ }
+ if obj.LabelDimensions.Height != 0 {
+ labelHeight := float64(obj.LabelDimensions.Height) + 2*label.PADDING
+ if labelHeight > float64(verticalPadding) {
+ // if the label doesn't fit within the padding, we need to add more
+ grow := labelHeight - float64(verticalPadding)
+ dy = grow
+ obj.Height += grow
+ }
+ }
+ // we need to center children if we have to expand to fit the container label
+ if dx != 0 || dy != 0 {
+ gd.shift(dx, dy)
+ }
+ }
+
+ obj.LabelPosition = go2.Pointer(string(label.InsideTopCenter))
+ gridDiagrams[obj.AbsID()] = gd
+
+ for _, o := range gd.objects {
+ toRemove[o] = struct{}{}
+ }
+ return nil
+ }
+
if len(g.Objects) > 0 {
queue := make([]*d2graph.Object, 1, len(g.Objects))
queue[0] = g.Root
@@ -67,58 +162,14 @@ func withoutGridDiagrams(ctx context.Context, g *d2graph.Graph) (gridDiagrams ma
continue
}
- gd, err := layoutGrid(g, obj)
- if err != nil {
+ if err := processGrid(obj); err != nil {
return nil, nil, err
}
- obj.Children = make(map[string]*d2graph.Object)
- obj.ChildrenArray = nil
-
- if obj.Box != nil {
- // size shape according to grid
- obj.SizeToContent(float64(gd.width), float64(gd.height), 2*CONTAINER_PADDING, 2*CONTAINER_PADDING)
-
- // compute where the grid should be placed inside shape
- dslShape := strings.ToLower(obj.Shape.Value)
- shapeType := d2target.DSL_SHAPE_TO_SHAPE_TYPE[dslShape]
- s := shape.NewShape(shapeType, geo.NewBox(geo.NewPoint(0, 0), obj.Width, obj.Height))
- innerBox := s.GetInnerBox()
- if innerBox.TopLeft.X != 0 || innerBox.TopLeft.Y != 0 {
- gd.shift(innerBox.TopLeft.X, innerBox.TopLeft.Y)
- }
-
- var dx, dy float64
- labelWidth := float64(obj.LabelDimensions.Width) + 2*label.PADDING
- if labelWidth > obj.Width {
- dx = (labelWidth - obj.Width) / 2
- obj.Width = labelWidth
- }
- labelHeight := float64(obj.LabelDimensions.Height) + 2*label.PADDING
- if labelHeight > CONTAINER_PADDING {
- // if the label doesn't fit within the padding, we need to add more
- grow := labelHeight - CONTAINER_PADDING
- dy = grow / 2
- obj.Height += grow
- }
- // we need to center children if we have to expand to fit the container label
- if dx != 0 || dy != 0 {
- gd.shift(dx, dy)
- }
- }
-
- obj.LabelPosition = go2.Pointer(string(label.InsideTopCenter))
- gridDiagrams[obj.AbsID()] = gd
-
- for _, o := range gd.objects {
- toRemove[o] = struct{}{}
- }
}
}
- objectOrder = make(map[string]int)
layoutObjects := make([]*d2graph.Object, 0, len(toRemove))
- for i, obj := range g.Objects {
- objectOrder[obj.AbsID()] = i
+ for _, obj := range g.Objects {
if _, exists := toRemove[obj]; !exists {
layoutObjects = append(layoutObjects, obj)
}
@@ -206,7 +257,7 @@ func (gd *gridDiagram) layoutEvenly(g *d2graph.Graph, obj *d2graph.Object) {
}
o.Width = colWidths[j]
o.Height = rowHeights[i]
- o.TopLeft = cursor.Copy()
+ o.MoveWithDescendantsTo(cursor.X, cursor.Y)
cursor.X += o.Width + horizontalGap
}
cursor.X = 0
@@ -221,7 +272,7 @@ func (gd *gridDiagram) layoutEvenly(g *d2graph.Graph, obj *d2graph.Object) {
}
o.Width = colWidths[j]
o.Height = rowHeights[i]
- o.TopLeft = cursor.Copy()
+ o.MoveWithDescendantsTo(cursor.X, cursor.Y)
cursor.Y += o.Height + verticalGap
}
cursor.X += colWidths[j] + horizontalGap
@@ -294,6 +345,8 @@ func (gd *gridDiagram) layoutDynamic(g *d2graph.Graph, obj *d2graph.Object) {
maxX = math.Max(maxX, rowWidth)
}
+ // TODO if object is a nested grid, consider growing descendants according to the inner grid layout
+
// then expand thinnest objects to make each row the same width
// . โAโโโโโโโโโโโโโโ โBโโโ โCโโโโโโโโโโ โฌ maxHeight(A,B,C)
// . โ โ โ โ โ โ โ
@@ -357,7 +410,7 @@ func (gd *gridDiagram) layoutDynamic(g *d2graph.Graph, obj *d2graph.Object) {
for _, row := range layout {
rowHeight := 0.
for _, o := range row {
- o.TopLeft = cursor.Copy()
+ o.MoveWithDescendantsTo(cursor.X, cursor.Y)
cursor.X += o.Width + horizontalGap
rowHeight = math.Max(rowHeight, o.Height)
}
@@ -445,7 +498,7 @@ func (gd *gridDiagram) layoutDynamic(g *d2graph.Graph, obj *d2graph.Object) {
for _, column := range layout {
colWidth := 0.
for _, o := range column {
- o.TopLeft = cursor.Copy()
+ o.MoveWithDescendantsTo(cursor.X, cursor.Y)
cursor.Y += o.Height + verticalGap
colWidth = math.Max(colWidth, o.Width)
}
@@ -817,25 +870,42 @@ func cleanup(graph *d2graph.Graph, gridDiagrams map[string]*gridDiagram, objects
})
}()
+ var restore func(obj *d2graph.Object)
+ restore = func(obj *d2graph.Object) {
+ gd, exists := gridDiagrams[obj.AbsID()]
+ if !exists {
+ return
+ }
+ obj.LabelPosition = go2.Pointer(string(label.InsideTopCenter))
+
+ horizontalPadding, verticalPadding := CONTAINER_PADDING, CONTAINER_PADDING
+ if obj.GridGap != nil || obj.HorizontalGap != nil {
+ horizontalPadding = gd.horizontalGap
+ }
+ if obj.GridGap != nil || obj.VerticalGap != nil {
+ verticalPadding = gd.verticalGap
+ }
+
+ // shift the grid from (0, 0)
+ gd.shift(
+ obj.TopLeft.X+float64(horizontalPadding),
+ obj.TopLeft.Y+float64(verticalPadding),
+ )
+ gd.cleanup(obj, graph)
+
+ for _, child := range obj.ChildrenArray {
+ restore(child)
+ }
+ }
+
if graph.Root.IsGridDiagram() {
gd, exists := gridDiagrams[graph.Root.AbsID()]
if exists {
gd.cleanup(graph.Root, graph)
- return
}
}
for _, obj := range graph.Objects {
- gd, exists := gridDiagrams[obj.AbsID()]
- if !exists {
- continue
- }
- obj.LabelPosition = go2.Pointer(string(label.InsideTopCenter))
- // shift the grid from (0, 0)
- gd.shift(
- obj.TopLeft.X+CONTAINER_PADDING,
- obj.TopLeft.Y+CONTAINER_PADDING,
- )
- gd.cleanup(obj, graph)
+ restore(obj)
}
}
diff --git a/d2layouts/d2near/layout.go b/d2layouts/d2near/layout.go
index 342f75eac..614c13652 100644
--- a/d2layouts/d2near/layout.go
+++ b/d2layouts/d2near/layout.go
@@ -148,62 +148,14 @@ func WithoutConstantNears(ctx context.Context, g *d2graph.Graph) (constantNearGr
}
_, isConst := d2graph.NearConstants[d2graph.Key(obj.NearKey)[0]]
if isConst {
- descendantObjects, edges := pluckObjAndEdges(g, obj)
-
- tempGraph := d2graph.NewGraph()
- tempGraph.Root.ChildrenArray = []*d2graph.Object{obj}
- tempGraph.Root.Children[strings.ToLower(obj.ID)] = obj
-
- for _, descendantObj := range descendantObjects {
- descendantObj.Graph = tempGraph
- }
- tempGraph.Objects = descendantObjects
- tempGraph.Edges = edges
-
+ tempGraph := g.ExtractAsNestedGraph(obj)
constantNearGraphs = append(constantNearGraphs, tempGraph)
-
i--
- delete(obj.Parent.Children, strings.ToLower(obj.ID))
- for i := 0; i < len(obj.Parent.ChildrenArray); i++ {
- if obj.Parent.ChildrenArray[i] == obj {
- obj.Parent.ChildrenArray = append(obj.Parent.ChildrenArray[:i], obj.Parent.ChildrenArray[i+1:]...)
- break
- }
- }
-
- obj.Parent = tempGraph.Root
}
}
return constantNearGraphs
}
-func pluckObjAndEdges(g *d2graph.Graph, obj *d2graph.Object) (descendantsObjects []*d2graph.Object, edges []*d2graph.Edge) {
- for i := 0; i < len(g.Edges); i++ {
- edge := g.Edges[i]
- if edge.Src == obj || edge.Dst == obj {
- edges = append(edges, edge)
- g.Edges = append(g.Edges[:i], g.Edges[i+1:]...)
- i--
- }
- }
-
- for i := 0; i < len(g.Objects); i++ {
- temp := g.Objects[i]
- if temp.AbsID() == obj.AbsID() {
- descendantsObjects = append(descendantsObjects, obj)
- g.Objects = append(g.Objects[:i], g.Objects[i+1:]...)
- for _, child := range obj.ChildrenArray {
- subObjects, subEdges := pluckObjAndEdges(g, child)
- descendantsObjects = append(descendantsObjects, subObjects...)
- edges = append(edges, subEdges...)
- }
- break
- }
- }
-
- return descendantsObjects, edges
-}
-
// boundingBox gets the center of the graph as defined by shapes
// The bounds taking into consideration only shapes gives more of a feeling of true center
// It differs from d2target.BoundingBox which needs to include every visible thing
diff --git a/e2etests/stable_test.go b/e2etests/stable_test.go
index 60b690892..afe3e8b50 100644
--- a/e2etests/stable_test.go
+++ b/e2etests/stable_test.go
@@ -2721,6 +2721,8 @@ scenarios: {
loadFromFile(t, "ent2d2_basic"),
loadFromFile(t, "ent2d2_right"),
loadFromFile(t, "grid_large_checkered"),
+ loadFromFile(t, "grid_nested"),
+ loadFromFile(t, "grid_nested_gap0"),
}
runa(t, tcs)
diff --git a/e2etests/testdata/files/grid_nested.d2 b/e2etests/testdata/files/grid_nested.d2
new file mode 100644
index 000000000..0be96eaf1
--- /dev/null
+++ b/e2etests/testdata/files/grid_nested.d2
@@ -0,0 +1,96 @@
+classes: {
+ 2x2: {
+ grid-rows: 2
+ grid-columns: 2
+ }
+ gap0: {
+ vertical-gap: 0
+ horizontal-gap: 0
+ }
+}
+
+grid w/ container: {
+ class: 2x2
+
+ a
+ b: {
+ b child
+ }
+ c
+ d
+}
+
+grid w/ nested containers: {
+ class: 2x2
+
+ a
+ b: {
+ b 1: {
+ b 2: {
+ b 3: {
+ b 4
+ }
+ }
+ b 2a: {
+ b 3a: {
+ b 3a
+ }
+ }
+ }
+ }
+ c
+ d
+}
+
+grid in grid: {
+ class: 2x2
+
+ a
+ b: {
+ class: 2x2
+
+ a
+ b
+ c
+ d
+ }
+ c
+ d
+}
+
+grid w/ grid w/ grid: {
+ class: [2x2; gap0]
+
+ a
+ b: {
+ class: [2x2; gap0]
+
+ a
+ b
+ c: {
+ class: [2x2; gap0]
+
+ a
+ b
+ c
+ d: {
+ class: [2x2; gap0]
+
+ a: {
+ class: [2x2; gap0]
+
+ a
+ b
+ c
+ d
+ }
+ b
+ c
+ d
+ }
+ }
+ d
+ }
+ c
+ d
+}
diff --git a/e2etests/testdata/files/grid_nested_gap0.d2 b/e2etests/testdata/files/grid_nested_gap0.d2
new file mode 100644
index 000000000..3d449fcfb
--- /dev/null
+++ b/e2etests/testdata/files/grid_nested_gap0.d2
@@ -0,0 +1,18 @@
+The Universe: {
+ grid-rows: 3
+ grid-gap: 0
+
+ FirstTwo.width: 300
+ Last.style.fill: red
+
+ TALA: "" {
+ grid-rows: 3
+ grid-gap: 0
+ TALA.width: 100
+ D2
+ Cloud
+ }
+ D2.width: 200
+ Cloud.width: 100
+ Terrastruct.width: 400
+}
diff --git a/e2etests/testdata/stable/grid_gap/dagre/board.exp.json b/e2etests/testdata/stable/grid_gap/dagre/board.exp.json
index 3b198f9f0..635617683 100644
--- a/e2etests/testdata/stable/grid_gap/dagre/board.exp.json
+++ b/e2etests/testdata/stable/grid_gap/dagre/board.exp.json
@@ -8,10 +8,10 @@
"type": "rectangle",
"pos": {
"x": 0,
- "y": 70
+ "y": 132
},
- "width": 480,
- "height": 378,
+ "width": 560,
+ "height": 334,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -48,8 +48,8 @@
"id": "vertical-gap 30 horizontal-gap 100.a",
"type": "rectangle",
"pos": {
- "x": 60,
- "y": 130
+ "x": 100,
+ "y": 178
},
"width": 54,
"height": 66,
@@ -89,8 +89,8 @@
"id": "vertical-gap 30 horizontal-gap 100.b",
"type": "rectangle",
"pos": {
- "x": 214,
- "y": 130
+ "x": 254,
+ "y": 178
},
"width": 53,
"height": 66,
@@ -130,8 +130,8 @@
"id": "vertical-gap 30 horizontal-gap 100.c",
"type": "rectangle",
"pos": {
- "x": 367,
- "y": 130
+ "x": 407,
+ "y": 178
},
"width": 53,
"height": 66,
@@ -171,8 +171,8 @@
"id": "vertical-gap 30 horizontal-gap 100.d",
"type": "rectangle",
"pos": {
- "x": 60,
- "y": 226
+ "x": 100,
+ "y": 274
},
"width": 54,
"height": 66,
@@ -212,8 +212,8 @@
"id": "vertical-gap 30 horizontal-gap 100.e",
"type": "rectangle",
"pos": {
- "x": 214,
- "y": 226
+ "x": 254,
+ "y": 274
},
"width": 53,
"height": 66,
@@ -253,8 +253,8 @@
"id": "vertical-gap 30 horizontal-gap 100.f",
"type": "rectangle",
"pos": {
- "x": 367,
- "y": 226
+ "x": 407,
+ "y": 274
},
"width": 53,
"height": 66,
@@ -294,8 +294,8 @@
"id": "vertical-gap 30 horizontal-gap 100.g",
"type": "rectangle",
"pos": {
- "x": 60,
- "y": 322
+ "x": 100,
+ "y": 370
},
"width": 54,
"height": 66,
@@ -335,8 +335,8 @@
"id": "vertical-gap 30 horizontal-gap 100.h",
"type": "rectangle",
"pos": {
- "x": 214,
- "y": 322
+ "x": 254,
+ "y": 370
},
"width": 53,
"height": 66,
@@ -376,8 +376,8 @@
"id": "vertical-gap 30 horizontal-gap 100.i",
"type": "rectangle",
"pos": {
- "x": 367,
- "y": 322
+ "x": 407,
+ "y": 370
},
"width": 53,
"height": 66,
@@ -417,11 +417,11 @@
"id": "vertical-gap 100 horizontal-gap 30",
"type": "rectangle",
"pos": {
- "x": 540,
+ "x": 620,
"y": 0
},
"width": 408,
- "height": 518,
+ "height": 598,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -458,8 +458,8 @@
"id": "vertical-gap 100 horizontal-gap 30.a",
"type": "rectangle",
"pos": {
- "x": 634,
- "y": 60
+ "x": 714,
+ "y": 100
},
"width": 54,
"height": 66,
@@ -499,8 +499,8 @@
"id": "vertical-gap 100 horizontal-gap 30.b",
"type": "rectangle",
"pos": {
- "x": 718,
- "y": 60
+ "x": 798,
+ "y": 100
},
"width": 53,
"height": 66,
@@ -540,8 +540,8 @@
"id": "vertical-gap 100 horizontal-gap 30.c",
"type": "rectangle",
"pos": {
- "x": 801,
- "y": 60
+ "x": 881,
+ "y": 100
},
"width": 53,
"height": 66,
@@ -581,8 +581,8 @@
"id": "vertical-gap 100 horizontal-gap 30.d",
"type": "rectangle",
"pos": {
- "x": 634,
- "y": 226
+ "x": 714,
+ "y": 266
},
"width": 54,
"height": 66,
@@ -622,8 +622,8 @@
"id": "vertical-gap 100 horizontal-gap 30.e",
"type": "rectangle",
"pos": {
- "x": 718,
- "y": 226
+ "x": 798,
+ "y": 266
},
"width": 53,
"height": 66,
@@ -663,8 +663,8 @@
"id": "vertical-gap 100 horizontal-gap 30.f",
"type": "rectangle",
"pos": {
- "x": 801,
- "y": 226
+ "x": 881,
+ "y": 266
},
"width": 53,
"height": 66,
@@ -704,8 +704,8 @@
"id": "vertical-gap 100 horizontal-gap 30.g",
"type": "rectangle",
"pos": {
- "x": 634,
- "y": 392
+ "x": 714,
+ "y": 432
},
"width": 54,
"height": 66,
@@ -745,8 +745,8 @@
"id": "vertical-gap 100 horizontal-gap 30.h",
"type": "rectangle",
"pos": {
- "x": 718,
- "y": 392
+ "x": 798,
+ "y": 432
},
"width": 53,
"height": 66,
@@ -786,8 +786,8 @@
"id": "vertical-gap 100 horizontal-gap 30.i",
"type": "rectangle",
"pos": {
- "x": 801,
- "y": 392
+ "x": 881,
+ "y": 432
},
"width": 53,
"height": 66,
@@ -827,11 +827,11 @@
"id": "gap 0",
"type": "rectangle",
"pos": {
- "x": 1008,
- "y": 100
+ "x": 1088,
+ "y": 177
},
- "width": 280,
- "height": 318,
+ "width": 160,
+ "height": 244,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -868,8 +868,8 @@
"id": "gap 0.a",
"type": "rectangle",
"pos": {
- "x": 1068,
- "y": 160
+ "x": 1088,
+ "y": 223
},
"width": 54,
"height": 66,
@@ -909,8 +909,8 @@
"id": "gap 0.b",
"type": "rectangle",
"pos": {
- "x": 1122,
- "y": 160
+ "x": 1142,
+ "y": 223
},
"width": 53,
"height": 66,
@@ -950,8 +950,8 @@
"id": "gap 0.c",
"type": "rectangle",
"pos": {
- "x": 1175,
- "y": 160
+ "x": 1195,
+ "y": 223
},
"width": 53,
"height": 66,
@@ -991,8 +991,8 @@
"id": "gap 0.d",
"type": "rectangle",
"pos": {
- "x": 1068,
- "y": 226
+ "x": 1088,
+ "y": 289
},
"width": 54,
"height": 66,
@@ -1032,8 +1032,8 @@
"id": "gap 0.e",
"type": "rectangle",
"pos": {
- "x": 1122,
- "y": 226
+ "x": 1142,
+ "y": 289
},
"width": 53,
"height": 66,
@@ -1073,8 +1073,8 @@
"id": "gap 0.f",
"type": "rectangle",
"pos": {
- "x": 1175,
- "y": 226
+ "x": 1195,
+ "y": 289
},
"width": 53,
"height": 66,
@@ -1114,8 +1114,8 @@
"id": "gap 0.g",
"type": "rectangle",
"pos": {
- "x": 1068,
- "y": 292
+ "x": 1088,
+ "y": 355
},
"width": 54,
"height": 66,
@@ -1155,8 +1155,8 @@
"id": "gap 0.h",
"type": "rectangle",
"pos": {
- "x": 1122,
- "y": 292
+ "x": 1142,
+ "y": 355
},
"width": 53,
"height": 66,
@@ -1196,8 +1196,8 @@
"id": "gap 0.i",
"type": "rectangle",
"pos": {
- "x": 1175,
- "y": 292
+ "x": 1195,
+ "y": 355
},
"width": 53,
"height": 66,
@@ -1237,11 +1237,11 @@
"id": "gap 10 vertical-gap 100",
"type": "rectangle",
"pos": {
- "x": 1348,
+ "x": 1308,
"y": 0
},
- "width": 300,
- "height": 518,
+ "width": 278,
+ "height": 598,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -1278,8 +1278,8 @@
"id": "gap 10 vertical-gap 100.a",
"type": "rectangle",
"pos": {
- "x": 1408,
- "y": 60
+ "x": 1357,
+ "y": 100
},
"width": 54,
"height": 66,
@@ -1319,8 +1319,8 @@
"id": "gap 10 vertical-gap 100.b",
"type": "rectangle",
"pos": {
- "x": 1472,
- "y": 60
+ "x": 1421,
+ "y": 100
},
"width": 53,
"height": 66,
@@ -1360,8 +1360,8 @@
"id": "gap 10 vertical-gap 100.c",
"type": "rectangle",
"pos": {
- "x": 1535,
- "y": 60
+ "x": 1484,
+ "y": 100
},
"width": 53,
"height": 66,
@@ -1401,8 +1401,8 @@
"id": "gap 10 vertical-gap 100.d",
"type": "rectangle",
"pos": {
- "x": 1408,
- "y": 226
+ "x": 1357,
+ "y": 266
},
"width": 54,
"height": 66,
@@ -1442,8 +1442,8 @@
"id": "gap 10 vertical-gap 100.e",
"type": "rectangle",
"pos": {
- "x": 1472,
- "y": 226
+ "x": 1421,
+ "y": 266
},
"width": 53,
"height": 66,
@@ -1483,8 +1483,8 @@
"id": "gap 10 vertical-gap 100.f",
"type": "rectangle",
"pos": {
- "x": 1535,
- "y": 226
+ "x": 1484,
+ "y": 266
},
"width": 53,
"height": 66,
@@ -1524,8 +1524,8 @@
"id": "gap 10 vertical-gap 100.g",
"type": "rectangle",
"pos": {
- "x": 1408,
- "y": 392
+ "x": 1357,
+ "y": 432
},
"width": 54,
"height": 66,
@@ -1565,8 +1565,8 @@
"id": "gap 10 vertical-gap 100.h",
"type": "rectangle",
"pos": {
- "x": 1472,
- "y": 392
+ "x": 1421,
+ "y": 432
},
"width": 53,
"height": 66,
@@ -1606,8 +1606,8 @@
"id": "gap 10 vertical-gap 100.i",
"type": "rectangle",
"pos": {
- "x": 1535,
- "y": 392
+ "x": 1484,
+ "y": 432
},
"width": 53,
"height": 66,
diff --git a/e2etests/testdata/stable/grid_gap/dagre/sketch.exp.svg b/e2etests/testdata/stable/grid_gap/dagre/sketch.exp.svg
index 1fca800b5..b59a3f102 100644
--- a/e2etests/testdata/stable/grid_gap/dagre/sketch.exp.svg
+++ b/e2etests/testdata/stable/grid_gap/dagre/sketch.exp.svg
@@ -1,16 +1,16 @@
-
\ No newline at end of file
diff --git a/e2etests/testdata/stable/grid_gap/elk/board.exp.json b/e2etests/testdata/stable/grid_gap/elk/board.exp.json
index 97349cc99..74816850f 100644
--- a/e2etests/testdata/stable/grid_gap/elk/board.exp.json
+++ b/e2etests/testdata/stable/grid_gap/elk/board.exp.json
@@ -8,10 +8,10 @@
"type": "rectangle",
"pos": {
"x": 12,
- "y": 82
+ "y": 144
},
- "width": 480,
- "height": 378,
+ "width": 560,
+ "height": 334,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -48,8 +48,8 @@
"id": "vertical-gap 30 horizontal-gap 100.a",
"type": "rectangle",
"pos": {
- "x": 72,
- "y": 142
+ "x": 112,
+ "y": 190
},
"width": 54,
"height": 66,
@@ -89,8 +89,8 @@
"id": "vertical-gap 30 horizontal-gap 100.b",
"type": "rectangle",
"pos": {
- "x": 226,
- "y": 142
+ "x": 266,
+ "y": 190
},
"width": 53,
"height": 66,
@@ -130,8 +130,8 @@
"id": "vertical-gap 30 horizontal-gap 100.c",
"type": "rectangle",
"pos": {
- "x": 379,
- "y": 142
+ "x": 419,
+ "y": 190
},
"width": 53,
"height": 66,
@@ -171,8 +171,8 @@
"id": "vertical-gap 30 horizontal-gap 100.d",
"type": "rectangle",
"pos": {
- "x": 72,
- "y": 238
+ "x": 112,
+ "y": 286
},
"width": 54,
"height": 66,
@@ -212,8 +212,8 @@
"id": "vertical-gap 30 horizontal-gap 100.e",
"type": "rectangle",
"pos": {
- "x": 226,
- "y": 238
+ "x": 266,
+ "y": 286
},
"width": 53,
"height": 66,
@@ -253,8 +253,8 @@
"id": "vertical-gap 30 horizontal-gap 100.f",
"type": "rectangle",
"pos": {
- "x": 379,
- "y": 238
+ "x": 419,
+ "y": 286
},
"width": 53,
"height": 66,
@@ -294,8 +294,8 @@
"id": "vertical-gap 30 horizontal-gap 100.g",
"type": "rectangle",
"pos": {
- "x": 72,
- "y": 334
+ "x": 112,
+ "y": 382
},
"width": 54,
"height": 66,
@@ -335,8 +335,8 @@
"id": "vertical-gap 30 horizontal-gap 100.h",
"type": "rectangle",
"pos": {
- "x": 226,
- "y": 334
+ "x": 266,
+ "y": 382
},
"width": 53,
"height": 66,
@@ -376,8 +376,8 @@
"id": "vertical-gap 30 horizontal-gap 100.i",
"type": "rectangle",
"pos": {
- "x": 379,
- "y": 334
+ "x": 419,
+ "y": 382
},
"width": 53,
"height": 66,
@@ -417,11 +417,11 @@
"id": "vertical-gap 100 horizontal-gap 30",
"type": "rectangle",
"pos": {
- "x": 512,
+ "x": 592,
"y": 12
},
"width": 408,
- "height": 518,
+ "height": 598,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -458,8 +458,8 @@
"id": "vertical-gap 100 horizontal-gap 30.a",
"type": "rectangle",
"pos": {
- "x": 606,
- "y": 72
+ "x": 686,
+ "y": 112
},
"width": 54,
"height": 66,
@@ -499,8 +499,8 @@
"id": "vertical-gap 100 horizontal-gap 30.b",
"type": "rectangle",
"pos": {
- "x": 690,
- "y": 72
+ "x": 770,
+ "y": 112
},
"width": 53,
"height": 66,
@@ -540,8 +540,8 @@
"id": "vertical-gap 100 horizontal-gap 30.c",
"type": "rectangle",
"pos": {
- "x": 773,
- "y": 72
+ "x": 853,
+ "y": 112
},
"width": 53,
"height": 66,
@@ -581,8 +581,8 @@
"id": "vertical-gap 100 horizontal-gap 30.d",
"type": "rectangle",
"pos": {
- "x": 606,
- "y": 238
+ "x": 686,
+ "y": 278
},
"width": 54,
"height": 66,
@@ -622,8 +622,8 @@
"id": "vertical-gap 100 horizontal-gap 30.e",
"type": "rectangle",
"pos": {
- "x": 690,
- "y": 238
+ "x": 770,
+ "y": 278
},
"width": 53,
"height": 66,
@@ -663,8 +663,8 @@
"id": "vertical-gap 100 horizontal-gap 30.f",
"type": "rectangle",
"pos": {
- "x": 773,
- "y": 238
+ "x": 853,
+ "y": 278
},
"width": 53,
"height": 66,
@@ -704,8 +704,8 @@
"id": "vertical-gap 100 horizontal-gap 30.g",
"type": "rectangle",
"pos": {
- "x": 606,
- "y": 404
+ "x": 686,
+ "y": 444
},
"width": 54,
"height": 66,
@@ -745,8 +745,8 @@
"id": "vertical-gap 100 horizontal-gap 30.h",
"type": "rectangle",
"pos": {
- "x": 690,
- "y": 404
+ "x": 770,
+ "y": 444
},
"width": 53,
"height": 66,
@@ -786,8 +786,8 @@
"id": "vertical-gap 100 horizontal-gap 30.i",
"type": "rectangle",
"pos": {
- "x": 773,
- "y": 404
+ "x": 853,
+ "y": 444
},
"width": 53,
"height": 66,
@@ -827,11 +827,11 @@
"id": "gap 0",
"type": "rectangle",
"pos": {
- "x": 940,
- "y": 112
+ "x": 1020,
+ "y": 189
},
- "width": 280,
- "height": 318,
+ "width": 160,
+ "height": 244,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -868,8 +868,8 @@
"id": "gap 0.a",
"type": "rectangle",
"pos": {
- "x": 1000,
- "y": 172
+ "x": 1020,
+ "y": 235
},
"width": 54,
"height": 66,
@@ -909,8 +909,8 @@
"id": "gap 0.b",
"type": "rectangle",
"pos": {
- "x": 1054,
- "y": 172
+ "x": 1074,
+ "y": 235
},
"width": 53,
"height": 66,
@@ -950,8 +950,8 @@
"id": "gap 0.c",
"type": "rectangle",
"pos": {
- "x": 1107,
- "y": 172
+ "x": 1127,
+ "y": 235
},
"width": 53,
"height": 66,
@@ -991,8 +991,8 @@
"id": "gap 0.d",
"type": "rectangle",
"pos": {
- "x": 1000,
- "y": 238
+ "x": 1020,
+ "y": 301
},
"width": 54,
"height": 66,
@@ -1032,8 +1032,8 @@
"id": "gap 0.e",
"type": "rectangle",
"pos": {
- "x": 1054,
- "y": 238
+ "x": 1074,
+ "y": 301
},
"width": 53,
"height": 66,
@@ -1073,8 +1073,8 @@
"id": "gap 0.f",
"type": "rectangle",
"pos": {
- "x": 1107,
- "y": 238
+ "x": 1127,
+ "y": 301
},
"width": 53,
"height": 66,
@@ -1114,8 +1114,8 @@
"id": "gap 0.g",
"type": "rectangle",
"pos": {
- "x": 1000,
- "y": 304
+ "x": 1020,
+ "y": 367
},
"width": 54,
"height": 66,
@@ -1155,8 +1155,8 @@
"id": "gap 0.h",
"type": "rectangle",
"pos": {
- "x": 1054,
- "y": 304
+ "x": 1074,
+ "y": 367
},
"width": 53,
"height": 66,
@@ -1196,8 +1196,8 @@
"id": "gap 0.i",
"type": "rectangle",
"pos": {
- "x": 1107,
- "y": 304
+ "x": 1127,
+ "y": 367
},
"width": 53,
"height": 66,
@@ -1237,11 +1237,11 @@
"id": "gap 10 vertical-gap 100",
"type": "rectangle",
"pos": {
- "x": 1240,
+ "x": 1200,
"y": 12
},
- "width": 300,
- "height": 518,
+ "width": 278,
+ "height": 598,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -1278,8 +1278,8 @@
"id": "gap 10 vertical-gap 100.a",
"type": "rectangle",
"pos": {
- "x": 1300,
- "y": 72
+ "x": 1249,
+ "y": 112
},
"width": 54,
"height": 66,
@@ -1319,8 +1319,8 @@
"id": "gap 10 vertical-gap 100.b",
"type": "rectangle",
"pos": {
- "x": 1364,
- "y": 72
+ "x": 1313,
+ "y": 112
},
"width": 53,
"height": 66,
@@ -1360,8 +1360,8 @@
"id": "gap 10 vertical-gap 100.c",
"type": "rectangle",
"pos": {
- "x": 1427,
- "y": 72
+ "x": 1376,
+ "y": 112
},
"width": 53,
"height": 66,
@@ -1401,8 +1401,8 @@
"id": "gap 10 vertical-gap 100.d",
"type": "rectangle",
"pos": {
- "x": 1300,
- "y": 238
+ "x": 1249,
+ "y": 278
},
"width": 54,
"height": 66,
@@ -1442,8 +1442,8 @@
"id": "gap 10 vertical-gap 100.e",
"type": "rectangle",
"pos": {
- "x": 1364,
- "y": 238
+ "x": 1313,
+ "y": 278
},
"width": 53,
"height": 66,
@@ -1483,8 +1483,8 @@
"id": "gap 10 vertical-gap 100.f",
"type": "rectangle",
"pos": {
- "x": 1427,
- "y": 238
+ "x": 1376,
+ "y": 278
},
"width": 53,
"height": 66,
@@ -1524,8 +1524,8 @@
"id": "gap 10 vertical-gap 100.g",
"type": "rectangle",
"pos": {
- "x": 1300,
- "y": 404
+ "x": 1249,
+ "y": 444
},
"width": 54,
"height": 66,
@@ -1565,8 +1565,8 @@
"id": "gap 10 vertical-gap 100.h",
"type": "rectangle",
"pos": {
- "x": 1364,
- "y": 404
+ "x": 1313,
+ "y": 444
},
"width": 53,
"height": 66,
@@ -1606,8 +1606,8 @@
"id": "gap 10 vertical-gap 100.i",
"type": "rectangle",
"pos": {
- "x": 1427,
- "y": 404
+ "x": 1376,
+ "y": 444
},
"width": 53,
"height": 66,
diff --git a/e2etests/testdata/stable/grid_gap/elk/sketch.exp.svg b/e2etests/testdata/stable/grid_gap/elk/sketch.exp.svg
index 1fe9003c7..4339e2344 100644
--- a/e2etests/testdata/stable/grid_gap/elk/sketch.exp.svg
+++ b/e2etests/testdata/stable/grid_gap/elk/sketch.exp.svg
@@ -1,16 +1,16 @@
-vertical-gap 30 horizontal-gap 100vertical-gap 100 horizontal-gap 30gap 0gap 10 vertical-gap 100abcdefghiabcdefghiabcdefghiabcdefghi
-
+ .d2-2169342647 .fill-N1{fill:#0A0F25;}
+ .d2-2169342647 .fill-N2{fill:#676C7E;}
+ .d2-2169342647 .fill-N3{fill:#9499AB;}
+ .d2-2169342647 .fill-N4{fill:#CFD2DD;}
+ .d2-2169342647 .fill-N5{fill:#DEE1EB;}
+ .d2-2169342647 .fill-N6{fill:#EEF1F8;}
+ .d2-2169342647 .fill-N7{fill:#FFFFFF;}
+ .d2-2169342647 .fill-B1{fill:#0D32B2;}
+ .d2-2169342647 .fill-B2{fill:#0D32B2;}
+ .d2-2169342647 .fill-B3{fill:#E3E9FD;}
+ .d2-2169342647 .fill-B4{fill:#E3E9FD;}
+ .d2-2169342647 .fill-B5{fill:#EDF0FD;}
+ .d2-2169342647 .fill-B6{fill:#F7F8FE;}
+ .d2-2169342647 .fill-AA2{fill:#4A6FF3;}
+ .d2-2169342647 .fill-AA4{fill:#EDF0FD;}
+ .d2-2169342647 .fill-AA5{fill:#F7F8FE;}
+ .d2-2169342647 .fill-AB4{fill:#EDF0FD;}
+ .d2-2169342647 .fill-AB5{fill:#F7F8FE;}
+ .d2-2169342647 .stroke-N1{stroke:#0A0F25;}
+ .d2-2169342647 .stroke-N2{stroke:#676C7E;}
+ .d2-2169342647 .stroke-N3{stroke:#9499AB;}
+ .d2-2169342647 .stroke-N4{stroke:#CFD2DD;}
+ .d2-2169342647 .stroke-N5{stroke:#DEE1EB;}
+ .d2-2169342647 .stroke-N6{stroke:#EEF1F8;}
+ .d2-2169342647 .stroke-N7{stroke:#FFFFFF;}
+ .d2-2169342647 .stroke-B1{stroke:#0D32B2;}
+ .d2-2169342647 .stroke-B2{stroke:#0D32B2;}
+ .d2-2169342647 .stroke-B3{stroke:#E3E9FD;}
+ .d2-2169342647 .stroke-B4{stroke:#E3E9FD;}
+ .d2-2169342647 .stroke-B5{stroke:#EDF0FD;}
+ .d2-2169342647 .stroke-B6{stroke:#F7F8FE;}
+ .d2-2169342647 .stroke-AA2{stroke:#4A6FF3;}
+ .d2-2169342647 .stroke-AA4{stroke:#EDF0FD;}
+ .d2-2169342647 .stroke-AA5{stroke:#F7F8FE;}
+ .d2-2169342647 .stroke-AB4{stroke:#EDF0FD;}
+ .d2-2169342647 .stroke-AB5{stroke:#F7F8FE;}
+ .d2-2169342647 .background-color-N1{background-color:#0A0F25;}
+ .d2-2169342647 .background-color-N2{background-color:#676C7E;}
+ .d2-2169342647 .background-color-N3{background-color:#9499AB;}
+ .d2-2169342647 .background-color-N4{background-color:#CFD2DD;}
+ .d2-2169342647 .background-color-N5{background-color:#DEE1EB;}
+ .d2-2169342647 .background-color-N6{background-color:#EEF1F8;}
+ .d2-2169342647 .background-color-N7{background-color:#FFFFFF;}
+ .d2-2169342647 .background-color-B1{background-color:#0D32B2;}
+ .d2-2169342647 .background-color-B2{background-color:#0D32B2;}
+ .d2-2169342647 .background-color-B3{background-color:#E3E9FD;}
+ .d2-2169342647 .background-color-B4{background-color:#E3E9FD;}
+ .d2-2169342647 .background-color-B5{background-color:#EDF0FD;}
+ .d2-2169342647 .background-color-B6{background-color:#F7F8FE;}
+ .d2-2169342647 .background-color-AA2{background-color:#4A6FF3;}
+ .d2-2169342647 .background-color-AA4{background-color:#EDF0FD;}
+ .d2-2169342647 .background-color-AA5{background-color:#F7F8FE;}
+ .d2-2169342647 .background-color-AB4{background-color:#EDF0FD;}
+ .d2-2169342647 .background-color-AB5{background-color:#F7F8FE;}
+ .d2-2169342647 .color-N1{color:#0A0F25;}
+ .d2-2169342647 .color-N2{color:#676C7E;}
+ .d2-2169342647 .color-N3{color:#9499AB;}
+ .d2-2169342647 .color-N4{color:#CFD2DD;}
+ .d2-2169342647 .color-N5{color:#DEE1EB;}
+ .d2-2169342647 .color-N6{color:#EEF1F8;}
+ .d2-2169342647 .color-N7{color:#FFFFFF;}
+ .d2-2169342647 .color-B1{color:#0D32B2;}
+ .d2-2169342647 .color-B2{color:#0D32B2;}
+ .d2-2169342647 .color-B3{color:#E3E9FD;}
+ .d2-2169342647 .color-B4{color:#E3E9FD;}
+ .d2-2169342647 .color-B5{color:#EDF0FD;}
+ .d2-2169342647 .color-B6{color:#F7F8FE;}
+ .d2-2169342647 .color-AA2{color:#4A6FF3;}
+ .d2-2169342647 .color-AA4{color:#EDF0FD;}
+ .d2-2169342647 .color-AA5{color:#F7F8FE;}
+ .d2-2169342647 .color-AB4{color:#EDF0FD;}
+ .d2-2169342647 .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}]]>vertical-gap 30 horizontal-gap 100vertical-gap 100 horizontal-gap 30gap 0gap 10 vertical-gap 100abcdefghiabcdefghiabcdefghiabcdefghi
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/grid_nested/dagre/board.exp.json b/e2etests/testdata/stable/grid_nested/dagre/board.exp.json
new file mode 100644
index 000000000..7a47434c9
--- /dev/null
+++ b/e2etests/testdata/stable/grid_nested/dagre/board.exp.json
@@ -0,0 +1,2028 @@
+{
+ "name": "",
+ "isFolderOnly": false,
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "grid w/ container",
+ "type": "rectangle",
+ "classes": [
+ "2x2"
+ ],
+ "pos": {
+ "x": 0,
+ "y": 150
+ },
+ "width": 384,
+ "height": 356,
+ "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 w/ container",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 200,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "grid w/ container.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 60,
+ "y": 210
+ },
+ "width": 53,
+ "height": 130,
+ "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": "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 w/ container.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 153,
+ "y": 210
+ },
+ "width": 171,
+ "height": 130,
+ "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": "b",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 12,
+ "labelHeight": 31,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "grid w/ container.b.b child",
+ "type": "rectangle",
+ "pos": {
+ "x": 193,
+ "y": 242
+ },
+ "width": 91,
+ "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 child",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 46,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "grid w/ container.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 60,
+ "y": 380
+ },
+ "width": 53,
+ "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": "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 w/ container.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 153,
+ "y": 380
+ },
+ "width": 171,
+ "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 w/ nested containers",
+ "type": "rectangle",
+ "classes": [
+ "2x2"
+ ],
+ "pos": {
+ "x": 444,
+ "y": 0
+ },
+ "width": 692,
+ "height": 656,
+ "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 w/ nested containers",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 296,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "grid w/ nested containers.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 504,
+ "y": 60
+ },
+ "width": 53,
+ "height": 430,
+ "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": "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 w/ nested containers.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 597,
+ "y": 60
+ },
+ "width": 479,
+ "height": 430,
+ "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": "b",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 12,
+ "labelHeight": 31,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1",
+ "type": "rectangle",
+ "pos": {
+ "x": 617,
+ "y": 123
+ },
+ "width": 439,
+ "height": 335,
+ "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 1",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 24,
+ "labelHeight": 26,
+ "labelPosition": "OUTSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2",
+ "type": "rectangle",
+ "pos": {
+ "x": 637,
+ "y": 183
+ },
+ "width": 186,
+ "height": 240,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 2",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 20,
+ "labelHeight": 21,
+ "labelPosition": "OUTSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 4
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2.b 3",
+ "type": "rectangle",
+ "pos": {
+ "x": 657,
+ "y": 246
+ },
+ "width": 146,
+ "height": 140,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 3",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 20,
+ "labelHeight": 21,
+ "labelPosition": "OUTSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 5
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2.b 3.b 4",
+ "type": "rectangle",
+ "pos": {
+ "x": 697,
+ "y": 283
+ },
+ "width": 66,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 4",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 21,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 6
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2a",
+ "type": "rectangle",
+ "pos": {
+ "x": 843,
+ "y": 183
+ },
+ "width": 193,
+ "height": 240,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 2a",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 26,
+ "labelHeight": 21,
+ "labelPosition": "OUTSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 4
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2a.b 3a",
+ "type": "rectangle",
+ "pos": {
+ "x": 863,
+ "y": 246
+ },
+ "width": 153,
+ "height": 140,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 3a",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 26,
+ "labelHeight": 21,
+ "labelPosition": "OUTSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 5
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2a.b 3a.b 3a",
+ "type": "rectangle",
+ "pos": {
+ "x": 903,
+ "y": 283
+ },
+ "width": 73,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 3a",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 28,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 6
+ },
+ {
+ "id": "grid w/ nested containers.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 504,
+ "y": 530
+ },
+ "width": 53,
+ "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": "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 w/ nested containers.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 597,
+ "y": 530
+ },
+ "width": 479,
+ "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 in grid",
+ "type": "rectangle",
+ "classes": [
+ "2x2"
+ ],
+ "pos": {
+ "x": 1196,
+ "y": 69
+ },
+ "width": 480,
+ "height": 518,
+ "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 in grid",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 124,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "grid in grid.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1256,
+ "y": 129
+ },
+ "width": 53,
+ "height": 292,
+ "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": "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 in grid.b",
+ "type": "rectangle",
+ "classes": [
+ "2x2"
+ ],
+ "pos": {
+ "x": 1349,
+ "y": 129
+ },
+ "width": 267,
+ "height": 292,
+ "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": "b",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 12,
+ "labelHeight": 31,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "grid in grid.b.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1409,
+ "y": 189
+ },
+ "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": 3
+ },
+ {
+ "id": "grid in grid.b.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 1502,
+ "y": 189
+ },
+ "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": "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": 3
+ },
+ {
+ "id": "grid in grid.b.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1409,
+ "y": 295
+ },
+ "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": 3
+ },
+ {
+ "id": "grid in grid.b.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 1502,
+ "y": 295
+ },
+ "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": 3
+ },
+ {
+ "id": "grid in grid.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1256,
+ "y": 461
+ },
+ "width": 53,
+ "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": "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 in grid.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 1349,
+ "y": 461
+ },
+ "width": 267,
+ "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 w/ grid w/ grid",
+ "type": "rectangle",
+ "pos": {
+ "x": 1736,
+ "y": 38
+ },
+ "width": 321,
+ "height": 581,
+ "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 w/ grid w/ grid",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 219,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "grid w/ grid w/ grid.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1736,
+ "y": 84
+ },
+ "width": 53,
+ "height": 469,
+ "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": "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 w/ grid w/ grid.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 1789,
+ "y": 84
+ },
+ "width": 268,
+ "height": 469,
+ "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": "b",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 12,
+ "labelHeight": 31,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1789,
+ "y": 125
+ },
+ "width": 214,
+ "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": 3
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 2003,
+ "y": 125
+ },
+ "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": "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": 3
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1789,
+ "y": 191
+ },
+ "width": 214,
+ "height": 362,
+ "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": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 9,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1789,
+ "y": 227
+ },
+ "width": 53,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 4
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 1842,
+ "y": 227
+ },
+ "width": 161,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 4
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1789,
+ "y": 293
+ },
+ "width": 53,
+ "height": 260,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 4
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 1842,
+ "y": 293
+ },
+ "width": 161,
+ "height": 260,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": false,
+ "underline": false,
+ "labelWidth": 8,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 4
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1842,
+ "y": 324
+ },
+ "width": 107,
+ "height": 163,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": false,
+ "underline": false,
+ "labelWidth": 7,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 5
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.a.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1842,
+ "y": 355
+ },
+ "width": 53,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 6
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.a.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 1895,
+ "y": 355
+ },
+ "width": 54,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 6
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.a.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1842,
+ "y": 421
+ },
+ "width": 53,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 6
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.a.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 1895,
+ "y": 421
+ },
+ "width": 54,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 6
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 1949,
+ "y": 324
+ },
+ "width": 54,
+ "height": 163,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 5
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1842,
+ "y": 487
+ },
+ "width": 107,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 5
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 1949,
+ "y": 487
+ },
+ "width": 54,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 5
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 2003,
+ "y": 191
+ },
+ "width": 54,
+ "height": 362,
+ "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": 3
+ },
+ {
+ "id": "grid w/ grid w/ grid.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1736,
+ "y": 553
+ },
+ "width": 53,
+ "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": "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 w/ grid w/ grid.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 1789,
+ "y": 553
+ },
+ "width": 268,
+ "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
+ }
+ ],
+ "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/stable/grid_nested/dagre/sketch.exp.svg b/e2etests/testdata/stable/grid_nested/dagre/sketch.exp.svg
new file mode 100644
index 000000000..136a16b78
--- /dev/null
+++ b/e2etests/testdata/stable/grid_nested/dagre/sketch.exp.svg
@@ -0,0 +1,102 @@
+grid w/ containergrid w/ nested containersgrid in gridgrid w/ grid w/ gridabcdabcdabcdabcdb childb 1abcdabcdb 2b 2aabcdb 3b 3aabcdb 4b 3aabcd
+
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/grid_nested/elk/board.exp.json b/e2etests/testdata/stable/grid_nested/elk/board.exp.json
new file mode 100644
index 000000000..09aabada3
--- /dev/null
+++ b/e2etests/testdata/stable/grid_nested/elk/board.exp.json
@@ -0,0 +1,2028 @@
+{
+ "name": "",
+ "isFolderOnly": false,
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "grid w/ container",
+ "type": "rectangle",
+ "classes": [
+ "2x2"
+ ],
+ "pos": {
+ "x": 12,
+ "y": 162
+ },
+ "width": 404,
+ "height": 392,
+ "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 w/ container",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 200,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "grid w/ container.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 72,
+ "y": 222
+ },
+ "width": 53,
+ "height": 166,
+ "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": "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 w/ container.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 165,
+ "y": 222
+ },
+ "width": 191,
+ "height": 166,
+ "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": "b",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 12,
+ "labelHeight": 31,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "grid w/ container.b.b child",
+ "type": "rectangle",
+ "pos": {
+ "x": 215,
+ "y": 272
+ },
+ "width": 91,
+ "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 child",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 46,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "grid w/ container.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 72,
+ "y": 428
+ },
+ "width": 53,
+ "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": "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 w/ container.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 165,
+ "y": 428
+ },
+ "width": 191,
+ "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 w/ nested containers",
+ "type": "rectangle",
+ "classes": [
+ "2x2"
+ ],
+ "pos": {
+ "x": 436,
+ "y": 12
+ },
+ "width": 972,
+ "height": 692,
+ "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 w/ nested containers",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 296,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "grid w/ nested containers.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 496,
+ "y": 72
+ },
+ "width": 53,
+ "height": 466,
+ "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": "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 w/ nested containers.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 589,
+ "y": 72
+ },
+ "width": 759,
+ "height": 466,
+ "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": "b",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 12,
+ "labelHeight": 31,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1",
+ "type": "rectangle",
+ "pos": {
+ "x": 639,
+ "y": 122
+ },
+ "width": 659,
+ "height": 366,
+ "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 1",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 24,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2",
+ "type": "rectangle",
+ "pos": {
+ "x": 689,
+ "y": 172
+ },
+ "width": 266,
+ "height": 266,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 2",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 20,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 4
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2.b 3",
+ "type": "rectangle",
+ "pos": {
+ "x": 739,
+ "y": 222
+ },
+ "width": 166,
+ "height": 166,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 3",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 20,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 5
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2.b 3.b 4",
+ "type": "rectangle",
+ "pos": {
+ "x": 789,
+ "y": 272
+ },
+ "width": 66,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 4",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 21,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 6
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2a",
+ "type": "rectangle",
+ "pos": {
+ "x": 975,
+ "y": 172
+ },
+ "width": 273,
+ "height": 266,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 2a",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 26,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 4
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2a.b 3a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1025,
+ "y": 222
+ },
+ "width": 173,
+ "height": 166,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 3a",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 26,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 5
+ },
+ {
+ "id": "grid w/ nested containers.b.b 1.b 2a.b 3a.b 3a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1075,
+ "y": 272
+ },
+ "width": 73,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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 3a",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 28,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 6
+ },
+ {
+ "id": "grid w/ nested containers.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 496,
+ "y": 578
+ },
+ "width": 53,
+ "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": "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 w/ nested containers.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 589,
+ "y": 578
+ },
+ "width": 759,
+ "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 in grid",
+ "type": "rectangle",
+ "classes": [
+ "2x2"
+ ],
+ "pos": {
+ "x": 1428,
+ "y": 99
+ },
+ "width": 480,
+ "height": 518,
+ "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 in grid",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 124,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "grid in grid.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1488,
+ "y": 159
+ },
+ "width": 53,
+ "height": 292,
+ "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": "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 in grid.b",
+ "type": "rectangle",
+ "classes": [
+ "2x2"
+ ],
+ "pos": {
+ "x": 1581,
+ "y": 159
+ },
+ "width": 267,
+ "height": 292,
+ "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": "b",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 12,
+ "labelHeight": 31,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "grid in grid.b.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1641,
+ "y": 219
+ },
+ "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": 3
+ },
+ {
+ "id": "grid in grid.b.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 1734,
+ "y": 219
+ },
+ "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": "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": 3
+ },
+ {
+ "id": "grid in grid.b.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1641,
+ "y": 325
+ },
+ "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": 3
+ },
+ {
+ "id": "grid in grid.b.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 1734,
+ "y": 325
+ },
+ "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": 3
+ },
+ {
+ "id": "grid in grid.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1488,
+ "y": 491
+ },
+ "width": 53,
+ "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": "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 in grid.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 1581,
+ "y": 491
+ },
+ "width": 267,
+ "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 w/ grid w/ grid",
+ "type": "rectangle",
+ "pos": {
+ "x": 1928,
+ "y": 67
+ },
+ "width": 321,
+ "height": 581,
+ "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 w/ grid w/ grid",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 219,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "grid w/ grid w/ grid.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1928,
+ "y": 113
+ },
+ "width": 53,
+ "height": 469,
+ "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": "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 w/ grid w/ grid.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 1981,
+ "y": 113
+ },
+ "width": 268,
+ "height": 469,
+ "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": "b",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 12,
+ "labelHeight": 31,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1981,
+ "y": 154
+ },
+ "width": 214,
+ "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": 3
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 2195,
+ "y": 154
+ },
+ "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": "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": 3
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1981,
+ "y": 220
+ },
+ "width": 214,
+ "height": 362,
+ "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": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 9,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 1981,
+ "y": 256
+ },
+ "width": 53,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 4
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 2034,
+ "y": 256
+ },
+ "width": 161,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 4
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1981,
+ "y": 322
+ },
+ "width": 53,
+ "height": 260,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 4
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 2034,
+ "y": 322
+ },
+ "width": 161,
+ "height": 260,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": false,
+ "underline": false,
+ "labelWidth": 8,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 4
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 2034,
+ "y": 353
+ },
+ "width": 107,
+ "height": 163,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": false,
+ "underline": false,
+ "labelWidth": 7,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 5
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.a.a",
+ "type": "rectangle",
+ "pos": {
+ "x": 2034,
+ "y": 384
+ },
+ "width": 53,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 6
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.a.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 2087,
+ "y": 384
+ },
+ "width": 54,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 6
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.a.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 2034,
+ "y": 450
+ },
+ "width": 53,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 6
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.a.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 2087,
+ "y": 450
+ },
+ "width": 54,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 6
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.b",
+ "type": "rectangle",
+ "pos": {
+ "x": 2141,
+ "y": 353
+ },
+ "width": 54,
+ "height": 163,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 5
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 2034,
+ "y": 516
+ },
+ "width": 107,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 5
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.c.d.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 2141,
+ "y": 516
+ },
+ "width": 54,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": 5
+ },
+ {
+ "id": "grid w/ grid w/ grid.b.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 2195,
+ "y": 220
+ },
+ "width": 54,
+ "height": 362,
+ "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": 3
+ },
+ {
+ "id": "grid w/ grid w/ grid.c",
+ "type": "rectangle",
+ "pos": {
+ "x": 1928,
+ "y": 582
+ },
+ "width": 53,
+ "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": "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 w/ grid w/ grid.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 1981,
+ "y": 582
+ },
+ "width": 268,
+ "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
+ }
+ ],
+ "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/stable/grid_nested/elk/sketch.exp.svg b/e2etests/testdata/stable/grid_nested/elk/sketch.exp.svg
new file mode 100644
index 000000000..cb2d63c26
--- /dev/null
+++ b/e2etests/testdata/stable/grid_nested/elk/sketch.exp.svg
@@ -0,0 +1,102 @@
+grid w/ containergrid w/ nested containersgrid in gridgrid w/ grid w/ gridabcdabcdabcdabcdb childb 1abcdabcdb 2b 2aabcdb 3b 3aabcdb 4b 3aabcd
+
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/grid_nested_gap0/dagre/board.exp.json b/e2etests/testdata/stable/grid_nested_gap0/dagre/board.exp.json
new file mode 100644
index 000000000..b58faa64f
--- /dev/null
+++ b/e2etests/testdata/stable/grid_nested_gap0/dagre/board.exp.json
@@ -0,0 +1,458 @@
+{
+ "name": "",
+ "isFolderOnly": false,
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "The Universe",
+ "type": "rectangle",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 400,
+ "height": 366,
+ "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": "The Universe",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 152,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "The Universe.FirstTwo",
+ "type": "rectangle",
+ "pos": {
+ "x": 0,
+ "y": 46
+ },
+ "width": 300,
+ "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": "FirstTwo",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 62,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "The Universe.Last",
+ "type": "rectangle",
+ "pos": {
+ "x": 300,
+ "y": 46
+ },
+ "width": 100,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "red",
+ "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": "Last",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 29,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "The Universe.TALA",
+ "type": "rectangle",
+ "pos": {
+ "x": 0,
+ "y": 112
+ },
+ "width": 100,
+ "height": 193,
+ "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": "",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "The Universe.TALA.TALA",
+ "type": "rectangle",
+ "pos": {
+ "x": 0,
+ "y": 112
+ },
+ "width": 100,
+ "height": 61,
+ "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": "TALA",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 37,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "The Universe.TALA.D2",
+ "type": "rectangle",
+ "pos": {
+ "x": 0,
+ "y": 173
+ },
+ "width": 100,
+ "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": "D2",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 18,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "The Universe.TALA.Cloud",
+ "type": "rectangle",
+ "pos": {
+ "x": 0,
+ "y": 239
+ },
+ "width": 100,
+ "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": "Cloud",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 41,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "The Universe.D2",
+ "type": "rectangle",
+ "pos": {
+ "x": 100,
+ "y": 112
+ },
+ "width": 200,
+ "height": 193,
+ "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": "D2",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 18,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "The Universe.Cloud",
+ "type": "rectangle",
+ "pos": {
+ "x": 300,
+ "y": 112
+ },
+ "width": 100,
+ "height": 193,
+ "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": "Cloud",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 41,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "The Universe.Terrastruct",
+ "type": "rectangle",
+ "pos": {
+ "x": 0,
+ "y": 305
+ },
+ "width": 400,
+ "height": 61,
+ "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": "Terrastruct",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 81,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ }
+ ],
+ "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/stable/grid_nested_gap0/dagre/sketch.exp.svg b/e2etests/testdata/stable/grid_nested_gap0/dagre/sketch.exp.svg
new file mode 100644
index 000000000..0bcc0b325
--- /dev/null
+++ b/e2etests/testdata/stable/grid_nested_gap0/dagre/sketch.exp.svg
@@ -0,0 +1,102 @@
+The UniverseFirstTwoLastD2CloudTerrastructTALAD2Cloud
+
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/grid_nested_gap0/elk/board.exp.json b/e2etests/testdata/stable/grid_nested_gap0/elk/board.exp.json
new file mode 100644
index 000000000..caf8dd38e
--- /dev/null
+++ b/e2etests/testdata/stable/grid_nested_gap0/elk/board.exp.json
@@ -0,0 +1,458 @@
+{
+ "name": "",
+ "isFolderOnly": false,
+ "fontFamily": "SourceSansPro",
+ "shapes": [
+ {
+ "id": "The Universe",
+ "type": "rectangle",
+ "pos": {
+ "x": 12,
+ "y": 12
+ },
+ "width": 400,
+ "height": 366,
+ "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": "The Universe",
+ "fontSize": 28,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 152,
+ "labelHeight": 36,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "The Universe.FirstTwo",
+ "type": "rectangle",
+ "pos": {
+ "x": 12,
+ "y": 58
+ },
+ "width": 300,
+ "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": "FirstTwo",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 62,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "The Universe.Last",
+ "type": "rectangle",
+ "pos": {
+ "x": 312,
+ "y": 58
+ },
+ "width": 100,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "red",
+ "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": "Last",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 29,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "The Universe.TALA",
+ "type": "rectangle",
+ "pos": {
+ "x": 12,
+ "y": 124
+ },
+ "width": 100,
+ "height": 193,
+ "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": "",
+ "fontSize": 24,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "The Universe.TALA.TALA",
+ "type": "rectangle",
+ "pos": {
+ "x": 12,
+ "y": 124
+ },
+ "width": 100,
+ "height": 61,
+ "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": "TALA",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 37,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "The Universe.TALA.D2",
+ "type": "rectangle",
+ "pos": {
+ "x": 12,
+ "y": 185
+ },
+ "width": 100,
+ "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": "D2",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 18,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "The Universe.TALA.Cloud",
+ "type": "rectangle",
+ "pos": {
+ "x": 12,
+ "y": 251
+ },
+ "width": 100,
+ "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": "Cloud",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 41,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "The Universe.D2",
+ "type": "rectangle",
+ "pos": {
+ "x": 112,
+ "y": 124
+ },
+ "width": 200,
+ "height": 193,
+ "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": "D2",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 18,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "The Universe.Cloud",
+ "type": "rectangle",
+ "pos": {
+ "x": 312,
+ "y": 124
+ },
+ "width": 100,
+ "height": 193,
+ "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": "Cloud",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 41,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ },
+ {
+ "id": "The Universe.Terrastruct",
+ "type": "rectangle",
+ "pos": {
+ "x": 12,
+ "y": 317
+ },
+ "width": 400,
+ "height": 61,
+ "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": "Terrastruct",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 81,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 2
+ }
+ ],
+ "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/stable/grid_nested_gap0/elk/sketch.exp.svg b/e2etests/testdata/stable/grid_nested_gap0/elk/sketch.exp.svg
new file mode 100644
index 000000000..1b643a5a8
--- /dev/null
+++ b/e2etests/testdata/stable/grid_nested_gap0/elk/sketch.exp.svg
@@ -0,0 +1,102 @@
+The UniverseFirstTwoLastD2CloudTerrastructTALAD2Cloud
+
+
+
\ No newline at end of file
diff --git a/testdata/d2compiler/TestCompile/grid_nested.exp.json b/testdata/d2compiler/TestCompile/grid_nested.exp.json
index c8db27f4f..a6a72499e 100644
--- a/testdata/d2compiler/TestCompile/grid_nested.exp.json
+++ b/testdata/d2compiler/TestCompile/grid_nested.exp.json
@@ -1,16 +1,820 @@
{
- "graph": null,
- "err": {
- "ioerr": null,
- "errs": [
+ "graph": {
+ "name": "",
+ "isFolderOnly": false,
+ "ast": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,0:0:0-16:0:125",
+ "nodes": [
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,0:0:0-15:1:124",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,0:0:0-0:3:3",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,0:0:0-0:3:3",
+ "value": [
+ {
+ "string": "hey",
+ "raw_string": "hey"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "map": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,0:5:5-15:0:123",
+ "nodes": [
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,1:1:8-1:15:22",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,1:1:8-1:10:17",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,1:1:8-1:10:17",
+ "value": [
+ {
+ "string": "grid-rows",
+ "raw_string": "grid-rows"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "number": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,1:12:19-1:15:22",
+ "raw": "200",
+ "value": "200"
+ }
+ }
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,2:1:24-2:18:41",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,2:1:24-2:13:36",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,2:1:24-2:13:36",
+ "value": [
+ {
+ "string": "grid-columns",
+ "raw_string": "grid-columns"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "number": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,2:15:38-2:18:41",
+ "raw": "200",
+ "value": "200"
+ }
+ }
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,4:1:44-4:2:45",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,4:1:44-4:2:45",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,4:1:44-4:2:45",
+ "value": [
+ {
+ "string": "a",
+ "raw_string": "a"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {}
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,5:1:47-5:2:48",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,5:1:47-5:2:48",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,5:1:47-5:2:48",
+ "value": [
+ {
+ "string": "b",
+ "raw_string": "b"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {}
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,6:1:50-6:2:51",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,6:1:50-6:2:51",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,6:1:50-6:2:51",
+ "value": [
+ {
+ "string": "c",
+ "raw_string": "c"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {}
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,7:1:53-7:19:71",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,7:1:53-7:19:71",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,7:1:53-7:2:54",
+ "value": [
+ {
+ "string": "d",
+ "raw_string": "d"
+ }
+ ]
+ }
+ },
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,7:3:55-7:19:71",
+ "value": [
+ {
+ "string": "valid descendant",
+ "raw_string": "valid descendant"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {}
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,8:1:73-14:2:122",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,8:1:73-8:2:74",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,8:1:73-8:2:74",
+ "value": [
+ {
+ "string": "e",
+ "raw_string": "e"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "map": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,8:4:76-14:1:121",
+ "nodes": [
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,9:2:80-9:14:92",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,9:2:80-9:11:89",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,9:2:80-9:11:89",
+ "value": [
+ {
+ "string": "grid-rows",
+ "raw_string": "grid-rows"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "number": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,9:13:91-9:14:92",
+ "raw": "1",
+ "value": "1"
+ }
+ }
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,10:2:95-10:17:110",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,10:2:95-10:14:107",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,10:2:95-10:14:107",
+ "value": [
+ {
+ "string": "grid-columns",
+ "raw_string": "grid-columns"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {
+ "number": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,10:16:109-10:17:110",
+ "raw": "2",
+ "value": "2"
+ }
+ }
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,12:2:114-12:3:115",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,12:2:114-12:3:115",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,12:2:114-12:3:115",
+ "value": [
+ {
+ "string": "a",
+ "raw_string": "a"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "primary": {},
+ "value": {}
+ }
+ },
+ {
+ "map_key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,13:2:118-13:3:119",
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,13:2:118-13:3:119",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,13:2:118-13:3:119",
+ "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": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
+ },
+ "edges": null,
+ "objects": [
{
- "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,1:1:8-1:15:22",
- "errmsg": "d2/testdata/d2compiler/TestCompile/grid_nested.d2:2:2: \"grid-rows\" can only be used on containers with one level of nesting right now. (\"hey.d\" has nested \"invalid descendant\")"
+ "id": "hey",
+ "id_val": "hey",
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,0:0:0-0:3:3",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,0:0:0-0:3:3",
+ "value": [
+ {
+ "string": "hey",
+ "raw_string": "hey"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "key_path_index": 0,
+ "map_key_edge_index": -1
+ }
+ ],
+ "attributes": {
+ "label": {
+ "value": "hey"
+ },
+ "labelDimensions": {
+ "width": 0,
+ "height": 0
+ },
+ "style": {},
+ "near_key": null,
+ "shape": {
+ "value": "rectangle"
+ },
+ "direction": {
+ "value": ""
+ },
+ "constraint": {
+ "value": ""
+ },
+ "gridRows": {
+ "value": "200"
+ },
+ "gridColumns": {
+ "value": "200"
+ }
+ },
+ "zIndex": 0
},
{
- "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,2:1:24-2:18:41",
- "errmsg": "d2/testdata/d2compiler/TestCompile/grid_nested.d2:3:2: \"grid-columns\" can only be used on containers with one level of nesting right now. (\"hey.d\" has nested \"invalid descendant\")"
+ "id": "a",
+ "id_val": "a",
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,4:1:44-4:2:45",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,4:1:44-4:2:45",
+ "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": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
+ },
+ {
+ "id": "b",
+ "id_val": "b",
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,5:1:47-5:2:48",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,5:1:47-5:2:48",
+ "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": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
+ },
+ {
+ "id": "c",
+ "id_val": "c",
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,6:1:50-6:2:51",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,6:1:50-6:2:51",
+ "value": [
+ {
+ "string": "c",
+ "raw_string": "c"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "key_path_index": 0,
+ "map_key_edge_index": -1
+ }
+ ],
+ "attributes": {
+ "label": {
+ "value": "c"
+ },
+ "labelDimensions": {
+ "width": 0,
+ "height": 0
+ },
+ "style": {},
+ "near_key": null,
+ "shape": {
+ "value": "rectangle"
+ },
+ "direction": {
+ "value": ""
+ },
+ "constraint": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
+ },
+ {
+ "id": "d",
+ "id_val": "d",
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,7:1:53-7:19:71",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,7:1:53-7:2:54",
+ "value": [
+ {
+ "string": "d",
+ "raw_string": "d"
+ }
+ ]
+ }
+ },
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,7:3:55-7:19:71",
+ "value": [
+ {
+ "string": "valid descendant",
+ "raw_string": "valid descendant"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "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": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
+ },
+ {
+ "id": "valid descendant",
+ "id_val": "valid descendant",
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,7:1:53-7:19:71",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,7:1:53-7:2:54",
+ "value": [
+ {
+ "string": "d",
+ "raw_string": "d"
+ }
+ ]
+ }
+ },
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,7:3:55-7:19:71",
+ "value": [
+ {
+ "string": "valid descendant",
+ "raw_string": "valid descendant"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "key_path_index": 1,
+ "map_key_edge_index": -1
+ }
+ ],
+ "attributes": {
+ "label": {
+ "value": "valid descendant"
+ },
+ "labelDimensions": {
+ "width": 0,
+ "height": 0
+ },
+ "style": {},
+ "near_key": null,
+ "shape": {
+ "value": "rectangle"
+ },
+ "direction": {
+ "value": ""
+ },
+ "constraint": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
+ },
+ {
+ "id": "e",
+ "id_val": "e",
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,8:1:73-8:2:74",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,8:1:73-8:2:74",
+ "value": [
+ {
+ "string": "e",
+ "raw_string": "e"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "key_path_index": 0,
+ "map_key_edge_index": -1
+ }
+ ],
+ "attributes": {
+ "label": {
+ "value": "e"
+ },
+ "labelDimensions": {
+ "width": 0,
+ "height": 0
+ },
+ "style": {},
+ "near_key": null,
+ "shape": {
+ "value": "rectangle"
+ },
+ "direction": {
+ "value": ""
+ },
+ "constraint": {
+ "value": ""
+ },
+ "gridRows": {
+ "value": "1"
+ },
+ "gridColumns": {
+ "value": "2"
+ }
+ },
+ "zIndex": 0
+ },
+ {
+ "id": "a",
+ "id_val": "a",
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,12:2:114-12:3:115",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,12:2:114-12:3:115",
+ "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": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
+ },
+ {
+ "id": "b",
+ "id_val": "b",
+ "references": [
+ {
+ "key": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,13:2:118-13:3:119",
+ "path": [
+ {
+ "unquoted_string": {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_nested.d2,13:2:118-13:3:119",
+ "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": {
+ "value": ""
+ }
+ },
+ "zIndex": 0
}
]
- }
+ },
+ "err": null
}