@memberjunction/ng-artifacts 5.39.0 → 5.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/lib/artifacts.module.d.ts +26 -13
  2. package/dist/lib/artifacts.module.d.ts.map +1 -1
  3. package/dist/lib/artifacts.module.js +65 -2
  4. package/dist/lib/artifacts.module.js.map +1 -1
  5. package/dist/lib/components/artifact-message-card.component.d.ts +17 -1
  6. package/dist/lib/components/artifact-message-card.component.d.ts.map +1 -1
  7. package/dist/lib/components/artifact-message-card.component.js +118 -27
  8. package/dist/lib/components/artifact-message-card.component.js.map +1 -1
  9. package/dist/lib/components/base-artifact-viewer.component.d.ts +11 -0
  10. package/dist/lib/components/base-artifact-viewer.component.d.ts.map +1 -1
  11. package/dist/lib/components/base-artifact-viewer.component.js +11 -0
  12. package/dist/lib/components/base-artifact-viewer.component.js.map +1 -1
  13. package/dist/lib/components/plugins/audio-artifact-viewer.component.d.ts +32 -0
  14. package/dist/lib/components/plugins/audio-artifact-viewer.component.d.ts.map +1 -0
  15. package/dist/lib/components/plugins/audio-artifact-viewer.component.js +146 -0
  16. package/dist/lib/components/plugins/audio-artifact-viewer.component.js.map +1 -0
  17. package/dist/lib/components/plugins/image-artifact-viewer.component.d.ts +11 -1
  18. package/dist/lib/components/plugins/image-artifact-viewer.component.d.ts.map +1 -1
  19. package/dist/lib/components/plugins/image-artifact-viewer.component.js +17 -1
  20. package/dist/lib/components/plugins/image-artifact-viewer.component.js.map +1 -1
  21. package/dist/lib/components/plugins/video-artifact-viewer.component.d.ts +34 -0
  22. package/dist/lib/components/plugins/video-artifact-viewer.component.d.ts.map +1 -0
  23. package/dist/lib/components/plugins/video-artifact-viewer.component.js +148 -0
  24. package/dist/lib/components/plugins/video-artifact-viewer.component.js.map +1 -0
  25. package/dist/lib/components/previews/audio-artifact-preview.component.d.ts +20 -0
  26. package/dist/lib/components/previews/audio-artifact-preview.component.d.ts.map +1 -0
  27. package/dist/lib/components/previews/audio-artifact-preview.component.js +83 -0
  28. package/dist/lib/components/previews/audio-artifact-preview.component.js.map +1 -0
  29. package/dist/lib/components/previews/base-artifact-preview.component.d.ts +33 -0
  30. package/dist/lib/components/previews/base-artifact-preview.component.d.ts.map +1 -0
  31. package/dist/lib/components/previews/base-artifact-preview.component.js +52 -0
  32. package/dist/lib/components/previews/base-artifact-preview.component.js.map +1 -0
  33. package/dist/lib/components/previews/image-artifact-preview.component.d.ts +28 -0
  34. package/dist/lib/components/previews/image-artifact-preview.component.d.ts.map +1 -0
  35. package/dist/lib/components/previews/image-artifact-preview.component.js +91 -0
  36. package/dist/lib/components/previews/image-artifact-preview.component.js.map +1 -0
  37. package/dist/lib/components/previews/video-artifact-preview.component.d.ts +21 -0
  38. package/dist/lib/components/previews/video-artifact-preview.component.d.ts.map +1 -0
  39. package/dist/lib/components/previews/video-artifact-preview.component.js +84 -0
  40. package/dist/lib/components/previews/video-artifact-preview.component.js.map +1 -0
  41. package/dist/lib/interfaces/artifact-viewer-plugin.interface.d.ts +53 -10
  42. package/dist/lib/interfaces/artifact-viewer-plugin.interface.d.ts.map +1 -1
  43. package/dist/lib/interfaces/artifact-viewer-plugin.interface.js.map +1 -1
  44. package/dist/lib/services/artifact-preview-resolver.service.d.ts +39 -0
  45. package/dist/lib/services/artifact-preview-resolver.service.d.ts.map +1 -0
  46. package/dist/lib/services/artifact-preview-resolver.service.js +78 -0
  47. package/dist/lib/services/artifact-preview-resolver.service.js.map +1 -0
  48. package/dist/public-api.d.ts +7 -0
  49. package/dist/public-api.d.ts.map +1 -1
  50. package/dist/public-api.js +8 -0
  51. package/dist/public-api.js.map +1 -1
  52. package/package.json +18 -18
