deckjsx 0.5.0 → 0.6.0
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/README.md +21 -15
- package/dist/{pptxgenjs-BTMKb1WX.mjs → adapter-BbtteJ7s.mjs} +232 -131
- package/dist/adapter-C8xw46nz.d.mts +22 -0
- package/dist/adapter.d.mts +2 -0
- package/dist/adapter.mjs +2 -0
- package/dist/{index-sb451NVh.d.mts → index-C5l8PX5V.d.mts} +5 -7
- package/dist/index.d.mts +57 -4
- package/dist/index.mjs +7277 -5425
- package/dist/inspect.d.mts +3 -3
- package/dist/{jsx-CK-x7PLd.mjs → jsx-C671yNZa.mjs} +103 -103
- package/dist/jsx-dev-runtime.d.mts +2 -2
- package/dist/jsx-dev-runtime.mjs +1 -1
- package/dist/{jsx-runtime-Bk7Wx3AL.d.mts → jsx-runtime-DwfBuBkY.d.mts} +1 -1
- package/dist/jsx-runtime.d.mts +2 -2
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/pptx-PzEK54aA.d.mts +448 -0
- package/package.json +2 -2
- package/dist/deck-CvTHG5ik.d.mts +0 -78
- package/dist/index-_eBM2cs3.d.mts +0 -245
- package/dist/legacy.d.mts +0 -6
- package/dist/legacy.mjs +0 -2
|
@@ -168,6 +168,7 @@ type SemanticImageNode = BaseSemanticNode & {
|
|
|
168
168
|
};
|
|
169
169
|
type SemanticShapeNode = BaseSemanticNode & {
|
|
170
170
|
readonly kind: "shape";
|
|
171
|
+
readonly shape: "rect" | "ellipse" | "line";
|
|
171
172
|
};
|
|
172
173
|
type SemanticNode = SemanticContainerNode | SemanticDocumentNode | SemanticImageNode | SemanticShapeNode | SemanticSlideNode | SemanticTextNode | SemanticTextRunNode;
|
|
173
174
|
type StyleClassRef = {
|
|
@@ -567,8 +568,6 @@ type CompositionSource<TSourceContext = unknown> = {
|
|
|
567
568
|
};
|
|
568
569
|
//#endregion
|
|
569
570
|
//#region src/authoring/index.d.ts
|
|
570
|
-
type BackendName = "pptxgenjs" | "ooxml";
|
|
571
|
-
type ImplementedBackendName = "pptxgenjs";
|
|
572
571
|
interface TextJsxChildArray extends ReadonlyArray<TextJsxChild> {}
|
|
573
572
|
type TextJsxChild = AuthorTreeNode | string | number | boolean | null | undefined | TextJsxChildArray;
|
|
574
573
|
interface ContentJsxChildArray extends ReadonlyArray<ContentJsxChild> {}
|
|
@@ -595,14 +594,13 @@ type DeckOptions = {
|
|
|
595
594
|
subject?: string;
|
|
596
595
|
};
|
|
597
596
|
theme?: Theme;
|
|
597
|
+
output?: {
|
|
598
|
+
format?: "pptx";
|
|
599
|
+
};
|
|
598
600
|
};
|
|
599
601
|
type SlideContext = {
|
|
600
602
|
composition: CompositionContext;
|
|
601
603
|
};
|
|
602
|
-
type OutputConfig = {
|
|
603
|
-
backend: ImplementedBackendName;
|
|
604
|
-
output: string;
|
|
605
|
-
};
|
|
606
604
|
type SlideNodeProps = {
|
|
607
605
|
name?: string;
|
|
608
606
|
className?: ClassNameValue;
|
|
@@ -698,4 +696,4 @@ type DeckJsxIntrinsicElements = {
|
|
|
698
696
|
span: IntrinsicSpanProps;
|
|
699
697
|
} & { [Tag in IntrinsicViewTag]: IntrinsicDivProps } & { [Tag in IntrinsicTextTag]: IntrinsicPProps };
|
|
700
698
|
//#endregion
|
|
701
|
-
export {
|
|
699
|
+
export { CssOverflow as $, DeckDiagnosticError as $t, ThemeDefaults as A, SemanticContainerNode as At, CssFlexDirection as B, SemanticTextRunNode as Bt, CompositionSourceInternals as C, ViewStyle as Ct, SourceContextMapper as D, Brand as Dt, SourceContextInput as E, BaseSemanticNode as Et, CssAlignSelf as F, SemanticOrigin as Ft, CssGridShorthand as G, StyleEntityId as Gt, CssGridAutoFlow as H, SourceOrigin as Ht, CssAspectRatio as I, SemanticRole as It, CssGridTemplateShorthand as J, DiagnosticSeverity as Jt, CssGridTemplate as K, Diagnostic as Kt, CssBoxSizing as L, SemanticShapeNode as Lt, BorderStyle as M, SemanticImageNode as Mt, CssAlignContent as N, SemanticNode as Nt, Theme as O, GraphNodeId as Ot, CssAlignItems as P, SemanticNodeKind as Pt, CssObjectPosition as Q, CompositionDiagnosticError as Qt, CssDisplay as R, SemanticSlideNode as Rt, CompositionSource as S, VerticalAlign as St, SlideFactoryInput as T, AssetEntityId as Tt, CssGridLine as U, StyleClassRef as Ut, CssFlexWrap as V, SourceIdentity as Vt, CssGridPlacement as W, StyleEntity as Wt, CssJustifyContent as X, formatDiagnostic as Xt, CssGridTrack as Y, Diagnostics as Yt, CssJustifySelf as Z, formatDiagnostics as Zt, TextProps as _, TextRunStyle as _t, DeckJsxIntrinsicElements as a, JsxKey as an, ImageCropValue as at, COMPOSITION_SOURCE as b, TextTabStopAuthoring as bt, IntrinsicDivProps as c, IntrinsicViewTag$1 as cn, ShapeStyle as ct, IntrinsicTextTag as d, StackAlignment as dt, SemanticGraphDiagnosticError as en, CssPosition as et, IntrinsicViewTag as f, StackAxis as ft, TextJsxChild as g, TextFit as gt, SlideProps as h, StrokeLineJoin as ht, ContentJsxChild as i, AuthorTreeNode as in, ImageCropAuthoring as it, StyleSheet as j, SemanticDocumentNode as jt, ThemeInput as k, SemanticAuthorGraph as kt, IntrinsicImgProps as l, SlideStyle as lt, SlideContext as m, StrokeLineCap as mt, ClassNameValue as n, AuthorElementNode as nn, DeckLength as nt, DeckOptions as o, SourceSpan as on, ImageStyle as ot, ShapeProps as p, StrokeDashType as pt, CssGridTemplateAreas as q, DiagnosticLabel as qt, ClassNameValueArray as r, AuthorTreeChild as rn, DeckPointLength as rt, ImageProps as s, IntrinsicTextTag$1 as sn, LayoutMode as st, ClassNameObject as t, StyleDiagnosticError as tn, CssVisibility as tt, IntrinsicPProps as u, Spacing as ut, TextRunNodeProps as v, TextStyle as vt, SlideFactory as w, AssetEntity as wt, CompositionContext as x, TextTabStopLength as xt, ViewProps as y, TextTabStopAlignment as yt, CssFlexBasis as z, SemanticTextNode as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,60 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { $ as CssOverflow, $t as DeckDiagnosticError, A as ThemeDefaults, B as CssFlexDirection, C as CompositionSourceInternals, Ct as ViewStyle, D as SourceContextMapper, E as SourceContextInput, F as CssAlignSelf, G as CssGridShorthand, H as CssGridAutoFlow, I as CssAspectRatio, J as CssGridTemplateShorthand, Jt as DiagnosticSeverity, K as CssGridTemplate, Kt as Diagnostic, L as CssBoxSizing, M as BorderStyle, N as CssAlignContent, O as Theme, P as CssAlignItems, Q as CssObjectPosition, Qt as CompositionDiagnosticError, R as CssDisplay, S as CompositionSource, St as VerticalAlign, T as SlideFactoryInput, U as CssGridLine, V as CssFlexWrap, W as CssGridPlacement, X as CssJustifyContent, Xt as formatDiagnostic, Y as CssGridTrack, Yt as Diagnostics, Z as CssJustifySelf, Zt as formatDiagnostics, _ as TextProps, _t as TextRunStyle, a as DeckJsxIntrinsicElements, an as JsxKey, at as ImageCropValue, b as COMPOSITION_SOURCE, bt as TextTabStopAuthoring, c as IntrinsicDivProps, ct as ShapeStyle, d as IntrinsicTextTag, dt as StackAlignment, en as SemanticGraphDiagnosticError, et as CssPosition, f as IntrinsicViewTag, ft as StackAxis, g as TextJsxChild, gt as TextFit, h as SlideProps, ht as StrokeLineJoin, i as ContentJsxChild, it as ImageCropAuthoring, j as StyleSheet, k as ThemeInput, kt as SemanticAuthorGraph, l as IntrinsicImgProps, lt as SlideStyle, m as SlideContext, mt as StrokeLineCap, n as ClassNameValue, nt as DeckLength, o as DeckOptions, on as SourceSpan, ot as ImageStyle, p as ShapeProps, pt as StrokeDashType, q as CssGridTemplateAreas, qt as DiagnosticLabel, r as ClassNameValueArray, rt as DeckPointLength, s as ImageProps, st as LayoutMode, t as ClassNameObject, tn as StyleDiagnosticError, tt as CssVisibility, u as IntrinsicPProps, ut as Spacing, v as TextRunNodeProps, vt as TextStyle, w as SlideFactory, x as CompositionContext, xt as TextTabStopLength, y as ViewProps, yt as TextTabStopAlignment, z as CssFlexBasis } from "./index-C5l8PX5V.mjs";
|
|
2
|
+
import { B as StageArtifactStatus, C as ProjectInspectionSummary, E as ResolvedStyleMap, F as OutputFormat, H as StageSummary, I as ProjectStages, L as ProjectionFormat, P as CompileStages, R as RenderStages, U as WrittenOutput, V as StageName, s as PptxPackageModel, z as RenderedArtifact } from "./pptx-PzEK54aA.mjs";
|
|
3
|
+
import { n as WriterAdapter, t as RenderOptions } from "./adapter-C8xw46nz.mjs";
|
|
4
|
+
import { a as createElement, c as Slide, i as Fragment, l as Text, o as Image, s as Shape, u as View } from "./jsx-runtime-DwfBuBkY.mjs";
|
|
4
5
|
|
|
6
|
+
//#region src/pipeline-runner.d.ts
|
|
7
|
+
type CompileResult = {
|
|
8
|
+
readonly ok: boolean;
|
|
9
|
+
readonly diagnostics: Diagnostics;
|
|
10
|
+
readonly stages: CompileStages;
|
|
11
|
+
readonly graph?: SemanticAuthorGraph;
|
|
12
|
+
readonly resolvedStyles?: ResolvedStyleMap;
|
|
13
|
+
};
|
|
14
|
+
type ProjectResult = {
|
|
15
|
+
readonly ok: boolean;
|
|
16
|
+
readonly diagnostics: Diagnostics;
|
|
17
|
+
readonly stages: ProjectStages;
|
|
18
|
+
readonly format: ProjectionFormat;
|
|
19
|
+
readonly projection?: PptxPackageModel;
|
|
20
|
+
readonly summary?: ProjectInspectionSummary;
|
|
21
|
+
};
|
|
22
|
+
type RenderResult = {
|
|
23
|
+
readonly ok: boolean;
|
|
24
|
+
readonly diagnostics: Diagnostics;
|
|
25
|
+
readonly stages: RenderStages;
|
|
26
|
+
readonly format: OutputFormat;
|
|
27
|
+
readonly artifact?: RenderedArtifact;
|
|
28
|
+
readonly output?: WrittenOutput;
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/deck.d.ts
|
|
32
|
+
type WithSource<TSourceContext> = [TSourceContext] extends [void] ? never : (sourceContext: TSourceContext) => BoundSource<TSourceContext>;
|
|
33
|
+
declare class BoundSource<TSourceContext = void> implements CompositionSource<TSourceContext> {
|
|
34
|
+
#private;
|
|
35
|
+
constructor(source: Deck<TSourceContext>, sourceContext: TSourceContext);
|
|
36
|
+
[COMPOSITION_SOURCE](): CompositionSourceInternals<TSourceContext>;
|
|
37
|
+
compile(): CompileResult;
|
|
38
|
+
project(): ProjectResult;
|
|
39
|
+
render(config?: RenderOptions | WriterAdapter<PptxPackageModel>): Promise<RenderResult>;
|
|
40
|
+
}
|
|
41
|
+
declare class Deck<TSourceContext = void> implements CompositionSource<TSourceContext> {
|
|
42
|
+
#private;
|
|
43
|
+
readonly withSource: WithSource<TSourceContext>;
|
|
44
|
+
constructor(options: DeckOptions);
|
|
45
|
+
get options(): DeckOptions;
|
|
46
|
+
[COMPOSITION_SOURCE](): CompositionSourceInternals<TSourceContext>;
|
|
47
|
+
useStyles(stylesheet: StyleSheet): this;
|
|
48
|
+
add(slide: SlideFactory<TSourceContext>): this;
|
|
49
|
+
mount<TChildContext>(sourceKey: string, child: Deck<TChildContext>, ...context: [TChildContext] extends [void] ? [] : [sourceContext: SourceContextInput<TSourceContext, TChildContext>]): this;
|
|
50
|
+
mount<TChildContext>(sourceKey: string, child: BoundSource<TChildContext>): this;
|
|
51
|
+
defineGraph(graph: SemanticAuthorGraph): this;
|
|
52
|
+
defineProjection(projection: PptxPackageModel): this;
|
|
53
|
+
compile(this: Deck<void>): CompileResult;
|
|
54
|
+
project(this: Deck<void>): ProjectResult;
|
|
55
|
+
render(this: Deck<void>, config?: RenderOptions | WriterAdapter<PptxPackageModel>): Promise<RenderResult>;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
5
58
|
//#region src/types.d.ts
|
|
6
59
|
declare const EMU_PER_INCH = 914400;
|
|
7
60
|
declare const POINTS_PER_INCH = 72;
|
|
@@ -20,4 +73,4 @@ declare global {
|
|
|
20
73
|
}
|
|
21
74
|
}
|
|
22
75
|
//#endregion
|
|
23
|
-
export { type
|
|
76
|
+
export { type BorderStyle, type BoundSource, type ClassNameObject, type ClassNameValue, type ClassNameValueArray, type CompileResult, type CompositionContext, CompositionDiagnosticError, type ContentJsxChild, type CssAlignContent, type CssAlignItems, type CssAlignSelf, type CssAspectRatio, type CssBoxSizing, type CssDisplay, type CssFlexBasis, type CssFlexDirection, type CssFlexWrap, type CssGridAutoFlow, type CssGridLine, type CssGridPlacement, type CssGridShorthand, type CssGridTemplate, type CssGridTemplateAreas, type CssGridTemplateShorthand, type CssGridTrack, type CssJustifyContent, type CssJustifySelf, type CssObjectPosition, type CssOverflow, type CssPosition, type CssVisibility, Deck, DeckDiagnosticError, type DeckJsxIntrinsicElements, type DeckLength, type DeckOptions, type DeckPointLength, type Diagnostic, type DiagnosticLabel, type DiagnosticSeverity, type Diagnostics, EMU_PER_INCH, Fragment, Image, type ImageCropAuthoring, type ImageCropValue, type ImageProps, type ImageStyle, type IntrinsicDivProps, type IntrinsicImgProps, type IntrinsicPProps, type IntrinsicTextTag, type IntrinsicViewTag, type JsxKey, type LayoutMode, type OutputFormat, POINTS_PER_INCH, type ProjectResult, type ProjectionFormat, type RenderResult, type RenderedArtifact, SemanticGraphDiagnosticError, Shape, type ShapeProps, type ShapeStyle, Slide, type SlideContext, type SlideFactory, type SlideFactoryInput, type SlideProps, type SlideStyle, type SourceContextMapper, type SourceSpan, type Spacing, type StackAlignment, type StackAxis, type StageArtifactStatus, type StageName, type StageSummary, type StrokeDashType, type StrokeLineCap, type StrokeLineJoin, StyleDiagnosticError, StyleSheet, Text, type TextFit, type TextJsxChild, type TextProps, type TextRunNodeProps, type TextRunStyle, type TextStyle, type TextTabStopAlignment, type TextTabStopAuthoring, type TextTabStopLength, Theme, type ThemeDefaults, type ThemeInput, type VerticalAlign, View, type ViewProps, type ViewStyle, type WrittenOutput, createElement, formatDiagnostic, formatDiagnostics };
|