@fluixi/devtools 0.2.0-alpha.5 → 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.
Files changed (50) hide show
  1. package/dist/callsite.cjs +9 -0
  2. package/dist/callsite.d.ts.map +1 -1
  3. package/dist/callsite.js +9 -0
  4. package/dist/callsite.mjs +9 -0
  5. package/dist/export.cjs +1 -0
  6. package/dist/export.mjs +1 -0
  7. package/dist/graph-view.cjs +12 -3
  8. package/dist/graph-view.d.ts.map +1 -1
  9. package/dist/graph-view.js +11 -2
  10. package/dist/graph-view.mjs +12 -3
  11. package/dist/hook.cjs +158 -19
  12. package/dist/hook.mjs +158 -19
  13. package/dist/index.cjs +184 -27
  14. package/dist/index.mjs +184 -27
  15. package/dist/inspector.cjs +6 -2
  16. package/dist/inspector.js +1 -1
  17. package/dist/inspector.mjs +6 -2
  18. package/dist/instrument.cjs +9 -3
  19. package/dist/instrument.d.ts +16 -1
  20. package/dist/instrument.d.ts.map +1 -1
  21. package/dist/instrument.mjs +9 -3
  22. package/dist/kind-filter.cjs +5 -2
  23. package/dist/kind-filter.js +3 -3
  24. package/dist/kind-filter.mjs +5 -2
  25. package/dist/observe.cjs +157 -19
  26. package/dist/observe.d.ts.map +1 -1
  27. package/dist/observe.js +165 -16
  28. package/dist/observe.mjs +157 -19
  29. package/dist/palette.cjs +4 -1
  30. package/dist/palette.d.ts.map +1 -1
  31. package/dist/palette.js +3 -0
  32. package/dist/palette.mjs +4 -1
  33. package/dist/plugins/index.cjs +1 -1
  34. package/dist/plugins/index.mjs +1 -1
  35. package/dist/source.cjs +18 -3
  36. package/dist/source.d.ts +16 -1
  37. package/dist/source.d.ts.map +1 -1
  38. package/dist/source.js +25 -3
  39. package/dist/source.mjs +18 -3
  40. package/dist/tree.cjs +19 -4
  41. package/dist/tree.d.ts.map +1 -1
  42. package/dist/tree.js +21 -2
  43. package/dist/tree.mjs +19 -4
  44. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  45. package/dist/wire.cjs +3 -1
  46. package/dist/wire.d.ts +2 -0
  47. package/dist/wire.d.ts.map +1 -1
  48. package/dist/wire.js +2 -0
  49. package/dist/wire.mjs +3 -1
  50. package/package.json +2 -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
