fika-editor 3.3.1 → 3.4.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/dist/embed/6104.js +41 -41
- package/dist/embed/agentic-manifest.json +2 -2
- package/dist/embed/chunks/1131.js +1 -1
- package/dist/embed/chunks/2085.js +1 -0
- package/dist/embed/chunks/655.js +1 -1
- package/dist/embed/fika-embed.js +5 -5
- package/dist/types/embed/export.d.ts +15 -0
- package/dist/types/embed/index.d.ts +1 -0
- package/dist/types/embed/render.d.ts +5 -0
- package/dist/types/embed/types.d.ts +1 -1
- package/dist/types/hooks/useExport.d.ts +32 -4
- package/dist/types/i18n/i18n-react.d.ts +10 -10
- package/dist/types/i18n/i18n-types.d.ts +4822 -4794
- package/dist/types/i18n/i18n-util.async.d.ts +5 -5
- package/dist/types/i18n/i18n-util.d.ts +5 -5
- package/dist/types/types/export.d.ts +1 -1
- package/dist/types/utils/latexToOmml.d.ts +8 -0
- package/docs/EMBED.md +31 -0
- package/package.json +4 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FikaDocument } from './types';
|
|
2
|
+
import type { PresentationExportOptions } from '../hooks/useExport';
|
|
3
|
+
export interface FikaExportOptions extends Pick<PresentationExportOptions, 'mediaResolver' | 'watermark'> {
|
|
4
|
+
/** Runtime assets/chunks when exporting before mounting an editor. */
|
|
5
|
+
assetBaseUrl?: string;
|
|
6
|
+
/** PDF raster width in pixels. Default 2560, maximum 8192. */
|
|
7
|
+
width?: number;
|
|
8
|
+
/** Resource timeout per slide in milliseconds. Default 30000. */
|
|
9
|
+
timeoutMs?: number;
|
|
10
|
+
onProgress?: (completed: number, total: number) => void;
|
|
11
|
+
}
|
|
12
|
+
/** Editable PPTX bytes. No mount, dialog, browser download, or editor mutations. */
|
|
13
|
+
export declare function exportPresentationPptx(document: FikaDocument, options?: FikaExportOptions): Promise<Blob>;
|
|
14
|
+
/** High-resolution image PDF, one slide per page, using Fika's existing painter. */
|
|
15
|
+
export declare function exportPresentationPdf(document: FikaDocument, options?: FikaExportOptions): Promise<Blob>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { exportPresentationPptx, exportPresentationPdf, type FikaExportOptions } from './export';
|
|
1
2
|
export { renderSlideImage, renderDeckAtlas } from "./render";
|
|
2
3
|
export { mountFika, unmountFika } from './mount';
|
|
3
4
|
export type { FikaController, FikaDocument, FikaHeaderMenuItem, FikaMountOptions, FikaMountResult, FikaDocumentLoader, FikaStarterPresentationOptions, FikaTemplateLoader, FikaTemplatePayload, FikaImportPptxOptions, FikaImportApplyMode, FikaViewMode, } from './types';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Slide, SlideTheme } from '../types/slides';
|
|
2
|
+
import { type FikaExportMediaResolver } from '../configs/exportMediaResolver';
|
|
2
3
|
/**
|
|
3
4
|
* Offscreen slide rendering for hosts and agents.
|
|
4
5
|
*
|
|
@@ -25,6 +26,10 @@ export interface FikaRenderSlideOptions {
|
|
|
25
26
|
transparentBackground?: boolean;
|
|
26
27
|
/** Load original image pixels, using the host media resolver if needed. Fail if an image cannot load. */
|
|
27
28
|
fullResolutionImages?: boolean;
|
|
29
|
+
/** Per-export resolver; does not replace the mounted editor's configuration. */
|
|
30
|
+
mediaResolver?: FikaExportMediaResolver | null;
|
|
31
|
+
/** Reject instead of encoding incomplete asynchronous resources. */
|
|
32
|
+
strictResources?: boolean;
|
|
28
33
|
}
|
|
29
34
|
export interface FikaDeckAtlasOptions extends Omit<FikaRenderSlideOptions, 'width'> {
|
|
30
35
|
/** Width of one slide tile in CSS px. Default 640. */
|
|
@@ -93,7 +93,7 @@ export interface FikaMountOptions {
|
|
|
93
93
|
/** Fired when Fika enters or exits slideshow/presentation mode. */
|
|
94
94
|
onPresentationModeChange?: (screening: boolean) => void;
|
|
95
95
|
/**
|
|
96
|
-
* Toggle export dialog formats (`pptx`, `json`). Omitted keys stay enabled.
|
|
96
|
+
* Toggle export dialog formats (`pptx`, `pdf`, `json`). Omitted keys stay enabled.
|
|
97
97
|
*/
|
|
98
98
|
exportTabs?: FikaExportTabsConfig;
|
|
99
99
|
/**
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
import type { Slide } from '../types/slides';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Slide, SlideTheme } from '../types/slides';
|
|
2
|
+
import { type FikaExportMediaResolver } from '../configs/exportMediaResolver';
|
|
3
|
+
import { type FikaExportWatermarkResolver } from '../configs/exportWatermark';
|
|
4
|
+
/** A per-call deck snapshot: exporting never mounts or mutates an editor. */
|
|
5
|
+
export interface PresentationExportState {
|
|
6
|
+
slides: Slide[];
|
|
7
|
+
theme: SlideTheme;
|
|
8
|
+
viewportRatio: number;
|
|
9
|
+
viewportSize: number;
|
|
10
|
+
title: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PresentationExportOptions {
|
|
13
|
+
/** Only the live editor can certify the retained source package is unchanged. */
|
|
14
|
+
preserveSourcePackage?: boolean;
|
|
15
|
+
hiddenElementIds?: string[];
|
|
16
|
+
mediaResolver?: FikaExportMediaResolver | null;
|
|
17
|
+
watermark?: FikaExportWatermarkResolver | null;
|
|
18
|
+
}
|
|
19
|
+
export declare function createPresentationExporter({ slides, theme, viewportRatio, title, viewportSize }: PresentationExportState, options?: PresentationExportOptions, job?: import("../utils/jobProgress").JobProgress): {
|
|
4
20
|
exporting: boolean;
|
|
5
21
|
exportProgress: number;
|
|
6
22
|
exportSlide: number;
|
|
@@ -9,5 +25,17 @@ declare function _default(): {
|
|
|
9
25
|
exportImagePPTX: (domRefs: NodeListOf<Element>) => void;
|
|
10
26
|
exportJSON: () => void;
|
|
11
27
|
exportSpecificFile: (_slides: Slide[]) => void;
|
|
12
|
-
exportPPTX: (_slides: Slide[], masterOverwrite?: boolean, ignoreMedia?: boolean) => Promise<
|
|
28
|
+
exportPPTX: (_slides: Slide[], masterOverwrite?: boolean, ignoreMedia?: boolean) => Promise<Blob>;
|
|
29
|
+
};
|
|
30
|
+
export default function useExport(): {
|
|
31
|
+
exporting: boolean;
|
|
32
|
+
exportProgress: number;
|
|
33
|
+
exportSlide: number;
|
|
34
|
+
exportSlideTotal: number;
|
|
35
|
+
exportImage: (domRef: HTMLElement, format: string, quality: number, ignoreWebfont?: boolean) => void;
|
|
36
|
+
exportImagePPTX: (domRefs: NodeListOf<Element>) => void;
|
|
37
|
+
exportJSON: () => void;
|
|
38
|
+
exportSpecificFile: (_slides: Slide[]) => void;
|
|
39
|
+
exportPDF: () => Promise<void>;
|
|
40
|
+
exportPPTX: (slides: Slide[], masterOverwrite?: boolean, ignoreMedia?: boolean) => Promise<void>;
|
|
13
41
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import type { Locales, TranslationFunctions } from './i18n-types';
|
|
2
2
|
declare const TypesafeI18n: import("react").FunctionComponent<import("typesafe-i18n/react").TypesafeI18nProps<Locales>>, I18nContext: import("react").Context<import("typesafe-i18n/react").I18nContextType<Locales, {
|
|
3
|
-
screen: import("./i18n-types").NamespaceScreenTranslation;
|
|
4
|
-
myna: import("./i18n-types").NamespaceMynaTranslation;
|
|
5
3
|
export: import("./i18n-types").NamespaceExportTranslation;
|
|
6
|
-
|
|
4
|
+
components: import("./i18n-types").NamespaceComponentsTranslation;
|
|
5
|
+
myna: import("./i18n-types").NamespaceMynaTranslation;
|
|
7
6
|
mobile: import("./i18n-types").NamespaceMobileTranslation;
|
|
7
|
+
screen: import("./i18n-types").NamespaceScreenTranslation;
|
|
8
|
+
common: import("./i18n-types").NamespaceCommonTranslation;
|
|
9
|
+
editor: import("./i18n-types").NamespaceEditorTranslation;
|
|
8
10
|
configs: import("./i18n-types").NamespaceConfigsTranslation;
|
|
9
11
|
canvas: import("./i18n-types").NamespaceCanvasTranslation;
|
|
10
|
-
common: import("./i18n-types").NamespaceCommonTranslation;
|
|
11
|
-
components: import("./i18n-types").NamespaceComponentsTranslation;
|
|
12
12
|
}, TranslationFunctions>>;
|
|
13
13
|
export { TypesafeI18n, I18nContext };
|
|
14
14
|
export declare function useI18nContext(): import("typesafe-i18n/react").I18nContextType<Locales, {
|
|
15
|
-
screen: import("./i18n-types").NamespaceScreenTranslation;
|
|
16
|
-
myna: import("./i18n-types").NamespaceMynaTranslation;
|
|
17
15
|
export: import("./i18n-types").NamespaceExportTranslation;
|
|
18
|
-
|
|
16
|
+
components: import("./i18n-types").NamespaceComponentsTranslation;
|
|
17
|
+
myna: import("./i18n-types").NamespaceMynaTranslation;
|
|
19
18
|
mobile: import("./i18n-types").NamespaceMobileTranslation;
|
|
19
|
+
screen: import("./i18n-types").NamespaceScreenTranslation;
|
|
20
|
+
common: import("./i18n-types").NamespaceCommonTranslation;
|
|
21
|
+
editor: import("./i18n-types").NamespaceEditorTranslation;
|
|
20
22
|
configs: import("./i18n-types").NamespaceConfigsTranslation;
|
|
21
23
|
canvas: import("./i18n-types").NamespaceCanvasTranslation;
|
|
22
|
-
common: import("./i18n-types").NamespaceCommonTranslation;
|
|
23
|
-
components: import("./i18n-types").NamespaceComponentsTranslation;
|
|
24
24
|
}, TranslationFunctions>;
|
|
25
25
|
export declare const useI18nReact: typeof useI18nContext;
|