fika-editor 3.5.7 → 3.5.9

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.
@@ -4,14 +4,14 @@ export declare const loadLocaleAsync: (locale: Locales) => Promise<void>;
4
4
  export declare const loadAllLocalesAsync: () => Promise<void[]>;
5
5
  export declare const loadFormatters: (locale: Locales) => void;
6
6
  export declare const importNamespaceAsync: <Namespace extends Namespaces>(locale: Locales, namespace: Namespace) => Promise<{
7
- myna: import("./i18n-types").NamespaceMynaTranslation;
7
+ export: import("./i18n-types").NamespaceExportTranslation;
8
8
  components: import("./i18n-types").NamespaceComponentsTranslation;
9
+ myna: import("./i18n-types").NamespaceMynaTranslation;
9
10
  mobile: import("./i18n-types").NamespaceMobileTranslation;
10
- canvas: import("./i18n-types").NamespaceCanvasTranslation;
11
+ editor: import("./i18n-types").NamespaceEditorTranslation;
11
12
  configs: import("./i18n-types").NamespaceConfigsTranslation;
12
- export: import("./i18n-types").NamespaceExportTranslation;
13
13
  common: import("./i18n-types").NamespaceCommonTranslation;
14
- editor: import("./i18n-types").NamespaceEditorTranslation;
14
+ canvas: import("./i18n-types").NamespaceCanvasTranslation;
15
15
  screen: import("./i18n-types").NamespaceScreenTranslation;
16
16
  }[Namespace]>;
17
17
  export declare const loadNamespaceAsync: <Namespace extends Namespaces>(locale: Locales, namespace: Namespace) => Promise<void>;
@@ -9,14 +9,14 @@ export declare const isNamespace: (namespace: string) => namespace is Namespaces
9
9
  export declare const loadedLocales: Record<Locales, Translations>;
10
10
  export declare const loadedFormatters: Record<Locales, Formatters>;
