ngx-json-render 0.7.3 → 0.7.5

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.7.3",
3
+ "version": "0.7.5",
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",
@@ -22,8 +22,8 @@
22
22
  "url": "https://github.com/shteynu/ngx-json-render/issues"
23
23
  },
24
24
  "peerDependencies": {
25
- "@angular/common": ">=20.0.0",
26
- "@angular/core": ">=20.0.0",
25
+ "@angular/common": ">=19.0.0",
26
+ "@angular/core": ">=19.0.0",
27
27
  "@json-render/core": ">=0.20.0 <0.22.0",
28
28
  "zod": "^4.0.0"
29
29
  },
@@ -2,7 +2,7 @@ import * as _json_render_core from '@json-render/core';
2
2
  import { ResolvedAction, ActionHandler, ActionBinding, SpecIssue, Spec, Catalog, InferCatalogActions, InferActionParams, StateModel, InferCatalogComponents, UIElement, StateStore, ValidationFunction, ComputedFunction, DirectiveDefinition, ActionConfirm, DirectiveRegistry, ValidationResult, ValidationConfig, JsonPatch, FlatElement } from '@json-render/core';
3
3
  export { ActionBinding, ActionHandler, JsonPatch, Spec, SpecIssue, StateModel, StateStore, UIElement, VisibilityCondition, autoFixSpec, createStateStore, formatSpecIssues, nestedToFlat, validateSpec } from '@json-render/core';
4
4
  import * as _angular_core from '@angular/core';
5
- import { Signal, Type, InjectionToken } from '@angular/core';
5
+ import { Signal, Type, Injector, InjectionToken } from '@angular/core';
6
6
  import * as ngx_json_render from 'ngx-json-render';
7
7
 
8
8
  interface PendingConfirmation {
@@ -42,6 +42,12 @@ declare class JsonRenderActionsService {
42
42
  confirm(): void;
43
43
  /** Cancel the pending confirmation dialog. */
44
44
  cancel(): void;
45
+ /**
46
+ * Close `pending` and run `settle`, but only while it is still the open
47
+ * question: a late answer to one that was replaced must not close its
48
+ * successor.
49
+ */
50
+ private answer;
45
51
  /**
46
52
  * Validate every registered field and write `{ valid, errors }` to the
47
53
  * action's `statePath` (default `/formValidation`). Returns null when there
@@ -375,6 +381,10 @@ declare class JsonRenderStateService {
375
381
  private readonly root;
376
382
  private readonly internalStore;
377
383
  private readonly changeListeners;
384
+ /** The snapshot the change listeners last heard about. */
385
+ private lastSnapshot;
386
+ /** True while this service writes, so the store's echo is not reported. */
387
+ private writing;
378
388
  private readonly _state;
379
389
  /** The current state model as a signal. */
380
390
  readonly state: Signal<StateModel>;
@@ -390,10 +400,12 @@ declare class JsonRenderStateService {
390
400
  getSnapshot(): StateModel;
391
401
  /**
392
402
  * Register a listener called with the list of changed paths whenever state
393
- * is written through this service (element `watch` fields rely on this).
394
- * Returns an unsubscribe function.
403
+ * is written through this service, or, in controlled mode, whenever the
404
+ * external store changes (element `watch` fields rely on this). Returns an
405
+ * unsubscribe function.
395
406
  */
396
407
  subscribeChanges(listener: (changes: StateChange[]) => void): () => void;
408
+ private write;
397
409
  private notifyChanges;
398
410
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<JsonRenderStateService, never>;
399
411
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<JsonRenderStateService>;
@@ -547,7 +559,7 @@ declare class JsonRenderer {
547
559
  * one token wide instead of a component contract the renderer would have to
548
560
  * bind to.
549
561
  */
550
- protected readonly confirmInjector: _angular_core.Signal<_angular_core.DestroyableInjector | null>;
562
+ protected readonly confirmInjector: _angular_core.Signal<Injector | null>;
551
563
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<JsonRenderer, never>;
552
564
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<JsonRenderer, "json-render", never, { "spec": { "alias": "spec"; "required": true; "isSignal": true; }; "registry": { "alias": "registry"; "required": true; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "fallback": { "alias": "fallback"; "required": false; "isSignal": true; }; "validate": { "alias": "validate"; "required": false; "isSignal": true; }; "renderLimits": { "alias": "renderLimits"; "required": false; "isSignal": true; }; "catalog": { "alias": "catalog"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "store": { "alias": "store"; "required": false; "isSignal": true; }; "handlers": { "alias": "handlers"; "required": false; "isSignal": true; }; "onAction": { "alias": "onAction"; "required": false; "isSignal": true; }; "navigate": { "alias": "navigate"; "required": false; "isSignal": true; }; "validationFunctions": { "alias": "validationFunctions"; "required": false; "isSignal": true; }; "functions": { "alias": "functions"; "required": false; "isSignal": true; }; "directives": { "alias": "directives"; "required": false; "isSignal": true; }; }, { "stateChange": "stateChange"; }, never, never, true, never>;
553
565
  }
@@ -689,7 +701,7 @@ declare class JrElement {
689
701
  */
690
702
  protected readonly refusal: Signal<"cycle" | "depth" | null>;
691
703
  private readonly renderCtx;
692
- protected readonly outletInjector: _angular_core.DestroyableInjector;
704
+ protected readonly outletInjector: Injector;
693
705
  constructor();
694
706
  /**
695
707
  * Resolve this element against the whole current state and warn, once per