fika-editor 3.0.25 → 3.0.26
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/{482.js → 6311.js} +59 -59
- package/dist/embed/agentic-manifest.json +202 -12
- package/dist/embed/fika-embed.js +2 -2
- package/dist/types/embed/agentic/layouts.d.ts +10 -0
- package/dist/types/embed/agentic/types.d.ts +7 -1
- package/dist/types/utils/markdown.d.ts +20 -0
- package/package.json +1 -1
|
@@ -58,6 +58,16 @@ export interface FikaLayout {
|
|
|
58
58
|
/** Strip one or more leading bullet/number markers from a list item. */
|
|
59
59
|
export declare function stripLeadingListMarkers(raw: string): string;
|
|
60
60
|
type Slots = Record<string, unknown>;
|
|
61
|
+
/** Natural (intrinsic) pixel size of a bitmap, when the host or the probe knows it. */
|
|
62
|
+
export interface ImageNaturalSize {
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Best-effort natural size of a bitmap. Browser only; resolves `undefined`
|
|
68
|
+
* on error or after `timeoutMs` so a slow CDN never blocks slide creation.
|
|
69
|
+
*/
|
|
70
|
+
export declare function probeImageNaturalSize(src: string, timeoutMs?: number): Promise<ImageNaturalSize | undefined>;
|
|
61
71
|
export declare const PPTX_LAYOUTS: FikaLayout[];
|
|
62
72
|
export declare function listLayouts(): FikaLayout[];
|
|
63
73
|
/**
|
|
@@ -7,6 +7,8 @@ import type { FikaLayout, FikaLayoutBackgroundMode } from './layouts';
|
|
|
7
7
|
import type { FikaStyleMotif, FikaStyleSummary } from './styles';
|
|
8
8
|
import type { CompositionAnchor, CompositionPlan, CompositionSlideHint } from './composition';
|
|
9
9
|
import type { FikaAgenticDocs, FikaCommandDescription, FikaDesignGuide, FikaDomainSummary } from './manifestDocs';
|
|
10
|
+
import type { TextRunStyle } from '../../utils/markdown';
|
|
11
|
+
export type { TextRunStyle } from '../../utils/markdown';
|
|
10
12
|
export type { FikaAgenticDocs, FikaCommandDescription, FikaCommandDoc, FikaDesignGuide, FikaDesignSystem, FikaDocParam, FikaDomainDoc, FikaDomainSummary } from './manifestDocs';
|
|
11
13
|
export type { FikaTemplateSummary, FikaTemplateSlideEntry, FikaTemplateSlidesCatalog, FikaTemplateSlidesCatalogResult } from './templates';
|
|
12
14
|
export type { FikaLayout, FikaLayoutSlotDef, FikaLayoutBackgroundMode, FikaLayoutVariant } from './layouts';
|
|
@@ -317,6 +319,8 @@ export interface FikaCreateTextInput {
|
|
|
317
319
|
content?: string;
|
|
318
320
|
/** Markdown content; converted to HTML by the bridge. */
|
|
319
321
|
markdown?: string;
|
|
322
|
+
/** Run style (fontSize / fontName / color / bold / align) applied to `markdown`. */
|
|
323
|
+
style?: TextRunStyle;
|
|
320
324
|
element?: Partial<PPTTextElement>;
|
|
321
325
|
select?: boolean;
|
|
322
326
|
}
|
|
@@ -742,9 +746,10 @@ export interface FikaAgentTextApi {
|
|
|
742
746
|
setContent(elementId: string, content: string, meta?: FikaCommandMeta & {
|
|
743
747
|
slideId?: string;
|
|
744
748
|
}): Promise<FikaCommandResult<PPTTextElement>>;
|
|
745
|
-
/** Replace content from a Markdown string (converted to HTML)
|
|
749
|
+
/** Replace content from a Markdown string (converted to HTML), optionally with a run `style`. */
|
|
746
750
|
setMarkdown(elementId: string, markdown: string, meta?: FikaCommandMeta & {
|
|
747
751
|
slideId?: string;
|
|
752
|
+
style?: TextRunStyle;
|
|
748
753
|
}): Promise<FikaCommandResult<PPTTextElement>>;
|
|
749
754
|
updateContent(elementId: string, update: FikaTextContentUpdateInput, meta?: FikaCommandMeta & {
|
|
750
755
|
slideId?: string;
|
|
@@ -1429,6 +1434,7 @@ export interface FikaCommandPayloadMap {
|
|
|
1429
1434
|
elementId: string;
|
|
1430
1435
|
slideId?: string;
|
|
1431
1436
|
markdown: string;
|
|
1437
|
+
style?: TextRunStyle;
|
|
1432
1438
|
};
|
|
1433
1439
|
'text.updateContent': {
|
|
1434
1440
|
elementId: string;
|
|
@@ -50,3 +50,23 @@ export declare function ensureInlineMathReady(): Promise<void>;
|
|
|
50
50
|
* read as literal text.
|
|
51
51
|
*/
|
|
52
52
|
export declare function renderInlineMarkdown(markdown: string): string;
|
|
53
|
+
/** Typographic run style applied on top of Markdown-rendered HTML. */
|
|
54
|
+
export interface TextRunStyle {
|
|
55
|
+
/** Font size in px (the deck's canvas px). */
|
|
56
|
+
fontSize?: number;
|
|
57
|
+
/** CSS font-family name, e.g. "Calibri". */
|
|
58
|
+
fontName?: string;
|
|
59
|
+
/** CSS color (hex / rgb). */
|
|
60
|
+
color?: string;
|
|
61
|
+
bold?: boolean;
|
|
62
|
+
align?: 'left' | 'center' | 'right' | 'justify';
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Apply one run style (size / font / color / bold / align) to Markdown output
|
|
66
|
+
* so agents get styled copy from `text.create({ markdown, style })` without
|
|
67
|
+
* hand-writing `<span style>` HTML. Parses the HTML with parse5, wraps each
|
|
68
|
+
* block's inline content in a single styled span (the shape the editor and
|
|
69
|
+
* the pptx importer produce) and mirrors size / color onto list containers so
|
|
70
|
+
* bullet markers match.
|
|
71
|
+
*/
|
|
72
|
+
export declare function applyTextRunStyle(htmlText: string, style: TextRunStyle | undefined): string;
|