@particle-academy/dark-slide 0.7.1 → 0.7.2
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/index.cjs +49 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +49 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1345,6 +1345,49 @@ var Schema = {
|
|
|
1345
1345
|
};
|
|
1346
1346
|
}
|
|
1347
1347
|
};
|
|
1348
|
+
function styleJsonSchema() {
|
|
1349
|
+
return {
|
|
1350
|
+
type: "object",
|
|
1351
|
+
description: "How a text element, or the text inside a shape, looks. The units are NOT uniform: fontSize is in design pixels and is halved into points, while letterSpacing, spaceBefore, spaceAfter, padding, radius and the border and accent-bar widths are already in points, and lineHeight is a multiple.",
|
|
1352
|
+
properties: {
|
|
1353
|
+
fontSize: { type: "number", description: "Type size in DESIGN PIXELS on the 1920px-wide fancy-slides canvas, NOT points. The PPTX file carries half, with an 8pt minimum: 96 is written as 48pt, 24 as 12pt, and anything under 16 as 8pt. Default 24." },
|
|
1354
|
+
fontFamily: { type: "string", description: "Typeface name. No font is embedded in the file, so where this face is not installed the viewer substitutes another, which also changes how wide the text is." },
|
|
1355
|
+
weight: { type: ["string", "number"], description: 'Bold when "bold" or "semibold", or a number of 600 or more. PPTX has only bold and regular, so any other weight renders regular.' },
|
|
1356
|
+
italic: { type: "boolean" },
|
|
1357
|
+
underline: { type: "boolean" },
|
|
1358
|
+
color: { type: "string", description: 'Text colour as a hex string. Default "#0F172A".' },
|
|
1359
|
+
align: { type: "string", description: 'Horizontal alignment: "left" (default), "center", "right" or "justify". Anything else renders left.' },
|
|
1360
|
+
verticalAlign: { type: "string", description: 'Vertical alignment inside the box: "top" (default), "middle" or "bottom".' },
|
|
1361
|
+
lineHeight: { type: "number", description: "Line spacing as a MULTIPLE of the type size, as in CSS: 1.4 is written as 140% line spacing." },
|
|
1362
|
+
letterSpacing: { type: "number", description: "Extra space between letters, in POINTS, not halved: 2 is written as 2pt." },
|
|
1363
|
+
spaceBefore: { type: "number", description: "Space above each paragraph, in POINTS, not halved: 6 is written as 6pt." },
|
|
1364
|
+
spaceAfter: { type: "number", description: "Space below each paragraph, in POINTS, not halved." },
|
|
1365
|
+
caps: { type: "string", description: '"small" for small capitals, or "all" (also "upper") for all capitals.' },
|
|
1366
|
+
bullet: { type: ["string", "boolean"], description: 'Marker for list lines ("- item"): omit for a round bullet, "none" or false for no marker, "number" for 1. 2. 3., or any other string to use it as the marker character.' },
|
|
1367
|
+
fill: { type: ["string", "boolean"], description: 'Background colour of the box, as a hex string. "none" or false for no fill.' },
|
|
1368
|
+
radius: { type: "number", description: "Corner radius of the box, in POINTS." },
|
|
1369
|
+
border: {
|
|
1370
|
+
type: "object",
|
|
1371
|
+
description: "An outline on all four sides of the box. PPTX cannot outline a single side; use accentBar for that.",
|
|
1372
|
+
properties: {
|
|
1373
|
+
width: { type: "number", description: "Line width in POINTS. Default 1; 0 draws no line." },
|
|
1374
|
+
color: { type: "string", description: 'Hex colour. Default "#CBD5E1".' },
|
|
1375
|
+
style: { type: "string", description: '"solid" (default), or a DrawingML dash name such as "dash" or "sysDot".' }
|
|
1376
|
+
}
|
|
1377
|
+
},
|
|
1378
|
+
padding: { type: ["number", "object"], description: "Inset between the box edge and the text, in POINTS: one number for every side (12 is written as 12pt), or {left, right, top, bottom}. When unset the insets are 7.2 left and right and 3.6 top and bottom, widened to clear an accent bar." },
|
|
1379
|
+
accentBar: {
|
|
1380
|
+
type: "object",
|
|
1381
|
+
description: "A coloured bar down one edge of the box, as on a callout. Painted inside the same shape, so it needs no second element.",
|
|
1382
|
+
properties: {
|
|
1383
|
+
color: { type: "string", description: 'Hex colour. Default "#8B5CF6".' },
|
|
1384
|
+
width: { type: "number", description: "Bar width in POINTS. Default 4." },
|
|
1385
|
+
side: { type: "string", description: '"left" (default) or "right".' }
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1348
1391
|
function elementJsonSchema() {
|
|
1349
1392
|
return {
|
|
1350
1393
|
type: "object",
|
|
@@ -1352,10 +1395,10 @@ function elementJsonSchema() {
|
|
|
1352
1395
|
properties: {
|
|
1353
1396
|
id: { type: "string" },
|
|
1354
1397
|
type: { type: "string", enum: Schema.ELEMENT_TYPES },
|
|
1355
|
-
x: { type: "number", minimum: 0, maximum: 1 },
|
|
1356
|
-
y: { type: "number", minimum: 0, maximum: 1 },
|
|
1357
|
-
w: { type: "number", minimum: 0, maximum: 1 },
|
|
1358
|
-
h: { type: "number", minimum: 0, maximum: 1 },
|
|
1398
|
+
x: { type: "number", minimum: 0, maximum: 1, description: "Left edge as a FRACTION of the slide width: 0 is the left edge, 0.5 the centre, 1 the right edge. Not pixels." },
|
|
1399
|
+
y: { type: "number", minimum: 0, maximum: 1, description: "Top edge as a FRACTION of the slide height: 0 is the top, 1 the bottom. Not pixels." },
|
|
1400
|
+
w: { type: "number", minimum: 0, maximum: 1, description: "Width as a FRACTION of the slide width. 1 spans the whole slide." },
|
|
1401
|
+
h: { type: "number", minimum: 0, maximum: 1, description: "Height as a FRACTION of the slide height. 1 spans the whole slide." },
|
|
1359
1402
|
rotation: { type: "number" },
|
|
1360
1403
|
z: { type: "integer" },
|
|
1361
1404
|
locked: { type: "boolean" },
|
|
@@ -1363,7 +1406,7 @@ function elementJsonSchema() {
|
|
|
1363
1406
|
href: { type: "string" },
|
|
1364
1407
|
content: { type: "string" },
|
|
1365
1408
|
format: { type: "string", enum: Schema.TEXT_FORMATS },
|
|
1366
|
-
style:
|
|
1409
|
+
style: styleJsonSchema(),
|
|
1367
1410
|
src: { type: "string" },
|
|
1368
1411
|
alt: { type: "string" },
|
|
1369
1412
|
fit: { type: "string", enum: ["contain", "cover", "fill", "scale-down"] },
|
|
@@ -4153,7 +4196,7 @@ function getImageSize(bytes) {
|
|
|
4153
4196
|
}
|
|
4154
4197
|
|
|
4155
4198
|
// src/agent.ts
|
|
4156
|
-
var VERSION = "0.7.
|
|
4199
|
+
var VERSION = "0.7.2";
|
|
4157
4200
|
function toU8(input) {
|
|
4158
4201
|
return input instanceof Uint8Array ? input : new Uint8Array(input);
|
|
4159
4202
|
}
|