@mdzip/editor-ng 2.5.1 → 2.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/README.md CHANGED
@@ -102,7 +102,10 @@ showUnchanged? }`) to opt any of them out.
102
102
  | `navigationMode` | `MdzipNavigationMode` | `'editor'` | Package navigation mode |
103
103
  | `navigationButtonActive` | `boolean` | `true` | Whether the navigation button is shown |
104
104
  | `inlineSvgLinks` | `boolean` | `true` | Shows archive SVGs that contain links inline, so the links can be clicked (draw.io `.drawio.svg` diagrams, for example); other SVGs stay images. Read when the view is created |
105
- | `hostFileActions` | `readonly MdzipFileAction[]` | — | The host's own items in the file tree's right-click menu on files (`{ id, label, appliesTo?, run }`), e.g. "Open in Another Editor". Also shown as buttons on the card that stands in for a `.drawio` image. Read when the view is created |
105
+ | `eagerImages` | `boolean` | `false` | Loads every image as soon as the preview mounts, not only those near the visible part; for a preview nobody scrolls, such as an off-screen copy for printing (use with `progressiveTextRendering: false`). Read when the view is created |
106
+ | `hostFileActions` | `readonly MdzipFileAction[]` | — | The host's own items in the file tree's right-click menu on files (`{ id, label, appliesTo?, primary?, description?, run }`; `label` and `description` may be functions of the file), e.g. "Open in Another Editor". Also shown as buttons on the card that stands in for a `.drawio` image, and on the card for a file the preview can't show (a `primary` one first). Read when the view is created |
107
+ | `fileNote` | `(file) => string \| null` | — | A line on the card for a file the preview can't show, e.g. "Open in Word: changes come back each time you save there." `refreshFileActions()` asks for it and the labels again. Read when the view is created |
108
+ | `fileCardHelp` | `MdzipFileCardHelp` | — | A link at the bottom of that card (`{ label, run }`), to the host's help. Read when the view is created |
106
109
  | `markdownRenderer` | `MdzipMarkdownRenderer` | — | Custom markdown renderer (keep the reference stable) |
107
110
  | `markdownExtensions` | `readonly MdzipMarkdownRenderExtension[]` | `[]` | Markdown pipeline extensions, diffed by `name` — new array identities with the same names are safe |
108
111
  | `entryRenderers` | `readonly MdzipEntryRenderer[]` | `[]` | Entry renderers claiming the content area for matching entries, diffed by `id` — new array identities with the same ids are safe |
@@ -160,9 +163,11 @@ change.
160
163
  | `previewWidthChanged` | `MdzipPreviewWidthChoice` | Emitted when the user picks a width in the toolbar's page-width menu |
161
164
  | `previewRendered` | `MdzipWorkspaceSnapshot` | Emitted when the preview HTML is mounted |
162
165
  | `assetsHydrated` | `MdzipWorkspaceSnapshot` | Emitted once the mounted preview's images have loaded |
166
+ | `assetsProgress` | `MdzipAssetsProgress` | `{ loaded, total }` as those images load, for a progress bar (not emitted when there are none) |
163
167
  | `linkActivated` | `MdzipLinkActivatedEvent` | Emitted for every preview link click before built-in handling; call `event.preventDefault()` to take over |
164
168
  | `failed` | `unknown` | Emitted on unrecoverable errors |
165
169
  | `outlineVisibilityChanged` | `boolean` | Emitted when the reader shows or hides the outline from the toolbar |
170
+ | `outlinePositionChanged` | `'left' \| 'right'` | Emitted when the reader moves the outline to the other side from the toolbar |
166
171
  | `outlineWidthChanged` | `number` | Emitted with the outline panel's width (pixels) when the reader finishes dragging its edge |
167
172
  | `whitespaceVisibilityChanged` | `boolean` | Emitted when the reader shows or hides whitespace from the toolbar |
168
173
  | `jsonValidityChanged` | `MdzipJsonValidityChange` | Emitted (debounced while typing) with the open `.json` file's validity; `null`s for other files |
@@ -221,7 +226,7 @@ All imperative methods are public instance methods on `MdzipWorkspaceComponent`,
221
226
  so any reference to the component instance works. No view query is required: a
222
227
  template reference variable can hand the instance directly to an event handler.
223
228
 
224
- Also: `setOutlineVisible(visible)` and `setOutlinePosition('left' | 'right')` move the outline panel, and `extractFiles(paths, { includeFolders })` returns the archive's files as `{ path, bytes }`.
229
+ Also: `setOutlineVisible(visible)` and `setOutlinePosition('left' | 'right')` move the outline panel, `setLayout('source' | 'split' | 'preview')` switches the layout, and `extractFiles(paths, { includeFolders })` returns the archive's files as `{ path, bytes }`.
225
230
 
226
231
  ```ts
