@embedpdf/angular 3.0.0-next.13 → 3.0.0-next.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +309 -0
  2. package/dist/README.md +309 -0
  3. package/dist/actions/index.d.ts +34 -16
  4. package/dist/anchored/index.d.ts +67 -0
  5. package/dist/annotation/index.d.ts +599 -0
  6. package/dist/commands/index.d.ts +109 -0
  7. package/dist/fesm2022/embedpdf-angular-actions.mjs +117 -36
  8. package/dist/fesm2022/embedpdf-angular-actions.mjs.map +1 -1
  9. package/dist/fesm2022/embedpdf-angular-anchored.mjs +148 -0
  10. package/dist/fesm2022/embedpdf-angular-anchored.mjs.map +1 -0
  11. package/dist/fesm2022/embedpdf-angular-annotation.mjs +1960 -0
  12. package/dist/fesm2022/embedpdf-angular-annotation.mjs.map +1 -0
  13. package/dist/fesm2022/embedpdf-angular-commands.mjs +235 -0
  14. package/dist/fesm2022/embedpdf-angular-commands.mjs.map +1 -0
  15. package/dist/fesm2022/embedpdf-angular-form.mjs +1074 -0
  16. package/dist/fesm2022/embedpdf-angular-form.mjs.map +1 -0
  17. package/dist/fesm2022/embedpdf-angular-history.mjs +54 -0
  18. package/dist/fesm2022/embedpdf-angular-history.mjs.map +1 -0
  19. package/dist/fesm2022/embedpdf-angular-i18n.mjs +100 -0
  20. package/dist/fesm2022/embedpdf-angular-i18n.mjs.map +1 -0
  21. package/dist/fesm2022/embedpdf-angular-interaction.mjs +157 -0
  22. package/dist/fesm2022/embedpdf-angular-interaction.mjs.map +1 -0
  23. package/dist/fesm2022/embedpdf-angular-link.mjs +306 -0
  24. package/dist/fesm2022/embedpdf-angular-link.mjs.map +1 -0
  25. package/dist/fesm2022/embedpdf-angular-measurement.mjs +106 -0
  26. package/dist/fesm2022/embedpdf-angular-measurement.mjs.map +1 -0
  27. package/dist/fesm2022/embedpdf-angular-metadata.mjs +77 -0
  28. package/dist/fesm2022/embedpdf-angular-metadata.mjs.map +1 -0
  29. package/dist/fesm2022/embedpdf-angular-page-edit.mjs +65 -0
  30. package/dist/fesm2022/embedpdf-angular-page-edit.mjs.map +1 -0
  31. package/dist/fesm2022/embedpdf-angular-page-view.mjs +297 -0
  32. package/dist/fesm2022/embedpdf-angular-page-view.mjs.map +1 -0
  33. package/dist/fesm2022/embedpdf-angular-redaction.mjs +93 -0
  34. package/dist/fesm2022/embedpdf-angular-redaction.mjs.map +1 -0
  35. package/dist/fesm2022/embedpdf-angular-render.mjs +331 -69
  36. package/dist/fesm2022/embedpdf-angular-render.mjs.map +1 -1
  37. package/dist/fesm2022/embedpdf-angular-runtime.mjs +1147 -390
  38. package/dist/fesm2022/embedpdf-angular-runtime.mjs.map +1 -1
  39. package/dist/fesm2022/embedpdf-angular-search.mjs +251 -0
  40. package/dist/fesm2022/embedpdf-angular-search.mjs.map +1 -0
  41. package/dist/fesm2022/embedpdf-angular-selection.mjs +477 -0
  42. package/dist/fesm2022/embedpdf-angular-selection.mjs.map +1 -0
  43. package/dist/fesm2022/embedpdf-angular-shell.mjs +177 -0
  44. package/dist/fesm2022/embedpdf-angular-shell.mjs.map +1 -0
  45. package/dist/fesm2022/embedpdf-angular-signature.mjs +120 -0
  46. package/dist/fesm2022/embedpdf-angular-signature.mjs.map +1 -0
  47. package/dist/fesm2022/embedpdf-angular-stage.mjs +688 -288
  48. package/dist/fesm2022/embedpdf-angular-stage.mjs.map +1 -1
  49. package/dist/fesm2022/embedpdf-angular-stamp.mjs +169 -0
  50. package/dist/fesm2022/embedpdf-angular-stamp.mjs.map +1 -0
  51. package/dist/fesm2022/embedpdf-angular-testing.mjs +89 -0
  52. package/dist/fesm2022/embedpdf-angular-testing.mjs.map +1 -0
  53. package/dist/fesm2022/embedpdf-angular-toolbar.mjs +1123 -0
  54. package/dist/fesm2022/embedpdf-angular-toolbar.mjs.map +1 -0
  55. package/dist/fesm2022/embedpdf-angular-view-manager.mjs +69 -0
  56. package/dist/fesm2022/embedpdf-angular-view-manager.mjs.map +1 -0
  57. package/dist/fesm2022/embedpdf-angular.mjs +23 -3
  58. package/dist/fesm2022/embedpdf-angular.mjs.map +1 -1
  59. package/dist/form/index.d.ts +79 -0
  60. package/dist/history/index.d.ts +28 -0
  61. package/dist/i18n/index.d.ts +52 -0
  62. package/dist/index.d.ts +20 -0
  63. package/dist/interaction/index.d.ts +58 -0
  64. package/dist/link/index.d.ts +77 -0
  65. package/dist/measurement/index.d.ts +46 -0
  66. package/dist/metadata/index.d.ts +51 -0
  67. package/dist/page-edit/index.d.ts +22 -0
  68. package/dist/page-view/index.d.ts +94 -0
  69. package/dist/redaction/index.d.ts +38 -0
  70. package/dist/render/index.d.ts +45 -6
  71. package/dist/runtime/index.d.ts +579 -199
  72. package/dist/search/index.d.ts +71 -0
  73. package/dist/selection/index.d.ts +141 -0
  74. package/dist/shell/index.d.ts +88 -0
  75. package/dist/signature/index.d.ts +45 -0
  76. package/dist/stage/index.d.ts +242 -141
  77. package/dist/stamp/index.d.ts +58 -0
  78. package/dist/testing/index.d.ts +53 -0
  79. package/dist/toolbar/index.d.ts +257 -0
  80. package/dist/view-manager/index.d.ts +23 -0
  81. package/package.json +135 -14
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedpdf-angular-toolbar.mjs","sources":["../../toolbar/src/templates.ts","../../toolbar/src/defaults.ts","../../toolbar/src/toolbar.ts","../../toolbar/src/public_api.ts","../../toolbar/src/embedpdf-angular-toolbar.ts"],"sourcesContent":["/**\n * The parts of `<epdf-toolbar>` you draw, each an `<ng-template>` inside its tags, typed so\n * `let-` gives what the part needs:\n *\n * <ng-template epdfToolbarCommand let-command let-variant=\"variant\" let-run=\"run\">\n * <ng-template epdfToolbarCustom=\"page-number\" let-variant>\n * <ng-template epdfToolbarCollapsed let-view> a folded group\n * <ng-template epdfToolbarGroupTrigger let-view> the button behind which a group sheds items\n * <ng-template epdfToolbarSeparator> the line between groups\n * <ng-template epdfToolbarOverflowTrigger let-open let-toggle=\"toggle\"> the \"More\" button\n * <ng-template epdfToolbarOverflowMenu let-view> the \"More\" menu\n *\n * A part you leave out has a plain default. The names carry `Toolbar` because `epdfCommand`\n * is the directive for a button of your own.\n */\nimport { Directive, inject, input, TemplateRef } from '@angular/core';\nimport type {\n CollapsedGroupView as CollapsedGroupViewOf,\n GroupDisclosureView as GroupDisclosureViewOf,\n OverflowMenuView as OverflowMenuViewOf,\n} from '@embedpdf/core-ui';\nimport type { ResolvedCommand } from '@embedpdf/plugin-commands/contract';\n\n// ── what each part gets ─────────────────────────────────────────────────────\n\n/** A command's button: `let-command`, `let-variant=\"variant\"`, `let-run=\"run\"`. */\nexport interface EpdfToolbarCommandContext {\n /** The command, read live: label, icon, `enabled`, `active`. */\n $implicit: ResolvedCommand;\n /** The variant the toolbar chose for it, such as `'icon+label'` or `'icon'`. */\n variant: string;\n /** Run the command for the toolbar's document. */\n run: () => void;\n}\n\n/** An item of your own: `let-variant`, and `let-layer=\"layer\"`, `let-measure=\"measure\"`. */\nexport interface EpdfToolbarCustomContext {\n /** The variant the toolbar chose for it, one of the item's `variants`. */\n $implicit: string;\n /** `'live'` in the toolbar, `'measure'` in the hidden layer that measures every variant. */\n layer: 'live' | 'measure';\n /**\n * Report the item's length yourself (its width, or its height in a vertical toolbar), for\n * content the hidden layer can't draw. The toolbar measures what the template draws without\n * it; a template that draws nothing in the hidden layer (`layer === 'measure'`) is measured\n * where it renders, by what it reports here.\n */\n measure: (length: number) => void;\n}\n\n/**\n * A group in its folded form (a menu button, or a `<select>`, as the group's `collapse` says):\n * its visible commands, read live, and how to run one.\n */\nexport type CollapsedGroupView = CollapsedGroupViewOf<ResolvedCommand>;\n\n/**\n * The button behind which a group keeps the items it shed. `commands` are the shed items in\n * bar order. The hidden layer measures it with the whole group behind it, so a trigger that\n * shows a count is measured at its widest.\n */\nexport type GroupDisclosureView = GroupDisclosureViewOf<ResolvedCommand>;\n\n/** The \"More\" menu: what didn't fit, in sections, and the calls a menu needs. */\nexport type OverflowMenuView = OverflowMenuViewOf<ResolvedCommand>;\n\n/** A part that gets one view: `let-view`. */\nexport interface EpdfToolbarViewContext<View> {\n $implicit: View;\n}\n\n/** The \"More\" button: `let-open` (whether the menu is open) and `let-toggle=\"toggle\"`. */\nexport interface EpdfToolbarOverflowTriggerContext {\n $implicit: boolean;\n toggle: () => void;\n}\n\n// ── the marker directives ───────────────────────────────────────────────────\n\n/** A command's button. Without it: a plain `<button>` with the command's label. */\n@Directive({ selector: 'ng-template[epdfToolbarCommand]' })\nexport class EpdfToolbarCommandTemplate {\n readonly template = inject<TemplateRef<EpdfToolbarCommandContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: EpdfToolbarCommandTemplate,\n context: unknown,\n ): context is EpdfToolbarCommandContext {\n return true;\n }\n}\n\n/**\n * An item of your own, by the name `custom(name, command)` gave it in the bar. Without one, the\n * item is a `<slot name>`: inside a shadow root your element's children of that `slot` go\n * there; elsewhere it shows its command's button. The first element of the item that takes\n * focus is its stop in the toolbar's arrow-key order.\n */\n@Directive({ selector: 'ng-template[epdfToolbarCustom]' })\nexport class EpdfToolbarCustomTemplate {\n /** The item's name in the bar. */\n readonly slot = input.required<string>({ alias: 'epdfToolbarCustom' });\n readonly template = inject<TemplateRef<EpdfToolbarCustomContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: EpdfToolbarCustomTemplate,\n context: unknown,\n ): context is EpdfToolbarCustomContext {\n return true;\n }\n}\n\n/** A folded group. Without it: a `<select>` for `collapse: 'select'`, a menu button for `'menu'`. */\n@Directive({ selector: 'ng-template[epdfToolbarCollapsed]' })\nexport class EpdfToolbarCollapsedTemplate {\n readonly template = inject<TemplateRef<EpdfToolbarViewContext<CollapsedGroupView>>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: EpdfToolbarCollapsedTemplate,\n context: unknown,\n ): context is EpdfToolbarViewContext<CollapsedGroupView> {\n return true;\n }\n}\n\n/**\n * The button of a group that sheds items, and its menu: the template keeps its own open state.\n * Without it: a chevron opening a menu of the shed items.\n */\n@Directive({ selector: 'ng-template[epdfToolbarGroupTrigger]' })\nexport class EpdfToolbarGroupTriggerTemplate {\n readonly template = inject<TemplateRef<EpdfToolbarViewContext<GroupDisclosureView>>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: EpdfToolbarGroupTriggerTemplate,\n context: unknown,\n ): context is EpdfToolbarViewContext<GroupDisclosureView> {\n return true;\n }\n}\n\n/**\n * The line between two groups. Without it: a 1px line across the toolbar. Tell the toolbar its\n * thickness with `[separatorWidth]` when yours is thicker.\n */\n@Directive({ selector: 'ng-template[epdfToolbarSeparator]' })\nexport class EpdfToolbarSeparatorTemplate {\n readonly template = inject<TemplateRef<void>>(TemplateRef);\n}\n\n/** The \"More\" button. Without it: a plain ⋯ button. */\n@Directive({ selector: 'ng-template[epdfToolbarOverflowTrigger]' })\nexport class EpdfToolbarOverflowTriggerTemplate {\n readonly template = inject<TemplateRef<EpdfToolbarOverflowTriggerContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: EpdfToolbarOverflowTriggerTemplate,\n context: unknown,\n ): context is EpdfToolbarOverflowTriggerContext {\n return true;\n }\n}\n\n/** The \"More\" menu, under its button (beside it, standing up). Without it: a plain popover. */\n@Directive({ selector: 'ng-template[epdfToolbarOverflowMenu]' })\nexport class EpdfToolbarOverflowMenuTemplate {\n readonly template = inject<TemplateRef<EpdfToolbarViewContext<OverflowMenuView>>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: EpdfToolbarOverflowMenuTemplate,\n context: unknown,\n ): context is EpdfToolbarViewContext<OverflowMenuView> {\n return true;\n }\n}\n","/**\n * The toolbar's plain parts, for every part the app leaves out: the \"More\" button, a popover\n * menu, a folded group and a group's shed-items button. They're meant to be replaced, so their\n * colors come from the `--epdf-toolbar-*` CSS variables only. The menu takes the menu keys\n * (`attachMenuKeys`) while it's open.\n */\nimport {\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n output,\n signal,\n untracked,\n viewChild,\n type Signal,\n} from '@angular/core';\nimport { groupMenuView, type OverflowRow } from '@embedpdf/core-ui';\nimport type { ResolvedCommand } from '@embedpdf/plugin-commands/contract';\nimport {\n attachMenuKeys,\n focusablesIn,\n observeOutsidePress,\n paintDefault,\n type Orientation,\n} from '@embedpdf/web';\nimport type { CollapsedGroupView, GroupDisclosureView, OverflowMenuView } from './templates';\n\nconst SURFACE = paintDefault('toolbar-surface');\nconst BORDER = paintDefault('toolbar-border');\nconst ACTIVE = paintDefault('toolbar-active');\n\n/** The colors, for the toolbar's own default command button and separator. */\nexport const TOOLBAR_PAINT = { surface: SURFACE, border: BORDER, active: ACTIVE } as const;\n\n/** Where a menu opens: under a horizontal toolbar's button, beside a vertical one's. */\nconst placementOf = (orientation: Orientation): string =>\n orientation === 'vertical'\n ? 'top: 0; inset-inline-start: 100%;'\n : 'top: 100%; inset-inline-end: 0;';\n\n/** The plain \"More\" button: ⋯, pressed while its menu is open. */\n@Component({\n selector: 'epdf-toolbar-more-button',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: 'display: contents;' },\n template: `\n <button\n type=\"button\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"open()\"\n title=\"More\"\n [style]=\"style\"\n [style.background]=\"open() ? active : 'transparent'\"\n (click)=\"toggle.emit()\"\n >\n ⋯\n </button>\n `,\n})\nexport class EpdfToolbarMoreButton {\n readonly open = input(false);\n readonly toggle = output<void>();\n\n protected readonly active = ACTIVE;\n protected readonly style =\n 'display: inline-flex; align-items: center; padding: 4px 8px; color: inherit; ' +\n `font: inherit; border: 1px solid ${BORDER}; border-radius: 4px; cursor: pointer;`;\n}\n\n/**\n * The plain popover menu, under its button in a horizontal toolbar and beside it in a vertical\n * one: a press outside closes it, a row runs its command, and while it's open it takes the menu\n * keys: focus on its first row, the arrows, typeahead, Enter, and Escape back to its button.\n */\n@Component({\n selector: 'epdf-toolbar-menu',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: 'display: contents;' },\n template: `\n @if (isOpen()) {\n <div #menu role=\"menu\" [style]=\"menuStyle()\">\n @for (section of view().sections; track $index; let first = $first) {\n @if (!first) {\n <div [style]=\"dividerStyle\"></div>\n }\n @for (row of section.rows; track row.command) {\n @if (view().resolve(row.command); as command) {\n <button\n type=\"button\"\n [attr.role]=\"section.role === 'radio' ? 'menuitemradio' : 'menuitem'\"\n [attr.aria-checked]=\"section.role === 'radio' ? command.active : null\"\n [disabled]=\"!command.enabled\"\n tabindex=\"-1\"\n [style]=\"rowStyle\"\n [style.cursor]=\"command.enabled ? 'pointer' : 'default'\"\n [style.opacity]=\"command.enabled ? 1 : 0.4\"\n (click)=\"choose(row)\"\n >\n <span\n >{{ command.active && section.role === 'radio' ? '• ' : ''\n }}{{ command.label }}</span\n >\n @if (row.type === 'submenu') {\n <span>▸</span>\n }\n </button>\n }\n }\n }\n </div>\n }\n `,\n})\nexport class EpdfToolbarMenu {\n readonly view = input.required<OverflowMenuView>();\n /** Which way the toolbar runs: the menu opens under its button, or beside a vertical one's. */\n readonly orientation = input<Orientation>('horizontal');\n\n /**\n * Whether it's open, apart from the view: the toolbar hands a new view on every change, and\n * attaching the keys again would put focus back on the first row.\n */\n protected readonly isOpen = computed(() => this.view().isOpen);\n private readonly menu = viewChild<ElementRef<HTMLElement>>('menu');\n\n constructor() {\n const host: HTMLElement = inject(ElementRef).nativeElement;\n afterRenderEffect((onCleanup) => {\n const menu = this.menu()?.nativeElement;\n if (!this.isOpen() || !menu) return;\n onCleanup(untracked(() => this.attach(host, menu)));\n });\n }\n\n /** Close on a press outside, and take the menu keys; returns the detach. */\n private attach(host: HTMLElement, menu: HTMLElement): () => void {\n // This element is `display: contents`; its parent holds the menu's button too, so a press\n // on the button is the button's own toggle.\n const container = host.parentElement ?? host;\n const trigger = focusablesIn(container).find((candidate) => !menu.contains(candidate)) ?? null;\n const close = () => untracked(this.view).close();\n const stopOutside = observeOutsidePress(container, close);\n const detachKeys = attachMenuKeys(menu, { trigger, close });\n return () => {\n stopOutside();\n detachKeys();\n };\n }\n\n protected readonly menuStyle = computed(\n () =>\n `position: absolute; ${placementOf(this.orientation())} z-index: 41; min-width: 200px; ` +\n `padding: 4px; background: ${SURFACE}; border: 1px solid ${BORDER}; border-radius: 6px; ` +\n 'box-shadow: 0 4px 16px rgba(0,0,0,0.15);',\n );\n protected readonly dividerStyle = `height: 1px; background: ${BORDER}; margin: 4px 0;`;\n protected readonly rowStyle =\n 'display: flex; width: 100%; align-items: center; justify-content: space-between; ' +\n 'gap: 16px; padding: 6px 8px; border: none; color: inherit; font: inherit; ' +\n 'background: transparent; white-space: nowrap;';\n\n /** Run the row's command; a row that opens a submenu keeps the menu open. */\n protected choose(row: OverflowRow): void {\n const view = this.view();\n view.execute(row.command);\n if (row.type !== 'submenu') view.close();\n }\n}\n\n/** The plain folded group: a `<select>` for `collapse: 'select'`, a ⋯ menu button otherwise. */\n@Component({\n selector: 'epdf-toolbar-collapsed',\n imports: [EpdfToolbarMoreButton, EpdfToolbarMenu],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: 'display: contents;' },\n template: `\n @if (view().collapse === 'select') {\n <select #select [style]=\"selectStyle\" (change)=\"view().execute(select.value)\">\n @if (!activeId()) {\n <option value=\"\" selected disabled hidden></option>\n }\n @for (command of view().commands; track command.id) {\n <option\n [value]=\"command.id\"\n [disabled]=\"!command.enabled\"\n [selected]=\"command.id === activeId()\"\n >\n {{ command.label }}\n </option>\n }\n </select>\n } @else {\n <span style=\"position: relative; display: inline-flex\">\n <epdf-toolbar-more-button [open]=\"isOpen()\" (toggle)=\"isOpen.set(!isOpen())\" />\n <epdf-toolbar-menu [view]=\"menu()\" [orientation]=\"orientation()\" />\n </span>\n }\n `,\n})\nexport class EpdfToolbarCollapsed {\n readonly view = input.required<CollapsedGroupView>();\n /** Which way the toolbar runs: where the menu opens. */\n readonly orientation = input<Orientation>('horizontal');\n\n protected readonly isOpen = signal(false);\n protected readonly activeId: Signal<string | null> = computed(\n () => this.view().commands.find((command: ResolvedCommand) => command.active)?.id ?? null,\n );\n protected readonly menu = computed(() =>\n groupMenuView(this.view(), this.isOpen(), () => this.isOpen.set(false)),\n );\n protected readonly selectStyle =\n `padding: 4px 6px; font: inherit; border-radius: 4px; border: 1px solid ${BORDER}; ` +\n `background: ${SURFACE};`;\n}\n\n/** The plain button of a group that shed items: a chevron opening a menu of them. */\n@Component({\n selector: 'epdf-toolbar-group-trigger',\n imports: [EpdfToolbarMenu],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { style: 'display: contents;' },\n template: `\n <span style=\"position: relative; display: inline-flex\">\n <button\n type=\"button\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isOpen()\"\n title=\"More\"\n [style]=\"buttonStyle\"\n [style.background]=\"isOpen() || someActive() ? active : 'transparent'\"\n (click)=\"isOpen.set(!isOpen())\"\n >\n ▾\n </button>\n <epdf-toolbar-menu [view]=\"menu()\" [orientation]=\"orientation()\" />\n </span>\n `,\n})\nexport class EpdfToolbarGroupTrigger {\n readonly view = input.required<GroupDisclosureView>();\n /** Which way the toolbar runs: where the menu opens. */\n readonly orientation = input<Orientation>('horizontal');\n\n protected readonly isOpen = signal(false);\n /** A hint that the active item is in here. */\n protected readonly someActive = computed(() =>\n this.view().commands.some((command) => command.active),\n );\n protected readonly menu = computed(() =>\n groupMenuView(this.view(), this.isOpen(), () => this.isOpen.set(false)),\n );\n protected readonly active = ACTIVE;\n protected readonly buttonStyle =\n 'display: inline-flex; align-items: center; padding: 4px 6px; color: inherit; ' +\n `font: inherit; border: 1px solid ${BORDER}; border-radius: 4px; cursor: pointer;`;\n}\n","/**\n * `<epdf-toolbar [bar]>`: a toolbar that measures what fits and makes room, and lets you draw\n * every part.\n *\n * 1. a hidden measurement layer draws every item in every variant (plus folded groups and the\n * \"More\" button), each watched by `@embedpdf/web`'s `observeLength` along the toolbar\n * (widths, or heights when it is vertical), so a new language, a font loading, browser zoom\n * and your CSS all re-measure on their own; the lengths become fit metrics\n * (`createToolbarLengths`);\n * 2. core-ui's `solve()` gives each item a variant, a folded group or the \"More\" menu, and\n * `layoutToolbar` turns that fit into the parts to draw;\n * 3. the live row draws them; the \"More\" menu is derived (`projectOverflow`) from what\n * didn't fit.\n *\n * The toolbar is one tab stop with arrow keys along it (`attachToolbarFocus`), and its default\n * menus take the menu keys (`attachMenuKeys`). Every part is an `<ng-template>` you may give\n * (`templates.ts`), with a plain default (`defaults.ts`): the app owns the pixels, the toolbar\n * owns the fitting and the keyboard. The items are commands, read live, so a button follows its\n * command's state with no code in the toolbar.\n */\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n InjectionToken,\n input,\n PLATFORM_ID,\n signal,\n untracked,\n type Signal,\n type TemplateRef,\n} from '@angular/core';\nimport {\n CapabilityBinding,\n injectDocumentScope,\n injectKernelHost,\n} from '@embedpdf/angular/runtime';\nimport { EpdfCommands } from '@embedpdf/angular/commands';\nimport { layoutToolbar, normalizeBar } from '@embedpdf/core-ui';\nimport type { BarSchema, LiveSection, ToolbarLayout, ToolbarPart } from '@embedpdf/core-ui';\nimport { unregisteredCommand, type ResolvedCommand } from '@embedpdf/plugin-commands/contract';\n// The \"More\" menu asks which menu a command opens, a host fact, so the host lens is bound here.\nimport { CommandsToken as CommandsHostToken } from '@embedpdf/plugin-commands/contract/host';\nimport {\n attachToolbarFocus,\n createToolbarLengths,\n observeContentLength,\n observeLength,\n toolbarMeasureKey,\n type Orientation,\n type RovingFocus,\n} from '@embedpdf/web';\nimport {\n EpdfToolbarCollapsed,\n EpdfToolbarGroupTrigger,\n EpdfToolbarMenu,\n EpdfToolbarMoreButton,\n TOOLBAR_PAINT,\n} from './defaults';\nimport {\n EpdfToolbarCollapsedTemplate,\n EpdfToolbarCommandTemplate,\n EpdfToolbarCustomTemplate,\n EpdfToolbarGroupTriggerTemplate,\n EpdfToolbarOverflowMenuTemplate,\n EpdfToolbarOverflowTriggerTemplate,\n EpdfToolbarSeparatorTemplate,\n type CollapsedGroupView,\n type EpdfToolbarCommandContext,\n type EpdfToolbarCustomContext,\n type EpdfToolbarOverflowTriggerContext,\n type EpdfToolbarViewContext,\n type GroupDisclosureView,\n type OverflowMenuView,\n} from './templates';\n\n// ── what the row and the measurement layer draw ─────────────────────────────\n\n/**\n * One thing in a section of the row, or in the measurement layer: a part of core-ui's\n * `layoutToolbar` with its template's context, or a separator. `key` is the key the part is\n * measured under, unique across the toolbar.\n */\ntype Entry =\n | { readonly kind: 'command'; readonly key: string; readonly context: EpdfToolbarCommandContext }\n | {\n readonly kind: 'custom';\n readonly key: string;\n readonly template: TemplateRef<EpdfToolbarCustomContext>;\n readonly context: EpdfToolbarCustomContext;\n }\n | {\n // An item of your own with no template: a `<slot>`, measured where it renders.\n readonly kind: 'socket';\n readonly key: string;\n readonly slot: string;\n readonly context: EpdfToolbarCommandContext | null;\n }\n | {\n readonly kind: 'collapsed';\n readonly key: string;\n readonly context: EpdfToolbarViewContext<CollapsedGroupView>;\n }\n | {\n readonly kind: 'trigger';\n readonly key: string;\n readonly context: EpdfToolbarViewContext<GroupDisclosureView>;\n }\n | { readonly kind: 'separator'; readonly key: string };\n\n/** The live row, per section. */\ninterface Row {\n readonly start: readonly Entry[];\n readonly center: readonly Entry[];\n readonly end: readonly Entry[];\n}\n\n/** What the toolbar draws while there is no commands plugin: nothing. */\nconst EMPTY_LAYOUT: ToolbarLayout<ResolvedCommand> = {\n sections: [\n { name: 'start', groups: [] },\n { name: 'center', groups: [] },\n { name: 'end', groups: [] },\n ],\n measured: [],\n hasOverflow: false,\n overflow: [],\n};\nconst noop = () => {};\n\n// ── measuring ────────────────────────────────────────────────────────────────\n\n/** Where the measured lengths go: the toolbar the element is drawn in. */\ninterface ToolbarLengthSink {\n /** Which way the toolbar runs: what its elements measure along. */\n readonly orientation: Signal<Orientation>;\n reportLength(key: string, length: number): void;\n}\n\nconst TOOLBAR_LENGTHS = new InjectionToken<ToolbarLengthSink>('TOOLBAR_LENGTHS');\n\n/** Whether `element` draws anything: an element, or some text, among its children. */\nconst drawsSomething = (element: Element): boolean =>\n [...element.childNodes].some(\n (node) =>\n node.nodeType === Node.ELEMENT_NODE ||\n (node.nodeType === Node.TEXT_NODE && Boolean(node.textContent?.trim())),\n );\n\n/**\n * Reports its element's border-box length along the toolbar (its width, or its height in a\n * vertical one) to the toolbar, under its key, now and on resize. With `ifDrawn`, only while the\n * element draws something: an item of your own whose template draws nothing in the measurement\n * layer reports its length itself, with `measure`, from where it renders.\n */\n@Directive({ selector: '[epdfToolbarLength]' })\nexport class EpdfToolbarLength {\n readonly key = input.required<string>({ alias: 'epdfToolbarLength' });\n readonly ifDrawn = input(false);\n\n constructor() {\n const element = inject<ElementRef<Element>>(ElementRef).nativeElement;\n const sink = inject(TOOLBAR_LENGTHS);\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n effect((onCleanup) => {\n const key = this.key();\n const orientation = sink.orientation();\n onCleanup(\n untracked(() =>\n observeLength(element, orientation, (length) => {\n if (this.ifDrawn() && !drawsSomething(element)) return;\n sink.reportLength(key, length);\n }),\n ),\n );\n });\n }\n}\n\n// ── the toolbar ──────────────────────────────────────────────────────────────\n\n/**\n * A toolbar that fits itself to its width, or its height with `orientation=\"vertical\"`: items\n * get smaller, groups fold, and what's left over goes into a \"More\" menu, the least important\n * first. `[gap]` (8) is the space between items, `[separatorWidth]` (1) your\n * separator's thickness; the element is the toolbar (`role=\"toolbar\"`), so a `class`, `style`\n * or `aria-label` on it is the toolbar's. It is one tab stop, with arrow keys between its\n * items. Draw the parts with the templates in `templates.ts`.\n *\n * <epdf-toolbar [bar]=\"bar\">\n * <ng-template epdfToolbarCommand let-command let-variant=\"variant\" let-run=\"run\">\n * <button (click)=\"run()\" [disabled]=\"!command.enabled\">{{ command.label }}</button>\n * </ng-template>\n * </epdf-toolbar>\n */\n@Component({\n selector: 'epdf-toolbar',\n imports: [\n NgTemplateOutlet,\n EpdfToolbarLength,\n EpdfToolbarMoreButton,\n EpdfToolbarMenu,\n EpdfToolbarCollapsed,\n EpdfToolbarGroupTrigger,\n EpdfToolbarCommandTemplate,\n EpdfToolbarCollapsedTemplate,\n EpdfToolbarGroupTriggerTemplate,\n EpdfToolbarOverflowTriggerTemplate,\n EpdfToolbarOverflowMenuTemplate,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: TOOLBAR_LENGTHS, useExisting: forwardRef(() => EpdfToolbar) }],\n host: {\n role: 'toolbar',\n '[attr.aria-orientation]': 'orientation()',\n style: 'position: relative; display: flex; align-items: center;',\n '[style.flex-direction]': \"orientation() === 'vertical' ? 'column' : 'row'\",\n },\n template: `\n <!--\n The sections run along the toolbar: the center one has auto margins, so it stays centered\n in the space the others leave and gives way before anything overlaps. The sections never\n grow or shrink: what fits is the solver's decision, so the row's least length is exactly\n what it counted.\n -->\n <div [style]=\"sectionStyle()\" [style.gap.px]=\"gap()\">\n @for (entry of row().start; track entry.key) {\n <ng-container *ngTemplateOutlet=\"liveEntry; context: { $implicit: entry }\" />\n }\n </div>\n <div [style]=\"centerStyle()\" [style.gap.px]=\"gap()\">\n @for (entry of row().center; track entry.key) {\n <ng-container *ngTemplateOutlet=\"liveEntry; context: { $implicit: entry }\" />\n }\n </div>\n <div [style]=\"sectionStyle()\" [style.gap.px]=\"gap()\">\n @for (entry of row().end; track entry.key) {\n <ng-container *ngTemplateOutlet=\"liveEntry; context: { $implicit: entry }\" />\n }\n @if (hasOverflow()) {\n <span data-epdf-toolbar-item style=\"position: relative; display: inline-flex\">\n <ng-container\n *ngTemplateOutlet=\"\n overflowTriggerTemplate()?.template ?? defaultOverflowTrigger;\n context: overflowTrigger()\n \"\n />\n <ng-container\n *ngTemplateOutlet=\"\n overflowMenuTemplate()?.template ?? defaultOverflowMenu;\n context: overflowMenu()\n \"\n />\n </span>\n }\n </div>\n\n <!--\n The measurement layer: every item in every variant, every folded group and the \"More\"\n button, hidden, inert and observed. Text reflow (a language, fonts, zoom) re-measures by\n itself. An item of your own whose template draws nothing here is measured where it renders.\n -->\n <div aria-hidden=\"true\" inert [style]=\"measureLayerStyle()\">\n @for (item of measured(); track item.key) {\n <span\n [epdfToolbarLength]=\"item.key\"\n [ifDrawn]=\"item.entry.kind === 'custom'\"\n style=\"display: inline-flex; flex-shrink: 0\"\n >\n <ng-container *ngTemplateOutlet=\"drawn; context: { $implicit: item.entry }\" />\n </span>\n }\n <span [epdfToolbarLength]=\"overflowTriggerKey\" style=\"display: inline-flex; flex-shrink: 0\">\n <ng-container\n *ngTemplateOutlet=\"\n overflowTriggerTemplate()?.template ?? defaultOverflowTrigger;\n context: closedTrigger\n \"\n />\n </span>\n </div>\n\n <!--\n An item of the live row, in the element that marks it (TOOLBAR_ITEM_ATTRIBUTE in\n @embedpdf/web): its first element that takes focus is the item's stop in the arrow-key\n order. The element adds no box, so the item lays out as the section's own child.\n -->\n <ng-template #liveEntry let-entry>\n @if (entry.kind === 'separator') {\n <ng-container *ngTemplateOutlet=\"drawn; context: { $implicit: entry }\" />\n } @else {\n <span data-epdf-toolbar-item style=\"display: contents\">\n <ng-container *ngTemplateOutlet=\"drawn; context: { $implicit: entry }\" />\n </span>\n }\n </ng-template>\n\n <ng-template #drawn let-entry>\n @switch (entry.kind) {\n @case ('command') {\n <ng-container\n *ngTemplateOutlet=\"\n commandTemplate()?.template ?? defaultCommand;\n context: entry.context\n \"\n />\n }\n @case ('custom') {\n <ng-container *ngTemplateOutlet=\"entry.template; context: entry.context\" />\n }\n @case ('socket') {\n <!-- Inside a shadow root, the host's children for this slot are drawn here. -->\n <slot\n [attr.name]=\"entry.slot\"\n [epdfToolbarLength]=\"entry.key\"\n style=\"display: inline-flex; align-items: center; flex-shrink: 0\"\n >\n @if (entry.context) {\n <ng-container\n *ngTemplateOutlet=\"\n commandTemplate()?.template ?? defaultCommand;\n context: entry.context\n \"\n />\n }\n </slot>\n }\n @case ('collapsed') {\n <ng-container\n *ngTemplateOutlet=\"\n collapsedTemplate()?.template ?? defaultCollapsed;\n context: entry.context\n \"\n />\n }\n @case ('trigger') {\n <ng-container\n *ngTemplateOutlet=\"\n groupTriggerTemplate()?.template ?? defaultGroupTrigger;\n context: entry.context\n \"\n />\n }\n @case ('separator') {\n <ng-container *ngTemplateOutlet=\"separatorTemplate()?.template ?? defaultSeparator\" />\n }\n }\n </ng-template>\n\n <!-- The defaults: plain, and meant to be replaced. -->\n <ng-template epdfToolbarCommand #defaultCommand let-command let-run=\"run\">\n <button\n type=\"button\"\n [disabled]=\"!command.enabled\"\n [attr.aria-pressed]=\"command.active || null\"\n [attr.aria-haspopup]=\"command.menu ? 'menu' : null\"\n [title]=\"command.label\"\n [style]=\"commandStyle\"\n [style.background]=\"command.active ? paint.active : 'transparent'\"\n [style.cursor]=\"command.enabled ? 'pointer' : 'default'\"\n [style.opacity]=\"command.enabled ? 1 : 0.4\"\n (click)=\"run()\"\n >\n <!-- Icons are the app's: the plain button shows the label in every variant. -->\n {{ command.label }}\n </button>\n </ng-template>\n <ng-template #defaultSeparator>\n <span [style]=\"separatorStyle()\"></span>\n </ng-template>\n <ng-template epdfToolbarOverflowTrigger #defaultOverflowTrigger let-open let-toggle=\"toggle\">\n <epdf-toolbar-more-button [open]=\"open\" (toggle)=\"toggle()\" />\n </ng-template>\n <ng-template epdfToolbarOverflowMenu #defaultOverflowMenu let-view>\n <epdf-toolbar-menu [view]=\"view\" [orientation]=\"orientation()\" />\n </ng-template>\n <ng-template epdfToolbarCollapsed #defaultCollapsed let-view>\n <epdf-toolbar-collapsed [view]=\"view\" [orientation]=\"orientation()\" />\n </ng-template>\n <ng-template epdfToolbarGroupTrigger #defaultGroupTrigger let-view>\n <epdf-toolbar-group-trigger [view]=\"view\" [orientation]=\"orientation()\" />\n </ng-template>\n `,\n})\nexport class EpdfToolbar implements ToolbarLengthSink {\n /** What the toolbar holds: `{ id, sections: { start, center, end } }` of groups and items. */\n readonly bar = input.required<BarSchema>();\n /**\n * Which way the toolbar runs. A vertical toolbar fits the height it's given, so give it one;\n * it stacks its sections top, middle and bottom, and draws every command at `'icon'`, with\n * the label for a tooltip.\n */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n /** Pixels between neighbouring items; the solver counts the same number. */\n readonly gap = input(8);\n /**\n * The thickness of the separator you draw: its width across a horizontal toolbar, its height\n * in a vertical one.\n */\n readonly separatorWidth = input(1);\n\n // ── the app's templates ─────────────────────────────────────────────────────\n\n protected readonly commandTemplate = contentChild(EpdfToolbarCommandTemplate);\n private readonly customTemplates = contentChildren(EpdfToolbarCustomTemplate);\n protected readonly collapsedTemplate = contentChild(EpdfToolbarCollapsedTemplate);\n protected readonly groupTriggerTemplate = contentChild(EpdfToolbarGroupTriggerTemplate);\n protected readonly separatorTemplate = contentChild(EpdfToolbarSeparatorTemplate);\n protected readonly overflowTriggerTemplate = contentChild(EpdfToolbarOverflowTriggerTemplate);\n protected readonly overflowMenuTemplate = contentChild(EpdfToolbarOverflowMenuTemplate);\n\n // ── the commands ────────────────────────────────────────────────────────────\n\n private readonly host = injectKernelHost('<epdf-toolbar>');\n // Names withCommands() in the error when the viewer has no commands plugin, and runs them.\n private readonly commands = inject(EpdfCommands);\n /** The host lens, for this part of the template's document: resolves and finds menus. */\n private readonly registry = new CapabilityBinding(\n this.host,\n () => CommandsHostToken,\n injectDocumentScope(),\n ).capability;\n\n private readonly lengths = createToolbarLengths();\n /** Goes up whenever a measured length changed by more than half a pixel. */\n private readonly measureVersion = signal(0);\n /** The room along the toolbar: its width, or its height when vertical. */\n private readonly containerLength = signal(0);\n private readonly overflowOpen = signal(false);\n /** The arrow keys along the toolbar, while it's in the page. */\n private roving: RovingFocus | null = null;\n private readonly vertical = computed(() => this.orientation() === 'vertical');\n\n private readonly normalized = computed(() => normalizeBar(this.bar()));\n\n /**\n * What to draw: the bar with what's visible now, fitted and turned into parts. A command's\n * state is derived when it's read, so this reads again after every change of the viewer; the\n * toolbar is small, and a read of every item per change is the simple, correct baseline.\n */\n private readonly layout = this.host.read(\n (): ToolbarLayout<ResolvedCommand> => {\n this.measureVersion();\n const registry = this.registry();\n if (!registry) return EMPTY_LAYOUT;\n return layoutToolbar({\n bar: this.normalized(),\n resolve: (id) => registry.resolveCommand(id),\n unregistered: unregisteredCommand,\n execute: (id) => this.execute(id),\n menuTarget: (id) => registry.getMenuTarget(id),\n metrics: this.lengths.metrics(this.orientation(), this.gap(), this.separatorWidth()),\n measureKey: toolbarMeasureKey,\n containerLength: this.containerLength(),\n orientation: this.orientation(),\n });\n },\n () => EMPTY_LAYOUT,\n );\n protected readonly hasOverflow = computed(() => this.layout().hasOverflow);\n\n protected readonly row = computed((): Row => {\n const [start, center, end] = this.layout().sections;\n return {\n start: this.liveEntries(start),\n center: this.liveEntries(center),\n end: this.liveEntries(end),\n };\n });\n\n /** Every item in every variant, each folded group and each shed group's button. */\n protected readonly measured = computed(() =>\n this.layout().measured.flatMap((part) => {\n const entry = this.entryOf(part, 'measure');\n return entry ? [{ key: part.measureKey, entry }] : [];\n }),\n );\n\n protected readonly overflowTrigger = computed(\n (): EpdfToolbarOverflowTriggerContext => ({\n $implicit: this.overflowOpen(),\n toggle: () => this.overflowOpen.update((open) => !open),\n }),\n );\n protected readonly closedTrigger: EpdfToolbarOverflowTriggerContext = {\n $implicit: false,\n toggle: noop,\n };\n\n protected readonly overflowMenu = computed((): EpdfToolbarViewContext<OverflowMenuView> => {\n return {\n $implicit: {\n sections: this.layout().overflow,\n isOpen: this.overflowOpen(),\n close: () => this.overflowOpen.set(false),\n resolve: (id) => this.resolve(id),\n execute: (id) => this.execute(id),\n },\n };\n });\n\n protected readonly overflowTriggerKey = toolbarMeasureKey.overflowTrigger;\n protected readonly paint = TOOLBAR_PAINT;\n protected readonly sectionStyle = computed(\n () =>\n `display: flex; flex-direction: ${this.vertical() ? 'column' : 'row'}; ` +\n 'align-items: center; flex: 0 0 auto;',\n );\n protected readonly centerStyle = computed(\n () =>\n this.sectionStyle() +\n (this.vertical()\n ? ' margin-top: auto; margin-bottom: auto;'\n : ' margin-left: auto; margin-right: auto;'),\n );\n /** A 1px line across the toolbar: upright in a horizontal one, flat in a vertical one. */\n protected readonly separatorStyle = computed(\n () =>\n `${this.vertical() ? 'height' : 'width'}: 1px; align-self: stretch; ` +\n 'background: currentColor; opacity: 0.2;',\n );\n /**\n * A row for a horizontal toolbar, a column for a vertical one, and no height either way, so it\n * never adds to the page. A column keeps each item at its own width, so no text wraps and\n * changes the heights it reports.\n */\n protected readonly measureLayerStyle = computed(\n () =>\n 'position: absolute; left: 0; top: 0; height: 0; overflow: hidden; visibility: hidden; ' +\n 'pointer-events: none; display: flex; white-space: nowrap;' +\n (this.vertical() ? ' flex-direction: column; align-items: flex-start;' : ''),\n );\n protected readonly commandStyle =\n 'display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; ' +\n `white-space: nowrap; color: inherit; font: inherit; border: 1px solid ${TOOLBAR_PAINT.border}; ` +\n 'border-radius: 4px;';\n\n constructor() {\n // The \"More\" menu closes when everything fits again.\n effect(() => {\n if (!this.hasOverflow()) untracked(() => this.overflowOpen.set(false));\n });\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n // The room the toolbar fills, along the way it runs.\n effect((onCleanup) => {\n const orientation = this.orientation();\n onCleanup(\n untracked(() =>\n observeContentLength(element, orientation, (length) => this.containerLength.set(length)),\n ),\n );\n });\n // The keyboard: one tab stop, and arrow keys along the toolbar.\n afterRenderEffect((onCleanup) => {\n const orientation = this.orientation();\n const focus = untracked(() => attachToolbarFocus(element, orientation));\n this.roving = focus;\n onCleanup(() => {\n focus.detach();\n this.roving = null;\n });\n });\n // Any draw can add, remove or disable an item, so the tab stop is checked after each one.\n afterRenderEffect(() => {\n this.row();\n this.hasOverflow();\n this.overflowOpen();\n untracked(() => this.roving?.refresh());\n });\n }\n\n /** A measured element's length along the toolbar; a change solves again. */\n reportLength(key: string, length: number): void {\n if (this.lengths.report(untracked(this.orientation), key, length)) {\n this.measureVersion.update((version) => version + 1);\n }\n }\n\n // ── building the entries ────────────────────────────────────────────────────\n\n private resolve(id: string): ResolvedCommand | null {\n return untracked(this.registry)?.resolveCommand(id) ?? null;\n }\n\n private execute(id: string): void {\n // A command whose `run` throws reports it through the commands' `executionFailed$`.\n this.commands.execute(id).catch(noop);\n }\n\n private customTemplateFor(slot: string): EpdfToolbarCustomTemplate | undefined {\n return this.customTemplates().find((template) => template.slot() === slot);\n }\n\n /** A section's groups, with a separator before every group but the first. */\n private liveEntries(section: LiveSection<ResolvedCommand> | undefined): Entry[] {\n const entries: Entry[] = [];\n section?.groups.forEach((group, index) => {\n if (index > 0) entries.push({ kind: 'separator', key: `separator:${group.id}` });\n for (const part of group.parts) {\n const entry = this.entryOf(part, 'live');\n if (entry) entries.push(entry);\n }\n });\n return entries;\n }\n\n /** A part with its template's context; null for an item of your own with no template, when measuring. */\n private entryOf(part: ToolbarPart<ResolvedCommand>, layer: 'live' | 'measure'): Entry | null {\n const key = part.measureKey;\n switch (part.kind) {\n case 'command':\n return {\n kind: 'command',\n key,\n context: { $implicit: part.command, variant: part.variant, run: part.run },\n };\n case 'custom': {\n const custom = this.customTemplateFor(part.name);\n if (custom) {\n return {\n kind: 'custom',\n key,\n template: custom.template,\n context: {\n $implicit: part.variant,\n layer,\n measure: (length) => this.reportLength(key, length),\n },\n };\n }\n // An item of your own with no template is measured where it renders: only the first\n // `<slot>` of a name gets the projected content, so it can't be drawn here too.\n if (layer === 'measure') return null;\n return {\n kind: 'socket',\n key,\n slot: part.name,\n context: part.terminal && {\n $implicit: part.terminal,\n variant: 'icon',\n run: part.runTerminal,\n },\n };\n }\n case 'collapsed':\n return { kind: 'collapsed', key, context: { $implicit: part.view } };\n case 'disclosure':\n return { kind: 'trigger', key, context: { $implicit: part.view } };\n }\n }\n}\n","/**\n * @embedpdf/angular/toolbar: a toolbar that fits its width (or its height, standing up), with\n * every part yours.\n *\n * <epdf-toolbar [bar] [orientation]> measures, folds, fills a \"More\" menu, arrow keys\n * <ng-template epdfToolbarCommand>, … the parts you draw (templates.ts)\n * group(), item(), custom() the bar's vocabulary, from @embedpdf/core-ui\n */\n\n// The toolbar's vocabulary: the schema a bar is written in.\nexport { DEFAULT_IMPORTANCE, PINNED, custom, group, item } from '@embedpdf/core-ui';\nexport type {\n BarChild,\n BarGroup,\n BarItem,\n BarSchema,\n BarSections,\n CustomItem,\n Importance,\n OverflowRow,\n OverflowSection,\n Variant,\n} from '@embedpdf/core-ui';\nexport * from './templates';\nexport { EpdfToolbar } from './toolbar';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["CommandsHostToken"],"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;AA+DH;AAEA;MAEa,0BAA0B,CAAA;AAC5B,IAAA,QAAQ,GAAG,MAAM,CAAyC,WAAW,CAAC;AAE/E,IAAA,OAAO,sBAAsB,CAC3B,UAAsC,EACtC,OAAgB,EAAA;AAEhB,QAAA,OAAO,IAAI;IACb;uGARW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,SAAS;mBAAC,EAAE,QAAQ,EAAE,iCAAiC,EAAE;;AAY1D;;;;;AAKG;MAEU,yBAAyB,CAAA;;AAE3B,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,uCAAW,KAAK,EAAE,mBAAmB,EAAA,CAAA,GAAA,CAA5B,EAAE,KAAK,EAAE,mBAAmB,EAAE,GAAC;AAC7D,IAAA,QAAQ,GAAG,MAAM,CAAwC,WAAW,CAAC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AAe;wBACf,oBAAoB;wBACpB,uBAAuB;wBACvB,0BAA0B;wBAC1B,4BAA4B;wBAC5B,+BAA+B;wBAC/B,kCAAkC;wBAClC,+BAA+B;AAChC,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,CAAC,MAAK,WAAY,CAAC,EAAE,CAAC;AACrF,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,SAAS;AACf,wBAAA,yBAAyB,EAAE,eAAe;AAC1C,wBAAA,KAAK,EAAE,yDAAyD;AAChE,wBAAA,wBAAwB,EAAE,iDAAiD;AAC5E,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoKT,EAAA,CAAA;AACF,iBAAA;;;ACxYD;;;;;;;AAOG;AAEH;;ACTA;;AAEG;;;;"}
@@ -0,0 +1,69 @@
1
+ import { viewManagerState, ViewManagerToken, viewManagerPlugin } from '@embedpdf/plugin-view-manager';
2
+ export * from '@embedpdf/plugin-view-manager';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable } from '@angular/core';
5
+ import { pluginService } from '@embedpdf/angular/runtime';
6
+
7
+ /**
8
+ * The view manager's service and feature: which documents each pane shows, and which pane has
9
+ * the focus. The plugin belongs to the whole viewer, not to one document, so the service reads
10
+ * the same panes wherever it's injected.
11
+ */
12
+ /**
13
+ * The panes: `panes()` and `focusedPaneId()` as signals, the calls that split, close and move
14
+ * panes and their tabs, and the streams `paneCreated$`, `paneRemoved$`, `focusChanged$` and
15
+ * `documentMoved$`. Without the viewer started, `panes()` is empty.
16
+ */
17
+ class EpdfViewManager extends pluginService({
18
+ name: 'EpdfViewManager',
19
+ feature: 'withViewManager()',
20
+ token: ViewManagerToken,
21
+ state: viewManagerState,
22
+ methods: [
23
+ 'listPanes',
24
+ 'getPane',
25
+ 'getPaneOrder',
26
+ 'getFocusedPaneId',
27
+ 'getPaneOfDocument',
28
+ 'createPane',
29
+ 'removePane',
30
+ 'movePane',
31
+ 'setFocusedPane',
32
+ 'splitPane',
33
+ 'setActiveDocument',
34
+ 'addDocument',
35
+ 'removeDocument',
36
+ 'moveDocumentWithin',
37
+ 'moveDocumentBetween',
38
+ ],
39
+ events: ['onPaneCreated', 'onPaneRemoved', 'onFocusChanged', 'onDocumentMoved'],
40
+ }) {
41
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: EpdfViewManager, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
42
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: EpdfViewManager, providedIn: 'root' });
43
+ }
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: EpdfViewManager, decorators: [{
45
+ type: Injectable,
46
+ args: [{ providedIn: 'root' }]
47
+ }] });
48
+ /** The view manager, for `provideEmbedPdf()`: every document opens in the focused pane. */
49
+ function withViewManager() {
50
+ return { plugins: [viewManagerPlugin()], services: [EpdfViewManager] };
51
+ }
52
+
53
+ /**
54
+ * @embedpdf/angular/view-manager: panes, each with its own tabs, for documents side by side.
55
+ *
56
+ * withViewManager() the plugin, for provideEmbedPdf()
57
+ * inject(EpdfViewManager) panes(), focusedPaneId(), splitPane(), setActiveDocument(), …
58
+ *
59
+ * It stays headless: you lay the panes out, draw each pane's tabs from `pane.documentIds`, and
60
+ * put its body in `[epdfDocumentScope]="pane.activeDocumentId"` so its Stage shows that document.
61
+ */
62
+ // The plugin's types and helpers, so app code has one import for the feature.
63
+
64
+ /**
65
+ * Generated bundle index. Do not edit.
66
+ */
67
+
68
+ export { EpdfViewManager, withViewManager };
69
+ //# sourceMappingURL=embedpdf-angular-view-manager.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedpdf-angular-view-manager.mjs","sources":["../../view-manager/src/view-manager.ts","../../view-manager/src/public_api.ts","../../view-manager/src/embedpdf-angular-view-manager.ts"],"sourcesContent":["/**\n * The view manager's service and feature: which documents each pane shows, and which pane has\n * the focus. The plugin belongs to the whole viewer, not to one document, so the service reads\n * the same panes wherever it's injected.\n */\nimport { Injectable } from '@angular/core';\nimport { pluginService, type EmbedPdfFeature } from '@embedpdf/angular/runtime';\nimport {\n viewManagerPlugin,\n viewManagerState,\n ViewManagerToken,\n} from '@embedpdf/plugin-view-manager';\n\n/**\n * The panes: `panes()` and `focusedPaneId()` as signals, the calls that split, close and move\n * panes and their tabs, and the streams `paneCreated$`, `paneRemoved$`, `focusChanged$` and\n * `documentMoved$`. Without the viewer started, `panes()` is empty.\n */\n@Injectable({ providedIn: 'root' })\nexport class EpdfViewManager extends pluginService({\n name: 'EpdfViewManager',\n feature: 'withViewManager()',\n token: ViewManagerToken,\n state: viewManagerState,\n methods: [\n 'listPanes',\n 'getPane',\n 'getPaneOrder',\n 'getFocusedPaneId',\n 'getPaneOfDocument',\n 'createPane',\n 'removePane',\n 'movePane',\n 'setFocusedPane',\n 'splitPane',\n 'setActiveDocument',\n 'addDocument',\n 'removeDocument',\n 'moveDocumentWithin',\n 'moveDocumentBetween',\n ],\n events: ['onPaneCreated', 'onPaneRemoved', 'onFocusChanged', 'onDocumentMoved'],\n}) {}\n\n/** The view manager, for `provideEmbedPdf()`: every document opens in the focused pane. */\nexport function withViewManager(): EmbedPdfFeature {\n return { plugins: [viewManagerPlugin()], services: [EpdfViewManager] };\n}\n","/**\n * @embedpdf/angular/view-manager: panes, each with its own tabs, for documents side by side.\n *\n * withViewManager() the plugin, for provideEmbedPdf()\n * inject(EpdfViewManager) panes(), focusedPaneId(), splitPane(), setActiveDocument(), …\n *\n * It stays headless: you lay the panes out, draw each pane's tabs from `pane.documentIds`, and\n * put its body in `[epdfDocumentScope]=\"pane.activeDocumentId\"` so its Stage shows that document.\n */\n\n// The plugin's types and helpers, so app code has one import for the feature.\nexport * from '@embedpdf/plugin-view-manager';\nexport * from './view-manager';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;AAIG;AASH;;;;AAIG;AAEG,MAAO,eAAgB,SAAQ,aAAa,CAAC;AACjD,IAAA,IAAI,EAAE,iBAAiB;AACvB,IAAA,OAAO,EAAE,mBAAmB;AAC5B,IAAA,KAAK,EAAE,gBAAgB;AACvB,IAAA,KAAK,EAAE,gBAAgB;AACvB,IAAA,OAAO,EAAE;QACP,WAAW;QACX,SAAS;QACT,cAAc;QACd,kBAAkB;QAClB,mBAAmB;QACnB,YAAY;QACZ,YAAY;QACZ,UAAU;QACV,gBAAgB;QAChB,WAAW;QACX,mBAAmB;QACnB,aAAa;QACb,gBAAgB;QAChB,oBAAoB;QACpB,qBAAqB;AACtB,KAAA;IACD,MAAM,EAAE,CAAC,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,CAAC;CAChF,CAAC,CAAA;uGAvBW,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA;;2FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;AA0BlC;SACgB,eAAe,GAAA;AAC7B,IAAA,OAAO,EAAE,OAAO,EAAE,CAAC,iBAAiB,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,eAAe,CAAC,EAAE;AACxE;;AC/CA;;;;;;;;AAQG;AAEH;;ACVA;;AAEG;;;;"}
@@ -1,12 +1,32 @@
1
1
  export * from '@embedpdf/angular/runtime';
