ngx-json-render 0.5.1 → 0.6.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-json-render",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "Angular renderer for json-render — stream AI-generated JSON specs into real Angular components with signals.",
5
5
  "keywords": [
6
6
  "angular",
@@ -601,6 +601,34 @@ declare class JrElement {
601
601
  private readonly devtoolsActive;
602
602
  /** The raw (unresolved) element from the spec. */
603
603
  readonly rawElement: Signal<UIElement<string, Record<string, unknown>> | undefined>;
604
+ /**
605
+ * The state paths this element's expressions can read, or null when the
606
+ * spec doesn't say — see {@link collectStateReads} for when that is.
607
+ */
608
+ private readonly stateReads;
609
+ /**
610
+ * One signal per path this element reads, each holding the value at that
611
+ * path. They are rebuilt only when the paths change, and a cell that stays
612
+ * keeps its last value, so a path that didn't change is not a change.
613
+ *
614
+ * A cell compares like a resolved prop does: primitives by value, objects
615
+ * by reference with the internal store (which copies every path it writes)
616
+ * and never equal with an external `store`, which may write into its
617
+ * snapshot in place.
618
+ */
619
+ private readonly stateCells;
620
+ /**
621
+ * How many times {@link readableState} has taken a snapshot. The dev-mode
622
+ * check compares it between state writes to tell which ones were skipped.
623
+ */
624
+ private snapshotsTaken;
625
+ /**
626
+ * The state to resolve against: the whole snapshot, but only as fresh as
627
+ * the paths this element reads. A write elsewhere doesn't reach it, so the
628
+ * element doesn't resolve anything for it. An element whose reads are
629
+ * unknown follows every write, as all elements did before.
630
+ */
631
+ private readonly readableState;
604
632
  /** Prop/visibility resolution context (state + repeat scope + extensions). */
605
633
  private readonly resolutionCtx;
606
634
  protected readonly visible: Signal<boolean>;
@@ -646,6 +674,14 @@ declare class JrElement {
646
674
  private readonly renderCtx;
647
675
  protected readonly outletInjector: _angular_core.DestroyableInjector;
648
676
  constructor();
677
+ /**
678
+ * Resolve this element against the whole current state and warn, once per
679
+ * element key, when that differs from what it shows after skipping a write.
680
+ *
681
+ * It only reports, and leaves the element as it is: correcting it here would
682
+ * make dev mode render what production doesn't.
683
+ */
684
+ private checkSkippedWrite;
649
685
  /**
650
686
  * Resolution context with a live state snapshot, so `$state` references in
651
687
  * later actions of a chain see mutations from earlier ones.