@liustack/pptfast 0.1.0 → 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 +108 -11
- package/README.zh-CN.md +102 -11
- package/dist/{chunk-4WISUDXE.js → chunk-SROEW6BH.js} +1 -1
- package/dist/chunk-SROEW6BH.js.map +1 -0
- package/dist/{chunk-DVMJWFDL.js → chunk-ZXWCOWJI.js} +5149 -1995
- package/dist/chunk-ZXWCOWJI.js.map +1 -0
- package/dist/cli.js +830 -41
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +968 -61
- package/dist/index.js +57 -5
- package/dist/node.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-4WISUDXE.js.map +0 -1
- package/dist/chunk-DVMJWFDL.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,29 +1,81 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AUDIENCE_VALUES,
|
|
3
|
+
BUILTIN_THEME_IDS,
|
|
4
|
+
BrandConfigSchema,
|
|
5
|
+
COMPONENT_TYPES,
|
|
6
|
+
DEFAULT_SCENARIO,
|
|
7
|
+
DELIVERY_BUDGETS,
|
|
8
|
+
DELIVERY_VALUES,
|
|
9
|
+
DeckPlanSchema,
|
|
10
|
+
MODE_DEFINITIONS,
|
|
11
|
+
MODE_VALUES,
|
|
12
|
+
PLAN_PAGE_COUNT_RANGE,
|
|
13
|
+
PlanPageSchema,
|
|
2
14
|
PptfastError,
|
|
3
15
|
PptxIRSchema,
|
|
4
|
-
|
|
16
|
+
SCENARIO_PRESETS,
|
|
17
|
+
StyleOverrideSchema,
|
|
18
|
+
ThemeSchema,
|
|
5
19
|
VERSION,
|
|
20
|
+
assembleDeck,
|
|
21
|
+
auditDeck,
|
|
22
|
+
disassembleDeck,
|
|
6
23
|
formatIssues,
|
|
24
|
+
formatPlanIssues,
|
|
7
25
|
generatePptx,
|
|
26
|
+
getInstalledThemeIds,
|
|
27
|
+
getThemeDefinition,
|
|
8
28
|
irJsonSchema,
|
|
9
29
|
listThemes,
|
|
30
|
+
planJsonSchema,
|
|
31
|
+
registerTheme,
|
|
10
32
|
renderSlideSvg,
|
|
11
|
-
|
|
12
|
-
|
|
33
|
+
resolvePlanThemeId,
|
|
34
|
+
resolveScenario,
|
|
35
|
+
styleJsonSchema,
|
|
36
|
+
validateIr,
|
|
37
|
+
validatePlan
|
|
38
|
+
} from "./chunk-ZXWCOWJI.js";
|
|
13
39
|
import {
|
|
14
40
|
installPlatform
|
|
15
41
|
} from "./chunk-G76EVNVT.js";
|
|
16
42
|
export {
|
|
43
|
+
AUDIENCE_VALUES,
|
|
44
|
+
BUILTIN_THEME_IDS,
|
|
45
|
+
BrandConfigSchema,
|
|
46
|
+
COMPONENT_TYPES,
|
|
47
|
+
DEFAULT_SCENARIO,
|
|
48
|
+
DELIVERY_BUDGETS,
|
|
49
|
+
DELIVERY_VALUES,
|
|
50
|
+
DeckPlanSchema,
|
|
51
|
+
MODE_DEFINITIONS,
|
|
52
|
+
MODE_VALUES,
|
|
53
|
+
PLAN_PAGE_COUNT_RANGE,
|
|
54
|
+
PlanPageSchema,
|
|
17
55
|
PptfastError,
|
|
18
56
|
PptxIRSchema,
|
|
19
|
-
|
|
57
|
+
SCENARIO_PRESETS,
|
|
58
|
+
StyleOverrideSchema,
|
|
59
|
+
ThemeSchema,
|
|
20
60
|
VERSION,
|
|
61
|
+
assembleDeck,
|
|
62
|
+
auditDeck,
|
|
63
|
+
disassembleDeck,
|
|
21
64
|
formatIssues,
|
|
65
|
+
formatPlanIssues,
|
|
22
66
|
generatePptx,
|
|
67
|
+
getInstalledThemeIds,
|
|
68
|
+
getThemeDefinition,
|
|
23
69
|
installPlatform,
|
|
24
70
|
irJsonSchema,
|
|
25
71
|
listThemes,
|
|
72
|
+
planJsonSchema,
|
|
73
|
+
registerTheme,
|
|
26
74
|
renderSlideSvg,
|
|
27
|
-
|
|
75
|
+
resolvePlanThemeId,
|
|
76
|
+
resolveScenario,
|
|
77
|
+
styleJsonSchema,
|
|
78
|
+
validateIr,
|
|
79
|
+
validatePlan
|
|
28
80
|
};
|
|
29
81
|
//# sourceMappingURL=index.js.map
|
package/dist/node.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liustack/pptfast",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Stable, editable PPTX generation for AI agents — semantic IR in, native DrawingML out",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"eslint": "^9.39.0",
|
|
78
78
|
"eslint-plugin-react-refresh": "^0.5.3",
|
|
79
79
|
"jsdom": "^29.0.2",
|
|
80
|
-
"lucide
|
|
80
|
+
"lucide": "^1.25.0",
|
|
81
81
|
"tsup": "^8.5.1",
|
|
82
82
|
"tsx": "^4.20.6",
|
|
83
83
|
"typescript": "~5.9.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/platform/node.ts"],"sourcesContent":["import { DOMParser as LinkedomDOMParser } from \"linkedom\"\nimport { installPlatform } from \"./registry\"\n\nasync function recodeWithSharp(dataUrl: string): Promise<string> {\n let sharpMod: typeof import(\"sharp\")\n try {\n sharpMod = (await import(\"sharp\")).default as unknown as typeof import(\"sharp\")\n } catch (e) {\n const err = e as NodeJS.ErrnoException\n if (err?.code === \"ERR_MODULE_NOT_FOUND\" || /Cannot find/.test(err?.message ?? \"\")) {\n throw new Error(\n 'Re-encoding non-PNG/JPEG/GIF images requires the optional dependency \"sharp\" (npm i sharp), or convert the image beforehand'\n )\n }\n throw e\n }\n const base64 = dataUrl.slice(dataUrl.indexOf(\",\") + 1)\n const png = await sharpMod(Buffer.from(base64, \"base64\")).png().toBuffer()\n return `data:image/png;base64,${png.toString(\"base64\")}`\n}\n\n/** Wire Node implementations (linkedom DOM, sharp image re-encode) into the SDK. */\nexport function installNodePlatform(): void {\n installPlatform({\n domParser: LinkedomDOMParser as unknown as typeof DOMParser,\n recodeImageToPng: recodeWithSharp,\n })\n}\n"],"mappings":";;;;;AAAA,SAAS,aAAa,yBAAyB;AAG/C,eAAe,gBAAgB,SAAkC;AAC/D,MAAI;AACJ,MAAI;AACF,gBAAY,MAAM,OAAO,OAAO,GAAG;AAAA,EACrC,SAAS,GAAG;AACV,UAAM,MAAM;AACZ,QAAI,KAAK,SAAS,0BAA0B,cAAc,KAAK,KAAK,WAAW,EAAE,GAAG;AAClF,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,UAAM;AAAA,EACR;AACA,QAAM,SAAS,QAAQ,MAAM,QAAQ,QAAQ,GAAG,IAAI,CAAC;AACrD,QAAM,MAAM,MAAM,SAAS,OAAO,KAAK,QAAQ,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS;AACzE,SAAO,yBAAyB,IAAI,SAAS,QAAQ,CAAC;AACxD;AAGO,SAAS,sBAA4B;AAC1C,kBAAgB;AAAA,IACd,WAAW;AAAA,IACX,kBAAkB;AAAA,EACpB,CAAC;AACH;","names":[]}
|