@webqit/oohtml 4.3.2 → 4.3.4

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/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "wicg-proposal"
15
15
  ],
16
16
  "homepage": "https://webqit.io/tooling/oohtml",
17
- "version": "4.3.2",
17
+ "version": "4.3.4",
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@webqit/quantum-js": "^4.5.11",
43
- "@webqit/realdom": "^2.1.31",
43
+ "@webqit/realdom": "^2.1.32",
44
44
  "@webqit/util": "^0.8.11"
45
45
  },
46
46
  "devDependencies": {
@@ -63,7 +63,6 @@ export default function() {
63
63
  } );
64
64
  }, { live: true, timing: 'sync', lifecycleSignals: true } );
65
65
  priv.autoDestroyRealtime = realdom.realtime( window.document ).track( parentNode, () => {
66
- this.state = null;
67
66
  priv.die();
68
67
  }, { subtree: 'cross-roots', timing: 'sync', generation: 'exits' } );
69
68
  };
@@ -98,8 +97,9 @@ export default function() {
98
97
  const restore = () => {
99
98
  if (this.el.isConnected) return;
100
99
  this.el.setAttribute( 'data-nodecount', 0 );
101
- this.state = 'restored';
100
+ priv.internalMutation = true;
102
101
  priv.anchorNode.replaceWith( this.el );
102
+ priv.internalMutation = false;
103
103
  priv.setAnchorNode( null );
104
104
  };
105
105
  if ( !priv.slottedElements.size ) return restore();
@@ -119,12 +119,12 @@ export default function() {
119
119
  };
120
120
 
121
121
  priv.connectedCallback = () => {
122
- if ( this.state === 'restored' ) return;
122
+ if ( priv.internalMutation ) return;
123
123
  priv.live( fragments => this.fill( fragments ) );
124
124
  };
125
125
 
126
126
  priv.disconnectedCallback = () => {
127
- if ( this.state === 'resolved' ) return;
127
+ if ( priv.internalMutation ) return;
128
128
  priv.die();
129
129
  };
130
130
  }
@@ -175,8 +175,9 @@ export default function() {
175
175
  // not the import element itslef - but all only when we have slottableElements.size
176
176
  if ( slottableElements.size && this.el.isConnected ) {
177
177
  const newAnchorNode = this[ '#' ].setAnchorNode( this.createAnchorNode() );
178
- this.state = 'resolved';
178
+ this[ '#' ].internalMutation = true;
179
179
  this.el.replaceWith( newAnchorNode );
180
+ this[ '#' ].internalMutation = false;
180
181
  }
181
182
  // Insert slottables now
182
183
  slottableElements.forEach( slottableElement => {
@@ -162,7 +162,7 @@ function realtime(config) {
162
162
  detachImportsContext(entry);
163
163
  }
164
164
  });
165
- }, { id: 'imports:template/importscontext', live: true, subtree: 'cross-roots', timing: 'sync', staticSensitivity: true, recursiveOk: true, eventDetails: true });
165
+ }, { id: 'imports:template/importscontext', live: true, subtree: 'cross-roots', timing: 'sync', staticSensitivity: true, eventDetails: true });
166
166
 
167
167
  // ------------
168
168
  // IMPORTS
@@ -170,7 +170,7 @@ function realtime(config) {
170
170
  realdom.realtime(window.document).query(config.elements.import, record => {
171
171
  record.entrants.forEach(node => handleRealtime(node, true, record));
172
172
  record.exits.forEach(node => handleRealtime(node, false, record));
173
- }, { id: 'imports:import', live: true, subtree: 'cross-roots', timing: 'sync', recursiveOk: true });
173
+ }, { id: 'imports:import', live: true, subtree: 'cross-roots', timing: 'sync', deferred: true });
174
174
  function handleRealtime(entry, connectedState) {
175
175
  const elInstance = HTMLImportElement.instance(entry);
176
176
  if (connectedState) { elInstance['#'].connectedCallback(); }
@@ -193,5 +193,5 @@ function realtime(config) {
193
193
  }
194
194
  HTMLImportElement.instance(importEl)['#'].hydrate(anchorNode, slottedElements);
195
195
  });
196
- }, { id: 'imports:hydration', live: true, subtree: 'cross-roots', timing: 'sync', recursiveOk: true });
196
+ }, { id: 'imports:hydration', live: true, subtree: 'cross-roots', timing: 'sync' });
197
197
  }
@@ -341,7 +341,6 @@ function realtime( config ) {
341
341
  }, { id: 'namespace-html:namespace', live: true, subtree: 'cross-roots', timing: 'sync', staticSensitivity: true, eventDetails: true } );
342
342
 
343
343
  // DOM realtime
344
- // ISSUE implied elements that are direct chidren of shadow roots not caught. Maybe try testing with params.recursiveOk to see.
345
344
  realdom.realtime( window.document ).query( `[${ attrList.map( attrName => window.CSS.escape( attrName ) ).join( '],[' ) }]`, record => {
346
345
  // We do some caching to prevent redundanct lookups
347
346
  const namespaceNodesToTest = { forID: new Map, forOther: new Map, };