@embedpdf/viewer-chrome 3.0.0-next.11 → 3.0.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/dist/chrome.cjs +6 -0
- package/dist/chrome.cjs.map +1 -1
- package/dist/chrome.js +6 -0
- package/dist/chrome.js.map +1 -1
- package/dist/commands.cjs +62 -2
- package/dist/commands.cjs.map +1 -1
- package/dist/commands.js +62 -2
- package/dist/commands.js.map +1 -1
- package/dist/{es-B7b8KjR3.cjs → es-DYwzfxyt.cjs} +87 -3
- package/dist/es-DYwzfxyt.cjs.map +1 -0
- package/dist/{es-aQlZ3hcL.js → es-sN6uqBgD.js} +87 -3
- package/dist/es-sN6uqBgD.js.map +1 -0
- package/dist/index.cjs +1689 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +91 -18
- package/dist/index.d.ts +91 -18
- package/dist/index.js +1645 -40
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
- package/dist/es-B7b8KjR3.cjs.map +0 -1
- package/dist/es-aQlZ3hcL.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,19 +1,95 @@
|
|
|
1
1
|
import { defaultChrome } from "./chrome.cjs";
|
|
2
2
|
import { defaultCommands } from "./commands.cjs";
|
|
3
|
-
import { AddItemSpec, BarChild, BarGroup, BarItem, BarSchema, BarSections, ChromeHelpers, ChromeHelpers as ChromeHelpers$1, ChromeSchema, ChromeSchema as ChromeSchema$1, CustomItem, Importance, MenuSchema, MenuSection, Variant, addItem, chromeHelpers, custom, defineChrome, group, item, removeItems, replaceItem, validateChrome } from "@embedpdf/react/toolbar";
|
|
3
|
+
import { AddItemSpec, BarChild, BarGroup, BarItem, BarSchema, BarSchema as BarSchema$1, BarSections, ChromeHelpers, ChromeHelpers as ChromeHelpers$1, ChromeSchema, ChromeSchema as ChromeSchema$1, CustomItem, Importance, MenuSchema, MenuSchema as MenuSchema$1, MenuSection, Variant, addItem, chromeHelpers, custom, defineChrome, group, item, removeItems, replaceItem, validateChrome } from "@embedpdf/react/toolbar";
|
|
4
4
|
import { CommandDef, CommandDef as CommandDef$1, CommandsToken, ResolvedCommand, ResolvedCommand as ResolvedCommand$1 } from "@embedpdf/react/commands";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
import { CapabilityToken, CapabilityToken as CapabilityToken$1, DocInfo, DocumentsCapability, DocumentsCapability as DocumentsCapability$1, DocumentsToken, Engine, Engine as Engine$1, EngineFactory, EngineFactory as EngineFactory$1, InitialDocument, InitialDocument as InitialDocument$1, Kernel, Unsubscribe, Unsubscribe as Unsubscribe$1 } from "@embedpdf/react/runtime";
|
|
7
7
|
import { I18nToken, TranslationDictionary } from "@embedpdf/react/i18n";
|
|
8
|
+
import { Mark, SignFieldInput, SignatureMode, SignatureMode as SignatureMode$1, SignatureToken, SignerPort, SignerPort as SignerPort$1, TrustPort, TrustPort as TrustPort$1, createTestSigner, indexedDbKeyStore, memoryKeyStore, personalSigner, remoteSigner, webCryptoSigner } from "@embedpdf/react/signature";
|
|
8
9
|
import { AnnotationToken } from "@embedpdf/react/annotation";
|
|
9
10
|
import { StageToken } from "@embedpdf/react/stage";
|
|
10
11
|
import { SearchToken } from "@embedpdf/react/search";
|
|
11
12
|
import { SelectionToken } from "@embedpdf/react/selection";
|
|
12
13
|
import { FormToken } from "@embedpdf/react/form";
|
|
13
14
|
import { RedactionToken } from "@embedpdf/react/redaction";
|
|
15
|
+
import { StampToken } from "@embedpdf/react/stamp";
|
|
14
16
|
import { InteractionToken } from "@embedpdf/react/interaction";
|
|
15
17
|
import { ShellToken } from "@embedpdf/react/shell";
|
|
16
18
|
import { MetadataToken } from "@embedpdf/react/metadata";
|
|
19
|
+
//#region src/ui/icons.d.ts
|
|
20
|
+
type PathSpec = string | {
|
|
21
|
+
d: string;
|
|
22
|
+
/** Fill paint: `true` = currentColor (a filled glyph part); a slot
|
|
23
|
+
* name = that accent color (nothing when the accent is absent). */
|
|
24
|
+
fill?: boolean | 'primary' | 'secondary';
|
|
25
|
+
/** Stroke paint: a slot name = that accent color (currentColor when
|
|
26
|
+
* the accent is absent). */
|
|
27
|
+
stroke?: 'primary' | 'secondary';
|
|
28
|
+
};
|
|
29
|
+
/** A registrable icon: 24×24 stroke path data (Tabler/Lucide-style), exactly
|
|
30
|
+
* the shape of the built-in set — user icons are not a lesser kind. */
|
|
31
|
+
type IconDef = readonly PathSpec[];
|
|
32
|
+
declare const ICON_PATHS: Record<string, readonly PathSpec[]>;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/config-context.d.ts
|
|
35
|
+
interface StampsCustomization {
|
|
36
|
+
/** `false`: no built-in library. A string: URL template with `{locale}`. */
|
|
37
|
+
readonly defaultLibrary?: false | string;
|
|
38
|
+
/** Library kinds the stamps sidebar lists. Default `['stamps']`. */
|
|
39
|
+
readonly sidebar?: ReadonlyArray<string>;
|
|
40
|
+
/** Quick marks in the Insert toolbar: asset ids (`library:name`) from any
|
|
41
|
+
* library, or one library's whole set. Default none. */
|
|
42
|
+
readonly toolbar?: ReadonlyArray<string> | {
|
|
43
|
+
readonly library: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
interface SignaturesCustomization {
|
|
47
|
+
/** Which marks a person keeps. Default both. */
|
|
48
|
+
readonly kinds?: ReadonlyArray<'signature' | 'initials'>;
|
|
49
|
+
/** `'one'`: a single person per browser (no "new signature" once one exists). Default `'many'`. */
|
|
50
|
+
readonly libraries?: 'one' | 'many';
|
|
51
|
+
/** What placing a mark on a field does; default `sign` with a signer, else `visual`. */
|
|
52
|
+
readonly mode?: SignatureMode$1;
|
|
53
|
+
/** The key holder — `webCryptoSigner`, `remoteSigner`, `personalSigner`, or a thunk resolving one per signing. */
|
|
54
|
+
readonly signer?: SignerPort$1 | (() => Promise<SignerPort$1>);
|
|
55
|
+
/** Trust anchors for validation; none → verdicts top out at "valid, signer unknown". */
|
|
56
|
+
readonly trust?: TrustPort$1;
|
|
57
|
+
/** Offer a certification (first signature, DocMDP) in the sign dialog. Default false. */
|
|
58
|
+
readonly allowCertify?: boolean;
|
|
59
|
+
/** Script faces for typed marks: registered on the viewer's engine on first use. */
|
|
60
|
+
readonly fonts?: ReadonlyArray<{
|
|
61
|
+
readonly key: string;
|
|
62
|
+
readonly url: string;
|
|
63
|
+
readonly label: string;
|
|
64
|
+
}>;
|
|
65
|
+
}
|
|
66
|
+
/** A font for free-text annotations beyond the standard 14. */
|
|
67
|
+
interface AnnotationFontSpec {
|
|
68
|
+
/** The stable id a free-text `fontFamily` carries — the engine key AND the
|
|
69
|
+
* CSS family the live editor renders with. Not one of the 14 standard names. */
|
|
70
|
+
readonly key: string;
|
|
71
|
+
/** Where the TTF/OTF bytes come from (same-origin or CORS-enabled). */
|
|
72
|
+
readonly url: string;
|
|
73
|
+
/** The picker's label. */
|
|
74
|
+
readonly label: string;
|
|
75
|
+
/** Family / style refinements for fallback matching; inferred from the file
|
|
76
|
+
* when omitted. */
|
|
77
|
+
readonly familyName?: string;
|
|
78
|
+
readonly weight?: number;
|
|
79
|
+
readonly italic?: boolean;
|
|
80
|
+
}
|
|
81
|
+
interface AnnotationsCustomization {
|
|
82
|
+
/**
|
|
83
|
+
* Fonts the free-text style panel offers beyond the standard 14. Each is
|
|
84
|
+
* fetched once when the viewer mounts, registered on the viewer's engine
|
|
85
|
+
* under its `key`, and mounted as a `@font-face` of the same name — so the
|
|
86
|
+
* DOM editor shows the face the appearance stream will bake. A font whose
|
|
87
|
+
* URL fails is skipped with a console warning. On the cloud engine (no
|
|
88
|
+
* `engine.fonts`) they are not offered: fonts there are a server policy.
|
|
89
|
+
*/
|
|
90
|
+
readonly fonts?: ReadonlyArray<AnnotationFontSpec>;
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
17
93
|
//#region src/handle.d.ts
|
|
18
94
|
/** `get`/`tryGet` bound to one document (see {@link ViewerHandle.forDocument}). */
|
|
19
95
|
interface ScopedViewerHandle {
|
|
@@ -41,21 +117,6 @@ interface ViewerHandle extends ScopedViewerHandle {
|
|
|
41
117
|
}
|
|
42
118
|
declare function createViewerHandle(kernel: Kernel): ViewerHandle;
|
|
43
119
|
//#endregion
|
|
44
|
-
//#region src/ui/icons.d.ts
|
|
45
|
-
type PathSpec = string | {
|
|
46
|
-
d: string;
|
|
47
|
-
/** Fill paint: `true` = currentColor (a filled glyph part); a slot
|
|
48
|
-
* name = that accent color (nothing when the accent is absent). */
|
|
49
|
-
fill?: boolean | 'primary' | 'secondary';
|
|
50
|
-
/** Stroke paint: a slot name = that accent color (currentColor when
|
|
51
|
-
* the accent is absent). */
|
|
52
|
-
stroke?: 'primary' | 'secondary';
|
|
53
|
-
};
|
|
54
|
-
/** A registrable icon: 24×24 stroke path data (Tabler/Lucide-style), exactly
|
|
55
|
-
* the shape of the built-in set — user icons are not a lesser kind. */
|
|
56
|
-
type IconDef = readonly PathSpec[];
|
|
57
|
-
declare const ICON_PATHS: Record<string, readonly PathSpec[]>;
|
|
58
|
-
//#endregion
|
|
59
120
|
//#region src/ui/theme.d.ts
|
|
60
121
|
type ThemeMode = 'light' | 'dark';
|
|
61
122
|
type ThemePreference = ThemeMode | 'system';
|
|
@@ -80,6 +141,18 @@ interface ViewerCustomization {
|
|
|
80
141
|
/** The structure — a value you OWN: the default (pass nothing), a transform
|
|
81
142
|
* of it, or your own schema. Never merged. */
|
|
82
143
|
chrome?: ChromeSchema$1 | ((base: ChromeSchema$1, helpers: ChromeHelpers$1) => ChromeSchema$1);
|
|
144
|
+
/** The stamps sidebar's built-in library. `false`: none (air-gapped, no
|
|
145
|
+
* request). A string: a URL template with a `{locale}` slot for a
|
|
146
|
+
* self-hosted copy of `@embedpdf/default-stamps`. Default: the copy that
|
|
147
|
+
* ships with the viewer, as a lazy chunk of your own build — no CDN. */
|
|
148
|
+
stamps?: StampsCustomization;
|
|
149
|
+
/** Digital signatures: the signer, trust anchors, the mode (sign / visual /
|
|
150
|
+
* ask), which marks a person keeps, and script faces for typed marks. With
|
|
151
|
+
* no signer, a mark placed on a field is drawn in without sealing. */
|
|
152
|
+
signatures?: SignaturesCustomization;
|
|
153
|
+
/** Annotations: fonts the free-text style panel offers beyond the standard
|
|
154
|
+
* 14 — fetched, registered on the engine and mounted for the live editor. */
|
|
155
|
+
annotations?: AnnotationsCustomization;
|
|
83
156
|
/** Light/dark preference (string shorthand), or the full theme config with
|
|
84
157
|
* `--ep-*` token overrides. Tokens are applied by the DELIVERY (the custom
|
|
85
158
|
* element adopts them into its shadow root); direct consumers of this
|
|
@@ -115,7 +188,7 @@ interface FullViewerProps extends ViewerCustomization {
|
|
|
115
188
|
* scoped calls simply await their document. */
|
|
116
189
|
onViewer?: (viewer: ViewerHandle) => void;
|
|
117
190
|
}
|
|
118
|
-
declare function FullViewer({ engine, initialDocuments, fallback, commands, icons, strings, locale, disabledCategories, chrome, theme, themeTarget, onViewer }: FullViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
191
|
+
declare function FullViewer({ engine, initialDocuments, fallback, commands, icons, strings, locale, disabledCategories, chrome, stamps, signatures, annotations, theme, themeTarget, onViewer }: FullViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
119
192
|
//#endregion
|
|
120
|
-
export { type AddItemSpec, AnnotationToken, type BarChild, type BarGroup, type BarItem, type BarSchema, type BarSections, type CapabilityToken, type ChromeHelpers, type ChromeSchema, type CommandDef, CommandsToken, type CustomItem, type DocInfo, type DocumentsCapability, DocumentsToken, type Engine, type EngineFactory, FormToken, FullViewer, type FullViewerProps, I18nToken, type IconDef, type Importance, type InitialDocument, InteractionToken, type MenuSchema, type MenuSection, MetadataToken, type PathSpec, RedactionToken, type ResolvedCommand, type ScopedViewerHandle, SearchToken, SelectionToken, ShellToken, StageToken, type ThemeConfig, type ThemeMode, type ThemePreference, type ThemeTokens, type Unsubscribe, type Variant, type ViewerCustomization, type ViewerHandle, addItem, chromeHelpers, createViewerHandle, custom, defaultChrome, defaultCommands, ICON_PATHS as defaultIcons, defineChrome, group, item, removeItems, replaceItem, themeConfigOf, validateChrome };
|
|
193
|
+
export { type AddItemSpec, type AnnotationFontSpec, AnnotationToken, type AnnotationsCustomization, type BarChild, type BarGroup, type BarItem, type BarSchema, type BarSections, type CapabilityToken, type ChromeHelpers, type ChromeSchema, type CommandDef, CommandsToken, type CustomItem, type DocInfo, type DocumentsCapability, DocumentsToken, type Engine, type EngineFactory, FormToken, FullViewer, type FullViewerProps, I18nToken, type IconDef, type Importance, type InitialDocument, InteractionToken, type Mark, type MenuSchema, type MenuSection, MetadataToken, type PathSpec, RedactionToken, type ResolvedCommand, type ScopedViewerHandle, SearchToken, SelectionToken, ShellToken, type SignFieldInput, type SignatureMode, SignatureToken, type SignaturesCustomization, type SignerPort, StageToken, StampToken, type StampsCustomization, type ThemeConfig, type ThemeMode, type ThemePreference, type ThemeTokens, type TrustPort, type Unsubscribe, type Variant, type ViewerCustomization, type ViewerHandle, addItem, chromeHelpers, createTestSigner, createViewerHandle, custom, defaultChrome, defaultCommands, ICON_PATHS as defaultIcons, defineChrome, group, indexedDbKeyStore, item, memoryKeyStore, personalSigner, remoteSigner, removeItems, replaceItem, themeConfigOf, validateChrome, webCryptoSigner };
|
|
121
194
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -6,14 +6,90 @@ import { StageToken } from "@embedpdf/react/stage";
|
|
|
6
6
|
import { InteractionToken } from "@embedpdf/react/interaction";
|
|
7
7
|
import { SelectionToken } from "@embedpdf/react/selection";
|
|
8
8
|
import { AnnotationToken } from "@embedpdf/react/annotation";
|
|
9
|
+
import { StampToken } from "@embedpdf/react/stamp";
|
|
9
10
|
import { RedactionToken } from "@embedpdf/react/redaction";
|
|
10
11
|
import { FormToken } from "@embedpdf/react/form";
|
|
12
|
+
import { Mark, SignFieldInput, SignatureMode, SignatureMode as SignatureMode$1, SignatureToken, SignerPort, SignerPort as SignerPort$1, TrustPort, TrustPort as TrustPort$1, createTestSigner, indexedDbKeyStore, memoryKeyStore, personalSigner, remoteSigner, webCryptoSigner } from "@embedpdf/react/signature";
|
|
11
13
|
import { SearchToken } from "@embedpdf/react/search";
|
|
12
14
|
import { I18nToken, TranslationDictionary } from "@embedpdf/react/i18n";
|
|
13
15
|
import { CommandDef, CommandDef as CommandDef$1, CommandsToken, ResolvedCommand, ResolvedCommand as ResolvedCommand$1 } from "@embedpdf/react/commands";
|
|
14
16
|
import { ShellToken } from "@embedpdf/react/shell";
|
|
15
|
-
import { AddItemSpec, BarChild, BarGroup, BarItem, BarSchema, BarSections, ChromeHelpers, ChromeHelpers as ChromeHelpers$1, ChromeSchema, ChromeSchema as ChromeSchema$1, CustomItem, Importance, MenuSchema, MenuSection, Variant, addItem, chromeHelpers, custom, defineChrome, group, item, removeItems, replaceItem, validateChrome } from "@embedpdf/react/toolbar";
|
|
17
|
+
import { AddItemSpec, BarChild, BarGroup, BarItem, BarSchema, BarSchema as BarSchema$1, BarSections, ChromeHelpers, ChromeHelpers as ChromeHelpers$1, ChromeSchema, ChromeSchema as ChromeSchema$1, CustomItem, Importance, MenuSchema, MenuSchema as MenuSchema$1, MenuSection, Variant, addItem, chromeHelpers, custom, defineChrome, group, item, removeItems, replaceItem, validateChrome } from "@embedpdf/react/toolbar";
|
|
16
18
|
import { MetadataToken } from "@embedpdf/react/metadata";
|
|
19
|
+
//#region src/ui/icons.d.ts
|
|
20
|
+
type PathSpec = string | {
|
|
21
|
+
d: string;
|
|
22
|
+
/** Fill paint: `true` = currentColor (a filled glyph part); a slot
|
|
23
|
+
* name = that accent color (nothing when the accent is absent). */
|
|
24
|
+
fill?: boolean | 'primary' | 'secondary';
|
|
25
|
+
/** Stroke paint: a slot name = that accent color (currentColor when
|
|
26
|
+
* the accent is absent). */
|
|
27
|
+
stroke?: 'primary' | 'secondary';
|
|
28
|
+
};
|
|
29
|
+
/** A registrable icon: 24×24 stroke path data (Tabler/Lucide-style), exactly
|
|
30
|
+
* the shape of the built-in set — user icons are not a lesser kind. */
|
|
31
|
+
type IconDef = readonly PathSpec[];
|
|
32
|
+
declare const ICON_PATHS: Record<string, readonly PathSpec[]>;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/config-context.d.ts
|
|
35
|
+
interface StampsCustomization {
|
|
36
|
+
/** `false`: no built-in library. A string: URL template with `{locale}`. */
|
|
37
|
+
readonly defaultLibrary?: false | string;
|
|
38
|
+
/** Library kinds the stamps sidebar lists. Default `['stamps']`. */
|
|
39
|
+
readonly sidebar?: ReadonlyArray<string>;
|
|
40
|
+
/** Quick marks in the Insert toolbar: asset ids (`library:name`) from any
|
|
41
|
+
* library, or one library's whole set. Default none. */
|
|
42
|
+
readonly toolbar?: ReadonlyArray<string> | {
|
|
43
|
+
readonly library: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
interface SignaturesCustomization {
|
|
47
|
+
/** Which marks a person keeps. Default both. */
|
|
48
|
+
readonly kinds?: ReadonlyArray<'signature' | 'initials'>;
|
|
49
|
+
/** `'one'`: a single person per browser (no "new signature" once one exists). Default `'many'`. */
|
|
50
|
+
readonly libraries?: 'one' | 'many';
|
|
51
|
+
/** What placing a mark on a field does; default `sign` with a signer, else `visual`. */
|
|
52
|
+
readonly mode?: SignatureMode$1;
|
|
53
|
+
/** The key holder — `webCryptoSigner`, `remoteSigner`, `personalSigner`, or a thunk resolving one per signing. */
|
|
54
|
+
readonly signer?: SignerPort$1 | (() => Promise<SignerPort$1>);
|
|
55
|
+
/** Trust anchors for validation; none → verdicts top out at "valid, signer unknown". */
|
|
56
|
+
readonly trust?: TrustPort$1;
|
|
57
|
+
/** Offer a certification (first signature, DocMDP) in the sign dialog. Default false. */
|
|
58
|
+
readonly allowCertify?: boolean;
|
|
59
|
+
/** Script faces for typed marks: registered on the viewer's engine on first use. */
|
|
60
|
+
readonly fonts?: ReadonlyArray<{
|
|
61
|
+
readonly key: string;
|
|
62
|
+
readonly url: string;
|
|
63
|
+
readonly label: string;
|
|
64
|
+
}>;
|
|
65
|
+
}
|
|
66
|
+
/** A font for free-text annotations beyond the standard 14. */
|
|
67
|
+
interface AnnotationFontSpec {
|
|
68
|
+
/** The stable id a free-text `fontFamily` carries — the engine key AND the
|
|
69
|
+
* CSS family the live editor renders with. Not one of the 14 standard names. */
|
|
70
|
+
readonly key: string;
|
|
71
|
+
/** Where the TTF/OTF bytes come from (same-origin or CORS-enabled). */
|
|
72
|
+
readonly url: string;
|
|
73
|
+
/** The picker's label. */
|
|
74
|
+
readonly label: string;
|
|
75
|
+
/** Family / style refinements for fallback matching; inferred from the file
|
|
76
|
+
* when omitted. */
|
|
77
|
+
readonly familyName?: string;
|
|
78
|
+
readonly weight?: number;
|
|
79
|
+
readonly italic?: boolean;
|
|
80
|
+
}
|
|
81
|
+
interface AnnotationsCustomization {
|
|
82
|
+
/**
|
|
83
|
+
* Fonts the free-text style panel offers beyond the standard 14. Each is
|
|
84
|
+
* fetched once when the viewer mounts, registered on the viewer's engine
|
|
85
|
+
* under its `key`, and mounted as a `@font-face` of the same name — so the
|
|
86
|
+
* DOM editor shows the face the appearance stream will bake. A font whose
|
|
87
|
+
* URL fails is skipped with a console warning. On the cloud engine (no
|
|
88
|
+
* `engine.fonts`) they are not offered: fonts there are a server policy.
|
|
89
|
+
*/
|
|
90
|
+
readonly fonts?: ReadonlyArray<AnnotationFontSpec>;
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
17
93
|
//#region src/handle.d.ts
|
|
18
94
|
/** `get`/`tryGet` bound to one document (see {@link ViewerHandle.forDocument}). */
|
|
19
95
|
interface ScopedViewerHandle {
|
|
@@ -41,21 +117,6 @@ interface ViewerHandle extends ScopedViewerHandle {
|
|
|
41
117
|
}
|
|
42
118
|
declare function createViewerHandle(kernel: Kernel): ViewerHandle;
|
|
43
119
|
//#endregion
|
|
44
|
-
//#region src/ui/icons.d.ts
|
|
45
|
-
type PathSpec = string | {
|
|
46
|
-
d: string;
|
|
47
|
-
/** Fill paint: `true` = currentColor (a filled glyph part); a slot
|
|
48
|
-
* name = that accent color (nothing when the accent is absent). */
|
|
49
|
-
fill?: boolean | 'primary' | 'secondary';
|
|
50
|
-
/** Stroke paint: a slot name = that accent color (currentColor when
|
|
51
|
-
* the accent is absent). */
|
|
52
|
-
stroke?: 'primary' | 'secondary';
|
|
53
|
-
};
|
|
54
|
-
/** A registrable icon: 24×24 stroke path data (Tabler/Lucide-style), exactly
|
|
55
|
-
* the shape of the built-in set — user icons are not a lesser kind. */
|
|
56
|
-
type IconDef = readonly PathSpec[];
|
|
57
|
-
declare const ICON_PATHS: Record<string, readonly PathSpec[]>;
|
|
58
|
-
//#endregion
|
|
59
120
|
//#region src/ui/theme.d.ts
|
|
60
121
|
type ThemeMode = 'light' | 'dark';
|
|
61
122
|
type ThemePreference = ThemeMode | 'system';
|
|
@@ -80,6 +141,18 @@ interface ViewerCustomization {
|
|
|
80
141
|
/** The structure — a value you OWN: the default (pass nothing), a transform
|
|
81
142
|
* of it, or your own schema. Never merged. */
|
|
82
143
|
chrome?: ChromeSchema$1 | ((base: ChromeSchema$1, helpers: ChromeHelpers$1) => ChromeSchema$1);
|
|
144
|
+
/** The stamps sidebar's built-in library. `false`: none (air-gapped, no
|
|
145
|
+
* request). A string: a URL template with a `{locale}` slot for a
|
|
146
|
+
* self-hosted copy of `@embedpdf/default-stamps`. Default: the copy that
|
|
147
|
+
* ships with the viewer, as a lazy chunk of your own build — no CDN. */
|
|
148
|
+
stamps?: StampsCustomization;
|
|
149
|
+
/** Digital signatures: the signer, trust anchors, the mode (sign / visual /
|
|
150
|
+
* ask), which marks a person keeps, and script faces for typed marks. With
|
|
151
|
+
* no signer, a mark placed on a field is drawn in without sealing. */
|
|
152
|
+
signatures?: SignaturesCustomization;
|
|
153
|
+
/** Annotations: fonts the free-text style panel offers beyond the standard
|
|
154
|
+
* 14 — fetched, registered on the engine and mounted for the live editor. */
|
|
155
|
+
annotations?: AnnotationsCustomization;
|
|
83
156
|
/** Light/dark preference (string shorthand), or the full theme config with
|
|
84
157
|
* `--ep-*` token overrides. Tokens are applied by the DELIVERY (the custom
|
|
85
158
|
* element adopts them into its shadow root); direct consumers of this
|
|
@@ -115,7 +188,7 @@ interface FullViewerProps extends ViewerCustomization {
|
|
|
115
188
|
* scoped calls simply await their document. */
|
|
116
189
|
onViewer?: (viewer: ViewerHandle) => void;
|
|
117
190
|
}
|
|
118
|
-
declare function FullViewer({ engine, initialDocuments, fallback, commands, icons, strings, locale, disabledCategories, chrome, theme, themeTarget, onViewer }: FullViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
191
|
+
declare function FullViewer({ engine, initialDocuments, fallback, commands, icons, strings, locale, disabledCategories, chrome, stamps, signatures, annotations, theme, themeTarget, onViewer }: FullViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
119
192
|
//#endregion
|
|
120
|
-
export { type AddItemSpec, AnnotationToken, type BarChild, type BarGroup, type BarItem, type BarSchema, type BarSections, type CapabilityToken, type ChromeHelpers, type ChromeSchema, type CommandDef, CommandsToken, type CustomItem, type DocInfo, type DocumentsCapability, DocumentsToken, type Engine, type EngineFactory, FormToken, FullViewer, type FullViewerProps, I18nToken, type IconDef, type Importance, type InitialDocument, InteractionToken, type MenuSchema, type MenuSection, MetadataToken, type PathSpec, RedactionToken, type ResolvedCommand, type ScopedViewerHandle, SearchToken, SelectionToken, ShellToken, StageToken, type ThemeConfig, type ThemeMode, type ThemePreference, type ThemeTokens, type Unsubscribe, type Variant, type ViewerCustomization, type ViewerHandle, addItem, chromeHelpers, createViewerHandle, custom, defaultChrome, defaultCommands, ICON_PATHS as defaultIcons, defineChrome, group, item, removeItems, replaceItem, themeConfigOf, validateChrome };
|
|
193
|
+
export { type AddItemSpec, type AnnotationFontSpec, AnnotationToken, type AnnotationsCustomization, type BarChild, type BarGroup, type BarItem, type BarSchema, type BarSections, type CapabilityToken, type ChromeHelpers, type ChromeSchema, type CommandDef, CommandsToken, type CustomItem, type DocInfo, type DocumentsCapability, DocumentsToken, type Engine, type EngineFactory, FormToken, FullViewer, type FullViewerProps, I18nToken, type IconDef, type Importance, type InitialDocument, InteractionToken, type Mark, type MenuSchema, type MenuSection, MetadataToken, type PathSpec, RedactionToken, type ResolvedCommand, type ScopedViewerHandle, SearchToken, SelectionToken, ShellToken, type SignFieldInput, type SignatureMode, SignatureToken, type SignaturesCustomization, type SignerPort, StageToken, StampToken, type StampsCustomization, type ThemeConfig, type ThemeMode, type ThemePreference, type ThemeTokens, type TrustPort, type Unsubscribe, type Variant, type ViewerCustomization, type ViewerHandle, addItem, chromeHelpers, createTestSigner, createViewerHandle, custom, defaultChrome, defaultCommands, ICON_PATHS as defaultIcons, defineChrome, group, indexedDbKeyStore, item, memoryKeyStore, personalSigner, remoteSigner, removeItems, replaceItem, themeConfigOf, validateChrome, webCryptoSigner };
|
|
121
194
|
//# sourceMappingURL=index.d.ts.map
|