deckjsx 0.8.1 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { A as BaseSemanticNode, B as SemanticRole, F as SemanticDocumentNode, G as SourceIdentity, H as SemanticSlideNode, I as SemanticImageNode, J as StyleEntity, K as SourceOrigin, L as SemanticNode, M as GraphNodeId, N as SemanticAuthorGraph, O as AssetEntity, P as SemanticContainerNode, R as SemanticNodeKind, U as SemanticTextNode, V as SemanticShapeNode, W as SemanticTextRunNode, Y as StyleEntityId, k as AssetEntityId, q as StyleClassRef, z as SemanticOrigin } from "./index-BlOsGMTm.mjs";
2
- import { $ as PptxSupportPartPayload, $t as isPptxRelationshipsPart, A as PptxPackagePartKind, At as ProjectInspectionEffectiveProjectedStyleEntry, B as PptxRelationshipsPart, Bt as ProjectInspectionPaintFallbackAggregationEntry, C as PptxNotesPlaceholderPayload, Ct as PptxVisibility, D as PptxPackagePartCandidate, Dt as ProjectInspectionComposedPaintOrderSlideView, E as PptxPackagePart, Et as ProjectInspectionComposedPaintOrderEntry, F as PptxPackagePartRequirementStatus, Ft as ProjectInspectionMediaSummary, G as PptxShapeElement, Gt as ProjectInspectionSummary, H as PptxSerializedIdentities, Ht as ProjectInspectionPartSummary, I as PptxPaintOrderInput, It as ProjectInspectionPackageDependencyInvalidationEntry, J as PptxSlideLayoutPartPayload, Jt as ProjectInspectionUnsupportedSemanticRecord, K as PptxSlideDrawing, Kt as ProjectInspectionThemeProjectionEntry, L as PptxPictureElement, Lt as ProjectInspectionPackageDependencyInvalidationView, M as PptxPackagePartOrderKey, Mt as ProjectInspectionElementSummary, N as PptxPackagePartRequirement, Nt as ProjectInspectionFilteredReason, O as PptxPackagePartCategory, Ot as ProjectInspectionDetails, P as PptxPackagePartRequirementCondition, Pt as ProjectInspectionFilteredRecord, Q as PptxSupportPart, Qt as isPptxPackagePart, R as PptxPresentationSlideMasterId, Rt as ProjectInspectionPackageDependencyReason, S as PptxMediaPartPayload, St as PptxUnsupportedSemanticFeature, T as PptxPackageModelCandidate, Tt as ProjectInspectionBackgroundLayerSummary, U as PptxSerializedIdentity, Ut as ProjectInspectionRelationshipSummary, V as PptxRelationshipsPayload, Vt as ProjectInspectionPaintFallbackAggregationView, W as PptxShadow, Wt as ProjectInspectionResolvedValues, X as PptxSlideMasterPartPayload, Xt as isPptxMediaPart, Y as PptxSlideMasterLayoutId, Yt as isPptxContentTypesPart, Z as PptxSlidePart, Zt as isPptxPackageModel, _ as PptxKnownPackagePart, _t as PptxThemeValueGroupFingerprint, a as PptxContentTypeOverride, at as PptxThemeEffectiveInheritanceStep, b as PptxMediaMetadata, bt as PptxUnsupportedFallbackStrategy, c as PptxDrawingNode, ct as PptxThemeProjectionPayload, d as PptxElementKind, dt as PptxThemeReferenceSerializationChoice, en as isPptxSlidePart, et as PptxTextElement, f as PptxElementOrigin, ft as PptxThemeReferenceSerializationDecision, g as PptxGroupElement, gt as PptxThemeValueGroup, h as PptxGeneratedStrokeLayer, ht as PptxThemeUnprojectedMapping, i as PptxContentTypeDefault, it as PptxThemeDefaultStyleProjectionTarget, j as PptxPackagePartOrderGroup, jt as ProjectInspectionEffectiveProjectedStyleSlideView, k as PptxPackagePartDependencyFingerprint, kt as ProjectInspectionDiagnosticSummary, l as PptxElement, lt as PptxThemeProjectionTrace, m as PptxEmptySupportPartPayload, mt as PptxThemeSupportMapping, n as PptxBackgroundLayer, nt as PptxThemeDefaultStyleDecision, o as PptxContentTypesPart, ot as PptxThemeEffectiveInheritanceTrace, p as PptxEmissionTarget, pt as PptxThemeReferenceSerializationKind, q as PptxSlideLayoutAnchor, qt as ProjectInspectionThemeProjectionView, r as PptxClip, rt as PptxThemeDefaultStyleDecisionKind, s as PptxContentTypesPayload, st as PptxThemePartPayload, t as PackagePartId, tn as isPptxSupportPart, tt as PptxThemeConcreteDrawingPropertyMapping, u as PptxElementId, ut as PptxThemeReferenceCandidate, v as PptxLayoutAnchor, vt as PptxThemeWholeThemeMapping, w as PptxPackageModel, wt as ProjectInspectionAdapterLimitation, x as PptxMediaPart, xt as PptxUnsupportedSemantic, y as PptxMeasurement, yt as PptxUnsupportedFallback, z as PptxRelationship, zt as ProjectInspectionPackageDependencySummary } from "./model-oqG9gKTq.mjs";
3
- import { a as ResolvedStyleSource, i as ResolvedStyleProperty, n as ResolvedStyleLayer, o as StyleResolutionResult, r as ResolvedStyleMap, t as ResolvedStyle } from "./resolve-CfjiMtv5.mjs";
1
+ import { A as AssetEntityId, B as SemanticOrigin, F as SemanticContainerNode, G as SemanticTextRunNode, H as SemanticShapeNode, I as SemanticDocumentNode, J as StyleClassRef, K as SourceIdentity, L as SemanticImageNode, N as GraphNodeId, P as SemanticAuthorGraph, R as SemanticNode, U as SemanticSlideNode, V as SemanticRole, W as SemanticTextNode, X as StyleEntityId, Y as StyleEntity, j as BaseSemanticNode, k as AssetEntity, q as SourceOrigin, z as SemanticNodeKind } from "./index-vl2Yas8y.mjs";
2
+ import { $ as PptxSupportPartPayload, $t as isPptxRelationshipsPart, A as PptxPackagePartKind, At as ProjectInspectionEffectiveProjectedStyleEntry, B as PptxRelationshipsPart, Bt as ProjectInspectionPaintFallbackAggregationEntry, C as PptxNotesPlaceholderPayload, Ct as PptxVisibility, D as PptxPackagePartCandidate, Dt as ProjectInspectionComposedPaintOrderSlideView, E as PptxPackagePart, Et as ProjectInspectionComposedPaintOrderEntry, F as PptxPackagePartRequirementStatus, Ft as ProjectInspectionMediaSummary, G as PptxShapeElement, Gt as ProjectInspectionSummary, H as PptxSerializedIdentities, Ht as ProjectInspectionPartSummary, I as PptxPaintOrderInput, It as ProjectInspectionPackageDependencyInvalidationEntry, J as PptxSlideLayoutPartPayload, Jt as ProjectInspectionUnsupportedSemanticRecord, K as PptxSlideDrawing, Kt as ProjectInspectionThemeProjectionEntry, L as PptxPictureElement, Lt as ProjectInspectionPackageDependencyInvalidationView, M as PptxPackagePartOrderKey, Mt as ProjectInspectionElementSummary, N as PptxPackagePartRequirement, Nt as ProjectInspectionFilteredReason, O as PptxPackagePartCategory, Ot as ProjectInspectionDetails, P as PptxPackagePartRequirementCondition, Pt as ProjectInspectionFilteredRecord, Q as PptxSupportPart, Qt as isPptxPackagePart, R as PptxPresentationSlideMasterId, Rt as ProjectInspectionPackageDependencyReason, S as PptxMediaPartPayload, St as PptxUnsupportedSemanticFeature, T as PptxPackageModelCandidate, Tt as ProjectInspectionBackgroundLayerSummary, U as PptxSerializedIdentity, Ut as ProjectInspectionRelationshipSummary, V as PptxRelationshipsPayload, Vt as ProjectInspectionPaintFallbackAggregationView, W as PptxShadow, Wt as ProjectInspectionResolvedValues, X as PptxSlideMasterPartPayload, Xt as isPptxMediaPart, Y as PptxSlideMasterLayoutId, Yt as isPptxContentTypesPart, Z as PptxSlidePart, Zt as isPptxPackageModel, _ as PptxKnownPackagePart, _t as PptxThemeValueGroupFingerprint, a as PptxContentTypeOverride, at as PptxThemeEffectiveInheritanceStep, b as PptxMediaMetadata, bt as PptxUnsupportedFallbackStrategy, c as PptxDrawingNode, ct as PptxThemeProjectionPayload, d as PptxElementKind, dt as PptxThemeReferenceSerializationChoice, en as isPptxSlidePart, et as PptxTextElement, f as PptxElementOrigin, ft as PptxThemeReferenceSerializationDecision, g as PptxGroupElement, gt as PptxThemeValueGroup, h as PptxGeneratedStrokeLayer, ht as PptxThemeUnprojectedMapping, i as PptxContentTypeDefault, it as PptxThemeDefaultStyleProjectionTarget, j as PptxPackagePartOrderGroup, jt as ProjectInspectionEffectiveProjectedStyleSlideView, k as PptxPackagePartDependencyFingerprint, kt as ProjectInspectionDiagnosticSummary, l as PptxElement, lt as PptxThemeProjectionTrace, m as PptxEmptySupportPartPayload, mt as PptxThemeSupportMapping, n as PptxBackgroundLayer, nt as PptxThemeDefaultStyleDecision, o as PptxContentTypesPart, ot as PptxThemeEffectiveInheritanceTrace, p as PptxEmissionTarget, pt as PptxThemeReferenceSerializationKind, q as PptxSlideLayoutAnchor, qt as ProjectInspectionThemeProjectionView, r as PptxClip, rt as PptxThemeDefaultStyleDecisionKind, s as PptxContentTypesPayload, st as PptxThemePartPayload, t as PackagePartId, tn as isPptxSupportPart, tt as PptxThemeConcreteDrawingPropertyMapping, u as PptxElementId, ut as PptxThemeReferenceCandidate, v as PptxLayoutAnchor, vt as PptxThemeWholeThemeMapping, w as PptxPackageModel, wt as ProjectInspectionAdapterLimitation, x as PptxMediaPart, xt as PptxUnsupportedSemantic, y as PptxMeasurement, yt as PptxUnsupportedFallback, z as PptxRelationship, zt as ProjectInspectionPackageDependencySummary } from "./model-CbLfsOqw.mjs";
3
+ import { a as ResolvedStyleSource, i as ResolvedStyleProperty, n as ResolvedStyleLayer, o as StyleResolutionResult, r as ResolvedStyleMap, t as ResolvedStyle } from "./resolve-PWa5z4mw.mjs";
4
4
  export { type AssetEntity, type AssetEntityId, type BaseSemanticNode, type GraphNodeId, type PackagePartId, type PptxBackgroundLayer, type PptxClip, type PptxContentTypeDefault, type PptxContentTypeOverride, type PptxContentTypesPart, type PptxContentTypesPayload, type PptxDrawingNode, type PptxElement, type PptxElementId, type PptxElementKind, type PptxElementOrigin, type PptxEmissionTarget, type PptxEmptySupportPartPayload, type PptxGeneratedStrokeLayer, type PptxGroupElement, type PptxKnownPackagePart, type PptxLayoutAnchor, type PptxMeasurement, type PptxMediaMetadata, type PptxMediaPart, type PptxMediaPartPayload, type PptxNotesPlaceholderPayload, type PptxPackageModel, type PptxPackageModelCandidate, type PptxPackagePart, type PptxPackagePartCandidate, type PptxPackagePartCategory, type PptxPackagePartDependencyFingerprint, type PptxPackagePartKind, type PptxPackagePartOrderGroup, type PptxPackagePartOrderKey, type PptxPackagePartRequirement, type PptxPackagePartRequirementCondition, type PptxPackagePartRequirementStatus, type PptxPaintOrderInput, type PptxPictureElement, type PptxPresentationSlideMasterId, type PptxRelationship, type PptxRelationshipsPart, type PptxRelationshipsPayload, type PptxSerializedIdentities, type PptxSerializedIdentity, type PptxShadow, type PptxShapeElement, type PptxSlideDrawing, type PptxSlideLayoutAnchor, type PptxSlideLayoutPartPayload, type PptxSlideMasterLayoutId, type PptxSlideMasterPartPayload, type PptxSlidePart, type PptxSupportPart, type PptxSupportPartPayload, type PptxTextElement, type PptxThemeConcreteDrawingPropertyMapping, type PptxThemeDefaultStyleDecision, type PptxThemeDefaultStyleDecisionKind, type PptxThemeDefaultStyleProjectionTarget, type PptxThemeEffectiveInheritanceStep, type PptxThemeEffectiveInheritanceTrace, type PptxThemePartPayload, type PptxThemeProjectionPayload, type PptxThemeProjectionTrace, type PptxThemeReferenceCandidate, type PptxThemeReferenceSerializationChoice, type PptxThemeReferenceSerializationDecision, type PptxThemeReferenceSerializationKind, type PptxThemeSupportMapping, type PptxThemeUnprojectedMapping, type PptxThemeValueGroup, type PptxThemeValueGroupFingerprint, type PptxThemeWholeThemeMapping, type PptxUnsupportedFallback, type PptxUnsupportedFallbackStrategy, type PptxUnsupportedSemantic, type PptxUnsupportedSemanticFeature, type PptxVisibility, type ProjectInspectionAdapterLimitation, type ProjectInspectionBackgroundLayerSummary, type ProjectInspectionComposedPaintOrderEntry, type ProjectInspectionComposedPaintOrderSlideView, type ProjectInspectionDetails, type ProjectInspectionDiagnosticSummary, type ProjectInspectionEffectiveProjectedStyleEntry, type ProjectInspectionEffectiveProjectedStyleSlideView, type ProjectInspectionElementSummary, type ProjectInspectionFilteredReason, type ProjectInspectionFilteredRecord, type ProjectInspectionMediaSummary, type ProjectInspectionPackageDependencyInvalidationEntry, type ProjectInspectionPackageDependencyInvalidationView, type ProjectInspectionPackageDependencyReason, type ProjectInspectionPackageDependencySummary, type ProjectInspectionPaintFallbackAggregationEntry, type ProjectInspectionPaintFallbackAggregationView, type ProjectInspectionPartSummary, type ProjectInspectionRelationshipSummary, type ProjectInspectionResolvedValues, type ProjectInspectionSummary, type ProjectInspectionThemeProjectionEntry, type ProjectInspectionThemeProjectionView, type ProjectInspectionUnsupportedSemanticRecord, type ResolvedStyle, type ResolvedStyleLayer, type ResolvedStyleMap, type ResolvedStyleProperty, type ResolvedStyleSource, type SemanticAuthorGraph, type SemanticContainerNode, type SemanticDocumentNode, type SemanticImageNode, type SemanticNode, type SemanticNodeKind, type SemanticOrigin, type SemanticRole, type SemanticShapeNode, type SemanticSlideNode, type SemanticTextNode, type SemanticTextRunNode, type SourceIdentity, type SourceOrigin, type StyleClassRef, type StyleEntity, type StyleEntityId, type StyleResolutionResult, isPptxContentTypesPart, isPptxMediaPart, isPptxPackageModel, isPptxPackagePart, isPptxRelationshipsPart, isPptxSlidePart, isPptxSupportPart };
