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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "fika-editor",
4
- "packageVersion": "3.0.25",
5
- "generatedAt": "2026-09-04T13:39:48.041Z",
4
+ "packageVersion": "3.0.26",
5
+ "generatedAt": "2026-09-04T14:59:33.406Z",
6
6
  "summary": "Authoring guidance for the Fika agentic bridge. SLIDE NUMBERS START AT 1 everywhere: payload.index, result.data.slideIndex, screenshot.slideIndex, getState().slideIndex, selectedSlideIndexes, plan.slides[].index, and plan.loudIndex are the SAME 1-based number — never subtract or add 1. First slide = 1; last existing = slideCount; omit index to append; index === slideCount+1 also appends; 1 ≤ index ≤ slideCount on createFromLayout REPLACES that slide. The recommended way to build a deck from scratch: (1) ONE bootstrap call deck.setup({ styleId, slideCount, title? }) — applies the visual identity, returns the composition plan (anchors + loud slide), and optionally builds the title slide together; prefer this over separate styles.catalog / deck.applyStyle / deck.planComposition, then (2) for each slide pick a recipe + visual variant from layouts.catalog and add it with slides.createFromLayout({ layoutId, variantId, slots }), preferring a variant whose anchor matches the plan (when variantId is omitted the engine picks a filled/full-width match; an explicit variantId is kept). The engine themes, positions, sanitizes slot markers the layout already draws, AND auto-fits every text box (via responsive measurement) so content does not overflow, and it runs a deterministic QA pass on each slide (overlap / contrast / density / monotony) so you can fix issues in the same turn. Author slot content as Markdown/plain text or structured values (arrays for bullets, { labels, series } for charts) — never hand-written HTML. Host-registered templates (deck.applyTemplate + slides.insertFromTemplate) are optional when the embed host supplies them. Avoid blank slides.create / hand-placed elements unless no layout fits. Pair this with the machine schema (command payload/return types) in the same manifest.",
7
7
  "commandCount": 197,
