@readium/shared 1.3.0 → 2.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.
- package/dist/index.js +3898 -2382
- package/dist/index.umd.cjs +3 -3
- package/package.json +3 -1
- package/src/publication/AltIdentifier.ts +58 -0
- package/src/publication/Contributor.ts +15 -0
- package/src/publication/GuidedNavigation.ts +126 -15
- package/src/publication/Layout.ts +13 -0
- package/src/publication/Link.ts +7 -0
- package/src/publication/Metadata.ts +86 -9
- package/src/publication/Profiles.ts +15 -0
- package/src/publication/Properties.ts +10 -0
- package/src/publication/ReadingProgression.ts +2 -15
- package/src/publication/TDM.ts +56 -0
- package/src/publication/accessibility/Accessibility.ts +860 -0
- package/src/publication/accessibility/AccessibilityMetadataDisplayGuide.ts +1055 -0
- package/src/publication/accessibility/Localization.md +203 -0
- package/src/publication/accessibility/Localization.ts +115 -0
- package/src/publication/accessibility/index.ts +3 -0
- package/src/publication/accessibility/locales/en.json +231 -0
- package/src/publication/accessibility/locales/fr.json +231 -0
- package/src/publication/epub/MediaOverlay.ts +43 -0
- package/src/publication/epub/Metadata.ts +16 -0
- package/src/publication/epub/Properties.ts +0 -10
- package/src/publication/epub/index.ts +2 -2
- package/src/publication/index.ts +5 -1
- package/src/util/JSONParse.ts +3 -3
- package/types/src/publication/AltIdentifier.d.ts +23 -0
- package/types/src/publication/Contributor.d.ts +4 -0
- package/types/src/publication/GuidedNavigation.d.ts +62 -9
- package/types/src/publication/Layout.d.ts +8 -0
- package/types/src/publication/Link.d.ts +3 -0
- package/types/src/publication/Metadata.d.ts +28 -2
- package/types/src/publication/Profiles.d.ts +10 -0
- package/types/src/publication/Properties.d.ts +6 -0
- package/types/src/publication/ReadingProgression.d.ts +2 -5
- package/types/src/publication/TDM.d.ts +30 -0
- package/types/src/publication/accessibility/Accessibility.d.ts +337 -16
- package/types/src/publication/accessibility/AccessibilityMetadataDisplayGuide.d.ts +22 -25
- package/types/src/publication/accessibility/Localization.d.ts +45 -0
- package/types/src/publication/accessibility/index.d.ts +1 -0
- package/types/src/publication/epub/MediaOverlay.d.ts +19 -0
- package/types/src/publication/epub/Metadata.d.ts +6 -0
- package/types/src/publication/epub/Properties.d.ts +1 -5
- package/types/src/publication/epub/index.d.ts +2 -2
- package/types/src/publication/index.d.ts +5 -1
- package/types/src/util/JSONParse.d.ts +2 -2
- package/src/publication/epub/EPUBLayout.ts +0 -10
- package/src/publication/epub/Presentation.ts +0 -16
- package/src/publication/presentation/Metadata.ts +0 -19
- package/src/publication/presentation/Presentation.ts +0 -155
- package/src/publication/presentation/Properties.ts +0 -70
- package/src/publication/presentation/index.ts +0 -3
- package/types/src/publication/accessibility/AccessibilityDisplayString.d.ts +0 -56
- package/types/src/publication/epub/EPUBLayout.d.ts +0 -5
- package/types/src/publication/epub/Presentation.d.ts +0 -7
- package/types/src/publication/presentation/Metadata.d.ts +0 -6
- package/types/src/publication/presentation/Presentation.d.ts +0 -95
- package/types/src/publication/presentation/Properties.d.ts +0 -32
- package/types/src/publication/presentation/index.d.ts +0 -3
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://readium.org/webpub-manifest/contexts/default/#text-and-data-mining
|
|
3
|
+
*/
|
|
4
|
+
export declare enum TDMReservation {
|
|
5
|
+
all = "all",
|
|
6
|
+
none = "none"
|
|
7
|
+
}
|
|
8
|
+
export declare class TDM {
|
|
9
|
+
/**
|
|
10
|
+
* Indicates whether the publication allows text and data mining.
|
|
11
|
+
*/
|
|
12
|
+
readonly reservation?: TDMReservation;
|
|
13
|
+
/**
|
|
14
|
+
* Additional policy information about text and data mining usage.
|
|
15
|
+
*/
|
|
16
|
+
readonly policy?: string;
|
|
17
|
+
/** Creates a [TDM] object */
|
|
18
|
+
constructor(values: {
|
|
19
|
+
reservation?: TDMReservation;
|
|
20
|
+
policy?: string;
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Parses a [TDM] from its RWPM JSON representation.
|
|
24
|
+
*/
|
|
25
|
+
static deserialize(json: any): TDM | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Serializes a [TDM] to its RWPM JSON representation.
|
|
28
|
+
*/
|
|
29
|
+
serialize(): any;
|
|
30
|
+
}
|
|
@@ -8,7 +8,7 @@ export declare class Accessibility {
|
|
|
8
8
|
/**
|
|
9
9
|
* An established standard to which the described resource conforms.
|
|
10
10
|
*/
|
|
11
|
-
conformsTo:
|
|
11
|
+
conformsTo: AccessibilityProfile[];
|
|
12
12
|
/**
|
|
13
13
|
* Certification of accessible publications.
|
|
14
14
|
*/
|
|
@@ -38,7 +38,7 @@ export declare class Accessibility {
|
|
|
38
38
|
*/
|
|
39
39
|
exemption: Exemption[];
|
|
40
40
|
constructor(values?: {
|
|
41
|
-
conformsTo?:
|
|
41
|
+
conformsTo?: AccessibilityProfile[];
|
|
42
42
|
certification?: Certification | null;
|
|
43
43
|
summary?: string | null;
|
|
44
44
|
accessMode?: AccessMode[];
|
|
@@ -56,25 +56,76 @@ export declare class Accessibility {
|
|
|
56
56
|
*/
|
|
57
57
|
serialize(): Record<string, any>;
|
|
58
58
|
}
|
|
59
|
-
export declare class
|
|
59
|
+
export declare class AccessibilityProfile {
|
|
60
60
|
readonly uri: string;
|
|
61
61
|
constructor(uri: string);
|
|
62
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Parses an [AccessibilityProfile] from its RWPM JSON representation.
|
|
64
|
+
*/
|
|
65
|
+
static deserialize(json: any): AccessibilityProfile | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Serializes an [AccessibilityProfile] to its RWPM JSON representation.
|
|
68
|
+
*/
|
|
63
69
|
serialize(): any;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
static readonly
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
static readonly
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
static readonly
|
|
70
|
+
/**
|
|
71
|
+
* EPUB Accessibility 1.0 WCAG 2.0 A – http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-a
|
|
72
|
+
*/
|
|
73
|
+
static readonly EPUB_A11Y_10_WCAG_20_A: AccessibilityProfile;
|
|
74
|
+
/**
|
|
75
|
+
* EPUB Accessibility 1.0 WCAG 2.0 AA – http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa
|
|
76
|
+
*/
|
|
77
|
+
static readonly EPUB_A11Y_10_WCAG_20_AA: AccessibilityProfile;
|
|
78
|
+
/**
|
|
79
|
+
* EPUB Accessibility 1.0 WCAG 2.0 AAA – http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aaa
|
|
80
|
+
*/
|
|
81
|
+
static readonly EPUB_A11Y_10_WCAG_20_AAA: AccessibilityProfile;
|
|
82
|
+
/**
|
|
83
|
+
* EPUB Accessibility 1.1 WCAG 2.0 A – https://www.w3.org/TR/epub-a11y-11#wcag-2.0-a
|
|
84
|
+
*/
|
|
85
|
+
static readonly EPUB_A11Y_11_WCAG_20_A: AccessibilityProfile;
|
|
86
|
+
/**
|
|
87
|
+
* EPUB Accessibility 1.1 WCAG 2.0 AA – https://www.w3.org/TR/epub-a11y-11#wcag-2.0-aa
|
|
88
|
+
*/
|
|
89
|
+
static readonly EPUB_A11Y_11_WCAG_20_AA: AccessibilityProfile;
|
|
90
|
+
/**
|
|
91
|
+
* EPUB Accessibility 1.1 WCAG 2.0 AAA – https://www.w3.org/TR/epub-a11y-11#wcag-2.0-aaa
|
|
92
|
+
*/
|
|
93
|
+
static readonly EPUB_A11Y_11_WCAG_20_AAA: AccessibilityProfile;
|
|
94
|
+
/**
|
|
95
|
+
* EPUB Accessibility 1.1 WCAG 2.1 A – https://www.w3.org/TR/epub-a11y-11#wcag-2.1-a
|
|
96
|
+
*/
|
|
97
|
+
static readonly EPUB_A11Y_11_WCAG_21_A: AccessibilityProfile;
|
|
98
|
+
/**
|
|
99
|
+
* EPUB Accessibility 1.1 WCAG 2.1 AA – https://www.w3.org/TR/epub-a11y-11#wcag-2.1-aa
|
|
100
|
+
*/
|
|
101
|
+
static readonly EPUB_A11Y_11_WCAG_21_AA: AccessibilityProfile;
|
|
102
|
+
/**
|
|
103
|
+
* EPUB Accessibility 1.1 WCAG 2.1 AAA – https://www.w3.org/TR/epub-a11y-11#wcag-2.1-aaa
|
|
104
|
+
*/
|
|
105
|
+
static readonly EPUB_A11Y_11_WCAG_21_AAA: AccessibilityProfile;
|
|
106
|
+
/**
|
|
107
|
+
* EPUB Accessibility 1.1 WCAG 2.2 A – https://www.w3.org/TR/epub-a11y-11#wcag-2.2-a
|
|
108
|
+
*/
|
|
109
|
+
static readonly EPUB_A11Y_11_WCAG_22_A: AccessibilityProfile;
|
|
110
|
+
/**
|
|
111
|
+
* EPUB Accessibility 1.1 WCAG 2.2 AA – https://www.w3.org/TR/epub-a11y-11#wcag-2.2-aa
|
|
112
|
+
*/
|
|
113
|
+
static readonly EPUB_A11Y_11_WCAG_22_AA: AccessibilityProfile;
|
|
114
|
+
/**
|
|
115
|
+
* EPUB Accessibility 1.1 WCAG 2.2 AAA – https://www.w3.org/TR/epub-a11y-11#wcag-2.2-aaa
|
|
116
|
+
*/
|
|
117
|
+
static readonly EPUB_A11Y_11_WCAG_22_AAA: AccessibilityProfile;
|
|
118
|
+
/**
|
|
119
|
+
* Returns true if the profile is a WCAG Level A profile.
|
|
120
|
+
*/
|
|
76
121
|
get isWCAGLevelA(): boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Returns true if the profile is a WCAG Level AA profile.
|
|
124
|
+
*/
|
|
77
125
|
get isWCAGLevelAA(): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Returns true if the profile is a WCAG Level AAA profile.
|
|
128
|
+
*/
|
|
78
129
|
get isWCAGLevelAAA(): boolean;
|
|
79
130
|
}
|
|
80
131
|
export declare class Certification {
|
|
@@ -82,115 +133,385 @@ export declare class Certification {
|
|
|
82
133
|
readonly credential: string | null;
|
|
83
134
|
readonly report: string | null;
|
|
84
135
|
constructor(certifiedBy?: string | null, credential?: string | null, report?: string | null);
|
|
136
|
+
/**
|
|
137
|
+
* Parses a [Certification] from its RWPM JSON representation.
|
|
138
|
+
*/
|
|
85
139
|
static deserialize(json: any): Certification | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* Serializes a [Certification] to its RWPM JSON representation.
|
|
142
|
+
*/
|
|
86
143
|
serialize(): Record<string, any>;
|
|
87
144
|
}
|
|
88
145
|
export declare class AccessMode {
|
|
89
146
|
readonly value: string;
|
|
90
147
|
constructor(value: string);
|
|
148
|
+
/**
|
|
149
|
+
* Parses an [AccessMode] from its RWPM JSON representation.
|
|
150
|
+
*/
|
|
91
151
|
static deserialize(json: any): AccessMode | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Serializes an [AccessMode] to its RWPM JSON representation.
|
|
154
|
+
*/
|
|
92
155
|
serialize(): any;
|
|
156
|
+
/**
|
|
157
|
+
* Access mode for auditory content.
|
|
158
|
+
*/
|
|
93
159
|
static readonly AUDITORY: AccessMode;
|
|
160
|
+
/**
|
|
161
|
+
* Access mode for chart on visual content.
|
|
162
|
+
*/
|
|
94
163
|
static readonly CHART_ON_VISUAL: AccessMode;
|
|
164
|
+
/**
|
|
165
|
+
* Access mode for chemical on visual content.
|
|
166
|
+
*/
|
|
95
167
|
static readonly CHEM_ON_VISUAL: AccessMode;
|
|
168
|
+
/**
|
|
169
|
+
* Access mode for color dependent content.
|
|
170
|
+
*/
|
|
96
171
|
static readonly COLOR_DEPENDENT: AccessMode;
|
|
172
|
+
/**
|
|
173
|
+
* Access mode for diagram on visual content.
|
|
174
|
+
*/
|
|
97
175
|
static readonly DIAGRAM_ON_VISUAL: AccessMode;
|
|
176
|
+
/**
|
|
177
|
+
* Access mode for math on visual content.
|
|
178
|
+
*/
|
|
98
179
|
static readonly MATH_ON_VISUAL: AccessMode;
|
|
180
|
+
/**
|
|
181
|
+
* Access mode for music on visual content.
|
|
182
|
+
*/
|
|
99
183
|
static readonly MUSIC_ON_VISUAL: AccessMode;
|
|
184
|
+
/**
|
|
185
|
+
* Access mode for tactile content.
|
|
186
|
+
*/
|
|
100
187
|
static readonly TACTILE: AccessMode;
|
|
188
|
+
/**
|
|
189
|
+
* Access mode for text on visual content.
|
|
190
|
+
*/
|
|
101
191
|
static readonly TEXT_ON_VISUAL: AccessMode;
|
|
192
|
+
/**
|
|
193
|
+
* Access mode for textual content.
|
|
194
|
+
*/
|
|
102
195
|
static readonly TEXTUAL: AccessMode;
|
|
196
|
+
/**
|
|
197
|
+
* Access mode for visual content.
|
|
198
|
+
*/
|
|
103
199
|
static readonly VISUAL: AccessMode;
|
|
104
200
|
}
|
|
105
201
|
export declare class PrimaryAccessMode {
|
|
106
202
|
readonly value: string | string[];
|
|
107
203
|
private static readonly VALID_MODES;
|
|
108
204
|
constructor(value: string | string[]);
|
|
205
|
+
/**
|
|
206
|
+
* Parses a [PrimaryAccessMode] from its RWPM JSON representation.
|
|
207
|
+
*/
|
|
109
208
|
static deserialize(json: any): PrimaryAccessMode | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Serializes a [PrimaryAccessMode] to its RWPM JSON representation.
|
|
211
|
+
*/
|
|
110
212
|
serialize(): string | string[];
|
|
213
|
+
/**
|
|
214
|
+
* Primary access mode for auditory content.
|
|
215
|
+
*/
|
|
111
216
|
static readonly AUDITORY: PrimaryAccessMode;
|
|
217
|
+
/**
|
|
218
|
+
* Primary access mode for tactile content.
|
|
219
|
+
*/
|
|
112
220
|
static readonly TACTILE: PrimaryAccessMode;
|
|
221
|
+
/**
|
|
222
|
+
* Primary access mode for textual content.
|
|
223
|
+
*/
|
|
113
224
|
static readonly TEXTUAL: PrimaryAccessMode;
|
|
225
|
+
/**
|
|
226
|
+
* Primary access mode for visual content.
|
|
227
|
+
*/
|
|
114
228
|
static readonly VISUAL: PrimaryAccessMode;
|
|
115
229
|
}
|
|
116
230
|
export declare class Feature {
|
|
117
231
|
readonly value: string;
|
|
118
232
|
constructor(value: string);
|
|
233
|
+
/**
|
|
234
|
+
* Parses a [Feature] from its RWPM JSON representation.
|
|
235
|
+
*/
|
|
119
236
|
static deserialize(json: any): Feature | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* Serializes a [Feature] to its RWPM JSON representation.
|
|
239
|
+
*/
|
|
120
240
|
serialize(): any;
|
|
241
|
+
/**
|
|
242
|
+
* Feature for no accessibility features.
|
|
243
|
+
*/
|
|
121
244
|
static readonly NONE: Feature;
|
|
245
|
+
/**
|
|
246
|
+
* Feature for annotations.
|
|
247
|
+
*/
|
|
122
248
|
static readonly ANNOTATIONS: Feature;
|
|
249
|
+
/**
|
|
250
|
+
* Feature for ARIA.
|
|
251
|
+
*/
|
|
123
252
|
static readonly ARIA: Feature;
|
|
253
|
+
/**
|
|
254
|
+
* Feature for index.
|
|
255
|
+
*/
|
|
124
256
|
static readonly INDEX: Feature;
|
|
257
|
+
/**
|
|
258
|
+
* Feature for page break markers.
|
|
259
|
+
*/
|
|
125
260
|
static readonly PAGE_BREAK_MARKERS: Feature;
|
|
261
|
+
/**
|
|
262
|
+
* Feature for page navigation.
|
|
263
|
+
*/
|
|
126
264
|
static readonly PAGE_NAVIGATION: Feature;
|
|
265
|
+
/**
|
|
266
|
+
* Feature for print page numbers.
|
|
267
|
+
*/
|
|
127
268
|
static readonly PRINT_PAGE_NUMBERS: Feature;
|
|
269
|
+
/**
|
|
270
|
+
* Feature for reading order.
|
|
271
|
+
*/
|
|
128
272
|
static readonly READING_ORDER: Feature;
|
|
273
|
+
/**
|
|
274
|
+
* Feature for structural navigation.
|
|
275
|
+
*/
|
|
129
276
|
static readonly STRUCTURAL_NAVIGATION: Feature;
|
|
277
|
+
/**
|
|
278
|
+
* Feature for table of contents.
|
|
279
|
+
*/
|
|
130
280
|
static readonly TABLE_OF_CONTENTS: Feature;
|
|
281
|
+
/**
|
|
282
|
+
* Feature for tagged PDF.
|
|
283
|
+
*/
|
|
131
284
|
static readonly TAGGED_PDF: Feature;
|
|
285
|
+
/**
|
|
286
|
+
* Feature for alternative text.
|
|
287
|
+
*/
|
|
132
288
|
static readonly ALTERNATIVE_TEXT: Feature;
|
|
289
|
+
/**
|
|
290
|
+
* Feature for audio description.
|
|
291
|
+
*/
|
|
133
292
|
static readonly AUDIO_DESCRIPTION: Feature;
|
|
293
|
+
/**
|
|
294
|
+
* Feature for captions.
|
|
295
|
+
*/
|
|
134
296
|
static readonly CAPTIONS: Feature;
|
|
297
|
+
/**
|
|
298
|
+
* Feature for closed captions.
|
|
299
|
+
*/
|
|
135
300
|
static readonly CLOSED_CAPTIONS: Feature;
|
|
301
|
+
/**
|
|
302
|
+
* Feature for described math.
|
|
303
|
+
*/
|
|
136
304
|
static readonly DESCRIBED_MATH: Feature;
|
|
305
|
+
/**
|
|
306
|
+
* Feature for long description.
|
|
307
|
+
*/
|
|
137
308
|
static readonly LONG_DESCRIPTION: Feature;
|
|
309
|
+
/**
|
|
310
|
+
* Feature for open captions.
|
|
311
|
+
*/
|
|
138
312
|
static readonly OPEN_CAPTIONS: Feature;
|
|
313
|
+
/**
|
|
314
|
+
* Feature for sign language.
|
|
315
|
+
*/
|
|
139
316
|
static readonly SIGN_LANGUAGE: Feature;
|
|
317
|
+
/**
|
|
318
|
+
* Feature for transcript.
|
|
319
|
+
*/
|
|
140
320
|
static readonly TRANSCRIPT: Feature;
|
|
321
|
+
/**
|
|
322
|
+
* Feature for display transformability.
|
|
323
|
+
*/
|
|
141
324
|
static readonly DISPLAY_TRANSFORMABILITY: Feature;
|
|
325
|
+
/**
|
|
326
|
+
* Feature for synchronized audio text.
|
|
327
|
+
*/
|
|
142
328
|
static readonly SYNCHRONIZED_AUDIO_TEXT: Feature;
|
|
329
|
+
/**
|
|
330
|
+
* Feature for timing control.
|
|
331
|
+
*/
|
|
143
332
|
static readonly TIMING_CONTROL: Feature;
|
|
333
|
+
/**
|
|
334
|
+
* Feature for unlocked.
|
|
335
|
+
*/
|
|
144
336
|
static readonly UNLOCKED: Feature;
|
|
337
|
+
/**
|
|
338
|
+
* Feature for ChemML.
|
|
339
|
+
*/
|
|
145
340
|
static readonly CHEM_ML: Feature;
|
|
341
|
+
/**
|
|
342
|
+
* Feature for LaTeX.
|
|
343
|
+
*/
|
|
146
344
|
static readonly LATEX: Feature;
|
|
345
|
+
/**
|
|
346
|
+
* Feature for LaTeX chemistry.
|
|
347
|
+
*/
|
|
147
348
|
static readonly LATEX_CHEMISTRY: Feature;
|
|
349
|
+
/**
|
|
350
|
+
* Feature for MathML.
|
|
351
|
+
*/
|
|
148
352
|
static readonly MATH_ML: Feature;
|
|
353
|
+
/**
|
|
354
|
+
* Feature for MathML chemistry.
|
|
355
|
+
*/
|
|
149
356
|
static readonly MATH_ML_CHEMISTRY: Feature;
|
|
357
|
+
/**
|
|
358
|
+
* Feature for TTS markup.
|
|
359
|
+
*/
|
|
150
360
|
static readonly TTS_MARKUP: Feature;
|
|
361
|
+
/**
|
|
362
|
+
* Feature for high contrast audio.
|
|
363
|
+
*/
|
|
151
364
|
static readonly HIGH_CONTRAST_AUDIO: Feature;
|
|
365
|
+
/**
|
|
366
|
+
* Feature for high contrast display.
|
|
367
|
+
*/
|
|
152
368
|
static readonly HIGH_CONTRAST_DISPLAY: Feature;
|
|
369
|
+
/**
|
|
370
|
+
* Feature for large print.
|
|
371
|
+
*/
|
|
153
372
|
static readonly LARGE_PRINT: Feature;
|
|
373
|
+
/**
|
|
374
|
+
* Feature for braille.
|
|
375
|
+
*/
|
|
154
376
|
static readonly BRAILLE: Feature;
|
|
377
|
+
/**
|
|
378
|
+
* Feature for tactile graphic.
|
|
379
|
+
*/
|
|
155
380
|
static readonly TACTILE_GRAPHIC: Feature;
|
|
381
|
+
/**
|
|
382
|
+
* Feature for tactile object.
|
|
383
|
+
*/
|
|
156
384
|
static readonly TACTILE_OBJECT: Feature;
|
|
385
|
+
/**
|
|
386
|
+
* Feature for full ruby annotations.
|
|
387
|
+
*/
|
|
157
388
|
static readonly FULL_RUBY_ANNOTATIONS: Feature;
|
|
389
|
+
/**
|
|
390
|
+
* Feature for horizontal writing.
|
|
391
|
+
*/
|
|
158
392
|
static readonly HORIZONTAL_WRITING: Feature;
|
|
393
|
+
/**
|
|
394
|
+
* Feature for ruby annotations.
|
|
395
|
+
*/
|
|
159
396
|
static readonly RUBY_ANNOTATIONS: Feature;
|
|
397
|
+
/**
|
|
398
|
+
* Feature for vertical writing.
|
|
399
|
+
*/
|
|
160
400
|
static readonly VERTICAL_WRITING: Feature;
|
|
401
|
+
/**
|
|
402
|
+
* Feature for additional word segmentation.
|
|
403
|
+
*/
|
|
161
404
|
static readonly WITH_ADDITIONAL_WORD_SEGMENTATION: Feature;
|
|
405
|
+
/**
|
|
406
|
+
* Feature for lack of additional word segmentation.
|
|
407
|
+
*/
|
|
162
408
|
static readonly WITHOUT_ADDITIONAL_WORD_SEGMENTATION: Feature;
|
|
163
409
|
}
|
|
164
410
|
export declare class Hazard {
|
|
165
411
|
readonly value: string;
|
|
166
412
|
constructor(value: string);
|
|
413
|
+
/**
|
|
414
|
+
* Parses a [Hazard] from its RWPM JSON representation.
|
|
415
|
+
*/
|
|
167
416
|
static deserialize(json: any): Hazard | undefined;
|
|
417
|
+
/**
|
|
418
|
+
* Serializes a [Hazard] to its RWPM JSON representation.
|
|
419
|
+
*/
|
|
168
420
|
serialize(): any;
|
|
421
|
+
/**
|
|
422
|
+
* Hazard for flashing.
|
|
423
|
+
*/
|
|
169
424
|
static readonly FLASHING: Hazard;
|
|
425
|
+
/**
|
|
426
|
+
* Hazard for no flashing hazard.
|
|
427
|
+
*/
|
|
170
428
|
static readonly NO_FLASHING_HAZARD: Hazard;
|
|
429
|
+
/**
|
|
430
|
+
* Hazard for unknown flashing hazard.
|
|
431
|
+
*/
|
|
171
432
|
static readonly UNKNOWN_FLASHING_HAZARD: Hazard;
|
|
433
|
+
/**
|
|
434
|
+
* Hazard for motion simulation.
|
|
435
|
+
*/
|
|
172
436
|
static readonly MOTION_SIMULATION: Hazard;
|
|
437
|
+
/**
|
|
438
|
+
* Hazard for no motion simulation hazard.
|
|
439
|
+
*/
|
|
173
440
|
static readonly NO_MOTION_SIMULATION_HAZARD: Hazard;
|
|
441
|
+
/**
|
|
442
|
+
* Hazard for unknown motion simulation hazard.
|
|
443
|
+
*/
|
|
174
444
|
static readonly UNKNOWN_MOTION_SIMULATION_HAZARD: Hazard;
|
|
445
|
+
/**
|
|
446
|
+
* Hazard for sound.
|
|
447
|
+
*/
|
|
175
448
|
static readonly SOUND: Hazard;
|
|
449
|
+
/**
|
|
450
|
+
* Hazard for no sound hazard.
|
|
451
|
+
*/
|
|
176
452
|
static readonly NO_SOUND_HAZARD: Hazard;
|
|
453
|
+
/**
|
|
454
|
+
* Hazard for unknown sound hazard.
|
|
455
|
+
*/
|
|
177
456
|
static readonly UNKNOWN_SOUND_HAZARD: Hazard;
|
|
457
|
+
/**
|
|
458
|
+
* Hazard for unknown hazard.
|
|
459
|
+
*/
|
|
178
460
|
static readonly UNKNOWN: Hazard;
|
|
461
|
+
/**
|
|
462
|
+
* Hazard for no hazard.
|
|
463
|
+
*/
|
|
179
464
|
static readonly NONE: Hazard;
|
|
180
465
|
}
|
|
181
466
|
export declare class Exemption {
|
|
182
467
|
readonly value: string;
|
|
183
468
|
constructor(value: string);
|
|
469
|
+
/**
|
|
470
|
+
* Parses an [Exemption] from its RWPM JSON representation.
|
|
471
|
+
*/
|
|
184
472
|
static deserialize(json: any): Exemption | undefined;
|
|
473
|
+
/**
|
|
474
|
+
* Serializes an [Exemption] to its RWPM JSON representation.
|
|
475
|
+
*/
|
|
185
476
|
serialize(): any;
|
|
477
|
+
/**
|
|
478
|
+
* None exemption.
|
|
479
|
+
*/
|
|
186
480
|
static readonly NONE: Exemption;
|
|
481
|
+
/**
|
|
482
|
+
* Documented exemption.
|
|
483
|
+
*/
|
|
187
484
|
static readonly DOCUMENTED: Exemption;
|
|
485
|
+
/**
|
|
486
|
+
* Legal exemption.
|
|
487
|
+
*/
|
|
188
488
|
static readonly LEGAL: Exemption;
|
|
489
|
+
/**
|
|
490
|
+
* Temporary exemption.
|
|
491
|
+
*/
|
|
189
492
|
static readonly TEMPORARY: Exemption;
|
|
493
|
+
/**
|
|
494
|
+
* Technical exemption.
|
|
495
|
+
*/
|
|
190
496
|
static readonly TECHNICAL: Exemption;
|
|
497
|
+
/**
|
|
498
|
+
* EAA disproportionate burden exemption.
|
|
499
|
+
*/
|
|
191
500
|
static readonly EAA_DISPROPORTIONATE_BURDEN: Exemption;
|
|
501
|
+
/**
|
|
502
|
+
* EAA fundamental alteration exemption.
|
|
503
|
+
*/
|
|
192
504
|
static readonly EAA_FUNDAMENTAL_ALTERATION: Exemption;
|
|
505
|
+
/**
|
|
506
|
+
* EAA microenterprise exemption.
|
|
507
|
+
*/
|
|
193
508
|
static readonly EAA_MICROENTERPRISE: Exemption;
|
|
509
|
+
/**
|
|
510
|
+
* EAA technical impossibility exemption.
|
|
511
|
+
*/
|
|
194
512
|
static readonly EAA_TECHNICAL_IMPOSSIBILITY: Exemption;
|
|
513
|
+
/**
|
|
514
|
+
* EAA temporary exemption.
|
|
515
|
+
*/
|
|
195
516
|
static readonly EAA_TEMPORARY: Exemption;
|
|
196
517
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Publication } from '../Publication';
|
|
2
|
-
import {
|
|
3
|
-
import { Profile } from './Accessibility';
|
|
2
|
+
import { AccessibilityProfile } from './Accessibility';
|
|
4
3
|
/**
|
|
5
4
|
* Represents a single accessibility claim
|
|
6
5
|
*/
|
|
7
6
|
export interface AccessibilityDisplayStatement {
|
|
8
7
|
id: string;
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
compactString?: string;
|
|
9
|
+
descriptiveString?: string;
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
13
12
|
* Represents a collection of related accessibility claims which should be
|
|
@@ -51,8 +50,8 @@ export declare enum PrerecordedAudio {
|
|
|
51
50
|
* access.
|
|
52
51
|
*/
|
|
53
52
|
export declare class WaysOfReading implements AccessibilityDisplayField {
|
|
54
|
-
readonly id =
|
|
55
|
-
readonly title
|
|
53
|
+
readonly id = "ways-of-reading.title";
|
|
54
|
+
readonly title: string;
|
|
56
55
|
readonly shouldDisplay: boolean;
|
|
57
56
|
readonly visualAdjustments: VisualAdjustments;
|
|
58
57
|
readonly nonvisualReading: NonvisualReading;
|
|
@@ -66,8 +65,8 @@ export declare class WaysOfReading implements AccessibilityDisplayField {
|
|
|
66
65
|
* Navigation features of the content
|
|
67
66
|
*/
|
|
68
67
|
export declare class Navigation implements AccessibilityDisplayField {
|
|
69
|
-
readonly id =
|
|
70
|
-
readonly title
|
|
68
|
+
readonly id = "navigation.title";
|
|
69
|
+
readonly title: string;
|
|
71
70
|
readonly shouldDisplay: boolean;
|
|
72
71
|
readonly noMetadata: boolean;
|
|
73
72
|
readonly tableOfContents: boolean;
|
|
@@ -95,8 +94,8 @@ export declare enum RichContentType {
|
|
|
95
94
|
* Rich content features of the content
|
|
96
95
|
*/
|
|
97
96
|
export declare class RichContent implements AccessibilityDisplayField {
|
|
98
|
-
readonly id =
|
|
99
|
-
readonly title
|
|
97
|
+
readonly id = "rich-content.title";
|
|
98
|
+
readonly title: string;
|
|
100
99
|
readonly shouldDisplay: boolean;
|
|
101
100
|
readonly noMetadata: boolean;
|
|
102
101
|
readonly extendedAltTextDescriptions: boolean;
|
|
@@ -116,8 +115,8 @@ export declare class RichContent implements AccessibilityDisplayField {
|
|
|
116
115
|
* Represents additional accessibility information
|
|
117
116
|
*/
|
|
118
117
|
export declare class AdditionalInformation implements AccessibilityDisplayField {
|
|
119
|
-
readonly id =
|
|
120
|
-
readonly title
|
|
118
|
+
readonly id = "additional-accessibility-information.title";
|
|
119
|
+
readonly title: string;
|
|
121
120
|
readonly shouldDisplay: boolean;
|
|
122
121
|
readonly noMetadata: boolean;
|
|
123
122
|
readonly pageBreakMarkers: boolean;
|
|
@@ -147,8 +146,8 @@ export declare enum HazardType {
|
|
|
147
146
|
* Represents potential hazards in the content
|
|
148
147
|
*/
|
|
149
148
|
export declare class Hazards implements AccessibilityDisplayField {
|
|
150
|
-
readonly id =
|
|
151
|
-
readonly title
|
|
149
|
+
readonly id = "hazards.title";
|
|
150
|
+
readonly title: string;
|
|
152
151
|
readonly shouldDisplay: boolean;
|
|
153
152
|
readonly noMetadata: boolean;
|
|
154
153
|
readonly noHazards: boolean;
|
|
@@ -164,22 +163,21 @@ export declare class Hazards implements AccessibilityDisplayField {
|
|
|
164
163
|
* Represents conformance to accessibility standards
|
|
165
164
|
*/
|
|
166
165
|
export declare class Conformance implements AccessibilityDisplayField {
|
|
167
|
-
readonly id =
|
|
168
|
-
readonly title
|
|
166
|
+
readonly id = "conformance.title";
|
|
167
|
+
readonly title: string;
|
|
169
168
|
readonly shouldDisplay: boolean;
|
|
170
|
-
readonly profiles:
|
|
169
|
+
readonly profiles: AccessibilityProfile[];
|
|
171
170
|
readonly statements: AccessibilityDisplayStatement[];
|
|
172
171
|
private constructor();
|
|
173
172
|
static fromPublication(publication: Publication): Conformance;
|
|
174
173
|
}
|
|
175
174
|
/**
|
|
176
|
-
* Represents legal exemptions
|
|
177
|
-
*/
|
|
175
|
+
* Represents legal exemptions
|
|
176
|
+
*/
|
|
178
177
|
export declare class Legal implements AccessibilityDisplayField {
|
|
179
|
-
readonly id =
|
|
180
|
-
readonly title
|
|
178
|
+
readonly id = "legal-considerations.title";
|
|
179
|
+
readonly title: string;
|
|
181
180
|
readonly shouldDisplay: boolean;
|
|
182
|
-
readonly noMetadata: boolean;
|
|
183
181
|
readonly exemption: boolean;
|
|
184
182
|
readonly statements: AccessibilityDisplayStatement[];
|
|
185
183
|
private constructor();
|
|
@@ -189,10 +187,9 @@ export declare class Legal implements AccessibilityDisplayField {
|
|
|
189
187
|
* Represents the accessibility summary
|
|
190
188
|
*/
|
|
191
189
|
export declare class AccessibilitySummary implements AccessibilityDisplayField {
|
|
192
|
-
readonly id =
|
|
193
|
-
readonly title
|
|
190
|
+
readonly id = "accessibility-summary.title";
|
|
191
|
+
readonly title: string;
|
|
194
192
|
readonly shouldDisplay: boolean;
|
|
195
|
-
readonly hasSummary: boolean;
|
|
196
193
|
readonly statements: AccessibilityDisplayStatement[];
|
|
197
194
|
private constructor();
|
|
198
195
|
static fromPublication(publication: Publication): AccessibilitySummary;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface L10nString {
|
|
2
|
+
compact: string;
|
|
3
|
+
descriptive: string;
|
|
4
|
+
}
|
|
5
|
+
type LocaleData = Record<string, any>;
|
|
6
|
+
declare class LocalizationImpl {
|
|
7
|
+
private static instance;
|
|
8
|
+
private currentLocaleCode;
|
|
9
|
+
private locale;
|
|
10
|
+
private availableLocales;
|
|
11
|
+
private constructor();
|
|
12
|
+
static getInstance(): LocalizationImpl;
|
|
13
|
+
/**
|
|
14
|
+
* Registers a new locale or updates an existing one
|
|
15
|
+
* @param localeCode BCP 47 language code (e.g., 'en', 'fr-FR')
|
|
16
|
+
* @param localeData The locale data to register
|
|
17
|
+
*/
|
|
18
|
+
registerLocale(localeCode: string, localeData: LocaleData): void;
|
|
19
|
+
/**
|
|
20
|
+
* Sets the current locale by language code
|
|
21
|
+
* @param localeCode BCP 47 language code (e.g., 'en', 'fr-FR')
|
|
22
|
+
* @returns boolean indicating if the locale was set successfully
|
|
23
|
+
*/
|
|
24
|
+
setLocale(localeCode: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the current locale code (BCP 47)
|
|
27
|
+
*/
|
|
28
|
+
getCurrentLocale(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Gets a list of available locale codes
|
|
31
|
+
*/
|
|
32
|
+
getAvailableLocales(): string[];
|
|
33
|
+
private getNestedValue;
|
|
34
|
+
/**
|
|
35
|
+
* Gets a localized string by key
|
|
36
|
+
* @param key The key for the string to retrieve
|
|
37
|
+
* @returns The localized string as a [L10nString], or an empty string if not found
|
|
38
|
+
*/
|
|
39
|
+
getString(key: string): L10nString;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The singleton instance of the [Localization] class.
|
|
43
|
+
*/
|
|
44
|
+
export declare const Localization: LocalizationImpl;
|
|
45
|
+
export {};
|