@fluixi/devtools 0.2.0-alpha.2 → 0.2.0-alpha.4
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/README.md +80 -2
- package/dist/callsite.cjs +72 -0
- package/dist/callsite.d.ts +22 -0
- package/dist/callsite.d.ts.map +1 -0
- package/dist/callsite.js +82 -0
- package/dist/callsite.mjs +51 -0
- package/dist/change-view.cjs +134 -0
- package/dist/change-view.d.ts +10 -0
- package/dist/change-view.d.ts.map +1 -0
- package/dist/change-view.js +102 -0
- package/dist/change-view.mjs +111 -0
- package/dist/copy.cjs +63 -0
- package/dist/copy.d.ts +9 -0
- package/dist/copy.d.ts.map +1 -0
- package/dist/copy.js +52 -0
- package/dist/copy.mjs +42 -0
- package/dist/describe.cjs +55 -0
- package/dist/describe.d.ts +3 -0
- package/dist/describe.d.ts.map +1 -0
- package/dist/describe.js +47 -0
- package/dist/describe.mjs +34 -0
- package/dist/detail-panel.cjs +307 -0
- package/dist/detail-panel.d.ts +17 -0
- package/dist/detail-panel.d.ts.map +1 -0
- package/dist/detail-panel.js +217 -0
- package/dist/detail-panel.mjs +284 -0
- package/dist/diff.cjs +225 -0
- package/dist/diff.d.ts +31 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/diff.js +132 -0
- package/dist/diff.mjs +202 -0
- package/dist/dom.cjs +204 -0
- package/dist/dom.d.ts +81 -0
- package/dist/dom.d.ts.map +1 -0
- package/dist/dom.js +269 -0
- package/dist/dom.mjs +183 -0
- package/dist/export.cjs +221 -0
- package/dist/export.d.ts +55 -0
- package/dist/export.d.ts.map +1 -0
- package/dist/export.js +90 -0
- package/dist/export.mjs +209 -0
- package/dist/float.cjs +232 -0
- package/dist/float.d.ts +54 -0
- package/dist/float.d.ts.map +1 -0
- package/dist/float.js +256 -0
- package/dist/float.mjs +211 -0
- package/dist/format.cjs +175 -0
- package/dist/format.d.ts +16 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +188 -0
- package/dist/format.mjs +154 -0
- package/dist/graph-view.cjs +893 -0
- package/dist/graph-view.d.ts +79 -2
- package/dist/graph-view.d.ts.map +1 -1
- package/dist/graph-view.js +866 -50
- package/dist/graph-view.mjs +870 -0
- package/dist/highlight.cjs +140 -0
- package/dist/highlight.d.ts +56 -0
- package/dist/highlight.d.ts.map +1 -0
- package/dist/highlight.js +154 -0
- package/dist/highlight.mjs +119 -0
- package/dist/history.cjs +95 -0
- package/dist/history.d.ts +59 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +85 -0
- package/dist/history.mjs +74 -0
- package/dist/hook.cjs +1562 -0
- package/dist/hook.d.ts +60 -0
- package/dist/hook.d.ts.map +1 -0
- package/dist/hook.js +142 -0
- package/dist/hook.mjs +1553 -0
- package/dist/index.cjs +4552 -0
- package/dist/index.d.ts +44 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -1
- package/dist/index.mjs +4544 -0
- package/dist/inspector.cjs +688 -0
- package/dist/inspector.d.ts +60 -0
- package/dist/inspector.d.ts.map +1 -0
- package/dist/inspector.js +415 -0
- package/dist/inspector.mjs +676 -0
- package/dist/instrument.cjs +497 -0
- package/dist/instrument.d.ts +147 -5
- package/dist/instrument.d.ts.map +1 -1
- package/dist/instrument.js +164 -44
- package/dist/instrument.mjs +487 -0
- package/dist/kind-filter.cjs +172 -0
- package/dist/kind-filter.d.ts +39 -0
- package/dist/kind-filter.d.ts.map +1 -0
- package/dist/kind-filter.js +151 -0
- package/dist/kind-filter.mjs +151 -0
- package/dist/menu.cjs +141 -0
- package/dist/menu.d.ts +37 -0
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +125 -0
- package/dist/menu.mjs +120 -0
- package/dist/observe.cjs +1352 -0
- package/dist/observe.d.ts +80 -0
- package/dist/observe.d.ts.map +1 -0
- package/dist/observe.js +893 -0
- package/dist/observe.mjs +1345 -0
- package/dist/palette.cjs +52 -0
- package/dist/palette.d.ts +11 -0
- package/dist/palette.d.ts.map +1 -0
- package/dist/palette.js +27 -0
- package/dist/palette.mjs +31 -0
- package/dist/path.cjs +45 -0
- package/dist/path.d.ts +19 -0
- package/dist/path.d.ts.map +1 -0
- package/dist/path.js +49 -0
- package/dist/path.mjs +24 -0
- package/dist/plugin.cjs +87 -0
- package/dist/plugin.d.ts +121 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +74 -0
- package/dist/plugin.mjs +66 -0
- package/dist/plugins/context.cjs +98 -0
- package/dist/plugins/context.d.ts +10 -0
- package/dist/plugins/context.d.ts.map +1 -0
- package/dist/plugins/context.js +80 -0
- package/dist/plugins/context.mjs +75 -0
- package/dist/plugins/directives.cjs +98 -0
- package/dist/plugins/directives.d.ts +25 -0
- package/dist/plugins/directives.d.ts.map +1 -0
- package/dist/plugins/directives.js +78 -0
- package/dist/plugins/directives.mjs +75 -0
- package/dist/plugins/index.cjs +162 -0
- package/dist/plugins/index.d.ts +7 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +9 -0
- package/dist/plugins/index.mjs +140 -0
- package/dist/source.cjs +111 -0
- package/dist/source.d.ts +72 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +153 -0
- package/dist/source.mjs +90 -0
- package/dist/timeline.cjs +350 -0
- package/dist/timeline.d.ts +30 -0
- package/dist/timeline.d.ts.map +1 -0
- package/dist/timeline.js +271 -0
- package/dist/timeline.mjs +327 -0
- package/dist/tree.cjs +574 -0
- package/dist/tree.d.ts +128 -0
- package/dist/tree.d.ts.map +1 -0
- package/dist/tree.js +645 -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.d.ts +10 -0
- package/dist/value-pane.d.ts.map +1 -0
- package/dist/value-pane.js +61 -0
- package/dist/value-pane.mjs +200 -0
- package/dist/wire.cjs +109 -0
- package/dist/wire.d.ts +100 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +93 -0
- package/dist/wire.mjs +89 -0
- package/package.json +17 -5
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type ReactiveObserver } from '@fluixi/reactive/signal';
|
|
2
|
+
import { type RNode } from './instrument.js';
|
|
3
|
+
import type { ReactiveSourceLocation } from './source.js';
|
|
4
|
+
import { type GraphEvent } from './history.js';
|
|
5
|
+
import { type DomNode } from './dom.js';
|
|
6
|
+
export interface ObservedGraph {
|
|
7
|
+
readonly graph: Map<number, RNode>;
|
|
8
|
+
/** Ids whose value or run count moved since the last call. Drives the pulse. */
|
|
9
|
+
sample(): number[];
|
|
10
|
+
/**
|
|
11
|
+
* The cursor as it stands. A consumer folding in deltas keeps the one it was given and
|
|
12
|
+
* asks for what came after it.
|
|
13
|
+
*/
|
|
14
|
+
readonly revision: number;
|
|
15
|
+
/**
|
|
16
|
+
* Ids that moved after `rev`. Unlike `sample`, asking does not consume anything, so two
|
|
17
|
+
* consumers reading at their own pace each see every change.
|
|
18
|
+
*/
|
|
19
|
+
changedSince(rev: number): number[];
|
|
20
|
+
/** Ids dropped after `rev`. Bounded: a consumer further back than that is told to reload. */
|
|
21
|
+
removedSince(rev: number): number[];
|
|
22
|
+
/** Whether `rev` is old enough that the removal log no longer covers it. */
|
|
23
|
+
outrun(rev: number): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Removals since the last call, draining as it goes.
|
|
26
|
+
*
|
|
27
|
+
* Superseded by `removedSince`, and kept because the hook that calls it can be older
|
|
28
|
+
* than this: a browser extension bundles its own and hands the application's observer
|
|
29
|
+
* to it. Removing the method outright crashed every panel that had not been reloaded.
|
|
30
|
+
*/
|
|
31
|
+
takeRemoved(): number[];
|
|
32
|
+
/** What happened since the last call, in order. Empty when history is off. */
|
|
33
|
+
takeEvents(): GraphEvent[];
|
|
34
|
+
/** Where this node reaches the page, for whatever is still on it. */
|
|
35
|
+
elementsFor(id: number): Element[];
|
|
36
|
+
/** The node driving `element`, or the nearest ancestor that has one. */
|
|
37
|
+
nodeAt(element: Element | null): number | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* What this node rendered, described so it can be shown by a panel that is not in the
|
|
40
|
+
* page. Stops wherever another tag begins, naming it.
|
|
41
|
+
*/
|
|
42
|
+
domFor(id: number): DomNode[];
|
|
43
|
+
/**
|
|
44
|
+
* The elements this tag returned, and nothing else. Unlike `elementsFor` there is no
|
|
45
|
+
* fallback to what the values inside it write to, so two tags can never claim the same
|
|
46
|
+
* element.
|
|
47
|
+
*/
|
|
48
|
+
renderedFor(id: number): Element[];
|
|
49
|
+
/**
|
|
50
|
+
* Write a signal from outside the application. False when the node is not something that
|
|
51
|
+
* can be written. A memo is computed, and setting it would be a lie the next run undoes.
|
|
52
|
+
*/
|
|
53
|
+
setValue(id: number, next: unknown): boolean;
|
|
54
|
+
detach(): void;
|
|
55
|
+
}
|
|
56
|
+
export interface ObserveOptions {
|
|
57
|
+
/**
|
|
58
|
+
* Trimmed off a file name that a dev server serves from its own origin. Defaults to the
|
|
59
|
+
* page's origin, which is what a preview in an iframe wants too.
|
|
60
|
+
*/
|
|
61
|
+
origin?: string;
|
|
62
|
+
/**
|
|
63
|
+
* How to register. Defaults to this copy of the runtime, so pass the application's own
|
|
64
|
+
* `observeReactiveNodes` when watching from outside its module graph, since a second copy
|
|
65
|
+
* of the framework watches a graph nobody is using.
|
|
66
|
+
*/
|
|
67
|
+
observe?: (observer: ReactiveObserver) => () => void;
|
|
68
|
+
/** Events kept for the timeline. 0 for a host that only draws the graph. */
|
|
69
|
+
history?: number;
|
|
70
|
+
/** One stack capture per binding, at creation. Off for a host that never asks. */
|
|
71
|
+
bindingSources?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Put a stack location back in the author's file. A frame reports the compiled position and
|
|
74
|
+
* knows nothing of the file it was generated from; a host with the source maps closes that.
|
|
75
|
+
* Only stack-derived locations pass through. A compiler mark is already original.
|
|
76
|
+
*/
|
|
77
|
+
mapSource?: (location: ReactiveSourceLocation) => ReactiveSourceLocation | undefined;
|
|
78
|
+
}
|
|
79
|
+
export declare function observeGraph(options?: ObserveOptions): ObservedGraph;
|
|
80
|
+
//# sourceMappingURL=observe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../src/observe.ts"],"names":[],"mappings":"AAUA,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAmE,KAAK,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9G,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG9D,OAAO,EAA0B,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAmDhE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnC,gFAAgF;IAChF,MAAM,IAAI,MAAM,EAAE,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC,6FAA6F;IAC7F,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC,4EAA4E;IAC5E,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B;;;;;;OAMG;IACH,WAAW,IAAI,MAAM,EAAE,CAAC;IACxB,8EAA8E;IAC9E,UAAU,IAAI,UAAU,EAAE,CAAC;IAC3B,qEAAqE;IACrE,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,EAAE,CAAC;IACnC,wEAAwE;IACxE,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;IACpD;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,EAAE,CAAC;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,EAAE,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7C,MAAM,IAAI,IAAI,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,MAAM,IAAI,CAAC;IACrD,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,sBAAsB,KAAK,sBAAsB,GAAG,SAAS,CAAC;CACtF;AAsED,wBAAgB,YAAY,CAAC,OAAO,GAAE,cAAmB,GAAG,aAAa,CA4tBxE"}
|