@lofcz/pptist 2.0.14 → 2.0.15

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.
@@ -78,6 +78,22 @@ export declare function normalizeAudioPatch(patch: PptistAudioElementPatch): Par
78
78
  export declare function resolveShapeFormula(element: PPTShapeElement): PPTShapeElement;
79
79
  export declare function normalizeShapeElement(element?: Partial<PPTShapeElement>): PPTShapeElement;
80
80
  export declare function mergeShapeElement(base: PPTShapeElement, patch: Partial<PPTShapeElement>): PPTShapeElement;
81
+ export interface LatexGeometry {
82
+ path: string;
83
+ viewBox: [number, number];
84
+ width: number;
85
+ height: number;
86
+ }
87
+ /**
88
+ * Render a LaTeX formula to its SVG path + intrinsic box via hfmath — the EXACT
89
+ * pipeline the interactive LaTeXEditor uses (`new hfmath(latex).pathd()/box()`).
90
+ *
91
+ * The agent supplies only the `latex` string; it cannot pre-compute the SVG
92
+ * `path`. Without a path the `<svg>` renders nothing, so a "latex" element from
93
+ * the agent shows up blank. Deriving the path here makes agent-authored formulas
94
+ * render identically to ones drawn through the editor UI.
95
+ */
96
+ export declare function deriveLatexGeometry(latex: string): LatexGeometry;
81
97
  export declare function normalizeLatexElement(element: PptistLatexElementInput): PPTLatexElement;
82
98
  export declare function normalizeLineElement(element: Partial<PPTLineElement> & {
83
99
  type?: 'line';
@@ -258,7 +258,7 @@ export interface PptistLatexElementSizing {
258
258
  height?: number;
259
259
  rotate?: number;
260
260
  }
261
- export type PptistLatexElementInput = PptistLatexElementSizing & Pick<PPTLatexElement, 'latex' | 'path'> & Partial<Pick<PPTLatexElement, 'id' | 'color' | 'strokeWidth' | 'viewBox' | 'fixedRatio' | 'link' | 'name' | 'lock' | 'groupId'>>;
261
+ export type PptistLatexElementInput = PptistLatexElementSizing & Pick<PPTLatexElement, 'latex'> & Partial<Pick<PPTLatexElement, 'path' | 'id' | 'color' | 'strokeWidth' | 'viewBox' | 'fixedRatio' | 'link' | 'name' | 'lock' | 'groupId'>>;
262
262
  export type PptistLatexElementPatch = Partial<PptistLatexElementSizing & Pick<PPTLatexElement, 'latex' | 'path' | 'color' | 'strokeWidth' | 'viewBox' | 'fixedRatio' | 'link' | 'name' | 'lock' | 'groupId'>>;
263
263
  export interface PptistCreateLatexElementInput {
264
264
  slideId?: string;
@@ -5,7 +5,7 @@ import '../assets/styles/global.scss';
5
5
  import '../assets/styles/font.scss';
6
6
  import type { PptistMountOptions, PptistMountResult } from './types';
7
7
  /**
8
- * Mount PPTist into a DOM node (for sciobot-next / other React hosts).
8
+ * Mount PPTist into a DOM node (for React / other embedding hosts).
9
9
  * Vue + Pinia are bundled in the embed build — the host does not need Vue installed.
10
10
  */
11
11
  export declare function mountPptist(target: HTMLElement | string, options?: PptistMountOptions): Promise<PptistMountResult>;
@@ -24,14 +24,14 @@ export interface PptistStarterPresentationOptions {
24
24
  fontColor?: string;
25
25
  backgroundColor?: string;
26
26
  }
27
- /** Serializable deck passed between sciobot-next and PPTist. */
27
+ /** Serializable deck passed between the embedding host and PPTist. */
28
28
  export interface PptistDocument {
29
29
  title: string;
30
30
  slides: Slide[];
31
31
  theme?: Partial<SlideTheme>;
32
32
  }
33
33
  export interface PptistMountOptions {
34
- /** UI locale — same union as sciobot-next (`cs` | `en` | `sk` | `pl`). */
34
+ /** UI locale (`cs` | `en` | `sk` | `pl`). */
35
35
  locale?: Locales;
36
36
  /** Initial deck; takes precedence over `loadDocument` and the starter slide. */
37
37
  document?: PptistDocument;
@@ -2,7 +2,7 @@ import type { Locales } from './i18n-types';
2
2
  export type { Locales };
3
3
  declare global {
4
4
  interface Window {
5
- /** Set by sciobot-next (React host) before PPTist mount in embed mode */
5
+ /** Set by the embedding host (e.g. a React app) before PPTist mount in embed mode */
6
6
  __PPTIST_LOCALE__?: string;
7
7
  }
8
8
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Vue composable for i18n — mirrors sciobot-next's `useI18nContext()` API.
2
+ * Vue composable for i18n — mirrors the typesafe-i18n `useI18nContext()` API.
3
3
  * Returns reactive `{ LL, locale, setLocale }`.
4
4
  */
5
5
  export declare function useI18nContext(): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lofcz/pptist",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
4
4
  "description": "PPTist presentation editor embed bundle with a typed agentic bridge.",
5
5
  "type": "module",
6
6
  "main": "dist/embed/pptist-embed.js",