@openpresentation/opf 0.11.2 → 0.11.4
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/{catalogs-DJ-B5ZyD.d.ts → catalogs-CUClB3nl.d.ts} +202 -5
- package/dist/catalogs.d.ts +1 -1
- package/dist/catalogs.js +1 -1
- package/dist/{chunk-BVLWFMDX.js → chunk-3H2U7FDR.js} +224 -26
- package/dist/{chunk-K7IWYODS.js → chunk-3OJN7QAW.js} +17 -4
- package/dist/{chunk-7LF37SG3.js → chunk-AEUSVEUY.js} +4915 -1640
- package/dist/{chunk-DJRZMGKY.js → chunk-FDCWQHWO.js} +143 -68
- package/dist/{chunk-SDETQV7Y.js → chunk-HJL64ETN.js} +505 -0
- package/dist/{chunk-LTSDDBNW.js → chunk-KJKASEPE.js} +262 -23
- package/dist/{chunk-SMYEM3HV.js → chunk-NSVVQ52O.js} +7 -6
- package/dist/{chunk-KZ6BT5UG.js → chunk-RXNFDGPC.js} +5 -5
- package/dist/{composition-DzLwY-Mi.d.ts → composition-Dl-d9FRj.d.ts} +93 -6
- package/dist/composition.d.ts +1 -1
- package/dist/composition.js +1 -1
- package/dist/docs.js +21 -15
- package/dist/examples.d.ts +1 -1
- package/dist/font-policy.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +11 -11
- package/dist/lint.d.ts +2 -2
- package/dist/lint.js +5 -5
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +5 -5
- package/dist/{presentation-bceTClm8.d.ts → presentation-j5PVrqfV.d.ts} +41 -29
- package/dist/repo-readme.js +1 -1
- package/dist/schemas.js +1 -1
- package/dist/spec/README.md +3 -2
- package/dist/spec/catalogs/audiences/index.json +2 -0
- package/dist/spec/catalogs/chart-types/box-and-whisker.json +101 -49
- package/dist/spec/catalogs/chart-types/histogram.json +130 -108
- package/dist/spec/catalogs/chart-types/index.json +2 -0
- package/dist/spec/catalogs/chart-types/pareto.json +22 -106
- package/dist/spec/catalogs/color-schemes/black-and-white.json +10 -1
- package/dist/spec/catalogs/color-schemes/bold-red.json +10 -1
- package/dist/spec/catalogs/color-schemes/boost.json +10 -1
- package/dist/spec/catalogs/color-schemes/burnt-orange.json +10 -1
- package/dist/spec/catalogs/color-schemes/cool-horizon.json +10 -1
- package/dist/spec/catalogs/color-schemes/corporate-blue.json +10 -1
- package/dist/spec/catalogs/color-schemes/deep-purple.json +10 -1
- package/dist/spec/catalogs/color-schemes/forest-green.json +10 -1
- package/dist/spec/catalogs/color-schemes/golden-yellow.json +10 -1
- package/dist/spec/catalogs/color-schemes/index.json +2 -0
- package/dist/spec/catalogs/color-schemes/luxury.json +10 -1
- package/dist/spec/catalogs/color-schemes/pastel-red.json +10 -1
- package/dist/spec/catalogs/color-schemes/slate-gray.json +10 -1
- package/dist/spec/catalogs/color-schemes/steel-blue.json +10 -1
- package/dist/spec/catalogs/color-schemes/vibes.json +10 -1
- package/dist/spec/catalogs/font-schemes/angsana-new.json +2 -1
- package/dist/spec/catalogs/font-schemes/aparajita.json +2 -1
- package/dist/spec/catalogs/font-schemes/aptos.json +2 -1
- package/dist/spec/catalogs/font-schemes/arabic-typesetting.json +2 -1
- package/dist/spec/catalogs/font-schemes/arial.json +2 -1
- package/dist/spec/catalogs/font-schemes/batang.json +2 -1
- package/dist/spec/catalogs/font-schemes/bookman.json +2 -1
- package/dist/spec/catalogs/font-schemes/calibri.json +2 -1
- package/dist/spec/catalogs/font-schemes/century-schoolbook.json +2 -1
- package/dist/spec/catalogs/font-schemes/consolas.json +2 -1
- package/dist/spec/catalogs/font-schemes/constantia.json +2 -1
- package/dist/spec/catalogs/font-schemes/courier-new.json +2 -1
- package/dist/spec/catalogs/font-schemes/daunpenh.json +2 -1
- package/dist/spec/catalogs/font-schemes/david.json +2 -1
- package/dist/spec/catalogs/font-schemes/dilleniaupc.json +2 -1
- package/dist/spec/catalogs/font-schemes/fangsong.json +2 -1
- package/dist/spec/catalogs/font-schemes/garamond.json +2 -1
- package/dist/spec/catalogs/font-schemes/gautami.json +2 -1
- package/dist/spec/catalogs/font-schemes/georgia.json +2 -1
- package/dist/spec/catalogs/font-schemes/gisha.json +2 -1
- package/dist/spec/catalogs/font-schemes/grandview.json +2 -1
- package/dist/spec/catalogs/font-schemes/gungsuh.json +2 -1
- package/dist/spec/catalogs/font-schemes/impact.json +2 -1
- package/dist/spec/catalogs/font-schemes/index.json +236 -234
- package/dist/spec/catalogs/font-schemes/kalinga.json +2 -1
- package/dist/spec/catalogs/font-schemes/kartika.json +2 -1
- package/dist/spec/catalogs/font-schemes/khmer-ui.json +2 -1
- package/dist/spec/catalogs/font-schemes/latha.json +2 -1
- package/dist/spec/catalogs/font-schemes/lucida-sans.json +2 -1
- package/dist/spec/catalogs/font-schemes/malgun-gothic.json +2 -1
- package/dist/spec/catalogs/font-schemes/mangal.json +2 -1
- package/dist/spec/catalogs/font-schemes/meiryo.json +2 -1
- package/dist/spec/catalogs/font-schemes/microsoft-jhenghei.json +2 -1
- package/dist/spec/catalogs/font-schemes/microsoft-yahei.json +2 -1
- package/dist/spec/catalogs/font-schemes/mingliu.json +2 -1
- package/dist/spec/catalogs/font-schemes/miriam.json +2 -1
- package/dist/spec/catalogs/font-schemes/montserrat.json +2 -1
- package/dist/spec/catalogs/font-schemes/ms-mincho.json +2 -1
- package/dist/spec/catalogs/font-schemes/nirmala-ui.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-naksh-arabic.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-nastaliq-urdu.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-arabic.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-armenian.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-bengali.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-devangari.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-ethiopic.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-georgian.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-gujarati.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-gurmukhi.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-hebrew.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-jp.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-kannada.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-khmer.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-kr.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-malayalam.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-mongolian.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-oriya.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-sc.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-tamil.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-tc.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-telugu.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-thai.json +2 -1
- package/dist/spec/catalogs/font-schemes/noto-sans.json +2 -1
- package/dist/spec/catalogs/font-schemes/nyala.json +2 -1
- package/dist/spec/catalogs/font-schemes/open-sans.json +2 -1
- package/dist/spec/catalogs/font-schemes/pmingliu.json +2 -1
- package/dist/spec/catalogs/font-schemes/poppins.json +2 -1
- package/dist/spec/catalogs/font-schemes/pt-serif.json +2 -1
- package/dist/spec/catalogs/font-schemes/raavi.json +2 -1
- package/dist/spec/catalogs/font-schemes/raleway.json +2 -1
- package/dist/spec/catalogs/font-schemes/roboto.json +2 -1
- package/dist/spec/catalogs/font-schemes/rockwell.json +2 -1
- package/dist/spec/catalogs/font-schemes/sakkal-majalla.json +2 -1
- package/dist/spec/catalogs/font-schemes/seaford.json +2 -1
- package/dist/spec/catalogs/font-schemes/segoe-ui-light.json +2 -1
- package/dist/spec/catalogs/font-schemes/segoe-ui.json +2 -1
- package/dist/spec/catalogs/font-schemes/shonar-bangla.json +2 -1
- package/dist/spec/catalogs/font-schemes/shruti.json +2 -1
- package/dist/spec/catalogs/font-schemes/simsun.json +2 -1
- package/dist/spec/catalogs/font-schemes/skeena.json +2 -1
- package/dist/spec/catalogs/font-schemes/sylfaen.json +2 -1
- package/dist/spec/catalogs/font-schemes/tahoma.json +2 -1
- package/dist/spec/catalogs/font-schemes/tenorite.json +2 -1
- package/dist/spec/catalogs/font-schemes/times-new-roman.json +2 -1
- package/dist/spec/catalogs/font-schemes/traditional-arabic.json +2 -1
- package/dist/spec/catalogs/font-schemes/trebuchet-ms.json +2 -1
- package/dist/spec/catalogs/font-schemes/tunga.json +2 -1
- package/dist/spec/catalogs/font-schemes/verdana.json +2 -1
- package/dist/spec/catalogs/font-schemes/vrinda.json +2 -1
- package/dist/spec/catalogs/font-schemes/yu-gothic.json +2 -1
- package/dist/spec/catalogs/languages/index.json +2 -0
- package/dist/spec/catalogs/layouts/action-plan.json +35 -0
- package/dist/spec/catalogs/layouts/agenda.json +35 -0
- package/dist/spec/catalogs/layouts/appendix-index.json +38 -0
- package/dist/spec/catalogs/layouts/architecture-stack.json +35 -0
- package/dist/spec/catalogs/layouts/assumptions-dependencies.json +35 -0
- package/dist/spec/catalogs/layouts/before-after.json +41 -0
- package/dist/spec/catalogs/layouts/benchmark-target-table.json +35 -0
- package/dist/spec/catalogs/layouts/bullet-list.json +38 -0
- package/dist/spec/catalogs/layouts/business-model-canvas.json +35 -0
- package/dist/spec/catalogs/layouts/capability-map.json +35 -0
- package/dist/spec/catalogs/layouts/case-study.json +35 -0
- package/dist/spec/catalogs/layouts/chapter-recap.json +35 -0
- package/dist/spec/catalogs/layouts/circular-lifecycle.json +35 -0
- package/dist/spec/catalogs/layouts/comparison.json +41 -0
- package/dist/spec/catalogs/layouts/competitive-landscape.json +35 -0
- package/dist/spec/catalogs/layouts/customer-journey.json +35 -0
- package/dist/spec/catalogs/layouts/customer-logos.json +38 -0
- package/dist/spec/catalogs/layouts/dashboard.json +41 -0
- package/dist/spec/catalogs/layouts/data-visualization.json +45 -0
- package/dist/spec/catalogs/layouts/decision-tree.json +35 -0
- package/dist/spec/catalogs/layouts/detailed-data-table.json +41 -0
- package/dist/spec/catalogs/layouts/ecosystem-map.json +35 -0
- package/dist/spec/catalogs/layouts/executive-decision.json +38 -0
- package/dist/spec/catalogs/layouts/executive-summary.json +38 -0
- package/dist/spec/catalogs/layouts/faq.json +35 -0
- package/dist/spec/catalogs/layouts/feature-comparison-matrix.json +35 -0
- package/dist/spec/catalogs/layouts/forecast-scenario.json +45 -0
- package/dist/spec/catalogs/layouts/funnel-pyramid.json +38 -0
- package/dist/spec/catalogs/layouts/gantt-project-plan.json +38 -0
- package/dist/spec/catalogs/layouts/geographic-map.json +35 -0
- package/dist/spec/catalogs/layouts/heatmap-cohort.json +38 -0
- package/dist/spec/catalogs/layouts/hub-and-spoke.json +35 -0
- package/dist/spec/catalogs/layouts/icon-grid.json +35 -0
- package/dist/spec/catalogs/layouts/image-focus.json +35 -0
- package/dist/spec/catalogs/layouts/index.json +352 -0
- package/dist/spec/catalogs/layouts/key-takeaway.json +32 -0
- package/dist/spec/catalogs/layouts/kpi-scorecard.json +44 -0
- package/dist/spec/catalogs/layouts/logic-tree.json +35 -0
- package/dist/spec/catalogs/layouts/market-size.json +35 -0
- package/dist/spec/catalogs/layouts/matrix-quadrant.json +48 -0
- package/dist/spec/catalogs/layouts/network-dependency-map.json +35 -0
- package/dist/spec/catalogs/layouts/one-column-explainer.json +35 -0
- package/dist/spec/catalogs/layouts/org-chart.json +45 -0
- package/dist/spec/catalogs/layouts/persona-grid.json +35 -0
- package/dist/spec/catalogs/layouts/photo-grid.json +48 -0
- package/dist/spec/catalogs/layouts/pricing-table.json +35 -0
- package/dist/spec/catalogs/layouts/process-flow.json +35 -0
- package/dist/spec/catalogs/layouts/product-feature.json +35 -0
- package/dist/spec/catalogs/layouts/pros-cons.json +41 -0
- package/dist/spec/catalogs/layouts/qa-discussion.json +38 -0
- package/dist/spec/catalogs/layouts/quote-highlight.json +35 -0
- package/dist/spec/catalogs/layouts/raci-matrix.json +35 -0
- package/dist/spec/catalogs/layouts/risk-heatmap.json +35 -0
- package/dist/spec/catalogs/layouts/roadmap.json +35 -0
- package/dist/spec/catalogs/layouts/screenshot-walkthrough.json +35 -0
- package/dist/spec/catalogs/layouts/section-divider.json +35 -0
- package/dist/spec/catalogs/layouts/single-message-statement.json +32 -0
- package/dist/spec/catalogs/layouts/stats-metrics.json +45 -0
- package/dist/spec/catalogs/layouts/status-rag.json +35 -0
- package/dist/spec/catalogs/layouts/swimlane-process.json +35 -0
- package/dist/spec/catalogs/layouts/swot-analysis.json +48 -0
- package/dist/spec/catalogs/layouts/team-bio.json +35 -0
- package/dist/spec/catalogs/layouts/testimonial-grid.json +44 -0
- package/dist/spec/catalogs/layouts/thank-you-cta.json +35 -0
- package/dist/spec/catalogs/layouts/three-column.json +45 -0
- package/dist/spec/catalogs/layouts/timeline.json +38 -0
- package/dist/spec/catalogs/layouts/title-slide.json +35 -0
- package/dist/spec/catalogs/layouts/two-column.json +42 -0
- package/dist/spec/catalogs/layouts/venn-overlap.json +35 -0
- package/dist/spec/catalogs/layouts/waterfall-bridge.json +45 -0
- package/dist/spec/catalogs/layouts/wheel-radial.json +35 -0
- package/dist/spec/catalogs/manifest.json +111 -0
- package/dist/spec/catalogs/narratives/index.json +746 -144
- package/dist/spec/catalogs/purposes/index.json +2 -0
- package/dist/spec/catalogs/social-platforms/index.json +2 -1
- package/dist/spec/catalogs/themes/index.json +10 -8
- package/dist/spec/catalogs/tones/index.json +2 -0
- package/dist/spec/reference/font-policy.json +5 -5
- package/dist/spec/schemas/audience.schema.json +21 -0
- package/dist/spec/schemas/catalog-index.schema.json +40 -3
- package/dist/spec/schemas/catalog-manifest.schema.json +83 -0
- package/dist/spec/schemas/chart-type.schema.json +5 -0
- package/dist/spec/schemas/color-scheme.schema.json +21 -0
- package/dist/spec/schemas/font-scheme.schema.json +21 -0
- package/dist/spec/schemas/language.schema.json +21 -0
- package/dist/spec/schemas/layout.schema.json +21 -0
- package/dist/spec/schemas/narrative.schema.json +21 -0
- package/dist/spec/schemas/opf.schema.json +22 -18
- package/dist/spec/schemas/purpose.schema.json +21 -0
- package/dist/spec/schemas/social-platform.schema.json +26 -5
- package/dist/spec/schemas/theme.schema.json +21 -0
- package/dist/spec/schemas/tone.schema.json +21 -0
- package/dist/spec-files.d.ts +2 -2
- package/dist/spec-files.js +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/validator.d.ts +2 -2
- package/dist/validator.js +4 -4
- package/package.json +1 -1
|
@@ -135,10 +135,12 @@ interface TextStyle {
|
|
|
135
135
|
path?: string;
|
|
136
136
|
fontFace?: FontFaceSelection;
|
|
137
137
|
}
|
|
138
|
+
/** Role families. `accent` is present only when the scheme defines an accent role; the slide tag and quote body use it. */
|
|
138
139
|
interface FontFamilies {
|
|
139
140
|
heading: string;
|
|
140
141
|
body: string;
|
|
141
142
|
code: string;
|
|
143
|
+
accent?: string;
|
|
142
144
|
}
|
|
143
145
|
/** Shared last-resort font-scheme id when neither the slide, the deck nor the resolved theme names one.
|
|
144
146
|
* One default for every engine, so preview matches export (font-fidelity-everywhere owner decision). */
|
|
@@ -169,7 +171,9 @@ declare function resolveFontSchemeReference(reference: unknown, lookup: (id: str
|
|
|
169
171
|
/** Resolve role families from an already-merged font scheme (catalog record plus design overrides).
|
|
170
172
|
* A scheme that names no heading or body family gets the DEFAULT_FONT_SCHEME families (Aptos Display, Aptos).
|
|
171
173
|
* `code` comes from the scheme's `code` role, which catalog records such as consolas and courier-new
|
|
172
|
-
* carry; otherwise it is Roboto Mono. Heading and body families are never reused for code.
|
|
174
|
+
* carry; otherwise it is Roboto Mono. Heading and body families are never reused for code.
|
|
175
|
+
* `accent` is returned only when the scheme defines an `accent` role (a family string or Font object);
|
|
176
|
+
* the slide tag and the quote body use it in place of the body and heading families. */
|
|
173
177
|
declare function resolveFontFamilies(input: unknown): FontFamilies;
|
|
174
178
|
interface TextMeasurement {
|
|
175
179
|
measure: (text: string, fontSize: number, style: TextStyle) => number;
|
|
@@ -235,6 +239,11 @@ interface ComposedItem {
|
|
|
235
239
|
metricLayout?: MetricLayout;
|
|
236
240
|
/** Complete timeline fields, markers and connector accepted by composition. */
|
|
237
241
|
timelineLayout?: TimelineLayout;
|
|
242
|
+
/**
|
|
243
|
+
* Picture bullet for `items`/`bullets` payloads when the effective `design.listBullet` is `image`
|
|
244
|
+
* and the deck's icon logo resolves. Every entry marker in `text.listEntries` carries the same value.
|
|
245
|
+
*/
|
|
246
|
+
bulletImage?: ListBulletImage;
|
|
238
247
|
/** Effective container settings, including inherited readability constraints. */
|
|
239
248
|
composition: Composition;
|
|
240
249
|
/**
|
|
@@ -301,6 +310,33 @@ interface SlideImageShape {
|
|
|
301
310
|
adjust: Record<string, number>;
|
|
302
311
|
path: string;
|
|
303
312
|
}
|
|
313
|
+
/** Which logo variant family a consumer asks for: the full lockup, a square mark, or a stacked lockup. */
|
|
314
|
+
type LogoSlot = 'lockup' | 'icon' | 'stacked';
|
|
315
|
+
/** A logo asset chosen by resolveLogo, with its source value, OPF path, LogoSet variant key and the slot it serves. */
|
|
316
|
+
interface ResolvedLogo {
|
|
317
|
+
source: unknown;
|
|
318
|
+
path: string;
|
|
319
|
+
variant: string;
|
|
320
|
+
slot: LogoSlot;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* The deck logo drawn on a cover or section slide, at the top-left of the free area and above the
|
|
324
|
+
* centered heading group. Consumers fit the image inside `box` preserving its aspect ratio,
|
|
325
|
+
* anchored left and vertically centered; content slides never carry one.
|
|
326
|
+
*/
|
|
327
|
+
interface ComposedLogo {
|
|
328
|
+
box: LayoutBox;
|
|
329
|
+
slot: 'lockup';
|
|
330
|
+
path: string;
|
|
331
|
+
source: unknown;
|
|
332
|
+
variant: string;
|
|
333
|
+
anchor: 'left';
|
|
334
|
+
}
|
|
335
|
+
/** Picture bullet source for list markers: the deck's icon logo and the OPF path it was read from. */
|
|
336
|
+
interface ListBulletImage {
|
|
337
|
+
source: unknown;
|
|
338
|
+
path: string;
|
|
339
|
+
}
|
|
304
340
|
interface ComposedGroup {
|
|
305
341
|
path: string;
|
|
306
342
|
box: LayoutBox;
|
|
@@ -340,7 +376,8 @@ interface CompositionCandidate {
|
|
|
340
376
|
interface CompositionDecision {
|
|
341
377
|
path: string;
|
|
342
378
|
mode: NonNullable<Composition['mode']> | 'regions';
|
|
343
|
-
|
|
379
|
+
/** `chart-primary`: the root split a primary chart from a synthetic container of the other nodes (design.chartPrimary). */
|
|
380
|
+
reason: 'lowest-score' | 'configured-mode' | 'promoted-regions' | 'chart-primary';
|
|
344
381
|
selectedColumns?: number;
|
|
345
382
|
/** Only candidates actually evaluated by automatic selection, in tie-break order. */
|
|
346
383
|
candidates: CompositionCandidate[];
|
|
@@ -370,21 +407,32 @@ interface SlideComposition {
|
|
|
370
407
|
furniture?: FurnitureLayout;
|
|
371
408
|
/** Active slide-level image; absent when design.slideImage does not apply to this slide. */
|
|
372
409
|
slideImage?: ComposedSlideImage;
|
|
410
|
+
/** Deck logo on a cover or section slide; absent on content slides and when no logo resolves. */
|
|
411
|
+
logo?: ComposedLogo;
|
|
373
412
|
explanation?: CompositionExplanation;
|
|
374
413
|
}
|
|
375
414
|
interface ComposeSlideOptions {
|
|
376
|
-
/** Context for inherited furniture, generated organization names and
|
|
415
|
+
/** Context for inherited furniture, generated organization names, social profiles, logos and layout hints. */
|
|
377
416
|
presentation?: {
|
|
378
417
|
design?: {
|
|
379
418
|
header?: unknown;
|
|
380
419
|
footer?: unknown;
|
|
381
420
|
slideImage?: unknown;
|
|
382
421
|
imageFill?: unknown;
|
|
422
|
+
logo?: unknown;
|
|
423
|
+
contentDirection?: unknown;
|
|
424
|
+
chartPrimary?: unknown;
|
|
425
|
+
listBullet?: unknown;
|
|
383
426
|
};
|
|
384
427
|
organization?: unknown;
|
|
385
428
|
slides?: unknown;
|
|
386
429
|
catalogs?: unknown;
|
|
387
430
|
};
|
|
431
|
+
/**
|
|
432
|
+
* Whether the slide background is dark, by the host's own luminance test. Selects the light logo
|
|
433
|
+
* variants (cover logo, furniture `logo: true`, picture bullets). Core never inspects colors.
|
|
434
|
+
*/
|
|
435
|
+
darkBackground?: boolean;
|
|
388
436
|
/**
|
|
389
437
|
* Host-resolved social-platform records for generated `socials` furniture.
|
|
390
438
|
* Inline `presentation.catalogs.socialPlatforms.records` take precedence. Hosts
|
|
@@ -428,10 +476,30 @@ declare class OPFCompositionError extends Error {
|
|
|
428
476
|
* roundRect (adj; ss = min(w,h), radius = ss*adj/100000), ellipse, and hexagon (adj, vf).
|
|
429
477
|
*/
|
|
430
478
|
declare function slideImageShape(kind: SlideImageShape['kind'], box: LayoutBox, cornerRadius?: number): SlideImageShape;
|
|
479
|
+
interface ResolveLogoOptions {
|
|
480
|
+
/** Variant family to prefer; defaults to the full lockup. */
|
|
481
|
+
slot?: LogoSlot;
|
|
482
|
+
/** True on a dark background (host luminance test): light variants are preferred, dark ones come last. */
|
|
483
|
+
onDark?: boolean;
|
|
484
|
+
/** Index used in the `slides.N.design.logo` path of a slide-level logo; defaults to 0. */
|
|
485
|
+
slideIndex?: number;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Resolve the logo a slide should draw, the same way in every engine. Source precedence:
|
|
489
|
+
* `slides[i].design.logo`, then `design.logo`, then the primary organization's `logo` (`role: 'primary'`,
|
|
490
|
+
* else the first organization; `organization` may be an object or an array). Absence inherits; a source
|
|
491
|
+
* that yields no usable asset falls through to the next. A string or Asset object is the `default`
|
|
492
|
+
* variant. A LogoSet picks by slot and tone: `icon` tries iconLight/iconDark (tone), then icon, then the
|
|
493
|
+
* lockup chain; `stacked` tries stackedLight/stackedDark (tone), then stacked, then the lockup chain; the
|
|
494
|
+
* lockup chain prefers same-tone variants, then neutral ones, then the opposite tone. `path` is the OPF
|
|
495
|
+
* path of the chosen value (`design.logo`, `design.logo.light`, `organization.2.logo`,
|
|
496
|
+
* `slides.3.design.logo.icon`) and `variant` the LogoSet key or `default`. Returns null without a logo.
|
|
497
|
+
*/
|
|
498
|
+
declare function resolveLogo(presentation: unknown, slide: unknown, options?: ResolveLogoOptions): ResolvedLogo | null;
|
|
431
499
|
interface FurniturePartBase {
|
|
432
500
|
kind: 'header' | 'footer';
|
|
433
501
|
zone: 'left' | 'center' | 'right';
|
|
434
|
-
field: 'text' | 'image' | 'organization' | 'socials' | 'section' | 'slideNumber' | 'date';
|
|
502
|
+
field: 'text' | 'image' | 'logo' | 'organization' | 'socials' | 'section' | 'slideNumber' | 'date';
|
|
435
503
|
/** Literal field or controlling flag, with the actual inherited/local path. */
|
|
436
504
|
path: string;
|
|
437
505
|
/** String/asset source, when different from a generated field's flag. */
|
|
@@ -829,13 +897,32 @@ interface ListEntryLayout {
|
|
|
829
897
|
style: TextStyle;
|
|
830
898
|
indent: number;
|
|
831
899
|
};
|
|
900
|
+
/** Picture bullet replacing the marker glyph; drawn in `bulletBox`. Marker geometry is unchanged. */
|
|
901
|
+
bulletImage?: ListBulletImage;
|
|
902
|
+
/**
|
|
903
|
+
* Where the picture bullet draws: a square of side `marker.fontSize * PICTURE_BULLET_SCALE` whose
|
|
904
|
+
* bottom sits on the marker baseline (`marker.y`) and whose left edge is `marker.x`. Present with `bulletImage`.
|
|
905
|
+
*/
|
|
906
|
+
bulletBox?: LayoutBox;
|
|
832
907
|
}
|
|
908
|
+
/**
|
|
909
|
+
* Side of a picture bullet as a fraction of the list font size. Desktop PowerPoint sizes an `a:buBlip` at
|
|
910
|
+
* `a:buSzPct 100000` (what opf-pptx writes) as a square about 0.65 times the run's font size, bottom on the
|
|
911
|
+
* text baseline and left at the bullet position, in every typeface: measured widths of 10, 15, 16, 20 and 31
|
|
912
|
+
* pixels at font sizes of 16, 24, 25, 32 and 48 pixels (0.625 to 0.646; heights run about a pixel more from
|
|
913
|
+
* anti-aliasing, so the true side is about 0.65). The export needs no size: PowerPoint sizes the bullet itself.
|
|
914
|
+
*/
|
|
915
|
+
declare const PICTURE_BULLET_SCALE = 0.65;
|
|
833
916
|
interface ListFit extends TextFit {
|
|
834
917
|
listEntries: ListEntryLayout[];
|
|
835
918
|
height: number;
|
|
836
919
|
}
|
|
920
|
+
interface ListFitOptions extends RichTextOptions {
|
|
921
|
+
/** Picture bullet for every entry (effective `design.listBullet: "image"` with a resolved icon logo). */
|
|
922
|
+
bulletImage?: ListBulletImage;
|
|
923
|
+
}
|
|
837
924
|
/** Shared hanging indents, mixed-run fitting and description spacing for list payloads. */
|
|
838
|
-
declare function fitList(input: readonly ListValue[], box: LayoutBox, requestedSize?: number, minFontSize?: number, options?:
|
|
925
|
+
declare function fitList(input: readonly ListValue[], box: LayoutBox, requestedSize?: number, minFontSize?: number, options?: ListFitOptions): ListFit;
|
|
839
926
|
interface TableLayoutOptions {
|
|
840
927
|
scale?: number;
|
|
841
928
|
minFontSize?: number;
|
|
@@ -884,4 +971,4 @@ declare function resolveCanvasDimensions(input: unknown): {
|
|
|
884
971
|
height: number;
|
|
885
972
|
};
|
|
886
973
|
|
|
887
|
-
export { type
|
|
974
|
+
export { type QuoteContent as $, type FurniturePartBase as A, type FurnitureSocialLink as B, type ComposeSlideOptions as C, DEFAULT_FONT_SCHEME as D, type FurnitureTextExtras as E, type FontSchemeDiagnostic as F, type FurnitureTextPart as G, type LayoutBox as H, type ListBulletImage as I, type ListEntryLayout as J, type ListFit as K, type LayoutDiagnostic as L, type ListFitOptions as M, type ListText as N, type ListValue as O, type LogoSlot as P, MAX_COMPOSITION_DEPTH as Q, type MeasureTextWidth as R, type MetricContent as S, type TextMeasurement as T, type MetricLayout as U, type MetricLayoutDiagnostic as V, type MetricLayoutOptions as W, type MetricTextPart as X, type MetricTextSource as Y, OPFCompositionError as Z, PICTURE_BULLET_SCALE as _, type CodeContent as a, type TableGridCell as a$, type QuoteLayout as a0, type QuoteLayoutDiagnostic as a1, type QuoteLayoutOptions as a2, type QuoteTextPart as a3, type QuoteTextSource as a4, type ResolveColorRefOptions as a5, type ResolveColorRefRoles as a6, type ResolveLogoOptions as a7, type ResolvedFontScheme as a8, type ResolvedLogo as a9, formatFurnitureDate as aA, formatSlideNumber as aB, layoutCode as aC, layoutFurniture as aD, layoutMetric as aE, layoutQuote as aF, layoutTimeline as aG, measureText as aH, measureTextOutline as aI, normalizeHexColor as aJ, placeTextLines as aK, resolveCanvasDimensions as aL, resolveColorRef as aM, resolveFontFamilies as aN, resolveFontSchemeReference as aO, resolveLogo as aP, resolveSocialProfile as aQ, resolveTextStyle as aR, textColorForFill as aS, textWidthMeasurer as aT, wrapText as aU, type FontFaceSelection as aV, type SourceTextFit as aW, type TableBorder as aX, type TableCellLayout as aY, type TableCellStyle as aZ, type TableGrid as a_, type RichTextFit as aa, type RichTextFragment as ab, type RichTextLine as ac, type RichTextOptions as ad, type RichTextRun as ae, type SlideComposition as af, type SlideImageShape as ag, type SocialPlatformRecord as ah, type SocialProfile as ai, type TextFit as aj, type TextLineInk as ak, type TextPlacement as al, type TextPlacementLine as am, type TextStyle as an, type TimelineContent as ao, type TimelineEvent as ap, type TimelineLayout as aq, type TimelineLayoutDiagnostic as ar, type TimelineLayoutOptions as as, type TimelineTextPart as at, chartColorForFill as au, colorContrast as av, composeSlide as aw, fitList as ax, fitRichText as ay, fitText as az, type CodeLayout as b, type TableGridIssue as b0, type TableLayout as b1, type TableLayoutOptions as b2, type TableRowLayout as b3, type TextLineSegment as b4, type TextLineSource as b5, layoutTable as b6, slideImageShape as b7, tableGrid as b8, tableRowBoundaries as b9, type CodeLayoutDiagnostic as c, type CodeLayoutOptions as d, type CodeLineSegment as e, type CodeLineSource as f, type CodeTextFit as g, type CodeTextPart as h, type ComposedFlow as i, type ComposedGroup as j, type ComposedItem as k, type ComposedLogo as l, type ComposedSlideImage as m, type Composition as n, type CompositionCandidate as o, type CompositionDecision as p, type CompositionExplanation as q, type CompositionPenalties as r, type CompositionTrack as s, DEFAULT_FURNITURE_DATE_FORMAT as t, DEFAULT_SLIDE_NUMBER_FORMAT as u, type FontFamilies as v, type FurnitureField as w, type FurnitureImagePart as x, type FurnitureLayout as y, type FurniturePart as z };
|
package/dist/composition.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as CodeContent, b as CodeLayout, c as CodeLayoutDiagnostic, d as CodeLayoutOptions, e as CodeLineSegment, f as CodeLineSource, g as CodeTextFit, h as CodeTextPart, C as ComposeSlideOptions, i as ComposedFlow, j as ComposedGroup, k as ComposedItem, l as
|
|
1
|
+
export { a as CodeContent, b as CodeLayout, c as CodeLayoutDiagnostic, d as CodeLayoutOptions, e as CodeLineSegment, f as CodeLineSource, g as CodeTextFit, h as CodeTextPart, C as ComposeSlideOptions, i as ComposedFlow, j as ComposedGroup, k as ComposedItem, l as ComposedLogo, m as ComposedSlideImage, n as Composition, o as CompositionCandidate, p as CompositionDecision, q as CompositionExplanation, r as CompositionPenalties, s as CompositionTrack, D as DEFAULT_FONT_SCHEME, t as DEFAULT_FURNITURE_DATE_FORMAT, u as DEFAULT_SLIDE_NUMBER_FORMAT, aV as FontFaceSelection, v as FontFamilies, F as FontSchemeDiagnostic, w as FurnitureField, x as FurnitureImagePart, y as FurnitureLayout, z as FurniturePart, A as FurniturePartBase, B as FurnitureSocialLink, E as FurnitureTextExtras, G as FurnitureTextPart, H as LayoutBox, L as LayoutDiagnostic, I as ListBulletImage, J as ListEntryLayout, K as ListFit, M as ListFitOptions, N as ListText, O as ListValue, P as LogoSlot, Q as MAX_COMPOSITION_DEPTH, R as MeasureTextWidth, S as MetricContent, U as MetricLayout, V as MetricLayoutDiagnostic, W as MetricLayoutOptions, X as MetricTextPart, Y as MetricTextSource, Z as OPFCompositionError, _ as PICTURE_BULLET_SCALE, $ as QuoteContent, a0 as QuoteLayout, a1 as QuoteLayoutDiagnostic, a2 as QuoteLayoutOptions, a3 as QuoteTextPart, a4 as QuoteTextSource, a7 as ResolveLogoOptions, a8 as ResolvedFontScheme, a9 as ResolvedLogo, aa as RichTextFit, ab as RichTextFragment, ac as RichTextLine, ad as RichTextOptions, ae as RichTextRun, af as SlideComposition, ag as SlideImageShape, ah as SocialPlatformRecord, ai as SocialProfile, aW as SourceTextFit, aX as TableBorder, aY as TableCellLayout, aZ as TableCellStyle, a_ as TableGrid, a$ as TableGridCell, b0 as TableGridIssue, b1 as TableLayout, b2 as TableLayoutOptions, b3 as TableRowLayout, aj as TextFit, ak as TextLineInk, b4 as TextLineSegment, b5 as TextLineSource, T as TextMeasurement, al as TextPlacement, am as TextPlacementLine, an as TextStyle, ao as TimelineContent, ap as TimelineEvent, aq as TimelineLayout, ar as TimelineLayoutDiagnostic, as as TimelineLayoutOptions, at as TimelineTextPart, au as chartColorForFill, av as colorContrast, aw as composeSlide, ax as fitList, ay as fitRichText, az as fitText, aA as formatFurnitureDate, aB as formatSlideNumber, aC as layoutCode, aD as layoutFurniture, aE as layoutMetric, aF as layoutQuote, b6 as layoutTable, aG as layoutTimeline, aH as measureText, aI as measureTextOutline, aK as placeTextLines, aL as resolveCanvasDimensions, aN as resolveFontFamilies, aO as resolveFontSchemeReference, aP as resolveLogo, aQ as resolveSocialProfile, aR as resolveTextStyle, b7 as slideImageShape, b8 as tableGrid, b9 as tableRowBoundaries, aS as textColorForFill, aT as textWidthMeasurer, aU as wrapText } from './composition-Dl-d9FRj.js';
|
package/dist/composition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DEFAULT_FONT_SCHEME, DEFAULT_FURNITURE_DATE_FORMAT, DEFAULT_SLIDE_NUMBER_FORMAT, MAX_COMPOSITION_DEPTH, OPFCompositionError, chartColorForFill, colorContrast, composeSlide, fitList, fitRichText, fitText, formatFurnitureDate, formatSlideNumber, layoutCode, layoutFurniture, layoutMetric, layoutQuote, layoutTable, layoutTimeline, measureText, measureTextOutline, placeTextLines, resolveCanvasDimensions, resolveFontFamilies, resolveFontSchemeReference, resolveSocialProfile, resolveTextStyle, slideImageShape, tableGrid, tableRowBoundaries, textColorForFill, textWidthMeasurer, wrapText } from './chunk-
|
|
1
|
+
export { DEFAULT_FONT_SCHEME, DEFAULT_FURNITURE_DATE_FORMAT, DEFAULT_SLIDE_NUMBER_FORMAT, MAX_COMPOSITION_DEPTH, OPFCompositionError, PICTURE_BULLET_SCALE, chartColorForFill, colorContrast, composeSlide, fitList, fitRichText, fitText, formatFurnitureDate, formatSlideNumber, layoutCode, layoutFurniture, layoutMetric, layoutQuote, layoutTable, layoutTimeline, measureText, measureTextOutline, placeTextLines, resolveCanvasDimensions, resolveFontFamilies, resolveFontSchemeReference, resolveLogo, resolveSocialProfile, resolveTextStyle, slideImageShape, tableGrid, tableRowBoundaries, textColorForFill, textWidthMeasurer, wrapText } from './chunk-3H2U7FDR.js';
|