@officedk/pptxdk 0.2.0 → 0.2.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/dist/build.d.ts +5 -8
- package/dist/build.js +44 -52
- package/dist/core/dist/capabilities/audio/audio-declaration.js +7 -0
- package/dist/core/dist/capabilities/audio/audio-source.js +172 -0
- package/dist/core/dist/capabilities/audio/entry.js +122 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/box/box-codegen.js +7 -8
- package/dist/{capabilities/dist → core/dist/capabilities}/box/box-declaration.js +8 -8
- package/dist/{capabilities/dist → core/dist/capabilities}/box/box.js +14 -15
- package/dist/core/dist/capabilities/box/entry.js +2 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-codegen.js +11 -18
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-declaration.js +2 -2
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-import.js +891 -468
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-labels.js +30 -3
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-model.js +1 -1
- package/dist/{capabilities/dist/chart/preview/number-format.js → core/dist/capabilities/chart/chart-number-format.js} +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-schemas.js +73 -79
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-xml.js +41 -36
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart.js +175 -113
- package/dist/core/dist/capabilities/chart/entry.js +2 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/axes-and-grid.js +2 -2
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/bar-column.js +1 -1
- package/dist/core/dist/capabilities/chart/preview/data-labels.js +474 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/error-bars.js +3 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/index.js +28 -9
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/layout.js +7 -9
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/legend.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/line-area.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/markers.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/pie-doughnut.js +39 -60
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/scales.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/scatter.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/style.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/text-render.js +34 -24
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/trendlines.js +3 -3
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/types.js +1 -1
- package/dist/core/dist/capabilities/comment/comment-codegen.js +25 -0
- package/dist/core/dist/capabilities/comment/comment-declaration.js +37 -0
- package/dist/core/dist/capabilities/comment/comment-import.js +176 -0
- package/dist/core/dist/capabilities/comment/comment.js +141 -0
- package/dist/core/dist/capabilities/comment/entry.js +1 -0
- package/dist/core/dist/capabilities/footer-placeholder/entry.js +2 -0
- package/dist/core/dist/capabilities/footer-placeholder/footer-placeholder-codegen.js +16 -0
- package/dist/{capabilities/dist/masters → core/dist/capabilities/footer-placeholder}/footer-placeholder.js +113 -50
- package/dist/core/dist/capabilities/footer-placeholder/print-header-footer-import.js +121 -0
- package/dist/core/dist/capabilities/footer-placeholder/print-header-footer.js +123 -0
- package/dist/core/dist/capabilities/group/entry.js +2 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/group/group-codegen.js +6 -7
- package/dist/{capabilities/dist → core/dist/capabilities}/group/group-declaration.js +8 -8
- package/dist/{capabilities/dist → core/dist/capabilities}/group/group-import.js +36 -77
- package/dist/{capabilities/dist → core/dist/capabilities}/group/group-xml.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/group/group.js +17 -17
- package/dist/core/dist/capabilities/image/entry.js +4 -0
- package/dist/core/dist/capabilities/image/image-codegen.js +59 -0
- package/dist/core/dist/capabilities/image/image-declaration.js +8 -0
- package/dist/core/dist/capabilities/image/image-import.js +26 -0
- package/dist/core/dist/capabilities/image/image.js +57 -0
- package/dist/core/dist/capabilities/line/entry.js +3 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/line/line-codegen.js +6 -7
- package/dist/{capabilities/dist → core/dist/capabilities}/line/line-declaration.js +15 -9
- package/dist/{capabilities/dist → core/dist/capabilities}/line/line-import.js +15 -95
- package/dist/{capabilities/dist → core/dist/capabilities}/line/line-xml.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/line/line.js +41 -43
- package/dist/core/dist/capabilities/masters/entry.js +1 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/masters/masters-codegen.js +7 -26
- package/dist/{capabilities/dist → core/dist/capabilities}/masters/masters.js +23 -35
- package/dist/core/dist/capabilities/motion/entry.js +5 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-codegen.js +15 -35
- package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-import.js +25 -9
- package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-plan.js +17 -14
- package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-query.js +2 -2
- package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion.js +79 -75
- package/dist/core/dist/capabilities/notes/entry.js +2 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-codegen.js +4 -5
- package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-declaration.js +2 -2
- package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-import.js +16 -13
- package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-schemas.js +6 -6
- package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes.js +16 -41
- package/dist/{import/dist/sections.js → core/dist/capabilities/notes/sections-import.js} +5 -5
- package/dist/core/dist/capabilities/placeholder/entry.js +3 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/placeholder/placeholder-codegen.js +5 -15
- package/dist/{capabilities/dist → core/dist/capabilities}/placeholder/placeholder-schemas.js +7 -9
- package/dist/{capabilities/dist → core/dist/capabilities}/placeholder/placeholder.js +50 -107
- package/dist/core/dist/capabilities/shape/entry.js +6 -0
- package/dist/core/dist/capabilities/shape/shape-codegen.js +112 -0
- package/dist/core/dist/capabilities/shape/shape-import.js +152 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/shape/shape-xml.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/shape/shape.js +44 -30
- package/dist/core/dist/capabilities/shared/container-slots.js +59 -0
- package/dist/core/dist/capabilities/shared/date-time.js +98 -0
- package/dist/{capabilities/dist → core/dist/capabilities/shared}/font/font-embedding.js +5 -6
- package/dist/{capabilities/dist → core/dist/capabilities/shared}/font/font-engine.js +34 -13
- package/dist/{capabilities/dist → core/dist/capabilities/shared}/font/font-import.js +62 -23
- package/dist/{capabilities/dist → core/dist/capabilities/shared}/font/font-subset.js +24 -9
- package/dist/{capabilities/dist → core/dist/capabilities/shared}/font/font.js +4 -4
- package/dist/core/dist/capabilities/shared/geometry-codegen.js +101 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/geometry.js +47 -44
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/identity.js +56 -38
- package/dist/core/dist/capabilities/shared/image-codegen.js +94 -0
- package/dist/{capabilities/dist/image → core/dist/capabilities/shared}/image-decode.js +17 -79
- package/dist/{capabilities/dist/image → core/dist/capabilities/shared}/image-schemas.js +16 -26
- package/dist/core/dist/capabilities/shared/line-match.js +78 -0
- package/dist/core/dist/capabilities/shared/media-codegen.js +86 -0
- package/dist/core/dist/capabilities/shared/media-import.js +156 -0
- package/dist/core/dist/capabilities/shared/media-placement.js +20 -0
- package/dist/core/dist/capabilities/shared/media-poster.js +50 -0
- package/dist/core/dist/capabilities/shared/media-schemas.js +60 -0
- package/dist/core/dist/capabilities/shared/media-source.js +107 -0
- package/dist/core/dist/capabilities/shared/media-trim.js +102 -0
- package/dist/core/dist/capabilities/shared/media.js +134 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/morph-api.js +5 -5
- package/dist/{capabilities/dist/motion → core/dist/capabilities/shared}/motion-api.js +112 -99
- package/dist/{capabilities/dist/motion → core/dist/capabilities/shared}/motion-schemas.js +19 -5
- package/dist/{capabilities/dist/image/image-import.js → core/dist/capabilities/shared/picture-import.js} +97 -158
- package/dist/core/dist/capabilities/shared/picture-xml.js +13 -0
- package/dist/core/dist/capabilities/shared/picture.js +510 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/placeholder-import.js +50 -20
- package/dist/core/dist/capabilities/shared/placeholder-roles.js +42 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/preset-definitions.js +1 -1
- package/dist/core/dist/capabilities/shared/print-xml.js +77 -0
- package/dist/{capabilities/dist/text/text-codegen.js → core/dist/capabilities/shared/rich-text-codegen.js} +23 -102
- package/dist/core/dist/capabilities/shared/rich-text-import.js +472 -0
- package/dist/{capabilities/dist/shape → core/dist/capabilities/shared}/shape-declaration.js +14 -14
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/style-inheritance.js +12 -5
- package/dist/{capabilities/dist/text → core/dist/capabilities/shared}/text-declaration.js +7 -3
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/text-schemas.js +77 -77
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/text-service.js +571 -260
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/visual.js +137 -112
- package/dist/core/dist/capabilities/slide-background/entry.js +1 -0
- package/dist/core/dist/capabilities/slide-background/slide-background-codegen.js +15 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/slide-background/slide-background-import.js +5 -5
- package/dist/{capabilities/dist → core/dist/capabilities}/slide-background/slide-background-xml.js +2 -3
- package/dist/{capabilities/dist → core/dist/capabilities}/slide-background/slide-background.js +27 -33
- package/dist/core/dist/capabilities/table/entry.js +2 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/table/table-codegen.js +6 -13
- package/dist/{capabilities/dist → core/dist/capabilities}/table/table-declaration.js +2 -2
- package/dist/{capabilities/dist → core/dist/capabilities}/table/table-import.js +22 -57
- package/dist/{capabilities/dist → core/dist/capabilities}/table/table-schemas.js +40 -37
- package/dist/{capabilities/dist → core/dist/capabilities}/table/table-xml.js +9 -4
- package/dist/{capabilities/dist → core/dist/capabilities}/table/table.js +60 -45
- package/dist/core/dist/capabilities/text/entry.js +3 -0
- package/dist/core/dist/capabilities/text/text-codegen.js +66 -0
- package/dist/core/dist/capabilities/text/text-import.js +468 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/text/text-xml.js +3 -4
- package/dist/{capabilities/dist → core/dist/capabilities}/text/text.js +61 -54
- package/dist/core/dist/capabilities/transition/entry.js +3 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition-api.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition-codegen.js +2 -3
- package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition-import.js +25 -27
- package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition.js +23 -23
- package/dist/core/dist/capabilities/video/entry.js +77 -0
- package/dist/core/dist/capabilities/video/video-declaration.js +7 -0
- package/dist/core/dist/capabilities/video/video-source.js +42 -0
- package/dist/{codegen/dist → core/dist/codegen}/assets.js +13 -8
- package/dist/{codegen/dist → core/dist/codegen}/codegen.js +54 -122
- package/dist/{codegen/dist → core/dist/codegen}/identifiers.js +17 -1
- package/dist/{codegen/dist → core/dist/codegen}/index.js +2 -2
- package/dist/{codegen/dist → core/dist/codegen}/printer.js +23 -4
- package/dist/core/dist/document/all.js +41 -0
- package/dist/core/dist/document/default.js +10 -0
- package/dist/core/dist/document/document.js +218 -0
- package/dist/core/dist/document/index.js +62 -0
- package/dist/core/dist/document/stages.js +54 -0
- package/dist/{emit/dist → core/dist/emit}/emit.js +122 -60
- package/dist/core/dist/emit/index.js +6 -0
- package/dist/core/dist/emit/ooxml.js +241 -0
- package/dist/{import/dist → core/dist/import}/import.js +221 -187
- package/dist/core/dist/import/index.js +19 -0
- package/dist/{import/dist → core/dist/import}/masters.js +253 -317
- package/dist/core/dist/import/media-timing.js +233 -0
- package/dist/{import/dist → core/dist/import}/notes-masters.js +48 -45
- package/dist/core/dist/index.js +47 -15
- package/dist/core/dist/{author-ids.js → kernel/author-ids.js} +1 -1
- package/dist/core/dist/{author-schemas.js → kernel/author-schemas.js} +59 -98
- package/dist/core/dist/{block-flex-layout.js → kernel/block-flex-layout.js} +109 -78
- package/dist/core/dist/kernel/build.js +4 -0
- package/dist/core/dist/kernel/capability.js +17 -0
- package/dist/{codegen/dist/types.js → core/dist/kernel/codegen.js} +22 -2
- package/dist/core/dist/kernel/container-slots.js +104 -0
- package/dist/core/dist/kernel/date-time-format.js +18 -0
- package/dist/core/dist/kernel/declaration-snapshot.js +68 -0
- package/dist/core/dist/{declaration.js → kernel/declaration.js} +1 -1
- package/dist/core/dist/{diagnostics.js → kernel/diagnostics.js} +22 -5
- package/dist/core/dist/{document-internals.js → kernel/document-internals.js} +1 -1
- package/dist/core/dist/{document.js → kernel/document.js} +6 -5
- package/dist/core/dist/kernel/drawing-units.js +14 -0
- package/dist/core/dist/{font-seal.js → kernel/font-seal.js} +2 -2
- package/dist/core/dist/{geometry-schemas.js → kernel/geometry-schemas.js} +2 -6
- package/dist/core/dist/{grid-layout.js → kernel/grid-layout.js} +156 -55
- package/dist/core/dist/{host.js → kernel/host.js} +1 -1
- package/dist/core/dist/kernel/index.js +24 -0
- package/dist/core/dist/{input-values.js → kernel/input-values.js} +4 -3
- package/dist/core/dist/kernel/layout-definition.js +7 -0
- package/dist/core/dist/{layout-protocol.js → kernel/layout-protocol.js} +1 -1
- package/dist/core/dist/{layout-schemas.js → kernel/layout-schemas.js} +2 -6
- package/dist/core/dist/{layout.js → kernel/layout.js} +37 -38
- package/dist/core/dist/{masters.js → kernel/masters.js} +32 -55
- package/dist/core/dist/{morph.js → kernel/morph.js} +1 -1
- package/dist/core/dist/{placeholders.js → kernel/placeholders.js} +23 -9
- package/dist/{import/dist → core/dist/kernel/pptx-read}/alternate-content.js +1 -1
- package/dist/{import/dist → core/dist/kernel/pptx-read}/diagnostics.js +1 -1
- package/dist/core/dist/kernel/pptx-read/drawing-list-import.js +251 -0
- package/dist/{import/dist → core/dist/kernel/pptx-read}/fonts.js +1 -1
- package/dist/core/dist/kernel/pptx-read/index.js +15 -0
- package/dist/{import/dist → core/dist/kernel/pptx-read}/mechanism.js +1 -1
- package/dist/core/dist/kernel/pptx-read/media.js +26 -0
- package/dist/{import/dist → core/dist/kernel/pptx-read}/namespaces.js +5 -7
- package/dist/{import/dist → core/dist/kernel/pptx-read}/opc.js +62 -13
- package/dist/{import/dist → core/dist/kernel/pptx-read}/resources.js +1 -1
- package/dist/core/dist/kernel/pptx-read/shape-tree.js +57 -0
- package/dist/{import/dist → core/dist/kernel/pptx-read}/themes.js +40 -5
- package/dist/{import/dist → core/dist/kernel/pptx-read}/visual.js +94 -67
- package/dist/{import/dist → core/dist/kernel/pptx-read}/xml-fragments.js +56 -13
- package/dist/{import/dist → core/dist/kernel/pptx-read}/xml-reader.js +8 -1
- package/dist/{emit/dist → core/dist/kernel/pptx-write}/shape-tree.js +1 -1
- package/dist/core/dist/kernel/pptx-write/timing.js +52 -0
- package/dist/{emit/dist/ooxml.js → core/dist/kernel/pptx-write/xml.js} +62 -274
- package/dist/core/dist/{query.js → kernel/query.js} +5 -1
- package/dist/core/dist/{resolution.js → kernel/resolution.js} +1 -1
- package/dist/core/dist/kernel/resolve-work.js +58 -0
- package/dist/core/dist/{resolve.js → kernel/resolve.js} +226 -257
- package/dist/core/dist/kernel/resource-source.js +11 -0
- package/dist/core/dist/{stage-options.js → kernel/stage-options.js} +23 -11
- package/dist/core/dist/{theme.js → kernel/theme.js} +54 -36
- package/dist/core/dist/{transform-geometry.js → kernel/transform-geometry.js} +1 -1
- package/dist/core/dist/kernel/xml-values.js +13 -0
- package/dist/{document-41spD7bq.d.ts → document-C0lPlH-L.d.ts} +614 -522
- package/dist/{capability-BbKW9w4O.d.ts → index-B9_OUeA-.d.ts} +660 -553
- package/dist/{index-BEwhk7c8.d.ts → index-BJEzQxWV.d.ts} +27 -24
- package/dist/{index-cK2KtukZ.d.ts → index-DA9flrlR.d.ts} +2 -17
- package/dist/{index-v77CTJev.d.ts → index-GSt0t9VO.d.ts} +3 -4
- package/dist/index.d.ts +7 -8
- package/dist/index.js +68 -66
- package/dist/node.d.ts +16 -14
- package/dist/node.js +86 -43
- package/dist/pptxdk/src/cli-commands.js +9 -5
- package/dist/pptxdk/src/compose.js +28 -29
- package/dist/pptxdk/src/preview-result.js +24 -0
- package/dist/{capabilities/dist/image → preview/dist}/gif-decoder.js +5 -5
- package/dist/preview/dist/index.js +84 -34
- package/dist/preview/dist/options.js +8 -4
- package/dist/preview/dist/raster.js +66 -0
- package/dist/preview/dist/svg-guard.js +8 -7
- package/dist/preview.d.ts +3 -9
- package/dist/preview.js +7 -25
- package/dist/react/dist/append.js +3 -3
- package/dist/react/dist/author/audio-elements.js +14 -0
- package/dist/{capabilities/dist/box → react/dist/author}/box-elements.js +5 -3
- package/dist/react/dist/author/chart-elements.js +14 -0
- package/dist/react/dist/author/comment-elements.js +15 -0
- package/dist/react/dist/author/group-elements.js +14 -0
- package/dist/react/dist/author/image-elements.js +14 -0
- package/dist/react/dist/author/line-elements.js +14 -0
- package/dist/{capabilities/dist/motion → react/dist/author}/motion-elements.js +6 -4
- package/dist/react/dist/author/notes-elements.js +14 -0
- package/dist/react/dist/author/placeholder-elements.js +14 -0
- package/dist/react/dist/author/shape-elements.js +14 -0
- package/dist/{capabilities/dist/table → react/dist/author}/table-elements.js +6 -4
- package/dist/{capabilities/dist/text → react/dist/author}/text-elements.js +15 -5
- package/dist/react/dist/author/video-elements.js +14 -0
- package/dist/react/dist/document-adapter.js +4 -4
- package/dist/react/dist/elements.js +7 -4
- package/dist/react/dist/from-vanilla.js +3 -3
- package/dist/react/dist/index.js +17 -3
- package/dist/react/dist/reconciler.js +3 -3
- package/dist/react.d.ts +103 -69
- package/dist/react.js +28 -28
- package/dist/{index-1ag7U9Jt.d.ts → stages-DYHSHKt4.d.ts} +23 -6
- package/dist/vanilla.d.ts +4 -4
- package/dist/vanilla.js +14 -15
- package/package.json +2 -5
- package/dist/build-zrZuX4fK.d.ts +0 -3
- package/dist/capabilities/dist/all.js +0 -34
- package/dist/capabilities/dist/chart/chart-elements.js +0 -12
- package/dist/capabilities/dist/chart/preview/data-labels.js +0 -334
- package/dist/capabilities/dist/document.js +0 -168
- package/dist/capabilities/dist/group/group-elements.js +0 -12
- package/dist/capabilities/dist/image/image-codegen.js +0 -164
- package/dist/capabilities/dist/image/image-declaration.js +0 -8
- package/dist/capabilities/dist/image/image-elements.js +0 -12
- package/dist/capabilities/dist/image/image-xml.js +0 -12
- package/dist/capabilities/dist/image/image.js +0 -552
- package/dist/capabilities/dist/line/line-elements.js +0 -12
- package/dist/capabilities/dist/notes/notes-elements.js +0 -12
- package/dist/capabilities/dist/notes/notes-xml.js +0 -38
- package/dist/capabilities/dist/placeholder/placeholder-elements.js +0 -13
- package/dist/capabilities/dist/shape/shape-codegen.js +0 -236
- package/dist/capabilities/dist/shape/shape-elements.js +0 -12
- package/dist/capabilities/dist/shape/shape-import.js +0 -628
- package/dist/capabilities/dist/slide-background/slide-background-codegen.js +0 -44
- package/dist/capabilities/dist/text/text-import.js +0 -1224
- package/dist/core/dist/build.js +0 -4
- package/dist/core/dist/capability.js +0 -15
- package/dist/emit/dist/index.js +0 -5
- package/dist/import/dist/index.js +0 -16
- package/dist/pptxdk/src/slide.js +0 -9
- package/dist/transition-6n8GZxSg.d.ts +0 -9
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import { CapabilityError } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import "../../../import/dist/index.js";
|
|
6
|
-
import { defineCanvasMechanism } from "../../../import/dist/mechanism.js";
|
|
7
|
-
import { fontPresentationContributions } from "../font/font-embedding.js";
|
|
8
|
-
import { motionAnnotations, pickMotionProps } from "../motion/motion-api.js";
|
|
1
|
+
import { CapabilityError, zodIssueField } from "../../kernel/diagnostics.js";
|
|
2
|
+
import { fontPresentationContributions } from "../shared/font/font-embedding.js";
|
|
3
|
+
import { parseLinkTarget } from "../../kernel/author-schemas.js";
|
|
4
|
+
import { parseCapabilityLayoutContract } from "../../kernel/layout.js";
|
|
9
5
|
import { parseMorphKey, parseOptionalName } from "../shared/identity.js";
|
|
6
|
+
import { motionAnnotations, pickMotionProps } from "../shared/motion-api.js";
|
|
7
|
+
import { compatiblePlaceholderRoles } from "../shared/placeholder-roles.js";
|
|
8
|
+
import { defineCanvasMechanism } from "../../kernel/pptx-read/mechanism.js";
|
|
10
9
|
import { resolvePlaceholderGeometry } from "../shared/style-inheritance.js";
|
|
11
|
-
import { writeChartTextProperties, writeChartTitle } from "../shared/text-service.js";
|
|
10
|
+
import { declaredFontResourceClaims, writeChartTextProperties, writeChartTitle } from "../shared/text-service.js";
|
|
11
|
+
import "../../kernel/capability.js";
|
|
12
|
+
import "../../kernel/pptx-read/index.js";
|
|
13
|
+
import { effectiveThemeWithOverride, hasThemeOverrideContent, namespaces, themeOverrideContentType, themeOverridePartTemplate, themeOverrideXml } from "../../kernel/pptx-write/xml.js";
|
|
14
|
+
import { colorMapSchema, isFont, themeContextOverride, themeOverrideSchema, validateTextStyle } from "../../kernel/theme.js";
|
|
12
15
|
import { chartCodegen } from "./chart-codegen.js";
|
|
13
16
|
import { chartImportHandler, chartPlaceholderImportHandler } from "./chart-import.js";
|
|
14
|
-
import { mergeDataLabels } from "./chart-labels.js";
|
|
17
|
+
import { hasVisibleSeriesDataLabels, mergeDataLabels } from "./chart-labels.js";
|
|
15
18
|
import { textOnlyChartStyle } from "./chart-model.js";
|
|
16
|
-
import { chartAllowedPropKeys, chartStyleKeys, parseChartAxisBySchema, parseChartCoordinateBySchema, parseChartDisplayBlanksAsBySchema, parseChartExtentBySchema, parseChartGroupBySchema, parseChartLegendBySchema, parseChartPlotAreaBySchema, parseChartTitleBySchema, parseChartXmlTextBySchema } from "./chart-schemas.js";
|
|
19
|
+
import { chartAllowedPropKeys, chartStyleKeys, chartTextStyleSchema, parseChartAxisBySchema, parseChartCoordinateBySchema, parseChartDisplayBlanksAsBySchema, parseChartExtentBySchema, parseChartGroupBySchema, parseChartLegendBySchema, parseChartPlotAreaBySchema, parseChartTitleBySchema, parseChartXmlTextBySchema } from "./chart-schemas.js";
|
|
17
20
|
import { chartFrameXml, chartPartXml, chartUsesCategoryLabelRange, chartWorkbook } from "./chart-xml.js";
|
|
18
21
|
import { drawChartPreview } from "./preview/index.js";
|
|
22
|
+
import { collectLegendEntries } from "./preview/legend.js";
|
|
19
23
|
import "./chart-declaration.js";
|
|
20
|
-
// ../
|
|
24
|
+
// ../core/dist/capabilities/chart/chart.js
|
|
21
25
|
const chartRelationship = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart";
|
|
22
26
|
const packageRelationship = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package";
|
|
23
27
|
const chartContentType = "application/vnd.openxmlformats-officedocument.drawingml.chart+xml";
|
|
@@ -30,25 +34,22 @@ const nativeAxisIds = [
|
|
|
30
34
|
333333,
|
|
31
35
|
444444
|
|
32
36
|
];
|
|
33
|
-
function fail(code, message,
|
|
34
|
-
throw new CapabilityError(code, message,
|
|
37
|
+
function fail(code, message, field) {
|
|
38
|
+
throw new CapabilityError(code, message, void 0, { field });
|
|
35
39
|
}
|
|
36
40
|
function isRecord(value) {
|
|
37
41
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38
42
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
41
|
-
}
|
|
42
|
-
function hasLeaderLinesWithoutVisibleLabels(groupLabels, series) {
|
|
43
|
-
return series.some((item) => {
|
|
43
|
+
function invalidLeaderLinesSeries(kind, groupLabels, series) {
|
|
44
|
+
return series.findIndex((item) => {
|
|
44
45
|
const labels = mergeDataLabels(groupLabels, item.dataLabels);
|
|
45
|
-
return labels !== void 0 && labels !== false && labels.leaderLines !== void 0 && labels.leaderLines !== false && !
|
|
46
|
+
return labels !== void 0 && labels !== false && labels.leaderLines !== void 0 && labels.leaderLines !== false && !hasVisibleSeriesDataLabels(kind, labels, item.points);
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
function chartGroupDrafts(value) {
|
|
49
|
-
if (!Array.isArray(value) || value.length === 0) fail("invalid-chart-groups", "Chart.groups must contain at least one group");
|
|
50
|
+
if (!Array.isArray(value) || value.length === 0) fail("invalid-chart-groups", "Chart.groups must contain at least one group", "groups");
|
|
50
51
|
return value.map((rawItem, groupIndex) => {
|
|
51
|
-
const label = `
|
|
52
|
+
const label = `groups.${groupIndex}`;
|
|
52
53
|
const group = parseChartGroupBySchema(rawItem, label);
|
|
53
54
|
if (group.kind === "scatter") return {
|
|
54
55
|
kind: "scatter",
|
|
@@ -64,7 +65,13 @@ function chartGroupDrafts(value) {
|
|
|
64
65
|
...item,
|
|
65
66
|
categories: categoriesForSeries(item)
|
|
66
67
|
}));
|
|
67
|
-
if (
|
|
68
|
+
if (group.kind === "pie" || group.kind === "doughnut") {
|
|
69
|
+
const index = invalidLeaderLinesSeries(group.kind, group.dataLabels, series);
|
|
70
|
+
if (index !== -1) {
|
|
71
|
+
const overrides = series[index].dataLabels;
|
|
72
|
+
fail("invalid-data-labels", "leaderLines requires at least one visible data label", `${overrides && overrides.leaderLines !== void 0 ? `${label}.series.${index}` : label}.dataLabels.leaderLines`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
68
75
|
if (group.kind === "column" || group.kind === "bar") return {
|
|
69
76
|
kind: group.kind,
|
|
70
77
|
data: group.data,
|
|
@@ -107,15 +114,15 @@ const nativeAxisIdLimit = nativeAxisIds.length;
|
|
|
107
114
|
function axisEntries(value, groups) {
|
|
108
115
|
const scatterOnly = groups.every((group) => group.kind === "scatter");
|
|
109
116
|
if (groups.every((group) => group.kind === "pie" || group.kind === "doughnut")) {
|
|
110
|
-
if (groups.length !== 1) fail("unsupported-chart-group-combination", "Pie and doughnut charts support one chart group");
|
|
111
|
-
if (value !== void 0) fail("invalid-chart-axes", "Pie and doughnut charts do not use category or value axes");
|
|
117
|
+
if (groups.length !== 1) fail("unsupported-chart-group-combination", "Pie and doughnut charts support one chart group", "groups");
|
|
118
|
+
if (value !== void 0) fail("invalid-chart-axes", "Pie and doughnut charts do not use category or value axes", "axes");
|
|
112
119
|
return {
|
|
113
120
|
entries: [],
|
|
114
121
|
axisless: true
|
|
115
122
|
};
|
|
116
123
|
}
|
|
117
|
-
if (groups.some((group) => group.kind === "pie" || group.kind === "doughnut")) fail("unsupported-chart-group-combination", "Pie and doughnut charts support one chart group");
|
|
118
|
-
if (value === void 0 && !scatterOnly && new Set(groups.map((group) => group.kind)).size > 1) fail("invalid-chart-axes", "Charts that combine different group kinds must declare chart-level axes and explicit group references");
|
|
124
|
+
if (groups.some((group) => group.kind === "pie" || group.kind === "doughnut")) fail("unsupported-chart-group-combination", "Pie and doughnut charts support one chart group", "groups");
|
|
125
|
+
if (value === void 0 && !scatterOnly && new Set(groups.map((group) => group.kind)).size > 1) fail("invalid-chart-axes", "Charts that combine different group kinds must declare chart-level axes and explicit group references", "axes");
|
|
119
126
|
let entries;
|
|
120
127
|
if (value === void 0) entries = scatterOnly ? [{
|
|
121
128
|
name: "x",
|
|
@@ -131,20 +138,20 @@ function axisEntries(value, groups) {
|
|
|
131
138
|
spec: { kind: "value" }
|
|
132
139
|
}];
|
|
133
140
|
else {
|
|
134
|
-
if (!isRecord(value)) fail("invalid-axis", "Chart.axes must be an object");
|
|
141
|
+
if (!isRecord(value)) fail("invalid-axis", "Chart.axes must be an object", "axes");
|
|
135
142
|
entries = Object.entries(value).map(([name, spec]) => {
|
|
136
|
-
if (name.trim() === "") fail("invalid-axis", "Chart.axes names must be non-empty strings");
|
|
137
|
-
if (!isRecord(spec)) fail("invalid-axis", `Chart.axes.${name} must be an object`);
|
|
143
|
+
if (name.trim() === "") fail("invalid-axis", "Chart.axes names must be non-empty strings", "axes");
|
|
144
|
+
if (!isRecord(spec)) fail("invalid-axis", `Chart.axes.${name} must be an object`, `axes.${name}`);
|
|
138
145
|
const kind = spec["kind"];
|
|
139
|
-
if (kind !== "category" && kind !== "value") fail("invalid-chart-axis-role", `Chart.axes.${name}.kind must be "category" or "value"`);
|
|
146
|
+
if (kind !== "category" && kind !== "value") fail("invalid-chart-axis-role", `Chart.axes.${name}.kind must be "category" or "value"`, `axes.${name}.kind`);
|
|
140
147
|
return {
|
|
141
148
|
name,
|
|
142
|
-
spec: parseChartAxisBySchema(spec, `
|
|
149
|
+
spec: parseChartAxisBySchema(spec, `axes.${name}`, kind)
|
|
143
150
|
};
|
|
144
151
|
});
|
|
145
152
|
}
|
|
146
|
-
if (entries.length === 0) fail("invalid-axis", "Chart.axes must define at least one axis");
|
|
147
|
-
if (entries.length > nativeAxisIdLimit) fail("unsupported-chart-axis", "Office supports at most four chart axes per chart");
|
|
153
|
+
if (entries.length === 0) fail("invalid-axis", "Chart.axes must define at least one axis", "axes");
|
|
154
|
+
if (entries.length > nativeAxisIdLimit) fail("unsupported-chart-axis", "Office supports at most four chart axes per chart", "axes");
|
|
148
155
|
return {
|
|
149
156
|
entries,
|
|
150
157
|
axisless: false
|
|
@@ -163,7 +170,7 @@ function parsedAxes(value, groups) {
|
|
|
163
170
|
const resolve = (name, expected, label) => {
|
|
164
171
|
const entry = entryByName.get(name);
|
|
165
172
|
if (entry === void 0) fail("unknown-chart-axis", `${label} references unknown axis "${name}"`);
|
|
166
|
-
if (entry.spec.kind !== expected) fail("invalid-chart-axis-role", `${label} references "${name}", which is not a ${expected} axis
|
|
173
|
+
if (entry.spec.kind !== expected) fail("invalid-chart-axis-role", `${label} references "${name}", which is not a ${expected} axis`, label);
|
|
167
174
|
let draft = draftByName.get(name);
|
|
168
175
|
if (draft === void 0) {
|
|
169
176
|
draft = {
|
|
@@ -176,24 +183,24 @@ function parsedAxes(value, groups) {
|
|
|
176
183
|
return draft;
|
|
177
184
|
};
|
|
178
185
|
const assignDirection = (axis, direction) => {
|
|
179
|
-
if (axis.direction !== void 0 && axis.direction !== direction) fail("invalid-chart-axes", `Chart axis "${axis.name}" cannot be both horizontal and vertical`);
|
|
186
|
+
if (axis.direction !== void 0 && axis.direction !== direction) fail("invalid-chart-axes", `Chart axis "${axis.name}" cannot be both horizontal and vertical`, `axes.${axis.name}`);
|
|
180
187
|
axis.direction = direction;
|
|
181
188
|
};
|
|
182
189
|
const defaultPair = (first, second, kind) => entries.length === 2 && entryByName.get(first)?.spec.kind === kind && entryByName.get(second)?.spec.kind === "value";
|
|
183
190
|
for (const [groupIndex, group] of groups.entries()) {
|
|
184
|
-
const label = `
|
|
191
|
+
const label = `groups.${groupIndex}`;
|
|
185
192
|
if (group.kind === "scatter") {
|
|
186
193
|
let references = group.axes;
|
|
187
194
|
if (references === void 0) {
|
|
188
|
-
if (!defaultPair("x", "y", "value")) fail("invalid-chart-axes", `${label} must reference chart-level X and Y axes`);
|
|
195
|
+
if (!defaultPair("x", "y", "value")) fail("invalid-chart-axes", `${label} must reference chart-level X and Y axes`, `${label}.axes`);
|
|
189
196
|
references = {
|
|
190
197
|
x: "x",
|
|
191
198
|
y: "y"
|
|
192
199
|
};
|
|
193
200
|
}
|
|
194
|
-
const x = resolve(references.x, "value", `${label}
|
|
195
|
-
const y = resolve(references.y, "value", `${label}
|
|
196
|
-
if (x === y) fail("invalid-chart-axes", `${label} must reference distinct X and Y value axes`);
|
|
201
|
+
const x = resolve(references.x, "value", `${label}.axes.x`);
|
|
202
|
+
const y = resolve(references.y, "value", `${label}.axes.y`);
|
|
203
|
+
if (x === y) fail("invalid-chart-axes", `${label} must reference distinct X and Y value axes`, `${label}.axes`);
|
|
197
204
|
assignDirection(x, "horizontal");
|
|
198
205
|
assignDirection(y, "vertical");
|
|
199
206
|
resolvedGroups.push({
|
|
@@ -205,15 +212,15 @@ function parsedAxes(value, groups) {
|
|
|
205
212
|
}
|
|
206
213
|
let references = group.axes;
|
|
207
214
|
if (references === void 0) {
|
|
208
|
-
if (!defaultPair("category", "value", "category")) fail("invalid-chart-axes", `${label} must reference chart-level category and value axes`);
|
|
215
|
+
if (!defaultPair("category", "value", "category")) fail("invalid-chart-axes", `${label} must reference chart-level category and value axes`, `${label}.axes`);
|
|
209
216
|
references = {
|
|
210
217
|
category: "category",
|
|
211
218
|
value: "value"
|
|
212
219
|
};
|
|
213
220
|
}
|
|
214
|
-
const category = resolve(references.category, "category", `${label}
|
|
215
|
-
const valueAxis = resolve(references.value, "value", `${label}
|
|
216
|
-
if (category === valueAxis) fail("invalid-chart-axes", `${label} must reference distinct category and value axes`);
|
|
221
|
+
const category = resolve(references.category, "category", `${label}.axes.category`);
|
|
222
|
+
const valueAxis = resolve(references.value, "value", `${label}.axes.value`);
|
|
223
|
+
if (category === valueAxis) fail("invalid-chart-axes", `${label} must reference distinct category and value axes`, `${label}.axes`);
|
|
217
224
|
if (group.kind === "bar") {
|
|
218
225
|
assignDirection(category, "vertical");
|
|
219
226
|
assignDirection(valueAxis, "horizontal");
|
|
@@ -227,7 +234,7 @@ function parsedAxes(value, groups) {
|
|
|
227
234
|
value: valueAxis
|
|
228
235
|
});
|
|
229
236
|
}
|
|
230
|
-
for (const entry of entries) if (!firstUse.some((axis) => axis.name === entry.name)) fail("invalid-chart-axes", `Chart axis "${entry.name}" is not referenced by any chart group`);
|
|
237
|
+
for (const entry of entries) if (!firstUse.some((axis) => axis.name === entry.name)) fail("invalid-chart-axes", `Chart axis "${entry.name}" is not referenced by any chart group`, `axes.${entry.name}`);
|
|
231
238
|
const partnersByAxis = /* @__PURE__ */ new Map();
|
|
232
239
|
const addPartner = (left, right) => {
|
|
233
240
|
const leftPartners = partnersByAxis.get(left);
|
|
@@ -262,7 +269,7 @@ function parsedAxes(value, groups) {
|
|
|
262
269
|
for (const axis of firstUse) {
|
|
263
270
|
const position = axis.spec.position;
|
|
264
271
|
if (position === void 0) continue;
|
|
265
|
-
if (!(axis.direction === "horizontal" ? horizontalAxisPositions : verticalAxisPositions).includes(position)) fail("invalid-chart-axes", `Chart axis "${axis.name}" position "${position}" does not match its ${axis.direction} direction`);
|
|
272
|
+
if (!(axis.direction === "horizontal" ? horizontalAxisPositions : verticalAxisPositions).includes(position)) fail("invalid-chart-axes", `Chart axis "${axis.name}" position "${position}" does not match its ${axis.direction} direction`, `axes.${axis.name}.position`);
|
|
266
273
|
claimPosition(axis, position);
|
|
267
274
|
}
|
|
268
275
|
for (const axis of firstUse) {
|
|
@@ -274,7 +281,7 @@ function parsedAxes(value, groups) {
|
|
|
274
281
|
continue;
|
|
275
282
|
}
|
|
276
283
|
const position = allowed.find((item) => !positionAxes.has(item));
|
|
277
|
-
if (position === void 0) fail("unsupported-chart-axis", `Office supports at most two independent ${axis.direction} axes per chart
|
|
284
|
+
if (position === void 0) fail("unsupported-chart-axis", `Office supports at most two independent ${axis.direction} axes per chart`, "axes");
|
|
278
285
|
claimPosition(axis, position);
|
|
279
286
|
}
|
|
280
287
|
const maxSide = (direction) => direction === "vertical" ? "right" : "top";
|
|
@@ -334,23 +341,23 @@ function parsedAxes(value, groups) {
|
|
|
334
341
|
const crossing = explicitCrossing(partner);
|
|
335
342
|
if (crossing === void 0) continue;
|
|
336
343
|
if (axis.spec.position !== void 0) {
|
|
337
|
-
if (crossesKnownValueInterior(crossing, partner)) fail("invalid-chart-axes", `Chart axis "${axis.name}" position "${axis.spec.position}" conflicts with the known interior crossing on "${partner.name}"`);
|
|
344
|
+
if (crossesKnownValueInterior(crossing, partner)) fail("invalid-chart-axes", `Chart axis "${axis.name}" position "${axis.spec.position}" conflicts with the known interior crossing on "${partner.name}"`, `axes.${axis.name}.position`);
|
|
338
345
|
const endpoint = knownValueEndpoint(crossing, partner);
|
|
339
346
|
if (endpoint !== void 0) {
|
|
340
347
|
const edge = positionForRawCrossing({
|
|
341
348
|
kind: "crosses",
|
|
342
349
|
value: endpoint
|
|
343
350
|
}, partner, axis.direction);
|
|
344
|
-
if (edge !== void 0 && edge !== axis.spec.position) fail("invalid-chart-axes", `Chart axis "${axis.name}" position "${axis.spec.position}" conflicts with the known crossing endpoint on "${partner.name}"`);
|
|
351
|
+
if (edge !== void 0 && edge !== axis.spec.position) fail("invalid-chart-axes", `Chart axis "${axis.name}" position "${axis.spec.position}" conflicts with the known crossing endpoint on "${partner.name}"`, `axes.${axis.name}.position`);
|
|
345
352
|
}
|
|
346
353
|
}
|
|
347
354
|
const position = positionForRawCrossing(crossing, partner, axis.direction);
|
|
348
355
|
if (position !== void 0) desired.add(position);
|
|
349
356
|
}
|
|
350
|
-
if (desired.size > 1) fail("invalid-chart-axes", `Explicit crossings on axes crossing "${axis.name}" disagree on its physical side
|
|
357
|
+
if (desired.size > 1) fail("invalid-chart-axes", `Explicit crossings on axes crossing "${axis.name}" disagree on its physical side`, "axes");
|
|
351
358
|
const wanted = [...desired][0];
|
|
352
359
|
if (wanted === void 0) continue;
|
|
353
|
-
if (axis.spec.position !== void 0 && axis.spec.position !== wanted) fail("invalid-chart-axes", `Chart axis "${axis.name}" position "${axis.spec.position}" conflicts with its explicit crossing controls`);
|
|
360
|
+
if (axis.spec.position !== void 0 && axis.spec.position !== wanted) fail("invalid-chart-axes", `Chart axis "${axis.name}" position "${axis.spec.position}" conflicts with its explicit crossing controls`, `axes.${axis.name}.position`);
|
|
354
361
|
axis.position = wanted;
|
|
355
362
|
}
|
|
356
363
|
for (const axis of firstUse) {
|
|
@@ -361,9 +368,9 @@ function parsedAxes(value, groups) {
|
|
|
361
368
|
crossing = candidate;
|
|
362
369
|
continue;
|
|
363
370
|
}
|
|
364
|
-
if (!sameCrossing(crossing, candidate)) fail("invalid-chart-axes", `Shared crossing controls for axis "${axis.name}" disagree; use an explicit position or separate axes
|
|
371
|
+
if (!sameCrossing(crossing, candidate)) fail("invalid-chart-axes", `Shared crossing controls for axis "${axis.name}" disagree; use an explicit position or separate axes`, "axes");
|
|
365
372
|
}
|
|
366
|
-
if (crossing === void 0) fail("invalid-chart-axes", `Chart axis "${axis.name}" is not crossed by another axis`);
|
|
373
|
+
if (crossing === void 0) fail("invalid-chart-axes", `Chart axis "${axis.name}" is not crossed by another axis`, `axes.${axis.name}`);
|
|
367
374
|
axis.crossing = crossing;
|
|
368
375
|
}
|
|
369
376
|
for (const [index, axis] of firstUse.entries()) axis.id = nativeAxisIds[index];
|
|
@@ -424,7 +431,7 @@ function displayBlanksAs(value, groups) {
|
|
|
424
431
|
if (group.kind === "area") return group.stacking === void 0 ? !["gap", "zero"].includes(requested) : requested !== "zero";
|
|
425
432
|
return !["gap", "zero"].includes(requested);
|
|
426
433
|
});
|
|
427
|
-
if (unsupported !== void 0) fail("invalid-chart-missing-values", unsupported.kind === "scatter" ? `scatter chart group without a connecting line does not support displayBlanksAs "${requested}"` : `${unsupported.kind}${unsupported.stacking === void 0 ? "" : ` ${unsupported.stacking}`} chart does not support displayBlanksAs "${requested}"
|
|
434
|
+
if (unsupported !== void 0) fail("invalid-chart-missing-values", unsupported.kind === "scatter" ? `scatter chart group without a connecting line does not support displayBlanksAs "${requested}"` : `${unsupported.kind}${unsupported.stacking === void 0 ? "" : ` ${unsupported.stacking}`} chart does not support displayBlanksAs "${requested}"`, "displayBlanksAs");
|
|
428
435
|
return requested;
|
|
429
436
|
}
|
|
430
437
|
function emitChartModel(model, emitContext) {
|
|
@@ -437,6 +444,8 @@ function emitChartModel(model, emitContext) {
|
|
|
437
444
|
});
|
|
438
445
|
}
|
|
439
446
|
const workbook = chartWorkbook(model.parsed);
|
|
447
|
+
const override = model.parsed.themeOverride;
|
|
448
|
+
const themeOverridePart = override !== void 0 && hasThemeOverrideContent(override) ? new TextEncoder().encode(themeOverrideXml(override, effectiveThemeWithOverride(model.theme.theme, themeContextOverride(model.theme)))) : void 0;
|
|
440
449
|
const relationshipId = emitContext.registerPackagePart({
|
|
441
450
|
part: {
|
|
442
451
|
pathTemplate: "ppt/charts/chart{n}.xml",
|
|
@@ -446,14 +455,20 @@ function emitChartModel(model, emitContext) {
|
|
|
446
455
|
content(relatedRelationshipIds) {
|
|
447
456
|
const [workbookRelationshipId] = relatedRelationshipIds;
|
|
448
457
|
if (workbookRelationshipId === void 0) fail("invalid-part", "Chart part requires embedded workbook relationship");
|
|
449
|
-
return chartPartXml(model.parsed, model.box, workbookRelationshipId, model.textStyles,
|
|
458
|
+
return chartPartXml(model.parsed, model.box, workbookRelationshipId, model.textStyles, model.theme);
|
|
450
459
|
},
|
|
451
460
|
relatedParts: [{
|
|
452
461
|
pathTemplate: "ppt/embeddings/Microsoft_Excel_Worksheet{n}.xlsx",
|
|
453
462
|
contentType: workbookContentType,
|
|
454
463
|
relationshipType: packageRelationship,
|
|
455
464
|
bytes: workbook
|
|
456
|
-
}]
|
|
465
|
+
}, ...themeOverridePart === void 0 ? [] : [{
|
|
466
|
+
pathTemplate: themeOverridePartTemplate,
|
|
467
|
+
contentType: themeOverrideContentType,
|
|
468
|
+
relationshipType: `${namespaces.r}/themeOverride`,
|
|
469
|
+
bytes: themeOverridePart,
|
|
470
|
+
independentSequence: true
|
|
471
|
+
}]]
|
|
457
472
|
});
|
|
458
473
|
const presentationContributions = fontPresentationContributions(model.fontUses, embedFonts);
|
|
459
474
|
return {
|
|
@@ -463,7 +478,10 @@ function emitChartModel(model, emitContext) {
|
|
|
463
478
|
}
|
|
464
479
|
function paintChartModel(model, paintContext) {
|
|
465
480
|
const paintBox = paintContext.box ?? model.box;
|
|
466
|
-
return drawChartPreview(model.parsed, paintBox,
|
|
481
|
+
return drawChartPreview(model.parsed, paintBox, {
|
|
482
|
+
...paintContext,
|
|
483
|
+
theme: model.theme
|
|
484
|
+
});
|
|
467
485
|
}
|
|
468
486
|
function defineChartCanvasMechanism(key) {
|
|
469
487
|
return defineCanvasMechanism({
|
|
@@ -489,7 +507,6 @@ const chartPlaceholderMechanism = defineCanvasMechanism({
|
|
|
489
507
|
paint: paintChartModel,
|
|
490
508
|
import: chartPlaceholderImportHandler
|
|
491
509
|
});
|
|
492
|
-
const chartCompatiblePlaceholderRoles = /* @__PURE__ */ new Set(["chart", "obj"]);
|
|
493
510
|
const chartDataLabelsMechanism = defineChartCanvasMechanism("chart-data-labels");
|
|
494
511
|
const chartTrendlineMechanism = defineChartCanvasMechanism("chart-trendline");
|
|
495
512
|
const chartErrorBarsMechanism = defineChartCanvasMechanism("chart-error-bars");
|
|
@@ -524,8 +541,8 @@ const chartCapability = {
|
|
|
524
541
|
bind(input, context) {
|
|
525
542
|
const placeholder = context.placeholder;
|
|
526
543
|
if (placeholder !== void 0) {
|
|
527
|
-
const role = placeholder.
|
|
528
|
-
if (!
|
|
544
|
+
const role = placeholder.nativeRef.type;
|
|
545
|
+
if (!compatiblePlaceholderRoles.chart.has(role)) fail("incompatible-placeholder-content", `Chart cannot be bound to ${role} placeholder`);
|
|
529
546
|
}
|
|
530
547
|
if (input.children.length > 0) fail("unsupported-children", "Chart does not accept children; chart text and data should be passed in groups");
|
|
531
548
|
const unknown = Object.keys(input.props).find((key) => !chartAllowedPropKeys.includes(key));
|
|
@@ -539,7 +556,7 @@ const chartCapability = {
|
|
|
539
556
|
path: context.path
|
|
540
557
|
});
|
|
541
558
|
const requestedName = parseOptionalName(input.props["name"]);
|
|
542
|
-
if (requestedName !== void 0) parseChartXmlTextBySchema(requestedName, "
|
|
559
|
+
if (requestedName !== void 0) parseChartXmlTextBySchema(requestedName, "name");
|
|
543
560
|
const morphKey = parseMorphKey(input.props["morphKey"]);
|
|
544
561
|
const link = parseLinkTarget(input.props["link"]);
|
|
545
562
|
const drafts = chartGroupDrafts(input.props["groups"]);
|
|
@@ -556,13 +573,13 @@ const chartCapability = {
|
|
|
556
573
|
categoryDomains.set(resolved.category.name, domain);
|
|
557
574
|
continue;
|
|
558
575
|
}
|
|
559
|
-
if (existing.length !== domain.length || existing.some((category, index) => category !== domain[index])) fail("chart-category-domain-mismatch", `Chart groups sharing category axis "${resolved.category.name}" must have the same ordered category domain`);
|
|
576
|
+
if (existing.length !== domain.length || existing.some((category, index) => category !== domain[index])) fail("chart-category-domain-mismatch", `Chart groups sharing category axis "${resolved.category.name}" must have the same ordered category domain`, `groups.${groupIndex}.data.categories`);
|
|
560
577
|
}
|
|
561
578
|
let seriesIndex = 0;
|
|
562
579
|
const groups = drafts.map((draft, groupIndex) => {
|
|
563
580
|
const resolvedAxes = groupAxes[groupIndex];
|
|
564
581
|
if (draft.kind === "scatter") {
|
|
565
|
-
if (resolvedAxes === void 0 || resolvedAxes.kind !== "scatter") fail("invalid-chart-axes", `Chart.groups[${groupIndex}] is missing resolved X and Y axes`);
|
|
582
|
+
if (resolvedAxes === void 0 || resolvedAxes.kind !== "scatter") fail("invalid-chart-axes", `Chart.groups[${groupIndex}] is missing resolved X and Y axes`, `groups.${groupIndex}.axes`);
|
|
566
583
|
const series = draft.series.map((item, groupSeriesIndex) => ({
|
|
567
584
|
...item,
|
|
568
585
|
groupIndex,
|
|
@@ -590,7 +607,7 @@ const chartCapability = {
|
|
|
590
607
|
}));
|
|
591
608
|
if (draft.kind === "pie") {
|
|
592
609
|
const firstSeries = series[0];
|
|
593
|
-
if (firstSeries === void 0 || series.length !== 1) fail("invalid-data", "pie chart currently only supports a single data series");
|
|
610
|
+
if (firstSeries === void 0 || series.length !== 1) fail("invalid-data", "pie chart currently only supports a single data series", `groups.${groupIndex}.series`);
|
|
594
611
|
return {
|
|
595
612
|
kind: "pie",
|
|
596
613
|
data: draft.data,
|
|
@@ -609,7 +626,7 @@ const chartCapability = {
|
|
|
609
626
|
...draft.explosion === void 0 ? {} : { explosion: draft.explosion },
|
|
610
627
|
...draft.dataLabels === void 0 ? {} : { dataLabels: draft.dataLabels }
|
|
611
628
|
};
|
|
612
|
-
if (resolvedAxes === void 0 || resolvedAxes.kind !== "category") fail("invalid-chart-axes", `Chart.groups[${groupIndex}] is missing resolved category and value axes`);
|
|
629
|
+
if (resolvedAxes === void 0 || resolvedAxes.kind !== "category") fail("invalid-chart-axes", `Chart.groups[${groupIndex}] is missing resolved category and value axes`, `groups.${groupIndex}.axes`);
|
|
613
630
|
const cartesianAxes = {
|
|
614
631
|
category: resolvedAxes.category,
|
|
615
632
|
value: resolvedAxes.value
|
|
@@ -647,10 +664,18 @@ const chartCapability = {
|
|
|
647
664
|
const declaredX = rawX !== void 0 ? parseChartCoordinateBySchema(rawX, "x") : void 0;
|
|
648
665
|
const declaredY = rawY !== void 0 ? parseChartCoordinateBySchema(rawY, "y") : void 0;
|
|
649
666
|
const legend = parseChartLegendBySchema(input.props["legend"]);
|
|
667
|
+
const legendStyle = chartTextStyleSchema.optional().safeParse(input.props["legendStyle"]);
|
|
668
|
+
if (!legendStyle.success) throw new CapabilityError("invalid-style", legendStyle.error.issues[0]?.message ?? "Invalid Chart.legendStyle");
|
|
650
669
|
const checkedPlotArea = parseChartPlotAreaBySchema(input.props["plotArea"]);
|
|
651
|
-
const title = parseChartTitleBySchema(input.props["title"], "
|
|
670
|
+
const title = parseChartTitleBySchema(input.props["title"], "title");
|
|
652
671
|
const blanks = displayBlanksAs(input.props["displayBlanksAs"], drafts);
|
|
672
|
+
const colorMap = colorMapSchema.optional().safeParse(input.props["colorMapOverride"]);
|
|
673
|
+
if (!colorMap.success) fail("invalid-prop", "Chart.colorMapOverride must be a complete 12-slot color map", zodIssueField(colorMap.error.issues[0], "colorMapOverride"));
|
|
674
|
+
const themeOverride = themeOverrideSchema.optional().safeParse(input.props["themeOverride"]);
|
|
675
|
+
if (!themeOverride.success) fail("invalid-prop", themeOverride.error.issues[0]?.message ?? "Invalid Chart.themeOverride", zodIssueField(themeOverride.error.issues[0], "themeOverride"));
|
|
653
676
|
const parsed = {
|
|
677
|
+
...themeOverride.data === void 0 ? {} : { themeOverride: themeOverride.data },
|
|
678
|
+
...colorMap.data === void 0 ? {} : { colorMapOverride: colorMap.data },
|
|
654
679
|
axes,
|
|
655
680
|
hasExplicitAxes: input.props["axes"] !== void 0,
|
|
656
681
|
groups,
|
|
@@ -668,6 +693,7 @@ const chartCapability = {
|
|
|
668
693
|
...declaredWidth === void 0 ? {} : { declaredWidth },
|
|
669
694
|
...declaredHeight === void 0 ? {} : { declaredHeight },
|
|
670
695
|
...legend === void 0 ? {} : { legend },
|
|
696
|
+
...legendStyle.data === void 0 ? {} : { legendStyle: legendStyle.data },
|
|
671
697
|
...checkedPlotArea === void 0 ? {} : { plotArea: checkedPlotArea },
|
|
672
698
|
...input.props["style"] === void 0 ? {} : { style: input.props["style"] }
|
|
673
699
|
};
|
|
@@ -702,10 +728,10 @@ const chartCapability = {
|
|
|
702
728
|
height: parseChartExtentBySchema(rawBoxHeight, "height")
|
|
703
729
|
};
|
|
704
730
|
if (parsed.plotArea !== void 0) {
|
|
705
|
-
if (parsed.plotArea.left < 0 || parsed.plotArea.top < 0 || parsed.plotArea.width <= 0 || parsed.plotArea.height <= 0 || parsed.plotArea.left + parsed.plotArea.width > box.width || parsed.plotArea.top + parsed.plotArea.height > box.height) fail("invalid-plot-area", "Chart.plotArea must be inside chart box with positive width and height");
|
|
731
|
+
if (parsed.plotArea.left < 0 || parsed.plotArea.top < 0 || parsed.plotArea.width <= 0 || parsed.plotArea.height <= 0 || parsed.plotArea.left + parsed.plotArea.width > box.width || parsed.plotArea.top + parsed.plotArea.height > box.height) fail("invalid-plot-area", "Chart.plotArea must be inside chart box with positive width and height", "plotArea");
|
|
706
732
|
}
|
|
707
733
|
const name = resolveContext.morphName ?? requestedName ?? placeholder?.layoutPlaceholder?.name ?? `Chart ${resolveContext.id - 1}`;
|
|
708
|
-
parseChartXmlTextBySchema(name, "
|
|
734
|
+
parseChartXmlTextBySchema(name, "name");
|
|
709
735
|
const annotations = motionAnnotations(motionProps, {
|
|
710
736
|
kind: "chart",
|
|
711
737
|
name,
|
|
@@ -716,8 +742,9 @@ const chartCapability = {
|
|
|
716
742
|
rotationDegrees: 0,
|
|
717
743
|
chartSeriesPointCounts: parsed.series.map((item) => "x" in item ? item.x.length : item.values.length)
|
|
718
744
|
});
|
|
719
|
-
const
|
|
720
|
-
|
|
745
|
+
const theme = parsed.colorMapOverride === void 0 && parsed.themeOverride === void 0 ? resolveContext.theme : resolveContext.theme.withNativeOverrides(parsed.themeOverride, parsed.colorMapOverride);
|
|
746
|
+
const { textStyles, resourceClaims, fontUses, fontUsages, missingGlyphErrors } = chartResourceClaims(parsed, theme);
|
|
747
|
+
validateChartColors(parsed, theme);
|
|
721
748
|
const usesCategoryLabelRange = chartUsesCategoryLabelRange(parsed);
|
|
722
749
|
const primaryMechanism = placeholder !== void 0 ? chartPlaceholderMechanism : chartMechanismsByKind[parsed.groups[0]?.kind ?? "column"];
|
|
723
750
|
const resolvedModel = {
|
|
@@ -725,6 +752,7 @@ const chartCapability = {
|
|
|
725
752
|
box,
|
|
726
753
|
name,
|
|
727
754
|
textStyles,
|
|
755
|
+
theme,
|
|
728
756
|
fontUses,
|
|
729
757
|
missingGlyphErrors,
|
|
730
758
|
...placeholder === void 0 ? {} : { placeholder: placeholder.nativeRef }
|
|
@@ -915,6 +943,7 @@ function effectivePointLabels(group, series, index) {
|
|
|
915
943
|
return mergeDataLabels(effectiveSeriesLabels(group, series), series.points?.[index]?.dataLabels);
|
|
916
944
|
}
|
|
917
945
|
function pointDataLabelTexts(group, series, labels, index) {
|
|
946
|
+
if (labels.text !== void 0) return [labels.text];
|
|
918
947
|
if (group.kind === "scatter") {
|
|
919
948
|
const scatter = series;
|
|
920
949
|
const texts = [];
|
|
@@ -934,18 +963,20 @@ function pointDataLabelTexts(group, series, labels, index) {
|
|
|
934
963
|
if (labels.separator !== void 0) texts.push(labels.separator);
|
|
935
964
|
return texts;
|
|
936
965
|
}
|
|
937
|
-
function
|
|
966
|
+
function seriesDataLabelTexts(group, series) {
|
|
967
|
+
const count = "x" in series ? series.x.length : series.values.length;
|
|
938
968
|
const texts = [];
|
|
939
|
-
for (
|
|
940
|
-
const
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
texts.push(...pointDataLabelTexts(group, series, labels, index));
|
|
945
|
-
}
|
|
969
|
+
for (let index = 0; index < count; index += 1) {
|
|
970
|
+
const local = series.points?.[index]?.dataLabels;
|
|
971
|
+
if (local === false || local?.style !== void 0 || local?.text !== void 0) continue;
|
|
972
|
+
const labels = effectivePointLabels(group, series, index);
|
|
973
|
+
if (labels) texts.push(...pointDataLabelTexts(group, series, labels, index));
|
|
946
974
|
}
|
|
947
975
|
return texts;
|
|
948
976
|
}
|
|
977
|
+
function groupDataLabelTexts(group) {
|
|
978
|
+
return group.series.flatMap((series) => series.dataLabels && series.dataLabels.style !== void 0 ? [] : seriesDataLabelTexts(group, series));
|
|
979
|
+
}
|
|
949
980
|
function mergeTextStyle(base, override) {
|
|
950
981
|
return {
|
|
951
982
|
...base,
|
|
@@ -974,17 +1005,20 @@ function validateChartColors(parsed, theme) {
|
|
|
974
1005
|
}
|
|
975
1006
|
};
|
|
976
1007
|
const checkLabels = (dataLabels) => {
|
|
977
|
-
if (
|
|
1008
|
+
if (!dataLabels) return;
|
|
1009
|
+
checkLine(dataLabels.leaderLines);
|
|
1010
|
+
if (dataLabels.style !== void 0) validateTextStyle(dataLabels.style, theme);
|
|
978
1011
|
};
|
|
979
1012
|
const checkCommonSeries = (series) => {
|
|
980
1013
|
checkColor(series.color);
|
|
981
1014
|
checkLine(series.line);
|
|
982
1015
|
checkMarker(series.marker);
|
|
1016
|
+
checkLabels(series.dataLabels);
|
|
983
1017
|
for (const point of Object.values(series.points ?? {})) {
|
|
984
1018
|
checkColor(point.color);
|
|
985
1019
|
checkLine(point.line);
|
|
986
1020
|
checkMarker(point.marker);
|
|
987
|
-
|
|
1021
|
+
checkLabels(point.dataLabels);
|
|
988
1022
|
}
|
|
989
1023
|
for (const trendline of series.trendlines ?? []) checkLine(trendline.line);
|
|
990
1024
|
};
|
|
@@ -1002,7 +1036,6 @@ function validateChartColors(parsed, theme) {
|
|
|
1002
1036
|
}
|
|
1003
1037
|
else for (const series of group.series) {
|
|
1004
1038
|
checkCommonSeries(series);
|
|
1005
|
-
checkLabels(series.dataLabels);
|
|
1006
1039
|
checkLine(series.errorBars?.line);
|
|
1007
1040
|
}
|
|
1008
1041
|
}
|
|
@@ -1031,7 +1064,32 @@ function chartResourceClaims(parsed, theme) {
|
|
|
1031
1064
|
}));
|
|
1032
1065
|
const fontUsages = [...chart.fontUsages];
|
|
1033
1066
|
const missingGlyphErrors = [...chart.missingGlyphErrors];
|
|
1067
|
+
for (const [slot, font] of Object.entries(parsed.themeOverride?.fonts ?? {})) {
|
|
1068
|
+
if (!isFont(font)) continue;
|
|
1069
|
+
const declared = declaredFontResourceClaims(font);
|
|
1070
|
+
const path = `Chart.themeOverride.fonts.${slot}`;
|
|
1071
|
+
resourceClaims.push(...declared.resourceClaims);
|
|
1072
|
+
fontUses.push(...declared.fontUses.map((use) => ({
|
|
1073
|
+
...use,
|
|
1074
|
+
path
|
|
1075
|
+
})));
|
|
1076
|
+
fontUsages.push(...declared.fontUsages.map((usage) => ({
|
|
1077
|
+
...usage,
|
|
1078
|
+
path
|
|
1079
|
+
})));
|
|
1080
|
+
}
|
|
1034
1081
|
const textStyles = { chart: chart.xml };
|
|
1082
|
+
if (parsed.legendStyle !== void 0) {
|
|
1083
|
+
const output = writeChartTextProperties(mergeTextStyle(chartStyle, parsed.legendStyle), parsed.legend === false || parsed.legend === void 0 ? [] : collectLegendEntries(parsed, theme).map(({ label }) => label), "Chart.legendStyle", theme);
|
|
1084
|
+
textStyles.legend = output.xml;
|
|
1085
|
+
resourceClaims.push(...output.resourceClaims);
|
|
1086
|
+
fontUses.push(...output.fontUses.map((use) => ({
|
|
1087
|
+
...use,
|
|
1088
|
+
path: "Chart.legendStyle"
|
|
1089
|
+
})));
|
|
1090
|
+
fontUsages.push(...output.fontUsages);
|
|
1091
|
+
missingGlyphErrors.push(...output.missingGlyphErrors);
|
|
1092
|
+
}
|
|
1035
1093
|
const chartTitle = titleParts(parsed.title);
|
|
1036
1094
|
if (chartTitle !== void 0) {
|
|
1037
1095
|
const output = writeChartTitle(chartTitle.text, mergeTextStyle(chartStyle, chartTitle.style ?? {}), "Chart.title", theme);
|
|
@@ -1071,41 +1129,45 @@ function chartResourceClaims(parsed, theme) {
|
|
|
1071
1129
|
missingGlyphErrors.push(...output.missingGlyphErrors);
|
|
1072
1130
|
}
|
|
1073
1131
|
}
|
|
1132
|
+
const writeLabelStyle = (style, texts, path, customText) => {
|
|
1133
|
+
const output = writeChartTextProperties(mergeTextStyle(chartStyle, style), texts, path, theme, customText);
|
|
1134
|
+
resourceClaims.push(...output.resourceClaims);
|
|
1135
|
+
fontUses.push(...output.fontUses.map((use) => ({
|
|
1136
|
+
...use,
|
|
1137
|
+
path
|
|
1138
|
+
})));
|
|
1139
|
+
fontUsages.push(...output.fontUsages);
|
|
1140
|
+
missingGlyphErrors.push(...output.missingGlyphErrors);
|
|
1141
|
+
return output;
|
|
1142
|
+
};
|
|
1074
1143
|
for (const [groupIndex, group] of parsed.groups.entries()) {
|
|
1075
1144
|
const groupLabels = group.dataLabels;
|
|
1076
|
-
if (groupLabels
|
|
1077
|
-
const output = writeChartTextProperties(mergeTextStyle(chartStyle, groupLabels.style), groupDataLabelTexts(group), `Chart.groups[${groupIndex}].dataLabels.style`, theme);
|
|
1145
|
+
if (groupLabels && groupLabels.style !== void 0) {
|
|
1078
1146
|
textStyles.groupDataLabels ??= /* @__PURE__ */ new Map();
|
|
1079
|
-
textStyles.groupDataLabels.set(groupIndex,
|
|
1080
|
-
resourceClaims.push(...output.resourceClaims);
|
|
1081
|
-
fontUses.push(...output.fontUses.map((use) => ({
|
|
1082
|
-
...use,
|
|
1083
|
-
path: `Chart.groups[${groupIndex}].dataLabels.style`
|
|
1084
|
-
})));
|
|
1085
|
-
fontUsages.push(...output.fontUsages);
|
|
1086
|
-
missingGlyphErrors.push(...output.missingGlyphErrors);
|
|
1147
|
+
textStyles.groupDataLabels.set(groupIndex, writeLabelStyle(groupLabels.style, groupDataLabelTexts(group), `Chart.groups[${groupIndex}].dataLabels.style`).xml);
|
|
1087
1148
|
}
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
const
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1149
|
+
for (const series of group.series) {
|
|
1150
|
+
const localSeriesLabels = series.dataLabels;
|
|
1151
|
+
const seriesLabels = effectiveSeriesLabels(group, series);
|
|
1152
|
+
if (localSeriesLabels && localSeriesLabels.style !== void 0 && seriesLabels) {
|
|
1153
|
+
const texts = seriesDataLabelTexts(group, series);
|
|
1154
|
+
textStyles.seriesDataLabels ??= /* @__PURE__ */ new Map();
|
|
1155
|
+
textStyles.seriesDataLabels.set(series.seriesIndex, writeLabelStyle(seriesLabels.style ?? {}, texts, `Chart.groups[${groupIndex}].series[${series.groupSeriesIndex}].dataLabels.style`).xml);
|
|
1156
|
+
}
|
|
1157
|
+
for (const [pointIndex, point] of Object.entries(series.points ?? {})) {
|
|
1158
|
+
const local = point.dataLabels;
|
|
1159
|
+
if (!local || local.style === void 0 && local.text === void 0) continue;
|
|
1160
|
+
const index = Number(pointIndex);
|
|
1161
|
+
const pointLabels = effectivePointLabels(group, series, index);
|
|
1162
|
+
if (pointLabels === void 0 || pointLabels === false) continue;
|
|
1163
|
+
const output = writeLabelStyle(pointLabels.style ?? {}, pointDataLabelTexts(group, series, pointLabels, index), "Chart.dataLabels.point.style", pointLabels.text);
|
|
1164
|
+
const key = `${series.seriesIndex}:${pointIndex}`;
|
|
1165
|
+
textStyles.pointLabels ??= /* @__PURE__ */ new Map();
|
|
1166
|
+
textStyles.pointLabels.set(key, {
|
|
1167
|
+
properties: output.xml,
|
|
1168
|
+
...output.customTextXml === void 0 ? {} : { customText: output.customTextXml }
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1109
1171
|
}
|
|
1110
1172
|
}
|
|
1111
1173
|
return {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import "./chart-declaration.js";
|
|
2
|
+
export { chartAreaMechanism, chartBarMechanism, chartCapability, chartColumnMechanism, chartDataLabelsMechanism, chartDoughnutMechanism, chartErrorBarsMechanism, chartLineMechanism, chartMarkersAndPointsMechanism, chartPieMechanism, chartPlaceholderMechanism, chartScatterMechanism, chartTrendlineMechanism } from "./chart.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { formatChartNumber } from "../chart-number-format.js";
|
|
1
2
|
import { resolveAxisLabelSide } from "./layout.js";
|
|
2
|
-
import { formatChartNumber } from "./number-format.js";
|
|
3
3
|
import { resolveAxisCrossingScreen } from "./scales.js";
|
|
4
4
|
import { resolveChartLineStroke, strokeAttrs } from "./style.js";
|
|
5
5
|
import { measureChartText, mergeChartTextStyle, renderChartTextSvg, resolveChartFontSizePixels } from "./text-render.js";
|
|
6
6
|
import { assertNever } from "./types.js";
|
|
7
|
-
// ../
|
|
7
|
+
// ../core/dist/capabilities/chart/preview/axes-and-grid.js
|
|
8
8
|
function categoryGridCoordinates(scale, plot, minor) {
|
|
9
9
|
const coords = [];
|
|
10
10
|
if (minor) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveChartLineStroke, resolveSeriesColor, strokeAttrs } from "./style.js";
|
|
2
|
-
// ../
|
|
2
|
+
// ../core/dist/capabilities/chart/preview/bar-column.js
|
|
3
3
|
function renderColumnOrBarGroup(options) {
|
|
4
4
|
const { group, groupIndex, scales, plotRect, theme } = options;
|
|
5
5
|
const catScale = scales.get(group.axes.category.name);
|