227
232
  @Component({
package/dist/README.md CHANGED
@@ -102,7 +102,10 @@ showUnchanged? }`) to opt any of them out.
102
102
  | `navigationMode` | `MdzipNavigationMode` | `'editor'` | Package navigation mode |
103
103
  | `navigationButtonActive` | `boolean` | `true` | Whether the navigation button is shown |
104
104
  | `inlineSvgLinks` | `boolean` | `true` | Shows archive SVGs that contain links inline, so the links can be clicked (draw.io `.drawio.svg` diagrams, for example); other SVGs stay images. Read when the view is created |
105
- | `hostFileActions` | `readonly MdzipFileAction[]` | — | The host's own items in the file tree's right-click menu on files (`{ id, label, appliesTo?, run }`), e.g. "Open in Another Editor". Also shown as buttons on the card that stands in for a `.drawio` image. Read when the view is created |
105
+ | `eagerImages` | `boolean` | `false` | Loads every image as soon as the preview mounts, not only those near the visible part; for a preview nobody scrolls, such as an off-screen copy for printing (use with `progressiveTextRendering: false`). Read when the view is created |
106
+ | `hostFileActions` | `readonly MdzipFileAction[]` | — | The host's own items in the file tree's right-click menu on files (`{ id, label, appliesTo?, primary?, description?, run }`; `label` and `description` may be functions of the file), e.g. "Open in Another Editor". Also shown as buttons on the card that stands in for a `.drawio` image, and on the card for a file the preview can't show (a `primary` one first). Read when the view is created |
107
+ | `fileNote` | `(file) => string \| null` | — | A line on the card for a file the preview can't show, e.g. "Open in Word: changes come back each time you save there." `refreshFileActions()` asks for it and the labels again. Read when the view is created |
108
+ | `fileCardHelp` | `MdzipFileCardHelp` | — | A link at the bottom of that card (`{ label, run }`), to the host's help. Read when the view is created |
106
109
  | `markdownRenderer` | `MdzipMarkdownRenderer` | — | Custom markdown renderer (keep the reference stable) |
107
110
  | `markdownExtensions` | `readonly MdzipMarkdownRenderExtension[]` | `[]` | Markdown pipeline extensions, diffed by `name` — new array identities with the same names are safe |
108
111
  | `entryRenderers` | `readonly MdzipEntryRenderer[]` | `[]` | Entry renderers claiming the content area for matching entries, diffed by `id` — new array identities with the same ids are safe |
@@ -160,9 +163,11 @@ change.
160
163
  | `previewWidthChanged` | `MdzipPreviewWidthChoice` | Emitted when the user picks a width in the toolbar's page-width menu |
161
164
  | `previewRendered` | `MdzipWorkspaceSnapshot` | Emitted when the preview HTML is mounted |
162
165
  | `assetsHydrated` | `MdzipWorkspaceSnapshot` | Emitted once the mounted preview's images have loaded |
166
+ | `assetsProgress` | `MdzipAssetsProgress` | `{ loaded, total }` as those images load, for a progress bar (not emitted when there are none) |
163
167
  | `linkActivated` | `MdzipLinkActivatedEvent` | Emitted for every preview link click before built-in handling; call `event.preventDefault()` to take over |
164
168
  | `failed` | `unknown` | Emitted on unrecoverable errors |
165
169
  | `outlineVisibilityChanged` | `boolean` | Emitted when the reader shows or hides the outline from the toolbar |
170
+ | `outlinePositionChanged` | `'left' \| 'right'` | Emitted when the reader moves the outline to the other side from the toolbar |
166
171
  | `outlineWidthChanged` | `number` | Emitted with the outline panel's width (pixels) when the reader finishes dragging its edge |
167
172
  | `whitespaceVisibilityChanged` | `boolean` | Emitted when the reader shows or hides whitespace from the toolbar |
168
173
  | `jsonValidityChanged` | `MdzipJsonValidityChange` | Emitted (debounced while typing) with the open `.json` file's validity; `null`s for other files |
@@ -221,7 +226,7 @@ All imperative methods are public instance methods on `MdzipWorkspaceComponent`,
221
226
  so any reference to the component instance works. No view query is required: a
222
227
  template reference variable can hand the instance directly to an event handler.
223
228
 
224
- Also: `setOutlineVisible(visible)` and `setOutlinePosition('left' | 'right')` move the outline panel, and `extractFiles(paths, { includeFolders })` returns the archive's files as `{ path, bytes }`.
229
+ Also: `setOutlineVisible(visible)` and `setOutlinePosition('left' | 'right')` move the outline panel, `setLayout('source' | 'split' | 'preview')` switches the layout, and `extractFiles(paths, { includeFolders })` returns the archive's files as `{ path, bytes }`.
225
230
 
226
231
  ```ts
227
232
  @Component({
@@ -91,7 +91,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImpo
91
91
  // Generated from package.json. Do not edit by hand.
92
92
  const PACKAGE_INFO = {
93
93
  "name": "@mdzip/editor-ng",
94
- "version": "2.5.1",
94
+ "version": "2.6.0",
95
95
  "repositoryUrl": "https://github.com/mdzip-project/mdzip-editor/tree/main/packages/editor-ng",
96
96
  "description": "Angular wrapper for the MDZip workspace editor."
97
97
  };
@@ -155,6 +155,7 @@ class MdzipWorkspaceComponent {
155
155
  this.previewRendered = new EventEmitter();
156
156
  /** Emits once the mounted preview's images have finished loading. */
157
157
  this.assetsHydrated = new EventEmitter();
158
+ this.assetsProgress = new EventEmitter();
158
159
  /**
159
160
  * Emits for every click on a preview link, before the view's own handling.
160
161
  * Call `event.preventDefault()` in the handler to take over navigation.
@@ -163,6 +164,8 @@ class MdzipWorkspaceComponent {
163
164
  this.failed = new EventEmitter();
164
165
  /** Emits when the reader shows or hides the outline from the toolbar. */
165
166
  this.outlineVisibilityChanged = new EventEmitter();
167
+ /** Emits the outline panel's side when the reader moves it from the toolbar. */
168
+ this.outlinePositionChanged = new EventEmitter();
166
169
  /** Emits the outline panel's width (pixels) when the reader finishes dragging its edge. */
167
170
  this.outlineWidthChanged = new EventEmitter();
168
171
  /** Emits when the reader shows or hides whitespace from the toolbar. */
@@ -183,7 +186,7 @@ class MdzipWorkspaceComponent {
183
186
  this.syncView();
184
187
  }
185
188
  ngOnChanges(changes) {
186
- if (this.view && (changes['initialLayout'] || changes['initialColorScheme'] || changes['progressiveTextRendering'] || changes['inlineSvgLinks']
189
+ if (this.view && (changes['initialLayout'] || changes['initialColorScheme'] || changes['progressiveTextRendering'] || changes['inlineSvgLinks'] || changes['eagerImages']
187
190
  || changes['navigationMode'] || changes['navigationButtonActive'])) {
188
191
  this.createView();
189
192
  this.syncView();
@@ -266,6 +269,10 @@ class MdzipWorkspaceComponent {
266
269
  setOutlinePosition(position) {
267
270
  this.view?.setOutlinePosition(position);
268
271
  }
272
+ /** Switches to Edit (`'source'`), Split or View (`'preview'`), as the toolbar's buttons do. */
273
+ async setLayout(layout) {
274
+ await this.view?.setLayout(layout);
275
+ }
269
276
  /** The archive's files as `{ path, bytes }`, by file or folder path (see the view's `extractFiles()`). */
270
277
  extractFiles(paths, options) {
271
278
  return this.view?.extractFiles(paths, options) ?? Promise.resolve([]);
@@ -312,6 +319,10 @@ class MdzipWorkspaceComponent {
312
319
  replaceAsset(archivePath, fileBytes) {
313
320
  return this.view?.replaceAsset(archivePath, fileBytes) ?? Promise.resolve(false);
314
321
  }
322
+ /** Asks the file actions' labels and `fileNote` again (see the view's `refreshFileActions()`). */
323
+ refreshFileActions() {
324
+ this.view?.refreshFileActions();
325
+ }
315
326
  removeAsset(archivePath, options) {
316
327
  return this.view?.removeAsset(archivePath, options) ?? Promise.resolve(false);
317
328
  }
@@ -369,7 +380,10 @@ class MdzipWorkspaceComponent {
369
380
  systemColorScheme: this.systemColorScheme,
370
381
  progressiveTextRendering: this.progressiveTextRendering,
371
382
  inlineSvgLinks: this.inlineSvgLinks,
383
+ eagerImages: this.eagerImages,
372
384
  hostFileActions: this.hostFileActions,
385
+ fileNote: this.fileNote ? (file) => this.fileNote?.(file) ?? null : undefined,
386
+ fileCardHelp: this.fileCardHelp,
373
387
  navigationMode: this.navigationMode,
374
388
  navigationButtonActive: this.navigationButtonActive,
375
389
  onChanged: (bytes, snapshot) => this.changed.emit({ bytes, snapshot }),
@@ -387,6 +401,7 @@ class MdzipWorkspaceComponent {
387
401
  onPreviewWidthChanged: (width) => this.previewWidthChanged.emit(width),
388
402
  onPreviewRendered: (snapshot) => this.previewRendered.emit(snapshot),
389
403
  onAssetsHydrated: (snapshot) => this.assetsHydrated.emit(snapshot),
404
+ onAssetsProgress: (progress) => this.assetsProgress.emit(progress),
390
405
  onLinkActivated: (event) => this.linkActivated.emit(event),
391
406
  externalLinks: this.externalLinks,
392
407
  onFailed: (e) => this.failed.emit(e),
@@ -395,6 +410,7 @@ class MdzipWorkspaceComponent {
395
410
  : undefined,
396
411
  outline: this.outline,
397
412
  onOutlineVisibilityChanged: (visible) => this.outlineVisibilityChanged.emit(visible),
413
+ onOutlinePositionChanged: (position) => this.outlinePositionChanged.emit(position),
398
414
  onOutlineWidthChanged: (width) => this.outlineWidthChanged.emit(width),
399
415
  showWhitespace: this.showWhitespace,
400
416
  onWhitespaceVisibilityChanged: (visible) => this.whitespaceVisibilityChanged.emit(visible),
@@ -440,7 +456,7 @@ class MdzipWorkspaceComponent {
440
456
  });
441
457
  }
442
458
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: MdzipWorkspaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
443
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.24", type: MdzipWorkspaceComponent, isStandalone: true, selector: "mdzip-workspace", inputs: { bytes: "bytes", workspace: "workspace", fileName: "fileName", preserveSelectionOnReopen: "preserveSelectionOnReopen", mode: "mode", sourceFormat: "sourceFormat", worker: "worker", controls: "controls", toolbarDensity: "toolbarDensity", contentDensity: "contentDensity", imageHydrationAnimation: "imageHydrationAnimation", imageInsertMode: "imageInsertMode", imageInsertHandler: "imageInsertHandler", imageEditHandler: "imageEditHandler", initialLayout: "initialLayout", initialColorScheme: "initialColorScheme", previewMaxWidth: "previewMaxWidth", systemColorScheme: "systemColorScheme", progressiveTextRendering: "progressiveTextRendering", inlineSvgLinks: "inlineSvgLinks", hostFileActions: "hostFileActions", navigationMode: "navigationMode", navigationButtonActive: "navigationButtonActive", onConversionRequested: "onConversionRequested", onPackRequested: "onPackRequested", markdownRenderer: "markdownRenderer", markdownExtensions: "markdownExtensions", entryRenderers: "entryRenderers", frontMatter: "frontMatter", externalLinks: "externalLinks", onExtractFiles: "onExtractFiles", outline: "outline", showWhitespace: "showWhitespace", manifestView: "manifestView", jsonStatus: "jsonStatus" }, outputs: { changed: "changed", saved: "saved", workspaceChanged: "workspaceChanged", documentChanged: "documentChanged", assetChanged: "assetChanged", manifestChanged: "manifestChanged", snapshotChanged: "snapshotChanged", selectionChanged: "selectionChanged", dirtyChanged: "dirtyChanged", validationChanged: "validationChanged", colorSchemeChanged: "colorSchemeChanged", colorSchemePreferenceChanged: "colorSchemePreferenceChanged", previewWidthChanged: "previewWidthChanged", previewRendered: "previewRendered", assetsHydrated: "assetsHydrated", linkActivated: "linkActivated", failed: "failed", outlineVisibilityChanged: "outlineVisibilityChanged", outlineWidthChanged: "outlineWidthChanged", whitespaceVisibilityChanged: "whitespaceVisibilityChanged", jsonValidityChanged: "jsonValidityChanged" }, queries: [{ propertyName: "entryTemplates", predicate: MdzipEntryRendererDirective }], viewQueries: [{ propertyName: "hostRef", first: true, predicate: ["host"], descendants: true }], usesOnChanges: true, ngImport: i0, template: '<div #host></div>', isInline: true, styles: [":host{display:block;height:100%}div{height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
459
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.24", type: MdzipWorkspaceComponent, isStandalone: true, selector: "mdzip-workspace", inputs: { bytes: "bytes", workspace: "workspace", fileName: "fileName", preserveSelectionOnReopen: "preserveSelectionOnReopen", mode: "mode", sourceFormat: "sourceFormat", worker: "worker", controls: "controls", toolbarDensity: "toolbarDensity", contentDensity: "contentDensity", imageHydrationAnimation: "imageHydrationAnimation", imageInsertMode: "imageInsertMode", imageInsertHandler: "imageInsertHandler", imageEditHandler: "imageEditHandler", initialLayout: "initialLayout", initialColorScheme: "initialColorScheme", previewMaxWidth: "previewMaxWidth", systemColorScheme: "systemColorScheme", progressiveTextRendering: "progressiveTextRendering", inlineSvgLinks: "inlineSvgLinks", eagerImages: "eagerImages", hostFileActions: "hostFileActions", fileNote: "fileNote", fileCardHelp: "fileCardHelp", navigationMode: "navigationMode", navigationButtonActive: "navigationButtonActive", onConversionRequested: "onConversionRequested", onPackRequested: "onPackRequested", markdownRenderer: "markdownRenderer", markdownExtensions: "markdownExtensions", entryRenderers: "entryRenderers", frontMatter: "frontMatter", externalLinks: "externalLinks", onExtractFiles: "onExtractFiles", outline: "outline", showWhitespace: "showWhitespace", manifestView: "manifestView", jsonStatus: "jsonStatus" }, outputs: { changed: "changed", saved: "saved", workspaceChanged: "workspaceChanged", documentChanged: "documentChanged", assetChanged: "assetChanged", manifestChanged: "manifestChanged", snapshotChanged: "snapshotChanged", selectionChanged: "selectionChanged", dirtyChanged: "dirtyChanged", validationChanged: "validationChanged", colorSchemeChanged: "colorSchemeChanged", colorSchemePreferenceChanged: "colorSchemePreferenceChanged", previewWidthChanged: "previewWidthChanged", previewRendered: "previewRendered", assetsHydrated: "assetsHydrated", assetsProgress: "assetsProgress", linkActivated: "linkActivated", failed: "failed", outlineVisibilityChanged: "outlineVisibilityChanged", outlinePositionChanged: "outlinePositionChanged", outlineWidthChanged: "outlineWidthChanged", whitespaceVisibilityChanged: "whitespaceVisibilityChanged", jsonValidityChanged: "jsonValidityChanged" }, queries: [{ propertyName: "entryTemplates", predicate: MdzipEntryRendererDirective }], viewQueries: [{ propertyName: "hostRef", first: true, predicate: ["host"], descendants: true }], usesOnChanges: true, ngImport: i0, template: '<div #host></div>', isInline: true, styles: [":host{display:block;height:100%}div{height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
444
460
  }
445
461
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: MdzipWorkspaceComponent, decorators: [{
446
462
  type: Component,
@@ -485,8 +501,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImpo
485
501
  type: Input
486
502
  }], inlineSvgLinks: [{
487
503
  type: Input
504
+ }], eagerImages: [{
505
+ type: Input
488
506
  }], hostFileActions: [{
489
507
  type: Input
508
+ }], fileNote: [{
509
+ type: Input
510
+ }], fileCardHelp: [{
511
+ type: Input
490
512
  }], navigationMode: [{
491
513
  type: Input
492
514
  }], navigationButtonActive: [{
@@ -545,12 +567,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImpo
545
567
  type: Output
546
568
  }], assetsHydrated: [{
547
569
  type: Output
570
+ }], assetsProgress: [{
571
+ type: Output
548
572
  }], linkActivated: [{
549
573
  type: Output
550
574
  }], failed: [{
551
575
  type: Output
552
576
  }], outlineVisibilityChanged: [{
553
577
  type: Output
578
+ }], outlinePositionChanged: [{
579
+ type: Output
554
580
  }], outlineWidthChanged: [{
555
581
  type: Output
556
582
  }], whitespaceVisibilityChanged: [{
@@ -1 +1 @@
1
- {"version":3,"file":"mdzip-editor-ng.mjs","sources":["../../src/entry-renderer.directive.ts","../../src/package-info.ts","../../src/workspace.component.ts","../../src/diff.component.ts","../../src/mdzip-editor-ng.ts"],"sourcesContent":["import { Directive, Input, TemplateRef, ViewContainerRef, inject } from '@angular/core';\nimport type { MdzipEntryRenderContext, MdzipEntryRenderer } from '@mdzip/editor';\n\n/** Template context available via `let-context` (also the `$implicit` value). */\nexport interface MdzipEntryRendererTemplateContext {\n $implicit: MdzipEntryRenderContext;\n context: MdzipEntryRenderContext;\n}\n\n/**\n * Declares an entry renderer template inside `<mdzip-workspace>`:\n *\n * ```html\n * <mdzip-workspace [bytes]=\"bytes\" mode=\"editable\">\n * <ng-template mdzipEntryRenderer=\"manifest.json\" let-context>\n * <app-internals [manifest]=\"context.manifest\" />\n * </ng-template>\n * </mdzip-workspace>\n * ```\n *\n * Match either by exact archive path(s) via `mdzipEntryRenderer`, or with a\n * predicate via `[mdzipEntryRendererMatch]`. The embedded view is created in\n * the workspace component's view container (so change detection and\n * dependency injection work normally), its DOM is moved into the editor's\n * entry pane, and the view is destroyed when the selection changes or the\n * workspace is destroyed.\n */\n@Directive({\n selector: 'ng-template[mdzipEntryRenderer], ng-template[mdzipEntryRendererMatch]',\n standalone: true\n})\nexport class MdzipEntryRendererDirective {\n readonly templateRef = inject(TemplateRef<MdzipEntryRendererTemplateContext>);\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Exact archive path(s) to claim, case-insensitive. */\n @Input() mdzipEntryRenderer: string | readonly string[] = '';\n /** Predicate alternative for extension/MIME/path-family matching. */\n @Input() mdzipEntryRendererMatch?: (context: MdzipEntryRenderContext) => boolean;\n /** Stable id used for renderer diffing. Defaults to the matched paths. */\n @Input() mdzipEntryRendererId?: string;\n /** Matching priority relative to the `entryRenderers` input. Default 0. */\n @Input() mdzipEntryRendererPriority?: number;\n\n /** Adapts this template onto the framework-independent renderer contract. */\n toEntryRenderer(index: number): MdzipEntryRenderer {\n const paths = (typeof this.mdzipEntryRenderer === 'string'\n ? [this.mdzipEntryRenderer]\n : this.mdzipEntryRenderer\n ).filter((path) => path.length > 0).map((path) => path.toLowerCase());\n\n return {\n id: this.mdzipEntryRendererId\n ?? (paths.length > 0 ? `mdzip-ng-template:${paths.join(',')}` : `mdzip-ng-template#${index}`),\n priority: this.mdzipEntryRendererPriority ?? 0,\n matches: (context) => this.mdzipEntryRendererMatch\n ? this.mdzipEntryRendererMatch(context)\n : paths.includes(context.path.toLowerCase()),\n mount: (container, context) => {\n const templateContext: MdzipEntryRendererTemplateContext = {\n $implicit: context,\n context\n };\n const viewRef = this.viewContainerRef.createEmbeddedView(this.templateRef, templateContext);\n viewRef.detectChanges();\n const movedNodes = [...(viewRef.rootNodes as Node[])];\n for (const node of movedNodes) {\n container.appendChild(node);\n }\n return {\n update: (next) => {\n templateContext.$implicit = next;\n templateContext.context = next;\n viewRef.markForCheck();\n viewRef.detectChanges();\n },\n destroy: () => {\n viewRef.destroy();\n // The nodes were moved out of Angular's host container; make\n // sure none linger if the renderer did not remove them.\n for (const node of movedNodes) {\n node.parentNode?.removeChild(node);\n }\n }\n };\n }\n };\n }\n}\n","// Generated from package.json. Do not edit by hand.\nexport const PACKAGE_INFO = {\n \"name\": \"@mdzip/editor-ng\",\n \"version\": \"2.5.1\",\n \"repositoryUrl\": \"https://github.com/mdzip-project/mdzip-editor/tree/main/packages/editor-ng\",\n \"description\": \"Angular wrapper for the MDZip workspace editor.\"\n} as const;\n","import {\r\n AfterContentInit,\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChildren,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n Output,\r\n QueryList,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport { MdzipEntryRendererDirective } from './entry-renderer.directive';\r\nimport { PACKAGE_INFO } from './package-info.js';\r\nimport { MdzipWorkspaceView } from '@mdzip/editor';\r\nimport type {\r\n MdzipControlPolicy,\r\n MdzipControlPreset,\r\n MdzipContentDensity,\r\n MdzipColorScheme,\r\n MdzipColorSchemePreference,\r\n MdzipPreviewMaxWidth,\r\n MdzipPreviewWidthChoice,\r\n MdzipSystemColorScheme,\r\n MdzipConversionAction,\r\n MdzipConversionContext,\r\n MdzipEditorCommand,\r\n MdzipOpenPathOptions,\r\n MdzipPackFilesContext,\r\n MdzipPackFilesInput,\r\n MdzipPackFilesRequest,\r\n MdzipPackFilesResult,\r\n MdzipDocumentChangeEvent,\r\n MdzipEditorSnapshot,\r\n MdzipEntryRenderer,\r\n MdzipExternalLinkPolicy,\r\n MdzipFrontMatterOptions,\r\n MdzipLinkActivatedEvent,\r\n MdzipMarkdownRenderExtension,\r\n MdzipMarkdownRenderer,\r\n MdzipImageEditHandler,\r\n MdzipImageHydrationAnimation,\r\n MdzipImageInsertHandler,\r\n MdzipImageInsertMode,\r\n MdzipNavigationMode,\r\n MdzipRemoveAssetOptions,\r\n MdzipSourceFormat,\r\n MdzipToolbarDensity,\r\n MdzWorkspace,\r\n MdzWorkspaceAsset,\r\n MdzipWorkspaceChange,\r\n MdzipWorkspaceLayout,\r\n MdzipWorkspaceMode,\r\n MdzipWorkspaceSave,\r\n MdzipWorkspaceSnapshot,\r\n MdzipFileAction,\r\n MdzipExtractedFile,\r\n MdzipExtractRequest,\r\n MdzipJsonValidity,\r\n MdzipOutlinePosition,\r\n MdzipOutlineViewOptions,\r\n} from '@mdzip/editor';\r\n\r\n/** What `jsonValidityChanged` emits: the open `.json` file's validity, or `null`s when another kind of file is open. */\r\nexport interface MdzipJsonValidityChange {\r\n validity: MdzipJsonValidity | null;\r\n path: string | null;\r\n}\r\n\r\n// Identity-insensitive key for the rendering inputs: extensions and entry\r\n// renderers are diffed by their stable name/id (and priority), so template\r\n// expressions that build new arrays each change-detection cycle never\r\n// trigger an update.\r\nfunction renderingConfigKey(\r\n extensions: readonly MdzipMarkdownRenderExtension[],\r\n entryRenderers: readonly MdzipEntryRenderer[],\r\n frontMatter: MdzipFrontMatterOptions\r\n): string {\r\n return JSON.stringify([\r\n extensions.map((extension) => extension.name),\r\n entryRenderers.map((renderer) => [renderer.id, renderer.priority ?? 0]),\r\n // frontMatter carries no functions, so plain deep equality via\r\n // JSON.stringify is enough — no need for the name/id treatment above.\r\n frontMatter,\r\n ]);\r\n}\r\n\r\n@Component({\r\n selector: 'mdzip-workspace',\r\n standalone: true,\r\n template: '<div #host></div>',\r\n styles: [':host { display: block; height: 100%; } div { height: 100%; }'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class MdzipWorkspaceComponent implements AfterContentInit, AfterViewInit, OnChanges, OnDestroy {\r\n @Input() bytes: Uint8Array | null = null;\r\n @Input() workspace: MdzWorkspace | null = null;\r\n @Input() fileName = 'document.mdz';\r\n /**\r\n * When `bytes` or `workspace` change and the workspace reopens, show the file\r\n * the user was on (if it's still there) instead of the entry point (#51).\r\n * A `fileName`-only change never reopens; the name is updated in place.\r\n */\r\n @Input() preserveSelectionOnReopen = false;\r\n @Input() mode: MdzipWorkspaceMode = 'read-only';\r\n @Input() sourceFormat?: MdzipSourceFormat;\r\n /**\r\n * Dedicated Worker running `@mdzip/editor`'s `mdz-archive.worker.js`. When\r\n * provided, archive parsing and reads happen off the main thread instead of\r\n * blocking it — recommended for large archives. The host constructs the\r\n * `Worker` (asset URL resolution varies by build tooling); this component\r\n * forwards it to `MdzipWorkspaceService` unchanged and does not own its\r\n * lifecycle beyond that.\r\n */\r\n @Input() worker?: Worker;\r\n @Input() controls: MdzipControlPreset | MdzipControlPolicy = 'viewer';\r\n @Input() toolbarDensity?: MdzipToolbarDensity;\r\n @Input() contentDensity?: MdzipContentDensity;\r\n @Input() imageHydrationAnimation?: MdzipImageHydrationAnimation;\r\n @Input() imageInsertMode?: MdzipImageInsertMode;\r\n @Input() imageInsertHandler?: MdzipImageInsertHandler;\r\n @Input() imageEditHandler?: MdzipImageEditHandler;\r\n @Input() initialLayout?: MdzipWorkspaceLayout;\r\n @Input() initialColorScheme?: MdzipColorSchemePreference;\r\n /** Preview reading-column width; the user can change it from the toolbar's page-width menu. */\r\n @Input() previewMaxWidth?: MdzipPreviewMaxWidth;\r\n /** What the color scheme menu's System choice follows instead of the OS setting (a host theme), with its own label and icon. */\r\n @Input() systemColorScheme?: MdzipSystemColorScheme;\r\n /**\r\n * Mounts the preview in chunks near the viewport instead of rendering the\r\n * whole document synchronously up front. Recommended for hosts that may\r\n * open very large documents. Defaults to `false`. Constructor-only, like\r\n * `initialColorScheme` — changing it recreates the view.\r\n */\r\n @Input() progressiveTextRendering?: boolean;\r\n /**\r\n * Shows archive SVGs that contain links inline, so the links can be\r\n * clicked (see the view option). Defaults to `true`. Constructor-only.\r\n */\r\n @Input() inlineSvgLinks?: boolean;\r\n /** Extra file tree menu items for files, run by the host (see the view option). Read when the view is created. */\r\n @Input() hostFileActions?: readonly MdzipFileAction[];\r\n @Input() navigationMode: MdzipNavigationMode = 'editor';\r\n @Input() navigationButtonActive = true;\r\n /**\r\n * Host hook for the markdown→MDZ conversion flow. An input function (not an\r\n * output) because it must return/resolve `true` to suppress the built-in\r\n * conversion dialog.\r\n */\r\n @Input() onConversionRequested?: (\r\n action: MdzipConversionAction,\r\n context: MdzipConversionContext\r\n ) => boolean | Promise<boolean>;\r\n /**\r\n * Host hook for the folder→.mdz packing decision surfaced by\r\n * `packFilesAsWorkspace()`. Same input-not-output reasoning as\r\n * `onConversionRequested`.\r\n */\r\n @Input() onPackRequested?: (\r\n request: MdzipPackFilesRequest,\r\n context: MdzipPackFilesContext\r\n ) => boolean | Promise<boolean>;\r\n /**\r\n * Custom markdown renderer. Keep the reference stable: identity changes\r\n * apply via a cheap preview re-render, never a workspace rebuild.\r\n */\r\n @Input() markdownRenderer?: MdzipMarkdownRenderer;\r\n /** Markdown pipeline extensions, diffed by `name`. */\r\n @Input() markdownExtensions: readonly MdzipMarkdownRenderExtension[] = [];\r\n /** Entry renderers, diffed by `id`/`priority`. */\r\n @Input() entryRenderers: readonly MdzipEntryRenderer[] = [];\r\n /**\r\n * Controls how a leading `---`-delimited YAML front matter block renders\r\n * in the preview — display (table/raw), the collapsible expander, and its\r\n * label. Front matter handling is always registered (unlike\r\n * `markdownExtensions`); this only configures it. Diffed by deep equality\r\n * — object literals produced fresh each change-detection cycle are safe.\r\n */\r\n @Input() frontMatter: MdzipFrontMatterOptions = {};\r\n /**\r\n * Rendering policy for external links in the preview, e.g.\r\n * `{ target: '_blank' }` (adds `rel=\"noopener noreferrer\"` by default).\r\n * Changes re-apply to the mounted preview without a re-render.\r\n */\r\n @Input() externalLinks?: MdzipExternalLinkPolicy;\r\n /**\r\n * Writes files taken out of the archive (the contents pane's Extract…), for\r\n * hosts that can write to disk themselves. With it, the menu says\r\n * **Extract…** instead of offering browser downloads. An input function,\r\n * like `onConversionRequested`, because the view waits for it. Read when the\r\n * view is created.\r\n */\r\n @Input() onExtractFiles?: (request: MdzipExtractRequest) => void | Promise<void>;\r\n /**\r\n * The outline panel: `true` to open it, or options (`visible`, `position`,\r\n * `width`, `levels`, `collapse`, `label`). `visible` and `position` apply\r\n * live; the others are read when the view is created.\r\n */\r\n @Input() outline?: boolean | MdzipOutlineViewOptions;\r\n /** Shows spaces and tabs in the source editor. Applies live. */\r\n @Input() showWhitespace?: boolean;\r\n /** How `manifest.json` opens: `'form'` (the default) or `'json'`. Read when the view is created. */\r\n @Input() manifestView?: 'form' | 'json';\r\n /** The status line under the editor for `.json` files. Defaults to `true`. Read when the view is created. */\r\n @Input() jsonStatus?: boolean;\r\n @Output() readonly changed = new EventEmitter<MdzipWorkspaceChange>();\r\n @Output() readonly saved = new EventEmitter<MdzipWorkspaceSave>();\r\n @Output() readonly workspaceChanged = new EventEmitter<MdzipDocumentChangeEvent>();\r\n @Output() readonly documentChanged = new EventEmitter<MdzipDocumentChangeEvent>();\r\n @Output() readonly assetChanged = new EventEmitter<MdzipDocumentChangeEvent>();\r\n @Output() readonly manifestChanged = new EventEmitter<MdzipDocumentChangeEvent>();\r\n @Output() readonly snapshotChanged = new EventEmitter<MdzipWorkspaceSnapshot>();\r\n @Output() readonly selectionChanged = new EventEmitter<MdzipWorkspaceSnapshot>();\r\n @Output() readonly dirtyChanged = new EventEmitter<MdzipWorkspaceSnapshot>();\r\n @Output() readonly validationChanged = new EventEmitter<MdzipWorkspaceSnapshot>();\r\n @Output() readonly colorSchemeChanged = new EventEmitter<MdzipColorScheme>();\r\n /** Emits the user's Light / Dark / System choice from the toolbar menu. */\r\n @Output() readonly colorSchemePreferenceChanged = new EventEmitter<MdzipColorSchemePreference>();\r\n /** Emits the user's choice from the toolbar's page-width menu. */\r\n @Output() readonly previewWidthChanged = new EventEmitter<MdzipPreviewWidthChoice>();\r\n /** Emits when the preview HTML for the current selection is mounted. */\r\n @Output() readonly previewRendered = new EventEmitter<MdzipWorkspaceSnapshot>();\r\n /** Emits once the mounted preview's images have finished loading. */\r\n @Output() readonly assetsHydrated = new EventEmitter<MdzipWorkspaceSnapshot>();\r\n /**\r\n * Emits for every click on a preview link, before the view's own handling.\r\n * Call `event.preventDefault()` in the handler to take over navigation.\r\n */\r\n @Output() readonly linkActivated = new EventEmitter<MdzipLinkActivatedEvent>();\r\n @Output() readonly failed = new EventEmitter<unknown>();\r\n /** Emits when the reader shows or hides the outline from the toolbar. */\r\n @Output() readonly outlineVisibilityChanged = new EventEmitter<boolean>();\r\n /** Emits the outline panel's width (pixels) when the reader finishes dragging its edge. */\r\n @Output() readonly outlineWidthChanged = new EventEmitter<number>();\r\n /** Emits when the reader shows or hides whitespace from the toolbar. */\r\n @Output() readonly whitespaceVisibilityChanged = new EventEmitter<boolean>();\r\n /** Emits (debounced, while typing) the open `.json` file's validity. */\r\n @Output() readonly jsonValidityChanged = new EventEmitter<MdzipJsonValidityChange>();\r\n\r\n @ViewChild('host') private readonly hostRef!: ElementRef<HTMLDivElement>;\r\n /**\r\n * `<ng-template mdzipEntryRenderer>` declarations projected into the\r\n * component. Each becomes an entry renderer appended after the\r\n * `entryRenderers` input (stable sort keeps the input ahead at equal\r\n * priority).\r\n */\r\n @ContentChildren(MdzipEntryRendererDirective)\r\n private readonly entryTemplates!: QueryList<MdzipEntryRendererDirective>;\r\n private view: MdzipWorkspaceView | null = null;\r\n private renderingKey = '';\r\n private entryTemplatesSub: { unsubscribe(): void } | null = null;\r\n\r\n ngAfterContentInit(): void {\r\n this.entryTemplatesSub = this.entryTemplates.changes.subscribe(() => {\r\n this.applyRenderingOptions(false);\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.createView();\r\n this.syncView();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (this.view && (changes['initialLayout'] || changes['initialColorScheme'] || changes['progressiveTextRendering'] || changes['inlineSvgLinks']\r\n || changes['navigationMode'] || changes['navigationButtonActive'])) {\r\n this.createView();\r\n this.syncView();\r\n return;\r\n }\r\n if (this.view && changes['controls']) {\r\n this.view.setControls(this.controls);\r\n }\r\n if (this.view && (changes['toolbarDensity'] || changes['contentDensity'])) {\r\n this.view.setDensityOptions({\r\n toolbarDensity: this.toolbarDensity,\r\n contentDensity: this.contentDensity,\r\n });\r\n }\r\n if (this.view && changes['systemColorScheme']) {\r\n this.view.setSystemColorScheme(this.systemColorScheme ?? null);\r\n }\r\n if (this.view && changes['previewMaxWidth']) {\r\n this.view.setPreviewMaxWidth(this.previewMaxWidth);\r\n }\r\n if (this.view && changes['imageHydrationAnimation']) {\r\n this.view.setImageHydrationAnimation(this.imageHydrationAnimation);\r\n }\r\n if (this.view && (changes['imageInsertMode'] || changes['imageInsertHandler'])) {\r\n this.view.setImageInsertOptions({\r\n imageInsertMode: this.imageInsertMode,\r\n imageInsertHandler: (request) => this.imageInsertHandler?.(request),\r\n });\r\n }\r\n if (this.view && changes['imageEditHandler']) {\r\n this.view.setImageEditOptions({\r\n imageEditHandler: (request) => this.imageEditHandler?.(request),\r\n });\r\n }\r\n if (this.view && changes['externalLinks']) {\r\n this.view.setExternalLinks(this.externalLinks);\r\n }\r\n if (this.view && changes['outline'] && !changes['outline'].firstChange) {\r\n const outline = this.outline;\r\n this.view.setOutlineVisible(typeof outline === 'object' ? outline.visible ?? false : outline ?? false);\r\n if (typeof outline === 'object' && outline.position) {\r\n this.view.setOutlinePosition(outline.position);\r\n }\r\n }\r\n if (this.view && changes['showWhitespace'] && !changes['showWhitespace'].firstChange) {\r\n this.view.setWhitespaceVisible(this.showWhitespace ?? false);\r\n }\r\n if (this.view && (changes['bytes'] || changes['workspace'] || changes['mode']\r\n || changes['sourceFormat'] || changes['fileName'] || changes['worker'])) {\r\n const renameOnly = changes['fileName'] && !changes['fileName'].firstChange\r\n && !changes['bytes'] && !changes['workspace'] && !changes['mode']\r\n && !changes['sourceFormat'] && !changes['worker'];\r\n if (!(renameOnly && this.view.setFileName(this.fileName))) {\r\n this.syncView(this.preserveSelectionOnReopen);\r\n }\r\n }\r\n if (this.view && (changes['markdownRenderer'] || changes['markdownExtensions']\r\n || changes['entryRenderers'] || changes['frontMatter'])) {\r\n this.applyRenderingOptions(Boolean(changes['markdownRenderer']));\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.entryTemplatesSub?.unsubscribe();\r\n this.view?.destroy();\r\n }\r\n\r\n canExecuteCommand(command: MdzipEditorCommand): boolean {\r\n return this.view?.canExecuteCommand(command) ?? false;\r\n }\r\n\r\n executeCommand(command: MdzipEditorCommand, file?: File): Promise<boolean> {\r\n return this.view?.executeCommand(command, file) ?? Promise.resolve(false);\r\n }\r\n\r\n convertToMdz(): Promise<boolean> {\r\n return this.view?.convertToMdz() ?? Promise.resolve(false);\r\n }\r\n\r\n /** Shows or hides the outline panel (without emitting `outlineVisibilityChanged`). */\r\n setOutlineVisible(visible: boolean): void {\r\n this.view?.setOutlineVisible(visible);\r\n }\r\n\r\n /** Puts the outline panel on the left or the right of the document. */\r\n setOutlinePosition(position: MdzipOutlinePosition): void {\r\n this.view?.setOutlinePosition(position);\r\n }\r\n\r\n /** The archive's files as `{ path, bytes }`, by file or folder path (see the view's `extractFiles()`). */\r\n extractFiles(paths: readonly string[], options?: { includeFolders?: boolean }): Promise<MdzipExtractedFile[]> {\r\n return this.view?.extractFiles(paths, options) ?? Promise.resolve([]);\r\n }\r\n\r\n focus(): void {\r\n this.view?.focus();\r\n }\r\n\r\n setColorScheme(scheme: MdzipColorSchemePreference): void {\r\n this.view?.setColorScheme(scheme);\r\n }\r\n\r\n flush(): Promise<MdzipEditorSnapshot | null> {\r\n return this.view?.flush() ?? Promise.resolve(null);\r\n }\r\n\r\n serialize(): Promise<Blob | null> {\r\n return this.view?.serialize() ?? Promise.resolve(null);\r\n }\r\n\r\n getCurrentSnapshot(): Promise<MdzipEditorSnapshot | null> {\r\n return this.view?.getCurrentSnapshot() ?? Promise.resolve(null);\r\n }\r\n\r\n whenRendered(): Promise<void> {\r\n return this.view?.whenRendered() ?? Promise.resolve();\r\n }\r\n\r\n /** See `MdzipWorkspaceView.scrollToAnchor` — waits for the preview to mount. */\r\n scrollToAnchor(anchor: string): Promise<boolean> {\r\n return this.view?.scrollToAnchor(anchor) ?? Promise.resolve(false);\r\n }\r\n\r\n getAvailableAnchors(): string[] {\r\n return this.view?.getAvailableAnchors() ?? [];\r\n }\r\n\r\n /** See `MdzipWorkspaceView.openPath` — opens another file, optionally at an anchor. */\r\n openPath(path: string, options?: MdzipOpenPathOptions): Promise<boolean> {\r\n return this.view?.openPath(path, options) ?? Promise.resolve(false);\r\n }\r\n\r\n /** The archive path of the file currently shown, or null before a workspace opens. */\r\n getCurrentPath(): string | null {\r\n return this.view?.getCurrentPath() ?? null;\r\n }\r\n\r\n markPersisted(): void {\r\n this.view?.markPersisted();\r\n }\r\n\r\n addAsset(archivePath: string, fileBytes: Uint8Array): Promise<void> {\r\n return this.view?.addAsset(archivePath, fileBytes) ?? Promise.resolve();\r\n }\r\n\r\n replaceAsset(archivePath: string, fileBytes: Uint8Array): Promise<boolean> {\r\n return this.view?.replaceAsset(archivePath, fileBytes) ?? Promise.resolve(false);\r\n }\r\n\r\n removeAsset(archivePath: string, options?: MdzipRemoveAssetOptions): Promise<boolean> {\r\n return this.view?.removeAsset(archivePath, options) ?? Promise.resolve(false);\r\n }\r\n\r\n removeFile(archivePath: string): Promise<boolean> {\r\n return this.view?.removeFile(archivePath) ?? Promise.resolve(false);\r\n }\r\n\r\n renameFile(oldPath: string, newPath: string): Promise<boolean> {\r\n return this.view?.renameFile(oldPath, newPath) ?? Promise.resolve(false);\r\n }\r\n\r\n setEntryPoint(archivePath: string): Promise<boolean> {\r\n return this.view?.setEntryPoint(archivePath) ?? Promise.resolve(false);\r\n }\r\n\r\n packFilesAsWorkspace(\r\n files: readonly MdzipPackFilesInput[],\r\n options?: { title?: string; fileName?: string }\r\n ): Promise<MdzipPackFilesResult | null> {\r\n return this.view?.packFilesAsWorkspace(files, options) ?? Promise.resolve(null);\r\n }\r\n\r\n setCoverImage(archivePath: string | null): Promise<boolean> {\r\n return this.view?.setCoverImage(archivePath) ?? Promise.resolve(false);\r\n }\r\n\r\n listAssets(): MdzWorkspaceAsset[] {\r\n return this.view?.listAssets() ?? [];\r\n }\r\n\r\n private syncView(preserveSelection = false): void {\r\n const initialPath = preserveSelection ? this.view?.getCurrentPath() ?? undefined : undefined;\r\n if (this.view && this.workspace) {\r\n void this.view.openWorkspace(this.workspace, {\r\n mode: this.mode,\r\n sourceFormat: this.sourceFormat,\r\n fileName: this.fileName,\r\n worker: this.worker,\r\n initialPath\r\n });\r\n } else if (this.view && this.bytes) {\r\n void this.view.open(this.bytes, {\r\n mode: this.mode,\r\n sourceFormat: this.sourceFormat,\r\n fileName: this.fileName,\r\n worker: this.worker,\r\n initialPath\r\n });\r\n }\r\n }\r\n\r\n private createView(): void {\r\n this.view?.destroy();\r\n this.view = new MdzipWorkspaceView(this.hostRef.nativeElement, {\r\n libraries: [PACKAGE_INFO],\r\n controls: this.controls,\r\n toolbarDensity: this.toolbarDensity,\r\n contentDensity: this.contentDensity,\r\n imageHydrationAnimation: this.imageHydrationAnimation,\r\n imageInsertMode: this.imageInsertMode,\r\n initialLayout: this.initialLayout,\r\n initialColorScheme: this.initialColorScheme,\r\n previewMaxWidth: this.previewMaxWidth,\r\n systemColorScheme: this.systemColorScheme,\r\n progressiveTextRendering: this.progressiveTextRendering,\r\n inlineSvgLinks: this.inlineSvgLinks,\r\n hostFileActions: this.hostFileActions,\r\n navigationMode: this.navigationMode,\r\n navigationButtonActive: this.navigationButtonActive,\r\n onChanged: (bytes, snapshot) => this.changed.emit({ bytes, snapshot }),\r\n onSaved: (bytes, snapshot) => this.saved.emit({ bytes, snapshot }),\r\n onWorkspaceChanged: (event) => this.workspaceChanged.emit(event),\r\n onDocumentChanged: (event) => this.documentChanged.emit(event),\r\n onAssetChanged: (event) => this.assetChanged.emit(event),\r\n onManifestChanged: (event) => this.manifestChanged.emit(event),\r\n onSnapshotChanged: (snapshot) => this.snapshotChanged.emit(snapshot),\r\n onSelectionChanged: (snapshot: MdzipWorkspaceSnapshot) => this.selectionChanged.emit(snapshot),\r\n onDirtyChanged: (snapshot: MdzipWorkspaceSnapshot) => this.dirtyChanged.emit(snapshot),\r\n onValidationChanged: (snapshot: MdzipWorkspaceSnapshot) => this.validationChanged.emit(snapshot),\r\n onColorSchemeChanged: (colorScheme: MdzipColorScheme) => this.colorSchemeChanged.emit(colorScheme),\r\n onColorSchemePreferenceChanged: (preference: MdzipColorSchemePreference) =>\r\n this.colorSchemePreferenceChanged.emit(preference),\r\n onPreviewWidthChanged: (width: MdzipPreviewWidthChoice) => this.previewWidthChanged.emit(width),\r\n onPreviewRendered: (snapshot: MdzipWorkspaceSnapshot) => this.previewRendered.emit(snapshot),\r\n onAssetsHydrated: (snapshot: MdzipWorkspaceSnapshot) => this.assetsHydrated.emit(snapshot),\r\n onLinkActivated: (event: MdzipLinkActivatedEvent) => this.linkActivated.emit(event),\r\n externalLinks: this.externalLinks,\r\n onFailed: (e: unknown) => this.failed.emit(e),\r\n onExtractFiles: this.onExtractFiles\r\n ? (request) => this.onExtractFiles!(request)\r\n : undefined,\r\n outline: this.outline,\r\n onOutlineVisibilityChanged: (visible) => this.outlineVisibilityChanged.emit(visible),\r\n onOutlineWidthChanged: (width) => this.outlineWidthChanged.emit(width),\r\n showWhitespace: this.showWhitespace,\r\n onWhitespaceVisibilityChanged: (visible) => this.whitespaceVisibilityChanged.emit(visible),\r\n manifestView: this.manifestView,\r\n jsonStatus: this.jsonStatus,\r\n onJsonValidityChanged: (validity, path) => this.jsonValidityChanged.emit({ validity, path }),\r\n onConversionRequested: this.onConversionRequested\r\n ? (action, context) => this.onConversionRequested!(action, context)\r\n : undefined,\r\n onPackRequested: this.onPackRequested\r\n ? (request, context) => this.onPackRequested!(request, context)\r\n : undefined,\r\n imageInsertHandler: (request) => this.imageInsertHandler?.(request),\r\n imageEditHandler: (request) => this.imageEditHandler?.(request),\r\n markdownRenderer: this.markdownRenderer,\r\n markdownExtensions: this.markdownExtensions,\r\n entryRenderers: this.composedEntryRenderers(),\r\n frontMatter: this.frontMatter,\r\n });\r\n this.renderingKey = renderingConfigKey(this.markdownExtensions, this.composedEntryRenderers(), this.frontMatter);\r\n }\r\n\r\n private composedEntryRenderers(): readonly MdzipEntryRenderer[] {\r\n const templates = this.entryTemplates\r\n ? this.entryTemplates.map((directive, index) => directive.toEntryRenderer(index))\r\n : [];\r\n return [...this.entryRenderers, ...templates];\r\n }\r\n\r\n // Applies rendering input changes in place — never a view rebuild. Arrays\r\n // re-apply only when their name/id key changes, so template expressions\r\n // that produce new array identities each cycle are safe.\r\n private applyRenderingOptions(rendererChanged: boolean): void {\r\n const composed = this.composedEntryRenderers();\r\n const key = renderingConfigKey(this.markdownExtensions, composed, this.frontMatter);\r\n if (!rendererChanged && key === this.renderingKey) {\r\n return;\r\n }\r\n this.renderingKey = key;\r\n this.view?.setRenderingOptions({\r\n markdownRenderer: this.markdownRenderer ?? null,\r\n markdownExtensions: this.markdownExtensions,\r\n entryRenderers: composed,\r\n frontMatter: this.frontMatter,\r\n });\r\n }\r\n}\r\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport type {\n MdzipDiffControlsOptions,\n MdzipDiffSelectionEvent,\n MdzipDiffSideInput,\n MdzipDiffToolbarAction,\n MdzipDiffView,\n MdzipDiffViewOptions\n} from '@mdzip/editor/diff-view';\n\n@Component({\n selector: 'mdzip-diff',\n standalone: true,\n template: '<div #host></div>',\n styles: [':host { display:block; height:100%; } div { height:100%; }'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MdzipDiffComponent implements AfterViewInit, OnChanges, OnDestroy {\n @Input({ required: true }) before!: MdzipDiffSideInput;\n @Input({ required: true }) after!: MdzipDiffSideInput;\n @Input() initialPath?: string;\n @Input() showUnchanged = true;\n @Input() navigationVisible = true;\n @Input() controls?: MdzipDiffControlsOptions;\n @Input() toolbarActions: readonly MdzipDiffToolbarAction[] = [];\n @Output() readonly selectionChanged = new EventEmitter<MdzipDiffSelectionEvent>();\n @Output() readonly failed = new EventEmitter<Error>();\n\n @ViewChild('host') private readonly hostRef!: ElementRef<HTMLDivElement>;\n private view: MdzipDiffView | null = null;\n private destroyed = false;\n\n ngAfterViewInit(): void {\n void this.createView();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this.view) return;\n if (changes['before'] || changes['after'] || changes['initialPath']) {\n void this.view.open(this.options());\n }\n if (changes['showUnchanged']) this.view.setShowUnchanged(this.showUnchanged);\n if (changes['navigationVisible']) this.view.setNavigationVisible(this.navigationVisible);\n if (changes['toolbarActions']) this.view.setToolbarActions(this.toolbarActions);\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.view?.destroy();\n this.view = null;\n }\n\n openPath(path: string): Promise<boolean> {\n return this.view?.openPath(path) ?? Promise.resolve(false);\n }\n\n openPreviousChange(): Promise<boolean> {\n return this.view?.openPreviousChange() ?? Promise.resolve(false);\n }\n\n openNextChange(): Promise<boolean> {\n return this.view?.openNextChange() ?? Promise.resolve(false);\n }\n\n setShowUnchanged(show: boolean): void {\n this.view?.setShowUnchanged(show);\n }\n\n setNavigationVisible(visible: boolean): void {\n this.view?.setNavigationVisible(visible);\n }\n\n setToolbarActions(actions: readonly MdzipDiffToolbarAction[]): void {\n this.view?.setToolbarActions(actions);\n }\n\n private async createView(): Promise<void> {\n const { MdzipDiffView } = await import('@mdzip/editor/diff-view');\n if (this.destroyed) return;\n this.view = new MdzipDiffView(this.hostRef.nativeElement, this.options());\n }\n\n private options(): MdzipDiffViewOptions {\n return {\n before: this.before,\n after: this.after,\n initialPath: this.initialPath,\n showUnchanged: this.showUnchanged,\n navigationVisible: this.navigationVisible,\n controls: this.controls,\n toolbarActions: this.toolbarActions,\n onSelectionChanged: (event) => this.selectionChanged.emit(event),\n onFailed: (error) => this.failed.emit(error)\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AASA;;;;;;;;;;;;;;;;;AAiBG;MAKU,2BAA2B,CAAA;AAJxC,IAAA,WAAA,GAAA;AAKW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,EAAC,WAA8C,EAAC;AAC5D,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;;QAGnD,IAAA,CAAA,kBAAkB,GAA+B,EAAE;AAoD7D,IAAA;;AA3CC,IAAA,eAAe,CAAC,KAAa,EAAA;QAC3B,MAAM,KAAK,GAAG,CAAC,OAAO,IAAI,CAAC,kBAAkB,KAAK;AAChD,cAAE,CAAC,IAAI,CAAC,kBAAkB;AAC1B,cAAE,IAAI,CAAC,kBAA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ACA;;sBACA;;sBACA;;sBAEA,SAAS;uBAAC,MAAM;;;ACxCnB;;AAEG;;;;"}
1
+ {"version":3,"file":"mdzip-editor-ng.mjs","sources":["../../src/entry-renderer.directive.ts","../../src/package-info.ts","../../src/workspace.component.ts","../../src/diff.component.ts","../../src/mdzip-editor-ng.ts"],"sourcesContent":["import { Directive, Input, TemplateRef, ViewContainerRef, inject } from '@angular/core';\nimport type { MdzipEntryRenderContext, MdzipEntryRenderer } from '@mdzip/editor';\n\n/** Template context available via `let-context` (also the `$implicit` value). */\nexport interface MdzipEntryRendererTemplateContext {\n $implicit: MdzipEntryRenderContext;\n context: MdzipEntryRenderContext;\n}\n\n/**\n * Declares an entry renderer template inside `<mdzip-workspace>`:\n *\n * ```html\n * <mdzip-workspace [bytes]=\"bytes\" mode=\"editable\">\n * <ng-template mdzipEntryRenderer=\"manifest.json\" let-context>\n * <app-internals [manifest]=\"context.manifest\" />\n * </ng-template>\n * </mdzip-workspace>\n * ```\n *\n * Match either by exact archive path(s) via `mdzipEntryRenderer`, or with a\n * predicate via `[mdzipEntryRendererMatch]`. The embedded view is created in\n * the workspace component's view container (so change detection and\n * dependency injection work normally), its DOM is moved into the editor's\n * entry pane, and the view is destroyed when the selection changes or the\n * workspace is destroyed.\n */\n@Directive({\n selector: 'ng-template[mdzipEntryRenderer], ng-template[mdzipEntryRendererMatch]',\n standalone: true\n})\nexport class MdzipEntryRendererDirective {\n readonly templateRef = inject(TemplateRef<MdzipEntryRendererTemplateContext>);\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Exact archive path(s) to claim, case-insensitive. */\n @Input() mdzipEntryRenderer: string | readonly string[] = '';\n /** Predicate alternative for extension/MIME/path-family matching. */\n @Input() mdzipEntryRendererMatch?: (context: MdzipEntryRenderContext) => boolean;\n /** Stable id used for renderer diffing. Defaults to the matched paths. */\n @Input() mdzipEntryRendererId?: string;\n /** Matching priority relative to the `entryRenderers` input. Default 0. */\n @Input() mdzipEntryRendererPriority?: number;\n\n /** Adapts this template onto the framework-independent renderer contract. */\n toEntryRenderer(index: number): MdzipEntryRenderer {\n const paths = (typeof this.mdzipEntryRenderer === 'string'\n ? [this.mdzipEntryRenderer]\n : this.mdzipEntryRenderer\n ).filter((path) => path.length > 0).map((path) => path.toLowerCase());\n\n return {\n id: this.mdzipEntryRendererId\n ?? (paths.length > 0 ? `mdzip-ng-template:${paths.join(',')}` : `mdzip-ng-template#${index}`),\n priority: this.mdzipEntryRendererPriority ?? 0,\n matches: (context) => this.mdzipEntryRendererMatch\n ? this.mdzipEntryRendererMatch(context)\n : paths.includes(context.path.toLowerCase()),\n mount: (container, context) => {\n const templateContext: MdzipEntryRendererTemplateContext = {\n $implicit: context,\n context\n };\n const viewRef = this.viewContainerRef.createEmbeddedView(this.templateRef, templateContext);\n viewRef.detectChanges();\n const movedNodes = [...(viewRef.rootNodes as Node[])];\n for (const node of movedNodes) {\n container.appendChild(node);\n }\n return {\n update: (next) => {\n templateContext.$implicit = next;\n templateContext.context = next;\n viewRef.markForCheck();\n viewRef.detectChanges();\n },\n destroy: () => {\n viewRef.destroy();\n // The nodes were moved out of Angular's host container; make\n // sure none linger if the renderer did not remove them.\n for (const node of movedNodes) {\n node.parentNode?.removeChild(node);\n }\n }\n };\n }\n };\n }\n}\n","// Generated from package.json. Do not edit by hand.\nexport const PACKAGE_INFO = {\n \"name\": \"@mdzip/editor-ng\",\n \"version\": \"2.6.0\",\n \"repositoryUrl\": \"https://github.com/mdzip-project/mdzip-editor/tree/main/packages/editor-ng\",\n \"description\": \"Angular wrapper for the MDZip workspace editor.\"\n} as const;\n","import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n QueryList,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { MdzipEntryRendererDirective } from './entry-renderer.directive';\nimport { PACKAGE_INFO } from './package-info.js';\nimport { MdzipWorkspaceView } from '@mdzip/editor';\nimport type {\n MdzipAssetsProgress,\n MdzipControlPolicy,\n MdzipControlPreset,\n MdzipContentDensity,\n MdzipColorScheme,\n MdzipColorSchemePreference,\n MdzipPreviewMaxWidth,\n MdzipPreviewWidthChoice,\n MdzipSystemColorScheme,\n MdzipConversionAction,\n MdzipConversionContext,\n MdzipEditorCommand,\n MdzipOpenPathOptions,\n MdzipPackFilesContext,\n MdzipPackFilesInput,\n MdzipPackFilesRequest,\n MdzipPackFilesResult,\n MdzipDocumentChangeEvent,\n MdzipEditorSnapshot,\n MdzipEntryRenderer,\n MdzipExternalLinkPolicy,\n MdzipFrontMatterOptions,\n MdzipLinkActivatedEvent,\n MdzipMarkdownRenderExtension,\n MdzipMarkdownRenderer,\n MdzipImageEditHandler,\n MdzipImageHydrationAnimation,\n MdzipImageInsertHandler,\n MdzipImageInsertMode,\n MdzipNavigationMode,\n MdzipRemoveAssetOptions,\n MdzipSourceFormat,\n MdzipToolbarDensity,\n MdzWorkspace,\n MdzWorkspaceAsset,\n MdzipWorkspaceChange,\n MdzipWorkspaceLayout,\n MdzipWorkspaceMode,\n MdzipWorkspaceSave,\n MdzipWorkspaceSnapshot,\n MdzipFileAction,\n MdzipFileActionTarget,\n MdzipFileCardHelp,\n MdzipExtractedFile,\n MdzipExtractRequest,\n MdzipJsonValidity,\n MdzipOutlinePosition,\n MdzipOutlineViewOptions,\n} from '@mdzip/editor';\n\n/** What `jsonValidityChanged` emits: the open `.json` file's validity, or `null`s when another kind of file is open. */\nexport interface MdzipJsonValidityChange {\n validity: MdzipJsonValidity | null;\n path: string | null;\n}\n\n// Identity-insensitive key for the rendering inputs: extensions and entry\n// renderers are diffed by their stable name/id (and priority), so template\n// expressions that build new arrays each change-detection cycle never\n// trigger an update.\nfunction renderingConfigKey(\n extensions: readonly MdzipMarkdownRenderExtension[],\n entryRenderers: readonly MdzipEntryRenderer[],\n frontMatter: MdzipFrontMatterOptions\n): string {\n return JSON.stringify([\n extensions.map((extension) => extension.name),\n entryRenderers.map((renderer) => [renderer.id, renderer.priority ?? 0]),\n // frontMatter carries no functions, so plain deep equality via\n // JSON.stringify is enough — no need for the name/id treatment above.\n frontMatter,\n ]);\n}\n\n@Component({\n selector: 'mdzip-workspace',\n standalone: true,\n template: '<div #host></div>',\n styles: [':host { display: block; height: 100%; } div { height: 100%; }'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MdzipWorkspaceComponent implements AfterContentInit, AfterViewInit, OnChanges, OnDestroy {\n @Input() bytes: Uint8Array | null = null;\n @Input() workspace: MdzWorkspace | null = null;\n @Input() fileName = 'document.mdz';\n /**\n * When `bytes` or `workspace` change and the workspace reopens, show the file\n * the user was on (if it's still there) instead of the entry point (#51).\n * A `fileName`-only change never reopens; the name is updated in place.\n */\n @Input() preserveSelectionOnReopen = false;\n @Input() mode: MdzipWorkspaceMode = 'read-only';\n @Input() sourceFormat?: MdzipSourceFormat;\n /**\n * Dedicated Worker running `@mdzip/editor`'s `mdz-archive.worker.js`. When\n * provided, archive parsing and reads happen off the main thread instead of\n * blocking it — recommended for large archives. The host constructs the\n * `Worker` (asset URL resolution varies by build tooling); this component\n * forwards it to `MdzipWorkspaceService` unchanged and does not own its\n * lifecycle beyond that.\n */\n @Input() worker?: Worker;\n @Input() controls: MdzipControlPreset | MdzipControlPolicy = 'viewer';\n @Input() toolbarDensity?: MdzipToolbarDensity;\n @Input() contentDensity?: MdzipContentDensity;\n @Input() imageHydrationAnimation?: MdzipImageHydrationAnimation;\n @Input() imageInsertMode?: MdzipImageInsertMode;\n @Input() imageInsertHandler?: MdzipImageInsertHandler;\n @Input() imageEditHandler?: MdzipImageEditHandler;\n @Input() initialLayout?: MdzipWorkspaceLayout;\n @Input() initialColorScheme?: MdzipColorSchemePreference;\n /** Preview reading-column width; the user can change it from the toolbar's page-width menu. */\n @Input() previewMaxWidth?: MdzipPreviewMaxWidth;\n /** What the color scheme menu's System choice follows instead of the OS setting (a host theme), with its own label and icon. */\n @Input() systemColorScheme?: MdzipSystemColorScheme;\n /**\n * Mounts the preview in chunks near the viewport instead of rendering the\n * whole document synchronously up front. Recommended for hosts that may\n * open very large documents. Defaults to `false`. Constructor-only, like\n * `initialColorScheme` — changing it recreates the view.\n */\n @Input() progressiveTextRendering?: boolean;\n /**\n * Shows archive SVGs that contain links inline, so the links can be\n * clicked (see the view option). Defaults to `true`. Constructor-only.\n */\n @Input() inlineSvgLinks?: boolean;\n /**\n * Loads every image as soon as the preview mounts, for a preview nobody\n * scrolls, such as an off-screen copy for printing (see the view option).\n * Defaults to `false`. Constructor-only.\n */\n @Input() eagerImages?: boolean;\n /** Extra file tree menu items for files, run by the host (see the view option). Read when the view is created. */\n @Input() hostFileActions?: readonly MdzipFileAction[];\n /** A line for the card of a file the preview can't show (see the view option). Read when the view is created. */\n @Input() fileNote?: (file: MdzipFileActionTarget) => string | null;\n /** A help link at the bottom of that card (see the view option). Read when the view is created. */\n @Input() fileCardHelp?: MdzipFileCardHelp;\n @Input() navigationMode: MdzipNavigationMode = 'editor';\n @Input() navigationButtonActive = true;\n /**\n * Host hook for the markdown→MDZ conversion flow. An input function (not an\n * output) because it must return/resolve `true` to suppress the built-in\n * conversion dialog.\n */\n @Input() onConversionRequested?: (\n action: MdzipConversionAction,\n context: MdzipConversionContext\n ) => boolean | Promise<boolean>;\n /**\n * Host hook for the folder→.mdz packing decision surfaced by\n * `packFilesAsWorkspace()`. Same input-not-output reasoning as\n * `onConversionRequested`.\n */\n @Input() onPackRequested?: (\n request: MdzipPackFilesRequest,\n context: MdzipPackFilesContext\n ) => boolean | Promise<boolean>;\n /**\n * Custom markdown renderer. Keep the reference stable: identity changes\n * apply via a cheap preview re-render, never a workspace rebuild.\n */\n @Input() markdownRenderer?: MdzipMarkdownRenderer;\n /** Markdown pipeline extensions, diffed by `name`. */\n @Input() markdownExtensions: readonly MdzipMarkdownRenderExtension[] = [];\n /** Entry renderers, diffed by `id`/`priority`. */\n @Input() entryRenderers: readonly MdzipEntryRenderer[] = [];\n /**\n * Controls how a leading `---`-delimited YAML front matter block renders\n * in the preview — display (table/raw), the collapsible expander, and its\n * label. Front matter handling is always registered (unlike\n * `markdownExtensions`); this only configures it. Diffed by deep equality\n * — object literals produced fresh each change-detection cycle are safe.\n */\n @Input() frontMatter: MdzipFrontMatterOptions = {};\n /**\n * Rendering policy for external links in the preview, e.g.\n * `{ target: '_blank' }` (adds `rel=\"noopener noreferrer\"` by default).\n * Changes re-apply to the mounted preview without a re-render.\n */\n @Input() externalLinks?: MdzipExternalLinkPolicy;\n /**\n * Writes files taken out of the archive (the contents pane's Extract…), for\n * hosts that can write to disk themselves. With it, the menu says\n * **Extract…** instead of offering browser downloads. An input function,\n * like `onConversionRequested`, because the view waits for it. Read when the\n * view is created.\n */\n @Input() onExtractFiles?: (request: MdzipExtractRequest) => void | Promise<void>;\n /**\n * The outline panel: `true` to open it, or options (`visible`, `position`,\n * `width`, `levels`, `collapse`, `label`). `visible` and `position` apply\n * live; the others are read when the view is created.\n */\n @Input() outline?: boolean | MdzipOutlineViewOptions;\n /** Shows spaces and tabs in the source editor. Applies live. */\n @Input() showWhitespace?: boolean;\n /** How `manifest.json` opens: `'form'` (the default) or `'json'`. Read when the view is created. */\n @Input() manifestView?: 'form' | 'json';\n /** The status line under the editor for `.json` files. Defaults to `true`. Read when the view is created. */\n @Input() jsonStatus?: boolean;\n @Output() readonly changed = new EventEmitter<MdzipWorkspaceChange>();\n @Output() readonly saved = new EventEmitter<MdzipWorkspaceSave>();\n @Output() readonly workspaceChanged = new EventEmitter<MdzipDocumentChangeEvent>();\n @Output() readonly documentChanged = new EventEmitter<MdzipDocumentChangeEvent>();\n @Output() readonly assetChanged = new EventEmitter<MdzipDocumentChangeEvent>();\n @Output() readonly manifestChanged = new EventEmitter<MdzipDocumentChangeEvent>();\n @Output() readonly snapshotChanged = new EventEmitter<MdzipWorkspaceSnapshot>();\n @Output() readonly selectionChanged = new EventEmitter<MdzipWorkspaceSnapshot>();\n @Output() readonly dirtyChanged = new EventEmitter<MdzipWorkspaceSnapshot>();\n @Output() readonly validationChanged = new EventEmitter<MdzipWorkspaceSnapshot>();\n @Output() readonly colorSchemeChanged = new EventEmitter<MdzipColorScheme>();\n /** Emits the user's Light / Dark / System choice from the toolbar menu. */\n @Output() readonly colorSchemePreferenceChanged = new EventEmitter<MdzipColorSchemePreference>();\n /** Emits the user's choice from the toolbar's page-width menu. */\n @Output() readonly previewWidthChanged = new EventEmitter<MdzipPreviewWidthChoice>();\n /** Emits when the preview HTML for the current selection is mounted. */\n @Output() readonly previewRendered = new EventEmitter<MdzipWorkspaceSnapshot>();\n /** Emits once the mounted preview's images have finished loading. */\n @Output() readonly assetsHydrated = new EventEmitter<MdzipWorkspaceSnapshot>();\n @Output() readonly assetsProgress = new EventEmitter<MdzipAssetsProgress>();\n /**\n * Emits for every click on a preview link, before the view's own handling.\n * Call `event.preventDefault()` in the handler to take over navigation.\n */\n @Output() readonly linkActivated = new EventEmitter<MdzipLinkActivatedEvent>();\n @Output() readonly failed = new EventEmitter<unknown>();\n /** Emits when the reader shows or hides the outline from the toolbar. */\n @Output() readonly outlineVisibilityChanged = new EventEmitter<boolean>();\n /** Emits the outline panel's side when the reader moves it from the toolbar. */\n @Output() readonly outlinePositionChanged = new EventEmitter<MdzipOutlinePosition>();\n /** Emits the outline panel's width (pixels) when the reader finishes dragging its edge. */\n @Output() readonly outlineWidthChanged = new EventEmitter<number>();\n /** Emits when the reader shows or hides whitespace from the toolbar. */\n @Output() readonly whitespaceVisibilityChanged = new EventEmitter<boolean>();\n /** Emits (debounced, while typing) the open `.json` file's validity. */\n @Output() readonly jsonValidityChanged = new EventEmitter<MdzipJsonValidityChange>();\n\n @ViewChild('host') private readonly hostRef!: ElementRef<HTMLDivElement>;\n /**\n * `<ng-template mdzipEntryRenderer>` declarations projected into the\n * component. Each becomes an entry renderer appended after the\n * `entryRenderers` input (stable sort keeps the input ahead at equal\n * priority).\n */\n @ContentChildren(MdzipEntryRendererDirective)\n private readonly entryTemplates!: QueryList<MdzipEntryRendererDirective>;\n private view: MdzipWorkspaceView | null = null;\n private renderingKey = '';\n private entryTemplatesSub: { unsubscribe(): void } | null = null;\n\n ngAfterContentInit(): void {\n this.entryTemplatesSub = this.entryTemplates.changes.subscribe(() => {\n this.applyRenderingOptions(false);\n });\n }\n\n ngAfterViewInit(): void {\n this.createView();\n this.syncView();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this.view && (changes['initialLayout'] || changes['initialColorScheme'] || changes['progressiveTextRendering'] || changes['inlineSvgLinks'] || changes['eagerImages']\n || changes['navigationMode'] || changes['navigationButtonActive'])) {\n this.createView();\n this.syncView();\n return;\n }\n if (this.view && changes['controls']) {\n this.view.setControls(this.controls);\n }\n if (this.view && (changes['toolbarDensity'] || changes['contentDensity'])) {\n this.view.setDensityOptions({\n toolbarDensity: this.toolbarDensity,\n contentDensity: this.contentDensity,\n });\n }\n if (this.view && changes['systemColorScheme']) {\n this.view.setSystemColorScheme(this.systemColorScheme ?? null);\n }\n if (this.view && changes['previewMaxWidth']) {\n this.view.setPreviewMaxWidth(this.previewMaxWidth);\n }\n if (this.view && changes['imageHydrationAnimation']) {\n this.view.setImageHydrationAnimation(this.imageHydrationAnimation);\n }\n if (this.view && (changes['imageInsertMode'] || changes['imageInsertHandler'])) {\n this.view.setImageInsertOptions({\n imageInsertMode: this.imageInsertMode,\n imageInsertHandler: (request) => this.imageInsertHandler?.(request),\n });\n }\n if (this.view && changes['imageEditHandler']) {\n this.view.setImageEditOptions({\n imageEditHandler: (request) => this.imageEditHandler?.(request),\n });\n }\n if (this.view && changes['externalLinks']) {\n this.view.setExternalLinks(this.externalLinks);\n }\n if (this.view && changes['outline'] && !changes['outline'].firstChange) {\n const outline = this.outline;\n this.view.setOutlineVisible(typeof outline === 'object' ? outline.visible ?? false : outline ?? false);\n if (typeof outline === 'object' && outline.position) {\n this.view.setOutlinePosition(outline.position);\n }\n }\n if (this.view && changes['showWhitespace'] && !changes['showWhitespace'].firstChange) {\n this.view.setWhitespaceVisible(this.showWhitespace ?? false);\n }\n if (this.view && (changes['bytes'] || changes['workspace'] || changes['mode']\n || changes['sourceFormat'] || changes['fileName'] || changes['worker'])) {\n const renameOnly = changes['fileName'] && !changes['fileName'].firstChange\n && !changes['bytes'] && !changes['workspace'] && !changes['mode']\n && !changes['sourceFormat'] && !changes['worker'];\n if (!(renameOnly && this.view.setFileName(this.fileName))) {\n this.syncView(this.preserveSelectionOnReopen);\n }\n }\n if (this.view && (changes['markdownRenderer'] || changes['markdownExtensions']\n || changes['entryRenderers'] || changes['frontMatter'])) {\n this.applyRenderingOptions(Boolean(changes['markdownRenderer']));\n }\n }\n\n ngOnDestroy(): void {\n this.entryTemplatesSub?.unsubscribe();\n this.view?.destroy();\n }\n\n canExecuteCommand(command: MdzipEditorCommand): boolean {\n return this.view?.canExecuteCommand(command) ?? false;\n }\n\n executeCommand(command: MdzipEditorCommand, file?: File): Promise<boolean> {\n return this.view?.executeCommand(command, file) ?? Promise.resolve(false);\n }\n\n convertToMdz(): Promise<boolean> {\n return this.view?.convertToMdz() ?? Promise.resolve(false);\n }\n\n /** Shows or hides the outline panel (without emitting `outlineVisibilityChanged`). */\n setOutlineVisible(visible: boolean): void {\n this.view?.setOutlineVisible(visible);\n }\n\n /** Puts the outline panel on the left or the right of the document. */\n setOutlinePosition(position: MdzipOutlinePosition): void {\n this.view?.setOutlinePosition(position);\n }\n\n /** Switches to Edit (`'source'`), Split or View (`'preview'`), as the toolbar's buttons do. */\n async setLayout(layout: MdzipWorkspaceLayout): Promise<void> {\n await this.view?.setLayout(layout);\n }\n\n /** The archive's files as `{ path, bytes }`, by file or folder path (see the view's `extractFiles()`). */\n extractFiles(paths: readonly string[], options?: { includeFolders?: boolean }): Promise<MdzipExtractedFile[]> {\n return this.view?.extractFiles(paths, options) ?? Promise.resolve([]);\n }\n\n focus(): void {\n this.view?.focus();\n }\n\n setColorScheme(scheme: MdzipColorSchemePreference): void {\n this.view?.setColorScheme(scheme);\n }\n\n flush(): Promise<MdzipEditorSnapshot | null> {\n return this.view?.flush() ?? Promise.resolve(null);\n }\n\n serialize(): Promise<Blob | null> {\n return this.view?.serialize() ?? Promise.resolve(null);\n }\n\n getCurrentSnapshot(): Promise<MdzipEditorSnapshot | null> {\n return this.view?.getCurrentSnapshot() ?? Promise.resolve(null);\n }\n\n whenRendered(): Promise<void> {\n return this.view?.whenRendered() ?? Promise.resolve();\n }\n\n /** See `MdzipWorkspaceView.scrollToAnchor` — waits for the preview to mount. */\n scrollToAnchor(anchor: string): Promise<boolean> {\n return this.view?.scrollToAnchor(anchor) ?? Promise.resolve(false);\n }\n\n getAvailableAnchors(): string[] {\n return this.view?.getAvailableAnchors() ?? [];\n }\n\n /** See `MdzipWorkspaceView.openPath` — opens another file, optionally at an anchor. */\n openPath(path: string, options?: MdzipOpenPathOptions): Promise<boolean> {\n return this.view?.openPath(path, options) ?? Promise.resolve(false);\n }\n\n /** The archive path of the file currently shown, or null before a workspace opens. */\n getCurrentPath(): string | null {\n return this.view?.getCurrentPath() ?? null;\n }\n\n markPersisted(): void {\n this.view?.markPersisted();\n }\n\n addAsset(archivePath: string, fileBytes: Uint8Array): Promise<void> {\n return this.view?.addAsset(archivePath, fileBytes) ?? Promise.resolve();\n }\n\n replaceAsset(archivePath: string, fileBytes: Uint8Array): Promise<boolean> {\n return this.view?.replaceAsset(archivePath, fileBytes) ?? Promise.resolve(false);\n }\n\n /** Asks the file actions' labels and `fileNote` again (see the view's `refreshFileActions()`). */\n refreshFileActions(): void {\n this.view?.refreshFileActions();\n }\n\n removeAsset(archivePath: string, options?: MdzipRemoveAssetOptions): Promise<boolean> {\n return this.view?.removeAsset(archivePath, options) ?? Promise.resolve(false);\n }\n\n removeFile(archivePath: string): Promise<boolean> {\n return this.view?.removeFile(archivePath) ?? Promise.resolve(false);\n }\n\n renameFile(oldPath: string, newPath: string): Promise<boolean> {\n return this.view?.renameFile(oldPath, newPath) ?? Promise.resolve(false);\n }\n\n setEntryPoint(archivePath: string): Promise<boolean> {\n return this.view?.setEntryPoint(archivePath) ?? Promise.resolve(false);\n }\n\n packFilesAsWorkspace(\n files: readonly MdzipPackFilesInput[],\n options?: { title?: string; fileName?: string }\n ): Promise<MdzipPackFilesResult | null> {\n return this.view?.packFilesAsWorkspace(files, options) ?? Promise.resolve(null);\n }\n\n setCoverImage(archivePath: string | null): Promise<boolean> {\n return this.view?.setCoverImage(archivePath) ?? Promise.resolve(false);\n }\n\n listAssets(): MdzWorkspaceAsset[] {\n return this.view?.listAssets() ?? [];\n }\n\n private syncView(preserveSelection = false): void {\n const initialPath = preserveSelection ? this.view?.getCurrentPath() ?? undefined : undefined;\n if (this.view && this.workspace) {\n void this.view.openWorkspace(this.workspace, {\n mode: this.mode,\n sourceFormat: this.sourceFormat,\n fileName: this.fileName,\n worker: this.worker,\n initialPath\n });\n } else if (this.view && this.bytes) {\n void this.view.open(this.bytes, {\n mode: this.mode,\n sourceFormat: this.sourceFormat,\n fileName: this.fileName,\n worker: this.worker,\n initialPath\n });\n }\n }\n\n private createView(): void {\n this.view?.destroy();\n this.view = new MdzipWorkspaceView(this.hostRef.nativeElement, {\n libraries: [PACKAGE_INFO],\n controls: this.controls,\n toolbarDensity: this.toolbarDensity,\n contentDensity: this.contentDensity,\n imageHydrationAnimation: this.imageHydrationAnimation,\n imageInsertMode: this.imageInsertMode,\n initialLayout: this.initialLayout,\n initialColorScheme: this.initialColorScheme,\n previewMaxWidth: this.previewMaxWidth,\n systemColorScheme: this.systemColorScheme,\n progressiveTextRendering: this.progressiveTextRendering,\n inlineSvgLinks: this.inlineSvgLinks,\n eagerImages: this.eagerImages,\n hostFileActions: this.hostFileActions,\n fileNote: this.fileNote ? (file) => this.fileNote?.(file) ?? null : undefined,\n fileCardHelp: this.fileCardHelp,\n navigationMode: this.navigationMode,\n navigationButtonActive: this.navigationButtonActive,\n onChanged: (bytes, snapshot) => this.changed.emit({ bytes, snapshot }),\n onSaved: (bytes, snapshot) => this.saved.emit({ bytes, snapshot }),\n onWorkspaceChanged: (event) => this.workspaceChanged.emit(event),\n onDocumentChanged: (event) => this.documentChanged.emit(event),\n onAssetChanged: (event) => this.assetChanged.emit(event),\n onManifestChanged: (event) => this.manifestChanged.emit(event),\n onSnapshotChanged: (snapshot) => this.snapshotChanged.emit(snapshot),\n onSelectionChanged: (snapshot: MdzipWorkspaceSnapshot) => this.selectionChanged.emit(snapshot),\n onDirtyChanged: (snapshot: MdzipWorkspaceSnapshot) => this.dirtyChanged.emit(snapshot),\n onValidationChanged: (snapshot: MdzipWorkspaceSnapshot) => this.validationChanged.emit(snapshot),\n onColorSchemeChanged: (colorScheme: MdzipColorScheme) => this.colorSchemeChanged.emit(colorScheme),\n onColorSchemePreferenceChanged: (preference: MdzipColorSchemePreference) =>\n this.colorSchemePreferenceChanged.emit(preference),\n onPreviewWidthChanged: (width: MdzipPreviewWidthChoice) => this.previewWidthChanged.emit(width),\n onPreviewRendered: (snapshot: MdzipWorkspaceSnapshot) => this.previewRendered.emit(snapshot),\n onAssetsHydrated: (snapshot: MdzipWorkspaceSnapshot) => this.assetsHydrated.emit(snapshot),\n onAssetsProgress: (progress: MdzipAssetsProgress) => this.assetsProgress.emit(progress),\n onLinkActivated: (event: MdzipLinkActivatedEvent) => this.linkActivated.emit(event),\n externalLinks: this.externalLinks,\n onFailed: (e: unknown) => this.failed.emit(e),\n onExtractFiles: this.onExtractFiles\n ? (request) => this.onExtractFiles!(request)\n : undefined,\n outline: this.outline,\n onOutlineVisibilityChanged: (visible) => this.outlineVisibilityChanged.emit(visible),\n onOutlinePositionChanged: (position) => this.outlinePositionChanged.emit(position),\n onOutlineWidthChanged: (width) => this.outlineWidthChanged.emit(width),\n showWhitespace: this.showWhitespace,\n onWhitespaceVisibilityChanged: (visible) => this.whitespaceVisibilityChanged.emit(visible),\n manifestView: this.manifestView,\n jsonStatus: this.jsonStatus,\n onJsonValidityChanged: (validity, path) => this.jsonValidityChanged.emit({ validity, path }),\n onConversionRequested: this.onConversionRequested\n ? (action, context) => this.onConversionRequested!(action, context)\n : undefined,\n onPackRequested: this.onPackRequested\n ? (request, context) => this.onPackRequested!(request, context)\n : undefined,\n imageInsertHandler: (request) => this.imageInsertHandler?.(request),\n imageEditHandler: (request) => this.imageEditHandler?.(request),\n markdownRenderer: this.markdownRenderer,\n markdownExtensions: this.markdownExtensions,\n entryRenderers: this.composedEntryRenderers(),\n frontMatter: this.frontMatter,\n });\n this.renderingKey = renderingConfigKey(this.markdownExtensions, this.composedEntryRenderers(), this.frontMatter);\n }\n\n private composedEntryRenderers(): readonly MdzipEntryRenderer[] {\n const templates = this.entryTemplates\n ? this.entryTemplates.map((directive, index) => directive.toEntryRenderer(index))\n : [];\n return [...this.entryRenderers, ...templates];\n }\n\n // Applies rendering input changes in place — never a view rebuild. Arrays\n // re-apply only when their name/id key changes, so template expressions\n // that produce new array identities each cycle are safe.\n private applyRenderingOptions(rendererChanged: boolean): void {\n const composed = this.composedEntryRenderers();\n const key = renderingConfigKey(this.markdownExtensions, composed, this.frontMatter);\n if (!rendererChanged && key === this.renderingKey) {\n return;\n }\n this.renderingKey = key;\n this.view?.setRenderingOptions({\n markdownRenderer: this.markdownRenderer ?? null,\n markdownExtensions: this.markdownExtensions,\n entryRenderers: composed,\n frontMatter: this.frontMatter,\n });\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport type {\n MdzipDiffControlsOptions,\n MdzipDiffSelectionEvent,\n MdzipDiffSideInput,\n MdzipDiffToolbarAction,\n MdzipDiffView,\n MdzipDiffViewOptions\n} from '@mdzip/editor/diff-view';\n\n@Component({\n selector: 'mdzip-diff',\n standalone: true,\n template: '<div #host></div>',\n styles: [':host { display:block; height:100%; } div { height:100%; }'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MdzipDiffComponent implements AfterViewInit, OnChanges, OnDestroy {\n @Input({ required: true }) before!: MdzipDiffSideInput;\n @Input({ required: true }) after!: MdzipDiffSideInput;\n @Input() initialPath?: string;\n @Input() showUnchanged = true;\n @Input() navigationVisible = true;\n @Input() controls?: MdzipDiffControlsOptions;\n @Input() toolbarActions: readonly MdzipDiffToolbarAction[] = [];\n @Output() readonly selectionChanged = new EventEmitter<MdzipDiffSelectionEvent>();\n @Output() readonly failed = new EventEmitter<Error>();\n\n @ViewChild('host') private readonly hostRef!: ElementRef<HTMLDivElement>;\n private view: MdzipDiffView | null = null;\n private destroyed = false;\n\n ngAfterViewInit(): void {\n void this.createView();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this.view) return;\n if (changes['before'] || changes['after'] || changes['initialPath']) {\n void this.view.open(this.options());\n }\n if (changes['showUnchanged']) this.view.setShowUnchanged(this.showUnchanged);\n if (changes['navigationVisible']) this.view.setNavigationVisible(this.navigationVisible);\n if (changes['toolbarActions']) this.view.setToolbarActions(this.toolbarActions);\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.view?.destroy();\n this.view = null;\n }\n\n openPath(path: string): Promise<boolean> {\n return this.view?.openPath(path) ?? Promise.resolve(false);\n }\n\n openPreviousChange(): Promise<boolean> {\n return this.view?.openPreviousChange() ?? Promise.resolve(false);\n }\n\n openNextChange(): Promise<boolean> {\n return this.view?.openNextChange() ?? Promise.resolve(false);\n }\n\n setShowUnchanged(show: boolean): void {\n this.view?.setShowUnchanged(show);\n }\n\n setNavigationVisible(visible: boolean): void {\n this.view?.setNavigationVisible(visible);\n }\n\n setToolbarActions(actions: readonly MdzipDiffToolbarAction[]): void {\n this.view?.setToolbarActions(actions);\n }\n\n private async createView(): Promise<void> {\n const { MdzipDiffView } = await import('@mdzip/editor/diff-view');\n if (this.destroyed) return;\n this.view = new MdzipDiffView(this.hostRef.nativeElement, this.options());\n }\n\n private options(): MdzipDiffViewOptions {\n return {\n before: this.before,\n after: this.after,\n initialPath: this.initialPath,\n showUnchanged: this.showUnchanged,\n navigationVisible: this.navigationVisible,\n controls: this.controls,\n toolbarActions: this.toolbarActions,\n onSelectionChanged: (event) => this.selectionChanged.emit(event),\n onFailed: (error) => this.failed.emit(error)\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AASA;;;;;;;;;;;;;;;;;AAiBG;MAKU,2BAA2B,CAAA;AAJxC,IAAA,WAAA,GAAA;AAKW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,EAAC,WAA8C,EAAC;AAC5D,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;;QAGnD,IAAA,CAAA,kBAAkB,GAA+B,EAAE;AAoD7D,IAAA;;AA3CC,IAAA,eAAe,CAAC,KAAa,EAAA;QAC3B,MAAM,KAAK,GAAG,CAAC,OAAO,IAAI,CAAC,kBAAkB,KAAK;AAChD,cAAE,CAAC,IAAI,CAAC,kBAAkB;AAC1B,cAAE,IAAI,CAAC,kBAAkB,EACzB,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;QAErE,OAAO;YACL,EAAE,EAAE,IAAI,CAAC;oBACH,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,CAAA,kBAAA,EAAqB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE,GAAG,CAAA,kBAAA,EAAqB,KAAK,CAAA,CAAE,CAAC;AAC/F,YAAA,QAAQ,EAAE,IAAI,CAAC,0BAA0B,IAAI,CAAC;YAC9C,OAAO,EAAE,CAAC,OAAO,KAAK,IAAI,CAAC;AACzB,kBAAE,IAAI,CAAC,uBAAuB,CAAC,OAAO;kBACpC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AAC9C,YAAA,KAAK,EAAE,CAAC,SAAS,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AAA,QAAA,EAAA,YAAY,cACV,IAAI,EAAA,QAAA,EACN,mBAAmB,EAAA,eAAA,EAEZ,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,oDAAA,CAAA,EAAA;;sBAG9C,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAEA,SAAS;uBAAC,MAAM;;;ACxCnB;;AAEG;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { AfterContentInit, AfterViewInit, OnChanges, OnDestroy, EventEmitter, SimpleChanges, TemplateRef } from '@angular/core';
3
- import { MdzipJsonValidity, MdzWorkspace, MdzipWorkspaceMode, MdzipSourceFormat, MdzipControlPreset, MdzipControlPolicy, MdzipToolbarDensity, MdzipContentDensity, MdzipImageHydrationAnimation, MdzipImageInsertMode, MdzipImageInsertHandler, MdzipImageEditHandler, MdzipWorkspaceLayout, MdzipColorSchemePreference, MdzipPreviewMaxWidth, MdzipSystemColorScheme, MdzipFileAction, MdzipNavigationMode, MdzipConversionAction, MdzipConversionContext, MdzipPackFilesRequest, MdzipPackFilesContext, MdzipMarkdownRenderer, MdzipMarkdownRenderExtension, MdzipEntryRenderer, MdzipFrontMatterOptions, MdzipExternalLinkPolicy, MdzipExtractRequest, MdzipOutlineViewOptions, MdzipWorkspaceChange, MdzipWorkspaceSave, MdzipDocumentChangeEvent, MdzipWorkspaceSnapshot, MdzipColorScheme, MdzipPreviewWidthChoice, MdzipLinkActivatedEvent, MdzipEditorCommand, MdzipOutlinePosition, MdzipExtractedFile, MdzipEditorSnapshot, MdzipOpenPathOptions, MdzipRemoveAssetOptions, MdzipPackFilesInput, MdzipPackFilesResult, MdzWorkspaceAsset, MdzipEntryRenderContext } from '@mdzip/editor';
3
+ import { MdzipJsonValidity, MdzWorkspace, MdzipWorkspaceMode, MdzipSourceFormat, MdzipControlPreset, MdzipControlPolicy, MdzipToolbarDensity, MdzipContentDensity, MdzipImageHydrationAnimation, MdzipImageInsertMode, MdzipImageInsertHandler, MdzipImageEditHandler, MdzipWorkspaceLayout, MdzipColorSchemePreference, MdzipPreviewMaxWidth, MdzipSystemColorScheme, MdzipFileAction, MdzipFileActionTarget, MdzipFileCardHelp, MdzipNavigationMode, MdzipConversionAction, MdzipConversionContext, MdzipPackFilesRequest, MdzipPackFilesContext, MdzipMarkdownRenderer, MdzipMarkdownRenderExtension, MdzipEntryRenderer, MdzipFrontMatterOptions, MdzipExternalLinkPolicy, MdzipExtractRequest, MdzipOutlineViewOptions, MdzipWorkspaceChange, MdzipWorkspaceSave, MdzipDocumentChangeEvent, MdzipWorkspaceSnapshot, MdzipColorScheme, MdzipPreviewWidthChoice, MdzipAssetsProgress, MdzipLinkActivatedEvent, MdzipOutlinePosition, MdzipEditorCommand, MdzipExtractedFile, MdzipEditorSnapshot, MdzipOpenPathOptions, MdzipRemoveAssetOptions, MdzipPackFilesInput, MdzipPackFilesResult, MdzWorkspaceAsset, MdzipEntryRenderContext } from '@mdzip/editor';
4
4
  import { MdzipDiffSideInput, MdzipDiffControlsOptions, MdzipDiffToolbarAction, MdzipDiffSelectionEvent } from '@mdzip/editor/diff-view';
5
5
 
6
6
  /** What `jsonValidityChanged` emits: the open `.json` file's validity, or `null`s when another kind of file is open. */
@@ -54,8 +54,18 @@ declare class MdzipWorkspaceComponent implements AfterContentInit, AfterViewInit
54
54
  * clicked (see the view option). Defaults to `true`. Constructor-only.
55
55
  */
56
56
  inlineSvgLinks?: boolean;
57
+ /**
58
+ * Loads every image as soon as the preview mounts, for a preview nobody
59
+ * scrolls, such as an off-screen copy for printing (see the view option).
60
+ * Defaults to `false`. Constructor-only.
61
+ */
62
+ eagerImages?: boolean;
57
63
  /** Extra file tree menu items for files, run by the host (see the view option). Read when the view is created. */
58
64
  hostFileActions?: readonly MdzipFileAction[];
65
+ /** A line for the card of a file the preview can't show (see the view option). Read when the view is created. */
66
+ fileNote?: (file: MdzipFileActionTarget) => string | null;
67
+ /** A help link at the bottom of that card (see the view option). Read when the view is created. */
68
+ fileCardHelp?: MdzipFileCardHelp;
59
69
  navigationMode: MdzipNavigationMode;
60
70
  navigationButtonActive: boolean;
61
71
  /**
@@ -132,6 +142,7 @@ declare class MdzipWorkspaceComponent implements AfterContentInit, AfterViewInit
132
142
  readonly previewRendered: EventEmitter<MdzipWorkspaceSnapshot>;
133
143
  /** Emits once the mounted preview's images have finished loading. */
134
144
  readonly assetsHydrated: EventEmitter<MdzipWorkspaceSnapshot>;
145
+ readonly assetsProgress: EventEmitter<MdzipAssetsProgress>;
135
146
  /**
136
147
  * Emits for every click on a preview link, before the view's own handling.
137
148
  * Call `event.preventDefault()` in the handler to take over navigation.
@@ -140,6 +151,8 @@ declare class MdzipWorkspaceComponent implements AfterContentInit, AfterViewInit
140
151
  readonly failed: EventEmitter<unknown>;
141
152
  /** Emits when the reader shows or hides the outline from the toolbar. */
142
153
  readonly outlineVisibilityChanged: EventEmitter<boolean>;
154
+ /** Emits the outline panel's side when the reader moves it from the toolbar. */
155
+ readonly outlinePositionChanged: EventEmitter<MdzipOutlinePosition>;
143
156
  /** Emits the outline panel's width (pixels) when the reader finishes dragging its edge. */
144
157
  readonly outlineWidthChanged: EventEmitter<number>;
145
158
  /** Emits when the reader shows or hides whitespace from the toolbar. */
@@ -168,6 +181,8 @@ declare class MdzipWorkspaceComponent implements AfterContentInit, AfterViewInit
168
181
  setOutlineVisible(visible: boolean): void;
169
182
  /** Puts the outline panel on the left or the right of the document. */
170
183
  setOutlinePosition(position: MdzipOutlinePosition): void;
184
+ /** Switches to Edit (`'source'`), Split or View (`'preview'`), as the toolbar's buttons do. */
185
+ setLayout(layout: MdzipWorkspaceLayout): Promise<void>;
171
186
  /** The archive's files as `{ path, bytes }`, by file or folder path (see the view's `extractFiles()`). */
172
187
  extractFiles(paths: readonly string[], options?: {
173
188
  includeFolders?: boolean;
@@ -188,6 +203,8 @@ declare class MdzipWorkspaceComponent implements AfterContentInit, AfterViewInit
188
203
  markPersisted(): void;
189
204
  addAsset(archivePath: string, fileBytes: Uint8Array): Promise<void>;
190
205
  replaceAsset(archivePath: string, fileBytes: Uint8Array): Promise<boolean>;
206
+ /** Asks the file actions' labels and `fileNote` again (see the view's `refreshFileActions()`). */
207
+ refreshFileActions(): void;
191
208
  removeAsset(archivePath: string, options?: MdzipRemoveAssetOptions): Promise<boolean>;
192
209
  removeFile(archivePath: string): Promise<boolean>;
193
210
  renameFile(oldPath: string, newPath: string): Promise<boolean>;
@@ -203,7 +220,7 @@ declare class MdzipWorkspaceComponent implements AfterContentInit, AfterViewInit
203
220
  private composedEntryRenderers;
204
221
  private applyRenderingOptions;
205
222
  static ɵfac: i0.ɵɵFactoryDeclaration<MdzipWorkspaceComponent, never>;
206
- static ɵcmp: i0.ɵɵComponentDeclaration<MdzipWorkspaceComponent, "mdzip-workspace", never, { "bytes": { "alias": "bytes"; "required": false; }; "workspace": { "alias": "workspace"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "preserveSelectionOnReopen": { "alias": "preserveSelectionOnReopen"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "sourceFormat": { "alias": "sourceFormat"; "required": false; }; "worker": { "alias": "worker"; "required": false; }; "controls": { "alias": "controls"; "required": false; }; "toolbarDensity": { "alias": "toolbarDensity"; "required": false; }; "contentDensity": { "alias": "contentDensity"; "required": false; }; "imageHydrationAnimation": { "alias": "imageHydrationAnimation"; "required": false; }; "imageInsertMode": { "alias": "imageInsertMode"; "required": false; }; "imageInsertHandler": { "alias": "imageInsertHandler"; "required": false; }; "imageEditHandler": { "alias": "imageEditHandler"; "required": false; }; "initialLayout": { "alias": "initialLayout"; "required": false; }; "initialColorScheme": { "alias": "initialColorScheme"; "required": false; }; "previewMaxWidth": { "alias": "previewMaxWidth"; "required": false; }; "systemColorScheme": { "alias": "systemColorScheme"; "required": false; }; "progressiveTextRendering": { "alias": "progressiveTextRendering"; "required": false; }; "inlineSvgLinks": { "alias": "inlineSvgLinks"; "required": false; }; "hostFileActions": { "alias": "hostFileActions"; "required": false; }; "navigationMode": { "alias": "navigationMode"; "required": false; }; "navigationButtonActive": { "alias": "navigationButtonActive"; "required": false; }; "onConversionRequested": { "alias": "onConversionRequested"; "required": false; }; "onPackRequested": { "alias": "onPackRequested"; "required": false; }; "markdownRenderer": { "alias": "markdownRenderer"; "required": false; }; "markdownExtensions": { "alias": "markdownExtensions"; "required": false; }; "entryRenderers": { "alias": "entryRenderers"; "required": false; }; "frontMatter": { "alias": "frontMatter"; "required": false; }; "externalLinks": { "alias": "externalLinks"; "required": false; }; "onExtractFiles": { "alias": "onExtractFiles"; "required": false; }; "outline": { "alias": "outline"; "required": false; }; "showWhitespace": { "alias": "showWhitespace"; "required": false; }; "manifestView": { "alias": "manifestView"; "required": false; }; "jsonStatus": { "alias": "jsonStatus"; "required": false; }; }, { "changed": "changed"; "saved": "saved"; "workspaceChanged": "workspaceChanged"; "documentChanged": "documentChanged"; "assetChanged": "assetChanged"; "manifestChanged": "manifestChanged"; "snapshotChanged": "snapshotChanged"; "selectionChanged": "selectionChanged"; "dirtyChanged": "dirtyChanged"; "validationChanged": "validationChanged"; "colorSchemeChanged": "colorSchemeChanged"; "colorSchemePreferenceChanged": "colorSchemePreferenceChanged"; "previewWidthChanged": "previewWidthChanged"; "previewRendered": "previewRendered"; "assetsHydrated": "assetsHydrated"; "linkActivated": "linkActivated"; "failed": "failed"; "outlineVisibilityChanged": "outlineVisibilityChanged"; "outlineWidthChanged": "outlineWidthChanged"; "whitespaceVisibilityChanged": "whitespaceVisibilityChanged"; "jsonValidityChanged": "jsonValidityChanged"; }, ["entryTemplates"], never, true, never>;
223
+ static ɵcmp: i0.ɵɵComponentDeclaration<MdzipWorkspaceComponent, "mdzip-workspace", never, { "bytes": { "alias": "bytes"; "required": false; }; "workspace": { "alias": "workspace"; "required": false; }; "fileName": { "alias": "fileName"; "required": false; }; "preserveSelectionOnReopen": { "alias": "preserveSelectionOnReopen"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "sourceFormat": { "alias": "sourceFormat"; "required": false; }; "worker": { "alias": "worker"; "required": false; }; "controls": { "alias": "controls"; "required": false; }; "toolbarDensity": { "alias": "toolbarDensity"; "required": false; }; "contentDensity": { "alias": "contentDensity"; "required": false; }; "imageHydrationAnimation": { "alias": "imageHydrationAnimation"; "required": false; }; "imageInsertMode": { "alias": "imageInsertMode"; "required": false; }; "imageInsertHandler": { "alias": "imageInsertHandler"; "required": false; }; "imageEditHandler": { "alias": "imageEditHandler"; "required": false; }; "initialLayout": { "alias": "initialLayout"; "required": false; }; "initialColorScheme": { "alias": "initialColorScheme"; "required": false; }; "previewMaxWidth": { "alias": "previewMaxWidth"; "required": false; }; "systemColorScheme": { "alias": "systemColorScheme"; "required": false; }; "progressiveTextRendering": { "alias": "progressiveTextRendering"; "required": false; }; "inlineSvgLinks": { "alias": "inlineSvgLinks"; "required": false; }; "eagerImages": { "alias": "eagerImages"; "required": false; }; "hostFileActions": { "alias": "hostFileActions"; "required": false; }; "fileNote": { "alias": "fileNote"; "required": false; }; "fileCardHelp": { "alias": "fileCardHelp"; "required": false; }; "navigationMode": { "alias": "navigationMode"; "required": false; }; "navigationButtonActive": { "alias": "navigationButtonActive"; "required": false; }; "onConversionRequested": { "alias": "onConversionRequested"; "required": false; }; "onPackRequested": { "alias": "onPackRequested"; "required": false; }; "markdownRenderer": { "alias": "markdownRenderer"; "required": false; }; "markdownExtensions": { "alias": "markdownExtensions"; "required": false; }; "entryRenderers": { "alias": "entryRenderers"; "required": false; }; "frontMatter": { "alias": "frontMatter"; "required": false; }; "externalLinks": { "alias": "externalLinks"; "required": false; }; "onExtractFiles": { "alias": "onExtractFiles"; "required": false; }; "outline": { "alias": "outline"; "required": false; }; "showWhitespace": { "alias": "showWhitespace"; "required": false; }; "manifestView": { "alias": "manifestView"; "required": false; }; "jsonStatus": { "alias": "jsonStatus"; "required": false; }; }, { "changed": "changed"; "saved": "saved"; "workspaceChanged": "workspaceChanged"; "documentChanged": "documentChanged"; "assetChanged": "assetChanged"; "manifestChanged": "manifestChanged"; "snapshotChanged": "snapshotChanged"; "selectionChanged": "selectionChanged"; "dirtyChanged": "dirtyChanged"; "validationChanged": "validationChanged"; "colorSchemeChanged": "colorSchemeChanged"; "colorSchemePreferenceChanged": "colorSchemePreferenceChanged"; "previewWidthChanged": "previewWidthChanged"; "previewRendered": "previewRendered"; "assetsHydrated": "assetsHydrated"; "assetsProgress": "assetsProgress"; "linkActivated": "linkActivated"; "failed": "failed"; "outlineVisibilityChanged": "outlineVisibilityChanged"; "outlinePositionChanged": "outlinePositionChanged"; "outlineWidthChanged": "outlineWidthChanged"; "whitespaceVisibilityChanged": "whitespaceVisibilityChanged"; "jsonValidityChanged": "jsonValidityChanged"; }, ["entryTemplates"], never, true, never>;
207
224
  }
208
225
 
209
226
  /** Template context available via `let-context` (also the `$implicit` value). */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../src/workspace.component.ts","../src/entry-renderer.directive.ts","../src/diff.component.ts"],"mappings":";;;;;AAmEA;AACA,iCAAiB;AACf,cAAU,iBAAiB;AAC3B;AACD;AAoBD,cAAA,uBAOa,4BAAmC,EAAA,wBAAiC,EAAA,SAAW;AACjF,WAAO,UAAU;AACjB,eAAW,YAAY;AACvB;AACT;;;;AAIG;AACM;UACM,kBAAkB;mBACT,iBAAiB;AACzC;;;;;;;AAOG;aACe,MAAM;AACf,cAAU,kBAAkB,GAAG,kBAAkB;qBAChC,mBAAmB;qBACnB,mBAAmB;8BACV,4BAA4B;sBACpC,oBAAoB;yBACjB,uBAAuB;uBACzB,qBAAqB;oBACxB,oBAAoB;yBACf,0BAA0B;;sBAE7B,oBAAoB;;wBAElB,sBAAsB;AACnD;;;;;AAKG;;AAEH;;;AAGG;;;AAGM,+BAA2B,eAAe;oBAC1B,mBAAmB;AACnC;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sB,OAAO,CAAC,mBAAmB;AAIjD,oBAAgB,OAAO;;oCAKS,OAAO;;;AASvC,qCAAiC,oBAAoB,GAAG,OAAO;;;AAS/D;AAIA,6CAAyC,UAAU,GAAG,OAAO;AAI7D,iDAA6C,UAAU,GAAG,OAAO;AAIjE,+CAA2C,uBAAuB,GAAG,OAAO;qCAI3C,OAAO;AAIxC,kDAA8C,OAAO;wCAIjB,OAAO;yCAKzB,mBAAmB;;;AACY,QAC9C,OAAO,CAAC,oBAAoB;+CAIY,OAAO;kBAIpC,iBAAiB;AAI/B;AAqBA;AAgEA;AAUA;yCA9bW,uBAAuB;2CAAvB,uBAAuB;AA4cnC;;AC3iBD;AACA,2CAAiB;eACJ,uBAAuB;aACzB,uBAAuB;AACjC;AAED;;;;;;;;;;;;;;;;;AAiBG;AACH,cAAA,2BAIa;0BACS,WAAA;AACpB;;AAGS;;wCAEoC,uBAAuB;;;;;;AAOpE,oCAAgC,kBAAkB;yCAdvC,2BAA2B;2CAA3B,2BAA2B;AAyDvC;;AClED,cAAA,8BAOgC,aAAW,EAAA,SAAe,EAAA,SAAW;YAC/B,kBAAkB;WACnB,kBAAkB;;AAE5C;AACA;eACW,wBAAwB;AACnC,6BAAyB,sBAAsB;+BACrB,YAAA,CAAA,uBAAA;qBACV,YAAA,CAAA,KAAA;AAEN;;;AAInB;AAIA,yBAAqB,aAAa;AAUlC;4BAMwB,OAAO;AAI/B,0BAAsB,OAAO;AAI7B,sBAAkB,OAAO;AAIzB;AAIA;AAIA,wCAAoC,sBAAsB;;AAU1D;yCAjEW,kBAAkB;2CAAlB,kBAAkB;AA8E9B;;;;","names":[]}
1
+ {"version":3,"file":"index.d.ts","sources":["../src/workspace.component.ts","../src/entry-renderer.directive.ts","../src/diff.component.ts"],"mappings":";;;;;AAsEA;AACA,iCAAiB;AACf,cAAU,iBAAiB;AAC3B;AACD;AAoBD,cAAA,uBAOa,4BAAmC,EAAA,wBAAiC,EAAA,SAAW;AACjF,WAAO,UAAU;AACj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;eACW,wBAAwB;AACnC,6BAAyB,sBAAsB;+BACrB,YAAA,CAAA,uBAAA;qBACV,YAAA,CAAA,KAAA;AAEN;;;AAInB;AAIA,yBAAqB,aAAa;AAUlC;4BAMwB,OAAO;AAI/B,0BAAsB,OAAO;AAI7B,sBAAkB,OAAO;AAIzB;AAIA;AAIA,wCAAoC,sBAAsB;;AAU1D;yCAjEW,kBAAkB;2CAAlB,kBAAkB;AA8E9B;;;;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdzip/editor-ng",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
4
4
  "description": "Angular wrapper for the MDZip workspace editor.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "peerDependencies": {
30
30
  "@angular/common": ">=20.0.0",
31
31
  "@angular/core": ">=20.0.0",
32
- "@mdzip/editor": "^2.5.0"
32
+ "@mdzip/editor": "^2.6.0"
33
33
  },
34
34
  "dependencies": {
35
35
  "tslib": "^2.8.1"