@quirekit/xlsx 0.0.0-stage → 0.3.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/LICENSE.md +21 -0
- package/THIRD_PARTY_NOTICES.md +150 -0
- package/dist/index.d.mts +122 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +19167 -0
- package/dist/index.mjs.map +1 -0
- package/licenses/saxes.LICENSE +64 -0
- package/licenses/xmlchars.LICENSE +18 -0
- package/package.json +52 -3
- package/src/bundle.ts +17 -0
- package/src/comments/legacy/read.ts +68 -0
- package/src/comments/legacy/write.ts +64 -0
- package/src/comments/package/ranges.ts +78 -0
- package/src/comments/package/read.ts +95 -0
- package/src/comments/package/roundtrip.test.ts +106 -0
- package/src/comments/package/write.ts +130 -0
- package/src/comments/thread/read.ts +69 -0
- package/src/comments/thread/write.ts +61 -0
- package/src/comments/types.ts +43 -0
- package/src/comments/xml.ts +50 -0
- package/src/create.ts +13 -0
- package/src/drawing/cache.ts +48 -0
- package/src/drawing/chart.test.ts +96 -0
- package/src/drawing/chart.ts +87 -0
- package/src/drawing/definition/plots.ts +76 -0
- package/src/drawing/definition/read.ts +65 -0
- package/src/drawing/definition/shape.ts +40 -0
- package/src/drawing/definition/types.ts +24 -0
- package/src/drawing/editable-picture.ts +80 -0
- package/src/drawing/graph.ts +148 -0
- package/src/drawing/identity.ts +22 -0
- package/src/drawing/import.ts +133 -0
- package/src/drawing/namespaces.ts +11 -0
- package/src/drawing/picture.test.ts +98 -0
- package/src/drawing/picture.ts +54 -0
- package/src/drawing/placement/anchor.ts +71 -0
- package/src/drawing/placement/axes.ts +113 -0
- package/src/drawing/placement/marker.ts +16 -0
- package/src/drawing/placement/transform.ts +132 -0
- package/src/drawing/placement/types.ts +20 -0
- package/src/drawing/presentation/cartesian/axes.ts +103 -0
- package/src/drawing/presentation/cartesian/plot.ts +109 -0
- package/src/drawing/presentation/cartesian/types.ts +9 -0
- package/src/drawing/presentation/layout.ts +29 -0
- package/src/drawing/presentation/paint.ts +56 -0
- package/src/drawing/presentation/properties.ts +31 -0
- package/src/drawing/read.ts +85 -0
- package/src/drawing/shapes/connector.ts +55 -0
- package/src/drawing/shapes/paint.ts +108 -0
- package/src/drawing/shapes/read.ts +89 -0
- package/src/drawing/shapes/text.ts +89 -0
- package/src/drawing/shapes/types.ts +13 -0
- package/src/drawing/sources.test.ts +27 -0
- package/src/drawing/sources.ts +43 -0
- package/src/drawing/types.ts +54 -0
- package/src/drawing/worksheet-connector.test.ts +135 -0
- package/src/drawing/worksheet-shape.test.ts +61 -0
- package/src/drawing/write/anchor.ts +17 -0
- package/src/drawing/write/axes.ts +23 -0
- package/src/drawing/write/chart.ts +56 -0
- package/src/drawing/write/drawing.ts +61 -0
- package/src/drawing/write/pictures.ts +68 -0
- package/src/drawing/write/series.ts +43 -0
- package/src/drawing/write/shapes.ts +113 -0
- package/src/drawing/write/text.ts +26 -0
- package/src/drawing/write/workbook.test.ts +199 -0
- package/src/drawing/write/workbook.ts +217 -0
- package/src/external-links/formulas.ts +21 -0
- package/src/external-links/read.test.ts +93 -0
- package/src/external-links/read.ts +104 -0
- package/src/external-links/types.ts +9 -0
- package/src/external-links/write.ts +120 -0
- package/src/image/excel.ts +122 -0
- package/src/image/native.ts +21 -0
- package/src/image/ownership.ts +77 -0
- package/src/image/parts.ts +45 -0
- package/src/image/raster.ts +25 -0
- package/src/image/read.test.ts +95 -0
- package/src/image/read.ts +66 -0
- package/src/image/relationships.ts +26 -0
- package/src/image/types.ts +48 -0
- package/src/image/wps.ts +43 -0
- package/src/image/write.test.ts +53 -0
- package/src/image/write.ts +118 -0
- package/src/index.ts +6 -0
- package/src/metadata/dynamic-array.ts +105 -0
- package/src/metadata/package.ts +75 -0
- package/src/metadata/types.ts +7 -0
- package/src/opc/archive.ts +26 -0
- package/src/opc/ownership.ts +40 -0
- package/src/opc/relationships.ts +98 -0
- package/src/opc/revision.ts +28 -0
- package/src/opc/shape.ts +23 -0
- package/src/opc/types.ts +13 -0
- package/src/opc/xml.test.ts +49 -0
- package/src/opc/xml.ts +128 -0
- package/src/optimization/blanks.ts +53 -0
- package/src/optimization/optimize.test.ts +117 -0
- package/src/optimization/optimize.ts +41 -0
- package/src/optimization/package.ts +65 -0
- package/src/optimization/rules.ts +46 -0
- package/src/optimization/styles.ts +76 -0
- package/src/optimization/types.ts +33 -0
- package/src/package/assembly.test.ts +117 -0
- package/src/package/calculation-metadata.test.ts +85 -0
- package/src/package/calculation-metadata.ts +88 -0
- package/src/package/checkboxes.ts +37 -0
- package/src/package/cleanup.test.ts +61 -0
- package/src/package/dashboard.test.ts +53 -0
- package/src/package/dashboard.ts +84 -0
- package/src/package/extensions.ts +16 -0
- package/src/package/merge-recipes.ts +84 -0
- package/src/package/names/conditional.ts +64 -0
- package/src/package/names/defined.test.ts +52 -0
- package/src/package/names/defined.ts +75 -0
- package/src/package/names/filter.ts +68 -0
- package/src/package/names/print-layout.ts +62 -0
- package/src/package/names/print.ts +62 -0
- package/src/package/new.ts +46 -0
- package/src/package/open/appearance.ts +46 -0
- package/src/package/open/directory.ts +61 -0
- package/src/package/open/restrictions.ts +27 -0
- package/src/package/open/snapshot.test.ts +48 -0
- package/src/package/open/snapshot.ts +34 -0
- package/src/package/open/source-write.ts +130 -0
- package/src/package/open/types.ts +73 -0
- package/src/package/open/worksheets.ts +149 -0
- package/src/package/positions.ts +40 -0
- package/src/package/read.ts +143 -0
- package/src/package/save/types.ts +57 -0
- package/src/package/save/worksheets.ts +126 -0
- package/src/package/selection-copy.test.ts +70 -0
- package/src/package/styles.ts +39 -0
- package/src/package/types.ts +52 -0
- package/src/package/workbook-views.ts +34 -0
- package/src/package/worksheets.test.ts +190 -0
- package/src/package/worksheets.ts +162 -0
- package/src/package/write.ts +175 -0
- package/src/pivot/cache/calculated.ts +34 -0
- package/src/pivot/cache/dates.ts +124 -0
- package/src/pivot/cache/groups.ts +11 -0
- package/src/pivot/cache/members.ts +99 -0
- package/src/pivot/cache/numbers.ts +63 -0
- package/src/pivot/cache/read.ts +131 -0
- package/src/pivot/cache/time.ts +20 -0
- package/src/pivot/cache/values.ts +43 -0
- package/src/pivot/cache/write.ts +117 -0
- package/src/pivot/definition/axes.ts +35 -0
- package/src/pivot/definition/dates.ts +87 -0
- package/src/pivot/definition/display.ts +86 -0
- package/src/pivot/definition/extension.ts +57 -0
- package/src/pivot/definition/field-settings/caption.ts +38 -0
- package/src/pivot/definition/field-settings/comparison.ts +47 -0
- package/src/pivot/definition/field-settings/field.ts +66 -0
- package/src/pivot/definition/field-settings/filters.ts +86 -0
- package/src/pivot/definition/field-settings/measure.ts +79 -0
- package/src/pivot/definition/field-settings/types.ts +19 -0
- package/src/pivot/definition/functions.ts +21 -0
- package/src/pivot/definition/items.ts +144 -0
- package/src/pivot/definition/members.ts +98 -0
- package/src/pivot/definition/numbers.ts +19 -0
- package/src/pivot/definition/presentation.ts +52 -0
- package/src/pivot/definition/read.ts +143 -0
- package/src/pivot/definition/report-layout.ts +39 -0
- package/src/pivot/definition/write.ts +157 -0
- package/src/pivot/package/calculated.test.ts +103 -0
- package/src/pivot/package/dates.test.ts +266 -0
- package/src/pivot/package/display.test.ts +133 -0
- package/src/pivot/package/field-settings.test.ts +59 -0
- package/src/pivot/package/layout.test.ts +148 -0
- package/src/pivot/package/measure-settings.test.ts +85 -0
- package/src/pivot/package/members.test.ts +167 -0
- package/src/pivot/package/numbers.test.ts +120 -0
- package/src/pivot/package/read.ts +93 -0
- package/src/pivot/package/roundtrip.test.ts +244 -0
- package/src/pivot/package/write.ts +103 -0
- package/src/pivot/types.ts +36 -0
- package/src/pivot/xml.ts +50 -0
- package/src/presentation.test.ts +186 -0
- package/src/roundtrip.test.ts +72 -0
- package/src/styles/checkbox/bags.ts +85 -0
- package/src/styles/checkbox/style.ts +45 -0
- package/src/styles/checkbox/types.ts +7 -0
- package/src/styles/color.ts +64 -0
- package/src/styles/differential-preview.ts +60 -0
- package/src/styles/differential.ts +119 -0
- package/src/styles/numbers.ts +9 -0
- package/src/styles/parts.ts +107 -0
- package/src/styles/read.ts +95 -0
- package/src/styles/reference.ts +14 -0
- package/src/styles/types.ts +9 -0
- package/src/styles/write.test.ts +88 -0
- package/src/styles/write.ts +162 -0
- package/src/table/conversion.test.ts +73 -0
- package/src/table/definition.ts +89 -0
- package/src/table/filter.ts +42 -0
- package/src/table/ownership.ts +112 -0
- package/src/table/read.test.ts +274 -0
- package/src/table/read.ts +117 -0
- package/src/table/remove.ts +55 -0
- package/src/table/sort.test.ts +79 -0
- package/src/table/styles/builtin.ts +40 -0
- package/src/table/styles/differential.ts +55 -0
- package/src/table/styles/preset-data.ts +17 -0
- package/src/table/styles/presets/dark.ts +104 -0
- package/src/table/styles/presets/light-grid.ts +68 -0
- package/src/table/styles/presets/light.ts +145 -0
- package/src/table/styles/presets/medium-edges.ts +131 -0
- package/src/table/styles/presets/medium.ts +131 -0
- package/src/table/styles/read.ts +70 -0
- package/src/table/styles/types.ts +27 -0
- package/src/table/totals.test.ts +77 -0
- package/src/table/totals.ts +79 -0
- package/src/table/types.ts +21 -0
- package/src/table/write.ts +189 -0
- package/src/types.ts +74 -0
- package/src/value/date.ts +21 -0
- package/src/worksheet/appearance.ts +55 -0
- package/src/worksheet/axis.test.ts +185 -0
- package/src/worksheet/axis.ts +131 -0
- package/src/worksheet/background/read.ts +41 -0
- package/src/worksheet/background/roundtrip.test.ts +77 -0
- package/src/worksheet/background/write.ts +96 -0
- package/src/worksheet/cell-shift.ts +44 -0
- package/src/worksheet/cells.ts +75 -0
- package/src/worksheet/checkbox/formats.ts +53 -0
- package/src/worksheet/checkbox/ranges.ts +112 -0
- package/src/worksheet/checkbox/write.test.ts +62 -0
- package/src/worksheet/conditional/color-scale.ts +61 -0
- package/src/worksheet/conditional/data-bar.ts +76 -0
- package/src/worksheet/conditional/extensions.ts +95 -0
- package/src/worksheet/conditional/icon-reference.ts +69 -0
- package/src/worksheet/conditional/icon-set.test.ts +60 -0
- package/src/worksheet/conditional/icon-set.ts +79 -0
- package/src/worksheet/conditional/preview.ts +44 -0
- package/src/worksheet/conditional/read.ts +185 -0
- package/src/worksheet/conditional/text.test.ts +71 -0
- package/src/worksheet/conditional/text.ts +122 -0
- package/src/worksheet/conditional/threshold.ts +47 -0
- package/src/worksheet/conditional/types.ts +20 -0
- package/src/worksheet/conditional/write-bar.ts +66 -0
- package/src/worksheet/conditional/write.test.ts +218 -0
- package/src/worksheet/conditional/write.ts +103 -0
- package/src/worksheet/copied-axis.ts +70 -0
- package/src/worksheet/data/rows.ts +59 -0
- package/src/worksheet/data/source.test.ts +68 -0
- package/src/worksheet/data/source.ts +31 -0
- package/src/worksheet/data/types.ts +9 -0
- package/src/worksheet/data.test.ts +314 -0
- package/src/worksheet/dimensions/columns.ts +87 -0
- package/src/worksheet/dimensions/write.test.ts +110 -0
- package/src/worksheet/dimensions/write.ts +36 -0
- package/src/worksheet/filters/advanced.test.ts +57 -0
- package/src/worksheet/filters/color.ts +105 -0
- package/src/worksheet/filters/icon.test.ts +83 -0
- package/src/worksheet/filters/icon.ts +39 -0
- package/src/worksheet/filters/read.ts +114 -0
- package/src/worksheet/filters/relative-dates.ts +47 -0
- package/src/worksheet/filters/restore-icons.ts +33 -0
- package/src/worksheet/filters/restore.ts +169 -0
- package/src/worksheet/filters/rules.ts +23 -0
- package/src/worksheet/filters/types.ts +23 -0
- package/src/worksheet/filters/visibility.ts +188 -0
- package/src/worksheet/filters/write.ts +121 -0
- package/src/worksheet/formula/cache.ts +29 -0
- package/src/worksheet/formula/external-results.test.ts +39 -0
- package/src/worksheet/formula/functions.ts +29 -0
- package/src/worksheet/formula/prefix.ts +27 -0
- package/src/worksheet/formula/shared/read.test.ts +121 -0
- package/src/worksheet/formula/shared/read.ts +94 -0
- package/src/worksheet/formula/shared/references.ts +100 -0
- package/src/worksheet/formula/shared/types.ts +21 -0
- package/src/worksheet/formula/spill-read.ts +54 -0
- package/src/worksheet/formula/spill-write.ts +32 -0
- package/src/worksheet/formula/spill.test.ts +101 -0
- package/src/worksheet/formula/write.test.ts +26 -0
- package/src/worksheet/hyperlinks/location.ts +59 -0
- package/src/worksheet/hyperlinks/model.ts +22 -0
- package/src/worksheet/hyperlinks/read.ts +70 -0
- package/src/worksheet/hyperlinks/types.ts +21 -0
- package/src/worksheet/hyperlinks/write.test.ts +203 -0
- package/src/worksheet/hyperlinks/write.ts +51 -0
- package/src/worksheet/merge.test.ts +58 -0
- package/src/worksheet/merge.ts +61 -0
- package/src/worksheet/outline/columns.ts +46 -0
- package/src/worksheet/outline/metadata.ts +68 -0
- package/src/worksheet/outline/native.ts +81 -0
- package/src/worksheet/outline/read.ts +50 -0
- package/src/worksheet/outline/roundtrip.test.ts +73 -0
- package/src/worksheet/outline/types.ts +37 -0
- package/src/worksheet/outline/write.ts +110 -0
- package/src/worksheet/positions.test.ts +46 -0
- package/src/worksheet/positions.ts +48 -0
- package/src/worksheet/print/breaks.ts +72 -0
- package/src/worksheet/print/elements.ts +16 -0
- package/src/worksheet/print/page-text.ts +139 -0
- package/src/worksheet/print/setup.test.ts +141 -0
- package/src/worksheet/print/setup.ts +116 -0
- package/src/worksheet/progress/read.ts +73 -0
- package/src/worksheet/progress/solid.ts +26 -0
- package/src/worksheet/progress/types.ts +11 -0
- package/src/worksheet/progress/write.test.ts +63 -0
- package/src/worksheet/progress/write.ts +46 -0
- package/src/worksheet/read.ts +197 -0
- package/src/worksheet/rich-text.test.ts +41 -0
- package/src/worksheet/rich-text.ts +76 -0
- package/src/worksheet/sort/read.ts +115 -0
- package/src/worksheet/sort/relocate.ts +62 -0
- package/src/worksheet/sort/roundtrip.test.ts +116 -0
- package/src/worksheet/sort/types.ts +11 -0
- package/src/worksheet/sort/write.ts +77 -0
- package/src/worksheet/template.ts +9 -0
- package/src/worksheet/text.ts +33 -0
- package/src/worksheet/validation/extended.ts +36 -0
- package/src/worksheet/validation/image.ts +7 -0
- package/src/worksheet/validation/list-options/portable.ts +90 -0
- package/src/worksheet/validation/list-options/types.ts +14 -0
- package/src/worksheet/validation/list-options/wps.ts +51 -0
- package/src/worksheet/validation/read.ts +162 -0
- package/src/worksheet/validation/text.ts +13 -0
- package/src/worksheet/validation/write.test.ts +259 -0
- package/src/worksheet/validation/write.ts +99 -0
- package/src/worksheet/view/coordinates.ts +39 -0
- package/src/worksheet/view/named/read.ts +116 -0
- package/src/worksheet/view/named/roundtrip.test.ts +136 -0
- package/src/worksheet/view/named/sort.ts +57 -0
- package/src/worksheet/view/named/types.ts +15 -0
- package/src/worksheet/view/named/write.ts +107 -0
- package/src/worksheet/view/named/xml.ts +33 -0
- package/src/worksheet/view/panes.ts +75 -0
- package/src/worksheet/view/read.ts +61 -0
- package/src/worksheet/view/relocate.ts +57 -0
- package/src/worksheet/view/write.test.ts +91 -0
- package/src/worksheet/view/write.ts +57 -0
- package/src/worksheet/write.ts +86 -0
- package/README.md +0 -3
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Wang Yishuai (王一帅), 上海轻书远行信息科技有限公司 and QuireKit contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# 第三方声明 / Third-party notices
|
|
2
|
+
|
|
3
|
+
QuireKit 的分层授权只适用于相应权利人有权授权的原创部分,不替代或限制以下上游
|
|
4
|
+
材料的授权。独立第三方依赖及资源还可能有其自己的许可,分发包含它们的产物时必须
|
|
5
|
+
继续履行相关义务。本文件不声称是全部运行时依赖或所有构建产物的完整 SBOM。
|
|
6
|
+
|
|
7
|
+
The project license does not replace or restrict the licenses of upstream code.
|
|
8
|
+
Third-party dependencies and resources retain their own terms. This file covers
|
|
9
|
+
recorded upstream foundations and is not a complete dependency or artifact SBOM.
|
|
10
|
+
A license below applies to its identified material, not to all QuireKit code.
|
|
11
|
+
|
|
12
|
+
## QuireKit 原创部分 / Original work
|
|
13
|
+
|
|
14
|
+
Copyright (c) 2026 Wang Yishuai (王一帅), 上海轻书远行信息科技有限公司 and QuireKit contributors
|
|
15
|
+
|
|
16
|
+
QuireKit 原创部分按包分为两层:MIT 开源包,以及 QuireKit 商业组件。每个包的许可以其
|
|
17
|
+
包内 `LICENSE.md` 为准。以下第三方材料继续遵循其原有许可,不受上述任何一层影响。
|
|
18
|
+
|
|
19
|
+
QuireKit original work is licensed per package in two tiers: MIT and the QuireKit
|
|
20
|
+
Commercial License. Each package's `LICENSE.md` is authoritative. Third-party
|
|
21
|
+
materials below retain their own terms regardless of tier.
|
|
22
|
+
|
|
23
|
+
## ProseMirror
|
|
24
|
+
|
|
25
|
+
The vendored ProseMirror packages retain their original MIT license files.
|
|
26
|
+
The following notices cover the respective upstream portions, including when
|
|
27
|
+
those portions are incorporated into a derived or bundled artifact.
|
|
28
|
+
|
|
29
|
+
### @quirekit/pm-collab, @quirekit/pm-commands, @quirekit/pm-decoration, @quirekit/pm-gapcursor, @quirekit/pm-history, @quirekit/pm-inputrules, @quirekit/pm-keymap, @quirekit/pm-model, @quirekit/pm-schema-list, @quirekit/pm-state, @quirekit/pm-transform, @quirekit/pm-view
|
|
30
|
+
|
|
31
|
+
Copyright (C) 2015-2017 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
|
32
|
+
|
|
33
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
34
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
35
|
+
in the Software without restriction, including without limitation the rights
|
|
36
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
37
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
38
|
+
furnished to do so, subject to the following conditions:
|
|
39
|
+
|
|
40
|
+
The above copyright notice and this permission notice shall be included in
|
|
41
|
+
all copies or substantial portions of the Software.
|
|
42
|
+
|
|
43
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
44
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
45
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
46
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
47
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
48
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
49
|
+
THE SOFTWARE.
|
|
50
|
+
|
|
51
|
+
## Tiptap
|
|
52
|
+
|
|
53
|
+
Upstream: https://github.com/ueberdosis/tiptap
|
|
54
|
+
|
|
55
|
+
The following notice applies to Tiptap-derived portions of the compatibility
|
|
56
|
+
layer and extensions, where present. It does not relicense QuireKit additions.
|
|
57
|
+
|
|
58
|
+
MIT License
|
|
59
|
+
|
|
60
|
+
Copyright (c) 2025, Tiptap GmbH
|
|
61
|
+
|
|
62
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
63
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
64
|
+
in the Software without restriction, including without limitation the rights
|
|
65
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
66
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
67
|
+
furnished to do so, subject to the following conditions:
|
|
68
|
+
|
|
69
|
+
The above copyright notice and this permission notice shall be included in all
|
|
70
|
+
copies or substantial portions of the Software.
|
|
71
|
+
|
|
72
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
73
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
74
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
75
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
76
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
77
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
78
|
+
SOFTWARE.
|
|
79
|
+
|
|
80
|
+
## bidi-js
|
|
81
|
+
|
|
82
|
+
Upstream: https://github.com/lojjic/bidi-js
|
|
83
|
+
|
|
84
|
+
The renderer uses bidi-js; its code retains the following license.
|
|
85
|
+
|
|
86
|
+
Copyright (c) 2021 Jason Johnston
|
|
87
|
+
|
|
88
|
+
MIT License
|
|
89
|
+
|
|
90
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
91
|
+
a copy of this software and associated documentation files (the
|
|
92
|
+
"Software"), to deal in the Software without restriction, including
|
|
93
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
94
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
95
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
96
|
+
the following conditions:
|
|
97
|
+
|
|
98
|
+
The above copyright notice and this permission notice shall be
|
|
99
|
+
included in all copies or substantial portions of the Software.
|
|
100
|
+
|
|
101
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
102
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
103
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
104
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
105
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
106
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
107
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
108
|
+
|
|
109
|
+
## Fonts and other resources
|
|
110
|
+
|
|
111
|
+
The font-pack wrapper has its own MIT license. Distributed font assets retain
|
|
112
|
+
their individual OFL or other license files under the font package's licenses
|
|
113
|
+
and dist/licenses directories. The wrapper license does not replace font terms.
|
|
114
|
+
Local system fonts served by development tooling receive no new redistribution
|
|
115
|
+
rights. Other dependencies, bundled resources and license comments retain their
|
|
116
|
+
own notices; those obligations must be checked against the actual artifact.
|
|
117
|
+
|
|
118
|
+
## RevoGrid Community
|
|
119
|
+
|
|
120
|
+
The optional chart data editor loads `@revolist/revogrid` 4.28.2, MIT licensed.
|
|
121
|
+
Upstream: https://github.com/revolist/revogrid
|
|
122
|
+
|
|
123
|
+
Copyright (c) 2024 Revolist OU
|
|
124
|
+
|
|
125
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
126
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
127
|
+
in the Software without restriction, including without limitation the rights
|
|
128
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
129
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
130
|
+
furnished to do so, subject to the following conditions:
|
|
131
|
+
|
|
132
|
+
The above copyright notice and this permission notice shall be included in
|
|
133
|
+
all copies or substantial portions of the Software.
|
|
134
|
+
|
|
135
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
136
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
137
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
138
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
139
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
140
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
141
|
+
THE SOFTWARE.
|
|
142
|
+
|
|
143
|
+
<!-- 本包附加声明 / Package-specific notices -->
|
|
144
|
+
|
|
145
|
+
## XLSX row reader
|
|
146
|
+
|
|
147
|
+
The worksheet reader uses saxes 5.0.1 (ISC) and its xmlchars 2.2.0 dependency
|
|
148
|
+
(MIT). Their notices are distributed in `licenses/`.
|
|
149
|
+
|
|
150
|
+
工作表行读取使用 saxes 5.0.1(ISC)及其 xmlchars 2.2.0(MIT)依赖。许可证随包放在 `licenses/`。
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { WorkbookAddress, WorkbookAppearance, WorkbookCellImages, WorkbookCellResult, WorkbookDrawingAnchor, WorkbookDrawingPicture, WorkbookDrawingSource, WorkbookFloatingShape, WorkbookSnapshot } from "@quirekit/workbook";
|
|
2
|
+
import { ChartPreview } from "@quirekit/chart";
|
|
3
|
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
/** Local native chart with no capability to change the source drawing. */
|
|
6
|
+
interface XlsxChart {
|
|
7
|
+
/** Drawing rectangle in the source worksheet's coordinate space. */
|
|
8
|
+
readonly anchor: WorkbookDrawingAnchor;
|
|
9
|
+
/** Source stacking position among the worksheet's native drawings. */
|
|
10
|
+
readonly order?: number;
|
|
11
|
+
/** Local worksheet ranges linked to the native series. */
|
|
12
|
+
readonly sources: readonly WorkbookDrawingSource[];
|
|
13
|
+
/** Static series caches and presentation before measuring the anchor. */
|
|
14
|
+
readonly preview: Omit<ChartPreview, "extent">;
|
|
15
|
+
}
|
|
16
|
+
/** Rectangular source picture positioned over worksheet cells. */
|
|
17
|
+
interface XlsxFloatingPicture {
|
|
18
|
+
/** Drawing bounds in the source sheet's grid and unscaled CSS pixels. */
|
|
19
|
+
readonly anchor: WorkbookDrawingAnchor;
|
|
20
|
+
/** Source stacking position among the worksheet's native drawings. */
|
|
21
|
+
readonly order: number;
|
|
22
|
+
/** Embedded raster and its visual properties. */
|
|
23
|
+
readonly picture: WorkbookDrawingPicture;
|
|
24
|
+
}
|
|
25
|
+
/** Controls ownership of the imported worksheet inputs. */
|
|
26
|
+
interface XlsxOpenOptions {
|
|
27
|
+
/** Share immutable source cells with the write baseline. The default detaches all cells. */
|
|
28
|
+
readonly shareCellInputs?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** Imported local file with its original archive retained for native saves. */
|
|
31
|
+
interface XlsxWorkbookFile {
|
|
32
|
+
/** Cell projection for the workbook session. */
|
|
33
|
+
readonly snapshot: WorkbookSnapshot;
|
|
34
|
+
/** Worksheet dimensions and cell presentation from native file parts. */
|
|
35
|
+
readonly appearance: WorkbookAppearance;
|
|
36
|
+
/** Native chart previews resolved from local caches. */
|
|
37
|
+
readonly charts: readonly XlsxChart[];
|
|
38
|
+
/** Embedded picture previews in their original order, when present. */
|
|
39
|
+
readonly pictures?: readonly XlsxFloatingPicture[];
|
|
40
|
+
/** Shape previews from source drawing parts retained without edit authority. */
|
|
41
|
+
readonly shapes?: readonly WorkbookFloatingShape[];
|
|
42
|
+
/** Original local pictures resolved by worksheet ID, row and column. */
|
|
43
|
+
readonly cellImages: WorkbookCellImages;
|
|
44
|
+
/** Source workbook's active visible worksheet, or its first visible worksheet when the view is missing. */
|
|
45
|
+
readonly initialWorksheetId?: string | undefined;
|
|
46
|
+
/** File features that require opening the original read-only. */
|
|
47
|
+
readonly restrictions: readonly string[];
|
|
48
|
+
/** Worksheet-specific diagnostics for structures requiring dedicated relocation support. */
|
|
49
|
+
readonly axisRestrictions: ReadonlyMap<string, string>;
|
|
50
|
+
/** Per-sheet diagnostics for a local movement that preserves axis layout and pane coordinates. */
|
|
51
|
+
readonly cellShiftRestrictions: ReadonlyMap<string, string>;
|
|
52
|
+
/** Source-sheet diagnostics for moving cell segments within rows. */
|
|
53
|
+
readonly sortRestrictions: ReadonlyMap<string, string>;
|
|
54
|
+
/** Source worksheets with native panes that cannot be replaced. */
|
|
55
|
+
readonly freezeRestrictions: ReadonlyMap<string, string>;
|
|
56
|
+
/** Worksheets whose native print setup is retained in its original form. */
|
|
57
|
+
readonly printLayoutRestrictions: ReadonlyMap<string, string>;
|
|
58
|
+
/** Diagnostic for workbook parts that cannot follow changes to the worksheet directory. */
|
|
59
|
+
readonly worksheetRestriction?: string | undefined;
|
|
60
|
+
/** @returns A detached copy of the input bytes. */
|
|
61
|
+
original(): Uint8Array;
|
|
62
|
+
/** @param snapshot - Current revision. @param options - Optional formula result source. @returns XLSX bytes. */
|
|
63
|
+
write(snapshot: WorkbookSnapshot, options?: XlsxWriteOptions): Uint8Array;
|
|
64
|
+
}
|
|
65
|
+
/** Optional cache access bound to the exact revision being serialized. */
|
|
66
|
+
interface XlsxWriteOptions {
|
|
67
|
+
/** Width of the widest Normal-font digit in CSS pixels, from hosts with a font measurement context. */
|
|
68
|
+
readonly drawingDigitWidth?: number | undefined;
|
|
69
|
+
/** @param address - Authored formula location. @returns Formula result at the saved revision. */
|
|
70
|
+
readonly result?: ((address: WorkbookAddress) => WorkbookCellResult) | undefined;
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/create.d.ts
|
|
74
|
+
/**
|
|
75
|
+
* @param snapshot - Authored workbook to save.
|
|
76
|
+
* @param options - Cache access for the saved formulas.
|
|
77
|
+
* @returns New standard XLSX file with editable cells, formulas and worksheets.
|
|
78
|
+
*/
|
|
79
|
+
declare function createXlsx(snapshot: WorkbookSnapshot, options?: XlsxWriteOptions): Uint8Array;
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/bundle.d.ts
|
|
82
|
+
/** @param workbooks - Independent data workbooks. @returns ZIP with distinct, flat XLSX entries. */
|
|
83
|
+
declare function createXlsxBundle(workbooks: readonly WorkbookSnapshot[]): Uint8Array;
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/package/read.d.ts
|
|
86
|
+
/**
|
|
87
|
+
* @param name - Workbook display name supplied by the host.
|
|
88
|
+
* @param input - Local XLSX bytes.
|
|
89
|
+
* @param options - Cell input ownership for the import consumer.
|
|
90
|
+
* @returns Editable workbook or a read-only projection and its retained original.
|
|
91
|
+
*/
|
|
92
|
+
declare function openXlsx(name: string, input: Uint8Array, options?: XlsxOpenOptions): XlsxWorkbookFile;
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/optimization/types.d.ts
|
|
95
|
+
/** A smaller XLSX produced from exactly one source archive. */
|
|
96
|
+
interface XlsxOptimizedCopy {
|
|
97
|
+
/** Complete optimized archive. */
|
|
98
|
+
readonly bytes: Uint8Array;
|
|
99
|
+
/** Removed unformatted blank cell records. */
|
|
100
|
+
readonly emptyCells: number;
|
|
101
|
+
/** Duplicate cell format definitions merged into their first occurrence. */
|
|
102
|
+
readonly duplicateStyles: number;
|
|
103
|
+
/** Redundant static conditional formatting rules removed. */
|
|
104
|
+
readonly duplicateRules: number;
|
|
105
|
+
}
|
|
106
|
+
/** Result of analyzing and encoding an XLSX copy. */
|
|
107
|
+
interface XlsxOptimizationResult {
|
|
108
|
+
/** Size of the input archive in bytes. */
|
|
109
|
+
readonly originalSize: number;
|
|
110
|
+
/** Verified-smaller output, if this source has recoverable space. */
|
|
111
|
+
readonly optimized?: XlsxOptimizedCopy;
|
|
112
|
+
/** Package feature that requires retaining the original file. */
|
|
113
|
+
readonly limitation?: "signature" | "macro";
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/optimization/optimize.d.ts
|
|
117
|
+
/** @param source - XLSX bytes from the approved source revision.
|
|
118
|
+
* @returns A strictly smaller native copy, or an explanation when original bytes should be used. */
|
|
119
|
+
declare function optimizeXlsx(source: Uint8Array): XlsxOptimizationResult;
|
|
120
|
+
//#endregion
|
|
121
|
+
export { type XlsxChart, type XlsxFloatingPicture, type XlsxOpenOptions, type XlsxOptimizationResult, type XlsxOptimizedCopy, type XlsxWorkbookFile, type XlsxWriteOptions, createXlsx, createXlsxBundle, openXlsx, optimizeXlsx };
|
|
122
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/create.ts","../src/bundle.ts","../src/package/read.ts","../src/optimization/types.ts","../src/optimization/optimize.ts"],"mappings":";;;;;UAIiB,SAAA;;WAEN,MAAA,EAAQ,qBAAA;EAFO;EAAA,SAIf,KAAA;EAFQ;EAAA,SAIR,OAAA,WAAkB,qBAAA;EAEJ;EAAA,SAAd,OAAA,EAAS,IAAA,CAAK,YAAA;AAAA;;UAIR,mBAAA;EAVE;EAAA,SAYR,MAAA,EAAQ,qBAAA;EARR;EAAA,SAUA,KAAA;EARA;EAAA,SAUA,OAAA,EAAS,sBAAsB;AAAA;;UAIzB,eAAA;EAVA;EAAA,SAYN,eAAe;AAAA;;UAIT,gBAAA;EAdE;EAAA,SAgBR,QAAA,EAAU,gBAAA;EAZV;EAAA,SAcA,UAAA,EAAY,kBAAA;EAdmB;EAAA,SAgB/B,MAAA,WAAiB,SAAA;EAZX;EAAA,SAcN,QAAA,YAAoB,mBAAA;;WAEpB,MAAA,YAAkB,qBAAA;EAdH;EAAA,SAgBf,UAAA,EAAY,kBAAA;EAZU;EAAA,SActB,kBAAA;EAZU;EAAA,SAcV,YAAA;EAViB;EAAA,SAYjB,gBAAA,EAAkB,WAAA;EARA;EAAA,SAUlB,qBAAA,EAAuB,WAAA;EAFL;EAAA,SAIlB,gBAAA,EAAkB,WAAA;EAAA;EAAA,SAElB,kBAAA,EAAoB,WAAA;EAEK;EAAA,SAAzB,uBAAA,EAAyB,WAAA;EAMlB;EAAA,SAJP,oBAAA;EAIsD;EAF/D,QAAA,IAAY,UAAA;EAE6D;EAAzE,KAAA,CAAM,QAAA,EAAU,gBAAA,EAAkB,OAAA,GAAU,gBAAA,GAAmB,UAAA;AAAA;;UAIhD,gBAAA;EA9BN;EAAA,SAgCA,iBAAA;EA9BA;EAAA,SAgCA,MAAA,KAAW,OAAA,EAAS,eAAA,KAAoB,kBAAkB;AAAA;;;;;;AApErE;;iBCMgB,UAAA,CAAW,QAAA,EAAU,gBAAA,EAAkB,OAAA,GAAS,gBAAA,GAAwB,UAAA;;;;iBCLxE,gBAAA,CAAiB,SAAA,WAAoB,gBAAA,KAAqB,UAAU;;;;;;;AFDpF;;iBG8BgB,QAAA,CAAS,IAAA,UAAc,KAAA,EAAO,UAAA,EAAY,OAAA,GAAS,eAAA,GAAuB,gBAAA;;;;UC/BzE,iBAAA;;WAEN,KAAA,EAAO,UAAU;EJDX;EAAA,SIGN,UAAA;;WAEA,eAAA;EJCkB;EAAA,SIClB,cAAA;AAAA;;UAIM,sBAAA;EJTN;EAAA,SIWA,YAAA;EJTA;EAAA,SIWA,SAAA,GAAY,iBAAiB;EJTX;EAAA,SIWlB,UAAA;AAAA;;;;;iBCXK,YAAA,CAAa,MAAA,EAAQ,UAAA,GAAa,sBAAsB"}
|