@hirokisakabe/pom 0.1.12 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -584
- package/dist/calcYogaLayout/calcYogaLayout.d.ts.map +1 -1
- package/dist/calcYogaLayout/calcYogaLayout.js +61 -84
- package/dist/calcYogaLayout/fontLoader.d.ts +20 -0
- package/dist/calcYogaLayout/fontLoader.d.ts.map +1 -0
- package/dist/calcYogaLayout/fontLoader.js +59 -0
- package/dist/calcYogaLayout/fonts/notoSansJPBold.d.ts +7 -0
- package/dist/calcYogaLayout/fonts/notoSansJPBold.d.ts.map +1 -0
- package/dist/calcYogaLayout/fonts/notoSansJPBold.js +6 -0
- package/dist/calcYogaLayout/fonts/notoSansJPRegular.d.ts +7 -0
- package/dist/calcYogaLayout/fonts/notoSansJPRegular.d.ts.map +1 -0
- package/dist/calcYogaLayout/fonts/notoSansJPRegular.js +6 -0
- package/dist/calcYogaLayout/measureText.d.ts +1 -1
- package/dist/calcYogaLayout/measureText.d.ts.map +1 -1
- package/dist/calcYogaLayout/measureText.js +65 -114
- package/dist/inputSchema.d.ts +268 -2
- package/dist/inputSchema.d.ts.map +1 -1
- package/dist/inputSchema.js +53 -1
- package/dist/renderPptx/nodes/box.d.ts +1 -0
- package/dist/renderPptx/nodes/box.d.ts.map +1 -0
- package/dist/renderPptx/nodes/box.js +2 -0
- package/dist/renderPptx/nodes/chart.d.ts +8 -0
- package/dist/renderPptx/nodes/chart.d.ts.map +1 -0
- package/dist/renderPptx/nodes/chart.js +23 -0
- package/dist/renderPptx/nodes/flow.d.ts +8 -0
- package/dist/renderPptx/nodes/flow.d.ts.map +1 -0
- package/dist/renderPptx/nodes/flow.js +208 -0
- package/dist/renderPptx/nodes/image.d.ts +8 -0
- package/dist/renderPptx/nodes/image.d.ts.map +1 -0
- package/dist/renderPptx/nodes/image.js +17 -0
- package/dist/renderPptx/nodes/index.d.ts +11 -0
- package/dist/renderPptx/nodes/index.d.ts.map +1 -0
- package/dist/renderPptx/nodes/index.js +10 -0
- package/dist/renderPptx/nodes/matrix.d.ts +8 -0
- package/dist/renderPptx/nodes/matrix.d.ts.map +1 -0
- package/dist/renderPptx/nodes/matrix.js +150 -0
- package/dist/renderPptx/nodes/processArrow.d.ts +8 -0
- package/dist/renderPptx/nodes/processArrow.d.ts.map +1 -0
- package/dist/renderPptx/nodes/processArrow.js +75 -0
- package/dist/renderPptx/nodes/shape.d.ts +8 -0
- package/dist/renderPptx/nodes/shape.d.ts.map +1 -0
- package/dist/renderPptx/nodes/shape.js +49 -0
- package/dist/renderPptx/nodes/table.d.ts +8 -0
- package/dist/renderPptx/nodes/table.d.ts.map +1 -0
- package/dist/renderPptx/nodes/table.js +29 -0
- package/dist/renderPptx/nodes/text.d.ts +8 -0
- package/dist/renderPptx/nodes/text.d.ts.map +1 -0
- package/dist/renderPptx/nodes/text.js +5 -0
- package/dist/renderPptx/nodes/timeline.d.ts +8 -0
- package/dist/renderPptx/nodes/timeline.d.ts.map +1 -0
- package/dist/renderPptx/nodes/timeline.js +157 -0
- package/dist/renderPptx/nodes/tree.d.ts +8 -0
- package/dist/renderPptx/nodes/tree.d.ts.map +1 -0
- package/dist/renderPptx/nodes/tree.js +223 -0
- package/dist/renderPptx/renderPptx.d.ts.map +1 -1
- package/dist/renderPptx/renderPptx.js +32 -166
- package/dist/renderPptx/types.d.ts +10 -0
- package/dist/renderPptx/types.d.ts.map +1 -0
- package/dist/renderPptx/utils/backgroundBorder.d.ts +8 -0
- package/dist/renderPptx/utils/backgroundBorder.d.ts.map +1 -0
- package/dist/renderPptx/utils/backgroundBorder.js +44 -0
- package/dist/renderPptx/utils/index.d.ts +6 -0
- package/dist/renderPptx/utils/index.d.ts.map +1 -0
- package/dist/renderPptx/utils/index.js +3 -0
- package/dist/renderPptx/utils/shapeDrawing.d.ts +27 -0
- package/dist/renderPptx/utils/shapeDrawing.d.ts.map +1 -0
- package/dist/renderPptx/utils/shapeDrawing.js +36 -0
- package/dist/renderPptx/utils/textDrawing.d.ts +20 -0
- package/dist/renderPptx/utils/textDrawing.d.ts.map +1 -0
- package/dist/renderPptx/utils/textDrawing.js +20 -0
- package/dist/toPositioned/toPositioned.d.ts.map +1 -1
- package/dist/toPositioned/toPositioned.js +45 -0
- package/dist/types.d.ts +399 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +134 -0
- package/package.json +13 -3
- package/dist/parsePptx/convertChart.d.ts +0 -8
- package/dist/parsePptx/convertChart.d.ts.map +0 -1
- package/dist/parsePptx/convertChart.js +0 -78
- package/dist/parsePptx/convertImage.d.ts +0 -8
- package/dist/parsePptx/convertImage.d.ts.map +0 -1
- package/dist/parsePptx/convertImage.js +0 -13
- package/dist/parsePptx/convertShape.d.ts +0 -7
- package/dist/parsePptx/convertShape.d.ts.map +0 -1
- package/dist/parsePptx/convertShape.js +0 -137
- package/dist/parsePptx/convertTable.d.ts +0 -7
- package/dist/parsePptx/convertTable.d.ts.map +0 -1
- package/dist/parsePptx/convertTable.js +0 -46
- package/dist/parsePptx/convertText.d.ts +0 -7
- package/dist/parsePptx/convertText.d.ts.map +0 -1
- package/dist/parsePptx/convertText.js +0 -32
- package/dist/parsePptx/index.d.ts +0 -23
- package/dist/parsePptx/index.d.ts.map +0 -1
- package/dist/parsePptx/index.js +0 -114
- package/dist/parsePptx/parseHtml.d.ts +0 -22
- package/dist/parsePptx/parseHtml.d.ts.map +0 -1
- package/dist/parsePptx/parseHtml.js +0 -53
- package/dist/parsePptx/types.d.ts +0 -15
- package/dist/parsePptx/types.d.ts.map +0 -1
- package/dist/parsePptx/units.d.ts +0 -13
- package/dist/parsePptx/units.d.ts.map +0 -1
- package/dist/parsePptx/units.js +0 -19
- /package/dist/{parsePptx → renderPptx}/types.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measureText.d.ts","sourceRoot":"","sources":["../../src/calcYogaLayout/measureText.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GAAG;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,
|
|
1
|
+
{"version":3,"file":"measureText.d.ts","sourceRoot":"","sources":["../../src/calcYogaLayout/measureText.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GAAG;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAoHnE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAEtE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,mBAAmB,CAE5D;AAcD;;GAEG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,cAAc,GACnB;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAmBA"}
|
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const canvas = createCanvas(1, 1);
|
|
3
|
-
const ctx = canvas.getContext("2d");
|
|
4
|
-
// フォント利用可否のキャッシュ
|
|
5
|
-
const fontAvailabilityCache = new Map();
|
|
6
|
-
/**
|
|
7
|
-
* 指定されたフォントが利用可能かどうかをチェックする
|
|
8
|
-
* 既知のフォントと未知のフォントで同じ幅になるかチェックし、
|
|
9
|
-
* 同じなら「フォントが利用できない」と判定する
|
|
10
|
-
*/
|
|
11
|
-
function isFontAvailable(fontFamily, fontSizePx) {
|
|
12
|
-
const cacheKey = `${fontFamily}:${fontSizePx}`;
|
|
13
|
-
const cached = fontAvailabilityCache.get(cacheKey);
|
|
14
|
-
if (cached !== undefined) {
|
|
15
|
-
return cached;
|
|
16
|
-
}
|
|
17
|
-
// テスト文字列(日本語と英語を含む)
|
|
18
|
-
const testString = "あいうABC123";
|
|
19
|
-
// 存在しないフォント名でテスト
|
|
20
|
-
const nonExistentFont = "NonExistentFont_12345_XYZ";
|
|
21
|
-
ctx.font = `${fontSizePx}px "${fontFamily}"`;
|
|
22
|
-
const targetWidth = ctx.measureText(testString).width;
|
|
23
|
-
ctx.font = `${fontSizePx}px "${nonExistentFont}"`;
|
|
24
|
-
const fallbackWidth = ctx.measureText(testString).width;
|
|
25
|
-
// 幅が同じなら、フォントが利用できない(フォールバックされている)
|
|
26
|
-
const isAvailable = Math.abs(targetWidth - fallbackWidth) > 0.1;
|
|
27
|
-
fontAvailabilityCache.set(cacheKey, isAvailable);
|
|
28
|
-
return isAvailable;
|
|
29
|
-
}
|
|
1
|
+
import { measureTextWidth as measureTextWidthOpentype } from "./fontLoader.js";
|
|
30
2
|
/**
|
|
31
3
|
* 文字がCJK(日本語・中国語・韓国語)文字かどうかを判定する
|
|
32
4
|
*/
|
|
@@ -78,51 +50,13 @@ function estimateTextWidth(text, fontSizePx) {
|
|
|
78
50
|
}
|
|
79
51
|
return width;
|
|
80
52
|
}
|
|
81
|
-
// 現在のテキスト計測モード
|
|
82
|
-
let currentMode = "auto";
|
|
83
|
-
/**
|
|
84
|
-
* テキスト計測モードを設定する
|
|
85
|
-
*/
|
|
86
|
-
export function setTextMeasurementMode(mode) {
|
|
87
|
-
currentMode = mode;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* 現在のテキスト計測モードを取得する
|
|
91
|
-
*/
|
|
92
|
-
export function getTextMeasurementMode() {
|
|
93
|
-
return currentMode;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* テキストを折り返し付きでレイアウトし、そのサイズを測定する
|
|
97
|
-
*/
|
|
98
|
-
export function measureText(text, maxWidthPx, opts) {
|
|
99
|
-
const { fontFamily, fontSizePx } = opts;
|
|
100
|
-
// 計測方法を決定
|
|
101
|
-
const shouldUseFallback = (() => {
|
|
102
|
-
switch (currentMode) {
|
|
103
|
-
case "canvas":
|
|
104
|
-
return false;
|
|
105
|
-
case "fallback":
|
|
106
|
-
return true;
|
|
107
|
-
case "auto":
|
|
108
|
-
return !isFontAvailable(fontFamily, fontSizePx);
|
|
109
|
-
}
|
|
110
|
-
})();
|
|
111
|
-
if (shouldUseFallback) {
|
|
112
|
-
return measureTextFallback(text, maxWidthPx, opts);
|
|
113
|
-
}
|
|
114
|
-
return measureTextCanvas(text, maxWidthPx, opts);
|
|
115
|
-
}
|
|
116
53
|
/**
|
|
117
|
-
*
|
|
54
|
+
* テキストを折り返して行ごとの幅を計算する
|
|
118
55
|
*/
|
|
119
|
-
function
|
|
120
|
-
applyFontStyle(opts);
|
|
121
|
-
// まず改行で段落に分割
|
|
56
|
+
function wrapText(text, maxWidthPx, measureWidth) {
|
|
122
57
|
const paragraphs = text.split("\n");
|
|
123
58
|
const lines = [];
|
|
124
59
|
for (const paragraph of paragraphs) {
|
|
125
|
-
// 空の段落(連続した改行)も1行としてカウント
|
|
126
60
|
if (paragraph === "") {
|
|
127
61
|
lines.push({ widthPx: 0 });
|
|
128
62
|
continue;
|
|
@@ -132,23 +66,27 @@ function measureTextCanvas(text, maxWidthPx, opts) {
|
|
|
132
66
|
let currentWidth = 0;
|
|
133
67
|
for (const word of words) {
|
|
134
68
|
const candidate = current ? current + word : word;
|
|
135
|
-
const w =
|
|
69
|
+
const w = measureWidth(candidate);
|
|
136
70
|
if (w <= maxWidthPx || !current) {
|
|
137
|
-
// まだ詰められる
|
|
138
71
|
current = candidate;
|
|
139
72
|
currentWidth = w;
|
|
140
73
|
}
|
|
141
74
|
else {
|
|
142
|
-
// 折り返す
|
|
143
75
|
lines.push({ widthPx: currentWidth });
|
|
144
76
|
current = word;
|
|
145
|
-
currentWidth =
|
|
77
|
+
currentWidth = measureWidth(word);
|
|
146
78
|
}
|
|
147
79
|
}
|
|
148
80
|
if (current) {
|
|
149
81
|
lines.push({ widthPx: currentWidth });
|
|
150
82
|
}
|
|
151
83
|
}
|
|
84
|
+
return lines;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 行情報から最終的なサイズを計算する
|
|
88
|
+
*/
|
|
89
|
+
function calculateResult(lines, opts) {
|
|
152
90
|
const lineHeightRatio = opts.lineHeight ?? 1.3;
|
|
153
91
|
const lineHeightPx = opts.fontSizePx * lineHeightRatio;
|
|
154
92
|
const widthPx = lines.length ? Math.max(...lines.map((l) => l.widthPx)) : 0;
|
|
@@ -156,52 +94,65 @@ function measureTextCanvas(text, maxWidthPx, opts) {
|
|
|
156
94
|
// 端数切り上げ+余裕分 10px を足す
|
|
157
95
|
return { widthPx: widthPx + 10, heightPx };
|
|
158
96
|
}
|
|
97
|
+
// 現在のテキスト計測モード
|
|
98
|
+
let currentMode = "auto";
|
|
159
99
|
/**
|
|
160
|
-
*
|
|
100
|
+
* テキスト計測モードを設定する
|
|
161
101
|
*/
|
|
162
|
-
function
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
102
|
+
export function setTextMeasurementMode(mode) {
|
|
103
|
+
currentMode = mode;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* 現在のテキスト計測モードを取得する
|
|
107
|
+
*/
|
|
108
|
+
export function getTextMeasurementMode() {
|
|
109
|
+
return currentMode;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* fontWeight を "normal" | "bold" に正規化する
|
|
113
|
+
*/
|
|
114
|
+
function normalizeFontWeight(weight) {
|
|
115
|
+
if (weight === "bold" || weight === 700) {
|
|
116
|
+
return "bold";
|
|
117
|
+
}
|
|
118
|
+
return "normal";
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* テキストを折り返し付きでレイアウトし、そのサイズを測定する
|
|
122
|
+
*/
|
|
123
|
+
export function measureText(text, maxWidthPx, opts) {
|
|
124
|
+
// 計測方法を決定
|
|
125
|
+
const shouldUseFallback = (() => {
|
|
126
|
+
switch (currentMode) {
|
|
127
|
+
case "opentype":
|
|
128
|
+
return false;
|
|
129
|
+
case "fallback":
|
|
130
|
+
return true;
|
|
131
|
+
case "auto":
|
|
132
|
+
// opentype.js はバンドルされたフォントを使うため常に利用可能
|
|
133
|
+
return false;
|
|
193
134
|
}
|
|
135
|
+
})();
|
|
136
|
+
if (shouldUseFallback) {
|
|
137
|
+
return measureTextFallback(text, maxWidthPx, opts);
|
|
194
138
|
}
|
|
195
|
-
|
|
196
|
-
const lineHeightPx = fontSizePx * lineHeightRatio;
|
|
197
|
-
const widthPx = lines.length ? Math.max(...lines.map((l) => l.widthPx)) : 0;
|
|
198
|
-
const heightPx = lines.length * lineHeightPx;
|
|
199
|
-
// 端数切り上げ+余裕分 10px を足す
|
|
200
|
-
return { widthPx: widthPx + 10, heightPx };
|
|
139
|
+
return measureTextWithOpentype(text, maxWidthPx, opts);
|
|
201
140
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
141
|
+
/**
|
|
142
|
+
* opentype.js を使ったテキスト計測
|
|
143
|
+
*/
|
|
144
|
+
function measureTextWithOpentype(text, maxWidthPx, opts) {
|
|
145
|
+
const fontWeight = normalizeFontWeight(opts.fontWeight);
|
|
146
|
+
const lines = wrapText(text, maxWidthPx, (t) => measureTextWidthOpentype(t, opts.fontSizePx, fontWeight));
|
|
147
|
+
return calculateResult(lines, opts);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* フォールバック計算を使ったテキスト計測
|
|
151
|
+
*/
|
|
152
|
+
function measureTextFallback(text, maxWidthPx, opts) {
|
|
153
|
+
const { fontSizePx } = opts;
|
|
154
|
+
const lines = wrapText(text, maxWidthPx, (t) => estimateTextWidth(t, fontSizePx));
|
|
155
|
+
return calculateResult(lines, opts);
|
|
205
156
|
}
|
|
206
157
|
// ラップ用の分割ロジック
|
|
207
158
|
// - 英文: 空白で分割しつつ、空白も行末に残す
|
package/dist/inputSchema.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
import { z } from "zod";
|
|
20
|
-
import { type AlignItems, type JustifyContent } from "./types";
|
|
20
|
+
import { type AlignItems, type JustifyContent, type TreeDataItem } from "./types";
|
|
21
21
|
export declare const inputBaseNodeSchema: z.ZodObject<{
|
|
22
22
|
w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
23
23
|
h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
@@ -500,11 +500,277 @@ export declare const inputChartNodeSchema: z.ZodObject<{
|
|
|
500
500
|
filled: "filled";
|
|
501
501
|
}>>;
|
|
502
502
|
}, z.core.$strip>;
|
|
503
|
+
export declare const inputTimelineNodeSchema: z.ZodObject<{
|
|
504
|
+
w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
505
|
+
h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
506
|
+
minW: z.ZodOptional<z.ZodNumber>;
|
|
507
|
+
maxW: z.ZodOptional<z.ZodNumber>;
|
|
508
|
+
minH: z.ZodOptional<z.ZodNumber>;
|
|
509
|
+
maxH: z.ZodOptional<z.ZodNumber>;
|
|
510
|
+
padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
511
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
513
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
514
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
515
|
+
}, z.core.$strip>]>>;
|
|
516
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
517
|
+
border: z.ZodOptional<z.ZodObject<{
|
|
518
|
+
color: z.ZodOptional<z.ZodString>;
|
|
519
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
520
|
+
dashType: z.ZodOptional<z.ZodEnum<{
|
|
521
|
+
solid: "solid";
|
|
522
|
+
dash: "dash";
|
|
523
|
+
dashDot: "dashDot";
|
|
524
|
+
lgDash: "lgDash";
|
|
525
|
+
lgDashDot: "lgDashDot";
|
|
526
|
+
lgDashDotDot: "lgDashDotDot";
|
|
527
|
+
sysDash: "sysDash";
|
|
528
|
+
sysDot: "sysDot";
|
|
529
|
+
}>>;
|
|
530
|
+
}, z.core.$strip>>;
|
|
531
|
+
borderRadius: z.ZodOptional<z.ZodNumber>;
|
|
532
|
+
type: z.ZodLiteral<"timeline">;
|
|
533
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
534
|
+
horizontal: "horizontal";
|
|
535
|
+
vertical: "vertical";
|
|
536
|
+
}>>;
|
|
537
|
+
items: z.ZodArray<z.ZodObject<{
|
|
538
|
+
date: z.ZodString;
|
|
539
|
+
title: z.ZodString;
|
|
540
|
+
description: z.ZodOptional<z.ZodString>;
|
|
541
|
+
color: z.ZodOptional<z.ZodString>;
|
|
542
|
+
}, z.core.$strip>>;
|
|
543
|
+
}, z.core.$strip>;
|
|
544
|
+
export declare const inputMatrixNodeSchema: z.ZodObject<{
|
|
545
|
+
w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
546
|
+
h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
547
|
+
minW: z.ZodOptional<z.ZodNumber>;
|
|
548
|
+
maxW: z.ZodOptional<z.ZodNumber>;
|
|
549
|
+
minH: z.ZodOptional<z.ZodNumber>;
|
|
550
|
+
maxH: z.ZodOptional<z.ZodNumber>;
|
|
551
|
+
padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
552
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
553
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
554
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
555
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
556
|
+
}, z.core.$strip>]>>;
|
|
557
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
558
|
+
border: z.ZodOptional<z.ZodObject<{
|
|
559
|
+
color: z.ZodOptional<z.ZodString>;
|
|
560
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
561
|
+
dashType: z.ZodOptional<z.ZodEnum<{
|
|
562
|
+
solid: "solid";
|
|
563
|
+
dash: "dash";
|
|
564
|
+
dashDot: "dashDot";
|
|
565
|
+
lgDash: "lgDash";
|
|
566
|
+
lgDashDot: "lgDashDot";
|
|
567
|
+
lgDashDotDot: "lgDashDotDot";
|
|
568
|
+
sysDash: "sysDash";
|
|
569
|
+
sysDot: "sysDot";
|
|
570
|
+
}>>;
|
|
571
|
+
}, z.core.$strip>>;
|
|
572
|
+
borderRadius: z.ZodOptional<z.ZodNumber>;
|
|
573
|
+
type: z.ZodLiteral<"matrix">;
|
|
574
|
+
axes: z.ZodObject<{
|
|
575
|
+
x: z.ZodString;
|
|
576
|
+
y: z.ZodString;
|
|
577
|
+
}, z.core.$strip>;
|
|
578
|
+
quadrants: z.ZodOptional<z.ZodObject<{
|
|
579
|
+
topLeft: z.ZodString;
|
|
580
|
+
topRight: z.ZodString;
|
|
581
|
+
bottomLeft: z.ZodString;
|
|
582
|
+
bottomRight: z.ZodString;
|
|
583
|
+
}, z.core.$strip>>;
|
|
584
|
+
items: z.ZodArray<z.ZodObject<{
|
|
585
|
+
label: z.ZodString;
|
|
586
|
+
x: z.ZodNumber;
|
|
587
|
+
y: z.ZodNumber;
|
|
588
|
+
color: z.ZodOptional<z.ZodString>;
|
|
589
|
+
}, z.core.$strip>>;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
export declare const inputTreeDataItemSchema: z.ZodType<TreeDataItem>;
|
|
592
|
+
export declare const inputTreeNodeSchema: z.ZodObject<{
|
|
593
|
+
w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
594
|
+
h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
595
|
+
minW: z.ZodOptional<z.ZodNumber>;
|
|
596
|
+
maxW: z.ZodOptional<z.ZodNumber>;
|
|
597
|
+
minH: z.ZodOptional<z.ZodNumber>;
|
|
598
|
+
maxH: z.ZodOptional<z.ZodNumber>;
|
|
599
|
+
padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
600
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
601
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
602
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
603
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
604
|
+
}, z.core.$strip>]>>;
|
|
605
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
606
|
+
border: z.ZodOptional<z.ZodObject<{
|
|
607
|
+
color: z.ZodOptional<z.ZodString>;
|
|
608
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
609
|
+
dashType: z.ZodOptional<z.ZodEnum<{
|
|
610
|
+
solid: "solid";
|
|
611
|
+
dash: "dash";
|
|
612
|
+
dashDot: "dashDot";
|
|
613
|
+
lgDash: "lgDash";
|
|
614
|
+
lgDashDot: "lgDashDot";
|
|
615
|
+
lgDashDotDot: "lgDashDotDot";
|
|
616
|
+
sysDash: "sysDash";
|
|
617
|
+
sysDot: "sysDot";
|
|
618
|
+
}>>;
|
|
619
|
+
}, z.core.$strip>>;
|
|
620
|
+
borderRadius: z.ZodOptional<z.ZodNumber>;
|
|
621
|
+
type: z.ZodLiteral<"tree">;
|
|
622
|
+
layout: z.ZodOptional<z.ZodEnum<{
|
|
623
|
+
horizontal: "horizontal";
|
|
624
|
+
vertical: "vertical";
|
|
625
|
+
}>>;
|
|
626
|
+
nodeShape: z.ZodOptional<z.ZodEnum<{
|
|
627
|
+
ellipse: "ellipse";
|
|
628
|
+
rect: "rect";
|
|
629
|
+
roundRect: "roundRect";
|
|
630
|
+
}>>;
|
|
631
|
+
data: z.ZodType<TreeDataItem, unknown, z.core.$ZodTypeInternals<TreeDataItem, unknown>>;
|
|
632
|
+
connectorStyle: z.ZodOptional<z.ZodObject<{
|
|
633
|
+
color: z.ZodOptional<z.ZodString>;
|
|
634
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
635
|
+
}, z.core.$strip>>;
|
|
636
|
+
nodeWidth: z.ZodOptional<z.ZodNumber>;
|
|
637
|
+
nodeHeight: z.ZodOptional<z.ZodNumber>;
|
|
638
|
+
levelGap: z.ZodOptional<z.ZodNumber>;
|
|
639
|
+
siblingGap: z.ZodOptional<z.ZodNumber>;
|
|
640
|
+
}, z.core.$strip>;
|
|
641
|
+
export declare const inputFlowNodeSchema: z.ZodObject<{
|
|
642
|
+
w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
643
|
+
h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
644
|
+
minW: z.ZodOptional<z.ZodNumber>;
|
|
645
|
+
maxW: z.ZodOptional<z.ZodNumber>;
|
|
646
|
+
minH: z.ZodOptional<z.ZodNumber>;
|
|
647
|
+
maxH: z.ZodOptional<z.ZodNumber>;
|
|
648
|
+
padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
649
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
650
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
651
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
652
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
653
|
+
}, z.core.$strip>]>>;
|
|
654
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
655
|
+
border: z.ZodOptional<z.ZodObject<{
|
|
656
|
+
color: z.ZodOptional<z.ZodString>;
|
|
657
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
658
|
+
dashType: z.ZodOptional<z.ZodEnum<{
|
|
659
|
+
solid: "solid";
|
|
660
|
+
dash: "dash";
|
|
661
|
+
dashDot: "dashDot";
|
|
662
|
+
lgDash: "lgDash";
|
|
663
|
+
lgDashDot: "lgDashDot";
|
|
664
|
+
lgDashDotDot: "lgDashDotDot";
|
|
665
|
+
sysDash: "sysDash";
|
|
666
|
+
sysDot: "sysDot";
|
|
667
|
+
}>>;
|
|
668
|
+
}, z.core.$strip>>;
|
|
669
|
+
borderRadius: z.ZodOptional<z.ZodNumber>;
|
|
670
|
+
type: z.ZodLiteral<"flow">;
|
|
671
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
672
|
+
horizontal: "horizontal";
|
|
673
|
+
vertical: "vertical";
|
|
674
|
+
}>>;
|
|
675
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
676
|
+
id: z.ZodString;
|
|
677
|
+
shape: z.ZodEnum<{
|
|
678
|
+
flowChartConnector: "flowChartConnector";
|
|
679
|
+
flowChartDecision: "flowChartDecision";
|
|
680
|
+
flowChartDelay: "flowChartDelay";
|
|
681
|
+
flowChartDocument: "flowChartDocument";
|
|
682
|
+
flowChartInputOutput: "flowChartInputOutput";
|
|
683
|
+
flowChartMagneticDisk: "flowChartMagneticDisk";
|
|
684
|
+
flowChartManualInput: "flowChartManualInput";
|
|
685
|
+
flowChartManualOperation: "flowChartManualOperation";
|
|
686
|
+
flowChartPredefinedProcess: "flowChartPredefinedProcess";
|
|
687
|
+
flowChartPreparation: "flowChartPreparation";
|
|
688
|
+
flowChartProcess: "flowChartProcess";
|
|
689
|
+
flowChartTerminator: "flowChartTerminator";
|
|
690
|
+
}>;
|
|
691
|
+
text: z.ZodString;
|
|
692
|
+
color: z.ZodOptional<z.ZodString>;
|
|
693
|
+
textColor: z.ZodOptional<z.ZodString>;
|
|
694
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
695
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
696
|
+
}, z.core.$strip>>;
|
|
697
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
698
|
+
from: z.ZodString;
|
|
699
|
+
to: z.ZodString;
|
|
700
|
+
label: z.ZodOptional<z.ZodString>;
|
|
701
|
+
color: z.ZodOptional<z.ZodString>;
|
|
702
|
+
}, z.core.$strip>>;
|
|
703
|
+
connectorStyle: z.ZodOptional<z.ZodObject<{
|
|
704
|
+
color: z.ZodOptional<z.ZodString>;
|
|
705
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
706
|
+
arrowType: z.ZodOptional<z.ZodEnum<{
|
|
707
|
+
diamond: "diamond";
|
|
708
|
+
triangle: "triangle";
|
|
709
|
+
none: "none";
|
|
710
|
+
arrow: "arrow";
|
|
711
|
+
oval: "oval";
|
|
712
|
+
stealth: "stealth";
|
|
713
|
+
}>>;
|
|
714
|
+
}, z.core.$strip>>;
|
|
715
|
+
nodeWidth: z.ZodOptional<z.ZodNumber>;
|
|
716
|
+
nodeHeight: z.ZodOptional<z.ZodNumber>;
|
|
717
|
+
nodeGap: z.ZodOptional<z.ZodNumber>;
|
|
718
|
+
}, z.core.$strip>;
|
|
719
|
+
export declare const inputProcessArrowNodeSchema: z.ZodObject<{
|
|
720
|
+
w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
721
|
+
h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
722
|
+
minW: z.ZodOptional<z.ZodNumber>;
|
|
723
|
+
maxW: z.ZodOptional<z.ZodNumber>;
|
|
724
|
+
minH: z.ZodOptional<z.ZodNumber>;
|
|
725
|
+
maxH: z.ZodOptional<z.ZodNumber>;
|
|
726
|
+
padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
727
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
728
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
729
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
730
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
731
|
+
}, z.core.$strip>]>>;
|
|
732
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
733
|
+
border: z.ZodOptional<z.ZodObject<{
|
|
734
|
+
color: z.ZodOptional<z.ZodString>;
|
|
735
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
736
|
+
dashType: z.ZodOptional<z.ZodEnum<{
|
|
737
|
+
solid: "solid";
|
|
738
|
+
dash: "dash";
|
|
739
|
+
dashDot: "dashDot";
|
|
740
|
+
lgDash: "lgDash";
|
|
741
|
+
lgDashDot: "lgDashDot";
|
|
742
|
+
lgDashDotDot: "lgDashDotDot";
|
|
743
|
+
sysDash: "sysDash";
|
|
744
|
+
sysDot: "sysDot";
|
|
745
|
+
}>>;
|
|
746
|
+
}, z.core.$strip>>;
|
|
747
|
+
borderRadius: z.ZodOptional<z.ZodNumber>;
|
|
748
|
+
type: z.ZodLiteral<"processArrow">;
|
|
749
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
750
|
+
horizontal: "horizontal";
|
|
751
|
+
vertical: "vertical";
|
|
752
|
+
}>>;
|
|
753
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
754
|
+
label: z.ZodString;
|
|
755
|
+
color: z.ZodOptional<z.ZodString>;
|
|
756
|
+
textColor: z.ZodOptional<z.ZodString>;
|
|
757
|
+
}, z.core.$strip>>;
|
|
758
|
+
itemWidth: z.ZodOptional<z.ZodNumber>;
|
|
759
|
+
itemHeight: z.ZodOptional<z.ZodNumber>;
|
|
760
|
+
gap: z.ZodOptional<z.ZodNumber>;
|
|
761
|
+
fontPx: z.ZodOptional<z.ZodNumber>;
|
|
762
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
763
|
+
}, z.core.$strip>;
|
|
503
764
|
export type InputTextNode = z.infer<typeof inputTextNodeSchema>;
|
|
504
765
|
export type InputImageNode = z.infer<typeof inputImageNodeSchema>;
|
|
505
766
|
export type InputTableNode = z.infer<typeof inputTableNodeSchema>;
|
|
506
767
|
export type InputShapeNode = z.infer<typeof inputShapeNodeSchema>;
|
|
507
768
|
export type InputChartNode = z.infer<typeof inputChartNodeSchema>;
|
|
769
|
+
export type InputTimelineNode = z.infer<typeof inputTimelineNodeSchema>;
|
|
770
|
+
export type InputMatrixNode = z.infer<typeof inputMatrixNodeSchema>;
|
|
771
|
+
export type InputTreeNode = z.infer<typeof inputTreeNodeSchema>;
|
|
772
|
+
export type InputFlowNode = z.infer<typeof inputFlowNodeSchema>;
|
|
773
|
+
export type InputProcessArrowNode = z.infer<typeof inputProcessArrowNodeSchema>;
|
|
508
774
|
export type InputBoxNode = InputBaseNode & {
|
|
509
775
|
type: "box";
|
|
510
776
|
children: InputPOMNode;
|
|
@@ -523,7 +789,7 @@ export type InputHStackNode = InputBaseNode & {
|
|
|
523
789
|
alignItems?: AlignItems;
|
|
524
790
|
justifyContent?: JustifyContent;
|
|
525
791
|
};
|
|
526
|
-
export type InputPOMNode = InputTextNode | InputImageNode | InputTableNode | InputBoxNode | InputVStackNode | InputHStackNode | InputShapeNode | InputChartNode;
|
|
792
|
+
export type InputPOMNode = InputTextNode | InputImageNode | InputTableNode | InputBoxNode | InputVStackNode | InputHStackNode | InputShapeNode | InputChartNode | InputTimelineNode | InputMatrixNode | InputTreeNode | InputFlowNode | InputProcessArrowNode;
|
|
527
793
|
export declare const inputBoxNodeSchema: z.ZodType<InputBoxNode>;
|
|
528
794
|
export declare const inputVStackNodeSchema: z.ZodType<InputVStackNode>;
|
|
529
795
|
export declare const inputHStackNodeSchema: z.ZodType<InputHStackNode>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputSchema.d.ts","sourceRoot":"","sources":["../src/inputSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"inputSchema.d.ts","sourceRoot":"","sources":["../src/inputSchema.ts"],"names":[],"mappings":"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"}
|
package/dist/inputSchema.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
import { z } from "zod";
|
|
20
|
-
import { lengthSchema, paddingSchema, borderStyleSchema, fillStyleSchema, shadowStyleSchema, alignItemsSchema, justifyContentSchema, shapeTypeSchema, tableColumnSchema, tableRowSchema, pageNumberPositionSchema, chartTypeSchema, chartDataSchema, bulletOptionsSchema, radarStyleSchema, } from "./types";
|
|
20
|
+
import { lengthSchema, paddingSchema, borderStyleSchema, fillStyleSchema, shadowStyleSchema, alignItemsSchema, justifyContentSchema, shapeTypeSchema, tableColumnSchema, tableRowSchema, pageNumberPositionSchema, chartTypeSchema, chartDataSchema, bulletOptionsSchema, radarStyleSchema, timelineDirectionSchema, timelineItemSchema, matrixAxisSchema, matrixQuadrantsSchema, matrixItemSchema, treeLayoutSchema, treeNodeShapeSchema, treeConnectorStyleSchema, flowDirectionSchema, flowNodeItemSchema, flowConnectionSchema, flowConnectorStyleSchema, processArrowDirectionSchema, processArrowStepSchema, } from "./types";
|
|
21
21
|
// ===== Base Node Schema =====
|
|
22
22
|
export const inputBaseNodeSchema = z.object({
|
|
23
23
|
w: lengthSchema.optional(),
|
|
@@ -75,6 +75,53 @@ export const inputChartNodeSchema = inputBaseNodeSchema.extend({
|
|
|
75
75
|
// radar専用オプション
|
|
76
76
|
radarStyle: radarStyleSchema.optional(),
|
|
77
77
|
});
|
|
78
|
+
export const inputTimelineNodeSchema = inputBaseNodeSchema.extend({
|
|
79
|
+
type: z.literal("timeline"),
|
|
80
|
+
direction: timelineDirectionSchema.optional(),
|
|
81
|
+
items: z.array(timelineItemSchema),
|
|
82
|
+
});
|
|
83
|
+
export const inputMatrixNodeSchema = inputBaseNodeSchema.extend({
|
|
84
|
+
type: z.literal("matrix"),
|
|
85
|
+
axes: matrixAxisSchema,
|
|
86
|
+
quadrants: matrixQuadrantsSchema.optional(),
|
|
87
|
+
items: z.array(matrixItemSchema),
|
|
88
|
+
});
|
|
89
|
+
export const inputTreeDataItemSchema = z.lazy(() => z.object({
|
|
90
|
+
label: z.string(),
|
|
91
|
+
color: z.string().optional(),
|
|
92
|
+
children: z.array(inputTreeDataItemSchema).optional(),
|
|
93
|
+
}));
|
|
94
|
+
export const inputTreeNodeSchema = inputBaseNodeSchema.extend({
|
|
95
|
+
type: z.literal("tree"),
|
|
96
|
+
layout: treeLayoutSchema.optional(),
|
|
97
|
+
nodeShape: treeNodeShapeSchema.optional(),
|
|
98
|
+
data: inputTreeDataItemSchema,
|
|
99
|
+
connectorStyle: treeConnectorStyleSchema.optional(),
|
|
100
|
+
nodeWidth: z.number().optional(),
|
|
101
|
+
nodeHeight: z.number().optional(),
|
|
102
|
+
levelGap: z.number().optional(),
|
|
103
|
+
siblingGap: z.number().optional(),
|
|
104
|
+
});
|
|
105
|
+
export const inputFlowNodeSchema = inputBaseNodeSchema.extend({
|
|
106
|
+
type: z.literal("flow"),
|
|
107
|
+
direction: flowDirectionSchema.optional(),
|
|
108
|
+
nodes: z.array(flowNodeItemSchema),
|
|
109
|
+
connections: z.array(flowConnectionSchema),
|
|
110
|
+
connectorStyle: flowConnectorStyleSchema.optional(),
|
|
111
|
+
nodeWidth: z.number().optional(),
|
|
112
|
+
nodeHeight: z.number().optional(),
|
|
113
|
+
nodeGap: z.number().optional(),
|
|
114
|
+
});
|
|
115
|
+
export const inputProcessArrowNodeSchema = inputBaseNodeSchema.extend({
|
|
116
|
+
type: z.literal("processArrow"),
|
|
117
|
+
direction: processArrowDirectionSchema.optional(),
|
|
118
|
+
steps: z.array(processArrowStepSchema),
|
|
119
|
+
itemWidth: z.number().optional(),
|
|
120
|
+
itemHeight: z.number().optional(),
|
|
121
|
+
gap: z.number().optional(),
|
|
122
|
+
fontPx: z.number().optional(),
|
|
123
|
+
bold: z.boolean().optional(),
|
|
124
|
+
});
|
|
78
125
|
// ===== Recursive Node Schemas =====
|
|
79
126
|
const inputBoxNodeSchemaBase = inputBaseNodeSchema.extend({
|
|
80
127
|
type: z.literal("box"),
|
|
@@ -124,6 +171,11 @@ export const inputPomNodeSchema = z.lazy(() => z.discriminatedUnion("type", [
|
|
|
124
171
|
inputHStackNodeSchemaBase,
|
|
125
172
|
inputShapeNodeSchema,
|
|
126
173
|
inputChartNodeSchema,
|
|
174
|
+
inputTimelineNodeSchema,
|
|
175
|
+
inputMatrixNodeSchema,
|
|
176
|
+
inputTreeNodeSchema,
|
|
177
|
+
inputFlowNodeSchema,
|
|
178
|
+
inputProcessArrowNodeSchema,
|
|
127
179
|
]));
|
|
128
180
|
// ===== Master Slide Options Schema =====
|
|
129
181
|
export const inputMasterSlideOptionsSchema = z.object({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../src/renderPptx/nodes/box.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PositionedNode } from "../../types";
|
|
2
|
+
import type { RenderContext } from "../types";
|
|
3
|
+
type ChartPositionedNode = Extract<PositionedNode, {
|
|
4
|
+
type: "chart";
|
|
5
|
+
}>;
|
|
6
|
+
export declare function renderChartNode(node: ChartPositionedNode, ctx: RenderContext): void;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../../src/renderPptx/nodes/chart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,KAAK,mBAAmB,GAAG,OAAO,CAAC,cAAc,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAEtE,wBAAgB,eAAe,CAC7B,IAAI,EAAE,mBAAmB,EACzB,GAAG,EAAE,aAAa,GACjB,IAAI,CAwBN"}
|