@@ -1,5 +1,5 @@
1
- import { a as IntrinsicDivProps, c as IntrinsicShapeProps, d as JsxNode, l as IntrinsicTextTag, n as DeckJsxElement, o as IntrinsicImgProps, ot as JsxKey, r as DeckJsxIntrinsicElements, s as IntrinsicPProps, u as IntrinsicViewTag } from "./index-BlOsGMTm.mjs";
2
- import { a as jsxs, i as jsx, n as JsxComponentProps, o as Fragment, r as JsxDevSource } from "./jsx-runtime-Dd6G09P7.mjs";
1
+ import { a as IntrinsicDivProps, c as IntrinsicShapeProps, d as IntrinsicViewTag, f as JsxNode, l as IntrinsicTextTag, n as DeckJsxElement, o as IntrinsicImgProps, r as DeckJsxIntrinsicElements, s as IntrinsicPProps, st as JsxKey, u as IntrinsicVideoProps } from "./index-vl2Yas8y.mjs";
2
+ import { a as jsxs, i as jsx, n as JsxComponentProps, o as Fragment, r as JsxDevSource } from "./jsx-runtime-B94seTQQ.mjs";
3
3
 
4
4
  //#region src/jsx-dev-runtime.d.ts
5
5
  type JsxComponent<P, R extends DeckJsxElement> = (props: P) => R;
