@momentumcms/admin 0.4.1 → 0.5.1

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.
Files changed (24) hide show
  1. package/fesm2022/{momentumcms-admin-array-field.component-CLV4Ny9t.mjs → momentumcms-admin-array-field.component-pqA3_nC8.mjs} +5 -5
  2. package/fesm2022/{momentumcms-admin-array-field.component-CLV4Ny9t.mjs.map → momentumcms-admin-array-field.component-pqA3_nC8.mjs.map} +1 -1
  3. package/fesm2022/{momentumcms-admin-blocks-field.component-hHiTfUf9.mjs → momentumcms-admin-blocks-field.component-88TEhVm4.mjs} +5 -5
  4. package/fesm2022/{momentumcms-admin-blocks-field.component-hHiTfUf9.mjs.map → momentumcms-admin-blocks-field.component-88TEhVm4.mjs.map} +1 -1
  5. package/fesm2022/{momentumcms-admin-collapsible-field.component-BeskwGvi.mjs → momentumcms-admin-collapsible-field.component-D5Jc8h2Q.mjs} +5 -5
  6. package/fesm2022/{momentumcms-admin-collapsible-field.component-BeskwGvi.mjs.map → momentumcms-admin-collapsible-field.component-D5Jc8h2Q.mjs.map} +1 -1
  7. package/fesm2022/{momentumcms-admin-global-edit.page-D_ebIITz.mjs → momentumcms-admin-global-edit.page-D4QNE5AM.mjs} +5 -5
  8. package/fesm2022/{momentumcms-admin-global-edit.page-D_ebIITz.mjs.map → momentumcms-admin-global-edit.page-D4QNE5AM.mjs.map} +1 -1
  9. package/fesm2022/{momentumcms-admin-group-field.component-ffsgbC6o.mjs → momentumcms-admin-group-field.component-Cenc5zMW.mjs} +5 -5
  10. package/fesm2022/{momentumcms-admin-group-field.component-ffsgbC6o.mjs.map → momentumcms-admin-group-field.component-Cenc5zMW.mjs.map} +1 -1
  11. package/fesm2022/{momentumcms-admin-momentumcms-admin-De5FLr2L.mjs → momentumcms-admin-momentumcms-admin-5WigESOC.mjs} +262 -185
  12. package/fesm2022/momentumcms-admin-momentumcms-admin-5WigESOC.mjs.map +1 -0
  13. package/fesm2022/{momentumcms-admin-relationship-field.component-DO0kyAkE.mjs → momentumcms-admin-relationship-field.component-DlCdpcRy.mjs} +5 -5
  14. package/fesm2022/{momentumcms-admin-relationship-field.component-DO0kyAkE.mjs.map → momentumcms-admin-relationship-field.component-DlCdpcRy.mjs.map} +1 -1
  15. package/fesm2022/{momentumcms-admin-rich-text-field.component-BvpufJs3.mjs → momentumcms-admin-rich-text-field.component-BUziCgyn.mjs} +5 -5
  16. package/fesm2022/{momentumcms-admin-rich-text-field.component-BvpufJs3.mjs.map → momentumcms-admin-rich-text-field.component-BUziCgyn.mjs.map} +1 -1
  17. package/fesm2022/{momentumcms-admin-row-field.component-C8ZsdA2w.mjs → momentumcms-admin-row-field.component-fFTcYU-P.mjs} +5 -5
  18. package/fesm2022/{momentumcms-admin-row-field.component-C8ZsdA2w.mjs.map → momentumcms-admin-row-field.component-fFTcYU-P.mjs.map} +1 -1
  19. package/fesm2022/{momentumcms-admin-tabs-field.component-Uatoyjg8.mjs → momentumcms-admin-tabs-field.component-D_T_JZej.mjs} +5 -5
  20. package/fesm2022/{momentumcms-admin-tabs-field.component-Uatoyjg8.mjs.map → momentumcms-admin-tabs-field.component-D_T_JZej.mjs.map} +1 -1
  21. package/fesm2022/momentumcms-admin.mjs +1 -1
  22. package/package.json +1 -1
  23. package/types/momentumcms-admin.d.ts +13 -6
  24. package/fesm2022/momentumcms-admin-momentumcms-admin-De5FLr2L.mjs.map +0 -1
