@embedpdf/core 2.15.0 → 3.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/LICENSE +192 -21
  2. package/dist/index.cjs +864 -2
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +313 -0
  5. package/dist/index.d.ts +313 -1
  6. package/dist/index.js +816 -2124
  7. package/dist/index.js.map +1 -1
  8. package/package.json +22 -52
  9. package/README.md +0 -40
  10. package/dist/lib/base/base-plugin.d.ts +0 -190
  11. package/dist/lib/index.d.ts +0 -17
  12. package/dist/lib/plugin/builder.d.ts +0 -11
  13. package/dist/lib/registry/plugin-registry.d.ts +0 -104
  14. package/dist/lib/store/actions.d.ts +0 -154
  15. package/dist/lib/store/index.d.ts +0 -6
  16. package/dist/lib/store/initial-state.d.ts +0 -31
  17. package/dist/lib/store/plugin-store.d.ts +0 -48
  18. package/dist/lib/store/reducer-helpers.d.ts +0 -11
  19. package/dist/lib/store/reducer.d.ts +0 -4
  20. package/dist/lib/store/selectors.d.ts +0 -41
  21. package/dist/lib/store/store.d.ts +0 -106
  22. package/dist/lib/store/types.d.ts +0 -28
  23. package/dist/lib/types/errors.d.ts +0 -21
  24. package/dist/lib/types/permissions.d.ts +0 -55
  25. package/dist/lib/types/plugin.d.ts +0 -75
  26. package/dist/lib/utils/dependency-resolver.d.ts +0 -6
  27. package/dist/lib/utils/event-control.d.ts +0 -58
  28. package/dist/lib/utils/eventing.d.ts +0 -19
  29. package/dist/lib/utils/math.d.ts +0 -22
  30. package/dist/lib/utils/plugin-helpers.d.ts +0 -6
  31. package/dist/lib/utils/scoped-eventing.d.ts +0 -71
  32. package/dist/lib/utils/typed-object.d.ts +0 -12
  33. package/dist/preact/adapter.d.ts +0 -11
  34. package/dist/preact/index.cjs +0 -2
  35. package/dist/preact/index.cjs.map +0 -1
  36. package/dist/preact/index.d.ts +0 -1
  37. package/dist/preact/index.js +0 -323
  38. package/dist/preact/index.js.map +0 -1
  39. package/dist/react/adapter.d.ts +0 -2
  40. package/dist/react/index.cjs +0 -2
  41. package/dist/react/index.cjs.map +0 -1
  42. package/dist/react/index.d.ts +0 -1
  43. package/dist/react/index.js +0 -322
  44. package/dist/react/index.js.map +0 -1
  45. package/dist/shared/components/auto-mount.d.ts +0 -8
  46. package/dist/shared/components/embed-pdf.d.ts +0 -37
  47. package/dist/shared/components/index.d.ts +0 -1
  48. package/dist/shared/context.d.ts +0 -12
  49. package/dist/shared/hooks/index.d.ts +0 -7
  50. package/dist/shared/hooks/use-capability.d.ts +0 -16
  51. package/dist/shared/hooks/use-core-state.d.ts +0 -8
  52. package/dist/shared/hooks/use-document-permissions.d.ts +0 -35
  53. package/dist/shared/hooks/use-document-state.d.ts +0 -8
  54. package/dist/shared/hooks/use-plugin.d.ts +0 -16
  55. package/dist/shared/hooks/use-registry.d.ts +0 -6
  56. package/dist/shared/hooks/use-store-state.d.ts +0 -6
  57. package/dist/shared/index.d.ts +0 -3
  58. package/dist/shared-preact/components/auto-mount.d.ts +0 -8
  59. package/dist/shared-preact/components/embed-pdf.d.ts +0 -37
  60. package/dist/shared-preact/components/index.d.ts +0 -1
  61. package/dist/shared-preact/context.d.ts +0 -12
  62. package/dist/shared-preact/hooks/index.d.ts +0 -7
  63. package/dist/shared-preact/hooks/use-capability.d.ts +0 -16
  64. package/dist/shared-preact/hooks/use-core-state.d.ts +0 -8
  65. package/dist/shared-preact/hooks/use-document-permissions.d.ts +0 -35
  66. package/dist/shared-preact/hooks/use-document-state.d.ts +0 -8
  67. package/dist/shared-preact/hooks/use-plugin.d.ts +0 -16
  68. package/dist/shared-preact/hooks/use-registry.d.ts +0 -6
  69. package/dist/shared-preact/hooks/use-store-state.d.ts +0 -6
  70. package/dist/shared-preact/index.d.ts +0 -3
  71. package/dist/shared-react/components/auto-mount.d.ts +0 -8
  72. package/dist/shared-react/components/embed-pdf.d.ts +0 -37
  73. package/dist/shared-react/components/index.d.ts +0 -1
  74. package/dist/shared-react/context.d.ts +0 -12
  75. package/dist/shared-react/hooks/index.d.ts +0 -7
  76. package/dist/shared-react/hooks/use-capability.d.ts +0 -16
  77. package/dist/shared-react/hooks/use-core-state.d.ts +0 -8
  78. package/dist/shared-react/hooks/use-document-permissions.d.ts +0 -35
  79. package/dist/shared-react/hooks/use-document-state.d.ts +0 -8
  80. package/dist/shared-react/hooks/use-plugin.d.ts +0 -16
  81. package/dist/shared-react/hooks/use-registry.d.ts +0 -6
  82. package/dist/shared-react/hooks/use-store-state.d.ts +0 -6
  83. package/dist/shared-react/index.d.ts +0 -3
  84. package/dist/svelte/components/AutoMount.svelte.d.ts +0 -9
  85. package/dist/svelte/components/EmbedPDF.svelte.d.ts +0 -40
  86. package/dist/svelte/components/NestedWrapper.svelte.d.ts +0 -10
  87. package/dist/svelte/components/index.d.ts +0 -1
  88. package/dist/svelte/hooks/index.d.ts +0 -6
  89. package/dist/svelte/hooks/use-capability.svelte.d.ts +0 -14
  90. package/dist/svelte/hooks/use-core-state.svelte.d.ts +0 -9
  91. package/dist/svelte/hooks/use-document-permissions.svelte.d.ts +0 -35
  92. package/dist/svelte/hooks/use-document-state.svelte.d.ts +0 -9
  93. package/dist/svelte/hooks/use-plugin.svelte.d.ts +0 -14
  94. package/dist/svelte/hooks/use-registry.svelte.d.ts +0 -17
  95. package/dist/svelte/index.cjs +0 -2
  96. package/dist/svelte/index.cjs.map +0 -1
  97. package/dist/svelte/index.d.ts +0 -2
  98. package/dist/svelte/index.js +0 -430
  99. package/dist/svelte/index.js.map +0 -1
  100. package/dist/vue/components/auto-mount.vue.d.ts +0 -19
  101. package/dist/vue/components/embed-pdf.vue.d.ts +0 -104
  102. package/dist/vue/components/index.d.ts +0 -1
  103. package/dist/vue/components/nested-wrapper.vue.d.ts +0 -19
  104. package/dist/vue/composables/index.d.ts +0 -7
  105. package/dist/vue/composables/use-capability.d.ts +0 -15
  106. package/dist/vue/composables/use-core-state.d.ts +0 -9
  107. package/dist/vue/composables/use-document-permissions.d.ts +0 -36
  108. package/dist/vue/composables/use-document-state.d.ts +0 -8
  109. package/dist/vue/composables/use-plugin.d.ts +0 -8
  110. package/dist/vue/composables/use-registry.d.ts +0 -1
  111. package/dist/vue/composables/use-store-state.d.ts +0 -10
  112. package/dist/vue/context.d.ts +0 -13
  113. package/dist/vue/index.cjs +0 -2
  114. package/dist/vue/index.cjs.map +0 -1
  115. package/dist/vue/index.d.ts +0 -2
  116. package/dist/vue/index.js +0 -384
  117. package/dist/vue/index.js.map +0 -1