2
+ export * from '@embedpdf/angular/anchored';
3
+ export * from '@embedpdf/angular/interaction';
2
4
  export * from '@embedpdf/angular/stage';
3
5
  export * from '@embedpdf/angular/render';
4
6
  export * from '@embedpdf/angular/actions';
7
+ export * from '@embedpdf/angular/view-manager';
8
+ export * from '@embedpdf/angular/page-edit';
9
+ export * from '@embedpdf/angular/metadata';
10
+ export * from '@embedpdf/angular/history';
11
+ export * from '@embedpdf/angular/page-view';
12
+ export * from '@embedpdf/angular/commands';
13
+ export * from '@embedpdf/angular/toolbar';
14
+ export * from '@embedpdf/angular/shell';
15
+ export * from '@embedpdf/angular/i18n';
16
+ export * from '@embedpdf/angular/selection';
17
+ export * from '@embedpdf/angular/search';
18
+ export * from '@embedpdf/angular/link';
19
+ export * from '@embedpdf/angular/stamp';
20
+ export * from '@embedpdf/angular/measurement';
21
+ export * from '@embedpdf/angular/redaction';
22
+ export * from '@embedpdf/angular/annotation';
23
+ export * from '@embedpdf/angular/form';
24
+ export * from '@embedpdf/angular/signature';
5
25
 
