( composition: WindowCompositionFunction, events: CompositorEventController, windowId: string, snapshot: WaylandWindowSnapshot, event: RuntimeWindowMinimizeRequestEvent, )
| 2921 | } |
| 2922 | |
| 2923 | function summarizeSerializedLabels(node: unknown): unknown[] { |
| 2924 | const labels: unknown[] = []; |
| 2925 | collectSerializedLabels(node, labels); |
| 2926 | return labels; |
| 2927 | } |
| 2928 | |
| 2929 | function collectSerializedLabels(node: unknown, labels: unknown[]): void { |
| 2930 | if (!node || typeof node !== "object") { |
| 2931 | return; |
| 2932 | } |
| 2933 | const record = node as { |
| 2934 | kind?: unknown; |
| 2935 | nodeId?: unknown; |
| 2936 | props?: Record<string, unknown>; |
| 2937 | children?: unknown[]; |
| 2938 | }; |
| 2939 | if (record.kind === "Label") { |
| 2940 | labels.push({ |
| 2941 | nodeId: record.nodeId, |
| 2942 | text: record.props?.text, |
| 2943 | style: record.props?.style, |
| 2944 | }); |
| 2945 | } |
| 2946 | for (const child of record.children ?? []) { |
| 2947 | collectSerializedLabels(child, labels); |
| 2948 | } |
| 2949 | } |
| 2950 | |
| 2951 | function evaluateSnapshot( |
| 2952 | composition: WindowCompositionFunction, |
| 2953 | events: CompositorEventController, |
| 2954 | effectConfig: RuntimeEffectConfig, |
no test coverage detected