From 3d85b76539dfaeecda20a011793c3b25fecd4306 Mon Sep 17 00:00:00 2001 From: yonava Date: Sun, 21 Sep 2025 13:45:36 -0400 Subject: [PATCH 1/2] fixes to build --- .../products/src/markov-chains/MainView.vue | 80 +++++++++---------- packages/server/package.json | 5 +- packages/server/src/index.ts | 4 +- packages/server/src/sockets.ts | 4 +- packages/server/src/trackGraphState.ts | 4 +- packages/server/tsconfig.json | 23 +++--- 6 files changed, 62 insertions(+), 58 deletions(-) diff --git a/packages/products/src/markov-chains/MainView.vue b/packages/products/src/markov-chains/MainView.vue index 0d69895f9..6560ae98d 100644 --- a/packages/products/src/markov-chains/MainView.vue +++ b/packages/products/src/markov-chains/MainView.vue @@ -18,56 +18,56 @@ const markov = useMarkovChain(graph); useMarkovColorizer(graph, markov).colorize(); - const int = gsap.utils.interpolate(colors.RED_500, colors.RED_800); + // const int = gsap.utils.interpolate(colors.RED_500, colors.RED_800); - const { play, stop } = graph.defineTimeline({ - forShapes: ["circle"], - durationMs: 2000, - customInterpolations: { - stroke: { - value: (progress, schema) => ({ - color: progress < 0.5 ? int(progress * 2) : int(2 - progress * 2), - lineWidth: schema.stroke?.lineWidth ?? 10, - }), - easing: "in-out", - }, - }, - synchronize: true, - }); + // const { play, stop } = graph.defineTimeline({ + // forShapes: ["circle"], + // durationMs: 2000, + // customInterpolations: { + // stroke: { + // value: (progress, schema) => ({ + // color: progress < 0.5 ? int(progress * 2) : int(2 - progress * 2), + // lineWidth: schema.stroke?.lineWidth ?? 10, + // }), + // easing: "in-out", + // }, + // }, + // synchronize: true, + // }); - graph.subscribe("onFocusChange", (newIds, oldIds) => { - const newNodeIds = Array.from(newIds).filter(graph.getNode); - const oldNodeIds = Array.from(oldIds).filter(graph.getNode); - newNodeIds.forEach((nodeId) => { - stop({ shapeId: nodeId }); - }); - const noLongerFocused = Array.from(oldNodeIds).filter( - (nodeId) => !newNodeIds.includes(nodeId) - ); - for (const nodeId of noLongerFocused) { - if (markov.invalidStates.value.has(nodeId)) play({ shapeId: nodeId }); - } - }); + // graph.subscribe("onFocusChange", (newIds, oldIds) => { + // const newNodeIds = Array.from(newIds).filter(graph.getNode); + // const oldNodeIds = Array.from(oldIds).filter(graph.getNode); + // newNodeIds.forEach((nodeId) => { + // stop({ shapeId: nodeId }); + // }); + // const noLongerFocused = Array.from(oldNodeIds).filter( + // (nodeId) => !newNodeIds.includes(nodeId) + // ); + // for (const nodeId of noLongerFocused) { + // if (markov.invalidStates.value.has(nodeId)) play({ shapeId: nodeId }); + // } + // }); - watch(markov.invalidStates, () => { - for (const node of graph.nodes.value) { - stop({ shapeId: node.id }); - if (markov.invalidStates.value.has(node.id)) play({ shapeId: node.id }); - } - }); + // watch(markov.invalidStates, () => { + // for (const node of graph.nodes.value) { + // stop({ shapeId: node.id }); + // if (markov.invalidStates.value.has(node.id)) play({ shapeId: node.id }); + // } + // }); - const test = () => { - for (const nodeId of markov.invalidStates.value) { - play({ shapeId: nodeId }); - } - }; + // const test = () => { + // for (const nodeId of markov.invalidStates.value) { + // play({ shapeId: nodeId }); + // } + // };