@embedpdf/viewer-chrome 3.0.0-next.10 → 3.0.0-next.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
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";
@@ -11,9 +11,31 @@ import { SearchToken } from "@embedpdf/react/search";
11
11
  import { SelectionToken } from "@embedpdf/react/selection";
12
12
  import { FormToken } from "@embedpdf/react/form";
13
13
  import { RedactionToken } from "@embedpdf/react/redaction";
14
+ import { StampToken } from "@embedpdf/react/stamp";
14
15
  import { InteractionToken } from "@embedpdf/react/interaction";
15
16
  import { ShellToken } from "@embedpdf/react/shell";
16
17
  import { MetadataToken } from "@embedpdf/react/metadata";
18
+ //#region src/ui/icons.d.ts
19
+ type PathSpec = string | {
20
+ d: string;
21
+ /** Fill paint: `true` = currentColor (a filled glyph part); a slot
22
+ * name = that accent color (nothing when the accent is absent). */
23
+ fill?: boolean | 'primary' | 'secondary';
24
+ /** Stroke paint: a slot name = that accent color (currentColor when
25
+ * the accent is absent). */
26
+ stroke?: 'primary' | 'secondary';
27
+ };
28
+ /** A registrable icon: 24×24 stroke path data (Tabler/Lucide-style), exactly
29
+ * the shape of the built-in set — user icons are not a lesser kind. */
30
+ type IconDef = readonly PathSpec[];
31
+ declare const ICON_PATHS: Record<string, readonly PathSpec[]>;
32
+ //#endregion
33
+ //#region src/config-context.d.ts
34
+ interface StampsCustomization {
35
+ /** `false`: no built-in library. A string: URL template with `{locale}`. */
36
+ readonly defaultLibrary?: false | string;
37
+ }
38
+ //#endregion
17
39
  //#region src/handle.d.ts
18
40
  /** `get`/`tryGet` bound to one document (see {@link ViewerHandle.forDocument}). */
19
41
  interface ScopedViewerHandle {
@@ -41,21 +63,6 @@ interface ViewerHandle extends ScopedViewerHandle {
41
63
  }
42
64
  declare function createViewerHandle(kernel: Kernel): ViewerHandle;
43
65
  //#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
66
  //#region src/ui/theme.d.ts
60
67
  type ThemeMode = 'light' | 'dark';
61
68
  type ThemePreference = ThemeMode | 'system';
@@ -80,6 +87,11 @@ interface ViewerCustomization {
80
87
  /** The structure — a value you OWN: the default (pass nothing), a transform
81
88
  * of it, or your own schema. Never merged. */
82
89
  chrome?: ChromeSchema$1 | ((base: ChromeSchema$1, helpers: ChromeHelpers$1) => ChromeSchema$1);
90
+ /** The stamps sidebar's built-in library. `false`: none (air-gapped, no
91
+ * request). A string: a URL template with a `{locale}` slot for a
92
+ * self-hosted copy of `@embedpdf/default-stamps`. Default: the copy that
93
+ * ships with the viewer, as a lazy chunk of your own build — no CDN. */
94
+ stamps?: StampsCustomization;
83
95
  /** Light/dark preference (string shorthand), or the full theme config with
84
96
  * `--ep-*` token overrides. Tokens are applied by the DELIVERY (the custom
85
97
  * element adopts them into its shadow root); direct consumers of this
@@ -115,7 +127,7 @@ interface FullViewerProps extends ViewerCustomization {
115
127
  * scoped calls simply await their document. */
116
128
  onViewer?: (viewer: ViewerHandle) => void;
117
129
  }
118
- declare function FullViewer({ engine, initialDocuments, fallback, commands, icons, strings, locale, disabledCategories, chrome, theme, themeTarget, onViewer }: FullViewerProps): import("react/jsx-runtime").JSX.Element;
130
+ declare function FullViewer({ engine, initialDocuments, fallback, commands, icons, strings, locale, disabledCategories, chrome, stamps, theme, themeTarget, onViewer }: FullViewerProps): import("react/jsx-runtime").JSX.Element;
119
131
  //#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 };
132
+ 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, StampToken, type StampsCustomization, 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 };
121
133
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -6,14 +6,36 @@ 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";
11
12
  import { SearchToken } from "@embedpdf/react/search";