@@ -1,16 +0,0 @@
1
- import { BasePlugin } from '../../lib/index.ts';
2
- type CapabilityState<T extends BasePlugin> = {
3
- provides: ReturnType<NonNullable<T['provides']>> | null;
4
- isLoading: boolean;
5
- ready: Promise<void>;
6
- };
7
- /**
8
- * Hook to access a plugin's capability.
9
- * @param pluginId The ID of the plugin to access
10
- * @returns The capability provided by the plugin or null during initialization
11
- * @example
12
- * // Get zoom capability
13
- * const zoom = useCapability<ZoomPlugin>(ZoomPlugin.id);
14
- */
15
- export declare function useCapability<T extends BasePlugin>(pluginId: T['id']): CapabilityState<T>;
16
- export {};
@@ -1,8 +0,0 @@
1
- import { CoreState } from '../../lib/index.ts';
2
- /**
3
- * Hook that provides access to the current core state.
4
- *
5
- * Note: This reads from the context which is already subscribed to core state changes
6
- * in the EmbedPDF component, so there's no additional subscription overhead.
7
- */
8
- export declare function useCoreState(): CoreState | null;
@@ -1,35 +0,0 @@
1
- import { PdfPermissionFlag } from '@embedpdf/models';
2
- export interface DocumentPermissions {
3
- /** Effective permission flags after applying overrides */
4
- permissions: number;
5
- /** Raw PDF permission flags (before overrides) */
6
- pdfPermissions: number;
7
- /** Check if a specific permission flag is effectively allowed */
8
- hasPermission: (flag: PdfPermissionFlag) => boolean;
9
- /** Check if all specified flags are effectively allowed */
10
- hasAllPermissions: (...flags: PdfPermissionFlag[]) => boolean;
11
- /** Can print (possibly degraded quality) */
12
- canPrint: boolean;
13
- /** Can modify document contents */
14
- canModifyContents: boolean;
15
- /** Can copy/extract text and graphics */
16
- canCopyContents: boolean;
17
- /** Can add/modify annotations and fill forms */
18
- canModifyAnnotations: boolean;
19
- /** Can fill in existing form fields */
20
- canFillForms: boolean;
21
- /** Can extract for accessibility */
22
- canExtractForAccessibility: boolean;
23
- /** Can assemble document (insert, rotate, delete pages) */
24
- canAssembleDocument: boolean;
25
- /** Can print high quality */
26
- canPrintHighQuality: boolean;
27
- }
28
- /**
29
- * Hook that provides reactive access to a document's effective permission flags.
30
- * Applies layered resolution: per-document override → global override → PDF permission.
31
- *
32
- * @param documentId The ID of the document to check permissions for.
33
- * @returns An object with effective permissions, raw PDF permissions, helper functions, and shorthand booleans.
34
- */
35
- export declare function useDocumentPermissions(documentId: string): DocumentPermissions;
@@ -1,8 +0,0 @@
1
- import { DocumentState } from '../../lib/index.ts';
2
- /**
3
- * Hook that provides reactive access to a specific document's state from the core store.
4
- *
5
- * @param documentId The ID of the document to retrieve.
6
- * @returns The reactive DocumentState object or null if not found.
7
- */
8
- export declare function useDocumentState(documentId: string | null): DocumentState | null;
@@ -1,16 +0,0 @@
1
- import { BasePlugin } from '../../lib/index.ts';
2
- type PluginState<T extends BasePlugin> = {
3
- plugin: T | null;
4
- isLoading: boolean;
5
- ready: Promise<void>;
6
- };
7
- /**
8
- * Hook to access a plugin.
9
- * @param pluginId The ID of the plugin to access
10
- * @returns The plugin or null during initialization
11
- * @example
12
- * // Get zoom plugin
13
- * const zoom = usePlugin<ZoomPlugin>(ZoomPlugin.id);
14
- */
15
- export declare function usePlugin<T extends BasePlugin>(pluginId: T['id']): PluginState<T>;
16
- export {};
@@ -1,6 +0,0 @@
1
- import { PDFContextState } from '../context';
2
- /**
3
- * Hook to access the PDF registry.
4
- * @returns The PDF registry or null during initialization
5
- */
6
- export declare function useRegistry(): PDFContextState;
@@ -1,6 +0,0 @@
1
- import { CoreState, StoreState } from '../../lib/index.ts';
2
- /**
3
- * Hook that provides access to the current global store state
4
- * and re-renders the component when the state changes
5
- */
6
- export declare function useStoreState<T = CoreState>(): StoreState<T> | null;
@@ -1,3 +0,0 @@
1
- export * from './context';
2
- export * from './components';
3
- export * from './hooks';
@@ -1,8 +0,0 @@
1
- import { ReactNode } from '../../react/adapter.ts';
2
- import { PluginBatchRegistration, IPlugin } from '../../lib/index.ts';
3
- interface AutoMountProps {
4
- plugins: PluginBatchRegistration<IPlugin<any>, any>[];
5
- children: ReactNode;
6
- }
7
- export declare function AutoMount({ plugins, children }: AutoMountProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,37 +0,0 @@
1
- import { ReactNode } from '../../react/adapter.ts';
2
- import { Logger, PdfEngine } from '@embedpdf/models';
3
- import { PluginRegistry, PluginRegistryConfig, PluginBatchRegistrations } from '../../lib/index.ts';
4
- import { PDFContextState } from '../context';
5
- export type { PluginBatchRegistrations };
6
- interface EmbedPDFProps {
7
- /**
8
- * The PDF engine to use for the PDF viewer.
9
- */
10
- engine: PdfEngine;
11
- /**
12
- * Registry configuration including logger, permissions, and defaults.
13
- */
14
- config?: PluginRegistryConfig;
15
- /**
16
- * @deprecated Use config.logger instead. Will be removed in next major version.
17
- */
18
- logger?: Logger;
19
- /**
20
- * The callback to call when the PDF viewer is initialized.
21
- */
22
- onInitialized?: (registry: PluginRegistry) => Promise<void>;
23
- /**
24
- * The plugins to use for the PDF viewer.
25
- */
26
- plugins: PluginBatchRegistrations;
27
- /**
28
- * The children to render for the PDF viewer.
29
- */
30
- children: ReactNode | ((state: PDFContextState) => ReactNode);
31
- /**
32
- * Whether to auto-mount specific non-visual DOM elements from plugins.
33
- * @default true
34
- */
35
- autoMountDomElements?: boolean;
36
- }
37
- export declare function EmbedPDF({ engine, config, logger, onInitialized, plugins, children, autoMountDomElements, }: EmbedPDFProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './embed-pdf';
@@ -1,12 +0,0 @@
1
- import { CoreState, DocumentState, PluginRegistry } from '../lib/index.ts';
2
- export interface PDFContextState {
3
- registry: PluginRegistry | null;
4
- coreState: CoreState | null;
5
- isInitializing: boolean;
6
- pluginsReady: boolean;
7
- activeDocumentId: string | null;
8
- activeDocument: DocumentState | null;
9
- documents: Record<string, DocumentState>;
10
- documentStates: DocumentState[];
11
- }
12
- export declare const PDFContext: import('react').Context<PDFContextState>;
@@ -1,7 +0,0 @@
1
- export * from './use-capability';
2
- export * from './use-registry';
3
- export * from './use-store-state';
4
- export * from './use-core-state';
5
- export * from './use-plugin';
6
- export * from './use-document-state';
7
- export * from './use-document-permissions';
@@ -1,16 +0,0 @@
1
- import { BasePlugin } from '../../lib/index.ts';
2
- type CapabilityState<T extends BasePlugin> = {
3
- provides: ReturnType<NonNullable<T['provides']>> | null;
4
- isLoading: boolean;
5
- ready: Promise<void>;
6
- };
7
- /**
8
- * Hook to access a plugin's capability.
9
- * @param pluginId The ID of the plugin to access
10
- * @returns The capability provided by the plugin or null during initialization
11
- * @example
12
- * // Get zoom capability
13
- * const zoom = useCapability<ZoomPlugin>(ZoomPlugin.id);
14
- */
15
- export declare function useCapability<T extends BasePlugin>(pluginId: T['id']): CapabilityState<T>;
16
- export {};
@@ -1,8 +0,0 @@
1
- import { CoreState } from '../../lib/index.ts';
2
- /**
3
- * Hook that provides access to the current core state.
4
- *
5
- * Note: This reads from the context which is already subscribed to core state changes
6
- * in the EmbedPDF component, so there's no additional subscription overhead.
7
- */
8
- export declare function useCoreState(): CoreState | null;
@@ -1,35 +0,0 @@
1
- import { PdfPermissionFlag } from '@embedpdf/models';
2
- export interface DocumentPermissions {
3
- /** Effective permission flags after applying overrides */
4
- permissions: number;
5
- /** Raw PDF permission flags (before overrides) */
6
- pdfPermissions: number;
7
- /** Check if a specific permission flag is effectively allowed */
8
- hasPermission: (flag: PdfPermissionFlag) => boolean;
9
- /** Check if all specified flags are effectively allowed */
10
- hasAllPermissions: (...flags: PdfPermissionFlag[]) => boolean;
11
- /** Can print (possibly degraded quality) */
12
- canPrint: boolean;
13
- /** Can modify document contents */
14
- canModifyContents: boolean;
15
- /** Can copy/extract text and graphics */
16
- canCopyContents: boolean;
17
- /** Can add/modify annotations and fill forms */
18
- canModifyAnnotations: boolean;
19
- /** Can fill in existing form fields */
20
- canFillForms: boolean;
21
- /** Can extract for accessibility */
22
- canExtractForAccessibility: boolean;
23
- /** Can assemble document (insert, rotate, delete pages) */
24
- canAssembleDocument: boolean;
25
- /** Can print high quality */
26
- canPrintHighQuality: boolean;
27
- }
28
- /**
29
- * Hook that provides reactive access to a document's effective permission flags.
30
- * Applies layered resolution: per-document override → global override → PDF permission.
31
- *
32
- * @param documentId The ID of the document to check permissions for.
33
- * @returns An object with effective permissions, raw PDF permissions, helper functions, and shorthand booleans.
34
- */
35
- export declare function useDocumentPermissions(documentId: string): DocumentPermissions;
@@ -1,8 +0,0 @@
1
- import { DocumentState } from '../../lib/index.ts';
2
- /**
3
- * Hook that provides reactive access to a specific document's state from the core store.
4
- *
5
- * @param documentId The ID of the document to retrieve.
6
- * @returns The reactive DocumentState object or null if not found.
7
- */
8
- export declare function useDocumentState(documentId: string | null): DocumentState | null;
@@ -1,16 +0,0 @@
1
- import { BasePlugin } from '../../lib/index.ts';
2
- type PluginState<T extends BasePlugin> = {
3
- plugin: T | null;
4
- isLoading: boolean;
5
- ready: Promise<void>;
6
- };
7
- /**
8
- * Hook to access a plugin.
9
- * @param pluginId The ID of the plugin to access
10
- * @returns The plugin or null during initialization
11
- * @example
12
- * // Get zoom plugin
13
- * const zoom = usePlugin<ZoomPlugin>(ZoomPlugin.id);
14
- */
15
- export declare function usePlugin<T extends BasePlugin>(pluginId: T['id']): PluginState<T>;
16
- export {};
@@ -1,6 +0,0 @@
1
- import { PDFContextState } from '../context';
2
- /**
3
- * Hook to access the PDF registry.
4
- * @returns The PDF registry or null during initialization
5
- */
6
- export declare function useRegistry(): PDFContextState;
@@ -1,6 +0,0 @@
1
- import { CoreState, StoreState } from '../../lib/index.ts';
2
- /**
3
- * Hook that provides access to the current global store state
4
- * and re-renders the component when the state changes
5
- */
6
- export declare function useStoreState<T = CoreState>(): StoreState<T> | null;
@@ -1,3 +0,0 @@
1
- export * from './context';
2
- export * from './components';
3
- export * from './hooks';
@@ -1,9 +0,0 @@
1
- import { PluginBatchRegistration, IPlugin } from '../../lib/index.ts';
2
- import { Snippet } from 'svelte';
3
- type Props = {
4
- plugins: PluginBatchRegistration<IPlugin<any>, any>[];
5
- children: Snippet;
6
- };
7
- declare const AutoMount: import('svelte', { with: { "resolution-mode": "import" } }).Component<Props, {}, "">;
8
- type AutoMount = ReturnType<typeof AutoMount>;
9
- export default AutoMount;
@@ -1,40 +0,0 @@
1
- import { Logger, PdfEngine } from '@embedpdf/models';
2
- import { PluginBatchRegistrations, PluginRegistryConfig, PluginRegistry } from '../../lib/index.ts';
3
- import { Snippet } from 'svelte';
4
- import { PDFContextState } from '../hooks';
5
- interface EmbedPDFProps {
6
- /**
7
- * The PDF engine to use for the PDF viewer.
8
- */
9
- engine: PdfEngine;
10
- /**
11
- * Registry configuration including logger, permissions, and defaults.
12
- */
13
- config?: PluginRegistryConfig;
14
- /**
15
- * @deprecated Use config.logger instead. Will be removed in next major version.
16
- */
17
- logger?: Logger;
18
- /**
19
- * The callback to call when the PDF viewer is initialized.
20
- */
21
- onInitialized?: (registry: PluginRegistry) => Promise<void>;
22
- /**
23
- * The plugins to use for the PDF viewer.
24
- */
25
- plugins: PluginBatchRegistrations;
26
- /**
27
- * The children to render for the PDF viewer.
28
- */
29
- children: Snippet<[PDFContextState]>;
30
- /**
31
- * Whether to auto-mount specific non-visual DOM elements from plugins.
32
- * @default true
33
- */
34
- autoMountDomElements?: boolean;
35
- }
36
- declare const EmbedPDF: import('svelte', { with: { "resolution-mode": "import" } }).Component<EmbedPDFProps, {
37
- PluginBatchRegistrations: typeof PluginBatchRegistrations;
38
- }, "">;
39
- type EmbedPDF = ReturnType<typeof EmbedPDF>;
40
- export default EmbedPDF;
@@ -1,10 +0,0 @@
1
- import { Component, Snippet } from 'svelte';
2
- import { default as NestedWrapper } from './NestedWrapper.svelte';
3
- interface Props {
4
- wrappers: Component[];
5
- utilities?: Component[];
6
- children?: Snippet;
7
- }
8
- declare const NestedWrapper: Component<Props, {}, "">;
9
- type NestedWrapper = ReturnType<typeof NestedWrapper>;
10
- export default NestedWrapper;
@@ -1 +0,0 @@
1
- export { default as EmbedPDF } from './EmbedPDF.svelte';
@@ -1,6 +0,0 @@
1
- export * from './use-capability.svelte';
2
- export * from './use-core-state.svelte';
3
- export * from './use-document-state.svelte';
4
- export * from './use-document-permissions.svelte';
5
- export * from './use-plugin.svelte';
6
- export * from './use-registry.svelte';
@@ -1,14 +0,0 @@
1
- import { BasePlugin } from '../../lib/index.ts';
2
- /**
3
- * Hook to access a plugin's capability.
4
- * @param pluginId The ID of the plugin to access
5
- * @returns The capability provided by the plugin or null during initialization
6
- * @example
7
- * // Get zoom capability
8
- * const zoom = useCapability<ZoomPlugin>(ZoomPlugin.id);
9
- */
10
- export declare function useCapability<T extends BasePlugin>(pluginId: T['id']): {
11
- provides: ReturnType<NonNullable<T["provides"]>> | null;
12
- isLoading: boolean;
13
- ready: Promise<void>;
14
- };
@@ -1,9 +0,0 @@
1
- /**
2
- * Hook that provides access to the current core state.
3
- *
4
- * Note: This reads from the context which is already subscribed to core state changes
5
- * in the EmbedPDF component, so there's no additional subscription overhead.
6
- */
7
- export declare function useCoreState(): {
8
- readonly current: import('../../lib/index.ts').CoreState | null;
9
- };
@@ -1,35 +0,0 @@
1
- import { PdfPermissionFlag } from '@embedpdf/models';
2
- export interface DocumentPermissions {
3
- /** Effective permission flags after applying overrides */
4
- permissions: number;
5
- /** Raw PDF permission flags (before overrides) */
6
- pdfPermissions: number;
7
- /** Check if a specific permission flag is effectively allowed */
8
- hasPermission: (flag: PdfPermissionFlag) => boolean;
9
- /** Check if all specified flags are effectively allowed */
10
- hasAllPermissions: (...flags: PdfPermissionFlag[]) => boolean;
11
- /** Can print (possibly degraded quality) */
12
- canPrint: boolean;
13
- /** Can modify document contents */
14
- canModifyContents: boolean;
15
- /** Can copy/extract text and graphics */
16
- canCopyContents: boolean;
17
- /** Can add/modify annotations and fill forms */
18
- canModifyAnnotations: boolean;
19
- /** Can fill in existing form fields */
20
- canFillForms: boolean;
21
- /** Can extract for accessibility */
22
- canExtractForAccessibility: boolean;
23
- /** Can assemble document (insert, rotate, delete pages) */
24
- canAssembleDocument: boolean;
25
- /** Can print high quality */
26
- canPrintHighQuality: boolean;
27
- }
28
- /**
29
- * Hook that provides reactive access to a document's effective permission flags.
30
- * Applies layered resolution: per-document override → global override → PDF permission.
31
- *
32
- * @param getDocumentId Function that returns the document ID
33
- * @returns An object with reactive permission properties.
34
- */
35
- export declare function useDocumentPermissions(getDocumentId: () => string): DocumentPermissions;
@@ -1,9 +0,0 @@
1
- /**
2
- * Hook that provides reactive access to a specific document's state from the core store.
3
- *
4
- * @param getDocumentId Function that returns the document ID
5
- * @returns The reactive DocumentState object or null if not found.
6
- */
7
- export declare function useDocumentState(getDocumentId: () => string | null): {
8
- readonly current: import('../../lib/index.ts').DocumentState | null;
9
- };
@@ -1,14 +0,0 @@
1
- import { BasePlugin } from '../../lib/index.ts';
2
- /**
3
- * Hook to access a plugin.
4
- * @param pluginId The ID of the plugin to access
5
- * @returns The plugin or null during initialization
6
- * @example
7
- * // Get zoom plugin
8
- * const zoom = usePlugin<ZoomPlugin>(ZoomPlugin.id);
9
- */
10
- export declare function usePlugin<T extends BasePlugin>(pluginId: T['id']): {
11
- plugin: T | null;
12
- isLoading: boolean;
13
- ready: Promise<void>;
14
- };
@@ -1,17 +0,0 @@
1
- import { PluginRegistry, CoreState, DocumentState } from '../../lib/index.ts';
2
- export interface PDFContextState {
3
- registry: PluginRegistry | null;
4
- coreState: CoreState | null;
5
- isInitializing: boolean;
6
- pluginsReady: boolean;
7
- activeDocumentId: string | null;
8
- activeDocument: DocumentState | null;
9
- documents: Record<string, DocumentState>;
10
- documentStates: DocumentState[];
11
- }
12
- export declare const pdfContext: PDFContextState;
13
- /**
14
- * Hook to access the PDF registry context.
15
- * @returns The PDF registry or null during initialization
16
- */
17
- export declare const useRegistry: () => PDFContextState;
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("svelte/internal/client"),t=require("@embedpdf/models");require("svelte/internal/disclose-version");const n=require("@embedpdf/core");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const r=i(e),o=r.proxy({registry:null,coreState:null,isInitializing:!0,pluginsReady:!1,activeDocumentId:null,activeDocument:null,documents:{},documentStates:[]}),s=()=>o;function l(e){const{registry:t}=o,n=r.proxy({plugin:null,isLoading:!0,ready:new Promise(()=>{})});if(null===t)return n;const i=t.getPlugin(e);if(!i)throw new Error(`Plugin ${e} not found`);return n.plugin=i,n.isLoading=!1,n.ready=i.ready(),n}function c(){const e=s();return{get current(){return e.coreState}}}t.PdfPermissionFlag.Print,t.PdfPermissionFlag.ModifyContents,t.PdfPermissionFlag.CopyContents,t.PdfPermissionFlag.ModifyAnnotations,t.PdfPermissionFlag.FillForms,t.PdfPermissionFlag.ExtractForAccessibility,t.PdfPermissionFlag.AssembleDocument,t.PdfPermissionFlag.PrintHighQuality;const d=[t.PdfPermissionFlag.Print,t.PdfPermissionFlag.ModifyContents,t.PdfPermissionFlag.CopyContents,t.PdfPermissionFlag.ModifyAnnotations,t.PdfPermissionFlag.FillForms,t.PdfPermissionFlag.ExtractForAccessibility,t.PdfPermissionFlag.AssembleDocument,t.PdfPermissionFlag.PrintHighQuality],u={[t.PdfPermissionFlag.Print]:"print",[t.PdfPermissionFlag.ModifyContents]:"modifyContents",[t.PdfPermissionFlag.CopyContents]:"copyContents",[t.PdfPermissionFlag.ModifyAnnotations]:"modifyAnnotations",[t.PdfPermissionFlag.FillForms]:"fillForms",[t.PdfPermissionFlag.ExtractForAccessibility]:"extractForAccessibility",[t.PdfPermissionFlag.AssembleDocument]:"assembleDocument",[t.PdfPermissionFlag.PrintHighQuality]:"printHighQuality"};function a(e,t){if(!e)return;if(t in e)return e[t];const n=u[t];return n&&n in e?e[n]:void 0}function g(e,n,i){var r;const o=e.documents[n],s=null==o?void 0:o.permissions,l=e.globalPermissions,c=(null==(r=null==o?void 0:o.document)?void 0:r.permissions)??t.PdfPermissionFlag.AllowAll,d=a(null==s?void 0:s.overrides,i);if(void 0!==d)return d;const u=a(null==l?void 0:l.overrides,i);if(void 0!==u)return u;return!((null==s?void 0:s.enforceDocumentPermissions)??(null==l?void 0:l.enforceDocumentPermissions)??!0)||0!==(c&i)}var m=r.from_html("<!> <!>",1);function p(e,t){r.push(t,!0);let n=r.prop(t,"utilities",19,()=>[]);var i=r.comment(),o=r.first_child(i),s=e=>{const i=r.derived(()=>t.wrappers[0]);var o=r.comment(),s=r.first_child(o);r.component(s,()=>r.get(i),(e,i)=>{i(e,{children:(e,i)=>{{let i=r.derived(()=>t.wrappers.slice(1));p(e,{get wrappers(){return r.get(i)},get utilities(){return n()},children:(e,n)=>{var i=r.comment(),o=r.first_child(i);r.snippet(o,()=>t.children??r.noop),r.append(e,i)},$$slots:{default:!0}})}},$$slots:{default:!0}})}),r.append(e,o)},l=e=>{const i=r.derived(()=>t.wrappers[0]);var o=r.comment(),s=r.first_child(o);r.component(s,()=>r.get(i),(e,i)=>{i(e,{children:(e,i)=>{var o=m(),s=r.first_child(o);r.snippet(s,()=>t.children??r.noop);var l=r.sibling(s,2);r.each(l,19,n,(e,t)=>`utility-${t}`,(e,t)=>{var n=r.comment(),i=r.first_child(n);r.component(i,()=>r.get(t),(e,t)=>{t(e,{})}),r.append(e,n)}),r.append(e,o)},$$slots:{default:!0}})}),r.append(e,o)};r.if(o,e=>{t.wrappers.length>1?e(s):e(l,!1)}),r.append(e,i),r.pop()}var f=r.from_html("<!> <!>",1);function P(e,t){r.push(t,!0);let i=r.state(r.proxy([])),o=r.state(r.proxy([]));r.user_effect(()=>{var e;const s=[],l=[];for(const i of t.plugins){const t=i.package;if(n.hasAutoMountElements(t)){const n=(null==(e=t.autoMountElements)?void 0:e.call(t))??[];for(const e of n)"utility"===e.type?s.push(e.component):"wrapper"===e.type&&l.push(e.component)}}r.set(i,s,!0),r.set(o,l,!0)});var s=r.comment(),l=r.first_child(s),c=e=>{p(e,{get wrappers(){return r.get(o)},get utilities(){return r.get(i)},get children(){return t.children}})},d=e=>{var n=f(),o=r.first_child(n);r.snippet(o,()=>t.children??r.noop);var s=r.sibling(o,2);r.each(s,19,()=>r.get(i),(e,t)=>`utility-${t}`,(e,t)=>{var n=r.comment(),i=r.first_child(n);r.component(i,()=>r.get(t),(e,t)=>{t(e,{})}),r.append(e,n)}),r.append(e,n)};r.if(l,e=>{r.get(o).length>0?e(c):e(d,!1)}),r.append(e,s),r.pop()}exports.EmbedPDF=function(e,t){r.push(t,!0);let i=r.prop(t,"autoMountDomElements",3,!0),s=t.onInitialized;r.user_effect(()=>{t.onInitialized&&(s=t.onInitialized)}),r.user_effect(()=>{var e;if(t.engine||t.engine&&t.plugins){const i={...t.config,logger:(null==(e=t.config)?void 0:e.logger)??t.logger},r=new n.PluginRegistry(t.engine,i);r.registerPluginBatch(t.plugins);let l;return(async()=>{if(await r.initialize(),r.isDestroyed())return;const e=r.getStore();o.coreState=e.getState().core;const t=e.subscribe((t,n,i)=>{if(e.isCoreAction(t)&&n.core!==i.core){o.coreState=n.core;const e=n.core.activeDocumentId??null,t=n.core.documents??{},i=n.core.documentOrder??[];o.activeDocumentId=e,o.activeDocument=e&&t[e]?t[e]:null,o.documents=t,o.documentStates=i.map(e=>t[e]).filter(e=>null!=e)}});if(await(null==s?void 0:s(r)),!r.isDestroyed())return r.pluginsReady().then(()=>{r.isDestroyed()||(o.pluginsReady=!0)}),o.registry=r,o.isInitializing=!1,t;t()})().then(e=>{l=e}).catch(console.error),()=>{null==l||l(),r.destroy(),o.registry=null,o.coreState=null,o.isInitializing=!0,o.pluginsReady=!1,o.activeDocumentId=null,o.activeDocument=null,o.documents={},o.documentStates=[]}}});var l=r.comment(),c=r.first_child(l),d=e=>{P(e,{get plugins(){return t.plugins},children:(e,n)=>{var i=r.comment(),s=r.first_child(i);r.snippet(s,()=>t.children,()=>o),r.append(e,i)},$$slots:{default:!0}})},u=e=>{var n=r.comment(),i=r.first_child(n);r.snippet(i,()=>t.children,()=>o),r.append(e,n)};r.if(c,e=>{o.pluginsReady&&i()?e(d):e(u,!1)}),r.append(e,l),r.pop()},exports.pdfContext=o,exports.useCapability=function(e){const t=l(e),n=r.proxy({provides:null,isLoading:!0,ready:new Promise(()=>{})});return r.user_effect(()=>{if(!t.plugin)return n.provides=null,n.isLoading=t.isLoading,void(n.ready=t.ready);if(!t.plugin.provides)throw new Error(`Plugin ${e} does not provide a capability`);n.provides=t.plugin.provides(),n.isLoading=t.isLoading,n.ready=t.ready}),n},exports.useCoreState=c,exports.useDocumentPermissions=function(e){const n=c(),i=r.derived(e),o=r.derived(()=>n.current),s=r.derived(()=>r.get(o)?function(e,t){return d.reduce((n,i)=>g(e,t,i)?n|i:n,0)}(r.get(o),r.get(i)):t.PdfPermissionFlag.AllowAll),l=r.derived(()=>{var e,n,s;return(null==(s=null==(n=null==(e=r.get(o))?void 0:e.documents[r.get(i)])?void 0:n.document)?void 0:s.permissions)??t.PdfPermissionFlag.AllowAll});return{get permissions(){return r.get(s)},get pdfPermissions(){return r.get(l)},hasPermission:e=>!r.get(o)||g(r.get(o),r.get(i),e),hasAllPermissions:(...e)=>e.every(e=>!r.get(o)||g(r.get(o),r.get(i),e)),get canPrint(){return!r.get(o)||g(r.get(o),r.get(i),t.PdfPermissionFlag.Print)},get canModifyContents(){return!r.get(o)||g(r.get(o),r.get(i),t.PdfPermissionFlag.ModifyContents)},get canCopyContents(){return!r.get(o)||g(r.get(o),r.get(i),t.PdfPermissionFlag.CopyContents)},get canModifyAnnotations(){return!r.get(o)||g(r.get(o),r.get(i),t.PdfPermissionFlag.ModifyAnnotations)},get canFillForms(){return!r.get(o)||g(r.get(o),r.get(i),t.PdfPermissionFlag.FillForms)},get canExtractForAccessibility(){return!r.get(o)||g(r.get(o),r.get(i),t.PdfPermissionFlag.ExtractForAccessibility)},get canAssembleDocument(){return!r.get(o)||g(r.get(o),r.get(i),t.PdfPermissionFlag.AssembleDocument)},get canPrintHighQuality(){return!r.get(o)||g(r.get(o),r.get(i),t.PdfPermissionFlag.PrintHighQuality)}}},exports.useDocumentState=function(e){const t=c(),n=r.derived(e),i=r.derived(()=>t.current&&r.get(n)?t.current.documents[r.get(n)]??null:null);return{get current(){return r.get(i)}}},exports.usePlugin=l,exports.useRegistry=s;
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/svelte/hooks/use-registry.svelte.ts","../../src/svelte/hooks/use-plugin.svelte.ts","../../src/svelte/hooks/use-core-state.svelte.ts","../../src/lib/types/permissions.ts","../../src/lib/store/selectors.ts","../../src/svelte/components/NestedWrapper.svelte","../../src/svelte/components/AutoMount.svelte","../../src/svelte/components/EmbedPDF.svelte","../../src/svelte/hooks/use-capability.svelte.ts","../../src/svelte/hooks/use-document-permissions.svelte.ts","../../src/svelte/hooks/use-document-state.svelte.ts"],"sourcesContent":["import type { PluginRegistry, CoreState, DocumentState } from '@embedpdf/core';\n\nexport interface PDFContextState {\n registry: PluginRegistry | null;\n coreState: CoreState | null;\n isInitializing: boolean;\n pluginsReady: boolean;\n\n // Convenience accessors (always safe to use)\n activeDocumentId: string | null;\n activeDocument: DocumentState | null;\n documents: Record<string, DocumentState>;\n documentStates: DocumentState[];\n}\n\nexport const pdfContext = $state<PDFContextState>({\n registry: null,\n coreState: null,\n isInitializing: true,\n pluginsReady: false,\n activeDocumentId: null,\n activeDocument: null,\n documents: {},\n documentStates: [],\n});\n\n/**\n * Hook to access the PDF registry context.\n * @returns The PDF registry or null during initialization\n */\n\nexport const useRegistry = () => pdfContext;\n","import type { BasePlugin } from '@embedpdf/core';\nimport { pdfContext } from './use-registry.svelte.js';\n\n/**\n * Hook to access a plugin.\n * @param pluginId The ID of the plugin to access\n * @returns The plugin or null during initialization\n * @example\n * // Get zoom plugin\n * const zoom = usePlugin<ZoomPlugin>(ZoomPlugin.id);\n */\nexport function usePlugin<T extends BasePlugin>(pluginId: T['id']) {\n const { registry } = pdfContext;\n\n const state = $state({\n plugin: null as T | null,\n isLoading: true,\n ready: new Promise<void>(() => {}),\n });\n\n if (registry === null) {\n return state;\n }\n\n const plugin = registry.getPlugin<T>(pluginId);\n\n if (!plugin) {\n throw new Error(`Plugin ${pluginId} not found`);\n }\n\n state.plugin = plugin;\n state.isLoading = false;\n state.ready = plugin.ready();\n\n return state;\n}\n","import { useRegistry } from './use-registry.svelte';\n\n/**\n * Hook that provides access to the current core state.\n *\n * Note: This reads from the context which is already subscribed to core state changes\n * in the EmbedPDF component, so there's no additional subscription overhead.\n */\nexport function useCoreState() {\n const context = useRegistry();\n\n return {\n get current() {\n return context.coreState;\n },\n };\n}\n","import { PdfPermissionFlag } from '@embedpdf/models';\n\n/**\n * Human-readable permission names for use in configuration.\n */\nexport type PermissionName =\n | 'print'\n | 'modifyContents'\n | 'copyContents'\n | 'modifyAnnotations'\n | 'fillForms'\n | 'extractForAccessibility'\n | 'assembleDocument'\n | 'printHighQuality';\n\n/**\n * Map from human-readable names to PdfPermissionFlag values.\n */\nexport const PERMISSION_NAME_TO_FLAG: Record<PermissionName, PdfPermissionFlag> = {\n print: PdfPermissionFlag.Print,\n modifyContents: PdfPermissionFlag.ModifyContents,\n copyContents: PdfPermissionFlag.CopyContents,\n modifyAnnotations: PdfPermissionFlag.ModifyAnnotations,\n fillForms: PdfPermissionFlag.FillForms,\n extractForAccessibility: PdfPermissionFlag.ExtractForAccessibility,\n assembleDocument: PdfPermissionFlag.AssembleDocument,\n printHighQuality: PdfPermissionFlag.PrintHighQuality,\n};\n\n/**\n * Permission overrides can use either numeric flags or human-readable string names.\n */\nexport type PermissionOverrides = Partial<\n Record<PdfPermissionFlag, boolean> & Record<PermissionName, boolean>\n>;\n\n/**\n * Configuration for overriding document permissions.\n * Can be applied globally (at PluginRegistry level) or per-document (when opening).\n */\nexport interface PermissionConfig {\n /**\n * When true (default): use PDF's permissions as the base, then apply overrides.\n * When false: treat document as having all permissions allowed, then apply overrides.\n */\n enforceDocumentPermissions?: boolean;\n\n /**\n * Explicit per-flag overrides. Supports both numeric flags and string names.\n * - true = force allow (even if PDF denies)\n * - false = force deny (even if PDF allows)\n * - undefined = use base permissions\n *\n * @example\n * // Using string names (recommended)\n * overrides: { print: false, modifyAnnotations: true }\n *\n * @example\n * // Using numeric flags\n * overrides: { [PdfPermissionFlag.Print]: false }\n */\n overrides?: PermissionOverrides;\n}\n\n/**\n * All permission flags for iteration when computing effective permissions.\n */\nexport const ALL_PERMISSION_FLAGS: PdfPermissionFlag[] = [\n PdfPermissionFlag.Print,\n PdfPermissionFlag.ModifyContents,\n PdfPermissionFlag.CopyContents,\n PdfPermissionFlag.ModifyAnnotations,\n PdfPermissionFlag.FillForms,\n PdfPermissionFlag.ExtractForAccessibility,\n PdfPermissionFlag.AssembleDocument,\n PdfPermissionFlag.PrintHighQuality,\n];\n\n/**\n * All permission names for iteration.\n */\nexport const ALL_PERMISSION_NAMES: PermissionName[] = [\n 'print',\n 'modifyContents',\n 'copyContents',\n 'modifyAnnotations',\n 'fillForms',\n 'extractForAccessibility',\n 'assembleDocument',\n 'printHighQuality',\n];\n\n/**\n * Map from PdfPermissionFlag to human-readable name.\n */\nexport const PERMISSION_FLAG_TO_NAME: Record<PdfPermissionFlag, PermissionName> = {\n [PdfPermissionFlag.Print]: 'print',\n [PdfPermissionFlag.ModifyContents]: 'modifyContents',\n [PdfPermissionFlag.CopyContents]: 'copyContents',\n [PdfPermissionFlag.ModifyAnnotations]: 'modifyAnnotations',\n [PdfPermissionFlag.FillForms]: 'fillForms',\n [PdfPermissionFlag.ExtractForAccessibility]: 'extractForAccessibility',\n [PdfPermissionFlag.AssembleDocument]: 'assembleDocument',\n [PdfPermissionFlag.PrintHighQuality]: 'printHighQuality',\n};\n\n/**\n * Helper to get the override value for a permission flag, checking both numeric and string keys.\n */\nexport function getPermissionOverride(\n overrides: PermissionOverrides | undefined,\n flag: PdfPermissionFlag,\n): boolean | undefined {\n if (!overrides) return undefined;\n\n // Check numeric key first\n if (flag in overrides) {\n return (overrides as Record<PdfPermissionFlag, boolean>)[flag];\n }\n\n // Check string key\n const name = PERMISSION_FLAG_TO_NAME[flag];\n if (name && name in overrides) {\n return (overrides as Record<PermissionName, boolean>)[name];\n }\n\n return undefined;\n}\n","import { PdfPermissionFlag } from '@embedpdf/models';\nimport { CoreState, DocumentState } from './initial-state';\nimport { ALL_PERMISSION_FLAGS, getPermissionOverride } from '../types/permissions';\n\n/**\n * Get the active document state\n */\nexport const getActiveDocumentState = (state: CoreState): DocumentState | null => {\n if (!state.activeDocumentId) return null;\n return state.documents[state.activeDocumentId] ?? null;\n};\n\n/**\n * Get document state by ID\n */\nexport const getDocumentState = (state: CoreState, documentId: string): DocumentState | null => {\n return state.documents[documentId] ?? null;\n};\n\n/**\n * Get all document IDs\n */\nexport const getDocumentIds = (state: CoreState): string[] => {\n return Object.keys(state.documents);\n};\n\n/**\n * Check if a document is loaded\n */\nexport const isDocumentLoaded = (state: CoreState, documentId: string): boolean => {\n return !!state.documents[documentId];\n};\n\n/**\n * Get the number of open documents\n */\nexport const getDocumentCount = (state: CoreState): number => {\n return Object.keys(state.documents).length;\n};\n\n// ─────────────────────────────────────────────────────────\n// Permission Selectors\n// ─────────────────────────────────────────────────────────\n\n/**\n * Check if a specific permission flag is effectively allowed for a document.\n * Applies layered resolution: per-document override → global override → enforceDocumentPermissions → PDF permission.\n *\n * @param state - The core state\n * @param documentId - The document ID to check permissions for\n * @param flag - The permission flag to check\n * @returns true if the permission is allowed, false otherwise\n */\nexport function getEffectivePermission(\n state: CoreState,\n documentId: string,\n flag: PdfPermissionFlag,\n): boolean {\n const docState = state.documents[documentId];\n const docConfig = docState?.permissions;\n const globalConfig = state.globalPermissions;\n const pdfPermissions = docState?.document?.permissions ?? PdfPermissionFlag.AllowAll;\n\n // 1. Per-document override wins (supports both numeric and string keys)\n const docOverride = getPermissionOverride(docConfig?.overrides, flag);\n if (docOverride !== undefined) {\n return docOverride;\n }\n\n // 2. Global override (supports both numeric and string keys)\n const globalOverride = getPermissionOverride(globalConfig?.overrides, flag);\n if (globalOverride !== undefined) {\n return globalOverride;\n }\n\n // 3. Check enforce setting (per-doc takes precedence over global)\n const enforce =\n docConfig?.enforceDocumentPermissions ?? globalConfig?.enforceDocumentPermissions ?? true;\n\n if (!enforce) return true; // Not enforcing = allow all\n\n // 4. Use PDF permission\n return (pdfPermissions & flag) !== 0;\n}\n\n/**\n * Get all effective permissions as a bitmask for a document.\n * Combines all individual permission checks into a single bitmask.\n *\n * @param state - The core state\n * @param documentId - The document ID to get permissions for\n * @returns A bitmask of all effective permissions\n */\nexport function getEffectivePermissions(state: CoreState, documentId: string): number {\n return ALL_PERMISSION_FLAGS.reduce((acc, flag) => {\n return getEffectivePermission(state, documentId, flag) ? acc | flag : acc;\n }, 0);\n}\n","<script lang=\"ts\">\n import { type Component, type Snippet } from 'svelte';\n import NestedWrapper from './NestedWrapper.svelte';\n\n interface Props {\n wrappers: Component[];\n utilities?: Component[];\n children?: Snippet;\n }\n\n let { wrappers, utilities = [], children }: Props = $props();\n</script>\n\n{#if wrappers.length > 1}\n {@const Wrapper = wrappers[0]}\n <Wrapper>\n <NestedWrapper wrappers={wrappers.slice(1)} {utilities}>\n {@render children?.()}\n </NestedWrapper>\n </Wrapper>\n{:else}\n {@const Wrapper = wrappers[0]}\n <Wrapper>\n {@render children?.()}\n <!-- Render utilities inside the innermost wrapper -->\n {#each utilities as Utility, i (`utility-${i}`)}\n <Utility />\n {/each}\n </Wrapper>\n{/if}\n","<script lang=\"ts\">\n import { hasAutoMountElements, type PluginBatchRegistration, type IPlugin } from '@embedpdf/core';\n import NestedWrapper from './NestedWrapper.svelte';\n import type { Snippet } from 'svelte';\n\n type Props = {\n plugins: PluginBatchRegistration<IPlugin<any>, any>[];\n children: Snippet;\n };\n\n let { plugins, children }: Props = $props();\n let utilities: any[] = $state([]);\n let wrappers: any[] = $state([]);\n\n // recompute when plugins change\n $effect(() => {\n const nextUtilities: any[] = [];\n const nextWrappers: any[] = [];\n\n for (const reg of plugins) {\n const pkg = reg.package;\n if (hasAutoMountElements(pkg)) {\n const elements = pkg.autoMountElements?.() ?? [];\n for (const element of elements) {\n if (element.type === 'utility') {\n nextUtilities.push(element.component);\n } else if (element.type === 'wrapper') {\n nextWrappers.push(element.component);\n }\n }\n }\n }\n\n utilities = nextUtilities;\n wrappers = nextWrappers;\n });\n</script>\n\n{#if wrappers.length > 0}\n <!-- wrap slot content and utilities inside all wrappers -->\n <NestedWrapper {wrappers} {utilities} {children} />\n{:else}\n <!-- No wrappers - render children and utilities directly -->\n {@render children?.()}\n {#each utilities as Utility, i (`utility-${i}`)}\n <Utility />\n {/each}\n{/if}\n","<script lang=\"ts\">\n import type { Logger, PdfEngine } from '@embedpdf/models';\n import {\n type IPlugin,\n type PluginBatchRegistrations,\n type PluginRegistryConfig,\n PluginRegistry,\n } from '@embedpdf/core';\n import { type Snippet } from 'svelte';\n import AutoMount from './AutoMount.svelte';\n import { pdfContext, type PDFContextState } from '../hooks';\n\n export type { PluginBatchRegistrations };\n\n interface EmbedPDFProps {\n /**\n * The PDF engine to use for the PDF viewer.\n */\n engine: PdfEngine;\n /**\n * Registry configuration including logger, permissions, and defaults.\n */\n config?: PluginRegistryConfig;\n /**\n * @deprecated Use config.logger instead. Will be removed in next major version.\n */\n logger?: Logger;\n /**\n * The callback to call when the PDF viewer is initialized.\n */\n onInitialized?: (registry: PluginRegistry) => Promise<void>;\n /**\n * The plugins to use for the PDF viewer.\n */\n plugins: PluginBatchRegistrations;\n /**\n * The children to render for the PDF viewer.\n */\n children: Snippet<[PDFContextState]>;\n /**\n * Whether to auto-mount specific non-visual DOM elements from plugins.\n * @default true\n */\n autoMountDomElements?: boolean;\n }\n\n let {\n engine,\n config,\n logger,\n onInitialized,\n plugins,\n children,\n autoMountDomElements = true,\n }: EmbedPDFProps = $props();\n\n let latestInit = onInitialized;\n\n $effect(() => {\n if (onInitialized) {\n latestInit = onInitialized;\n }\n });\n\n $effect(() => {\n if (engine || (engine && plugins)) {\n // Merge deprecated logger prop into config (config.logger takes precedence)\n const finalConfig: PluginRegistryConfig = {\n ...config,\n logger: config?.logger ?? logger,\n };\n const reg = new PluginRegistry(engine, finalConfig);\n reg.registerPluginBatch(plugins);\n\n const initialize = async () => {\n await reg.initialize();\n\n // if the registry is destroyed, don't do anything\n if (reg.isDestroyed()) {\n return;\n }\n\n const store = reg.getStore();\n pdfContext.coreState = store.getState().core;\n\n const unsubscribe = store.subscribe((action, newState, oldState) => {\n // Only update if it's a core action and the core state changed\n if (store.isCoreAction(action) && newState.core !== oldState.core) {\n pdfContext.coreState = newState.core;\n\n // Update convenience accessors\n const activeDocumentId = newState.core.activeDocumentId ?? null;\n const documents = newState.core.documents ?? {};\n const documentOrder = newState.core.documentOrder ?? [];\n\n pdfContext.activeDocumentId = activeDocumentId;\n pdfContext.activeDocument =\n activeDocumentId && documents[activeDocumentId] ? documents[activeDocumentId] : null;\n pdfContext.documents = documents;\n pdfContext.documentStates = documentOrder\n .map((docId) => documents[docId])\n .filter(\n (doc): doc is import('@embedpdf/core').DocumentState =>\n doc !== null && doc !== undefined,\n );\n }\n });\n\n /* always call the *latest* callback */\n await latestInit?.(reg);\n\n // if the registry is destroyed, don't do anything\n if (reg.isDestroyed()) {\n unsubscribe();\n return;\n }\n\n reg.pluginsReady().then(() => {\n if (!reg.isDestroyed()) {\n pdfContext.pluginsReady = true;\n }\n });\n\n // Provide the registry to children via context\n pdfContext.registry = reg;\n pdfContext.isInitializing = false;\n\n return unsubscribe;\n };\n\n let cleanup: (() => void) | undefined;\n initialize()\n .then((unsub) => {\n cleanup = unsub;\n })\n .catch(console.error);\n\n return () => {\n cleanup?.();\n reg.destroy();\n pdfContext.registry = null;\n pdfContext.coreState = null;\n pdfContext.isInitializing = true;\n pdfContext.pluginsReady = false;\n pdfContext.activeDocumentId = null;\n pdfContext.activeDocument = null;\n pdfContext.documents = {};\n pdfContext.documentStates = [];\n };\n }\n });\n</script>\n\n{#if pdfContext.pluginsReady && autoMountDomElements}\n <AutoMount {plugins}>{@render children(pdfContext)}</AutoMount>\n{:else}\n {@render children(pdfContext)}\n{/if}\n","import type { BasePlugin } from '@embedpdf/core';\nimport { usePlugin } from './use-plugin.svelte.js';\n\n/**\n * Hook to access a plugin's capability.\n * @param pluginId The ID of the plugin to access\n * @returns The capability provided by the plugin or null during initialization\n * @example\n * // Get zoom capability\n * const zoom = useCapability<ZoomPlugin>(ZoomPlugin.id);\n */\nexport function useCapability<T extends BasePlugin>(pluginId: T['id']) {\n const p = usePlugin<T>(pluginId);\n\n const state = $state({\n provides: null as ReturnType<NonNullable<T['provides']>> | null,\n isLoading: true,\n ready: new Promise<void>(() => {}),\n });\n\n // Use $effect to reactively update when plugin loads\n $effect(() => {\n if (!p.plugin) {\n state.provides = null;\n state.isLoading = p.isLoading;\n state.ready = p.ready;\n return;\n }\n\n if (!p.plugin.provides) {\n throw new Error(`Plugin ${pluginId} does not provide a capability`);\n }\n\n state.provides = p.plugin.provides() as ReturnType<NonNullable<T['provides']>>;\n state.isLoading = p.isLoading;\n state.ready = p.ready;\n });\n\n return state;\n}\n","import { PdfPermissionFlag } from '@embedpdf/models';\nimport { useCoreState } from './use-core-state.svelte';\nimport { getEffectivePermission, getEffectivePermissions } from '../../lib/store/selectors';\n\nexport interface DocumentPermissions {\n /** Effective permission flags after applying overrides */\n permissions: number;\n /** Raw PDF permission flags (before overrides) */\n pdfPermissions: number;\n /** Check if a specific permission flag is effectively allowed */\n hasPermission: (flag: PdfPermissionFlag) => boolean;\n /** Check if all specified flags are effectively allowed */\n hasAllPermissions: (...flags: PdfPermissionFlag[]) => boolean;\n\n // Shorthand booleans for all permission flags (using effective permissions):\n /** Can print (possibly degraded quality) */\n canPrint: boolean;\n /** Can modify document contents */\n canModifyContents: boolean;\n /** Can copy/extract text and graphics */\n canCopyContents: boolean;\n /** Can add/modify annotations and fill forms */\n canModifyAnnotations: boolean;\n /** Can fill in existing form fields */\n canFillForms: boolean;\n /** Can extract for accessibility */\n canExtractForAccessibility: boolean;\n /** Can assemble document (insert, rotate, delete pages) */\n canAssembleDocument: boolean;\n /** Can print high quality */\n canPrintHighQuality: boolean;\n}\n\n/**\n * Hook that provides reactive access to a document's effective permission flags.\n * Applies layered resolution: per-document override → global override → PDF permission.\n *\n * @param getDocumentId Function that returns the document ID\n * @returns An object with reactive permission properties.\n */\nexport function useDocumentPermissions(getDocumentId: () => string): DocumentPermissions {\n const coreStateRef = useCoreState();\n\n const documentId = $derived(getDocumentId());\n const coreState = $derived(coreStateRef.current);\n\n const effectivePermissions = $derived(\n coreState ? getEffectivePermissions(coreState, documentId) : PdfPermissionFlag.AllowAll,\n );\n\n const pdfPermissions = $derived(\n coreState?.documents[documentId]?.document?.permissions ?? PdfPermissionFlag.AllowAll,\n );\n\n const hasPermission = (flag: PdfPermissionFlag) =>\n coreState ? getEffectivePermission(coreState, documentId, flag) : true;\n\n const hasAllPermissions = (...flags: PdfPermissionFlag[]) =>\n flags.every((flag) => (coreState ? getEffectivePermission(coreState, documentId, flag) : true));\n\n return {\n get permissions() {\n return effectivePermissions;\n },\n get pdfPermissions() {\n return pdfPermissions;\n },\n hasPermission,\n hasAllPermissions,\n get canPrint() {\n return coreState\n ? getEffectivePermission(coreState, documentId, PdfPermissionFlag.Print)\n : true;\n },\n get canModifyContents() {\n return coreState\n ? getEffectivePermission(coreState, documentId, PdfPermissionFlag.ModifyContents)\n : true;\n },\n get canCopyContents() {\n return coreState\n ? getEffectivePermission(coreState, documentId, PdfPermissionFlag.CopyContents)\n : true;\n },\n get canModifyAnnotations() {\n return coreState\n ? getEffectivePermission(coreState, documentId, PdfPermissionFlag.ModifyAnnotations)\n : true;\n },\n get canFillForms() {\n return coreState\n ? getEffectivePermission(coreState, documentId, PdfPermissionFlag.FillForms)\n : true;\n },\n get canExtractForAccessibility() {\n return coreState\n ? getEffectivePermission(coreState, documentId, PdfPermissionFlag.ExtractForAccessibility)\n : true;\n },\n get canAssembleDocument() {\n return coreState\n ? getEffectivePermission(coreState, documentId, PdfPermissionFlag.AssembleDocument)\n : true;\n },\n get canPrintHighQuality() {\n return coreState\n ? getEffectivePermission(coreState, documentId, PdfPermissionFlag.PrintHighQuality)\n : true;\n },\n };\n}\n","import { useCoreState } from './use-core-state.svelte';\n\n/**\n * Hook that provides reactive access to a specific document's state from the core store.\n *\n * @param getDocumentId Function that returns the document ID\n * @returns The reactive DocumentState object or null if not found.\n */\nexport function useDocumentState(getDocumentId: () => string | null) {\n const coreStateRef = useCoreState();\n\n // Reactive documentId\n const documentId = $derived(getDocumentId());\n\n const documentState = $derived(\n coreStateRef.current && documentId\n ? (coreStateRef.current.documents[documentId] ?? null)\n : null,\n );\n\n return {\n get current() {\n return documentState;\n },\n };\n}\n"],"names":["pdfContext","registry","coreState","isInitializing","pluginsReady","activeDocumentId","activeDocument","documents","documentStates","useRegistry","usePlugin","pluginId","state","plugin","isLoading","ready","Promise","getPlugin","Error","useCoreState","context","current","PdfPermissionFlag","Print","ModifyContents","CopyContents","ModifyAnnotations","FillForms","ExtractForAccessibility","AssembleDocument","PrintHighQuality","ALL_PERMISSION_FLAGS","PERMISSION_FLAG_TO_NAME","getPermissionOverride","overrides","flag","name","getEffectivePermission","documentId","docState","docConfig","permissions","globalConfig","globalPermissions","pdfPermissions","_a","document","AllowAll","docOverride","globalOverride","enforceDocumentPermissions","utilities","$","prop","$$props","Wrapper","Wrapper_1","$$anchor","$0","derived","wrappers","slice","NestedWrapper","Wrapper_2","each","node_5","Utility","i","Utility_1","length","consequent","$$render","alternate","proxy","user_effect","nextUtilities","nextWrappers","reg","plugins","pkg","package","hasAutoMountElements","elements","autoMountElements","call","element","type","push","component","set","node_2","get","autoMountDomElements","latestInit","onInitialized","engine","finalConfig","logger","PluginRegistry","registerPluginBatch","cleanup","async","initialize","isDestroyed","store","getStore","getState","core","unsubscribe","subscribe","action","newState","oldState","isCoreAction","documentOrder","map","docId","filter","doc","then","unsub","catch","console","error","destroy","AutoMount","p","provides","getDocumentId","coreStateRef","effectivePermissions","reduce","acc","getEffectivePermissions","hasPermission","hasAllPermissions","flags","every","canPrint","canModifyContents","canCopyContents","canModifyAnnotations","canFillForms","canExtractForAccessibility","canAssembleDocument","canPrintHighQuality","documentState"],"mappings":"8fAeaA,WACXC,SAAU,KACVC,UAAW,KACXC,gBAAgB,EAChBC,cAAc,EACdC,iBAAkB,KAClBC,eAAgB,KAChBC,aACAC,oBAQWC,MAAoBT,WCpBjBU,EAAgCC,GACtC,MAAAV,SAAAA,GAAaD,EAEfY,WACJC,OAAQ,KACRC,WAAW,EACXC,MAAA,IAAWC,QAAA,aAGI,OAAbf,SACKW,EAGH,MAAAC,EAASZ,EAASgB,UAAaN,GAEhC,IAAAE,EACO,MAAA,IAAAK,gBAAgBP,sBAG5BC,EAAMC,OAASA,EACfD,EAAME,WAAY,EAClBF,EAAMG,MAAQF,EAAOE,QAEdH,CACT,CC3BgB,SAAAO,IACR,MAAAC,EAAUX,WAGV,WAAAY,GACK,OAAAD,EAAQlB,SACjB,EAEJ,CCGSoB,EAAAA,kBAAkBC,MACTD,EAAAA,kBAAkBE,eACpBF,EAAAA,kBAAkBG,aACbH,EAAAA,kBAAkBI,kBAC1BJ,EAAAA,kBAAkBK,UACJL,EAAAA,kBAAkBM,wBACzBN,EAAAA,kBAAkBO,iBAClBP,EAAAA,kBAAkBQ,iBAyC/B,MAAMC,EAA4C,CACvDT,EAAAA,kBAAkBC,MAClBD,EAAAA,kBAAkBE,eAClBF,EAAAA,kBAAkBG,aAClBH,EAAAA,kBAAkBI,kBAClBJ,EAAAA,kBAAkBK,UAClBL,EAAAA,kBAAk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