pptx-angular-viewer 0.1.0 → 1.1.10

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.
@@ -596,8 +596,24 @@ function getShapeFillStrokeStyle(el) {
596
596
  const ss = el.shapeStyle;
597
597
  const style = {};
598
598
  if (ss) {
599
- // Fill solid only for now (gradients/patterns/images: TODO).
600
- if (ss.fillColor && ss.fillColor !== 'transparent' && ss.fillMode !== 'none') {
599
+ // Fill resolution order mirrors the React `getShapeVisualStyle` and the
600
+ // Vue port: image fill gradient → solid colour. Pattern fills
601
+ // (SVG-based) and the richer structured gradient builder
602
+ // (`color-gradient.ts`) remain shared-extraction candidates — see
603
+ // PORTING.md.
604
+ const imageFillUrl = ss.fillMode === 'image' && ss.fillImageUrl ? ss.fillImageUrl : undefined;
605
+ // `fillGradient` is a prebuilt CSS gradient string from the parser.
606
+ const gradient = ss.fillMode === 'gradient' || ss.fillGradient ? ss.fillGradient : undefined;
607
+ if (imageFillUrl) {
608
+ style['background-color'] = 'transparent';
609
+ style['background-image'] = `url(${imageFillUrl})`;
610
+ style['background-repeat'] = ss.fillImageMode === 'tile' ? 'repeat' : 'no-repeat';
611
+ style['background-size'] = ss.fillImageMode === 'tile' ? 'auto' : '100% 100%';
612
+ }
613
+ else if (gradient) {
614
+ style['background-image'] = gradient;
615
+ }
616
+ else if (ss.fillColor && ss.fillColor !== 'transparent' && ss.fillMode !== 'none') {
601
617
  style['background-color'] = ss.fillColor;
602
618
  }
603
619
  // Stroke.
@@ -1 +1 @@
1
- {"version":3,"file":"pptx-angular-viewer.mjs","sources":["../../src/internal/shared-src/theme/defaults.ts","../../src/internal/shared-src/theme/css-vars.ts","../../src/internal/shared-src/loader/load-content-helpers.ts","../../src/internal/shared-src/types.ts","../../src/internal/shared-src/constants.ts","../../src/internal/shared-src/index.ts","../../src/internal/shared.ts","../../src/theme/viewer-theme.ts","../../src/viewer/load-content.service.ts","../../src/viewer/element-style.ts","../../src/viewer/element-renderer.component.ts","../../src/viewer/slide-canvas.component.ts","../../src/viewer/power-point-viewer.component.ts","../../src/viewer/constants.ts","../../src/utils.ts","../../src/public-api.ts","../../src/pptx-angular-viewer.ts"],"sourcesContent":["import type { ViewerThemeColors } from './types';\n\n/**\n * Default dark-theme color values.\n *\n * These correspond to the built-in dark UI of the PowerPoint viewer and\n * use Tailwind's gray palette as the neutral scale with indigo as the\n * primary accent.\n */\nexport const defaultThemeColors: ViewerThemeColors = {\n\tbackground: '#030712', // gray-950\n\tforeground: '#f3f4f6', // gray-100\n\n\tcard: '#111827', // gray-900\n\tcardForeground: '#f3f4f6', // gray-100\n\n\tpopover: '#111827', // gray-900\n\tpopoverForeground: '#f3f4f6', // gray-100\n\n\tprimary: '#6366f1', // indigo-500\n\tprimaryForeground: '#ffffff', // white\n\n\tsecondary: '#1f2937', // gray-800\n\tsecondaryForeground: '#f3f4f6', // gray-100\n\n\tmuted: '#1f2937', // gray-800\n\tmutedForeground: '#9ca3af', // gray-400\n\n\taccent: '#1f2937', // gray-800\n\taccentForeground: '#f3f4f6', // gray-100\n\n\tdestructive: '#ef4444', // red-500\n\tdestructiveForeground: '#ffffff', // white\n\n\tborder: '#374151', // gray-700\n\tinput: '#374151', // gray-700\n\tring: '#6366f1', // indigo-500\n};\n\n/** Default border-radius. */\nexport const defaultRadius = '0.5rem';\n","import { defaultThemeColors, defaultRadius } from './defaults';\nimport type { ViewerTheme, ViewerThemeColors } from './types';\n\n/**\n * Map from camelCase ViewerThemeColors keys to kebab-case CSS custom\n * property suffixes (the part after `--pptx-`).\n */\nconst COLOR_KEY_TO_CSS: Record<keyof ViewerThemeColors, string> = {\n\tbackground: 'background',\n\tforeground: 'foreground',\n\tcard: 'card',\n\tcardForeground: 'card-foreground',\n\tpopover: 'popover',\n\tpopoverForeground: 'popover-foreground',\n\tprimary: 'primary',\n\tprimaryForeground: 'primary-foreground',\n\tsecondary: 'secondary',\n\tsecondaryForeground: 'secondary-foreground',\n\tmuted: 'muted',\n\tmutedForeground: 'muted-foreground',\n\taccent: 'accent',\n\taccentForeground: 'accent-foreground',\n\tdestructive: 'destructive',\n\tdestructiveForeground: 'destructive-foreground',\n\tborder: 'border',\n\tinput: 'input',\n\tring: 'ring',\n};\n\n/**\n * Convert a `ViewerTheme` into a flat `Record<string, string>` of CSS\n * custom properties (including the `--` prefix) ready to be spread onto\n * a `style` attribute.\n *\n * Only properties that differ from the built-in defaults are emitted when\n * `omitDefaults` is true (the default).\n */\nexport function themeToCssVars(\n\ttheme: ViewerTheme | undefined,\n\tomitDefaults = false,\n): Record<string, string> {\n\tconst vars: Record<string, string> = {};\n\n\tif (!theme) {\n\t\treturn vars;\n\t}\n\n\t// ── Colors ───────────────────────────────────────────────────────\n\tconst colors = theme.colors;\n\tif (colors) {\n\t\tfor (const [key, cssSuffix] of Object.entries(COLOR_KEY_TO_CSS)) {\n\t\t\tconst value = colors[key as keyof ViewerThemeColors];\n\t\t\tif (value === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (omitDefaults && value === defaultThemeColors[key as keyof ViewerThemeColors]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvars[`--pptx-${cssSuffix}`] = value;\n\t\t}\n\t}\n\n\t// ── Radius ───────────────────────────────────────────────────────\n\tif (theme.radius !== undefined) {\n\t\tif (!omitDefaults || theme.radius !== defaultRadius) {\n\t\t\tvars['--pptx-radius'] = theme.radius;\n\t\t}\n\t}\n\n\t// ── Escape-hatch custom properties ───────────────────────────────\n\tif (theme.cssVars) {\n\t\tfor (const [key, value] of Object.entries(theme.cssVars)) {\n\t\t\tvars[key] = value;\n\t\t}\n\t}\n\n\treturn vars;\n}\n\n/**\n * Build the complete set of CSS custom properties with all defaults.\n * Useful for generating a full fallback stylesheet.\n */\nexport function defaultCssVars(): Record<string, string> {\n\tconst vars: Record<string, string> = {};\n\n\tfor (const [key, cssSuffix] of Object.entries(COLOR_KEY_TO_CSS)) {\n\t\tvars[`--pptx-${cssSuffix}`] = defaultThemeColors[key as keyof ViewerThemeColors];\n\t}\n\tvars['--pptx-radius'] = defaultRadius;\n\n\treturn vars;\n}\n","/**\n * Pure helper functions for the viewer load pipeline.\n *\n * Framework-agnostic — shared by the React, Vue, and Angular bindings. These\n * were duplicated verbatim across `packages/react` and `packages/vue`; this is\n * now the single canonical copy.\n */\nimport type {\n\tMediaPptxElement,\n\tPicturePptxElement,\n\tPptxElement,\n\tPptxDrawingGuide,\n\tPptxSlide,\n} from 'pptx-viewer-core';\nimport { guideEmuToPx } from 'pptx-viewer-core';\n\nexport interface GuideEntry {\n\tid: string;\n\taxis: 'h' | 'v';\n\tposition: number;\n}\n\n/** An element that may carry an image path needing Blob URL resolution. */\nexport interface ImagePathElement {\n\telement: PptxElement;\n\tfield: 'imageData' | 'svgData' | 'posterFrameData';\n\tpath: string;\n}\n\n/**\n * Recursively walks an element tree and pushes every media element\n * into the supplied collector array.\n */\nexport function collectMediaElements(elements: PptxElement[], collector: MediaPptxElement[]): void {\n\tfor (const element of elements) {\n\t\tif (element.type === 'media') {\n\t\t\tcollector.push(element);\n\t\t\tcontinue;\n\t\t}\n\t\tif (element.type === 'group' && element.children?.length) {\n\t\t\tcollectMediaElements(element.children, collector);\n\t\t}\n\t}\n}\n\n/**\n * Collect all unique image archive paths across all slides that need\n * to be resolved to displayable URLs (Blob URLs).\n *\n * This covers:\n * - Picture elements (`imageData`, `svgData`)\n * - Media poster frames (`posterFrameData`)\n *\n * Returns the set of unique archive paths, plus a list of element/field\n * references that need to be updated once each path resolves.\n */\nexport function collectImagePaths(slides: PptxSlide[]): {\n\tpaths: Set<string>;\n\trefs: ImagePathElement[];\n} {\n\tconst paths = new Set<string>();\n\tconst refs: ImagePathElement[] = [];\n\n\tconst walkElements = (elements: PptxElement[]) => {\n\t\tfor (const el of elements) {\n\t\t\tif (el.type === 'picture' || el.type === 'image') {\n\t\t\t\tconst pic = el as PicturePptxElement;\n\t\t\t\tif (pic.imagePath && !pic.imageData && !isExternalUrl(pic.imagePath)) {\n\t\t\t\t\tpaths.add(pic.imagePath);\n\t\t\t\t\trefs.push({ element: el, field: 'imageData', path: pic.imagePath });\n\t\t\t\t}\n\t\t\t\tif (pic.svgPath && !pic.svgData && !isExternalUrl(pic.svgPath)) {\n\t\t\t\t\tpaths.add(pic.svgPath);\n\t\t\t\t\trefs.push({ element: el, field: 'svgData', path: pic.svgPath });\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (el.type === 'media') {\n\t\t\t\tconst media = el as MediaPptxElement;\n\t\t\t\tif (\n\t\t\t\t\tmedia.posterFramePath &&\n\t\t\t\t\t!media.posterFrameData &&\n\t\t\t\t\t!isExternalUrl(media.posterFramePath)\n\t\t\t\t) {\n\t\t\t\t\tpaths.add(media.posterFramePath);\n\t\t\t\t\trefs.push({\n\t\t\t\t\t\telement: el,\n\t\t\t\t\t\tfield: 'posterFrameData',\n\t\t\t\t\t\tpath: media.posterFramePath,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (el.type === 'group' && el.children?.length) {\n\t\t\t\twalkElements(el.children);\n\t\t\t}\n\t\t}\n\t};\n\n\tfor (const slide of slides) {\n\t\twalkElements(slide.elements);\n\t}\n\n\treturn { paths, refs };\n}\n\nfunction isExternalUrl(path: string): boolean {\n\treturn (\n\t\tpath.startsWith('http://') ||\n\t\tpath.startsWith('https://') ||\n\t\tpath.startsWith('data:') ||\n\t\tpath.startsWith('blob:')\n\t);\n}\n\n/**\n * Converts raw EMU-based drawing guides from the parsed presentation\n * and the first slide into pixel-based `GuideEntry` objects.\n */\nexport function buildInitialGuides(\n\tpresentationGuides: PptxDrawingGuide[] | undefined,\n\tfirstSlideGuides: PptxDrawingGuide[] | undefined,\n): GuideEntry[] {\n\tconst guides: GuideEntry[] = [];\n\tif (presentationGuides) {\n\t\tfor (const g of presentationGuides) {\n\t\t\tguides.push({\n\t\t\t\tid: g.id,\n\t\t\t\taxis: g.orientation === 'horz' ? 'h' : 'v',\n\t\t\t\tposition: guideEmuToPx(g.positionEmu),\n\t\t\t});\n\t\t}\n\t}\n\tif (firstSlideGuides) {\n\t\tfor (const g of firstSlideGuides) {\n\t\t\tguides.push({\n\t\t\t\tid: g.id,\n\t\t\t\taxis: g.orientation === 'horz' ? 'h' : 'v',\n\t\t\t\tposition: guideEmuToPx(g.positionEmu),\n\t\t\t});\n\t\t}\n\t}\n\treturn guides;\n}\n","/**\n * Framework-agnostic public types shared by the viewer bindings.\n *\n * These were duplicated in the React (`types-ui.ts`) and Vue (`viewer/types.ts`)\n * packages; this is the canonical copy. Each binding layers its own\n * framework-specific prop/event/handle types on top of these.\n */\n\n/** Canvas dimensions in pixels. */\nexport interface CanvasSize {\n\twidth: number;\n\theight: number;\n}\n\n/** Collaboration role within a session. */\nexport type CollaborationRole = 'owner' | 'collaborator' | 'viewer';\n\n/**\n * Real-time collaboration configuration.\n *\n * The collaboration runtime (Yjs) is not yet ported to every binding — this\n * type exists so the public prop surface stays identical across React, Vue,\n * and Angular.\n */\nexport interface CollaborationConfig {\n\t/** Unique identifier for the collaboration room (alphanumeric, hyphens, underscores). */\n\troomId: string;\n\t/** WebSocket server URL for the Yjs provider (e.g. \"wss://collab.example.com\"). */\n\tserverUrl: string;\n\t/** Display name for the local user. */\n\tuserName: string;\n\t/** Avatar URL for the local user (optional). */\n\tuserAvatar?: string;\n\t/** Hex colour for the local user's cursor/presence indicator. */\n\tuserColor?: string;\n\t/** Optional authentication token sent with the WebSocket handshake. */\n\tauthToken?: string;\n\t/** Role in the session — defaults to `'collaborator'`. */\n\trole?: CollaborationRole;\n}\n","/**\n * Scalar viewer defaults shared by the UI bindings.\n *\n * Subset of the React package's `constants/scalar.ts` that the Vue and Angular\n * viewers also need. Additional constant groups (toolbar presets, shape styles,\n * transitions, etc.) remain per-binding until those features are ported.\n */\n\n/** Default slide canvas width in pixels when the file declares none. */\nexport const DEFAULT_CANVAS_WIDTH = 1280;\n/** Default slide canvas height in pixels when the file declares none. */\nexport const DEFAULT_CANVAS_HEIGHT = 720;\n\n/** Fallback text colour. */\nexport const DEFAULT_TEXT_COLOR = '#111827';\n/** Fallback shape fill colour. */\nexport const DEFAULT_FILL_COLOR = '#3b82f6';\n/** Fallback shape stroke colour. */\nexport const DEFAULT_STROKE_COLOR = '#1f2937';\n","/**\n * pptx-viewer-shared — framework-agnostic viewer logic shared by the\n * React (`pptx-viewer`), Vue (`pptx-vue-viewer`), and Angular\n * (`pptx-angular-viewer`) bindings.\n *\n * Everything exported here is pure TypeScript (no framework imports), so each\n * UI binding consumes one copy instead of duplicating it.\n *\n * Current surface:\n * - theme: ViewerTheme types, default palette, CSS-variable helpers.\n * - loader: load-pipeline helpers (media/image collection, guides).\n * - types: CanvasSize, CollaborationConfig, CollaborationRole.\n * - constants: scalar viewer defaults (canvas size, fallback colours).\n *\n * Roadmap (see packages/angular/PORTING.md and packages/vue/PORTING.md):\n * color resolution, geometry/clip-paths, connector routing, animation\n * timeline engine, table-merge math, morph matching, export data helpers.\n */\nexport * from './theme';\nexport * from './loader';\nexport * from './types';\nexport * from './constants';\n","/**\n * Internal re-export of `pptx-viewer-shared`.\n *\n * `pptx-viewer-shared` is an INTERNAL, non-published package (`\"private\": true`).\n * Its source is vendored into `./shared-src` at build time by\n * `scripts/inline-shared.mjs` (a generated, git-ignored directory), so the\n * shared code compiles as part of THIS library and ships **inlined** in the\n * published FESM. As a result `pptx-viewer-shared` never appears in the\n * published `package.json`.\n *\n * All Angular sources import shared symbols from THIS barrel, never from the\n * bare `'pptx-viewer-shared'` specifier (which ng-packagr would externalize).\n */\nexport * from './shared-src/index';\n","import { InjectionToken } from '@angular/core';\nimport type { Provider } from '@angular/core';\n\nimport { themeToCssVars } from '../internal/shared';\nimport type { ViewerTheme } from '../internal/shared';\n\n/**\n * Theme system for the Angular PowerPoint viewer.\n *\n * Angular counterpart of the React `ViewerThemeProvider` / `useViewerTheme`\n * context and the Vue `provide`/`inject` theme provider. The `ViewerTheme`\n * type, default palette, and `themeToCssVars` helper are framework-agnostic\n * and live in `pptx-viewer-shared`.\n */\n\n/** DI token carrying the active `ViewerTheme` (or `undefined`). */\nexport const VIEWER_THEME = new InjectionToken<ViewerTheme | undefined>('PPTX_VIEWER_THEME');\n\n/**\n * Provide a `ViewerTheme` to a subtree.\n *\n * Typically you do **not** need this — passing a `theme` input to\n * `<pptx-viewer>` is sufficient. Use this to share a theme across multiple\n * viewers or a wider component subtree.\n *\n * @example\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideViewerTheme({ colors: { primary: '#6366f1' } })],\n * });\n * ```\n */\nexport function provideViewerTheme(theme: ViewerTheme | undefined): Provider {\n\treturn { provide: VIEWER_THEME, useValue: theme };\n}\n\n/**\n * Build an `[ngStyle]`-compatible map of CSS custom properties for a theme.\n * Returns an empty object when the theme contributes no variables.\n */\nexport function themeStyle(theme: ViewerTheme | undefined): Record<string, string> {\n\tif (!theme) {\n\t\treturn {};\n\t}\n\treturn themeToCssVars(theme);\n}\n","import { DestroyRef, Injectable, computed, inject, signal } from '@angular/core';\nimport type {\n\tMediaPptxElement,\n\tPptxElement,\n\tPptxSlide,\n\tPptxSlideMaster,\n\tPptxTheme,\n} from 'pptx-viewer-core';\nimport { EncryptedFileError, PptxHandler } from 'pptx-viewer-core';\n\nimport {\n\tDEFAULT_CANVAS_HEIGHT,\n\tDEFAULT_CANVAS_WIDTH,\n\tcollectImagePaths,\n\tcollectMediaElements,\n} from '../internal/shared';\nimport type { CanvasSize } from '../internal/shared';\n\n/**\n * `LoadContentService` — Angular port of the React `useLoadContent` hook and\n * the Vue `useLoadContent` composable.\n *\n * Parses `.pptx` bytes into reactive signals via the framework-agnostic\n * `PptxHandler` from `pptx-viewer-core`. All heavy lifting (ZIP, XML parse,\n * theme/master/layout resolution, media extraction) lives in core and the\n * pure helpers live in `pptx-viewer-shared`; this service only wires the async\n * load into Angular signals and manages Blob-URL / handler lifecycle.\n *\n * Provide it at the component level so its lifetime tracks the host viewer:\n * `@Component({ providers: [LoadContentService] })`.\n *\n * This is the viewer-first subset; the React hook also populated ~25 extra\n * pieces of presentation metadata (sections, custom shows, embedded fonts,\n * digital signatures, …). Those are tracked in PORTING.md and added here as\n * the corresponding features are ported.\n */\n@Injectable()\nexport class LoadContentService {\n\t/** Parsed slides (with image Blob URLs patched in). */\n\treadonly slides = signal<PptxSlide[]>([]);\n\t/** Slide canvas size in pixels. */\n\treadonly canvasSize = signal<CanvasSize>({\n\t\twidth: DEFAULT_CANVAS_WIDTH,\n\t\theight: DEFAULT_CANVAS_HEIGHT,\n\t});\n\t/** Resolved presentation theme. */\n\treadonly theme = signal<PptxTheme | undefined>(undefined);\n\t/** Slide masters (for placeholder/background resolution). */\n\treadonly slideMasters = signal<PptxSlideMaster[]>([]);\n\t/** Archive-path → displayable URL map for media + poster frames. */\n\treadonly mediaDataUrls = signal<Map<string, string>>(new Map());\n\t/** True while a load is in flight. */\n\treadonly loading = signal(false);\n\t/** Error message from the last failed load, or null. */\n\treadonly error = signal<string | null>(null);\n\t/** True when the file is password-protected and could not be opened. */\n\treadonly isEncrypted = signal(false);\n\n\t/** Number of loaded slides. */\n\treadonly slideCount = computed(() => this.slides().length);\n\n\tprivate handler: PptxHandler | null = null;\n\tprivate renderToken = 0;\n\tprivate activeBlobUrls: string[] = [];\n\n\tconstructor() {\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.renderToken++;\n\t\t\tthis.revokeBlobUrls(this.activeBlobUrls);\n\t\t\tthis.revokeBlobUrls(Array.from(this.mediaDataUrls().values()));\n\t\t\tthis.disposeHandler();\n\t\t});\n\t}\n\n\t/** Serialise the current presentation back to `.pptx` bytes. */\n\tasync getContent(): Promise<Uint8Array> {\n\t\tif (!this.handler) {\n\t\t\tthrow new Error('No presentation is loaded.');\n\t\t}\n\t\treturn this.handler.save(this.slides());\n\t}\n\n\t/** Parse the supplied `.pptx` bytes into the reactive signals. */\n\tasync load(raw: Uint8Array | ArrayBuffer | null | undefined): Promise<void> {\n\t\tif (!raw) {\n\t\t\treturn;\n\t\t}\n\t\tconst token = ++this.renderToken;\n\t\tconst loadBlobUrls: string[] = [];\n\n\t\ttry {\n\t\t\tthis.loading.set(true);\n\t\t\tthis.error.set(null);\n\t\t\tthis.isEncrypted.set(false);\n\n\t\t\tconst buffer =\n\t\t\t\traw instanceof Uint8Array\n\t\t\t\t\t? raw.buffer.slice(raw.byteOffset, raw.byteOffset + raw.byteLength)\n\t\t\t\t\t: raw;\n\n\t\t\tconst fileSizeMB = buffer instanceof ArrayBuffer ? buffer.byteLength / (1024 * 1024) : 0;\n\t\t\tif (fileSizeMB > 50) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`[pptx] Large file detected (${fileSizeMB.toFixed(1)} MB). ` +\n\t\t\t\t\t\t`Loading may use significant memory.`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst previousHandler = this.handler;\n\t\t\tconst newHandler = new PptxHandler();\n\t\t\tconst parsed = await newHandler.load(buffer as ArrayBuffer);\n\t\t\tif (token !== this.renderToken) {\n\t\t\t\tnewHandler.dispose();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpreviousHandler?.dispose();\n\n\t\t\t// ── Resolve media Blob URLs (audio/video + poster frames) ──\n\t\t\tconst mediaElements: MediaPptxElement[] = [];\n\t\t\tfor (const slide of parsed.slides) {\n\t\t\t\tcollectMediaElements(slide.elements, mediaElements);\n\t\t\t}\n\t\t\tthis.revokeBlobUrls(Array.from(this.mediaDataUrls().values()));\n\t\t\tconst nextMediaUrls = new Map<string, string>();\n\t\t\tawait Promise.all(\n\t\t\t\tmediaElements.map(async (mediaElement) => {\n\t\t\t\t\tconst mediaPath = mediaElement.mediaPath;\n\t\t\t\t\tif (!mediaPath) {\n\t\t\t\t\t\tmediaElement.mediaMissing = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst isAudioVideo =\n\t\t\t\t\t\t\tmediaElement.mediaType === 'audio' || mediaElement.mediaType === 'video';\n\t\t\t\t\t\tif (isAudioVideo) {\n\t\t\t\t\t\t\tconst arrayBuffer = await newHandler.getMediaArrayBuffer(mediaPath);\n\t\t\t\t\t\t\tif (arrayBuffer) {\n\t\t\t\t\t\t\t\tconst mimeType = mediaElement.mediaMimeType || 'application/octet-stream';\n\t\t\t\t\t\t\t\tconst blob = new Blob([arrayBuffer], { type: mimeType });\n\t\t\t\t\t\t\t\tconst blobUrl = URL.createObjectURL(blob);\n\t\t\t\t\t\t\t\tloadBlobUrls.push(blobUrl);\n\t\t\t\t\t\t\t\tnextMediaUrls.set(mediaPath, blobUrl);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmediaElement.mediaMissing = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst dataUrl = await newHandler.getImageData(mediaPath);\n\t\t\t\t\t\t\tif (dataUrl) {\n\t\t\t\t\t\t\t\tnextMediaUrls.set(mediaPath, dataUrl);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmediaElement.mediaMissing = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tmediaElement.mediaMissing = true;\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t);\n\n\t\t\t// ── Resolve lazily-loaded picture Blob URLs ──\n\t\t\tconst { paths: imagePaths, refs: imageRefs } = collectImagePaths(parsed.slides);\n\t\t\tlet nextSlides = parsed.slides;\n\t\t\tif (imagePaths.size > 0) {\n\t\t\t\tconst resolvedMap = new Map<string, string>();\n\t\t\t\tawait Promise.all(\n\t\t\t\t\tArray.from(imagePaths).map(async (path) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst url = await newHandler.getImageData(path);\n\t\t\t\t\t\t\tif (url) {\n\t\t\t\t\t\t\t\tresolvedMap.set(path, url);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t// Non-critical: image will show as broken.\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t);\n\n\t\t\t\tconst elementPatches = new Map<string, Record<string, string>>();\n\t\t\t\tfor (const refEntry of imageRefs) {\n\t\t\t\t\tconst url = resolvedMap.get(refEntry.path);\n\t\t\t\t\tif (!url) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst id = refEntry.element.id;\n\t\t\t\t\tconst existing = elementPatches.get(id) ?? {};\n\t\t\t\t\texisting[refEntry.field] = url;\n\t\t\t\t\telementPatches.set(id, existing);\n\t\t\t\t}\n\n\t\t\t\tif (elementPatches.size > 0) {\n\t\t\t\t\tconst patchElements = (elements: PptxElement[]): PptxElement[] => {\n\t\t\t\t\t\tlet mutated = false;\n\t\t\t\t\t\tconst next = elements.map((el) => {\n\t\t\t\t\t\t\tlet updated = el;\n\t\t\t\t\t\t\tconst patch = elementPatches.get(el.id);\n\t\t\t\t\t\t\tif (patch) {\n\t\t\t\t\t\t\t\tupdated = { ...el, ...patch } as PptxElement;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (updated.type === 'group' && updated.children?.length) {\n\t\t\t\t\t\t\t\tconst newChildren = patchElements(updated.children);\n\t\t\t\t\t\t\t\tif (newChildren !== updated.children) {\n\t\t\t\t\t\t\t\t\tupdated = { ...updated, children: newChildren };\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (updated !== el) {\n\t\t\t\t\t\t\t\tmutated = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn updated;\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn mutated ? next : elements;\n\t\t\t\t\t};\n\t\t\t\t\tnextSlides = parsed.slides.map((s) => {\n\t\t\t\t\t\tconst newElements = patchElements(s.elements);\n\t\t\t\t\t\treturn newElements === s.elements ? s : { ...s, elements: newElements };\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Commit reactive state.\n\t\t\tthis.revokeBlobUrls(this.activeBlobUrls);\n\t\t\tthis.activeBlobUrls = loadBlobUrls;\n\t\t\tthis.handler = newHandler;\n\t\t\tthis.slides.set(nextSlides);\n\t\t\tthis.mediaDataUrls.set(nextMediaUrls);\n\t\t\tthis.canvasSize.set({\n\t\t\t\twidth: parsed.width ?? DEFAULT_CANVAS_WIDTH,\n\t\t\t\theight: parsed.height ?? DEFAULT_CANVAS_HEIGHT,\n\t\t\t});\n\t\t\tthis.theme.set(parsed.theme);\n\t\t\tthis.slideMasters.set(parsed.slideMasters ?? []);\n\t\t} catch (err) {\n\t\t\tif (token === this.renderToken) {\n\t\t\t\tif (err instanceof EncryptedFileError) {\n\t\t\t\t\tthis.isEncrypted.set(true);\n\t\t\t\t} else {\n\t\t\t\t\tthis.error.set(err instanceof Error ? err.message : String(err));\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tif (token === this.renderToken) {\n\t\t\t\tthis.loading.set(false);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate disposeHandler(): void {\n\t\tif (this.handler) {\n\t\t\tthis.handler.dispose();\n\t\t\tthis.handler = null;\n\t\t}\n\t}\n\n\tprivate revokeBlobUrls(urls: string[]): void {\n\t\tfor (const url of urls) {\n\t\t\tif (url.startsWith('blob:')) {\n\t\t\t\tURL.revokeObjectURL(url);\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { PptxElement } from 'pptx-viewer-core';\nimport { hasShapeProperties, hasTextProperties } from 'pptx-viewer-core';\n\nimport { DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR } from '../internal/shared';\n\n/**\n * Basic, framework-agnostic style computation for slide elements, returning\n * `[ngStyle]`-compatible maps.\n *\n * This mirrors the Vue package's `element-style.ts` (and a deliberately small\n * subset of the React `viewer/utils/*` style layer). It is enough to position\n * and paint text boxes, basic preset shapes, and images. Advanced visuals\n * (gradients, custom geometry clip-paths, shadows, 3D, image effects, text\n * warp) are tracked in PORTING.md.\n *\n * Long term the *logic* here is a shared-extraction candidate — only the\n * return type (CSS map shape) differs per framework — so a future refactor\n * could hoist a neutral core into `pptx-viewer-shared`.\n */\n\n/** `[ngStyle]`-compatible style map. */\nexport type StyleMap = Record<string, string | number>;\n\n/** Map a number to a CSS pixel string. */\nconst px = (n: number): string => `${n}px`;\n\n/**\n * Absolute container style: position, size, rotation, flip, opacity, z-index.\n * Mirrors the essentials of the React `getContainerStyle`.\n */\nexport function getContainerStyle(el: PptxElement, zIndex: number): StyleMap {\n\tconst transforms: string[] = [];\n\tif (el.rotation) {\n\t\ttransforms.push(`rotate(${el.rotation}deg)`);\n\t}\n\tif (el.flipHorizontal) {\n\t\ttransforms.push('scaleX(-1)');\n\t}\n\tif (el.flipVertical) {\n\t\ttransforms.push('scaleY(-1)');\n\t}\n\n\tconst style: StyleMap = {\n\t\tposition: 'absolute',\n\t\tleft: px(el.x),\n\t\ttop: px(el.y),\n\t\twidth: px(el.width),\n\t\theight: px(el.height),\n\t\t'z-index': zIndex,\n\t\t'box-sizing': 'border-box',\n\t};\n\tif (transforms.length > 0) {\n\t\tstyle['transform'] = transforms.join(' ');\n\t}\n\tif (typeof el.opacity === 'number') {\n\t\tstyle['opacity'] = el.opacity;\n\t}\n\tif (el.hidden) {\n\t\tstyle['display'] = 'none';\n\t}\n\treturn style;\n}\n\n/**\n * Fill / stroke / corner-radius for shape-like elements. Returns an empty\n * object when the element carries no shape styling.\n */\nexport function getShapeFillStrokeStyle(el: PptxElement): StyleMap {\n\tif (!hasShapeProperties(el)) {\n\t\treturn {};\n\t}\n\tconst ss = el.shapeStyle;\n\tconst style: StyleMap = {};\n\n\tif (ss) {\n\t\t// Fill — solid only for now (gradients/patterns/images: TODO).\n\t\tif (ss.fillColor && ss.fillColor !== 'transparent' && ss.fillMode !== 'none') {\n\t\t\tstyle['background-color'] = ss.fillColor;\n\t\t}\n\n\t\t// Stroke.\n\t\tconst strokeWidth = Math.max(0, ss.strokeWidth ?? 0);\n\t\tif (strokeWidth > 0) {\n\t\t\tconst dash =\n\t\t\t\tss.strokeDash && ss.strokeDash !== 'solid'\n\t\t\t\t\t? ss.strokeDash === 'dot' || ss.strokeDash === 'sysDot'\n\t\t\t\t\t\t? 'dotted'\n\t\t\t\t\t\t: 'dashed'\n\t\t\t\t\t: 'solid';\n\t\t\tstyle['border'] = `${px(strokeWidth)} ${dash} ${ss.strokeColor ?? DEFAULT_STROKE_COLOR}`;\n\t\t}\n\t}\n\n\t// Corner radius — approximate common preset geometries.\n\tconst shapeType = 'shapeType' in el ? el.shapeType : undefined;\n\tif (shapeType === 'ellipse' || shapeType === 'circle') {\n\t\tstyle['border-radius'] = '50%';\n\t} else if (shapeType === 'roundRect') {\n\t\tstyle['border-radius'] = px(Math.min(el.width, el.height) * 0.1);\n\t}\n\n\treturn style;\n}\n\n/**\n * Text block style for elements that carry text. Mirrors the essentials of the\n * React `getTextStyleForElement`.\n */\nexport function getTextBlockStyle(el: PptxElement): StyleMap {\n\tif (!hasTextProperties(el)) {\n\t\treturn {};\n\t}\n\tconst ts = el.textStyle;\n\tconst style: StyleMap = {\n\t\tdisplay: 'flex',\n\t\t'flex-direction': 'column',\n\t\twidth: '100%',\n\t\theight: '100%',\n\t\toverflow: 'hidden',\n\t\t'white-space': 'pre-wrap',\n\t\t'word-break': 'break-word',\n\t};\n\tif (!ts) {\n\t\tstyle['color'] = DEFAULT_TEXT_COLOR;\n\t\treturn style;\n\t}\n\n\tstyle['color'] = ts.color ?? DEFAULT_TEXT_COLOR;\n\tif (ts.fontFamily) {\n\t\tstyle['font-family'] = ts.fontFamily;\n\t}\n\tif (typeof ts.fontSize === 'number') {\n\t\tstyle['font-size'] = `${ts.fontSize}pt`;\n\t}\n\tif (ts.bold) {\n\t\tstyle['font-weight'] = 'bold';\n\t}\n\tif (ts.italic) {\n\t\tstyle['font-style'] = 'italic';\n\t}\n\n\tconst decorations: string[] = [];\n\tif (ts.underline) {\n\t\tdecorations.push('underline');\n\t}\n\tif (ts.strikethrough) {\n\t\tdecorations.push('line-through');\n\t}\n\tif (decorations.length > 0) {\n\t\tstyle['text-decoration'] = decorations.join(' ');\n\t}\n\n\tswitch (ts.align) {\n\t\tcase 'center':\n\t\t\tstyle['text-align'] = 'center';\n\t\t\tbreak;\n\t\tcase 'right':\n\t\t\tstyle['text-align'] = 'right';\n\t\t\tbreak;\n\t\tcase 'justify':\n\t\t\tstyle['text-align'] = 'justify';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tstyle['text-align'] = 'left';\n\t}\n\n\tswitch (ts.vAlign) {\n\t\tcase 'middle':\n\t\t\tstyle['justify-content'] = 'center';\n\t\t\tbreak;\n\t\tcase 'bottom':\n\t\t\tstyle['justify-content'] = 'flex-end';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tstyle['justify-content'] = 'flex-start';\n\t}\n\n\treturn style;\n}\n\n/** Resolve a displayable image source for picture/image/media poster frames. */\nexport function getImageSrc(\n\tel: PptxElement,\n\tmediaDataUrls: Map<string, string>,\n): string | undefined {\n\tif (el.type === 'picture' || el.type === 'image') {\n\t\treturn el.imageData ?? (el.imagePath ? mediaDataUrls.get(el.imagePath) : undefined);\n\t}\n\tif (el.type === 'media') {\n\t\treturn (\n\t\t\tel.posterFrameData ?? (el.posterFramePath ? mediaDataUrls.get(el.posterFramePath) : undefined)\n\t\t);\n\t}\n\treturn undefined;\n}\n","import { NgStyle } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport type { PptxElement, TextSegment } from 'pptx-viewer-core';\nimport { hasTextProperties } from 'pptx-viewer-core';\n\nimport {\n\tgetContainerStyle,\n\tgetImageSrc,\n\tgetShapeFillStrokeStyle,\n\tgetTextBlockStyle,\n} from './element-style';\nimport type { StyleMap } from './element-style';\n\ninterface TextRun {\n\ttext: string;\n\tstyle: StyleMap;\n}\n\n/**\n * ElementRendererComponent — Angular port of the React `ElementRenderer.tsx`\n * and the Vue `ElementRenderer.vue`.\n *\n * Renders a single slide element by its `type` discriminant (viewer-first\n * subset):\n * - `text` / `shape` → positioned box with fill/stroke + rich text\n * - `picture` / `image` → `<img>`\n * - `media` → poster frame (`<img>`) — playback TODO\n * - `group` → recursive children (self-referencing selector)\n * - everything else → labelled placeholder (TODO, see PORTING.md)\n *\n * Interaction (selection, resize, inline editing), connectors, charts, tables,\n * SmartArt, ink, OLE, and 3D are not yet ported.\n */\n@Component({\n\tselector: 'pptx-element-renderer',\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgStyle],\n\ttemplate: `\n\t\t@switch (true) {\n\t\t\t@case (element().type === 'group') {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-element pptx-ng-group\"\n\t\t\t\t\t[ngStyle]=\"containerStyle()\"\n\t\t\t\t\t[attr.data-element-id]=\"element().id\"\n\t\t\t\t>\n\t\t\t\t\t@for (child of children(); track child.id) {\n\t\t\t\t\t\t<pptx-element-renderer\n\t\t\t\t\t\t\t[element]=\"child\"\n\t\t\t\t\t\t\t[mediaDataUrls]=\"mediaDataUrls()\"\n\t\t\t\t\t\t\t[zIndex]=\"$index\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@case (isImageLike()) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-element pptx-ng-image\"\n\t\t\t\t\t[ngStyle]=\"containerStyle()\"\n\t\t\t\t\t[attr.data-element-id]=\"element().id\"\n\t\t\t\t>\n\t\t\t\t\t@if (imageSrc()) {\n\t\t\t\t\t\t<img [src]=\"imageSrc()\" alt=\"\" class=\"pptx-ng-img\" />\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@case (element().type === 'media') {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-element pptx-ng-media\"\n\t\t\t\t\t[ngStyle]=\"containerStyle()\"\n\t\t\t\t\t[attr.data-element-id]=\"element().id\"\n\t\t\t\t>\n\t\t\t\t\t@if (imageSrc()) {\n\t\t\t\t\t\t<img [src]=\"imageSrc()\" alt=\"\" class=\"pptx-ng-img\" />\n\t\t\t\t\t} @else {\n\t\t\t\t\t\t<div class=\"pptx-ng-placeholder\">{{ placeholderLabel() }}</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@case (isShapeLike()) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-element pptx-ng-shape\"\n\t\t\t\t\t[ngStyle]=\"shapeContainerStyle()\"\n\t\t\t\t\t[attr.data-element-id]=\"element().id\"\n\t\t\t\t>\n\t\t\t\t\t@if (hasText()) {\n\t\t\t\t\t\t<div class=\"pptx-ng-text\" [ngStyle]=\"textStyle()\">\n\t\t\t\t\t\t\t@for (para of paragraphs(); track $index) {\n\t\t\t\t\t\t\t\t<p class=\"pptx-ng-para\">\n\t\t\t\t\t\t\t\t\t@for (run of para; track $index) {\n\t\t\t\t\t\t\t\t\t\t@if (\n\t\t\t\t\t\t\t\t\t\t\trun.text ===\n\t\t\t\t\t\t\t\t\t\t\t'\n'\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t\t\t<span [ngStyle]=\"run.style\">{{ run.text }}</span>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@default {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-element pptx-ng-unsupported\"\n\t\t\t\t\t[ngStyle]=\"containerStyle()\"\n\t\t\t\t\t[attr.data-element-id]=\"element().id\"\n\t\t\t\t>\n\t\t\t\t\t<div class=\"pptx-ng-placeholder\">{{ placeholderLabel() }}</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t`,\n})\nexport class ElementRendererComponent {\n\treadonly element = input.required<PptxElement>();\n\treadonly mediaDataUrls = input<Map<string, string>>(new Map());\n\treadonly zIndex = input<number>(0);\n\n\treadonly containerStyle = computed<StyleMap>(() =>\n\t\tgetContainerStyle(this.element(), this.zIndex()),\n\t);\n\treadonly shapeContainerStyle = computed<StyleMap>(() => ({\n\t\t...this.containerStyle(),\n\t\t...getShapeFillStrokeStyle(this.element()),\n\t}));\n\treadonly textStyle = computed<StyleMap>(() => getTextBlockStyle(this.element()));\n\treadonly imageSrc = computed(() => getImageSrc(this.element(), this.mediaDataUrls()));\n\n\treadonly children = computed<PptxElement[]>(() => {\n\t\tconst el = this.element();\n\t\treturn el.type === 'group' ? (el.children ?? []) : [];\n\t});\n\n\treadonly isShapeLike = computed(\n\t\t() => this.element().type === 'text' || this.element().type === 'shape',\n\t);\n\treadonly isImageLike = computed(\n\t\t() => this.element().type === 'picture' || this.element().type === 'image',\n\t);\n\n\treadonly paragraphs = computed<TextRun[][]>(() => {\n\t\tconst el = this.element();\n\t\tif (!hasTextProperties(el)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst segments = el.textSegments;\n\t\tif (!segments || segments.length === 0) {\n\t\t\treturn el.text ? [[{ text: el.text, style: {} }]] : [];\n\t\t}\n\t\tconst out: TextRun[][] = [[]];\n\t\tfor (const seg of segments) {\n\t\t\tif (seg.isParagraphBreak) {\n\t\t\t\tout.push([]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst current = out[out.length - 1];\n\t\t\tconst text = seg.isLineBreak ? '\\n' : seg.text;\n\t\t\tif (text) {\n\t\t\t\tcurrent.push({ text, style: this.segmentStyle(seg) });\n\t\t\t}\n\t\t}\n\t\treturn out.filter((p) => p.length > 0 || out.length === 1);\n\t});\n\n\treadonly hasText = computed(() => this.paragraphs().some((p) => p.length > 0));\n\n\treadonly placeholderLabel = computed(() => {\n\t\tconst map: Record<string, string> = {\n\t\t\ttable: 'Table',\n\t\t\tchart: 'Chart',\n\t\t\tsmartArt: 'SmartArt',\n\t\t\tconnector: 'Connector',\n\t\t\tgroup: 'Group',\n\t\t\tmedia: 'Media',\n\t\t\tink: 'Ink',\n\t\t\tole: 'Embedded object',\n\t\t\tmodel3d: '3D model',\n\t\t\tzoom: 'Zoom',\n\t\t};\n\t\treturn map[this.element().type] ?? this.element().type;\n\t});\n\n\tprivate segmentStyle(seg: TextSegment): StyleMap {\n\t\tconst s = seg.style ?? {};\n\t\tconst style: StyleMap = {};\n\t\tif (s.fontFamily) {\n\t\t\tstyle['font-family'] = s.fontFamily;\n\t\t}\n\t\tif (typeof s.fontSize === 'number') {\n\t\t\tstyle['font-size'] = `${s.fontSize}pt`;\n\t\t}\n\t\tif (s.color) {\n\t\t\tstyle['color'] = s.color;\n\t\t}\n\t\tif (s.bold) {\n\t\t\tstyle['font-weight'] = 'bold';\n\t\t}\n\t\tif (s.italic) {\n\t\t\tstyle['font-style'] = 'italic';\n\t\t}\n\t\tconst deco: string[] = [];\n\t\tif (s.underline) {\n\t\t\tdeco.push('underline');\n\t\t}\n\t\tif (s.strikethrough) {\n\t\t\tdeco.push('line-through');\n\t\t}\n\t\tif (deco.length > 0) {\n\t\t\tstyle['text-decoration'] = deco.join(' ');\n\t\t}\n\t\treturn style;\n\t}\n}\n","import { NgStyle } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport type { PptxSlide } from 'pptx-viewer-core';\n\nimport type { CanvasSize } from '../internal/shared';\nimport { ElementRendererComponent } from './element-renderer.component';\nimport type { StyleMap } from './element-style';\n\n/**\n * SlideCanvasComponent — Angular port of the React `SlideCanvas.tsx` and Vue\n * `SlideCanvas.vue` (viewer-first subset).\n *\n * Renders the active slide as a fixed-size stage scaled by `zoom`, with each\n * element absolutely positioned. The React version additionally layered in\n * rulers, grid, guides, marquee/selection, connector-creation, drawing, and\n * collaboration overlays — all tracked in PORTING.md.\n */\n@Component({\n\tselector: 'pptx-slide-canvas',\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgStyle, ElementRendererComponent],\n\ttemplate: `\n\t\t<div class=\"pptx-ng-canvas-viewport\">\n\t\t\t<div class=\"pptx-ng-canvas-wrapper\" [ngStyle]=\"wrapperStyle()\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-canvas-stage\"\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-roledescription=\"slide\"\n\t\t\t\t\t[ngStyle]=\"stageStyle()\"\n\t\t\t\t>\n\t\t\t\t\t@for (element of elements(); track element.id; let i = $index) {\n\t\t\t\t\t\t<pptx-element-renderer\n\t\t\t\t\t\t\t[element]=\"element\"\n\t\t\t\t\t\t\t[mediaDataUrls]=\"mediaDataUrls()\"\n\t\t\t\t\t\t\t[zIndex]=\"i\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t`,\n})\nexport class SlideCanvasComponent {\n\treadonly slide = input<PptxSlide | undefined>(undefined);\n\treadonly canvasSize = input.required<CanvasSize>();\n\treadonly mediaDataUrls = input<Map<string, string>>(new Map());\n\treadonly zoom = input<number>(1);\n\n\treadonly elements = computed(() => this.slide()?.elements ?? []);\n\n\treadonly wrapperStyle = computed<StyleMap>(() => {\n\t\tconst scale = this.zoom();\n\t\tconst size = this.canvasSize();\n\t\treturn {\n\t\t\twidth: `${size.width * scale}px`,\n\t\t\theight: `${size.height * scale}px`,\n\t\t\tposition: 'relative',\n\t\t\tmargin: '1rem auto',\n\t\t};\n\t});\n\n\treadonly stageStyle = computed<StyleMap>(() => {\n\t\tconst scale = this.zoom();\n\t\tconst size = this.canvasSize();\n\t\tconst slide = this.slide();\n\t\tconst style: StyleMap = {\n\t\t\twidth: `${size.width}px`,\n\t\t\theight: `${size.height}px`,\n\t\t\ttransform: `scale(${scale})`,\n\t\t\t'transform-origin': 'top left',\n\t\t\tposition: 'relative',\n\t\t\toverflow: 'hidden',\n\t\t\t'background-color':\n\t\t\t\tslide?.backgroundColor && slide.backgroundColor !== 'transparent'\n\t\t\t\t\t? slide.backgroundColor\n\t\t\t\t\t: '#ffffff',\n\t\t\t'background-size': '100% 100%',\n\t\t\t'box-shadow': '0 10px 40px rgba(0, 0, 0, 0.35)',\n\t\t};\n\t\tif (slide?.backgroundImage) {\n\t\t\tstyle['background-image'] = `url(${slide.backgroundImage})`;\n\t\t}\n\t\treturn style;\n\t});\n}\n","import { NgClass, NgStyle } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\toutput,\n\tsignal,\n} from '@angular/core';\n\nimport type { ViewerTheme } from '../internal/shared';\nimport { themeStyle } from '../theme/viewer-theme';\nimport { LoadContentService } from './load-content.service';\nimport { SlideCanvasComponent } from './slide-canvas.component';\nimport type { CollaborationConfig } from './types';\n\nconst ZOOM_STEP = 0.1;\nconst ZOOM_MIN = 0.2;\nconst ZOOM_MAX = 3;\n\n/**\n * PowerPointViewerComponent — Angular port of the React `PowerPointViewer.tsx`\n * and Vue `PowerPointViewer.vue`.\n *\n * Top-level orchestrator that loads `.pptx` bytes and renders the slides with\n * navigation and zoom. This is the viewer-first milestone of the port: the\n * React component additionally composes a full editor (toolbar, inspector\n * panels, dialogs, presentation mode, collaboration, export). The roadmap and\n * per-area status live in `packages/angular/PORTING.md`.\n *\n * Conventions vs. React/Vue:\n * - React `forwardRef` handle / Vue `defineExpose` → public {@link getContent}\n * method (reach it via a template ref or `viewChild`).\n * - React callback props / Vue emits → Angular `output()` events.\n * - React theme context / Vue provide-inject → `themeStyle` CSS vars applied to\n * the root element (app-wide sharing via `provideViewerTheme`).\n */\n@Component({\n\tselector: 'pptx-viewer',\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tproviders: [LoadContentService],\n\timports: [NgClass, NgStyle, SlideCanvasComponent],\n\ttemplate: `\n\t\t<div class=\"pptx-ng-viewer\" [ngClass]=\"class()\" [ngStyle]=\"rootStyle()\">\n\t\t\t@if (loader.loading()) {\n\t\t\t\t<div class=\"pptx-ng-state pptx-ng-loading\">\n\t\t\t\t\t<div class=\"pptx-ng-spinner\" aria-hidden=\"true\"></div>\n\t\t\t\t\t<p>Loading presentation…</p>\n\t\t\t\t</div>\n\t\t\t} @else if (loader.isEncrypted()) {\n\t\t\t\t<div class=\"pptx-ng-state pptx-ng-error\">\n\t\t\t\t\t<p>This presentation is password-protected and cannot be opened.</p>\n\t\t\t\t</div>\n\t\t\t} @else if (loader.error()) {\n\t\t\t\t<div class=\"pptx-ng-state pptx-ng-error\">\n\t\t\t\t\t<p>Failed to load presentation.</p>\n\t\t\t\t\t<pre class=\"pptx-ng-error-detail\">{{ loader.error() }}</pre>\n\t\t\t\t</div>\n\t\t\t} @else {\n\t\t\t\t<header class=\"pptx-ng-toolbar\">\n\t\t\t\t\t<div class=\"pptx-ng-nav\">\n\t\t\t\t\t\t<button type=\"button\" [disabled]=\"activeSlideIndex() <= 0\" (click)=\"goPrev()\">‹</button>\n\t\t\t\t\t\t<span class=\"pptx-ng-slide-counter\">\n\t\t\t\t\t\t\t{{ slideCount() === 0 ? 0 : activeSlideIndex() + 1 }} / {{ slideCount() }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t[disabled]=\"activeSlideIndex() >= slideCount() - 1\"\n\t\t\t\t\t\t\t(click)=\"goNext()\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t›\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"pptx-ng-zoom\">\n\t\t\t\t\t\t<button type=\"button\" (click)=\"zoomOut()\">−</button>\n\t\t\t\t\t\t<button type=\"button\" class=\"pptx-ng-zoom-value\" (click)=\"zoomReset()\">\n\t\t\t\t\t\t\t{{ zoomPercent() }}%\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button type=\"button\" (click)=\"zoomIn()\">+</button>\n\t\t\t\t\t</div>\n\t\t\t\t</header>\n\n\t\t\t\t<div class=\"pptx-ng-body\">\n\t\t\t\t\t<nav class=\"pptx-ng-thumbnails\" aria-label=\"Slides\">\n\t\t\t\t\t\t@for (slide of loader.slides(); track slide.id; let i = $index) {\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclass=\"pptx-ng-thumb\"\n\t\t\t\t\t\t\t\t[class.is-active]=\"i === activeSlideIndex()\"\n\t\t\t\t\t\t\t\t(click)=\"goTo(i)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"pptx-ng-thumb-index\">{{ i + 1 }}</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t}\n\t\t\t\t\t</nav>\n\n\t\t\t\t\t<main class=\"pptx-ng-main\">\n\t\t\t\t\t\t<pptx-slide-canvas\n\t\t\t\t\t\t\t[slide]=\"activeSlide()\"\n\t\t\t\t\t\t\t[canvasSize]=\"loader.canvasSize()\"\n\t\t\t\t\t\t\t[mediaDataUrls]=\"loader.mediaDataUrls()\"\n\t\t\t\t\t\t\t[zoom]=\"zoom()\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</main>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t`,\n})\nexport class PowerPointViewerComponent {\n\t/** PowerPoint content as Uint8Array (or ArrayBuffer). */\n\treadonly content = input<Uint8Array | ArrayBuffer | null>(null);\n\t/** Whether editing actions are enabled. (Editor chrome not yet ported.) */\n\treadonly canEdit = input<boolean>(false);\n\t/** Optional class applied to the root element. */\n\treadonly class = input<string>('');\n\t/** Theme configuration for customising the viewer's appearance. */\n\treadonly theme = input<ViewerTheme | undefined>(undefined);\n\t/** Optional real-time collaboration config (accepted for API parity; not yet implemented). */\n\treadonly collaboration = input<CollaborationConfig | undefined>(undefined);\n\n\t/** Fired when the active slide changes. */\n\treadonly activeSlideChange = output<number>();\n\t/** Fired when the unsaved-changes flag toggles. (Editing not yet ported.) */\n\treadonly dirtyChange = output<boolean>();\n\t/** Fired when the in-memory content changes after edits. (Editing not yet ported.) */\n\treadonly contentChange = output<Uint8Array>();\n\n\tprotected readonly loader = inject(LoadContentService);\n\n\tprotected readonly activeSlideIndex = signal(0);\n\tprotected readonly slideCount = this.loader.slideCount;\n\tprotected readonly activeSlide = computed(() => this.loader.slides()[this.activeSlideIndex()]);\n\tprotected readonly rootStyle = computed(() => themeStyle(this.theme()));\n\n\tprotected readonly zoom = signal(1);\n\tprotected readonly zoomPercent = computed(() => Math.round(this.zoom() * 100));\n\n\tconstructor() {\n\t\t// Load whenever the `content` input changes.\n\t\teffect(() => {\n\t\t\tconst content = this.content();\n\t\t\tvoid this.loader.load(content);\n\t\t});\n\n\t\t// Reset to the first slide whenever a new presentation finishes loading.\n\t\teffect(() => {\n\t\t\t// Read slides to track; reset index out of band.\n\t\t\tthis.loader.slides();\n\t\t\tthis.activeSlideIndex.set(0);\n\t\t});\n\n\t\t// Emit navigation changes.\n\t\teffect(() => {\n\t\t\tthis.activeSlideChange.emit(this.activeSlideIndex());\n\t\t});\n\t}\n\n\t/** Serialise the current presentation to `.pptx` bytes (imperative handle). */\n\tgetContent(): Promise<Uint8Array> {\n\t\treturn this.loader.getContent();\n\t}\n\n\tgoTo(index: number): void {\n\t\tif (index < 0 || index >= this.slideCount()) {\n\t\t\treturn;\n\t\t}\n\t\tthis.activeSlideIndex.set(index);\n\t}\n\tgoPrev(): void {\n\t\tthis.goTo(this.activeSlideIndex() - 1);\n\t}\n\tgoNext(): void {\n\t\tthis.goTo(this.activeSlideIndex() + 1);\n\t}\n\n\tzoomIn(): void {\n\t\tthis.zoom.set(Math.min(ZOOM_MAX, Number((this.zoom() + ZOOM_STEP).toFixed(2))));\n\t}\n\tzoomOut(): void {\n\t\tthis.zoom.set(Math.max(ZOOM_MIN, Number((this.zoom() - ZOOM_STEP).toFixed(2))));\n\t}\n\tzoomReset(): void {\n\t\tthis.zoom.set(1);\n\t}\n}\n","/**\n * Scalar viewer defaults — shared across the React, Vue, and Angular bindings\n * via `pptx-viewer-shared`. Re-exported here for ergonomic local imports.\n */\nexport {\n\tDEFAULT_CANVAS_WIDTH,\n\tDEFAULT_CANVAS_HEIGHT,\n\tDEFAULT_TEXT_COLOR,\n\tDEFAULT_FILL_COLOR,\n\tDEFAULT_STROKE_COLOR,\n} from '../internal/shared';\n","/**\n * Join class values into a single space-separated string, skipping falsy\n * entries. A dependency-free analogue of the React/Vue packages' `cn`\n * (clsx + tailwind-merge); the Angular viewer uses plain scoped CSS rather\n * than Tailwind utility classes, so de-duplication is not required.\n */\nexport type ClassValue = string | number | false | null | undefined;\n\nexport function cn(...values: ClassValue[]): string {\n\treturn values.filter((v): v is string | number => Boolean(v)).join(' ');\n}\n","/**\n * Public API surface for `pptx-angular-viewer`.\n *\n * Angular counterpart of the React `pptx-viewer` and Vue `pptx-vue-viewer`\n * packages. Wraps the framework-agnostic `pptx-viewer-core` engine and shares\n * cross-framework logic via `pptx-viewer-shared`.\n */\nexport * from './viewer';\nexport * from './theme';\nexport { cn, type ClassValue } from './utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAEA;;;;;;AAMG;AACI,MAAM,kBAAkB,GAAsB;IACpD,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IAErB,IAAI,EAAE,SAAS;IACf,cAAc,EAAE,SAAS;IAEzB,OAAO,EAAE,SAAS;IAClB,iBAAiB,EAAE,SAAS;IAE5B,OAAO,EAAE,SAAS;IAClB,iBAAiB,EAAE,SAAS;IAE5B,SAAS,EAAE,SAAS;IACpB,mBAAmB,EAAE,SAAS;IAE9B,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,SAAS;IAE1B,MAAM,EAAE,SAAS;IACjB,gBAAgB,EAAE,SAAS;IAE3B,WAAW,EAAE,SAAS;IACtB,qBAAqB,EAAE,SAA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AA,EAAA,CAAA;kBAzErC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,SAAS,EAAE,CAAC,kBAAkB,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,oBAAoB,CAAC;AACjD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiET,CAAA,CAAA;AACD,iBAAA;;;AC/GD;;;AAGG;;ACKG,SAAU,EAAE,CAAC,GAAG,MAAoB,EAAA;AACzC,IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAA2B,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AACxE;;ACVA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"pptx-angular-viewer.mjs","sources":["../../src/internal/shared-src/theme/defaults.ts","../../src/internal/shared-src/theme/css-vars.ts","../../src/internal/shared-src/loader/load-content-helpers.ts","../../src/internal/shared-src/types.ts","../../src/internal/shared-src/constants.ts","../../src/internal/shared-src/index.ts","../../src/internal/shared.ts","../../src/theme/viewer-theme.ts","../../src/viewer/load-content.service.ts","../../src/viewer/element-style.ts","../../src/viewer/element-renderer.component.ts","../../src/viewer/slide-canvas.component.ts","../../src/viewer/power-point-viewer.component.ts","../../src/viewer/constants.ts","../../src/utils.ts","../../src/public-api.ts","../../src/pptx-angular-viewer.ts"],"sourcesContent":["import type { ViewerThemeColors } from './types';\n\n/**\n * Default dark-theme color values.\n *\n * These correspond to the built-in dark UI of the PowerPoint viewer and\n * use Tailwind's gray palette as the neutral scale with indigo as the\n * primary accent.\n */\nexport const defaultThemeColors: ViewerThemeColors = {\n\tbackground: '#030712', // gray-950\n\tforeground: '#f3f4f6', // gray-100\n\n\tcard: '#111827', // gray-900\n\tcardForeground: '#f3f4f6', // gray-100\n\n\tpopover: '#111827', // gray-900\n\tpopoverForeground: '#f3f4f6', // gray-100\n\n\tprimary: '#6366f1', // indigo-500\n\tprimaryForeground: '#ffffff', // white\n\n\tsecondary: '#1f2937', // gray-800\n\tsecondaryForeground: '#f3f4f6', // gray-100\n\n\tmuted: '#1f2937', // gray-800\n\tmutedForeground: '#9ca3af', // gray-400\n\n\taccent: '#1f2937', // gray-800\n\taccentForeground: '#f3f4f6', // gray-100\n\n\tdestructive: '#ef4444', // red-500\n\tdestructiveForeground: '#ffffff', // white\n\n\tborder: '#374151', // gray-700\n\tinput: '#374151', // gray-700\n\tring: '#6366f1', // indigo-500\n};\n\n/** Default border-radius. */\nexport const defaultRadius = '0.5rem';\n","import { defaultThemeColors, defaultRadius } from './defaults';\nimport type { ViewerTheme, ViewerThemeColors } from './types';\n\n/**\n * Map from camelCase ViewerThemeColors keys to kebab-case CSS custom\n * property suffixes (the part after `--pptx-`).\n */\nconst COLOR_KEY_TO_CSS: Record<keyof ViewerThemeColors, string> = {\n\tbackground: 'background',\n\tforeground: 'foreground',\n\tcard: 'card',\n\tcardForeground: 'card-foreground',\n\tpopover: 'popover',\n\tpopoverForeground: 'popover-foreground',\n\tprimary: 'primary',\n\tprimaryForeground: 'primary-foreground',\n\tsecondary: 'secondary',\n\tsecondaryForeground: 'secondary-foreground',\n\tmuted: 'muted',\n\tmutedForeground: 'muted-foreground',\n\taccent: 'accent',\n\taccentForeground: 'accent-foreground',\n\tdestructive: 'destructive',\n\tdestructiveForeground: 'destructive-foreground',\n\tborder: 'border',\n\tinput: 'input',\n\tring: 'ring',\n};\n\n/**\n * Convert a `ViewerTheme` into a flat `Record<string, string>` of CSS\n * custom properties (including the `--` prefix) ready to be spread onto\n * a `style` attribute.\n *\n * Only properties that differ from the built-in defaults are emitted when\n * `omitDefaults` is true (the default).\n */\nexport function themeToCssVars(\n\ttheme: ViewerTheme | undefined,\n\tomitDefaults = false,\n): Record<string, string> {\n\tconst vars: Record<string, string> = {};\n\n\tif (!theme) {\n\t\treturn vars;\n\t}\n\n\t// ── Colors ───────────────────────────────────────────────────────\n\tconst colors = theme.colors;\n\tif (colors) {\n\t\tfor (const [key, cssSuffix] of Object.entries(COLOR_KEY_TO_CSS)) {\n\t\t\tconst value = colors[key as keyof ViewerThemeColors];\n\t\t\tif (value === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (omitDefaults && value === defaultThemeColors[key as keyof ViewerThemeColors]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvars[`--pptx-${cssSuffix}`] = value;\n\t\t}\n\t}\n\n\t// ── Radius ───────────────────────────────────────────────────────\n\tif (theme.radius !== undefined) {\n\t\tif (!omitDefaults || theme.radius !== defaultRadius) {\n\t\t\tvars['--pptx-radius'] = theme.radius;\n\t\t}\n\t}\n\n\t// ── Escape-hatch custom properties ───────────────────────────────\n\tif (theme.cssVars) {\n\t\tfor (const [key, value] of Object.entries(theme.cssVars)) {\n\t\t\tvars[key] = value;\n\t\t}\n\t}\n\n\treturn vars;\n}\n\n/**\n * Build the complete set of CSS custom properties with all defaults.\n * Useful for generating a full fallback stylesheet.\n */\nexport function defaultCssVars(): Record<string, string> {\n\tconst vars: Record<string, string> = {};\n\n\tfor (const [key, cssSuffix] of Object.entries(COLOR_KEY_TO_CSS)) {\n\t\tvars[`--pptx-${cssSuffix}`] = defaultThemeColors[key as keyof ViewerThemeColors];\n\t}\n\tvars['--pptx-radius'] = defaultRadius;\n\n\treturn vars;\n}\n","/**\n * Pure helper functions for the viewer load pipeline.\n *\n * Framework-agnostic — shared by the React, Vue, and Angular bindings. These\n * were duplicated verbatim across `packages/react` and `packages/vue`; this is\n * now the single canonical copy.\n */\nimport type {\n\tMediaPptxElement,\n\tPicturePptxElement,\n\tPptxElement,\n\tPptxDrawingGuide,\n\tPptxSlide,\n} from 'pptx-viewer-core';\nimport { guideEmuToPx } from 'pptx-viewer-core';\n\nexport interface GuideEntry {\n\tid: string;\n\taxis: 'h' | 'v';\n\tposition: number;\n}\n\n/** An element that may carry an image path needing Blob URL resolution. */\nexport interface ImagePathElement {\n\telement: PptxElement;\n\tfield: 'imageData' | 'svgData' | 'posterFrameData';\n\tpath: string;\n}\n\n/**\n * Recursively walks an element tree and pushes every media element\n * into the supplied collector array.\n */\nexport function collectMediaElements(elements: PptxElement[], collector: MediaPptxElement[]): void {\n\tfor (const element of elements) {\n\t\tif (element.type === 'media') {\n\t\t\tcollector.push(element);\n\t\t\tcontinue;\n\t\t}\n\t\tif (element.type === 'group' && element.children?.length) {\n\t\t\tcollectMediaElements(element.children, collector);\n\t\t}\n\t}\n}\n\n/**\n * Collect all unique image archive paths across all slides that need\n * to be resolved to displayable URLs (Blob URLs).\n *\n * This covers:\n * - Picture elements (`imageData`, `svgData`)\n * - Media poster frames (`posterFrameData`)\n *\n * Returns the set of unique archive paths, plus a list of element/field\n * references that need to be updated once each path resolves.\n */\nexport function collectImagePaths(slides: PptxSlide[]): {\n\tpaths: Set<string>;\n\trefs: ImagePathElement[];\n} {\n\tconst paths = new Set<string>();\n\tconst refs: ImagePathElement[] = [];\n\n\tconst walkElements = (elements: PptxElement[]) => {\n\t\tfor (const el of elements) {\n\t\t\tif (el.type === 'picture' || el.type === 'image') {\n\t\t\t\tconst pic = el as PicturePptxElement;\n\t\t\t\tif (pic.imagePath && !pic.imageData && !isExternalUrl(pic.imagePath)) {\n\t\t\t\t\tpaths.add(pic.imagePath);\n\t\t\t\t\trefs.push({ element: el, field: 'imageData', path: pic.imagePath });\n\t\t\t\t}\n\t\t\t\tif (pic.svgPath && !pic.svgData && !isExternalUrl(pic.svgPath)) {\n\t\t\t\t\tpaths.add(pic.svgPath);\n\t\t\t\t\trefs.push({ element: el, field: 'svgData', path: pic.svgPath });\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (el.type === 'media') {\n\t\t\t\tconst media = el as MediaPptxElement;\n\t\t\t\tif (\n\t\t\t\t\tmedia.posterFramePath &&\n\t\t\t\t\t!media.posterFrameData &&\n\t\t\t\t\t!isExternalUrl(media.posterFramePath)\n\t\t\t\t) {\n\t\t\t\t\tpaths.add(media.posterFramePath);\n\t\t\t\t\trefs.push({\n\t\t\t\t\t\telement: el,\n\t\t\t\t\t\tfield: 'posterFrameData',\n\t\t\t\t\t\tpath: media.posterFramePath,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (el.type === 'group' && el.children?.length) {\n\t\t\t\twalkElements(el.children);\n\t\t\t}\n\t\t}\n\t};\n\n\tfor (const slide of slides) {\n\t\twalkElements(slide.elements);\n\t}\n\n\treturn { paths, refs };\n}\n\nfunction isExternalUrl(path: string): boolean {\n\treturn (\n\t\tpath.startsWith('http://') ||\n\t\tpath.startsWith('https://') ||\n\t\tpath.startsWith('data:') ||\n\t\tpath.startsWith('blob:')\n\t);\n}\n\n/**\n * Converts raw EMU-based drawing guides from the parsed presentation\n * and the first slide into pixel-based `GuideEntry` objects.\n */\nexport function buildInitialGuides(\n\tpresentationGuides: PptxDrawingGuide[] | undefined,\n\tfirstSlideGuides: PptxDrawingGuide[] | undefined,\n): GuideEntry[] {\n\tconst guides: GuideEntry[] = [];\n\tif (presentationGuides) {\n\t\tfor (const g of presentationGuides) {\n\t\t\tguides.push({\n\t\t\t\tid: g.id,\n\t\t\t\taxis: g.orientation === 'horz' ? 'h' : 'v',\n\t\t\t\tposition: guideEmuToPx(g.positionEmu),\n\t\t\t});\n\t\t}\n\t}\n\tif (firstSlideGuides) {\n\t\tfor (const g of firstSlideGuides) {\n\t\t\tguides.push({\n\t\t\t\tid: g.id,\n\t\t\t\taxis: g.orientation === 'horz' ? 'h' : 'v',\n\t\t\t\tposition: guideEmuToPx(g.positionEmu),\n\t\t\t});\n\t\t}\n\t}\n\treturn guides;\n}\n","/**\n * Framework-agnostic public types shared by the viewer bindings.\n *\n * These were duplicated in the React (`types-ui.ts`) and Vue (`viewer/types.ts`)\n * packages; this is the canonical copy. Each binding layers its own\n * framework-specific prop/event/handle types on top of these.\n */\n\n/** Canvas dimensions in pixels. */\nexport interface CanvasSize {\n\twidth: number;\n\theight: number;\n}\n\n/** Collaboration role within a session. */\nexport type CollaborationRole = 'owner' | 'collaborator' | 'viewer';\n\n/**\n * Real-time collaboration configuration.\n *\n * The collaboration runtime (Yjs) is not yet ported to every binding — this\n * type exists so the public prop surface stays identical across React, Vue,\n * and Angular.\n */\nexport interface CollaborationConfig {\n\t/** Unique identifier for the collaboration room (alphanumeric, hyphens, underscores). */\n\troomId: string;\n\t/** WebSocket server URL for the Yjs provider (e.g. \"wss://collab.example.com\"). */\n\tserverUrl: string;\n\t/** Display name for the local user. */\n\tuserName: string;\n\t/** Avatar URL for the local user (optional). */\n\tuserAvatar?: string;\n\t/** Hex colour for the local user's cursor/presence indicator. */\n\tuserColor?: string;\n\t/** Optional authentication token sent with the WebSocket handshake. */\n\tauthToken?: string;\n\t/** Role in the session — defaults to `'collaborator'`. */\n\trole?: CollaborationRole;\n}\n","/**\n * Scalar viewer defaults shared by the UI bindings.\n *\n * Subset of the React package's `constants/scalar.ts` that the Vue and Angular\n * viewers also need. Additional constant groups (toolbar presets, shape styles,\n * transitions, etc.) remain per-binding until those features are ported.\n */\n\n/** Default slide canvas width in pixels when the file declares none. */\nexport const DEFAULT_CANVAS_WIDTH = 1280;\n/** Default slide canvas height in pixels when the file declares none. */\nexport const DEFAULT_CANVAS_HEIGHT = 720;\n\n/** Fallback text colour. */\nexport const DEFAULT_TEXT_COLOR = '#111827';\n/** Fallback shape fill colour. */\nexport const DEFAULT_FILL_COLOR = '#3b82f6';\n/** Fallback shape stroke colour. */\nexport const DEFAULT_STROKE_COLOR = '#1f2937';\n","/**\n * pptx-viewer-shared — framework-agnostic viewer logic shared by the\n * React (`pptx-viewer`), Vue (`pptx-vue-viewer`), and Angular\n * (`pptx-angular-viewer`) bindings.\n *\n * Everything exported here is pure TypeScript (no framework imports), so each\n * UI binding consumes one copy instead of duplicating it.\n *\n * Current surface:\n * - theme: ViewerTheme types, default palette, CSS-variable helpers.\n * - loader: load-pipeline helpers (media/image collection, guides).\n * - types: CanvasSize, CollaborationConfig, CollaborationRole.\n * - constants: scalar viewer defaults (canvas size, fallback colours).\n *\n * Roadmap (see packages/angular/PORTING.md and packages/vue/PORTING.md):\n * color resolution, geometry/clip-paths, connector routing, animation\n * timeline engine, table-merge math, morph matching, export data helpers.\n */\nexport * from './theme';\nexport * from './loader';\nexport * from './types';\nexport * from './constants';\n","/**\n * Internal re-export of `pptx-viewer-shared`.\n *\n * `pptx-viewer-shared` is an INTERNAL, non-published package (`\"private\": true`).\n * Its source is vendored into `./shared-src` at build time by\n * `scripts/inline-shared.mjs` (a generated, git-ignored directory), so the\n * shared code compiles as part of THIS library and ships **inlined** in the\n * published FESM. As a result `pptx-viewer-shared` never appears in the\n * published `package.json`.\n *\n * All Angular sources import shared symbols from THIS barrel, never from the\n * bare `'pptx-viewer-shared'` specifier (which ng-packagr would externalize).\n */\nexport * from './shared-src/index';\n","import { InjectionToken } from '@angular/core';\nimport type { Provider } from '@angular/core';\n\nimport { themeToCssVars } from '../internal/shared';\nimport type { ViewerTheme } from '../internal/shared';\n\n/**\n * Theme system for the Angular PowerPoint viewer.\n *\n * Angular counterpart of the React `ViewerThemeProvider` / `useViewerTheme`\n * context and the Vue `provide`/`inject` theme provider. The `ViewerTheme`\n * type, default palette, and `themeToCssVars` helper are framework-agnostic\n * and live in `pptx-viewer-shared`.\n */\n\n/** DI token carrying the active `ViewerTheme` (or `undefined`). */\nexport const VIEWER_THEME = new InjectionToken<ViewerTheme | undefined>('PPTX_VIEWER_THEME');\n\n/**\n * Provide a `ViewerTheme` to a subtree.\n *\n * Typically you do **not** need this — passing a `theme` input to\n * `<pptx-viewer>` is sufficient. Use this to share a theme across multiple\n * viewers or a wider component subtree.\n *\n * @example\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideViewerTheme({ colors: { primary: '#6366f1' } })],\n * });\n * ```\n */\nexport function provideViewerTheme(theme: ViewerTheme | undefined): Provider {\n\treturn { provide: VIEWER_THEME, useValue: theme };\n}\n\n/**\n * Build an `[ngStyle]`-compatible map of CSS custom properties for a theme.\n * Returns an empty object when the theme contributes no variables.\n */\nexport function themeStyle(theme: ViewerTheme | undefined): Record<string, string> {\n\tif (!theme) {\n\t\treturn {};\n\t}\n\treturn themeToCssVars(theme);\n}\n","import { DestroyRef, Injectable, computed, inject, signal } from '@angular/core';\nimport type {\n\tMediaPptxElement,\n\tPptxElement,\n\tPptxSlide,\n\tPptxSlideMaster,\n\tPptxTheme,\n} from 'pptx-viewer-core';\nimport { EncryptedFileError, PptxHandler } from 'pptx-viewer-core';\n\nimport {\n\tDEFAULT_CANVAS_HEIGHT,\n\tDEFAULT_CANVAS_WIDTH,\n\tcollectImagePaths,\n\tcollectMediaElements,\n} from '../internal/shared';\nimport type { CanvasSize } from '../internal/shared';\n\n/**\n * `LoadContentService` — Angular port of the React `useLoadContent` hook and\n * the Vue `useLoadContent` composable.\n *\n * Parses `.pptx` bytes into reactive signals via the framework-agnostic\n * `PptxHandler` from `pptx-viewer-core`. All heavy lifting (ZIP, XML parse,\n * theme/master/layout resolution, media extraction) lives in core and the\n * pure helpers live in `pptx-viewer-shared`; this service only wires the async\n * load into Angular signals and manages Blob-URL / handler lifecycle.\n *\n * Provide it at the component level so its lifetime tracks the host viewer:\n * `@Component({ providers: [LoadContentService] })`.\n *\n * This is the viewer-first subset; the React hook also populated ~25 extra\n * pieces of presentation metadata (sections, custom shows, embedded fonts,\n * digital signatures, …). Those are tracked in PORTING.md and added here as\n * the corresponding features are ported.\n */\n@Injectable()\nexport class LoadContentService {\n\t/** Parsed slides (with image Blob URLs patched in). */\n\treadonly slides = signal<PptxSlide[]>([]);\n\t/** Slide canvas size in pixels. */\n\treadonly canvasSize = signal<CanvasSize>({\n\t\twidth: DEFAULT_CANVAS_WIDTH,\n\t\theight: DEFAULT_CANVAS_HEIGHT,\n\t});\n\t/** Resolved presentation theme. */\n\treadonly theme = signal<PptxTheme | undefined>(undefined);\n\t/** Slide masters (for placeholder/background resolution). */\n\treadonly slideMasters = signal<PptxSlideMaster[]>([]);\n\t/** Archive-path → displayable URL map for media + poster frames. */\n\treadonly mediaDataUrls = signal<Map<string, string>>(new Map());\n\t/** True while a load is in flight. */\n\treadonly loading = signal(false);\n\t/** Error message from the last failed load, or null. */\n\treadonly error = signal<string | null>(null);\n\t/** True when the file is password-protected and could not be opened. */\n\treadonly isEncrypted = signal(false);\n\n\t/** Number of loaded slides. */\n\treadonly slideCount = computed(() => this.slides().length);\n\n\tprivate handler: PptxHandler | null = null;\n\tprivate renderToken = 0;\n\tprivate activeBlobUrls: string[] = [];\n\n\tconstructor() {\n\t\tinject(DestroyRef).onDestroy(() => {\n\t\t\tthis.renderToken++;\n\t\t\tthis.revokeBlobUrls(this.activeBlobUrls);\n\t\t\tthis.revokeBlobUrls(Array.from(this.mediaDataUrls().values()));\n\t\t\tthis.disposeHandler();\n\t\t});\n\t}\n\n\t/** Serialise the current presentation back to `.pptx` bytes. */\n\tasync getContent(): Promise<Uint8Array> {\n\t\tif (!this.handler) {\n\t\t\tthrow new Error('No presentation is loaded.');\n\t\t}\n\t\treturn this.handler.save(this.slides());\n\t}\n\n\t/** Parse the supplied `.pptx` bytes into the reactive signals. */\n\tasync load(raw: Uint8Array | ArrayBuffer | null | undefined): Promise<void> {\n\t\tif (!raw) {\n\t\t\treturn;\n\t\t}\n\t\tconst token = ++this.renderToken;\n\t\tconst loadBlobUrls: string[] = [];\n\n\t\ttry {\n\t\t\tthis.loading.set(true);\n\t\t\tthis.error.set(null);\n\t\t\tthis.isEncrypted.set(false);\n\n\t\t\tconst buffer =\n\t\t\t\traw instanceof Uint8Array\n\t\t\t\t\t? raw.buffer.slice(raw.byteOffset, raw.byteOffset + raw.byteLength)\n\t\t\t\t\t: raw;\n\n\t\t\tconst fileSizeMB = buffer instanceof ArrayBuffer ? buffer.byteLength / (1024 * 1024) : 0;\n\t\t\tif (fileSizeMB > 50) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`[pptx] Large file detected (${fileSizeMB.toFixed(1)} MB). ` +\n\t\t\t\t\t\t`Loading may use significant memory.`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst previousHandler = this.handler;\n\t\t\tconst newHandler = new PptxHandler();\n\t\t\tconst parsed = await newHandler.load(buffer as ArrayBuffer);\n\t\t\tif (token !== this.renderToken) {\n\t\t\t\tnewHandler.dispose();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpreviousHandler?.dispose();\n\n\t\t\t// ── Resolve media Blob URLs (audio/video + poster frames) ──\n\t\t\tconst mediaElements: MediaPptxElement[] = [];\n\t\t\tfor (const slide of parsed.slides) {\n\t\t\t\tcollectMediaElements(slide.elements, mediaElements);\n\t\t\t}\n\t\t\tthis.revokeBlobUrls(Array.from(this.mediaDataUrls().values()));\n\t\t\tconst nextMediaUrls = new Map<string, string>();\n\t\t\tawait Promise.all(\n\t\t\t\tmediaElements.map(async (mediaElement) => {\n\t\t\t\t\tconst mediaPath = mediaElement.mediaPath;\n\t\t\t\t\tif (!mediaPath) {\n\t\t\t\t\t\tmediaElement.mediaMissing = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst isAudioVideo =\n\t\t\t\t\t\t\tmediaElement.mediaType === 'audio' || mediaElement.mediaType === 'video';\n\t\t\t\t\t\tif (isAudioVideo) {\n\t\t\t\t\t\t\tconst arrayBuffer = await newHandler.getMediaArrayBuffer(mediaPath);\n\t\t\t\t\t\t\tif (arrayBuffer) {\n\t\t\t\t\t\t\t\tconst mimeType = mediaElement.mediaMimeType || 'application/octet-stream';\n\t\t\t\t\t\t\t\tconst blob = new Blob([arrayBuffer], { type: mimeType });\n\t\t\t\t\t\t\t\tconst blobUrl = URL.createObjectURL(blob);\n\t\t\t\t\t\t\t\tloadBlobUrls.push(blobUrl);\n\t\t\t\t\t\t\t\tnextMediaUrls.set(mediaPath, blobUrl);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmediaElement.mediaMissing = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst dataUrl = await newHandler.getImageData(mediaPath);\n\t\t\t\t\t\t\tif (dataUrl) {\n\t\t\t\t\t\t\t\tnextMediaUrls.set(mediaPath, dataUrl);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmediaElement.mediaMissing = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tmediaElement.mediaMissing = true;\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t);\n\n\t\t\t// ── Resolve lazily-loaded picture Blob URLs ──\n\t\t\tconst { paths: imagePaths, refs: imageRefs } = collectImagePaths(parsed.slides);\n\t\t\tlet nextSlides = parsed.slides;\n\t\t\tif (imagePaths.size > 0) {\n\t\t\t\tconst resolvedMap = new Map<string, string>();\n\t\t\t\tawait Promise.all(\n\t\t\t\t\tArray.from(imagePaths).map(async (path) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst url = await newHandler.getImageData(path);\n\t\t\t\t\t\t\tif (url) {\n\t\t\t\t\t\t\t\tresolvedMap.set(path, url);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t// Non-critical: image will show as broken.\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t);\n\n\t\t\t\tconst elementPatches = new Map<string, Record<string, string>>();\n\t\t\t\tfor (const refEntry of imageRefs) {\n\t\t\t\t\tconst url = resolvedMap.get(refEntry.path);\n\t\t\t\t\tif (!url) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst id = refEntry.element.id;\n\t\t\t\t\tconst existing = elementPatches.get(id) ?? {};\n\t\t\t\t\texisting[refEntry.field] = url;\n\t\t\t\t\telementPatches.set(id, existing);\n\t\t\t\t}\n\n\t\t\t\tif (elementPatches.size > 0) {\n\t\t\t\t\tconst patchElements = (elements: PptxElement[]): PptxElement[] => {\n\t\t\t\t\t\tlet mutated = false;\n\t\t\t\t\t\tconst next = elements.map((el) => {\n\t\t\t\t\t\t\tlet updated = el;\n\t\t\t\t\t\t\tconst patch = elementPatches.get(el.id);\n\t\t\t\t\t\t\tif (patch) {\n\t\t\t\t\t\t\t\tupdated = { ...el, ...patch } as PptxElement;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (updated.type === 'group' && updated.children?.length) {\n\t\t\t\t\t\t\t\tconst newChildren = patchElements(updated.children);\n\t\t\t\t\t\t\t\tif (newChildren !== updated.children) {\n\t\t\t\t\t\t\t\t\tupdated = { ...updated, children: newChildren };\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (updated !== el) {\n\t\t\t\t\t\t\t\tmutated = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn updated;\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn mutated ? next : elements;\n\t\t\t\t\t};\n\t\t\t\t\tnextSlides = parsed.slides.map((s) => {\n\t\t\t\t\t\tconst newElements = patchElements(s.elements);\n\t\t\t\t\t\treturn newElements === s.elements ? s : { ...s, elements: newElements };\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Commit reactive state.\n\t\t\tthis.revokeBlobUrls(this.activeBlobUrls);\n\t\t\tthis.activeBlobUrls = loadBlobUrls;\n\t\t\tthis.handler = newHandler;\n\t\t\tthis.slides.set(nextSlides);\n\t\t\tthis.mediaDataUrls.set(nextMediaUrls);\n\t\t\tthis.canvasSize.set({\n\t\t\t\twidth: parsed.width ?? DEFAULT_CANVAS_WIDTH,\n\t\t\t\theight: parsed.height ?? DEFAULT_CANVAS_HEIGHT,\n\t\t\t});\n\t\t\tthis.theme.set(parsed.theme);\n\t\t\tthis.slideMasters.set(parsed.slideMasters ?? []);\n\t\t} catch (err) {\n\t\t\tif (token === this.renderToken) {\n\t\t\t\tif (err instanceof EncryptedFileError) {\n\t\t\t\t\tthis.isEncrypted.set(true);\n\t\t\t\t} else {\n\t\t\t\t\tthis.error.set(err instanceof Error ? err.message : String(err));\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tif (token === this.renderToken) {\n\t\t\t\tthis.loading.set(false);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate disposeHandler(): void {\n\t\tif (this.handler) {\n\t\t\tthis.handler.dispose();\n\t\t\tthis.handler = null;\n\t\t}\n\t}\n\n\tprivate revokeBlobUrls(urls: string[]): void {\n\t\tfor (const url of urls) {\n\t\t\tif (url.startsWith('blob:')) {\n\t\t\t\tURL.revokeObjectURL(url);\n\t\t\t}\n\t\t}\n\t}\n}\n","import type { PptxElement } from 'pptx-viewer-core';\nimport { hasShapeProperties, hasTextProperties } from 'pptx-viewer-core';\n\nimport { DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR } from '../internal/shared';\n\n/**\n * Basic, framework-agnostic style computation for slide elements, returning\n * `[ngStyle]`-compatible maps.\n *\n * This mirrors the Vue package's `element-style.ts` (and a deliberately small\n * subset of the React `viewer/utils/*` style layer). It is enough to position\n * and paint text boxes, basic preset shapes, images, and image/gradient fills\n * (the latter via the parser's prebuilt CSS gradient string). Advanced visuals\n * (the structured gradient builder, pattern fills, custom geometry clip-paths,\n * shadows, 3D, image effects, text warp) are tracked in PORTING.md.\n *\n * Long term the *logic* here is a shared-extraction candidate — only the\n * return type (CSS map shape) differs per framework — so a future refactor\n * could hoist a neutral core into `pptx-viewer-shared`.\n */\n\n/** `[ngStyle]`-compatible style map. */\nexport type StyleMap = Record<string, string | number>;\n\n/** Map a number to a CSS pixel string. */\nconst px = (n: number): string => `${n}px`;\n\n/**\n * Absolute container style: position, size, rotation, flip, opacity, z-index.\n * Mirrors the essentials of the React `getContainerStyle`.\n */\nexport function getContainerStyle(el: PptxElement, zIndex: number): StyleMap {\n\tconst transforms: string[] = [];\n\tif (el.rotation) {\n\t\ttransforms.push(`rotate(${el.rotation}deg)`);\n\t}\n\tif (el.flipHorizontal) {\n\t\ttransforms.push('scaleX(-1)');\n\t}\n\tif (el.flipVertical) {\n\t\ttransforms.push('scaleY(-1)');\n\t}\n\n\tconst style: StyleMap = {\n\t\tposition: 'absolute',\n\t\tleft: px(el.x),\n\t\ttop: px(el.y),\n\t\twidth: px(el.width),\n\t\theight: px(el.height),\n\t\t'z-index': zIndex,\n\t\t'box-sizing': 'border-box',\n\t};\n\tif (transforms.length > 0) {\n\t\tstyle['transform'] = transforms.join(' ');\n\t}\n\tif (typeof el.opacity === 'number') {\n\t\tstyle['opacity'] = el.opacity;\n\t}\n\tif (el.hidden) {\n\t\tstyle['display'] = 'none';\n\t}\n\treturn style;\n}\n\n/**\n * Fill / stroke / corner-radius for shape-like elements. Returns an empty\n * object when the element carries no shape styling.\n */\nexport function getShapeFillStrokeStyle(el: PptxElement): StyleMap {\n\tif (!hasShapeProperties(el)) {\n\t\treturn {};\n\t}\n\tconst ss = el.shapeStyle;\n\tconst style: StyleMap = {};\n\n\tif (ss) {\n\t\t// Fill resolution order mirrors the React `getShapeVisualStyle` and the\n\t\t// Vue port: image fill → gradient → solid colour. Pattern fills\n\t\t// (SVG-based) and the richer structured gradient builder\n\t\t// (`color-gradient.ts`) remain shared-extraction candidates — see\n\t\t// PORTING.md.\n\t\tconst imageFillUrl = ss.fillMode === 'image' && ss.fillImageUrl ? ss.fillImageUrl : undefined;\n\t\t// `fillGradient` is a prebuilt CSS gradient string from the parser.\n\t\tconst gradient = ss.fillMode === 'gradient' || ss.fillGradient ? ss.fillGradient : undefined;\n\n\t\tif (imageFillUrl) {\n\t\t\tstyle['background-color'] = 'transparent';\n\t\t\tstyle['background-image'] = `url(${imageFillUrl})`;\n\t\t\tstyle['background-repeat'] = ss.fillImageMode === 'tile' ? 'repeat' : 'no-repeat';\n\t\t\tstyle['background-size'] = ss.fillImageMode === 'tile' ? 'auto' : '100% 100%';\n\t\t} else if (gradient) {\n\t\t\tstyle['background-image'] = gradient;\n\t\t} else if (ss.fillColor && ss.fillColor !== 'transparent' && ss.fillMode !== 'none') {\n\t\t\tstyle['background-color'] = ss.fillColor;\n\t\t}\n\n\t\t// Stroke.\n\t\tconst strokeWidth = Math.max(0, ss.strokeWidth ?? 0);\n\t\tif (strokeWidth > 0) {\n\t\t\tconst dash =\n\t\t\t\tss.strokeDash && ss.strokeDash !== 'solid'\n\t\t\t\t\t? ss.strokeDash === 'dot' || ss.strokeDash === 'sysDot'\n\t\t\t\t\t\t? 'dotted'\n\t\t\t\t\t\t: 'dashed'\n\t\t\t\t\t: 'solid';\n\t\t\tstyle['border'] = `${px(strokeWidth)} ${dash} ${ss.strokeColor ?? DEFAULT_STROKE_COLOR}`;\n\t\t}\n\t}\n\n\t// Corner radius — approximate common preset geometries.\n\tconst shapeType = 'shapeType' in el ? el.shapeType : undefined;\n\tif (shapeType === 'ellipse' || shapeType === 'circle') {\n\t\tstyle['border-radius'] = '50%';\n\t} else if (shapeType === 'roundRect') {\n\t\tstyle['border-radius'] = px(Math.min(el.width, el.height) * 0.1);\n\t}\n\n\treturn style;\n}\n\n/**\n * Text block style for elements that carry text. Mirrors the essentials of the\n * React `getTextStyleForElement`.\n */\nexport function getTextBlockStyle(el: PptxElement): StyleMap {\n\tif (!hasTextProperties(el)) {\n\t\treturn {};\n\t}\n\tconst ts = el.textStyle;\n\tconst style: StyleMap = {\n\t\tdisplay: 'flex',\n\t\t'flex-direction': 'column',\n\t\twidth: '100%',\n\t\theight: '100%',\n\t\toverflow: 'hidden',\n\t\t'white-space': 'pre-wrap',\n\t\t'word-break': 'break-word',\n\t};\n\tif (!ts) {\n\t\tstyle['color'] = DEFAULT_TEXT_COLOR;\n\t\treturn style;\n\t}\n\n\tstyle['color'] = ts.color ?? DEFAULT_TEXT_COLOR;\n\tif (ts.fontFamily) {\n\t\tstyle['font-family'] = ts.fontFamily;\n\t}\n\tif (typeof ts.fontSize === 'number') {\n\t\tstyle['font-size'] = `${ts.fontSize}pt`;\n\t}\n\tif (ts.bold) {\n\t\tstyle['font-weight'] = 'bold';\n\t}\n\tif (ts.italic) {\n\t\tstyle['font-style'] = 'italic';\n\t}\n\n\tconst decorations: string[] = [];\n\tif (ts.underline) {\n\t\tdecorations.push('underline');\n\t}\n\tif (ts.strikethrough) {\n\t\tdecorations.push('line-through');\n\t}\n\tif (decorations.length > 0) {\n\t\tstyle['text-decoration'] = decorations.join(' ');\n\t}\n\n\tswitch (ts.align) {\n\t\tcase 'center':\n\t\t\tstyle['text-align'] = 'center';\n\t\t\tbreak;\n\t\tcase 'right':\n\t\t\tstyle['text-align'] = 'right';\n\t\t\tbreak;\n\t\tcase 'justify':\n\t\t\tstyle['text-align'] = 'justify';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tstyle['text-align'] = 'left';\n\t}\n\n\tswitch (ts.vAlign) {\n\t\tcase 'middle':\n\t\t\tstyle['justify-content'] = 'center';\n\t\t\tbreak;\n\t\tcase 'bottom':\n\t\t\tstyle['justify-content'] = 'flex-end';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tstyle['justify-content'] = 'flex-start';\n\t}\n\n\treturn style;\n}\n\n/** Resolve a displayable image source for picture/image/media poster frames. */\nexport function getImageSrc(\n\tel: PptxElement,\n\tmediaDataUrls: Map<string, string>,\n): string | undefined {\n\tif (el.type === 'picture' || el.type === 'image') {\n\t\treturn el.imageData ?? (el.imagePath ? mediaDataUrls.get(el.imagePath) : undefined);\n\t}\n\tif (el.type === 'media') {\n\t\treturn (\n\t\t\tel.posterFrameData ?? (el.posterFramePath ? mediaDataUrls.get(el.posterFramePath) : undefined)\n\t\t);\n\t}\n\treturn undefined;\n}\n","import { NgStyle } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport type { PptxElement, TextSegment } from 'pptx-viewer-core';\nimport { hasTextProperties } from 'pptx-viewer-core';\n\nimport {\n\tgetContainerStyle,\n\tgetImageSrc,\n\tgetShapeFillStrokeStyle,\n\tgetTextBlockStyle,\n} from './element-style';\nimport type { StyleMap } from './element-style';\n\ninterface TextRun {\n\ttext: string;\n\tstyle: StyleMap;\n}\n\n/**\n * ElementRendererComponent — Angular port of the React `ElementRenderer.tsx`\n * and the Vue `ElementRenderer.vue`.\n *\n * Renders a single slide element by its `type` discriminant (viewer-first\n * subset):\n * - `text` / `shape` → positioned box with fill/stroke + rich text\n * - `picture` / `image` → `<img>`\n * - `media` → poster frame (`<img>`) — playback TODO\n * - `group` → recursive children (self-referencing selector)\n * - everything else → labelled placeholder (TODO, see PORTING.md)\n *\n * Interaction (selection, resize, inline editing), connectors, charts, tables,\n * SmartArt, ink, OLE, and 3D are not yet ported.\n */\n@Component({\n\tselector: 'pptx-element-renderer',\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgStyle],\n\ttemplate: `\n\t\t@switch (true) {\n\t\t\t@case (element().type === 'group') {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-element pptx-ng-group\"\n\t\t\t\t\t[ngStyle]=\"containerStyle()\"\n\t\t\t\t\t[attr.data-element-id]=\"element().id\"\n\t\t\t\t>\n\t\t\t\t\t@for (child of children(); track child.id) {\n\t\t\t\t\t\t<pptx-element-renderer\n\t\t\t\t\t\t\t[element]=\"child\"\n\t\t\t\t\t\t\t[mediaDataUrls]=\"mediaDataUrls()\"\n\t\t\t\t\t\t\t[zIndex]=\"$index\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@case (isImageLike()) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-element pptx-ng-image\"\n\t\t\t\t\t[ngStyle]=\"containerStyle()\"\n\t\t\t\t\t[attr.data-element-id]=\"element().id\"\n\t\t\t\t>\n\t\t\t\t\t@if (imageSrc()) {\n\t\t\t\t\t\t<img [src]=\"imageSrc()\" alt=\"\" class=\"pptx-ng-img\" />\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@case (element().type === 'media') {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-element pptx-ng-media\"\n\t\t\t\t\t[ngStyle]=\"containerStyle()\"\n\t\t\t\t\t[attr.data-element-id]=\"element().id\"\n\t\t\t\t>\n\t\t\t\t\t@if (imageSrc()) {\n\t\t\t\t\t\t<img [src]=\"imageSrc()\" alt=\"\" class=\"pptx-ng-img\" />\n\t\t\t\t\t} @else {\n\t\t\t\t\t\t<div class=\"pptx-ng-placeholder\">{{ placeholderLabel() }}</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@case (isShapeLike()) {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-element pptx-ng-shape\"\n\t\t\t\t\t[ngStyle]=\"shapeContainerStyle()\"\n\t\t\t\t\t[attr.data-element-id]=\"element().id\"\n\t\t\t\t>\n\t\t\t\t\t@if (hasText()) {\n\t\t\t\t\t\t<div class=\"pptx-ng-text\" [ngStyle]=\"textStyle()\">\n\t\t\t\t\t\t\t@for (para of paragraphs(); track $index) {\n\t\t\t\t\t\t\t\t<p class=\"pptx-ng-para\">\n\t\t\t\t\t\t\t\t\t@for (run of para; track $index) {\n\t\t\t\t\t\t\t\t\t\t@if (\n\t\t\t\t\t\t\t\t\t\t\trun.text ===\n\t\t\t\t\t\t\t\t\t\t\t'\n'\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t\t\t<span [ngStyle]=\"run.style\">{{ run.text }}</span>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@default {\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-element pptx-ng-unsupported\"\n\t\t\t\t\t[ngStyle]=\"containerStyle()\"\n\t\t\t\t\t[attr.data-element-id]=\"element().id\"\n\t\t\t\t>\n\t\t\t\t\t<div class=\"pptx-ng-placeholder\">{{ placeholderLabel() }}</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t`,\n})\nexport class ElementRendererComponent {\n\treadonly element = input.required<PptxElement>();\n\treadonly mediaDataUrls = input<Map<string, string>>(new Map());\n\treadonly zIndex = input<number>(0);\n\n\treadonly containerStyle = computed<StyleMap>(() =>\n\t\tgetContainerStyle(this.element(), this.zIndex()),\n\t);\n\treadonly shapeContainerStyle = computed<StyleMap>(() => ({\n\t\t...this.containerStyle(),\n\t\t...getShapeFillStrokeStyle(this.element()),\n\t}));\n\treadonly textStyle = computed<StyleMap>(() => getTextBlockStyle(this.element()));\n\treadonly imageSrc = computed(() => getImageSrc(this.element(), this.mediaDataUrls()));\n\n\treadonly children = computed<PptxElement[]>(() => {\n\t\tconst el = this.element();\n\t\treturn el.type === 'group' ? (el.children ?? []) : [];\n\t});\n\n\treadonly isShapeLike = computed(\n\t\t() => this.element().type === 'text' || this.element().type === 'shape',\n\t);\n\treadonly isImageLike = computed(\n\t\t() => this.element().type === 'picture' || this.element().type === 'image',\n\t);\n\n\treadonly paragraphs = computed<TextRun[][]>(() => {\n\t\tconst el = this.element();\n\t\tif (!hasTextProperties(el)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst segments = el.textSegments;\n\t\tif (!segments || segments.length === 0) {\n\t\t\treturn el.text ? [[{ text: el.text, style: {} }]] : [];\n\t\t}\n\t\tconst out: TextRun[][] = [[]];\n\t\tfor (const seg of segments) {\n\t\t\tif (seg.isParagraphBreak) {\n\t\t\t\tout.push([]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst current = out[out.length - 1];\n\t\t\tconst text = seg.isLineBreak ? '\\n' : seg.text;\n\t\t\tif (text) {\n\t\t\t\tcurrent.push({ text, style: this.segmentStyle(seg) });\n\t\t\t}\n\t\t}\n\t\treturn out.filter((p) => p.length > 0 || out.length === 1);\n\t});\n\n\treadonly hasText = computed(() => this.paragraphs().some((p) => p.length > 0));\n\n\treadonly placeholderLabel = computed(() => {\n\t\tconst map: Record<string, string> = {\n\t\t\ttable: 'Table',\n\t\t\tchart: 'Chart',\n\t\t\tsmartArt: 'SmartArt',\n\t\t\tconnector: 'Connector',\n\t\t\tgroup: 'Group',\n\t\t\tmedia: 'Media',\n\t\t\tink: 'Ink',\n\t\t\tole: 'Embedded object',\n\t\t\tmodel3d: '3D model',\n\t\t\tzoom: 'Zoom',\n\t\t};\n\t\treturn map[this.element().type] ?? this.element().type;\n\t});\n\n\tprivate segmentStyle(seg: TextSegment): StyleMap {\n\t\tconst s = seg.style ?? {};\n\t\tconst style: StyleMap = {};\n\t\tif (s.fontFamily) {\n\t\t\tstyle['font-family'] = s.fontFamily;\n\t\t}\n\t\tif (typeof s.fontSize === 'number') {\n\t\t\tstyle['font-size'] = `${s.fontSize}pt`;\n\t\t}\n\t\tif (s.color) {\n\t\t\tstyle['color'] = s.color;\n\t\t}\n\t\tif (s.bold) {\n\t\t\tstyle['font-weight'] = 'bold';\n\t\t}\n\t\tif (s.italic) {\n\t\t\tstyle['font-style'] = 'italic';\n\t\t}\n\t\tconst deco: string[] = [];\n\t\tif (s.underline) {\n\t\t\tdeco.push('underline');\n\t\t}\n\t\tif (s.strikethrough) {\n\t\t\tdeco.push('line-through');\n\t\t}\n\t\tif (deco.length > 0) {\n\t\t\tstyle['text-decoration'] = deco.join(' ');\n\t\t}\n\t\treturn style;\n\t}\n}\n","import { NgStyle } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport type { PptxSlide } from 'pptx-viewer-core';\n\nimport type { CanvasSize } from '../internal/shared';\nimport { ElementRendererComponent } from './element-renderer.component';\nimport type { StyleMap } from './element-style';\n\n/**\n * SlideCanvasComponent — Angular port of the React `SlideCanvas.tsx` and Vue\n * `SlideCanvas.vue` (viewer-first subset).\n *\n * Renders the active slide as a fixed-size stage scaled by `zoom`, with each\n * element absolutely positioned. The React version additionally layered in\n * rulers, grid, guides, marquee/selection, connector-creation, drawing, and\n * collaboration overlays — all tracked in PORTING.md.\n */\n@Component({\n\tselector: 'pptx-slide-canvas',\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [NgStyle, ElementRendererComponent],\n\ttemplate: `\n\t\t<div class=\"pptx-ng-canvas-viewport\">\n\t\t\t<div class=\"pptx-ng-canvas-wrapper\" [ngStyle]=\"wrapperStyle()\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"pptx-ng-canvas-stage\"\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-roledescription=\"slide\"\n\t\t\t\t\t[ngStyle]=\"stageStyle()\"\n\t\t\t\t>\n\t\t\t\t\t@for (element of elements(); track element.id; let i = $index) {\n\t\t\t\t\t\t<pptx-element-renderer\n\t\t\t\t\t\t\t[element]=\"element\"\n\t\t\t\t\t\t\t[mediaDataUrls]=\"mediaDataUrls()\"\n\t\t\t\t\t\t\t[zIndex]=\"i\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t`,\n})\nexport class SlideCanvasComponent {\n\treadonly slide = input<PptxSlide | undefined>(undefined);\n\treadonly canvasSize = input.required<CanvasSize>();\n\treadonly mediaDataUrls = input<Map<string, string>>(new Map());\n\treadonly zoom = input<number>(1);\n\n\treadonly elements = computed(() => this.slide()?.elements ?? []);\n\n\treadonly wrapperStyle = computed<StyleMap>(() => {\n\t\tconst scale = this.zoom();\n\t\tconst size = this.canvasSize();\n\t\treturn {\n\t\t\twidth: `${size.width * scale}px`,\n\t\t\theight: `${size.height * scale}px`,\n\t\t\tposition: 'relative',\n\t\t\tmargin: '1rem auto',\n\t\t};\n\t});\n\n\treadonly stageStyle = computed<StyleMap>(() => {\n\t\tconst scale = this.zoom();\n\t\tconst size = this.canvasSize();\n\t\tconst slide = this.slide();\n\t\tconst style: StyleMap = {\n\t\t\twidth: `${size.width}px`,\n\t\t\theight: `${size.height}px`,\n\t\t\ttransform: `scale(${scale})`,\n\t\t\t'transform-origin': 'top left',\n\t\t\tposition: 'relative',\n\t\t\toverflow: 'hidden',\n\t\t\t'background-color':\n\t\t\t\tslide?.backgroundColor && slide.backgroundColor !== 'transparent'\n\t\t\t\t\t? slide.backgroundColor\n\t\t\t\t\t: '#ffffff',\n\t\t\t'background-size': '100% 100%',\n\t\t\t'box-shadow': '0 10px 40px rgba(0, 0, 0, 0.35)',\n\t\t};\n\t\tif (slide?.backgroundImage) {\n\t\t\tstyle['background-image'] = `url(${slide.backgroundImage})`;\n\t\t}\n\t\treturn style;\n\t});\n}\n","import { NgClass, NgStyle } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\toutput,\n\tsignal,\n} from '@angular/core';\n\nimport type { ViewerTheme } from '../internal/shared';\nimport { themeStyle } from '../theme/viewer-theme';\nimport { LoadContentService } from './load-content.service';\nimport { SlideCanvasComponent } from './slide-canvas.component';\nimport type { CollaborationConfig } from './types';\n\nconst ZOOM_STEP = 0.1;\nconst ZOOM_MIN = 0.2;\nconst ZOOM_MAX = 3;\n\n/**\n * PowerPointViewerComponent — Angular port of the React `PowerPointViewer.tsx`\n * and Vue `PowerPointViewer.vue`.\n *\n * Top-level orchestrator that loads `.pptx` bytes and renders the slides with\n * navigation and zoom. This is the viewer-first milestone of the port: the\n * React component additionally composes a full editor (toolbar, inspector\n * panels, dialogs, presentation mode, collaboration, export). The roadmap and\n * per-area status live in `packages/angular/PORTING.md`.\n *\n * Conventions vs. React/Vue:\n * - React `forwardRef` handle / Vue `defineExpose` → public {@link getContent}\n * method (reach it via a template ref or `viewChild`).\n * - React callback props / Vue emits → Angular `output()` events.\n * - React theme context / Vue provide-inject → `themeStyle` CSS vars applied to\n * the root element (app-wide sharing via `provideViewerTheme`).\n */\n@Component({\n\tselector: 'pptx-viewer',\n\tstandalone: true,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tproviders: [LoadContentService],\n\timports: [NgClass, NgStyle, SlideCanvasComponent],\n\ttemplate: `\n\t\t<div class=\"pptx-ng-viewer\" [ngClass]=\"class()\" [ngStyle]=\"rootStyle()\">\n\t\t\t@if (loader.loading()) {\n\t\t\t\t<div class=\"pptx-ng-state pptx-ng-loading\">\n\t\t\t\t\t<div class=\"pptx-ng-spinner\" aria-hidden=\"true\"></div>\n\t\t\t\t\t<p>Loading presentation…</p>\n\t\t\t\t</div>\n\t\t\t} @else if (loader.isEncrypted()) {\n\t\t\t\t<div class=\"pptx-ng-state pptx-ng-error\">\n\t\t\t\t\t<p>This presentation is password-protected and cannot be opened.</p>\n\t\t\t\t</div>\n\t\t\t} @else if (loader.error()) {\n\t\t\t\t<div class=\"pptx-ng-state pptx-ng-error\">\n\t\t\t\t\t<p>Failed to load presentation.</p>\n\t\t\t\t\t<pre class=\"pptx-ng-error-detail\">{{ loader.error() }}</pre>\n\t\t\t\t</div>\n\t\t\t} @else {\n\t\t\t\t<header class=\"pptx-ng-toolbar\">\n\t\t\t\t\t<div class=\"pptx-ng-nav\">\n\t\t\t\t\t\t<button type=\"button\" [disabled]=\"activeSlideIndex() <= 0\" (click)=\"goPrev()\">‹</button>\n\t\t\t\t\t\t<span class=\"pptx-ng-slide-counter\">\n\t\t\t\t\t\t\t{{ slideCount() === 0 ? 0 : activeSlideIndex() + 1 }} / {{ slideCount() }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t[disabled]=\"activeSlideIndex() >= slideCount() - 1\"\n\t\t\t\t\t\t\t(click)=\"goNext()\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t›\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"pptx-ng-zoom\">\n\t\t\t\t\t\t<button type=\"button\" (click)=\"zoomOut()\">−</button>\n\t\t\t\t\t\t<button type=\"button\" class=\"pptx-ng-zoom-value\" (click)=\"zoomReset()\">\n\t\t\t\t\t\t\t{{ zoomPercent() }}%\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button type=\"button\" (click)=\"zoomIn()\">+</button>\n\t\t\t\t\t</div>\n\t\t\t\t</header>\n\n\t\t\t\t<div class=\"pptx-ng-body\">\n\t\t\t\t\t<nav class=\"pptx-ng-thumbnails\" aria-label=\"Slides\">\n\t\t\t\t\t\t@for (slide of loader.slides(); track slide.id; let i = $index) {\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclass=\"pptx-ng-thumb\"\n\t\t\t\t\t\t\t\t[class.is-active]=\"i === activeSlideIndex()\"\n\t\t\t\t\t\t\t\t(click)=\"goTo(i)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"pptx-ng-thumb-index\">{{ i + 1 }}</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t}\n\t\t\t\t\t</nav>\n\n\t\t\t\t\t<main class=\"pptx-ng-main\">\n\t\t\t\t\t\t<pptx-slide-canvas\n\t\t\t\t\t\t\t[slide]=\"activeSlide()\"\n\t\t\t\t\t\t\t[canvasSize]=\"loader.canvasSize()\"\n\t\t\t\t\t\t\t[mediaDataUrls]=\"loader.mediaDataUrls()\"\n\t\t\t\t\t\t\t[zoom]=\"zoom()\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</main>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t`,\n})\nexport class PowerPointViewerComponent {\n\t/** PowerPoint content as Uint8Array (or ArrayBuffer). */\n\treadonly content = input<Uint8Array | ArrayBuffer | null>(null);\n\t/** Whether editing actions are enabled. (Editor chrome not yet ported.) */\n\treadonly canEdit = input<boolean>(false);\n\t/** Optional class applied to the root element. */\n\treadonly class = input<string>('');\n\t/** Theme configuration for customising the viewer's appearance. */\n\treadonly theme = input<ViewerTheme | undefined>(undefined);\n\t/** Optional real-time collaboration config (accepted for API parity; not yet implemented). */\n\treadonly collaboration = input<CollaborationConfig | undefined>(undefined);\n\n\t/** Fired when the active slide changes. */\n\treadonly activeSlideChange = output<number>();\n\t/** Fired when the unsaved-changes flag toggles. (Editing not yet ported.) */\n\treadonly dirtyChange = output<boolean>();\n\t/** Fired when the in-memory content changes after edits. (Editing not yet ported.) */\n\treadonly contentChange = output<Uint8Array>();\n\n\tprotected readonly loader = inject(LoadContentService);\n\n\tprotected readonly activeSlideIndex = signal(0);\n\tprotected readonly slideCount = this.loader.slideCount;\n\tprotected readonly activeSlide = computed(() => this.loader.slides()[this.activeSlideIndex()]);\n\tprotected readonly rootStyle = computed(() => themeStyle(this.theme()));\n\n\tprotected readonly zoom = signal(1);\n\tprotected readonly zoomPercent = computed(() => Math.round(this.zoom() * 100));\n\n\tconstructor() {\n\t\t// Load whenever the `content` input changes.\n\t\teffect(() => {\n\t\t\tconst content = this.content();\n\t\t\tvoid this.loader.load(content);\n\t\t});\n\n\t\t// Reset to the first slide whenever a new presentation finishes loading.\n\t\teffect(() => {\n\t\t\t// Read slides to track; reset index out of band.\n\t\t\tthis.loader.slides();\n\t\t\tthis.activeSlideIndex.set(0);\n\t\t});\n\n\t\t// Emit navigation changes.\n\t\teffect(() => {\n\t\t\tthis.activeSlideChange.emit(this.activeSlideIndex());\n\t\t});\n\t}\n\n\t/** Serialise the current presentation to `.pptx` bytes (imperative handle). */\n\tgetContent(): Promise<Uint8Array> {\n\t\treturn this.loader.getContent();\n\t}\n\n\tgoTo(index: number): void {\n\t\tif (index < 0 || index >= this.slideCount()) {\n\t\t\treturn;\n\t\t}\n\t\tthis.activeSlideIndex.set(index);\n\t}\n\tgoPrev(): void {\n\t\tthis.goTo(this.activeSlideIndex() - 1);\n\t}\n\tgoNext(): void {\n\t\tthis.goTo(this.activeSlideIndex() + 1);\n\t}\n\n\tzoomIn(): void {\n\t\tthis.zoom.set(Math.min(ZOOM_MAX, Number((this.zoom() + ZOOM_STEP).toFixed(2))));\n\t}\n\tzoomOut(): void {\n\t\tthis.zoom.set(Math.max(ZOOM_MIN, Number((this.zoom() - ZOOM_STEP).toFixed(2))));\n\t}\n\tzoomReset(): void {\n\t\tthis.zoom.set(1);\n\t}\n}\n","/**\n * Scalar viewer defaults — shared across the React, Vue, and Angular bindings\n * via `pptx-viewer-shared`. Re-exported here for ergonomic local imports.\n */\nexport {\n\tDEFAULT_CANVAS_WIDTH,\n\tDEFAULT_CANVAS_HEIGHT,\n\tDEFAULT_TEXT_COLOR,\n\tDEFAULT_FILL_COLOR,\n\tDEFAULT_STROKE_COLOR,\n} from '../internal/shared';\n","/**\n * Join class values into a single space-separated string, skipping falsy\n * entries. A dependency-free analogue of the React/Vue packages' `cn`\n * (clsx + tailwind-merge); the Angular viewer uses plain scoped CSS rather\n * than Tailwind utility classes, so de-duplication is not required.\n */\nexport type ClassValue = string | number | false | null | undefined;\n\nexport function cn(...values: ClassValue[]): string {\n\treturn values.filter((v): v is string | number => Boolean(v)).join(' ');\n}\n","/**\n * Public API surface for `pptx-angular-viewer`.\n *\n * Angular counterpart of the React `pptx-viewer` and Vue `pptx-vue-viewer`\n * packages. Wraps the framework-agnostic `pptx-viewer-core` engine and shares\n * cross-framework logic via `pptx-viewer-shared`.\n */\nexport * from './viewer';\nexport * from './theme';\nexport { cn, type ClassValue } from './utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAEA;;;;;;AAMG;AACI,MAAM,kBAAkB,GAAsB;IACpD,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IAErB,IAAI,EAAE,SAAS;IACf,cAAc,EAAE,SAAS;IAEzB,OAAO,EAAE,SAAS;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AACjD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiET,CAAA,CAAA;AACD,iBAAA;;;AC/GD;;;AAGG;;ACKG,SAAU,EAAE,CAAC,GAAG,MAAoB,EAAA;AACzC,IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAA2B,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AACxE;;ACVA;;;;;;AAMG;;ACNH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
1
  {
2
- "name": "pptx-angular-viewer",
3
- "version": "0.1.0",
4
- "description": "Angular PowerPoint viewer/editor component — depends on pptx-viewer-core. Angular counterpart of the React `pptx-viewer` and Vue `pptx-vue-viewer` packages.",
5
- "keywords": [
6
- "angular",
7
- "editor",
8
- "openxml",
9
- "powerpoint",
10
- "pptx",
11
- "presentation",
12
- "viewer"
13
- ],
14
- "homepage": "https://github.com/ChristopherVR/pptx-viewer",
15
- "bugs": {
16
- "url": "https://github.com/ChristopherVR/pptx-viewer/issues"
17
- },
18
- "license": "Apache-2.0",
19
- "author": "ChristopherVR",
20
- "repository": {
21
- "type": "git",
22
- "url": "https://github.com/ChristopherVR/pptx-viewer.git",
23
- "directory": "packages/angular"
24
- },
25
- "exports": {
26
- "./styles": "./pptx-angular-viewer.css",
27
- "./styles.css": "./pptx-angular-viewer.css",
28
- "./package.json": {
29
- "default": "./package.json"
30
- },
31
- ".": {
32
- "types": "./types/pptx-angular-viewer.d.ts",
33
- "default": "./fesm2022/pptx-angular-viewer.mjs"
34
- }
35
- },
36
- "dependencies": {
37
- "tslib": "^2.8.1"
38
- },
39
- "peerDependencies": {
40
- "@angular/common": "^22.0.0",
41
- "@angular/core": "^22.0.0",
42
- "pptx-viewer-core": "^1.1.7",
43
- "rxjs": "^7.8.0"
44
- },
45
- "module": "fesm2022/pptx-angular-viewer.mjs",
46
- "typings": "types/pptx-angular-viewer.d.ts",
47
- "sideEffects": false,
48
- "type": "module"
2
+ "name": "pptx-angular-viewer",
3
+ "version": "1.1.10",
4
+ "description": "Angular PowerPoint viewer/editor component — depends on pptx-viewer-core. Angular counterpart of the React `pptx-viewer` and Vue `pptx-vue-viewer` packages.",
5
+ "keywords": [
6
+ "angular",
7
+ "editor",
8
+ "openxml",
9
+ "powerpoint",
10
+ "pptx",
11
+ "presentation",
12
+ "viewer"
13
+ ],
14
+ "homepage": "https://github.com/ChristopherVR/pptx-viewer",
15
+ "bugs": {
16
+ "url": "https://github.com/ChristopherVR/pptx-viewer/issues"
17
+ },
18
+ "license": "Apache-2.0",
19
+ "author": "ChristopherVR",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/ChristopherVR/pptx-viewer.git",
23
+ "directory": "packages/angular"
24
+ },
25
+ "exports": {
26
+ "./styles": "./pptx-angular-viewer.css",
27
+ "./styles.css": "./pptx-angular-viewer.css",
28
+ "./package.json": {
29
+ "default": "./package.json"
30
+ },
31
+ ".": {
32
+ "types": "./types/pptx-angular-viewer.d.ts",
33
+ "default": "./fesm2022/pptx-angular-viewer.mjs"
34
+ }
35
+ },
36
+ "dependencies": {
37
+ "tslib": "^2.8.1"
38
+ },
39
+ "peerDependencies": {
40
+ "@angular/common": "^22.0.1",
41
+ "@angular/core": "^22.0.1",
42
+ "pptx-viewer-core": "^1.1.10",
43
+ "rxjs": "^7.8.0"
44
+ },
45
+ "module": "fesm2022/pptx-angular-viewer.mjs",
46
+ "typings": "types/pptx-angular-viewer.d.ts",
47
+ "sideEffects": false,
48
+ "type": "module"
49
49
  }
@@ -275,9 +275,10 @@ declare class PowerPointViewerComponent {
275
275
  *
276
276
  * This mirrors the Vue package's `element-style.ts` (and a deliberately small
277
277
  * subset of the React `viewer/utils/*` style layer). It is enough to position
278
- * and paint text boxes, basic preset shapes, and images. Advanced visuals
279
- * (gradients, custom geometry clip-paths, shadows, 3D, image effects, text
280
- * warp) are tracked in PORTING.md.
278
+ * and paint text boxes, basic preset shapes, images, and image/gradient fills
279
+ * (the latter via the parser's prebuilt CSS gradient string). Advanced visuals
280
+ * (the structured gradient builder, pattern fills, custom geometry clip-paths,
281
+ * shadows, 3D, image effects, text warp) are tracked in PORTING.md.
281
282
  *
282
283
  * Long term the *logic* here is a shared-extraction candidate — only the
283
284
  * return type (CSS map shape) differs per framework — so a future refactor