deckjsx 0.8.0 → 0.8.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.
@@ -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-dx2ZSBgF.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-BVkO8qGK.mjs";
3
- import { a as ResolvedStyleSource, i as ResolvedStyleProperty, n as ResolvedStyleLayer, o as StyleResolutionResult, r as ResolvedStyleMap, t as ResolvedStyle } from "./resolve-BD1dHxZd.mjs";
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";
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-dx2ZSBgF.mjs";
2
- import { a as jsxs, i as jsx, n as JsxComponentProps, o as Fragment, r as JsxDevSource } from "./jsx-runtime-_eIs-wi1.mjs";
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";
3
3
 
4
4
  //#region src/jsx-dev-runtime.d.ts
5
5
  type JsxComponent<P, R extends DeckJsxElement> = (props: P) => R;
@@ -1,5 +1,4 @@
1
- import { n as createElementWithMetadata, t as Fragment } from "./jsx-DGGM5erN.mjs";
2
- import { jsx, jsxs } from "./jsx-runtime.mjs";
1
+ import { i as createElementWithMetadata, n as jsxs, r as Fragment, t as jsx } from "./jsx-runtime-DzJLgS1w.mjs";
3
2
  //#region src/jsx-dev-runtime.ts
4
3
  function sourceSpanFromDevSource(source) {
5
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-dx2ZSBgF.mjs";
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
2
 
3
3
  //#region src/jsx.d.ts
4
4
  declare function Fragment(props: {
@@ -0,0 +1,120 @@
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";
2
+ //#region src/jsx.ts
3
+ function isRecord(value) {
4
+ return typeof value === "object" && value !== null;
5
+ }
6
+ function propsRecordWithoutChildren(props) {
7
+ return authorElementPropsFromEntries(Object.entries(props).filter(([key]) => key !== "children"));
8
+ }
9
+ function splitProps(props, children) {
10
+ const rawChildren = collectChildren(props, children);
11
+ return {
12
+ props: propsRecordWithoutChildren(props),
13
+ children: rawChildren === void 0 ? [] : [rawChildren]
14
+ };
15
+ }
16
+ function intrinsicElement(type, propsObject, children, key, sourceSpan) {
17
+ if (isIntrinsicViewTag(type)) {
18
+ const authored = splitProps(propsObject, children);
19
+ return createAuthorElement({
20
+ source: {
21
+ kind: "tag",
22
+ tag: type
23
+ },
24
+ props: authored.props,
25
+ children: authored.children,
26
+ ...key !== void 0 ? { key } : {},
27
+ ...sourceSpan ? { sourceSpan } : {}
28
+ });
29
+ }
30
+ if (isIntrinsicTextTag(type)) {
31
+ const authored = splitProps(propsObject, children);
32
+ return createAuthorElement({
33
+ source: {
34
+ kind: "tag",
35
+ tag: type
36
+ },
37
+ props: authored.props,
38
+ children: authored.children,
39
+ ...key !== void 0 ? { key } : {},
40
+ ...sourceSpan ? { sourceSpan } : {}
41
+ });
42
+ }
43
+ if (type === "span") {
44
+ const authored = splitProps(propsObject, children);
45
+ return createAuthorElement({
46
+ source: {
47
+ kind: "tag",
48
+ tag: type
49
+ },
50
+ props: authored.props,
51
+ children: authored.children,
52
+ ...key !== void 0 ? { key } : {},
53
+ ...sourceSpan ? { sourceSpan } : {}
54
+ });
55
+ }
56
+ if (type === "img") {
57
+ const authored = splitProps(propsObject, children);
58
+ return createAuthorElement({
59
+ source: {
60
+ kind: "tag",
61
+ tag: type
62
+ },
63
+ props: authored.props,
64
+ children: authored.children,
65
+ ...key !== void 0 ? { key } : {},
66
+ ...sourceSpan ? { sourceSpan } : {}
67
+ });
68
+ }
69
+ const authored = splitProps(propsObject, children);
70
+ return createAuthorElement({
71
+ source: {
72
+ kind: "tag",
73
+ tag: type
74
+ },
75
+ props: authored.props,
76
+ children: authored.children,
77
+ ...key !== void 0 ? { key } : {},
78
+ ...sourceSpan ? { sourceSpan } : {}
79
+ });
80
+ }
81
+ function createElementWithMetadata(type, props, key, sourceSpan, children = []) {
82
+ 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);
84
+ if (!isAuthoredTag(type)) throw new Error(`Intrinsic element is not supported: <${type}>.`);
85
+ }
86
+ if (typeof type !== "function") throw new Error("JSX element type must be a function component.");
87
+ if (type === Fragment) {
88
+ const rawChildren = collectChildren(isRecord(props) ? props : {}, children);
89
+ return createAuthorFragment({
90
+ children: rawChildren === void 0 ? [] : [rawChildren],
91
+ ...key !== void 0 ? { key } : {},
92
+ ...sourceSpan ? { sourceSpan } : {}
93
+ });
94
+ }
95
+ const propsObject = isRecord(props) ? props : {};
96
+ const rawChildren = collectChildren(propsObject, children);
97
+ const result = type({
98
+ ...propsObject,
99
+ children: rawChildren
100
+ });
101
+ if (!isAuthorTreeNode(result)) throw new Error("Function components must return a deckjsx author tree node.");
102
+ if (key === void 0 && sourceSpan === void 0) return result;
103
+ if (result.kind === "element") return {
104
+ ...result,
105
+ ...key !== void 0 ? { key } : {},
106
+ ...sourceSpan ? { sourceSpan } : {}
107
+ };
108
+ return result;
109
+ }
110
+ function Fragment(props) {
111
+ return createAuthorFragment({ children: props.children === void 0 ? [] : authorTreeChildrenFromUnknown([props.children]) });
112
+ }
113
+ //#endregion
114
+ //#region src/jsx-runtime.ts
115
+ function jsx(type, props, key) {
116
+ return createElementWithMetadata(type, props, key);
117
+ }
118
+ const jsxs = jsx;
119
+ //#endregion
120
+ export { createElementWithMetadata as i, jsxs as n, Fragment as r, jsx as t };
@@ -1,3 +1,3 @@
1
- import { ot as JsxKey } from "./index-dx2ZSBgF.mjs";
2
- import { a as jsxs, i as jsx, n as JsxComponentProps, o as Fragment, r as JsxDevSource, t as JSX } from "./jsx-runtime-_eIs-wi1.mjs";
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";
3
3
  export { Fragment, JSX, JsxComponentProps, JsxDevSource, JsxKey, jsx, jsxs };
@@ -1,8 +1,2 @@
1
- import { n as createElementWithMetadata, t as Fragment } from "./jsx-DGGM5erN.mjs";
2
- //#region src/jsx-runtime.ts
3
- function jsx(type, props, key) {
4
- return createElementWithMetadata(type, props, key);
5
- }
6
- const jsxs = jsx;
7
- //#endregion
1
+ import { n as jsxs, r as Fragment, t as jsx } from "./jsx-runtime-DzJLgS1w.mjs";
8
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-dx2ZSBgF.mjs";
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";
2
2
 
3
3
  //#region src/assets.d.ts
4
4
  type AssetMediaType = string;
@@ -260,7 +260,6 @@ type RenderAssemblyExpectedEntrySummary = {
260
260
  readonly requirementCondition?: string;
261
261
  readonly requirementDependencies?: readonly string[];
262
262
  readonly requirementReason?: string;
263
- readonly compression: "default" | "store";
264
263
  };
265
264
  type RenderAssemblyFinalEntrySummary = {
266
265
  readonly status: "failed" | "missing" | "rebuilt" | "reused";
@@ -1,4 +1,4 @@
1
- import { $ as Diagnostics, M as GraphNodeId, an as StyleDeclarationValue, in as StyleDeclaration } from "./index-dx2ZSBgF.mjs";
1
+ import { $ as Diagnostics, M as GraphNodeId, an as StyleDeclarationValue, in as StyleDeclaration } from "./index-BlOsGMTm.mjs";
2
2
 
3
3
  //#region src/style/resolve.d.ts
4
4
  type ResolvedStyleDeclaration = StyleDeclaration;
@@ -0,0 +1,156 @@
1
+ //#region src/authoring/tags.ts
2
+ const INTRINSIC_VIEW_TAGS = new Set([
3
+ "article",
4
+ "aside",
5
+ "div",
6
+ "figure",
7
+ "footer",
8
+ "header",
9
+ "main",
10
+ "nav",
11
+ "section"
12
+ ]);
13
+ const INTRINSIC_TEXT_TAGS = new Set([
14
+ "h1",
15
+ "h2",
16
+ "h3",
17
+ "h4",
18
+ "h5",
19
+ "h6",
20
+ "p"
21
+ ]);
22
+ function isIntrinsicViewTag(value) {
23
+ return INTRINSIC_VIEW_TAGS.has(value);
24
+ }
25
+ function isIntrinsicTextTag(value) {
26
+ return INTRINSIC_TEXT_TAGS.has(value);
27
+ }
28
+ function isAuthoredTag(value) {
29
+ return isIntrinsicViewTag(value) || isIntrinsicTextTag(value) || value === "img" || value === "shape" || value === "span";
30
+ }
31
+ //#endregion
32
+ //#region src/authoring/tree.ts
33
+ function isRecord(value) {
34
+ return typeof value === "object" && value !== null;
35
+ }
36
+ function isAuthorElementPropValue(value) {
37
+ if (value === null || value === void 0 || typeof value === "string" || typeof value === "number" || typeof value === "boolean") return true;
38
+ if (Array.isArray(value)) return value.every(isAuthorElementPropValue);
39
+ if (typeof value !== "object" || isAuthorTreeNode(value)) return false;
40
+ return Object.values(value).every(isAuthorElementPropValue);
41
+ }
42
+ function authorElementPropsFromEntries(entries) {
43
+ const props = {};
44
+ for (const [key, value] of entries) {
45
+ if (!isAuthorElementPropValue(value)) throw new Error(`JSX prop "${key}" must be serializable authoring data.`);
46
+ props[key] = value;
47
+ }
48
+ return props;
49
+ }
50
+ function createAuthorText(value, sourceSpan) {
51
+ return {
52
+ $$typeof: "deckjsx.author-tree",
53
+ kind: "text",
54
+ value,
55
+ ...sourceSpan ? { sourceSpan } : {}
56
+ };
57
+ }
58
+ function buildAuthorElement(input) {
59
+ return {
60
+ $$typeof: "deckjsx.author-tree",
61
+ kind: "element",
62
+ source: input.source,
63
+ ...input.key !== void 0 ? { key: input.key } : {},
64
+ props: input.props,
65
+ children: normalizeAuthorChildren(input.children ?? []),
66
+ ...input.sourceSpan ? { sourceSpan: input.sourceSpan } : {}
67
+ };
68
+ }
69
+ function isSlideElementInput(input) {
70
+ return input.source.kind === "slide";
71
+ }
72
+ function isViewElementInput(input) {
73
+ return input.source.kind === "tag" && isIntrinsicViewTag(input.source.tag);
74
+ }
75
+ function isTextElementInput(input) {
76
+ return input.source.kind === "tag" && isIntrinsicTextTag(input.source.tag);
77
+ }
78
+ function isSpanElementInput(input) {
79
+ return input.source.kind === "tag" && input.source.tag === "span";
80
+ }
81
+ function isImageElementInput(input) {
82
+ return input.source.kind === "tag" && input.source.tag === "img";
83
+ }
84
+ function isShapeElementInput(input) {
85
+ return input.source.kind === "tag" && input.source.tag === "shape";
86
+ }
87
+ function createAuthorElement(input) {
88
+ if (isSlideElementInput(input)) return buildAuthorElement({
89
+ ...input,
90
+ source: input.source,
91
+ props: input.props ?? {}
92
+ });
93
+ if (isViewElementInput(input)) return buildAuthorElement({
94
+ ...input,
95
+ source: input.source,
96
+ props: input.props ?? {}
97
+ });
98
+ if (isTextElementInput(input)) return buildAuthorElement({
99
+ ...input,
100
+ source: input.source,
101
+ props: input.props ?? {}
102
+ });
103
+ if (isSpanElementInput(input)) return buildAuthorElement({
104
+ ...input,
105
+ source: input.source,
106
+ props: input.props ?? {}
107
+ });
108
+ if (isImageElementInput(input)) return buildAuthorElement({
109
+ ...input,
110
+ source: input.source,
111
+ props: input.props
112
+ });
113
+ if (isShapeElementInput(input)) return buildAuthorElement({
114
+ ...input,
115
+ source: input.source,
116
+ props: input.props
117
+ });
118
+ throw new Error("Unsupported author element source.");
119
+ }
120
+ function createAuthorFragment(input) {
121
+ return {
122
+ $$typeof: "deckjsx.author-tree",
123
+ kind: "fragment",
124
+ ...input.key !== void 0 ? { key: input.key } : {},
125
+ children: normalizeAuthorChildren(input.children ?? []),
126
+ ...input.sourceSpan ? { sourceSpan: input.sourceSpan } : {}
127
+ };
128
+ }
129
+ function isAuthorTreeNode(value) {
130
+ return isRecord(value) && value.$$typeof === "deckjsx.author-tree";
131
+ }
132
+ function isAuthorTreeChild(value) {
133
+ return value === null || value === void 0 || typeof value === "boolean" || typeof value === "string" || typeof value === "number" || isAuthorTreeNode(value) || Array.isArray(value) && value.every(isAuthorTreeChild);
134
+ }
135
+ function authorTreeChildrenFromUnknown(children) {
136
+ return children.map((child) => {
137
+ if (!isAuthorTreeChild(child)) throw new Error("JSX children must be deckjsx author tree nodes or primitive text values.");
138
+ return child;
139
+ });
140
+ }
141
+ function normalizeAuthorChildren(children) {
142
+ return children.flatMap((child) => {
143
+ if (child === null || child === void 0 || typeof child === "boolean") return [];
144
+ if (typeof child === "string" || typeof child === "number") return [createAuthorText(child)];
145
+ if (Array.isArray(child)) return normalizeAuthorChildren(child);
146
+ if (isAuthorTreeNode(child)) return [child];
147
+ throw new Error("JSX children must be deckjsx author tree nodes or primitive text values.");
148
+ });
149
+ }
150
+ function collectChildren(propsObject, children) {
151
+ if (children.length === 0) return propsObject.children;
152
+ if (children.length === 1) return children[0];
153
+ return children;
154
+ }
155
+ //#endregion
156
+ export { createAuthorFragment as a, isAuthoredTag as c, createAuthorElement as i, isIntrinsicTextTag as l, authorTreeChildrenFromUnknown as n, isAuthorTreeChild as o, collectChildren as r, isAuthorTreeNode as s, authorElementPropsFromEntries as t, isIntrinsicViewTag as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deckjsx",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Generate PowerPoint presentations from TSX/JSX through a compiler pipeline.",
5
5
  "license": "MIT",
6
6
  "author": "deckjsx contributors",
@@ -33,13 +33,12 @@
33
33
  "verify:render": "bun run .github/render/verify-render.tsx",
34
34
  "prepublishOnly": "vp run build"
35
35
  },
36
- "dependencies": {
37
- "fflate": "^0.8.3"
38
- },
36
+ "dependencies": {},
39
37
  "devDependencies": {
40
38
  "@types/node": "^25.5.0",
41
39
  "@typescript/native-preview": "7.0.0-dev.20260328.1",
42
40
  "bumpp": "^11.0.1",
41
+ "fflate": "^0.8.3",
43
42
  "typescript": "^6.0.2",
44
43
  "vite-plus": "^0.1.14"
45
44
  },