pptx-vue-viewer 1.1.13 → 1.1.14

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.
Files changed (59) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.cjs.br +0 -0
  3. package/dist/index.cjs.gz +0 -0
  4. package/dist/index.js +1 -1
  5. package/dist/index.js.br +0 -0
  6. package/dist/index.js.gz +0 -0
  7. package/dist/viewer/PowerPointViewer.vue.d.ts.map +1 -1
  8. package/dist/viewer/components/ChartRenderer.vue.d.ts +14 -15
  9. package/dist/viewer/components/ChartRenderer.vue.d.ts.map +1 -1
  10. package/dist/viewer/components/ConnectorRenderer.vue.d.ts +16 -9
  11. package/dist/viewer/components/ConnectorRenderer.vue.d.ts.map +1 -1
  12. package/dist/viewer/components/SmartArtRenderer.vue.d.ts.map +1 -1
  13. package/dist/viewer/components/TableRenderer.vue.d.ts +17 -5
  14. package/dist/viewer/components/TableRenderer.vue.d.ts.map +1 -1
  15. package/dist/viewer/components/chart/BoxWhiskerChart.vue.d.ts +17 -0
  16. package/dist/viewer/components/chart/BoxWhiskerChart.vue.d.ts.map +1 -0
  17. package/dist/viewer/components/chart/BubbleChart.vue.d.ts +16 -0
  18. package/dist/viewer/components/chart/BubbleChart.vue.d.ts.map +1 -0
  19. package/dist/viewer/components/chart/ComboChart.vue.d.ts +17 -0
  20. package/dist/viewer/components/chart/ComboChart.vue.d.ts.map +1 -0
  21. package/dist/viewer/components/chart/FunnelChart.vue.d.ts +15 -0
  22. package/dist/viewer/components/chart/FunnelChart.vue.d.ts.map +1 -0
  23. package/dist/viewer/components/chart/HistogramChart.vue.d.ts +17 -0
  24. package/dist/viewer/components/chart/HistogramChart.vue.d.ts.map +1 -0
  25. package/dist/viewer/components/chart/RadarChart.vue.d.ts +15 -0
  26. package/dist/viewer/components/chart/RadarChart.vue.d.ts.map +1 -0
  27. package/dist/viewer/components/chart/ScatterChart.vue.d.ts +15 -0
  28. package/dist/viewer/components/chart/ScatterChart.vue.d.ts.map +1 -0
  29. package/dist/viewer/components/chart/StockChart.vue.d.ts +17 -0
  30. package/dist/viewer/components/chart/StockChart.vue.d.ts.map +1 -0
  31. package/dist/viewer/components/chart/SunburstChart.vue.d.ts +15 -0
  32. package/dist/viewer/components/chart/SunburstChart.vue.d.ts.map +1 -0
  33. package/dist/viewer/components/chart/TreemapChart.vue.d.ts +16 -0
  34. package/dist/viewer/components/chart/TreemapChart.vue.d.ts.map +1 -0
  35. package/dist/viewer/components/chart/WaterfallChart.vue.d.ts +16 -0
  36. package/dist/viewer/components/chart/WaterfallChart.vue.d.ts.map +1 -0
  37. package/dist/viewer/composables/connector-routing.d.ts +41 -0
  38. package/dist/viewer/composables/connector-routing.d.ts.map +1 -0
  39. package/dist/viewer/composables/smartart-layout.d.ts +190 -0
  40. package/dist/viewer/composables/smartart-layout.d.ts.map +1 -0
  41. package/dist/viewer/composables/table-theme.d.ts +26 -0
  42. package/dist/viewer/composables/table-theme.d.ts.map +1 -0
  43. package/dist/viewer/index.cjs +1 -1
  44. package/dist/viewer/index.cjs.br +0 -0
  45. package/dist/viewer/index.cjs.gz +0 -0
  46. package/dist/viewer/index.js +1 -1
  47. package/dist/viewer/index.js.br +0 -0
  48. package/dist/viewer/index.js.gz +0 -0
  49. package/dist/{viewer-DOKNVF1b.js → viewer-Bi7iG1IX.js} +3800 -1945
  50. package/dist/viewer-Bi7iG1IX.js.br +0 -0
  51. package/dist/viewer-Bi7iG1IX.js.gz +0 -0
  52. package/dist/{viewer-QVDbby6z.cjs → viewer-DDcaEXYx.cjs} +4485 -2631
  53. package/dist/viewer-DDcaEXYx.cjs.br +0 -0
  54. package/dist/viewer-DDcaEXYx.cjs.gz +0 -0
  55. package/package.json +1 -1
  56. package/dist/viewer-DOKNVF1b.js.br +0 -0
  57. package/dist/viewer-DOKNVF1b.js.gz +0 -0
  58. package/dist/viewer-QVDbby6z.cjs.br +0 -0
  59. package/dist/viewer-QVDbby6z.cjs.gz +0 -0
