@gemx-dev/heatmap-react 3.5.92-dev.36 → 3.5.92-dev.37

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.
@@ -4,20 +4,31 @@ export type DomNode = {
4
4
  parent: number;
5
5
  tag?: string;
6
6
  };
7
+ export interface ShadowNodeIds {
8
+ /** IDs of shadow container nodes (*S / *P) and all their descendants */
9
+ subtreeIds: Set<number>;
10
+ /** IDs of elements that directly host a shadow root (direct parents of *S/*P nodes) */
11
+ hostIds: Set<number>;
12
+ }
7
13
  export declare function isShadowDomNode(tag: string | undefined): boolean;
8
- /** Scan the rendered DOM (including nested shadow roots) to collect tag names of shadow host elements. */
9
- export declare function collectShadowHostTags(root: Document | ShadowRoot, tags?: Set<string>): Set<string>;
10
- /** Build a shadow subtree ID set from all DOM events.
11
- * Two-pass cascade to handle any event ordering:
12
- * Pass 1seed *S/*P node IDs.
13
- * Pass 2 — cascade: any node whose parent is in the set is also in the set (repeat until stable). */
14
- export declare function buildShadowSubtreeIds(allDomEvents: Array<{
15
- data: unknown;
16
- }>): Set<number>;
17
- export declare function filterShadowNodes(data: DomNode[], subtreeIds: Set<number>, shadowHostTags: Set<string>): DomNode[];
18
- /** Extract shadow DOM nodes from merged.dom (initial Discover event, processed by setup()).
19
- * Returns a filtered copy of the dom event, or null if no shadow DOM present. */
20
- export declare function extractSpecialDom(dom: MergedPayload['dom'], events: MergedPayload['events'], shadowHostTags: Set<string>): MergedPayload['dom'] | null;
21
- /** Extract shadow DOM mutations + StyleSheet + CustomElement events from merged.events. */
22
- export declare function extractSpecialEvents(events: MergedPayload['events'], dom: MergedPayload['dom'], shadowHostTags: Set<string>): MergedPayload['events'];
14
+ /**
15
+ * Two-step collection of all shadow-related node IDs across dom + mutation events.
16
+ *
17
+ * Step 1 — scan dom + all mutations to find *S/*P nodes and their direct host parents.
18
+ * Step 2 cascade: any node whose parent is already in subtreeIds is also included.
19
+ *
20
+ * Using IDs (not tag names) makes host detection precise and avoids false positives
21
+ * from elements that share a tag name with a shadow host but aren't one.
22
+ */
23
+ export declare function collectShadowNodeIds(dom: MergedPayload['dom'], events: MergedPayload['events']): ShadowNodeIds;
24
+ /**
25
+ * Extract shadow DOM nodes from merged.dom (initial Discover event).
26
+ * Includes both shadow host elements (hostIds) and shadow subtree nodes (subtreeIds).
27
+ */
28
+ export declare function extractSpecialDom(dom: MergedPayload['dom'], ids: ShadowNodeIds): MergedPayload['dom'] | null;
29
+ /**
30
+ * Extract shadow DOM mutations + StyleSheet + CustomElement events from merged.events.
31
+ * Mutation events are filtered to only include shadow-related nodes.
32
+ */
33
+ export declare function extractSpecialEvents(events: MergedPayload['events'], ids: ShadowNodeIds): MergedPayload['events'];
23
34
  //# sourceMappingURL=extractor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../../src/libs/visualizer/shadow-dom/extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C,MAAM,MAAM,OAAO,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEhE;AAED,0GAA0G;AAC1G,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,EAAE,IAAI,GAAE,GAAG,CAAC,MAAM,CAAa,GAAG,GAAG,CAAC,MAAM,CAAC,CAQ7G;AAED;;;sGAGsG;AACtG,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAsBzF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,UAAU,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G,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,IAAI,CAG5G;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,aAAa,GAAG,aAAa,CAAC,QAAQ,CAAC,CAsBjH"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gemx-dev/heatmap-react",
3
3
  "author": "gemx-dev",
4
- "version": "3.5.92-dev.36",
4
+ "version": "3.5.92-dev.37",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
7
7
  "*.css"