@@ -0,0 +1,91 @@
1
+ import { ChangeDetectorRef, Component, inject } from '@angular/core';
2
+ import { BaseArtifactPreviewComponent } from './base-artifact-preview.component';
3
+ import * as i0 from "@angular/core";
4
+ function ImageArtifactPreviewComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
5
+ i0.ɵɵelementStart(0, "div", 0);
6
+ i0.ɵɵelement(1, "i", 2);
7
+ i0.ɵɵelementStart(2, "span");
8
+ i0.ɵɵtext(3);
9
+ i0.ɵɵelementEnd()();
10
+ } if (rf & 2) {
11
+ const ctx_r0 = i0.ɵɵnextContext();
12
+ i0.ɵɵadvance(3);
13
+ i0.ɵɵtextInterpolate(ctx_r0.errorMessage);
14
+ } }
15
+ function ImageArtifactPreviewComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
16
+ const _r2 = i0.ɵɵgetCurrentView();
17
+ i0.ɵɵelementStart(0, "img", 3);
18
+ i0.ɵɵlistener("error", function ImageArtifactPreviewComponent_Conditional_1_Template_img_error_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onImageError()); });
19
+ i0.ɵɵelementEnd();
20
+ } if (rf & 2) {
21
+ const ctx_r0 = i0.ɵɵnextContext();
22
+ i0.ɵɵproperty("src", ctx_r0.imageUrl, i0.ɵɵsanitizeUrl)("alt", ctx_r0.altText);
23
+ } }
24
+ /**
25
+ * Inline preview for image artifacts. Renders a single contained `<img>` (max 140px tall) inside
26
+ * the conversation message card. Read-only — no toolbar, no zoom, no download. Clicking it bubbles
27
+ * up through the card's clickable wrapper to open the full-size image viewer.
28
+ *
29
+ * Height note: this is a *thumbnail*, not the full view — kept deliberately compact (140px) so a
30
+ * message with an image artifact doesn't dominate the conversation. `max-width: 100%` (rather than a
31
+ * fixed width) is the only width constraint, so the aspect ratio is preserved and portrait images
32
+ * aren't distorted; the height cap is the single lever for overall size. Kept in sync with the video
33
+ * preview's cap so both visual media previews stay visually consistent.
34
+ */
35
+ export class ImageArtifactPreviewComponent extends BaseArtifactPreviewComponent {
36
+ cdr = inject(ChangeDetectorRef);
37
+ /** Resolved URL bound to `<img src>` — data URI (inline) or pre-auth URL (file). */
38
+ imageUrl = '';
39
+ /** Non-empty hides the image and shows a compact error line. */
40
+ errorMessage = '';
41
+ /** Accessible alt text — prefers a descriptive name over a raw filename. */
42
+ get altText() {
43
+ return this.artifactVersion?.Name || this.artifactVersion?.FileName || 'Image artifact';
44
+ }
45
+ async ngOnInit() {
46
+ try {
47
+ const url = await this.resolveContentUrl();
48
+ if (url) {
49
+ this.imageUrl = url;
50
+ }
51
+ else {
52
+ this.errorMessage = 'No image content.';
53
+ }
54
+ }
55
+ catch {
56
+ this.errorMessage = 'Could not load image.';
57
+ }
58
+ this.cdr.markForCheck();
59
+ }
60
+ onImageError() {
61
+ this.errorMessage = 'Image could not be displayed.';
62
+ this.imageUrl = '';
63
+ this.cdr.markForCheck();
64
+ }
65
+ static ɵfac = /*@__PURE__*/ (() => { let ɵImageArtifactPreviewComponent_BaseFactory; return function ImageArtifactPreviewComponent_Factory(__ngFactoryType__) { return (ɵImageArtifactPreviewComponent_BaseFactory || (ɵImageArtifactPreviewComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ImageArtifactPreviewComponent)))(__ngFactoryType__ || ImageArtifactPreviewComponent); }; })();
66
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ImageArtifactPreviewComponent, selectors: [["mj-image-artifact-preview"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 1, consts: [[1, "image-preview", "image-preview--error"], [1, "image-preview__img", 3, "src", "alt"], [1, "fa-solid", "fa-image"], [1, "image-preview__img", 3, "error", "src", "alt"]], template: function ImageArtifactPreviewComponent_Template(rf, ctx) { if (rf & 1) {
67
+ i0.ɵɵconditionalCreate(0, ImageArtifactPreviewComponent_Conditional_0_Template, 4, 1, "div", 0)(1, ImageArtifactPreviewComponent_Conditional_1_Template, 1, 2, "img", 1);
68
+ } if (rf & 2) {
69
+ i0.ɵɵconditional(ctx.errorMessage ? 0 : ctx.imageUrl ? 1 : -1);
70
+ } }, styles: ["[_nghost-%COMP%] {\n display: block;\n }\n\n .image-preview__img[_ngcontent-%COMP%] {\n display: block;\n max-width: 100%;\n max-height: 140px;\n width: auto;\n height: auto;\n object-fit: contain;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken);\n }\n\n .image-preview--error[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n color: var(--mj-text-muted);\n font-size: 13px;\n }"] });
71
+ }
72
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ImageArtifactPreviewComponent, [{
73
+ type: Component,
74
+ args: [{ standalone: false, selector: 'mj-image-artifact-preview', template: `
75
+ @if (errorMessage) {
76
+ <div class="image-preview image-preview--error">
77
+ <i class="fa-solid fa-image"></i>
78
+ <span>{{ errorMessage }}</span>
79
+ </div>
80
+ } @else if (imageUrl) {
81
+ <img
82
+ class="image-preview__img"
83
+ [src]="imageUrl"
84
+ [alt]="altText"
85
+ (error)="onImageError()"
86
+ />
87
+ }
88
+ `, styles: ["\n :host {\n display: block;\n }\n\n .image-preview__img {\n display: block;\n max-width: 100%;\n max-height: 140px;\n width: auto;\n height: auto;\n object-fit: contain;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken);\n }\n\n .image-preview--error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n color: var(--mj-text-muted);\n font-size: 13px;\n }\n "] }]
89
+ }], null, null); })();
90
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ImageArtifactPreviewComponent, { className: "ImageArtifactPreviewComponent", filePath: "src/lib/components/previews/image-artifact-preview.component.ts", lineNumber: 61 }); })();
91
+ //# sourceMappingURL=image-artifact-preview.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-artifact-preview.component.js","sourceRoot":"","sources":["../../../../src/lib/components/previews/image-artifact-preview.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,EAAU,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;;;IAkBrE,8BAAgD;IAC5C,uBAAiC;IACjC,4BAAM;IAAA,YAAkB;IAC5B,AAD4B,iBAAO,EAC7B;;;IADI,eAAkB;IAAlB,yCAAkB;;;;IAG5B,8BAKE;IADE,8LAAS,qBAAc,KAAC;IAJ5B,iBAKE;;;IAFE,AADA,uDAAgB,uBACD;;AAxB/B;;;;;;;;;;GAUG;AA+CH,MAAM,OAAO,6BAA8B,SAAQ,4BAA4B;IAC1D,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAEjD,oFAAoF;IAC7E,QAAQ,GAAG,EAAE,CAAC;IAErB,gEAAgE;IACzD,YAAY,GAAG,EAAE,CAAC;IAEzB,4EAA4E;IAC5E,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,eAAe,EAAE,IAAI,IAAI,IAAI,CAAC,eAAe,EAAE,QAAQ,IAAI,gBAAgB,CAAC;IAC5F,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,IAAI,CAAC;YACD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3C,IAAI,GAAG,EAAE,CAAC;gBACN,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;YACxB,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAC;YAC5C,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACL,IAAI,CAAC,YAAY,GAAG,uBAAuB,CAAC;QAChD,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IAC5B,CAAC;IAEM,YAAY;QACf,IAAI,CAAC,YAAY,GAAG,+BAA+B,CAAC;QACpD,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IAC5B,CAAC;iSAhCQ,6BAA6B,yBAA7B,6BAA6B;6DAA7B,6BAA6B;YArChC,AALF,+FAAoB,yEAKG;;YALvB,8DAYC;;;iFA8BI,6BAA6B;cA9CzC,SAAS;6BACM,KAAK,YACP,2BAA2B,YAC3B;;;;;;;;;;;;;;KAcT;;kFA6BQ,6BAA6B","sourcesContent":["import { ChangeDetectorRef, Component, inject, OnInit } from '@angular/core';\nimport { BaseArtifactPreviewComponent } from './base-artifact-preview.component';\n\n/**\n * Inline preview for image artifacts. Renders a single contained `<img>` (max 140px tall) inside\n * the conversation message card. Read-only — no toolbar, no zoom, no download. Clicking it bubbles\n * up through the card's clickable wrapper to open the full-size image viewer.\n *\n * Height note: this is a *thumbnail*, not the full view — kept deliberately compact (140px) so a\n * message with an image artifact doesn't dominate the conversation. `max-width: 100%` (rather than a\n * fixed width) is the only width constraint, so the aspect ratio is preserved and portrait images\n * aren't distorted; the height cap is the single lever for overall size. Kept in sync with the video\n * preview's cap so both visual media previews stay visually consistent.\n */\n@Component({\n standalone: false,\n selector: 'mj-image-artifact-preview',\n template: `\n @if (errorMessage) {\n <div class=\"image-preview image-preview--error\">\n <i class=\"fa-solid fa-image\"></i>\n <span>{{ errorMessage }}</span>\n </div>\n } @else if (imageUrl) {\n <img\n class=\"image-preview__img\"\n [src]=\"imageUrl\"\n [alt]=\"altText\"\n (error)=\"onImageError()\"\n />\n }\n `,\n styles: [\n `\n :host {\n display: block;\n }\n\n .image-preview__img {\n display: block;\n max-width: 100%;\n max-height: 140px;\n width: auto;\n height: auto;\n object-fit: contain;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken);\n }\n\n .image-preview--error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n color: var(--mj-text-muted);\n font-size: 13px;\n }\n `,\n ],\n})\nexport class ImageArtifactPreviewComponent extends BaseArtifactPreviewComponent implements OnInit {\n private readonly cdr = inject(ChangeDetectorRef);\n\n /** Resolved URL bound to `<img src>` — data URI (inline) or pre-auth URL (file). */\n public imageUrl = '';\n\n /** Non-empty hides the image and shows a compact error line. */\n public errorMessage = '';\n\n /** Accessible alt text — prefers a descriptive name over a raw filename. */\n public get altText(): string {\n return this.artifactVersion?.Name || this.artifactVersion?.FileName || 'Image artifact';\n }\n\n async ngOnInit(): Promise<void> {\n try {\n const url = await this.resolveContentUrl();\n if (url) {\n this.imageUrl = url;\n } else {\n this.errorMessage = 'No image content.';\n }\n } catch {\n this.errorMessage = 'Could not load image.';\n }\n this.cdr.markForCheck();\n }\n\n public onImageError(): void {\n this.errorMessage = 'Image could not be displayed.';\n this.imageUrl = '';\n this.cdr.markForCheck();\n }\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BaseArtifactPreviewComponent } from './base-artifact-preview.component';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Inline preview for video artifacts. Renders a capped `<video controls preload="metadata">`
6
+ * mini player inside the conversation message card. Click events on the player are stopped from
7
+ * propagating so scrubbing / play-pause does NOT open the full-size viewer (the card's other
8
+ * regions still open it).
9
+ */
10
+ export declare class VideoArtifactPreviewComponent extends BaseArtifactPreviewComponent implements OnInit {
11
+ private readonly cdr;
12
+ /** Resolved URL bound to `<video src>` — data URI (inline) or pre-auth URL (file). */
13
+ videoUrl: string;
14
+ /** Non-empty hides the player and shows a compact error line. */
15
+ errorMessage: string;
16
+ ngOnInit(): Promise<void>;
17
+ onMediaError(): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<VideoArtifactPreviewComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<VideoArtifactPreviewComponent, "mj-video-artifact-preview", never, {}, {}, never, never, false, never>;
20
+ }
21
+ //# sourceMappingURL=video-artifact-preview.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-artifact-preview.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/previews/video-artifact-preview.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;;AAEjF;;;;;GAKG;AACH,qBAmDa,6BAA8B,SAAQ,4BAA6B,YAAW,MAAM;IAC7F,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IAEjD,sFAAsF;IAC/E,QAAQ,SAAM;IAErB,iEAAiE;IAC1D,YAAY,SAAM;IAEnB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAcxB,YAAY,IAAI,IAAI;yCAvBlB,6BAA6B;2CAA7B,6BAA6B;CA4BzC"}
@@ -0,0 +1,84 @@
1
+ import { ChangeDetectorRef, Component, inject } from '@angular/core';
2
+ import { BaseArtifactPreviewComponent } from './base-artifact-preview.component';
3
+ import * as i0 from "@angular/core";
4
+ function VideoArtifactPreviewComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
5
+ i0.ɵɵelementStart(0, "div", 0);
6
+ i0.ɵɵelement(1, "i", 2);
7
+ i0.ɵɵelementStart(2, "span");
8
+ i0.ɵɵtext(3);
9
+ i0.ɵɵelementEnd()();
10
+ } if (rf & 2) {
11
+ const ctx_r0 = i0.ɵɵnextContext();
12
+ i0.ɵɵadvance(3);
13
+ i0.ɵɵtextInterpolate(ctx_r0.errorMessage);
14
+ } }
15
+ function VideoArtifactPreviewComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
16
+ const _r2 = i0.ɵɵgetCurrentView();
17
+ i0.ɵɵelementStart(0, "video", 3);
18
+ i0.ɵɵlistener("click", function VideoArtifactPreviewComponent_Conditional_1_Template_video_click_0_listener($event) { i0.ɵɵrestoreView(_r2); return i0.ɵɵresetView($event.stopPropagation()); })("error", function VideoArtifactPreviewComponent_Conditional_1_Template_video_error_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onMediaError()); });
19
+ i0.ɵɵelementEnd();
20
+ } if (rf & 2) {
21
+ const ctx_r0 = i0.ɵɵnextContext();
22
+ i0.ɵɵproperty("src", ctx_r0.videoUrl, i0.ɵɵsanitizeUrl);
23
+ } }
24
+ /**
25
+ * Inline preview for video artifacts. Renders a capped `<video controls preload="metadata">`
26
+ * mini player inside the conversation message card. Click events on the player are stopped from
27
+ * propagating so scrubbing / play-pause does NOT open the full-size viewer (the card's other
28
+ * regions still open it).
29
+ */
30
+ export class VideoArtifactPreviewComponent extends BaseArtifactPreviewComponent {
31
+ cdr = inject(ChangeDetectorRef);
32
+ /** Resolved URL bound to `<video src>` — data URI (inline) or pre-auth URL (file). */
33
+ videoUrl = '';
34
+ /** Non-empty hides the player and shows a compact error line. */
35
+ errorMessage = '';
36
+ async ngOnInit() {
37
+ try {
38
+ const url = await this.resolveContentUrl();
39
+ if (url) {
40
+ this.videoUrl = url;
41
+ }
42
+ else {
43
+ this.errorMessage = 'No video content.';
44
+ }
45
+ }
46
+ catch {
47
+ this.errorMessage = 'Could not load video.';
48
+ }
49
+ this.cdr.markForCheck();
50
+ }
51
+ onMediaError() {
52
+ this.errorMessage = 'Video could not be played.';
53
+ this.videoUrl = '';
54
+ this.cdr.markForCheck();
55
+ }
56
+ static ɵfac = /*@__PURE__*/ (() => { let ɵVideoArtifactPreviewComponent_BaseFactory; return function VideoArtifactPreviewComponent_Factory(__ngFactoryType__) { return (ɵVideoArtifactPreviewComponent_BaseFactory || (ɵVideoArtifactPreviewComponent_BaseFactory = i0.ɵɵgetInheritedFactory(VideoArtifactPreviewComponent)))(__ngFactoryType__ || VideoArtifactPreviewComponent); }; })();
57
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: VideoArtifactPreviewComponent, selectors: [["mj-video-artifact-preview"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 1, consts: [[1, "video-preview", "video-preview--error"], ["controls", "", "preload", "metadata", 1, "video-preview__video", 3, "src"], [1, "fa-solid", "fa-film"], ["controls", "", "preload", "metadata", 1, "video-preview__video", 3, "click", "error", "src"]], template: function VideoArtifactPreviewComponent_Template(rf, ctx) { if (rf & 1) {
58
+ i0.ɵɵconditionalCreate(0, VideoArtifactPreviewComponent_Conditional_0_Template, 4, 1, "div", 0)(1, VideoArtifactPreviewComponent_Conditional_1_Template, 1, 1, "video", 1);
59
+ } if (rf & 2) {
60
+ i0.ɵɵconditional(ctx.errorMessage ? 0 : ctx.videoUrl ? 1 : -1);
61
+ } }, styles: ["[_nghost-%COMP%] {\n display: block;\n }\n\n \n\n\n\n\n .video-preview__video[_ngcontent-%COMP%] {\n display: block;\n max-width: 100%;\n max-height: 140px;\n width: 100%;\n height: auto;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken);\n }\n\n .video-preview--error[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n color: var(--mj-text-muted);\n font-size: 13px;\n }"] });
62
+ }
63
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(VideoArtifactPreviewComponent, [{
64
+ type: Component,
65
+ args: [{ standalone: false, selector: 'mj-video-artifact-preview', template: `
66
+ @if (errorMessage) {
67
+ <div class="video-preview video-preview--error">
68
+ <i class="fa-solid fa-film"></i>
69
+ <span>{{ errorMessage }}</span>
70
+ </div>
71
+ } @else if (videoUrl) {
72
+ <video
73
+ class="video-preview__video"
74
+ controls
75
+ preload="metadata"
76
+ [src]="videoUrl"
77
+ (click)="$event.stopPropagation()"
78
+ (error)="onMediaError()"
79
+ ></video>
80
+ }
81
+ `, styles: ["\n :host {\n display: block;\n }\n\n /* Compact thumbnail height \u2014 kept in sync with the image preview (140px) so both\n visual media previews stay consistent and neither dominates the conversation.\n Video keeps width:100% (unlike image) because the player chrome reads better at\n full card width. */\n .video-preview__video {\n display: block;\n max-width: 100%;\n max-height: 140px;\n width: 100%;\n height: auto;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken);\n }\n\n .video-preview--error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n color: var(--mj-text-muted);\n font-size: 13px;\n }\n "] }]
82
+ }], null, null); })();
83
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(VideoArtifactPreviewComponent, { className: "VideoArtifactPreviewComponent", filePath: "src/lib/components/previews/video-artifact-preview.component.ts", lineNumber: 61 }); })();
84
+ //# sourceMappingURL=video-artifact-preview.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-artifact-preview.component.js","sourceRoot":"","sources":["../../../../src/lib/components/previews/video-artifact-preview.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,EAAU,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;;;IAarE,8BAAgD;IAC5C,uBAAgC;IAChC,4BAAM;IAAA,YAAkB;IAC5B,AAD4B,iBAAO,EAC7B;;;IADI,eAAkB;IAAlB,yCAAkB;;;;IAG5B,gCAOC;IADG,AADA,mKAAS,wBAAwB,KAAC,mLACzB,qBAAc,KAAC;IAC3B,iBAAQ;;;IAHL,uDAAgB;;AApBhC;;;;;GAKG;AAoDH,MAAM,OAAO,6BAA8B,SAAQ,4BAA4B;IAC1D,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAEjD,sFAAsF;IAC/E,QAAQ,GAAG,EAAE,CAAC;IAErB,iEAAiE;IAC1D,YAAY,GAAG,EAAE,CAAC;IAEzB,KAAK,CAAC,QAAQ;QACV,IAAI,CAAC;YACD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3C,IAAI,GAAG,EAAE,CAAC;gBACN,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;YACxB,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAC;YAC5C,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACL,IAAI,CAAC,YAAY,GAAG,uBAAuB,CAAC;QAChD,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IAC5B,CAAC;IAEM,YAAY;QACf,IAAI,CAAC,YAAY,GAAG,4BAA4B,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IAC5B,CAAC;iSA3BQ,6BAA6B,yBAA7B,6BAA6B;6DAA7B,6BAA6B;YA1ChC,AALF,+FAAoB,2EAKG;;YALvB,8DAcC;;;iFAiCI,6BAA6B;cAnDzC,SAAS;6BACM,KAAK,YACP,2BAA2B,YAC3B;;;;;;;;;;;;;;;;KAgBT;;kFAgCQ,6BAA6B","sourcesContent":["import { ChangeDetectorRef, Component, inject, OnInit } from '@angular/core';\nimport { BaseArtifactPreviewComponent } from './base-artifact-preview.component';\n\n/**\n * Inline preview for video artifacts. Renders a capped `<video controls preload=\"metadata\">`\n * mini player inside the conversation message card. Click events on the player are stopped from\n * propagating so scrubbing / play-pause does NOT open the full-size viewer (the card's other\n * regions still open it).\n */\n@Component({\n standalone: false,\n selector: 'mj-video-artifact-preview',\n template: `\n @if (errorMessage) {\n <div class=\"video-preview video-preview--error\">\n <i class=\"fa-solid fa-film\"></i>\n <span>{{ errorMessage }}</span>\n </div>\n } @else if (videoUrl) {\n <video\n class=\"video-preview__video\"\n controls\n preload=\"metadata\"\n [src]=\"videoUrl\"\n (click)=\"$event.stopPropagation()\"\n (error)=\"onMediaError()\"\n ></video>\n }\n `,\n styles: [\n `\n :host {\n display: block;\n }\n\n /* Compact thumbnail height — kept in sync with the image preview (140px) so both\n visual media previews stay consistent and neither dominates the conversation.\n Video keeps width:100% (unlike image) because the player chrome reads better at\n full card width. */\n .video-preview__video {\n display: block;\n max-width: 100%;\n max-height: 140px;\n width: 100%;\n height: auto;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken);\n }\n\n .video-preview--error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n color: var(--mj-text-muted);\n font-size: 13px;\n }\n `,\n ],\n})\nexport class VideoArtifactPreviewComponent extends BaseArtifactPreviewComponent implements OnInit {\n private readonly cdr = inject(ChangeDetectorRef);\n\n /** Resolved URL bound to `<video src>` — data URI (inline) or pre-auth URL (file). */\n public videoUrl = '';\n\n /** Non-empty hides the player and shows a compact error line. */\n public errorMessage = '';\n\n async ngOnInit(): Promise<void> {\n try {\n const url = await this.resolveContentUrl();\n if (url) {\n this.videoUrl = url;\n } else {\n this.errorMessage = 'No video content.';\n }\n } catch {\n this.errorMessage = 'Could not load video.';\n }\n this.cdr.markForCheck();\n }\n\n public onMediaError(): void {\n this.errorMessage = 'Video could not be played.';\n this.videoUrl = '';\n this.cdr.markForCheck();\n }\n}\n"]}
@@ -7,17 +7,11 @@ import { MJArtifactVersionEntity } from '@memberjunction/core-entities';
7
7
  */
