@symbiotejs/symbiote 3.10.1 → 3.10.2

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.
@@ -2,7 +2,7 @@
2
2
  * querySelectorAll scoped to own elements only.
3
3
  * During ssrMode hydration, `fr` is the component itself (an HTMLElement).
4
4
  * querySelectorAll matches ALL descendants, including those inside child components.
5
- * This helper excludes elements whose closest custom-element ancestor is not `fr`.
5
+ * Nested custom elements own their contents, except explicitly non-parsing hosts that delegate to `fr`.
6
6
  * @param {Element | DocumentFragment} fr
7
7
  * @param {string} selector
8
8
  * @returns {Element[]}
@@ -12,7 +12,7 @@ export function ownElements(fr, selector) {
12
12
  return all.filter((el) => {
13
13
  let parent = el.parentElement;
14
14
  while (parent && parent !== fr) {
15
- if (parent.localName?.includes('-')) return false;
15
+ if (parent.localName?.includes('-') && parent.getAttribute('process-inner-html') !== 'false') return false;
16
16
  parent = parent.parentElement;
17
17
  }
18
18
  return true;
@@ -28,7 +28,7 @@ export function ownElements(fr, selector) {
28
28
  export function isOwnNode(node, root) {
29
29
  let parent = node.parentElement;
30
30
  while (parent && parent !== root) {
31
- if (parent.localName?.includes('-')) return false;
31
+ if (parent.localName?.includes('-') && parent.getAttribute('process-inner-html') !== 'false') return false;
32
32
  parent = parent.parentElement;
33
33
  }
34
34
  return true;
@@ -182,6 +182,9 @@ function domBindProcessor(fr, fnCtx) {
182
182
  el[DICT.SET_LATER_KEY] = Object.create(null);
183
183
  }
184
184
  el[DICT.SET_LATER_KEY][prop] = val;
185
+ } else {
186
+ // A newly upgraded child must not replay an older queued assignment.
187
+ delete el[DICT.SET_LATER_KEY]?.[prop];
185
188
  }
186
189
  }
187
190
  }, !skipInit);
@@ -70,7 +70,7 @@ Use Send tasks in JSON requests with an HTTP endpoint that accepts the configure
70
70
  - `sym-context` without `ctx` owns local state. With `ctx="APP"`, its local data and `APP/property` refer to the same native PubSub context. Named contexts need unique owners; an existing store is never overwritten.
71
71
  - `bind="$: APP/contact"` uses native shallow merging: supplied fields update, missing fields are registered, and omitted fields remain. It does not replace the local state proxy or publish changes back automatically.
72
72
  - Optional `pub-to="APP/contact"` publishes a fresh data object after an owned field changes. Incoming merges do not echo. The target must already exist in another context. Use native bindings for incoming state and explicit outgoing publication for edits.
73
- - `process-inner-html="false"` disables an owner's inner binding parsing. Nested foundation elements still own and process their contents. The default is `true`.
73
+ - `process-inner-html="false"` disables an owner's inner binding parsing. An enclosing template can still bind through this explicitly non-parsing layout, without a second parsing pass. Other nested foundation elements own and process their contents. The default is `true`.
74
74
  - Removal releases subscriptions and owned named contexts after the native destruction delay. A move retains state; reconnecting a destroyed instance restores its authored markup and latest data.
75
75
  - JSON keys are data-only local properties. Context prefixes and prototype-related keys are rejected. Only trusted templates and binding declarations belong in authored HTML.
76
76
 
@@ -76,7 +76,7 @@ export class SymConditional extends BaseClass {
76
76
  dataReference(this, reference, true);
77
77
  this.#reference = reference;
78
78
  this.updateContent();
79
- this.#subscription = this.sub(reference, () => this.updateContent(), false);
79
+ this.#subscription = this.sub(reference, () => this.updateContent());
80
80
  }
81
81
 
82
82
  updateContent() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@symbiotejs/symbiote",
4
- "version": "3.10.1",
4
+ "version": "3.10.2",
5
5
  "description": "Symbiote.js - zero-dependency close-to-platform frontend library to build super-powered web components",
6
6
  "author": "team@rnd-pro.com",
7
7
  "license": "MIT",
@@ -1 +1 @@
1
- {"version":3,"file":"tpl-processors.d.ts","sourceRoot":"","sources":["../../core/tpl-processors.js"],"names":[],"mappings":";0BA8NgD,CAAC,SAApC,qCAAkC,MACpC,gBAAgB,SAChB,CAAC;;;UAlNE,MAAM;SACN,MAAM;QACN,OAAO;gBACP,MAAM;;;iCAba,uBAAuB"}
1
+ {"version":3,"file":"tpl-processors.d.ts","sourceRoot":"","sources":["../../core/tpl-processors.js"],"names":[],"mappings":";0BAiOgD,CAAC,SAApC,qCAAkC,MACpC,gBAAgB,SAChB,CAAC;;;UArNE,MAAM;SACN,MAAM;QACN,OAAO;gBACP,MAAM;;;iCAba,uBAAuB"}
@@ -1 +1 @@
1
- {"version":3,"file":"setNestedProp.d.ts","sourceRoot":"","sources":["../../utils/setNestedProp.js"],"names":[],"mappings":"AAKA,sCAJW,GAAG,uBAEH,GAAG,WAoBb"}
1
+ {"version":3,"file":"setNestedProp.d.ts","sourceRoot":"","sources":["../../utils/setNestedProp.js"],"names":[],"mappings":"AAKA,sCAJW,GAAG,uBAEH,GAAG,WA4Bb"}
@@ -8,6 +8,14 @@ export function setNestedProp(parent, path, value) {
8
8
  /** @type {String} */
9
9
  let lastStep;
10
10
  let propPath = path.split('.');
11
+ // Register incoming child fields before its deferred connection initializes defaults.
12
+ if (propPath.length === 2 && propPath[0] === '$' && typeof parent?.add$ === 'function'
13
+ && !parent.connectedOnce) {
14
+ parent.$ = {
15
+ [propPath[1]]: value,
16
+ };
17
+ return true;
18
+ }
11
19
  propPath.forEach((step, idx) => {
12
20
  if (idx < propPath.length - 1) {
13
21
  parent = parent[step];