fika-editor 3.6.11 → 3.6.12
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/agentic-manifest.json +30 -12
- package/dist/embed/fika-embed.js +3 -3
- package/dist/types/embed/agentic/templates.d.ts +8 -7
- package/dist/types/embed/agentic/types.d.ts +5 -5
- package/dist/types/embed/types.d.ts +3 -3
- package/dist/types/i18n/i18n-react.d.ts +10 -10
- package/dist/types/i18n/i18n-types.d.ts +6392 -6392
- package/dist/types/i18n/i18n-util.async.d.ts +5 -5
- package/dist/types/i18n/i18n-util.d.ts +5 -5
- package/dist/types/store/slides.d.ts +10 -0
- package/dist/types/types/slides.d.ts +10 -0
- package/docs/AGENTIC_BRIDGE.md +26 -1
- package/docs/EMBED.md +29 -0
- package/package.json +1 -1
- /package/dist/types/views/Myna/{workspaceLabels.d.ts → workspaceLabelGeometry.d.ts} +0 -0
|
@@ -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
|
-
|
|
8
|
-
configs: import("./i18n-types").NamespaceConfigsTranslation;
|
|
7
|
+
common: import("./i18n-types").NamespaceCommonTranslation;
|
|
9
8
|
editor: import("./i18n-types").NamespaceEditorTranslation;
|
|
10
9
|
myna: import("./i18n-types").NamespaceMynaTranslation;
|
|
11
|
-
|
|
10
|
+
export: import("./i18n-types").NamespaceExportTranslation;
|
|
12
11
|
mobile: import("./i18n-types").NamespaceMobileTranslation;
|
|
13
|
-
components: import("./i18n-types").NamespaceComponentsTranslation;
|
|
14
12
|
screen: import("./i18n-types").NamespaceScreenTranslation;
|
|
15
|
-
|
|
13
|
+
components: import("./i18n-types").NamespaceComponentsTranslation;
|
|
14
|
+
canvas: import("./i18n-types").NamespaceCanvasTranslation;
|
|
15
|
+
configs: import("./i18n-types").NamespaceConfigsTranslation;
|
|
16
16
|
}[Namespace]>;
|
|
17
17
|
export declare const loadNamespaceAsync: <Namespace extends Namespaces>(locale: Locales, namespace: Namespace) => Promise<void>;
|
|
@@ -9,15 +9,15 @@ 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
|
-
|
|
13
|
-
configs: import("./i18n-types").NamespaceConfigsTranslation;
|
|
12
|
+
common: import("./i18n-types").NamespaceCommonTranslation;
|
|
14
13
|
editor: import("./i18n-types").NamespaceEditorTranslation;
|
|
15
14
|
myna: import("./i18n-types").NamespaceMynaTranslation;
|
|
16
|
-
|
|
15
|
+
export: import("./i18n-types").NamespaceExportTranslation;
|
|
17
16
|
mobile: import("./i18n-types").NamespaceMobileTranslation;
|
|
18
|
-
components: import("./i18n-types").NamespaceComponentsTranslation;
|
|
19
17
|
screen: import("./i18n-types").NamespaceScreenTranslation;
|
|
20
|
-
|
|
18
|
+
components: import("./i18n-types").NamespaceComponentsTranslation;
|
|
19
|
+
canvas: import("./i18n-types").NamespaceCanvasTranslation;
|
|
20
|
+
configs: import("./i18n-types").NamespaceConfigsTranslation;
|
|
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;
|
|
23
23
|
export declare const i18nObject: (locale: Locales) => TranslationFunctions;
|
|
@@ -948,6 +948,11 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
|
|
|
948
948
|
id: string;
|
|
949
949
|
cover: string;
|
|
950
950
|
origin?: string;
|
|
951
|
+
description?: string;
|
|
952
|
+
categories?: string[];
|
|
953
|
+
tags?: string[];
|
|
954
|
+
useWhen?: string;
|
|
955
|
+
avoidWhen?: string;
|
|
951
956
|
}[];
|
|
952
957
|
importedTemplates: {
|
|
953
958
|
name: string;
|
|
@@ -2705,6 +2710,11 @@ export declare const useSlidesStore: import("zustand").UseBoundStore<Omit<import
|
|
|
2705
2710
|
id: string;
|
|
2706
2711
|
cover: string;
|
|
2707
2712
|
origin?: string;
|
|
2713
|
+
description?: string;
|
|
2714
|
+
categories?: string[];
|
|
2715
|
+
tags?: string[];
|
|
2716
|
+
useWhen?: string;
|
|
2717
|
+
avoidWhen?: string;
|
|
2708
2718
|
}[];
|
|
2709
2719
|
importedTemplates: {
|
|
2710
2720
|
name: string;
|
|
@@ -655,6 +655,16 @@ export interface SlideTemplate {
|
|
|
655
655
|
id: string;
|
|
656
656
|
cover: string;
|
|
657
657
|
origin?: string;
|
|
658
|
+
/** The presentation's purpose and intended audience, in the host's locale. */
|
|
659
|
+
description?: string;
|
|
660
|
+
/** Presentation classes such as report, proposal, portfolio, or lesson. */
|
|
661
|
+
categories?: string[];
|
|
662
|
+
/** Specific tasks, audiences, and visual structures supported by this template. */
|
|
663
|
+
tags?: string[];
|
|
664
|
+
/** Guidance for an author deciding whether to select this template. */
|
|
665
|
+
useWhen?: string;
|
|
666
|
+
/** Conditions under which another presentation structure is a better fit. */
|
|
667
|
+
avoidWhen?: string;
|
|
658
668
|
}
|
|
659
669
|
/** Theme pack imported from a local .json / .fika file */
|
|
660
670
|
export interface ImportedSlideTemplate {
|
package/docs/AGENTIC_BRIDGE.md
CHANGED
|
@@ -33,6 +33,7 @@ controller.describe(commandType)
|
|
|
33
33
|
controller.guides(guideId?)
|
|
34
34
|
|
|
35
35
|
controller.deck.*
|
|
36
|
+
controller.templates.*
|
|
36
37
|
controller.slides.*
|
|
37
38
|
controller.elements.*
|
|
38
39
|
controller.element.*
|
|
@@ -52,6 +53,30 @@ controller.export.*
|
|
|
52
53
|
|
|
53
54
|
Use domain wrappers for common flows. Use `execute()` for command-only operations that are registered but do not yet have a wrapper method.
|
|
54
55
|
|
|
56
|
+
## Template discovery
|
|
57
|
+
|
|
58
|
+
`controller.templates.catalog()` synchronously returns all registered template
|
|
59
|
+
summaries. Pass the same optional query as a command payload to get the list in
|
|
60
|
+
`result.data` on success.
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
const query = { category: 'Report', tags: ['quarterly', 'finance'] }
|
|
64
|
+
const matches = controller.templates.catalog(query)
|
|
65
|
+
const result = await controller.execute({ type: 'templates.catalog', payload: query })
|
|
66
|
+
if (matches.length) {
|
|
67
|
+
const slides = await controller.templates.slidesCatalog(matches[0].id)
|
|
68
|
+
if (slides.ok) console.log(slides.data?.byType.cover)
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
A template must declare the requested category and every requested tag.
|
|
73
|
+
Comparisons match whole values after trimming and ignoring case. Blank criteria
|
|
74
|
+
are ignored. Each summary includes `id`, `name` and `cover`, plus any supplied
|
|
75
|
+
`origin`, `description`, `categories`, `tags`, `useWhen` and `avoidWhen`.
|
|
76
|
+
Discovery leaves slide payloads unloaded. To inspect a template's slides and
|
|
77
|
+
their insertion slugs, call `templates.slidesCatalog` with its id. An empty
|
|
78
|
+
unfiltered catalog means the host registered no loaders.
|
|
79
|
+
|
|
55
80
|
## API Naming
|
|
56
81
|
|
|
57
82
|
Command names use `domain.action` with lower-camel-case actions:
|
|
@@ -60,7 +85,7 @@ Command names use `domain.action` with lower-camel-case actions:
|
|
|
60
85
|
type FikaCommandType = `${string}.${string}`
|
|
61
86
|
```
|
|
62
87
|
|
|
63
|
-
Canonical domains
|
|
88
|
+
Canonical domains include `deck`, `templates`, `import`, `export`, `slides`, `elements`, `animations`, `tables`, `charts`, `notes`, `sections`, `search`, `history`, and `view`.
|
|
64
89
|
|
|
65
90
|
Naming rules:
|
|
66
91
|
|
package/docs/EMBED.md
CHANGED
|
@@ -521,6 +521,35 @@ through storage, static rendering, and editing.
|
|
|
521
521
|
Pass `assetBaseUrl` to `mountFika()` to resolve lazy editor CSS under the same
|
|
522
522
|
asset directory as the embed stylesheet.
|
|
523
523
|
|
|
524
|
+
### Presentation template catalog
|
|
525
|
+
|
|
526
|
+
Register picker entries in `templates` and lazy loaders in `templateLoaders`.
|
|
527
|
+
Use the same id in both. The agent catalog lists entries with loaders in picker
|
|
528
|
+
order, then any remaining loader ids. A loader can resolve to a slide array or
|
|
529
|
+
to a template payload such as `{ slides, theme }`.
|
|
530
|
+
|
|
531
|
+
```ts
|
|
532
|
+
import { mountFika, type FikaTemplateLoader } from 'fika-editor/embed'
|
|
533
|
+
|
|
534
|
+
async function mountReviewEditor(host: HTMLElement, loadReview: FikaTemplateLoader) {
|
|
535
|
+
return mountFika(host, {
|
|
536
|
+
templates: [{
|
|
537
|
+
id: 'review', name: 'Quarterly review', cover: '/covers/review.png',
|
|
538
|
+
description: 'A results briefing for the board.',
|
|
539
|
+
categories: ['Report'], tags: ['quarterly', 'finance'],
|
|
540
|
+
useWhen: 'Compare results against targets.',
|
|
541
|
+
avoidWhen: 'Introducing a product for the first time.',
|
|
542
|
+
}],
|
|
543
|
+
templateLoaders: { review: loadReview },
|
|
544
|
+
})
|
|
545
|
+
}
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
The five discovery fields are optional. Entries with just `id`, `name` and
|
|
549
|
+
`cover` still work, as does optional `origin`. A loader registered on its own
|
|
550
|
+
appears with its id as the name and an empty cover. Both catalog APIs read this
|
|
551
|
+
metadata without invoking loaders. See [template discovery](./AGENTIC_BRIDGE.md#template-discovery).
|
|
552
|
+
|
|
524
553
|
### Host-configured slide designs
|
|
525
554
|
|
|
526
555
|
Pass `designThemes` to replace the built-in design cards (not editor chrome).
|
package/package.json
CHANGED
|
File without changes
|