@openpresentation/opf 0.11.3 → 0.12.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 +16 -0
- package/dist/audit.d.ts +156 -0
- package/dist/audit.js +7 -0
- package/dist/{catalogs-CUClB3nl.d.ts → catalogs-u6TEeMcz.d.ts} +1 -1
- package/dist/catalogs.d.ts +2 -2
- package/dist/catalogs.js +2 -1
- package/dist/{chunk-UDPSGTZI.js → chunk-32DIB5BN.js} +12 -9
- package/dist/chunk-4FWCY4ZV.js +198 -0
- package/dist/chunk-6TSDIPSH.js +3624 -0
- package/dist/chunk-FYLJVF7X.js +18448 -0
- package/dist/{chunk-HJL64ETN.js → chunk-GJKJL4YY.js} +14 -0
- package/dist/chunk-JENJZR3F.js +1690 -0
- package/dist/{chunk-57NWIYX3.js → chunk-JVTN3HPP.js} +18 -4
- package/dist/{chunk-JTXCMVVP.js → chunk-RVN5C2FX.js} +754 -39
- package/dist/chunk-S5W34SIJ.js +1 -0
- package/dist/chunk-S667QI3M.js +261 -0
- package/dist/chunk-UQKJWHSS.js +1332 -0
- package/dist/{chunk-RXNFDGPC.js → chunk-WXSPETQ6.js} +311 -40
- package/dist/composition-DWbCiMwF.d.ts +1523 -0
- package/dist/composition.d.ts +1 -1
- package/dist/composition.js +2 -1
- package/dist/convert.d.ts +261 -0
- package/dist/convert.js +1107 -0
- package/dist/diff.d.ts +145 -0
- package/dist/diff.js +604 -0
- package/dist/docs.js +69 -15
- package/dist/examples.d.ts +1 -1
- package/dist/font-policy.d.ts +15 -0
- package/dist/font-policy.js +1 -1
- package/dist/format.d.ts +20 -0
- package/dist/format.js +83 -0
- package/dist/index.d.ts +173 -24
- package/dist/index.js +926 -262
- package/dist/lint.d.ts +4 -4
- package/dist/lint.js +6 -5
- package/dist/markdown.d.ts +74 -0
- package/dist/markdown.js +1941 -0
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +6 -5
- package/dist/patch.d.ts +99 -0
- package/dist/patch.js +6 -0
- package/dist/{presentation-Cn6vTOCP.d.ts → presentation-DRx4hpNZ.d.ts} +479 -32
- package/dist/repo-readme.js +1 -1
- package/dist/{schemas-X_NniU4A.d.ts → schemas-BSjlG8-R.d.ts} +28 -0
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +1 -1
- package/dist/spec/reference/font-policy.json +311 -40
- package/dist/spec/reference/font-policy.schema.json +40 -0
- package/dist/spec/reference/symbol-font-encodings.json +18354 -0
- package/dist/spec/reference/symbol-font-encodings.schema.json +156 -0
- package/dist/spec/schemas/opf.schema.json +608 -35
- package/dist/spec-files.d.ts +1 -1
- package/dist/spec-files.js +1 -1
- package/dist/symbol-font-encodings.d.ts +128 -0
- package/dist/symbol-font-encodings.js +1 -0
- package/dist/types.d.ts +4 -4
- package/dist/validator-bu396ffT.d.ts +172 -0
- package/dist/validator.d.ts +4 -36
- package/dist/validator.js +5 -4
- package/package.json +31 -2
- package/dist/chunk-BVLWFMDX.js +0 -1812
- package/dist/chunk-JCXHSTSM.js +0 -1366
- package/dist/composition-DzLwY-Mi.d.ts +0 -887
- /package/dist/{chunk-AEUSVEUY.js → chunk-3ZGSWEHK.js} +0 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://openpresentation.org/schema/opf-symbol-font-encodings/v1",
|
|
4
|
+
"title": "OPF symbol font encodings",
|
|
5
|
+
"description": "Schema for spec/reference/symbol-font-encodings.json (font-fidelity-everywhere FF-45): per symbol-encoded family (Symbol, Wingdings, Wingdings 2, Wingdings 3, Webdings), the reversible code-to-Unicode table for codes 0x20..0xFF of the Microsoft Symbol cmap, verified against a named version of the installed Windows font. Reference data for engines, not part of the OPF document contract.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["description", "version", "codeRange", "inputForms", "families"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "type": "string" },
|
|
11
|
+
"description": { "type": "string", "minLength": 1 },
|
|
12
|
+
"version": { "type": "integer", "minimum": 1 },
|
|
13
|
+
"codeRange": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"required": ["first", "last"],
|
|
17
|
+
"properties": { "first": { "const": 32 }, "last": { "const": 255 } }
|
|
18
|
+
},
|
|
19
|
+
"inputForms": {
|
|
20
|
+
"description": "How text in a symbol font reaches a renderer and how each form becomes a code.",
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["privateUse", "codePage", "other"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"privateUse": { "type": "string", "minLength": 1 },
|
|
26
|
+
"codePage": { "type": "string", "minLength": 1 },
|
|
27
|
+
"other": { "type": "string", "minLength": 1 }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"families": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"minItems": 1,
|
|
33
|
+
"items": { "$ref": "#/$defs/family" }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"$defs": {
|
|
37
|
+
"hex4": { "type": "string", "pattern": "^[0-9A-F]{4,5}$" },
|
|
38
|
+
"codePoints": {
|
|
39
|
+
"description": "One Unicode scalar value, or a sequence joined with '+' (for example a base character and a variation selector).",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^[0-9A-F]{4,5}(\\+[0-9A-F]{4,5})*$"
|
|
42
|
+
},
|
|
43
|
+
"family": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["family", "charset", "sources", "verifiedAgainst", "platformNotes", "summary", "codes"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"family": { "enum": ["Symbol", "Wingdings", "Wingdings 2", "Wingdings 3", "Webdings"] },
|
|
49
|
+
"charset": { "description": "The OOXML/GDI charset of a symbol font (CT_TextFont charset=\"2\").", "const": 2 },
|
|
50
|
+
"sources": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"minItems": 1,
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["url", "note"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"url": { "type": "string", "format": "uri", "pattern": "^https://" },
|
|
59
|
+
"note": { "type": "string", "minLength": 1 }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"verifiedAgainst": {
|
|
64
|
+
"description": "The installed font the table was checked against, read in place: identity and metrics only, never outlines or bytes.",
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": ["platform", "file", "version", "familyName", "postscriptName", "copyright", "unitsPerEm", "ascent", "descent", "lineGap", "numGlyphs", "cmap", "date"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"platform": { "enum": ["windows", "macos"] },
|
|
70
|
+
"file": { "type": "string", "minLength": 1 },
|
|
71
|
+
"version": { "type": "string", "pattern": "^Version [0-9]+\\.[0-9]+" },
|
|
72
|
+
"familyName": { "type": "string", "minLength": 1 },
|
|
73
|
+
"postscriptName": { "type": "string", "minLength": 1 },
|
|
74
|
+
"copyright": { "type": "string", "minLength": 1 },
|
|
75
|
+
"unitsPerEm": { "type": "integer", "minimum": 16 },
|
|
76
|
+
"ascent": { "type": "integer" },
|
|
77
|
+
"descent": { "type": "integer" },
|
|
78
|
+
"lineGap": { "type": "integer" },
|
|
79
|
+
"numGlyphs": { "type": "integer", "minimum": 1 },
|
|
80
|
+
"cmap": { "type": "string", "minLength": 1 },
|
|
81
|
+
"date": { "type": "string", "format": "date" }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"platformNotes": { "type": "string", "minLength": 1 },
|
|
85
|
+
"summary": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": ["codes", "mapped", "verified", "unmapped"],
|
|
89
|
+
"properties": {
|
|
90
|
+
"codes": { "const": 224 },
|
|
91
|
+
"mapped": { "type": "integer", "minimum": 0, "maximum": 224 },
|
|
92
|
+
"verified": { "type": "integer", "minimum": 0, "maximum": 224 },
|
|
93
|
+
"unmapped": { "type": "integer", "minimum": 0, "maximum": 224 }
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"codes": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"minItems": 224,
|
|
99
|
+
"maxItems": 224,
|
|
100
|
+
"items": { "$ref": "#/$defs/code" }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"code": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": ["code", "hex", "unicode", "installed"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"code": { "type": "integer", "minimum": 32, "maximum": 255 },
|
|
110
|
+
"hex": { "type": "string", "pattern": "^[2-9A-F][0-9A-F]$" },
|
|
111
|
+
"unicode": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/codePoints" }] },
|
|
112
|
+
"name": { "description": "The Unicode character name of the equivalent.", "type": "string", "minLength": 1 },
|
|
113
|
+
"reason": { "description": "Why the code has no Unicode equivalent (required when unicode is null).", "type": "string", "minLength": 1 },
|
|
114
|
+
"note": { "type": "string", "minLength": 1 },
|
|
115
|
+
"duplicateOf": { "description": "Another code of this family carries the same code point and owns the inverse mapping.", "type": "integer", "minimum": 32, "maximum": 255 },
|
|
116
|
+
"adobeGlyph": { "description": "Symbol only: the PostScript glyph name from Adobe's table ('(CUS)' marks a custom-encoding name).", "type": "string", "minLength": 1 },
|
|
117
|
+
"macos": {
|
|
118
|
+
"description": "Symbol only: Apple's value where it differs from the table.",
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"required": ["unicode", "note"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"unicode": { "$ref": "#/$defs/codePoints" },
|
|
124
|
+
"note": { "type": "string" }
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"installed": {
|
|
128
|
+
"description": "The glyph the verified font maps the code to, or null when the font has no glyph at U+F0xx.",
|
|
129
|
+
"oneOf": [
|
|
130
|
+
{ "type": "null" },
|
|
131
|
+
{
|
|
132
|
+
"type": "object",
|
|
133
|
+
"additionalProperties": false,
|
|
134
|
+
"required": ["glyph", "advance", "bounds"],
|
|
135
|
+
"properties": {
|
|
136
|
+
"glyph": { "type": "integer", "minimum": 1 },
|
|
137
|
+
"glyphName": { "type": "string", "minLength": 1 },
|
|
138
|
+
"advance": { "type": "integer", "minimum": 0 },
|
|
139
|
+
"bounds": {
|
|
140
|
+
"description": "[xMin, yMin, xMax, yMax] in font units, or null for an empty glyph (space).",
|
|
141
|
+
"oneOf": [
|
|
142
|
+
{ "type": "null" },
|
|
143
|
+
{ "type": "array", "minItems": 4, "maxItems": 4, "items": { "type": "integer" } }
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"if": { "properties": { "unicode": { "type": "null" } } },
|
|
152
|
+
"then": { "required": ["reason"], "properties": { "reason": { "type": "string", "minLength": 1 } } },
|
|
153
|
+
"else": { "required": ["name"], "properties": { "name": { "type": "string", "minLength": 1 } } }
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|