@lofcz/pptist 2.0.7 → 2.0.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.
@@ -1,4 +1,7 @@
1
- export declare const FONTS: {
2
- label: import("typesafe-i18n").LocalizedString;
1
+ export interface FontOption {
2
+ label: string;
3
3
  value: string;
4
- }[];
4
+ }
5
+ export declare const EASTERN_EXTRAS_FONT_VALUES: string[];
6
+ export declare function getFonts(): FontOption[];
7
+ export declare function useFonts(): import("vue").ComputedRef<FontOption[]>;
@@ -0,0 +1,28 @@
1
+ import type { TranslationFunctions } from '../i18n/i18n-types';
2
+ import type { Slide, SlideTheme } from '../types/slides';
3
+ export interface StarterPresentationOptions {
4
+ title?: string;
5
+ titlePlaceholder?: string;
6
+ subtitlePlaceholder?: string;
7
+ bodyPlaceholder?: string;
8
+ /** Title-slide (cover) title size. PowerPoint default ≈ 40. */
9
+ titleFontSize?: number;
10
+ /** Title-slide (cover) subtitle size. PowerPoint default ≈ 20. */
11
+ subtitleFontSize?: number;
12
+ /** Content-slide title size. PowerPoint default ≈ 28. */
13
+ contentTitleFontSize?: number;
14
+ /** Content-slide body (level 1) size. PowerPoint default ≈ 20. */
15
+ bodyFontSize?: number;
16
+ placeholderColor?: string;
17
+ fontName?: string;
18
+ fontColor?: string;
19
+ backgroundColor?: string;
20
+ }
21
+ export interface StarterPresentationDocument {
22
+ title: string;
23
+ slides: Slide[];
24
+ theme?: Partial<SlideTheme>;
25
+ }
26
+ export declare const buildTitleSlide: (LL: TranslationFunctions, options?: StarterPresentationOptions) => Slide;
27
+ export declare const buildContentSlide: (LL: TranslationFunctions, options?: StarterPresentationOptions) => Slide;
28
+ export declare const buildStarterPresentation: (LL: TranslationFunctions, options?: StarterPresentationOptions) => StarterPresentationDocument;
@@ -0,0 +1 @@
1
+ export declare const resolveTemplateAssetUrl: (asset: string) => string;
@@ -0,0 +1,20 @@
1
+ import type { TranslationFunctions } from '../i18n/i18n-types';
2
+ import type { Slide, SlideTheme } from '../types/slides';
3
+ export type BuiltInTemplateId = 'template_1' | 'template_2' | 'template_3' | 'template_4' | 'template_5' | 'template_6' | 'template_7' | 'template_8';
4
+ export interface TemplatePayload {
5
+ title?: string;
6
+ width?: number;
7
+ height?: number;
8
+ slides: Slide[];
9
+ theme?: Partial<SlideTheme>;
10
+ }
11
+ export type TemplatePayloadLoader = () => Promise<TemplatePayload | Slide[]>;
12
+ export interface TemplateNormalizationConfig {
13
+ stripFontFamiliesWhenExtrasDisabled: string[];
14
+ }
15
+ export declare const setCustomTemplateLoaders: (loaders?: Record<string, TemplatePayloadLoader>) => void;
16
+ export declare const TEMPLATE_NORMALIZATION_CONFIG: TemplateNormalizationConfig;
17
+ export declare const isBuiltInTemplateId: (id: string) => id is BuiltInTemplateId;
18
+ export declare const loadBuiltInTemplate: (id: string) => Promise<TemplatePayload | null>;
19
+ export declare const loadConfiguredTemplate: (id: string) => Promise<Slide[] | TemplatePayload | null>;
20
+ export declare const normalizeTemplatePayload: (payload: TemplatePayload | Slide[], LL: TranslationFunctions, config?: TemplateNormalizationConfig) => TemplatePayload;
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Compositional slide layouts for the agentic bridge.
3
+ *
4
+ * A "layout" is a named, pre-composed slide recipe (title, bullets, two-column,
5
+ * image+text, big stat, quote, chart, comparison, …). The agent picks a layout
6
+ * by id and fills a few content *slots*; the builder here lays out themed,
7
+ * contrast-safe elements using the active style preset's role tokens and a
8
+ * fixed margin grid. This is the preferred way to add slides — it removes the
9
+ * need to hand-place boxes or hand-pick colors/sizes, and it never emits raw
10
+ * authoring HTML the agent has to reason about.
11
+ *
12
+ * Builders are deterministic and pure (no async, no store access): given a
13
+ * viewport, a style preset, and slots, they return a `Partial<Slide>` that the
14
+ * bridge normalizes and inserts. Text content is rendered to the small, safe
15
+ * HTML subset PPTist stores (`<p>/<ul>/<li>/<span style>` with inline size and
16
+ * color), with light inline markdown (`**bold**`, `_italic_`, `` `code` ``).
17
+ */
18
+ import type { PPTChartElement, PPTImageElement, PPTShapeElement, PPTTableElement, PPTTextElement, Slide } from '../../types/slides';
19
+ import type { PptistStylePreset } from './styles';
20
+ /**
21
+ * Un-normalized element inputs the builder emits. Typed as a discriminated
22
+ * union of per-type partials so the engine's required fields are still checked,
23
+ * while letting the bridge's `normalizeElement` fill ids/defaults on insert.
24
+ */
25
+ export type PptistLayoutElementInput = (Partial<PPTTextElement> & {
26
+ type: 'text';
27
+ }) | (Partial<PPTShapeElement> & {
28
+ type: 'shape';
29
+ }) | (Partial<PPTImageElement> & {
30
+ type: 'image';
31
+ }) | (Partial<PPTChartElement> & {
32
+ type: 'chart';
33
+ }) | (Partial<PPTTableElement> & {
34
+ type: 'table';
35
+ });
36
+ export type PptistLayoutBackgroundMode = 'auto' | 'feature' | 'plain';
37
+ export interface PptistLayoutSlotDef {
38
+ name: string;
39
+ /** Coarse shape of the value the agent should pass for this slot. */
40
+ type: 'text' | 'bullets' | 'image' | 'chart' | 'stats' | 'rows';
41
+ required: boolean;
42
+ description: string;
43
+ }
44
+ export interface PptistLayout {
45
+ id: string;
46
+ label: string;
47
+ /** One-line catalog description of the composition (what it looks like). */
48
+ summary: string;
49
+ /** When to reach for it. */
50
+ bestFor: string;
51
+ /** Whether it defaults to a feature (dark) background. */
52
+ feature: boolean;
53
+ slots: PptistLayoutSlotDef[];
54
+ }
55
+ type Slots = Record<string, unknown>;
56
+ export declare const PPTX_LAYOUTS: PptistLayout[];
57
+ export declare function listLayouts(): PptistLayout[];
58
+ export interface PptistLayoutBuildResult {
59
+ slide: Partial<Slide>;
60
+ warnings: string[];
61
+ }
62
+ /**
63
+ * Build a themed slide from a layout id + content slots. Pure and deterministic:
64
+ * returns a `Partial<Slide>` (background + un-normalized elements) plus any
65
+ * non-fatal warnings (e.g. a missing optional image). Throws on missing
66
+ * required slots or an unknown layout.
67
+ */
68
+ export declare function buildLayoutSlide(layoutId: string, slots: Slots, preset: PptistStylePreset, viewport: {
69
+ width: number;
70
+ height: number;
71
+ }, backgroundMode?: PptistLayoutBackgroundMode): PptistLayoutBuildResult;
72
+ export {};
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Style presets for the agentic bridge.
3
+ *
4
+ * A "style" is a small, curated bundle of design tokens — a color palette with
5
+ * named *roles* (background / title / body / accent / …), a heading+body font
6
+ * pairing, and a typographic size scale. Presets are hand-tuned so every
7
+ * role-pair clears WCAG AA contrast, which lets the agent build good-looking,
8
+ * legible slides without hand-picking colors or font sizes.
9
+ *
10
+ * The agent flow is:
11
+ * 1. `styles.catalog` → see the available presets.
12
+ * 2. `deck.applyStyle` → pick ONE; it sets the deck theme + records `styleId`.
13
+ * 3. `slides.createFromLayout` → layouts read the active preset's role tokens
14
+ * to place themed, contrast-safe elements.
15
+ *
16
+ * Only the preset *id* is persisted on the deck theme (`theme.styleId`); the
17
+ * rich token data lives here in code, so it always renders deterministically
18
+ * and survives document serialization without bloating the saved deck.
19
+ */
20
+ import type { SlideTheme } from '../../types/slides';
21
+ /** Named color roles. Every role pairs with a readable foreground/background. */
22
+ export interface PptistStylePalette {
23
+ /** Default slide background (content slides). */
24
+ background: string;
25
+ /** Subtle panel/card fill that sits on `background`. */
26
+ surface: string;
27
+ /** Heading/title text on `background`/`surface`. */
28
+ title: string;
29
+ /** Body/paragraph text on `background`/`surface`. */
30
+ body: string;
31
+ /** De-emphasized text (captions, labels) on `background`/`surface`. */
32
+ muted: string;
33
+ /** Hairline rules, dividers, and thin borders. */
34
+ rule: string;
35
+ /** Primary accent (bars, highlights, key numbers). */
36
+ accent: string;
37
+ /** Secondary accent for variety (second series, alt highlight). */
38
+ accent2: string;
39
+ /** Tinted accent wash for soft panels/bands. */
40
+ accentSoft: string;
41
+ /** Readable foreground when placed on `accent`. */
42
+ onAccent: string;
43
+ /** Feature background for title/section/closing slides (usually dark). */
44
+ featureBackground: string;
45
+ /** Title text on `featureBackground`. */
46
+ featureTitle: string;
47
+ /** Body/subtitle text on `featureBackground`. */
48
+ featureBody: string;
49
+ /** Accent that pops on `featureBackground`. */
50
+ featureAccent: string;
51
+ }
52
+ /** Typographic size scale in px (canvas units), largest → smallest. */
53
+ export interface PptistStyleScale {
54
+ /** Hero/cover title. */
55
+ display: number;
56
+ /** Standard slide title. */
57
+ title: number;
58
+ /** Section header / column heading. */
59
+ sectionHeader: number;
60
+ /** Body copy and bullets. */
61
+ body: number;
62
+ /** Eyebrow labels, kickers, tags. */
63
+ label: number;
64
+ /** Captions, footnotes, source lines. */
65
+ caption: number;
66
+ }
67
+ export interface PptistStyleFonts {
68
+ /** Heading/display font family. */
69
+ heading: string;
70
+ /** Body/paragraph font family. */
71
+ body: string;
72
+ }
73
+ export interface PptistStylePreset {
74
+ id: string;
75
+ /** Human label shown in the catalog. */
76
+ label: string;
77
+ /** One-line description of the look & best use. */
78
+ description: string;
79
+ fonts: PptistStyleFonts;
80
+ palette: PptistStylePalette;
81
+ scale: PptistStyleScale;
82
+ /** Ordered chart series colors derived from the palette. */
83
+ chartColors: string[];
84
+ }
85
+ /** Compact catalog entry (what `styles.catalog` returns to the agent). */
86
+ export interface PptistStyleSummary {
87
+ id: string;
88
+ label: string;
89
+ description: string;
90
+ fonts: PptistStyleFonts;
91
+ /** A few representative colors so the agent can picture the look. */
92
+ preview: {
93
+ background: string;
94
+ title: string;
95
+ body: string;
96
+ accent: string;
97
+ featureBackground: string;
98
+ };
99
+ }
100
+ export declare const DEFAULT_STYLE_ID = "academic";
101
+ export declare const PPTX_STYLE_PRESETS: PptistStylePreset[];
102
+ export declare function getStylePreset(id?: string | null): PptistStylePreset | undefined;
103
+ /** Resolve a usable preset, falling back to the default when id is missing/unknown. */
104
+ export declare function resolveStylePreset(id?: string | null): PptistStylePreset;
105
+ export declare function listStylePresets(): PptistStyleSummary[];
106
+ /**
107
+ * Build the deck-theme patch for a preset. Sets the inheritable defaults that
108
+ * manually-created elements pick up (`fontColor`, `fontName`, `backgroundColor`,
109
+ * `themeColors`) and records `styleId` so layouts can resolve the full preset.
110
+ */
111
+ export declare function styleThemePatch(preset: PptistStylePreset): Partial<SlideTheme>;
@@ -2,8 +2,12 @@ import type { Locales } from '../../i18n/locale';
2
2
  import type { ShapeCategoryKey, ShapePoolItem } from '../../configs/shapes';