8
8
  export interface IArtifactViewerPlugin {
9
9
  /**
10
- * The Angular component class that will be dynamically loaded to render the artifact.
11
- * Must be a component type that accepts artifact input.
10
+ * The Angular component class that will be dynamically loaded to render the FULL artifact
11
+ * (the right-side viewer panel — toolbar, tabs, feedback, etc.).
12
+ * Must be a component type that accepts artifact input. REQUIRED.
12
13
  */
13
- readonly componentType: Type<any>;
14
- /**
15
- * Determines if this plugin can handle the given artifact type and content type.
16
- * @param artifactTypeName The artifact type name (e.g., 'JSON', 'Code', etc.)
17
- * @param contentType The content type (e.g., 'application/json', 'text/x-python', etc.)
18
- * @returns true if this plugin can render the artifact
19
- */
20
- canHandle(artifactTypeName: string, contentType?: string): boolean;
14
+ readonly componentType: Type<IArtifactViewerComponent>;
21
15
  /**
22
16
  * Optional: Get display metadata for the artifact (title, icon, etc.)
23
17
  * @param artifactVersion The artifact version to get metadata for
@@ -25,6 +19,44 @@ export interface IArtifactViewerPlugin {
25
19
  */
26
20
  getMetadata?(artifactVersion: MJArtifactVersionEntity): ArtifactMetadata;
27
21
  }
