pptx-svelte-viewer 4.24.3 → 4.26.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.
@@ -252,6 +252,7 @@ var n = {
252
252
  "pptx.gallery.smartArtStyles.title": "SmartArt Styles",
253
253
  "pptx.gallery.smartArtColors.title": "Change Colors",
254
254
  "pptx.gallery.smartArtLayouts.title": "Layouts",
255
+ "pptx.gallery.smartArtLayouts.named": "{{name}}",
255
256
  "pptx.gallery.smartArtCommand.addShape": "Add Shape",
256
257
  "pptx.gallery.smartArtCommand.addBullet": "Add Bullet",
257
258
  "pptx.gallery.smartArtCommand.textPane": "Text Pane",
@@ -3,6 +3,7 @@ import { Component } from 'svelte';
3
3
  import { PptxTheme, PptxThemeColorRef, PptxLayoutPreview, PptxTransitionType, PptxSlideTransition, TextSegment, MasterViewTab, PptxElement, PptxSection, PptxSlide, ShapePptxElement, PptxHandler, TextStyle, PptxData, SvgExportOptions, PptxSaveFormat, PptxChartData, PptxComment, PptxSlideMaster, PptxNotesMaster, PptxHandoutMaster, PptxAnimationPreset, MergeShapeOperation, PptxHeaderFooter, PptxPresentationProperties, PptxCustomShow, PptxCoreProperties, PptxAppProperties, PptxCustomProperty, PptxTagCollection, PptxLayoutOption, PptxTableData, PptxViewProperties, PptxModernCommentAuthor, PptxCommentAuthor, PptxSlideSize, ParsedTableStyleMap, PptxModifyVerifier, PptxCompatibilityWarning, PptxEmbeddedFont, PptxThemeOption, PptxThemeColorScheme, PptxHandlerLoadOptions, PptxHandlerSaveOptions } from 'ooxml-core/pptx';
4
4
  import { Doc } from 'yjs';
5
5
  import { LanguageModel, ChatTransport, UIMessage, ToolSet } from 'ai';
6
+ import { AlignEdge, DistributeAxis, SnapGuideInput, SnapLine } from 'pptx-viewer-core/geometry';
6
7
 
7
8
  //#region src/theme/types.d.ts
8
9
  /**
@@ -628,35 +629,6 @@ interface CellRect {
628
629
  endRow: number;
629
630
  endCol: number;
630
631
  }
631
- //#endregion
632
- //#region src/render/element-align.d.ts
633
- /**
634
- * Pure geometry helpers for the align / distribute editor operations.
635
- *
636
- * These functions operate over a list of slide elements (anything carrying the
637
- * `{ id, x, y, width, height }` bounding-box fields of {@link PptxElement}) and
638
- * return a `Map` keyed by element `id` describing the *new* position(s) for the
639
- * elements that need to move. Elements that already sit on the target edge (or
640
- * the two outer-most elements during distribution) are still included with
641
- * their unchanged coordinate so callers can apply the whole map uniformly; the
642
- * map only ever contains the axis that the operation touches.
643
- *
644
- * The reference box the selection is aligned against is either the union of
645
- * the selected boxes (PowerPoint's "Align Selected Objects") or the slide
646
- * itself ("Align to Slide"). PowerPoint defaults to the slide whenever a
647
- * single object is selected, which is why a one-element selection is not a
648
- * no-op once a `slideSize` is supplied: Align Center on a lone title is one
649
- * of the commonest arrange gestures there is.
650
- *
651
- * The helpers are deliberately framework-agnostic: no DOM, no Vue reactivity,
652
- * no side effects. The host wires them into the editor by feeding the current
653
- * selection in and applying the returned `Map` via its element-transform
654
- * operation (one batched history entry per call).
655
- */
656
- /** Edge / centre that {@link alignElements} can snap a selection to. */
657
- type AlignEdge = 'left' | 'centerH' | 'right' | 'top' | 'middle' | 'bottom';
658
- /** Axis along which {@link distributeElements} evenly spaces a selection. */
659
- type DistributeAxis = 'horizontal' | 'vertical';
660
632
  /** Minimum section metadata needed to build sidebar groups. */
661
633
  interface SectionGroupDescriptor {
662
634
  id: string;
@@ -697,16 +669,6 @@ interface SlideTemplateBuildOptions {
697
669
  */
698
670
  translate?: (key: string) => string;
699
671
  }
700
- /** A user-placed alignment guide: `axis: 'v'` is a vertical line at x=`position`. */
701
- interface SnapGuideInput {
702
- axis: 'h' | 'v';
703
- position: number;
704
- }
705
- /** A snap alignment line: `axis: 'v'` is a vertical line at x=`position`. */
706
- interface SnapLine {
707
- axis: 'h' | 'v';
708
- position: number;
709
- }
710
672
  /** Framework-neutral picture-bullet source, sizing, and accessible fallback. */
711
673
  interface PictureBulletMarker {
712
674
  src?: string;
@@ -1,17 +1,17 @@
1
- import { lv as l, uv as v } from "../transition-overlay-Bp4BTtV-.js";
2
- import { D as e, M as a, N as o, O as r, a as n, c as d, d as b, f as p, i as c, j as s, k as t, l as m, n as g, o as x, p as w, r as C, s as T, t as $, u } from "../export-By5DD9XI.js";
3
- var y = o, P = a, V = t, f = r, A = e, O = s;
1
+ import { av as l, iv as v } from "../transition-overlay-BkW9yQMT.js";
2
+ import { D as e, M as a, N as o, O as r, a as n, c as d, d as b, f as p, i as c, j as s, k as i, l as m, n as g, o as x, p as w, r as C, s as T, t as $, u as y } from "../export-iyQ8bG1f.js";
3
+ var P = o, V = a, f = i, u = r, A = e, O = s;
4
4
  export {
5
- f as CollaborationCursors,
5
+ u as CollaborationCursors,
6
6
  O as EditorLayer,
7
7
  $ as PowerPointViewer,
8
8
  c as PresentationLoader,
9
9
  A as RemoteSelectionOverlay,
10
- y as Ribbon,
11
- V as SlideCanvas,
10
+ P as Ribbon,
11
+ f as SlideCanvas,
12
12
  C as ViewerState,
13
- P as ViewerToolbar,
14
- u as clampSlideIndex,
13
+ V as ViewerToolbar,
14
+ y as clampSlideIndex,
15
15
  w as createSvelteAiBridge,
16
16
  g as createViewerState,
17
17
  n as exportAllSlidesToSvg,
@@ -21,6 +21,6 @@ export {
21
21
  m as exportSlideToSvgBlob,
22
22
  b as fitScale,
23
23
  p as resolveNavigationKey,
24
- l as zoomInPercent,
25
- v as zoomOutPercent
24
+ v as zoomInPercent,
25
+ l as zoomOutPercent
26
26
  };
@@ -1,5 +1,5 @@
1
1
  import { n as Fe, r as pr, t as gr } from "./rolldown-runtime--eTHp1Qs.js";
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-CWh9V5ZH.js";
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) => {
5
5
  if (r.shouldConnect && r.ws === null) {
@@ -1,4 +1,4 @@
1
- import { A as R, C as V, E as L, J as _, M as o, N as H, P as a, Q as E, R as i, Z as N, a as Q, c as $, d as O, et as j, h as U, i as k, j as z, k as J, l as r, n as Z, o as S, r as w, s as q, t as F, u as G, z as m } from "./awareness-CWh9V5ZH.js";
1
+ import { A as R, C as V, E as L, J as _, M as o, N as H, P as a, Q as E, R as i, Z as N, a as Q, c as $, d as O, et as j, h as U, i as k, j as z, k as J, l as r, n as Z, o as S, r as w, s as q, t as F, u as G, z as m } from "./awareness-BwmJcSKy.js";
2
2
  import "yjs";
3
3
  var K = (s, n, e) => {
4
4
  R(s) === 0 && e(n, J(s));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-svelte-viewer",
3
- "version": "4.24.3",
3
+ "version": "4.26.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",
@@ -17,16 +17,16 @@
17
17
  "svelte5",
18
18
  "viewer"
19
19
  ],
20
- "homepage": "https://github.com/ChristopherVR/pptx-viewer",
20
+ "homepage": "https://christophervr.github.io/ooxml/pptx/",
21
21
  "bugs": {
22
- "url": "https://github.com/ChristopherVR/pptx-viewer/issues"
22
+ "url": "https://github.com/ChristopherVR/ooxml/issues"
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "author": "ChristopherVR",
26
26
  "repository": {
27
27
  "type": "git",
28
- "url": "https://github.com/ChristopherVR/pptx-viewer.git",
29
- "directory": "packages/svelte"
28
+ "url": "git+https://github.com/ChristopherVR/ooxml.git",
29
+ "directory": "viewers/pptx/packages/svelte"
30
30
  },
31
31
  "files": [
32
32
  "dist/",
@@ -116,9 +116,9 @@
116
116
  "html2canvas-pro": "^2.5.1",
117
117
  "jspdf": "^4.2.1",
118
118
  "jszip": "^3.10.2",
119
- "ooxml-ui": "^0.28.0",
119
+ "ooxml-ui": "^0.30.1",
120
120
  "opentype.js": "^2.0.0",
121
- "pptx-viewer-mcp": "^2.7.1"
121
+ "pptx-viewer-mcp": "^2.7.2"
122
122
  },
123
123
  "devDependencies": {
124
124
  "@ai-sdk/svelte": "^5.0.127",
@@ -127,6 +127,7 @@
127
127
  "@types/opentype.js": "^1.3.10",
128
128
  "ai": "^7.0.127",
129
129
  "happy-dom": "^20.14.5",
130
+ "pptx-viewer-core": "^4.13.0",
130
131
  "rollup": "^4.64.0",
131
132
  "rollup-plugin-dts": "^6.5.1",
132
133
  "svelte": "^5.57.1",