@web-ppt/edit-core 0.5.0-beta.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +183 -0
- package/README.md +164 -21
- package/dist/alt-text.d.ts +5 -0
- package/dist/appearance/index.d.ts +12 -0
- package/dist/appearance/materialize.d.ts +4 -0
- package/dist/appearance/types.d.ts +26 -0
- package/dist/appearance/values.d.ts +9 -0
- package/dist/appearance.js +301 -0
- package/dist/cfb/index.d.ts +5 -0
- package/dist/cfb/read.d.ts +16 -0
- package/dist/cfb/write.d.ts +3 -0
- package/dist/cfb.js +208 -0
- package/dist/change-classification.d.ts +3 -3
- package/dist/chart/category-binding.d.ts +4 -0
- package/dist/chart/category-commands.d.ts +23 -0
- package/dist/chart/category-levels.d.ts +14 -0
- package/dist/chart/category-matrix.d.ts +2 -0
- package/dist/chart/category-value.d.ts +2 -0
- package/dist/chart/category-workbook.d.ts +13 -0
- package/dist/chart/commands.d.ts +28 -0
- package/dist/chart/context.d.ts +12 -0
- package/dist/chart/dataset-merge.d.ts +5 -0
- package/dist/chart/formula.d.ts +13 -0
- package/dist/chart/identity-frames.d.ts +4 -0
- package/dist/chart/identity-scopes.d.ts +6 -0
- package/dist/chart/identity.d.ts +24 -0
- package/dist/chart/index.d.ts +8 -0
- package/dist/chart/limits.d.ts +6 -0
- package/dist/chart/locator.d.ts +4 -0
- package/dist/chart/materialize.d.ts +7 -0
- package/dist/chart/ordering.d.ts +9 -0
- package/dist/chart/part-graph.d.ts +5 -0
- package/dist/chart/patch-validation.d.ts +3 -0
- package/dist/chart/plot-kinds.d.ts +2 -0
- package/dist/chart/projection.d.ts +8 -0
- package/dist/chart/save.d.ts +4 -0
- package/dist/chart/shared-added-plan.d.ts +19 -0
- package/dist/chart/shared-added-records.d.ts +8 -0
- package/dist/chart/shared-address.d.ts +5 -0
- package/dist/chart/shared-allocate.d.ts +7 -0
- package/dist/chart/shared-cache-codec.d.ts +5 -0
- package/dist/chart/shared-cache-identities.d.ts +3 -0
- package/dist/chart/shared-cache-migration.d.ts +7 -0
- package/dist/chart/shared-cache-save.d.ts +3 -0
- package/dist/chart/shared-cache-scopes.d.ts +13 -0
- package/dist/chart/shared-cache.d.ts +11 -0
- package/dist/chart/shared-category.d.ts +4 -0
- package/dist/chart/shared-cell.d.ts +9 -0
- package/dist/chart/shared-family.d.ts +26 -0
- package/dist/chart/shared-fields.d.ts +18 -0
- package/dist/chart/shared-graph.d.ts +19 -0
- package/dist/chart/shared-growth-space.d.ts +5 -0
- package/dist/chart/shared-inserted-cells.d.ts +14 -0
- package/dist/chart/shared-inserted-command.d.ts +7 -0
- package/dist/chart/shared-inserted-layout.d.ts +16 -0
- package/dist/chart/shared-inserted-project.d.ts +14 -0
- package/dist/chart/shared-inserted-records.d.ts +16 -0
- package/dist/chart/shared-inserted-save.d.ts +6 -0
- package/dist/chart/shared-joint-command.d.ts +9 -0
- package/dist/chart/shared-joint-records.d.ts +9 -0
- package/dist/chart/shared-record-axis.d.ts +25 -0
- package/dist/chart/shared-record-remove.d.ts +13 -0
- package/dist/chart/shared-record-stage.d.ts +2 -0
- package/dist/chart/shared-records.d.ts +2 -0
- package/dist/chart/shared-rows.d.ts +17 -0
- package/dist/chart/shared-runtime.d.ts +19 -0
- package/dist/chart/shared-save-plan.d.ts +4 -0
- package/dist/chart/shared-save.d.ts +3 -0
- package/dist/chart/shared-series.d.ts +6 -0
- package/dist/chart/shared-source-cache.d.ts +4 -0
- package/dist/chart/shared-topology.d.ts +9 -0
- package/dist/chart/shared-unresolved.d.ts +3 -0
- package/dist/chart/shared-validation.d.ts +6 -0
- package/dist/chart/shared-workbook-source.d.ts +6 -0
- package/dist/chart/shared-xy-command.d.ts +7 -0
- package/dist/chart/shared-xy-family.d.ts +16 -0
- package/dist/chart/shared-xy-project.d.ts +6 -0
- package/dist/chart/shared-xy-records.d.ts +23 -0
- package/dist/chart/shared-xy-save.d.ts +5 -0
- package/dist/chart/shared-xy-source.d.ts +39 -0
- package/dist/chart/shared.d.ts +13 -0
- package/dist/chart/source.d.ts +11 -0
- package/dist/chart/types.d.ts +86 -0
- package/dist/chart/validation.d.ts +24 -0
- package/dist/chart/workbook-range.d.ts +16 -0
- package/dist/chart/workbook-read.d.ts +7 -0
- package/dist/chart/workbook-write.d.ts +9 -0
- package/dist/chart/workbook.d.ts +25 -0
- package/dist/chart/xml-data.d.ts +14 -0
- package/dist/chart/xml-namespaces.d.ts +16 -0
- package/dist/chart-design/index.d.ts +10 -0
- package/dist/chart-design/types.d.ts +11 -0
- package/dist/chart-design/xml.d.ts +2 -0
- package/dist/chart-design.js +361 -0
- package/dist/chart-ex/index.d.ts +15 -0
- package/dist/chart-ex/workbook.d.ts +6 -0
- package/dist/chart-ex/xml.d.ts +14 -0
- package/dist/chart-ex.js +457 -0
- package/dist/chart-shared/index.d.ts +12 -0
- package/dist/chart-shared.js +1 -0
- package/dist/chart.js +1 -0
- package/dist/clipboard-links-GuPtqr1z.js +778 -0
- package/dist/clipboard-package.d.ts +4 -0
- package/dist/clipboard-source.d.ts +6 -2
- package/dist/clipboard-trees.d.ts +9 -0
- package/dist/commands/add-slide-identity.d.ts +2 -0
- package/dist/commands/bullet-image-resource.d.ts +11 -0
- package/dist/commands/clear-format.d.ts +4 -0
- package/dist/commands/common-object-slide-patch.d.ts +4 -0
- package/dist/commands/common-object-slide-types.d.ts +68 -0
- package/dist/commands/direct-format-patches.d.ts +11 -5
- package/dist/commands/distribute-elements.d.ts +4 -0
- package/dist/commands/edit-table-grid.d.ts +10 -0
- package/dist/commands/element-alt-text.d.ts +8 -0
- package/dist/commands/element-arrangement.d.ts +17 -0
- package/dist/commands/element-effects.d.ts +1 -1
- package/dist/commands/element-fill.d.ts +1 -1
- package/dist/commands/element-geometry.d.ts +5 -2
- package/dist/commands/element-image-content.d.ts +2 -2
- package/dist/commands/element-link.d.ts +1 -1
- package/dist/commands/element-name.d.ts +1 -1
- package/dist/commands/element-stroke.d.ts +1 -1
- package/dist/commands/element-text.d.ts +1 -1
- package/dist/commands/element-transform.d.ts +2 -2
- package/dist/commands/geometry-types.d.ts +23 -1
- package/dist/commands/hierarchy-record.d.ts +5 -0
- package/dist/commands/image-resource.d.ts +8 -1
- package/dist/commands/insertion-host.d.ts +14 -1
- package/dist/commands/layout-property.d.ts +7 -0
- package/dist/commands/master-property.d.ts +5 -0
- package/dist/commands/master-text-style-types.d.ts +27 -0
- package/dist/commands/master-text-style.d.ts +7 -0
- package/dist/commands/paste-resources.d.ts +9 -5
- package/dist/commands/patch-apply.d.ts +3 -0
- package/dist/commands/patch-count.d.ts +1 -0
- package/dist/commands/patch-invalidation.d.ts +1 -1
- package/dist/commands/patch-stage.d.ts +4 -0
- package/dist/commands/record-override.d.ts +5 -0
- package/dist/commands/replace-image.d.ts +6 -1
- package/dist/commands/sections.d.ts +10 -0
- package/dist/commands/set-preset.d.ts +5 -0
- package/dist/commands/slide-property-types.d.ts +55 -5
- package/dist/commands/slide-size.d.ts +7 -0
- package/dist/commands/spid.d.ts +1 -1
- package/dist/commands/table-grid-patch.d.ts +12 -0
- package/dist/commands/text-target.d.ts +2 -2
- package/dist/commands/theme-types.d.ts +47 -0
- package/dist/commands/theme.d.ts +9 -0
- package/dist/commands/types.d.ts +194 -17
- package/dist/commands/ungroup-source.d.ts +3 -0
- package/dist/comments/index.d.ts +35 -0
- package/dist/comments/save.d.ts +3 -0
- package/dist/comments/state.d.ts +10 -0
- package/dist/comments/xml.d.ts +12 -0
- package/dist/comments.js +782 -0
- package/dist/common-object-slide-types.d.ts +34 -0
- package/dist/data-validation.d.ts +1 -1
- package/dist/describe/budget.d.ts +3 -0
- package/dist/describe/index.d.ts +5 -0
- package/dist/describe/read.d.ts +4 -0
- package/dist/describe/types.d.ts +103 -0
- package/dist/describe.js +192 -0
- package/dist/design-dependencies.d.ts +8 -0
- package/dist/design-projection-package.d.ts +10 -0
- package/dist/design-target.d.ts +10 -0
- package/dist/design.d.ts +3 -0
- package/dist/document-extensions.d.ts +9 -0
- package/dist/document.d.ts +1 -1
- package/dist/dynamic-projection.d.ts +6 -0
- package/dist/edit-core.js +5420 -4111
- package/dist/editor.d.ts +15 -3
- package/dist/element-source.d.ts +11 -0
- package/dist/element-spids.d.ts +4 -0
- package/dist/extension-address-journal.d.ts +9 -0
- package/dist/extension-address-remap.d.ts +14 -0
- package/dist/extension-addresses.d.ts +20 -0
- package/dist/extension-copy-history.d.ts +7 -0
- package/dist/extension-copy.d.ts +16 -0
- package/dist/extension-migration-receipt.d.ts +34 -0
- package/dist/extension-recovery-context.d.ts +5 -0
- package/dist/extension-runtime.d.ts +64 -0
- package/dist/generate/comments.d.ts +3 -0
- package/dist/generate/compatibility-parts.d.ts +14 -0
- package/dist/generate/compatibility-references.d.ts +3 -0
- package/dist/generate/compatibility.d.ts +4 -0
- package/dist/generate/index.d.ts +1 -0
- package/dist/generate/master-defaults.d.ts +4 -0
- package/dist/generate/materialize.d.ts +2 -2
- package/dist/generate/math.d.ts +3 -0
- package/dist/generate/portable-clipboard.d.ts +4 -0
- package/dist/generate/projection-tree.d.ts +8 -0
- package/dist/generate/template.d.ts +68 -1
- package/dist/generate/text-body.d.ts +2 -0
- package/dist/generate/text-effects.d.ts +5 -0
- package/dist/generate/text-override.d.ts +8 -0
- package/dist/generate/validation.d.ts +3 -0
- package/dist/generate/warp.d.ts +2 -0
- package/dist/generate.js +1232 -512
- package/dist/history.d.ts +11 -1
- package/dist/identities.d.ts +4 -0
- package/dist/image-content.d.ts +5 -2
- package/dist/image-resource-history.d.ts +2 -0
- package/dist/index-C2r7c6G6.js +714 -0
- package/dist/index-CYDvbiwF.js +1 -0
- package/dist/index.d.ts +35 -7
- package/dist/ink/index.d.ts +27 -0
- package/dist/ink/model.d.ts +4 -0
- package/dist/ink/save.d.ts +3 -0
- package/dist/ink/source.d.ts +7 -0
- package/dist/ink.js +324 -0
- package/dist/layout-assets.d.ts +3 -1
- package/dist/layout-projection.d.ts +17 -5
- package/dist/layout-state.d.ts +2 -0
- package/dist/layout-types.d.ts +42 -0
- package/dist/layout.d.ts +5 -0
- package/dist/lint/color.d.ts +5 -0
- package/dist/lint/index.d.ts +7 -0
- package/dist/lint/prompts.d.ts +3 -0
- package/dist/lint/report.d.ts +21 -0
- package/dist/lint/sampler-batch.d.ts +4 -0
- package/dist/lint/sampler-images.d.ts +2 -0
- package/dist/lint/sampler.d.ts +9 -0
- package/dist/lint/snapshot.d.ts +34 -0
- package/dist/lint/types.d.ts +67 -0
- package/dist/lint-sampler.js +187 -0
- package/dist/lint.js +659 -0
- package/dist/master-state.d.ts +3 -0
- package/dist/master-text-style-state.d.ts +3 -0
- package/dist/master-types.d.ts +55 -0
- package/dist/master.d.ts +5 -0
- package/dist/media/audio-icon.d.ts +2 -0
- package/dist/media/commands.d.ts +3 -0
- package/dist/media/index.d.ts +10 -0
- package/dist/media/markup.d.ts +10 -0
- package/dist/media/mp4-boxes.d.ts +12 -0
- package/dist/media/mp4-fragments.d.ts +8 -0
- package/dist/media/mp4-samples.d.ts +4 -0
- package/dist/media/mp4.d.ts +2 -0
- package/dist/media/poster.d.ts +2 -0
- package/dist/media/replace-poster.d.ts +3 -0
- package/dist/media/resource.d.ts +4 -0
- package/dist/media/source.d.ts +14 -0
- package/dist/media/types.d.ts +33 -0
- package/dist/media-properties.d.ts +4 -0
- package/dist/media.js +1630 -0
- package/dist/model-invariants-BM19JVxy.js +8980 -0
- package/dist/object-source.d.ts +11 -0
- package/dist/ole/container.d.ts +14 -0
- package/dist/ole/content.d.ts +94 -0
- package/dist/ole/index.d.ts +20 -0
- package/dist/ole/preview.d.ts +3 -0
- package/dist/ole/save.d.ts +2 -0
- package/dist/ole/state.d.ts +16 -0
- package/dist/ole.js +870 -0
- package/dist/opc.js +1 -1
- package/dist/paragraph-level.d.ts +2 -2
- package/dist/paragraph-property-schema.d.ts +4 -1
- package/dist/{patch-D7lZelRa.js → patch-BwhfBbYE.js} +10 -10
- package/dist/patch-events.d.ts +5 -1
- package/dist/ppt/appearance.d.ts +11 -0
- package/dist/ppt/binary.d.ts +20 -0
- package/dist/ppt/drawing.d.ts +18 -0
- package/dist/ppt/geometry.d.ts +4 -0
- package/dist/ppt/index.d.ts +12 -0
- package/dist/ppt/pictures.d.ts +11 -0
- package/dist/ppt/text.d.ts +9 -0
- package/dist/ppt.js +774 -0
- package/dist/preset-geometry.d.ts +6 -0
- package/dist/projection.d.ts +2 -0
- package/dist/query-BHLjWjnu.js +903 -0
- package/dist/recovery-identity.d.ts +1 -0
- package/dist/recovery-migrations.d.ts +3 -0
- package/dist/recovery.d.ts +3 -0
- package/dist/resize/index.d.ts +6 -0
- package/dist/resize/text.d.ts +4 -0
- package/dist/resize.js +5090 -0
- package/dist/retained-element-origins.d.ts +6 -0
- package/dist/run-property-fields.d.ts +12 -0
- package/dist/run-property-schema.d.ts +3 -1
- package/dist/run-style.d.ts +15 -0
- package/dist/save/alt-text.d.ts +4 -0
- package/dist/save/comments.d.ts +3 -0
- package/dist/save/effects.d.ts +2 -1
- package/dist/save/extension-availability.d.ts +3 -0
- package/dist/save/extension-elements.d.ts +26 -0
- package/dist/save/index.d.ts +6 -1
- package/dist/save/insertion.d.ts +6 -5
- package/dist/save/layout-properties.d.ts +4 -0
- package/dist/save/master-properties.d.ts +5 -0
- package/dist/save/paragraph-overrides.d.ts +3 -0
- package/dist/save/slide-parts.d.ts +1 -0
- package/dist/save/table.d.ts +2 -0
- package/dist/save/xfrm.d.ts +8 -2
- package/dist/save.js +493 -498
- package/dist/sections.d.ts +8 -0
- package/dist/session-assets.d.ts +4 -0
- package/dist/slide-parts-D0o_DDhi.js +1331 -0
- package/dist/slide-size.d.ts +6 -0
- package/dist/smartart/drawing.d.ts +3 -0
- package/dist/smartart/index.d.ts +16 -0
- package/dist/smartart/model.d.ts +18 -0
- package/dist/smartart/save.d.ts +3 -0
- package/dist/smartart.js +604 -0
- package/dist/source-retention.d.ts +7 -0
- package/dist/space.d.ts +37 -0
- package/dist/table-cell.d.ts +7 -1
- package/dist/table-grid-projection.d.ts +6 -0
- package/dist/table-grid.d.ts +45 -0
- package/dist/table-invariants.d.ts +4 -0
- package/dist/table-rows.d.ts +2 -1
- package/dist/table-scale.d.ts +4 -0
- package/dist/table-style.d.ts +5 -4
- package/dist/templates/index.d.ts +4 -0
- package/dist/templates/recipes.d.ts +5 -0
- package/dist/templates/types.d.ts +17 -0
- package/dist/templates.js +543 -0
- package/dist/text-flatten.d.ts +6 -0
- package/dist/text-fragment.d.ts +5 -0
- package/dist/text-model.d.ts +8 -8
- package/dist/text-override-validation.d.ts +6 -2
- package/dist/text-selection.d.ts +4 -0
- package/dist/theme-projection.d.ts +8 -0
- package/dist/theme-xml.d.ts +3 -0
- package/dist/theme.d.ts +14 -0
- package/dist/types.d.ts +174 -8
- package/dist/xml/index.d.ts +1 -1
- package/dist/xml/nodes.d.ts +2 -2
- package/dist/xml/shape-ids.d.ts +3 -0
- package/dist/xml.js +19 -16
- package/package.json +79 -5
- package/schemas/describe.schema.json +479 -0
- package/schemas/lint.schema.json +145 -0
- package/dist/document-B1jjN-QB.js +0 -274
- package/dist/image-resource-DbgJS9n-.js +0 -24
- package/dist/index-D2JizcOQ.js +0 -706
- package/dist/insertion-CGpb504L.js +0 -6152
- package/dist/table-style-part-DBtpxmuo.js +0 -1042
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { queryChartData as q, chartProjection as K } from "@web-ppt/edit-core/chart";
|
|
2
|
+
import { renderChartXml as G } from "@web-ppt/core/chart-edit";
|
|
3
|
+
import { findXmlAttribute as Y, createXmlElement as W, xmlElementChildren as F, parseXmlTree as Z, setXmlAttribute as S, removeXmlChild as w, insertXmlChildUnchecked as d, serializeXmlTree as U, createXmlText as J, cloneXmlNodeWithNamespaceClosure as y } from "@web-ppt/edit-core/xml";
|
|
4
|
+
function Q(e, t, o) {
|
|
5
|
+
if (!e || typeof e != "object" || Object.getPrototypeOf(e) !== Object.prototype && Object.getPrototypeOf(e) !== null)
|
|
6
|
+
throw new Error(`${o} 必须是纯数据对象`);
|
|
7
|
+
const r = Array.isArray(t) ? new Set(t) : t;
|
|
8
|
+
for (const a of Reflect.ownKeys(e)) {
|
|
9
|
+
const n = Object.getOwnPropertyDescriptor(e, a);
|
|
10
|
+
if (typeof a != "string" || !r.has(a) || !(n != null && n.enumerable) || !("value" in n))
|
|
11
|
+
throw new Error(`${o} 包含不可序列化或未知字段:${String(a)}`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function tt(e, t) {
|
|
15
|
+
if (!Array.isArray(e) || Object.getPrototypeOf(e) !== Array.prototype)
|
|
16
|
+
throw new Error(`${t} 必须是纯数据数组`);
|
|
17
|
+
const o = Reflect.ownKeys(e);
|
|
18
|
+
if (o.length !== e.length + 1 || o[o.length - 1] !== "length")
|
|
19
|
+
throw new Error(`${t} 必须是没有附加字段的稠密数组`);
|
|
20
|
+
for (let r = 0; r < e.length; r++) {
|
|
21
|
+
const a = String(r), n = Object.getOwnPropertyDescriptor(e, a);
|
|
22
|
+
if (o[r] !== a || !(n != null && n.enumerable) || !("value" in n))
|
|
23
|
+
throw new Error(`${t}[${r}] 必须是可序列化的数据项`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const M = Symbol.for("@web-ppt/edit-core/extensions/v1"), V = Symbol.for("@web-ppt/edit-core/extensions-generation/v1"), I = Symbol.for("@web-ppt/edit-core/extensions-listeners/v1"), et = /^[a-z][a-z0-9-]{0,63}$/;
|
|
27
|
+
function R() {
|
|
28
|
+
const e = globalThis;
|
|
29
|
+
return e[I] ?? (e[I] = { documents: /* @__PURE__ */ new WeakMap(), pending: /* @__PURE__ */ new Map(), active: /* @__PURE__ */ new Set(), resolvers: /* @__PURE__ */ new WeakMap() });
|
|
30
|
+
}
|
|
31
|
+
function rt(e) {
|
|
32
|
+
if (!et.test(e))
|
|
33
|
+
throw new Error(`编辑扩展命名空间无效:${e}`);
|
|
34
|
+
}
|
|
35
|
+
function ot() {
|
|
36
|
+
const e = globalThis;
|
|
37
|
+
return e[M] ?? (e[M] = /* @__PURE__ */ new Map());
|
|
38
|
+
}
|
|
39
|
+
function nt(e, t) {
|
|
40
|
+
var a;
|
|
41
|
+
rt(e), ot().set(e, t);
|
|
42
|
+
const o = globalThis;
|
|
43
|
+
o[V] = (o[V] ?? 0) + 1;
|
|
44
|
+
const r = new Set(R().pending.get(e));
|
|
45
|
+
if (t.migrate) for (const n of R().active) r.add(n);
|
|
46
|
+
R().pending.delete(e);
|
|
47
|
+
for (const n of r ?? [])
|
|
48
|
+
try {
|
|
49
|
+
n(e);
|
|
50
|
+
} catch (l) {
|
|
51
|
+
(a = globalThis.reportError) == null || a.call(globalThis, l);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const lt = "http://schemas.openxmlformats.org/drawingml/2006/chart", at = "http://purl.oclc.org/ooxml", it = `${at}/drawingml/chart`, st = (e, t, o) => e === t || e === o, ct = (e) => st(e, lt, it);
|
|
55
|
+
function ft(e) {
|
|
56
|
+
return { child: (r, a) => r && e(r.namespaceUri) ? F(r).find((n) => n.namespaceUri === r.namespaceUri && n.localName === a) ?? null : null, children: (r, a) => r && e(r.namespaceUri) ? F(r).filter((n) => n.namespaceUri === r.namespaceUri && (!a || n.localName === a)) : [] };
|
|
57
|
+
}
|
|
58
|
+
const ut = ft(ct), C = (e, t) => {
|
|
59
|
+
var o;
|
|
60
|
+
return e ? ((o = Y(e, { localName: t, namespaceUri: null })) == null ? void 0 : o.value) ?? null : null;
|
|
61
|
+
};
|
|
62
|
+
function v(e, t, o = []) {
|
|
63
|
+
return W(e.prefix ? `${e.prefix}:${t}` : t, {
|
|
64
|
+
attributes: o,
|
|
65
|
+
selfClosing: !1
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const D = {
|
|
69
|
+
barChart: "bar",
|
|
70
|
+
bar3DChart: "bar",
|
|
71
|
+
lineChart: "line",
|
|
72
|
+
line3DChart: "line",
|
|
73
|
+
pieChart: "pie",
|
|
74
|
+
pie3DChart: "pie",
|
|
75
|
+
doughnutChart: "doughnut",
|
|
76
|
+
areaChart: "area",
|
|
77
|
+
area3DChart: "area",
|
|
78
|
+
scatterChart: "scatter",
|
|
79
|
+
bubbleChart: "bubble",
|
|
80
|
+
radarChart: "radar",
|
|
81
|
+
stockChart: "stock",
|
|
82
|
+
ofPieChart: "ofPie",
|
|
83
|
+
surfaceChart: "surface",
|
|
84
|
+
surface3DChart: "surface"
|
|
85
|
+
}, pt = 2e4, { child: u, children: b } = ut, dt = {
|
|
86
|
+
bar: "barChart",
|
|
87
|
+
line: "lineChart",
|
|
88
|
+
area: "areaChart",
|
|
89
|
+
pie: "pieChart",
|
|
90
|
+
doughnut: "doughnutChart",
|
|
91
|
+
radar: "radarChart",
|
|
92
|
+
scatter: "scatterChart",
|
|
93
|
+
bubble: "bubbleChart"
|
|
94
|
+
}, k = (e) => e === "pie" || e === "doughnut", z = (e) => e === "scatter" || e === "bubble", s = (e, t, o) => {
|
|
95
|
+
const r = v(e, t, o === void 0 ? [] : [["val", o]]);
|
|
96
|
+
return d(e, r), r;
|
|
97
|
+
}, x = (e, t, o) => {
|
|
98
|
+
const r = v(e, t);
|
|
99
|
+
return d(e, r, b(e).find((a) => o.includes(a.localName)) ?? null), r;
|
|
100
|
+
}, E = (e, t, o) => {
|
|
101
|
+
const r = u(e, t) ?? s(e, t);
|
|
102
|
+
S(r, "val", o);
|
|
103
|
+
}, m = (e, t, o = []) => {
|
|
104
|
+
var n;
|
|
105
|
+
const r = (n = e.namespaceUri) != null && n.includes("purl.oclc.org") ? "http://purl.oclc.org/ooxml/drawingml/main" : "http://schemas.openxmlformats.org/drawingml/2006/main", a = W(`a:${t}`, { attributes: [["xmlns:a", r], ...o] });
|
|
106
|
+
return d(e, a), a;
|
|
107
|
+
};
|
|
108
|
+
function ht(e, t, o) {
|
|
109
|
+
const r = s(t, "ser");
|
|
110
|
+
for (const n of ["idx", "order", "tx", "spPr"]) {
|
|
111
|
+
const l = u(e, n);
|
|
112
|
+
l && d(r, y(l, r));
|
|
113
|
+
}
|
|
114
|
+
if (o === "line" || o === "radar" || o === "scatter") {
|
|
115
|
+
const n = u(e, "marker");
|
|
116
|
+
n && d(r, y(n, r));
|
|
117
|
+
}
|
|
118
|
+
for (const n of ["dPt", "dLbls"]) for (const l of b(e, n)) d(r, y(l, r));
|
|
119
|
+
if (!k(o) && o !== "radar") for (const n of ["trendline", "errBars"])
|
|
120
|
+
for (const l of b(e, n)) d(r, y(l, r));
|
|
121
|
+
for (const n of z(o) ? ["xVal", "yVal", "bubbleSize"] : ["cat", "val"]) {
|
|
122
|
+
if (n === "bubbleSize" && o !== "bubble") continue;
|
|
123
|
+
const l = u(e, n);
|
|
124
|
+
if (l) d(r, y(l, r));
|
|
125
|
+
else if (n === "bubbleSize") {
|
|
126
|
+
const i = s(r, n), f = s(i, "numLit"), c = u(u(e, "yVal"), "numRef"), p = u(c, "numCache") ?? u(u(e, "yVal"), "numLit"), h = Number(C(u(p, "ptCount"), "val")) || 0;
|
|
127
|
+
if (!Number.isInteger(h) || h < 0 || h > pt) throw new Error("气泡数据点数量无效");
|
|
128
|
+
s(f, "ptCount", String(h));
|
|
129
|
+
for (let g = 0; g < h; g++) {
|
|
130
|
+
const O = v(f, "pt", [["idx", String(g)]]);
|
|
131
|
+
d(f, O), d(s(O, "v"), J("1"));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
(o === "line" || o === "scatter") && s(r, "smooth", "0");
|
|
136
|
+
const a = u(e, "extLst");
|
|
137
|
+
return a && d(r, y(a, r)), r;
|
|
138
|
+
}
|
|
139
|
+
function bt(e, t) {
|
|
140
|
+
const o = b(e).filter((l) => D[l.localName]);
|
|
141
|
+
if (!o.length) throw new Error("图表没有可编辑绘图区");
|
|
142
|
+
const r = t.type;
|
|
143
|
+
if (!r) return o;
|
|
144
|
+
if (o.some((l) => z(D[l.localName]) !== z(r))) throw new Error("类别图与 XY 图的数据轴不同,需要先提供对应的数据");
|
|
145
|
+
const a = o.flatMap((l) => b(l, "ser"));
|
|
146
|
+
if (r === "pie" && a.length > 1) throw new Error("饼图只支持一个数据系列");
|
|
147
|
+
const n = v(e, dt[r]);
|
|
148
|
+
d(e, n, o[0] ?? null), r === "bar" && s(n, "barDir", t.horizontal ? "bar" : "col"), (r === "bar" || r === "line" || r === "area") && s(
|
|
149
|
+
n,
|
|
150
|
+
"grouping",
|
|
151
|
+
B(r, t.grouping)
|
|
152
|
+
), r === "radar" && s(n, "radarStyle", "marker"), r === "scatter" && s(n, "scatterStyle", "lineMarker"), s(n, "varyColors", k(r) ? "1" : "0");
|
|
153
|
+
for (const l of a) ht(l, n, r);
|
|
154
|
+
if (t.labels !== void 0 && s(s(n, "dLbls"), "showVal", t.labels ? "1" : "0"), r === "doughnut" && s(n, "holeSize", "50"), r === "bar" && t.grouping && t.grouping !== "standard" && s(n, "overlap", "100"), k(r))
|
|
155
|
+
for (const l of b(e).filter((i) => i.localName.endsWith("Ax"))) w(e, l);
|
|
156
|
+
else {
|
|
157
|
+
const l = mt(e, r, t.horizontal === !0);
|
|
158
|
+
for (const i of l) s(n, "axId", C(u(i, "axId"), "val"));
|
|
159
|
+
}
|
|
160
|
+
for (const l of o) w(e, l);
|
|
161
|
+
return [n];
|
|
162
|
+
}
|
|
163
|
+
const B = (e, t) => t && t !== "standard" ? t : e === "bar" ? "clustered" : "standard";
|
|
164
|
+
function mt(e, t, o) {
|
|
165
|
+
const r = b(e).filter((n) => n.localName.endsWith("Ax")), a = [];
|
|
166
|
+
for (const [n, l] of [z(t) ? "valAx" : "catAx", "valAx"].entries()) {
|
|
167
|
+
let i = r.find((f) => !a.includes(f) && (f.localName === l || l === "catAx" && f.localName === "dateAx"));
|
|
168
|
+
i || (i = x(e, l, ["dTable", "spPr", "extLst"]), s(i, "axId", String(1001 + n)), s(s(i, "scaling"), "orientation", "minMax"), s(i, "delete", "0"), s(i, "axPos", "b"), s(i, "crossAx", "0"), s(i, "crosses", "autoZero"), l === "catAx" && (s(i, "auto", "1"), s(i, "lblAlgn", "ctr"), s(i, "lblOffset", "100"))), E(i, "axId", String(1001 + n)), E(i, "crossAx", String(n ? 1001 : 1002)), E(i, "axPos", n === 0 === (t === "bar" && o) ? "l" : "b"), a.push(i);
|
|
169
|
+
}
|
|
170
|
+
for (const n of r) a.includes(n) || w(e, n);
|
|
171
|
+
return a;
|
|
172
|
+
}
|
|
173
|
+
function X(e, t) {
|
|
174
|
+
let o = u(e, "spPr");
|
|
175
|
+
o || (o = v(e, "spPr"), d(
|
|
176
|
+
e,
|
|
177
|
+
o,
|
|
178
|
+
b(e).find((l) => e.localName === "dPt" ? l.localName === "extLst" : !["idx", "order", "tx"].includes(l.localName)) ?? null
|
|
179
|
+
));
|
|
180
|
+
for (const l of [...o.children]) l.type === "element" && ["noFill", "solidFill", "gradFill", "blipFill", "pattFill", "grpFill", "ln"].includes(l.localName) && w(o, l);
|
|
181
|
+
const r = m(o, "solidFill"), a = m(o, "ln", [["w", "19050"]]);
|
|
182
|
+
m(r, "srgbClr", [["val", t.slice(1)]]), m(m(a, "solidFill"), "srgbClr", [["val", t.slice(1)]]), w(o, r), w(o, a);
|
|
183
|
+
const n = o.children.find((l) => l.type === "element" && ["effectLst", "effectDag", "scene3d", "sp3d", "extLst"].includes(l.localName)) ?? null;
|
|
184
|
+
d(o, r, n), d(o, a, n);
|
|
185
|
+
}
|
|
186
|
+
function P(e, t) {
|
|
187
|
+
const o = Z(e), r = u(o.root, "chart"), a = u(r, "plotArea");
|
|
188
|
+
if (!r || !a) throw new Error("经典图表绘图区缺失");
|
|
189
|
+
const n = bt(a, t);
|
|
190
|
+
if (!t.type) for (const i of n) {
|
|
191
|
+
const f = D[i.localName];
|
|
192
|
+
if (t.horizontal !== void 0 && f === "bar") {
|
|
193
|
+
E(i, "barDir", t.horizontal ? "bar" : "col");
|
|
194
|
+
const c = b(i, "axId").map((p) => C(p, "val"));
|
|
195
|
+
for (const p of b(a).filter((h) => c.includes(C(u(h, "axId"), "val"))))
|
|
196
|
+
E(p, "axPos", p.localName !== "valAx" === t.horizontal ? "l" : "b");
|
|
197
|
+
}
|
|
198
|
+
if (t.grouping !== void 0 && ["bar", "line", "area"].includes(f)) {
|
|
199
|
+
const c = u(i, "grouping") ?? x(i, "grouping", ["varyColors", "ser", "dLbls", "axId", "extLst"]);
|
|
200
|
+
if (S(c, "val", B(f, t.grouping)), f === "bar") {
|
|
201
|
+
const p = u(i, "overlap") ?? x(i, "overlap", ["serLines", "axId", "extLst"]);
|
|
202
|
+
S(p, "val", t.grouping === "standard" ? "0" : "100");
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
const l = t.palette;
|
|
207
|
+
if (l != null && l.length) {
|
|
208
|
+
let i = 0;
|
|
209
|
+
for (const f of n) for (const c of b(f, "ser")) {
|
|
210
|
+
const p = l[i++ % l.length];
|
|
211
|
+
if (X(c, p), ["pie", "doughnut", "ofPie"].includes(D[f.localName])) {
|
|
212
|
+
const h = u(c, "val"), g = u(u(h, "numRef"), "numCache") ?? u(h, "numLit");
|
|
213
|
+
for (const O of b(g, "pt")) {
|
|
214
|
+
const $ = C(O, "idx") ?? "0";
|
|
215
|
+
let T = b(c, "dPt").find((H) => C(u(H, "idx"), "val") === $);
|
|
216
|
+
T || (T = x(c, "dPt", ["dLbls", "cat", "val", "extLst"]), s(T, "idx", $)), X(T, l[Number($) % l.length] ?? p);
|
|
217
|
+
}
|
|
218
|
+
} else for (const h of b(c, "dPt")) X(h, p);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (t.labels !== void 0 && !t.type) for (const i of n) {
|
|
222
|
+
const f = u(i, "dLbls") ?? x(i, "dLbls", [
|
|
223
|
+
"dropLines",
|
|
224
|
+
"hiLowLines",
|
|
225
|
+
"upDownBars",
|
|
226
|
+
"gapWidth",
|
|
227
|
+
"overlap",
|
|
228
|
+
"serLines",
|
|
229
|
+
"firstSliceAng",
|
|
230
|
+
"holeSize",
|
|
231
|
+
"bubble3D",
|
|
232
|
+
"bubbleScale",
|
|
233
|
+
"showNegBubbles",
|
|
234
|
+
"sizeRepresents",
|
|
235
|
+
"marker",
|
|
236
|
+
"smooth",
|
|
237
|
+
"axId",
|
|
238
|
+
"extLst"
|
|
239
|
+
]), c = u(f, "showVal") ?? x(f, "showVal", ["showCatName", "showSerName", "showPercent", "showBubbleSize", "separator", "showLeaderLines", "leaderLines", "extLst"]);
|
|
240
|
+
S(c, "val", t.labels ? "1" : "0");
|
|
241
|
+
}
|
|
242
|
+
if (t.legend !== void 0) {
|
|
243
|
+
const i = u(r, "legend");
|
|
244
|
+
if (i && w(r, i), t.legend !== "none") {
|
|
245
|
+
const f = v(r, "legend");
|
|
246
|
+
d(r, f, b(r).find((c) => ["plotVisOnly", "dispBlanksAs", "showDLblsOverMax", "extLst"].includes(c.localName)) ?? null), s(f, "legendPos", { left: "l", right: "r", top: "t", bottom: "b" }[t.legend]), s(f, "overlay", "0");
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if (t.title !== void 0) {
|
|
250
|
+
const i = u(r, "title");
|
|
251
|
+
i && w(r, i);
|
|
252
|
+
const f = u(r, "autoTitleDeleted") ?? x(r, "autoTitleDeleted", ["pivotFmts", "view3D", "floor", "sideWall", "backWall", "plotArea", "legend", "plotVisOnly", "extLst"]);
|
|
253
|
+
if (S(f, "val", t.title ? "0" : "1"), !t.title) return U(o);
|
|
254
|
+
const c = v(r, "title");
|
|
255
|
+
d(r, c, r.children[0] ?? null);
|
|
256
|
+
const p = s(s(c, "tx"), "rich");
|
|
257
|
+
m(p, "bodyPr"), m(p, "lstStyle");
|
|
258
|
+
const h = m(m(p, "p"), "r");
|
|
259
|
+
d(m(h, "t"), J(t.title)), s(c, "overlay", "0");
|
|
260
|
+
}
|
|
261
|
+
return U(o);
|
|
262
|
+
}
|
|
263
|
+
const gt = ["bar", "line", "area", "pie", "doughnut", "radar", "scatter", "bubble"], j = "chart-design", A = (e, t) => {
|
|
264
|
+
var o, r, a;
|
|
265
|
+
return (a = (r = (o = e.elements[t]) == null ? void 0 : o.ovr.extensions) == null ? void 0 : r[j]) == null ? void 0 : a.value;
|
|
266
|
+
};
|
|
267
|
+
function L(e, t) {
|
|
268
|
+
const o = q(e, t).binding;
|
|
269
|
+
if (o.mode === "readonly") throw new Error(o.reason ?? "图表只读");
|
|
270
|
+
return K(e, t);
|
|
271
|
+
}
|
|
272
|
+
function N(e) {
|
|
273
|
+
Q(e, ["type", "horizontal", "grouping", "palette", "legend", "labels", "title"], "图表样式");
|
|
274
|
+
const t = e;
|
|
275
|
+
if (t.type !== void 0 && !gt.includes(t.type)) throw new Error("图表类型无效");
|
|
276
|
+
for (const o of ["horizontal", "labels"]) if (t[o] !== void 0 && typeof t[o] != "boolean") throw new Error(`图表 ${o} 必须为布尔值`);
|
|
277
|
+
if (t.grouping !== void 0 && !["standard", "stacked", "percentStacked"].includes(t.grouping)) throw new Error("图表分组无效");
|
|
278
|
+
if (t.legend !== void 0 && !["none", "left", "right", "top", "bottom"].includes(t.legend)) throw new Error("图例位置无效");
|
|
279
|
+
if (t.title !== void 0 && (typeof t.title != "string" || t.title.length > 1e4 || /[\u0000-\u0008\u000b\u000c\u000e-\u001f\ud800-\udfff\ufffe\uffff]/u.test(t.title))) throw new Error("图表标题无效");
|
|
280
|
+
if (t.palette !== void 0 && (tt(t.palette, "图表配色"), !t.palette.length || t.palette.length > 32 || t.palette.some((o) => !/^#[\da-f]{6}$/i.test(o))))
|
|
281
|
+
throw new Error("图表配色需要 1–32 个十六进制颜色");
|
|
282
|
+
return { ...t, ...t.palette ? { palette: t.palette.map((o) => o.toUpperCase()) } : {} };
|
|
283
|
+
}
|
|
284
|
+
function wt(e, t) {
|
|
285
|
+
if (t.path[0] !== "elements" || t.path.length !== 6 || t.path[5] !== "value") throw new Error("图表样式补丁路径无效");
|
|
286
|
+
const o = L(e, t.path[1]);
|
|
287
|
+
if (t.op === "set") {
|
|
288
|
+
if (typeof t.value != "string" || t.value.length > 2e4) throw new Error("图表样式补丁值无效");
|
|
289
|
+
P(o.xml, N(JSON.parse(t.value)));
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
function xt(e, t, o) {
|
|
293
|
+
var i;
|
|
294
|
+
if (e.meta.readonly || ((i = e.elements[t.id]) == null ? void 0 : i.meta.editable) !== "frame") throw new Error("对象不允许修改图表样式");
|
|
295
|
+
const r = t.payload === null ? void 0 : JSON.stringify(N(t.payload)), a = L(e, t.id);
|
|
296
|
+
r !== void 0 && P(a.xml, JSON.parse(r));
|
|
297
|
+
const n = A(e, t.id), l = ["elements", t.id, "ovr", "extensions", j, "value"];
|
|
298
|
+
return n === r ? { forward: [], inverse: [] } : {
|
|
299
|
+
forward: [r === void 0 ? { op: "del", path: l, origin: o } : { op: "set", path: l, value: r, origin: o }],
|
|
300
|
+
inverse: [n === void 0 ? { op: "del", path: l, origin: o } : { op: "set", path: l, value: n, origin: o }]
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
function _(e, t) {
|
|
304
|
+
const o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
305
|
+
for (const a of Object.values(e.elements)) {
|
|
306
|
+
const n = A(e, a.id);
|
|
307
|
+
if (!n) continue;
|
|
308
|
+
const { part: l } = L(e, a.id);
|
|
309
|
+
if (!t[l]) throw new Error("生成图表缺少部件");
|
|
310
|
+
const i = r.get(l) ?? t[l];
|
|
311
|
+
r.set(l, i);
|
|
312
|
+
const f = P(i, N(JSON.parse(n)));
|
|
313
|
+
if (o.has(l) && o.get(l) !== f) throw new Error("共享图表不能设置不同样式");
|
|
314
|
+
o.set(l, f), t[l] = new TextEncoder().encode(f);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
nt(j, {
|
|
318
|
+
command: xt,
|
|
319
|
+
validatePatch: wt,
|
|
320
|
+
project(e, t, o) {
|
|
321
|
+
const r = A(e, t);
|
|
322
|
+
if (!r || o.kind !== "group") return o;
|
|
323
|
+
const a = L(e, t);
|
|
324
|
+
return { ...o, children: G(P(a.xml, N(JSON.parse(r))), o.w, o.h, a.context) };
|
|
325
|
+
},
|
|
326
|
+
generateParts: _,
|
|
327
|
+
copyParts: _,
|
|
328
|
+
materializePackage(e, t, o, r) {
|
|
329
|
+
var l;
|
|
330
|
+
const a = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
331
|
+
for (const i of Object.values(e.elements)) {
|
|
332
|
+
const f = A(e, i.id);
|
|
333
|
+
if (!f) continue;
|
|
334
|
+
const { part: c } = L(e, i.id), p = t[c] ?? ((l = e.package) == null ? void 0 : l.parts[c]);
|
|
335
|
+
if (!p) throw new Error("图表缺少保存来源");
|
|
336
|
+
t[c] ?? (t[c] = p.slice());
|
|
337
|
+
const h = n.get(c) ?? r[c] ?? p;
|
|
338
|
+
n.set(c, h);
|
|
339
|
+
const g = P(h, N(JSON.parse(f)));
|
|
340
|
+
if (a.has(c) && a.get(c) !== g) throw new Error("共享图表不能设置不同样式");
|
|
341
|
+
a.set(c, g), r[c] = new TextEncoder().encode(g);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
function vt(e, t) {
|
|
346
|
+
const o = A(e, t);
|
|
347
|
+
return o ? N(JSON.parse(o)) : {};
|
|
348
|
+
}
|
|
349
|
+
function St(e) {
|
|
350
|
+
return {
|
|
351
|
+
query: (t) => vt(e.doc, t),
|
|
352
|
+
set(t, o) {
|
|
353
|
+
return e.exec({ type: "Extension", namespace: j, id: t, payload: o });
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
export {
|
|
358
|
+
gt as CHART_TYPES,
|
|
359
|
+
St as createChartDesignEditor,
|
|
360
|
+
vt as queryChartDesign
|
|
361
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChartExDataset } from '@web-ppt/core/chart-ex';
|
|
2
|
+
import type { Editor, EditDoc, ElementId } from '@web-ppt/edit-core';
|
|
3
|
+
export type { ChartExDataset } from '@web-ppt/core/chart-ex';
|
|
4
|
+
export declare function listEditableChartEx(doc: EditDoc): {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}[];
|
|
8
|
+
export declare function queryChartExData(doc: EditDoc, id: ElementId): ChartExDataset[];
|
|
9
|
+
export declare function createChartExEditor(editor: Pick<Editor, 'doc' | 'exec'>): {
|
|
10
|
+
query: (id: ElementId) => ChartExDataset[];
|
|
11
|
+
setCell(id: ElementId, dataId: string, dimension: number, level: number, point: number, value: string | number | null): void;
|
|
12
|
+
insertRow(id: ElementId, dataId: string, index: number): void;
|
|
13
|
+
removeRow(id: ElementId, dataId: string, index: number): void;
|
|
14
|
+
reset(id: ElementId): void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ChartExDataset } from '@web-ppt/core/chart-ex';
|
|
2
|
+
/** 将修改数据放入独立工作表,原公式范围和其他图表的数据不会被行数变化覆盖。 */
|
|
3
|
+
export declare function chartExWorkbook(bytes: Uint8Array, datasets: ChartExDataset[]): {
|
|
4
|
+
bytes: Uint8Array<ArrayBuffer>;
|
|
5
|
+
formula: (data: number, dimension: number) => string | undefined;
|
|
6
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { XmlElement } from '@web-ppt/edit-core/xml';
|
|
2
|
+
import type { ChartExDataset } from '@web-ppt/core/chart-ex';
|
|
3
|
+
export declare const CX = "http://schemas.microsoft.com/office/drawing/2014/chartex";
|
|
4
|
+
export declare const R = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
5
|
+
export declare const children: (node: XmlElement | null, name?: string) => XmlElement[];
|
|
6
|
+
export declare const child: (node: XmlElement | null, name: string) => XmlElement;
|
|
7
|
+
export declare const attr: (node: XmlElement | null, name: string) => string | undefined;
|
|
8
|
+
export declare const add: (parent: XmlElement, name: string, attrs?: readonly (readonly [string, string])[], value?: string) => XmlElement;
|
|
9
|
+
export interface ChartExState {
|
|
10
|
+
data: ChartExDataset[];
|
|
11
|
+
rows: Record<string, (number | null)[]>;
|
|
12
|
+
}
|
|
13
|
+
export type DimensionFormula = (data: number, dimension: number) => string | undefined;
|
|
14
|
+
export declare function writeChartExData(source: string, state: ChartExState, formula?: DimensionFormula): string;
|