{#each $nodeGraph.nodes.flatMap((node, nodeIndex) => (node.isLayer ? [{ node, nodeIndex }] : [])) as { node, nodeIndex } (nodeIndex)}
{@const clipPathId = String(Math.random()).substring(2)}
{@const stackDataInput = node.exposedInputs[0]}
{@const layerAreaWidth = $nodeGraph.layerWidths.get(node.id) || 8}
{#if node.errors}
{node.errors}
{node.errors}
{/if}
{#if $nodeGraph.thumbnails.has(node.id)}
{@html $nodeGraph.thumbnails.get(node.id)}
{/if}
{#if node.primaryOutput}
{/if}
{#if node.exposedInputs.length > 0}
{/if}
{node.alias}
{
/* Button is purely visual, clicking is handled in NodeGraphMessage::PointerDown */
}}
tooltip={node.visible ? "Visible" : "Hidden"}
/>
{/each}
{#each $nodeGraph.nodes.flatMap((node, nodeIndex) => (node.isLayer ? [] : [{ node, nodeIndex }])) as { node, nodeIndex } (nodeIndex)}
{@const exposedInputsOutputs = [...node.exposedInputs, ...node.exposedOutputs]}
{@const clipPathId = String(Math.random()).substring(2)}
{#if node.errors}
{node.errors}
{node.errors}
{/if}
{node.alias || node.name}
{#if exposedInputsOutputs.length > 0}
{#each exposedInputsOutputs as parameter, index}
{parameter.name}
{/each}
{/if}
{#if node.primaryOutput}
{/if}
{#each node.exposedOutputs as parameter, outputIndex}
{/each}
{/each}