@jqhtml/core 2.3.72 → 2.3.74

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.js CHANGED
@@ -1613,7 +1613,7 @@ function serialize_for_cache_key(value) {
1613
1613
  const class_registry = Object.create(null);
1614
1614
  // Markers for serialized class instances (unique to avoid collisions with user data)
1615
1615
  // Replaced at build time by rollup (see rollup.config.js).
1616
- const CORE_VERSION = '2.3.72';
1616
+ const CORE_VERSION = '2.3.74';
1617
1617
  const CLASS_MARKER = '__jqhtml_class__';
1618
1618
  const PROPS_MARKER = '__jqhtml_props__';
1619
1619
  /**
@@ -5672,15 +5672,20 @@ class Jqhtml_Component {
5672
5672
  // DOM attachment state machine
5673
5673
  // -------------------------------------------------------------------------
5674
5674
  /**
5675
- * Whether this component currently considers itself attached to the document.
5675
+ * Whether this component's root is in the document right now.
5676
5676
  *
5677
- * This is the component's recorded state, not a live isConnected read: it is
5678
- * false until the first check after 'ready', and from then on flips only when a
5679
- * transition is observed (or on stop()). It is exactly the state 'attach' and
5680
- * 'detach' have reported.
5677
+ * A live answer - one isConnected read - so it is correct at every point in the
5678
+ * lifecycle (including on_create()/on_load()/on_ready(), before the first 'attach')
5679
+ * and for untracked components (a natively-removed component that nothing watches
5680
+ * still answers false). A stopped component always answers false.
5681
+ *
5682
+ * It does NOT read the recorded state behind 'attach'/'detach' (_attached), and it
5683
+ * never starts tracking. The two can disagree briefly: is_attached() can be true
5684
+ * before the first 'attach' has fired, and changes a moment before the matching
5685
+ * event, since the events come from the document observer.
5681
5686
  */
5682
5687
  is_attached() {
5683
- return this._attached;
5688
+ return !this._stopped && !!this.$[0].isConnected;
5684
5689
  }
5685
5690
  /**
5686
5691
  * Flip the recorded state and fire the matching hook + event. The opposite
@@ -7516,7 +7521,7 @@ function init(jQuery, config) {
7516
7521
  }
7517
7522
  }
7518
7523
  // Version - will be replaced during build with actual version from package.json
7519
- const version = '2.3.72';
7524
+ const version = '2.3.74';
7520
7525
  // Default export with all functionality
7521
7526
  const jqhtml = {
7522
7527
  // Core