@readium/shared 2.2.2 → 2.3.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 +8 -7
- package/dist/_virtual/preload-helper.js +1 -0
- package/dist/fetcher/Fetcher.js +1 -0
- package/dist/fetcher/HttpFetcher.js +1 -0
- package/dist/fetcher/Resource.js +1 -0
- package/dist/index.js +1 -4972
- package/dist/locales/publication-metadata/ar.json.js +1 -0
- package/dist/locales/publication-metadata/da.json.js +1 -0
- package/dist/locales/publication-metadata/el.json.js +1 -0
- package/dist/locales/publication-metadata/en.json.js +1 -0
- package/dist/locales/publication-metadata/es.json.js +1 -0
- package/dist/locales/publication-metadata/et.json.js +1 -0
- package/dist/locales/publication-metadata/fi.json.js +1 -0
- package/dist/locales/publication-metadata/fr.json.js +1 -0
- package/dist/locales/publication-metadata/it.json.js +1 -0
- package/dist/locales/publication-metadata/pl.json.js +1 -0
- package/dist/locales/publication-metadata/pt_PT.json.js +1 -0
- package/dist/locales/publication-metadata/sv.json.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/constants.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/index.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/selector-attribute.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/selector-class.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/selector-fallback.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/selector-id.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/selector-nth-child.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/selector-nth-of-type.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/selector-tag.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/types.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/utilities-cartesian.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/utilities-data.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/utilities-dom.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/utilities-element-data.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/utilities-iselement.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/utilities-messages.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/utilities-options.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/utilities-powerset.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/utilities-selectors.js +1 -0
- package/dist/node_modules/.pnpm/css-selector-generator@3.8.0/node_modules/css-selector-generator/esm/utilities-typescript.js +1 -0
- package/dist/opds/Acquisition.js +1 -0
- package/dist/opds/Availability.js +1 -0
- package/dist/opds/Copies.js +1 -0
- package/dist/opds/Holds.js +1 -0
- package/dist/opds/Price.js +1 -0
- package/dist/publication/AltIdentifier.js +1 -0
- package/dist/publication/BelongsTo.js +1 -0
- package/dist/publication/Contributor.js +1 -0
- package/dist/publication/GuidedNavigation.js +1 -0
- package/dist/publication/Layout.js +1 -0
- package/dist/publication/Link.js +1 -0
- package/dist/publication/LocalizedString.js +1 -0
- package/dist/publication/Locator.js +1 -0
- package/dist/publication/LocatorCollection.js +1 -0
- package/dist/publication/Manifest.js +1 -0
- package/dist/publication/Metadata.js +1 -0
- package/dist/publication/Profiles.js +1 -0
- package/dist/publication/Properties.js +1 -0
- package/dist/publication/Publication.js +1 -0
- package/dist/publication/PublicationCollection.js +1 -0
- package/dist/publication/ReadingProgression.js +1 -0
- package/dist/publication/Subject.js +1 -0
- package/dist/publication/TDM.js +1 -0
- package/dist/publication/accessibility/Accessibility.js +1 -0
- package/dist/publication/accessibility/AccessibilityMetadataDisplayGuide.js +1 -0
- package/dist/publication/accessibility/Localization.js +1 -0
- package/dist/publication/accessibility/SupportedLanguages.js +1 -0
- package/dist/publication/encryption/Encryption.js +1 -0
- package/dist/publication/encryption/Properties.js +1 -0
- package/dist/publication/encryption/index.js +1 -0
- package/dist/publication/epub/MediaOverlay.js +1 -0
- package/dist/publication/epub/Metadata.js +1 -0
- package/dist/publication/epub/Properties.js +1 -0
- package/dist/publication/epub/Publication.js +1 -0
- package/dist/publication/epub/index.js +1 -0
- package/dist/publication/html/DomRange.js +1 -0
- package/dist/publication/html/DomRangePoint.js +1 -0
- package/dist/publication/html/Locations.js +1 -0
- package/dist/publication/html/index.js +1 -0
- package/dist/publication/opds/Properties.js +1 -0
- package/dist/publication/opds/Publication.js +1 -0
- package/dist/publication/opds/index.js +1 -0
- package/dist/publication/services/content/Content.js +2 -0
- package/dist/publication/services/content/ContentTokenizer.js +1 -0
- package/dist/publication/services/content/Iterator.js +1 -0
- package/dist/publication/services/content/element/attributes.js +1 -0
- package/dist/publication/services/content/element/element.js +1 -0
- package/dist/publication/services/content/element/text_role.js +1 -0
- package/dist/publication/services/content/iterators/HTMLResourceContentIterator.js +1 -0
- package/dist/publication/services/content/iterators/PDFTextContentIterator.js +1 -0
- package/dist/publication/services/content/iterators/PublicationContentIterator.js +1 -0
- package/dist/publication/services/content/iterators/helpers.js +1 -0
- package/dist/publication/services/timeline/Timeline.js +1 -0
- package/dist/publication/services/timeline/audio.js +1 -0
- package/dist/publication/services/timeline/html.js +1 -0
- package/dist/publication/services/timeline/index.js +1 -0
- package/dist/util/JSONParse.js +1 -0
- package/dist/util/URITemplate.js +1 -0
- package/dist/util/mediatype/MediaType.js +1 -0
- package/dist/util/npt.js +1 -0
- package/dist/util/tokenizer/TextTokenizer.js +1 -0
- package/dist/util/tokenizer/tokenize-english/abbreviations.js +1 -0
- package/dist/util/tokenizer/tokenize-english/index.js +2 -0
- package/dist/util/tokenizer/tokenize-english/utils.js +1 -0
- package/dist/util/tokenizer/tokenize-text/index.js +1 -0
- package/dist/util/tokenizer/tokenize-text/tokens.js +1 -0
- package/package.json +26 -19
- package/src/locales/publication-metadata/ar.json +402 -0
- package/src/locales/publication-metadata/brh.json +1 -0
- package/src/locales/publication-metadata/da.json +310 -0
- package/src/locales/publication-metadata/el.json +310 -0
- package/src/locales/publication-metadata/en.json +310 -0
- package/src/locales/publication-metadata/es.json +333 -0
- package/src/locales/publication-metadata/et.json +310 -0
- package/src/locales/publication-metadata/fi.json +310 -0
- package/src/locales/publication-metadata/fr.json +333 -0
- package/src/locales/publication-metadata/he.json +9 -0
- package/src/locales/publication-metadata/it.json +333 -0
- package/src/locales/publication-metadata/lt.json +8 -0
- package/src/locales/publication-metadata/pl.json +333 -0
- package/src/locales/publication-metadata/pt_PT.json +329 -0
- package/src/locales/publication-metadata/sv.json +310 -0
- package/src/locales/publication-metadata/tr.json +51 -0
- package/src/locales/publication-metadata/uk.json +1 -0
- package/src/opds/Acquisition.ts +1 -1
- package/src/opds/Availability.ts +1 -1
- package/src/opds/Copies.ts +1 -1
- package/src/opds/Holds.ts +1 -1
- package/src/opds/Price.ts +1 -1
- package/src/publication/Link.ts +2 -6
- package/src/publication/Locator.ts +21 -3
- package/src/publication/Manifest.ts +5 -7
- package/src/publication/Publication.ts +2 -1
- package/src/publication/accessibility/Localization.ts +12 -14
- package/src/publication/accessibility/SupportedLanguages.ts +1 -1
- package/src/publication/encryption/Properties.ts +3 -15
- package/src/publication/epub/Metadata.ts +6 -12
- package/src/publication/epub/Properties.ts +3 -13
- package/src/publication/epub/Publication.ts +18 -39
- package/src/publication/html/Locations.ts +57 -104
- package/src/publication/opds/Properties.ts +22 -67
- package/src/publication/opds/Publication.ts +3 -9
- package/src/publication/services/content/iterators/HTMLResourceContentIterator.ts +3 -1
- package/src/publication/services/timeline/Timeline.ts +274 -65
- package/src/publication/services/timeline/TimelineItem.ts +3 -3
- package/src/publication/services/timeline/audio.ts +31 -0
- package/src/publication/services/timeline/html.ts +5 -0
- package/src/publication/services/timeline/index.ts +12 -0
- package/src/util/index.ts +1 -0
- package/src/util/npt.ts +70 -0
- package/types/src/opds/Acquisition.d.ts +1 -1
- package/types/src/opds/Availability.d.ts +1 -1
- package/types/src/opds/Copies.d.ts +1 -1
- package/types/src/opds/Holds.d.ts +1 -1
- package/types/src/opds/Price.d.ts +1 -1
- package/types/src/publication/encryption/Properties.d.ts +2 -9
- package/types/src/publication/epub/Metadata.d.ts +3 -6
- package/types/src/publication/epub/Properties.d.ts +2 -10
- package/types/src/publication/epub/Publication.d.ts +7 -18
- package/types/src/publication/html/Locations.d.ts +15 -44
- package/types/src/publication/opds/Properties.d.ts +8 -36
- package/types/src/publication/opds/Publication.d.ts +2 -5
- package/types/src/publication/services/timeline/Timeline.d.ts +80 -15
- package/types/src/publication/services/timeline/TimelineItem.d.ts +3 -3
- package/types/src/publication/services/timeline/audio.d.ts +4 -0
- package/types/src/publication/services/timeline/html.d.ts +4 -0
- package/types/src/publication/services/timeline/index.d.ts +6 -0
- package/types/src/util/index.d.ts +1 -0
- package/types/src/util/npt.d.ts +30 -0
- package/dist/ar-DyHX_uy2.js +0 -7
- package/dist/da-Dct0PS3E.js +0 -7
- package/dist/fr-C5HEel98.js +0 -7
- package/dist/index.umd.cjs +0 -3
- package/dist/it-DFOBoXGy.js +0 -7
- package/dist/pt_PT-Di3sVjze.js +0 -7
- package/dist/sv-BfzAFsVN.js +0 -7
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { parseNptTime } from "../../../util/npt.ts";
|
|
2
|
+
import { Timeline, PublicationLike } from "./Timeline.ts";
|
|
3
|
+
|
|
4
|
+
export function buildAudioTimeline(pub: PublicationLike, opts?: { depth?: number }): Timeline {
|
|
5
|
+
const t = Timeline.build(pub, opts);
|
|
6
|
+
const ro = pub.readingOrder.items;
|
|
7
|
+
const canLabel = ro.length <= 1 || ro.every(l => l.duration !== undefined);
|
|
8
|
+
if (!canLabel) return t;
|
|
9
|
+
|
|
10
|
+
let offset = 0;
|
|
11
|
+
const offsets = new Map(ro.map(l => {
|
|
12
|
+
const o = offset;
|
|
13
|
+
offset += l.duration ?? 0;
|
|
14
|
+
return [l.href, o];
|
|
15
|
+
}));
|
|
16
|
+
|
|
17
|
+
t.augment((_item, link) => {
|
|
18
|
+
const href = link.href;
|
|
19
|
+
const hashIndex = href.indexOf('#');
|
|
20
|
+
const bare = hashIndex >= 0 ? href.slice(0, hashIndex) : href;
|
|
21
|
+
const fragment = hashIndex >= 0 ? href.slice(hashIndex + 1) : undefined;
|
|
22
|
+
const trackOffset = offsets.get(bare) ?? 0;
|
|
23
|
+
const tMatch = fragment?.match(/(?:^|&)t=([^&]+)/);
|
|
24
|
+
const seconds = tMatch ? parseNptTime(tMatch[1]) : undefined;
|
|
25
|
+
return {
|
|
26
|
+
position: trackOffset + (seconds ?? 0),
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return t;
|
|
31
|
+
}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
+
import { Profile } from "../../Profiles.ts";
|
|
2
|
+
import { PublicationLike, Timeline } from "./Timeline.ts";
|
|
3
|
+
import { buildAudioTimeline } from "./audio.ts";
|
|
4
|
+
import { buildHtmlTimeline } from "./html.ts";
|
|
5
|
+
|
|
1
6
|
export * from './Timeline.ts';
|
|
2
7
|
export * from './TimelineItem.ts';
|
|
8
|
+
export { buildHtmlTimeline } from './html.ts';
|
|
9
|
+
export { buildAudioTimeline } from './audio.ts';
|
|
10
|
+
|
|
11
|
+
export function buildTimeline(pub: PublicationLike, options?: { depth?: number }): Timeline {
|
|
12
|
+
const isAudio = pub.metadata?.conformsTo?.includes(Profile.AUDIOBOOK) ?? false;
|
|
13
|
+
return isAudio ? buildAudioTimeline(pub, options) : buildHtmlTimeline(pub, options);
|
|
14
|
+
}
|
package/src/util/index.ts
CHANGED
package/src/util/npt.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a W3C Media Fragments NPT (Normal Play Time) temporal value and
|
|
3
|
+
* returns the corresponding time in seconds.
|
|
4
|
+
*
|
|
5
|
+
* Accepts the start of a range expression (e.g. "10,20" → 10).
|
|
6
|
+
* Handles the optional "npt:" prefix and all three clock formats:
|
|
7
|
+
* - Seconds: "1647.202" or "npt:1647.202"
|
|
8
|
+
* - MM:SS: "27:27.2" or "npt:27:27.2"
|
|
9
|
+
* - HH:MM:SS: "0:27:27.2" or "npt:0:27:27.202"
|
|
10
|
+
*
|
|
11
|
+
* Returns `undefined` for any value that cannot be parsed.
|
|
12
|
+
*
|
|
13
|
+
* https://www.w3.org/TR/media-frags/#naming-time
|
|
14
|
+
*/
|
|
15
|
+
export function parseNptTime(raw: string): number | undefined {
|
|
16
|
+
const start = raw.split(",")[0].trim();
|
|
17
|
+
const normalizedStart = start.toLowerCase();
|
|
18
|
+
const s = normalizedStart.startsWith("npt:") ? start.slice(4) : start;
|
|
19
|
+
const parts = s.split(":");
|
|
20
|
+
|
|
21
|
+
if (parts.length === 1) {
|
|
22
|
+
const sec = parseFloat(parts[0]);
|
|
23
|
+
return isNaN(sec) ? undefined : sec;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (parts.length === 2) {
|
|
27
|
+
const min = parseInt(parts[0], 10);
|
|
28
|
+
const sec = parseFloat(parts[1]);
|
|
29
|
+
if (isNaN(min) || isNaN(sec)) return undefined;
|
|
30
|
+
return min * 60 + sec;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (parts.length === 3) {
|
|
34
|
+
const hr = parseInt(parts[0], 10);
|
|
35
|
+
const min = parseInt(parts[1], 10);
|
|
36
|
+
const sec = parseFloat(parts[2]);
|
|
37
|
+
if (isNaN(hr) || isNaN(min) || isNaN(sec)) return undefined;
|
|
38
|
+
return hr * 3600 + min * 60 + sec;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Returns true when the NPT time value represents the start of a resource
|
|
46
|
+
* (t=0, t=0.0, t=npt:0, t=npt:0:0:0, etc.).
|
|
47
|
+
*/
|
|
48
|
+
export function isNptStartOfResource(raw: string): boolean {
|
|
49
|
+
const t = parseNptTime(raw);
|
|
50
|
+
return t !== undefined && t === 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Formats a duration in seconds as a human-readable string suitable for
|
|
55
|
+
* display in a Table of Contents or progress indicator.
|
|
56
|
+
*
|
|
57
|
+
* Outputs "H:MM:SS" when hours > 0, otherwise "M:SS".
|
|
58
|
+
* Minutes and seconds are always zero-padded to two digits.
|
|
59
|
+
*
|
|
60
|
+
* Examples: 0 → "0:00", 90 → "1:30", 3661 → "1:01:01"
|
|
61
|
+
*/
|
|
62
|
+
export function formatNptTime(seconds: number): string {
|
|
63
|
+
const totalSeconds = Math.floor(seconds);
|
|
64
|
+
const h = Math.floor(totalSeconds / 3600);
|
|
65
|
+
const m = Math.floor((totalSeconds % 3600) / 60);
|
|
66
|
+
const s = totalSeconds % 60;
|
|
67
|
+
const mm = String(m).padStart(2, "0");
|
|
68
|
+
const ss = String(s).padStart(2, "0");
|
|
69
|
+
return h > 0 ? `${h}:${mm}:${ss}` : `${m}:${ss}`;
|
|
70
|
+
}
|
|
@@ -6,7 +6,7 @@ export declare enum AvailabilityStatus {
|
|
|
6
6
|
/**
|
|
7
7
|
* Indicated the availability of a given resource.
|
|
8
8
|
*
|
|
9
|
-
* https://
|
|
9
|
+
* https://specs.opds.io/schema/properties.schema.json
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
export declare class Availability {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Library-specific feature that contains information about the copies that a library has acquired.
|
|
3
3
|
*
|
|
4
|
-
* https://
|
|
4
|
+
* https://specs.opds.io/schema/properties.schema.json
|
|
5
5
|
*/
|
|
6
6
|
export declare class Copies {
|
|
7
7
|
total?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Library-specific features when a specific book is unavailable but provides a hold list.
|
|
3
3
|
*
|
|
4
|
-
* https://
|
|
4
|
+
* https://specs.opds.io/schema/properties.schema.json
|
|
5
5
|
*/
|
|
6
6
|
export declare class Holds {
|
|
7
7
|
total?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The price of a publication in an OPDS link.
|
|
3
3
|
*
|
|
4
|
-
* https://
|
|
4
|
+
* https://specs.opds.io/schema/properties.schema.json
|
|
5
5
|
*
|
|
6
6
|
* currency Currency for the price, eg. EUR.
|
|
7
7
|
* value Price value, should only be used for display purposes, because of precision issues
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
+
import { Properties } from '../Properties.ts';
|
|
1
2
|
import { Encryption } from './Encryption.ts';
|
|
2
|
-
declare
|
|
3
|
-
interface Properties {
|
|
4
|
-
/**
|
|
5
|
-
* Indicates that a resource is encrypted/obfuscated and provides relevant information for
|
|
6
|
-
* decryption.
|
|
7
|
-
*/
|
|
8
|
-
encryption: Encryption | undefined;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
3
|
+
export declare function getEncryption(properties: Properties): Encryption | undefined;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
getMediaOverlay(): MediaOverlay | undefined;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
1
|
+
import { Metadata } from '../Metadata.ts';
|
|
2
|
+
import { MediaOverlay } from './MediaOverlay.ts';
|
|
3
|
+
export declare function getMediaOverlay(metadata: Metadata): MediaOverlay | undefined;
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Identifies content contained in the linked resource, that cannot be strictly identified using a
|
|
5
|
-
* media type.
|
|
6
|
-
*/
|
|
7
|
-
getContains(): Set<string> | undefined;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
1
|
+
import { Properties } from '../Properties.ts';
|
|
2
|
+
export declare function getContains(properties: Properties): Set<string>;
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import { Links } from '../Link.ts';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Identifies fundamental structural components of the publication in order to enable Reading
|
|
11
|
-
* Systems to provide the User efficient access to them.
|
|
12
|
-
*/
|
|
13
|
-
getLandmarks(): Links | undefined;
|
|
14
|
-
getListOfAudioClips(): Links | undefined;
|
|
15
|
-
getListOfIllustrations(): Links | undefined;
|
|
16
|
-
getListOfTables(): Links | undefined;
|
|
17
|
-
getListOfVideoClips(): Links | undefined;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
2
|
+
import { Publication } from '../Publication.ts';
|
|
3
|
+
export declare function getPageList(pub: Publication): Links | undefined;
|
|
4
|
+
export declare function getLandmarks(pub: Publication): Links | undefined;
|
|
5
|
+
export declare function getListOfAudioClips(pub: Publication): Links | undefined;
|
|
6
|
+
export declare function getListOfIllustrations(pub: Publication): Links | undefined;
|
|
7
|
+
export declare function getListOfTables(pub: Publication): Links | undefined;
|
|
8
|
+
export declare function getListOfVideoClips(pub: Publication): Links | undefined;
|
|
@@ -1,45 +1,16 @@
|
|
|
1
|
+
import { LocatorLocations } from '../Locator.ts';
|
|
1
2
|
import { DomRange } from './DomRange.ts';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* An HTML DOM range.
|
|
18
|
-
*/
|
|
19
|
-
getDomRange(): DomRange | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* All named parameters found in the fragments, such as `p=5`.
|
|
22
|
-
*/
|
|
23
|
-
fragmentParameters(): Map<string, string>;
|
|
24
|
-
/**
|
|
25
|
-
* HTML ID fragment identifier.
|
|
26
|
-
*/
|
|
27
|
-
htmlId(): string | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Page fragment identifier, used for example in PDF.
|
|
30
|
-
*/
|
|
31
|
-
page(): number | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Temporal Dimension media fragment, used for example in audiobooks.
|
|
34
|
-
*
|
|
35
|
-
* https://www.w3.org/TR/media-frags/
|
|
36
|
-
*/
|
|
37
|
-
time(): number | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Spatial Dimension media fragment, used for example in audiobooks.
|
|
40
|
-
*
|
|
41
|
-
* https://www.w3.org/TR/media-frags/
|
|
42
|
-
*/
|
|
43
|
-
space(): [number, number, number, number] | undefined;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
3
|
+
export declare function getCssSelector(loc: LocatorLocations): string | undefined;
|
|
4
|
+
export declare function getPartialCfi(loc: LocatorLocations): string | undefined;
|
|
5
|
+
export declare function getDomRange(loc: LocatorLocations): DomRange | undefined;
|
|
6
|
+
export declare function getFragmentParameters(loc: LocatorLocations): Map<string, string>;
|
|
7
|
+
export declare function getHtmlId(loc: LocatorLocations): string | undefined;
|
|
8
|
+
export declare function getPage(loc: LocatorLocations): number | undefined;
|
|
9
|
+
export declare function getTime(loc: LocatorLocations): number | undefined;
|
|
10
|
+
export declare function getSpace(loc: LocatorLocations): {
|
|
11
|
+
unit: "pixel" | "percent";
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
} | undefined;
|
|
@@ -1,38 +1,10 @@
|
|
|
1
1
|
import { Copies, Acquisition, Holds, Price, Availability } from '../../opds/index.ts';
|
|
2
2
|
import { Link } from '../Link.ts';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
getPrice(): Price | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Indirect acquisition provides a hint for the expected media type that will be acquired after
|
|
15
|
-
* additional steps.
|
|
16
|
-
*/
|
|
17
|
-
getIndirectAcquisitions(): Array<Acquisition> | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* Library-specific features when a specific book is unavailable but provides a hold list.
|
|
20
|
-
*/
|
|
21
|
-
getHolds(): Holds | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* Library-specific feature that contains information about the copies that a library has acquired.
|
|
24
|
-
*/
|
|
25
|
-
getCopies(): Copies | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Indicated the availability of a given resource.
|
|
28
|
-
*/
|
|
29
|
-
getAvailability(): Availability | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Indicates that the linked resource supports authentication with the associated Authentication
|
|
32
|
-
* Document.
|
|
33
|
-
*
|
|
34
|
-
* See https://drafts.opds.io/authentication-for-opds-1.0.html
|
|
35
|
-
*/
|
|
36
|
-
getAuthenticate(): Link | undefined;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
3
|
+
import { Properties } from '../Properties.ts';
|
|
4
|
+
export declare function getNumberOfItems(properties: Properties): number | undefined;
|
|
5
|
+
export declare function getPrice(properties: Properties): Price | undefined;
|
|
6
|
+
export declare function getIndirectAcquisitions(properties: Properties): Array<Acquisition> | undefined;
|
|
7
|
+
export declare function getHolds(properties: Properties): Holds | undefined;
|
|
8
|
+
export declare function getCopies(properties: Properties): Copies | undefined;
|
|
9
|
+
export declare function getAvailability(properties: Properties): Availability | undefined;
|
|
10
|
+
export declare function getAuthenticate(properties: Properties): Link | undefined;
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
import { Link, Links } from "../../Link.ts";
|
|
2
2
|
import { Locator } from "../../Locator.ts";
|
|
3
|
+
import { Profile } from "../../Profiles.ts";
|
|
3
4
|
import { TimelineItem } from "./TimelineItem.ts";
|
|
4
|
-
interface PublicationLike {
|
|
5
|
+
export interface PublicationLike {
|
|
5
6
|
toc?: Links;
|
|
6
7
|
readingOrder: Links;
|
|
8
|
+
metadata?: {
|
|
9
|
+
conformsTo?: Profile[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A TOC entry, mirroring `publication.toc`'s authored hierarchy and
|
|
14
|
+
* contextualized with display-ready progression. When a publication has no
|
|
15
|
+
* `toc` at all, falls back to one flat entry per reading-order item.
|
|
16
|
+
*
|
|
17
|
+
* Exactly one of `position`/`timestamp` is populated, depending on the
|
|
18
|
+
* publication's profile.
|
|
19
|
+
*/
|
|
20
|
+
export interface ContextualizedTocEntry {
|
|
21
|
+
link: Link;
|
|
22
|
+
/** Display-ready label for non-audio profiles: a Positions List position for EPUB, a page number for PDF (e.g. "42"). */
|
|
23
|
+
position?: string;
|
|
24
|
+
/** Display-ready formatted time for audiobooks (e.g. "27:27"). */
|
|
25
|
+
timestamp?: string;
|
|
26
|
+
children?: ContextualizedTocEntry[];
|
|
7
27
|
}
|
|
8
28
|
/**
|
|
9
29
|
* A publication's timeline, built once from its reading order and table of contents.
|
|
@@ -14,26 +34,50 @@ interface PublicationLike {
|
|
|
14
34
|
* 2. Populate flat children — all TOC fragment entries that reference the
|
|
15
35
|
* resource, collected depth-first in TOC declaration order.
|
|
16
36
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
37
|
+
* `contextualizedToc` returns the authored TOC hierarchy (see
|
|
38
|
+
* `ContextualizedTocEntry`), each entry contextualized with progression.
|
|
39
|
+
* `tocEntryFor(item)` maps a `TimelineItem` (e.g. from
|
|
40
|
+
* `locate()`) back to its entry in that hierarchy. TOC entries whose href
|
|
41
|
+
* does not match any reading order item are ignored.
|
|
20
42
|
*
|
|
21
|
-
* The `depth` build option limits how many levels deep into the TOC tree
|
|
22
|
-
* title resolution
|
|
23
|
-
* entries; level 2 = their children; etc.
|
|
43
|
+
* The `depth` build option limits how many levels deep into the TOC tree
|
|
44
|
+
* title resolution, child collection, and `contextualizedToc` traversal may
|
|
45
|
+
* look. Level 1 = top-level TOC entries; level 2 = their children; etc.
|
|
46
|
+
* `undefined` means no limit.
|
|
24
47
|
*/
|
|
25
48
|
export declare class Timeline {
|
|
26
49
|
private readonly _allItems;
|
|
27
50
|
private readonly linkMap;
|
|
51
|
+
private readonly _conformsTo;
|
|
52
|
+
private readonly tocLinks;
|
|
28
53
|
private _depth;
|
|
54
|
+
/**
|
|
55
|
+
* Depth used for `contextualizedToc` traversal. Tracks `_depth`, but is
|
|
56
|
+
* seeded independently from `Timeline.build()`'s `depth` option: unlike
|
|
57
|
+
* `_depth`, which only ever triggers `items`/`flat` re-trimming via the
|
|
58
|
+
* runtime `depth` setter, the TOC tree is walked fresh from `tocLinks`
|
|
59
|
+
* every time, so there's no equivalent "already baked in, don't reapply"
|
|
60
|
+
* hazard to avoid.
|
|
61
|
+
*/
|
|
62
|
+
private _tocDepth;
|
|
29
63
|
private _items;
|
|
30
64
|
private _flat;
|
|
65
|
+
private _toc;
|
|
66
|
+
private _linkToItem;
|
|
31
67
|
/** Populated when depth is set; maps cloned items from trimToDepth back to their Links. */
|
|
32
68
|
private _trimmedLinkMap;
|
|
33
|
-
constructor(items: TimelineItem[], linkMap: Map<TimelineItem, Link
|
|
69
|
+
constructor(items: TimelineItem[], linkMap: Map<TimelineItem, Link>, conformsTo?: readonly Profile[], tocLinks?: Link[], tocDepth?: number | undefined);
|
|
34
70
|
static build(publication: PublicationLike, options?: {
|
|
35
71
|
depth?: number;
|
|
36
72
|
}): Timeline;
|
|
73
|
+
/**
|
|
74
|
+
* Augments all items in the timeline by applying the mapper's returned patch.
|
|
75
|
+
* The mapper receives the item and its original manifest Link, and returns
|
|
76
|
+
* a partial TimelineItem — any fields it sets will overwrite the item's
|
|
77
|
+
* current value. Use this to populate `position`, `scroll`, `role`, or any
|
|
78
|
+
* future TimelineItem fields from format-specific data.
|
|
79
|
+
*/
|
|
80
|
+
augment(mapper: (item: TimelineItem, link: Link) => Partial<TimelineItem>): void;
|
|
37
81
|
/**
|
|
38
82
|
* The active depth limit for TOC traversal (title resolution and child
|
|
39
83
|
* collection). `undefined` means unlimited. Setting the same value again
|
|
@@ -49,10 +93,25 @@ export declare class Timeline {
|
|
|
49
93
|
next: TimelineItem | undefined;
|
|
50
94
|
};
|
|
51
95
|
segmentsForHref(href: string): TimelineItem[];
|
|
52
|
-
itemAtProgression(href: string, progression: number, duration?: number): TimelineItem | undefined;
|
|
53
96
|
ancestors(item: TimelineItem): TimelineItem[];
|
|
54
97
|
linkFor(item: TimelineItem): Link | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* The authored TOC, contextualized with display-ready progression. Mirrors
|
|
100
|
+
* `publication.toc`'s authored hierarchy (respecting `depth`), falling
|
|
101
|
+
* back to one flat entry per reading-order item when there's no toc at
|
|
102
|
+
* all. Cached; invalidated when `depth` changes.
|
|
103
|
+
*/
|
|
104
|
+
get contextualizedToc(): ContextualizedTocEntry[];
|
|
105
|
+
/**
|
|
106
|
+
* Maps a `TimelineItem` (typically from `locate()`) to its `ContextualizedTocEntry`:
|
|
107
|
+
* a direct match first, falling back to the nearest preceding toc entry
|
|
108
|
+
* for that resource when there's no exact match (e.g. a mid-resource
|
|
109
|
+
* audio position between chapter markers).
|
|
110
|
+
*/
|
|
111
|
+
tocEntryFor(current: TimelineItem): ContextualizedTocEntry | undefined;
|
|
55
112
|
private get flat();
|
|
113
|
+
/** All items flattened from _allItems, depth-independent — used by augment(). */
|
|
114
|
+
private get flatAll();
|
|
56
115
|
/**
|
|
57
116
|
* Resolve a display title for `bare` from the TOC, looking no deeper than
|
|
58
117
|
* `maxDepth` levels (1 = top-level entries only). Priority:
|
|
@@ -76,17 +135,23 @@ export declare class Timeline {
|
|
|
76
135
|
private static collectTocCandidates;
|
|
77
136
|
/**
|
|
78
137
|
* A TOC href points to the start of its resource when it has no fragment,
|
|
79
|
-
* or when the fragment contains a parsable `t=` value of 0 (audio:
|
|
80
|
-
* beginning of the file).
|
|
81
|
-
* or `foo=bar&t=0`.
|
|
138
|
+
* or when the fragment contains a parsable NPT `t=` value of 0 (audio:
|
|
139
|
+
* explicit beginning of the file).
|
|
82
140
|
*/
|
|
83
141
|
private static isStartOfResource;
|
|
142
|
+
private get linkToItem();
|
|
143
|
+
private buildTocEntries;
|
|
144
|
+
/** All toc Links flattened, respecting the same depth limit as `buildTocEntries`. */
|
|
145
|
+
private tocLinksFlat;
|
|
146
|
+
private entryFor;
|
|
147
|
+
private resourceStartItem;
|
|
148
|
+
private findTocEntryByLink;
|
|
149
|
+
private nearestTocEntryForResource;
|
|
84
150
|
private static trimToDepth;
|
|
85
151
|
private flattenItems;
|
|
86
152
|
private itemStartTime;
|
|
87
|
-
private
|
|
88
|
-
private timeFromItem;
|
|
153
|
+
private itemMatchesHref;
|
|
89
154
|
private ancestorPath;
|
|
155
|
+
private itemScrollPosition;
|
|
90
156
|
private static bareHref;
|
|
91
157
|
}
|
|
92
|
-
export {};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* show previous/next as chapter titles, group search results by chapter, etc.
|
|
7
7
|
*/
|
|
8
8
|
export interface TimelineItem {
|
|
9
|
-
/** Display title of this entry. */
|
|
10
|
-
title
|
|
9
|
+
/** Display title of this entry, when one could be derived. */
|
|
10
|
+
title?: string;
|
|
11
11
|
/**
|
|
12
12
|
* References as hrefs with optional fragments.
|
|
13
13
|
* e.g. ["track1.mp3#t=60"] for audio, ["chapter1.html"] for EPUB, ["#page=6"] for PDF.
|
|
@@ -15,7 +15,7 @@ export interface TimelineItem {
|
|
|
15
15
|
references: string[];
|
|
16
16
|
/** Structural roles of this entry, e.g. ["chapter"], ["part"]. */
|
|
17
17
|
role?: string[];
|
|
18
|
-
/**
|
|
18
|
+
/** Raw position: book-global seconds for audio, a Positions List position for EPUB, a page number for PDF. */
|
|
19
19
|
position?: number;
|
|
20
20
|
/** Scroll progression within the resource (0 to 1), for entries that start mid-way in a resource. */
|
|
21
21
|
scroll?: number;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { PublicationLike, Timeline } from "./Timeline.ts";
|
|
1
2
|
export * from './Timeline.ts';
|
|
2
3
|
export * from './TimelineItem.ts';
|
|
4
|
+
export { buildHtmlTimeline } from './html.ts';
|
|
5
|
+
export { buildAudioTimeline } from './audio.ts';
|
|
6
|
+
export declare function buildTimeline(pub: PublicationLike, options?: {
|
|
7
|
+
depth?: number;
|
|
8
|
+
}): Timeline;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a W3C Media Fragments NPT (Normal Play Time) temporal value and
|
|
3
|
+
* returns the corresponding time in seconds.
|
|
4
|
+
*
|
|
5
|
+
* Accepts the start of a range expression (e.g. "10,20" → 10).
|
|
6
|
+
* Handles the optional "npt:" prefix and all three clock formats:
|
|
7
|
+
* - Seconds: "1647.202" or "npt:1647.202"
|
|
8
|
+
* - MM:SS: "27:27.2" or "npt:27:27.2"
|
|
9
|
+
* - HH:MM:SS: "0:27:27.2" or "npt:0:27:27.202"
|
|
10
|
+
*
|
|
11
|
+
* Returns `undefined` for any value that cannot be parsed.
|
|
12
|
+
*
|
|
13
|
+
* https://www.w3.org/TR/media-frags/#naming-time
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseNptTime(raw: string): number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Returns true when the NPT time value represents the start of a resource
|
|
18
|
+
* (t=0, t=0.0, t=npt:0, t=npt:0:0:0, etc.).
|
|
19
|
+
*/
|
|
20
|
+
export declare function isNptStartOfResource(raw: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Formats a duration in seconds as a human-readable string suitable for
|
|
23
|
+
* display in a Table of Contents or progress indicator.
|
|
24
|
+
*
|
|
25
|
+
* Outputs "H:MM:SS" when hours > 0, otherwise "M:SS".
|
|
26
|
+
* Minutes and seconds are always zero-padded to two digits.
|
|
27
|
+
*
|
|
28
|
+
* Examples: 0 → "0:00", 90 → "1:30", 3661 → "1:01:01"
|
|
29
|
+
*/
|
|
30
|
+
export declare function formatNptTime(seconds: number): string;
|
package/dist/ar-DyHX_uy2.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const e = { metadata: { accessibility: { "display-guide": { "accessibility-summary": { "no-metadata": "لا تتوفر أي معلومات", "publisher-contact": "لمزيد من المعلومات حول إمكانية الوصول إلى هذا المنتج، يُرجى التواصل مع الناشر: ", title: "ملخص إمكانية الوصول" }, "additional-accessibility-information": { aria: { compact: "أدوار ARIA مدرَجة", descriptive: "يتم تعزيز المحتوى باستخدام أدوار ARIA لتحسين التنظيم وتيسير التنقّل" }, "audio-descriptions": "الوصف الصوتي", braille: "برايل", "color-not-sole-means-of-conveying-information": "اللون ليس الوسيلة الوحيدة لنقل المعلومات", "dyslexia-readability": "سهولة القراءة لذوي عُسر القراءة", "full-ruby-annotations": "شروح روبي كاملة", "high-contrast-between-foreground-and-background-audio": "تباين عالٍ بين الصوت الرئيسي وصوت الخلفية", "high-contrast-between-text-and-background": "تباين عالٍ بين النص والخلفية", "large-print": "خط كبير", "page-breaks": { compact: "فواصل الصفحات متضمَّنة", descriptive: "فواصل الصفحات متضمَّنة من المصدر المطبوع الأصلي" }, "ruby-annotations": "بعض شروح الروبي", "sign-language": "لغة الإشارة", "tactile-graphics": { compact: "الرسوم اللمسية مدرجة", descriptive: "تم دمج الرسوم اللمسية لتيسير الوصول إلى العناصر البصرية للأشخاص المكفوفين" }, "tactile-objects": "مجسمات لمسية ثلاثية الأبعاد", "text-to-speech-hinting": "إرشادات تحويل النص إلى كلام (TTS)متوفرة", title: "معلومات إضافية عن إمكانية الوصول", "ultra-high-contrast-between-text-and-background": "تباين عالٍ جدًا بين النص والخلفية", "visible-page-numbering": "ترقيم صفحات مرئي", "without-background-sounds": "من دون أصوات في خلفية" }, conformance: { a: { compact: "هذا المنشور يفي بالمعايير الدنيا لإمكانية الوصول", descriptive: "يحتوي هذا المنشور على بيان مطابقة يفيد بأنه يفي بمعيار إمكانية الوصول في EPUB وبمستوى A من معيار WCAG 2" }, aa: { compact: "هذا المنشور يفي بالمعايير المعتمدة لإمكانية الوصول", descriptive: "يحتوي هذا المنشور على بيان مطابقة يفيد بأنه يفي بمعيار إمكانية الوصول في EPUB وبمستوى AA من معيار WCAG 2" }, aaa: { compact: "هذا المنشور يفوق المعايير المقبولة لإمكانية الوصول", descriptive: "يحتوي هذا المنشور على بيان مطابقة يفيد بأنه يفي بمعيار إمكانية الوصول في EPUB وبمستوى AAA من معيار WCAG 2" }, certifier: "تم اعتماد هذا المنشور من قبل ", "certifier-credentials": "بيانات اعتماد جهة التصديق ", details: { "certification-info": "تم اعتماد هذا المنشور في تاريخ ", "certifier-report": "لمزيد من المعلومات، يرجى الرجوع إلى تقرير جهة التصديق", claim: "يدّعي هذا المنشور أنه يستوفي", "epub-accessibility-1-0": "معيار إمكانية الوصول لـ EPUB إصدار 1.0", "epub-accessibility-1-1": "معيار إمكانية الوصول لـ EPUB إصدار 1.1", "level-a": "المستوى A", "level-aa": "المستوى AA", "level-aaa": "المستوى AAA", "wcag-2-0": { compact: "WCAG 2.0", descriptive: "مبادئ النفاذ إلى محتوى الويب (WCAG) 2.0" }, "wcag-2-1": { compact: "WCAG 2.1", descriptive: "مبادئ النفاذ إلى محتوى الويب (WCAG) 2.1" }, "wcag-2-2": { compact: "WCAG 2.2", descriptive: "مبادئ النفاذ إلى محتوى الويب (WCAG) 2.2" } }, "details-title": "معلومات تفصيلية عن مدى المطابقة", no: "لا تتوفر أي معلومات", title: "المطابقة", "unknown-standard": "لا يمكن التأكد من مدى مطابقة هذا المنشور للمعايير المقبولة لإمكانية الوصول" }, hazards: { flashing: { compact: "محتوى وامض", descriptive: "يحتوي هذا المنشور على محتوى وامض قد يسبب نوبات حساسة للضوء" }, "flashing-none": { compact: "لا توجد مخاطر وميض", descriptive: "لا يحتوي هذا المنشور على محتوى وامض قد يسبب نوبات حساسة للضوء" }, "flashing-unknown": { compact: "مخاطر الوميض غير معروفة", descriptive: "لم يُمكن التأكد من وجود محتوى وامض قد يسبب نوبات حساسية للضوء" }, motion: { compact: "محاكاة الحركة", descriptive: "يحتوي المنشور على محاكاة حركة قد تسبّب دوار الحركة" }, "motion-none": { compact: "لا توجد مخاطر محاكاة الحركة", descriptive: "لا يحتوي المنشور على محاكاة حركة قد تسبّب دوار الحركة" }, "motion-unknown": { compact: "مخاطر محاكاة الحركة غير معروفة", descriptive: "تعذّر تحديد ما إذا كانت هناك محاكاة للحركة قد تُسبب دوار الحركة" }, "no-metadata": "لا تتوفر أي معلومات", none: { compact: "لا توجد مخاطر", descriptive: "لا يحتوي المنشور على أي مخاطر" }, sound: { compact: "أصوات", descriptive: "يحتوي المنشور على أصوات قد تؤدي إلى مشاكل حساسية صوتية" }, "sound-none": { compact: "لا توجد مخاطر صوتية", descriptive: "لا يحتوي المنشور على أصوات قد تؤدي إلى مشاكل حساسية صوتية" }, "sound-unknown": { compact: "مخاطر الصوت غير معروفة", descriptive: "تعذّر تحديد ما إذا كانت هناك أصوات قد تُسبب مشكلات في الحساسية" }, title: "مخاطر", unknown: "وجود المخاطر غير معروف" }, "legal-considerations": { exempt: { compact: "يُعلن عن استثناء من متطلبات إمكانية الوصول من بعض السلطات القضائية", descriptive: "يُصرّح هذا المنشور بوجود استثناء من متطلبات إمكانية الوصول من بعض السلطات القضائية" }, "no-metadata": "لا تتوفر أي معلومات", title: "اعتبارات قانونية" }, navigation: { index: { compact: "كشاف", descriptive: "كشاف يحتوي على روابط إلى الإدخالات المشار إليها" }, "no-metadata": "لا تتوفر أي معلومات", "page-navigation": { compact: "الانتقال إلى صفحة", descriptive: "قائمة الصفحات للانتقال إلى صفحات من النسخة المطبوعة الأصلية" }, structural: { compact: "العناوين", descriptive: "عناصر مثل العناوين والجداول وغيرها للتنقل المنظّم" }, title: "التنقل", toc: { compact: "جدول المحتويات", descriptive: "جدول المحتويات لكل فصول النص عبر روابط" } }, "rich-content": { "accessible-chemistry-as-latex": { compact: "الصيغ الكيميائية بصيغة LaTeX", descriptive: "الصيغ الكيميائية بشكل ميسر (LaTeX)" }, "accessible-chemistry-as-mathml": { compact: "الصيغ الكيميائية بصيغة MathML", descriptive: "الصيغ الكيميائية بشكل ميسر (MathML)" }, "accessible-math-as-latex": { compact: "الرياضيات بصيغة LaTeX", descriptive: "الصيغ الرياضية بشكل ميسر (LaTeX)" }, "accessible-math-described": "تتوفر أوصاف نصية للصيغ الرياضية", "closed-captions": { compact: "تحتوي الفيديوهات على شروح مغلقة", descriptive: "الفيديوهات الموجودة في المنشورات تحتوي على شروح مغلقة" }, "extended-descriptions": "يتم وصف الصور الغنية بالمعلومات بأوصاف مفصّلة", "math-as-mathml": { compact: "الرياضيات بصيغة MathML", descriptive: "الصيغ الرياضية بشكل ميسر(MathML)" }, "open-captions": { compact: "تحتوي الفيديوهات على شروح مدمجة", descriptive: "الفيديوهات الموجودة في المنشورات تحتوي على شروح مدمجة" }, title: "محتوى غني", transcript: "يتوفر نص(نصوص)", unknown: "لا تتوفر أي معلومات" }, "ways-of-reading": { "nonvisual-reading": { "alt-text": { compact: "يحتوي على نص بديل", descriptive: "يحتوي على أوصاف نصية بديلة للصور" }, "no-metadata": "لا تتوفر معلومات عن القراءة غير البصرية", none: { compact: "غير قابل للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية", descriptive: "المحتوى غير قابل للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية" }, "not-fully": { compact: "غير قابل للقراءة بالكامل بصوتٍ عالٍ أو بطريقة برايل الديناميكية", descriptive: "لن يكون كل المحتوى قابلًا للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية" }, readable: { compact: "قابل للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية", descriptive: "يمكن قراءة كل المحتوى بصوتٍ عالٍ أو بطريقة برايل الديناميكية" } }, "prerecorded-audio": { complementary: { compact: "مقاطع الصوت المسجّلة مسبقًا", descriptive: "مقاطع الصوت المسجّلة مسبقًا مدمجة في المحتوى" }, "no-metadata": "لا توجد معلومات عن الصوت المسجّل مسبقًا", only: { compact: "الصوت المسجّل مسبقًا فقط", descriptive: "كتاب صوتي بدون بديل نصي" }, synchronized: { compact: "صوت مسجّل مسبقًا متزامن مع النص", descriptive: "كل المحتوى متوفر كصوت مسجّل مسبقًا متزامن مع النص" } }, title: "طرق القراءة", "visual-adjustments": { modifiable: { compact: "يمكن تعديل المظهر", descriptive: "يمكن تعديل مظهر النص وتخطيط الصفحة وفقاً لإمكانات نظام القراءة (اسم الخط وحجمه، والمسافات بين الفقرات والجمل والكلمات والأحرف، بالإضافة إلى لون الخلفية والنص)" }, unknown: "لا توجد معلومات عن إمكانية تعديل المظهر", unmodifiable: { compact: "لا يمكن تعديل المظهر", descriptive: "لا يمكن تعديل مظهر النص وتخطيط الصفحات لأن تجربة القراءة قريبة من النسخة المطبوعة، ولكن تطبيقات القراءة ما زالت تتيح خيارات التكبير" } } } } }, altIdentifier_one: "رمز تعريفي بديل", altIdentifier_other: "رموز تعريفية بديلة", artist_one: "فنان", artist_other: "فنانون", author_one: "مؤلف", author_other: "مؤلفون", collection_one: "سلسلة تحريرية", collection_other: "سلاسل تحريرية", colorist_one: "ملوّن الألوان", colorist_other: "ملوّنو الألوان", contributor_one: "مساهم", contributor_other: "مساهمون", description: "وصف", duration: "مدة", editor_one: "محرر", editor_other: "محررون", identifier_one: "رمز تعريفي", identifier_other: "رموز تعريفية", illustrator_one: "رسًام", illustrator_other: "رسامون", imprint_one: "العلامة التجارية للنشر", imprint_other: "العلامات التجارية للنشر", inker_one: "مُحَبِّر", inker_other: "مُحَبِّرون", language_one: "اللغة", language_other: "اللغات", letterer_one: "خطّاط", letterer_other: "خطّاطون", modified: "تاريخ التعديل", narrator_one: "قارئ صوتي", narrator_other: "قرّاء صوتيون", numberOfPages: "عدد الصفحات في النسخة المطبوعة", penciler_one: "رسّام أولي", penciler_other: "رسّامون أوّليون", published: "تاريخ النشر", publisher_one: "ناشر", publisher_other: "ناشرون", series_one: "سلسلة", series_other: "سلاسل", subject_one: "موضوع", subject_other: "مواضيع", subtitle: "عنوان فرعي", title: "العنوان", translator_one: "مترجم", translator_other: "مترجمون" } }, t = {
|
|
2
|
-
publication: e
|
|
3
|
-
};
|
|
4
|
-
export {
|
|
5
|
-
t as default,
|
|
6
|
-
e as publication
|
|
7
|
-
};
|