@@ -11,6 +11,7 @@ declare function jsxDEV(type: IntrinsicViewTag, props: JsxProps<IntrinsicDivProp
11
11
  declare function jsxDEV(type: IntrinsicTextTag, props: JsxProps<IntrinsicPProps> | null, key?: JsxKey, _isStaticChildren?: boolean, source?: JsxDevSource): DeckJsxElement;
12
12
  declare function jsxDEV(type: "span", props: JsxProps<IntrinsicPProps> | null, key?: JsxKey, _isStaticChildren?: boolean, source?: JsxDevSource): DeckJsxElement;
13
13
  declare function jsxDEV(type: "img", props: IntrinsicImgProps, key?: JsxKey, _isStaticChildren?: boolean, source?: JsxDevSource): DeckJsxElement;
14
+ declare function jsxDEV(type: "video", props: IntrinsicVideoProps, key?: JsxKey, _isStaticChildren?: boolean, source?: JsxDevSource): DeckJsxElement;
14
15
  declare function jsxDEV(type: "shape", props: IntrinsicShapeProps, key?: JsxKey, _isStaticChildren?: boolean, source?: JsxDevSource): DeckJsxElement;
15
16
  declare function jsxDEV(type: string, props: JsxComponentProps | null, key?: JsxKey, _isStaticChildren?: boolean, source?: JsxDevSource): never;
16
17
  declare namespace JSX {
@@ -1,4 +1,4 @@
1
- import { i as createElementWithMetadata, n as jsxs, r as Fragment, t as jsx } from "./jsx-runtime-DzJLgS1w.mjs";
1
+ import { i as createElementWithMetadata, n as jsxs, r as Fragment, t as jsx } from "./jsx-runtime-pAHuQYMh.mjs";
2
2
  //#region src/jsx-dev-runtime.ts
3
3
  function sourceSpanFromDevSource(source) {
4
4
  if (!source) return;
@@ -1,4 +1,4 @@
1
- import { a as IntrinsicDivProps, c as IntrinsicShapeProps, d as JsxNode, l as IntrinsicTextTag, n as DeckJsxElement, o as IntrinsicImgProps, ot as JsxKey, r as DeckJsxIntrinsicElements, s as IntrinsicPProps, u as IntrinsicViewTag } from "./index-BlOsGMTm.mjs";
1
+ import { a as IntrinsicDivProps, c as IntrinsicShapeProps, d as IntrinsicViewTag, f as JsxNode, l as IntrinsicTextTag, n as DeckJsxElement, o as IntrinsicImgProps, r as DeckJsxIntrinsicElements, s as IntrinsicPProps, st as JsxKey, u as IntrinsicVideoProps } from "./index-vl2Yas8y.mjs";
2
2
 
3
3
  //#region src/jsx.d.ts
4
4
  declare function Fragment(props: {
@@ -23,6 +23,7 @@ declare function jsx(type: IntrinsicViewTag, props: JsxProps<IntrinsicDivProps>
23
23
  declare function jsx(type: IntrinsicTextTag, props: JsxProps<IntrinsicPProps> | null, key?: JsxKey): DeckJsxElement;
24
24
  declare function jsx(type: "span", props: JsxProps<IntrinsicPProps> | null, key?: JsxKey): DeckJsxElement;
25
25
  declare function jsx(type: "img", props: IntrinsicImgProps, key?: JsxKey): DeckJsxElement;
26
+ declare function jsx(type: "video", props: IntrinsicVideoProps, key?: JsxKey): DeckJsxElement;
26
27
  declare function jsx(type: "shape", props: IntrinsicShapeProps, key?: JsxKey): DeckJsxElement;
27
28
  declare function jsx(type: string, props: JsxComponentProps | null, key?: JsxKey): never;
28
29
  declare const jsxs: typeof jsx;
@@ -1,4 +1,4 @@
1
- import { a as createAuthorFragment, c as isAuthoredTag, i as createAuthorElement, l as isIntrinsicTextTag, n as authorTreeChildrenFromUnknown, r as collectChildren, s as isAuthorTreeNode, t as authorElementPropsFromEntries, u as isIntrinsicViewTag } from "./tree-DNsco0U3.mjs";
1
+ import { a as createAuthorFragment, c as isAuthoredTag, i as createAuthorElement, l as isIntrinsicTextTag, n as authorTreeChildrenFromUnknown, r as collectChildren, s as isAuthorTreeNode, t as authorElementPropsFromEntries, u as isIntrinsicViewTag } from "./tree-DY5XQegS.mjs";
2
2
  //#region src/jsx.ts
3
3
  function isRecord(value) {
4
4
  return typeof value === "object" && value !== null;
@@ -66,6 +66,19 @@ function intrinsicElement(type, propsObject, children, key, sourceSpan) {
66
66
  ...sourceSpan ? { sourceSpan } : {}
67
67
  });
68
68
  }
69
+ if (type === "video") {
70
+ const authored = splitProps(propsObject, children);
71
+ return createAuthorElement({
72
+ source: {
73
+ kind: "tag",
74
+ tag: type
75
+ },
76
+ props: authored.props,
77
+ children: authored.children,
78
+ ...key !== void 0 ? { key } : {},
79
+ ...sourceSpan ? { sourceSpan } : {}
80
+ });
81
+ }
69
82
  const authored = splitProps(propsObject, children);
70
83
  return createAuthorElement({
71
84
  source: {
@@ -80,7 +93,7 @@ function intrinsicElement(type, propsObject, children, key, sourceSpan) {
80
93
  }
81
94
  function createElementWithMetadata(type, props, key, sourceSpan, children = []) {
82
95
  if (typeof type === "string") {
83
- if (isIntrinsicViewTag(type) || isIntrinsicTextTag(type) || type === "img" || type === "shape" || type === "span") return intrinsicElement(type, isRecord(props) ? props : {}, children, key, sourceSpan);
96
+ if (isIntrinsicViewTag(type) || isIntrinsicTextTag(type) || type === "img" || type === "shape" || type === "span" || type === "video") return intrinsicElement(type, isRecord(props) ? props : {}, children, key, sourceSpan);
84
97
  if (!isAuthoredTag(type)) throw new Error(`Intrinsic element is not supported: <${type}>.`);
85
98
  }
86
99
  if (typeof type !== "function") throw new Error("JSX element type must be a function component.");
@@ -1,3 +1,3 @@
1
- import { ot as JsxKey } from "./index-BlOsGMTm.mjs";
2
- import { a as jsxs, i as jsx, n as JsxComponentProps, o as Fragment, r as JsxDevSource, t as JSX } from "./jsx-runtime-Dd6G09P7.mjs";
1
+ import { st as JsxKey } from "./index-vl2Yas8y.mjs";
2
+ import { a as jsxs, i as jsx, n as JsxComponentProps, o as Fragment, r as JsxDevSource, t as JSX } from "./jsx-runtime-B94seTQQ.mjs";
3
3
  export { Fragment, JSX, JsxComponentProps, JsxDevSource, JsxKey, jsx, jsxs };
@@ -1,2 +1,2 @@
1
- import { n as jsxs, r as Fragment, t as jsx } from "./jsx-runtime-DzJLgS1w.mjs";
1
+ import { n as jsxs, r as Fragment, t as jsx } from "./jsx-runtime-pAHuQYMh.mjs";
2
2
  export { Fragment, jsx, jsxs };
@@ -1,4 +1,4 @@
1
- import { $ as Diagnostics, K as SourceOrigin, L as SemanticNode, M as GraphNodeId, O as AssetEntity, Ut as CssVisibility, X as Diagnostic, Y as StyleEntityId, an as StyleDeclarationValue, bt as BorderStyle, fn as VerticalAlign, ht as TemplateAreaKind, i as DeckOptions, j as Brand, nn as StrokeLineCap, on as TextFit, rn as StrokeLineJoin, tn as StrokeDashType } from "./index-BlOsGMTm.mjs";
1
+ import { Kt as CssVisibility, M as Brand, N as GraphNodeId, R as SemanticNode, St as BorderStyle, X as StyleEntityId, Z as Diagnostic, _t as TemplateAreaKind, an as StrokeLineCap, cn as StyleDeclarationValue, et as Diagnostics, hn as VerticalAlign, i as DeckOptions, in as StrokeDashType, k as AssetEntity, ln as TextFit, on as StrokeLineJoin, q as SourceOrigin } from "./index-vl2Yas8y.mjs";
2
2
 
3
3
  //#region src/assets.d.ts
4
4
  type AssetMediaType = string;
@@ -54,8 +54,8 @@ type ProjectedLayoutClip = {
54
54
  readonly clipFrame: FrameIR;
55
55
  readonly visibleFrame: FrameIR;
56
56
  };
57
- type ProjectedUnsupportedSemanticFeature = "blend" | "background" | "border" | "clipping" | "filter" | "isolation" | "outline" | "opacity" | "shadow" | "stroke" | "transform";
58
- type ProjectedUnsupportedFallbackStrategy = "axisAlignedClipWithoutTransformedMask" | "cascadeOpacityToChildren" | "dropBlendMode" | "dropFilterEffect" | "dropIsolationGroup" | "preserveAuthoredValueOnly" | "preserveOpacityWithoutCompositedSubtree" | "preserveTransformWithoutStackingContext" | "sourceRectBeforeTransform";
57
+ type ProjectedUnsupportedSemanticFeature = "blend" | "background" | "border" | "clipping" | "filter" | "image" | "isolation" | "layout" | "outline" | "opacity" | "shadow" | "stroke" | "transform";
58
+ type ProjectedUnsupportedFallbackStrategy = "axisAlignedClipWithoutTransformedMask" | "cascadeOpacityToChildren" | "dropBlendMode" | "dropFilterEffect" | "dropIsolationGroup" | "preserveAuthoredValueOnly" | "preserveOpacityWithoutCompositedSubtree" | "preserveTransformWithoutStackingContext" | "sourceRectBeforeTransform" | "synthesizeFallbackFrame";
59
59
  type ProjectedUnsupportedFallback = {
60
60
  readonly strategy: ProjectedUnsupportedFallbackStrategy;
61
61
  readonly preserves: readonly string[];
@@ -372,8 +372,8 @@ type PackagePartId = Brand<string, "PackagePartId">;
372
372
  type PptxElementId = Brand<string, "PptxElementId">;
373
373
  type PptxSerializedIdentity = Brand<string, "PptxSerializedIdentity">;
374
374
  type PptxPackagePartCategory = "authored-content" | "manifest" | "support";
375
- type PptxPackagePartKind = "content-types" | "document-properties" | "media" | "notes-master" | "notes-slide" | "presentation" | "presentation-properties" | "relationships" | "slide" | "slide-layout" | "slide-master" | "theme" | "view-properties";
376
- type PptxElementKind = "group" | "image" | "shape" | "text";
375
+ type PptxPackagePartKind = "content-types" | "document-properties" | "media" | "notes-master" | "notes-slide" | "presentation" | "presentation-properties" | "relationships" | "slide" | "slide-layout" | "slide-master" | "table-styles" | "theme" | "view-properties";
376
+ type PptxElementKind = "group" | "image" | "shape" | "text" | "video";
377
377
  type PptxElementOrigin = {
378
378
  readonly graphNodeIds?: readonly GraphNodeId[];
379
379
  readonly styleEntityIds?: readonly StyleEntityId[];
@@ -382,6 +382,7 @@ type PptxElementOrigin = {
382
382
  };
383
383
  type PptxSerializedIdentities = {
384
384
  readonly hyperlinkRelationshipId?: PptxSerializedIdentity;
385
+ readonly mediaRelationshipId?: PptxSerializedIdentity;
385
386
  readonly relationshipId?: PptxSerializedIdentity;
386
387
  readonly shapeObjectId?: PptxSerializedIdentity;
387
388
  };
@@ -481,6 +482,19 @@ type PptxPictureElement = PptxBaseElement & {
481
482
  readonly shadow?: PptxShadow;
482
483
  readonly hyperlink?: HyperlinkIR;
483
484
  };
485
+ type PptxVideoElement = PptxBaseElement & {
486
+ readonly kind: "video";
487
+ readonly mediaPartId?: PackagePartId;
488
+ readonly posterMediaPartId?: PackagePartId;
489
+ readonly sourceFrame: FrameIR;
490
+ readonly source: ImageSourceIR;
491
+ readonly posterSource?: ImageSourceIR;
492
+ readonly fit: "contain" | "cover" | "stretch";
493
+ readonly objectPosition: ObjectPositionIR;
494
+ readonly transparency?: number;
495
+ readonly rounding?: boolean;
496
+ readonly shadow?: PptxShadow;
497
+ };
484
498
  type PptxShapeElement = PptxBaseElement & {
485
499
  readonly kind: "shape";
486
500
  readonly shape: "rect" | "ellipse" | "line";
@@ -494,7 +508,7 @@ type PptxShapeElement = PptxBaseElement & {
494
508
  readonly hyperlink?: HyperlinkIR;
495
509
  readonly radiusEmu?: number;
496
510
  };
497
- type PptxElement = PptxGroupElement | PptxPictureElement | PptxShapeElement | PptxTextElement;
511
+ type PptxElement = PptxGroupElement | PptxPictureElement | PptxShapeElement | PptxTextElement | PptxVideoElement;
498
512
  type PptxEmissionTarget = "slide" | "slideLayout" | "slideMaster";
499
513
  type PptxPaintOrderInput = {
500
514
  readonly zIndex?: number;
@@ -544,7 +558,7 @@ type PptxPackagePartBase<TCategory extends PptxPackagePartCategory = PptxPackage
544
558
  };
545
559
  readonly payload?: TPayload;
546
560
  };
547
- type PptxPackagePartOrderGroup = "contentTypes" | "documentProperties" | "media" | "other" | "presentation" | "presentationProperties" | "presentationRelationships" | "rootRelationships" | "slide" | "slideLayout" | "slideLayoutRelationships" | "slideMaster" | "slideMasterRelationships" | "slideRelationships" | "theme" | "viewProperties";
561
+ type PptxPackagePartOrderGroup = "contentTypes" | "documentProperties" | "media" | "other" | "presentation" | "presentationProperties" | "presentationRelationships" | "rootRelationships" | "slide" | "slideLayout" | "slideLayoutRelationships" | "slideMaster" | "slideMasterRelationships" | "slideRelationships" | "tableStyles" | "theme" | "viewProperties";
548
562
  type PptxPackagePartOrderKey = {
549
563
  readonly group: PptxPackagePartOrderGroup;
550
564
  readonly groupOrder: number;
@@ -574,6 +588,7 @@ type PptxMediaMetadata = {
574
588
  readonly hash?: string;
575
589
  };
576
590
  type PptxMediaPartPayload = {
591
+ readonly mediaKind?: "image" | "video";
577
592
  readonly source: ImageSourceIR;
578
593
  readonly sources: readonly ImageSourceIR[];
579
594
  readonly elementId?: PptxElementId;
@@ -767,6 +782,10 @@ type PptxEmptySupportPartPayload = {
767
782
  readonly kind: "view-properties";
768
783
  readonly editable: true;
769
784
  readonly settings: Record<string, never>;
785
+ } | {
786
+ readonly kind: "table-styles";
787
+ readonly editable: true;
788
+ readonly defaultStyleId: string;
770
789
  };
771
790
  type PptxNotesPlaceholderPayload = {
772
791
  readonly kind: "notes-master";
@@ -823,6 +842,9 @@ type PptxPresentationPropertiesPart = PptxSupportPartOf<Extract<PptxSupportPartP
823
842
  type PptxViewPropertiesPart = PptxSupportPartOf<Extract<PptxSupportPartPayload, {
824
843
  readonly kind: "view-properties";
825
844
  }>>;
845
+ type PptxTableStylesPart = PptxSupportPartOf<Extract<PptxSupportPartPayload, {
846
+ readonly kind: "table-styles";
847
+ }>>;
826
848
  type PptxNotesMasterPart = PptxSupportPartOf<Extract<PptxSupportPartPayload, {
827
849
  readonly kind: "notes-master";
828
850
  }>>;
@@ -838,7 +860,7 @@ type PptxSlideMasterPart = PptxSupportPartOf<Extract<PptxSupportPartPayload, {
838
860
  type PptxThemePart = PptxSupportPartOf<Extract<PptxSupportPartPayload, {
839
861
  readonly kind: "theme";
840
862
  }>>;
841
- type PptxSupportPart = PptxCoreDocumentPropertiesPart | PptxExtendedDocumentPropertiesPart | PptxNotesMasterPart | PptxNotesSlidePart | PptxPresentationPart | PptxPresentationPropertiesPart | PptxSlideLayoutPart | PptxSlideMasterPart | PptxThemePart | PptxViewPropertiesPart;
863
+ type PptxSupportPart = PptxCoreDocumentPropertiesPart | PptxExtendedDocumentPropertiesPart | PptxNotesMasterPart | PptxNotesSlidePart | PptxPresentationPart | PptxPresentationPropertiesPart | PptxSlideLayoutPart | PptxSlideMasterPart | PptxTableStylesPart | PptxThemePart | PptxViewPropertiesPart;
842
864
  type PptxContentTypeDefault = {
843
865
  readonly extension: string;
844
866
  readonly contentType: string;
@@ -1014,6 +1036,9 @@ type ProjectInspectionResolvedValues = {
1014
1036
  readonly textStyle?: TextStyleIR;
1015
1037
  readonly imageSource?: ImageSourceIR;
1016
1038
  readonly imageObjectPosition?: ObjectPositionIR;
1039
+ readonly videoSource?: ImageSourceIR;
1040
+ readonly videoPosterSource?: ImageSourceIR;
1041
+ readonly videoObjectPosition?: ObjectPositionIR;
1017
1042
  readonly unsupportedSemantics?: readonly PptxUnsupportedSemantic[];
1018
1043
  };
1019
1044
  type ProjectInspectionPartSummary = {
@@ -0,0 +1,136 @@
1
+ import { closeSync, mkdirSync, openSync, renameSync, statSync, unlinkSync, writeSync } from "node:fs";
2
+ import { mkdir, rename, stat, unlink, writeFile } from "node:fs/promises";
3
+ import { dirname, join } from "node:path";
4
+ //#region src/runtime/node-output.ts
5
+ function temporaryOutputPath(output) {
6
+ return join(dirname(output), `.${Date.now()}-${process.pid}-${Math.random().toString(16).slice(2)}.deckjsx.tmp`);
7
+ }
8
+ function temporaryBackupPath(output) {
9
+ return join(dirname(output), `.${Date.now()}-${process.pid}-${Math.random().toString(16).slice(2)}.deckjsx.backup`);
10
+ }
11
+ function isEnoent(error) {
12
+ return error instanceof Error && "code" in error && error.code === "ENOENT";
13
+ }
14
+ function existingOutputIsFileSync(output) {
15
+ try {
16
+ return statSync(output).isFile();
17
+ } catch (error) {
18
+ if (isEnoent(error)) return false;
19
+ throw error;
20
+ }
21
+ }
22
+ async function existingOutputIsFile(output) {
23
+ try {
24
+ return (await stat(output)).isFile();
25
+ } catch (error) {
26
+ if (isEnoent(error)) return false;
27
+ throw error;
28
+ }
29
+ }
30
+ function replaceOutputSync(tempOutput, output) {
31
+ if (!existingOutputIsFileSync(output)) {
32
+ renameSync(tempOutput, output);
33
+ return;
34
+ }
35
+ const backupOutput = temporaryBackupPath(output);
36
+ renameSync(output, backupOutput);
37
+ try {
38
+ renameSync(tempOutput, output);
39
+ } catch (error) {
40
+ try {
41
+ renameSync(backupOutput, output);
42
+ } catch (restoreError) {
43
+ throw new AggregateError([error, restoreError], "Failed to replace output and restore the previous output file.");
44
+ }
45
+ throw error;
46
+ }
47
+ try {
48
+ unlinkSync(backupOutput);
49
+ } catch {}
50
+ }
51
+ async function replaceOutput(tempOutput, output) {
52
+ if (!await existingOutputIsFile(output)) {
53
+ await rename(tempOutput, output);
54
+ return;
55
+ }
56
+ const backupOutput = temporaryBackupPath(output);
57
+ await rename(output, backupOutput);
58
+ try {
59
+ await rename(tempOutput, output);
60
+ } catch (error) {
61
+ try {
62
+ await rename(backupOutput, output);
63
+ } catch (restoreError) {
64
+ throw new AggregateError([error, restoreError], "Failed to replace output and restore the previous output file.");
65
+ }
66
+ throw error;
67
+ }
68
+ await unlink(backupOutput).catch(() => void 0);
69
+ }
70
+ function createNodeOutputByteSink(input) {
71
+ mkdirSync(dirname(input.output), { recursive: true });
72
+ const tempOutput = temporaryOutputPath(input.output);
73
+ const fd = openSync(tempOutput, "wx");
74
+ let closed = false;
75
+ let failed = false;
76
+ const cleanup = () => {
77
+ try {
78
+ unlinkSync(tempOutput);
79
+ } catch {}
80
+ };
81
+ const closeTemp = () => {
82
+ if (closed) return;
83
+ closed = true;
84
+ closeSync(fd);
85
+ };
86
+ return {
87
+ name: "node-file-output",
88
+ write(chunk) {
89
+ if (closed) throw new Error("Cannot write output bytes after the file sink is closed.");
90
+ try {
91
+ writeSync(fd, chunk, 0, chunk.byteLength);
92
+ } catch (error) {
93
+ failed = true;
94
+ try {
95
+ closeTemp();
96
+ } catch {}
97
+ cleanup();
98
+ throw error;
99
+ }
100
+ },
101
+ close() {
102
+ if (closed) return;
103
+ try {
104
+ closeTemp();
105
+ } catch (error) {
106
+ failed = true;
107
+ cleanup();
108
+ throw error;
109
+ }
110
+ if (failed) {
111
+ cleanup();
112
+ return;
113
+ }
114
+ try {
115
+ replaceOutputSync(tempOutput, input.output);
116
+ } catch (error) {
117
+ cleanup();
118
+ throw error;
119
+ }
120
+ }
121
+ };
122
+ }
123
+ async function writeNodeOutput(input) {
124
+ await mkdir(dirname(input.output), { recursive: true });
125
+ const tempOutput = temporaryOutputPath(input.output);
126
+ try {
127
+ await writeFile(tempOutput, input.artifact.bytes, { flag: "wx" });
128
+ await replaceOutput(tempOutput, input.output);
129
+ } catch (error) {
130
+ await unlink(tempOutput).catch(() => void 0);
131
+ throw error;
132
+ }
133
+ return { path: input.output };
134
+ }
135
+ //#endregion
136
+ export { createNodeOutputByteSink, writeNodeOutput };
@@ -1,11 +1,14 @@
1
- import { $ as Diagnostics, M as GraphNodeId, an as StyleDeclarationValue, in as StyleDeclaration } from "./index-BlOsGMTm.mjs";
1
+ import { N as GraphNodeId, cn as StyleDeclarationValue, et as Diagnostics, sn as StyleDeclaration } from "./index-vl2Yas8y.mjs";
2
2
 
3
3
  //#region src/style/resolve.d.ts
4
4
  type ResolvedStyleDeclaration = StyleDeclaration;
5
5
  type ResolvedStyleValue = StyleDeclarationValue;
6
- type ResolvedStyleLayer = "default" | "theme" | "class" | "style";
6
+ type ResolvedStyleLayer = "default" | "inherited" | "theme" | "class" | "style";
7
7
  type ResolvedStyleSource = {
8
8
  readonly layer: "default";
9
+ } | {
10
+ readonly layer: "inherited";
11
+ readonly parentId: GraphNodeId;
9
12
  } | {
10
13
  readonly layer: "theme";
11
14
  readonly defaultKey: string;
@@ -26,7 +26,7 @@ function isIntrinsicTextTag(value) {
26
26
  return INTRINSIC_TEXT_TAGS.has(value);
27
27
  }
28
28
  function isAuthoredTag(value) {
29
- return isIntrinsicViewTag(value) || isIntrinsicTextTag(value) || value === "img" || value === "shape" || value === "span";
29
+ return isIntrinsicViewTag(value) || isIntrinsicTextTag(value) || value === "img" || value === "shape" || value === "span" || value === "video";
30
30
  }
31
31
  //#endregion
32
32
  //#region src/authoring/tree.ts
@@ -81,6 +81,9 @@ function isSpanElementInput(input) {
81
81
  function isImageElementInput(input) {
82
82
  return input.source.kind === "tag" && input.source.tag === "img";
83
83
  }
84
+ function isVideoElementInput(input) {
85
+ return input.source.kind === "tag" && input.source.tag === "video";
86
+ }
84
87
  function isShapeElementInput(input) {
85
88
  return input.source.kind === "tag" && input.source.tag === "shape";
86
89
  }
@@ -110,6 +113,11 @@ function createAuthorElement(input) {
110
113
  source: input.source,
111
114
  props: input.props
112
115
  });
116
+ if (isVideoElementInput(input)) return buildAuthorElement({
117
+ ...input,
118
+ source: input.source,
119
+ props: input.props
120
+ });
113
121
  if (isShapeElementInput(input)) return buildAuthorElement({
114
122
  ...input,
115
123
  source: input.source,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deckjsx",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "Generate PowerPoint presentations from TSX/JSX through a compiler pipeline.",
5
5
  "license": "MIT",
6
6
  "author": "deckjsx contributors",
@@ -1,28 +0,0 @@
1
- import { closeSync, mkdirSync, openSync, writeSync } from "node:fs";
2
- import { mkdir, writeFile } from "node:fs/promises";
3
- import { dirname } from "node:path";
4
- //#region src/runtime/node-output.ts
5
- function createNodeOutputByteSink(input) {
6
- mkdirSync(dirname(input.output), { recursive: true });
7
- const fd = openSync(input.output, "w");
8
- let closed = false;
9
- return {
10
- name: "node-file-output",
11
- write(chunk) {
12
- if (closed) throw new Error("Cannot write output bytes after the file sink is closed.");
13
- writeSync(fd, chunk, 0, chunk.byteLength);
14
- },
15
- close() {
16
- if (closed) return;
17
- closed = true;
18
- closeSync(fd);
19
- }
20
- };
21
- }
22
- async function writeNodeOutput(input) {
23
- await mkdir(dirname(input.output), { recursive: true });
24
- await writeFile(input.output, input.artifact.bytes);
25
- return { path: input.output };
26
- }
27
- //#endregion
28
- export { createNodeOutputByteSink, writeNodeOutput };