@@ -3091,8 +3091,9 @@ type DeviceSize = 'desktop' | 'tablet' | 'mobile';
3091
3091
  * Displays an iframe that shows a live preview of the document being edited.
3092
3092
  *
3093
3093
  * Two modes based on preview config type:
3094
- * - `preview: true` (server-rendered HTML): iframe loads API endpoint with scripts enabled
3095
- * for postMessage live updates.
3094
+ * - `preview: true` (server-rendered HTML): initial GET loads from database, then
3095
+ * subsequent form changes are POSTed to the same endpoint with the current form data
3096
+ * for realtime preview updates (no page reload needed).
3096
3097
  * - `preview: string/function` (URL-based): iframe loads the page URL with scripts DISABLED.
3097
3098
  * This prevents loading a second Angular app instance (with Vite HMR, SSR hydration, etc.)
3098
3099
  * which causes tab crashes in dev mode. The SSR-rendered HTML displays correctly without JS.
@@ -3120,17 +3121,23 @@ declare class LivePreviewComponent {
3120
3121
  private readonly refreshCounter;
3121
3122
  /** Reference to the static iframe element (available when previewUrl is non-null) */
3122
3123
  private readonly previewIframe;
3124
+ /** Whether the initial iframe load from GET is complete */
3125
+ private initialLoadDone;
3123
3126
  /** Compute the raw preview URL */
3124
3127
  readonly previewUrl: _angular_core.Signal<string | null>;
3125
3128
  /** Computed iframe width based on device size */
3126
3129
  readonly iframeWidth: _angular_core.Signal<string>;
3127
3130
  /** Sandbox attribute value based on preview mode */
3128
3131
  private readonly sandboxValue;
3129
- /** Debounce timer for postMessage updates */
3132
+ /** Debounce timer for live preview updates */
3130
3133
  private debounceTimer;
3134
+ /** AbortController for in-flight POST requests */
3135
+ private fetchAbort;
3131
3136
  constructor();
3132
- /** Force iframe to reload */
3137
+ /** Force iframe to reload from server (GET) */
3133
3138
  refreshPreview(): void;
3139
+ /** POST form data to the preview endpoint and write the HTML response to the iframe. */
3140
+ private fetchPreviewHtml;
3134
3141
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<LivePreviewComponent, never>;
3135
3142
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<LivePreviewComponent, "mcms-live-preview", never, { "preview": { "alias": "preview"; "required": true; "isSignal": true; }; "documentData": { "alias": "documentData"; "required": true; "isSignal": true; }; "collectionSlug": { "alias": "collectionSlug"; "required": true; "isSignal": true; }; "entityId": { "alias": "entityId"; "required": false; "isSignal": true; }; }, { "editBlockRequest": "editBlockRequest"; }, never, never, true, never>;
3136
3143
  }
@@ -3391,8 +3398,8 @@ declare class FieldRenderer {
3391
3398
  readonly resolvedComponent: _angular_core.WritableSignal<Type<unknown> | null>;
3392
3399
  /** Error from lazy loading failure */
3393
3400
  readonly loadError: _angular_core.WritableSignal<Error | null>;
3394
- /** Registry key: 'blocks-visual' when blocks field has visual editor, otherwise field.type */
3395
- readonly registryKey: _angular_core.Signal<"number" | "slug" | "email" | "json" | "text" | "textarea" | "richText" | "date" | "checkbox" | "select" | "radio" | "password" | "upload" | "relationship" | "array" | "group" | "blocks" | "point" | "tabs" | "collapsible" | "row" | "blocks-visual">;
3401
+ /** Registry key: maps field type + editor config to renderer registry keys */
3402
+ readonly registryKey: _angular_core.Signal<"number" | "slug" | "email" | "json" | "text" | "textarea" | "richText" | "date" | "checkbox" | "select" | "radio" | "password" | "upload" | "relationship" | "array" | "group" | "blocks" | "point" | "tabs" | "collapsible" | "row" | "blocks-visual" | "json-email-builder" | "json-form-builder">;
3396
3403
  /** Inputs to pass to the dynamically loaded component via NgComponentOutlet */
3397
3404
  readonly rendererInputs: _angular_core.Signal<{
3398
3405
  field: Field;