11
11
  export declare const extendDictionary: <Base extends import("typesafe-i18n").BaseTranslation | {
12
- myna: import("./i18n-types").NamespaceMynaTranslation;
12
+ export: import("./i18n-types").NamespaceExportTranslation;
13
13
  components: import("./i18n-types").NamespaceComponentsTranslation;
14
+ myna: import("./i18n-types").NamespaceMynaTranslation;
14
15
  mobile: import("./i18n-types").NamespaceMobileTranslation;
15
- canvas: import("./i18n-types").NamespaceCanvasTranslation;
16
+ editor: import("./i18n-types").NamespaceEditorTranslation;
16
17
  configs: import("./i18n-types").NamespaceConfigsTranslation;
17
- export: import("./i18n-types").NamespaceExportTranslation;
18
18
  common: import("./i18n-types").NamespaceCommonTranslation;
19
- editor: import("./i18n-types").NamespaceEditorTranslation;
19
+ canvas: import("./i18n-types").NamespaceCanvasTranslation;
20
20
  screen: import("./i18n-types").NamespaceScreenTranslation;
21
21
  }, Translation extends Base>(base: Base, part: (Translation extends string ? string : Translation extends import("typesafe-i18n").BaseTranslation ? { [P in keyof Translation]?: Translation[P] extends infer T ? T extends Translation[P] ? T extends string ? string : T extends import("typesafe-i18n").BaseTranslation ? { [P_1 in keyof T]?: T[P_1] extends infer T_1 ? T_1 extends T[P_1] ? T_1 extends string ? string : T_1 extends import("typesafe-i18n").BaseTranslation ? { [P_2 in keyof T_1]?: T_1[P_2] extends infer T_2 ? T_2 extends T_1[P_2] ? T_2 extends string ? string : T_2 extends import("typesafe-i18n").BaseTranslation ? { [P_3 in keyof T_2]?: T_2[P_3] extends infer T_3 ? T_3 extends T_2[P_3] ? T_3 extends string ? string : T_3 extends import("typesafe-i18n").BaseTranslation ? { [P_4 in keyof T_3]?: T_3[P_4] extends infer T_4 ? T_4 extends T_3[P_4] ? T_4 extends string ? string : T_4 extends import("typesafe-i18n").BaseTranslation ? { [P_5 in keyof T_4]?: T_4[P_5] extends infer T_5 ? T_5 extends T_4[P_5] ? T_5 extends string ? string : T_5 extends import("typesafe-i18n").BaseTranslation ? { [P_6 in keyof T_5]?: T_5[P_6] extends infer T_6 ? T_6 extends T_5[P_6] ? T_6 extends string ? string : T_6 extends import("typesafe-i18n").BaseTranslation ? { [P_7 in keyof T_6]?: T_6[P_7] extends infer T_7 ? T_7 extends T_6[P_7] ? T_7 extends string ? string : T_7 extends import("typesafe-i18n").BaseTranslation ? { [P_8 in keyof T_7]?: T_7[P_8] extends infer T_8 ? T_8 extends T_7[P_8] ? T_8 extends string ? string : T_8 extends import("typesafe-i18n").BaseTranslation ? { [P_9 in keyof T_8]?: T_8[P_9] extends infer T_9 ? T_9 extends T_8[P_9] ? T_9 extends string ? string : T_9 extends import("typesafe-i18n").BaseTranslation ? { [P_10 in keyof T_9]?: /*elided*/ any; } : T_9 : never : never; } : T_8 : never : never; } : T_7 : never : never; } : T_6 : never : never; } : T_5 : never : never; } : T_4 : never : never; } : T_3 : never : never; } : T_2 : never : never; } : T_1 : never : never; } : T : never : never; } : Translation) extends infer T ? T extends (Translation extends string ? string : Translation extends import("typesafe-i18n").BaseTranslation ? { [P in keyof Translation]?: Translation[P] extends infer T ? T extends Translation[P] ? T extends string ? string : T extends import("typesafe-i18n").BaseTranslation ? { [P_1 in keyof T]?: T[P_1] extends infer T_1 ? T_1 extends T[P_1] ? T_1 extends string ? string : T_1 extends import("typesafe-i18n").BaseTranslation ? { [P_2 in keyof T_1]?: T_1[P_2] extends infer T_2 ? T_2 extends T_1[P_2] ? T_2 extends string ? string : T_2 extends import("typesafe-i18n").BaseTranslation ? { [P_3 in keyof T_2]?: T_2[P_3] extends infer T_3 ? T_3 extends T_2[P_3] ? T_3 extends string ? string : T_3 extends import("typesafe-i18n").BaseTranslation ? { [P_4 in keyof T_3]?: T_3[P_4] extends infer T_4 ? T_4 extends T_3[P_4] ? T_4 extends string ? string : T_4 extends import("typesafe-i18n").BaseTranslation ? { [P_5 in keyof T_4]?: T_4[P_5] extends infer T_5 ? T_5 extends T_4[P_5] ? T_5 extends string ? string : T_5 extends import("typesafe-i18n").BaseTranslation ? { [P_6 in keyof T_5]?: T_5[P_6] extends infer T_6 ? T_6 extends T_5[P_6] ? T_6 extends string ? string : T_6 extends import("typesafe-i18n").BaseTranslation ? { [P_7 in keyof T_6]?: T_6[P_7] extends infer T_7 ? T_7 extends T_6[P_7] ? T_7 extends string ? string : T_7 extends import("typesafe-i18n").BaseTranslation ? { [P_8 in keyof T_7]?: T_7[P_8] extends infer T_8 ? T_8 extends T_7[P_8] ? T_8 extends string ? string : T_8 extends import("typesafe-i18n").BaseTranslation ? { [P_9 in keyof T_8]?: T_8[P_9] extends infer T_9 ? T_9 extends T_8[P_9] ? T_9 extends string ? string : T_9 extends import("typesafe-i18n").BaseTranslation ? { [P_10 in keyof T_9]?: any; } : T_9 : never : never; } : T_8 : never : never; } : T_7 : never : never; } : T_6 : never : never; } : T_5 : never : never; } : T_4 : never : never; } : T_3 : never : never; } : T_2 : never : never; } : T_1 : never : never; } : T : never : never; } : Translation) ? T extends import("typesafe-i18n").BaseTranslation ? { [P in keyof T]?: T[P] extends infer T_1 ? T_1 extends T[P] ? T_1 extends import("typesafe-i18n").BaseTranslation ? { [P_1 in keyof T_1]?: T_1[P_1] extends infer T_2 ? T_2 extends T_1[P_1] ? T_2 extends import("typesafe-i18n").BaseTranslation ? { [P_2 in keyof T_2]?: T_2[P_2] extends infer T_3 ? T_3 extends T_2[P_2] ? T_3 extends import("typesafe-i18n").BaseTranslation ? { [P_3 in keyof T_3]?: T_3[P_3] extends infer T_4 ? T_4 extends T_3[P_3] ? T_4 extends import("typesafe-i18n").BaseTranslation ? { [P_4 in keyof T_4]?: T_4[P_4] extends infer T_5 ? T_5 extends T_4[P_4] ? T_5 extends import("typesafe-i18n").BaseTranslation ? { [P_5 in keyof T_5]?: T_5[P_5] extends infer T_6 ? T_6 extends T_5[P_5] ? T_6 extends import("typesafe-i18n").BaseTranslation ? { [P_6 in keyof T_6]?: T_6[P_6] extends infer T_7 ? T_7 extends T_6[P_6] ? T_7 extends import("typesafe-i18n").BaseTranslation ? { [P_7 in keyof T_7]?: T_7[P_7] extends infer T_8 ? T_8 extends T_7[P_7] ? T_8 extends import("typesafe-i18n").BaseTranslation ? { [P_8 in keyof T_8]?: T_8[P_8] extends infer T_9 ? T_9 extends T_8[P_8] ? T_9 extends import("typesafe-i18n").BaseTranslation ? { [P_9 in keyof T_9]?: T_9[P_9] extends infer T_10 ? T_10 extends T_9[P_9] ? T_10 extends import("typesafe-i18n").BaseTranslation ? { [P_10 in keyof T_10]?: /*elided*/ any; } : T_10 : never : never; } : T_9 : never : never; } : T_8 : never : never; } : T_7 : never : never; } : T_6 : never : never; } : T_5 : never : never; } : T_4 : never : never; } : T_3 : never : never; } : T_2 : never : never; } : T_1 : never : never; } : T : never : never) => Translation;