6
26
  /**
7
- * @embedpdf/angular — the opt-in "everything" barrel.
8
- * Fine for prototyping; examples, docs, and quickstarts import the secondary
9
- * entry points exclusively, which make the bundle guarantee legible.
27
+ * @embedpdf/angular: every entry point at once. Fine for trying things out; apps, examples and
28
+ * the docs import the entry points (`@embedpdf/angular/stage`), which keep each feature's code
29
+ * out of a bundle that doesn't use it.
10
30
  */
11
31
 
12
32
  /**
@@ -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';\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"}
1
+ {"version":3,"file":"embedpdf-angular.mjs","sources":["../../src/public_api.ts","../../src/embedpdf-angular.ts"],"sourcesContent":["/**\n * @embedpdf/angular: every entry point at once. Fine for trying things out; apps, examples and\n * the docs import the entry points (`@embedpdf/angular/stage`), which keep each feature's code\n * out of a bundle that doesn't use it.\n */\nexport * from '@embedpdf/angular/runtime';\nexport * from '@embedpdf/angular/anchored';\nexport * from '@embedpdf/angular/interaction';\nexport * from '@embedpdf/angular/stage';\nexport * from '@embedpdf/angular/render';\nexport * from '@embedpdf/angular/actions';\nexport * from '@embedpdf/angular/view-manager';\nexport * from '@embedpdf/angular/page-edit';\nexport * from '@embedpdf/angular/metadata';\nexport * from '@embedpdf/angular/history';\nexport * from '@embedpdf/angular/page-view';\nexport * from '@embedpdf/angular/commands';\nexport * from '@embedpdf/angular/toolbar';\nexport * from '@embedpdf/angular/shell';\nexport * from '@embedpdf/angular/i18n';\nexport * from '@embedpdf/angular/selection';\nexport * from '@embedpdf/angular/search';\nexport * from '@embedpdf/angular/link';\nexport * from '@embedpdf/angular/stamp';\nexport * from '@embedpdf/angular/measurement';\nexport * from '@embedpdf/angular/redaction';\nexport * from '@embedpdf/angular/annotation';\nexport * from '@embedpdf/angular/form';\nexport * from '@embedpdf/angular/signature';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAIG;;ACJH;;AAEG"}
@@ -0,0 +1,79 @@
1
+ import * as _embedpdf_plugin_form from '@embedpdf/plugin-form';
2
+ import { FormFieldRef, FormFieldValue, FormPlainValue, FormConfig, FormWidgetItem } from '@embedpdf/plugin-form';
3
+ export * from '@embedpdf/plugin-form';
4
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
5
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
6
+ import * as _embedpdf_core from '@embedpdf/core';
7
+ import * as i0 from '@angular/core';
8
+ import { Signal } from '@angular/core';
9
+ import { FormControl } from '@angular/forms';
10
+ import * as _embedpdf_web from '@embedpdf/web';
11
+
12
+ /** A field's ref, or a function that gives it (a component input, a route parameter). */
13
+ type FieldRefSource = FormFieldRef | (() => FormFieldRef);
14
+ declare const EpdfForm_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_form.FormCapability, {
15
+ fields: readonly _embedpdf_plugin_form.FormFieldDTO[];
16
+ status: _embedpdf_core.ResourceStatus;
17
+ formKind: _embedpdf_plugin_form.FormKind;
18
+ selectedField: _embedpdf_plugin_form.FormFieldDTO | null;
19
+ }, "create" | "get" | "validate" | "exportValues" | "reset" | "setValue" | "delete" | "list" | "getStatus" | "refresh" | "update" | "export" | "import" | "canRead" | "getSnapshot" | "getFormKind" | "getFieldForWidget" | "getWidget" | "getValue" | "listWidgets" | "getWidgetAt" | "getSelectedField" | "setValues" | "importValues" | "activateWidget" | "removeWidget" | "deleteWidget" | "reorderCalculations" | "repair" | "canFill" | "canDesign" | "canRestoreAttribution" | "canWriteScripts", "onResynced" | "onValueChanged" | "onFieldCreated" | "onFieldUpdated" | "onFieldDeleted" | "onValidationRejected">;
20
+ /**
21
+ * The form: `fields()`, `status()`, `formKind()` and `selectedField()` as signals; reading,
22
+ * filling, form data and building as methods (`setValue()`, `importValues()`, `export()`,
23
+ * `create()`, `update()`, …, the Methods tables of the Filling forms and Building forms pages);
24
+ * the events as streams (`valueChanged$`, `validationRejected$`, `fieldCreated$`, …); and the
25
+ * settings. Without a document, `fields()` is empty and a method refuses with `not-ready`.
26
+ */
27
+ declare class EpdfForm extends EpdfForm_base {
28
+ /**
29
+ * One field's value, in the shape `setValue()` takes, as a signal: it changes only when that
30
+ * field's value does, and is `null` for a field without a value, and without a document. Keep
31
+ * it in a field (`readonly total = form.valueOf(toFieldRef('total'))`); `ref` may be a
32
+ * function, such as a signal input, and the value follows it.
33
+ *
34
+ * (`override`: every object has a `valueOf()` without arguments, which JavaScript calls to
35
+ * turn it into a primitive. Called that way, this returns a signal, which isn't one, so
36
+ * JavaScript goes on to `toString()` as it would without it.)
37
+ */
38
+ valueOf(ref: FieldRefSource): Signal<FormFieldValue | null>;
39
+ /**
40
+ * One field as a Reactive Forms `FormControl`, for an input of your own:
41
+ * `<input [formControl]="name" />`. The control holds the field's value as plain data (a text
42
+ * box's, dropdown's or radio group's text, a checkbox's `true` or `false`, a list's selected
43
+ * values; `null` for none), and takes every change of it, whoever made it. A change of the
44
+ * control fills in the field, with the same checks and scripts as typing in the PDF does; a
45
+ * value the form refuses puts the field's value back in the control. The control is disabled
46
+ * while the field can't be filled in: no such field (yet), a read-only one, or no
47
+ * `doc.forms.fill`.
48
+ *
49
+ * Call it in an injection context (a constructor or a field initializer): the control follows
50
+ * the field for as long as the caller lives.
51
+ */
52
+ controlOf(ref: FieldRefSource): FormControl<FormPlainValue>;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfForm, never>;
54
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfForm>;
55
+ }
56
+ /** The form plugin: fields people fill in on every page with an `<epdf-form-layer>`. */
57
+ declare function withForm(config?: FormConfig): EmbedPdfFeature;
58
+
59
+ declare class EpdfFormLayer {
60
+ private readonly page;
61
+ private readonly host;
62
+ /** A plugin of the page's own document: every plugin below is read for it. */
63
+ private bindTo;
64
+ private readonly form;
65
+ /** Whether the active tool fills forms: the layer draws nothing in design mode. */
66
+ protected readonly active: Signal<boolean>;
67
+ /** The page's widgets: the same array while nothing on the page changes. */
68
+ protected readonly widgets: Signal<readonly FormWidgetItem[]>;
69
+ /** The form settings, with or without a document: they belong to the plugin. */
70
+ private readonly settings;
71
+ /** The colors the viewer draws fields with: the form settings over the viewer's accent. */
72
+ protected readonly colors: Signal<_embedpdf_web.FormColors>;
73
+ constructor();
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfFormLayer, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<EpdfFormLayer, "epdf-form-layer", never, {}, {}, never, never, true, never>;
76
+ }
77
+
78
+ export { EpdfForm, EpdfFormLayer, withForm };
79
+ export type { FieldRefSource };
@@ -0,0 +1,28 @@
1
+ import * as _embedpdf_plugin_history from '@embedpdf/plugin-history';
2
+ import { HistoryConfig } from '@embedpdf/plugin-history';
3
+ export * from '@embedpdf/plugin-history';
4
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
5
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
6
+ import * as _embedpdf_core from '@embedpdf/core';
7
+ import * as i0 from '@angular/core';
8
+
9
+ declare const EpdfHistory_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_history.HistoryCapability, {
10
+ canUndo: boolean;
11
+ canRedo: boolean;
12
+ undoLabel: _embedpdf_core.ChangeLabel | null;
13
+ redoLabel: _embedpdf_core.ChangeLabel | null;
14
+ }, "undo" | "redo" | "clear" | "getUndoLabel" | "getRedoLabel", "onUndone" | "onUndoFailed">;
15
+ /**
16
+ * The history of the document in scope (`[epdfDocumentScope]`), else the active one: `undo()`,
17
+ * `redo()`, `clear()`, the State table as signals (`canUndo()`, `canRedo()`, `undoLabel()`,
18
+ * `redoLabel()`), the streams `undone$` and `undoFailed$`, and the settings. With no document
19
+ * the signals read false and null, and every call refuses with `not-ready`.
20
+ */
21
+ declare class EpdfHistory extends EpdfHistory_base {
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfHistory, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfHistory>;
24
+ }
25
+ /** Undo and redo, with their settings: `withHistory({ limit: 200 })`. */
26
+ declare function withHistory(options?: HistoryConfig): EmbedPdfFeature;
27
+
28
+ export { EpdfHistory, withHistory };
@@ -0,0 +1,52 @@
1
+ import * as _embedpdf_plugin_i18n from '@embedpdf/plugin-i18n';
2
+ import { TranslateOptions, I18nConfig } from '@embedpdf/plugin-i18n';
3
+ export * from '@embedpdf/plugin-i18n';
4
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
5
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
6
+ import * as i0 from '@angular/core';
7
+ import { Signal, PipeTransform } from '@angular/core';
8
+
9
+ /** A translate function: `t('toolbar.save')`, `t('search.results', { params: { count } })`. */
10
+ type Translate = (key: string, options?: TranslateOptions) => string;
11
+ declare const EpdfI18n_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_i18n.I18nCapability, {
12
+ locale: string;
13
+ direction: _embedpdf_plugin_i18n.TextDirection;
14
+ locales: readonly _embedpdf_plugin_i18n.LocaleInfo[];
15
+ loading: string | null;
16
+ }, "t" | "getTranslator" | "hasKey" | "getLocale" | "getDirection" | "listLocales" | "getLoadingLocale" | "setLocale" | "registerLocale" | "addTranslations", "onLocaleChanged" | "onLocaleLoadFailed">;
17
+ /**
18
+ * The languages: `locale()`, `direction()`, `locales()` and `loading()` as signals, `t()`,
19
+ * `setLocale()`, `addTranslations()` and `registerLocale()`, `localeChanged$` and
20
+ * `localeLoadFailed$`, and the settings. The plugin is the workspace's, so all of it works
21
+ * before a document opens.
22
+ */
23
+ declare class EpdfI18n extends EpdfI18n_base {
24
+ /**
25
+ * The translate function as a signal: a new function when the language or the strings
26
+ * change, the same one otherwise. What the `epdfT` pipe reads; a `computed()` that calls it
27
+ * follows the language too.
28
+ */
29
+ readonly translator: Signal<Translate>;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfI18n, never>;
31
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfI18n>;
32
+ }
33
+ /** The translations plugin, with its settings: `withI18n({ locale, locales, loaders })`. */
34
+ declare function withI18n(options?: I18nConfig): EmbedPdfFeature;
35
+ /**
36
+ * A string in the current language: `{{ 'toolbar.save' | epdfT }}`, or with the options `t()`
37
+ * takes, `{{ 'search.results' | epdfT: { params: { count } } }}`. It updates when the language
38
+ * or the strings change.
39
+ *
40
+ * Not pure, because the language is not one of its arguments: it reads the translator signal
41
+ * each time the template is checked, which is what wakes the template when the language
42
+ * changes, and the translator keeps a looked-up string cheap.
43
+ */
44
+ declare class EpdfTPipe implements PipeTransform {
45
+ private readonly i18n;
46
+ transform(key: string, options?: TranslateOptions): string;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfTPipe, never>;
48
+ static ɵpipe: i0.ɵɵPipeDeclaration<EpdfTPipe, "epdfT", true>;
49
+ }
50
+
51
+ export { EpdfI18n, EpdfTPipe, withI18n };
52
+ export type { Translate };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,24 @@
1
1
  export * from '@embedpdf/angular/runtime';
