@yudaocode/univer-boards 0.0.0-stage → 1.6.218

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 ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Yudao Open-Source Community (芋道源码)
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,38 @@
1
- # Temporary Holding Version
1
+ # @yudaocode/univer-boards
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Infinite canvas whiteboard core unit model (`UniverInstanceType.UNIVER_BOARD`), bidirectional Mermaid diagram engine, automatic mindmap tree layout, smart orthogonal Manhattan connector routing, and multi-format pure-TypeScript exporters (`.svg`, `.pdf`, `.pptx`, `.csv`, `.png`) for Univer.
4
+
5
+ ## Key Capabilities
6
+
7
+ - **Native `BoardUnitModel` (`UniverInstanceType.UNIVER_BOARD`)**:
8
+ - Viewport pan/zoom, dot/line/blank grid styles, z-order `elementOrder`, presentation `frameOrder`, and collaboration `comments` pins.
9
+ - Rich native element types: `frame`, `swimlane`, `sticky` (with multi-user voting & tags), `shape` (11 flowchart/architecture geometries), `text`, `connector` (`straight` / `orthogonal` / `curved` with UML & Crow's Foot markers), `ink`, `mindmap`, `entityCard` (`erd` / `uml` / `kanbanCard`), `table`, `chart` (`bar` / `line` / `pie` / `radar`), and `image`.
10
+ - **Bidirectional Mermaid <-> Native Board Elements Engine**:
11
+ - `parseMermaidToBoardElements(code, options)`: Parses `flowchart` / `graph` (with `subgraph` frames & Sugiyama layered layout), `sequenceDiagram`, `classDiagram`, `erDiagram` (Crow's Foot), and `mindmap` into real, individually editable board elements.
12
+ - `exportBoardToMermaid(snapshot, options)`: Reverse-compiles board elements and smart connectors back into valid Mermaid code.
13
+ - **Multi-Format Pure-TS Exporters**:
14
+ - `exportBoardToSvg(snapshot, options)` — Standalone vector `.svg`
15
+ - `exportBoardToPdfBytes(snapshot, options)` — Single full-board or multi-page per-Frame vector `.pdf` via `pdf-lib`
16
+ - `exportBoardToPptxBytes(snapshot, options)` — Native OpenXML `.pptx` with editable `<p:sp>` shapes & `<p:cxnSp>` connectors
17
+ - `exportBoardToCsv(snapshot)` & `importCsvToBoardStickies(csvText)` — RFC-4180 `.csv` round-trip
18
+ - **Full Command & Undo/Redo System + Facade API (`@yudaocode/univer-boards/facade`)**.
19
+
20
+ ## Quick Start
21
+
22
+ ```ts
23
+ import { LocaleType, Univer } from '@univerjs/core';
24
+ import { FUniver } from '@univerjs/core/facade';
25
+ import { createSampleArchitectureBoardData, UniverBoardsPlugin } from '@yudaocode/univer-boards';
26
+ import '@yudaocode/univer-boards/facade';
27
+
28
+ const univer = new Univer({ locale: LocaleType.ZH_CN });
29
+ univer.registerPlugin(UniverBoardsPlugin);
30
+
31
+ const univerAPI = FUniver.newAPI(univer);
32
+ const board = univerAPI.createBoard(createSampleArchitectureBoardData());
33
+
34
+ board.importMermaid('flowchart LR\n A[Gateway] --> B[(Order DB)]');
35
+ const svg = univerAPI.exportBoardSvg();
36
+ const pdfBytes = await univerAPI.exportBoardPdf({ mode: 'frames' });
37
+ const pptxBytes = univerAPI.exportBoardPptx();
38
+ ```
@@ -0,0 +1,357 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var __decorateClass = (decorators, target, key, kind) => {
20
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
21
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
22
+ if (decorator = decorators[i])
23
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
24
+ if (kind && result) __defProp(target, key, result);
25
+ return result;
26
+ };
27
+ var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
28
+
29
+ // src/facade/index.ts
30
+ var facade_exports = {};
31
+ __export(facade_exports, {
32
+ FBoard: () => FBoard,
33
+ FEventNameBoardsMixin: () => FEventNameBoardsMixin,
34
+ FUniverBoardsMixin: () => FUniverBoardsMixin
35
+ });
36
+ module.exports = __toCommonJS(facade_exports);
37
+
38
+ // src/facade/f-event.ts
39
+ var import_facade = require("@univerjs/core/facade");
40
+ var FEventNameBoardsMixin = class {
41
+ get BoardLoaded() {
42
+ return "BoardLoaded";
43
+ }
44
+ get BoardDisposed() {
45
+ return "BoardDisposed";
46
+ }
47
+ get BoardSelectionChanged() {
48
+ return "BoardSelectionChanged";
49
+ }
50
+ get BoardExported() {
51
+ return "BoardExported";
52
+ }
53
+ };
54
+ import_facade.FEventName.extend(FEventNameBoardsMixin);
55
+ var cachedSingleton = import_facade.FEventName._instance;
56
+ if (cachedSingleton) {
57
+ cachedSingleton.BoardLoaded = "BoardLoaded";
58
+ cachedSingleton.BoardDisposed = "BoardDisposed";
59
+ cachedSingleton.BoardSelectionChanged = "BoardSelectionChanged";
60
+ cachedSingleton.BoardExported = "BoardExported";
61
+ }
62
+
63
+ // src/facade/f-univer.ts
64
+ var import_core2 = require("@univerjs/core");
65
+ var import_facade3 = require("@univerjs/core/facade");
66
+ var import_rxjs = require("rxjs");
67
+ var import_univer_boards2 = require("@yudaocode/univer-boards");
68
+
69
+ // src/facade/f-board.ts
70
+ var import_core = require("@univerjs/core");
71
+ var import_facade2 = require("@univerjs/core/facade");
72
+ var import_univer_boards = require("@yudaocode/univer-boards");
73
+ var FBoard = class extends import_facade2.FBase {
74
+ constructor(_model, _injector, _commandService) {
75
+ super();
76
+ this._model = _model;
77
+ this._injector = _injector;
78
+ this._commandService = _commandService;
79
+ }
80
+ getId() {
81
+ return this._model.getUnitId();
82
+ }
83
+ getName() {
84
+ return this._model.getName();
85
+ }
86
+ setName(name) {
87
+ this._model.setName(name);
88
+ return this;
89
+ }
90
+ getModel() {
91
+ return this._model;
92
+ }
93
+ getSnapshot() {
94
+ return this._model.getSnapshot();
95
+ }
96
+ save() {
97
+ return this._model.save();
98
+ }
99
+ getElements() {
100
+ return import_core.Tools.deepClone(this._model.getElementsOrdered());
101
+ }
102
+ getElementById(id) {
103
+ const el = this._model.getElement(id);
104
+ return el ? import_core.Tools.deepClone(el) : void 0;
105
+ }
106
+ getFrames() {
107
+ return import_core.Tools.deepClone(this._model.getFramesOrdered());
108
+ }
109
+ addElements(elements) {
110
+ return this._commandService.syncExecuteCommand(import_univer_boards.AddBoardElementsCommand.id, {
111
+ unitId: this.getId(),
112
+ elements
113
+ });
114
+ }
115
+ updateElement(id, patch) {
116
+ return this._commandService.syncExecuteCommand(import_univer_boards.UpdateBoardElementsCommand.id, {
117
+ unitId: this.getId(),
118
+ updates: [{ id, patch }]
119
+ });
120
+ }
121
+ deleteElements(elementIds) {
122
+ return this._commandService.syncExecuteCommand(import_univer_boards.DeleteBoardElementsCommand.id, {
123
+ unitId: this.getId(),
124
+ elementIds
125
+ });
126
+ }
127
+ alignElements(alignment, elementIds) {
128
+ return this._commandService.syncExecuteCommand(import_univer_boards.AlignBoardElementsCommand.id, {
129
+ unitId: this.getId(),
130
+ alignment,
131
+ elementIds
132
+ });
133
+ }
134
+ groupInFrame(elementIds, title) {
135
+ return this._commandService.syncExecuteCommand(import_univer_boards.GroupBoardElementsInFrameCommand.id, {
136
+ unitId: this.getId(),
137
+ elementIds,
138
+ title
139
+ });
140
+ }
141
+ addMindmapChild(parentId, text) {
142
+ return this._commandService.syncExecuteCommand(import_univer_boards.AddMindmapChildCommand.id, {
143
+ unitId: this.getId(),
144
+ parentId,
145
+ text
146
+ });
147
+ }
148
+ addMindmapSibling(nodeId, text) {
149
+ return this._commandService.syncExecuteCommand(import_univer_boards.AddMindmapSiblingCommand.id, {
150
+ unitId: this.getId(),
151
+ nodeId,
152
+ text
153
+ });
154
+ }
155
+ layoutMindmap(rootId) {
156
+ return this._commandService.syncExecuteCommand(import_univer_boards.LayoutBoardMindmapCommand.id, {
157
+ unitId: this.getId(),
158
+ rootId
159
+ });
160
+ }
161
+ voteSticky(elementId, voterId) {
162
+ return this._commandService.syncExecuteCommand(import_univer_boards.VoteBoardStickyCommand.id, {
163
+ unitId: this.getId(),
164
+ elementId,
165
+ voterId
166
+ });
167
+ }
168
+ importMermaid(mermaidCode, options) {
169
+ return this._commandService.syncExecuteCommand(import_univer_boards.ImportMermaidToBoardCommand.id, {
170
+ unitId: this.getId(),
171
+ mermaidCode,
172
+ ...options
173
+ });
174
+ }
175
+ toMermaid(options) {
176
+ if (this._injector.has(import_univer_boards.IBoardIoService)) {
177
+ return this._injector.get(import_univer_boards.IBoardIoService).exportMermaid(this._model.save(), options);
178
+ }
179
+ return (0, import_univer_boards.exportBoardToMermaid)(this._model.save(), options);
180
+ }
181
+ exportSvg(options) {
182
+ if (this._injector.has(import_univer_boards.IBoardIoService)) {
183
+ return this._injector.get(import_univer_boards.IBoardIoService).exportSvg(this._model.save(), options);
184
+ }
185
+ return (0, import_univer_boards.exportBoardToSvg)(this._model.save(), options);
186
+ }
187
+ async exportPdf(options) {
188
+ if (this._injector.has(import_univer_boards.IBoardIoService)) {
189
+ return await this._injector.get(import_univer_boards.IBoardIoService).exportPdf(this._model.save(), options);
190
+ }
191
+ return await (0, import_univer_boards.exportBoardToPdfBytes)(this._model.save(), options);
192
+ }
193
+ exportPptx(options) {
194
+ if (this._injector.has(import_univer_boards.IBoardIoService)) {
195
+ return this._injector.get(import_univer_boards.IBoardIoService).exportPptx(this._model.save(), options);
196
+ }
197
+ return (0, import_univer_boards.exportBoardToPptxBytes)(this._model.save(), options);
198
+ }
199
+ exportCsv() {
200
+ if (this._injector.has(import_univer_boards.IBoardIoService)) {
201
+ return this._injector.get(import_univer_boards.IBoardIoService).exportCsv(this._model.save());
202
+ }
203
+ return (0, import_univer_boards.exportBoardToCsv)(this._model.save());
204
+ }
205
+ async exportRasterDataUrl(format = "png", scale = 2) {
206
+ return await (0, import_univer_boards.exportBoardToRasterDataUrl)(this._model.save(), format, scale);
207
+ }
208
+ importCsvStickies(csvText, options) {
209
+ const elements = (0, import_univer_boards.importCsvToBoardStickies)(csvText, options);
210
+ if (elements.length === 0) return false;
211
+ return this.addElements(elements);
212
+ }
213
+ setViewport(viewport) {
214
+ return this._commandService.syncExecuteCommand(import_univer_boards.SetBoardViewportCommand.id, {
215
+ unitId: this.getId(),
216
+ viewport
217
+ });
218
+ }
219
+ addComment(x, y, text, author) {
220
+ return this._commandService.syncExecuteCommand(import_univer_boards.AddBoardCommentCommand.id, {
221
+ unitId: this.getId(),
222
+ x,
223
+ y,
224
+ text,
225
+ author
226
+ });
227
+ }
228
+ replaceSnapshot(snapshot) {
229
+ return this._commandService.syncExecuteCommand(import_univer_boards.ReplaceBoardSnapshotCommand.id, {
230
+ unitId: this.getId(),
231
+ snapshot
232
+ });
233
+ }
234
+ selectElements(ids) {
235
+ if (this._injector.has(import_univer_boards.IBoardSelectionService)) {
236
+ this._injector.get(import_univer_boards.IBoardSelectionService).selectElements(ids);
237
+ }
238
+ return this;
239
+ }
240
+ };
241
+ FBoard = __decorateClass([
242
+ __decorateParam(1, (0, import_core.Inject)(import_core.Injector)),
243
+ __decorateParam(2, import_core.ICommandService)
244
+ ], FBoard);
245
+
246
+ // src/facade/f-univer.ts
247
+ var FUniverBoardsMixin = class extends import_facade3.FUniver {
248
+ _ensureBoardEventWiring(injector = this._injector) {
249
+ if (this._boardEventsWired) return;
250
+ if (!injector.has(import_univer_boards2.IBoardIoService) || !injector.has(import_univer_boards2.IBoardSelectionService)) return;
251
+ this._boardEventsWired = true;
252
+ const ioService = injector.get(import_univer_boards2.IBoardIoService);
253
+ const selectionService = injector.get(import_univer_boards2.IBoardSelectionService);
254
+ const selSub = selectionService.selectedIds$.pipe((0, import_rxjs.skip)(1)).subscribe((ids) => {
255
+ const board = this.getActiveBoard();
256
+ if (!board) return;
257
+ this.fireEvent(this.Event.BoardSelectionChanged, {
258
+ board,
259
+ unitId: board.getId(),
260
+ elementIds: [...ids]
261
+ });
262
+ });
263
+ this.disposeWithMe((0, import_core2.toDisposable)(() => selSub.unsubscribe()));
264
+ const expSub = ioService.exported$.subscribe((evt) => {
265
+ this.fireEvent(this.Event.BoardExported, {
266
+ board: this.getBoard(evt.unitId) ?? void 0,
267
+ unitId: evt.unitId,
268
+ format: evt.format,
269
+ byteLength: evt.byteLength
270
+ });
271
+ });
272
+ this.disposeWithMe((0, import_core2.toDisposable)(() => expSub.unsubscribe()));
273
+ }
274
+ _initialize(injector) {
275
+ this._ensureBoardEventWiring(injector);
276
+ const addedSub = this._univerInstanceService.getTypeOfUnitAdded$(import_core2.UniverInstanceType.UNIVER_BOARD).subscribe((evtOrModel) => {
277
+ this._ensureBoardEventWiring(injector);
278
+ const model = evtOrModel && typeof evtOrModel === "object" && "unit" in evtOrModel ? evtOrModel.unit : evtOrModel;
279
+ if (!model || typeof model.getUnitId !== "function") return;
280
+ const board = injector.createInstance(FBoard, model);
281
+ this.fireEvent(this.Event.BoardLoaded, {
282
+ board,
283
+ unitId: model.getUnitId()
284
+ });
285
+ });
286
+ this.disposeWithMe((0, import_core2.toDisposable)(() => addedSub.unsubscribe()));
287
+ const disposedSub = this._univerInstanceService.getTypeOfUnitDisposed$(import_core2.UniverInstanceType.UNIVER_BOARD).subscribe((evtOrModel) => {
288
+ const model = evtOrModel && typeof evtOrModel === "object" && "unit" in evtOrModel ? evtOrModel.unit : evtOrModel;
289
+ if (!model || typeof model.getUnitId !== "function") return;
290
+ this.fireEvent(this.Event.BoardDisposed, {
291
+ unitId: model.getUnitId()
292
+ });
293
+ });
294
+ this.disposeWithMe((0, import_core2.toDisposable)(() => disposedSub.unsubscribe()));
295
+ }
296
+ createBoard(data, options) {
297
+ this._ensureBoardEventWiring();
298
+ const model = this._univerInstanceService.createUnit(import_core2.UniverInstanceType.UNIVER_BOARD, data ?? {}, options);
299
+ return this._injector.createInstance(FBoard, model);
300
+ }
301
+ getActiveBoard() {
302
+ this._ensureBoardEventWiring();
303
+ const model = this._univerInstanceService.getCurrentUnitOfType(
304
+ import_core2.UniverInstanceType.UNIVER_BOARD
305
+ );
306
+ if (!model) return null;
307
+ return this._injector.createInstance(FBoard, model);
308
+ }
309
+ getBoard(unitId) {
310
+ this._ensureBoardEventWiring();
311
+ const model = this._univerInstanceService.getUnit(
312
+ unitId,
313
+ import_core2.UniverInstanceType.UNIVER_BOARD
314
+ );
315
+ if (!model) return null;
316
+ return this._injector.createInstance(FBoard, model);
317
+ }
318
+ importBoardMermaid(mermaidCode, options) {
319
+ const board = options?.unitId ? this.getBoard(options.unitId) : this.getActiveBoard();
320
+ if (!board) {
321
+ throw new Error("[UniverBoards] No active or matching board unit found for importBoardMermaid().");
322
+ }
323
+ return board.importMermaid(mermaidCode, options);
324
+ }
325
+ exportBoardSvg(unitIdOrOptions, options) {
326
+ const board = typeof unitIdOrOptions === "string" ? this.getBoard(unitIdOrOptions) : this.getActiveBoard();
327
+ if (!board) {
328
+ throw new Error("[UniverBoards] No active or matching board unit found for exportBoardSvg().");
329
+ }
330
+ const opts = typeof unitIdOrOptions === "string" ? options : unitIdOrOptions;
331
+ return board.exportSvg(opts);
332
+ }
333
+ async exportBoardPdf(unitIdOrOptions, options) {
334
+ const board = typeof unitIdOrOptions === "string" ? this.getBoard(unitIdOrOptions) : this.getActiveBoard();
335
+ if (!board) {
336
+ throw new Error("[UniverBoards] No active or matching board unit found for exportBoardPdf().");
337
+ }
338
+ const opts = typeof unitIdOrOptions === "string" ? options : unitIdOrOptions;
339
+ return await board.exportPdf(opts);
340
+ }
341
+ exportBoardPptx(unitIdOrOptions, options) {
342
+ const board = typeof unitIdOrOptions === "string" ? this.getBoard(unitIdOrOptions) : this.getActiveBoard();
343
+ if (!board) {
344
+ throw new Error("[UniverBoards] No active or matching board unit found for exportBoardPptx().");
345
+ }
346
+ const opts = typeof unitIdOrOptions === "string" ? options : unitIdOrOptions;
347
+ return board.exportPptx(opts);
348
+ }
349
+ };
350
+ import_facade3.FUniver.extend(FUniverBoardsMixin);
351
+ // Annotate the CommonJS export names for ESM import in node:
352
+ 0 && (module.exports = {
353
+ FBoard,
354
+ FEventNameBoardsMixin,
355
+ FUniverBoardsMixin
356
+ });
357
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/facade/index.ts","../../../src/facade/f-event.ts","../../../src/facade/f-univer.ts","../../../src/facade/f-board.ts"],"sourcesContent":["import './f-event';\nimport './f-univer';\n\nexport { FBoard } from './f-board';\nexport {\n FEventNameBoardsMixin,\n type IBoardDisposedEventParams,\n type IBoardEventParamConfig,\n type IBoardExportedEventParams,\n type IBoardLoadedEventParams,\n type IBoardSelectionChangedEventParams,\n type IFBoardEventNameMixin,\n} from './f-event';\nexport { FUniverBoardsMixin, type IFUniverBoardsMixin } from './f-univer';\n","import { FEventName, type IEventBase } from '@univerjs/core/facade';\nimport type { BoardExportFormat } from '@yudaocode/univer-boards';\nimport type { FBoard } from './f-board';\n\nexport interface IBoardLoadedEventParams extends IEventBase {\n board: FBoard;\n unitId: string;\n}\n\nexport interface IBoardDisposedEventParams extends IEventBase {\n unitId: string;\n}\n\nexport interface IBoardSelectionChangedEventParams extends IEventBase {\n board: FBoard;\n unitId: string;\n elementIds: string[];\n}\n\nexport interface IBoardExportedEventParams extends IEventBase {\n board?: FBoard;\n unitId: string;\n format: BoardExportFormat;\n byteLength: number;\n}\n\nexport interface IFBoardEventNameMixin {\n readonly BoardLoaded: 'BoardLoaded';\n readonly BoardDisposed: 'BoardDisposed';\n readonly BoardSelectionChanged: 'BoardSelectionChanged';\n readonly BoardExported: 'BoardExported';\n}\n\nexport class FEventNameBoardsMixin implements IFBoardEventNameMixin {\n get BoardLoaded(): 'BoardLoaded' {\n return 'BoardLoaded';\n }\n\n get BoardDisposed(): 'BoardDisposed' {\n return 'BoardDisposed';\n }\n\n get BoardSelectionChanged(): 'BoardSelectionChanged' {\n return 'BoardSelectionChanged';\n }\n\n get BoardExported(): 'BoardExported' {\n return 'BoardExported';\n }\n}\n\nFEventName.extend(FEventNameBoardsMixin);\n\nconst cachedSingleton = (FEventName as unknown as { _instance?: Record<string, unknown> })._instance;\nif (cachedSingleton) {\n cachedSingleton.BoardLoaded = 'BoardLoaded';\n cachedSingleton.BoardDisposed = 'BoardDisposed';\n cachedSingleton.BoardSelectionChanged = 'BoardSelectionChanged';\n cachedSingleton.BoardExported = 'BoardExported';\n}\n\nexport interface IBoardEventParamConfig {\n BoardLoaded: IBoardLoadedEventParams;\n BoardDisposed: IBoardDisposedEventParams;\n BoardSelectionChanged: IBoardSelectionChangedEventParams;\n BoardExported: IBoardExportedEventParams;\n}\n\ndeclare module '@univerjs/core/facade' {\n // eslint-disable-next-line ts/naming-convention\n interface FEventName extends IFBoardEventNameMixin {}\n interface IEventParamConfig extends IBoardEventParamConfig {}\n}\n","import {\n type ICreateUnitOptions,\n type Injector,\n toDisposable,\n UniverInstanceType,\n} from '@univerjs/core';\nimport { FUniver } from '@univerjs/core/facade';\nimport { skip } from 'rxjs';\nimport {\n type BoardUnitModel,\n IBoardIoService,\n IBoardSelectionService,\n type IBoardUnitData,\n type IExportBoardPdfOptions,\n type IExportBoardPptxOptions,\n type IExportBoardSvgOptions,\n} from '@yudaocode/univer-boards';\nimport './f-event';\nimport { FBoard } from './f-board';\n\nexport interface IFUniverBoardsMixin {\n /**\n * Creates a new `UNIVER_BOARD` unit and returns its `FBoard` facade instance.\n */\n createBoard(data?: Partial<IBoardUnitData>, options?: ICreateUnitOptions): FBoard;\n\n /**\n * Returns the currently active `FBoard` facade instance, or `null` if none is active.\n */\n getActiveBoard(): FBoard | null;\n\n /**\n * Returns the `FBoard` facade instance for `unitId`, or `null` if not found.\n */\n getBoard(unitId: string): FBoard | null;\n\n /**\n * Parses Mermaid diagram syntax and inserts native editable elements into the target or active board.\n */\n importBoardMermaid(\n mermaidCode: string,\n options?: {\n unitId?: string;\n originX?: number;\n originY?: number;\n replaceExisting?: boolean;\n }\n ): boolean;\n\n /**\n * Exports the specified or active board to standalone crisp `.svg` markup.\n */\n exportBoardSvg(\n unitIdOrOptions?: string | IExportBoardSvgOptions,\n options?: IExportBoardSvgOptions\n ): string;\n\n /**\n * Exports the specified or active board to vector `.pdf` bytes (`Uint8Array`).\n */\n exportBoardPdf(\n unitIdOrOptions?: string | IExportBoardPdfOptions,\n options?: IExportBoardPdfOptions\n ): Promise<Uint8Array>;\n\n /**\n * Exports the specified or active board to native OpenXML `.pptx` bytes (`Uint8Array`).\n */\n exportBoardPptx(\n unitIdOrOptions?: string | IExportBoardPptxOptions,\n options?: IExportBoardPptxOptions\n ): Uint8Array;\n}\n\nexport class FUniverBoardsMixin extends FUniver implements IFUniverBoardsMixin {\n private _boardEventsWired?: boolean;\n\n private _ensureBoardEventWiring(injector: Injector = this._injector): void {\n if (this._boardEventsWired) return;\n if (!injector.has(IBoardIoService) || !injector.has(IBoardSelectionService)) return;\n this._boardEventsWired = true;\n\n const ioService = injector.get(IBoardIoService);\n const selectionService = injector.get(IBoardSelectionService);\n\n const selSub = selectionService.selectedIds$.pipe(skip(1)).subscribe((ids) => {\n const board = this.getActiveBoard();\n if (!board) return;\n this.fireEvent(this.Event.BoardSelectionChanged, {\n board,\n unitId: board.getId(),\n elementIds: [...ids],\n });\n });\n this.disposeWithMe(toDisposable(() => selSub.unsubscribe()));\n\n const expSub = ioService.exported$.subscribe((evt) => {\n this.fireEvent(this.Event.BoardExported, {\n board: this.getBoard(evt.unitId) ?? undefined,\n unitId: evt.unitId,\n format: evt.format,\n byteLength: evt.byteLength,\n });\n });\n this.disposeWithMe(toDisposable(() => expSub.unsubscribe()));\n }\n\n override _initialize(injector: Injector): void {\n this._ensureBoardEventWiring(injector);\n\n const addedSub = this._univerInstanceService\n .getTypeOfUnitAdded$<BoardUnitModel>(UniverInstanceType.UNIVER_BOARD)\n .subscribe((evtOrModel) => {\n this._ensureBoardEventWiring(injector);\n const model: BoardUnitModel =\n evtOrModel && typeof evtOrModel === 'object' && 'unit' in evtOrModel\n ? (evtOrModel as { unit: BoardUnitModel }).unit\n : (evtOrModel as unknown as BoardUnitModel);\n if (!model || typeof model.getUnitId !== 'function') return;\n const board = injector.createInstance(FBoard, model);\n this.fireEvent(this.Event.BoardLoaded, {\n board,\n unitId: model.getUnitId(),\n });\n });\n this.disposeWithMe(toDisposable(() => addedSub.unsubscribe()));\n\n const disposedSub = this._univerInstanceService\n .getTypeOfUnitDisposed$<BoardUnitModel>(UniverInstanceType.UNIVER_BOARD)\n .subscribe((evtOrModel) => {\n const model: BoardUnitModel =\n evtOrModel && typeof evtOrModel === 'object' && 'unit' in evtOrModel\n ? (evtOrModel as { unit: BoardUnitModel }).unit\n : (evtOrModel as unknown as BoardUnitModel);\n if (!model || typeof model.getUnitId !== 'function') return;\n this.fireEvent(this.Event.BoardDisposed, {\n unitId: model.getUnitId(),\n });\n });\n this.disposeWithMe(toDisposable(() => disposedSub.unsubscribe()));\n }\n\n override createBoard(\n data?: Partial<IBoardUnitData>,\n options?: ICreateUnitOptions\n ): FBoard {\n this._ensureBoardEventWiring();\n const model = this._univerInstanceService.createUnit<\n Partial<IBoardUnitData>,\n BoardUnitModel\n >(UniverInstanceType.UNIVER_BOARD, data ?? {}, options);\n return this._injector.createInstance(FBoard, model);\n }\n\n override getActiveBoard(): FBoard | null {\n this._ensureBoardEventWiring();\n const model = this._univerInstanceService.getCurrentUnitOfType<BoardUnitModel>(\n UniverInstanceType.UNIVER_BOARD\n );\n if (!model) return null;\n return this._injector.createInstance(FBoard, model);\n }\n\n override getBoard(unitId: string): FBoard | null {\n this._ensureBoardEventWiring();\n const model = this._univerInstanceService.getUnit<BoardUnitModel>(\n unitId,\n UniverInstanceType.UNIVER_BOARD\n );\n if (!model) return null;\n return this._injector.createInstance(FBoard, model);\n }\n\n override importBoardMermaid(\n mermaidCode: string,\n options?: {\n unitId?: string;\n originX?: number;\n originY?: number;\n replaceExisting?: boolean;\n }\n ): boolean {\n const board = options?.unitId ? this.getBoard(options.unitId) : this.getActiveBoard();\n if (!board) {\n throw new Error('[UniverBoards] No active or matching board unit found for importBoardMermaid().');\n }\n return board.importMermaid(mermaidCode, options);\n }\n\n override exportBoardSvg(\n unitIdOrOptions?: string | IExportBoardSvgOptions,\n options?: IExportBoardSvgOptions\n ): string {\n const board =\n typeof unitIdOrOptions === 'string'\n ? this.getBoard(unitIdOrOptions)\n : this.getActiveBoard();\n if (!board) {\n throw new Error('[UniverBoards] No active or matching board unit found for exportBoardSvg().');\n }\n const opts = typeof unitIdOrOptions === 'string' ? options : unitIdOrOptions;\n return board.exportSvg(opts);\n }\n\n override async exportBoardPdf(\n unitIdOrOptions?: string | IExportBoardPdfOptions,\n options?: IExportBoardPdfOptions\n ): Promise<Uint8Array> {\n const board =\n typeof unitIdOrOptions === 'string'\n ? this.getBoard(unitIdOrOptions)\n : this.getActiveBoard();\n if (!board) {\n throw new Error('[UniverBoards] No active or matching board unit found for exportBoardPdf().');\n }\n const opts = typeof unitIdOrOptions === 'string' ? options : unitIdOrOptions;\n return await board.exportPdf(opts);\n }\n\n override exportBoardPptx(\n unitIdOrOptions?: string | IExportBoardPptxOptions,\n options?: IExportBoardPptxOptions\n ): Uint8Array {\n const board =\n typeof unitIdOrOptions === 'string'\n ? this.getBoard(unitIdOrOptions)\n : this.getActiveBoard();\n if (!board) {\n throw new Error('[UniverBoards] No active or matching board unit found for exportBoardPptx().');\n }\n const opts = typeof unitIdOrOptions === 'string' ? options : unitIdOrOptions;\n return board.exportPptx(opts);\n }\n}\n\nFUniver.extend(FUniverBoardsMixin);\n\ndeclare module '@univerjs/core/facade' {\n // eslint-disable-next-line ts/naming-convention\n interface FUniver extends IFUniverBoardsMixin {}\n}\n","import { ICommandService, Inject, Injector, Tools } from '@univerjs/core';\nimport { FBase } from '@univerjs/core/facade';\nimport {\n AddBoardCommentCommand,\n AddBoardElementsCommand,\n AddMindmapChildCommand,\n AddMindmapSiblingCommand,\n AlignBoardElementsCommand,\n type BoardAlignmentMode,\n type BoardElementType,\n type BoardUnitModel,\n DeleteBoardElementsCommand,\n exportBoardToCsv,\n exportBoardToMermaid,\n exportBoardToPdfBytes,\n exportBoardToPptxBytes,\n exportBoardToRasterDataUrl,\n exportBoardToSvg,\n GroupBoardElementsInFrameCommand,\n type IBoardElement,\n type IBoardFrameElement,\n IBoardIoService,\n IBoardSelectionService,\n type IBoardUnitData,\n type IBoardViewport,\n type IExportBoardMermaidOptions,\n type IExportBoardPdfOptions,\n type IExportBoardPptxOptions,\n type IExportBoardSvgOptions,\n type IImportCsvStickiesOptions,\n importCsvToBoardStickies,\n ImportMermaidToBoardCommand,\n LayoutBoardMindmapCommand,\n ReplaceBoardSnapshotCommand,\n SetBoardViewportCommand,\n UpdateBoardElementsCommand,\n VoteBoardStickyCommand,\n} from '@yudaocode/univer-boards';\n\nexport class FBoard extends FBase {\n constructor(\n private readonly _model: BoardUnitModel,\n @Inject(Injector) protected readonly _injector: Injector,\n @ICommandService private readonly _commandService: ICommandService\n ) {\n super();\n }\n\n getId(): string {\n return this._model.getUnitId();\n }\n\n getName(): string {\n return this._model.getName();\n }\n\n setName(name: string): this {\n this._model.setName(name);\n return this;\n }\n\n getModel(): BoardUnitModel {\n return this._model;\n }\n\n getSnapshot(): IBoardUnitData {\n return this._model.getSnapshot();\n }\n\n save(): IBoardUnitData {\n return this._model.save();\n }\n\n getElements(): IBoardElement[] {\n return Tools.deepClone(this._model.getElementsOrdered());\n }\n\n getElementById(id: string): IBoardElement | undefined {\n const el = this._model.getElement(id);\n return el ? Tools.deepClone(el) : undefined;\n }\n\n getFrames(): IBoardFrameElement[] {\n return Tools.deepClone(this._model.getFramesOrdered());\n }\n\n addElements(\n elements: Array<Partial<IBoardElement> & { type: BoardElementType }>\n ): boolean {\n return this._commandService.syncExecuteCommand(AddBoardElementsCommand.id, {\n unitId: this.getId(),\n elements,\n });\n }\n\n updateElement(\n id: string,\n patch: Partial<IBoardElement> & Record<string, unknown>\n ): boolean {\n return this._commandService.syncExecuteCommand(UpdateBoardElementsCommand.id, {\n unitId: this.getId(),\n updates: [{ id, patch }],\n });\n }\n\n deleteElements(elementIds: string[]): boolean {\n return this._commandService.syncExecuteCommand(DeleteBoardElementsCommand.id, {\n unitId: this.getId(),\n elementIds,\n });\n }\n\n alignElements(alignment: BoardAlignmentMode, elementIds?: string[]): boolean {\n return this._commandService.syncExecuteCommand(AlignBoardElementsCommand.id, {\n unitId: this.getId(),\n alignment,\n elementIds,\n });\n }\n\n groupInFrame(elementIds: string[], title?: string): boolean {\n return this._commandService.syncExecuteCommand(GroupBoardElementsInFrameCommand.id, {\n unitId: this.getId(),\n elementIds,\n title,\n });\n }\n\n addMindmapChild(parentId: string, text?: string): boolean {\n return this._commandService.syncExecuteCommand(AddMindmapChildCommand.id, {\n unitId: this.getId(),\n parentId,\n text,\n });\n }\n\n addMindmapSibling(nodeId: string, text?: string): boolean {\n return this._commandService.syncExecuteCommand(AddMindmapSiblingCommand.id, {\n unitId: this.getId(),\n nodeId,\n text,\n });\n }\n\n layoutMindmap(rootId?: string): boolean {\n return this._commandService.syncExecuteCommand(LayoutBoardMindmapCommand.id, {\n unitId: this.getId(),\n rootId,\n });\n }\n\n voteSticky(elementId: string, voterId?: string): boolean {\n return this._commandService.syncExecuteCommand(VoteBoardStickyCommand.id, {\n unitId: this.getId(),\n elementId,\n voterId,\n });\n }\n\n importMermaid(\n mermaidCode: string,\n options?: { originX?: number; originY?: number; replaceExisting?: boolean }\n ): boolean {\n return this._commandService.syncExecuteCommand(ImportMermaidToBoardCommand.id, {\n unitId: this.getId(),\n mermaidCode,\n ...options,\n });\n }\n\n toMermaid(options?: IExportBoardMermaidOptions): string {\n if (this._injector.has(IBoardIoService)) {\n return this._injector.get(IBoardIoService).exportMermaid(this._model.save(), options);\n }\n return exportBoardToMermaid(this._model.save(), options);\n }\n\n exportSvg(options?: IExportBoardSvgOptions): string {\n if (this._injector.has(IBoardIoService)) {\n return this._injector.get(IBoardIoService).exportSvg(this._model.save(), options);\n }\n return exportBoardToSvg(this._model.save(), options);\n }\n\n async exportPdf(options?: IExportBoardPdfOptions): Promise<Uint8Array> {\n if (this._injector.has(IBoardIoService)) {\n return await this._injector.get(IBoardIoService).exportPdf(this._model.save(), options);\n }\n return await exportBoardToPdfBytes(this._model.save(), options);\n }\n\n exportPptx(options?: IExportBoardPptxOptions): Uint8Array {\n if (this._injector.has(IBoardIoService)) {\n return this._injector.get(IBoardIoService).exportPptx(this._model.save(), options);\n }\n return exportBoardToPptxBytes(this._model.save(), options);\n }\n\n exportCsv(): string {\n if (this._injector.has(IBoardIoService)) {\n return this._injector.get(IBoardIoService).exportCsv(this._model.save());\n }\n return exportBoardToCsv(this._model.save());\n }\n\n async exportRasterDataUrl(format: 'png' | 'jpeg' = 'png', scale = 2): Promise<string> {\n return await exportBoardToRasterDataUrl(this._model.save(), format, scale);\n }\n\n importCsvStickies(csvText: string, options?: IImportCsvStickiesOptions): boolean {\n const elements = importCsvToBoardStickies(csvText, options);\n if (elements.length === 0) return false;\n return this.addElements(elements);\n }\n\n setViewport(viewport: Partial<IBoardViewport>): boolean {\n return this._commandService.syncExecuteCommand(SetBoardViewportCommand.id, {\n unitId: this.getId(),\n viewport,\n });\n }\n\n addComment(x: number, y: number, text: string, author?: string): boolean {\n return this._commandService.syncExecuteCommand(AddBoardCommentCommand.id, {\n unitId: this.getId(),\n x,\n y,\n text,\n author,\n });\n }\n\n replaceSnapshot(snapshot: IBoardUnitData): boolean {\n return this._commandService.syncExecuteCommand(ReplaceBoardSnapshotCommand.id, {\n unitId: this.getId(),\n snapshot,\n });\n }\n\n selectElements(ids: string[]): this {\n if (this._injector.has(IBoardSelectionService)) {\n this._injector.get(IBoardSelectionService).selectElements(ids);\n }\n return this;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,oBAA4C;AAiCrC,IAAM,wBAAN,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