docx-vue-viewer 1.2.0 → 1.3.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.
package/README.md CHANGED
@@ -73,6 +73,10 @@ read-only).
73
73
  [Framework guide](https://christophervr.github.io/ooxml/docx/frameworks/vue) |
74
74
  [Bindings](https://christophervr.github.io/ooxml/docx/bindings)
75
75
 
76
+ ## Privacy and network use
77
+
78
+ The Word packages make no network request when opening, rendering, editing or saving a document: linked pictures are not fetched, linked data is not refreshed, and fonts come from the device only (nothing is downloaded from Google Fonts or any other font service). Hyperlinks open only when the reader follows them. Nothing collects analytics or telemetry. See [PRIVACY.md](https://github.com/ChristopherVR/ooxml/blob/main/PRIVACY.md).
79
+
76
80
  ## License
77
81
 
78
82
  Apache-2.0.
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as vue from 'vue';
2
2
  import { PropType, MaybeRefOrGetter } from 'vue';
3
3
  import { DocumentModel } from 'docx-core';
4
4
  export * from 'docx-core';
5
- import { DocumentStorage } from 'ooxml-core/embedding';
5
+ import { DocumentStorage, CloudFileProvider, CloudOpenedFile } from 'ooxml-core/embedding';
6
6
  import { EditorTheme, EditorThemeMode, RibbonActionInput, RibbonAddInTab, DocxCollaborationOptions, WordCustomization, EditorLocaleInput, PageChangeDetail, FileCommandDetail, RibbonAction, RibbonAddInCommandDetail, DocxCollaborationState, DocxEditorElement, SurfaceHostActions, WordListState, WordAlignment, WordListChoice, WordNavigationProps, WordStatusProps, WordToolbarProps } from 'ooxml-ui/docx';
7
7
  export * from 'ooxml-ui/docx';
8
8
  export { WordNavigationProps, WordStatusProps, WordToolbarProps } from 'ooxml-ui/docx';
@@ -29,6 +29,7 @@ declare const WordEditor: vue.DefineComponent<vue.ExtractPropTypes<{
29
29
  ribbonAddIns: PropType<readonly RibbonAddInTab[]>;
30
30
  collaboration: PropType<DocxCollaborationOptions | null>;
31
31
  storage: PropType<DocumentStorage | null>;
32
+ fileProviders: PropType<readonly CloudFileProvider[] | null>;
32
33
  customization: PropType<WordCustomization | null>;
33
34
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
34
35
  [key: string]: any;
@@ -49,6 +50,7 @@ declare const WordEditor: vue.DefineComponent<vue.ExtractPropTypes<{
49
50
  ribbonAddIns: PropType<readonly RibbonAddInTab[]>;
50
51
  collaboration: PropType<DocxCollaborationOptions | null>;
51
52
  storage: PropType<DocumentStorage | null>;
53
+ fileProviders: PropType<readonly CloudFileProvider[] | null>;
52
54
  customization: PropType<WordCustomization | null>;
53
55
  }>> & Readonly<{
54
56
  [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
@@ -93,6 +95,13 @@ interface EditorProps {
93
95
  * File > Open to `storage.open()` when it has one. `file-command` still fires first.
94
96
  */
95
97
  storage?: DocumentStorage | null | undefined;
98
+ /**
99
+ * Cloud places for File > Open (OneDrive and the like): "This device" plus one place per
100
+ * provider. A file opened from a place saves through its own storage until another document
101
+ * loads, and is read-only when the provider says it cannot be edited. Forwarded when the array
102
+ * changes, so keep it stable; `null` or omitted removes the places.
103
+ */
104
+ fileProviders?: readonly CloudFileProvider[] | null | undefined;
96
105
  /**
97
106
  * Host customisation (`WordCustomization`): `capabilities`, `backstage.extraPages` and
98
107
  * `contextMenu.extraCommands`. Forwarded when the object changes, so keep it stable (memoise
@@ -143,6 +152,11 @@ interface EditorHandle {
143
152
  /** Saves and downloads in the browser, then marks the document clean. */
144
153
  download(fileName?: string): Promise<void>;
145
154
  markClean(): void;
155
+ /**
156
+ * Opens a file got from a `CloudFileProvider` (the host's own picker or a start page) the way File >
157
+ * Open > OneDrive does: its name, read-only state and storage for Save.
158
+ */
159
+ openCloudFile(file: CloudOpenedFile): Promise<void>;
146
160
  readonly dirty: boolean;
147
161
  }
148
162
 
package/dist/index.js CHANGED
@@ -85,6 +85,11 @@ var E = [
85
85
  fallback: null,
86
86
  apply: (e, t) => e.storage = t ?? void 0
87
87
  },
88
+ fileProviders: {
89
+ forward: "changed",
90
+ fallback: null,
91
+ apply: (e, t) => e.fileProviders = t ?? []
92
+ },
88
93
  collaboration: {
89
94
  forward: "changed",
90
95
  fallback: null,
@@ -114,6 +119,7 @@ var E = [
114
119
  save: "async",
115
120
  download: "async",
116
121
  markClean: "optional-call",
122
+ openCloudFile: "async",
117
123
  dirty: { fallback: !1 }
118
124
  }
119
125
  };
@@ -135,6 +141,7 @@ function O(e, n = {}, r = !1) {
135
141
  save: () => i.save(),
136
142
  download: (e) => i.download(e),
137
143
  markClean: () => i.markClean(),
144
+ openCloudFile: (e) => i.openCloudFile(e),
138
145
  get dirty() {
139
146
  return i.dirty;
140
147
  },
@@ -187,6 +194,7 @@ var A = e({
187
194
  ribbonAddIns: Array,
188
195
  collaboration: Object,
189
196
  storage: Object,
197
+ fileProviders: Array,
190
198
  customization: Object
191
199
  },
192
200
  contract: D,
@@ -263,6 +271,7 @@ function M(e = {}) {
263
271
  save: () => m().save(),
264
272
  download: (e) => m().download(e),
265
273
  markClean: () => m().markClean(),
274
+ openCloudFile: (e) => m().openCloudFile(e),
266
275
  get dirty() {
267
276
  return n?.dirty ?? !1;
268
277
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docx-vue-viewer",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "Vue 3 component for the DOCX editor. Self-contained: includes the editor, layout engine and legacy .doc reader.",
5
5
  "keywords": [
6
6
  "doc",
@@ -40,9 +40,9 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
- "docx-core": "^1.1.0",
44
- "ooxml-core": "^1.38.0",
45
- "ooxml-ui": "^1.40.0"
43
+ "docx-core": "^1.1.1",
44
+ "ooxml-core": "^1.42.0",
45
+ "ooxml-ui": "^1.45.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "vue": "^3.5.0"