@json-to-office/shared-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.
Files changed (41) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +9 -0
  3. package/dist/chunk-2USGRQBI.js +1109 -0
  4. package/dist/chunk-2USGRQBI.js.map +1 -0
  5. package/dist/chunk-3MJF4X5S.js +28 -0
  6. package/dist/chunk-3MJF4X5S.js.map +1 -0
  7. package/dist/chunk-COFU7FOQ.js +21 -0
  8. package/dist/chunk-COFU7FOQ.js.map +1 -0
  9. package/dist/chunk-J4OT5Y5B.js +1 -0
  10. package/dist/chunk-J4OT5Y5B.js.map +1 -0
  11. package/dist/chunk-MZ3TEFYH.js +154 -0
  12. package/dist/chunk-MZ3TEFYH.js.map +1 -0
  13. package/dist/chunk-RV7W3UXU.js +51 -0
  14. package/dist/chunk-RV7W3UXU.js.map +1 -0
  15. package/dist/chunk-USXTHQ7L.js +40 -0
  16. package/dist/chunk-USXTHQ7L.js.map +1 -0
  17. package/dist/index.d.ts +25 -0
  18. package/dist/index.js +124 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/schemas/component-registry.d.ts +37 -0
  21. package/dist/schemas/component-registry.js +24 -0
  22. package/dist/schemas/component-registry.js.map +1 -0
  23. package/dist/schemas/component-union.d.ts +8 -0
  24. package/dist/schemas/component-union.js +11 -0
  25. package/dist/schemas/component-union.js.map +1 -0
  26. package/dist/schemas/components.d.ts +419 -0
  27. package/dist/schemas/components.js +45 -0
  28. package/dist/schemas/components.js.map +1 -0
  29. package/dist/schemas/document.d.ts +16 -0
  30. package/dist/schemas/document.js +13 -0
  31. package/dist/schemas/document.js.map +1 -0
  32. package/dist/schemas/export.d.ts +14 -0
  33. package/dist/schemas/export.js +9 -0
  34. package/dist/schemas/export.js.map +1 -0
  35. package/dist/schemas/generator.d.ts +30 -0
  36. package/dist/schemas/generator.js +9 -0
  37. package/dist/schemas/generator.js.map +1 -0
  38. package/dist/schemas/theme.d.ts +89 -0
  39. package/dist/schemas/theme.js +27 -0
  40. package/dist/schemas/theme.js.map +1 -0
  41. package/package.json +74 -0