22
+ /**
23
+ * STATIC preview contract for an artifact-viewer plugin **class**.
24
+ *
25
+ * The inline-PREVIEW slot is resolved WITHOUT instantiating any plugin — the resolver reads these
26
+ * STATIC members directly off the registered constructor. This is deliberate: plugins are Angular
27
+ * components with DI constructors (and some use `inject()` in field initializers), so a bare
28
+ * `new SubClass()` outside an Angular injection context throws. Reading statics sidesteps that
29
+ * entirely.
30
+ *
31
+ * A plugin that wants to drive an inline preview declares both members as `static`:
32
+ * - `static readonly PreviewComponentType` — the lightweight {@link IArtifactPreviewComponent}.
33
+ * - `static CanHandlePreview(...)` — type/content matcher for the preview slot.
34
+ *
35
+ * Preview resolution is INDEPENDENT of full-viewer resolution: the inline slot is filled by the
36
+ * highest-priority registered plugin class whose `CanHandlePreview` matches AND that exposes a
37
+ * `PreviewComponentType`. A downstream plugin overriding the full viewer for a type but NOT
38
+ * declaring `PreviewComponentType` therefore does not suppress a base plugin's preview. When no
39
+ * registered class exposes a matching `PreviewComponentType`, no inline preview is rendered and the
40
+ * card falls back to its existing info-bar box.
41
+ */
42
+ export interface IArtifactViewerPluginPreviewStatics {
43
+ /**
44
+ * The lightweight component used to render an inline PREVIEW of the artifact directly inside a
45
+ * conversation message card (no toolbar / feedback / tabs). Optional — plugins without a preview
46
+ * omit it and the card falls back to its info-bar box.
47
+ */
48
+ readonly PreviewComponentType?: Type<IArtifactPreviewComponent>;
49
+ /**
50
+ * Determines whether this plugin's {@link PreviewComponentType} applies to a given artifact.
51
+ * Plugins that declare a `PreviewComponentType` MUST also declare this; plugins without a preview
52
+ * can omit it (the resolver skips them).
53
+ *
54
+ * @param artifactTypeName The artifact type name (e.g., 'Image', 'Video', 'Audio').
55
+ * @param contentType The MIME type (e.g., 'image/png', 'video/mp4').
56
+ * @returns true if this plugin's preview can render the artifact.
57
+ */
58
+ CanHandlePreview?(artifactTypeName: string, contentType?: string): boolean;
59
+ }
28
60
  /**
29
61
  * Metadata about an artifact for display purposes
30
62
  */
