deckjsx 0.3.0 → 0.3.1
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/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as ImageCropAuthoring, $t as SemanticSlideNode, A as CssBoxSizing, At as ViewProps, B as CssGridTemplateAreas, Bt as AssetEntity, C as ClassNameValueArray, Ct as TextJsxChild, D as CssAlignItems, Dt as TextTabStopAuthoring, E as CssAlignContent, Et as TextTabStopAlignment, F as CssGridAutoFlow, Ft as CompositionSourceInternals, G as CssObjectPosition, Gt as SemanticContainerNode, H as CssGridTrack, Ht as BaseSemanticNode, I as CssGridLine, It as SlideFactory, J as CssVisibility, Jt as SemanticNode, K as CssOverflow, Kt as SemanticDocumentNode, L as CssGridPlacement, Lt as SlideFactoryInput, M as CssFlexBasis, Mt as COMPOSITION_SOURCE, N as CssFlexDirection, Nt as CompositionContext, O as CssAlignSelf, Ot as TextTabStopLength, P as CssFlexWrap, Pt as CompositionSource, Q as DeckPointLength, Qt as SemanticShapeNode, R as CssGridShorthand, Rt as SourceContextInput, S as ClassNameValue, St as TextFit, T as ContentJsxChild, Tt as TextStyle, U as CssJustifyContent, Ut as GraphNodeId, V as CssGridTemplateShorthand, Vt as AssetEntityId, W as CssJustifySelf, Wt as SemanticAuthorGraph, X as DeckLength, Xt as SemanticOrigin, Y as DeckJsxIntrinsicElements, Yt as SemanticNodeKind, Z as DeckOptions, Zt as SemanticRole, _ as AuthorNodeProps, _n as JsxKey, _t as StackAlignment, a as createElement, an as StyleEntity, at as IntrinsicImgProps, b as BorderStyle, bt as StrokeLineCap, c as isSlideNode, cn as DiagnosticLabel, ct as IntrinsicViewTag, d as Slide, dn as formatDiagnostic, dt as OutputConfig, en as SemanticTextNode, et as ImageCropValue, f as Text, fn as formatDiagnostics, ft as ShapeProps, g as AuthorNodeMap, gt as Spacing, h as AuthorNodeKind, hn as SemanticGraphDiagnosticError, ht as SlideStyle, i as Fragment, in as StyleClassRef, it as IntrinsicDivProps, j as CssDisplay, jt as ViewStyle, k as CssAspectRatio, kt as VerticalAlign, l as Image, ln as DiagnosticSeverity, lt as JsxNode, m as AuthorNode, mn as DeckDiagnosticError, mt as SlideProps, nn as SourceIdentity, nt as ImageStyle, o as isAuthorNode, on as StyleEntityId, ot as IntrinsicPProps, p as View, pn as CompositionDiagnosticError, pt as ShapeStyle, q as CssPosition, qt as SemanticImageNode, rn as SourceOrigin, rt as ImplementedBackendName, s as isContentNode, sn as Diagnostic, st as IntrinsicTextTag, tn as SemanticTextRunNode, tt as ImageProps, u as Shape, un as Diagnostics, ut as LayoutMode, v as AuthorNodePropsMap, vn as SourceSpan, vt as StackAxis, w as ContentAuthorNode, wt as TextProps, x as ClassNameObject, xt as StrokeLineJoin, y as BackendName, yt as StrokeDashType, z as CssGridTemplate, zt as SourceContextMapper } from "./jsx-runtime-CJ9_d_0Q.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/ir/index.d.ts
|
|
4
4
|
type PresentationIR = {
|
|
@@ -304,4 +304,4 @@ declare global {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
//#endregion
|
|
307
|
-
export { type AssetEntity, type AssetEntityId, type AuthorNode, type AuthorNodeKind, type AuthorNodeMap, type AuthorNodeProps, type AuthorNodePropsMap, type BackendArtifact, type BackendName, type BackgroundImageLayerIR, type BackgroundLayerIR, type BaseNodeIR, type BaseSemanticNode, type BorderStyle, type BoundSource, type CompileBackend, type CompileInspectResult, type CompileMode, type CompositionContext, CompositionDiagnosticError, type ContentAuthorNode, 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, type EdgeStrokeIR, type FillIR, Fragment, type FrameIR, type GraphNodeId, type GroupIR, type HyperlinkIR, Image, type ImageCropAuthoring, type ImageCropIR, type ImageCropValue, type ImageIR, type ImageProps, type ImageSourceIR, type ImageStyle, type ImplementedBackendName, type IntrinsicDivProps, type IntrinsicImgProps, type IntrinsicPProps, type IntrinsicTextTag, type IntrinsicViewTag, type JsxKey, type JsxNode, type LayoutMode, type LinearGradientFillIR, type LinearGradientStopIR, type NodeIR, type ObjectPositionIR, type OutputConfig, POINTS_PER_INCH, type PresentationIR, type RadialGradientFillIR, type SemanticAuthorGraph, type SemanticContainerNode, type SemanticDocumentNode, SemanticGraphDiagnosticError, type SemanticImageNode, type SemanticNode, type SemanticNodeKind, type SemanticOrigin, type SemanticRole, type SemanticShapeNode, type SemanticSlideNode, type SemanticTextNode, type SemanticTextRunNode, type ShadowIR, Shape, type ShapeIR, type ShapeProps, type ShapeStyle, type SizeIR, Slide, type SlideFactory, type SlideFactoryInput, type SlideIR, type SlideProps, type SlideStyle, type SolidFillIR, type SourceContextMapper, type SourceIdentity, type SourceOrigin, type SourceSpan, type Spacing, type StackAlignment, type StackAxis, type StrokeDashType, type StrokeIR, type StrokeLineCap, type StrokeLineJoin, type StyleEntity, type StyleEntityId, Text, type TextBulletListIR, type TextContentIR, type TextFit, type TextIR, type TextJsxChild, type TextListIR, type TextNoListIR, type TextNumberListIR, type TextProps, type TextRunIR, type TextStyle, type TextStyleIR, type TextTabStopAlignment, type TextTabStopAuthoring, type TextTabStopIR, type TextTabStopLength, type VerticalAlign, View, type ViewProps, type ViewStyle, createElement, formatDiagnostic, formatDiagnostics, isAuthorNode, isContentNode, isSlideNode, pptxgenjsBackend };
|
|
307
|
+
export { type AssetEntity, type AssetEntityId, type AuthorNode, type AuthorNodeKind, type AuthorNodeMap, type AuthorNodeProps, type AuthorNodePropsMap, type BackendArtifact, type BackendName, type BackgroundImageLayerIR, type BackgroundLayerIR, type BaseNodeIR, type BaseSemanticNode, type BorderStyle, type BoundSource, type ClassNameObject, type ClassNameValue, type ClassNameValueArray, type CompileBackend, type CompileInspectResult, type CompileMode, type CompositionContext, CompositionDiagnosticError, type ContentAuthorNode, 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, type EdgeStrokeIR, type FillIR, Fragment, type FrameIR, type GraphNodeId, type GroupIR, type HyperlinkIR, Image, type ImageCropAuthoring, type ImageCropIR, type ImageCropValue, type ImageIR, type ImageProps, type ImageSourceIR, type ImageStyle, type ImplementedBackendName, type IntrinsicDivProps, type IntrinsicImgProps, type IntrinsicPProps, type IntrinsicTextTag, type IntrinsicViewTag, type JsxKey, type JsxNode, type LayoutMode, type LinearGradientFillIR, type LinearGradientStopIR, type NodeIR, type ObjectPositionIR, type OutputConfig, POINTS_PER_INCH, type PresentationIR, type RadialGradientFillIR, type SemanticAuthorGraph, type SemanticContainerNode, type SemanticDocumentNode, SemanticGraphDiagnosticError, type SemanticImageNode, type SemanticNode, type SemanticNodeKind, type SemanticOrigin, type SemanticRole, type SemanticShapeNode, type SemanticSlideNode, type SemanticTextNode, type SemanticTextRunNode, type ShadowIR, Shape, type ShapeIR, type ShapeProps, type ShapeStyle, type SizeIR, Slide, type SlideFactory, type SlideFactoryInput, type SlideIR, type SlideProps, type SlideStyle, type SolidFillIR, type SourceContextMapper, type SourceIdentity, type SourceOrigin, type SourceSpan, type Spacing, type StackAlignment, type StackAxis, type StrokeDashType, type StrokeIR, type StrokeLineCap, type StrokeLineJoin, type StyleClassRef, type StyleEntity, type StyleEntityId, Text, type TextBulletListIR, type TextContentIR, type TextFit, type TextIR, type TextJsxChild, type TextListIR, type TextNoListIR, type TextNumberListIR, type TextProps, type TextRunIR, type TextStyle, type TextStyleIR, type TextTabStopAlignment, type TextTabStopAuthoring, type TextTabStopIR, type TextTabStopLength, type VerticalAlign, View, type ViewProps, type ViewStyle, createElement, formatDiagnostic, formatDiagnostics, isAuthorNode, isContentNode, isSlideNode, pptxgenjsBackend };
|
package/dist/index.mjs
CHANGED
|
@@ -4582,20 +4582,44 @@ function textOriginFor(node, path, context) {
|
|
|
4582
4582
|
};
|
|
4583
4583
|
}
|
|
4584
4584
|
function propsWithoutStyle(props) {
|
|
4585
|
-
const { style: _style, children: _children, ...direct } = props;
|
|
4585
|
+
const { style: _style, children: _children, className: _className, ...direct } = props;
|
|
4586
4586
|
return Object.keys(direct).length === 0 ? void 0 : direct;
|
|
4587
4587
|
}
|
|
4588
|
+
function collectClassNames(value, names) {
|
|
4589
|
+
if (value === false || value === null || value === void 0) return;
|
|
4590
|
+
if (typeof value === "string") {
|
|
4591
|
+
names.push(...value.trim().split(/\s+/).filter(Boolean));
|
|
4592
|
+
return;
|
|
4593
|
+
}
|
|
4594
|
+
if (Array.isArray(value)) {
|
|
4595
|
+
value.forEach((item) => collectClassNames(item, names));
|
|
4596
|
+
return;
|
|
4597
|
+
}
|
|
4598
|
+
if (typeof value === "object") Object.entries(value).forEach(([name, enabled]) => {
|
|
4599
|
+
if (enabled === true) collectClassNames(name, names);
|
|
4600
|
+
});
|
|
4601
|
+
}
|
|
4602
|
+
function classRefsFor(value) {
|
|
4603
|
+
const names = [];
|
|
4604
|
+
collectClassNames(value, names);
|
|
4605
|
+
return names.length === 0 ? void 0 : names.map((name, index) => ({
|
|
4606
|
+
name,
|
|
4607
|
+
index
|
|
4608
|
+
}));
|
|
4609
|
+
}
|
|
4588
4610
|
function styleRefFor(state, idMaterial, target, props) {
|
|
4589
4611
|
const style = props.style;
|
|
4590
4612
|
const direct = propsWithoutStyle(props);
|
|
4591
|
-
|
|
4613
|
+
const classRefs = classRefsFor(props.className);
|
|
4614
|
+
if (style === void 0 && direct === void 0 && classRefs === void 0) return;
|
|
4592
4615
|
const id = styleEntityId(idMaterial);
|
|
4593
4616
|
state.styles.set(id, {
|
|
4594
4617
|
id,
|
|
4595
4618
|
target,
|
|
4596
4619
|
authored: {
|
|
4597
4620
|
...style !== void 0 ? { style } : {},
|
|
4598
|
-
...direct !== void 0 ? { direct } : {}
|
|
4621
|
+
...direct !== void 0 ? { direct } : {},
|
|
4622
|
+
...classRefs !== void 0 ? { classRefs } : {}
|
|
4599
4623
|
}
|
|
4600
4624
|
});
|
|
4601
4625
|
return id;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _n as JsxKey, gn as AuthorTreeNode, i as Fragment, n as jsx, r as jsxs, t as JSX } from "./jsx-runtime-CJ9_d_0Q.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/jsx-dev-runtime.d.ts
|
|
4
4
|
declare function jsxDEV(type: unknown, props: unknown, key?: JsxKey, _isStaticChildren?: boolean, source?: unknown): AuthorTreeNode;
|
|
@@ -167,14 +167,18 @@ type SemanticShapeNode = BaseSemanticNode & {
|
|
|
167
167
|
readonly kind: "shape";
|
|
168
168
|
};
|
|
169
169
|
type SemanticNode = SemanticContainerNode | SemanticDocumentNode | SemanticImageNode | SemanticShapeNode | SemanticSlideNode | SemanticTextNode | SemanticTextRunNode;
|
|
170
|
+
type StyleClassRef = {
|
|
171
|
+
readonly name: string;
|
|
172
|
+
readonly index: number;
|
|
173
|
+
};
|
|
170
174
|
type StyleEntity = {
|
|
171
175
|
readonly id: StyleEntityId;
|
|
172
176
|
readonly target: SemanticNodeKind;
|
|
173
177
|
readonly authored: {
|
|
174
178
|
readonly style?: unknown;
|
|
175
179
|
readonly direct?: unknown;
|
|
180
|
+
readonly classRefs?: readonly StyleClassRef[];
|
|
176
181
|
};
|
|
177
|
-
readonly resolved?: unknown;
|
|
178
182
|
};
|
|
179
183
|
type AssetEntity = {
|
|
180
184
|
readonly id: AssetEntityId;
|
|
@@ -305,6 +309,12 @@ interface ViewIntrinsicJsxChildArray extends ReadonlyArray<ViewIntrinsicJsxChild
|
|
|
305
309
|
type ViewIntrinsicJsxChild = ContentJsxChild | string | number | ViewIntrinsicJsxChildArray;
|
|
306
310
|
interface JsxNodeArray extends ReadonlyArray<JsxNode> {}
|
|
307
311
|
type JsxNode = AuthorNode | AuthorTreeNode | string | number | boolean | null | undefined | JsxNodeArray;
|
|
312
|
+
interface ClassNameValueArray extends ReadonlyArray<ClassNameValue> {}
|
|
313
|
+
type ClassNameObject = Readonly<Record<string, boolean | null | undefined>>;
|
|
314
|
+
type ClassNameValue = string | false | null | undefined | ClassNameValueArray | ClassNameObject;
|
|
315
|
+
type ClassNameAuthorProps = {
|
|
316
|
+
className?: ClassNameValue;
|
|
317
|
+
};
|
|
308
318
|
type BaseAuthorProps = {
|
|
309
319
|
opacity?: number;
|
|
310
320
|
rotation?: number;
|
|
@@ -526,6 +536,7 @@ type OutputConfig = {
|
|
|
526
536
|
};
|
|
527
537
|
type SlideNodeProps = {
|
|
528
538
|
name?: string;
|
|
539
|
+
className?: ClassNameValue;
|
|
529
540
|
style?: SlideStyle;
|
|
530
541
|
background?: string;
|
|
531
542
|
backgroundImage?: string;
|
|
@@ -542,19 +553,19 @@ type SlideProps = SlideNodeProps & {
|
|
|
542
553
|
};
|
|
543
554
|
type ViewNodeProps = {
|
|
544
555
|
style?: ViewStyle;
|
|
545
|
-
} & ViewStyle;
|
|
556
|
+
} & ClassNameAuthorProps & ViewStyle;
|
|
546
557
|
type ViewProps = ViewNodeProps & {
|
|
547
558
|
children?: ContentJsxChild;
|
|
548
559
|
};
|
|
549
560
|
type TextNodeProps = {
|
|
550
561
|
style?: TextStyle;
|
|
551
|
-
} & TextStyle;
|
|
562
|
+
} & ClassNameAuthorProps & TextStyle;
|
|
552
563
|
type TextProps = TextNodeProps & {
|
|
553
564
|
children?: TextJsxChild;
|
|
554
565
|
};
|
|
555
566
|
type ImageNodeProps = {
|
|
556
567
|
style?: ImageStyle;
|
|
557
|
-
} & ImageStyle & ({
|
|
568
|
+
} & ClassNameAuthorProps & ImageStyle & ({
|
|
558
569
|
src: string;
|
|
559
570
|
data?: string;
|
|
560
571
|
} | {
|
|
@@ -567,7 +578,7 @@ type ImageProps = ImageNodeProps & {
|
|
|
567
578
|
type ShapeNodeProps = {
|
|
568
579
|
style?: ShapeStyle;
|
|
569
580
|
shape: "rect" | "ellipse" | "line";
|
|
570
|
-
} & ShapeStyle;
|
|
581
|
+
} & ClassNameAuthorProps & ShapeStyle;
|
|
571
582
|
type ShapeProps = ShapeNodeProps & {
|
|
572
583
|
children?: never;
|
|
573
584
|
};
|
|
@@ -677,4 +688,4 @@ declare namespace JSX {
|
|
|
677
688
|
}
|
|
678
689
|
}
|
|
679
690
|
//#endregion
|
|
680
|
-
export {
|
|
691
|
+
export { ImageCropAuthoring as $, SemanticSlideNode as $t, CssBoxSizing as A, ViewProps as At, CssGridTemplateAreas as B, AssetEntity as Bt, ClassNameValueArray as C, TextJsxChild as Ct, CssAlignItems as D, TextTabStopAuthoring as Dt, CssAlignContent as E, TextTabStopAlignment as Et, CssGridAutoFlow as F, CompositionSourceInternals as Ft, CssObjectPosition as G, SemanticContainerNode as Gt, CssGridTrack as H, BaseSemanticNode as Ht, CssGridLine as I, SlideFactory as It, CssVisibility as J, SemanticNode as Jt, CssOverflow as K, SemanticDocumentNode as Kt, CssGridPlacement as L, SlideFactoryInput as Lt, CssFlexBasis as M, COMPOSITION_SOURCE as Mt, CssFlexDirection as N, CompositionContext as Nt, CssAlignSelf as O, TextTabStopLength as Ot, CssFlexWrap as P, CompositionSource as Pt, DeckPointLength as Q, SemanticShapeNode as Qt, CssGridShorthand as R, SourceContextInput as Rt, ClassNameValue as S, TextFit as St, ContentJsxChild as T, TextStyle as Tt, CssJustifyContent as U, GraphNodeId as Ut, CssGridTemplateShorthand as V, AssetEntityId as Vt, CssJustifySelf as W, SemanticAuthorGraph as Wt, DeckLength as X, SemanticOrigin as Xt, DeckJsxIntrinsicElements as Y, SemanticNodeKind as Yt, DeckOptions as Z, SemanticRole as Zt, AuthorNodeProps as _, JsxKey as _n, StackAlignment as _t, createElement as a, StyleEntity as an, IntrinsicImgProps as at, BorderStyle as b, StrokeLineCap as bt, isSlideNode as c, DiagnosticLabel as cn, IntrinsicViewTag as ct, Slide as d, formatDiagnostic as dn, OutputConfig as dt, SemanticTextNode as en, ImageCropValue as et, Text as f, formatDiagnostics as fn, ShapeProps as ft, AuthorNodeMap as g, AuthorTreeNode as gn, Spacing as gt, AuthorNodeKind as h, SemanticGraphDiagnosticError as hn, SlideStyle as ht, Fragment as i, StyleClassRef as in, IntrinsicDivProps as it, CssDisplay as j, ViewStyle as jt, CssAspectRatio as k, VerticalAlign as kt, Image as l, DiagnosticSeverity as ln, JsxNode as lt, AuthorNode as m, DeckDiagnosticError as mn, SlideProps as mt, jsx as n, SourceIdentity as nn, ImageStyle as nt, isAuthorNode as o, StyleEntityId as on, IntrinsicPProps as ot, View as p, CompositionDiagnosticError as pn, ShapeStyle as pt, CssPosition as q, SemanticImageNode as qt, jsxs as r, SourceOrigin as rn, ImplementedBackendName as rt, isContentNode as s, Diagnostic as sn, IntrinsicTextTag as st, JSX as t, SemanticTextRunNode as tn, ImageProps as tt, Shape as u, Diagnostics as un, LayoutMode as ut, AuthorNodePropsMap as v, SourceSpan as vn, StackAxis as vt, ContentAuthorNode as w, TextProps as wt, ClassNameObject as x, StrokeLineJoin as xt, BackendName as y, StrokeDashType as yt, CssGridTemplate as z, SourceContextMapper as zt };
|
package/dist/jsx-runtime.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _n as JsxKey, i as Fragment, n as jsx, r as jsxs, t as JSX } from "./jsx-runtime-CJ9_d_0Q.mjs";
|
|
2
2
|
export { Fragment, JSX, JsxKey, jsx, jsxs };
|