fika-editor 3.0.23 → 3.0.25

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.
@@ -0,0 +1,33 @@
1
+ import type { PPTCodeElement } from '../types/slides';
2
+ /**
3
+ * A .pptx has no code-block primitive, so a native code element travels as a
4
+ * text box whose shape name (`p:cNvPr@name`) carries this tag:
5
+ *
6
+ * fika:code:<language>[:<theme>[:<lineNumbers 0|1>]]
7
+ *
8
+ * Fika writes it on export and python-pptx2's `add_code` writes it when a deck
9
+ * is authored server-side; the importer turns any shape carrying it back into a
10
+ * syntax-highlighted code element instead of a plain text box.
11
+ */
12
+ export declare const CODE_SHAPE_NAME_PREFIX = "fika:code";
13
+ export interface CodeShapeTag {
14
+ language: string;
15
+ theme: string;
16
+ showLineNumbers: boolean;
17
+ }
18
+ export declare function formatCodeShapeName(el: Pick<PPTCodeElement, 'language' | 'theme' | 'showLineNumbers'>): string;
19
+ export declare function parseCodeShapeName(name: string | undefined | null): CodeShapeTag | null;
20
+ /**
21
+ * Source lines from imported paragraph HTML: one `<p>` per line, `<br>` as a
22
+ * hard break inside a paragraph, entities decoded, whitespace kept verbatim.
23
+ */
24
+ export declare function htmlToCodeLines(html: string): string[];
25
+ /**
26
+ * Export paints line numbers as literal text (`" 1 code"`); when the tag says
27
+ * the gutter is on, peel it off so the numbers are not doubled on re-import.
28
+ */
29
+ export declare function stripCodeLineNumberGutter(lines: string[]): string[];
30
+ /** Imported paragraph HTML → code element source, honouring the tag's gutter flag. */
31
+ export declare function importedCodeSource(html: string, tag: CodeShapeTag): string;
32
+ /** The first run font size (pt) declared in imported paragraph HTML, scaled to px. */
33
+ export declare function importedCodeFontSize(html: string, ratio: number): number;
@@ -14,12 +14,6 @@ export declare function isEmptyListParagraph(inner: string): boolean;
14
14
  * Empty hanging paragraphs stay spacers (PowerPoint does not draw a bullet for them).
15
15
  */
16
16
  export declare function wrapHangingIndentParagraphsAsLists(html: string, ratio?: number): string;
17
- /**
18
- * Lists without a gutter have their outside markers clipped by overflow:hidden
19
- * on fixed-height text boxes. Stamp a padding-inline-start when the importer
20
- * (or pptxtojson) emitted a bare <ul>/<ol>.
21
- */
22
- export declare function ensureListMarkerGutter(html: string): string;
23
17
  /**
24
18
  * Wrap leftover http(s) URLs that are not already inside <a>. OOXML hyperlinks
25
19
  * (a:hlinkClick) are preferred; this only catches display-time / unlinked URL text.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fika-editor",
3
- "version": "3.0.23",
3
+ "version": "3.0.25",
4
4
  "description": "Fika presentation editor embed bundle with a typed agentic bridge.",
5
5
  "type": "module",
6
6
  "main": "dist/embed/fika-embed.js",