2
+ export * from '@embedpdf/angular/anchored';
3
+ export * from '@embedpdf/angular/interaction';
2
4
  export * from '@embedpdf/angular/stage';
3
5
  export * from '@embedpdf/angular/render';
4
6
  export * from '@embedpdf/angular/actions';
7
+ export * from '@embedpdf/angular/view-manager';
8
+ export * from '@embedpdf/angular/page-edit';
9
+ export * from '@embedpdf/angular/metadata';
10
+ export * from '@embedpdf/angular/history';
11
+ export * from '@embedpdf/angular/page-view';
12
+ export * from '@embedpdf/angular/commands';
13
+ export * from '@embedpdf/angular/toolbar';
14
+ export * from '@embedpdf/angular/shell';
15
+ export * from '@embedpdf/angular/i18n';
16
+ export * from '@embedpdf/angular/selection';
17
+ export * from '@embedpdf/angular/search';
18
+ export * from '@embedpdf/angular/link';
19
+ export * from '@embedpdf/angular/stamp';
20
+ export * from '@embedpdf/angular/measurement';
21
+ export * from '@embedpdf/angular/redaction';
22
+ export * from '@embedpdf/angular/annotation';
23
+ export * from '@embedpdf/angular/form';
24
+ export * from '@embedpdf/angular/signature';
@@ -0,0 +1,58 @@
1
+ import * as _embedpdf_plugin_interaction from '@embedpdf/plugin-interaction';
2
+ import { FeedbackPluginOptions, InteractionConfig } from '@embedpdf/plugin-interaction';
3
+ export * from '@embedpdf/plugin-interaction';
4
+ import { ToolCursorSpec } from '@embedpdf/web';
5
+ export { SvgCursorOptions, ToolCursorImage, ToolCursorSpec, svgCursor, vibrationFeedback, wkFeedback } from '@embedpdf/web';
6
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
7
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
8
+ import * as i0 from '@angular/core';
9
+
10
+ declare const EpdfInteraction_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_interaction.InteractionCapability, {
11
+ activeToolId: _embedpdf_plugin_interaction.ToolId | null;
12
+ tools: readonly _embedpdf_plugin_interaction.Tool[];
13
+ }, "getActiveTool" | "getActiveToolId" | "getDefaultToolId" | "listTools" | "getTool" | "hasTool" | "activateTool" | "activateDefaultTool" | "pushTool" | "popTool" | "setToolCursor" | "registerTool", "onToolChanged" | "onGestureStarted" | "onGestureEnded" | "onGestureCancelled">;
14
+ /**
15
+ * The tools: `activeToolId()` and `tools()` as signals, `activateTool()`, `pushTool()` and
16
+ * `popTool()` to switch, `registerTool()` for a tool of your own, `toolChanged$` and the
17
+ * gesture streams, and the settings. Without a document there is no active tool.
18
+ */
19
+ declare class EpdfInteraction extends EpdfInteraction_base {
20
+ /**
21
+ * Give a tool cursors of your own, such as a pen in the ink color, for as long as the caller
22
+ * lives: the tool gets its own cursors back when the component or directive that called it
23
+ * goes. `spec` is read again when the signals it reads change, so the cursor follows a color
24
+ * setting. `null` puts nothing in place. Call it in an injection context (a constructor or a
25
+ * field initializer).
26
+ *
27
+ * The cursor is the one pixel that follows the pointer with no delay, so it shows the armed
28
+ * tool better than anything drawn under the pointer could.
29
+ */
30
+ overrideCursor(spec: () => ToolCursorSpec | null): void;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfInteraction, never>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfInteraction>;
33
+ }
34
+ /** The interaction plugin: the tools and the pointer. `withInteraction({ defaultTool: 'pan' })`. */
35
+ declare function withInteraction(options?: InteractionConfig): EmbedPdfFeature;
36
+ /**
37
+ * Haptics: one provider for the whole viewer, which plugins call at their moments (a word
38
+ * selected on a long press). `withFeedback({ provider: vibrationFeedback })`.
39
+ */
40
+ declare function withFeedback(options?: FeedbackPluginOptions): EmbedPdfFeature;
41
+
42
+ /**
43
+ * The page's pointer input, for the active tool. Put it first in the page's content, below the
44
+ * layers: a layer that lets the pointer through (the picture, a highlight) passes presses on to
45
+ * it, and a control that takes its own presses (a link, a form field) keeps them. Shows the
46
+ * cursor the active tool asks for (text over text, a crosshair for a drawing tool).
47
+ */
48
+ declare class EpdfPagePointerSource {
49
+ private readonly page;
50
+ /** The interaction plugin of the page's own document. */
51
+ private readonly interaction;
52
+ protected readonly cursor: i0.Signal<string>;
53
+ constructor();
54
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfPagePointerSource, never>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<EpdfPagePointerSource, "epdf-page-pointer-source", never, {}, {}, never, never, true, never>;
56
+ }
57
+
58
+ export { EpdfInteraction, EpdfPagePointerSource, withFeedback, withInteraction };
@@ -0,0 +1,77 @@
1
+ import * as _embedpdf_plugin_link from '@embedpdf/plugin-link';
2
+ import { Link } from '@embedpdf/plugin-link';
3
+ export * from '@embedpdf/plugin-link';
4
+ import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
5
+ import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
6
+ import * as i0 from '@angular/core';
7
+ import { TemplateRef } from '@angular/core';
8
+ import * as _embedpdf_plugin_annotation_contract from '@embedpdf/plugin-annotation/contract';
9
+ import { LinkAnchor, LinkAnchorEvent } from '@embedpdf/web';
10
+
11
+ declare const EpdfLink_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_link.LinkCapability, Record<never, never>, "activate" | "getStatus" | "listLinks" | "getLink" | "getLinkAt" | "listAllLinks" | "ensureLoaded" | "isLoaded" | "resolve" | "activateAt" | "getLabel", "onActivated" | "onLoaded">;
12
+ /**
13
+ * Links: `listLinks(page)`, `getLinkAt(page, point)`, `activate(link)` and the rest of the Links
14
+ * page's methods, and its events as streams (`link.activated$`). While the service is there,
15
+ * `activate()` opens a website in a new tab.
16
+ */
17
+ declare class EpdfLink extends EpdfLink_base {
18
+ constructor();
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfLink, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpdfLink>;
21
+ }
22
+ /** The link plugin: links that work, in every page with an `<epdf-link-layer>`. */
23
+ declare function withLink(): EmbedPdfFeature;
24
+
25
+ /** What a link template gets: `let-link` is the link, `let-native="native"` the layer's anchor. */
26
+ interface EpdfLinkTemplateContext {
27
+ /** The link: its `id`, its `bounds` on the page and its `target`. */
28
+ $implicit: Link;
29
+ /** The layer's own anchor: `<ng-container [ngTemplateOutlet]="native" />`. */
30
+ native: TemplateRef<unknown>;
31
+ }
32
+ /**
33
+ * How each link is drawn instead of the layer's bare anchor:
34
+ * `<ng-template epdfLink let-link let-native="native">`. For a link you don't want to change,
35
+ * show `native` alone.
36
+ */
37
+ declare class EpdfLinkTemplate {
38
+ readonly template: TemplateRef<EpdfLinkTemplateContext>;
39
+ static ngTemplateContextGuard(_directive: EpdfLinkTemplate, context: unknown): context is EpdfLinkTemplateContext;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfLinkTemplate, never>;
41
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EpdfLinkTemplate, "ng-template[epdfLink]", never, {}, {}, never, never, true, never>;
42
+ }
43
+ declare class EpdfLinkLayer {
44
+ private readonly page;
45
+ private readonly host;
46
+ private readonly enclosingStage;
47
+ /** The app's own drawing of a link, when it gives one. */
48
+ protected readonly custom: i0.Signal<EpdfLinkTemplate | undefined>;
49
+ /** A plugin of the page's own document: every plugin below is read for it. */
50
+ private bindTo;
51
+ private readonly link;
52
+ /** Optional: with the actions plugin, a link's own actions run. */
53
+ private readonly actions;
54
+ /** Optional: a tool that can edit annotations owns the links that belong to one. */
55
+ private readonly editing;
56
+ /** A link to a page moves the view it was followed in: this Stage, or the main one. */
57
+ private readonly stage;
58
+ private readonly links;
59
+ /** Whether the active tool follows links: the layer draws nothing otherwise. */
60
+ private readonly engaged;
61
+ /** Each link's anchor: its box, its label, and a native `href` only for a website with nothing chained after it. */
62
+ protected readonly items: i0.Signal<readonly LinkAnchor<_embedpdf_plugin_annotation_contract.LinkNavItem>[]>;
63
+ /** One hover pump per layer: the enter and exit actions of the link under the pointer. */
64
+ private readonly pump;
65
+ constructor();
66
+ protected follow(event: MouseEvent, item: LinkAnchor<Link>): void;
67
+ protected followByKey(event: KeyboardEvent, link: Link): void;
68
+ protected hover(link: Link | null): void;
69
+ /** Send one of the link's own events to the actions plugin, when the link has actions. */
70
+ protected notify(link: Link, event: LinkAnchorEvent): void;
71
+ private activate;
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpdfLinkLayer, never>;
73
+ static ɵcmp: i0.ɵɵComponentDeclaration<EpdfLinkLayer, "epdf-link-layer", never, {}, {}, ["custom"], never, true, never>;
74
+ }
75
+
76
+ export { EpdfLink, EpdfLinkLayer, EpdfLinkTemplate, withLink };
77
+ export type { EpdfLinkTemplateContext };