@but212/atom-effect-jquery 0.9.2 → 0.10.1

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/index.d.ts CHANGED
@@ -33,48 +33,22 @@ export declare interface BindingOptions<T> {
33
33
  /**
34
34
  * Binding Registry
35
35
  *
36
- * Solving Circular Reference Issues:
37
- * - Prevents Atom -> Subscription -> Callback -> DOM Element cycle.
38
- * - Uses WeakMap to track effects and cleanup functions per DOM element.
39
- * - Automatically unsubscribes when DOM elements are removed via MutationObserver.
40
- *
41
- * Preventing Memory Leaks:
42
- * - Must call unsubscribe() when DOM is removed.
43
- * - Recursively cleans up child nodes.
36
+ * Highly optimized for performance:
37
+ * - Uses WeakMap for zero-leak DOM associations.
38
+ * - Minimal allocations in the tracking path.
39
+ * - Efficient tree traversal for cleanup.
44
40
  */
45
41
  declare class BindingRegistry {
46
42
  private effects;
47
43
  private cleanups;
48
44
  private boundElements;
49
- /**
50
- * Tracks elements that are temporarily detached (e.g. via .detach())
51
- * so they are NOT cleaned up by the MutationObserver.
52
- */
53
45
  private preservedNodes;
54
46
  keep(node: Node): void;
55
47
  isKept(node: Node): boolean;
56
- /**
57
- * Registers an Effect to be disposed later.
58
- */
59
48
  trackEffect(el: Element, fx: EffectObject): void;
60
- /**
61
- * Registers a custom cleanup function (e.g., event listener removal).
62
- */
63
49
  trackCleanup(el: Element, fn: () => void): void;
64
- /**
65
- * Checks if an element has bindings (Fast check).
66
- */
67
50
  hasBind(el: Element): boolean;
68
- /**
69
- * Cleans up a single element.
70
- * - Disposes all Effects (severs connection with Atom).
71
- * - Executes all custom cleanups.
72
- */
73
51
  cleanup(el: Element): void;
74
- /**
75
- * Cleans up the element and all its descendants (Recursive).
76
- * - Essential for deep removal (empty(), remove(), etc.).
77
- */
78
52
  cleanupTree(el: Element): void;
79
53
  }
80
54