@json-to-office/shared 0.13.2 → 0.21.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/dist/chunk-6KUQYVPT.js +177 -0
- package/dist/chunk-6KUQYVPT.js.map +1 -0
- package/dist/{chunk-TDDHCW5S.js → chunk-GPNPMKVZ.js} +5 -5
- package/dist/index.d.ts +61 -1
- package/dist/index.js +34 -180
- package/dist/index.js.map +1 -1
- package/dist/plugin/index.js +2 -2
- package/dist/schemas/slide-content.d.ts +968 -0
- package/dist/schemas/slide-content.js +1182 -0
- package/dist/schemas/slide-content.js.map +1 -0
- package/package.json +1 -1
- /package/dist/{chunk-TDDHCW5S.js.map → chunk-GPNPMKVZ.js.map} +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// src/schemas/font-catalog.ts
|
|
2
|
+
import { Type } from "@sinclair/typebox";
|
|
3
|
+
var SAFE_FONTS = [
|
|
4
|
+
"Arial",
|
|
5
|
+
"Calibri",
|
|
6
|
+
"Cambria",
|
|
7
|
+
"Consolas",
|
|
8
|
+
"Courier New",
|
|
9
|
+
"Georgia",
|
|
10
|
+
"Segoe UI",
|
|
11
|
+
"Tahoma",
|
|
12
|
+
"Times New Roman",
|
|
13
|
+
"Trebuchet MS",
|
|
14
|
+
"Verdana",
|
|
15
|
+
"Helvetica",
|
|
16
|
+
"Helvetica Neue",
|
|
17
|
+
"Menlo",
|
|
18
|
+
"Monaco"
|
|
19
|
+
];
|
|
20
|
+
function isSafeFont(name) {
|
|
21
|
+
const lower = name.toLowerCase();
|
|
22
|
+
return SAFE_FONTS.some((f) => f.toLowerCase() === lower);
|
|
23
|
+
}
|
|
24
|
+
var FontFamilyNameSchema = Type.String({
|
|
25
|
+
description: "Font family name. Prefer a SAFE_FONTS entry (Arial, Calibri, Cambria, Consolas, Courier New, Georgia, Segoe UI, Tahoma, Times New Roman, Trebuchet MS, Verdana, Helvetica, Helvetica Neue, Menlo, Monaco) for zero-setup rendering. For any other font, register it in props.fontRegistry[] and reference it here by family. Unregistered non-safe names render with a host fallback.",
|
|
26
|
+
examples: ["Arial", "Calibri", "Georgia", "Inter", "Roboto"]
|
|
27
|
+
});
|
|
28
|
+
var FontWeightSchema = Type.Number({
|
|
29
|
+
minimum: 100,
|
|
30
|
+
maximum: 900,
|
|
31
|
+
description: "OpenType weight (100 thin ... 900 black). Default 400."
|
|
32
|
+
});
|
|
33
|
+
var FontItalicSchema = Type.Boolean({
|
|
34
|
+
description: "Whether this source is italic. Default false."
|
|
35
|
+
});
|
|
36
|
+
var SafeFontSourceSchema = Type.Object(
|
|
37
|
+
{
|
|
38
|
+
kind: Type.Literal("safe"),
|
|
39
|
+
family: Type.String({
|
|
40
|
+
description: "A SAFE_FONTS name \u2014 installed with Office."
|
|
41
|
+
})
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
additionalProperties: false,
|
|
45
|
+
description: "Office-installed font \u2014 no embedding"
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
var GoogleFontSourceSchema = Type.Object(
|
|
49
|
+
{
|
|
50
|
+
kind: Type.Literal("google"),
|
|
51
|
+
family: Type.String({
|
|
52
|
+
description: 'Exact Google Fonts family name (e.g. "Inter").'
|
|
53
|
+
}),
|
|
54
|
+
weights: Type.Optional(
|
|
55
|
+
Type.Array(FontWeightSchema, {
|
|
56
|
+
description: "Weights to fetch. Default [400, 700]."
|
|
57
|
+
})
|
|
58
|
+
),
|
|
59
|
+
italics: Type.Optional(
|
|
60
|
+
Type.Boolean({ description: "Include italic variants. Default false." })
|
|
61
|
+
)
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
additionalProperties: false,
|
|
65
|
+
description: "Google Fonts \u2014 auto-fetched and embedded"
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
var FileFontSourceSchema = Type.Object(
|
|
69
|
+
{
|
|
70
|
+
kind: Type.Literal("file"),
|
|
71
|
+
path: Type.String({
|
|
72
|
+
description: "Path to a .ttf/.otf file. Relative paths are resolved against the JSON document file."
|
|
73
|
+
}),
|
|
74
|
+
weight: Type.Optional(FontWeightSchema),
|
|
75
|
+
italic: Type.Optional(FontItalicSchema)
|
|
76
|
+
},
|
|
77
|
+
{ additionalProperties: false, description: "Local font file to embed" }
|
|
78
|
+
);
|
|
79
|
+
var UrlFontSourceSchema = Type.Object(
|
|
80
|
+
{
|
|
81
|
+
kind: Type.Literal("url"),
|
|
82
|
+
url: Type.String({
|
|
83
|
+
description: "HTTPS URL of a TTF or OTF file."
|
|
84
|
+
}),
|
|
85
|
+
weight: Type.Optional(FontWeightSchema),
|
|
86
|
+
italic: Type.Optional(FontItalicSchema)
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
additionalProperties: false,
|
|
90
|
+
description: "Direct TTF/OTF URL (non-Google CDN)"
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
var VariableFontSourceSchema = Type.Object(
|
|
94
|
+
{
|
|
95
|
+
kind: Type.Literal("variable"),
|
|
96
|
+
url: Type.String({
|
|
97
|
+
description: "HTTPS URL of a variable TTF (`fvar` axis table required)."
|
|
98
|
+
}),
|
|
99
|
+
weight: FontWeightSchema,
|
|
100
|
+
italic: Type.Optional(FontItalicSchema),
|
|
101
|
+
axes: Type.Optional(
|
|
102
|
+
Type.Record(Type.String(), Type.Number(), {
|
|
103
|
+
description: "Additional axis pin values (e.g. `{ ital: 1, opsz: 14 }`) merged on top of the derived `wght` pin. Uncommon \u2014 the `weight` field is usually enough."
|
|
104
|
+
})
|
|
105
|
+
)
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
additionalProperties: false,
|
|
109
|
+
description: "Variable-font instancer. The fetcher pins `wght` to `weight` (plus any `axes` overrides) and emits a clean static TTF, bypassing upstream distributions that collapse multiple static weights onto the same glyph geometry."
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
var DataFontSourceSchema = Type.Object(
|
|
113
|
+
{
|
|
114
|
+
kind: Type.Literal("data"),
|
|
115
|
+
data: Type.String({
|
|
116
|
+
description: "Base64-encoded TTF/OTF or data: URL (data:font/ttf;base64,...). Makes the JSON self-contained at the cost of size."
|
|
117
|
+
}),
|
|
118
|
+
weight: Type.Optional(FontWeightSchema),
|
|
119
|
+
italic: Type.Optional(FontItalicSchema)
|
|
120
|
+
},
|
|
121
|
+
{ additionalProperties: false, description: "Inline base64 font \u2014 portable" }
|
|
122
|
+
);
|
|
123
|
+
var FontSourceSchema = Type.Union(
|
|
124
|
+
[
|
|
125
|
+
SafeFontSourceSchema,
|
|
126
|
+
GoogleFontSourceSchema,
|
|
127
|
+
FileFontSourceSchema,
|
|
128
|
+
DataFontSourceSchema,
|
|
129
|
+
UrlFontSourceSchema,
|
|
130
|
+
VariableFontSourceSchema
|
|
131
|
+
],
|
|
132
|
+
{
|
|
133
|
+
description: 'A single font variant source. Use kind:"safe" for installed fonts, kind:"google" for Google Fonts, kind:"file" for local files, kind:"data" for base64, kind:"url" for direct HTTPS TTF/OTF URLs, kind:"variable" to instance a variable TTF at a specific weight.'
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
var FontCategorySchema = Type.Union(
|
|
137
|
+
[
|
|
138
|
+
Type.Literal("sans"),
|
|
139
|
+
Type.Literal("serif"),
|
|
140
|
+
Type.Literal("mono"),
|
|
141
|
+
Type.Literal("display"),
|
|
142
|
+
Type.Literal("handwriting")
|
|
143
|
+
],
|
|
144
|
+
{ description: "Broad category used for fallback selection" }
|
|
145
|
+
);
|
|
146
|
+
var FontRegistryEntrySchema = Type.Object(
|
|
147
|
+
{
|
|
148
|
+
id: Type.String({
|
|
149
|
+
description: 'Registry key. By convention, match the display family name ("Inter", "Roboto Slab").'
|
|
150
|
+
}),
|
|
151
|
+
family: Type.String({
|
|
152
|
+
description: "Display family used in font.family / fontFace / theme.fonts.*. Usually identical to id."
|
|
153
|
+
}),
|
|
154
|
+
category: Type.Optional(FontCategorySchema),
|
|
155
|
+
sources: Type.Array(FontSourceSchema, {
|
|
156
|
+
minItems: 1,
|
|
157
|
+
description: "One or more weight/style variants. List at least a regular (weight 400, italic false)."
|
|
158
|
+
})
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
additionalProperties: false,
|
|
162
|
+
description: "A font registered for this document. Referenced by family from font.family, fontFace, and theme.fonts.*."
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
var FontRegistrySchema = Type.Array(FontRegistryEntrySchema, {
|
|
166
|
+
description: "Document-scoped font registry. Every non-safe font used in this document must be registered here."
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
export {
|
|
170
|
+
SAFE_FONTS,
|
|
171
|
+
isSafeFont,
|
|
172
|
+
FontFamilyNameSchema,
|
|
173
|
+
FontSourceSchema,
|
|
174
|
+
FontRegistryEntrySchema,
|
|
175
|
+
FontRegistrySchema
|
|
176
|
+
};
|
|
177
|
+
//# sourceMappingURL=chunk-6KUQYVPT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/font-catalog.ts"],"sourcesContent":["/**\n * Font catalog + registry schemas.\n *\n * Shared by DOCX and PPTX pipelines. Defines:\n * - SAFE_FONTS: Office-safe font names (installed on Windows/macOS with Office).\n * - FontFamilyNameSchema: free-form string for `font.family` / `fontFace`, with LLM-facing guidance.\n * - FontSourceSchema: one binary variant (safe | google | file | data).\n * - FontRegistryEntrySchema / FontRegistrySchema: document-scoped font registry.\n */\n\nimport { Type, Static } from '@sinclair/typebox';\n\n/**\n * Fonts pre-installed with Microsoft Office on Windows + macOS.\n * Using one of these requires no registration and no embedding.\n */\nexport const SAFE_FONTS = [\n 'Arial',\n 'Calibri',\n 'Cambria',\n 'Consolas',\n 'Courier New',\n 'Georgia',\n 'Segoe UI',\n 'Tahoma',\n 'Times New Roman',\n 'Trebuchet MS',\n 'Verdana',\n 'Helvetica',\n 'Helvetica Neue',\n 'Menlo',\n 'Monaco',\n] as const;\n\nexport type SafeFontName = (typeof SAFE_FONTS)[number];\n\n/** Case-insensitive membership test against SAFE_FONTS. */\nexport function isSafeFont(name: string): boolean {\n const lower = name.toLowerCase();\n return SAFE_FONTS.some((f) => f.toLowerCase() === lower);\n}\n\n/**\n * Font family name used in `font.family` / `fontFace`.\n *\n * Stays a free-form string so users can reference custom or Google fonts.\n * Description + examples guide LLMs and JSON Schema consumers toward SAFE_FONTS.\n */\nexport const FontFamilyNameSchema = Type.String({\n description:\n 'Font family name. Prefer a SAFE_FONTS entry (Arial, Calibri, Cambria, Consolas, Courier New, Georgia, Segoe UI, Tahoma, Times New Roman, Trebuchet MS, Verdana, Helvetica, Helvetica Neue, Menlo, Monaco) for zero-setup rendering. For any other font, register it in props.fontRegistry[] and reference it here by family. Unregistered non-safe names render with a host fallback.',\n examples: ['Arial', 'Calibri', 'Georgia', 'Inter', 'Roboto'],\n});\n\n// ----------------------------------------------------------------------------\n// Font sources — one weight/style variant\n// ----------------------------------------------------------------------------\n\nconst FontWeightSchema = Type.Number({\n minimum: 100,\n maximum: 900,\n description: 'OpenType weight (100 thin ... 900 black). Default 400.',\n});\n\nconst FontItalicSchema = Type.Boolean({\n description: 'Whether this source is italic. Default false.',\n});\n\n/** Safe reference — no embedding needed. */\nconst SafeFontSourceSchema = Type.Object(\n {\n kind: Type.Literal('safe'),\n family: Type.String({\n description: 'A SAFE_FONTS name — installed with Office.',\n }),\n },\n {\n additionalProperties: false,\n description: 'Office-installed font — no embedding',\n }\n);\n\n/** Google Fonts — fetched and embedded at generate time. */\nconst GoogleFontSourceSchema = Type.Object(\n {\n kind: Type.Literal('google'),\n family: Type.String({\n description: 'Exact Google Fonts family name (e.g. \"Inter\").',\n }),\n weights: Type.Optional(\n Type.Array(FontWeightSchema, {\n description: 'Weights to fetch. Default [400, 700].',\n })\n ),\n italics: Type.Optional(\n Type.Boolean({ description: 'Include italic variants. Default false.' })\n ),\n },\n {\n additionalProperties: false,\n description: 'Google Fonts — auto-fetched and embedded',\n }\n);\n\n/** Local TTF/OTF file — resolved relative to the JSON file, or absolute. */\nconst FileFontSourceSchema = Type.Object(\n {\n kind: Type.Literal('file'),\n path: Type.String({\n description:\n 'Path to a .ttf/.otf file. Relative paths are resolved against the JSON document file.',\n }),\n weight: Type.Optional(FontWeightSchema),\n italic: Type.Optional(FontItalicSchema),\n },\n { additionalProperties: false, description: 'Local font file to embed' }\n);\n\n/**\n * Direct URL to a TTF/OTF. Used to bypass Google Fonts redistribution for\n * families with known metadata defects — e.g. rsms/inter hosted on jsDelivr.\n * A single URL fetches one variant; multiple URLs build a multi-weight family.\n */\nconst UrlFontSourceSchema = Type.Object(\n {\n kind: Type.Literal('url'),\n url: Type.String({\n description: 'HTTPS URL of a TTF or OTF file.',\n }),\n weight: Type.Optional(FontWeightSchema),\n italic: Type.Optional(FontItalicSchema),\n },\n {\n additionalProperties: false,\n description: 'Direct TTF/OTF URL (non-Google CDN)',\n }\n);\n\n/**\n * Variable-font-instanced variant. Points at a variable TTF URL plus a\n * target weight (and optional additional `axes` pins); the fetcher\n * downloads the variable TTF once (disk-cached) and uses harfbuzz to pin\n * the `wght` axis (plus any additional axes) to produce a clean static\n * TTF for embedding.\n *\n * Used to escape Google Fonts' lossy per-weight static generation — e.g.\n * Google ships Inter Thin and Inter ExtraLight as near-identical glyph\n * files (both sourced around wght=250), but the upstream variable Inter\n * produces properly distinct static instances when pinned precisely at\n * wght=100 vs wght=200.\n */\nconst VariableFontSourceSchema = Type.Object(\n {\n kind: Type.Literal('variable'),\n url: Type.String({\n description: 'HTTPS URL of a variable TTF (`fvar` axis table required).',\n }),\n weight: FontWeightSchema,\n italic: Type.Optional(FontItalicSchema),\n axes: Type.Optional(\n Type.Record(Type.String(), Type.Number(), {\n description:\n 'Additional axis pin values (e.g. `{ ital: 1, opsz: 14 }`) merged on top of the derived `wght` pin. Uncommon — the `weight` field is usually enough.',\n })\n ),\n },\n {\n additionalProperties: false,\n description:\n 'Variable-font instancer. The fetcher pins `wght` to `weight` (plus any `axes` overrides) and emits a clean static TTF, bypassing upstream distributions that collapse multiple static weights onto the same glyph geometry.',\n }\n);\n\n/** Inline base64 / data-URL — self-contained JSON. */\nconst DataFontSourceSchema = Type.Object(\n {\n kind: Type.Literal('data'),\n data: Type.String({\n description:\n 'Base64-encoded TTF/OTF or data: URL (data:font/ttf;base64,...). Makes the JSON self-contained at the cost of size.',\n }),\n weight: Type.Optional(FontWeightSchema),\n italic: Type.Optional(FontItalicSchema),\n },\n { additionalProperties: false, description: 'Inline base64 font — portable' }\n);\n\n/**\n * One weight/style variant backing a font registry entry.\n *\n * Kinds:\n * - safe: references an Office-installed font; no embedding.\n * - google: Google Fonts family; fetched and embedded at generate time.\n * - file: local .ttf/.otf read from disk.\n * - data: inline base64, makes JSON self-contained.\n */\nexport const FontSourceSchema = Type.Union(\n [\n SafeFontSourceSchema,\n GoogleFontSourceSchema,\n FileFontSourceSchema,\n DataFontSourceSchema,\n UrlFontSourceSchema,\n VariableFontSourceSchema,\n ],\n {\n description:\n 'A single font variant source. Use kind:\"safe\" for installed fonts, kind:\"google\" for Google Fonts, kind:\"file\" for local files, kind:\"data\" for base64, kind:\"url\" for direct HTTPS TTF/OTF URLs, kind:\"variable\" to instance a variable TTF at a specific weight.',\n }\n);\n\nexport type FontSource = Static<typeof FontSourceSchema>;\n\n// ----------------------------------------------------------------------------\n// Font registry entry\n// ----------------------------------------------------------------------------\n\nconst FontCategorySchema = Type.Union(\n [\n Type.Literal('sans'),\n Type.Literal('serif'),\n Type.Literal('mono'),\n Type.Literal('display'),\n Type.Literal('handwriting'),\n ],\n { description: 'Broad category used for fallback selection' }\n);\n\nexport const FontRegistryEntrySchema = Type.Object(\n {\n id: Type.String({\n description:\n 'Registry key. By convention, match the display family name (\"Inter\", \"Roboto Slab\").',\n }),\n family: Type.String({\n description:\n 'Display family used in font.family / fontFace / theme.fonts.*. Usually identical to id.',\n }),\n category: Type.Optional(FontCategorySchema),\n sources: Type.Array(FontSourceSchema, {\n minItems: 1,\n description:\n 'One or more weight/style variants. List at least a regular (weight 400, italic false).',\n }),\n },\n {\n additionalProperties: false,\n description:\n 'A font registered for this document. Referenced by family from font.family, fontFace, and theme.fonts.*.',\n }\n);\n\nexport type FontRegistryEntry = Static<typeof FontRegistryEntrySchema>;\n\n/**\n * Document-scoped font registry.\n *\n * Ships with the JSON — no runtime side-channel needed for the common case.\n * Every font name used in font.family / fontFace / theme.fonts.* that isn't\n * in SAFE_FONTS must resolve to an entry here (by family) or tooling warns.\n */\nexport const FontRegistrySchema = Type.Array(FontRegistryEntrySchema, {\n description:\n 'Document-scoped font registry. Every non-safe font used in this document must be registered here.',\n});\n\nexport type FontRegistryDefinition = Static<typeof FontRegistrySchema>;\n"],"mappings":"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","names":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isValidSemver,
|
|
3
|
-
latestVersion
|
|
4
|
-
} from "./chunk-244MHDOZ.js";
|
|
5
1
|
import {
|
|
6
2
|
formatErrorSummary,
|
|
7
3
|
transformValueErrors
|
|
8
4
|
} from "./chunk-ZKD5BAMU.js";
|
|
5
|
+
import {
|
|
6
|
+
isValidSemver,
|
|
7
|
+
latestVersion
|
|
8
|
+
} from "./chunk-244MHDOZ.js";
|
|
9
9
|
|
|
10
10
|
// src/plugin/createComponent.ts
|
|
11
11
|
function createVersion(version) {
|
|
@@ -198,4 +198,4 @@ export {
|
|
|
198
198
|
isValidationSuccess,
|
|
199
199
|
getValidationSummary
|
|
200
200
|
};
|
|
201
|
-
//# sourceMappingURL=chunk-
|
|
201
|
+
//# sourceMappingURL=chunk-GPNPMKVZ.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -12,14 +12,74 @@ import '@sinclair/typebox/value';
|
|
|
12
12
|
/**
|
|
13
13
|
* Service configuration types for external integrations (e.g. Highcharts export server)
|
|
14
14
|
*/
|
|
15
|
+
/** Default raster resolution when a `visual` does not specify one. */
|
|
16
|
+
declare const DEFAULT_VISUAL_DPI = 200;
|
|
17
|
+
/** Minimum accepted raster resolution. */
|
|
18
|
+
declare const MIN_VISUAL_DPI = 36;
|
|
19
|
+
/** Maximum accepted raster resolution (bounds bitmap size / DoS surface). */
|
|
20
|
+
declare const MAX_VISUAL_DPI = 600;
|
|
21
|
+
/** Clamp an arbitrary dpi to [MIN_VISUAL_DPI, MAX_VISUAL_DPI]; non-finite → default. */
|
|
22
|
+
declare function clampVisualDpi(dpi: unknown): number;
|
|
15
23
|
type HighchartsHeaders = Record<string, string>;
|
|
16
24
|
type HighchartsHeadersResolver = (body: unknown) => HighchartsHeaders | Promise<HighchartsHeaders>;
|
|
17
25
|
interface HighchartsServiceConfig {
|
|
18
26
|
serverUrl?: string;
|
|
19
27
|
headers?: HighchartsHeaders | HighchartsHeadersResolver;
|
|
20
28
|
}
|
|
29
|
+
type PptxServiceHeaders = Record<string, string>;
|
|
30
|
+
type PptxServiceHeadersResolver = (body: unknown) => PptxServiceHeaders | Promise<PptxServiceHeaders>;
|
|
31
|
+
/**
|
|
32
|
+
* Request handed to a pptx rasterizer: a single-slide pptx presentation
|
|
33
|
+
* component definition plus the target resolution.
|
|
34
|
+
*/
|
|
35
|
+
interface PptxRasterizeRequest {
|
|
36
|
+
/** A pptx presentation component definition ({ name: 'pptx', ... }) with one slide */
|
|
37
|
+
presentation: unknown;
|
|
38
|
+
/** Target raster resolution in dots-per-inch */
|
|
39
|
+
dpi: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Result returned by a pptx rasterizer.
|
|
43
|
+
*/
|
|
44
|
+
interface PptxRasterizeResult {
|
|
45
|
+
/** Rendered PNG as a base64 data URI (data:image/png;base64,...) */
|
|
46
|
+
base64DataUri: string;
|
|
47
|
+
/** Natural pixel width of the rendered image */
|
|
48
|
+
width: number;
|
|
49
|
+
/** Natural pixel height of the rendered image */
|
|
50
|
+
height: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* In-process rasterizer callback. Implementations build the .pptx from the
|
|
54
|
+
* presentation JSON and rasterize it to a PNG (e.g. via LibreOffice + poppler).
|
|
55
|
+
*/
|
|
56
|
+
type PptxRasterizer = (request: PptxRasterizeRequest) => Promise<PptxRasterizeResult>;
|
|
57
|
+
/**
|
|
58
|
+
* Configuration for the pptx rasterization service backing `visual` components.
|
|
59
|
+
*
|
|
60
|
+
* Mirrors {@link HighchartsServiceConfig}: the published packages depend on this
|
|
61
|
+
* interface, never on a binary. A host injects either an in-process `render`
|
|
62
|
+
* callback or an HTTP `serverUrl`.
|
|
63
|
+
*/
|
|
64
|
+
interface PptxServiceConfig {
|
|
65
|
+
/**
|
|
66
|
+
* In-process rasterizer. Takes precedence over `serverUrl` when provided.
|
|
67
|
+
* Ideal for tests (no binaries) and single-process hosts.
|
|
68
|
+
*/
|
|
69
|
+
render?: PptxRasterizer;
|
|
70
|
+
/**
|
|
71
|
+
* HTTP rasterization service URL. The service receives
|
|
72
|
+
* `{ presentation, dpi }` and returns a {@link PptxRasterizeResult}.
|
|
73
|
+
*/
|
|
74
|
+
serverUrl?: string;
|
|
75
|
+
/** Optional headers (or async resolver) for the HTTP service. */
|
|
76
|
+
headers?: PptxServiceHeaders | PptxServiceHeadersResolver;
|
|
77
|
+
/** Default DPI applied when a `visual` does not specify one. */
|
|
78
|
+
dpi?: number;
|
|
79
|
+
}
|
|
21
80
|
interface ServicesConfig {
|
|
22
81
|
highcharts?: HighchartsServiceConfig;
|
|
82
|
+
pptx?: PptxServiceConfig;
|
|
23
83
|
}
|
|
24
84
|
|
|
25
85
|
/** Scan an arbitrary doc tree (DOCX or PPTX) for every font family referenced. */
|
|
@@ -470,4 +530,4 @@ declare function applyExportMode<D, T>(input: ApplyExportModeInput<D, T>): Apply
|
|
|
470
530
|
*/
|
|
471
531
|
declare function mergeWithDefaults<T>(userConfig: T, themeDefaults: Partial<T>): T;
|
|
472
532
|
|
|
473
|
-
export { type FontIssueCode, FontRegistry, FontRegistryEntry, type FontRegistryInput, type FontResolutionIssue, FontRuntimeOpts, type FontSubstitution, type FontValidationInput, type FontValidationResult, type HighchartsHeaders, type HighchartsHeadersResolver, type HighchartsServiceConfig, POPULAR_GOOGLE_FONTS, type PopularGoogleFont, ResolvedFont, ResolvedFontSource, type ServicesConfig, type SynthesizedFamily, UPSTREAM_OVERRIDES, type UpstreamOverride, type UpstreamVariant, WEIGHT_LABELS, applyExportMode, applyFontSubstitution, buildDefaultSubstitutionMap, collectFontNamesFromDocx, collectFontNamesFromPptx, defaultSubstituteFor, detectFontFormat, fetchGoogleFontSources, getUpstreamOverride, mergeWithDefaults, rewriteFontFamilyName, scopedThemeName, synthesizeFamilyName, validateFontReferences };
|
|
533
|
+
export { DEFAULT_VISUAL_DPI, type FontIssueCode, FontRegistry, FontRegistryEntry, type FontRegistryInput, type FontResolutionIssue, FontRuntimeOpts, type FontSubstitution, type FontValidationInput, type FontValidationResult, type HighchartsHeaders, type HighchartsHeadersResolver, type HighchartsServiceConfig, MAX_VISUAL_DPI, MIN_VISUAL_DPI, POPULAR_GOOGLE_FONTS, type PopularGoogleFont, type PptxRasterizeRequest, type PptxRasterizeResult, type PptxRasterizer, type PptxServiceConfig, type PptxServiceHeaders, type PptxServiceHeadersResolver, ResolvedFont, ResolvedFontSource, type ServicesConfig, type SynthesizedFamily, UPSTREAM_OVERRIDES, type UpstreamOverride, type UpstreamVariant, WEIGHT_LABELS, applyExportMode, applyFontSubstitution, buildDefaultSubstitutionMap, clampVisualDpi, collectFontNamesFromDocx, collectFontNamesFromPptx, defaultSubstituteFor, detectFontFormat, fetchGoogleFontSources, getUpstreamOverride, mergeWithDefaults, rewriteFontFamilyName, scopedThemeName, synthesizeFamilyName, validateFontReferences };
|
package/dist/index.js
CHANGED
|
@@ -12,20 +12,7 @@ import {
|
|
|
12
12
|
isValidationSuccess,
|
|
13
13
|
resolveComponentVersion,
|
|
14
14
|
validateCustomComponentProps
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
convertToJsonSchema,
|
|
18
|
-
createComponentSchema,
|
|
19
|
-
createComponentSchemaObject,
|
|
20
|
-
exportSchemaToFile,
|
|
21
|
-
fixSchemaReferences
|
|
22
|
-
} from "./chunk-5J43F4XD.js";
|
|
23
|
-
import {
|
|
24
|
-
compareSemver,
|
|
25
|
-
isValidSemver,
|
|
26
|
-
latestVersion,
|
|
27
|
-
parseSemver
|
|
28
|
-
} from "./chunk-244MHDOZ.js";
|
|
15
|
+
} from "./chunk-GPNPMKVZ.js";
|
|
29
16
|
import {
|
|
30
17
|
DEFAULT_ERROR_CONFIG,
|
|
31
18
|
ERROR_EMOJIS,
|
|
@@ -46,174 +33,37 @@ import {
|
|
|
46
33
|
transformValueError,
|
|
47
34
|
transformValueErrors
|
|
48
35
|
} from "./chunk-ZKD5BAMU.js";
|
|
36
|
+
import {
|
|
37
|
+
convertToJsonSchema,
|
|
38
|
+
createComponentSchema,
|
|
39
|
+
createComponentSchemaObject,
|
|
40
|
+
exportSchemaToFile,
|
|
41
|
+
fixSchemaReferences
|
|
42
|
+
} from "./chunk-5J43F4XD.js";
|
|
43
|
+
import {
|
|
44
|
+
FontFamilyNameSchema,
|
|
45
|
+
FontRegistryEntrySchema,
|
|
46
|
+
FontRegistrySchema,
|
|
47
|
+
FontSourceSchema,
|
|
48
|
+
SAFE_FONTS,
|
|
49
|
+
isSafeFont
|
|
50
|
+
} from "./chunk-6KUQYVPT.js";
|
|
51
|
+
import {
|
|
52
|
+
compareSemver,
|
|
53
|
+
isValidSemver,
|
|
54
|
+
latestVersion,
|
|
55
|
+
parseSemver
|
|
56
|
+
} from "./chunk-244MHDOZ.js";
|
|
49
57
|
|
|
50
|
-
// src/
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"Georgia",
|
|
59
|
-
"Segoe UI",
|
|
60
|
-
"Tahoma",
|
|
61
|
-
"Times New Roman",
|
|
62
|
-
"Trebuchet MS",
|
|
63
|
-
"Verdana",
|
|
64
|
-
"Helvetica",
|
|
65
|
-
"Helvetica Neue",
|
|
66
|
-
"Menlo",
|
|
67
|
-
"Monaco"
|
|
68
|
-
];
|
|
69
|
-
function isSafeFont(name) {
|
|
70
|
-
const lower = name.toLowerCase();
|
|
71
|
-
return SAFE_FONTS.some((f) => f.toLowerCase() === lower);
|
|
58
|
+
// src/types/services.ts
|
|
59
|
+
var DEFAULT_VISUAL_DPI = 200;
|
|
60
|
+
var MIN_VISUAL_DPI = 36;
|
|
61
|
+
var MAX_VISUAL_DPI = 600;
|
|
62
|
+
function clampVisualDpi(dpi) {
|
|
63
|
+
if (typeof dpi !== "number" || !Number.isFinite(dpi))
|
|
64
|
+
return DEFAULT_VISUAL_DPI;
|
|
65
|
+
return Math.min(MAX_VISUAL_DPI, Math.max(MIN_VISUAL_DPI, Math.round(dpi)));
|
|
72
66
|
}
|
|
73
|
-
var FontFamilyNameSchema = Type.String({
|
|
74
|
-
description: "Font family name. Prefer a SAFE_FONTS entry (Arial, Calibri, Cambria, Consolas, Courier New, Georgia, Segoe UI, Tahoma, Times New Roman, Trebuchet MS, Verdana, Helvetica, Helvetica Neue, Menlo, Monaco) for zero-setup rendering. For any other font, register it in props.fontRegistry[] and reference it here by family. Unregistered non-safe names render with a host fallback.",
|
|
75
|
-
examples: ["Arial", "Calibri", "Georgia", "Inter", "Roboto"]
|
|
76
|
-
});
|
|
77
|
-
var FontWeightSchema = Type.Number({
|
|
78
|
-
minimum: 100,
|
|
79
|
-
maximum: 900,
|
|
80
|
-
description: "OpenType weight (100 thin ... 900 black). Default 400."
|
|
81
|
-
});
|
|
82
|
-
var FontItalicSchema = Type.Boolean({
|
|
83
|
-
description: "Whether this source is italic. Default false."
|
|
84
|
-
});
|
|
85
|
-
var SafeFontSourceSchema = Type.Object(
|
|
86
|
-
{
|
|
87
|
-
kind: Type.Literal("safe"),
|
|
88
|
-
family: Type.String({
|
|
89
|
-
description: "A SAFE_FONTS name \u2014 installed with Office."
|
|
90
|
-
})
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
additionalProperties: false,
|
|
94
|
-
description: "Office-installed font \u2014 no embedding"
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
var GoogleFontSourceSchema = Type.Object(
|
|
98
|
-
{
|
|
99
|
-
kind: Type.Literal("google"),
|
|
100
|
-
family: Type.String({
|
|
101
|
-
description: 'Exact Google Fonts family name (e.g. "Inter").'
|
|
102
|
-
}),
|
|
103
|
-
weights: Type.Optional(
|
|
104
|
-
Type.Array(FontWeightSchema, {
|
|
105
|
-
description: "Weights to fetch. Default [400, 700]."
|
|
106
|
-
})
|
|
107
|
-
),
|
|
108
|
-
italics: Type.Optional(
|
|
109
|
-
Type.Boolean({ description: "Include italic variants. Default false." })
|
|
110
|
-
)
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
additionalProperties: false,
|
|
114
|
-
description: "Google Fonts \u2014 auto-fetched and embedded"
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
var FileFontSourceSchema = Type.Object(
|
|
118
|
-
{
|
|
119
|
-
kind: Type.Literal("file"),
|
|
120
|
-
path: Type.String({
|
|
121
|
-
description: "Path to a .ttf/.otf file. Relative paths are resolved against the JSON document file."
|
|
122
|
-
}),
|
|
123
|
-
weight: Type.Optional(FontWeightSchema),
|
|
124
|
-
italic: Type.Optional(FontItalicSchema)
|
|
125
|
-
},
|
|
126
|
-
{ additionalProperties: false, description: "Local font file to embed" }
|
|
127
|
-
);
|
|
128
|
-
var UrlFontSourceSchema = Type.Object(
|
|
129
|
-
{
|
|
130
|
-
kind: Type.Literal("url"),
|
|
131
|
-
url: Type.String({
|
|
132
|
-
description: "HTTPS URL of a TTF or OTF file."
|
|
133
|
-
}),
|
|
134
|
-
weight: Type.Optional(FontWeightSchema),
|
|
135
|
-
italic: Type.Optional(FontItalicSchema)
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
additionalProperties: false,
|
|
139
|
-
description: "Direct TTF/OTF URL (non-Google CDN)"
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
var VariableFontSourceSchema = Type.Object(
|
|
143
|
-
{
|
|
144
|
-
kind: Type.Literal("variable"),
|
|
145
|
-
url: Type.String({
|
|
146
|
-
description: "HTTPS URL of a variable TTF (`fvar` axis table required)."
|
|
147
|
-
}),
|
|
148
|
-
weight: FontWeightSchema,
|
|
149
|
-
italic: Type.Optional(FontItalicSchema),
|
|
150
|
-
axes: Type.Optional(
|
|
151
|
-
Type.Record(Type.String(), Type.Number(), {
|
|
152
|
-
description: "Additional axis pin values (e.g. `{ ital: 1, opsz: 14 }`) merged on top of the derived `wght` pin. Uncommon \u2014 the `weight` field is usually enough."
|
|
153
|
-
})
|
|
154
|
-
)
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
additionalProperties: false,
|
|
158
|
-
description: "Variable-font instancer. The fetcher pins `wght` to `weight` (plus any `axes` overrides) and emits a clean static TTF, bypassing upstream distributions that collapse multiple static weights onto the same glyph geometry."
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
var DataFontSourceSchema = Type.Object(
|
|
162
|
-
{
|
|
163
|
-
kind: Type.Literal("data"),
|
|
164
|
-
data: Type.String({
|
|
165
|
-
description: "Base64-encoded TTF/OTF or data: URL (data:font/ttf;base64,...). Makes the JSON self-contained at the cost of size."
|
|
166
|
-
}),
|
|
167
|
-
weight: Type.Optional(FontWeightSchema),
|
|
168
|
-
italic: Type.Optional(FontItalicSchema)
|
|
169
|
-
},
|
|
170
|
-
{ additionalProperties: false, description: "Inline base64 font \u2014 portable" }
|
|
171
|
-
);
|
|
172
|
-
var FontSourceSchema = Type.Union(
|
|
173
|
-
[
|
|
174
|
-
SafeFontSourceSchema,
|
|
175
|
-
GoogleFontSourceSchema,
|
|
176
|
-
FileFontSourceSchema,
|
|
177
|
-
DataFontSourceSchema,
|
|
178
|
-
UrlFontSourceSchema,
|
|
179
|
-
VariableFontSourceSchema
|
|
180
|
-
],
|
|
181
|
-
{
|
|
182
|
-
description: 'A single font variant source. Use kind:"safe" for installed fonts, kind:"google" for Google Fonts, kind:"file" for local files, kind:"data" for base64, kind:"url" for direct HTTPS TTF/OTF URLs, kind:"variable" to instance a variable TTF at a specific weight.'
|
|
183
|
-
}
|
|
184
|
-
);
|
|
185
|
-
var FontCategorySchema = Type.Union(
|
|
186
|
-
[
|
|
187
|
-
Type.Literal("sans"),
|
|
188
|
-
Type.Literal("serif"),
|
|
189
|
-
Type.Literal("mono"),
|
|
190
|
-
Type.Literal("display"),
|
|
191
|
-
Type.Literal("handwriting")
|
|
192
|
-
],
|
|
193
|
-
{ description: "Broad category used for fallback selection" }
|
|
194
|
-
);
|
|
195
|
-
var FontRegistryEntrySchema = Type.Object(
|
|
196
|
-
{
|
|
197
|
-
id: Type.String({
|
|
198
|
-
description: 'Registry key. By convention, match the display family name ("Inter", "Roboto Slab").'
|
|
199
|
-
}),
|
|
200
|
-
family: Type.String({
|
|
201
|
-
description: "Display family used in font.family / fontFace / theme.fonts.*. Usually identical to id."
|
|
202
|
-
}),
|
|
203
|
-
category: Type.Optional(FontCategorySchema),
|
|
204
|
-
sources: Type.Array(FontSourceSchema, {
|
|
205
|
-
minItems: 1,
|
|
206
|
-
description: "One or more weight/style variants. List at least a regular (weight 400, italic false)."
|
|
207
|
-
})
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
additionalProperties: false,
|
|
211
|
-
description: "A font registered for this document. Referenced by family from font.family, fontFace, and theme.fonts.*."
|
|
212
|
-
}
|
|
213
|
-
);
|
|
214
|
-
var FontRegistrySchema = Type.Array(FontRegistryEntrySchema, {
|
|
215
|
-
description: "Document-scoped font registry. Every non-safe font used in this document must be registered here."
|
|
216
|
-
});
|
|
217
67
|
|
|
218
68
|
// src/fonts/collect.ts
|
|
219
69
|
var FONT_NAME_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1533,6 +1383,7 @@ function mergeWithDefaults(userConfig, themeDefaults) {
|
|
|
1533
1383
|
export {
|
|
1534
1384
|
ComponentValidationError,
|
|
1535
1385
|
DEFAULT_ERROR_CONFIG,
|
|
1386
|
+
DEFAULT_VISUAL_DPI,
|
|
1536
1387
|
DuplicateComponentError,
|
|
1537
1388
|
ERROR_EMOJIS,
|
|
1538
1389
|
FontFamilyNameSchema,
|
|
@@ -1540,6 +1391,8 @@ export {
|
|
|
1540
1391
|
FontRegistryEntrySchema,
|
|
1541
1392
|
FontRegistrySchema,
|
|
1542
1393
|
FontSourceSchema,
|
|
1394
|
+
MAX_VISUAL_DPI,
|
|
1395
|
+
MIN_VISUAL_DPI,
|
|
1543
1396
|
POPULAR_GOOGLE_FONTS,
|
|
1544
1397
|
SAFE_FONTS,
|
|
1545
1398
|
UPSTREAM_OVERRIDES,
|
|
@@ -1549,6 +1402,7 @@ export {
|
|
|
1549
1402
|
applyFontSubstitution,
|
|
1550
1403
|
buildDefaultSubstitutionMap,
|
|
1551
1404
|
calculatePosition,
|
|
1405
|
+
clampVisualDpi,
|
|
1552
1406
|
clearComponentNamesCache,
|
|
1553
1407
|
collectFontNamesFromDocx,
|
|
1554
1408
|
collectFontNamesFromPptx,
|