visio-svelte-viewer 0.6.1 → 0.7.0
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
|
@@ -44,7 +44,8 @@ npm install visio-svelte-viewer
|
|
|
44
44
|
## API
|
|
45
45
|
|
|
46
46
|
The shared properties are `document` (a parsed `VisioDocument`, or `null` to clear),
|
|
47
|
-
`pageIndex` (zero-based), `zoom` (`1` means 100%), `showToolbar`
|
|
47
|
+
`pageIndex` (zero-based), `zoom` (`1` means 100%), `showToolbar`, `ribbonAddIns` (tabs the host adds
|
|
48
|
+
after Help) and `events`.
|
|
48
49
|
The callback map uses `document-load`, `document-change`, `document-error`,
|
|
49
50
|
`page-change`, `zoom-change` and `shape-select`. File loading uses the imperative
|
|
50
51
|
`load(File | Blob | Uint8Array | ArrayBuffer)` handle; `document` is not a file URL.
|
package/dist/VisioViewer.svelte
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { readonly, writable } from 'svelte/store';
|
|
4
4
|
import { mountFrameworkViewer, viewerHandle, viewerOptions, viewerStateSource, type ViewerState, type MountedViewer, type ViewerProps, type VsdxSource, type VisioEdit, type VisioShapeSelection, type SvgExportOptions, type CurrentPagePrintSnapshotOptions } from './runtime.js';
|
|
5
5
|
type Props = ViewerProps & { class?: string; style?: string; 'aria-label'?: string };
|
|
6
|
-
let { document, pageIndex, zoom, showToolbar, events, class: className, style, 'aria-label': ariaLabel }: Props = $props();
|
|
7
|
-
const options = $derived({ document, pageIndex, zoom, showToolbar, events } satisfies Required<ViewerProps>);
|
|
6
|
+
let { document, pageIndex, zoom, showToolbar, ribbonAddIns, events, class: className, style, 'aria-label': ariaLabel }: Props = $props();
|
|
7
|
+
const options = $derived({ document, pageIndex, zoom, showToolbar, ribbonAddIns, events } satisfies Required<ViewerProps>);
|
|
8
8
|
let binding: MountedViewer | undefined;
|
|
9
9
|
const handle = viewerHandle(() => binding);
|
|
10
10
|
// The component owns its state store, so subscribers made before mount still see updates.
|
package/dist/index.js
CHANGED
package/dist/index.server.js
CHANGED
|
@@ -84,12 +84,13 @@ function viewerHandle(current) {
|
|
|
84
84
|
//#region packages/bindings/src/VisioViewer.svelte
|
|
85
85
|
function VisioViewer($$renderer, $$props) {
|
|
86
86
|
$$renderer.component(($$renderer) => {
|
|
87
|
-
let { document, pageIndex, zoom, showToolbar, events, class: className, style, "aria-label": ariaLabel } = $$props;
|
|
87
|
+
let { document, pageIndex, zoom, showToolbar, ribbonAddIns, events, class: className, style, "aria-label": ariaLabel } = $$props;
|
|
88
88
|
$.derived(() => ({
|
|
89
89
|
document,
|
|
90
90
|
pageIndex,
|
|
91
91
|
zoom,
|
|
92
92
|
showToolbar,
|
|
93
|
+
ribbonAddIns,
|
|
93
94
|
events
|
|
94
95
|
}));
|
|
95
96
|
let binding;
|
|
@@ -38,4 +38,5 @@ export { ViewerController, type ViewerState } from 'ooxml-ui/visio';
|
|
|
38
38
|
export type { SvgExportOptions, SvgExportResult } from 'ooxml-ui/visio';
|
|
39
39
|
export type { CurrentPagePrintSnapshotOptions, PrintSnapshot, PrintSnapshotPage, PrintSnapshotOptions, PrintSnapshotLimits, PrintSnapshotUsage, } from 'ooxml-ui/visio';
|
|
40
40
|
export type { ViewerEditState, VsdxExportResult } from 'ooxml-ui/visio';
|
|
41
|
+
export type { OfficeRibbonAddInEvent, RibbonAddInCommand, RibbonAddInGroup, RibbonAddInTab, } from 'ooxml-ui/visio';
|
|
41
42
|
export type { VisioEdit, VisioGeometryEdit, CreateVsdxOptions } from 'ooxml-core/visio';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "visio-svelte-viewer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Local-first Visio viewer for svelte",
|
|
5
5
|
"homepage": "https://christophervr.github.io/ooxml/visio/",
|
|
6
6
|
"bugs": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"emf-converter": "4.
|
|
41
|
-
"ooxml-core": "^1.
|
|
42
|
-
"ooxml-ui": "^1.
|
|
40
|
+
"emf-converter": "4.11.2",
|
|
41
|
+
"ooxml-core": "^1.8.0",
|
|
42
|
+
"ooxml-ui": "^1.8.0",
|
|
43
43
|
"visio-core": "^0.4.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|