@json-to-office/json-to-pptx 0.1.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/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wiseair srl
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # @json-to-office/json-to-pptx
2
+
3
+ Generate professional .pptx presentations from JSON definitions.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @json-to-office/json-to-pptx pptxgenjs
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { generatePptx } from '@json-to-office/json-to-pptx';
15
+
16
+ const buffer = await generatePptx({
17
+ slides: [
18
+ {
19
+ elements: [
20
+ { type: 'text', text: 'Hello!', options: { x: 1, y: 1, w: 8, h: 1 } },
21
+ ],
22
+ },
23
+ ],
24
+ });
25
+ ```
26
+
27
+ ## License
28
+
29
+ [MIT](../../LICENSE)
package/dist/index.cjs ADDED
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
+ PresentationGenerator: () => import_core_pptx.PresentationGenerator,
25
+ WarningCodes: () => import_core_pptx2.WarningCodes,
26
+ compareSemver: () => import_shared.compareSemver,
27
+ generateAndSaveFromJson: () => import_core_pptx.generateAndSaveFromJson,
28
+ generateBufferFromJson: () => import_core_pptx.generateBufferFromJson,
29
+ generateBufferWithWarnings: () => import_core_pptx.generateBufferWithWarnings,
30
+ generateFromFile: () => import_core_pptx.generateFromFile,
31
+ generatePresentation: () => import_core_pptx.generatePresentation,
32
+ isValidSemver: () => import_shared.isValidSemver,
33
+ latestVersion: () => import_shared.latestVersion,
34
+ parseSemver: () => import_shared.parseSemver,
35
+ savePresentation: () => import_core_pptx.savePresentation
36
+ });
37
+ module.exports = __toCommonJS(index_exports);
38
+ var import_core_pptx = require("@json-to-office/core-pptx");
39
+ var import_core_pptx2 = require("@json-to-office/core-pptx");
40
+ __reExport(index_exports, require("@json-to-office/shared-pptx"), module.exports);
41
+ var import_shared = require("@json-to-office/shared");
42
+ // Annotate the CommonJS export names for ESM import in node:
43
+ 0 && (module.exports = {
44
+ PresentationGenerator,
45
+ WarningCodes,
46
+ compareSemver,
47
+ generateAndSaveFromJson,
48
+ generateBufferFromJson,
49
+ generateBufferWithWarnings,
50
+ generateFromFile,
51
+ generatePresentation,
52
+ isValidSemver,
53
+ latestVersion,
54
+ parseSemver,
55
+ savePresentation,
56
+ ...require("@json-to-office/shared-pptx")
57
+ });
58
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @json-to-office/json-to-pptx\n *\n * Public API package for PPTX presentation generation.\n * Re-exports from core-pptx and shared-pptx.\n */\n\n// Core generation API\nexport {\n generatePresentation,\n generateBufferFromJson,\n generateBufferWithWarnings,\n generateAndSaveFromJson,\n generateFromFile,\n savePresentation,\n PresentationGenerator,\n} from '@json-to-office/core-pptx';\n\nexport type { GenerationResult, PipelineWarning, WarningCode } from '@json-to-office/core-pptx';\nexport { WarningCodes } from '@json-to-office/core-pptx';\n\n// Re-export shared-pptx schemas and types\nexport * from '@json-to-office/shared-pptx';\n\n// Re-export shared utilities\nexport {\n type ComponentDefinition,\n type GenerationWarning,\n type AddWarningFunction,\n type ValidationError,\n type ParsedSemver,\n isValidSemver,\n parseSemver,\n compareSemver,\n latestVersion,\n} from '@json-to-office/shared';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,uBAQO;AAGP,IAAAA,oBAA6B;AAG7B,0BAAc,wCAtBd;AAyBA,oBAUO;","names":["import_core_pptx"]}
@@ -0,0 +1,3 @@
1
+ export { GenerationResult, PipelineWarning, PresentationGenerator, WarningCode, WarningCodes, generateAndSaveFromJson, generateBufferFromJson, generateBufferWithWarnings, generateFromFile, generatePresentation, savePresentation } from '@json-to-office/core-pptx';
2
+ export * from '@json-to-office/shared-pptx';
3
+ export { AddWarningFunction, ComponentDefinition, GenerationWarning, ParsedSemver, ValidationError, compareSemver, isValidSemver, latestVersion, parseSemver } from '@json-to-office/shared';
@@ -0,0 +1,3 @@
1
+ export { GenerationResult, PipelineWarning, PresentationGenerator, WarningCode, WarningCodes, generateAndSaveFromJson, generateBufferFromJson, generateBufferWithWarnings, generateFromFile, generatePresentation, savePresentation } from '@json-to-office/core-pptx';
2
+ export * from '@json-to-office/shared-pptx';
3
+ export { AddWarningFunction, ComponentDefinition, GenerationWarning, ParsedSemver, ValidationError, compareSemver, isValidSemver, latestVersion, parseSemver } from '@json-to-office/shared';
package/dist/index.js ADDED
@@ -0,0 +1,33 @@
1
+ // src/index.ts
2
+ import {
3
+ generatePresentation,
4
+ generateBufferFromJson,
5
+ generateBufferWithWarnings,
6
+ generateAndSaveFromJson,
7
+ generateFromFile,
8
+ savePresentation,
9
+ PresentationGenerator
10
+ } from "@json-to-office/core-pptx";
11
+ import { WarningCodes } from "@json-to-office/core-pptx";
12
+ export * from "@json-to-office/shared-pptx";
13
+ import {
14
+ isValidSemver,
15
+ parseSemver,
16
+ compareSemver,
17
+ latestVersion
18
+ } from "@json-to-office/shared";
19
+ export {
20
+ PresentationGenerator,
21
+ WarningCodes,
22
+ compareSemver,
23
+ generateAndSaveFromJson,
24
+ generateBufferFromJson,
25
+ generateBufferWithWarnings,
26
+ generateFromFile,
27
+ generatePresentation,
28
+ isValidSemver,
29
+ latestVersion,
30
+ parseSemver,
31
+ savePresentation
32
+ };
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @json-to-office/json-to-pptx\n *\n * Public API package for PPTX presentation generation.\n * Re-exports from core-pptx and shared-pptx.\n */\n\n// Core generation API\nexport {\n generatePresentation,\n generateBufferFromJson,\n generateBufferWithWarnings,\n generateAndSaveFromJson,\n generateFromFile,\n savePresentation,\n PresentationGenerator,\n} from '@json-to-office/core-pptx';\n\nexport type { GenerationResult, PipelineWarning, WarningCode } from '@json-to-office/core-pptx';\nexport { WarningCodes } from '@json-to-office/core-pptx';\n\n// Re-export shared-pptx schemas and types\nexport * from '@json-to-office/shared-pptx';\n\n// Re-export shared utilities\nexport {\n type ComponentDefinition,\n type GenerationWarning,\n type AddWarningFunction,\n type ValidationError,\n type ParsedSemver,\n isValidSemver,\n parseSemver,\n compareSemver,\n latestVersion,\n} from '@json-to-office/shared';\n"],"mappings":";AAQA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,oBAAoB;AAG7B,cAAc;AAGd;AAAA,EAME;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@json-to-office/json-to-pptx",
3
+ "version": "0.1.0",
4
+ "description": "Professional .pptx presentation generation from JSON - Public API package",
5
+ "type": "module",
6
+ "main": "dist/index.cjs",
7
+ "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.cts",
17
+ "default": "./dist/index.cjs"
18
+ }
19
+ },
20
+ "./package.json": "./package.json"
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "LICENSE"
25
+ ],
26
+ "dependencies": {
27
+ "@json-to-office/shared": "^0.1.0",
28
+ "@json-to-office/shared-pptx": "^0.1.0",
29
+ "@json-to-office/core-pptx": "^0.1.0"
30
+ },
31
+ "peerDependencies": {
32
+ "pptxgenjs": "^3.12.0"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "20.11.0",
36
+ "tsup": "8.5.0",
37
+ "typescript": "5.3.3"
38
+ },
39
+ "keywords": [
40
+ "pptx",
41
+ "powerpoint",
42
+ "presentation",
43
+ "generator",
44
+ "typescript",
45
+ "json"
46
+ ],
47
+ "author": "Paolo Barbato",
48
+ "license": "MIT",
49
+ "engines": {
50
+ "node": ">=20.0.0"
51
+ },
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "https://github.com/Wiseair-srl/json-to-office.git",
55
+ "directory": "packages/json-to-pptx"
56
+ },
57
+ "homepage": "https://github.com/Wiseair-srl/json-to-office/tree/main/packages/json-to-pptx",
58
+ "bugs": {
59
+ "url": "https://github.com/Wiseair-srl/json-to-office/issues"
60
+ },
61
+ "publishConfig": {
62
+ "access": "public"
63
+ },
64
+ "scripts": {
65
+ "build": "tsup",
66
+ "dev": "tsup --watch",
67
+ "clean": "rm -rf dist",
68
+ "lint": "eslint src/**/*.ts",
69
+ "lint:fix": "eslint src/**/*.ts --fix",
70
+ "format": "prettier --write \"src/**/*.ts\"",
71
+ "typecheck": "tsc --noEmit",
72
+ "test": "vitest run --passWithNoTests",
73
+ "test:watch": "vitest",
74
+ "test:coverage": "vitest run --coverage --passWithNoTests"
75
+ }
76
+ }