ngx-json-render 0.7.7 → 0.7.8
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/README.md +7 -3
- package/fesm2022/ngx-json-render.mjs +125 -31
- package/fesm2022/ngx-json-render.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngx-json-render.d.ts +31 -13
package/package.json
CHANGED
|
@@ -628,7 +628,16 @@ declare class JrElement {
|
|
|
628
628
|
private readonly repeatScope;
|
|
629
629
|
private readonly parentPath;
|
|
630
630
|
private readonly devtoolsActive;
|
|
631
|
-
/**
|
|
631
|
+
/**
|
|
632
|
+
* The raw (unresolved) element from the spec.
|
|
633
|
+
*
|
|
634
|
+
* Compared by content, not identity. A streamed patch shares every element
|
|
635
|
+
* it did not touch, and the identity check settles those at once; but a
|
|
636
|
+
* spec can also arrive as all-new objects — a whole-spec part, a host that
|
|
637
|
+
* fetches it again, `buildSpecFromParts` replaying a message — and then an
|
|
638
|
+
* element whose content is unchanged would resolve, and every container
|
|
639
|
+
* with a fresh `children` array re-render, for nothing.
|
|
640
|
+
*/
|
|
632
641
|
readonly rawElement: Signal<UIElement<string, Record<string, unknown>> | undefined>;
|
|
633
642
|
/**
|
|
634
643
|
* The state paths this element's expressions can read, or null when the
|
|
@@ -662,21 +671,30 @@ declare class JrElement {
|
|
|
662
671
|
private readonly resolutionCtx;
|
|
663
672
|
protected readonly visible: Signal<boolean>;
|
|
664
673
|
/**
|
|
665
|
-
*
|
|
674
|
+
* How many state writes have touched a path this element is two-way bound
|
|
675
|
+
* to. See {@link resolution} for why those writes count on their own.
|
|
676
|
+
*/
|
|
677
|
+
private readonly boundWrites;
|
|
678
|
+
/**
|
|
679
|
+
* The element with all prop expressions resolved, and the bound writes it
|
|
680
|
+
* was resolved after.
|
|
666
681
|
*
|
|
667
|
-
* Resolving builds a new props object
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
*
|
|
682
|
+
* Resolving builds a new props object every time, so a result that holds
|
|
683
|
+
* the same values as the last one counts as unchanged and keeps the old
|
|
684
|
+
* object; otherwise one keystroke would re-run every catalog template that
|
|
685
|
+
* happened to resolve.
|
|
671
686
|
*
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
*
|
|
675
|
-
*
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
*
|
|
687
|
+
* A write to a path the element is bound to always counts, though. Its
|
|
688
|
+
* component writes the user's input into the DOM before it reaches state,
|
|
689
|
+
* so the DOM can differ from a prop whose value never did: typing and a
|
|
690
|
+
* `clearStatePath` in the same turn take the prop from '' through 'milk'
|
|
691
|
+
* back to '' with nobody reading 'milk'. The README tells catalog authors
|
|
692
|
+
* to sync such inputs with an effect on props, and that effect only gets to
|
|
693
|
+
* put the DOM right if it runs. Writes anywhere else compare by value, like
|
|
694
|
+
* any element's.
|
|
679
695
|
*/
|
|
696
|
+
private readonly resolution;
|
|
697
|
+
/** The element with all prop expressions resolved. */
|
|
680
698
|
readonly resolvedElement: Signal<UIElement<string, Record<string, unknown>> | undefined>;
|
|
681
699
|
/** Two-way binding paths ($bindState / $bindItem) by prop name. */
|
|
682
700
|
readonly bindings: Signal<Record<string, string> | undefined>;
|