@dajiaoai/algeo-sdk 2.16.2 → 2.17.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/README.md +7 -5
- package/dist/algeo-sdk.cjs.js +76 -75
- package/dist/algeo-sdk.esm.js +76 -75
- package/dist/algeo-sdk.umd.js +5365 -5364
- package/dist/embedded-editor.d.ts +0 -1
- package/dist/embedded-presentation.d.ts +2 -5
- package/dist/index.d.ts +4 -2
- package/dist/shared.d.ts +4 -2
- package/package.json +1 -1
|
@@ -10,7 +10,6 @@ export declare class EmbeddedEditor extends EmbeddedTarget<EmbeddedEditorEventMa
|
|
|
10
10
|
readonly history: HistoryApi;
|
|
11
11
|
readonly mode: ModeApi;
|
|
12
12
|
readonly ai: AiApi;
|
|
13
|
-
private currentContent?;
|
|
14
13
|
private currentSlideIndex;
|
|
15
14
|
private slideCount;
|
|
16
15
|
private historyCount;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { EmbeddedTarget } from './embedded-target';
|
|
2
|
-
import { AlgeoError, type AlgeoPresentationCreateOptions, type EmbeddedPresentationEventListenerMap, type EmbeddedPresentationEventMap, type EmbeddedPresentationEventName, type
|
|
2
|
+
import { AlgeoError, type AlgeoPresentationCreateOptions, type EmbeddedPresentationEventListenerMap, type EmbeddedPresentationEventMap, type EmbeddedPresentationEventName, type FileContentInput, type GetSlideCountResult, type LoadFileResult, type LoadShareByIdResult, type PresentationModeApi, type ReplResult, type SwitchSlideResult } from './shared';
|
|
3
3
|
export declare class EmbeddedPresentation extends EmbeddedTarget<EmbeddedPresentationEventMap, EmbeddedPresentationEventName, EmbeddedPresentationEventListenerMap> {
|
|
4
4
|
readonly mode: PresentationModeApi;
|
|
5
|
-
private currentContent?;
|
|
6
|
-
private currentSlideIndex;
|
|
7
|
-
private slideCount;
|
|
8
5
|
private appId;
|
|
9
6
|
private whitelistCheck?;
|
|
10
7
|
private whitelistError?;
|
|
@@ -16,7 +13,7 @@ export declare class EmbeddedPresentation extends EmbeddedTarget<EmbeddedPresent
|
|
|
16
13
|
private checkWhitelist;
|
|
17
14
|
private ensureWhitelistAccess;
|
|
18
15
|
loadShareById(id: string): Promise<LoadShareByIdResult>;
|
|
19
|
-
loadFile(content:
|
|
16
|
+
loadFile(content: FileContentInput): Promise<LoadFileResult>;
|
|
20
17
|
switchSlide(index: number): Promise<SwitchSlideResult>;
|
|
21
18
|
getSlideCount(): Promise<GetSlideCountResult>;
|
|
22
19
|
repl(command: string): Promise<ReplResult>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { convertToLatest as convertProtocolContentToLatest } from '@dajiaoai/algeo-protocol';
|
|
1
2
|
export { AlgeoError, EMBED_ERROR_CODES, VERSION } from './shared';
|
|
2
3
|
export type { FileContentAny, FileContentLatest, } from '@dajiaoai/algeo-protocol';
|
|
3
|
-
|
|
4
|
-
export
|
|
4
|
+
/** @deprecated The iframe handles file migration when content is loaded. */
|
|
5
|
+
export declare const convertToLatest: typeof convertProtocolContentToLatest;
|
|
6
|
+
export type { AiApi, AiCancelEvent, AiRawSseEventV1, AiRequestEvent, AiRunPayloadV1, AiStreamEventV1, AlgeoCreateOptions, AlgeoEditorAuthOptions, AlgeoEditorCreateOptions, AlgeoEditorSaveResult, AlgeoEditorUiConfig, AlgeoEmbedMode, AlgeoErrorPayload, AlgeoFontConfig, AlgeoFontFormat, AlgeoFontOption, AlgeoFontResource, AlgeoFontSource, AlgeoPresentationCreateOptions, AlgeoPresentationUiConfig, ContentChangeEvent, DocumentApi, FileContentInput, EmbeddedEditorEventListenerMap, EmbeddedEditorEventMap, EmbeddedEditorEventName, EmbeddedPresentationEventListenerMap, EmbeddedPresentationEventMap, EmbeddedPresentationEventName, ExportImageFormat, ExportImageOptions, ExportImageSizeMode, ExportImageViewMode, ExportImageContainMode, ExportViewBound, ExportViewBounds, ExportViewCamera3D, ExportPadding, ExportSlideImageOptions, ExportedSlideImage, ExportSlideImageResult, ExportLatexOptions, ExportedLatex, ExportLatexResult, GetContentResult, GetSlideCountResult, HistoryApi, LoadFileResult, LoadShareByIdResult, ModeApi, PresentationModeApi, ReadyEvent, MasterTemplateItem, MasterTemplateCallbacks, MasterTemplateOperation, ResourceLibraryItem, ResourceLibraryPageInfo, ResourceLibraryProvider, ResourceLibraryQuery, ResourceLibraryQueryContext, ResourceLibraryResult, ReplResult, SetViewBoundsOptions, SetViewCamera3dOptions, ViewCamera3d, SlideChangeEvent, SlideIndexResult, SlideInfo, SlidesApi, SwitchSlideResult, SaveEvent, } from './shared';
|
|
5
7
|
export { EmbeddedPresentation } from './embedded-presentation';
|
|
6
8
|
export { EmbeddedEditor } from './embedded-editor';
|
|
7
9
|
export { AlgeoSdk, create, createEditor, createPresentation, type EmbeddedInstance, } from './sdk';
|
package/dist/shared.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { AlgeoError, type AlgeoErrorPayload, type AiRunPayloadV1, type AiStreamE
|
|
|
3
3
|
export declare const VERSION = "__ALGEO_SDK_VERSION__";
|
|
4
4
|
/** 从协议层 re-export,供外部使用 */
|
|
5
5
|
export type { FileContentAny, FileContentLatest, AlgeoErrorPayload };
|
|
6
|
+
/** Project data forwarded to the iframe for version detection and validation. */
|
|
7
|
+
export type FileContentInput = object;
|
|
6
8
|
export type { AiRawSseEventV1, AiResponseRecordV1, AiRunPayloadV1, AiStreamEventV1, GeometryOpV1, OpenAiChatMessageV1, } from '@dajiaoai/algeo-protocol';
|
|
7
9
|
export { AlgeoError, EMBED_ERROR_CODES };
|
|
8
10
|
export declare const EMBED_TIMEOUT_MS = 30000;
|
|
@@ -81,7 +83,7 @@ export type AlgeoEditorSaveResult = {
|
|
|
81
83
|
export interface AlgeoEditorCreateOptions {
|
|
82
84
|
auth?: AlgeoEditorAuthOptions;
|
|
83
85
|
shareId?: string;
|
|
84
|
-
initialContent?:
|
|
86
|
+
initialContent?: FileContentInput;
|
|
85
87
|
/** 空白画板模式,默认 2d。初始化优先级:initialContent > shareId > 空白画板。 */
|
|
86
88
|
initialMode?: '2d' | '3d';
|
|
87
89
|
ui?: AlgeoEditorUiConfig;
|
|
@@ -473,7 +475,7 @@ export interface GetHistoryStateResult {
|
|
|
473
475
|
canRedo: boolean;
|
|
474
476
|
}
|
|
475
477
|
export interface DocumentApi {
|
|
476
|
-
loadContent(content:
|
|
478
|
+
loadContent(content: FileContentInput): Promise<void>;
|
|
477
479
|
getContent(): Promise<FileContentLatest>;
|
|
478
480
|
}
|
|
479
481
|
export interface SlidesApi {
|