22
22
  export declare const i18nString: (locale: Locales) => TranslateByString;
@@ -15,6 +15,7 @@ export type CanvasTextPaintOptions = {
15
15
  vAlign?: TextAlignVertical;
16
16
  align?: TextAlign;
17
17
  fit?: boolean;
18
+ minFontSize?: number;
18
19
  opacity?: number;
19
20
  vertical?: boolean;
20
21
  shadow?: {
@@ -647,6 +647,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
647
647
  inset?: [number, number, number, number];
648
648
  type?: import("../types/slides").TextType;
649
649
  fixedHeight?: boolean;
650
+ minFontSize?: number;
650
651
  };
651
652
  pathFormula?: import("../types/slides").ShapePathFormulasKeys;
652
653
  keypoints?: number[];
@@ -812,6 +813,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
812
813
  textType?: import("../types/slides").TextType;
813
814
  inset?: [number, number, number, number];
814
815
  fixedHeight?: boolean;
816
+ minFontSize?: number;
815
817
  vAlign?: import("../types/slides").TextAlignVertical;
816
818
  structuredText?: {
817
819
  schemaVersion: 1;
@@ -1486,6 +1488,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
1486
1488
  inset?: [number, number, number, number];
1487
1489
  type?: import("../types/slides").TextType;
1488
1490
  fixedHeight?: boolean;
1491
+ minFontSize?: number;
1489
1492
  };
1490
1493
  pathFormula?: import("../types/slides").ShapePathFormulasKeys;
1491
1494
  keypoints?: number[];
@@ -1651,6 +1654,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
1651
1654
  textType?: import("../types/slides").TextType;
1652
1655
  inset?: [number, number, number, number];
1653
1656
  fixedHeight?: boolean;
1657
+ minFontSize?: number;
1654
1658
  vAlign?: import("../types/slides").TextAlignVertical;
1655
1659
  structuredText?: {
1656
1660
  schemaVersion: 1;
@@ -2394,6 +2398,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
2394
2398
  inset?: [number, number, number, number];
2395
2399
  type?: import("../types/slides").TextType;
2396
2400
  fixedHeight?: boolean;
2401
+ minFontSize?: number;
2397
2402
  };
2398
2403
  pathFormula?: import("../types/slides").ShapePathFormulasKeys;
2399
2404
  keypoints?: number[];
@@ -2559,6 +2564,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
2559
2564
  textType?: import("../types/slides").TextType;
2560
2565
  inset?: [number, number, number, number];
2561
2566
  fixedHeight?: boolean;
2567
+ minFontSize?: number;
2562
2568
  vAlign?: import("../types/slides").TextAlignVertical;
2563
2569
  structuredText?: {
2564
2570
  schemaVersion: 1;
@@ -3233,6 +3239,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
3233
3239
  inset?: [number, number, number, number];
3234
3240
  type?: import("../types/slides").TextType;
3235
3241
  fixedHeight?: boolean;
3242
+ minFontSize?: number;
3236
3243
  };
3237
3244
  pathFormula?: import("../types/slides").ShapePathFormulasKeys;
3238
3245
  keypoints?: number[];
@@ -3398,6 +3405,7 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
3398
3405
  textType?: import("../types/slides").TextType;
3399
3406
  inset?: [number, number, number, number];
3400
3407
  fixedHeight?: boolean;
3408
+ minFontSize?: number;
3401
3409
  vAlign?: import("../types/slides").TextAlignVertical;
3402
3410
  structuredText?: {
3403
3411
  schemaVersion: 1;
@@ -210,6 +210,8 @@ export interface PPTTextElement extends PPTBaseElement {
210
210
  textType?: TextType;
211
211
  inset?: TextInset;
212
212
  fixedHeight?: boolean;
213
+ /** Hard auto-fit floor in slide-coordinate pixels. Overflow must be resolved by layout, not smaller type. */
214
+ minFontSize?: number;
213
215
  vAlign?: TextAlignVertical;
214
216
  /** Optional structured runs retained from import (HTML remains source of truth for editing). */
215
217
  structuredText?: StructuredTextBody;
@@ -302,6 +304,8 @@ export interface ShapeText {
302
304
  type?: TextType;
303
305
  /** Lock height to the box. `false` grows the shape with the text, same as PPTTextElement. */
304
306
  fixedHeight?: boolean;
307
+ /** Hard auto-fit floor in slide-coordinate pixels. */
308
+ minFontSize?: number;
305
309
  }
306
310
  /**
307
311
  * Shape element.
@@ -329,6 +329,7 @@ export declare const rotateRectLikeElement: (element: Exclude<PPTElement, PPTLin
329
329
  textType?: import("../types/slides").TextType;
330
330
  inset?: import("../types/slides").TextInset;
331
331
  fixedHeight?: boolean;
332
+ minFontSize?: number;
332
333
  vAlign?: import("../types/slides").TextAlignVertical;
333
334
  structuredText?: import("../types/slides").StructuredTextBody;
334
335
  left: number;
@@ -184,7 +184,10 @@ export interface FitFontScaleOptions {
184
184
  letterSpacing?: number;
185
185
  /** Smallest font factor to fall back to before clipping takes over (default 0.1). */
186
186
  minScale?: number;
187
+ minFontSize?: number;
187
188
  }
189
+ /** Never make any authored run smaller than the caller's explicit floor. */
190
+ export declare function minimumTextFitScale(blocks: TextFitBlock[], minFontSize?: number): number;
188
191
  /**
189
192
  * Largest uniform font factor in `[minScale, 1]` at which `blocks` fit
190
193
  * `innerHeight`, found by binary search over pretext measurements. The factor
@@ -238,6 +241,7 @@ type FitScaleOptions = {
238
241
  locale?: string;
239
242
  /** Pre-extracted blocks (e.g. after MathLive refined math chip sizes). */
240
243
  blocks?: TextFitBlock[];
244
+ minFontSize?: number;
241
245
  };
242
246
  export declare function subscribeFitScaleChanges(listener: (elementId: string) => void): () => void;
243
247
  export declare function rememberFitScale(html: string, options: FitScaleOptions, scale: number, elementId?: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fika-editor",
3
- "version": "3.5.7",
3
+ "version": "3.5.9",
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",