pptx-svelte-viewer 4.52.2 → 4.53.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/CHANGELOG.md +20 -0
- package/dist/{AiChatPanel-BjAYF-Y-.js → AiChatPanel-CnOaPzm-.js} +2 -2
- package/dist/{export-hC7EMHQd.js → export-DaWq0oYe.js} +2476 -2469
- package/dist/i18n/de.cjs +5 -0
- package/dist/i18n/de.mjs +5 -0
- package/dist/i18n/es.cjs +5 -0
- package/dist/i18n/es.mjs +5 -0
- package/dist/i18n/fr.cjs +5 -0
- package/dist/i18n/fr.mjs +5 -0
- package/dist/i18n/zh-CN.cjs +5 -0
- package/dist/i18n/zh-CN.mjs +5 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.js +1 -1
- package/dist/internals.js +1 -1
- package/dist/{transition-overlay-BgsFZeU8.js → transition-overlay-BKRKblpi.js} +501 -497
- package/dist/viewer/index.d.ts +25 -7
- package/dist/viewer/index.js +2 -2
- package/dist/{y-webrtc-B2oxtRHD.js → y-webrtc-DTI3MqYF.js} +1 -1
- package/package.json +9 -9
package/dist/viewer/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as svelte from 'svelte';
|
|
2
2
|
import { Component } from 'svelte';
|
|
3
3
|
import * as ooxml_ui_pptx from 'ooxml-ui/pptx';
|
|
4
|
-
import { PrintSettings, CanvasSize, RasterizeElementResult, RasterizeElementTilesResult, ViewportFitOptions, ViewerFontSource, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, GoogleFontsOption, ToolbarActionId, RibbonAddInTab, ViewerCustomization, DocumentStorage, ViewerAutosaveStatus, AutosaveRecord, ConnectionStatus, CollaborationInput, CollaborationConfig, CollaborationState, PowerPointViewerAPI, ViewerCustomizationApi, RemoteCursor, SanitizedPresence, PptxAutosaveStatusKind, DeckSaveIntent, InlineTextDraft, AnimationGroup, AlignEdge, DistributeAxis, MergeShapeOperation, PasteSpecialFormat, CropSession, CropElementUpdate, TemplateElementMap, HistoryTheme, ElementBoxPatch, EditorHistoryController, InkStrokeView, InkPoint, MasterViewCrudAction, MasterViewCrudActionId, FreeformToolKind, EditPointsElementPatch, SlideTemplateId, SlideTemplateBuildOptions, SlidePasteRequest, RibbonTransitionDraft, CellCoord, CellRect, PendingInlineTextEdit, InlineListController, ElementClipboardPayload, TableStyleSaveOptions, FontEmbeddingDescriptor, InlineTextEditSnapshot, SnapGuideInput, CollaborationLivePatcher, InlineTextDraftSink, ResolvedKeyboardCustomization, MarqueeRect, ShapeAdjustmentHandleDescriptor, SnapLine, ResizeHandleId, ConnectorEndpointKind, CollaborationInlineEditor, FindResult, ViewerPreferences, ViewportFitPadding, SlideSizeEmu, CollabLoadOrigin, CollaborationTransport, YDocLike, YjsFactories, CollabProviderHandle, BroadcastConfig, ElementAnimationState, AuthoredSlideRange, RunProgramNotice, ZoomNavigationTarget, PresentationSnapshot, AutosaveRecoveryPrompt, CompatibilityWarningToast, ReadOnlyRecommendation, ReadOnlyBannerPasswordError, ViewerOptions, ViewerOptionsStoreInit, ToolbarTabId, ViewerOptionsGroupId, ViewerOptionPrimitive, ViewerOptionsConstraints, CompareResult, Guide, DeckViewPreferences, ResolvedCustomization, ViewerMode, CollaborationShellState, AutosaveDisabledReason, MobileSheetKey, FieldSubstitutionContext } from 'ooxml-ui/pptx';
|
|
4
|
+
import { PrintSettings, CanvasSize, RasterizeElementResult, RasterizeElementTilesResult, ViewportFitOptions, ViewerFontSource, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, GoogleFontsOption, PptxLoadLimits, ToolbarActionId, RibbonAddInTab, ViewerCustomization, DocumentStorage, ViewerAutosaveStatus, AutosaveRecord, ConnectionStatus, CollaborationInput, CollaborationConfig, CollaborationState, PowerPointViewerAPI, ViewerCustomizationApi, RemoteCursor, SanitizedPresence, PptxAutosaveStatusKind, DeckSaveIntent, InlineTextDraft, AnimationGroup, AlignEdge, DistributeAxis, MergeShapeOperation, PasteSpecialFormat, CropSession, CropElementUpdate, TemplateElementMap, HistoryTheme, ElementBoxPatch, EditorHistoryController, InkStrokeView, InkPoint, MasterViewCrudAction, MasterViewCrudActionId, FreeformToolKind, EditPointsElementPatch, SlideTemplateId, SlideTemplateBuildOptions, SlidePasteRequest, RibbonTransitionDraft, CellCoord, CellRect, PendingInlineTextEdit, InlineListController, ElementClipboardPayload, TableStyleSaveOptions, FontEmbeddingDescriptor, InlineTextEditSnapshot, SnapGuideInput, CollaborationLivePatcher, InlineTextDraftSink, ResolvedKeyboardCustomization, MarqueeRect, ShapeAdjustmentHandleDescriptor, SnapLine, ResizeHandleId, ConnectorEndpointKind, CollaborationInlineEditor, FindResult, ViewerPreferences, ViewportFitPadding, SlideSizeEmu, CollabLoadOrigin, LoadLimitTranslate, CollaborationTransport, YDocLike, YjsFactories, CollabProviderHandle, BroadcastConfig, ElementAnimationState, AuthoredSlideRange, RunProgramNotice, ZoomNavigationTarget, PresentationSnapshot, AutosaveRecoveryPrompt, CompatibilityWarningToast, ReadOnlyRecommendation, ReadOnlyBannerPasswordError, ViewerOptions, ViewerOptionsStoreInit, ToolbarTabId, ViewerOptionsGroupId, ViewerOptionPrimitive, ViewerOptionsConstraints, CompareResult, Guide, DeckViewPreferences, ResolvedCustomization, ViewerMode, CollaborationShellState, AutosaveDisabledReason, MobileSheetKey, FieldSubstitutionContext } from 'ooxml-ui/pptx';
|
|
5
5
|
export { CanvasSize, CollaborationShellState, CollaborationState, ConnectionStatus, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, InlineListController, InlineListReadResult, InlineTextEditSnapshot, RemoteCursor, SanitizedPresence, ViewerTheme, zoomInPercent, zoomOutPercent } from 'ooxml-ui/pptx';
|
|
6
|
-
import { PptxAiConfig,
|
|
6
|
+
import { PptxAiConfig, PptxAiBridge as PptxAiBridge$1 } from 'ooxml-ui/pptx/ai';
|
|
7
7
|
export { PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiUIMessage, PptxAiWritePolicy } from 'ooxml-ui/pptx/ai';
|
|
8
8
|
import { LocaleCatalogEntry } from 'ooxml-ui/pptx/i18n';
|
|
9
9
|
import { PptxSlide, PptxData, SvgExportOptions, PptxCoreProperties, PptxSaveFormat, PptxElement, PptxChartData, PptxComment, PptxSlideMaster, PptxNotesMaster, PptxHandoutMaster, PptxSection, PptxHandler, PptxAnimationPreset, PptxHeaderFooter, PptxPresentationProperties, PptxCustomShow, PptxAppProperties, PptxCustomProperty, PptxTagCollection, TextSegment, MasterViewTab, ShapePptxElement, PptxLayoutOption, PptxLayoutPreview, PptxTransitionType, PptxSlideTransition, PptxTableData, PptxTheme, PptxViewProperties, PptxModernCommentAuthor, PptxCommentAuthor, PptxSlideSize, PptxThemeOption, ParsedTableStyleMap, PptxModifyVerifier, PptxCompatibilityWarning, PptxEmbeddedFont, PptxThemeColorScheme, PptxHandlerLoadOptions, PptxHandlerSaveOptions } from 'ooxml-core/pptx';
|
|
10
|
+
import { PptxAiNotifyLevel, PptxAiFocusedTarget, PptxAiBridge, AiChangeBatch, AiCanvasHighlight, ToolCanvasTarget } from 'ooxml-ui/pptx/ai/host';
|
|
10
11
|
|
|
11
12
|
/** Translate `key`, interpolating `{{name}}` placeholders from `params`. */
|
|
12
13
|
type Translator = (key: string, params?: Record<string, string | number>) => string;
|
|
@@ -320,6 +321,15 @@ interface PowerPointViewerProps extends ViewportFitOptions {
|
|
|
320
321
|
* A change applies from the next load.
|
|
321
322
|
*/
|
|
322
323
|
allowExternalContent?: boolean;
|
|
324
|
+
/**
|
|
325
|
+
* Bounds on the work loading a deck may do, for hosts that show untrusted
|
|
326
|
+
* decks: `maxInputBytes`, `maxUncompressedBytes`, `maxEntries`, `maxSlides`
|
|
327
|
+
* and `maxShapes` (see `PptxLoadLimits`). Unset keeps the core defaults
|
|
328
|
+
* (500 MiB inflated, 65,536 ZIP entries, no other limit). A deck over a
|
|
329
|
+
* limit shows the load-error screen with the limit and the deck's value.
|
|
330
|
+
* A change applies from the next load.
|
|
331
|
+
*/
|
|
332
|
+
limits?: PptxLoadLimits;
|
|
323
333
|
/** Show the thumbnail sidebar. Default true. */
|
|
324
334
|
showThumbnails?: boolean;
|
|
325
335
|
/** Show the navigation/zoom toolbar. Default true. */
|
|
@@ -2748,16 +2758,22 @@ declare class PresentationLoader {
|
|
|
2748
2758
|
*/
|
|
2749
2759
|
loadOrigin: CollabLoadOrigin;
|
|
2750
2760
|
/**
|
|
2751
|
-
* Options-derived load flags for `PptxHandler.load
|
|
2752
|
-
*
|
|
2753
|
-
* `
|
|
2761
|
+
* Options-derived load flags for `PptxHandler.load`: Trust Center > "Allow
|
|
2762
|
+
* external content", which core reads as `allowExternalImages`, and the
|
|
2763
|
+
* host `limits` prop. The composition root overwrites this once
|
|
2754
2764
|
* `ViewerOptionsState` exists, so every load call site (open file, restore
|
|
2755
2765
|
* version, collaboration bootstrap, ...) picks up the live Trust Center
|
|
2756
2766
|
* value without threading options through each of them individually. Left
|
|
2757
2767
|
* as its safe default (external images blocked) for callers that never set
|
|
2758
2768
|
* it, e.g. this class used stand-alone in a test.
|
|
2759
2769
|
*/
|
|
2760
|
-
getLoadOptions: () => Pick<PptxHandlerLoadOptions, 'allowExternalImages'>;
|
|
2770
|
+
getLoadOptions: () => Pick<PptxHandlerLoadOptions, 'allowExternalImages' | 'limits'>;
|
|
2771
|
+
/**
|
|
2772
|
+
* Translates the load-error text for a deck over a load limit (host
|
|
2773
|
+
* `limits` prop). Set by the composition root; left unset, the error keeps
|
|
2774
|
+
* the core's English message.
|
|
2775
|
+
*/
|
|
2776
|
+
translate: LoadLimitTranslate | undefined;
|
|
2761
2777
|
/** Parse a `.pptx` buffer into reactive viewer state. */
|
|
2762
2778
|
load(raw: Uint8Array | ArrayBuffer, origin?: CollabLoadOrigin): Promise<void>;
|
|
2763
2779
|
/**
|
|
@@ -3461,7 +3477,7 @@ declare class AiPanelController {
|
|
|
3461
3477
|
|
|
3462
3478
|
interface AiCluster {
|
|
3463
3479
|
/** The SDK-free bridge handed to the (lazily imported) chat panel. */
|
|
3464
|
-
readonly bridge: PptxAiBridge;
|
|
3480
|
+
readonly bridge: PptxAiBridge$1;
|
|
3465
3481
|
/** On-canvas scope: focus targets, pick mode, live tool-focus highlights. */
|
|
3466
3482
|
readonly panel: AiPanelController;
|
|
3467
3483
|
/** Whether the right-side chat panel is open (ribbon Sparkles toggle). */
|
|
@@ -3815,6 +3831,8 @@ interface CreateViewerStateOptions {
|
|
|
3815
3831
|
getGoogleFonts?: () => GoogleFontsOption | undefined;
|
|
3816
3832
|
/** Host `allowExternalContent` prop: overrides the Trust Center setting for every load when set. */
|
|
3817
3833
|
getAllowExternalContent?: () => boolean | undefined;
|
|
3834
|
+
/** Host `limits` prop: the load limits passed to every load (unset keeps the core defaults). */
|
|
3835
|
+
getLimits?: () => PptxLoadLimits | undefined;
|
|
3818
3836
|
/** Already locale-bound translator; propagated to descendants via context. */
|
|
3819
3837
|
t: Translator;
|
|
3820
3838
|
getSmartArt3D: () => boolean;
|
package/dist/viewer/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../transition-overlay-
|
|
2
|
-
import { S as e, _ as a, a as S, b as o, c as v, d as n, f as d, g as r, h as b, i as p, l as c, m, n as g, o as x, p as w, r as C, s as T, t as $, u as y, v as s, x as t } from "../export-
|
|
1
|
+
import "../transition-overlay-BKRKblpi.js";
|
|
2
|
+
import { S as e, _ as a, a as S, b as o, c as v, d as n, f as d, g as r, h as b, i as p, l as c, m, n as g, o as x, p as w, r as C, s as T, t as $, u as y, v as s, x as t } from "../export-DaWq0oYe.js";
|
|
3
3
|
var P = e, V = t, u = s, A = a, R = r, f = o;
|
|
4
4
|
export {
|
|
5
5
|
A as CollaborationCursors,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as pr, M as gr, j as Fe } from "./transition-overlay-
|
|
1
|
+
import { A as pr, M as gr, j as Fe } from "./transition-overlay-BKRKblpi.js";
|
|
2
2
|
import { $ as yr, A as br, B as Ct, D as mr, E as ut, F as _r, G as Ye, H as vr, I as Mt, J as je, K as wr, L as lt, M as se, O as Er, P as ae, R as ce, S as Cr, T as Rr, U as Rt, V as Sr, W as St, X as Tr, Y as ht, Z as Ar, _ as kr, a as Or, at as xr, b as Ge, c as Nr, d as Lr, et as Mr, f as Dr, g as Ir, i as Tt, it as Pr, j as it, k as Dt, l as jr, m as Ur, n as Br, nt as ft, o as It, ot as Fr, p as $r, q as Pt, r as $e, rt as jt, s as qr, st, t as Wr, tt as dt, u as Hr, v as Vr, w as Ut, x as Yr, y as Gr, z as Le } from "./awareness-BwmJcSKy.js";
|
|
3
3
|
import "yjs";
|
|
4
4
|
var zr = 1200, Kr = 2500, qe = 3e4, ot = (r) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pptx-svelte-viewer",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.53.0",
|
|
4
4
|
"description": "pptx-viewer for Svelte 5: a PowerPoint viewer and editor component to render, edit, present, and export PPTX slides in the browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"office",
|
|
@@ -111,29 +111,29 @@
|
|
|
111
111
|
"pack": "bun run build && bun pm pack"
|
|
112
112
|
},
|
|
113
113
|
"dependencies": {
|
|
114
|
-
"@lucide/svelte": "^1.
|
|
114
|
+
"@lucide/svelte": "^1.61.0",
|
|
115
115
|
"fast-xml-parser": "^5.11.2",
|
|
116
116
|
"html2canvas-pro": "^2.5.2",
|
|
117
117
|
"jspdf": "^4.2.1",
|
|
118
118
|
"jszip": "^3.10.2",
|
|
119
|
-
"ooxml-core": "^1.
|
|
120
|
-
"ooxml-ui": "^1.
|
|
119
|
+
"ooxml-core": "^1.28.0",
|
|
120
|
+
"ooxml-ui": "^1.29.0",
|
|
121
121
|
"opentype.js": "^2.0.0"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
|
-
"@ai-sdk/svelte": "^5.0.
|
|
124
|
+
"@ai-sdk/svelte": "^5.0.150",
|
|
125
125
|
"@microsoft/api-extractor": "^7.59.3",
|
|
126
126
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
127
127
|
"@types/opentype.js": "^1.3.10",
|
|
128
|
-
"ai": "^7.0.
|
|
129
|
-
"happy-dom": "^21.0.
|
|
128
|
+
"ai": "^7.0.150",
|
|
129
|
+
"happy-dom": "^21.0.4",
|
|
130
130
|
"pptx-viewer-core": "^4.13.5",
|
|
131
|
-
"rollup": "^4.
|
|
131
|
+
"rollup": "^4.65.0",
|
|
132
132
|
"rollup-plugin-dts": "^6.5.1",
|
|
133
133
|
"svelte": "^5.57.2",
|
|
134
134
|
"svelte-check": "^4.7.7",
|
|
135
135
|
"typescript": "6.0.3",
|
|
136
|
-
"vite": "^8.3.
|
|
136
|
+
"vite": "^8.3.5",
|
|
137
137
|
"vite-plugin-dts": "^5.1.2",
|
|
138
138
|
"vitest": "^5.0.5",
|
|
139
139
|
"y-webrtc": "^10.3.0",
|