@@ -41,4 +73,15 @@ export interface ArtifactMetadata {
41
73
  export interface IArtifactViewerComponent {
42
74
  artifactVersion: MJArtifactVersionEntity;
43
75
  }
76
+ /**
77
+ * Base interface that all inline artifact PREVIEW components must implement.
78
+ *
79
+ * Previews are intentionally lightweight — they receive only the artifact version and render
80
+ * a compact, read-only representation (e.g. a thumbnail `<img>`, a mini `<video>`/`<audio>`
81
+ * player) suitable for embedding inside a conversation message card. Unlike full viewers,
82
+ * previews have NO toolbar, feedback, tabs, or download chrome.
83
+ */
84
+ export interface IArtifactPreviewComponent {
85
+ artifactVersion: MJArtifactVersionEntity;
86
+ }
44
87
  //# sourceMappingURL=artifact-viewer-plugin.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-viewer-plugin.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/artifact-viewer-plugin.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAElC;;;;;OAKG;IACH,SAAS,CAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEnE;;;;OAIG;IACH,WAAW,CAAC,CAAC,eAAe,EAAE,uBAAuB,GAAG,gBAAgB,CAAC;CAC1E;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,uBAAuB,CAAC;CAC1C"}
1
+ {"version":3,"file":"artifact-viewer-plugin.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces/artifact-viewer-plugin.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;IAEvD;;;;OAIG;IACH,WAAW,CAAC,CAAC,eAAe,EAAE,uBAAuB,GAAG,gBAAgB,CAAC;CAC1E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,mCAAmC;IAClD;;;;OAIG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAEhE;;;;;;;;OAQG;IACH,gBAAgB,CAAC,CAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5E;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,uBAAuB,CAAC;CAC1C;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC,eAAe,EAAE,uBAAuB,CAAC;CAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-viewer-plugin.interface.js","sourceRoot":"","sources":["../../../src/lib/interfaces/artifact-viewer-plugin.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { Type } from '@angular/core';\nimport { MJArtifactVersionEntity } from '@memberjunction/core-entities';\n\n/**\n * Interface for artifact viewer plugins.\n * All artifact viewer plugins must implement this interface and be registered\n * with @RegisterClass decorator from @memberjunction/global.\n */\nexport interface IArtifactViewerPlugin {\n /**\n * The Angular component class that will be dynamically loaded to render the artifact.\n * Must be a component type that accepts artifact input.\n */\n readonly componentType: Type<any>;\n\n /**\n * Determines if this plugin can handle the given artifact type and content type.\n * @param artifactTypeName The artifact type name (e.g., 'JSON', 'Code', etc.)\n * @param contentType The content type (e.g., 'application/json', 'text/x-python', etc.)\n * @returns true if this plugin can render the artifact\n */\n canHandle(artifactTypeName: string, contentType?: string): boolean;\n\n /**\n * Optional: Get display metadata for the artifact (title, icon, etc.)\n * @param artifactVersion The artifact version to get metadata for\n * @returns Display metadata object\n */\n getMetadata?(artifactVersion: MJArtifactVersionEntity): ArtifactMetadata;\n}\n\n/**\n * Metadata about an artifact for display purposes\n */\nexport interface ArtifactMetadata {\n title?: string;\n icon?: string;\n description?: string;\n additionalInfo?: Record<string, any>;\n}\n\n/**\n * Base interface that all artifact viewer components must implement.\n * The component receives the artifact version as an input.\n */\nexport interface IArtifactViewerComponent {\n artifactVersion: MJArtifactVersionEntity;\n}\n"]}
1
+ {"version":3,"file":"artifact-viewer-plugin.interface.js","sourceRoot":"","sources":["../../../src/lib/interfaces/artifact-viewer-plugin.interface.ts"],"names":[],"mappings":"","sourcesContent":["import { Type } from '@angular/core';\nimport { MJArtifactVersionEntity } from '@memberjunction/core-entities';\n\n/**\n * Interface for artifact viewer plugins.\n * All artifact viewer plugins must implement this interface and be registered\n * with @RegisterClass decorator from @memberjunction/global.\n */\nexport interface IArtifactViewerPlugin {\n /**\n * The Angular component class that will be dynamically loaded to render the FULL artifact\n * (the right-side viewer panel — toolbar, tabs, feedback, etc.).\n * Must be a component type that accepts artifact input. REQUIRED.\n */\n readonly componentType: Type<IArtifactViewerComponent>;\n\n /**\n * Optional: Get display metadata for the artifact (title, icon, etc.)\n * @param artifactVersion The artifact version to get metadata for\n * @returns Display metadata object\n */\n getMetadata?(artifactVersion: MJArtifactVersionEntity): ArtifactMetadata;\n}\n\n/**\n * STATIC preview contract for an artifact-viewer plugin **class**.\n *\n * The inline-PREVIEW slot is resolved WITHOUT instantiating any plugin — the resolver reads these\n * STATIC members directly off the registered constructor. This is deliberate: plugins are Angular\n * components with DI constructors (and some use `inject()` in field initializers), so a bare\n * `new SubClass()` outside an Angular injection context throws. Reading statics sidesteps that\n * entirely.\n *\n * A plugin that wants to drive an inline preview declares both members as `static`:\n * - `static readonly PreviewComponentType` — the lightweight {@link IArtifactPreviewComponent}.\n * - `static CanHandlePreview(...)` — type/content matcher for the preview slot.\n *\n * Preview resolution is INDEPENDENT of full-viewer resolution: the inline slot is filled by the\n * highest-priority registered plugin class whose `CanHandlePreview` matches AND that exposes a\n * `PreviewComponentType`. A downstream plugin overriding the full viewer for a type but NOT\n * declaring `PreviewComponentType` therefore does not suppress a base plugin's preview. When no\n * registered class exposes a matching `PreviewComponentType`, no inline preview is rendered and the\n * card falls back to its existing info-bar box.\n */\nexport interface IArtifactViewerPluginPreviewStatics {\n /**\n * The lightweight component used to render an inline PREVIEW of the artifact directly inside a\n * conversation message card (no toolbar / feedback / tabs). Optional — plugins without a preview\n * omit it and the card falls back to its info-bar box.\n */\n readonly PreviewComponentType?: Type<IArtifactPreviewComponent>;\n\n /**\n * Determines whether this plugin's {@link PreviewComponentType} applies to a given artifact.\n * Plugins that declare a `PreviewComponentType` MUST also declare this; plugins without a preview\n * can omit it (the resolver skips them).\n *\n * @param artifactTypeName The artifact type name (e.g., 'Image', 'Video', 'Audio').\n * @param contentType The MIME type (e.g., 'image/png', 'video/mp4').\n * @returns true if this plugin's preview can render the artifact.\n */\n CanHandlePreview?(artifactTypeName: string, contentType?: string): boolean;\n}\n\n/**\n * Metadata about an artifact for display purposes\n */\nexport interface ArtifactMetadata {\n title?: string;\n icon?: string;\n description?: string;\n additionalInfo?: Record<string, any>;\n}\n\n/**\n * Base interface that all artifact viewer components must implement.\n * The component receives the artifact version as an input.\n */\nexport interface IArtifactViewerComponent {\n artifactVersion: MJArtifactVersionEntity;\n}\n\n/**\n * Base interface that all inline artifact PREVIEW components must implement.\n *\n * Previews are intentionally lightweight — they receive only the artifact version and render\n * a compact, read-only representation (e.g. a thumbnail `<img>`, a mini `<video>`/`<audio>`\n * player) suitable for embedding inside a conversation message card. Unlike full viewers,\n * previews have NO toolbar, feedback, tabs, or download chrome.\n */\nexport interface IArtifactPreviewComponent {\n artifactVersion: MJArtifactVersionEntity;\n}\n"]}
@@ -0,0 +1,39 @@
1
+ import { Type } from '@angular/core';
2
+ import { IArtifactPreviewComponent } from '../interfaces/artifact-viewer-plugin.interface';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Resolves the inline-PREVIEW component for an artifact, INDEPENDENTLY of full-viewer resolution.
6
+ *
7
+ * The full viewer ({@link ArtifactTypePluginViewerComponent}) resolves by the artifact type's
8
+ * `DriverClass`. The inline preview, by contrast, is resolved by enumerating every registered
9
+ * artifact-viewer plugin CLASS and picking the highest-priority one that BOTH:
10
+ * 1. exposes a static `PreviewComponentType`, AND
11
+ * 2. returns `true` from its static `CanHandlePreview(typeName, contentType)`.
12
+ *
13
+ * The preview contract is read STATICALLY — the resolver NEVER instantiates a plugin. Plugins are
14
+ * Angular components with DI constructors (and some use `inject()` in field initializers), so a
15
+ * bare `new SubClass()` outside an Angular injection context throws ("inject() must be called from
16
+ * an injection context"). Reading statics off the registered constructor sidesteps that entirely.
17
+ *
18
+ * Why independent: a downstream plugin can override the full VIEWER for a type without supplying a
19
+ * `PreviewComponentType` — that must NOT suppress a base plugin's preview. Conversely a broad
20
+ * viewer can coexist with a specialized preview. By resolving the preview slot on its own, neither
21
+ * decision constrains the other.
22
+ *
23
+ * Ordering mirrors {@link ClassFactory.GetRegistration}: highest `Priority` wins, and on a tie the
24
+ * LAST-registered plugin wins (later registrations auto-increment priority, so this is rarely a tie).
25
+ */
26
+ export declare class ArtifactPreviewResolverService {
27
+ /**
28
+ * Returns the preview component type for the given artifact type/content, or `null` when no
29
+ * registered plugin class exposes a matching static `PreviewComponentType` (caller falls back
30
+ * to its box).
31
+ *
32
+ * @param artifactTypeName The artifact's type name (e.g. from `artifact.Type`).
33
+ * @param contentType The version MIME type (e.g. from `artifactVersion.MimeType`).
34
+ */
35
+ resolvePreviewComponent(artifactTypeName: string | null | undefined, contentType: string | null | undefined): Type<IArtifactPreviewComponent> | null;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<ArtifactPreviewResolverService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<ArtifactPreviewResolverService>;
38
+ }
39
+ //# sourceMappingURL=artifact-preview-resolver.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-preview-resolver.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/artifact-preview-resolver.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,IAAI,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,EACH,yBAAyB,EAE5B,MAAM,gDAAgD,CAAC;;AAUxD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAGa,8BAA8B;IACvC;;;;;;;OAOG;IACI,uBAAuB,CAC1B,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC3C,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACvC,IAAI,CAAC,yBAAyB,CAAC,GAAG,IAAI;yCAZhC,8BAA8B;6CAA9B,8BAA8B;CAqD1C"}
@@ -0,0 +1,78 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { MJGlobal } from '@memberjunction/global';
3
+ import { BaseArtifactViewerPluginComponent } from '../components/base-artifact-viewer.component';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Resolves the inline-PREVIEW component for an artifact, INDEPENDENTLY of full-viewer resolution.
7
+ *
8
+ * The full viewer ({@link ArtifactTypePluginViewerComponent}) resolves by the artifact type's
9
+ * `DriverClass`. The inline preview, by contrast, is resolved by enumerating every registered
10
+ * artifact-viewer plugin CLASS and picking the highest-priority one that BOTH:
11
+ * 1. exposes a static `PreviewComponentType`, AND
12
+ * 2. returns `true` from its static `CanHandlePreview(typeName, contentType)`.
13
+ *
14
+ * The preview contract is read STATICALLY — the resolver NEVER instantiates a plugin. Plugins are
15
+ * Angular components with DI constructors (and some use `inject()` in field initializers), so a
16
+ * bare `new SubClass()` outside an Angular injection context throws ("inject() must be called from
17
+ * an injection context"). Reading statics off the registered constructor sidesteps that entirely.
18
+ *
19
+ * Why independent: a downstream plugin can override the full VIEWER for a type without supplying a
20
+ * `PreviewComponentType` — that must NOT suppress a base plugin's preview. Conversely a broad
21
+ * viewer can coexist with a specialized preview. By resolving the preview slot on its own, neither
22
+ * decision constrains the other.
23
+ *
24
+ * Ordering mirrors {@link ClassFactory.GetRegistration}: highest `Priority` wins, and on a tie the
25
+ * LAST-registered plugin wins (later registrations auto-increment priority, so this is rarely a tie).
26
+ */
27
+ export class ArtifactPreviewResolverService {
28
+ /**
29
+ * Returns the preview component type for the given artifact type/content, or `null` when no
30
+ * registered plugin class exposes a matching static `PreviewComponentType` (caller falls back
31
+ * to its box).
32
+ *
33
+ * @param artifactTypeName The artifact's type name (e.g. from `artifact.Type`).
34
+ * @param contentType The version MIME type (e.g. from `artifactVersion.MimeType`).
35
+ */
36
+ resolvePreviewComponent(artifactTypeName, contentType) {
37
+ if (!artifactTypeName && !contentType) {
38
+ return null;
39
+ }
40
+ const registrations = MJGlobal.Instance.ClassFactory.GetAllRegistrations(BaseArtifactViewerPluginComponent);
41
+ if (!registrations || registrations.length === 0) {
42
+ return null;
43
+ }
44
+ // Highest priority first; on a tie, later array position (later registration) wins — so we
45
+ // walk in ascending-priority order and let a `>=` comparison keep the LAST match at a given
46
+ // priority.
47
+ const ordered = [...registrations].sort((a, b) => a.Priority - b.Priority);
48
+ let best = null;
49
+ for (const reg of ordered) {
50
+ const cls = reg.SubClass;
51
+ if (!cls) {
52
+ continue;
53
+ }
54
+ // Read the STATIC contract off the constructor — no instantiation.
55
+ const preview = cls.PreviewComponentType;
56
+ if (!preview || typeof cls.CanHandlePreview !== 'function') {
57
+ continue;
58
+ }
59
+ if (!cls.CanHandlePreview(artifactTypeName ?? '', contentType ?? undefined)) {
60
+ continue;
61
+ }
62
+ // `>=` so a later registration at the SAME priority overrides an earlier one.
63
+ if (!best || reg.Priority >= best.priority) {
64
+ best = { priority: reg.Priority, preview };
65
+ }
66
+ }
67
+ return best?.preview ?? null;
68
+ }
69
+ static ɵfac = function ArtifactPreviewResolverService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ArtifactPreviewResolverService)(); };
70
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ArtifactPreviewResolverService, factory: ArtifactPreviewResolverService.ɵfac, providedIn: 'root' });
71
+ }
72
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArtifactPreviewResolverService, [{
73
+ type: Injectable,
74
+ args: [{
75
+ providedIn: 'root',
76
+ }]
77
+ }], null, null); })();
78
+ //# sourceMappingURL=artifact-preview-resolver.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-preview-resolver.service.js","sourceRoot":"","sources":["../../../src/lib/services/artifact-preview-resolver.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,iCAAiC,EAAE,MAAM,8CAA8C,CAAC;;AAcjG;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,MAAM,OAAO,8BAA8B;IACvC;;;;;;;OAOG;IACI,uBAAuB,CAC1B,gBAA2C,EAC3C,WAAsC;QAEtC,IAAI,CAAC,gBAAgB,IAAI,CAAC,WAAW,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,mBAAmB,CAAC,iCAAiC,CAAC,CAAC;QAC5G,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,2FAA2F;QAC3F,4FAA4F;QAC5F,YAAY;QACZ,MAAM,OAAO,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;QAE3E,IAAI,IAAI,GAA0E,IAAI,CAAC;QAEvF,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;YACxB,MAAM,GAAG,GAAG,GAAG,CAAC,QAAiD,CAAC;YAClE,IAAI,CAAC,GAAG,EAAE,CAAC;gBACP,SAAS;YACb,CAAC;YAED,mEAAmE;YACnE,MAAM,OAAO,GAAG,GAAG,CAAC,oBAAoB,CAAC;YACzC,IAAI,CAAC,OAAO,IAAI,OAAO,GAAG,CAAC,gBAAgB,KAAK,UAAU,EAAE,CAAC;gBACzD,SAAS;YACb,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,IAAI,EAAE,EAAE,WAAW,IAAI,SAAS,CAAC,EAAE,CAAC;gBAC1E,SAAS;YACb,CAAC;YAED,8EAA8E;YAC9E,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACzC,IAAI,GAAG,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC/C,CAAC;QACL,CAAC;QAED,OAAO,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC;IACjC,CAAC;wHApDQ,8BAA8B;gEAA9B,8BAA8B,WAA9B,8BAA8B,mBAF3B,MAAM;;iFAET,8BAA8B;cAH1C,UAAU;eAAC;gBACR,UAAU,EAAE,MAAM;aACrB","sourcesContent":["import { Injectable, Type } from '@angular/core';\nimport { MJGlobal } from '@memberjunction/global';\nimport { BaseArtifactViewerPluginComponent } from '../components/base-artifact-viewer.component';\nimport {\n IArtifactPreviewComponent,\n IArtifactViewerPluginPreviewStatics,\n} from '../interfaces/artifact-viewer-plugin.interface';\n\n/**\n * A registered artifact-viewer plugin **constructor** that MAY carry the static inline-preview\n * contract ({@link IArtifactViewerPluginPreviewStatics}). The resolver reads these statics off the\n * constructor directly — it never instantiates the plugin. Plugins that don't declare a preview\n * simply leave both members undefined.\n */\ntype PreviewCapableViewerClass = Type<BaseArtifactViewerPluginComponent> & IArtifactViewerPluginPreviewStatics;\n\n/**\n * Resolves the inline-PREVIEW component for an artifact, INDEPENDENTLY of full-viewer resolution.\n *\n * The full viewer ({@link ArtifactTypePluginViewerComponent}) resolves by the artifact type's\n * `DriverClass`. The inline preview, by contrast, is resolved by enumerating every registered\n * artifact-viewer plugin CLASS and picking the highest-priority one that BOTH:\n * 1. exposes a static `PreviewComponentType`, AND\n * 2. returns `true` from its static `CanHandlePreview(typeName, contentType)`.\n *\n * The preview contract is read STATICALLY — the resolver NEVER instantiates a plugin. Plugins are\n * Angular components with DI constructors (and some use `inject()` in field initializers), so a\n * bare `new SubClass()` outside an Angular injection context throws (\"inject() must be called from\n * an injection context\"). Reading statics off the registered constructor sidesteps that entirely.\n *\n * Why independent: a downstream plugin can override the full VIEWER for a type without supplying a\n * `PreviewComponentType` — that must NOT suppress a base plugin's preview. Conversely a broad\n * viewer can coexist with a specialized preview. By resolving the preview slot on its own, neither\n * decision constrains the other.\n *\n * Ordering mirrors {@link ClassFactory.GetRegistration}: highest `Priority` wins, and on a tie the\n * LAST-registered plugin wins (later registrations auto-increment priority, so this is rarely a tie).\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ArtifactPreviewResolverService {\n /**\n * Returns the preview component type for the given artifact type/content, or `null` when no\n * registered plugin class exposes a matching static `PreviewComponentType` (caller falls back\n * to its box).\n *\n * @param artifactTypeName The artifact's type name (e.g. from `artifact.Type`).\n * @param contentType The version MIME type (e.g. from `artifactVersion.MimeType`).\n */\n public resolvePreviewComponent(\n artifactTypeName: string | null | undefined,\n contentType: string | null | undefined,\n ): Type<IArtifactPreviewComponent> | null {\n if (!artifactTypeName && !contentType) {\n return null;\n }\n\n const registrations = MJGlobal.Instance.ClassFactory.GetAllRegistrations(BaseArtifactViewerPluginComponent);\n if (!registrations || registrations.length === 0) {\n return null;\n }\n\n // Highest priority first; on a tie, later array position (later registration) wins — so we\n // walk in ascending-priority order and let a `>=` comparison keep the LAST match at a given\n // priority.\n const ordered = [...registrations].sort((a, b) => a.Priority - b.Priority);\n\n let best: { priority: number; preview: Type<IArtifactPreviewComponent> } | null = null;\n\n for (const reg of ordered) {\n const cls = reg.SubClass as PreviewCapableViewerClass | undefined;\n if (!cls) {\n continue;\n }\n\n // Read the STATIC contract off the constructor — no instantiation.\n const preview = cls.PreviewComponentType;\n if (!preview || typeof cls.CanHandlePreview !== 'function') {\n continue;\n }\n\n if (!cls.CanHandlePreview(artifactTypeName ?? '', contentType ?? undefined)) {\n continue;\n }\n\n // `>=` so a later registration at the SAME priority overrides an earlier one.\n if (!best || reg.Priority >= best.priority) {\n best = { priority: reg.Priority, preview };\n }\n }\n\n return best?.preview ?? null;\n }\n}\n"]}
@@ -3,8 +3,13 @@ export * from './lib/services/artifact-icon.service';
3
3
  export * from './lib/services/artifact-file.service';