- function markReactiveSource(file, line, column, name) {
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
- ...site && site.external && !mark?.location ? { source: mapped(site.location) } : {}
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
- removed.push({ id, rev: ++revision });
1072
- revs.delete(id);
1073
- if (removed.length > REMOVED_LOG) removed.splice(0, removed.length - REMOVED_LOG);
1074
- history.disposed(id, graph.get(id)?.label);
1075
- graph.delete(id);
1076
- handed.delete(id);
1077
- raws.delete(id);
1078
- cores.delete(id);
1079
- rendered.delete(id);
1080
- setters.delete(id);
1081
- runsAtLastSample.delete(id);
1082
- unnamed.delete(id);
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]})`;
@@ -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,CAiBnD,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"}
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]})`;
@@ -1,4 +1,4 @@
1
- /*! @fluixi/devtools v0.2.0-alpha.5 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
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;
@@ -1,4 +1,4 @@
1
- /*! @fluixi/devtools v0.2.0-alpha.5 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/devtools v0.2.0-alpha.6 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
 
3
3
  // src/plugin.ts
4
4
  var plugins = [];
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
- function markReactiveSource(file, line, column, name) {
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
@@ -37,6 +37,11 @@ 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.
@@ -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
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../src/source.ts"],"names":[],"m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C,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,6 +22,7 @@ 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
  *
@@ -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;
@@ -80,7 +99,8 @@ export function takeReactiveSource() {
80
99
  if (mark) {
81
100
  // The variable name belongs to the node the author was declaring, not to the ones the
82
101
  // framework built underneath it: `cart`, then two unnamed signals at the same line.
83
- if (mark.name !== undefined)
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;
@@ -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
- function markReactiveSource(file, line, column, name) {
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,
package/dist/tree.cjs CHANGED
@@ -70,7 +70,10 @@ var KIND_COLOR = {
70
70
  binding: "#5eead4",
71
71
  setter: "#fb7185",
72
72
  group: "#8a90a2",
73
- element: "#8a90a2"
73
+ element: "#8a90a2",
74
+ "custom-element": "#2dd4bf",
75
+ module: "#facc15",
76
+ service: "#60a5fa"
74
77
  };
75
78
  var kindVar = (kind) => `--fx-kind-${kind}`;
76
79
  var kindColor = (kind) => `var(${kindVar(kind)}, ${KIND_COLOR[kind]})`;
@@ -92,7 +95,11 @@ var TREE_KINDS = /* @__PURE__ */ new Set([
92
95
  "handler",
93
96
  // A component a plugin recognised as providing a context. Still a tag the author wrote,
94
97
  // so leaving it out took it and everything it rendered out of the tree.
95
- "provider"
98
+ "provider",
99
+ // Scopes the runtime reported: what their signals and memos belong to.
100
+ "custom-element",
101
+ "module",
102
+ "service"
96
103
  ]);
97
104
  function inPageOrder(nodes) {
98
105
  const slots = [];
@@ -115,7 +122,8 @@ function badgeOf(node) {
115
122
  return badges.get(node);
116
123
  }
117
124
  function componentTree(graph, options = {}) {
118
- const wanted = (node) => TREE_KINDS.has(node.kind) || options.values === true && node.authored !== false;
125
+ const held = (node) => node.scope !== void 0 && (node.kind === "state" || node.kind === "memo" || node.kind === "store");
126
+ const wanted = (node) => TREE_KINDS.has(node.kind) || options.values === true && (node.authored !== false || held(node));
119
127
  const tagged = inPageOrder([...graph.values()].filter(wanted).sort((a, b) => a.id - b.id));
120
128
  const made = /* @__PURE__ */ new Map();
121
129
  for (const node of tagged) {
@@ -322,7 +330,8 @@ function createComponentTree(host, options = {}) {
322
330
  const props = listed.length ? [{ key: group, label: "props", kind: node.kind, children: listed, props: true, owner: node.id }] : [];
323
331
  const row2 = {
324
332
  key: String(node.id),
325
- label: node.label,
333
+ // `<fx-counter>` in the graph, where nothing else draws brackets. Here the row adds them.
334
+ label: node.kind === "custom-element" ? node.label.replace(/^<(.*)>$/, "$1") : node.label,
326
335
  kind: node.kind,
327
336
  id: node.id,
328
337
  children: [...props, ...node.children.map(build)],
@@ -441,6 +450,12 @@ function createComponentTree(host, options = {}) {
441
450
  };
442
451
  }
443
452
  const rendered = dom.map((node, i) => walk(node, `${row2.id}:${i}`)).filter((node) => node !== void 0);
453
+ const self = rendered[0];
454
+ if (row2.kind === "custom-element" && rendered.length === 1 && self?.kind === "element") {
455
+ rendered.splice(0, 1, ...self.children);
456
+ if (self.element) row2.element = self.element;
457
+ if (self.at) row2.at = self.at;
458
+ }
444
459
  const rest = row2.children.filter((child) => !placed.has(child)).map(expand);
445
460
  const lifted = [];
446
461
  const spare = [];
@@ -1 +1 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,O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