deckjsx 0.3.0 → 0.4.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/dist/index.d.mts CHANGED
@@ -1,5 +1,35 @@
1
- import { $ as ImageStyle, $t as SourceIdentity, A as CssFlexDirection, At as CompositionContext, B as CssJustifyContent, Bt as GraphNodeId, C as CssAlignContent, Ct as TextTabStopAlignment, D as CssBoxSizing, Dt as ViewProps, E as CssAspectRatio, Et as VerticalAlign, F as CssGridShorthand, Ft as SourceContextInput, G as CssVisibility, Gt as SemanticNode, H as CssObjectPosition, Ht as SemanticContainerNode, I as CssGridTemplate, It as SourceContextMapper, J as DeckOptions, Jt as SemanticRole, K as DeckJsxIntrinsicElements, Kt as SemanticNodeKind, L as CssGridTemplateAreas, Lt as AssetEntity, M as CssGridAutoFlow, Mt as CompositionSourceInternals, N as CssGridLine, Nt as SlideFactory, O as CssDisplay, Ot as ViewStyle, P as CssGridPlacement, Pt as SlideFactoryInput, Q as ImageProps, Qt as SemanticTextRunNode, R as CssGridTemplateShorthand, Rt as AssetEntityId, S as ContentJsxChild, St as TextStyle, T as CssAlignSelf, Tt as TextTabStopLength, U as CssOverflow, Ut as SemanticDocumentNode, V as CssJustifySelf, Vt as SemanticAuthorGraph, W as CssPosition, Wt as SemanticImageNode, X as ImageCropAuthoring, Xt as SemanticSlideNode, Y as DeckPointLength, Yt as SemanticShapeNode, Z as ImageCropValue, Zt as SemanticTextNode, _ as AuthorNodeProps, _t as StrokeLineCap, a as createElement, an as DiagnosticSeverity, at as IntrinsicViewTag, b as BorderStyle, bt as TextJsxChild, c as isSlideNode, cn as formatDiagnostics, ct as OutputConfig, d as Slide, dn as SemanticGraphDiagnosticError, dt as SlideProps, en as SourceOrigin, et as ImplementedBackendName, f as Text, ft as SlideStyle, g as AuthorNodeMap, gt as StrokeDashType, h as AuthorNodeKind, ht as StackAxis, i as Fragment, in as DiagnosticLabel, it as IntrinsicTextTag, j as CssFlexWrap, jt as CompositionSource, k as CssFlexBasis, kt as COMPOSITION_SOURCE, l as Image, ln as CompositionDiagnosticError, lt as ShapeProps, m as AuthorNode, mn as SourceSpan, mt as StackAlignment, nn as StyleEntityId, nt as IntrinsicImgProps, o as isAuthorNode, on as Diagnostics, ot as JsxNode, p as View, pn as JsxKey, pt as Spacing, q as DeckLength, qt as SemanticOrigin, rn as Diagnostic, rt as IntrinsicPProps, s as isContentNode, sn as formatDiagnostic, st as LayoutMode, tn as StyleEntity, tt as IntrinsicDivProps, u as Shape, un as DeckDiagnosticError, ut as ShapeStyle, v as AuthorNodePropsMap, vt as StrokeLineJoin, w as CssAlignItems, wt as TextTabStopAuthoring, x as ContentAuthorNode, xt as TextProps, y as BackendName, yt as TextFit, z as CssGridTrack, zt as BaseSemanticNode } from "./jsx-runtime-DauuRkY2.mjs";
1
+ import { $ as ImageCropAuthoring, $t as SemanticDocumentNode, A as CssBoxSizing, At as TextRunStyle, B as CssGridTemplateAreas, Bt as CompositionContext, C as ClassNameValueArray, Cn as StyleDiagnosticError, Ct as StyleClassStyle, D as CssAlignItems, Dt as TextJsxChild, E as CssAlignContent, En as SourceSpan, Et as TextFit, F as CssGridAutoFlow, Ft as VerticalAlign, G as CssObjectPosition, Gt as SourceContextInput, H as CssGridTrack, Ht as CompositionSourceInternals, I as CssGridLine, It as ViewProps, J as CssVisibility, Jt as AssetEntityId, K as CssOverflow, Kt as SourceContextMapper, L as CssGridPlacement, Lt as ViewStyle, M as CssFlexBasis, Mt as TextTabStopAlignment, N as CssFlexDirection, Nt as TextTabStopAuthoring, O as CssAlignSelf, Ot as TextProps, P as CssFlexWrap, Pt as TextTabStopLength, Q as DeckPointLength, Qt as SemanticContainerNode, R as CssGridShorthand, Rt as defineStyles, S as ClassNameValue, Sn as SemanticGraphDiagnosticError, St as StyleClassDefinition, T as ContentJsxChild, Tn as JsxKey, Tt as StyleTargetSelector, U as CssJustifyContent, Ut as SlideFactory, V as CssGridTemplateShorthand, Vt as CompositionSource, W as CssJustifySelf, Wt as SlideFactoryInput, X as DeckLength, Xt as GraphNodeId, Y as DeckJsxIntrinsicElements, Yt as BaseSemanticNode, Z as DeckOptions, Zt as SemanticAuthorGraph, _ as AuthorNodeProps, _n as Diagnostics, _t as StackAlignment, a as createElement, an as SemanticShapeNode, at as IntrinsicImgProps, b as BorderStyle, bn as CompositionDiagnosticError, bt as StrokeLineCap, c as isSlideNode, cn as SemanticTextRunNode, ct as IntrinsicViewTag, d as Slide, dn as StyleClassRef, dt as OutputConfig, en as SemanticImageNode, et as ImageCropValue, f as Text, fn as StyleEntity, ft as ShapeProps, g as AuthorNodeMap, gn as DiagnosticSeverity, gt as Spacing, h as AuthorNodeKind, hn as DiagnosticLabel, ht as SlideStyle, i as Fragment, in as SemanticRole, it as IntrinsicDivProps, j as CssDisplay, jt as TextStyle, k as CssAspectRatio, kt as TextRunNodeProps, l as Image, ln as SourceIdentity, lt as JsxNode, m as AuthorNode, mn as Diagnostic, mt as SlideProps, nn as SemanticNodeKind, nt as ImageStyle, o as isAuthorNode, on as SemanticSlideNode, ot as IntrinsicPProps, p as View, pn as StyleEntityId, pt as ShapeStyle, q as CssPosition, qt as AssetEntity, rn as SemanticOrigin, rt as ImplementedBackendName, s as isContentNode, sn as SemanticTextNode, st as IntrinsicTextTag, tn as SemanticNode, tt as ImageProps, u as Shape, un as SourceOrigin, ut as LayoutMode, v as AuthorNodePropsMap, vn as formatDiagnostic, vt as StackAxis, w as ContentAuthorNode, wt as StyleSheet, x as ClassNameObject, xn as DeckDiagnosticError, xt as StrokeLineJoin, y as BackendName, yn as formatDiagnostics, yt as StrokeDashType, z as CssGridTemplate, zt as COMPOSITION_SOURCE } from "./jsx-runtime-BMKEs7aG.mjs";
2
2
 