4
4
  export * from './lib/services/analyze-artifact.service';
5
5
  export * from './lib/services/interactive-form-apply.service';
6
+ export * from './lib/services/artifact-preview-resolver.service';
6
7
  export * from './lib/interfaces/artifact-viewer-plugin.interface';
7
8
  export * from './lib/components/base-artifact-viewer.component';
9
+ export * from './lib/components/previews/base-artifact-preview.component';
10
+ export * from './lib/components/previews/image-artifact-preview.component';
11
+ export * from './lib/components/previews/video-artifact-preview.component';
12
+ export * from './lib/components/previews/audio-artifact-preview.component';
8
13
  export * from './lib/snapshot-helpers';
9
14
  export * from './lib/components/artifact-type-plugin-viewer.component';
10
15
  export * from './lib/components/artifact-viewer-panel.component';
@@ -23,4 +28,6 @@ export * from './lib/components/plugins/pdf-artifact-viewer.component';
23
28
  export * from './lib/components/plugins/xlsx-artifact-viewer.component';
24
29
  export * from './lib/components/plugins/docx-artifact-viewer.component';
25
30
  export * from './lib/components/plugins/image-artifact-viewer.component';
31
+ export * from './lib/components/plugins/video-artifact-viewer.component';
32
+ export * from './lib/components/plugins/audio-artifact-viewer.component';
26
33
  //# sourceMappingURL=public-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAKA,cAAc,wBAAwB,CAAC;AAGvC,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAG9D,cAAc,mDAAmD,CAAC;AAGlE,cAAc,iDAAiD,CAAC;AAGhE,cAAc,wBAAwB,CAAC;AAGvC,cAAc,wDAAwD,CAAC;AAGvE,cAAc,kDAAkD,CAAC;AACjE,cAAc,qDAAqD,CAAC;AACpE,cAAc,kDAAkD,CAAC;AAGjE,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,yDAAyD,CAAC;AACxE,cAAc,wDAAwD,CAAC;AACvE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,yDAAyD,CAAC;AACxE,cAAc,sFAAsF,CAAC;AAGrG,cAAc,kDAAkD,CAAC;AACjE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,0DAA0D,CAAC"}
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAKA,cAAc,wBAAwB,CAAC;AAGvC,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kDAAkD,CAAC;AAGjE,cAAc,mDAAmD,CAAC;AAGlE,cAAc,iDAAiD,CAAC;AAGhE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,4DAA4D,CAAC;AAC3E,cAAc,4DAA4D,CAAC;AAC3E,cAAc,4DAA4D,CAAC;AAG3E,cAAc,wBAAwB,CAAC;AAGvC,cAAc,wDAAwD,CAAC;AAGvE,cAAc,kDAAkD,CAAC;AACjE,cAAc,qDAAqD,CAAC;AACpE,cAAc,kDAAkD,CAAC;AAGjE,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,yDAAyD,CAAC;AACxE,cAAc,wDAAwD,CAAC;AACvE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,yDAAyD,CAAC;AACxE,cAAc,sFAAsF,CAAC;AAGrG,cAAc,kDAAkD,CAAC;AACjE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,0DAA0D,CAAC;AACzE,cAAc,0DAA0D,CAAC;AACzE,cAAc,0DAA0D,CAAC"}
@@ -8,10 +8,16 @@ export * from './lib/services/artifact-icon.service';
8
8
  export * from './lib/services/artifact-file.service';
