File tree Expand file tree Collapse file tree 5 files changed +29
-3
lines changed Expand file tree Collapse file tree 5 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 53
53
id ={$selectedNode .id }
54
54
header =" State"
55
55
entries ={$selectedNode .detail .ctx } />
56
- {:else if $selectedNode .type == ' block' }
56
+ {:else if $selectedNode .type == ' block' || $selectedNode . type == ' iteration ' }
57
57
<PropertyList
58
58
readOnly
59
59
id ={$selectedNode .id }
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ function serializeNode(node) {
99
99
break
100
100
}
101
101
102
+ case 'iteration' :
102
103
case 'block' : {
103
104
const { ctx, source } = node . detail
104
105
serialized . detail = {
Original file line number Diff line number Diff line change
1
+ <script >
2
+ export let style
3
+ export let hover
4
+ export let selected
5
+ export let source
6
+ </script >
7
+
8
+ <style >
9
+ div {
10
+ height : 16px ;
11
+ line-height : 16px ;
12
+ }
13
+
14
+ div {
15
+ color : rgb (151 , 164 , 179 );
16
+ }
17
+ </style >
18
+
19
+ <div class:hover class:selected {style }>↪</div >
20
+ <slot />
Original file line number Diff line number Diff line change 3
3
import Element from ' ./Element.svelte'
4
4
import Block from ' ./Block.svelte'
5
5
import Slot from ' ./Slot.svelte'
6
+ import Iteration from ' ./Iteration.svelte'
6
7
import Text from ' ./Text.svelte'
7
8
import Anchor from ' ./Anchor.svelte'
8
9
27
28
component: Element ,
28
29
block: Block,
29
30
slot: Slot,
31
+ iteration: Iteration,
30
32
text: Text ,
31
33
anchor: Anchor
32
34
}[node .type ]
103
105
<span style ={` left: ${depth * 12 + 2 }px ` } />
104
106
{/if }
105
107
<ul >
106
- {#each node .children as node (node .id )}
107
- <svelte:self {node } depth ={depth + 1 } />
108
+ {#each node .children as child (child .id )}
109
+ <svelte:self
110
+ node ={child }
111
+ depth ={node .type == ' iteration' ? depth : depth + 1 } />
108
112
{/each }
109
113
</ul >
110
114
</svelte:component >
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ export const visibility = writable({
4
4
component : true ,
5
5
element : true ,
6
6
block : true ,
7
+ iteration : true ,
7
8
slot : true ,
8
9
text : true ,
9
10
anchor : false
You can’t perform that action at this time.
0 commit comments