@fluixi/devtools 0.2.0-alpha.4 → 0.2.0-alpha.6
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 +9 -0
- package/dist/callsite.d.ts +1 -1
- package/dist/callsite.d.ts.map +1 -1
- package/dist/callsite.js +10 -1
- package/dist/callsite.mjs +9 -0
- package/dist/change-view.js +2 -2
- package/dist/describe.js +2 -2
- 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/diff.js +1 -1
- package/dist/export.cjs +1 -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 +1 -0
- package/dist/float.d.ts +1 -1
- package/dist/float.js +3 -3
- package/dist/format.js +3 -3
- package/dist/graph-view.cjs +12 -3
- package/dist/graph-view.d.ts.map +1 -1
- package/dist/graph-view.js +11 -2
- package/dist/graph-view.mjs +12 -3
- package/dist/history.d.ts +2 -2
- package/dist/history.js +2 -2
- package/dist/hook.cjs +158 -19
- package/dist/hook.d.ts +3 -3
- package/dist/hook.js +6 -6
- package/dist/hook.mjs +158 -19
- package/dist/index.cjs +186 -29
- package/dist/index.mjs +186 -29
- package/dist/inspector.cjs +8 -4
- package/dist/inspector.d.ts +2 -2
- package/dist/inspector.js +8 -8
- package/dist/inspector.mjs +8 -4
- package/dist/instrument.cjs +9 -3
- package/dist/instrument.d.ts +16 -1
- package/dist/instrument.d.ts.map +1 -1
- package/dist/instrument.mjs +9 -3
- package/dist/kind-filter.cjs +5 -2
- package/dist/kind-filter.d.ts +2 -2
- package/dist/kind-filter.js +4 -4
- package/dist/kind-filter.mjs +5 -2
- package/dist/observe.cjs +157 -19
- package/dist/observe.d.ts.map +1 -1
- package/dist/observe.js +165 -16
- package/dist/observe.mjs +157 -19
- package/dist/palette.cjs +4 -1
- package/dist/palette.d.ts.map +1 -1
- package/dist/palette.js +3 -0
- package/dist/palette.mjs +4 -1
- package/dist/path.d.ts +2 -2
- package/dist/path.js +2 -2
- package/dist/plugins/index.cjs +1 -1
- package/dist/plugins/index.mjs +1 -1
- package/dist/source.cjs +18 -3
- package/dist/source.d.ts +18 -3
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +29 -7
- package/dist/source.mjs +18 -3
- package/dist/timeline.js +3 -3
- package/dist/tree.cjs +19 -4
- package/dist/tree.d.ts.map +1 -1
- package/dist/tree.js +21 -2
- package/dist/tree.mjs +19 -4
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/wire.cjs +3 -1
- package/dist/wire.d.ts +2 -0
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +2 -0
- package/dist/wire.mjs +3 -1
- package/package.json +8 -2
package/dist/observe.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
// src/source.ts
|
|
8
8
|
var MARKER = "__fx_source";
|
|
9
9
|
var COMPONENT_MARKER = "__fx_component";
|
|
10
|
+
var CLASS_MARKER = "__fx_class";
|
|
10
11
|
var HOLE_MARKER = "__fx_hole";
|
|
11
12
|
var PROPS_MARKER = "__fx_props";
|
|
12
13
|
var MARKS = "__FLUIXI_DEVTOOLS_MARKS__";
|
|
@@ -17,12 +18,16 @@ var shared = host[MARKS] ?? {
|
|
|
17
18
|
components: /* @__PURE__ */ new Map()
|
|
18
19
|
};
|
|
19
20
|
host[MARKS] = shared;
|
|
20
|
-
|
|
21
|
+
shared.classes ??= /* @__PURE__ */ new WeakMap();
|
|
22
|
+
function markReactiveSource(file, line, column, name, self) {
|
|
21
23
|
const location2 = locate(file, line, column);
|
|
22
24
|
if (shared.pending && location2.external && !shared.pending.location?.external) return;
|
|
23
|
-
shared.pending = { name, location: location2 };
|
|
25
|
+
shared.pending = self && typeof self === "object" ? { name, location: location2, self } : { name, location: location2 };
|
|
24
26
|
shared.expiring = false;
|
|
25
27
|
}
|
|
28
|
+
function dropReactiveSource() {
|
|
29
|
+
shared.pending = null;
|
|
30
|
+
}
|
|
26
31
|
function locate(file, line, column) {
|
|
27
32
|
const external = !!file && (/^([a-zA-Z]:)?[\\/]/.test(file) || file.includes("node_modules/"));
|
|
28
33
|
return external ? { file, line, column, external } : { file, line, column };
|
|
@@ -36,13 +41,19 @@ function markComponentSource(name, file, line, column) {
|
|
|
36
41
|
}
|
|
37
42
|
if (!seen || seen.file !== file || seen.line !== line) shared.components.set(name, null);
|
|
38
43
|
}
|
|
44
|
+
function markClassSource(constructor, file, line, column) {
|
|
45
|
+
if (typeof constructor === "function") shared.classes.set(constructor, locate(file, line, column));
|
|
46
|
+
}
|
|
47
|
+
function classSource(constructor) {
|
|
48
|
+
return typeof constructor === "function" ? shared.classes.get(constructor) : void 0;
|
|
49
|
+
}
|
|
39
50
|
function componentSource(name) {
|
|
40
51
|
return shared.components.get(name) ?? void 0;
|
|
41
52
|
}
|
|
42
53
|
function takeReactiveSource() {
|
|
43
54
|
const mark = shared.pending;
|
|
44
55
|
if (mark) {
|
|
45
|
-
if (mark.name !== void 0) shared.pending = { location: mark.location };
|
|
56
|
+
if (mark.name !== void 0 || mark.self) shared.pending = { location: mark.location };
|
|
46
57
|
if (!shared.expiring) {
|
|
47
58
|
shared.expiring = true;
|
|
48
59
|
queueMicrotask(() => {
|
|
@@ -82,6 +93,7 @@ function holeLocation(accessor) {
|
|
|
82
93
|
function installSourceMarker() {
|
|
83
94
|
if (typeof host[MARKER] !== "function") host[MARKER] = markReactiveSource;
|
|
84
95
|
if (typeof host[COMPONENT_MARKER] !== "function") host[COMPONENT_MARKER] = markComponentSource;
|
|
96
|
+
if (typeof host[CLASS_MARKER] !== "function") host[CLASS_MARKER] = markClassSource;
|
|
85
97
|
if (typeof host[HOLE_MARKER] !== "function") host[HOLE_MARKER] = markHole;
|
|
86
98
|
if (typeof host[PROPS_MARKER] !== "function") host[PROPS_MARKER] = markProps;
|
|
87
99
|
}
|
|
@@ -93,6 +105,15 @@ var INTERNAL = [
|
|
|
93
105
|
"/packages/dom/",
|
|
94
106
|
"/packages/core/",
|
|
95
107
|
"/packages/devtools/",
|
|
108
|
+
"/packages/web-components/",
|
|
109
|
+
"/packages/auth/",
|
|
110
|
+
"/packages/oauth2/",
|
|
111
|
+
"/packages/session/",
|
|
112
|
+
"/packages/router/",
|
|
113
|
+
"/packages/head/",
|
|
114
|
+
"/packages/start/",
|
|
115
|
+
"/packages/server/",
|
|
116
|
+
"/packages/template-runtime/",
|
|
96
117
|
"/@fluixi/",
|
|
97
118
|
"node_modules",
|
|
98
119
|
"fluixi-devtools",
|
|
@@ -654,7 +675,10 @@ var KIND_COLOR = {
|
|
|
654
675
|
binding: "#5eead4",
|
|
655
676
|
setter: "#fb7185",
|
|
656
677
|
group: "#8a90a2",
|
|
657
|
-
element: "#8a90a2"
|
|
678
|
+
element: "#8a90a2",
|
|
679
|
+
"custom-element": "#2dd4bf",
|
|
680
|
+
module: "#facc15",
|
|
681
|
+
service: "#60a5fa"
|
|
658
682
|
};
|
|
659
683
|
var kindVar = (kind) => `--fx-kind-${kind}`;
|
|
660
684
|
var kindColor = (kind) => `var(${kindVar(kind)}, ${KIND_COLOR[kind]})`;
|
|
@@ -671,7 +695,11 @@ var TREE_KINDS = /* @__PURE__ */ new Set([
|
|
|
671
695
|
"handler",
|
|
672
696
|
// A component a plugin recognised as providing a context. Still a tag the author wrote,
|
|
673
697
|
// so leaving it out took it and everything it rendered out of the tree.
|
|
674
|
-
"provider"
|
|
698
|
+
"provider",
|
|
699
|
+
// Scopes the runtime reported: what their signals and memos belong to.
|
|
700
|
+
"custom-element",
|
|
701
|
+
"module",
|
|
702
|
+
"service"
|
|
675
703
|
]);
|
|
676
704
|
var TREE_CSS = `
|
|
677
705
|
.fx-tree-row {
|
|
@@ -787,7 +815,11 @@ var PREFIX = {
|
|
|
787
815
|
// A plugin's, and it names them itself.
|
|
788
816
|
directive: "d",
|
|
789
817
|
context: "ctx",
|
|
790
|
-
provider: "p"
|
|
818
|
+
provider: "p",
|
|
819
|
+
// Scopes are always named by what opened them.
|
|
820
|
+
"custom-element": "el",
|
|
821
|
+
module: "mod",
|
|
822
|
+
service: "svc"
|
|
791
823
|
};
|
|
792
824
|
function readProps(props) {
|
|
793
825
|
const at = propsLocations(props);
|
|
@@ -827,6 +859,10 @@ function observeGraph(options = {}) {
|
|
|
827
859
|
const boundTo = /* @__PURE__ */ new WeakMap();
|
|
828
860
|
const drivenBy = /* @__PURE__ */ new WeakMap();
|
|
829
861
|
let reaches = /* @__PURE__ */ new Map();
|
|
862
|
+
const SCOPE_KINDS = /* @__PURE__ */ new Set(["custom-element", "module", "service"]);
|
|
863
|
+
const scopeIds = /* @__PURE__ */ new WeakMap();
|
|
864
|
+
const scopeOfTarget = /* @__PURE__ */ new WeakMap();
|
|
865
|
+
const fieldsOf = /* @__PURE__ */ new WeakMap();
|
|
830
866
|
let described = null;
|
|
831
867
|
const rendered = /* @__PURE__ */ new Map();
|
|
832
868
|
const elementsIn = (value) => {
|
|
@@ -923,7 +959,9 @@ function observeGraph(options = {}) {
|
|
|
923
959
|
// Mapped, unlike `mark`: these two came off a stack, so they are positions in the
|
|
924
960
|
// compiled file until a host translates them.
|
|
925
961
|
...site && !site.external ? { usedAt: mapped(site.location) } : {},
|
|
926
|
-
|
|
962
|
+
// Not inside a scope: an element's prop is made by the package for the element, and
|
|
963
|
+
// the package's line says less than the scope it sits in already does.
|
|
964
|
+
...site && site.external && !mark?.location && !report.scope ? { source: mapped(site.location) } : {}
|
|
927
965
|
};
|
|
928
966
|
const owner = ancestor(report.parents);
|
|
929
967
|
if (owner !== void 0) node.createdIn = owner;
|
|
@@ -933,6 +971,28 @@ function observeGraph(options = {}) {
|
|
|
933
971
|
node.createdIn = originId;
|
|
934
972
|
if (from.source) node.source = from.source;
|
|
935
973
|
}
|
|
974
|
+
const scopeId = report.scope ? scopeIds.get(report.scope) : void 0;
|
|
975
|
+
if (scopeId !== void 0) {
|
|
976
|
+
node.scope = scopeId;
|
|
977
|
+
const creator = node.createdIn !== void 0 ? graph.get(node.createdIn) : void 0;
|
|
978
|
+
const insideAlready = node.createdIn === scopeId || creator?.scope === scopeId;
|
|
979
|
+
if (!insideAlready) node.createdIn = scopeId;
|
|
980
|
+
} else if (node.createdIn !== void 0) {
|
|
981
|
+
const creator = graph.get(node.createdIn);
|
|
982
|
+
const inherited = creator && SCOPE_KINDS.has(creator.kind) ? creator.id : creator?.scope;
|
|
983
|
+
if (inherited !== void 0) node.scope = inherited;
|
|
984
|
+
}
|
|
985
|
+
const self = mark?.self;
|
|
986
|
+
if (self) {
|
|
987
|
+
const list = fieldsOf.get(self);
|
|
988
|
+
if (list) list.push(id);
|
|
989
|
+
else fieldsOf.set(self, [id]);
|
|
990
|
+
const open = scopeOfTarget.get(self);
|
|
991
|
+
if (open !== void 0 && graph.has(open)) {
|
|
992
|
+
node.scope = open;
|
|
993
|
+
node.createdIn = open;
|
|
994
|
+
}
|
|
995
|
+
}
|
|
936
996
|
if (kind !== "effect" && typeof handle === "function") {
|
|
937
997
|
const read = handle;
|
|
938
998
|
node.read = () => untrack2(read);
|
|
@@ -1068,20 +1128,90 @@ function observeGraph(options = {}) {
|
|
|
1068
1128
|
internals.delete(target);
|
|
1069
1129
|
const id = ids.get(target);
|
|
1070
1130
|
if (id === void 0) return;
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1131
|
+
forget(id);
|
|
1132
|
+
},
|
|
1133
|
+
scope(scope, info, parent) {
|
|
1134
|
+
dropReactiveSource();
|
|
1135
|
+
const id = seq++;
|
|
1136
|
+
const kind = info.kind === "element" ? "custom-element" : info.kind;
|
|
1137
|
+
const parentId = parent ? scopeIds.get(parent) : void 0;
|
|
1138
|
+
const found = currentCallSite(origin);
|
|
1139
|
+
const site = found && !/\0|__x00__|^virtual:/.test(found.location.file ?? "") ? found : void 0;
|
|
1140
|
+
const node = {
|
|
1141
|
+
id,
|
|
1142
|
+
label: info.name,
|
|
1143
|
+
kind,
|
|
1144
|
+
// The author named the element, the module and the service; none of them is plumbing.
|
|
1145
|
+
authored: true,
|
|
1146
|
+
deps: /* @__PURE__ */ new Set(),
|
|
1147
|
+
writes: /* @__PURE__ */ new Set(),
|
|
1148
|
+
runs: 0,
|
|
1149
|
+
lastPulse: 0,
|
|
1150
|
+
...info.detail ? { value: info.detail, detail: info.detail } : {},
|
|
1151
|
+
...parentId !== void 0 ? { scope: parentId, createdIn: parentId } : {}
|
|
1152
|
+
};
|
|
1153
|
+
const target = info.target;
|
|
1154
|
+
if (kind === "custom-element") {
|
|
1155
|
+
const defined = target ? classSource(target.constructor) : void 0;
|
|
1156
|
+
if (defined) node.declaredAt = defined;
|
|
1157
|
+
} else if (site && !site.external) {
|
|
1158
|
+
node.usedAt = mapped(site.location);
|
|
1159
|
+
}
|
|
1160
|
+
scopeIds.set(scope, id);
|
|
1161
|
+
if (target && typeof target === "object" && target.nodeType === 1) {
|
|
1162
|
+
rendered.set(id, [new WeakRef(target)]);
|
|
1163
|
+
}
|
|
1164
|
+
graph.set(id, node);
|
|
1165
|
+
history.created(id, node.createdIn, node.label);
|
|
1166
|
+
if (target && typeof target === "object") {
|
|
1167
|
+
scopeOfTarget.set(target, id);
|
|
1168
|
+
for (const field of fieldsOf.get(target) ?? []) {
|
|
1169
|
+
const made = graph.get(field);
|
|
1170
|
+
if (!made) continue;
|
|
1171
|
+
made.scope = id;
|
|
1172
|
+
made.createdIn = id;
|
|
1173
|
+
revs.set(field, ++revision);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
},
|
|
1177
|
+
scopeEnded(scope) {
|
|
1178
|
+
const id = scopeIds.get(scope);
|
|
1179
|
+
if (id === void 0) return;
|
|
1180
|
+
const ended = /* @__PURE__ */ new Set([id]);
|
|
1181
|
+
for (let grew = true; grew; ) {
|
|
1182
|
+
grew = false;
|
|
1183
|
+
for (const [other, node] of graph) {
|
|
1184
|
+
if (!ended.has(other) && node.scope !== void 0 && ended.has(node.scope)) {
|
|
1185
|
+
ended.add(other);
|
|
1186
|
+
grew = true;
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
for (const gone of ended) forget(gone);
|
|
1191
|
+
},
|
|
1192
|
+
scopeAdopted(scope, parent) {
|
|
1193
|
+
const node = graph.get(scopeIds.get(scope) ?? -1);
|
|
1194
|
+
const parentId = scopeIds.get(parent);
|
|
1195
|
+
if (!node || parentId === void 0 || parentId === node.id) return;
|
|
1196
|
+
node.scope = parentId;
|
|
1197
|
+
node.createdIn = parentId;
|
|
1198
|
+
revs.set(node.id, ++revision);
|
|
1083
1199
|
}
|
|
1084
1200
|
});
|
|
1201
|
+
function forget(id) {
|
|
1202
|
+
removed.push({ id, rev: ++revision });
|
|
1203
|
+
revs.delete(id);
|
|
1204
|
+
if (removed.length > REMOVED_LOG) removed.splice(0, removed.length - REMOVED_LOG);
|
|
1205
|
+
history.disposed(id, graph.get(id)?.label);
|
|
1206
|
+
graph.delete(id);
|
|
1207
|
+
handed.delete(id);
|
|
1208
|
+
raws.delete(id);
|
|
1209
|
+
cores.delete(id);
|
|
1210
|
+
rendered.delete(id);
|
|
1211
|
+
setters.delete(id);
|
|
1212
|
+
runsAtLastSample.delete(id);
|
|
1213
|
+
unnamed.delete(id);
|
|
1214
|
+
}
|
|
1085
1215
|
const edges = (id, node) => {
|
|
1086
1216
|
const sources = cores.get(id)?.sources;
|
|
1087
1217
|
node.deps.clear();
|
|
@@ -1101,6 +1231,14 @@ function observeGraph(options = {}) {
|
|
|
1101
1231
|
revs.set(id, ++revision);
|
|
1102
1232
|
};
|
|
1103
1233
|
const now = Date.now();
|
|
1234
|
+
for (const [id, node] of graph) {
|
|
1235
|
+
if (node.kind !== "custom-element" || node.usedAt) continue;
|
|
1236
|
+
const element = rendered.get(id)?.[0]?.deref();
|
|
1237
|
+
const written = element ? element.__fx_loc : void 0;
|
|
1238
|
+
if (!written?.file) continue;
|
|
1239
|
+
node.usedAt = { file: written.file, line: written.line, column: written.column };
|
|
1240
|
+
revs.set(id, ++revision);
|
|
1241
|
+
}
|
|
1104
1242
|
const bindings = /* @__PURE__ */ new Map();
|
|
1105
1243
|
const drives = /* @__PURE__ */ new Map();
|
|
1106
1244
|
const seen = /* @__PURE__ */ new Map();
|
package/dist/palette.cjs
CHANGED
|
@@ -42,7 +42,10 @@ var KIND_COLOR = {
|
|
|
42
42
|
binding: "#5eead4",
|
|
43
43
|
setter: "#fb7185",
|
|
44
44
|
group: "#8a90a2",
|
|
45
|
-
element: "#8a90a2"
|
|
45
|
+
element: "#8a90a2",
|
|
46
|
+
"custom-element": "#2dd4bf",
|
|
47
|
+
module: "#facc15",
|
|
48
|
+
service: "#60a5fa"
|
|
46
49
|
};
|
|
47
50
|
var kindVar = (kind) => `--fx-kind-${kind}`;
|
|
48
51
|
var kindColor = (kind) => `var(${kindVar(kind)}, ${KIND_COLOR[kind]})`;
|
package/dist/palette.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../src/palette.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qFAAqF;AACrF,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEhD,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../src/palette.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qFAAqF;AACrF,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEhD,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAoBnD,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,OAAO,GAAI,MAAM,YAAY,KAAG,MAA6B,CAAC;AAE3E,gGAAgG;AAChG,eAAO,MAAM,SAAS,GAAI,MAAM,YAAY,KAAG,MACD,CAAC;AAI/C,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5F"}
|
package/dist/palette.js
CHANGED
|
@@ -15,6 +15,9 @@ export const KIND_COLOR = {
|
|
|
15
15
|
setter: '#fb7185',
|
|
16
16
|
group: '#8a90a2',
|
|
17
17
|
element: '#8a90a2',
|
|
18
|
+
'custom-element': '#2dd4bf',
|
|
19
|
+
module: '#facc15',
|
|
20
|
+
service: '#60a5fa',
|
|
18
21
|
};
|
|
19
22
|
/** The variable a host can set to override one, per kind. */
|
|
20
23
|
export const kindVar = (kind) => `--fx-kind-${kind}`;
|
package/dist/palette.mjs
CHANGED
|
@@ -15,7 +15,10 @@ var KIND_COLOR = {
|
|
|
15
15
|
binding: "#5eead4",
|
|
16
16
|
setter: "#fb7185",
|
|
17
17
|
group: "#8a90a2",
|
|
18
|
-
element: "#8a90a2"
|
|
18
|
+
element: "#8a90a2",
|
|
19
|
+
"custom-element": "#2dd4bf",
|
|
20
|
+
module: "#facc15",
|
|
21
|
+
service: "#60a5fa"
|
|
19
22
|
};
|
|
20
23
|
var kindVar = (kind) => `--fx-kind-${kind}`;
|
|
21
24
|
var kindColor = (kind) => `var(${kindVar(kind)}, ${KIND_COLOR[kind]})`;
|
package/dist/path.d.ts
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* ran it: `/Users/someone/work/app/packages/dom/src/lib/dom/runtime.ts`. All of it before
|
|
6
6
|
* the package name says nothing about the project, and it is most of the line.
|
|
7
7
|
*
|
|
8
|
-
* The full path is kept for opening the file
|
|
8
|
+
* The full path is kept for opening the file: only what is displayed is shortened.
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* The part of `file` worth showing.
|
|
12
12
|
*
|
|
13
13
|
* Tried in order: below the project root when the host knows it, then the package a
|
|
14
14
|
* node_modules path names, then the workspace package a monorepo path names. A path that
|
|
15
|
-
* matches none of those is left as it is
|
|
15
|
+
* matches none of those is left as it is: guessing at a shorter form would hide which file
|
|
16
16
|
* it is, and the point of the line is to say that.
|
|
17
17
|
*/
|
|
18
18
|
export declare function shortenPath(file: string, root?: string): string;
|
package/dist/path.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ran it: `/Users/someone/work/app/packages/dom/src/lib/dom/runtime.ts`. All of it before
|
|
6
6
|
* the package name says nothing about the project, and it is most of the line.
|
|
7
7
|
*
|
|
8
|
-
* The full path is kept for opening the file
|
|
8
|
+
* The full path is kept for opening the file: only what is displayed is shortened.
|
|
9
9
|
*/
|
|
10
10
|
/** Windows separators, and the leading slash an origin-stripped path can lose. */
|
|
11
11
|
const normalize = (file) => file.replace(/\\/g, '/');
|
|
@@ -18,7 +18,7 @@ const WORKSPACE_DIRS = new Set(['packages', 'apps', 'libs', 'examples']);
|
|
|
18
18
|
*
|
|
19
19
|
* Tried in order: below the project root when the host knows it, then the package a
|
|
20
20
|
* node_modules path names, then the workspace package a monorepo path names. A path that
|
|
21
|
-
* matches none of those is left as it is
|
|
21
|
+
* matches none of those is left as it is: guessing at a shorter form would hide which file
|
|
22
22
|
* it is, and the point of the line is to say that.
|
|
23
23
|
*/
|
|
24
24
|
export function shortenPath(file, root) {
|
package/dist/plugins/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/devtools v0.2.0-alpha.
|
|
1
|
+
/*! @fluixi/devtools v0.2.0-alpha.6 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/plugins/index.mjs
CHANGED
package/dist/source.cjs
CHANGED
|
@@ -20,9 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/source.ts
|
|
21
21
|
var source_exports = {};
|
|
22
22
|
__export(source_exports, {
|
|
23
|
+
classSource: () => classSource,
|
|
23
24
|
componentSource: () => componentSource,
|
|
25
|
+
dropReactiveSource: () => dropReactiveSource,
|
|
24
26
|
holeLocation: () => holeLocation,
|
|
25
27
|
installSourceMarker: () => installSourceMarker,
|
|
28
|
+
markClassSource: () => markClassSource,
|
|
26
29
|
markComponentSource: () => markComponentSource,
|
|
27
30
|
markReactiveSource: () => markReactiveSource,
|
|
28
31
|
propsLocations: () => propsLocations,
|
|
@@ -31,6 +34,7 @@ __export(source_exports, {
|
|
|
31
34
|
module.exports = __toCommonJS(source_exports);
|
|
32
35
|
var MARKER = "__fx_source";
|
|
33
36
|
var COMPONENT_MARKER = "__fx_component";
|
|
37
|
+
var CLASS_MARKER = "__fx_class";
|
|
34
38
|
var HOLE_MARKER = "__fx_hole";
|
|
35
39
|
var PROPS_MARKER = "__fx_props";
|
|
36
40
|
var MARKS = "__FLUIXI_DEVTOOLS_MARKS__";
|
|
@@ -41,12 +45,16 @@ var shared = host[MARKS] ?? {
|
|
|
41
45
|
components: /* @__PURE__ */ new Map()
|
|
42
46
|
};
|
|
43
47
|
host[MARKS] = shared;
|
|
44
|
-
|
|
48
|
+
shared.classes ??= /* @__PURE__ */ new WeakMap();
|
|
49
|
+
function markReactiveSource(file, line, column, name, self) {
|
|
45
50
|
const location = locate(file, line, column);
|
|
46
51
|
if (shared.pending && location.external && !shared.pending.location?.external) return;
|
|
47
|
-
shared.pending = { name, location };
|
|
52
|
+
shared.pending = self && typeof self === "object" ? { name, location, self } : { name, location };
|
|
48
53
|
shared.expiring = false;
|
|
49
54
|
}
|
|
55
|
+
function dropReactiveSource() {
|
|
56
|
+
shared.pending = null;
|
|
57
|
+
}
|
|
50
58
|
function locate(file, line, column) {
|
|
51
59
|
const external = !!file && (/^([a-zA-Z]:)?[\\/]/.test(file) || file.includes("node_modules/"));
|
|
52
60
|
return external ? { file, line, column, external } : { file, line, column };
|
|
@@ -60,13 +68,19 @@ function markComponentSource(name, file, line, column) {
|
|
|
60
68
|
}
|
|
61
69
|
if (!seen || seen.file !== file || seen.line !== line) shared.components.set(name, null);
|
|
62
70
|
}
|
|
71
|
+
function markClassSource(constructor, file, line, column) {
|
|
72
|
+
if (typeof constructor === "function") shared.classes.set(constructor, locate(file, line, column));
|
|
73
|
+
}
|
|
74
|
+
function classSource(constructor) {
|
|
75
|
+
return typeof constructor === "function" ? shared.classes.get(constructor) : void 0;
|
|
76
|
+
}
|
|
63
77
|
function componentSource(name) {
|
|
64
78
|
return shared.components.get(name) ?? void 0;
|
|
65
79
|
}
|
|
66
80
|
function takeReactiveSource() {
|
|
67
81
|
const mark = shared.pending;
|
|
68
82
|
if (mark) {
|
|
69
|
-
if (mark.name !== void 0) shared.pending = { location: mark.location };
|
|
83
|
+
if (mark.name !== void 0 || mark.self) shared.pending = { location: mark.location };
|
|
70
84
|
if (!shared.expiring) {
|
|
71
85
|
shared.expiring = true;
|
|
72
86
|
queueMicrotask(() => {
|
|
@@ -106,6 +120,7 @@ function holeLocation(accessor) {
|
|
|
106
120
|
function installSourceMarker() {
|
|
107
121
|
if (typeof host[MARKER] !== "function") host[MARKER] = markReactiveSource;
|
|
108
122
|
if (typeof host[COMPONENT_MARKER] !== "function") host[COMPONENT_MARKER] = markComponentSource;
|
|
123
|
+
if (typeof host[CLASS_MARKER] !== "function") host[CLASS_MARKER] = markClassSource;
|
|
109
124
|
if (typeof host[HOLE_MARKER] !== "function") host[HOLE_MARKER] = markHole;
|
|
110
125
|
if (typeof host[PROPS_MARKER] !== "function") host[PROPS_MARKER] = markProps;
|
|
111
126
|
}
|
package/dist/source.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface ReactiveSourceLocation {
|
|
|
25
25
|
*
|
|
26
26
|
* Both are worth having. The original says which component and which file; the compiled one
|
|
27
27
|
* says which of that component's bindings, because a template's holes all map back to the
|
|
28
|
-
* position the template opens at
|
|
28
|
+
* position the template opens at: one entry per emitted root is all the map has. Until
|
|
29
29
|
* that changes, the compiled line is the only thing that tells two bindings apart.
|
|
30
30
|
*/
|
|
31
31
|
compiled?: {
|
|
@@ -37,12 +37,17 @@ export interface ReactiveSourceLocation {
|
|
|
37
37
|
export interface ReactiveSourceMetadata {
|
|
38
38
|
name?: string;
|
|
39
39
|
location?: ReactiveSourceLocation;
|
|
40
|
+
/**
|
|
41
|
+
* The instance a class field belongs to. A field initializer runs in the constructor, before
|
|
42
|
+
* a custom element has opened its scope, so this is what ties `#count = signal(0)` to it.
|
|
43
|
+
*/
|
|
44
|
+
self?: object;
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
42
47
|
* Where each component was declared, by name.
|
|
43
48
|
*
|
|
44
49
|
* The graph sees the memo the compiler wraps a component in, and all that memo carries back
|
|
45
|
-
* is the name stamped on what the component returned
|
|
50
|
+
* is the name stamped on what the component returned, so name is the only key available.
|
|
46
51
|
* Two components sharing a name are recorded as ambiguous and reported as unknown, since a
|
|
47
52
|
* location pointing at the wrong file is worse than none.
|
|
48
53
|
*/
|
|
@@ -50,9 +55,19 @@ export interface ReactiveSourceMetadata {
|
|
|
50
55
|
* Record where the next node is about to be created. The compiler calls this; call it
|
|
51
56
|
* yourself only for a node the compiler cannot see, immediately before the primitive.
|
|
52
57
|
*/
|
|
53
|
-
export declare function markReactiveSource(file?: string, line?: number, column?: number, name?: string): void;
|
|
58
|
+
export declare function markReactiveSource(file?: string, line?: number, column?: number, name?: string, self?: object): void;
|
|
59
|
+
/**
|
|
60
|
+
* Forget the mark. A scope opening is the end of whatever statement left it: an element's
|
|
61
|
+
* props are made in its own scope, and without this they claimed the line of the last class
|
|
62
|
+
* field or effect the same turn happened to run.
|
|
63
|
+
*/
|
|
64
|
+
export declare function dropReactiveSource(): void;
|
|
54
65
|
/** Record where a component was declared. The compiler calls this. */
|
|
55
66
|
export declare function markComponentSource(name: string, file?: string, line?: number, column?: number): void;
|
|
67
|
+
/** Record where a class was declared. The compiler calls this from the class's static block. */
|
|
68
|
+
export declare function markClassSource(constructor: unknown, file?: string, line?: number, column?: number): void;
|
|
69
|
+
/** Where a class was declared, when the compiler marked it: a custom element's definition. */
|
|
70
|
+
export declare function classSource(constructor: unknown): ReactiveSourceLocation | undefined;
|
|
56
71
|
/** Where a component of this name was declared, when exactly one was. */
|
|
57
72
|
export declare function componentSource(name: string): ReactiveSourceLocation | undefined;
|
|
58
73
|
/**
|
package/dist/source.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C;AAED,gFAAgF;AAChF,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C;AAED,gFAAgF;AAChF,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAoCD;;;;;;;GAOG;AAGH;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAQpH;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAYD,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAQrG;AAED,gGAAgG;AAChG,wBAAgB,eAAe,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAEzG;AAED,8FAA8F;AAC9F,wBAAgB,WAAW,CAAC,WAAW,EAAE,OAAO,GAAG,sBAAsB,GAAG,SAAS,CAEpF;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS,CAEhF;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,sBAAsB,GAAG,IAAI,CAgBlE;AA4CD,oFAAoF;AACpF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,GACb,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAE9C;AAED,mEAAmE;AACnE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,OAAO,GAAG,sBAAsB,GAAG,SAAS,CAGlF;AAED,wBAAgB,mBAAmB,IAAI,IAAI,CAM1C"}
|
package/dist/source.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
/** Kept in step with SOURCE_MARKER and COMPONENT_MARKER in the compiler. */
|
|
12
12
|
const MARKER = '__fx_source';
|
|
13
13
|
const COMPONENT_MARKER = '__fx_component';
|
|
14
|
+
const CLASS_MARKER = '__fx_class';
|
|
14
15
|
const HOLE_MARKER = '__fx_hole';
|
|
15
16
|
const PROPS_MARKER = '__fx_props';
|
|
16
17
|
const MARKS = '__FLUIXI_DEVTOOLS_MARKS__';
|
|
@@ -21,11 +22,12 @@ const shared = host[MARKS] ?? {
|
|
|
21
22
|
components: new Map(),
|
|
22
23
|
};
|
|
23
24
|
host[MARKS] = shared;
|
|
25
|
+
shared.classes ??= new WeakMap();
|
|
24
26
|
/**
|
|
25
27
|
* Where each component was declared, by name.
|
|
26
28
|
*
|
|
27
29
|
* The graph sees the memo the compiler wraps a component in, and all that memo carries back
|
|
28
|
-
* is the name stamped on what the component returned
|
|
30
|
+
* is the name stamped on what the component returned, so name is the only key available.
|
|
29
31
|
* Two components sharing a name are recorded as ambiguous and reported as unknown, since a
|
|
30
32
|
* location pointing at the wrong file is worse than none.
|
|
31
33
|
*/
|
|
@@ -33,16 +35,24 @@ host[MARKS] = shared;
|
|
|
33
35
|
* Record where the next node is about to be created. The compiler calls this; call it
|
|
34
36
|
* yourself only for a node the compiler cannot see, immediately before the primitive.
|
|
35
37
|
*/
|
|
36
|
-
export function markReactiveSource(file, line, column, name) {
|
|
38
|
+
export function markReactiveSource(file, line, column, name, self) {
|
|
37
39
|
const location = locate(file, line, column);
|
|
38
40
|
// With dependencies marked, `signal()` in the framework marks its own `createSignal` line
|
|
39
41
|
// in between the application's mark and the node it asked for. The call site is the useful
|
|
40
42
|
// location, so a dependency never takes a mark the project has already left unclaimed.
|
|
41
43
|
if (shared.pending && location.external && !shared.pending.location?.external)
|
|
42
44
|
return;
|
|
43
|
-
shared.pending = { name, location };
|
|
45
|
+
shared.pending = self && typeof self === 'object' ? { name, location, self } : { name, location };
|
|
44
46
|
shared.expiring = false;
|
|
45
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Forget the mark. A scope opening is the end of whatever statement left it: an element's
|
|
50
|
+
* props are made in its own scope, and without this they claimed the line of the last class
|
|
51
|
+
* field or effect the same turn happened to run.
|
|
52
|
+
*/
|
|
53
|
+
export function dropReactiveSource() {
|
|
54
|
+
shared.pending = null;
|
|
55
|
+
}
|
|
46
56
|
/**
|
|
47
57
|
* A project file is named relative to the project root, so anything absolute or under
|
|
48
58
|
* node_modules came from a dependency. Derived here rather than sent, so the mark the
|
|
@@ -63,6 +73,15 @@ export function markComponentSource(name, file, line, column) {
|
|
|
63
73
|
if (!seen || seen.file !== file || seen.line !== line)
|
|
64
74
|
shared.components.set(name, null);
|
|
65
75
|
}
|
|
76
|
+
/** Record where a class was declared. The compiler calls this from the class's static block. */
|
|
77
|
+
export function markClassSource(constructor, file, line, column) {
|
|
78
|
+
if (typeof constructor === 'function')
|
|
79
|
+
shared.classes.set(constructor, locate(file, line, column));
|
|
80
|
+
}
|
|
81
|
+
/** Where a class was declared, when the compiler marked it: a custom element's definition. */
|
|
82
|
+
export function classSource(constructor) {
|
|
83
|
+
return typeof constructor === 'function' ? shared.classes.get(constructor) : undefined;
|
|
84
|
+
}
|
|
66
85
|
/** Where a component of this name was declared, when exactly one was. */
|
|
67
86
|
export function componentSource(name) {
|
|
68
87
|
return shared.components.get(name) ?? undefined;
|
|
@@ -79,8 +98,9 @@ export function takeReactiveSource() {
|
|
|
79
98
|
const mark = shared.pending;
|
|
80
99
|
if (mark) {
|
|
81
100
|
// The variable name belongs to the node the author was declaring, not to the ones the
|
|
82
|
-
// framework built underneath it
|
|
83
|
-
|
|
101
|
+
// framework built underneath it: `cart`, then two unnamed signals at the same line.
|
|
102
|
+
// The instance goes with the name: it says whose field this one node is.
|
|
103
|
+
if (mark.name !== undefined || mark.self)
|
|
84
104
|
shared.pending = { location: mark.location };
|
|
85
105
|
if (!shared.expiring) {
|
|
86
106
|
shared.expiring = true;
|
|
@@ -117,8 +137,8 @@ function markHole(accessor, line, column, name) {
|
|
|
117
137
|
}
|
|
118
138
|
}
|
|
119
139
|
// The template is being built, so whatever declaration left a mark is finished with. A
|
|
120
|
-
// mark outlives the statement that set it on purpose
|
|
121
|
-
// inside the call and belong to its line
|
|
140
|
+
// mark outlives the statement that set it on purpose, a store's key signals are made
|
|
141
|
+
// inside the call and belong to its line: but a component body is one long synchronous
|
|
122
142
|
// run, and without this every node the template makes claimed the last signal's position.
|
|
123
143
|
shared.pending = null;
|
|
124
144
|
return accessor;
|
|
@@ -146,6 +166,8 @@ export function installSourceMarker() {
|
|
|
146
166
|
host[MARKER] = markReactiveSource;
|
|
147
167
|
if (typeof host[COMPONENT_MARKER] !== 'function')
|
|
148
168
|
host[COMPONENT_MARKER] = markComponentSource;
|
|
169
|
+
if (typeof host[CLASS_MARKER] !== 'function')
|
|
170
|
+
host[CLASS_MARKER] = markClassSource;
|
|
149
171
|
if (typeof host[HOLE_MARKER] !== 'function')
|
|
150
172
|
host[HOLE_MARKER] = markHole;
|
|
151
173
|
if (typeof host[PROPS_MARKER] !== 'function')
|
package/dist/source.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// src/source.ts
|
|
2
2
|
var MARKER = "__fx_source";
|
|
3
3
|
var COMPONENT_MARKER = "__fx_component";
|
|
4
|
+
var CLASS_MARKER = "__fx_class";
|
|
4
5
|
var HOLE_MARKER = "__fx_hole";
|
|
5
6
|
var PROPS_MARKER = "__fx_props";
|
|
6
7
|
var MARKS = "__FLUIXI_DEVTOOLS_MARKS__";
|
|
@@ -11,12 +12,16 @@ var shared = host[MARKS] ?? {
|
|
|
11
12
|
components: /* @__PURE__ */ new Map()
|
|
12
13
|
};
|
|
13
14
|
host[MARKS] = shared;
|
|
14
|
-
|
|
15
|
+
shared.classes ??= /* @__PURE__ */ new WeakMap();
|
|
16
|
+
function markReactiveSource(file, line, column, name, self) {
|
|
15
17
|
const location = locate(file, line, column);
|
|
16
18
|
if (shared.pending && location.external && !shared.pending.location?.external) return;
|
|
17
|
-
shared.pending = { name, location };
|
|
19
|
+
shared.pending = self && typeof self === "object" ? { name, location, self } : { name, location };
|
|
18
20
|
shared.expiring = false;
|
|
19
21
|
}
|
|
22
|
+
function dropReactiveSource() {
|
|
23
|
+
shared.pending = null;
|
|
24
|
+
}
|
|
20
25
|
function locate(file, line, column) {
|
|
21
26
|
const external = !!file && (/^([a-zA-Z]:)?[\\/]/.test(file) || file.includes("node_modules/"));
|
|
22
27
|
return external ? { file, line, column, external } : { file, line, column };
|
|
@@ -30,13 +35,19 @@ function markComponentSource(name, file, line, column) {
|
|
|
30
35
|
}
|
|
31
36
|
if (!seen || seen.file !== file || seen.line !== line) shared.components.set(name, null);
|
|
32
37
|
}
|
|
38
|
+
function markClassSource(constructor, file, line, column) {
|
|
39
|
+
if (typeof constructor === "function") shared.classes.set(constructor, locate(file, line, column));
|
|
40
|
+
}
|
|
41
|
+
function classSource(constructor) {
|
|
42
|
+
return typeof constructor === "function" ? shared.classes.get(constructor) : void 0;
|
|
43
|
+
}
|
|
33
44
|
function componentSource(name) {
|
|
34
45
|
return shared.components.get(name) ?? void 0;
|
|
35
46
|
}
|
|
36
47
|
function takeReactiveSource() {
|
|
37
48
|
const mark = shared.pending;
|
|
38
49
|
if (mark) {
|
|
39
|
-
if (mark.name !== void 0) shared.pending = { location: mark.location };
|
|
50
|
+
if (mark.name !== void 0 || mark.self) shared.pending = { location: mark.location };
|
|
40
51
|
if (!shared.expiring) {
|
|
41
52
|
shared.expiring = true;
|
|
42
53
|
queueMicrotask(() => {
|
|
@@ -76,13 +87,17 @@ function holeLocation(accessor) {
|
|
|
76
87
|
function installSourceMarker() {
|
|
77
88
|
if (typeof host[MARKER] !== "function") host[MARKER] = markReactiveSource;
|
|
78
89
|
if (typeof host[COMPONENT_MARKER] !== "function") host[COMPONENT_MARKER] = markComponentSource;
|
|
90
|
+
if (typeof host[CLASS_MARKER] !== "function") host[CLASS_MARKER] = markClassSource;
|
|
79
91
|
if (typeof host[HOLE_MARKER] !== "function") host[HOLE_MARKER] = markHole;
|
|
80
92
|
if (typeof host[PROPS_MARKER] !== "function") host[PROPS_MARKER] = markProps;
|
|
81
93
|
}
|
|
82
94
|
export {
|
|
95
|
+
classSource,
|
|
83
96
|
componentSource,
|
|
97
|
+
dropReactiveSource,
|
|
84
98
|
holeLocation,
|
|
85
99
|
installSourceMarker,
|
|
100
|
+
markClassSource,
|
|
86
101
|
markComponentSource,
|
|
87
102
|
markReactiveSource,
|
|
88
103
|
propsLocations,
|