9
9
  export * from './lib/services/analyze-artifact.service';
10
10
  export * from './lib/services/interactive-form-apply.service';
11
+ export * from './lib/services/artifact-preview-resolver.service';
11
12
  // Interfaces
12
13
  export * from './lib/interfaces/artifact-viewer-plugin.interface';
13
14
  // Base component
14
15
  export * from './lib/components/base-artifact-viewer.component';
16
+ // Inline preview base + components
17
+ export * from './lib/components/previews/base-artifact-preview.component';
18
+ export * from './lib/components/previews/image-artifact-preview.component';
19
+ export * from './lib/components/previews/video-artifact-preview.component';
20
+ export * from './lib/components/previews/audio-artifact-preview.component';
15
21
  // Snapshot helpers (pure functions for creating DataSnapshots from artifact content)
16
22
  export * from './lib/snapshot-helpers';
17
23
  // Artifact type plugin viewer (loads appropriate plugin based on DriverClass)
@@ -35,4 +41,6 @@ export * from './lib/components/plugins/pdf-artifact-viewer.component';
35
41
  export * from './lib/components/plugins/xlsx-artifact-viewer.component';
36
42
  export * from './lib/components/plugins/docx-artifact-viewer.component';
37
43
  export * from './lib/components/plugins/image-artifact-viewer.component';
