@@ -61,142 +61,89 @@ function select(transform: RolldownModuleTransformInfo | RolldownModuleLoadInfo
6161 </template >
6262 </FlowmapNode >
6363
64- <FlowmapNode :lines =" { top: true, bottom: true }" pl6 py2 >
65- <template #content >
66- <div i-ph-magnifying-glass-duotone /> Resolve Id
67- </template >
68- </FlowmapNode >
69-
70- <FlowmapNode
71- :lines =" { top: true, bottom: info.resolve_ids.length === 0 }" pl6 py2
72- :class-node-outer =" info.resolve_ids.length === 0 ? 'border-dashed' : ''"
73- >
74- <template #content >
64+ <FlowmapExpandable :items =" info.resolve_ids" >
65+ <template #node >
7566 <div i-ph-magnifying-glass-duotone /> Resolve Id
76- <span op50 text-xs >({{ info.resolve_ids.length }})</span >
7767 </template >
78- <template v-if =" info .resolve_ids .length > 0 " #inline-before >
79- <button w-6 h-6 mr1 ml--7 mya rounded-full hover =" bg-active" flex =" ~ items-center justify-center" >
80- <div i-ph-caret-down text-sm op50 />
81- </button >
82- </template >
83- <template v-if =" info .resolve_ids .length > 0 " #inline-after >
84- <div w-8 relative >
85- <div absolute top =" 1/2" left-0 bottom--4 right =" 1/2" border =" t r base rounded-rt-2xl" z-flowmap-line />
86- </div >
87- </template >
88- <template #after >
89- <div pl-12 pt2 >
90- <template v-for =" (resolve_id , idx ) of info .resolve_ids " :key =" resolve_id .plugin_name " >
91- <FlowmapNode
92- :lines =" { top: idx > 0, bottom: idx < info.resolve_ids.length - 1 }"
93- class-node-inline =" gap-2 items-center"
94- pl6 py1
68+ <template #item =" { item , index } " >
69+ <FlowmapNode
70+ :lines =" { top: index > 0, bottom: index < info.resolve_ids.length - 1 }"
71+ class-node-inline =" gap-2 items-center"
72+ pl6 py1
73+ >
74+ <template #inner >
75+ <button
76+ px3 py1 hover =" bg-active" flex =" ~ inline gap-2 items-center"
77+ @click =" select(item)"
9578 >
96- <template #inner >
97- <button
98- px3 py1 hover =" bg-active" flex =" ~ inline gap-2 items-center"
99- @click =" select(resolve_id)"
100- >
101- <DisplayPluginName :name =" resolve_id.plugin_name" class =" font-mono text-sm" />
102- </button >
103- </template >
104- <template #inline-after >
105- <DisplayDuration :duration =" resolve_id.duration" :color =" true" :factor =" 5" text-xs />
106- <!-- <div v-if="resolve_id.source_from === resolve_id.source_to" text-xs op50>
107- no changes
108- </div> -->
109- </template >
110- </FlowmapNode >
79+ <DisplayPluginName :name =" item.plugin_name" class =" font-mono text-sm" />
80+ </button >
11181 </template >
112- </div >
82+ <template #inline-after >
83+ <DisplayDuration :duration =" item.duration" :color =" true" :factor =" 5" text-xs />
84+ </template >
85+ </FlowmapNode >
11386 </template >
114- </FlowmapNode >
87+ </FlowmapExpandable >
11588
116- <FlowmapNode
117- :lines =" { top: true, bottom: info.loads.length === 0 }" pl6 py2
118- :class-node-outer =" info.loads.length === 0 ? 'border-dashed' : ''"
119- >
120- <template #content >
89+ <FlowmapExpandable :items =" info.loads" >
90+ <template #node >
12191 <div i-ph-upload-simple-duotone /> Load
122- <span op50 text-xs >({{ info.loads.length }})</span >
12392 </template >
124- <template v-if =" info .loads .length > 0 " #inline-before >
125- <button w-6 h-6 mr1 ml--7 mya rounded-full hover =" bg-active" flex =" ~ items-center justify-center" >
126- <div i-ph-caret-down text-sm op50 />
127- </button >
128- </template >
129- <template v-if =" info .loads .length > 0 " #inline-after >
130- <div w-8 relative >
131- <div absolute top =" 1/2" left-0 bottom--4 right =" 1/2" border =" t r base rounded-rt-2xl" z-flowmap-line />
132- </div >
133- </template >
134- <template v-if =" info .loads .length > 0 " #after >
135- <div pl-12 pt2 >
136- <template v-for =" (load , idx ) of info .loads " :key =" load .plugin_name " >
137- <FlowmapNode :lines =" { top: idx > 0, bottom: idx < info.loads.length - 1 }" pl6 py1 >
138- <template #inner >
139- <button
140- :class =" load.source ? '' : 'op75'"
141- px3 py1 hover =" bg-active" flex =" ~ inline gap-2 items-center"
142- @click =" select(load)"
143- >
144- <DisplayPluginName :name =" load.plugin_name" class =" font-mono text-sm" />
145- </button >
146- </template >
147- </FlowmapNode >
93+ <template #item =" { item } " >
94+ <FlowmapNode
95+ :lines =" { top: true, bottom: true }"
96+ class-node-inline =" gap-2 items-center"
97+ pl6 py1
98+ >
99+ <template #inner >
100+ <button
101+ :class =" item.source ? '' : 'op75'"
102+ px3 py1 hover =" bg-active" flex =" ~ inline gap-2 items-center"
103+ @click =" select(item)"
104+ >
105+ <DisplayPluginName :name =" item.plugin_name" class =" font-mono text-sm" />
106+ </button >
148107 </template >
149- </div >
108+ <template #inline-after >
109+ <DisplayDuration :duration =" item.duration" :color =" true" :factor =" 5" text-xs />
110+ <div v-if =" item.source === null" text-xs op50 >
111+ no source
112+ </div >
113+ </template >
114+ </FlowmapNode >
150115 </template >
151- </FlowmapNode >
116+ </FlowmapExpandable >
152117
153- <FlowmapNode
154- :lines =" { top: true, bottom: info.transforms.length === 0 }" pl6 py2
155- :class-node-outer =" info.transforms.length === 0 ? 'border-dashed' : ''"
156- >
157- <template #content >
118+ <FlowmapExpandable :items =" info.transforms" >
119+ <template #node >
158120 <div i-ph-magic-wand-duotone /> Transform
159- <span op50 text-xs >({{ info.transforms.length }})</span >
160- </template >
161- <template v-if =" info .transforms .length > 0 " #inline-before >
162- <button w-6 h-6 mr1 ml--7 mya rounded-full hover =" bg-active" flex =" ~ items-center justify-center" >
163- <div i-ph-caret-down text-sm op50 />
164- </button >
165- </template >
166- <template v-if =" info .transforms .length > 0 " #inline-after >
167- <div w-8 relative >
168- <div absolute top =" 1/2" left-0 bottom--4 right =" 1/2" border =" t r base rounded-rt-2xl" z-flowmap-line />
169- </div >
170121 </template >
171- <template #after >
172- <div pl-12 pt2 >
173- <template v-for =" (transform , idx ) of info .transforms " :key =" transform .plugin_name " >
174- <FlowmapNode
175- :lines =" { top: idx > 0, bottom: idx < info.transforms.length - 1 }"
176- class-node-inline =" gap-2 items-center"
177- :class-node-outer =" transform.source_from === transform.source_to ? 'border-dashed' : ''"
178- pl6 py1
122+ <template #item =" { item } " >
123+ <FlowmapNode
124+ :lines =" { top: true, bottom: true }"
125+ class-node-inline =" gap-2 items-center"
126+ :class-node-outer =" item.source_from === item.source_to ? 'border-dashed' : ''"
127+ pl6 py1
128+ >
129+ <template #inner >
130+ <button
131+ :class =" item.source_from === item.source_to ? 'op75' : ''"
132+ px3 py1 hover =" bg-active" flex =" ~ inline gap-2 items-center"
133+ @click =" select(item)"
179134 >
180- <template #inner >
181- <button
182- :class =" transform.source_from === transform.source_to ? 'op75' : ''"
183- px3 py1 hover =" bg-active" flex =" ~ inline gap-2 items-center"
184- @click =" select(transform)"
185- >
186- <DisplayPluginName :name =" transform.plugin_name" class =" font-mono text-sm" />
187- </button >
188- </template >
189- <template #inline-after >
190- <DisplayDuration :duration =" transform.duration" :color =" true" :factor =" 5" text-xs />
191- <div v-if =" transform.source_from === transform.source_to" text-xs op50 >
192- no changes
193- </div >
194- </template >
195- </FlowmapNode >
135+ <DisplayPluginName :name =" item.plugin_name" class =" font-mono text-sm" />
136+ </button >
196137 </template >
197- </div >
138+ <template #inline-after >
139+ <DisplayDuration :duration =" item.duration" :color =" true" :factor =" 5" text-xs />
140+ <div v-if =" item.source_from === item.source_to" text-xs op50 >
141+ no changes
142+ </div >
143+ </template >
144+ </FlowmapNode >
198145 </template >
199- </FlowmapNode >
146+ </FlowmapExpandable >
200147
201148 <FlowmapNode :lines =" { top: true, bottom: true }" pl6 py2 >
202149 <template #content >
@@ -218,13 +165,13 @@ function select(transform: RolldownModuleTransformInfo | RolldownModuleLoadInfo
218165
219166 <div
220167 v-if =" selected"
221- absolute right-5 top-5 bottom-5 w-200
168+ absolute right-3 top-3 bottom-3 w-100
222169 border =" ~ base rounded-lg" bg-glass of-hidden
223170 grid =" ~ rows-[max-content_1fr]"
224171 >
225- <div px2 p1 font-mono border =" b base" flex =" ~ items-center gap-2" >
172+ <div px4 p2 font-mono border =" b base" flex =" ~ items-center gap-2" >
226173 <PluginName :name =" selected.plugin_name" />
227- <span text-xs op50 >
174+ <span op50 text-xs >
228175 {{ selected.type === 'load' ? 'Load' : 'Transform' }}
229176 </span >
230177 </div >
0 commit comments