12
13
  import { I18nToken, TranslationDictionary } from "@embedpdf/react/i18n";
13
14
  import { CommandDef, CommandDef as CommandDef$1, CommandsToken, ResolvedCommand, ResolvedCommand as ResolvedCommand$1 } from "@embedpdf/react/commands";
14
15
  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";
16
+ 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
17
  import { MetadataToken } from "@embedpdf/react/metadata";
18
+ //#region src/ui/icons.d.ts
19
+ type PathSpec = string | {
20
+ d: string;
21
+ /** Fill paint: `true` = currentColor (a filled glyph part); a slot
22
+ * name = that accent color (nothing when the accent is absent). */
23
+ fill?: boolean | 'primary' | 'secondary';
24
+ /** Stroke paint: a slot name = that accent color (currentColor when
25
+ * the accent is absent). */
26
+ stroke?: 'primary' | 'secondary';
27
+ };
28
+ /** A registrable icon: 24×24 stroke path data (Tabler/Lucide-style), exactly
29
+ * the shape of the built-in set — user icons are not a lesser kind. */
30
+ type IconDef = readonly PathSpec[];
31
+ declare const ICON_PATHS: Record<string, readonly PathSpec[]>;
32
+ //#endregion
33
+ //#region src/config-context.d.ts
34
+ interface StampsCustomization {
35
+ /** `false`: no built-in library. A string: URL template with `{locale}`. */
36
+ readonly defaultLibrary?: false | string;
37
+ }
38
+ //#endregion
17
39
  //#region src/handle.d.ts
18
40
  /** `get`/`tryGet` bound to one document (see {@link ViewerHandle.forDocument}). */
19
41
  interface ScopedViewerHandle {
@@ -41,21 +63,6 @@ interface ViewerHandle extends ScopedViewerHandle {
41
63
  }
42
64
  declare function createViewerHandle(kernel: Kernel): ViewerHandle;
43
65
  //#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
66
  //#region src/ui/theme.d.ts
60
67
  type ThemeMode = 'light' | 'dark';
61
68
  type ThemePreference = ThemeMode | 'system';
@@ -80,6 +87,11 @@ interface ViewerCustomization {
80
87
  /** The structure — a value you OWN: the default (pass nothing), a transform
81
88
  * of it, or your own schema. Never merged. */
82
89
  chrome?: ChromeSchema$1 | ((base: ChromeSchema$1, helpers: ChromeHelpers$1) => ChromeSchema$1);
90
+ /** The stamps sidebar's built-in library. `false`: none (air-gapped, no
91
+ * request). A string: a URL template with a `{locale}` slot for a
92
+ * self-hosted copy of `@embedpdf/default-stamps`. Default: the copy that
93
+ * ships with the viewer, as a lazy chunk of your own build — no CDN. */
94
+ stamps?: StampsCustomization;
83
95
  /** Light/dark preference (string shorthand), or the full theme config with
84
96
  * `--ep-*` token overrides. Tokens are applied by the DELIVERY (the custom
85
97
  * element adopts them into its shadow root); direct consumers of this
@@ -115,7 +127,7 @@ interface FullViewerProps extends ViewerCustomization {
115
127
  * scoped calls simply await their document. */
116
128
  onViewer?: (viewer: ViewerHandle) => void;
117
129
  }
118
- declare function FullViewer({ engine, initialDocuments, fallback, commands, icons, strings, locale, disabledCategories, chrome, theme, themeTarget, onViewer }: FullViewerProps): import("react/jsx-runtime").JSX.Element;
130
+ declare function FullViewer({ engine, initialDocuments, fallback, commands, icons, strings, locale, disabledCategories, chrome, stamps, theme, themeTarget, onViewer }: FullViewerProps): import("react/jsx-runtime").JSX.Element;
119
131
  //#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 };
132
+ 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, StampToken, type StampsCustomization, 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 };
121
133
  //# sourceMappingURL=index.d.ts.map