3
3
  import type { Broken2LineDirection, ChartData, ChartOptions, ChartType, Gradient, LinePoint, LineStyleType, Note, NoteReply, PPTAnimation, PPTAudioElement, PPTChartElement, PPTElement, PPTElementLink, PPTElementOutline, PPTElementShadow, PPTImageElement, PPTLatexElement, PPTLineElement, PPTShapeElement, PPTTableElement, PPTTextElement, PPTVideoElement, ShapeText, Slide, SlideBackground, SlideTemplate, SlideTheme, TableCell, TableCellStyle, TextAlign, TurningMode } from '../../types/slides';
4
4
  import type { PptistDocument } from '../types';
5
+ import type { PptistStyleSummary } from './styles';
6
+ import type { PptistLayout, PptistLayoutBackgroundMode } from './layouts';
5
7
  import type { PptistAgenticDocs, PptistCommandDescription, PptistDesignGuide, PptistDomainSummary } from './manifestDocs';
6
8
  export type { PptistAgenticDocs, PptistCommandDescription, PptistCommandDoc, PptistDesignGuide, PptistDesignSystem, PptistDocParam, PptistDomainDoc, PptistDomainSummary, } from './manifestDocs';
9
+ export type { PptistStylePreset, PptistStylePalette, PptistStyleScale, PptistStyleFonts, PptistStyleSummary, } from './styles';
10
+ export type { PptistLayout, PptistLayoutSlotDef, PptistLayoutBackgroundMode, } from './layouts';
7
11
  export type PptistKnownCommandType = keyof PptistCommandPayloadMap;
