@wcstack/devtools 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -196,6 +196,10 @@ type DevtoolsEventLike = {
196
196
  readonly type: "state:watch-chain-limit";
197
197
  readonly maxDepth: number;
198
198
  readonly paths: readonly string[];
199
+ } | {
200
+ readonly type: "state:render-chain-limit";
201
+ readonly maxDepth: number;
202
+ readonly paths: readonly string[];
199
203
  } | {
200
204
  readonly type: "state:watch-fired";
201
205
  readonly path: string;
@@ -305,7 +309,7 @@ interface IDevtoolsHookRegistryLike {
305
309
  * sources / roster / wiring をクリアし、残留参照を持たない。
306
310
  */
307
311
 
308
- type TimelineKind = "write" | "batch" | "command" | "event" | "element-registered" | "element-unregistered" | "watch-error" | "watch-chain-limit" | "path-unresolved" | "binding-apply-error" | "propagation-suppressed" | "propagation-coalesced" | "propagation-hop-limit" | "contract-drift";
312
+ type TimelineKind = "write" | "batch" | "command" | "event" | "element-registered" | "element-unregistered" | "watch-error" | "watch-chain-limit" | "render-chain-limit" | "path-unresolved" | "binding-apply-error" | "propagation-suppressed" | "propagation-coalesced" | "propagation-hop-limit" | "contract-drift";
309
313
  interface ITimelineEntry {
310
314
  readonly seq: number;
311
315
  readonly time: number;
package/dist/index.esm.js CHANGED
@@ -863,6 +863,17 @@ class DevtoolsCore {
863
863
  });
864
864
  return;
865
865
  }
866
+ case "state:render-chain-limit": {
867
+ // 描画の循環(#338)。watch-chain-limit と同じくバッチ単位の打ち切りなので同じ形で並べる
868
+ this._appendTimeline({
869
+ sourceId,
870
+ kind: "render-chain-limit",
871
+ label: `depth > ${event.maxDepth}`,
872
+ detail: event.paths.join(", "),
873
+ subscriberCount: null,
874
+ });
875
+ return;
876
+ }
866
877
  case "state:path-unresolved": {
867
878
  // ランタイムは warn で続行する(既存ページを止めないため)。lint を
868
879
  // 走らせていない相手には、ここが「配線が死んでいる」唯一の可視面になる。
@@ -2011,6 +2022,11 @@ class WcsDevtools extends HTMLElement {
2011
2022
  ? "a $watch or $scan failure (read, handler, fold or write — see the phase in the detail); the runtime isolated it (console.error only)"
2012
2023
  : "a $watch write chain hit the depth limit and was cut off";
2013
2024
  }
2025
+ // 描画の循環の打ち切り(#338)もランタイムは console に出すだけで続行する(バッチの binding は未適用)
2026
+ if (entry.kind === "render-chain-limit") {
2027
+ kind.classList.add("warn");
2028
+ kind.title = "writes made while rendering kept starting new batches; the chain hit the depth limit and this batch was not rendered";
2029
+ }
2014
2030
  // 配線の死(解決しないパス)と隔離された適用失敗も、ランタイムが console に
2015
2031
  // 出すだけで続行する = 見ていなければ気づけない種類なので warn に乗せる。
2016
2032
  if (entry.kind === "path-unresolved" || entry.kind === "binding-apply-error") {