44
+ export * from './lib/components/plugins/video-artifact-viewer.component';
45
+ export * from './lib/components/plugins/audio-artifact-viewer.component';
38
46
  //# sourceMappingURL=public-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,cAAc,wBAAwB,CAAC;AAEvC,WAAW;AACX,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAE9D,aAAa;AACb,cAAc,mDAAmD,CAAC;AAElE,iBAAiB;AACjB,cAAc,iDAAiD,CAAC;AAEhE,qFAAqF;AACrF,cAAc,wBAAwB,CAAC;AAEvC,8EAA8E;AAC9E,cAAc,wDAAwD,CAAC;AAEvE,gCAAgC;AAChC,cAAc,kDAAkD,CAAC;AACjE,cAAc,qDAAqD,CAAC;AACpE,cAAc,kDAAkD,CAAC;AAEjE,oBAAoB;AACpB,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,yDAAyD,CAAC;AACxE,cAAc,wDAAwD,CAAC;AACvE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,yDAAyD,CAAC;AACxE,cAAc,sFAAsF,CAAC;AAErG,kCAAkC;AAClC,cAAc,kDAAkD,CAAC;AACjE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,0DAA0D,CAAC","sourcesContent":["/*\n * Public API Surface of @memberjunction/ng-artifacts\n */\n\n// Module\nexport * from './lib/artifacts.module';\n\n// Services\nexport * from './lib/services/artifact-icon.service';\nexport * from './lib/services/artifact-file.service';\nexport * from './lib/services/analyze-artifact.service';\nexport * from './lib/services/interactive-form-apply.service';\n\n// Interfaces\nexport * from './lib/interfaces/artifact-viewer-plugin.interface';\n\n// Base component\nexport * from './lib/components/base-artifact-viewer.component';\n\n// Snapshot helpers (pure functions for creating DataSnapshots from artifact content)\nexport * from './lib/snapshot-helpers';\n\n// Artifact type plugin viewer (loads appropriate plugin based on DriverClass)\nexport * from './lib/components/artifact-type-plugin-viewer.component';\n\n// Artifact viewer UI components\nexport * from './lib/components/artifact-viewer-panel.component';\nexport * from './lib/components/artifact-version-history.component';\nexport * from './lib/components/artifact-message-card.component';\n\n// Plugin components\nexport * from './lib/components/plugins/json-artifact-viewer.component';\nexport * from './lib/components/plugins/code-artifact-viewer.component';\nexport * from './lib/components/plugins/markdown-artifact-viewer.component';\nexport * from './lib/components/plugins/html-artifact-viewer.component';\nexport * from './lib/components/plugins/svg-artifact-viewer.component';\nexport * from './lib/components/plugins/component-artifact-viewer.component';\nexport * from './lib/components/plugins/data-artifact-viewer.component';\nexport * from './lib/components/plugins/component-feedback-panel/component-feedback-panel.component';\n\n// File viewer toolbar and plugins\nexport * from './lib/components/file-artifact-toolbar.component';\nexport * from './lib/components/plugins/pdf-artifact-viewer.component';\nexport * from './lib/components/plugins/xlsx-artifact-viewer.component';\nexport * from './lib/components/plugins/docx-artifact-viewer.component';\nexport * from './lib/components/plugins/image-artifact-viewer.component';\n"]}
1
+ {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,cAAc,wBAAwB,CAAC;AAEvC,WAAW;AACX,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kDAAkD,CAAC;AAEjE,aAAa;AACb,cAAc,mDAAmD,CAAC;AAElE,iBAAiB;AACjB,cAAc,iDAAiD,CAAC;AAEhE,mCAAmC;AACnC,cAAc,2DAA2D,CAAC;AAC1E,cAAc,4DAA4D,CAAC;AAC3E,cAAc,4DAA4D,CAAC;AAC3E,cAAc,4DAA4D,CAAC;AAE3E,qFAAqF;AACrF,cAAc,wBAAwB,CAAC;AAEvC,8EAA8E;AAC9E,cAAc,wDAAwD,CAAC;AAEvE,gCAAgC;AAChC,cAAc,kDAAkD,CAAC;AACjE,cAAc,qDAAqD,CAAC;AACpE,cAAc,kDAAkD,CAAC;AAEjE,oBAAoB;AACpB,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,yDAAyD,CAAC;AACxE,cAAc,wDAAwD,CAAC;AACvE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,yDAAyD,CAAC;AACxE,cAAc,sFAAsF,CAAC;AAErG,kCAAkC;AAClC,cAAc,kDAAkD,CAAC;AACjE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,0DAA0D,CAAC;AACzE,cAAc,0DAA0D,CAAC;AACzE,cAAc,0DAA0D,CAAC","sourcesContent":["/*\n * Public API Surface of @memberjunction/ng-artifacts\n */\n\n// Module\nexport * from './lib/artifacts.module';\n\n// Services\nexport * from './lib/services/artifact-icon.service';\nexport * from './lib/services/artifact-file.service';\nexport * from './lib/services/analyze-artifact.service';\nexport * from './lib/services/interactive-form-apply.service';\nexport * from './lib/services/artifact-preview-resolver.service';\n\n// Interfaces\nexport * from './lib/interfaces/artifact-viewer-plugin.interface';\n\n// Base component\nexport * from './lib/components/base-artifact-viewer.component';\n\n// Inline preview base + components\nexport * from './lib/components/previews/base-artifact-preview.component';\nexport * from './lib/components/previews/image-artifact-preview.component';\nexport * from './lib/components/previews/video-artifact-preview.component';\nexport * from './lib/components/previews/audio-artifact-preview.component';\n\n// Snapshot helpers (pure functions for creating DataSnapshots from artifact content)\nexport * from './lib/snapshot-helpers';\n\n// Artifact type plugin viewer (loads appropriate plugin based on DriverClass)\nexport * from './lib/components/artifact-type-plugin-viewer.component';\n\n// Artifact viewer UI components\nexport * from './lib/components/artifact-viewer-panel.component';\nexport * from './lib/components/artifact-version-history.component';\nexport * from './lib/components/artifact-message-card.component';\n\n// Plugin components\nexport * from './lib/components/plugins/json-artifact-viewer.component';\nexport * from './lib/components/plugins/code-artifact-viewer.component';\nexport * from './lib/components/plugins/markdown-artifact-viewer.component';\nexport * from './lib/components/plugins/html-artifact-viewer.component';\nexport * from './lib/components/plugins/svg-artifact-viewer.component';\nexport * from './lib/components/plugins/component-artifact-viewer.component';\nexport * from './lib/components/plugins/data-artifact-viewer.component';\nexport * from './lib/components/plugins/component-feedback-panel/component-feedback-panel.component';\n\n// File viewer toolbar and plugins\nexport * from './lib/components/file-artifact-toolbar.component';\nexport * from './lib/components/plugins/pdf-artifact-viewer.component';\nexport * from './lib/components/plugins/xlsx-artifact-viewer.component';\nexport * from './lib/components/plugins/docx-artifact-viewer.component';\nexport * from './lib/components/plugins/image-artifact-viewer.component';\nexport * from './lib/components/plugins/video-artifact-viewer.component';\nexport * from './lib/components/plugins/audio-artifact-viewer.component';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-artifacts",
3
- "version": "5.39.0",
3
+ "version": "5.40.1",
4
4
  "description": "MemberJunction: Artifact viewer plugin system for rendering different artifact types (JSON, Code, Markdown, HTML, SVG, Components)",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -32,23 +32,23 @@
32
32
  "dependencies": {
33
33
  "@angular/cdk": "21.1.3",
34
34
  "@angular/forms": "21.1.3",
35
- "@memberjunction/core": "5.39.0",
36
- "@memberjunction/core-entities": "5.39.0",
37
- "@memberjunction/global": "5.39.0",
38
- "@memberjunction/graphql-dataprovider": "5.39.0",
39
- "@memberjunction/interactive-component-types": "5.39.0",
40
- "@memberjunction/ng-base-forms": "5.39.0",
41
- "@memberjunction/ng-base-types": "5.39.0",
42
- "@memberjunction/ng-code-editor": "5.39.0",
43
- "@memberjunction/ng-export-service": "5.39.0",
44
- "@memberjunction/ng-markdown": "5.39.0",
45
- "@memberjunction/ng-notifications": "5.39.0",
46
- "@memberjunction/ng-pagination": "5.39.0",
47
- "@memberjunction/ng-query-viewer": "5.39.0",
48
- "@memberjunction/ng-react": "5.39.0",
49
- "@memberjunction/ng-shared-generic": "5.39.0",
50
- "@memberjunction/ng-trees": "5.39.0",
51
- "@memberjunction/ng-ui-components": "5.39.0",
35
+ "@memberjunction/core": "5.40.1",
36
+ "@memberjunction/core-entities": "5.40.1",
37
+ "@memberjunction/global": "5.40.1",
38
+ "@memberjunction/graphql-dataprovider": "5.40.1",
39
+ "@memberjunction/interactive-component-types": "5.40.1",
40
+ "@memberjunction/ng-base-forms": "5.40.1",
41
+ "@memberjunction/ng-base-types": "5.40.1",
42
+ "@memberjunction/ng-code-editor": "5.40.1",
43
+ "@memberjunction/ng-export-service": "5.40.1",
44
+ "@memberjunction/ng-markdown": "5.40.1",
45
+ "@memberjunction/ng-notifications": "5.40.1",
46
+ "@memberjunction/ng-pagination": "5.40.1",
47
+ "@memberjunction/ng-query-viewer": "5.40.1",
48
+ "@memberjunction/ng-react": "5.40.1",
49
+ "@memberjunction/ng-shared-generic": "5.40.1",
50
+ "@memberjunction/ng-trees": "5.40.1",
51
+ "@memberjunction/ng-ui-components": "5.40.1",
52
52
  "mammoth": "^1.8.0",
53
53
  "pdfjs-dist": "^4.10.38",
54
54
  "rxjs": "^7.8.2",