@@ -0,0 +1,190 @@
1
+ import { PptxSmartArtNode, SmartArtLayout, SmartArtLayoutType, SmartArtStyle } from 'pptx-viewer-core';
2
+ /** Axis-aligned rectangle. */
3
+ export interface LayoutRect {
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ /** A node rendered as an SVG rect (rounded or flat). */
10
+ export interface RenderedRectNode {
11
+ kind: 'rect';
12
+ key: string;
13
+ x: number;
14
+ y: number;
15
+ width: number;
16
+ height: number;
17
+ rx: number;
18
+ fill: string;
19
+ stroke: string;
20
+ strokeWidth: number;
21
+ opacity: number;
22
+ text: string;
23
+ fontSize: number;
24
+ /** Centre x for text anchor. */
25
+ textX: number;
26
+ /** Centre y for text anchor. */
27
+ textY: number;
28
+ }
29
+ /** A node rendered as an SVG circle. */
30
+ export interface RenderedCircleNode {
31
+ kind: 'circle';
32
+ key: string;
33
+ cx: number;
34
+ cy: number;
35
+ r: number;
36
+ fill: string;
37
+ stroke: string;
38
+ strokeWidth: number;
39
+ opacity: number;
40
+ text: string;
41
+ fontSize: number;
42
+ }
43
+ /** A node rendered as an SVG polygon (chevron, trapezoid, etc.). */
44
+ export interface RenderedPolygonNode {
45
+ kind: 'polygon';
46
+ key: string;
47
+ points: string;
48
+ fill: string;
49
+ stroke: string;
50
+ strokeWidth: number;
51
+ opacity: number;
52
+ text: string;
53
+ fontSize: number;
54
+ /** Centre x for text anchor. */
55
+ textX: number;
56
+ /** Centre y for text anchor. */
57
+ textY: number;
58
+ }
59
+ export type RenderedNode = RenderedRectNode | RenderedCircleNode | RenderedPolygonNode;
60
+ /** A connector line between two rendered nodes. */
61
+ export interface RenderedConnector {
62
+ key: string;
63
+ /** SVG path data string. */
64
+ d: string;
65
+ }
66
+ /** Complete layout output for a single SmartArt family. */
67
+ export interface SmartArtLayoutResult {
68
+ /** Rendered geometry nodes. */
69
+ nodes: RenderedNode[];
70
+ /** Connector lines (may be empty). */
71
+ connectors: RenderedConnector[];
72
+ /** SVG filter string for drop shadows, e.g. `"drop-shadow(…)"`. */
73
+ shadowFilter: string | undefined;
74
+ /**
75
+ * Suggested viewBox string `"0 0 W H"`.
76
+ * Callers should use the element's actual pixel dimensions.
77
+ */
78
+ viewBox: string;
79
+ /** The layout family that was applied. */
80
+ family: LayoutFamily;
81
+ }
82
+ interface TreeNode {
83
+ node: PptxSmartArtNode;
84
+ children: TreeNode[];
85
+ }
86
+ /** Pick a colour from the palette, cycling for any index. */
87
+ export declare function colour(index: number, palette: string[]): string;
88
+ /** Compute a fading opacity for progressive nodes. */
89
+ export declare function nodeOpacity(index: number, total: number, style: SmartArtStyle): number;
90
+ /** Drop-shadow filter string for the given style. */
91
+ export declare function styleShadow(style: SmartArtStyle): string | undefined;
92
+ /** Stroke width for node outlines. */
93
+ export declare function styleStroke(style: SmartArtStyle): number;
94
+ /** Truncate text at `max` chars, appending ellipsis. */
95
+ export declare function truncate(text: string, max: number): string;
96
+ /**
97
+ * Fit font size to available space.
98
+ * Uses a 0.6 char-width heuristic; clamps to 6 px minimum.
99
+ */
100
+ export declare function fitFontSize(text: string, maxWidth: number, maxHeight: number, baseSize: number): number;
101
+ /**
102
+ * Build a forest from a node array.
103
+ *
104
+ * Supports two input shapes:
105
+ * 1. Flat list with `parentId` pointers (the format the core emits after
106
+ * parsing flat `<dgm:pt>` elements).
107
+ * 2. Nested list where each node already carries a `children` array (the
108
+ * format produced when the core emits pre-nested nodes).
109
+ *
110
+ * When all root nodes already have `children`, the existing nesting is used
111
+ * directly. Otherwise the flat `parentId` approach is used to build the tree.
112
+ */
113
+ export declare function buildTree(nodes: PptxSmartArtNode[]): TreeNode[];
114
+ /** Total leaf-width of a tree node (1 for leaves, sum of children otherwise). */
115
+ export declare function treeWidth(t: TreeNode): number;
116
+ /** Maximum depth of a tree node (1 for leaves). */
117
+ export declare function treeDepth(t: TreeNode): number;
118
+ export type LayoutFamily = 'list' | 'process' | 'cycle' | 'hierarchy' | 'matrix' | 'radial' | 'pyramid' | 'venn' | 'funnel' | 'target';
119
+ /**
120
+ * Determine which layout family to render.
121
+ *
122
+ * Priority:
123
+ * 1. Named layout preset (`layout` field)
124
+ * 2. `resolvedLayoutType` string from the core parser
125
+ * 3. Heuristic: nodes with children → hierarchy; otherwise list
126
+ */
127
+ export declare function resolveLayoutFamily(nodes: PptxSmartArtNode[], resolvedLayoutType?: SmartArtLayoutType, layout?: SmartArtLayout): LayoutFamily;
128
+ /** Bounding box passed to every layout function. */
129
+ export interface BoundingBox {
130
+ width: number;
131
+ height: number;
132
+ }
133
+ /**
134
+ * Vertical stacked rounded-rectangles list.
135
+ */
136
+ export declare function computeListLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string): SmartArtLayoutResult;
137
+ /**
138
+ * Horizontal chevron/arrow process layout.
139
+ */
140
+ export declare function computeProcessLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string): SmartArtLayoutResult;
141
+ /**
142
+ * Circular arrangement of nodes with arc connectors.
143
+ */
144
+ export declare function computeCycleLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string): SmartArtLayoutResult;
145
+ /**
146
+ * Tree / org-chart hierarchy with L-shaped connector lines.
147
+ * Falls back to list layout if the tree cannot be built.
148
+ */
149
+ export declare function computeHierarchyLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string): SmartArtLayoutResult;
150
+ /**
151
+ * Grid (ceil(sqrt(n)) × rows) layout.
152
+ */
153
+ export declare function computeMatrixLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string): SmartArtLayoutResult;
154
+ /**
155
+ * Centre node + satellite nodes arranged radially.
156
+ */
157
+ export declare function computeRadialLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string): SmartArtLayoutResult;
158
+ /**
159
+ * Stacked trapezoids forming a pyramid shape (widest at bottom).
160
+ */
161
+ export declare function computePyramidLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string): SmartArtLayoutResult;
162
+ /**
163
+ * Overlapping circles arranged radially (≤4 nodes) or horizontally (5+).
164
+ */
165
+ export declare function computeVennLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string): SmartArtLayoutResult;
166
+ /**
167
+ * Narrowing trapezoid stages forming a funnel.
168
+ */
169
+ export declare function computeFunnelLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string): SmartArtLayoutResult;
170
+ /**
171
+ * Concentric circles (bullseye) with leader lines to the right.
172
+ */
173
+ export declare function computeTargetLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string): SmartArtLayoutResult;
174
+ /**
175
+ * Compute the SVG layout for a SmartArt element when drawing shapes are absent.
176
+ *
177
+ * @param nodes - Flat/nested node array from `PptxSmartArtData`.
178
+ * @param box - Pixel bounding box of the element.
179
+ * @param palette - Resolved colour palette.
180
+ * @param style - Resolved SmartArt style intensity.
181
+ * @param elementId - Element ID (used for stable SVG key generation).
182
+ * @param resolvedLayoutType - Layout type string from the core parser.
183
+ * @param layout - Named layout preset.
184
+ * @returns Complete layout geometry for the resolved family.
185
+ */
186
+ export declare function computeSmartArtLayout(nodes: PptxSmartArtNode[], box: BoundingBox, palette: string[], style: SmartArtStyle, elementId: string, resolvedLayoutType?: SmartArtLayoutType, layout?: SmartArtLayout): SmartArtLayoutResult;
187
+ /** Depth-first flatten of nested node forest. */
188
+ export declare function flattenNodes(roots: PptxSmartArtNode[]): PptxSmartArtNode[];
189
+ export {};
190
+ //# sourceMappingURL=smartart-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smartart-layout.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/smartart-layout.ts"],"names":[],"mappings":"AAAA;;;;;;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,EACpB,SAAS,EAAE,MAAM,GACf,oBAAoB,CAyEtB;AAID;;GAEG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,gBAAgB,EAAE,EACzB,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,MAAM,EAAE,EACjB,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,MAAM,GACf,oBAAoB,CAiDtB;AAID;;GAEG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,gBAAgB,EAAE,EACzB,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,MAAM,EAAE,EACjB,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,MAAM,GACf,oBAAoB,CAgCtB;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,gBAAgB,EAAE,EACzB,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,MAAM,EAAE,EACjB,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,MAAM,EACjB,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,MAAM,CAAC,EAAE,cAAc,GACrB,oBAAoB,CA6BtB;AAED,iDAAiD;AACjD,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAY1E"}
@@ -0,0 +1,26 @@
1
+ import { ParsedTableStyleMap, PptxThemeColorScheme } from 'pptx-viewer-core';
2
+ import { InjectionKey, MaybeRefOrGetter } from 'vue';
3
+ /**
4
+ * PPTX-content theme context made available to table cells for resolving
5
+ * banded-row / header / total emphasis colours against the real presentation
6
+ * colour scheme (and, when available, the parsed `ppt/tableStyles.xml` map).
7
+ *
8
+ * This is provided once at the viewer root via {@link TableThemeKey} and
9
+ * injected by `TableRenderer`, so the hot `SlideStage` → `ElementRenderer`
10
+ * prop chain does not have to thread the theme through every element.
11
+ */
12
+ export interface TableThemeContext {
13
+ colorScheme?: PptxThemeColorScheme;
14
+ tableStyleMap?: ParsedTableStyleMap;
15
+ }
16
+ /** Typed injection key for the table theme context (reactive getter or ref). */
17
+ export declare const TableThemeKey: InjectionKey<MaybeRefOrGetter<TableThemeContext | undefined>>;
18
+ /**
19
+ * Resolve the injected {@link TableThemeContext}, if any. Must be called from a
20
+ * component `setup`. Returns the raw injected getter/ref so the caller can read
21
+ * it reactively inside a `computed` via {@link resolveTableTheme}.
22
+ */
23
+ export declare function injectTableTheme(): MaybeRefOrGetter<TableThemeContext | undefined> | undefined;
24
+ /** Unwrap an injected table-theme source to its current value (reactive-safe inside `computed`). */
25
+ export declare function resolveTableTheme(source: MaybeRefOrGetter<TableThemeContext | undefined> | undefined): TableThemeContext | undefined;
26
+ //# sourceMappingURL=table-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-theme.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/table-theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAG1D;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IACjC,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACpC;AAED,gFAAgF;AAChF,eAAO,MAAM,aAAa,EAAE,YAAY,CAAC,gBAAgB,CAAC,iBAAiB,GAAG,SAAS,CAAC,CACzD,CAAC;AAEhC;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,gBAAgB,CAAC,iBAAiB,GAAG,SAAS,CAAC,GAAG,SAAS,CAE9F;AAED,oGAAoG;AACpG,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,gBAAgB,CAAC,iBAAiB,GAAG,SAAS,CAAC,GAAG,SAAS,GACjE,iBAAiB,GAAG,SAAS,CAE/B"}
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const e = require("../viewer-QVDbby6z.cjs");
2
+ const e = require("../viewer-DDcaEXYx.cjs");
3
3
  exports.ChartRenderer = e.ChartRenderer_default, exports.ConnectorRenderer = e.ConnectorRenderer_default, exports.DEFAULT_CANVAS_HEIGHT = e.DEFAULT_CANVAS_HEIGHT, exports.DEFAULT_CANVAS_WIDTH = e.DEFAULT_CANVAS_WIDTH, exports.DEFAULT_FILL_COLOR = e.DEFAULT_FILL_COLOR, exports.DEFAULT_STROKE_COLOR = e.DEFAULT_STROKE_COLOR, exports.DEFAULT_TEXT_COLOR = e.DEFAULT_TEXT_COLOR, exports.ElementRenderer = e.ElementRenderer_default, exports.EquationRenderer = e.EquationRenderer_default, exports.InkRenderer = e.InkRenderer_default, exports.Model3DRenderer = e.Model3DRenderer_default, exports.OleRenderer = e.OleRenderer_default, exports.PowerPointViewer = e.PowerPointViewer_default, exports.SlideCanvas = e.SlideCanvas_default, exports.SlideStage = e.SlideStage_default, exports.SmartArtRenderer = e.SmartArtRenderer_default, exports.TableRenderer = e.TableRenderer_default, exports.WordArtText = e.WordArtText_default, exports.ZoomRenderer = e.ZoomRenderer_default, exports.buildInitialGuides = e.buildInitialGuides, exports.collectImagePaths = e.collectImagePaths, exports.collectMediaElements = e.collectMediaElements, exports.getContainerStyle = e.getContainerStyle, exports.getImageSrc = e.getImageSrc, exports.getResolvedShapeClipPath = e.getResolvedShapeClipPath, exports.getResolvedShapeClipPathFor = e.getResolvedShapeClipPathFor, exports.getShapeFillStrokeStyle = e.getShapeFillStrokeStyle, exports.getTextBlockStyle = e.getTextBlockStyle, exports.useEditorHistory = e.useEditorHistory, exports.useEditorOperations = e.useEditorOperations, exports.useLoadContent = e.useLoadContent;
