@fluixi/devtools 0.2.0-alpha.3 → 0.2.0-alpha.5
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/callsite.cjs +72 -0
- package/dist/callsite.d.ts +1 -1
- package/dist/callsite.js +1 -1
- package/dist/callsite.mjs +51 -0
- package/dist/change-view.cjs +134 -0
- package/dist/change-view.js +2 -2
- package/dist/change-view.mjs +111 -0
- package/dist/copy.cjs +63 -0
- package/dist/copy.mjs +42 -0
- package/dist/describe.cjs +55 -0
- package/dist/describe.js +2 -2
- package/dist/describe.mjs +34 -0
- package/dist/detail-panel.cjs +307 -0
- package/dist/detail-panel.d.ts +1 -1
- package/dist/detail-panel.d.ts.map +1 -1
- package/dist/detail-panel.js +1 -1
- package/dist/detail-panel.mjs +284 -0
- package/dist/diff.cjs +225 -0
- package/dist/diff.js +1 -1
- package/dist/diff.mjs +202 -0
- package/dist/dom.cjs +204 -0
- package/dist/dom.mjs +183 -0
- package/dist/export.cjs +221 -0
- package/dist/export.d.ts +2 -2
- package/dist/export.d.ts.map +1 -1
- package/dist/export.js +1 -1
- package/dist/export.mjs +209 -0
- package/dist/float.cjs +232 -0
- package/dist/float.d.ts +1 -1
- package/dist/float.js +3 -3
- package/dist/float.mjs +211 -0
- package/dist/format.cjs +175 -0
- package/dist/format.js +3 -3
- package/dist/format.mjs +154 -0
- package/dist/graph-view.cjs +893 -0
- package/dist/graph-view.mjs +870 -0
- package/dist/highlight.cjs +140 -0
- package/dist/highlight.mjs +119 -0
- package/dist/history.cjs +95 -0
- package/dist/history.d.ts +2 -2
- package/dist/history.js +2 -2
- package/dist/history.mjs +74 -0
- package/dist/hook.cjs +1562 -0
- package/dist/hook.d.ts +3 -3
- package/dist/hook.js +6 -6
- package/dist/hook.mjs +1553 -0
- package/dist/index.cjs +4552 -0
- package/dist/index.mjs +4544 -0
- package/dist/inspector.cjs +688 -0
- package/dist/inspector.d.ts +2 -2
- package/dist/inspector.js +7 -7
- package/dist/inspector.mjs +676 -0
- package/dist/instrument.cjs +497 -0
- package/dist/instrument.mjs +487 -0
- package/dist/kind-filter.cjs +172 -0
- package/dist/kind-filter.d.ts +2 -2
- package/dist/kind-filter.js +1 -1
- package/dist/kind-filter.mjs +151 -0
- package/dist/menu.cjs +141 -0
- package/dist/menu.mjs +120 -0
- package/dist/observe.cjs +1352 -0
- package/dist/observe.mjs +1345 -0
- package/dist/palette.cjs +52 -0
- package/dist/palette.mjs +31 -0
- package/dist/path.cjs +45 -0
- package/dist/path.d.ts +2 -2
- package/dist/path.js +2 -2
- package/dist/path.mjs +24 -0
- package/dist/plugin.cjs +87 -0
- package/dist/plugin.mjs +66 -0
- package/dist/plugins/context.cjs +98 -0
- package/dist/plugins/context.mjs +75 -0
- package/dist/plugins/directives.cjs +98 -0
- package/dist/plugins/directives.mjs +75 -0
- package/dist/plugins/index.cjs +162 -0
- package/dist/plugins/index.mjs +140 -0
- package/dist/source.cjs +111 -0
- package/dist/source.d.ts +2 -2
- package/dist/source.js +4 -4
- package/dist/source.mjs +90 -0
- package/dist/timeline.cjs +350 -0
- package/dist/timeline.js +3 -3
- package/dist/timeline.mjs +327 -0
- package/dist/tree.cjs +574 -0
- package/dist/tree.mjs +551 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/value-pane.cjs +223 -0
- package/dist/value-pane.mjs +200 -0
- package/dist/wire.cjs +109 -0
- package/dist/wire.mjs +89 -0
- package/package.json +19 -6
package/dist/hook.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export interface DevtoolsHook {
|
|
|
5
5
|
* Called by the runtime when it loads.
|
|
6
6
|
*
|
|
7
7
|
* `watch` is how the caller says it brought its own devtools. Two copies live on a page
|
|
8
|
-
* routinely
|
|
9
|
-
* agent loads another
|
|
8
|
+
* routinely: a browser extension injects one at document_start and an application's own
|
|
9
|
+
* agent loads another: and the first to arrive owns the hook. Without this the graph is
|
|
10
10
|
* built by whichever copy got there first, which for an installed extension is a build
|
|
11
11
|
* that knows nothing of the compiler that made the application.
|
|
12
12
|
*/
|
|
@@ -48,7 +48,7 @@ export interface DevtoolsHook {
|
|
|
48
48
|
*
|
|
49
49
|
* A number is a node, and covers everywhere it reaches. A string is one element, written
|
|
50
50
|
* as the tree keys them: the tag's id, the index of the root it rendered, then a child
|
|
51
|
-
* index per step
|
|
51
|
+
* index per step: `12:0/1/2`. Null clears it.
|
|
52
52
|
*/
|
|
53
53
|
highlight(target: number | string | null): void;
|
|
54
54
|
}
|
package/dist/hook.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// A browser extension or a dev-server injection runs this before the application loads. It
|
|
4
4
|
// leaves a global behind; when the app's copy of @fluixi/reactive is first evaluated, the
|
|
5
5
|
// runtime finds it and hands over its own `observeReactiveNodes`. The graph is then built
|
|
6
|
-
// from the app's framework rather than this bundle's
|
|
6
|
+
// from the app's framework rather than this bundle's, two copies of the runtime each keep
|
|
7
7
|
// their own nodes, so watching the wrong one shows an empty graph.
|
|
8
8
|
//
|
|
9
9
|
// The app imports nothing and knows nothing about this. It also works against a production
|
|
@@ -25,8 +25,8 @@ export function installDevtoolsHook() {
|
|
|
25
25
|
const host = globalThis;
|
|
26
26
|
const existing = host[HOOK];
|
|
27
27
|
if (existing) {
|
|
28
|
-
// Counted, not complained about. Two copies is the ordinary case
|
|
29
|
-
// one before anything else runs and the application's agent loads another
|
|
28
|
+
// Counted, not complained about. Two copies is the ordinary case, an extension injects
|
|
29
|
+
// one before anything else runs and the application's agent loads another, and `inject`
|
|
30
30
|
// sorts out which of them ends up watching.
|
|
31
31
|
existing.copies = (existing.copies ?? 1) + 1;
|
|
32
32
|
return existing;
|
|
@@ -47,7 +47,7 @@ export function installDevtoolsHook() {
|
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
// The runtime injects the moment it is evaluated, and it brings no devtools of its
|
|
50
|
-
// own
|
|
50
|
+
// own: so an extension's copy starts watching first. The application's agent runs
|
|
51
51
|
// straight after, before any of its own modules have made a node, and hands over an
|
|
52
52
|
// observer that matches the compiler that built it. That one takes over.
|
|
53
53
|
if (owned || !runtime.watch)
|
|
@@ -95,8 +95,8 @@ export function installDevtoolsHook() {
|
|
|
95
95
|
// Detection is shared and has to run: it is what notices anything moved at all.
|
|
96
96
|
const changed = observed.sample();
|
|
97
97
|
const cursor = observed.revision;
|
|
98
|
-
// Kept, not handed out once. The hook can have more than one reader
|
|
99
|
-
// agent polling and a browser panel open at the same time
|
|
98
|
+
// Kept, not handed out once. The hook can have more than one reader, a dev server
|
|
99
|
+
// agent polling and a browser panel open at the same time, and draining here gave
|
|
100
100
|
// each of them whichever events the other had not taken yet. Every event carries a
|
|
101
101
|
// seq, so a reader keeps what is new to it.
|
|
102
102
|
history.push(...observed.takeEvents());
|