@loom-js/devtools 0.0.0-stage → 0.1.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/README.md +77 -2
- package/dist/frontend.css +2 -0
- package/dist/frontend.js +215 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +24 -0
- package/dist/index.mjs.map +7 -0
- package/dist/types/backend/console-api.d.ts +6 -0
- package/dist/types/backend/console-api.d.ts.map +1 -0
- package/dist/types/backend/formatters.d.ts +14 -0
- package/dist/types/backend/formatters.d.ts.map +1 -0
- package/dist/types/backend/hosts.d.ts +10 -0
- package/dist/types/backend/hosts.d.ts.map +1 -0
- package/dist/types/backend/ids.d.ts +11 -0
- package/dist/types/backend/ids.d.ts.map +1 -0
- package/dist/types/backend/index.d.ts +15 -0
- package/dist/types/backend/index.d.ts.map +1 -0
- package/dist/types/backend/inspect.d.ts +25 -0
- package/dist/types/backend/inspect.d.ts.map +1 -0
- package/dist/types/backend/page-layer.d.ts +15 -0
- package/dist/types/backend/page-layer.d.ts.map +1 -0
- package/dist/types/backend/perf.d.ts +6 -0
- package/dist/types/backend/perf.d.ts.map +1 -0
- package/dist/types/frontend/client.d.ts +16 -0
- package/dist/types/frontend/client.d.ts.map +1 -0
- package/dist/types/frontend/derive.d.ts +28 -0
- package/dist/types/frontend/derive.d.ts.map +1 -0
- package/dist/types/frontend/index.d.ts +3 -0
- package/dist/types/frontend/index.d.ts.map +1 -0
- package/dist/types/frontend/state.d.ts +171 -0
- package/dist/types/frontend/state.d.ts.map +1 -0
- package/dist/types/frontend/views/activity-item.d.ts +12 -0
- package/dist/types/frontend/views/activity-item.d.ts.map +1 -0
- package/dist/types/frontend/views/header.d.ts +5 -0
- package/dist/types/frontend/views/header.d.ts.map +1 -0
- package/dist/types/frontend/views/hud.d.ts +5 -0
- package/dist/types/frontend/views/hud.d.ts.map +1 -0
- package/dist/types/frontend/views/panes.d.ts +11 -0
- package/dist/types/frontend/views/panes.d.ts.map +1 -0
- package/dist/types/frontend/views/value-view.d.ts +20 -0
- package/dist/types/frontend/views/value-view.d.ts.map +1 -0
- package/dist/types/frontend-source.d.ts +3 -0
- package/dist/types/frontend-source.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/protocol/encode.d.ts +29 -0
- package/dist/types/protocol/encode.d.ts.map +1 -0
- package/dist/types/protocol/transport.d.ts +28 -0
- package/dist/types/protocol/transport.d.ts.map +1 -0
- package/dist/types/protocol/types.d.ts +187 -0
- package/dist/types/protocol/types.d.ts.map +1 -0
- package/package.json +56 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-item.d.ts","sourceRoot":"","sources":["../../../../src/frontend/views/activity-item.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAyC3D,8EAA8E;AAC9E,eAAO,MAAM,UAAU,UAAW,OAAO,WAIxC,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,EAAE,YAAY,CAAC;CAC9B;AAED,eAAO,MAAM,YAAY,oHAsDxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/frontend/views/header.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,UAAU,CAAC;AAmDvD,eAAO,MAAM,MAAM;WAAsB,QAAQ;8CA0BhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hud.d.ts","sourceRoot":"","sources":["../../../../src/frontend/views/hud.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAazC,eAAO,MAAM,GAAG;WAAsB,QAAQ;8CAc7C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HudState } from '../state';
|
|
2
|
+
export declare const TreePane: (props: import("@loom-js/core").ComponentInputProps<{
|
|
3
|
+
state: HudState;
|
|
4
|
+
}>) => import("@loom-js/core").ContextFunction;
|
|
5
|
+
export declare const InspectorPane: (props: import("@loom-js/core").ComponentInputProps<{
|
|
6
|
+
state: HudState;
|
|
7
|
+
}>) => import("@loom-js/core").ContextFunction;
|
|
8
|
+
export declare const ActivitiesPane: (props: import("@loom-js/core").ComponentInputProps<{
|
|
9
|
+
state: HudState;
|
|
10
|
+
}>) => import("@loom-js/core").ContextFunction;
|
|
11
|
+
//# sourceMappingURL=panes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panes.d.ts","sourceRoot":"","sources":["../../../../src/frontend/views/panes.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAsDzC,eAAO,MAAM,QAAQ;WAAsB,QAAQ;8CA0DlD,CAAC;AAoHF,eAAO,MAAM,aAAa;WAAsB,QAAQ;8CA2CvD,CAAC;AASF,eAAO,MAAM,cAAc;WAAsB,QAAQ;8CAgCxD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Component } from '@loom-js/core';
|
|
2
|
+
import type { Encoded, PathKey } from '../../protocol/types';
|
|
3
|
+
import { type Expansions } from '../state';
|
|
4
|
+
export interface ValueContext {
|
|
5
|
+
expansions: Expansions;
|
|
6
|
+
onExpand(path: PathKey[]): void;
|
|
7
|
+
onSelectNode(id: number): void;
|
|
8
|
+
onToggle(path: PathKey[]): void;
|
|
9
|
+
openPaths: Set<string>;
|
|
10
|
+
}
|
|
11
|
+
/** A one-line preview of an encoded value. */
|
|
12
|
+
export declare const previewOf: (value: Encoded) => string;
|
|
13
|
+
export interface ValueRowProps {
|
|
14
|
+
context: ValueContext;
|
|
15
|
+
label: string;
|
|
16
|
+
path: PathKey[];
|
|
17
|
+
value: Encoded;
|
|
18
|
+
}
|
|
19
|
+
export declare const ValueRow: Component<ValueRowProps>;
|
|
20
|
+
//# sourceMappingURL=value-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value-view.d.ts","sourceRoot":"","sources":["../../../../src/frontend/views/value-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,eAAe,CAAC;AAE1D,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,UAAU,CAAC;AAEvD,MAAM,WAAW,YAAY;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC1B;AAID,8CAA8C;AAC9C,eAAO,MAAM,SAAS,UAAW,OAAO,KAAG,MAoC1C,CAAC;AAqCF,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,QAAQ,EAAE,SAAS,CAAC,aAAa,CAoC7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontend-source.d.ts","sourceRoot":"","sources":["../../src/frontend-source.ts"],"names":[],"mappings":"AAMA,oEAAoE;AACpE,eAAO,MAAM,gBAAgB,cAWrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,mBAAmB,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Encoded, PathKey } from './types';
|
|
2
|
+
/** How deep an encode inlines before leaving parts to path expansion. */
|
|
3
|
+
export declare const INLINE_DEPTH = 2;
|
|
4
|
+
/** How many entries a collection inlines. */
|
|
5
|
+
export declare const ENTRY_CAP = 100;
|
|
6
|
+
/** How long a string inlines before truncating. */
|
|
7
|
+
export declare const STRING_CAP = 500;
|
|
8
|
+
export type DescribeSpecial = (value: unknown) => Encoded | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Encodes a live value as a tagged, JSON-safe descriptor: inlined `depth`
|
|
11
|
+
* levels deep, collections capped at `ENTRY_CAP` entries, strings at
|
|
12
|
+
* `STRING_CAP` characters. Cycles and unreadable values become markers.
|
|
13
|
+
* @param value The live value.
|
|
14
|
+
* @param describeSpecial Recognizes framework values first.
|
|
15
|
+
* @param depth Levels left to inline.
|
|
16
|
+
* @param ancestors The objects on the current path (cycle detection).
|
|
17
|
+
*/
|
|
18
|
+
export declare const encodeValue: (value: unknown, describeSpecial: DescribeSpecial, depth?: number, ancestors?: WeakSet<object>) => Encoded;
|
|
19
|
+
/** Marks a path that leads nowhere in the live value. */
|
|
20
|
+
export declare const MISSING: unique symbol;
|
|
21
|
+
/**
|
|
22
|
+
* Follows a path of keys/indices into a live value: object keys, array
|
|
23
|
+
* indices, and entry indices for maps (the value) and sets.
|
|
24
|
+
* @param value The live root value.
|
|
25
|
+
* @param path The keys to follow.
|
|
26
|
+
* @returns The value at the path, or `MISSING`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const resolvePath: (value: unknown, path: PathKey[]) => unknown | typeof MISSING;
|
|
29
|
+
//# sourceMappingURL=encode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/protocol/encode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEhD,yEAAyE;AACzE,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,6CAA6C;AAC7C,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,mDAAmD;AACnD,eAAO,MAAM,UAAU,MAAM,CAAC;AAI9B,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,GAAG,SAAS,CAAC;AAuBtE;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,UACb,OAAO,mBACG,eAAe,8BAErB,OAAO,CAAC,MAAM,CAAC,KAC3B,OAgIF,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,OAAO,eAAkC,CAAC;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,UACb,OAAO,QACR,OAAO,EAAE,KAChB,OAAO,GAAG,OAAO,OAqBP,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Envelope, type MessageKind, type ProtocolError } from './types';
|
|
2
|
+
/** Whether a value is a devtools protocol envelope. */
|
|
3
|
+
export declare const isEnvelope: (data: unknown) => data is Envelope;
|
|
4
|
+
/**
|
|
5
|
+
* Builds one envelope.
|
|
6
|
+
* @param fields The message's kind, type, session and optional parts.
|
|
7
|
+
*/
|
|
8
|
+
export declare const envelope: <Payload>(fields: {
|
|
9
|
+
error?: ProtocolError;
|
|
10
|
+
id?: number;
|
|
11
|
+
kind: MessageKind;
|
|
12
|
+
payload?: Payload;
|
|
13
|
+
session: string;
|
|
14
|
+
type: string;
|
|
15
|
+
}) => Envelope<Payload>;
|
|
16
|
+
export interface Transport {
|
|
17
|
+
post(target: Window, message: Envelope): void;
|
|
18
|
+
listen(isPeer: (source: Window) => boolean, onMessage: (message: Envelope, source: Window) => void): () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The `postMessage` transport for one window: posts with this window's
|
|
22
|
+
* origin as the target, and accepts only same-origin envelopes from peers.
|
|
23
|
+
* Uses `self.origin`, which an `about:srcdoc` / `about:blank` document
|
|
24
|
+
* inherits — its `location.origin` reads `"null"`.
|
|
25
|
+
* @param self The window the transport runs in.
|
|
26
|
+
*/
|
|
27
|
+
export declare const createTransport: (self: Window) => Transport;
|
|
28
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/protocol/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EAGR,KAAK,WAAW,EAChB,KAAK,aAAa,EACrB,MAAM,SAAS,CAAC;AAEjB,uDAAuD;AACvD,eAAO,MAAM,UAAU,SAAU,OAAO,KAAG,IAAI,IAAI,QAIJ,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,UAAU;IACtC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB,KAAG,QAAQ,CAAC,OAAO,CAIlB,CAAC;AAEH,MAAM,WAAW,SAAS;IACtB,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IAG9C,MAAM,CACF,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,EACnC,SAAS,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GACvD,MAAM,IAAI,CAAC;CACjB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,SAiB7C,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
export declare const PROTOCOL_SOURCE = "loom-devtools";
|
|
2
|
+
export declare const PROTOCOL_VERSION = 1;
|
|
3
|
+
export type MessageKind = 'event' | 'request' | 'response';
|
|
4
|
+
export type ErrorCode = 'invalid-value' | 'not-connected' | 'not-editable' | 'protocol-mismatch' | 'unknown-id' | 'unknown-type';
|
|
5
|
+
export interface ProtocolError {
|
|
6
|
+
code: ErrorCode;
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Envelope<Payload = unknown> {
|
|
10
|
+
error?: ProtocolError;
|
|
11
|
+
id?: number;
|
|
12
|
+
kind: MessageKind;
|
|
13
|
+
payload?: Payload;
|
|
14
|
+
protocol: number;
|
|
15
|
+
session: string;
|
|
16
|
+
source: typeof PROTOCOL_SOURCE;
|
|
17
|
+
type: string;
|
|
18
|
+
}
|
|
19
|
+
/** An inspected value as a tagged descriptor (see `encodeValue`). */
|
|
20
|
+
export type Encoded = {
|
|
21
|
+
t: 'circular' | 'null' | 'promise' | 'undefined' | 'unserializable';
|
|
22
|
+
} | {
|
|
23
|
+
t: 'bool';
|
|
24
|
+
v: boolean;
|
|
25
|
+
} | {
|
|
26
|
+
t: 'num';
|
|
27
|
+
v: number | '-0' | '-Infinity' | 'Infinity' | 'NaN';
|
|
28
|
+
} | {
|
|
29
|
+
length?: number;
|
|
30
|
+
t: 'str';
|
|
31
|
+
v: string;
|
|
32
|
+
} | {
|
|
33
|
+
t: 'bigint' | 'date' | 'symbol';
|
|
34
|
+
v: string;
|
|
35
|
+
} | {
|
|
36
|
+
name: string;
|
|
37
|
+
t: 'fn';
|
|
38
|
+
} | {
|
|
39
|
+
message: string;
|
|
40
|
+
name: string;
|
|
41
|
+
t: 'error';
|
|
42
|
+
} | {
|
|
43
|
+
items?: Encoded[];
|
|
44
|
+
length: number;
|
|
45
|
+
t: 'array';
|
|
46
|
+
} | {
|
|
47
|
+
ctor?: string;
|
|
48
|
+
entries?: [string, Encoded][];
|
|
49
|
+
size: number;
|
|
50
|
+
t: 'object';
|
|
51
|
+
} | {
|
|
52
|
+
entries?: [Encoded, Encoded][];
|
|
53
|
+
size: number;
|
|
54
|
+
t: 'map' | 'set';
|
|
55
|
+
} | {
|
|
56
|
+
id?: number;
|
|
57
|
+
t: 'node';
|
|
58
|
+
tag: string;
|
|
59
|
+
} | {
|
|
60
|
+
id: number;
|
|
61
|
+
name: string;
|
|
62
|
+
t: 'activity';
|
|
63
|
+
} | {
|
|
64
|
+
name: string;
|
|
65
|
+
t: 'component';
|
|
66
|
+
};
|
|
67
|
+
/** A key into an inspected value: an object key or a collection index. */
|
|
68
|
+
export type PathKey = number | string;
|
|
69
|
+
export type NodeKind = 'component' | 'effect';
|
|
70
|
+
export interface TreeNode {
|
|
71
|
+
childIds: number[];
|
|
72
|
+
id: number;
|
|
73
|
+
key?: number | string;
|
|
74
|
+
kind: NodeKind;
|
|
75
|
+
name: string;
|
|
76
|
+
parentId?: number;
|
|
77
|
+
}
|
|
78
|
+
export interface ActivityRef {
|
|
79
|
+
id: number;
|
|
80
|
+
name: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ActivityRecord extends ActivityRef {
|
|
83
|
+
editable: boolean;
|
|
84
|
+
pending: boolean;
|
|
85
|
+
subscriberIds: number[];
|
|
86
|
+
value: Encoded;
|
|
87
|
+
}
|
|
88
|
+
export interface NodeDetails {
|
|
89
|
+
activities: ActivityRecord[];
|
|
90
|
+
kind: NodeKind;
|
|
91
|
+
lifeCycle: string | null;
|
|
92
|
+
name: string;
|
|
93
|
+
owned: Encoded;
|
|
94
|
+
props: Encoded;
|
|
95
|
+
refs: number;
|
|
96
|
+
}
|
|
97
|
+
export type Topic = 'activities' | 'flash' | 'perf' | 'renders' | 'tree';
|
|
98
|
+
export type Placement = 'dock' | 'popup';
|
|
99
|
+
export interface HelloResponse {
|
|
100
|
+
features: Topic[];
|
|
101
|
+
placement: Placement | 'unknown';
|
|
102
|
+
selectedId?: number;
|
|
103
|
+
session: string;
|
|
104
|
+
}
|
|
105
|
+
/** Request payloads and their response payloads, by request type. */
|
|
106
|
+
export interface Requests {
|
|
107
|
+
'activity.inspect': [{
|
|
108
|
+
id: number;
|
|
109
|
+
path?: PathKey[];
|
|
110
|
+
}, {
|
|
111
|
+
value: Encoded;
|
|
112
|
+
}];
|
|
113
|
+
'activity.list': [undefined, {
|
|
114
|
+
activities: ActivityRecord[];
|
|
115
|
+
}];
|
|
116
|
+
'activity.reset': [{
|
|
117
|
+
id: number;
|
|
118
|
+
}, {}];
|
|
119
|
+
'activity.update': [{
|
|
120
|
+
id: number;
|
|
121
|
+
input: unknown;
|
|
122
|
+
}, {}];
|
|
123
|
+
close: [undefined, {}];
|
|
124
|
+
hello: [{
|
|
125
|
+
protocol: number;
|
|
126
|
+
}, HelloResponse];
|
|
127
|
+
highlight: [{
|
|
128
|
+
id: number | null;
|
|
129
|
+
}, {}];
|
|
130
|
+
log: [{
|
|
131
|
+
id: number;
|
|
132
|
+
}, {}];
|
|
133
|
+
'node.inspect': [
|
|
134
|
+
{
|
|
135
|
+
id: number;
|
|
136
|
+
path?: PathKey[];
|
|
137
|
+
},
|
|
138
|
+
NodeDetails | {
|
|
139
|
+
value: Encoded;
|
|
140
|
+
}
|
|
141
|
+
];
|
|
142
|
+
open: [{
|
|
143
|
+
placement: Placement;
|
|
144
|
+
}, {}];
|
|
145
|
+
pick: [{
|
|
146
|
+
on: boolean;
|
|
147
|
+
}, {}];
|
|
148
|
+
reveal: [{
|
|
149
|
+
id: number;
|
|
150
|
+
}, {}];
|
|
151
|
+
select: [{
|
|
152
|
+
id: number | null;
|
|
153
|
+
}, {}];
|
|
154
|
+
subscribe: [{
|
|
155
|
+
topics: Topic[];
|
|
156
|
+
}, {}];
|
|
157
|
+
'tree.get': [undefined, {
|
|
158
|
+
nodes: TreeNode[];
|
|
159
|
+
rootIds: number[];
|
|
160
|
+
}];
|
|
161
|
+
}
|
|
162
|
+
export type RequestType = keyof Requests;
|
|
163
|
+
/** Event payloads, by event type. */
|
|
164
|
+
export interface Events {
|
|
165
|
+
'activity.changed': {
|
|
166
|
+
id: number;
|
|
167
|
+
pending: boolean;
|
|
168
|
+
value: Encoded;
|
|
169
|
+
};
|
|
170
|
+
goodbye: undefined;
|
|
171
|
+
'pick.ended': undefined;
|
|
172
|
+
renders: {
|
|
173
|
+
entries: {
|
|
174
|
+
causeId?: number;
|
|
175
|
+
id: number;
|
|
176
|
+
ms: number;
|
|
177
|
+
}[];
|
|
178
|
+
};
|
|
179
|
+
selected: {
|
|
180
|
+
id: number;
|
|
181
|
+
};
|
|
182
|
+
'tree.changed': {
|
|
183
|
+
ids: number[];
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
export type EventType = keyof Events;
|
|
187
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/protocol/types.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAC/C,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAE3D,MAAM,MAAM,SAAS,GACf,eAAe,GACf,eAAe,GACf,cAAc,GACd,mBAAmB,GACnB,YAAY,GACZ,cAAc,CAAC;AAErB,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ,CAAC,OAAO,GAAG,OAAO;IACvC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO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GAAG,MAAM,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loom-js/devtools",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"author": "Claudio Nunez Jr",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"description": "The loom inspector: component tree, props, activities, element picking and render highlighting — docked in the page or in its own window, with no browser extension.",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"loomjs",
|
|
9
|
+
"devtools",
|
|
10
|
+
"inspector",
|
|
11
|
+
"debugging"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"module": "./dist/index.mjs",
|
|
17
|
+
"default": "./dist/index.mjs"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"./dist"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"type": "module",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/claudio-darkkenergy/loom-js.git",
|
|
32
|
+
"directory": "packages/devtools"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@loom-js/core": ">=0.21.0 <1.0.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@esm-bundle/chai": "4.3.4-fix.0",
|
|
39
|
+
"@loom-js/core": "0.21.0",
|
|
40
|
+
"@loom-js/pink": "0.10.1",
|
|
41
|
+
"@loom-js/typescript-config": "0.1.1",
|
|
42
|
+
"@types/mocha": "^10.0.10",
|
|
43
|
+
"@types/node": "^26.5.1",
|
|
44
|
+
"@types/sinon": "22.0.0",
|
|
45
|
+
"@web/dev-server-esbuild": "^2.0.0",
|
|
46
|
+
"@web/test-runner": "^1.0.0",
|
|
47
|
+
"@web/test-runner-puppeteer": "^1.0.1",
|
|
48
|
+
"esbuild": "^0.28.2",
|
|
49
|
+
"puppeteer": "^25.11.0",
|
|
50
|
+
"sinon": "22.1.0",
|
|
51
|
+
"typescript": "^7.0.2"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build-package": "node scripts/build.mjs",
|
|
55
|
+
"format": "prettier",
|
|
56
|
+
"test-ci": "node scripts/build.mjs --frontend-only && wtr --config \"web-test-runner.config.mjs\"",
|
|
57
|
+
"type-check": "tsc --noEmit && tsc --noEmit -p tests/tsconfig.json"
|
|
58
|
+
}
|
|
6
59
|
}
|