@vue-pdf-viewer/shared 1.1.3 → 1.2.0-rc.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 (2) hide show
  1. package/dist/types.d.ts +7 -3
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -121,7 +121,7 @@ export interface PluginItem {
121
121
  component: Component;
122
122
  toolbarDirection: ToolbarDirection;
123
123
  }
124
- export interface PluginContext {
124
+ export interface PluginContext<PDFDocumentProxy = any> {
125
125
  componentInstance: ComponentInternalInstance | null;
126
126
  toolbar: {
127
127
  addItem: (item: PluginItem) => void;
@@ -135,11 +135,15 @@ export interface PluginContext {
135
135
  AppHighlightColorPicker?: Component;
136
136
  AppSignatures?: Component;
137
137
  };
138
+ pdf?: {
139
+ document: ComputedRef<PDFDocumentProxy | undefined>;
140
+ getOriginalBytes: () => Promise<Uint8Array | null>;
141
+ };
138
142
  };
139
143
  }
140
- export interface Plugin {
144
+ export interface Plugin<PDFDocumentProxy> {
141
145
  name: string;
142
- setup: (ctx: PluginContext) => void;
146
+ setup: (ctx: PluginContext<PDFDocumentProxy>) => void;
143
147
  }
144
148
  export interface LabelValuePair {
145
149
  label: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/shared",
3
3
  "private": false,
4
- "version": "1.1.3",
4
+ "version": "1.2.0-rc.1",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",