@@ -0,0 +1,89 @@
1
+ import * as _sinclair_typebox from '@sinclair/typebox';
2
+ import { Static } from '@sinclair/typebox';
3
+
4
+ declare const GridMarginSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
5
+ top: _sinclair_typebox.TNumber;
6
+ right: _sinclair_typebox.TNumber;
7
+ bottom: _sinclair_typebox.TNumber;
8
+ left: _sinclair_typebox.TNumber;
9
+ }>]>;
10
+ declare const GridGutterSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
11
+ column: _sinclair_typebox.TNumber;
12
+ row: _sinclair_typebox.TNumber;
13
+ }>]>;
14
+ declare const GridConfigSchema: _sinclair_typebox.TObject<{
15
+ columns: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
16
+ rows: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
17
+ margin: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
18
+ top: _sinclair_typebox.TNumber;
19
+ right: _sinclair_typebox.TNumber;
20
+ bottom: _sinclair_typebox.TNumber;
21
+ left: _sinclair_typebox.TNumber;
22
+ }>]>>;
23
+ gutter: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TObject<{
24
+ column: _sinclair_typebox.TNumber;
25
+ row: _sinclair_typebox.TNumber;
26
+ }>]>>;
27
+ }>;
28
+ type GridMargin = Static<typeof GridMarginSchema>;
29
+ type GridGutter = Static<typeof GridGutterSchema>;
30
+ type GridConfig = Static<typeof GridConfigSchema>;
31
+ declare const SEMANTIC_COLOR_NAMES: readonly ["primary", "secondary", "accent", "background", "text", "text2", "background2", "accent4", "accent5", "accent6"];
32
+ /** PowerPoint XML aliases that resolve to canonical semantic names at runtime */
33
+ declare const SEMANTIC_COLOR_ALIASES: readonly ["accent1", "accent2", "accent3", "tx1", "tx2", "bg1", "bg2"];
34
+ declare const ColorValueSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"primary" | "secondary" | "accent" | "background" | "text" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>;
35
+ declare const STYLE_NAMES: readonly ["title", "subtitle", "heading1", "heading2", "heading3", "body", "caption"];
36
+ declare const StyleNameSchema: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"title" | "subtitle" | "heading1" | "heading2" | "heading3" | "body" | "caption">[]>;
37
+ declare const TextStyleSchema: _sinclair_typebox.TObject<{
38
+ fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
39
+ fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
40
+ fontColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"primary" | "secondary" | "accent" | "background" | "text" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
41
+ bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
42
+ italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
43
+ align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"justify">]>>;
44
+ lineSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
45
+ charSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
46
+ paraSpaceAfter: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
47
+ }>;
48
+ type StyleName = (typeof STYLE_NAMES)[number];
49
+ type TextStyle = Static<typeof TextStyleSchema>;
50
+ declare const ThemeConfigSchema: _sinclair_typebox.TObject<{
51
+ name: _sinclair_typebox.TString;
52
+ colors: _sinclair_typebox.TObject<{
53
+ primary: _sinclair_typebox.TString;
54
+ secondary: _sinclair_typebox.TString;
55
+ accent: _sinclair_typebox.TString;
56
+ background: _sinclair_typebox.TString;
57
+ text: _sinclair_typebox.TString;
58
+ text2: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
59
+ background2: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
60
+ accent4: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
61
+ accent5: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
62
+ accent6: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
63
+ }>;
64
+ fonts: _sinclair_typebox.TObject<{
65
+ heading: _sinclair_typebox.TString;
66
+ body: _sinclair_typebox.TString;
67
+ }>;
68
+ defaults: _sinclair_typebox.TObject<{
69
+ fontSize: _sinclair_typebox.TNumber;
70
+ fontColor: _sinclair_typebox.TString;
71
+ }>;
72
+ styles: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
73
+ [x: string]: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
74
+ fontSize: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
75
+ fontFace: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
76
+ fontColor: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, ...(_sinclair_typebox.TLiteral<"primary" | "secondary" | "accent" | "background" | "text" | "text2" | "background2" | "accent4" | "accent5" | "accent6"> | _sinclair_typebox.TLiteral<"accent1" | "accent2" | "accent3" | "tx1" | "tx2" | "bg1" | "bg2">)[]]>>;
77
+ bold: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
78
+ italic: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
79
+ align: _sinclair_typebox.TOptional<_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"left">, _sinclair_typebox.TLiteral<"center">, _sinclair_typebox.TLiteral<"right">, _sinclair_typebox.TLiteral<"justify">]>>;
80
+ lineSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
81
+ charSpacing: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
82
+ paraSpaceAfter: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
83
+ }>>;
84
+ }>>;
85
+ }>;
86
+ type ThemeConfigJson = Static<typeof ThemeConfigSchema>;
87
+ declare function isValidThemeConfig(data: unknown): data is ThemeConfigJson;
88
+
89
+ export { ColorValueSchema, type GridConfig, GridConfigSchema, type GridGutter, GridGutterSchema, type GridMargin, GridMarginSchema, SEMANTIC_COLOR_ALIASES, SEMANTIC_COLOR_NAMES, STYLE_NAMES, type StyleName, StyleNameSchema, type TextStyle, TextStyleSchema, type ThemeConfigJson, ThemeConfigSchema, isValidThemeConfig };
@@ -0,0 +1,27 @@
1
+ import {
2
+ ColorValueSchema,
3
+ GridConfigSchema,
4
+ GridGutterSchema,
5
+ GridMarginSchema,
6
+ SEMANTIC_COLOR_ALIASES,
7
+ SEMANTIC_COLOR_NAMES,
8
+ STYLE_NAMES,
9
+ StyleNameSchema,
10
+ TextStyleSchema,
11
+ ThemeConfigSchema,
12
+ isValidThemeConfig
13
+ } from "../chunk-MZ3TEFYH.js";
14
+ export {
15
+ ColorValueSchema,
16
+ GridConfigSchema,
17
+ GridGutterSchema,
18
+ GridMarginSchema,
19
+ SEMANTIC_COLOR_ALIASES,
20
+ SEMANTIC_COLOR_NAMES,
21
+ STYLE_NAMES,
22
+ StyleNameSchema,
23
+ TextStyleSchema,
24
+ ThemeConfigSchema,
25
+ isValidThemeConfig
26
+ };
27
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@json-to-office/shared-pptx",
3
+ "version": "0.1.0",
4
+ "description": "PPTX-specific schemas, component registry and validation",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./schemas/*": {
15
+ "types": "./dist/schemas/*.d.ts",
16
+ "import": "./dist/schemas/*.js",
17
+ "default": "./dist/schemas/*.js"
18
+ },
19
+ "./*": {
20
+ "types": "./dist/*.d.ts",
21
+ "import": "./dist/*.js",
22
+ "default": "./dist/*.js"
23
+ }
24
+ },
25
+ "dependencies": {
26
+ "@sinclair/typebox": "0.34.38",
27
+ "@json-to-office/shared": "^0.1.0"
28
+ },
29
+ "devDependencies": {
30
+ "@types/node": "20.11.0",
31
+ "tsup": "8.5.0",
32
+ "typescript": "5.3.3"
33
+ },
34
+ "license": "MIT",
35
+ "author": "Paolo Barbato",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/Wiseair-srl/json-to-office.git",
39
+ "directory": "packages/shared-pptx"
40
+ },
41
+ "homepage": "https://github.com/Wiseair-srl/json-to-office/tree/main/packages/shared-pptx",
42
+ "bugs": {
43
+ "url": "https://github.com/Wiseair-srl/json-to-office/issues"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "files": [
49
+ "dist",
50
+ "LICENSE"
51
+ ],
52
+ "keywords": [
53
+ "json-to-office",
54
+ "typescript",
55
+ "pptx",
56
+ "presentation",
57
+ "powerpoint"
58
+ ],
59
+ "engines": {
60
+ "node": ">=20.0.0"
61
+ },
62
+ "scripts": {
63
+ "build": "tsup",
64
+ "dev": "tsup --watch",
65
+ "clean": "rm -rf dist",
66
+ "lint": "eslint src/**/*.ts",
67
+ "lint:fix": "eslint src/**/*.ts --fix",
68
+ "format": "prettier --write src/**/*.ts",
69
+ "typecheck": "tsc --noEmit",
70
+ "test": "vitest run --passWithNoTests",
71
+ "test:watch": "vitest",
72
+ "test:coverage": "vitest run --coverage --passWithNoTests"
73
+ }
74
+ }