@openpresentation/opf 0.34.1 → 0.35.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 +6 -6
- package/dist/browser.js +19 -19
- package/dist/{catalog-refs-CoIrOdAw.d.ts → catalog-refs-BgotJhR5.d.ts} +117 -98
- package/dist/{catalog-schemas-FjLRPtjB.d.ts → catalog-schemas-BX-VEc5Q.d.ts} +1 -1
- package/dist/{chunk-MUILZGRY.js → chunk-2GCTKQDD.js} +4 -4
- package/dist/{chunk-LCT5ZV3Q.js → chunk-3KPTVK77.js} +92 -284
- package/dist/{chunk-SR6T4LKI.js → chunk-3ZTKRX7F.js} +4 -6
- package/dist/{chunk-MAFJ5O2D.js → chunk-4UMZDDJG.js} +11 -29
- package/dist/{chunk-NLJFNCZ4.js → chunk-6JHV2K67.js} +6 -6
- package/dist/{chunk-FK5XG742.js → chunk-6VGLE7C5.js} +114 -2
- package/dist/{chunk-AAWHOCXS.js → chunk-7KUUIL7W.js} +8 -8
- package/dist/{chunk-FCSYIBVR.js → chunk-ARPMSD7V.js} +1 -1
- package/dist/{chunk-244OPLAV.js → chunk-GGN3NQDK.js} +1 -1
- package/dist/{chunk-L3MCLD3X.js → chunk-GKUAVSXU.js} +3 -10
- package/dist/{chunk-6PMXVP5G.js → chunk-HORPH6O7.js} +202 -21
- package/dist/{chunk-XLSWZSQS.js → chunk-JQNT37IO.js} +4 -13
- package/dist/{chunk-AEHDXNZX.js → chunk-KNMMEE67.js} +1433 -916
- package/dist/{chunk-CJVKOJ6B.js → chunk-LDLLZQPP.js} +1094 -472
- package/dist/{chunk-HHVQ2SDT.js → chunk-MS2LPR7F.js} +1 -5
- package/dist/{chunk-AGYPRTEC.js → chunk-MVPQEMCP.js} +97 -15
- package/dist/{chunk-2B6GLT2O.js → chunk-NPRNWPP4.js} +1 -1
- package/dist/{chunk-X72WPTST.js → chunk-P2ACZJUL.js} +6 -6
- package/dist/chunk-SEC4IOOS.js +1 -0
- package/dist/{chunk-CQXBGZQP.js → chunk-VMPOCXTE.js} +5 -17
- package/dist/{chunk-ABA2D6X5.js → chunk-ZZWX4W2G.js} +2 -2
- package/dist/{composition-CvtvgBDE.d.ts → composition-BmJfljJl.d.ts} +345 -242
- package/dist/composition.d.ts +2 -2
- package/dist/composition.js +1 -1
- package/dist/{conversion-CyNRlWGw.d.ts → conversion-BbXhlurO.d.ts} +10 -8
- package/dist/conversion-VWCH3NKR.js +25 -0
- package/dist/convert.d.ts +11 -11
- package/dist/convert.js +61 -86
- package/dist/data.d.ts +1 -1
- package/dist/data.js +2 -2
- package/dist/{deck-report-BVlQZ42f.d.ts → deck-report-BYkbL7uT.d.ts} +3 -3
- package/dist/deck.d.ts +6 -6
- package/dist/deck.js +11 -11
- package/dist/diagram-engine-eager.js +1 -1
- package/dist/diagram-engine-lazy.js +1 -1
- package/dist/{diagram-plantuml-XRZ6VAOL.js → diagram-plantuml-GWXGKY7R.js} +1 -1
- package/dist/diff.d.ts +2 -2
- package/dist/diff.js +4 -4
- package/dist/docs.js +40 -40
- package/dist/example-files/technical/assets/alice.png +0 -0
- package/dist/example-files/technical/assets/context-photo.png +0 -0
- package/dist/example-files/technical/assets/cover-image.png +0 -0
- package/dist/example-files/technical/assets/cover.png +0 -0
- package/dist/example-files/technical/assets/diagram.svg +1 -0
- package/dist/example-files/technical/assets/icon.svg +1 -0
- package/dist/example-files/technical/assets/logo-dark.svg +1 -0
- package/dist/example-files/technical/assets/logo-light.svg +1 -0
- package/dist/example-files/technical/assets/logo.svg +1 -0
- package/dist/example-files/technical/assets/primary-logo.svg +1 -0
- package/dist/example-files/technical/assets/product-shot.png +0 -0
- package/dist/example-files/technical/assets/watermark.png +0 -0
- package/dist/example-files/technical/assets/wordmark.svg +1 -0
- package/dist/examples.js +6383 -8169
- package/dist/{finding-l9dlQ2NF.d.ts → finding-mcHslZLA.d.ts} +6 -2
- package/dist/font-policy.d.ts +16 -2
- package/dist/font-policy.js +1 -1
- package/dist/format.js +2 -2
- package/dist/ids.d.ts +2 -2
- package/dist/ids.js +4 -4
- package/dist/index.d.ts +125 -27
- package/dist/index.js +24 -23
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.js +8 -8
- package/dist/node-engine.d.ts +22 -8
- package/dist/node-engine.js +38 -22
- package/dist/{pagination-CZQQYk7L.d.ts → pagination-C0FPjO29.d.ts} +4 -4
- package/dist/pagination.d.ts +3 -3
- package/dist/pagination.js +4 -4
- package/dist/patch.d.ts +4 -4
- package/dist/patch.js +3 -3
- package/dist/precompiled.js +2 -2
- package/dist/{presentation-s9262acV.d.ts → presentation-Dx-kZC8Y.d.ts} +33 -81
- package/dist/repo-readme.js +1 -1
- package/dist/schema-engine-ajv.js +1 -1
- package/dist/schema-engine-precompiled.js +2 -2
- package/dist/schema.d.ts +5 -7
- package/dist/schema.js +3 -3
- package/dist/schemas.js +1 -1
- package/dist/source.d.ts +5 -0
- package/dist/source.js +10 -10
- package/dist/spec/reference/engine-defaults.json +1 -1
- package/dist/spec/reference/engine-vocabularies.json +43 -43
- package/dist/spec/reference/font-policy.json +114 -2
- package/dist/spec/reference/font-policy.schema.json +45 -1
- package/dist/spec/schemas/color-scheme.schema.json +2 -2
- package/dist/spec/schemas/finding.schema.json +2 -1
- package/dist/spec/schemas/icon-set.schema.json +5 -0
- package/dist/spec/schemas/layout.schema.json +27 -85
- package/dist/spec/schemas/opf.schema.json +35 -176
- package/dist/spec/schemas/theme.schema.json +10 -10
- package/dist/symbol-font-encodings.d.ts +2 -2
- package/dist/symbol-font-encodings.js +12695 -12736
- package/dist/types.d.ts +74 -86
- package/dist/{validation-types-CYbsUuZ9.d.ts → validation-types-DKIe1RQW.d.ts} +5 -5
- package/dist/validator.d.ts +5 -7
- package/dist/validator.js +3 -3
- package/dist/yaml.d.ts +1 -1
- package/dist/yaml.js +7 -7
- package/package.json +7 -7
- package/dist/chunk-UJZN2ZH6.js +0 -1
- package/dist/conversion-CSQ5EHD2.js +0 -25
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsonEqual, formatPointer } from './chunk-
|
|
2
|
-
import { annotationText } from './chunk-
|
|
1
|
+
import { jsonEqual, formatPointer } from './chunk-KNMMEE67.js';
|
|
2
|
+
import { annotationText } from './chunk-LDLLZQPP.js';
|
|
3
3
|
|
|
4
4
|
// src/diff-match.ts
|
|
5
5
|
var DEFAULT_MATCH_THRESHOLD = 0.5;
|
|
@@ -372,7 +372,6 @@ function merge(base, ours, theirs, options = {}) {
|
|
|
372
372
|
|
|
373
373
|
// src/diff.ts
|
|
374
374
|
var isObject3 = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
375
|
-
var REGION_KEY = /^(top|middle|bottom|start|center|end)([:+].*)?$/u;
|
|
376
375
|
var ROOT_CATEGORIES = { design: "design", assets: "assets", datasets: "datasets", catalogs: "catalogs", variables: "variables", narrative: "narrative", extensions: "extensions" };
|
|
377
376
|
function categoryOf(tokens) {
|
|
378
377
|
const [root] = tokens;
|
|
@@ -382,7 +381,6 @@ function categoryOf(tokens) {
|
|
|
382
381
|
if (tokens[2] === "design") return "design";
|
|
383
382
|
const last = tokens[tokens.length - 1] ?? "", parent = tokens[tokens.length - 2];
|
|
384
383
|
if (parent === "blocks" && /^\d+$/u.test(last)) return "block";
|
|
385
|
-
if (REGION_KEY.test(last)) return "block";
|
|
386
384
|
return "field";
|
|
387
385
|
}
|
|
388
386
|
return ROOT_CATEGORIES[root] ?? "metadata";
|
|
@@ -477,7 +475,7 @@ function diffArray(a, b, aPath, bPath, ctx) {
|
|
|
477
475
|
withSlide(() => diffValue(a[pair.a], b[pair.b], [...aPath, pair.a], [...bPath, pair.b], ctx), pair.a, pair.b);
|
|
478
476
|
}
|
|
479
477
|
}
|
|
480
|
-
function
|
|
478
|
+
function summarize(changes, slides) {
|
|
481
479
|
const summary = { total: changes.length, byCategory: {}, byType: {}, slides: { added: 0, removed: 0, moved: 0, modified: 0, unchanged: 0 } };
|
|
482
480
|
for (const change of changes) {
|
|
483
481
|
summary.byCategory[change.category] = (summary.byCategory[change.category] ?? 0) + 1;
|
|
@@ -497,7 +495,7 @@ function summarise(changes, slides) {
|
|
|
497
495
|
function diff(a, b, options = {}) {
|
|
498
496
|
const ctx = { options: { threshold: options.threshold ?? DEFAULT_MATCH_THRESHOLD }, changes: [], patch: [], slides: [] };
|
|
499
497
|
diffValue(a, b, [], [], ctx);
|
|
500
|
-
return { equal: ctx.patch.length === 0, changes: ctx.changes, patch: ctx.patch, slides: ctx.slides, summary:
|
|
498
|
+
return { equal: ctx.patch.length === 0, changes: ctx.changes, patch: ctx.patch, slides: ctx.slides, summary: summarize(ctx.changes, ctx.slides) };
|
|
501
499
|
}
|
|
502
500
|
var CONTENT_KINDS = ["blocks", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "image", "video", "items", "bullets", "text"];
|
|
503
501
|
function shorten(text, max = 60) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { NOT_CHECKED } from './chunk-RYZPBJLB.js';
|
|
2
|
-
import { readMarkdown, parseSlideText, escapeInline, serializeRuns } from './chunk-
|
|
3
|
-
import { fenceCode } from './chunk-
|
|
4
|
-
import { OPFMarkdownError, writeYaml, Ctx, readYamlMapping, csvField, scalarText } from './chunk-
|
|
5
|
-
import { same, isRecord, runText, isPlainRun, FORMATTING } from './chunk-
|
|
6
|
-
import { validate } from './chunk-
|
|
7
|
-
import { checkCatalogsOption } from './chunk-
|
|
2
|
+
import { readMarkdown, parseSlideText, escapeInline, serializeRuns } from './chunk-VMPOCXTE.js';
|
|
3
|
+
import { fenceCode } from './chunk-NPRNWPP4.js';
|
|
4
|
+
import { OPFMarkdownError, writeYaml, Ctx, readYamlMapping, csvField, scalarText } from './chunk-ZZWX4W2G.js';
|
|
5
|
+
import { same, isRecord, runText, isPlainRun, FORMATTING } from './chunk-ARPMSD7V.js';
|
|
6
|
+
import { validate } from './chunk-KNMMEE67.js';
|
|
7
|
+
import { checkCatalogsOption } from './chunk-LDLLZQPP.js';
|
|
8
8
|
|
|
9
9
|
// src/markdown/canon.ts
|
|
10
10
|
var FORMAT_KEYS = FORMATTING;
|
|
@@ -230,9 +230,6 @@ function canonContent(key, value) {
|
|
|
230
230
|
// src/markdown/emit.ts
|
|
231
231
|
var CONTENT = ["text", "items", "bullets", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram"];
|
|
232
232
|
var isContent = (key) => CONTENT.includes(key);
|
|
233
|
-
var ROWS = "(?:top|middle|bottom|top\\+middle|middle\\+bottom|top\\+middle\\+bottom)";
|
|
234
|
-
var COLUMNS = "(?:start|center|end|start\\+center|center\\+end|start\\+center\\+end)";
|
|
235
|
-
var REGION = new RegExp(`^(?:${ROWS}(?::${COLUMNS})?|${COLUMNS})$`);
|
|
236
233
|
var NATIVE_SLIDE = /* @__PURE__ */ new Set(["id", "type", "layout", "section", "tag", "hidden", "beat", "language", "title", "subtitle", "notes", "blocks", ...CONTENT]);
|
|
237
234
|
function fenceFor(body, char = "`") {
|
|
238
235
|
let longest = 2;
|
|
@@ -417,7 +414,7 @@ function nativeLines(key, canon, marker) {
|
|
|
417
414
|
}
|
|
418
415
|
function blockOptionsLine(spec, as) {
|
|
419
416
|
const parts = [];
|
|
420
|
-
for (const [key, value] of [["id", spec.id], ["type", spec.type], ["as", as], ["region", spec.
|
|
417
|
+
for (const [key, value] of [["id", spec.id], ["type", spec.type], ["as", as], ["region", spec.pin]]) {
|
|
421
418
|
if (value === void 0) continue;
|
|
422
419
|
const text = typeof value === "string" ? optionValue(value) : void 0;
|
|
423
420
|
if (text === void 0) return void 0;
|
|
@@ -436,7 +433,7 @@ function nativeBlock(spec, marker) {
|
|
|
436
433
|
const all = options ? [options, ...lines] : lines;
|
|
437
434
|
const { slide, clean } = parseSlideText(all.join("\n"));
|
|
438
435
|
if (!slide || !clean) continue;
|
|
439
|
-
const target = spec.
|
|
436
|
+
const target = spec.id !== void 0 || spec.type !== void 0 || spec.pin !== void 0 ? slide.blocks?.[0] : slide;
|
|
440
437
|
if (target && same(target[spec.key], canon)) return all;
|
|
441
438
|
}
|
|
442
439
|
return void 0;
|
|
@@ -511,7 +508,6 @@ function emitSlide(slide, index, mode) {
|
|
|
511
508
|
handle(`${path}/${key}`, `the ${key} has no single-line Markdown form`, () => extras[key] = value);
|
|
512
509
|
}
|
|
513
510
|
const specs = [];
|
|
514
|
-
const handledRegions = /* @__PURE__ */ new Set();
|
|
515
511
|
if (Array.isArray(slide.blocks)) {
|
|
516
512
|
slide.blocks.forEach((block, i) => {
|
|
517
513
|
const where = `${path}/blocks/${i}`;
|
|
@@ -525,38 +521,24 @@ function emitSlide(slide, index, mode) {
|
|
|
525
521
|
} else {
|
|
526
522
|
for (const key of CONTENT) if (slide[key] !== void 0) specs.push({ spec: { key, value: slide[key] }, where: `${path}/${key}` });
|
|
527
523
|
}
|
|
528
|
-
for (const [key, value] of Object.entries(slide)) {
|
|
529
|
-
if (!REGION.test(key) || !isRecord(value)) continue;
|
|
530
|
-
const rest = Object.keys(value).filter((entry) => entry !== "id" && entry !== "type");
|
|
531
|
-
const only3 = rest.length === 1 && isContent(rest[0]) ? rest[0] : void 0;
|
|
532
|
-
if (only3 === void 0) continue;
|
|
533
|
-
handledRegions.add(key);
|
|
534
|
-
specs.push({ spec: { key: only3, value: value[only3], id: value.id, type: value.type, region: key }, where: `${path}/${key}`, payload: value });
|
|
535
|
-
}
|
|
536
524
|
let marker = "-";
|
|
537
525
|
for (const { spec, where, payload } of specs) {
|
|
538
526
|
const lines2 = spec.key ? nativeBlock(spec, marker) : void 0;
|
|
539
527
|
if (lines2) {
|
|
540
528
|
sections.push({ lines: lines2 });
|
|
541
529
|
const written = { ...spec.id !== void 0 ? { id: spec.id } : {}, ...spec.type !== void 0 ? { type: spec.type } : {}, ...spec.pin !== void 0 ? { region: spec.pin } : {}, [spec.key]: canonContent(spec.key, spec.value) };
|
|
542
|
-
|
|
543
|
-
else expBlocks.push(written);
|
|
530
|
+
expBlocks.push(written);
|
|
544
531
|
const list = spec.key === "items" || spec.key === "bullets";
|
|
545
532
|
marker = list ? marker === "-" ? "*" : "-" : "-";
|
|
546
533
|
continue;
|
|
547
534
|
}
|
|
548
535
|
marker = "-";
|
|
549
536
|
handle(where, spec.key ? `${spec.key} content has a part with no Markdown form` : "a block with several fields or a nested group has no Markdown form", () => {
|
|
550
|
-
if (spec.region !== void 0) {
|
|
551
|
-
extras[spec.region] = slide[spec.region];
|
|
552
|
-
return;
|
|
553
|
-
}
|
|
554
537
|
const payloadValue = payload ?? { [spec.key]: spec.value };
|
|
555
538
|
const lines3 = embed(payloadValue);
|
|
556
539
|
if (!lines3) throw new OPFMarkdownError("not-representable", `The block at ${where} holds a value that YAML cannot carry exactly.`, { path: where });
|
|
557
540
|
sections.push({ lines: lines3 });
|
|
558
|
-
|
|
559
|
-
else expBlocks.push(structuredClone(payloadValue));
|
|
541
|
+
expBlocks.push(structuredClone(payloadValue));
|
|
560
542
|
});
|
|
561
543
|
}
|
|
562
544
|
let notesLines;
|
|
@@ -573,7 +555,7 @@ function emitSlide(slide, index, mode) {
|
|
|
573
555
|
}
|
|
574
556
|
if (!notesLines) handle(`${path}/notes`, "the speaker notes have no Note: form (blank edges, a --- line or a carriage return)", () => extras.notes = notes);
|
|
575
557
|
}
|
|
576
|
-
for (const [key, value] of Object.entries(slide)) if (!NATIVE_SLIDE.has(key)
|
|
558
|
+
for (const [key, value] of Object.entries(slide)) if (!NATIVE_SLIDE.has(key)) handle(`${path}/${key}`, `${JSON.stringify(key)} has no Markdown form`, () => extras[key] = value);
|
|
577
559
|
if (Object.keys(extras).length) {
|
|
578
560
|
const text = writeYaml(extras);
|
|
579
561
|
if (text === void 0) throw new OPFMarkdownError("not-representable", `The slide at ${path} holds a value that YAML cannot carry exactly.`, { path });
|
|
@@ -176,7 +176,7 @@ function quoted(text) {
|
|
|
176
176
|
function bare(text) {
|
|
177
177
|
return text.replace(/[#;<>&{}\\"`]/g, (char) => ({ "#": "#35;", ";": "#59;", "<": "#lt;", ">": "#gt;", "&": "#amp;", "{": "#123;", "}": "#125;", "\\": "#92;", '"': "#quot;", "`": "#96;" })[char]).split("\n").join("<br>");
|
|
178
178
|
}
|
|
179
|
-
var
|
|
179
|
+
var labeled = (text) => bare(text).replace(/:/g, "#58;");
|
|
180
180
|
var betweenDashes = (text) => bare(text).replace(/['()[\]:-]/g, (char) => `#${char.charCodeAt(0)};`);
|
|
181
181
|
function ganttName(text) {
|
|
182
182
|
const name = bare(text).replace(/[:%]/g, (char) => `#${char.charCodeAt(0)};`);
|
|
@@ -663,7 +663,7 @@ function classDiagram(lines, title, maxEdges) {
|
|
|
663
663
|
};
|
|
664
664
|
const line = link.line === "dotted" ? ".." : "--";
|
|
665
665
|
const arrow = `${head(link.left, "left")}${line}${head(link.right, "right")}`;
|
|
666
|
-
out.push(` ${from}${link.leftLabel ? ` "${quoted(link.leftLabel)}"` : ""} ${arrow}${link.rightLabel ? ` "${quoted(link.rightLabel)}"` : ""} ${to}${link.label ? ` : ${
|
|
666
|
+
out.push(` ${from}${link.leftLabel ? ` "${quoted(link.leftLabel)}"` : ""} ${arrow}${link.rightLabel ? ` "${quoted(link.rightLabel)}"` : ""} ${to}${link.label ? ` : ${labeled(link.label)}` : ""}`);
|
|
667
667
|
if (++relations > maxEdges) fail("diagram-limit", `The diagram has more than ${maxEdges} relations.`);
|
|
668
668
|
continue;
|
|
669
669
|
}
|
|
@@ -705,7 +705,7 @@ function stateDiagram(lines, title, direction, maxEdges) {
|
|
|
705
705
|
if (stereotype && ["choice", "fork", "join"].includes(stereotype)) out.push(`${indent}state ${id} <<${stereotype}>>`);
|
|
706
706
|
else if (stereotype === "end") out.push(`${indent}state ${id}`);
|
|
707
707
|
else if (label && label !== id) out.push(`${indent}state "${bare(plainText(label))}" as ${id}`);
|
|
708
|
-
if (match[6]) out.push(`${indent}${id} : ${
|
|
708
|
+
if (match[6]) out.push(`${indent}${id} : ${labeled(plainText(match[6]))}`);
|
|
709
709
|
if (match[5]) {
|
|
710
710
|
out.push(`${indent}state ${id} {`);
|
|
711
711
|
depth++;
|
|
@@ -732,7 +732,7 @@ function stateDiagram(lines, title, direction, maxEdges) {
|
|
|
732
732
|
}
|
|
733
733
|
const side = match[1].toLowerCase();
|
|
734
734
|
if (side !== "left" && side !== "right") noNote(current, "a state");
|
|
735
|
-
out.push(`${indent}note ${side} of ${state(match[2])} : ${
|
|
735
|
+
out.push(`${indent}note ${side} of ${state(match[2])} : ${labeled(plainText(body))}`);
|
|
736
736
|
continue;
|
|
737
737
|
}
|
|
738
738
|
if (statement(text, /^note\b/i)) noNote(current, "a state");
|
|
@@ -740,13 +740,13 @@ function stateDiagram(lines, title, direction, maxEdges) {
|
|
|
740
740
|
if (link) {
|
|
741
741
|
if (link.left && link.right) fail("diagram-syntax", "A state transition has one arrowhead; write two transitions for both directions.", current.line);
|
|
742
742
|
const [from, to] = link.left && !link.right ? [link.to, link.from] : [link.from, link.to];
|
|
743
|
-
out.push(`${indent}${state(from)} --> ${state(to)}${link.label ? ` : ${
|
|
743
|
+
out.push(`${indent}${state(from)} --> ${state(to)}${link.label ? ` : ${labeled(link.label)}` : ""}`);
|
|
744
744
|
if (++transitions > maxEdges) fail("diagram-limit", `The diagram has more than ${maxEdges} transitions.`);
|
|
745
745
|
continue;
|
|
746
746
|
}
|
|
747
747
|
match = /^("[^"]+"|[\w.]+)\s*:\s*(.*)$/.exec(text);
|
|
748
748
|
if (match) {
|
|
749
|
-
out.push(`${indent}${state(match[1])} : ${
|
|
749
|
+
out.push(`${indent}${state(match[1])} : ${labeled(plainText(match[2]))}`);
|
|
750
750
|
continue;
|
|
751
751
|
}
|
|
752
752
|
match = /^("[^"]+"|[\w.]+)$/.exec(text);
|
|
@@ -335,6 +335,14 @@ var fontPolicySource = {
|
|
|
335
335
|
"styles": 4,
|
|
336
336
|
"reference": "Arial 7.06"
|
|
337
337
|
},
|
|
338
|
+
"scripts": {
|
|
339
|
+
"Arab": {
|
|
340
|
+
"family": "Noto Naskh Arabic",
|
|
341
|
+
"compatibility": "visual",
|
|
342
|
+
"sizeAdjust": 0.96,
|
|
343
|
+
"sizeAdjustBasis": "v0.35 Arabic default: sum of Arial 7.07 advances over sum of Noto Naskh Arabic 400 advances (fontkit, read in place; each sample in its own OpenType language) over the Arabic-script runs of the 12 Arabic-script corpus samples of opf-render test/fixtures/script-corpora.json: 0.964 (per-sample 0.90 to 1.16; the samples without digits of their own 0.90 to 0.99, the two digit samples 1.08 and 1.16). Arial's Arabic is Times New Roman's (235 of the 256 glyphs of the Arabic block have the same outlines and advances); Arial's wider space makes its runs 1.5 percent longer. Bold: Arial Bold over Noto Naskh Arabic 700 0.946, so bold runs draw about 1.5 percent long. At 0.96 the body letters stand as high as the real font's (heh 1.03, meem 1.07 of the replacement's) and alef and lam somewhat lower (1.15). Noto Naskh Arabic, not Noto Sans Arabic: those samples vary less against Arial (0.90 to 0.99 against 0.82 to 0.94, which is 0.88 pooled) and its bold keeps the regular ratio (Noto Sans Arabic 700: 0.82, so bold would draw 7 percent long)."
|
|
344
|
+
}
|
|
345
|
+
},
|
|
338
346
|
"source": "https://github.com/google/fonts/blob/main/ofl/arimo/METADATA.pb"
|
|
339
347
|
},
|
|
340
348
|
"alternates": [
|
|
@@ -1159,6 +1167,14 @@ var fontPolicySource = {
|
|
|
1159
1167
|
"maxAbsWidthDelta": 0.0934,
|
|
1160
1168
|
"styles": 2,
|
|
1161
1169
|
"reference": "Ebrima 5.19"
|
|
1170
|
+
},
|
|
1171
|
+
"scripts": {
|
|
1172
|
+
"Ethi": {
|
|
1173
|
+
"family": "Noto Sans Ethiopic",
|
|
1174
|
+
"compatibility": "visual",
|
|
1175
|
+
"sizeAdjust": 1.06,
|
|
1176
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Ebrima 5.20 advances over sum of Noto Sans Ethiopic 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 1.055 (per-sentence 1.032 to 1.076)."
|
|
1177
|
+
}
|
|
1162
1178
|
}
|
|
1163
1179
|
},
|
|
1164
1180
|
"alternates": [
|
|
@@ -1715,6 +1731,36 @@ var fontPolicySource = {
|
|
|
1715
1731
|
],
|
|
1716
1732
|
"note": "Script replacement; widths not measured. Windows: Tamil Supplemental Fonts FOD."
|
|
1717
1733
|
},
|
|
1734
|
+
{
|
|
1735
|
+
"family": "Leelawadee UI",
|
|
1736
|
+
"licenseClass": "proprietary-standard",
|
|
1737
|
+
"license": "proprietary (Microsoft)",
|
|
1738
|
+
"availability": [
|
|
1739
|
+
"windows"
|
|
1740
|
+
],
|
|
1741
|
+
"embeddableByOpf": false,
|
|
1742
|
+
"replacement": {
|
|
1743
|
+
"family": "Noto Sans Thai",
|
|
1744
|
+
"compatibility": "visual",
|
|
1745
|
+
"sizeAdjust": 0.96,
|
|
1746
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Leelawadee UI 6.00 advances over sum of Noto Sans Thai 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 0.958 (per-sentence 0.935 to 0.985).",
|
|
1747
|
+
"measured": null,
|
|
1748
|
+
"scripts": {
|
|
1749
|
+
"Khmr": {
|
|
1750
|
+
"family": "Noto Sans Khmer",
|
|
1751
|
+
"compatibility": "visual",
|
|
1752
|
+
"sizeAdjust": 1.19,
|
|
1753
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Leelawadee UI 6.00 advances over sum of Noto Sans Khmer 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 1.19 (per-sentence 1.163 to 1.235)."
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
"sources": [
|
|
1758
|
+
"https://learn.microsoft.com/en-us/typography/fonts/windows_11_font_list",
|
|
1759
|
+
"https://learn.microsoft.com/en-us/typography/fonts/windows_10_font_list",
|
|
1760
|
+
"https://learn.microsoft.com/en-us/typography/font-list/leelawadee-ui"
|
|
1761
|
+
],
|
|
1762
|
+
"note": "The default for Thai and Khmer since 0.35. Thai text previews in Noto Sans Thai, Khmer in Noto Sans Khmer."
|
|
1763
|
+
},
|
|
1718
1764
|
{
|
|
1719
1765
|
"family": "Liberation Mono",
|
|
1720
1766
|
"licenseClass": "open",
|
|
@@ -2219,6 +2265,56 @@ var fontPolicySource = {
|
|
|
2219
2265
|
"maxAbsWidthDelta": 0.0939,
|
|
2220
2266
|
"styles": 2,
|
|
2221
2267
|
"reference": "Nirmala UI 1.46"
|
|
2268
|
+
},
|
|
2269
|
+
"scripts": {
|
|
2270
|
+
"Beng": {
|
|
2271
|
+
"family": "Noto Sans Bengali",
|
|
2272
|
+
"compatibility": "visual",
|
|
2273
|
+
"sizeAdjust": 1.08,
|
|
2274
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Nirmala UI 1.46 advances over sum of Noto Sans Bengali 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 1.079 (per-sentence 1.056 to 1.094)."
|
|
2275
|
+
},
|
|
2276
|
+
"Gujr": {
|
|
2277
|
+
"family": "Noto Sans Gujarati",
|
|
2278
|
+
"compatibility": "visual",
|
|
2279
|
+
"sizeAdjust": 1.13,
|
|
2280
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Nirmala UI 1.46 advances over sum of Noto Sans Gujarati 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 1.128 (per-sentence 1.097 to 1.151)."
|
|
2281
|
+
},
|
|
2282
|
+
"Guru": {
|
|
2283
|
+
"family": "Noto Sans Gurmukhi",
|
|
2284
|
+
"compatibility": "visual",
|
|
2285
|
+
"sizeAdjust": 1.08,
|
|
2286
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Nirmala UI 1.46 advances over sum of Noto Sans Gurmukhi 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 1.084 (per-sentence 1.073 to 1.094)."
|
|
2287
|
+
},
|
|
2288
|
+
"Knda": {
|
|
2289
|
+
"family": "Noto Sans Kannada",
|
|
2290
|
+
"compatibility": "visual",
|
|
2291
|
+
"sizeAdjust": 1.17,
|
|
2292
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Nirmala UI 1.46 advances over sum of Noto Sans Kannada 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 1.166 (per-sentence 1.132 to 1.186). Noto Sans Kannada is the narrower design, so at this factor its letters stand about 15 percent taller than Nirmala UI's."
|
|
2293
|
+
},
|
|
2294
|
+
"Mlym": {
|
|
2295
|
+
"family": "Noto Sans Malayalam",
|
|
2296
|
+
"compatibility": "visual",
|
|
2297
|
+
"sizeAdjust": 1.13,
|
|
2298
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Nirmala UI 1.46 advances over sum of Noto Sans Malayalam 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 1.13 (per-sentence 1.113 to 1.169)."
|
|
2299
|
+
},
|
|
2300
|
+
"Orya": {
|
|
2301
|
+
"family": "Noto Sans Oriya",
|
|
2302
|
+
"compatibility": "visual",
|
|
2303
|
+
"sizeAdjust": 0.98,
|
|
2304
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Nirmala UI 1.46 advances over sum of Noto Sans Oriya 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 0.983 (per-sentence 0.971 to 0.998)."
|
|
2305
|
+
},
|
|
2306
|
+
"Taml": {
|
|
2307
|
+
"family": "Noto Sans Tamil",
|
|
2308
|
+
"compatibility": "visual",
|
|
2309
|
+
"sizeAdjust": 1.04,
|
|
2310
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Nirmala UI 1.46 advances over sum of Noto Sans Tamil 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 1.039 (per-sentence 1.033 to 1.047)."
|
|
2311
|
+
},
|
|
2312
|
+
"Telu": {
|
|
2313
|
+
"family": "Noto Sans Telugu",
|
|
2314
|
+
"compatibility": "visual",
|
|
2315
|
+
"sizeAdjust": 1.17,
|
|
2316
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Nirmala UI 1.46 advances over sum of Noto Sans Telugu 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 1.169 (per-sentence 1.128 to 1.196)."
|
|
2317
|
+
}
|
|
2222
2318
|
}
|
|
2223
2319
|
},
|
|
2224
2320
|
"sources": [
|
|
@@ -2241,7 +2337,7 @@ var fontPolicySource = {
|
|
|
2241
2337
|
"https://github.com/googlefonts/noto-emoji",
|
|
2242
2338
|
"https://www.npmjs.com/package/@expo-google-fonts/noto-color-emoji"
|
|
2243
2339
|
],
|
|
2244
|
-
"note": "
|
|
2340
|
+
"note": "Color emoji (COLRv1 and OT-SVG glyphs; the Google Fonts build, 25.1 MB). Preview face for Segoe UI Emoji (FF-45); drawn in color by browsers, as a monochrome Noto Emoji silhouette by the resvg raster path."
|
|
2245
2341
|
},
|
|
2246
2342
|
{
|
|
2247
2343
|
"family": "Noto Emoji",
|
|
@@ -3021,6 +3117,14 @@ var fontPolicySource = {
|
|
|
3021
3117
|
"maxAbsWidthDelta": 0.0709,
|
|
3022
3118
|
"styles": 4,
|
|
3023
3119
|
"reference": "Segoe UI 5.71"
|
|
3120
|
+
},
|
|
3121
|
+
"scripts": {
|
|
3122
|
+
"Hebr": {
|
|
3123
|
+
"family": "Noto Sans Hebrew",
|
|
3124
|
+
"compatibility": "visual",
|
|
3125
|
+
"sizeAdjust": 1.03,
|
|
3126
|
+
"sizeAdjustBasis": "v0.35 script defaults: sum of Segoe UI 5.72 advances over sum of Noto Sans Hebrew 400 advances (HarfBuzz shaping with the language tag, fonts read in place) over 8 sentences: 1.026 (per-sentence 1.015 to 1.036)."
|
|
3127
|
+
}
|
|
3024
3128
|
}
|
|
3025
3129
|
},
|
|
3026
3130
|
"alternates": [
|
|
@@ -3061,7 +3165,7 @@ var fontPolicySource = {
|
|
|
3061
3165
|
"https://learn.microsoft.com/en-us/typography/font-list/segoe-ui-emoji",
|
|
3062
3166
|
"https://support.apple.com/en-us/122869"
|
|
3063
3167
|
],
|
|
3064
|
-
"note": "FF-45: previews with Noto Color Emoji (OFL-1.1, COLRv1 and OT-SVG
|
|
3168
|
+
"note": "FF-45: previews with Noto Color Emoji (OFL-1.1, COLRv1 and OT-SVG color glyphs, 25.1 MB) loaded as the opf-render emoji pack (@expo-google-fonts/noto-color-emoji, optional peer); Noto Emoji (monochrome) is the alternate and the face the resvg raster path draws, because resvg draws neither COLRv1 nor OT-SVG glyphs. Visual: every emoji sequence advances 1.2451 em in Noto Color Emoji against 1.3730 em in Segoe UI Emoji 1.33 (-9.3%); Noto Color Emoji has no Latin glyphs, so Latin text and digits of a Segoe UI Emoji run take a text face by glyph fallback. Not measured on the policy corpus (measured: null). Color font (COLRv1 in Windows 11, version 1.33 per the list)."
|
|
3065
3169
|
},
|
|
3066
3170
|
{
|
|
3067
3171
|
"family": "Segoe UI Light",
|
|
@@ -3536,6 +3640,14 @@ var fontPolicySource = {
|
|
|
3536
3640
|
"styles": 4,
|
|
3537
3641
|
"reference": "Times New Roman 7.12"
|
|
3538
3642
|
},
|
|
3643
|
+
"scripts": {
|
|
3644
|
+
"Arab": {
|
|
3645
|
+
"family": "Noto Naskh Arabic",
|
|
3646
|
+
"compatibility": "visual",
|
|
3647
|
+
"sizeAdjust": 0.95,
|
|
3648
|
+
"sizeAdjustBasis": "v0.35 Arabic default: sum of Times New Roman 7.13 advances over sum of Noto Naskh Arabic 400 advances (fontkit, read in place; each sample in its own OpenType language) over the Arabic-script runs of the 12 Arabic-script corpus samples of opf-render test/fixtures/script-corpora.json: 0.950 (per-sample 0.89 to 1.15; the samples without digits of their own 0.89 to 0.96, the two digit samples 1.07 and 1.15). Bold: Times New Roman Bold over Noto Naskh Arabic 700 0.932, so bold runs draw about 2 percent long. At 0.95 the body letters stand as high as the real font's (heh 1.05, meem 1.08 of the replacement's) and alef and lam somewhat lower (1.16). Noto Naskh Arabic, not Noto Sans Arabic: Times New Roman's Arabic is a naskh design, those samples vary less against it (0.89 to 0.96 against 0.81 to 0.93, which is 0.86 pooled) and its bold keeps the regular ratio (Noto Sans Arabic 700: 0.81, so bold would draw 7 percent long)."
|
|
3649
|
+
}
|
|
3650
|
+
},
|
|
3539
3651
|
"source": "https://github.com/google/fonts/blob/main/ofl/tinos/METADATA.pb"
|
|
3540
3652
|
},
|
|
3541
3653
|
"alternates": [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SOURCE_EXPLAIN, ruleDocumentation, findValidationRule
|
|
1
|
+
import { SOURCE_EXPLAIN, ruleDocumentation, findValidationRule } from './chunk-KNMMEE67.js';
|
|
2
2
|
|
|
3
3
|
// src/finding-text-explain-util.ts
|
|
4
4
|
var ex = (fix, problem, fixed) => ({ fix, problem, fixed });
|
|
@@ -7,7 +7,7 @@ var CHART = { type: "column", alt: "Revenue by quarter", data: { columns: ["Quar
|
|
|
7
7
|
|
|
8
8
|
// src/finding-text-explain-audit.ts
|
|
9
9
|
var WHITE = { background: { type: "solid", color: "#FFFFFF" } };
|
|
10
|
-
var ROADMAP = { name: "Roadmap", regions: [{ name: "title" }, { direction: "row", regions: [{ name: "timeline", accepts: ["timeline"], max: 1 }, { name: "notes", accepts: ["text", "list"], flow: "column" }] }] };
|
|
10
|
+
var ROADMAP = { name: "Roadmap", overflowRegion: "timeline", regions: [{ name: "title" }, { direction: "row", regions: [{ name: "timeline", accepts: ["timeline"], max: 1 }, { name: "notes", accepts: ["text", "list"], flow: "column" }] }] };
|
|
11
11
|
var TIMELINE = { timeline: { events: [{ when: "Q1", what: "Pilot" }, { when: "Q2", what: "Launch" }] } };
|
|
12
12
|
var SERIES = (count) => ({ columns: ["Quarter", ...Array.from({ length: count }, (_, i) => `S${i + 1}`)], rows: [["Q1", ...Array.from({ length: count }, (_, i) => i + 1)]] });
|
|
13
13
|
var LONG_ITEMS = [
|
|
@@ -137,8 +137,8 @@ var AUDIT_EXPLAIN = {
|
|
|
137
137
|
),
|
|
138
138
|
"opf/arrangement-adapted": ex(
|
|
139
139
|
"Give a matrix exactly four short entries, or choose another layout for another count.",
|
|
140
|
-
{ catalogs: { custom: { layouts: { quad: { name: "Quad", regions: [{ name: "title" }, { name: "quadrants", accepts: ["list"],
|
|
141
|
-
{ catalogs: { custom: { layouts: { quad: { name: "Quad", regions: [{ name: "title" }, { name: "quadrants", accepts: ["list"],
|
|
140
|
+
{ catalogs: { custom: { layouts: { quad: { name: "Quad", regions: [{ name: "title" }, { name: "quadrants", accepts: ["list"], max: 1, arrangement: "matrix" }] } } } }, slides: [{ layout: "quad", title: "Markets", items: ["North", "South", "East"] }] },
|
|
141
|
+
{ catalogs: { custom: { layouts: { quad: { name: "Quad", regions: [{ name: "title" }, { name: "quadrants", accepts: ["list"], max: 1, arrangement: "matrix" }] } } } }, slides: [{ layout: "quad", title: "Markets", items: ["North", "South", "East", "West"] }] }
|
|
142
142
|
),
|
|
143
143
|
"opf/region-full": ex(
|
|
144
144
|
"Pin the block to another region with room, or remove `region` so it is placed by its kind.",
|
|
@@ -491,7 +491,7 @@ var REFERENCES_EXPLAIN = {
|
|
|
491
491
|
{ catalogs: { custom: { layouts: { mine: { name: "Mine", regions: [{ name: "title" }, { name: "body", accepts: ["text"] }] } } } }, slides: [{ title: "Welcome", layout: "mine" }] }
|
|
492
492
|
),
|
|
493
493
|
"opf/unresolved-reference": ex(
|
|
494
|
-
"Choose an id the catalog has (the finding
|
|
494
|
+
"Choose an id the catalog has (the finding names a near miss when there is one, and where the ids are listed), embed the record under `catalogs.custom`, register the catalog that defines it, or remove the reference.",
|
|
495
495
|
{ slides: [{ title: "Pillars", layout: "pilars" }] },
|
|
496
496
|
{ slides: [{ title: "Pillars", layout: "pillars" }] }
|
|
497
497
|
),
|
|
@@ -580,9 +580,9 @@ function explain(ruleId) {
|
|
|
580
580
|
name: info.name,
|
|
581
581
|
category: info.category,
|
|
582
582
|
severity: info.severity,
|
|
583
|
-
summary:
|
|
584
|
-
rationale:
|
|
585
|
-
fix: detail?.fix ??
|
|
583
|
+
summary: info.summary,
|
|
584
|
+
rationale: info.standard && !info.standard.startsWith("spec/") ? `${info.rationale} Basis: ${info.standard}.` : info.rationale,
|
|
585
|
+
fix: detail?.fix ?? info.summary,
|
|
586
586
|
...detail ? { example: { problem: exampleText(detail.problem), fixed: exampleText(detail.fixed), language: "json" } } : {},
|
|
587
587
|
docs: ruleDocumentation(info.id)
|
|
588
588
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { assertValid, resolveSlideScriptMeasurement, resolveDrawnFontFamilies, resolveSlideContext } from './chunk-
|
|
2
|
-
import { composeSlide, resolveSlideVariables, slideBlockIds, OPFCompositionError, checkCatalogsOption, usesSlideBuiltin, isOverlayConnector, codeHighlightSlice, tableRowBoundaries, visitContentPayloads, layoutTable, regionAccepts, slideTokenSpans, sliceNumberedItems, isShapeBlock } from './chunk-
|
|
1
|
+
import { assertValid, resolveSlideScriptMeasurement, resolveDrawnFontFamilies, resolveSlideContext } from './chunk-KNMMEE67.js';
|
|
2
|
+
import { composeSlide, resolveSlideVariables, slideBlockIds, cellBlocks, OPFCompositionError, checkCatalogsOption, usesSlideBuiltin, isOverlayConnector, codeHighlightSlice, tableRowBoundaries, visitContentPayloads, layoutTable, regionAccepts, slideTokenSpans, sliceNumberedItems, isShapeBlock } from './chunk-LDLLZQPP.js';
|
|
3
3
|
|
|
4
4
|
// src/continuation-fonts.ts
|
|
5
5
|
var record = (value) => value && typeof value === "object" ? value : {};
|
|
@@ -345,12 +345,6 @@ function paginateSlide(input, options = {}) {
|
|
|
345
345
|
result.blocks = children;
|
|
346
346
|
hasContent = true;
|
|
347
347
|
}
|
|
348
|
-
} else if (root && isRecord(value) && /^(top|middle|bottom|start|center|end)([+:]|$)/.test(key)) {
|
|
349
|
-
const child = visit(value, childPath, outputPath);
|
|
350
|
-
if (child) {
|
|
351
|
-
result[key] = child;
|
|
352
|
-
hasContent = true;
|
|
353
|
-
}
|
|
354
348
|
} else if (key === "text" && isShapeBlock(node)) {
|
|
355
349
|
if (portions.has(`${path}.shape`) || portions.has(`${path}.path`)) result[key] = clone(value);
|
|
356
350
|
} else if (!contentFields.has(key)) result[key] = clone(value);
|
|
@@ -518,10 +512,9 @@ function paginate(input, options = {}) {
|
|
|
518
512
|
const { presentation, pages } = paginateSlides(input, options, "paginate", options.maxSlides ?? 100, (slide, slideOptions) => paginateSlide(slide, slideOptions));
|
|
519
513
|
return { presentation, pages, layout: options.fonts ? "measured" : "estimated" };
|
|
520
514
|
}
|
|
521
|
-
var promotedKey = /^(top|middle|bottom|start|center|end)([+:]|$)/;
|
|
522
515
|
function blockUnits(slide) {
|
|
523
516
|
if (!isRecord(slide) || !Array.isArray(slide.blocks) || slide.blocks.length < 2) return void 0;
|
|
524
|
-
if (Object.keys(slide).some((key) => contentFields.has(key) ||
|
|
517
|
+
if (Object.keys(slide).some((key) => contentFields.has(key)) || cellBlocks(slide)) return void 0;
|
|
525
518
|
const kinds = [];
|
|
526
519
|
for (const block of slide.blocks) {
|
|
527
520
|
const fields = isRecord(block) && !Array.isArray(block.blocks) ? Object.keys(block).filter((key) => contentFields.has(key)) : [];
|