8
8
  "designSystem": {
@@ -1303,8 +1303,8 @@
1303
1303
  "payload": "FikaCreateTextInput | undefined",
1304
1304
  "returns": "PPTTextElement",
1305
1305
  "doc": {
1306
- "summary": "Create a text element (manual placement). Author content as Markdown via `markdown` (recommended) or plain text via `content`.",
1307
- "details": "Pass `markdown` for formatted copy (the bridge converts it to the HTML Fika stores). Markdown supports inline math: $…$ (inline) and $$…$$ (display) typeset via MathML, so mix prose and formulas freely (e.g. 'Plocha je $\\pi r^2$'). `content` is treated as literal markup — pass plain text there, or intentional HTML only when you specifically want to render markup (e.g. a code snippet). Do NOT type raw HTML tags into `markdown`: they are escaped and appear as literal text (the bridge warns when it detects this). The fallback color/font come from defaultColor/defaultFontName.",
1306
+ "summary": "Create a text element (manual placement). Author content as Markdown via `markdown` (recommended) plus an optional `style` (fontSize / fontName / color / bold / align), or plain text via `content`.",
1307
+ "details": "Pass `markdown` for formatted copy (the bridge converts it to the HTML Fika stores) and `style` to set the run typography — this is how you match an existing deck's look (e.g. `style:{ fontSize:44, fontName:'Calibri', color:'#0F172A', bold:true }`) WITHOUT writing HTML. Markdown supports inline math: $…$ (inline) and $$…$$ (display) typeset via MathML, so mix prose and formulas freely (e.g. 'Plocha je $\\pi r^2$'). `content` is treated as literal markup — pass plain text there, or intentional HTML only when you specifically want to render markup (e.g. a code snippet). Do NOT type raw HTML tags into `markdown`: they are escaped and appear as literal text (the bridge warns when it detects this). The fallback color/font come from style, then defaultColor/defaultFontName.",
1308
1308
  "params": [
1309
1309
  {
1310
1310
  "name": "slideId",
@@ -1318,6 +1318,12 @@
1318
1318
  "required": false,
1319
1319
  "description": "Markdown content (recommended). Converted to HTML."
1320
1320
  },
1321
+ {
1322
+ "name": "style",
1323
+ "type": "{ fontSize?: number; fontName?: string; color?: string; bold?: boolean; align?: 'left'|'center'|'right'|'justify' }",
1324
+ "required": false,
1325
+ "description": "Run style for the rendered Markdown: font size in canvas px, font family, color, bold, paragraph alignment. Use it to match the typography of neighbouring slides (read a sibling element's summary for its font/size/color) instead of hand-writing <span style> HTML into `content`."
1326
+ },
1321
1327
  {
1322
1328
  "name": "content",
1323
1329
  "type": "string",
@@ -1333,11 +1339,12 @@
1333
1339
  ],
1334
1340
  "examples": [
1335
1341
  "controller.text.create({ slideId, markdown: '**Key finding:** treated group improved 18%', element: { left:520, top:130, width:440, height:300, rotate:0, defaultColor:'#2D2D2D' } })",
1342
+ "controller.text.create({ slideId, markdown: 'Jak program běží', style: { fontSize:44, fontName:'Calibri', color:'#0F172A', bold:true }, element: { left:77, top:50, width:1126, height:56, rotate:0 } })",
1336
1343
  "controller.text.create({ slideId, markdown: '- First point\\n- Second point\\n- Third point', element:{ left:40, top:140, width:920, height:300, rotate:0 } })",
1337
1344
  "controller.text.create({ slideId, markdown: 'Vertically centered, never overflows', element:{ left:80, top:120, width:360, height:200, rotate:0, fixedHeight:true, vAlign:'middle' } })"
1338
1345
  ],
1339
1346
  "tips": [
1340
- "Prefer slides.insertFromTemplate for whole slides. Markdown flavor: markdown-it + markdown-it-texmath (KaTeX). Write Markdown, not HTML.",
1347
+ "Prefer slides.insertFromTemplate for whole slides. Markdown flavor: markdown-it + markdown-it-texmath (KaTeX). Write Markdown + `style`, not HTML — `style` covers font, size, color, bold and alignment, which is everything needed to match hand-styled neighbouring slides.",
1341
1348
  "For a box that must stay a fixed size, set fixedHeight:true so the text auto-shrinks to fit instead of overflowing."
1342
1349
  ],
1343
1350
  "related": [
@@ -1383,13 +1390,14 @@
1383
1390
  {
1384
1391
  "name": "text.setMarkdown",
1385
1392
  "domain": "text",
1386
- "payload": "{ elementId: string; slideId?: string; markdown: string }",
1393
+ "payload": "{ elementId: string; slideId?: string; markdown: string; style?: TextRunStyle }",
1387
1394
  "returns": "PPTTextElement",
1388
1395
  "doc": {
1389
- "summary": "Replace a text element's content from a Markdown string (converted to HTML).",
1390
- "details": "Author in Markdown. Raw HTML tags are escaped (they would render as literal text) and trigger a warning — use Markdown syntax instead.",
1396
+ "summary": "Replace a text element's content from a Markdown string (converted to HTML), optionally with a run `style`.",
1397
+ "details": "Author in Markdown. Raw HTML tags are escaped (they would render as literal text) and trigger a warning — use Markdown syntax instead. Pass `style` ({ fontSize, fontName, color, bold, align }) to keep or set the typography of the box; without it the element's default font/color apply.",
1391
1398
  "examples": [
1392
- "controller.text.setMarkdown(elementId, '- First point\\n- Second point\\n- Third point')"
1399
+ "controller.text.setMarkdown(elementId, '- First point\\n- Second point\\n- Third point')",
1400
+ "controller.text.setMarkdown(elementId, 'Nový nadpis', { style: { fontSize: 44, fontName: 'Calibri', color: '#0F172A', bold: true } })"
1393
1401
  ],
1394
1402
  "related": [
1395
1403
  "text.setContent",
@@ -2263,7 +2271,188 @@
2263
2271
  ]
2264
2272
  }
2265
2273
  ],
2266
- "layoutCheatsheet": [],
2274
+ "layoutCheatsheet": [
2275
+ {
2276
+ "id": "title",
2277
+ "slots": [
2278
+ "title*:text",
2279
+ "subtitle:text",
2280
+ "eyebrow:text"
2281
+ ],
2282
+ "variants": [
2283
+ "centered(centered)"
2284
+ ]
2285
+ },
2286
+ {
2287
+ "id": "section",
2288
+ "slots": [
2289
+ "title*:text",
2290
+ "subtitle:text",
2291
+ "eyebrow:text"
2292
+ ],
2293
+ "variants": [
2294
+ "centered(centered)"
2295
+ ]
2296
+ },
2297
+ {
2298
+ "id": "closing",
2299
+ "slots": [
2300
+ "title*:text",
2301
+ "subtitle:text",
2302
+ "eyebrow:text"
2303
+ ],
2304
+ "variants": [
2305
+ "centered(centered)"
2306
+ ]
2307
+ },
2308
+ {
2309
+ "id": "bullets",
2310
+ "slots": [
2311
+ "title*:text",
2312
+ "bullets*:bullets",
2313
+ "eyebrow:text",
2314
+ "ordered:text"
2315
+ ],
2316
+ "variants": [
2317
+ "standard(leftHeavy)",
2318
+ "leftRail(leftHeavy)",
2319
+ "rightRail(rightHeavy)"
2320
+ ]
2321
+ },
2322
+ {
2323
+ "id": "twoColumn",
2324
+ "slots": [
2325
+ "title*:text",
2326
+ "leftHeading:text",
2327
+ "leftBullets:bullets",
2328
+ "leftBody:text",
2329
+ "rightHeading:text",
2330
+ "rightBullets:bullets",
2331
+ "rightBody:text"
2332
+ ],
2333
+ "variants": [
2334
+ "even(split)",
2335
+ "leftWide(leftHeavy)",
2336
+ "rightWide(rightHeavy)"
2337
+ ]
2338
+ },
2339
+ {
2340
+ "id": "imageText",
2341
+ "slots": [
2342
+ "title*:text",
2343
+ "image:image",
2344
+ "imageSide:text",
2345
+ "bullets:bullets",
2346
+ "body:text",
2347
+ "caption:text"
2348
+ ],
2349
+ "variants": [
2350
+ "imageRight(leftHeavy)",
2351
+ "imageLeft(rightHeavy)"
2352
+ ]
2353
+ },
2354
+ {
2355
+ "id": "bigStat",
2356
+ "slots": [
2357
+ "stats:stats",
2358
+ "stat:text",
2359
+ "statLabel:text",
2360
+ "title:text",
2361
+ "body:text"
2362
+ ],
2363
+ "variants": [
2364
+ "centered(centered)",
2365
+ "edgeAligned(edgeAligned)"
2366
+ ]
2367
+ },
2368
+ {
2369
+ "id": "quote",
2370
+ "slots": [
2371
+ "quote*:text",
2372
+ "attribution:text"
2373
+ ],
2374
+ "variants": [
2375
+ "centered(centered)",
2376
+ "leftHeavy(leftHeavy)"
2377
+ ]
2378
+ },
2379
+ {
2380
+ "id": "chart",
2381
+ "slots": [
2382
+ "title*:text",
2383
+ "chartType:text",
2384
+ "labels*:chart",
2385
+ "series*:chart",
2386
+ "legends:chart",
2387
+ "caption:text"
2388
+ ],
2389
+ "variants": [
2390
+ "full(split)",
2391
+ "inset(centered)"
2392
+ ]
2393
+ },
2394
+ {
2395
+ "id": "comparison",
2396
+ "slots": [
2397
+ "title*:text",
2398
+ "headers:rows",
2399
+ "rows*:rows"
2400
+ ],
2401
+ "variants": [
2402
+ "full(split)"
2403
+ ]
2404
+ },
2405
+ {
2406
+ "id": "cards",
2407
+ "slots": [
2408
+ "title*:text",
2409
+ "cards*:cards",
2410
+ "eyebrow:text"
2411
+ ],
2412
+ "variants": [
2413
+ "grid(centered)",
2414
+ "accentPanel(split)",
2415
+ "leftOffset(leftHeavy)",
2416
+ "rightOffset(rightHeavy)"
2417
+ ]
2418
+ },
2419
+ {
2420
+ "id": "numbered",
2421
+ "slots": [
2422
+ "title*:text",
2423
+ "steps*:steps",
2424
+ "eyebrow:text"
2425
+ ],
2426
+ "variants": [
2427
+ "standard(leftHeavy)",
2428
+ "rightRail(rightHeavy)"
2429
+ ]
2430
+ },
2431
+ {
2432
+ "id": "imageFull",
2433
+ "slots": [
2434
+ "image*:image",
2435
+ "title*:text",
2436
+ "subtitle:text"
2437
+ ],
2438
+ "variants": [
2439
+ "fullBleed(fullBleed)"
2440
+ ]
2441
+ },
2442
+ {
2443
+ "id": "diagram",
2444
+ "slots": [
2445
+ "title*:text",
2446
+ "code:diagram",
2447
+ "kind:text",
2448
+ "image:image",
2449
+ "eyebrow:text"
2450
+ ],
2451
+ "variants": [
2452
+ "standard(centered)"
2453
+ ]
2454
+ }
2455
+ ],
2267
2456
  "helperTypes": {
2268
2457
  "FikaAnimationCatalog": "export interface FikaAnimationCatalog { enter: FikaAnimationPresetGroup[]; exit: FikaAnimationPresetGroup[]; attention: FikaAnimationPresetGroup[]; slide: FikaSlideAnimationPreset[] }",
2269
2458
  "FikaAnimationPreset": "export interface FikaAnimationPreset { name: string; value: string }",
@@ -2285,7 +2474,7 @@
2285
2474
  "FikaCreateLineElementInput": "export interface FikaCreateLineElementInput { slideId?: string; index?: number; element: FikaLineElementInput; select?: boolean }",
2286
2475
  "FikaCreateShapeInput": "export type FikaCreateShapeInput = FikaShapePatch & { slideId?: string; index?: number; select?: boolean; presetId?: string; categoryKey?: ShapeCategoryKey; presetIndex?: number; preset?: ShapePoolItem; element?: Partial<PPTShapeElement> }",
2287
2476
  "FikaCreateTableInput": "export type FikaCreateTableInput = FikaTableElementPatch & { id?: string; slideId?: string; index?: number; select?: boolean; element?: Partial<PPTTableElement> }",
2288
- "FikaCreateTextInput": "export interface FikaCreateTextInput { slideId?: string; index?: number; content?: string; markdown?: string; element?: Partial<PPTTextElement>; select?: boolean }",
2477
+ "FikaCreateTextInput": "export interface FikaCreateTextInput { slideId?: string; index?: number; content?: string; markdown?: string; style?: TextRunStyle; element?: Partial<PPTTextElement>; select?: boolean }",
2289
2478
  "FikaDeckDocument": "export type FikaDeckDocument = Omit<FikaDocument, 'theme'> & { theme: SlideTheme; viewport: FikaDeckViewport; templates: SlideTemplate[] }",
2290
2479
  "FikaDeckInput": "export type FikaDeckInput = Omit<FikaDocument, 'theme'> & { theme?: FikaSlideThemePatch; viewport?: Partial<FikaDeckViewport>; templates?: SlideTemplate[] }",
2291
2480
  "FikaDeckPatch": "export interface FikaDeckPatch { title?: string; slides?: Slide[]; theme?: FikaSlideThemePatch; viewport?: Partial<FikaDeckViewport>; templates?: SlideTemplate[] }",
@@ -2362,7 +2551,8 @@
2362
2551
  "FikaVideoStylePatch": "export interface FikaVideoStylePatch { lock?: boolean; groupId?: string; name?: string; link?: PPTElementLink }",
2363
2552
  "ImageFilterKey": "type ImageFilterKey = keyof NonNullable<PPTImageElement['filters']>",
2364
2553
  "SlideReference": "type SlideReference = string | number",
2365
- "SlideSelectorPayload": "type SlideSelectorPayload = { slideId?: string; index?: number; slideIdOrIndex?: SlideReference }"
2554
+ "SlideSelectorPayload": "type SlideSelectorPayload = { slideId?: string; index?: number; slideIdOrIndex?: SlideReference }",
2555
+ "TextRunStyle": "export interface TextRunStyle { fontSize?: number; fontName?: string; color?: string; bold?: boolean; align?: 'left' | 'center' | 'right' | 'justify' }"
2366
2556
  },
2367
2557
  "modelTypes": {
2368
2558
  "AnimationTrigger": "export type AnimationTrigger = 'click' | 'meantime' | 'auto'",