8
12
  export type PptistCommandType = PptistKnownCommandType | (string & {});
9
13
  export interface PptistDeckViewport {
@@ -420,6 +424,46 @@ export interface PptistElementFlipInput {
420
424
  flipH?: boolean;
421
425
  flipV?: boolean;
422
426
  }
427
+ export interface PptistApplyStyleOptions {
428
+ /** Restyle existing slide content (fonts/colors) to match the preset too. */
429
+ applyToSlides?: boolean;
430
+ }
431
+ export interface PptistApplyStyleResult {
432
+ styleId: string;
433
+ theme: SlideTheme;
434
+ }
435
+ export interface PptistCreateFromLayoutInput {
436
+ /** Layout id from `layouts.catalog` (e.g. `bullets`, `twoColumn`, `chart`). */
437
+ layout: string;
438
+ /** Content slots for the layout. Shapes vary per layout (see its `slots`). */
439
+ slots?: Record<string, unknown>;
440
+ /** Style preset id to use; defaults to the deck's active style. */
441
+ style?: string;
442
+ /** Insertion index (defaults to the end). */
443
+ index?: number;
444
+ /** Select the new slide after creating it (default true). */
445
+ select?: boolean;
446
+ /** Background override: `auto` (layout default), `feature` (dark), `plain`. */
447
+ background?: PptistLayoutBackgroundMode;
448
+ }
449
+ export interface PptistCreateFromLayoutResult {
450
+ slideId: string;
451
+ elementIds: string[];
452
+ layout: string;
453
+ styleId: string;
454
+ }
455
+ export interface PptistAgentStylesApi {
456
+ /** List the style presets (id, label, fonts, preview colors). */
457
+ catalog(): PptistStyleSummary[];
458
+ /** Apply a preset to the deck theme (and optionally restyle existing slides). */
459
+ apply(style: string, options?: PptistApplyStyleOptions, meta?: PptistCommandMeta): Promise<PptistCommandResult<PptistApplyStyleResult>>;
460
+ }
461
+ export interface PptistAgentLayoutsApi {
462
+ /** List the compositional layouts with their content slots. */
463
+ catalog(): PptistLayout[];
464
+ /** Create a new themed slide from a layout id + slots. */
465
+ createSlide(input: PptistCreateFromLayoutInput, meta?: PptistCommandMeta): Promise<PptistCommandResult<PptistCreateFromLayoutResult>>;
466
+ }
423
467
  export interface PptistAgentDeckApi {
424
468
  get(): PptistDeckDocument;
425
469
  set(document: PptistDeckInput, meta?: PptistCommandMeta): Promise<PptistCommandResult<PptistDeckDocument>>;
@@ -429,6 +473,7 @@ export interface PptistAgentDeckApi {
429
473
  }>>;
430
474
  getTheme(): SlideTheme;
431
475
  setTheme(theme: PptistSlideThemePatch, meta?: PptistCommandMeta): Promise<PptistCommandResult<SlideTheme>>;
476
+ applyStyle(style: string, options?: PptistApplyStyleOptions, meta?: PptistCommandMeta): Promise<PptistCommandResult<PptistApplyStyleResult>>;
432
477
  applyTheme(theme: PptistSlideThemePatch, options?: PptistApplyThemeOptions, meta?: PptistCommandMeta): Promise<PptistCommandResult<SlideTheme>>;
433
478
  extractTheme(options?: PptistThemeExtractionOptions): SlideTheme;
434
479
  setViewport(viewport: {
@@ -443,6 +488,7 @@ export interface PptistAgentSlidesApi {
443
488
  current(): Slide | null;
444
489
  read(slideIdOrIndex?: PptistSlideReference, meta?: PptistCommandMeta): Promise<PptistCommandResult<Slide | null>>;
445
490
  create(input?: PptistCreateSlideInput, meta?: PptistCommandMeta): Promise<PptistCommandResult<Slide>>;
491
+ createFromLayout(input: PptistCreateFromLayoutInput, meta?: PptistCommandMeta): Promise<PptistCommandResult<PptistCreateFromLayoutResult>>;
446
492
  insert(input: PptistInsertSlidesInput, meta?: PptistCommandMeta): Promise<PptistCommandResult<PptistInsertSlidesResult>>;
447
493
  update(slideId: string, patch: Partial<Slide>, meta?: PptistCommandMeta): Promise<PptistCommandResult<Slide>>;
448
494
  delete(slideId: string | string[], meta?: PptistCommandMeta): Promise<PptistCommandResult<PptistDeleteSlidesResult>>;
@@ -982,6 +1028,8 @@ export interface PptistAgentApi {
982
1028
  guides(guideId?: string): PptistDesignGuide[] | PptistDesignGuide | null;
983
1029
  deck: PptistAgentDeckApi;
984
1030
  slides: PptistAgentSlidesApi;
1031
+ styles: PptistAgentStylesApi;
1032
+ layouts: PptistAgentLayoutsApi;
985
1033
  elements: PptistAgentElementsApi;
986
1034
  text: PptistAgentTextApi;
987
1035
  shapes: PptistAgentShapesApi;
@@ -1019,6 +1067,10 @@ export interface PptistCommandPayloadMap {
1019
1067
  theme: PptistSlideThemePatch | Partial<SlideTheme>;
1020
1068
  options?: PptistApplyThemeOptions;
1021
1069
  };
1070
+ 'deck.applyStyle': {
1071
+ style: string;
1072
+ applyToSlides?: boolean;
1073
+ };
1022
1074
  'deck.extractTheme': {
1023
1075
  options?: PptistThemeExtractionOptions;
1024
1076
  } | undefined;
@@ -1029,6 +1081,8 @@ export interface PptistCommandPayloadMap {
1029
1081
  'deck.setTemplates': {
1030
1082
  templates: SlideTemplate[];
1031
1083
  };
1084
+ 'styles.catalog': undefined;
1085
+ 'layouts.catalog': undefined;
1032
1086
  'import.json': PptistDocumentImportPayload;
1033
1087
  'import.pptist': PptistDocumentImportPayload;
1034
1088
  'import.pptxSafe': PptistDocumentImportPayload;
@@ -1043,6 +1097,7 @@ export interface PptistCommandPayloadMap {
1043
1097
  slideIdOrIndex?: PptistSlideReference;
1044
1098
  } | undefined;
1045
1099
  'slides.create': PptistCreateSlideInput | undefined;
1100
+ 'slides.createFromLayout': PptistCreateFromLayoutInput;
1046
1101
  'slides.insert': PptistInsertSlidesInput;
1047
1102
  'slides.update': {
1048
1103
  slideId: string;
@@ -1643,9 +1698,12 @@ export interface PptistCommandResultDataMap {
1643
1698
  'deck.getTheme': SlideTheme;
1644
1699
  'deck.setTheme': SlideTheme;
1645
1700
  'deck.applyTheme': SlideTheme;
1701
+ 'deck.applyStyle': PptistApplyStyleResult;
1646
1702
  'deck.extractTheme': SlideTheme;
1647
1703
  'deck.setViewport': PptistBridgeState;
1648
1704
  'deck.setTemplates': SlideTemplate[];
1705
+ 'styles.catalog': PptistStyleSummary[];
1706
+ 'layouts.catalog': PptistLayout[];
1649
1707
  'import.json': PptistDeckDocument;
1650
1708
  'import.pptist': PptistDeckDocument;
1651
1709
  'import.pptxSafe': PptistDeckDocument;
@@ -1655,6 +1713,7 @@ export interface PptistCommandResultDataMap {
1655
1713
  'slides.current': Slide | null;
1656
1714
  'slides.read': Slide | null;
1657
1715
  'slides.create': Slide;
1716
+ 'slides.createFromLayout': PptistCreateFromLayoutResult;
1658
1717
  'slides.insert': PptistInsertSlidesResult;
1659
1718
  'slides.update': Slide;
1660
1719
  'slides.delete': PptistDeleteSlidesResult;
@@ -1,5 +1,5 @@
1
1
  export { mountPptist, unmountPptist } from './mount';
2
- export type { PptistController, PptistDocument, PptistMountOptions, PptistMountResult, } from './types';
2
+ export type { PptistController, PptistDocument, PptistMountOptions, PptistMountResult, PptistDocumentLoader, PptistStarterPresentationOptions, PptistTemplateLoader, PptistTemplatePayload, } from './types';
3
3
  export type * from './agentic/types';
4
4
  export type { Locales as PptistLocales } from '../i18n/locale';
5
5
  export type { ChartData, ChartOptions, ChartType, Note, NoteReply, PPTAnimation, PPTAudioElement, PPTChartElement, PPTElement, PPTElementLink, PPTImageElement, PPTLatexElement, PPTLineElement, PPTShapeElement, PPTTableElement, PPTTextElement, PPTVideoElement, ShapeText, Slide, SlideBackground, SlideTemplate, SlideTheme, TableCell, TableCellStyle, TextAlign, TurningMode, } from '../types/slides';
@@ -1,6 +1,29 @@
1
1
  import type { Locales } from '../i18n/locale';
2
2
  import type { Slide, SlideTheme, SlideTemplate } from '../types/slides';
3
3
  import type { PptistAgentApi, PptistSlideReference } from './agentic/types';
4
+ export interface PptistTemplatePayload {
5
+ title?: string;
6
+ width?: number;
7
+ height?: number;
8
+ slides: Slide[];
9
+ theme?: Partial<SlideTheme>;
10
+ }
11
+ export type PptistTemplateLoader = () => Promise<PptistTemplatePayload | Slide[]>;
12
+ export type PptistDocumentLoader = () => Promise<PptistDocument | null | undefined>;
13
+ export interface PptistStarterPresentationOptions {
14
+ title?: string;
15
+ titlePlaceholder?: string;
16
+ subtitlePlaceholder?: string;
17
+ bodyPlaceholder?: string;
18
+ titleFontSize?: number;
19
+ subtitleFontSize?: number;
20
+ contentTitleFontSize?: number;
21
+ bodyFontSize?: number;
22
+ placeholderColor?: string;
23
+ fontName?: string;
24
+ fontColor?: string;
25
+ backgroundColor?: string;
26
+ }
4
27
  /** Serializable deck passed between sciobot-next and PPTist. */
5
28
  export interface PptistDocument {
6
29
  title: string;
@@ -10,21 +33,24 @@ export interface PptistDocument {
10
33
  export interface PptistMountOptions {
11
34
  /** UI locale — same union as sciobot-next (`cs` | `en` | `sk` | `pl`). */
12
35
  locale?: Locales;
13
- /** Initial deck; when omitted, mock slides are loaded if `loadMockOnEmpty` is true. */
36
+ /** Initial deck; takes precedence over `loadDocument` and the starter slide. */
14
37
  document?: PptistDocument;
15
- /** When no `document`, fetch `mocks/slides.json` from `assetBaseUrl` (default: `/`). */
38
+ /** Optional async document loader for hosts that resolve a deck from the current URL/session. */
39
+ loadDocument?: PptistDocumentLoader;
40
+ /** Legacy demo behavior: when explicitly true, load `mocks/slides.json` instead of the starter slide. */
16
41
  loadMockOnEmpty?: boolean;
17
- /**
18
- * Base URL for runtime assets (template covers, mocks).
19
- * Dev: `http://127.0.0.1:5173` while PPTist dev server runs, or sciobot proxy path.
20
- */
42
+ /** Customize the default one-slide starter deck used when no existing document is loaded. */
43
+ starterPresentation?: PptistStarterPresentationOptions;
44
+ /** Base URL for runtime image/font assets and fallback mock decks. */
21
45
  assetBaseUrl?: string;
22
46
  /**
23
- * Style/template catalog shown in the design picker. Each entry's `id` maps to
24
- * a `mocks/<id>.json` payload resolved against `assetBaseUrl`. Omit to use the
25
- * bundled defaults (which fall back to the demo deck when a file is missing).
47
+ * Style/template catalog shown in the design picker. Built-in template ids are
48
+ * loaded from lazy bundled JSON chunks. Custom ids can be resolved with
49
+ * `templateLoaders`, or as a fallback from `mocks/<id>.json` at `assetBaseUrl`.
26
50
  */
27
51
  templates?: SlideTemplate[];
52
+ /** Optional custom template payload loaders keyed by `templates[].id`. */
53
+ templateLoaders?: Record<string, PptistTemplateLoader>;
28
54
  /** Fired when title, slides, or theme change (debounced). */
29
55
  onChange?: (document: PptistDocument) => void;
30
56
  onChangeDebounceMs?: number;
@@ -2976,7 +2976,7 @@ export type NamespaceEditorTranslation = {
2976
2976
  */
2977
2977
  exportFiles: string;
2978
2978
  /**
2979
- * R​e​s​e​t​ sl​i​de​s
2979
+ * N​e​w​ ​p​r​e​s​e​n​t​at​i​on
2980
2980
  */
2981
2981
  resetSlides: string;
2982
2982
  /**
@@ -3495,6 +3495,18 @@ export type NamespaceEditorTranslation = {
3495
3495
  * U​n​t​i​t​l​e​d​ ​p​r​e​s​e​n​t​a​t​i​o​n
3496
3496
  */
3497
3497
  untitled: string;
3498
+ /**
3499
+ * C​l​i​c​k​ ​t​o​ ​a​d​d​ ​t​i​t​l​e
3500
+ */
3501
+ clickToAddTitle: string;
3502
+ /**
3503
+ * C​l​i​c​k​ ​t​o​ ​a​d​d​ ​s​u​b​t​i​t​l​e
3504
+ */
3505
+ clickToAddSubtitle: string;
3506
+ /**
3507
+ * C​l​i​c​k​ ​t​o​ ​a​d​d​ ​t​e​x​t
3508
+ */
3509
+ clickToAddText: string;
3498
3510
  };
3499
3511
  templates: {
3500
3512
  /**
@@ -3588,14 +3600,63 @@ export type NamespaceEditorTranslation = {
3588
3600
  * T​e​m​p​l​a​t​e​ ​c​o​v​e​r​ ​s​u​b​t​i​t​l​e
3589
3601
  */
3590
3602
  coverSubtitle: string;
3603
+ /**
3604
+ * B​r​i​e​f​ ​p​r​e​s​e​n​t​a​t​i​o​n​ ​s​u​m​m​a​r​y
3605
+ */
3606
+ coverDescription: string;
3607
+ /**
3608
+ * P​r​e​s​e​n​t​e​r​:​ ​X​X​X
3609
+ */
3610
+ presenter: string;
3611
+ /**
3612
+ * D​a​t​e​:​ ​X​X​X
3613
+ */
3614
+ date: string;
3615
+ /**
3616
+ * T​i​m​e​:​ ​X​X​X
3617
+ */
3618
+ time: string;
3619
+ /**
3620
+ * B​u​s​i​n​e​s​s​ ​r​e​p​o​r​t​ ​|​ ​W​o​r​k​ ​s​u​m​m​a​r​y​ ​|​ ​W​o​r​k​ ​p​l​a​n
3621
+ */
3622
+ businessReport: string;
3591
3623
  /**
3592
3624
  * C​o​n​t​e​n​t​s
3593
3625
  */
3594
3626
  contentsTitle: string;
3627
+ /**
3628
+ * S​e​c​t​i​o​n​ ​{​i​n​d​e​x​}
3629
+ * @param {unknown} index
3630
+ */
3631
+ contentsItem: RequiredParams<'index'>;
3595
3632
  /**
3596
3633
  * S​e​c​t​i​o​n​ ​t​i​t​l​e
3597
3634
  */
3598
3635
  sectionTitle: string;
3636
+ /**
3637
+ * B​r​i​e​f​ ​s​e​c​t​i​o​n​ ​i​n​t​r​o​d​u​c​t​i​o​n
3638
+ */
3639
+ sectionBody: string;
3640
+ /**
3641
+ * C​o​n​t​e​n​t​ ​p​a​g​e​ ​t​i​t​l​e
3642
+ */
3643
+ contentTitle: string;
3644
+ /**
3645
+ * K​e​y​ ​p​o​i​n​t
3646
+ */
3647
+ itemTitle: string;
3648
+ /**
3649
+ * S​u​p​p​o​r​t​i​n​g​ ​d​e​t​a​i​l
3650
+ */
3651
+ itemBody: string;
3652
+ /**
3653
+ * T​h​a​n​k​ ​y​o​u
3654
+ */
3655
+ thankYou: string;
3656
+ /**
3657
+ * W​e​l​c​o​m​e
3658
+ */
3659
+ welcome: string;
3599
3660
  /**
3600
3661
  * T​i​t​l​e​ ​1
3601
3662
  */
@@ -7457,7 +7518,7 @@ export type TranslationFunctions = {
7457
7518
  */
7458
7519
  exportFiles: () => LocalizedString;
7459
7520
  /**
7460
- * Reset slides
7521
+ * New presentation
7461
7522
  */
7462
7523
  resetSlides: () => LocalizedString;
7463
7524
  /**
@@ -7980,6 +8041,18 @@ export type TranslationFunctions = {
7980
8041
  * Untitled presentation
7981
8042
  */
7982
8043
  untitled: () => LocalizedString;
8044
+ /**
8045
+ * Click to add title
8046
+ */
8047
+ clickToAddTitle: () => LocalizedString;
8048
+ /**
8049
+ * Click to add subtitle
8050
+ */
8051
+ clickToAddSubtitle: () => LocalizedString;
8052
+ /**
8053
+ * Click to add text
8054
+ */
8055
+ clickToAddText: () => LocalizedString;
7983
8056
  };
7984
8057
  templates: {
7985
8058
  /**
@@ -8073,14 +8146,64 @@ export type TranslationFunctions = {
8073
8146
  * Template cover subtitle
8074
8147
  */
8075
8148
  coverSubtitle: () => LocalizedString;
8149
+ /**
8150
+ * Brief presentation summary
8151
+ */
8152
+ coverDescription: () => LocalizedString;
8153
+ /**
8154
+ * Presenter: XXX
8155
+ */
8156
+ presenter: () => LocalizedString;
8157
+ /**
8158
+ * Date: XXX
8159
+ */
8160
+ date: () => LocalizedString;
8161
+ /**
8162
+ * Time: XXX
8163
+ */
8164
+ time: () => LocalizedString;
8165
+ /**
8166
+ * Business report | Work summary | Work plan
8167
+ */
8168
+ businessReport: () => LocalizedString;
8076
8169
  /**
8077
8170
  * Contents
8078
8171
  */
8079
8172
  contentsTitle: () => LocalizedString;
8173
+ /**
8174
+ * Section {index}
8175
+ */
8176
+ contentsItem: (arg: {
8177
+ index: unknown;
8178
+ }) => LocalizedString;
8080
8179
  /**
8081
8180
  * Section title
8082
8181
  */
8083
8182
  sectionTitle: () => LocalizedString;
8183
+ /**
8184
+ * Brief section introduction
8185
+ */
8186
+ sectionBody: () => LocalizedString;
8187
+ /**
8188
+ * Content page title
8189
+ */
8190
+ contentTitle: () => LocalizedString;
8191
+ /**
8192
+ * Key point
8193
+ */
8194
+ itemTitle: () => LocalizedString;
8195
+ /**
8196
+ * Supporting detail
8197
+ */
8198
+ itemBody: () => LocalizedString;
8199
+ /**
8200
+ * Thank you
8201
+ */
8202
+ thankYou: () => LocalizedString;
8203
+ /**
8204
+ * Welcome
8205
+ */
8206
+ welcome: () => LocalizedString;
8084
8207
  /**
8085
8208
  * Title 1
8086
8209
  */
@@ -153,6 +153,10 @@ export declare const useMainStore: import("pinia").StoreDefinition<"main", MainS
153
153
  content: string;
154
154
  defaultFontName: string;
155
155
  defaultColor: string;
156
+ placeholder?: string | undefined;
157
+ placeholderFontSize?: number | undefined;
158
+ placeholderColor?: string | undefined;
159
+ placeholderAlign?: import("../embed").TextAlign | undefined;
156
160
  outline?: {
157
161
  style?: import("../types/slides").LineStyleType | undefined;
158
162
  width?: number | undefined;
@@ -576,6 +580,10 @@ export declare const useMainStore: import("pinia").StoreDefinition<"main", MainS
576
580
  content: string;
577
581
  defaultFontName: string;
578
582
  defaultColor: string;
583
+ placeholder?: string | undefined;
584
+ placeholderFontSize?: number | undefined;
585
+ placeholderColor?: string | undefined;
586
+ placeholderAlign?: import("../embed").TextAlign | undefined;
579
587
  outline?: {
580
588
  style?: import("../types/slides").LineStyleType | undefined;
581
589
  width?: number | undefined;