Binary file
Binary file
@@ -1,2 +1,2 @@
1
- import { A as a, D as s, E as e, I as r, L as n, M as d, O as o, T as t, _ as R, a as i, b as l, c as m, d as S, f as p, g as v, h as w, i as x, j as A, k as C, l as E, m as T, n as b, o as c, p as f, r as g, s as h, t as j, u as k, v as u, x as D, y as I } from "../viewer-DOKNVF1b.js";
1
+ import { A as a, D as s, E as e, I as r, L as n, M as d, O as o, T as t, _ as R, a as i, b as l, c as m, d as S, f as p, g as v, h as w, i as x, j as A, k as C, l as E, m as T, n as b, o as c, p as f, r as g, s as h, t as j, u as k, v as u, x as D, y as I } from "../viewer-Bi7iG1IX.js";
2
2
  export { R as ChartRenderer, v as ConnectorRenderer, t as DEFAULT_CANVAS_HEIGHT, e as DEFAULT_CANVAS_WIDTH, s as DEFAULT_FILL_COLOR, o as DEFAULT_STROKE_COLOR, C as DEFAULT_TEXT_COLOR, h as ElementRenderer, w as EquationRenderer, T as InkRenderer, f as Model3DRenderer, p as OleRenderer, j as PowerPointViewer, i as SlideCanvas, c as SlideStage, S as SmartArtRenderer, k as TableRenderer, E as WordArtText, m as ZoomRenderer, a as buildInitialGuides, A as collectImagePaths, d as collectMediaElements, u as getContainerStyle, I as getImageSrc, r as getResolvedShapeClipPath, n as getResolvedShapeClipPathFor, l as getShapeFillStrokeStyle, D as getTextBlockStyle, x as useEditorHistory, g as useEditorOperations, b as useLoadContent };
Binary file
Binary file