3
+ //#region src/style/resolve.d.ts
4
+ type ResolvedStyleLayer = "default" | "theme" | "class" | "style";
5
+ type ResolvedStyleSource = {
6
+ readonly layer: "default";
7
+ } | {
8
+ readonly layer: "theme";
9
+ } | {
10
+ readonly layer: "class";
11
+ readonly className: string;
12
+ readonly stylesheetIndex: number;
13
+ readonly ruleIndex: number;
14
+ readonly selector: string;
15
+ } | {
16
+ readonly layer: "style";
17
+ };
18
+ type ResolvedStyleProperty = {
19
+ readonly value: unknown;
20
+ readonly source: ResolvedStyleSource;
21
+ };
22
+ type ResolvedStyle = {
23
+ readonly style: Readonly<Record<string, unknown>>;
24
+ readonly properties: Readonly<Record<string, ResolvedStyleProperty>>;
25
+ readonly appliedClasses: readonly ResolvedStyleSource[];
26
+ };
27
+ type ResolvedStyleMap = ReadonlyMap<StyleEntityId, ResolvedStyle>;
28
+ type StyleResolutionResult = {
29
+ readonly resolvedStyles: ResolvedStyleMap;
30
+ readonly diagnostics: Diagnostics;
31
+ };
32
+ //#endregion
3
33
  //#region src/ir/index.d.ts
4
34
  type PresentationIR = {
5
35
  version: "0.1";
@@ -247,6 +277,7 @@ type CompileMode = "inspect" | "strict";
247
277
  type CompileInspectResult = {
248
278
  readonly graph?: SemanticAuthorGraph;
249
279
  readonly diagnostics: Diagnostics;
280
+ readonly resolvedStyles?: ResolvedStyleMap;
250
281
  };
251
282
  type WithSource<TSourceContext> = [TSourceContext] extends [void] ? never : (sourceContext: TSourceContext) => BoundSource<TSourceContext>;
252
283
  declare class BoundSource<TSourceContext = void> implements CompositionSource<TSourceContext> {
@@ -269,6 +300,7 @@ declare class Deck<TSourceContext = void> implements CompositionSource<TSourceCo
269
300
  constructor(options: DeckOptions);
270
301
  get options(): DeckOptions;
271
302
  [COMPOSITION_SOURCE](): CompositionSourceInternals<TSourceContext>;
303
+ useStyles(stylesheet: StyleSheet): this;
272
304
  add(slide: SlideFactory<TSourceContext>): this;
273
305
  mount<TChildContext>(sourceKey: string, child: Deck<TChildContext>, ...context: [TChildContext] extends [void] ? [] : [sourceContext: SourceContextInput<TSourceContext, TChildContext>]): this;
274
306
  mount<TChildContext>(sourceKey: string, child: BoundSource<TChildContext>): this;
@@ -304,4 +336,4 @@ declare global {
304
336
  }
305
337
  }
306
338
  //#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 };
339
+ 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 ResolvedStyle, type ResolvedStyleLayer, type ResolvedStyleMap, type ResolvedStyleProperty, type ResolvedStyleSource, 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 StyleClassDefinition, type StyleClassRef, type StyleClassStyle, StyleDiagnosticError, type StyleEntity, type StyleEntityId, type StyleResolutionResult, type StyleSheet, type StyleTargetSelector, Text, type TextBulletListIR, type TextContentIR, type TextFit, type TextIR, type TextJsxChild, type TextListIR, type TextNoListIR, type TextNumberListIR, type TextProps, type TextRunIR, type TextRunNodeProps, type TextRunStyle, type TextStyle, type TextStyleIR, type TextTabStopAlignment, type TextTabStopAuthoring, type TextTabStopIR, type TextTabStopLength, type VerticalAlign, View, type ViewProps, type ViewStyle, createElement, defineStyles, formatDiagnostic, formatDiagnostics, isAuthorNode, isContentNode, isSlideNode, pptxgenjsBackend };
package/dist/index.mjs CHANGED
@@ -28,6 +28,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  }) : target, mod));
29
29
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
30
30
  //#endregion
31
+ //#region src/authoring/index.ts
32
+ function defineStyles(stylesheet) {
33
+ return stylesheet;
34
+ }
35
+ //#endregion
31
36
  //#region src/types.ts
32
37
  const EMU_PER_INCH = 914400;
33
38
  const POINTS_PER_INCH = 72;
@@ -4189,6 +4194,12 @@ var CompositionDiagnosticError = class extends DeckDiagnosticError {
4189
4194
  this.name = "CompositionDiagnosticError";
4190
4195
  }
4191
4196
  };
