@vue-pdf-viewer/shared 1.0.0-beta.0 → 1.0.0-beta.2
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/const.d.ts +2 -1
- package/dist/const.js +10 -0
- package/dist/types.d.ts +1 -0
- package/package.json +1 -3
package/dist/const.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type InjectionKey, type Reactive, type ComputedRef } from "vue";
|
|
2
2
|
import type { LocaleKey, Localization, PluginContext, ViewerCoreState } from "./index";
|
|
3
3
|
import { EventAnnotation, FreeTextFontColor, HighlightColor } from "./enumerators";
|
|
4
4
|
export declare const PLUGIN_ID: {
|
|
@@ -11,3 +11,4 @@ export declare const SYMBOL_VIEWER_CORE_STATE: InjectionKey<Reactive<ViewerCoreS
|
|
|
11
11
|
export declare const EVENT_ANNOTATION: typeof EventAnnotation;
|
|
12
12
|
export declare const DEFAULT_HIGHLIGHT_COLORS: Record<HighlightColor, string>;
|
|
13
13
|
export declare const DEFAULT_FREE_TEXT_FONT_COLORS: Record<FreeTextFontColor, string>;
|
|
14
|
+
export declare const DEFAULT_VIEWER_CORE_STATE: Reactive<ViewerCoreState>;
|
package/dist/const.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { reactive, ref, } from "vue";
|
|
1
2
|
import { EventAnnotation, FreeTextFontColor, HighlightColor, } from "./enumerators";
|
|
2
3
|
import en from "./locales/en_US.json";
|
|
3
4
|
import cn from "./locales/zh_CN.json";
|
|
@@ -41,3 +42,12 @@ export const DEFAULT_FREE_TEXT_FONT_COLORS = {
|
|
|
41
42
|
[FreeTextFontColor.Yellow]: "Yellow",
|
|
42
43
|
[FreeTextFontColor.Green]: "Green",
|
|
43
44
|
};
|
|
45
|
+
export const DEFAULT_VIEWER_CORE_STATE = reactive({
|
|
46
|
+
currentPageIndex: ref(0),
|
|
47
|
+
scale: ref(1),
|
|
48
|
+
isEditing: ref(false),
|
|
49
|
+
rotation: ref(0),
|
|
50
|
+
update: (state) => {
|
|
51
|
+
Object.assign(DEFAULT_VIEWER_CORE_STATE, state);
|
|
52
|
+
},
|
|
53
|
+
});
|
package/dist/types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface ViewerCoreState {
|
|
|
4
4
|
scale: Ref<number>;
|
|
5
5
|
isEditing: Ref<boolean>;
|
|
6
6
|
rotation: Ref<number>;
|
|
7
|
+
update: (state: Partial<ViewerCoreState>) => void;
|
|
7
8
|
}
|
|
8
9
|
export type LocaleKey = "en_US" | "zh_CN" | "it_IT" | "pt_PT" | "th_TH" | string;
|
|
9
10
|
export type Localization = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-pdf-viewer/shared",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -16,9 +16,7 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"version:prerelease": "npm version prerelease",
|
|
20
19
|
"prepublishOnly": "tsc",
|
|
21
|
-
"publish:alpha": "npm run version:prerelease && npm publish --tag=alpha",
|
|
22
20
|
"build": "tsc",
|
|
23
21
|
"dev": "tsc --watch"
|
|
24
22
|
},
|