@embedpdf/angular 3.0.0-next.10 → 3.0.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.d.ts +24 -0
- package/dist/fesm2022/embedpdf-angular-actions.mjs +56 -0
- package/dist/fesm2022/embedpdf-angular-actions.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-stage.mjs +1 -1
- package/dist/fesm2022/embedpdf-angular-stage.mjs.map +1 -1
- package/dist/fesm2022/embedpdf-angular.mjs +1 -0
- package/dist/fesm2022/embedpdf-angular.mjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +13 -8
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ActionUiAdapter } from '@embedpdf/plugin-actions';
|
|
2
|
+
export * from '@embedpdf/plugin-actions';
|
|
3
|
+
|
|
4
|
+
/** Override any subset of the default adapter policy. */
|
|
5
|
+
type ActionsUiHandlers = Partial<ActionUiAdapter>;
|
|
6
|
+
/**
|
|
7
|
+
* Angular's spelling of React's `useActionsUiAdapter` (the `use*` →
|
|
8
|
+
* `inject*` law): installs the UI adapter for the active document's action
|
|
9
|
+
* dispatcher. The DEFAULT policy — the origin×phase visibility matrix,
|
|
10
|
+
* sanitizeExternalUri URI opens, browser print/alert fallbacks — is
|
|
11
|
+
* `@embedpdf/web`'s `createDefaultActionsUiAdapter`, written ONCE for every
|
|
12
|
+
* binding; this function is Angular glue only. The doc.print AUTHORITY gate
|
|
13
|
+
* is upstream (the actions plugin) and not overridable.
|
|
14
|
+
*
|
|
15
|
+
* Must run in an injection context (a constructor or field initializer —
|
|
16
|
+
* the runtime `inject*` constraint). Pass a FUNCTION for late-bound
|
|
17
|
+
* handlers; signal reads inside it are NOT tracked (the adapter consults it
|
|
18
|
+
* per effect, the same contract as React's handlers ref). Installing an
|
|
19
|
+
* adapter releases the document-open sequence latch, exactly as in React.
|
|
20
|
+
*/
|
|
21
|
+
declare function injectActionsUiAdapter(handlers?: ActionsUiHandlers | (() => ActionsUiHandlers | undefined)): void;
|
|
22
|
+
|
|
23
|
+
export { injectActionsUiAdapter };
|
|
24
|
+
export type { ActionsUiHandlers };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ActionsToken } from '@embedpdf/plugin-actions';
|
|
2
|
+
export * from '@embedpdf/plugin-actions';
|
|
3
|
+
import { effect } from '@angular/core';
|
|
4
|
+
import { StageToken } from '@embedpdf/plugin-stage/contract';
|
|
5
|
+
import { createDefaultActionsUiAdapter } from '@embedpdf/web';
|
|
6
|
+
import { injectOptionalCapability } from '@embedpdf/angular/runtime';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Angular's spelling of React's `useActionsUiAdapter` (the `use*` →
|
|
10
|
+
* `inject*` law): installs the UI adapter for the active document's action
|
|
11
|
+
* dispatcher. The DEFAULT policy — the origin×phase visibility matrix,
|
|
12
|
+
* sanitizeExternalUri URI opens, browser print/alert fallbacks — is
|
|
13
|
+
* `@embedpdf/web`'s `createDefaultActionsUiAdapter`, written ONCE for every
|
|
14
|
+
* binding; this function is Angular glue only. The doc.print AUTHORITY gate
|
|
15
|
+
* is upstream (the actions plugin) and not overridable.
|
|
16
|
+
*
|
|
17
|
+
* Must run in an injection context (a constructor or field initializer —
|
|
18
|
+
* the runtime `inject*` constraint). Pass a FUNCTION for late-bound
|
|
19
|
+
* handlers; signal reads inside it are NOT tracked (the adapter consults it
|
|
20
|
+
* per effect, the same contract as React's handlers ref). Installing an
|
|
21
|
+
* adapter releases the document-open sequence latch, exactly as in React.
|
|
22
|
+
*/
|
|
23
|
+
function injectActionsUiAdapter(handlers) {
|
|
24
|
+
const actions = injectOptionalCapability(ActionsToken);
|
|
25
|
+
const stage = injectOptionalCapability(StageToken);
|
|
26
|
+
const overrides = typeof handlers === 'function' ? handlers : () => handlers;
|
|
27
|
+
effect((onCleanup) => {
|
|
28
|
+
const capability = actions();
|
|
29
|
+
const stageCapability = stage();
|
|
30
|
+
if (!capability)
|
|
31
|
+
return; // no document yet — nothing to drive
|
|
32
|
+
const adapter = createDefaultActionsUiAdapter({
|
|
33
|
+
overrides,
|
|
34
|
+
goToPage: (page) => stageCapability?.goToPage(page),
|
|
35
|
+
});
|
|
36
|
+
// Identity-safe by construction (the plugin's disposer only clears the
|
|
37
|
+
// slot while THIS adapter is still current).
|
|
38
|
+
onCleanup(capability.setUiAdapter(adapter));
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @embedpdf/angular/actions — the action engine's UI port, Angular
|
|
44
|
+
* spelling. `injectActionsUiAdapter()` installs the SHARED default policy
|
|
45
|
+
* (`@embedpdf/web`'s `createDefaultActionsUiAdapter` — the same
|
|
46
|
+
* origin×phase matrix React ships, written once so the two bindings can
|
|
47
|
+
* never drift).
|
|
48
|
+
*/
|
|
49
|
+
// One-line-per-feature: registration travels with the UI.
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Generated bundle index. Do not edit.
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
export { injectActionsUiAdapter };
|
|
56
|
+
//# sourceMappingURL=embedpdf-angular-actions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedpdf-angular-actions.mjs","sources":["../../actions/src/actions-adapter.ts","../../actions/src/public_api.ts","../../actions/src/embedpdf-angular-actions.ts"],"sourcesContent":["import { effect } from '@angular/core';\nimport { ActionsToken, type ActionUiAdapter } from '@embedpdf/plugin-actions';\nimport { StageToken } from '@embedpdf/plugin-stage/contract';\nimport { createDefaultActionsUiAdapter } from '@embedpdf/web';\n\nimport { injectOptionalCapability } from '@embedpdf/angular/runtime';\n\n/** Override any subset of the default adapter policy. */\nexport type ActionsUiHandlers = Partial<ActionUiAdapter>;\n\n/**\n * Angular's spelling of React's `useActionsUiAdapter` (the `use*` →\n * `inject*` law): installs the UI adapter for the active document's action\n * dispatcher. The DEFAULT policy — the origin×phase visibility matrix,\n * sanitizeExternalUri URI opens, browser print/alert fallbacks — is\n * `@embedpdf/web`'s `createDefaultActionsUiAdapter`, written ONCE for every\n * binding; this function is Angular glue only. The doc.print AUTHORITY gate\n * is upstream (the actions plugin) and not overridable.\n *\n * Must run in an injection context (a constructor or field initializer —\n * the runtime `inject*` constraint). Pass a FUNCTION for late-bound\n * handlers; signal reads inside it are NOT tracked (the adapter consults it\n * per effect, the same contract as React's handlers ref). Installing an\n * adapter releases the document-open sequence latch, exactly as in React.\n */\nexport function injectActionsUiAdapter(\n handlers?: ActionsUiHandlers | (() => ActionsUiHandlers | undefined),\n): void {\n const actions = injectOptionalCapability(ActionsToken);\n const stage = injectOptionalCapability(StageToken);\n const overrides = typeof handlers === 'function' ? handlers : (): typeof handlers => handlers;\n effect((onCleanup) => {\n const capability = actions();\n const stageCapability = stage();\n if (!capability) return; // no document yet — nothing to drive\n const adapter: ActionUiAdapter = createDefaultActionsUiAdapter({\n overrides,\n goToPage: (page) => stageCapability?.goToPage(page),\n });\n // Identity-safe by construction (the plugin's disposer only clears the\n // slot while THIS adapter is still current).\n onCleanup(capability.setUiAdapter(adapter));\n });\n}\n","/**\n * @embedpdf/angular/actions — the action engine's UI port, Angular\n * spelling. `injectActionsUiAdapter()` installs the SHARED default policy\n * (`@embedpdf/web`'s `createDefaultActionsUiAdapter` — the same\n * origin×phase matrix React ships, written once so the two bindings can\n * never drift).\n */\n\n// One-line-per-feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-actions';\nexport * from './actions-adapter';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAUA;;;;;;;;;;;;;;AAcG;AACG,SAAU,sBAAsB,CACpC,QAAoE,EAAA;AAEpE,IAAA,MAAM,OAAO,GAAG,wBAAwB,CAAC,YAAY,CAAC;AACtD,IAAA,MAAM,KAAK,GAAG,wBAAwB,CAAC,UAAU,CAAC;AAClD,IAAA,MAAM,SAAS,GAAG,OAAO,QAAQ,KAAK,UAAU,GAAG,QAAQ,GAAG,MAAuB,QAAQ;AAC7F,IAAA,MAAM,CAAC,CAAC,SAAS,KAAI;AACnB,QAAA,MAAM,UAAU,GAAG,OAAO,EAAE;AAC5B,QAAA,MAAM,eAAe,GAAG,KAAK,EAAE;AAC/B,QAAA,IAAI,CAAC,UAAU;AAAE,YAAA,OAAO;QACxB,MAAM,OAAO,GAAoB,6BAA6B,CAAC;YAC7D,SAAS;YACT,QAAQ,EAAE,CAAC,IAAI,KAAK,eAAe,EAAE,QAAQ,CAAC,IAAI,CAAC;AACpD,SAAA,CAAC;;;QAGF,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AAC7C,IAAA,CAAC,CAAC;AACJ;;AC3CA;;;;;;AAMG;AAEH;;ACRA;;AAEG;;;;"}
|
|
@@ -4,7 +4,7 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { inject, TemplateRef, Directive, input, computed, viewChild, Injector, ChangeDetectionStrategy, Component, contentChild, PLATFORM_ID, ElementRef, NgZone, effect } from '@angular/core';
|
|
5
5
|
import { NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
6
6
|
import { createPageContext, EPDF_PAGE, injectKernelHost, injectOptionalCapabilityFor, injectOptionalCapability, injectDocumentId, injectOptionalSelectorFor, injectCapability, injectSelector, shallowArray } from '@embedpdf/angular/runtime';
|
|
7
|
-
import { InteractionToken } from '@embedpdf/plugin-interaction';
|
|
7
|
+
import { InteractionToken } from '@embedpdf/plugin-interaction/contract';
|
|
8
8
|
import { createStageSurface } from '@embedpdf/web';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedpdf-angular-stage.mjs","sources":["../../stage/src/templates.ts","../../stage/src/page-surface.ts","../../stage/src/stage.ts","../../stage/src/facades.ts","../../stage/src/public_api.ts","../../stage/src/embedpdf-angular-stage.ts"],"sourcesContent":["/**\n * The render-prop translation: React's `children: (page) => ReactNode` becomes\n * marker directives on `<ng-template>`, typed so `let-page` infers\n * `EpdfPageContext` in the template.\n *\n * <epdf-stage>\n * <ng-template epdfPage> page-space content (rotates)\n * <ng-template epdfPageChrome> box-space chrome (never rotates)\n *\n * The `$implicit` context is the SAME stable object the per-page injector\n * provides as `EPDF_PAGE` — `let-page` is sugar for inline chrome; components\n * inside the template just call `injectPage()`.\n */\nimport { Directive, inject, TemplateRef } from '@angular/core';\nimport type { EpdfPageContext } from '@embedpdf/angular/runtime';\n\nexport interface EpdfPageTemplateContext {\n $implicit: EpdfPageContext;\n}\n\n/** PAGE-SPACE content for each visible page (RenderLayer, annotations,\n * markers). Rendered inside the page's content frame, so it ROTATES with the\n * page's display rotation — coordinates are plain PDF points. */\n@Directive({ selector: 'ng-template[epdfPage]', standalone: true })\nexport class EpdfPageTemplate {\n readonly template = inject<TemplateRef<EpdfPageTemplateContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: EpdfPageTemplate,\n ctx: unknown,\n ): ctx is EpdfPageTemplateContext {\n return true;\n }\n}\n\n/** BOX-SPACE chrome for each visible page (page-number label, selection\n * border, per-page buttons). Rendered into the OUTER box (content + reserved\n * `pageFrame`), so it does NOT rotate and the reserved bands are plain\n * regions (`bottom: 0; height: page.frame().bottom`). */\n@Directive({ selector: 'ng-template[epdfPageChrome]', standalone: true })\nexport class EpdfPageChrome {\n readonly template = inject<TemplateRef<EpdfPageTemplateContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: EpdfPageChrome,\n ctx: unknown,\n ): ctx is EpdfPageTemplateContext {\n return true;\n }\n}\n","/**\n * INTERNAL page shell — one per visible page, tracked by `pon` so the instance\n * (and everything below) survives camera motion and page reorders.\n *\n * THE STABILITY INVARIANT (see page-context.ts): `page` (the context) and\n * `pageInjector` are created ONCE per surface. Camera frames arrive as new\n * `vp` input values; only the signals inside the context change. Changing the\n * injector or context object identity would make `NgTemplateOutlet` recreate\n * the embedded views — destroying layers at 120Hz. Don't.\n *\n * Geometry mirrors React's PageSurface: the outer box = content footprint +\n * reserved chrome bands; the shadow is axis-aligned and stays put under\n * rotation; the content wrapper is the ONLY thing rotation turns, and carries\n * no transform at rotation 0 so it pixel-snaps like the shadow behind it.\n * All numbers come from the transform — never re-derive `* zoom` / `* dpr`.\n */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n Injector,\n input,\n viewChild,\n type TemplateRef,\n} from '@angular/core';\nimport type { PageFrame, VisiblePage } from '@embedpdf/plugin-stage';\nimport { createPageContext, EPDF_PAGE, type EpdfPageContext } from '@embedpdf/angular/runtime';\nimport type { EpdfPageTemplateContext } from './templates';\n\n@Component({\n selector: 'epdf-page-surface',\n standalone: true,\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n style: 'position: absolute; display: block;',\n '[style.left.px]': 'left()',\n '[style.top.px]': 'top()',\n '[style.width.px]': 'outerWidth()',\n '[style.height.px]': 'outerHeight()',\n },\n template: `\n <!-- drop shadow ONLY — axis-aligned at the content box (inset by the frame),\n transparent fill so it can never peek out behind the bitmap, and it\n stays put under rotation. -->\n <div\n style=\"position: absolute; box-shadow: var(--epdf-page-shadow, 0 6px 18px rgba(0, 0, 0, 0.18));\"\n [style.left.px]=\"frame().left\"\n [style.top.px]=\"frame().top\"\n [style.width.px]=\"t().viewWidth\"\n [style.height.px]=\"t().viewHeight\"\n ></div>\n <!-- the page: white backing + content as ONE box — the only thing rotation\n turns. We render our own selection highlights, so native selection is\n suppressed on the whole page subtree. -->\n <div\n #content\n style=\"position: absolute; background: #fff; user-select: none; -webkit-user-select: none;\"\n [style.left.px]=\"contentLeft()\"\n [style.top.px]=\"contentTop()\"\n [style.width.px]=\"t().contentWidth\"\n [style.height.px]=\"t().contentHeight\"\n [style.transform]=\"rotate()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"pageTpl()\"\n [ngTemplateOutletContext]=\"templateContext\"\n [ngTemplateOutletInjector]=\"pageInjector\"\n />\n </div>\n <!-- box-space chrome — fills the outer box, NEVER rotates. Bands are plain\n regions: a label is bottom: 0; height: frame().bottom. -->\n @if (chromeTpl(); as chrome) {\n <ng-container\n [ngTemplateOutlet]=\"chrome\"\n [ngTemplateOutletContext]=\"templateContext\"\n [ngTemplateOutletInjector]=\"pageInjector\"\n />\n }\n `,\n})\nexport class EpdfPageSurface {\n readonly vp = input.required<VisiblePage>();\n readonly frame = input.required<PageFrame>();\n readonly documentId = input.required<string>();\n readonly pageTpl = input.required<TemplateRef<EpdfPageTemplateContext>>();\n readonly chromeTpl = input<TemplateRef<EpdfPageTemplateContext> | null>(null);\n\n protected readonly t = computed(() => this.vp().transform);\n\n // Outer box = display footprint + reserved chrome bands; screenX/screenY are\n // the device-snapped footprint top-left, so the box sits one frame further out.\n protected readonly left = computed(() => this.vp().screenX - this.frame().left);\n protected readonly top = computed(() => this.vp().screenY - this.frame().top);\n protected readonly outerWidth = computed(\n () => this.t().viewWidth + this.frame().left + this.frame().right,\n );\n protected readonly outerHeight = computed(\n () => this.t().viewHeight + this.frame().top + this.frame().bottom,\n );\n // Center the (possibly rotated) content box on the display box and rotate\n // about its center — NO translate(), so rotation 0 carries no transform.\n protected readonly contentLeft = computed(\n () => this.frame().left + (this.t().viewWidth - this.t().contentWidth) / 2,\n );\n protected readonly contentTop = computed(\n () => this.frame().top + (this.t().viewHeight - this.t().contentHeight) / 2,\n );\n protected readonly rotate = computed(() => {\n const rotation = this.vp().rotation;\n return rotation ? `rotate(${rotation}deg)` : null;\n });\n\n private readonly contentEl = viewChild.required<ElementRef<HTMLDivElement>>('content');\n\n /** ONE stable context per surface — volatile parts are signals inside it. */\n readonly page: EpdfPageContext = createPageContext({\n documentId: () => this.documentId(),\n pon: () => this.vp().pon,\n pageIndex: computed(() => this.vp().pageIndex),\n frame: this.frame,\n transform: this.t,\n getRect: () => this.contentEl().nativeElement.getBoundingClientRect(),\n });\n\n /** ONE stable injector per surface (see the invariant above), parented to\n * this surface's node injector so layers also reach the kernel host. */\n protected readonly pageInjector = Injector.create({\n providers: [{ provide: EPDF_PAGE, useValue: this.page }],\n parent: inject(Injector),\n });\n\n protected readonly templateContext: EpdfPageTemplateContext = { $implicit: this.page };\n}\n","/**\n * `<epdf-stage>` — virtualizes and positions page surfaces by the camera, and\n * stamps each one with YOUR `<ng-template epdfPage>` — you bring the layers.\n *\n * NULL-SAFE BY DESIGN (a deliberate deviation from React's strict Stage):\n * Angular instantiates projected content eagerly, so a stage constructed\n * before any document exists must not crash — it renders zero pages and its\n * listeners no-op until the document arrives. Teach the document gate anyway:\n * document CHROME (toolbars, panels) still belongs behind `*epdfDocumentGate`.\n *\n * ZONE RULE: every DOM listener here attaches OUTSIDE Angular's zone — a\n * 120Hz pointermove stream must never trigger app-wide change detection.\n * State flows kernel → tick signal → computeds → bindings, so the adapter is\n * zone-agnostic (zoneless recommended, zone.js tolerated).\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n ElementRef,\n inject,\n input,\n NgZone,\n PLATFORM_ID,\n} from '@angular/core';\nimport { StageToken, createScrollHandler } from '@embedpdf/plugin-stage';\nimport type { StageCapability, VisiblePage } from '@embedpdf/plugin-stage';\nimport { InteractionToken } from '@embedpdf/plugin-interaction';\nimport {\n injectDocumentId,\n injectKernelHost,\n injectOptionalCapability,\n injectOptionalCapabilityFor,\n injectOptionalSelectorFor,\n type CapabilityToken,\n} from '@embedpdf/angular/runtime';\nimport type { PageFrame } from '@embedpdf/plugin-stage';\nimport { createStageSurface } from '@embedpdf/web';\nimport { EpdfPageChrome, EpdfPageTemplate } from './templates';\nimport { EpdfPageSurface } from './page-surface';\n\n/** Which stage lens to bind to. Defaults to the main StageToken — pass a custom\n * token to drive an additional lens (e.g. a wrapped thumbnail sidebar). */\nexport type StageTokenProp = CapabilityToken<StageCapability>;\n\nconst EMPTY_PAGES: VisiblePage[] = [];\nconst NO_FRAME: PageFrame = { top: 0, right: 0, bottom: 0, left: 0 };\nconst frameEqual = (a: PageFrame, b: PageFrame) =>\n a.top === b.top && a.right === b.right && a.bottom === b.bottom && a.left === b.left;\n\n@Component({\n selector: 'epdf-stage',\n standalone: true,\n imports: [EpdfPageSurface],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n style: 'position: relative; overflow: hidden; touch-action: none; display: block;',\n '[style.cursor]': 'cursor()',\n },\n template: `\n @if (pageTemplate(); as tpl) {\n @for (p of pages(); track p.pon) {\n <epdf-page-surface\n [vp]=\"p\"\n [frame]=\"frame()\"\n [documentId]=\"documentId() ?? ''\"\n [pageTpl]=\"tpl\"\n [chromeTpl]=\"chromeTemplate()\"\n />\n }\n }\n <!-- viewport-space overlay UI: anything projected into <epdf-stage>\n renders above the pages (menus, controls, scrollbars). -->\n <ng-content />\n `,\n})\nexport class EpdfStage {\n /**\n * Route this Stage's pointer events to the interaction hub (page-resolved via\n * `pageAt`) — AND register this lens's tool-gated pan-scroll handler with it\n * (lens-scoped, so multiple stages on one document never pan each other).\n * Pan is then the `pan` tool's job and dragging in `pointer` mode selects\n * text (incl. across pages).\n *\n * Default TRUE: registering `interactionPlugin()` is the one opt-in — tools\n * just work; without the hub this is inert and the stage falls back to\n * built-in drag-to-pan, so a hub-less setup costs nothing. Set `false` on\n * SECONDARY lenses (a thumbnail rail) that should stay click-to-navigate\n * instead of feeding the document's tools.\n */\n readonly interaction = input(true);\n /**\n * With `interaction`: let drags over page GAPS pan regardless of the active\n * tool (and show a grab cursor there) — the gutter always pans; there is\n * nothing to draw/select outside a page. Default true.\n */\n readonly panFallback = input(true);\n /**\n * Ambient ZOOM gestures on this stage: ctrl/cmd+wheel and trackpad pinch\n * (Safari gesture events included). Default true. Turn OFF for follower\n * lenses with a fixed magnification (a thumbnail rail should scroll under\n * cmd+wheel, not zoom); pinches are still swallowed either way.\n */\n readonly zoomGestures = input(true);\n /** The stage lens to drive (default: the main StageToken). */\n readonly token = input<StageTokenProp>(StageToken);\n\n private readonly host = injectKernelHost();\n private readonly stage = injectOptionalCapabilityFor(() => this.token());\n private readonly ix = injectOptionalCapability(InteractionToken);\n private readonly useHub = computed(() => this.interaction() && this.ix() !== null);\n // The hub's resolved cursor (text/grab/…), applied to the viewport when driving.\n private readonly hubCursor = this.host.value(() => this.ix()?.cursor() ?? 'default');\n protected readonly cursor = computed(() => (this.useHub() ? this.hubCursor() : null));\n\n protected readonly documentId = injectDocumentId();\n // visiblePages already folds in the camera (each page carries its\n // device-snapped screenX/screenY + transform), so panning re-emits the list —\n // no separate camera subscription needed for positioning. The capability\n // memoizes, so Object.is equality suffices.\n protected readonly pages = injectOptionalSelectorFor(\n () => this.token(),\n (c) => c.visiblePages(),\n EMPTY_PAGES,\n );\n // Reserved chrome bands (screen px), uniform across pages — the frame the\n // outer box reserves and the chrome template paints into.\n protected readonly frame = injectOptionalSelectorFor(\n () => this.token(),\n (c) => c.pageFrame(),\n NO_FRAME,\n frameEqual,\n );\n\n private readonly pageTemplateDir = contentChild(EpdfPageTemplate);\n private readonly chromeTemplateDir = contentChild(EpdfPageChrome);\n protected readonly pageTemplate = computed(() => this.pageTemplateDir()?.template ?? null);\n protected readonly chromeTemplate = computed(() => this.chromeTemplateDir()?.template ?? null);\n\n constructor() {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const el = inject(ElementRef).nativeElement as HTMLElement;\n const zone = inject(NgZone);\n\n // Rebinds when the stage capability (document open/close/switch, token\n // change), hub, or gesture flags change — the Angular spelling of the React\n // Stage effect and its dependency array.\n effect((onCleanup) => {\n const stage = this.stage();\n const ix = this.ix();\n const useHub = this.interaction() && !!ix;\n const panFallback = this.panFallback();\n const zoomGestures = this.zoomGestures();\n if (!stage) return; // no document yet — nothing to drive\n\n const cleanups: Array<() => void> = [];\n zone.runOutsideAngular(() => {\n // The WHOLE browser binding — viewport/DPR reporting, sample\n // normalization, gesture controller — is the shared @embedpdf/web\n // surface, so every framework adapter has one feel. This component\n // keeps only Angular glue.\n cleanups.push(\n createStageSurface(el, stage, {\n hub: useHub ? ix : null,\n source: stage.lensId(),\n zoomGestures,\n }),\n );\n // Interaction opt-in lives WITH the sample source: the same knob that\n // forwards this lens's samples also registers its pan-scroll handler,\n // lens-scoped — two stages on one document can never pan each other.\n if (useHub && ix) {\n cleanups.push(\n ix.registerHandler(createScrollHandler(stage, ix, { panFallback }), {\n source: stage.lensId(),\n }),\n );\n }\n });\n onCleanup(() => cleanups.forEach((fn) => fn()));\n });\n }\n}\n","/**\n * Facade inject functions — thin sugar over the capability + generic binding,\n * name-for-name with the React hooks (`useZoom` → `injectZoom`), values\n * replaced by signals.\n *\n * STRICT like their React counterparts: they resolve a document-scoped\n * capability, so call them in document UI (behind `*epdfDocumentGate` /\n * `@if (documentId())`). For always-mounted chrome, read through\n * `injectOptionalSelector` with a fallback instead.\n *\n * Methods LATE-BIND the current capability (`() => cap().zoomIn()`), so a\n * facade captured before a document switch drives the document that is active\n * at CALL time, never a stale one.\n */\nimport type { Signal } from '@angular/core';\nimport { StageToken, settingsEqual } from '@embedpdf/plugin-stage';\nimport type { StageCapability } from '@embedpdf/plugin-stage';\nimport { injectCapability, injectSelector, shallowArray } from '@embedpdf/angular/runtime';\nimport type { StageTokenProp } from './stage';\n\ntype AnyFn = (...args: never[]) => unknown;\n/** Late-binding method passthrough: exact capability signature, current doc. */\nconst lazy = <K extends keyof StageCapability>(\n cap: Signal<StageCapability>,\n key: K,\n): StageCapability[K] =>\n ((...args: unknown[]) =>\n (cap()[key] as unknown as (...a: unknown[]) => unknown)(...args)) as StageCapability[K] &\n AnyFn as StageCapability[K];\n\nexport function injectStage(token: StageTokenProp = StageToken): Signal<StageCapability> {\n return injectCapability(token);\n}\n\nexport function injectZoom(token: StageTokenProp = StageToken) {\n const s = injectCapability(token);\n return {\n zoom: injectSelector(token, (c) => c.zoomLevel()),\n /** Active zoom intent: 'automatic' | 'fit-page' | 'fit-width' | 'fit-all' | 'custom'. */\n mode: injectSelector(token, (c) => c.zoomMode()),\n zoomIn: lazy(s, 'zoomIn'),\n zoomOut: lazy(s, 'zoomOut'),\n fitWidth: lazy(s, 'fitWidth'),\n fitPage: lazy(s, 'fitPage'),\n fitAll: lazy(s, 'fitAll'),\n automatic: lazy(s, 'automatic'),\n zoomTo: lazy(s, 'zoomTo'),\n };\n}\n\nexport function injectPages(token: StageTokenProp = StageToken) {\n const s = injectCapability(token);\n return {\n currentPage: injectSelector(token, (c) => c.currentPage()),\n pageCount: injectSelector(token, (c) => c.pageCount()),\n goToPage: lazy(s, 'goToPage'),\n next: lazy(s, 'next'),\n prev: lazy(s, 'prev'),\n reveal: lazy(s, 'reveal'),\n };\n}\n\nexport function injectLayout(token: StageTokenProp = StageToken) {\n const s = injectCapability(token);\n return {\n flow: injectSelector(token, (c) => c.flow()),\n layout: injectSelector(token, (c) => c.layout()),\n spread: injectSelector(token, (c) => c.spread()),\n sizing: injectSelector(token, (c) => c.sizing()),\n bounded: injectSelector(token, (c) => c.bounded()),\n setFlow: lazy(s, 'setFlow'),\n setLayout: lazy(s, 'setLayout'),\n setSpread: lazy(s, 'setSpread'),\n setSizing: lazy(s, 'setSizing'),\n setBounded: lazy(s, 'setBounded'),\n };\n}\n\n/** The document's page list (with PDF labels) + the current item's pages — the\n * data for page thumbnails / worksheet-style page tabs. */\nexport function injectPageList(token: StageTokenProp = StageToken) {\n return {\n pages: injectSelector(\n token,\n (c) => c.pages(),\n (a, b) =>\n a.length === b.length && a.every((p, i) => p.pon === b[i].pon && p.label === b[i].label),\n ),\n currentItemPages: injectSelector(token, (c) => c.currentItemPages(), shallowArray),\n };\n}\n\n/**\n * All Stage settings + the batch `update`. The seam for \"presets are a customer\n * concern\": keep your own `Partial<StageSettings>` objects and apply them with\n * `update(preset)` (one anchor-preserving change).\n */\nexport function injectStageSettings(token: StageTokenProp = StageToken) {\n const s = injectCapability(token);\n return {\n // settingsEqual derives from the plugin's settings registry — a new setting\n // is covered automatically, without this package spelling out the shape.\n settings: injectSelector(token, (c) => c.settings(), settingsEqual),\n update: lazy(s, 'update'),\n reset: lazy(s, 'resetView'),\n };\n}\n","/**\n * @embedpdf/angular/stage — the viewport trunk: `<epdf-stage>` + page\n * templates + the stage facade inject functions.\n */\n\n// One-line-per-feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-stage';\nexport * from './templates';\nexport * from './page-surface';\nexport * from './stage';\nexport * from './facades';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;AAYG;AAQH;;AAEkE;MAErD,gBAAgB,CAAA;AAClB,IAAA,QAAQ,GAAG,MAAM,CAAuC,WAAW,CAAC;AAC7E,IAAA,OAAO,sBAAsB,CAC3B,IAAsB,EACtB,GAAY,EAAA;AAEZ,QAAA,OAAO,IAAI;IACb;uGAPW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,QAAQ,EAAE,uBAAuB,EAAE,UAAU,EAAE,IAAI,EAAE;;AAWlE;;;AAG0D;MAE7C,cAAc,CAAA;AAChB,IAAA,QAAQ,GAAG,MAAM,CAAuC,WAAW,CAAC;AAC7E,IAAA,OAAO,sBAAsB,CAC3B,IAAoB,EACpB,GAAY,EAAA;AAEZ,QAAA,OAAO,IAAI;IACb;uGAPW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6BAAA,EAAA,QAAA,EAAA,EAAA,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CAAC,EAAE,QAAQ,CAAC;AACzB,QAAA,KAAK,EAAE,IAAI,CAAC,CAAC,EAAE,WAAW,CAAC;KAC5B;AACH;;AC1GA;;;AAGG;AAEH;;ACLA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"embedpdf-angular-stage.mjs","sources":["../../stage/src/templates.ts","../../stage/src/page-surface.ts","../../stage/src/stage.ts","../../stage/src/facades.ts","../../stage/src/public_api.ts","../../stage/src/embedpdf-angular-stage.ts"],"sourcesContent":["/**\n * The render-prop translation: React's `children: (page) => ReactNode` becomes\n * marker directives on `<ng-template>`, typed so `let-page` infers\n * `EpdfPageContext` in the template.\n *\n * <epdf-stage>\n * <ng-template epdfPage> page-space content (rotates)\n * <ng-template epdfPageChrome> box-space chrome (never rotates)\n *\n * The `$implicit` context is the SAME stable object the per-page injector\n * provides as `EPDF_PAGE` — `let-page` is sugar for inline chrome; components\n * inside the template just call `injectPage()`.\n */\nimport { Directive, inject, TemplateRef } from '@angular/core';\nimport type { EpdfPageContext } from '@embedpdf/angular/runtime';\n\nexport interface EpdfPageTemplateContext {\n $implicit: EpdfPageContext;\n}\n\n/** PAGE-SPACE content for each visible page (RenderLayer, annotations,\n * markers). Rendered inside the page's content frame, so it ROTATES with the\n * page's display rotation — coordinates are plain PDF points. */\n@Directive({ selector: 'ng-template[epdfPage]', standalone: true })\nexport class EpdfPageTemplate {\n readonly template = inject<TemplateRef<EpdfPageTemplateContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: EpdfPageTemplate,\n ctx: unknown,\n ): ctx is EpdfPageTemplateContext {\n return true;\n }\n}\n\n/** BOX-SPACE chrome for each visible page (page-number label, selection\n * border, per-page buttons). Rendered into the OUTER box (content + reserved\n * `pageFrame`), so it does NOT rotate and the reserved bands are plain\n * regions (`bottom: 0; height: page.frame().bottom`). */\n@Directive({ selector: 'ng-template[epdfPageChrome]', standalone: true })\nexport class EpdfPageChrome {\n readonly template = inject<TemplateRef<EpdfPageTemplateContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: EpdfPageChrome,\n ctx: unknown,\n ): ctx is EpdfPageTemplateContext {\n return true;\n }\n}\n","/**\n * INTERNAL page shell — one per visible page, tracked by `pon` so the instance\n * (and everything below) survives camera motion and page reorders.\n *\n * THE STABILITY INVARIANT (see page-context.ts): `page` (the context) and\n * `pageInjector` are created ONCE per surface. Camera frames arrive as new\n * `vp` input values; only the signals inside the context change. Changing the\n * injector or context object identity would make `NgTemplateOutlet` recreate\n * the embedded views — destroying layers at 120Hz. Don't.\n *\n * Geometry mirrors React's PageSurface: the outer box = content footprint +\n * reserved chrome bands; the shadow is axis-aligned and stays put under\n * rotation; the content wrapper is the ONLY thing rotation turns, and carries\n * no transform at rotation 0 so it pixel-snaps like the shadow behind it.\n * All numbers come from the transform — never re-derive `* zoom` / `* dpr`.\n */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n Injector,\n input,\n viewChild,\n type TemplateRef,\n} from '@angular/core';\nimport type { PageFrame, VisiblePage } from '@embedpdf/plugin-stage';\nimport { createPageContext, EPDF_PAGE, type EpdfPageContext } from '@embedpdf/angular/runtime';\nimport type { EpdfPageTemplateContext } from './templates';\n\n@Component({\n selector: 'epdf-page-surface',\n standalone: true,\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n style: 'position: absolute; display: block;',\n '[style.left.px]': 'left()',\n '[style.top.px]': 'top()',\n '[style.width.px]': 'outerWidth()',\n '[style.height.px]': 'outerHeight()',\n },\n template: `\n <!-- drop shadow ONLY — axis-aligned at the content box (inset by the frame),\n transparent fill so it can never peek out behind the bitmap, and it\n stays put under rotation. -->\n <div\n style=\"position: absolute; box-shadow: var(--epdf-page-shadow, 0 6px 18px rgba(0, 0, 0, 0.18));\"\n [style.left.px]=\"frame().left\"\n [style.top.px]=\"frame().top\"\n [style.width.px]=\"t().viewWidth\"\n [style.height.px]=\"t().viewHeight\"\n ></div>\n <!-- the page: white backing + content as ONE box — the only thing rotation\n turns. We render our own selection highlights, so native selection is\n suppressed on the whole page subtree. -->\n <div\n #content\n style=\"position: absolute; background: #fff; user-select: none; -webkit-user-select: none;\"\n [style.left.px]=\"contentLeft()\"\n [style.top.px]=\"contentTop()\"\n [style.width.px]=\"t().contentWidth\"\n [style.height.px]=\"t().contentHeight\"\n [style.transform]=\"rotate()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"pageTpl()\"\n [ngTemplateOutletContext]=\"templateContext\"\n [ngTemplateOutletInjector]=\"pageInjector\"\n />\n </div>\n <!-- box-space chrome — fills the outer box, NEVER rotates. Bands are plain\n regions: a label is bottom: 0; height: frame().bottom. -->\n @if (chromeTpl(); as chrome) {\n <ng-container\n [ngTemplateOutlet]=\"chrome\"\n [ngTemplateOutletContext]=\"templateContext\"\n [ngTemplateOutletInjector]=\"pageInjector\"\n />\n }\n `,\n})\nexport class EpdfPageSurface {\n readonly vp = input.required<VisiblePage>();\n readonly frame = input.required<PageFrame>();\n readonly documentId = input.required<string>();\n readonly pageTpl = input.required<TemplateRef<EpdfPageTemplateContext>>();\n readonly chromeTpl = input<TemplateRef<EpdfPageTemplateContext> | null>(null);\n\n protected readonly t = computed(() => this.vp().transform);\n\n // Outer box = display footprint + reserved chrome bands; screenX/screenY are\n // the device-snapped footprint top-left, so the box sits one frame further out.\n protected readonly left = computed(() => this.vp().screenX - this.frame().left);\n protected readonly top = computed(() => this.vp().screenY - this.frame().top);\n protected readonly outerWidth = computed(\n () => this.t().viewWidth + this.frame().left + this.frame().right,\n );\n protected readonly outerHeight = computed(\n () => this.t().viewHeight + this.frame().top + this.frame().bottom,\n );\n // Center the (possibly rotated) content box on the display box and rotate\n // about its center — NO translate(), so rotation 0 carries no transform.\n protected readonly contentLeft = computed(\n () => this.frame().left + (this.t().viewWidth - this.t().contentWidth) / 2,\n );\n protected readonly contentTop = computed(\n () => this.frame().top + (this.t().viewHeight - this.t().contentHeight) / 2,\n );\n protected readonly rotate = computed(() => {\n const rotation = this.vp().rotation;\n return rotation ? `rotate(${rotation}deg)` : null;\n });\n\n private readonly contentEl = viewChild.required<ElementRef<HTMLDivElement>>('content');\n\n /** ONE stable context per surface — volatile parts are signals inside it. */\n readonly page: EpdfPageContext = createPageContext({\n documentId: () => this.documentId(),\n pon: () => this.vp().pon,\n pageIndex: computed(() => this.vp().pageIndex),\n frame: this.frame,\n transform: this.t,\n getRect: () => this.contentEl().nativeElement.getBoundingClientRect(),\n });\n\n /** ONE stable injector per surface (see the invariant above), parented to\n * this surface's node injector so layers also reach the kernel host. */\n protected readonly pageInjector = Injector.create({\n providers: [{ provide: EPDF_PAGE, useValue: this.page }],\n parent: inject(Injector),\n });\n\n protected readonly templateContext: EpdfPageTemplateContext = { $implicit: this.page };\n}\n","/**\n * `<epdf-stage>` — virtualizes and positions page surfaces by the camera, and\n * stamps each one with YOUR `<ng-template epdfPage>` — you bring the layers.\n *\n * NULL-SAFE BY DESIGN (a deliberate deviation from React's strict Stage):\n * Angular instantiates projected content eagerly, so a stage constructed\n * before any document exists must not crash — it renders zero pages and its\n * listeners no-op until the document arrives. Teach the document gate anyway:\n * document CHROME (toolbars, panels) still belongs behind `*epdfDocumentGate`.\n *\n * ZONE RULE: every DOM listener here attaches OUTSIDE Angular's zone — a\n * 120Hz pointermove stream must never trigger app-wide change detection.\n * State flows kernel → tick signal → computeds → bindings, so the adapter is\n * zone-agnostic (zoneless recommended, zone.js tolerated).\n */\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n ElementRef,\n inject,\n input,\n NgZone,\n PLATFORM_ID,\n} from '@angular/core';\nimport { StageToken, createScrollHandler } from '@embedpdf/plugin-stage';\nimport type { StageCapability, VisiblePage } from '@embedpdf/plugin-stage';\nimport { InteractionToken } from '@embedpdf/plugin-interaction/contract';\nimport {\n injectDocumentId,\n injectKernelHost,\n injectOptionalCapability,\n injectOptionalCapabilityFor,\n injectOptionalSelectorFor,\n type CapabilityToken,\n} from '@embedpdf/angular/runtime';\nimport type { PageFrame } from '@embedpdf/plugin-stage';\nimport { createStageSurface } from '@embedpdf/web';\nimport { EpdfPageChrome, EpdfPageTemplate } from './templates';\nimport { EpdfPageSurface } from './page-surface';\n\n/** Which stage lens to bind to. Defaults to the main StageToken — pass a custom\n * token to drive an additional lens (e.g. a wrapped thumbnail sidebar). */\nexport type StageTokenProp = CapabilityToken<StageCapability>;\n\nconst EMPTY_PAGES: VisiblePage[] = [];\nconst NO_FRAME: PageFrame = { top: 0, right: 0, bottom: 0, left: 0 };\nconst frameEqual = (a: PageFrame, b: PageFrame) =>\n a.top === b.top && a.right === b.right && a.bottom === b.bottom && a.left === b.left;\n\n@Component({\n selector: 'epdf-stage',\n standalone: true,\n imports: [EpdfPageSurface],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n style: 'position: relative; overflow: hidden; touch-action: none; display: block;',\n '[style.cursor]': 'cursor()',\n },\n template: `\n @if (pageTemplate(); as tpl) {\n @for (p of pages(); track p.pon) {\n <epdf-page-surface\n [vp]=\"p\"\n [frame]=\"frame()\"\n [documentId]=\"documentId() ?? ''\"\n [pageTpl]=\"tpl\"\n [chromeTpl]=\"chromeTemplate()\"\n />\n }\n }\n <!-- viewport-space overlay UI: anything projected into <epdf-stage>\n renders above the pages (menus, controls, scrollbars). -->\n <ng-content />\n `,\n})\nexport class EpdfStage {\n /**\n * Route this Stage's pointer events to the interaction hub (page-resolved via\n * `pageAt`) — AND register this lens's tool-gated pan-scroll handler with it\n * (lens-scoped, so multiple stages on one document never pan each other).\n * Pan is then the `pan` tool's job and dragging in `pointer` mode selects\n * text (incl. across pages).\n *\n * Default TRUE: registering `interactionPlugin()` is the one opt-in — tools\n * just work; without the hub this is inert and the stage falls back to\n * built-in drag-to-pan, so a hub-less setup costs nothing. Set `false` on\n * SECONDARY lenses (a thumbnail rail) that should stay click-to-navigate\n * instead of feeding the document's tools.\n */\n readonly interaction = input(true);\n /**\n * With `interaction`: let drags over page GAPS pan regardless of the active\n * tool (and show a grab cursor there) — the gutter always pans; there is\n * nothing to draw/select outside a page. Default true.\n */\n readonly panFallback = input(true);\n /**\n * Ambient ZOOM gestures on this stage: ctrl/cmd+wheel and trackpad pinch\n * (Safari gesture events included). Default true. Turn OFF for follower\n * lenses with a fixed magnification (a thumbnail rail should scroll under\n * cmd+wheel, not zoom); pinches are still swallowed either way.\n */\n readonly zoomGestures = input(true);\n /** The stage lens to drive (default: the main StageToken). */\n readonly token = input<StageTokenProp>(StageToken);\n\n private readonly host = injectKernelHost();\n private readonly stage = injectOptionalCapabilityFor(() => this.token());\n private readonly ix = injectOptionalCapability(InteractionToken);\n private readonly useHub = computed(() => this.interaction() && this.ix() !== null);\n // The hub's resolved cursor (text/grab/…), applied to the viewport when driving.\n private readonly hubCursor = this.host.value(() => this.ix()?.cursor() ?? 'default');\n protected readonly cursor = computed(() => (this.useHub() ? this.hubCursor() : null));\n\n protected readonly documentId = injectDocumentId();\n // visiblePages already folds in the camera (each page carries its\n // device-snapped screenX/screenY + transform), so panning re-emits the list —\n // no separate camera subscription needed for positioning. The capability\n // memoizes, so Object.is equality suffices.\n protected readonly pages = injectOptionalSelectorFor(\n () => this.token(),\n (c) => c.visiblePages(),\n EMPTY_PAGES,\n );\n // Reserved chrome bands (screen px), uniform across pages — the frame the\n // outer box reserves and the chrome template paints into.\n protected readonly frame = injectOptionalSelectorFor(\n () => this.token(),\n (c) => c.pageFrame(),\n NO_FRAME,\n frameEqual,\n );\n\n private readonly pageTemplateDir = contentChild(EpdfPageTemplate);\n private readonly chromeTemplateDir = contentChild(EpdfPageChrome);\n protected readonly pageTemplate = computed(() => this.pageTemplateDir()?.template ?? null);\n protected readonly chromeTemplate = computed(() => this.chromeTemplateDir()?.template ?? null);\n\n constructor() {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const el = inject(ElementRef).nativeElement as HTMLElement;\n const zone = inject(NgZone);\n\n // Rebinds when the stage capability (document open/close/switch, token\n // change), hub, or gesture flags change — the Angular spelling of the React\n // Stage effect and its dependency array.\n effect((onCleanup) => {\n const stage = this.stage();\n const ix = this.ix();\n const useHub = this.interaction() && !!ix;\n const panFallback = this.panFallback();\n const zoomGestures = this.zoomGestures();\n if (!stage) return; // no document yet — nothing to drive\n\n const cleanups: Array<() => void> = [];\n zone.runOutsideAngular(() => {\n // The WHOLE browser binding — viewport/DPR reporting, sample\n // normalization, gesture controller — is the shared @embedpdf/web\n // surface, so every framework adapter has one feel. This component\n // keeps only Angular glue.\n cleanups.push(\n createStageSurface(el, stage, {\n hub: useHub ? ix : null,\n source: stage.lensId(),\n zoomGestures,\n }),\n );\n // Interaction opt-in lives WITH the sample source: the same knob that\n // forwards this lens's samples also registers its pan-scroll handler,\n // lens-scoped — two stages on one document can never pan each other.\n if (useHub && ix) {\n cleanups.push(\n ix.registerHandler(createScrollHandler(stage, ix, { panFallback }), {\n source: stage.lensId(),\n }),\n );\n }\n });\n onCleanup(() => cleanups.forEach((fn) => fn()));\n });\n }\n}\n","/**\n * Facade inject functions — thin sugar over the capability + generic binding,\n * name-for-name with the React hooks (`useZoom` → `injectZoom`), values\n * replaced by signals.\n *\n * STRICT like their React counterparts: they resolve a document-scoped\n * capability, so call them in document UI (behind `*epdfDocumentGate` /\n * `@if (documentId())`). For always-mounted chrome, read through\n * `injectOptionalSelector` with a fallback instead.\n *\n * Methods LATE-BIND the current capability (`() => cap().zoomIn()`), so a\n * facade captured before a document switch drives the document that is active\n * at CALL time, never a stale one.\n */\nimport type { Signal } from '@angular/core';\nimport { StageToken, settingsEqual } from '@embedpdf/plugin-stage';\nimport type { StageCapability } from '@embedpdf/plugin-stage';\nimport { injectCapability, injectSelector, shallowArray } from '@embedpdf/angular/runtime';\nimport type { StageTokenProp } from './stage';\n\ntype AnyFn = (...args: never[]) => unknown;\n/** Late-binding method passthrough: exact capability signature, current doc. */\nconst lazy = <K extends keyof StageCapability>(\n cap: Signal<StageCapability>,\n key: K,\n): StageCapability[K] =>\n ((...args: unknown[]) =>\n (cap()[key] as unknown as (...a: unknown[]) => unknown)(...args)) as StageCapability[K] &\n AnyFn as StageCapability[K];\n\nexport function injectStage(token: StageTokenProp = StageToken): Signal<StageCapability> {\n return injectCapability(token);\n}\n\nexport function injectZoom(token: StageTokenProp = StageToken) {\n const s = injectCapability(token);\n return {\n zoom: injectSelector(token, (c) => c.zoomLevel()),\n /** Active zoom intent: 'automatic' | 'fit-page' | 'fit-width' | 'fit-all' | 'custom'. */\n mode: injectSelector(token, (c) => c.zoomMode()),\n zoomIn: lazy(s, 'zoomIn'),\n zoomOut: lazy(s, 'zoomOut'),\n fitWidth: lazy(s, 'fitWidth'),\n fitPage: lazy(s, 'fitPage'),\n fitAll: lazy(s, 'fitAll'),\n automatic: lazy(s, 'automatic'),\n zoomTo: lazy(s, 'zoomTo'),\n };\n}\n\nexport function injectPages(token: StageTokenProp = StageToken) {\n const s = injectCapability(token);\n return {\n currentPage: injectSelector(token, (c) => c.currentPage()),\n pageCount: injectSelector(token, (c) => c.pageCount()),\n goToPage: lazy(s, 'goToPage'),\n next: lazy(s, 'next'),\n prev: lazy(s, 'prev'),\n reveal: lazy(s, 'reveal'),\n };\n}\n\nexport function injectLayout(token: StageTokenProp = StageToken) {\n const s = injectCapability(token);\n return {\n flow: injectSelector(token, (c) => c.flow()),\n layout: injectSelector(token, (c) => c.layout()),\n spread: injectSelector(token, (c) => c.spread()),\n sizing: injectSelector(token, (c) => c.sizing()),\n bounded: injectSelector(token, (c) => c.bounded()),\n setFlow: lazy(s, 'setFlow'),\n setLayout: lazy(s, 'setLayout'),\n setSpread: lazy(s, 'setSpread'),\n setSizing: lazy(s, 'setSizing'),\n setBounded: lazy(s, 'setBounded'),\n };\n}\n\n/** The document's page list (with PDF labels) + the current item's pages — the\n * data for page thumbnails / worksheet-style page tabs. */\nexport function injectPageList(token: StageTokenProp = StageToken) {\n return {\n pages: injectSelector(\n token,\n (c) => c.pages(),\n (a, b) =>\n a.length === b.length && a.every((p, i) => p.pon === b[i].pon && p.label === b[i].label),\n ),\n currentItemPages: injectSelector(token, (c) => c.currentItemPages(), shallowArray),\n };\n}\n\n/**\n * All Stage settings + the batch `update`. The seam for \"presets are a customer\n * concern\": keep your own `Partial<StageSettings>` objects and apply them with\n * `update(preset)` (one anchor-preserving change).\n */\nexport function injectStageSettings(token: StageTokenProp = StageToken) {\n const s = injectCapability(token);\n return {\n // settingsEqual derives from the plugin's settings registry — a new setting\n // is covered automatically, without this package spelling out the shape.\n settings: injectSelector(token, (c) => c.settings(), settingsEqual),\n update: lazy(s, 'update'),\n reset: lazy(s, 'resetView'),\n };\n}\n","/**\n * @embedpdf/angular/stage — the viewport trunk: `<epdf-stage>` + page\n * templates + the stage facade inject functions.\n */\n\n// One-line-per-feature: registration travels with the UI.\nexport * from '@embedpdf/plugin-stage';\nexport * from './templates';\nexport * from './page-surface';\nexport * from './stage';\nexport * from './facades';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;AAYG;AAQH;;AAEkE;MAErD,gBAAgB,CAAA;AAClB,IAAA,QAAQ,GAAG,MAAM,CAAuC,WAAW,CAAC;AAC7E,IAAA,OAAO,sBAAsB,CAC3B,IAAsB,EACtB,GAAY,EAAA;AAEZ,QAAA,OAAO,IAAI;IACb;uGAPW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,QAAQ,EAAE,uBAAuB,EAAE,UAAU,EAAE,IAAI,EAAE;;AAWlE;;;AAG0D;MAE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,CAAC,CAAC,gBAAgB,EAAE,EAAE,YAAY,CAAC;KACnF;AACH;AAEA;;;;AAIG;AACG,SAAU,mBAAmB,CAAC,KAAA,GAAwB,UAAU,EAAA;AACpE,IAAA,MAAM,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC;IACjC,OAAO;;;AAGL,QAAA,QAAQ,EAAE,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,aAAa,CAAC;AACnE,QAAA,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC;AACzB,QAAA,KAAK,EAAE,IAAI,CAAC,CAAC,EAAE,WAAW,CAAC;KAC5B;AACH;;AC1GA;;;AAGG;AAEH;;ACLA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedpdf-angular.mjs","sources":["../../src/public_api.ts","../../src/embedpdf-angular.ts"],"sourcesContent":["/**\n * @embedpdf/angular — the opt-in \"everything\" barrel.\n * Fine for prototyping; examples, docs, and quickstarts import the secondary\n * entry points exclusively, which make the bundle guarantee legible.\n */\nexport * from '@embedpdf/angular/runtime';\nexport * from '@embedpdf/angular/stage';\nexport * from '@embedpdf/angular/render';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"embedpdf-angular.mjs","sources":["../../src/public_api.ts","../../src/embedpdf-angular.ts"],"sourcesContent":["/**\n * @embedpdf/angular — the opt-in \"everything\" barrel.\n * Fine for prototyping; examples, docs, and quickstarts import the secondary\n * entry points exclusively, which make the bundle guarantee legible.\n */\nexport * from '@embedpdf/angular/runtime';\nexport * from '@embedpdf/angular/stage';\nexport * from '@embedpdf/angular/render';\nexport * from '@embedpdf/angular/actions';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAAA;;;;AAIG;;ACJH;;AAEG"}
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/angular",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Angular adapter for EmbedPDF v3: one generic signal binding + structural components (EpdfViewer, EpdfStage) + headless layers & inject functions. The whole framework surface, one secondary entry point per feature.",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"./render": {
|
|
23
23
|
"types": "./dist/render/index.d.ts",
|
|
24
24
|
"default": "./dist/fesm2022/embedpdf-angular-render.mjs"
|
|
25
|
+
},
|
|
26
|
+
"./actions": {
|
|
27
|
+
"types": "./dist/actions/index.d.ts",
|
|
28
|
+
"default": "./dist/fesm2022/embedpdf-angular-actions.mjs"
|
|
25
29
|
}
|
|
26
30
|
},
|
|
27
31
|
"files": [
|
|
@@ -29,13 +33,14 @@
|
|
|
29
33
|
],
|
|
30
34
|
"dependencies": {
|
|
31
35
|
"tslib": "^2.6.0",
|
|
32
|
-
"@embedpdf/core": "3.0.0-next.
|
|
33
|
-
"@embedpdf/core-
|
|
34
|
-
"@embedpdf/core-
|
|
35
|
-
"@embedpdf/plugin-stage": "3.0.0-next.
|
|
36
|
-
"@embedpdf/plugin-
|
|
37
|
-
"@embedpdf/plugin-
|
|
38
|
-
"@embedpdf/web": "3.0.0-next.
|
|
36
|
+
"@embedpdf/core": "3.0.0-next.11",
|
|
37
|
+
"@embedpdf/core-geometry": "3.0.0-next.11",
|
|
38
|
+
"@embedpdf/core-stage": "3.0.0-next.11",
|
|
39
|
+
"@embedpdf/plugin-stage": "3.0.0-next.11",
|
|
40
|
+
"@embedpdf/plugin-interaction": "3.0.0-next.11",
|
|
41
|
+
"@embedpdf/plugin-actions": "3.0.0-next.11",
|
|
42
|
+
"@embedpdf/web": "3.0.0-next.11",
|
|
43
|
+
"@embedpdf/plugin-render": "3.0.0-next.11"
|
|
39
44
|
},
|
|
40
45
|
"peerDependencies": {
|
|
41
46
|
"@angular/common": ">=20.2.0 <23.0.0",
|