@wcstack/devtools 3.2.0 → 3.4.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/auto.min.js +1 -1
- package/dist/auto.min.js.map +1 -1
- package/dist/index.d.ts +26 -10
- package/dist/index.esm.js +22 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -92,6 +92,12 @@ interface IMountOverlaySummaryLike {
|
|
|
92
92
|
readonly delta: number;
|
|
93
93
|
/** 私有キー(オーバーレイ空間に住む own data key) */
|
|
94
94
|
readonly privateKeys: readonly string[];
|
|
95
|
+
/**
|
|
96
|
+
* 公開 getter の公開パス(親スコープから読める — docs/state-overlay-export-design.md)。
|
|
97
|
+
* オーバーレイ export より前の v2 ランタイムにはフィールド自体が無いため optional
|
|
98
|
+
* (protocol §3 の `summary.exports ?? []`)。
|
|
99
|
+
*/
|
|
100
|
+
readonly exports?: readonly string[];
|
|
95
101
|
/** マーカーパスに載る getter のキー */
|
|
96
102
|
readonly getterKeys: readonly string[];
|
|
97
103
|
}
|
|
@@ -113,6 +119,18 @@ interface IKeyedSubscriptionSummaryLike {
|
|
|
113
119
|
/** path の最後に見た値(見ていなければ undefined)。生値 */
|
|
114
120
|
readonly lastValue: unknown;
|
|
115
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* 宣言されたフィルタ 1 件(ランタイム `IFilterInfo` の構造的サブセット)。
|
|
124
|
+
* `literals`(引数の型付きの値・要件 B9)は原文 `args` と別物で、フィルタの鍵
|
|
125
|
+
* (`filterKey.ts` の `filter.literals ?? filter.args`)と `eq` / `ne` / `defaults` の
|
|
126
|
+
* 比較が読む。宣言が無いと、独自 source を TS で書く採用者が `{ filterName, args }`
|
|
127
|
+
* だけのオブジェクトを渡し、型は通るのに鍵が縮退する(`"1"` と `1` が同じ鍵になる)。
|
|
128
|
+
*/
|
|
129
|
+
interface IDeclaredFilterLike {
|
|
130
|
+
readonly filterName: string;
|
|
131
|
+
readonly args: readonly string[];
|
|
132
|
+
readonly literals?: readonly unknown[];
|
|
133
|
+
}
|
|
116
134
|
/**
|
|
117
135
|
* 宣言レベルのバインディング 1 件(getDeclaredBindings の要素・protocol v1 追補)。
|
|
118
136
|
* ランタイム正本パーサの結果が構造的に流れる。宣言タプルで dedupe 済みの
|
|
@@ -124,14 +142,8 @@ interface IDeclaredBindingLike {
|
|
|
124
142
|
readonly propName: string;
|
|
125
143
|
readonly statePathName: string;
|
|
126
144
|
readonly bindingType: string;
|
|
127
|
-
readonly inFilters: readonly
|
|
128
|
-
|
|
129
|
-
readonly args: readonly string[];
|
|
130
|
-
}[];
|
|
131
|
-
readonly outFilters: readonly {
|
|
132
|
-
readonly filterName: string;
|
|
133
|
-
readonly args: readonly string[];
|
|
134
|
-
}[];
|
|
145
|
+
readonly inFilters: readonly IDeclaredFilterLike[];
|
|
146
|
+
readonly outFilters: readonly IDeclaredFilterLike[];
|
|
135
147
|
readonly origin: "attribute" | "comment" | "fragment";
|
|
136
148
|
readonly raw: string;
|
|
137
149
|
}
|
|
@@ -184,6 +196,10 @@ type DevtoolsEventLike = {
|
|
|
184
196
|
readonly type: "state:watch-chain-limit";
|
|
185
197
|
readonly maxDepth: number;
|
|
186
198
|
readonly paths: readonly string[];
|
|
199
|
+
} | {
|
|
200
|
+
readonly type: "state:render-chain-limit";
|
|
201
|
+
readonly maxDepth: number;
|
|
202
|
+
readonly paths: readonly string[];
|
|
187
203
|
} | {
|
|
188
204
|
readonly type: "state:watch-fired";
|
|
189
205
|
readonly path: string;
|
|
@@ -293,7 +309,7 @@ interface IDevtoolsHookRegistryLike {
|
|
|
293
309
|
* sources / roster / wiring をクリアし、残留参照を持たない。
|
|
294
310
|
*/
|
|
295
311
|
|
|
296
|
-
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";
|
|
297
313
|
interface ITimelineEntry {
|
|
298
314
|
readonly seq: number;
|
|
299
315
|
readonly time: number;
|
|
@@ -630,4 +646,4 @@ declare global {
|
|
|
630
646
|
}
|
|
631
647
|
|
|
632
648
|
export { DEVTOOLS_HOOK_GLOBAL, DEVTOOLS_PROTOCOL_VERSION, DevtoolsCore, WcsDevtools, bootstrapDevtools, formatArgs, formatValue, getOrCreateHookRegistry, scanDeclaredBindings };
|
|
633
|
-
export type { CoreChangeKind, CoreChangeListener, DevtoolsEventLike, DevtoolsSinkLike, IAbsoluteAddressLike, IAbsolutePathInfoLike, IBindingLike, IDeclaredBinding, IDevtoolsCoreOptions, IDevtoolsHookRegistryLike, IDevtoolsListenerLike, IDevtoolsSourceLike, IListIndexLike, IPathInfoLike, IRosterEntry, IStateElementSummaryLike, ITimelineEntry, IWiringEntry, TimelineKind };
|
|
649
|
+
export type { CoreChangeKind, CoreChangeListener, DevtoolsEventLike, DevtoolsSinkLike, IAbsoluteAddressLike, IAbsolutePathInfoLike, IBindingLike, IDeclaredBinding, IDeclaredBindingLike, IDeclaredFilterLike, IDevtoolsCoreOptions, IDevtoolsHookRegistryLike, IDevtoolsListenerLike, IDevtoolsSourceLike, IKeyedSubscriptionSummaryLike, IListIndexLike, IMountOverlaySummaryLike, IPathInfoLike, IRosterEntry, IStateElementSummaryLike, ITimelineEntry, IWiringEntry, TimelineKind };
|
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
|
// 走らせていない相手には、ここが「配線が死んでいる」唯一の可視面になる。
|
|
@@ -1638,6 +1649,12 @@ class WcsDevtools extends HTMLElement {
|
|
|
1638
1649
|
if (overlay.privateKeys.length > 0) {
|
|
1639
1650
|
details.push(`private: ${overlay.privateKeys.join(", ")}`);
|
|
1640
1651
|
}
|
|
1652
|
+
// 公開 getter の公開パス。オーバーレイ export より前の v2 ランタイムは
|
|
1653
|
+
// フィールドを持たないので `?? []` で受ける(protocol §3)
|
|
1654
|
+
const exports = overlay.exports ?? [];
|
|
1655
|
+
if (exports.length > 0) {
|
|
1656
|
+
details.push(`exports: ${exports.join(", ")}`);
|
|
1657
|
+
}
|
|
1641
1658
|
if (overlay.getterKeys.length > 0) {
|
|
1642
1659
|
details.push(`getters: ${overlay.getterKeys.join(", ")}`);
|
|
1643
1660
|
}
|
|
@@ -2005,6 +2022,11 @@ class WcsDevtools extends HTMLElement {
|
|
|
2005
2022
|
? "a $watch or $scan failure (read, handler, fold or write — see the phase in the detail); the runtime isolated it (console.error only)"
|
|
2006
2023
|
: "a $watch write chain hit the depth limit and was cut off";
|
|
2007
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
|
+
}
|
|
2008
2030
|
// 配線の死(解決しないパス)と隔離された適用失敗も、ランタイムが console に
|
|
2009
2031
|
// 出すだけで続行する = 見ていなければ気づけない種類なので warn に乗せる。
|
|
2010
2032
|
if (entry.kind === "path-unresolved" || entry.kind === "binding-apply-error") {
|