@dajiaoai/algeo-sdk 2.13.1 → 2.13.2
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/README.md +1 -1
- package/dist/algeo-sdk.cjs.js +5 -3
- package/dist/algeo-sdk.esm.js +5 -3
- package/dist/algeo-sdk.umd.js +5 -3
- package/dist/shared.d.ts +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -569,7 +569,7 @@ interface FileContent {
|
|
|
569
569
|
| -------------------------------- | ------------------------------------------------------------------------------------ |
|
|
570
570
|
| `getCount()` | 获取当前已知画板数量 |
|
|
571
571
|
| `getCurrentIndex()` | 获取当前已知画板索引 |
|
|
572
|
-
| `
|
|
572
|
+
| `getViewBounds(index?)` | 异步获取指定或当前画板的有限画布导出视野 `{ left, top, right, bottom, scale }`;可直接传给 `exportImage`;无限画布返回 `null` |
|
|
573
573
|
| `switchTo(index)` | 切换画板 |
|
|
574
574
|
| `add()` | 在末尾新增画板 |
|
|
575
575
|
| `addAt(index)` | 在指定位置新增画板 |
|
package/dist/algeo-sdk.cjs.js
CHANGED
|
@@ -4011,7 +4011,7 @@ function convertToLatest(content) {
|
|
|
4011
4011
|
}
|
|
4012
4012
|
|
|
4013
4013
|
/** SDK 版本号,构建时由 rollup 注入 */
|
|
4014
|
-
const VERSION = '2.13.
|
|
4014
|
+
const VERSION = '2.13.2';
|
|
4015
4015
|
const DEFAULT_EMBED_BASE = 'https://dajiaoai.com';
|
|
4016
4016
|
const DEFAULT_PRESENTATION_PATH = '/embed/present';
|
|
4017
4017
|
const DEFAULT_EDITOR_PATH = '/embed/edit';
|
|
@@ -4515,8 +4515,10 @@ class EmbeddedEditor extends EmbeddedTarget {
|
|
|
4515
4515
|
this.slides = {
|
|
4516
4516
|
getCount: () => this.slideCount,
|
|
4517
4517
|
getCurrentIndex: () => this.currentSlideIndex,
|
|
4518
|
-
|
|
4519
|
-
const result = await this.post('
|
|
4518
|
+
getViewBounds: async (index) => {
|
|
4519
|
+
const result = await this.post('getViewBounds', {
|
|
4520
|
+
...(index === undefined ? {} : { index }),
|
|
4521
|
+
});
|
|
4520
4522
|
return result.viewBounds;
|
|
4521
4523
|
},
|
|
4522
4524
|
switchTo: async (index) => {
|
package/dist/algeo-sdk.esm.js
CHANGED
|
@@ -4009,7 +4009,7 @@ function convertToLatest(content) {
|
|
|
4009
4009
|
}
|
|
4010
4010
|
|
|
4011
4011
|
/** SDK 版本号,构建时由 rollup 注入 */
|
|
4012
|
-
const VERSION = '2.13.
|
|
4012
|
+
const VERSION = '2.13.2';
|
|
4013
4013
|
const DEFAULT_EMBED_BASE = 'https://dajiaoai.com';
|
|
4014
4014
|
const DEFAULT_PRESENTATION_PATH = '/embed/present';
|
|
4015
4015
|
const DEFAULT_EDITOR_PATH = '/embed/edit';
|
|
@@ -4513,8 +4513,10 @@ class EmbeddedEditor extends EmbeddedTarget {
|
|
|
4513
4513
|
this.slides = {
|
|
4514
4514
|
getCount: () => this.slideCount,
|
|
4515
4515
|
getCurrentIndex: () => this.currentSlideIndex,
|
|
4516
|
-
|
|
4517
|
-
const result = await this.post('
|
|
4516
|
+
getViewBounds: async (index) => {
|
|
4517
|
+
const result = await this.post('getViewBounds', {
|
|
4518
|
+
...(index === undefined ? {} : { index }),
|
|
4519
|
+
});
|
|
4518
4520
|
return result.viewBounds;
|
|
4519
4521
|
},
|
|
4520
4522
|
switchTo: async (index) => {
|
package/dist/algeo-sdk.umd.js
CHANGED
|
@@ -4015,7 +4015,7 @@
|
|
|
4015
4015
|
}
|
|
4016
4016
|
|
|
4017
4017
|
/** SDK 版本号,构建时由 rollup 注入 */
|
|
4018
|
-
const VERSION = '2.13.
|
|
4018
|
+
const VERSION = '2.13.2';
|
|
4019
4019
|
const DEFAULT_EMBED_BASE = 'https://dajiaoai.com';
|
|
4020
4020
|
const DEFAULT_PRESENTATION_PATH = '/embed/present';
|
|
4021
4021
|
const DEFAULT_EDITOR_PATH = '/embed/edit';
|
|
@@ -4519,8 +4519,10 @@
|
|
|
4519
4519
|
this.slides = {
|
|
4520
4520
|
getCount: () => this.slideCount,
|
|
4521
4521
|
getCurrentIndex: () => this.currentSlideIndex,
|
|
4522
|
-
|
|
4523
|
-
const result = await this.post('
|
|
4522
|
+
getViewBounds: async (index) => {
|
|
4523
|
+
const result = await this.post('getViewBounds', {
|
|
4524
|
+
...(index === undefined ? {} : { index }),
|
|
4525
|
+
});
|
|
4524
4526
|
return result.viewBounds;
|
|
4525
4527
|
},
|
|
4526
4528
|
switchTo: async (index) => {
|
package/dist/shared.d.ts
CHANGED
|
@@ -241,7 +241,7 @@ export interface SwitchSlideResult {
|
|
|
241
241
|
export interface GetSlideCountResult {
|
|
242
242
|
count: number;
|
|
243
243
|
}
|
|
244
|
-
export interface
|
|
244
|
+
export interface GetViewBoundsResult {
|
|
245
245
|
/** 与 ExportImageViewMode.viewBound 格式一致,可直接传给 exportImage。 */
|
|
246
246
|
viewBounds: ExportViewBound | null;
|
|
247
247
|
}
|
|
@@ -407,7 +407,11 @@ export interface DocumentApi {
|
|
|
407
407
|
export interface SlidesApi {
|
|
408
408
|
getCount(): number;
|
|
409
409
|
getCurrentIndex(): number;
|
|
410
|
-
|
|
410
|
+
/**
|
|
411
|
+
* 获取有限画布的导出视野。index 为 0-based,省略时读取当前画板;
|
|
412
|
+
* 无限画布返回 null,结果可直接作为 exportImage 的 viewBound。
|
|
413
|
+
*/
|
|
414
|
+
getViewBounds(index?: number): Promise<ExportViewBound | null>;
|
|
411
415
|
switchTo(index: number): Promise<void>;
|
|
412
416
|
add(): Promise<SlideIndexResult>;
|
|
413
417
|
addAt(index: number): Promise<SlideIndexResult>;
|