4197
+ var StyleDiagnosticError = class extends DeckDiagnosticError {
4198
+ constructor(diagnostics) {
4199
+ super(formatDiagnostics(diagnostics), diagnostics);
4200
+ this.name = "StyleDiagnosticError";
4201
+ }
4202
+ };
4192
4203
  //#endregion
4193
4204
  //#region src/diagnostics/index.ts
4194
4205
  function createDiagnostics(items = []) {
@@ -4402,6 +4413,7 @@ function resolveSource(source, context) {
4402
4413
  return {
4403
4414
  source: context.source,
4404
4415
  sourceIdentityMaterial: context.sourceIdentityMaterial,
4416
+ stylesheets: sourceState.stylesheets,
4405
4417
  context: effectiveContext,
4406
4418
  entries,
4407
4419
  slideCount,
@@ -4440,6 +4452,7 @@ function flattenPlan(plan, deckTotalSlides, deckSlideIndex, roots, diagnostics)
4440
4452
  root,
4441
4453
  source: plan.source,
4442
4454
  sourceIdentityMaterial: plan.sourceIdentityMaterial,
4455
+ stylesheets: plan.stylesheets,
4443
4456
  path: entry.path,
4444
4457
  composition,
4445
4458
  slotOrigins: plan.slotOrigins
@@ -4581,21 +4594,53 @@ function textOriginFor(node, path, context) {
4581
4594
  ...node.sourceSpan ? { sourceSpan: node.sourceSpan } : {}
4582
4595
  };
4583
4596
  }
4584
- function propsWithoutStyle(props) {
4585
- const { style: _style, children: _children, ...direct } = props;
4586
- return Object.keys(direct).length === 0 ? void 0 : direct;
4597
+ function collectClassNames(value, names) {
4598
+ if (value === false || value === null || value === void 0) return;
4599
+ if (typeof value === "string") {
4600
+ names.push(...value.trim().split(/\s+/).filter(Boolean));
4601
+ return;
4602
+ }
4603
+ if (Array.isArray(value)) {
4604
+ value.forEach((item) => collectClassNames(item, names));
4605
+ return;
4606
+ }
4607
+ if (typeof value === "object") Object.entries(value).forEach(([name, enabled]) => {
4608
+ if (enabled === true) collectClassNames(name, names);
4609
+ });
4610
+ }
4611
+ function classRefsFor(value) {
4612
+ const names = [];
4613
+ collectClassNames(value, names);
4614
+ return names.length === 0 ? void 0 : names.map((name, index) => ({
4615
+ name,
4616
+ index
4617
+ }));
4618
+ }
4619
+ function directStyleProps(props) {
4620
+ const { children: _children, className: _className, data: _data, name: _name, shape: _shape, src: _src, style: _style, ...directStyle } = props;
4621
+ return Object.keys(directStyle).length === 0 ? void 0 : directStyle;
4622
+ }
4623
+ function mergedAuthoredStyle(props) {
4624
+ const directStyle = directStyleProps(props);
4625
+ const inlineStyle = props.style;
4626
+ if (directStyle === void 0) return inlineStyle;
4627
+ if (inlineStyle !== void 0 && (typeof inlineStyle !== "object" || inlineStyle === null || Array.isArray(inlineStyle))) return inlineStyle;
4628
+ return {
4629
+ ...directStyle,
4630
+ ...inlineStyle
4631
+ };
4587
4632
  }
4588
4633
  function styleRefFor(state, idMaterial, target, props) {
4589
- const style = props.style;
4590
- const direct = propsWithoutStyle(props);
4591
- if (style === void 0 && direct === void 0) return;
4634
+ const style = mergedAuthoredStyle(props);
4635
+ const classRefs = classRefsFor(props.className);
4636
+ if (style === void 0 && classRefs === void 0) return;
4592
4637
  const id = styleEntityId(idMaterial);
4593
4638
  state.styles.set(id, {
4594
4639
  id,
4595
4640
  target,
4596
4641
  authored: {
4597
4642
  ...style !== void 0 ? { style } : {},
4598
- ...direct !== void 0 ? { direct } : {}
4643
+ ...classRefs !== void 0 ? { classRefs } : {}
4599
4644
  }
4600
4645
  });
4601
4646
  return id;
@@ -4851,6 +4896,7 @@ function asComposedRoot(root, index) {
4851
4896
  root,
4852
4897
  source: rootSource(),
4853
4898
  sourceIdentityMaterial: ["source", "root"],
4899
+ stylesheets: [],
4854
4900
  path: `document > slideFactory[${index}]`,
4855
4901
  composition: {
4856
4902
  slideIndex: index,
@@ -4910,6 +4956,237 @@ function buildSemanticAuthorGraph(roots) {
4910
4956
  };
4911
4957
  }
4912
4958
  //#endregion
4959
+ //#region src/style/resolve.ts
4960
+ function sourceKeyFor(source) {
4961
+ return !source || source.kind === "root" ? "root" : source.sourceIdentity;
4962
+ }
4963
+ function classesBySource(roots) {
4964
+ const stylesheets = /* @__PURE__ */ new Map();
4965
+ roots.forEach((root) => {
4966
+ const key = sourceKeyFor(root.source);
4967
+ if (!stylesheets.has(key)) stylesheets.set(key, root.stylesheets);
4968
+ });
4969
+ return stylesheets;
4970
+ }
4971
+ function isTargetedDefinition(definition) {
4972
+ return typeof definition === "object" && definition !== null && "style" in definition && typeof definition.style === "object" && definition.style !== null;
4973
+ }
4974
+ function styleObjectFor(definition) {
4975
+ return isTargetedDefinition(definition) ? definition.style : definition;
4976
+ }
4977
+ function targetsFor(definition) {
4978
+ if (!isTargetedDefinition(definition) || definition.target === void 0) return;
4979
+ return typeof definition.target === "string" ? [definition.target] : definition.target;
4980
+ }
4981
+ function invalidClassNameReason(name) {
4982
+ if (name.trim().length === 0) return "Style Class names must not be empty.";
4983
+ if (/\s/.test(name)) return "Style Class names must not contain whitespace.";
4984
+ if (name.includes("/")) return "Style Class names must not contain /.";
4985
+ }
4986
+ function styleDiagnostic(input) {
4987
+ return diagnostic({
4988
+ severity: "error",
4989
+ code: input.code,
4990
+ title: input.title,
4991
+ message: input.message,
4992
+ labels: [{
4993
+ path: input.path,
4994
+ message: input.message
4995
+ }],
4996
+ ...input.help ? { help: input.help } : {}
4997
+ });
4998
+ }
4999
+ function compareSpecificity(left, right) {
5000
+ return left[0] - right[0] || left[1] - right[1] || left[2] - right[2];
5001
+ }
5002
+ function parseSelector(selector) {
5003
+ const value = selector.trim();
5004
+ if (value.length === 0 || /[\s>+~#:[\],*]/.test(value)) return;
5005
+ const tag = value.match(/^[a-z][a-z0-9-]*/)?.[0];
5006
+ const rest = tag ? value.slice(tag.length) : value;
5007
+ if (rest.length === 0) return {
5008
+ ...tag ? { tag } : {},
5009
+ classes: [],
5010
+ specificity: [
5011
+ 0,
5012
+ 0,
5013
+ tag ? 1 : 0
5014
+ ]
5015
+ };
5016
+ const classMatches = [...rest.matchAll(/\.([_a-zA-Z-][_a-zA-Z0-9-]*)/g)];
5017
+ if (classMatches.map((match) => match[0]).join("") !== rest || classMatches.length === 0) return;
5018
+ return {
5019
+ ...tag ? { tag } : {},
5020
+ classes: classMatches.map((match) => match[1]),
5021
+ specificity: [
5022
+ 0,
5023
+ classMatches.length,
5024
+ tag ? 1 : 0
5025
+ ]
5026
+ };
5027
+ }
5028
+ function selectorFor(className, target) {
5029
+ if (target === void 0) return `.${className}`;
5030
+ return target;
5031
+ }
5032
+ function effectiveSpecificity(className, selector) {
5033
+ const includesClassName = selector.classes.includes(className);
5034
+ return [
5035
+ selector.specificity[0],
5036
+ selector.specificity[1] + (includesClassName ? 0 : 1),
5037
+ selector.specificity[2]
5038
+ ];
5039
+ }
5040
+ function selectorMatches(className, selector, node, activeClassNames) {
5041
+ if (!activeClassNames.has(className)) return false;
5042
+ if (selector.tag !== void 0 && node.authoredTag !== selector.tag) return false;
5043
+ return selector.classes.every((name) => activeClassNames.has(name));
5044
+ }
5045
+ function registerStylesheets(sourceKey, stylesheets, diagnostics) {
5046
+ const classes = /* @__PURE__ */ new Map();
5047
+ let ruleIndex = 0;
5048
+ stylesheets?.forEach((stylesheet, stylesheetIndex) => {
5049
+ Object.entries(stylesheet.classes).forEach(([className, definition]) => {
5050
+ const path = `source:${sourceKey} > stylesheet[${stylesheetIndex}].classes.${className}`;
5051
+ const invalidReason = invalidClassNameReason(className);
5052
+ if (invalidReason) {
5053
+ diagnostics.push(styleDiagnostic({
5054
+ code: "E_STYLE_INVALID_CLASS_NAME",
5055
+ title: "invalid style class name",
5056
+ path,
5057
+ message: invalidReason
5058
+ }));
5059
+ return;
5060
+ }
5061
+ const list = classes.get(className) ?? [];
5062
+ classes.set(className, [...list, {
5063
+ className,
5064
+ definition,
5065
+ stylesheetIndex,
5066
+ ruleIndex: ruleIndex++,
5067
+ path
5068
+ }]);
5069
+ });
5070
+ });
5071
+ return classes;
5072
+ }
5073
+ function resolveClassMatches(node, entity, registry, diagnostics) {
5074
+ const classRefs = entity.authored.classRefs ?? [];
5075
+ const activeClassNames = new Set(classRefs.map((ref) => ref.name));
5076
+ const matched = [];
5077
+ [...activeClassNames].forEach((className) => {
5078
+ const registrations = registry.get(className);
5079
+ if (!registrations || registrations.length === 0) {
5080
+ diagnostics.push(styleDiagnostic({
5081
+ code: "E_STYLE_UNKNOWN_CLASS",
5082
+ title: "unknown style class",
5083
+ path: node.origin.path,
5084
+ message: `Style Class "${className}" is referenced but is not defined in this source.`,
5085
+ help: ["Register a stylesheet with deck.useStyles() on the same Deck source."]
5086
+ }));
5087
+ return;
5088
+ }
5089
+ const before = matched.length;
5090
+ let hasSelectorDiagnostic = false;
5091
+ registrations.forEach((registration) => {
5092
+ const targets = targetsFor(registration.definition);
5093
+ (targets === void 0 ? [void 0] : targets).forEach((target) => {
5094
+ const selectorText = selectorFor(className, target);
5095
+ const selector = parseSelector(selectorText);
5096
+ if (!selector) {
5097
+ hasSelectorDiagnostic = true;
5098
+ diagnostics.push(styleDiagnostic({
5099
+ code: "E_STYLE_UNSUPPORTED_SELECTOR",
5100
+ title: "unsupported stylesheet selector",
5101
+ path: registration.path,
5102
+ message: `Selector "${selectorText}" is not supported in v0.4.0.`,
5103
+ help: ["Use a simple class selector such as .title or a compound selector such as p.title."]
5104
+ }));
5105
+ return;
5106
+ }
5107
+ if (!selectorMatches(className, selector, node, activeClassNames)) return;
5108
+ matched.push({
5109
+ registration,
5110
+ selector: selectorText,
5111
+ specificity: effectiveSpecificity(className, selector),
5112
+ style: styleObjectFor(registration.definition)
5113
+ });
5114
+ });
5115
+ });
5116
+ if (matched.length === before && !hasSelectorDiagnostic) diagnostics.push(styleDiagnostic({
5117
+ code: "E_STYLE_TARGET_MISMATCH",
5118
+ title: "style class target does not match element",
5119
+ path: node.origin.path,
5120
+ message: `Style Class "${className}" is defined but no target matches this element.`,
5121
+ help: ["Adjust the class target selector or move the className to a matching element."]
5122
+ }));
5123
+ });
5124
+ return matched.sort((left, right) => {
5125
+ return compareSpecificity(left.specificity, right.specificity) || left.registration.ruleIndex - right.registration.ruleIndex;
5126
+ });
5127
+ }
5128
+ function applyProperties(style, source, properties) {
5129
+ Object.entries(style).forEach(([key, value]) => {
5130
+ properties[key] = {
5131
+ value,
5132
+ source
5133
+ };
5134
+ });
5135
+ }
5136
+ function resolvedStyleFor(node, entity, registry, diagnostics) {
5137
+ const properties = {};
5138
+ const appliedClasses = [];
5139
+ resolveClassMatches(node, entity, registry, diagnostics).forEach((match) => {
5140
+ const source = {
5141
+ layer: "class",
5142
+ className: match.registration.className,
5143
+ stylesheetIndex: match.registration.stylesheetIndex,
5144
+ ruleIndex: match.registration.ruleIndex,
5145
+ selector: match.selector
5146
+ };
5147
+ appliedClasses.push(source);
5148
+ applyProperties(match.style, source, properties);
5149
+ });
5150
+ if (typeof entity.authored.style === "object" && entity.authored.style !== null) applyProperties(entity.authored.style, { layer: "style" }, properties);
5151
+ return {
5152
+ style: Object.fromEntries(Object.entries(properties).map(([key, property]) => [key, property.value])),
5153
+ properties,
5154
+ appliedClasses
5155
+ };
5156
+ }
5157
+ function nodeByStyleRef(graph) {
5158
+ const nodes = /* @__PURE__ */ new Map();
5159
+ graph.nodes.forEach((node) => {
5160
+ if (node.styleRef) nodes.set(node.styleRef, node);
5161
+ });
5162
+ return nodes;
5163
+ }
5164
+ function resolveStyles(graph, roots) {
5165
+ const diagnostics = [];
5166
+ const stylesheets = classesBySource(roots);
5167
+ const registries = /* @__PURE__ */ new Map();
5168
+ const nodes = nodeByStyleRef(graph);
5169
+ const resolvedStyles = /* @__PURE__ */ new Map();
5170
+ stylesheets.forEach((sourceStylesheets, sourceKey) => {
5171
+ registries.set(sourceKey, registerStylesheets(sourceKey, sourceStylesheets, diagnostics));
5172
+ });
5173
+ graph.styles.forEach((entity, id) => {
5174
+ const node = nodes.get(id);
5175
+ if (!node) return;
5176
+ const sourceKey = sourceKeyFor(node.origin.source);
5177
+ let registry = registries.get(sourceKey);
5178
+ if (!registry) {
5179
+ registry = registerStylesheets(sourceKey, stylesheets.get(sourceKey), diagnostics);
5180
+ registries.set(sourceKey, registry);
5181
+ }
5182
+ resolvedStyles.set(id, resolvedStyleFor(node, entity, registry, diagnostics));
5183
+ });
5184
+ return {
5185
+ resolvedStyles,
5186
+ diagnostics: createDiagnostics(diagnostics)
5187
+ };
5188
+ }
5189
+ //#endregion
4913
5190
  //#region node_modules/inherits/inherits_browser.js
4914
5191
  var require_inherits_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4915
5192
  if (typeof Object.create === "function") module.exports = function inherits(ctor, superCtor) {
@@ -16044,6 +16321,9 @@ function directSlideFactories(entries) {
16044
16321
  function mountedSourceError() {
16045
16322
  return /* @__PURE__ */ new Error("Mounted sources are supported by compile() only until the output pipeline supports graph composition.");
16046
16323
  }
16324
+ function combineDiagnostics(...diagnostics) {
16325
+ return createDiagnostics(diagnostics.flatMap((item) => item.items));
16326
+ }
16047
16327
  function compileSource(source, config = {}) {
16048
16328
  const composition = resolveComposition(source);
16049
16329
  if (composition.diagnostics.hasErrors) {
@@ -16051,8 +16331,15 @@ function compileSource(source, config = {}) {
16051
16331
  throw new CompositionDiagnosticError(composition.diagnostics);
16052
16332
  }
16053
16333
  const result = buildSemanticAuthorGraph(composition.roots ?? []);
16054
- if (config.mode === "inspect") return result;
16334
+ const styleResult = result.graph ? resolveStyles(result.graph, composition.roots ?? []) : void 0;
16335
+ const diagnostics = styleResult ? combineDiagnostics(result.diagnostics, styleResult.diagnostics) : result.diagnostics;
16336
+ if (config.mode === "inspect") return {
16337
+ ...result.graph ? { graph: result.graph } : {},
16338
+ diagnostics,
16339
+ ...styleResult ? { resolvedStyles: styleResult.resolvedStyles } : {}
16340
+ };
16055
16341
  if (result.diagnostics.hasErrors) throw new SemanticGraphDiagnosticError(result.diagnostics);
16342
+ if (styleResult?.diagnostics.hasErrors) throw new StyleDiagnosticError(styleResult.diagnostics);
16056
16343
  if (!result.graph) throw new SemanticGraphDiagnosticError(result.diagnostics);
16057
16344
  return result.graph;
16058
16345
  }
@@ -16067,6 +16354,7 @@ var BoundSource = class {
16067
16354
  const source = this.#source[COMPOSITION_SOURCE]();
16068
16355
  return {
16069
16356
  entries: source.entries,
16357
+ stylesheets: source.stylesheets,
16070
16358
  cycleId: source.cycleId,
16071
16359
  boundContext: {
16072
16360
  present: true,
@@ -16092,6 +16380,7 @@ var BoundSource = class {
16092
16380
  var Deck = class {
16093
16381
  #options;
16094
16382
  #entries = [];
16383
+ #stylesheets = [];
16095
16384
  withSource;
16096
16385
  constructor(options) {
16097
16386
  this.#options = options;
@@ -16103,10 +16392,15 @@ var Deck = class {
16103
16392
  [COMPOSITION_SOURCE]() {
16104
16393
  return {
16105
16394
  entries: this.#entries,
16395
+ stylesheets: this.#stylesheets,
16106
16396
  cycleId: this,
16107
16397
  boundContext: { present: false }
16108
16398
  };
16109
16399
  }
16400
+ useStyles(stylesheet) {
16401
+ this.#stylesheets.push(stylesheet);
16402
+ return this;
16403
+ }
16110
16404
  add(slide) {
16111
16405
  this.#entries.push({
16112
16406
  kind: "slide",
@@ -16136,4 +16430,4 @@ var Deck = class {
16136
16430
  }
16137
16431
  };
16138
16432
  //#endregion
16139
- export { CompositionDiagnosticError, Deck, DeckDiagnosticError, EMU_PER_INCH, Fragment, Image, POINTS_PER_INCH, SemanticGraphDiagnosticError, Shape, Slide, Text, View, createElement, formatDiagnostic, formatDiagnostics, isAuthorNode, isContentNode, isSlideNode, pptxgenjsBackend };
16433
+ export { CompositionDiagnosticError, Deck, DeckDiagnosticError, EMU_PER_INCH, Fragment, Image, POINTS_PER_INCH, SemanticGraphDiagnosticError, Shape, Slide, StyleDiagnosticError, Text, View, createElement, defineStyles, formatDiagnostic, formatDiagnostics, isAuthorNode, isContentNode, isSlideNode, pptxgenjsBackend };
@@ -1,4 +1,4 @@
1
- import { fn as AuthorTreeNode, i as Fragment, n as jsx, pn as JsxKey, r as jsxs, t as JSX } from "./jsx-runtime-DauuRkY2.mjs";
1
+ import { Tn as JsxKey, i as Fragment, n as jsx, r as jsxs, t as JSX, wn as AuthorTreeNode } from "./jsx-runtime-BMKEs7aG.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;
@@ -55,6 +55,9 @@ declare class SemanticGraphDiagnosticError extends DeckDiagnosticError {
55
55
  declare class CompositionDiagnosticError extends DeckDiagnosticError {
56
56
  constructor(diagnostics: Diagnostics);
57
57
  }
58
+ declare class StyleDiagnosticError extends DeckDiagnosticError {
59
+ constructor(diagnostics: Diagnostics);
60
+ }
58
61
  //#endregion
59
62
  //#region src/diagnostics/format.d.ts
60
63
  declare function formatDiagnostic(diagnostic: Diagnostic): string;
@@ -167,14 +170,17 @@ type SemanticShapeNode = BaseSemanticNode & {
167
170
  readonly kind: "shape";
168
171
  };
169
172
  type SemanticNode = SemanticContainerNode | SemanticDocumentNode | SemanticImageNode | SemanticShapeNode | SemanticSlideNode | SemanticTextNode | SemanticTextRunNode;
173
+ type StyleClassRef = {
174
+ readonly name: string;
175
+ readonly index: number;
176
+ };
170
177
  type StyleEntity = {
171
178
  readonly id: StyleEntityId;
172
179
  readonly target: SemanticNodeKind;
173
180
  readonly authored: {
174
181
  readonly style?: unknown;
175
- readonly direct?: unknown;
182
+ readonly classRefs?: readonly StyleClassRef[];
176
183
  };
177
- readonly resolved?: unknown;
178
184
  };
179
185
  type AssetEntity = {
180
186
  readonly id: AssetEntityId;
@@ -238,6 +244,7 @@ type CompositionEntry<TSourceContext = unknown> = {
238
244
  };
239
245
  type CompositionSourceInternals<TSourceContext = unknown> = {
240
246
  readonly entries: readonly CompositionEntry<TSourceContext>[];
247
+ readonly stylesheets: readonly StyleSheet[];
241
248
  readonly cycleId: object;
242
249
  readonly boundContext: SourceContextBinding<TSourceContext>;
243
250
  };
@@ -305,6 +312,12 @@ interface ViewIntrinsicJsxChildArray extends ReadonlyArray<ViewIntrinsicJsxChild
305
312
  type ViewIntrinsicJsxChild = ContentJsxChild | string | number | ViewIntrinsicJsxChildArray;
306
313
  interface JsxNodeArray extends ReadonlyArray<JsxNode> {}
307
314
  type JsxNode = AuthorNode | AuthorTreeNode | string | number | boolean | null | undefined | JsxNodeArray;
315
+ interface ClassNameValueArray extends ReadonlyArray<ClassNameValue> {}
316
+ type ClassNameObject = Readonly<Record<string, boolean | null | undefined>>;
317
+ type ClassNameValue = string | false | null | undefined | ClassNameValueArray | ClassNameObject;
318
+ type ClassNameAuthorProps = {
319
+ className?: ClassNameValue;
320
+ };
308
321
  type BaseAuthorProps = {
309
322
  opacity?: number;
310
323
  rotation?: number;
@@ -508,6 +521,18 @@ type ShapeStyle = FrameAuthorProps & Omit<BoxStyleAuthorProps, "backgroundColor"
508
521
  borderRadius?: DeckLength;
509
522
  radius?: DeckLength;
510
523
  };
524
+ type TextRunStyle = Pick<TextStyle, "fontFamily" | "fontSize" | "fontWeight" | "italic" | "fontStyle" | "underline" | "strike" | "textDecoration" | "textDecorationLine" | "textDecorationStyle" | "textDecorationColor" | "textTransform" | "direction" | "writingMode" | "color" | "verticalAlign" | "charSpacing" | "letterSpacing" | "href" | "tooltip" | "superscript" | "subscript" | "textShadow">;
525
+ type StyleTargetSelector = string;
526
+ type StyleClassStyle = SlideStyle | ViewStyle | TextStyle | TextRunStyle | ImageStyle | ShapeStyle;
527
+ type TargetedStyleClassDefinition<TStyle extends StyleClassStyle = StyleClassStyle> = {
528
+ readonly target?: StyleTargetSelector | readonly StyleTargetSelector[];
529
+ readonly style: TStyle;
530
+ };
531
+ type StyleClassDefinition<TStyle extends StyleClassStyle = StyleClassStyle> = TStyle | TargetedStyleClassDefinition<TStyle>;
532
+ type StyleSheet<TClasses extends Readonly<Record<string, StyleClassDefinition>> = Readonly<Record<string, StyleClassDefinition>>> = {
533
+ readonly classes: TClasses;
534
+ };
535
+ declare function defineStyles<const TStyleSheet extends StyleSheet>(stylesheet: TStyleSheet): TStyleSheet;
511
536
  type DeckOptions = {
512
537
  layout: {
513
538
  width: number;
@@ -526,6 +551,7 @@ type OutputConfig = {
526
551
  };
527
552
  type SlideNodeProps = {
528
553
  name?: string;
554
+ className?: ClassNameValue;
529
555
  style?: SlideStyle;
530
556
  background?: string;
531
557
  backgroundImage?: string;
@@ -542,19 +568,22 @@ type SlideProps = SlideNodeProps & {
542
568
  };
543
569
  type ViewNodeProps = {
544
570
  style?: ViewStyle;
545
- } & ViewStyle;
571
+ } & ClassNameAuthorProps & ViewStyle;
546
572
  type ViewProps = ViewNodeProps & {
547
573
  children?: ContentJsxChild;
548
574
  };
549
575
  type TextNodeProps = {
550
576
  style?: TextStyle;
551
- } & TextStyle;
577
+ } & ClassNameAuthorProps & TextStyle;
552
578
  type TextProps = TextNodeProps & {
553
579
  children?: TextJsxChild;
554
580
  };
581
+ type TextRunNodeProps = {
582
+ style?: TextRunStyle;
583
+ } & ClassNameAuthorProps & TextRunStyle;
555
584
  type ImageNodeProps = {
556
585
  style?: ImageStyle;
557
- } & ImageStyle & ({
586
+ } & ClassNameAuthorProps & ImageStyle & ({
558
587
  src: string;
559
588
  data?: string;
560
589
  } | {
@@ -567,7 +596,7 @@ type ImageProps = ImageNodeProps & {
567
596
  type ShapeNodeProps = {
568
597
  style?: ShapeStyle;
569
598
  shape: "rect" | "ellipse" | "line";
570
- } & ShapeStyle;
599
+ } & ClassNameAuthorProps & ShapeStyle;
571
600
  type ShapeProps = ShapeNodeProps & {
572
601
  children?: never;
573
602
  };
@@ -612,12 +641,15 @@ type IntrinsicDivProps = ViewNodeProps & {
612
641
  type IntrinsicPProps = TextNodeProps & {
613
642
  children?: TextJsxChild;
614
643
  };
644
+ type IntrinsicSpanProps = TextRunNodeProps & {
645
+ children?: TextJsxChild;
646
+ };
615
647
  type IntrinsicImgProps = ImageProps;
616
648
  type IntrinsicViewTag = "article" | "aside" | "div" | "figure" | "footer" | "header" | "main" | "nav" | "section";
617
649
  type IntrinsicTextTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p";
618
650
  type DeckJsxIntrinsicElements = {
619
651
  img: IntrinsicImgProps;
620
- span: IntrinsicPProps;
652
+ span: IntrinsicSpanProps;
621
653
  } & { [Tag in IntrinsicViewTag]: IntrinsicDivProps } & { [Tag in IntrinsicTextTag]: IntrinsicPProps };
622
654
  //#endregion
623
655
  //#region src/authoring/components.d.ts
@@ -677,4 +709,4 @@ declare namespace JSX {
677
709
  }
678
710
  }
679
711
  //#endregion
680
- export { ImageStyle as $, SourceIdentity as $t, CssFlexDirection as A, CompositionContext as At, CssJustifyContent as B, GraphNodeId as Bt, CssAlignContent as C, TextTabStopAlignment as Ct, CssBoxSizing as D, ViewProps as Dt, CssAspectRatio as E, VerticalAlign as Et, CssGridShorthand as F, SourceContextInput as Ft, CssVisibility as G, SemanticNode as Gt, CssObjectPosition as H, SemanticContainerNode as Ht, CssGridTemplate as I, SourceContextMapper as It, DeckOptions as J, SemanticRole as Jt, DeckJsxIntrinsicElements as K, SemanticNodeKind as Kt, CssGridTemplateAreas as L, AssetEntity as Lt, CssGridAutoFlow as M, CompositionSourceInternals as Mt, CssGridLine as N, SlideFactory as Nt, CssDisplay as O, ViewStyle as Ot, CssGridPlacement as P, SlideFactoryInput as Pt, ImageProps as Q, SemanticTextRunNode as Qt, CssGridTemplateShorthand as R, AssetEntityId as Rt, ContentJsxChild as S, TextStyle as St, CssAlignSelf as T, TextTabStopLength as Tt, CssOverflow as U, SemanticDocumentNode as Ut, CssJustifySelf as V, SemanticAuthorGraph as Vt, CssPosition as W, SemanticImageNode as Wt, ImageCropAuthoring as X, SemanticSlideNode as Xt, DeckPointLength as Y, SemanticShapeNode as Yt, ImageCropValue as Z, SemanticTextNode as Zt, AuthorNodeProps as _, StrokeLineCap as _t, createElement as a, DiagnosticSeverity as an, IntrinsicViewTag as at, BorderStyle as b, TextJsxChild as bt, isSlideNode as c, formatDiagnostics as cn, OutputConfig as ct, Slide as d, SemanticGraphDiagnosticError as dn, SlideProps as dt, SourceOrigin as en, ImplementedBackendName as et, Text as f, AuthorTreeNode as fn, SlideStyle as ft, AuthorNodeMap as g, StrokeDashType as gt, AuthorNodeKind as h, StackAxis as ht, Fragment as i, DiagnosticLabel as in, IntrinsicTextTag as it, CssFlexWrap as j, CompositionSource as jt, CssFlexBasis as k, COMPOSITION_SOURCE as kt, Image as l, CompositionDiagnosticError as ln, ShapeProps as lt, AuthorNode as m, SourceSpan as mn, StackAlignment as mt, jsx as n, StyleEntityId as nn, IntrinsicImgProps as nt, isAuthorNode as o, Diagnostics as on, JsxNode as ot, View as p, JsxKey as pn, Spacing as pt, DeckLength as q, SemanticOrigin as qt, jsxs as r, Diagnostic as rn, IntrinsicPProps as rt, isContentNode as s, formatDiagnostic as sn, LayoutMode as st, JSX as t, StyleEntity as tn, IntrinsicDivProps as tt, Shape as u, DeckDiagnosticError as un, ShapeStyle as ut, AuthorNodePropsMap as v, StrokeLineJoin as vt, CssAlignItems as w, TextTabStopAuthoring as wt, ContentAuthorNode as x, TextProps as xt, BackendName as y, TextFit as yt, CssGridTrack as z, BaseSemanticNode as zt };
712
+ export { ImageCropAuthoring as $, SemanticDocumentNode as $t, CssBoxSizing as A, TextRunStyle as At, CssGridTemplateAreas as B, CompositionContext as Bt, ClassNameValueArray as C, StyleDiagnosticError as Cn, StyleClassStyle as Ct, CssAlignItems as D, TextJsxChild as Dt, CssAlignContent as E, SourceSpan as En, TextFit as Et, CssGridAutoFlow as F, VerticalAlign as Ft, CssObjectPosition as G, SourceContextInput as Gt, CssGridTrack as H, CompositionSourceInternals as Ht, CssGridLine as I, ViewProps as It, CssVisibility as J, AssetEntityId as Jt, CssOverflow as K, SourceContextMapper as Kt, CssGridPlacement as L, ViewStyle as Lt, CssFlexBasis as M, TextTabStopAlignment as Mt, CssFlexDirection as N, TextTabStopAuthoring as Nt, CssAlignSelf as O, TextProps as Ot, CssFlexWrap as P, TextTabStopLength as Pt, DeckPointLength as Q, SemanticContainerNode as Qt, CssGridShorthand as R, defineStyles as Rt, ClassNameValue as S, SemanticGraphDiagnosticError as Sn, StyleClassDefinition as St, ContentJsxChild as T, JsxKey as Tn, StyleTargetSelector as Tt, CssJustifyContent as U, SlideFactory as Ut, CssGridTemplateShorthand as V, CompositionSource as Vt, CssJustifySelf as W, SlideFactoryInput as Wt, DeckLength as X, GraphNodeId as Xt, DeckJsxIntrinsicElements as Y, BaseSemanticNode as Yt, DeckOptions as Z, SemanticAuthorGraph as Zt, AuthorNodeProps as _, Diagnostics as _n, StackAlignment as _t, createElement as a, SemanticShapeNode as an, IntrinsicImgProps as at, BorderStyle as b, CompositionDiagnosticError as bn, StrokeLineCap as bt, isSlideNode as c, SemanticTextRunNode as cn, IntrinsicViewTag as ct, Slide as d, StyleClassRef as dn, OutputConfig as dt, SemanticImageNode as en, ImageCropValue as et, Text as f, StyleEntity as fn, ShapeProps as ft, AuthorNodeMap as g, DiagnosticSeverity as gn, Spacing as gt, AuthorNodeKind as h, DiagnosticLabel as hn, SlideStyle as ht, Fragment as i, SemanticRole as in, IntrinsicDivProps as it, CssDisplay as j, TextStyle as jt, CssAspectRatio as k, TextRunNodeProps as kt, Image as l, SourceIdentity as ln, JsxNode as lt, AuthorNode as m, Diagnostic as mn, SlideProps as mt, jsx as n, SemanticNodeKind as nn, ImageStyle as nt, isAuthorNode as o, SemanticSlideNode as on, IntrinsicPProps as ot, View as p, StyleEntityId as pn, ShapeStyle as pt, CssPosition as q, AssetEntity as qt, jsxs as r, SemanticOrigin as rn, ImplementedBackendName as rt, isContentNode as s, SemanticTextNode as sn, IntrinsicTextTag as st, JSX as t, SemanticNode as tn, ImageProps as tt, Shape as u, SourceOrigin as un, LayoutMode as ut, AuthorNodePropsMap as v, formatDiagnostic as vn, StackAxis as vt, ContentAuthorNode as w, AuthorTreeNode as wn, StyleSheet as wt, ClassNameObject as x, DeckDiagnosticError as xn, StrokeLineJoin as xt, BackendName as y, formatDiagnostics as yn, StrokeDashType as yt, CssGridTemplate as z, COMPOSITION_SOURCE as zt };
@@ -1,2 +1,2 @@
1
- import { i as Fragment, n as jsx, pn as JsxKey, r as jsxs, t as JSX } from "./jsx-runtime-DauuRkY2.mjs";
1
+ import { Tn as JsxKey, i as Fragment, n as jsx, r as jsxs, t as JSX } from "./jsx-runtime-BMKEs7aG.mjs";
2
2
  export { Fragment, JSX, JsxKey, jsx, jsxs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deckjsx",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Generate PowerPoint presentations from TSX/JSX through a compiler pipeline.",
5
5
  "license": "MIT",
6
6
  "author": "deckjsx contributors",