@vue-pdf-viewer/shared 1.0.0-alpha.6 → 1.0.0-alpha.8

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 CHANGED
@@ -1,12 +1,13 @@
1
1
  import type { InjectionKey, Reactive, ComputedRef } from "vue";
2
- import type { LocaleKey, Localization, PluginContext } from "./index";
2
+ import type { LocaleKey, Localization, PluginContext, ViewerCoreState } from "./index";
3
3
  import { EventAnnotation, FreeTextFontColor, HighlightColor } from "./enumerators";
4
4
  export declare const PLUGIN_ID: {
5
5
  ANNOTATIONS: string;
6
6
  };
7
7
  export declare const Locales: Record<LocaleKey, Localization>;
8
- export declare const SHARED_UI_SYMBOL: InjectionKey<Reactive<PluginContext["shared"]["ui"]>>;
9
- export declare const LOCALIZATION_SYMBOL: InjectionKey<ComputedRef<Localization> | undefined>;
8
+ export declare const SYMBOL_SHARED_UI: InjectionKey<Reactive<PluginContext["shared"]["ui"]>>;
9
+ export declare const SYMBOL_LOCALIZATION: InjectionKey<ComputedRef<Localization> | undefined>;
10
+ export declare const SYMBOL_VIEWER_CORE_STATE: InjectionKey<Reactive<ViewerCoreState>>;
10
11
  export declare const EVENT_ANNOTATION: typeof EventAnnotation;
11
12
  export declare const DEFAULT_HIGHLIGHT_COLORS: Record<HighlightColor, string>;
12
13
  export declare const DEFAULT_FREE_TEXT_FONT_COLORS: Record<FreeTextFontColor, string>;
package/dist/const.js CHANGED
@@ -15,8 +15,9 @@ export const Locales = {
15
15
  pt_PT: pt,
16
16
  th_TH: th,
17
17
  };
18
- export const SHARED_UI_SYMBOL = Symbol("VPV Shared UIs");
19
- export const LOCALIZATION_SYMBOL = Symbol("VPV Current Localization");
18
+ export const SYMBOL_SHARED_UI = Symbol("VPV Shared UIs");
19
+ export const SYMBOL_LOCALIZATION = Symbol("VPV Current Localization");
20
+ export const SYMBOL_VIEWER_CORE_STATE = Symbol("VPV Viewer Core State");
20
21
  export const EVENT_ANNOTATION = EventAnnotation;
21
22
  export const DEFAULT_HIGHLIGHT_COLORS = {
22
23
  [HighlightColor.Purple]: "Purple",
package/dist/types.d.ts CHANGED
@@ -1,4 +1,10 @@
1
- import type { Component, ComponentInternalInstance, ComputedRef } from "vue";
1
+ import type { Component, ComponentInternalInstance, ComputedRef, Reactive, Ref } from "vue";
2
+ export interface ViewerCoreState {
3
+ currentPageIndex: Ref<number>;
4
+ scale: Ref<number>;
5
+ isEditing: Ref<boolean>;
6
+ rotation: Ref<number>;
7
+ }
2
8
  export type LocaleKey = "en_US" | "zh_CN" | "it_IT" | "pt_PT" | "th_TH" | string;
3
9
  export type Localization = {
4
10
  searchButtonTooltip: string;
@@ -115,6 +121,7 @@ export interface PluginContext {
115
121
  };
116
122
  shared: {
117
123
  localization: ComputedRef<Localization>;
124
+ viewerCoreState: Reactive<ViewerCoreState>;
118
125
  ui: {
119
126
  AppButton?: Component;
120
127
  AppTooltip?: Component;
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-alpha.6",
4
+ "version": "1.0.0-alpha.8",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",