ochre-sdk 1.3.13 → 1.3.15
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/categories.d.mts +1 -3
- package/dist/categories.mjs +1 -2
- package/dist/constants.d.mts +1 -3
- package/dist/constants.mjs +11 -4
- package/dist/errors.d.mts +0 -2
- package/dist/errors.mjs +1 -2
- package/dist/fetchers/container-items.d.mts +1 -3
- package/dist/fetchers/container-items.mjs +1 -2
- package/dist/fetchers/gallery.d.mts +1 -3
- package/dist/fetchers/gallery.mjs +1 -2
- package/dist/fetchers/item-children.d.mts +0 -2
- package/dist/fetchers/item-children.mjs +1 -2
- package/dist/fetchers/item-links.d.mts +1 -3
- package/dist/fetchers/item-links.mjs +1 -2
- package/dist/fetchers/item-locations.d.mts +1 -3
- package/dist/fetchers/item-locations.mjs +1 -2
- package/dist/fetchers/item-ocr-data.d.mts +1 -3
- package/dist/fetchers/item-ocr-data.mjs +1 -2
- package/dist/fetchers/item.d.mts +0 -2
- package/dist/fetchers/item.mjs +1 -2
- package/dist/fetchers/map-layers.d.mts +1 -3
- package/dist/fetchers/map-layers.mjs +1 -2
- package/dist/fetchers/request.d.mts +1 -3
- package/dist/fetchers/request.mjs +1 -2
- package/dist/fetchers/set/items.d.mts +0 -2
- package/dist/fetchers/set/items.mjs +1 -2
- package/dist/fetchers/set/property-values.d.mts +1 -3
- package/dist/fetchers/set/property-values.mjs +1 -2
- package/dist/fetchers/tree/items.d.mts +0 -2
- package/dist/fetchers/tree/items.mjs +1 -2
- package/dist/fetchers/website-metadata.d.mts +1 -3
- package/dist/fetchers/website-metadata.mjs +1 -2
- package/dist/fetchers/website.d.mts +1 -3
- package/dist/fetchers/website.mjs +1 -2
- package/dist/getters.d.mts +0 -2
- package/dist/getters.mjs +1 -2
- package/dist/helpers.d.mts +0 -2
- package/dist/helpers.mjs +1 -2
- package/dist/index.d.mts +2 -2
- package/dist/languages.d.mts +1 -3
- package/dist/languages.mjs +1 -2
- package/dist/ocr.d.mts +1 -3
- package/dist/ocr.mjs +1 -2
- package/dist/parsers/helpers.d.mts +1 -3
- package/dist/parsers/helpers.mjs +1 -2
- package/dist/parsers/index.d.mts +0 -2
- package/dist/parsers/index.mjs +11 -2
- package/dist/parsers/languages.d.mts +1 -3
- package/dist/parsers/languages.mjs +1 -2
- package/dist/parsers/mdx.d.mts +1 -3
- package/dist/parsers/mdx.mjs +1 -2
- package/dist/parsers/multilingual.d.mts +0 -2
- package/dist/parsers/multilingual.mjs +1 -2
- package/dist/parsers/property-token.d.mts +0 -2
- package/dist/parsers/property-token.mjs +1 -2
- package/dist/parsers/string.d.mts +1 -3
- package/dist/parsers/string.mjs +1 -2
- package/dist/parsers/website/bounds.d.mts +1 -3
- package/dist/parsers/website/bounds.mjs +1 -2
- package/dist/parsers/website/components.d.mts +0 -2
- package/dist/parsers/website/components.mjs +1 -2
- package/dist/parsers/website/index.d.mts +1 -3
- package/dist/parsers/website/index.mjs +1 -2
- package/dist/parsers/website/links.d.mts +1 -3
- package/dist/parsers/website/links.mjs +1 -2
- package/dist/parsers/website/messages.d.mts +1 -3
- package/dist/parsers/website/messages.mjs +1 -2
- package/dist/parsers/website/options.d.mts +1 -3
- package/dist/parsers/website/options.mjs +1 -2
- package/dist/parsers/website/properties.d.mts +1 -3
- package/dist/parsers/website/properties.mjs +1 -2
- package/dist/parsers/website/reader.d.mts +0 -2
- package/dist/parsers/website/reader.mjs +1 -2
- package/dist/parsers/website/slug.d.mts +1 -3
- package/dist/parsers/website/slug.mjs +1 -2
- package/dist/parsers/website/styles.d.mts +1 -3
- package/dist/parsers/website/styles.mjs +1 -2
- package/dist/parsers/website/walk.d.mts +1 -3
- package/dist/parsers/website/walk.mjs +1 -2
- package/dist/query.d.mts +0 -2
- package/dist/query.mjs +1 -2
- package/dist/reflection.d.mts +1 -3
- package/dist/reflection.mjs +1 -2
- package/dist/schemas.d.mts +1 -3
- package/dist/schemas.mjs +1 -2
- package/dist/types/index.d.mts +11 -2
- package/dist/types/utilities.d.mts +1 -3
- package/dist/types/website.d.mts +1 -3
- package/dist/xml/dates.d.mts +1 -3
- package/dist/xml/dates.mjs +1 -2
- package/dist/xml/metadata.d.mts +1 -3
- package/dist/xml/metadata.mjs +1 -2
- package/dist/xml/schemas.d.mts +22 -3
- package/dist/xml/schemas.mjs +14 -2
- package/dist/xml/types.d.mts +11 -3
- package/dist/xquery.d.mts +1 -3
- package/dist/xquery.mjs +1 -2
- package/package.json +7 -6
package/dist/languages.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/languages.ts
|
|
2
2
|
/**
|
|
3
3
|
* Every language code OCHRE publishes, mapped to the ISO 639-3 and BCP 47
|
|
4
4
|
* codes it stands for
|
|
@@ -629,5 +629,4 @@ function getOchreLanguageCode(iso639_3) {
|
|
|
629
629
|
for (const [code, language] of Object.entries(OCHRE_LANGUAGES)) if (language.kind === "language" && language.iso639_3 === iso639_3 && isOchreLanguageCode(code)) return code;
|
|
630
630
|
return null;
|
|
631
631
|
}
|
|
632
|
-
//#endregion
|
|
633
632
|
export { OCHRE_LANGUAGES, getOchreLanguage, getOchreLanguageCode, isOchreLanguageCode };
|
package/dist/ocr.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/ocr.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The name of the element wrapping an OCR layer inside an OCHRE document
|
|
4
3
|
* @internal
|
|
@@ -33,5 +32,4 @@ export declare const OCR_WORD_QNAMES: string;
|
|
|
33
32
|
* @returns The XQuery path
|
|
34
33
|
* @internal
|
|
35
34
|
*/
|
|
36
|
-
export declare function buildOcrWordPath(rootExpression: string): string;
|
|
37
|
-
//#endregion
|
|
35
|
+
export declare function buildOcrWordPath(rootExpression: string): string;
|
package/dist/ocr.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringLiteral } from "./xquery.mjs";
|
|
2
|
-
|
|
2
|
+
// src/ocr.ts
|
|
3
3
|
const ALTO_NAMESPACE = "http://www.loc.gov/standards/alto/ns-v2#";
|
|
4
4
|
/**
|
|
5
5
|
* The local names OCHRE serves OCR word elements under
|
|
@@ -48,5 +48,4 @@ const OCR_WORD_QNAMES = `(${[...OCR_WORD_LOCAL_NAMES.map((localName) => `fn:QNam
|
|
|
48
48
|
function buildOcrWordPath(rootExpression) {
|
|
49
49
|
return `${rootExpression}//*[lower-case(local-name(.)) = ${stringLiteral("ocr")}]//*[lower-case(local-name(.)) = ${stringLiteral(OCR_WORD_CASE_FOLDED_LOCAL_NAME)}][@${OCR_WORD_CONTENT_ATTRIBUTE}]`;
|
|
50
50
|
}
|
|
51
|
-
//#endregion
|
|
52
51
|
export { OCR_LAYER_ELEMENT_NAME, OCR_WORD_CONTENT_ATTRIBUTE, OCR_WORD_QNAMES, buildOcrWordPath };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MultilingualString } from "./multilingual.mjs";
|
|
2
2
|
import { License } from "../types/index.mjs";
|
|
3
3
|
import { XMLContent, XMLString } from "../xml/types.mjs";
|
|
4
|
-
//#region src/parsers/helpers.d.ts
|
|
5
4
|
export type FetchFunction = (input: string | URL | globalThis.Request, init?: RequestInit) => Promise<Response>;
|
|
6
5
|
export type FetchBaseOptions<TLanguages extends ReadonlyArray<string> | undefined = undefined> = {
|
|
7
6
|
languages?: TLanguages;
|
|
@@ -59,5 +58,4 @@ export declare function multilingualFromText<T extends ReadonlyArray<string>>(te
|
|
|
59
58
|
export declare function parseContentLike<T extends ReadonlyArray<string>>(value: XMLContent | XMLString | string | undefined, options: ParserOptions<T>): MultilingualString<T> | null;
|
|
60
59
|
export declare function parseRequiredContentLike<T extends ReadonlyArray<string>>(value: XMLContent | XMLString, options: ParserOptions<T>): MultilingualString<T>;
|
|
61
60
|
export declare function parseContentLikeText<T extends ReadonlyArray<string>>(value: XMLContent | XMLString | undefined, options: ParserOptions<T>): string;
|
|
62
|
-
export declare function parseStringContent(value: XMLContent | XMLString | string | undefined, options?: ParserOptions<ReadonlyArray<string>>): string;
|
|
63
|
-
//#endregion
|
|
61
|
+
export declare function parseStringContent(value: XMLContent | XMLString | string | undefined, options?: ParserOptions<ReadonlyArray<string>>): string;
|
package/dist/parsers/helpers.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_LANGUAGES } from "../constants.mjs";
|
|
2
2
|
import { MultilingualString } from "./multilingual.mjs";
|
|
3
3
|
import { parseXMLContent, parseXMLString } from "./string.mjs";
|
|
4
|
-
|
|
4
|
+
// src/parsers/helpers.ts
|
|
5
5
|
const FALLBACK_PARSER_OPTIONS = { languages: DEFAULT_LANGUAGES };
|
|
6
6
|
function getParserOptions(options) {
|
|
7
7
|
return {
|
|
@@ -73,5 +73,4 @@ function parseStringContent(value, options = FALLBACK_PARSER_OPTIONS) {
|
|
|
73
73
|
}
|
|
74
74
|
return parseXMLString(value).text;
|
|
75
75
|
}
|
|
76
|
-
//#endregion
|
|
77
76
|
export { cleanObject, getParserOptions, isXMLContent, multilingualFromText, parseContentLike, parseContentLikeText, parseLicense, parseRequiredContentLike, parseStringContent, parseStringLike };
|
package/dist/parsers/index.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import { Webpage } from "../types/website.mjs";
|
|
|
2
2
|
import { Bibliography, ContainedItemCategoryFromOption, ContainedItemCategoryOption, Coordinates, Gallery, Identification, Item, ItemCategory, ItemCategoryFromOption, ItemCategoryOption, ItemContainerCategory, ItemLinks, Metadata, Note, Person, Property, Resource, SetItem, SetItemCategory, SimplifiedProperty, SpatialUnit } from "../types/index.mjs";
|
|
3
3
|
import { XMLBibliography, XMLCoordinates, XMLData, XMLDataItem, XMLGalleryData, XMLIdentification, XMLItemLinks, XMLLink, XMLMetadata, XMLNote, XMLPerson, XMLProperty, XMLResource, XMLSetItems, XMLSimplifiedProperty, XMLSpatialUnit } from "../xml/types.mjs";
|
|
4
4
|
import { ParserOptions, getParserOptions, parseStringLike } from "./helpers.mjs";
|
|
5
|
-
//#region src/parsers/index.d.ts
|
|
6
5
|
export type RawOchre = XMLData["result"]["ochre"];
|
|
7
6
|
type ResourceViewParser<T extends ReadonlyArray<string>> = (view: XMLResource["view"], context: Pick<Resource<T, "topLevel">, "belongsTo" | "metadata">) => Webpage<T> | null;
|
|
8
7
|
type SetItemCategoryFromCategories<T extends ReadonlyArray<SetItemCategory> | undefined> = T extends ReadonlyArray<infer U> ? Extract<U, SetItemCategory> : SetItemCategory;
|
|
@@ -54,5 +53,4 @@ export declare function parseItem(rawData: XMLData, options: {
|
|
|
54
53
|
languages: ReadonlyArray<string>;
|
|
55
54
|
parseResourceView?: ResourceViewParser<ReadonlyArray<string>>;
|
|
56
55
|
}): Item<ItemCategory, SetItemCategory, ReadonlyArray<string>>;
|
|
57
|
-
//#endregion
|
|
58
56
|
export { type ParserOptions, getParserOptions, parseStringLike };
|
package/dist/parsers/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { parseXMLString, transformPermanentIdentificationUrl } from "./string.mj
|
|
|
7
7
|
import { getParserOptions, multilingualFromText, parseContentLike, parseContentLikeText, parseLicense, parseRequiredContentLike, parseStringLike } from "./helpers.mjs";
|
|
8
8
|
import { parseMetadataLanguages, resolveDefaultLanguage, resolveLanguages } from "./languages.mjs";
|
|
9
9
|
import * as v from "valibot";
|
|
10
|
-
|
|
10
|
+
// src/parsers/index.ts
|
|
11
11
|
function isXMLContextGroup(context) {
|
|
12
12
|
return "context" in context;
|
|
13
13
|
}
|
|
@@ -318,6 +318,13 @@ function parseImage(rawImage, options) {
|
|
|
318
318
|
base64: rawImage.payload ?? null
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
|
+
function parseDownloadOptions(rawDownloadOptions) {
|
|
322
|
+
return Array.from(rawDownloadOptions?.option ?? [], (option) => ({
|
|
323
|
+
type: option.type,
|
|
324
|
+
href: transformPermanentIdentificationUrl(option.href),
|
|
325
|
+
fileFormat: option.fileFormat
|
|
326
|
+
}));
|
|
327
|
+
}
|
|
321
328
|
function parseHref(href) {
|
|
322
329
|
return href == null ? null : transformPermanentIdentificationUrl(href);
|
|
323
330
|
}
|
|
@@ -794,6 +801,7 @@ function parseObservation(rawObservation, options) {
|
|
|
794
801
|
periods: parsePeriodList(rawObservation.periods, options),
|
|
795
802
|
links: parseLinks(rawObservation.links, options),
|
|
796
803
|
reverseLinks: parseReverseLinks(rawObservation.reverseLinks, options),
|
|
804
|
+
downloadOptions: parseDownloadOptions(rawObservation.downloadOptions),
|
|
797
805
|
notes: parseNotes(rawObservation.notes, options),
|
|
798
806
|
properties: parseProperties(rawObservation.properties, options),
|
|
799
807
|
bibliographies: parseBibliographyList(rawObservation.bibliographies, options)
|
|
@@ -949,6 +957,7 @@ function parseBibliography(rawBibliography, options) {
|
|
|
949
957
|
citationFormatSpan: parseStringLike(rawBibliography.citationFormatSpan),
|
|
950
958
|
referenceFormatDiv: parseStringLike(rawBibliography.referenceFormatDiv),
|
|
951
959
|
image: parseImage(rawBibliography.image, options),
|
|
960
|
+
downloadOptions: parseDownloadOptions(rawBibliography.downloadOptions),
|
|
952
961
|
sourceDocument: parseBibliographySourceDocument(rawBibliography.sourceDocument),
|
|
953
962
|
publicationInfo: rawBibliography.publicationInfo == null ? null : {
|
|
954
963
|
publishers: parsePersonList(rawBibliography.publicationInfo.publishers == null ? void 0 : "publisher" in rawBibliography.publicationInfo.publishers ? rawBibliography.publicationInfo.publishers.publisher : rawBibliography.publicationInfo.publishers.publishers.person, options),
|
|
@@ -1071,6 +1080,7 @@ function parseResource(rawResource, options) {
|
|
|
1071
1080
|
image: parseImage(rawResource.image, options),
|
|
1072
1081
|
document: parseContentLike(rawResource.document, options),
|
|
1073
1082
|
imageMap: parseImageMap(rawResource.imagemap),
|
|
1083
|
+
downloadOptions: parseDownloadOptions(rawResource.downloadOptions),
|
|
1074
1084
|
coordinates: parseCoordinates(rawResource.coordinates, options),
|
|
1075
1085
|
periods: parsePeriodList(rawResource.periods, options),
|
|
1076
1086
|
links: parseLinks(rawResource.links, options),
|
|
@@ -1237,5 +1247,4 @@ function parseItem(rawData, options) {
|
|
|
1237
1247
|
persistentUrl
|
|
1238
1248
|
};
|
|
1239
1249
|
}
|
|
1240
|
-
//#endregion
|
|
1241
1250
|
export { getParserOptions, parseBibliographyList, parseCoordinates, parseGallery, parseIdentification, parseItem, parseLinkedItems, parseLinks, parseMetadata, parseNotes, parsePersonList, parseProperties, parseSetItems, parseSimplifiedProperties, parseSpatialUnitMapData, parseStringLike };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { XMLMetadata } from "../xml/types.mjs";
|
|
2
|
-
//#region src/parsers/languages.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Validate language codes while preserving literal tuple inference
|
|
5
4
|
* @param languages - The language codes to validate
|
|
@@ -66,5 +65,4 @@ export declare function resolveLanguages<T extends ReadonlyArray<string>>(reques
|
|
|
66
65
|
*/
|
|
67
66
|
export declare function resolveDefaultLanguage<T extends ReadonlyArray<string>>(rawOchre: {
|
|
68
67
|
metadata: XMLMetadata;
|
|
69
|
-
}, languages: T): T[number];
|
|
70
|
-
//#endregion
|
|
68
|
+
}, languages: T): T[number];
|
|
@@ -3,7 +3,7 @@ import { readArrayProperty, readEntries } from "../reflection.mjs";
|
|
|
3
3
|
import { ochreLanguageCodeSchema } from "../schemas.mjs";
|
|
4
4
|
import { parseStringLike } from "./helpers.mjs";
|
|
5
5
|
import * as v from "valibot";
|
|
6
|
-
|
|
6
|
+
// src/parsers/languages.ts
|
|
7
7
|
/**
|
|
8
8
|
* A content entry carrying a language tag
|
|
9
9
|
*
|
|
@@ -123,5 +123,4 @@ function resolveDefaultLanguage(rawOchre, languages) {
|
|
|
123
123
|
if (firstLanguage == null) throw new Error("Default language not found", { cause: languages });
|
|
124
124
|
return firstLanguage;
|
|
125
125
|
}
|
|
126
|
-
//#endregion
|
|
127
126
|
export { defineLanguages, parseLanguages, parseMetadataLanguages, parseRequestedLanguages, resolveContentLanguages, resolveDefaultLanguage, resolveLanguages };
|
package/dist/parsers/mdx.d.mts
CHANGED
package/dist/parsers/mdx.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/parsers/mdx.ts
|
|
2
2
|
const MDX_LITERAL_EXPRESSION_REGEX = /[!#*<>[\]_`{|}~]/;
|
|
3
3
|
const MDX_LITERAL_BLOCK_REGEX = /(?:^|\n)[\t ]*(?:import|export|[+>-]|\d+[).])(?:[\t ]|$)/;
|
|
4
4
|
const MDX_MULTIPLE_SPACES_REGEX = / {2,}/g;
|
|
@@ -18,5 +18,4 @@ function serializeMDXContent(value) {
|
|
|
18
18
|
if (!MDX_INLINE_BOUNDARY_REGEX.test(content)) return content;
|
|
19
19
|
return content.endsWith("\n") ? `<>\n${content}</>` : `<>\n${content}\n</>`;
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
export { serializeMDXContent, serializeMDXText };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/parsers/multilingual.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* One text entry for a language. When OCHRE exposes multiple entries for the
|
|
4
3
|
* same language, the first one is primary.
|
|
@@ -310,5 +309,4 @@ export declare class MultilingualString<T extends ReadonlyArray<string> = Readon
|
|
|
310
309
|
*/
|
|
311
310
|
toJSON(): MultilingualStringJSON<T>;
|
|
312
311
|
}
|
|
313
|
-
//#endregion
|
|
314
312
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_LANGUAGES } from "../constants.mjs";
|
|
2
2
|
import { readProperty } from "../reflection.mjs";
|
|
3
3
|
import { serializeMDXText } from "./mdx.mjs";
|
|
4
|
-
|
|
4
|
+
// src/parsers/multilingual.ts
|
|
5
5
|
const MULTILINGUAL_STRING_INTERNAL_INIT = Symbol("MultilingualString.internalInit");
|
|
6
6
|
function normalizeInputText(text) {
|
|
7
7
|
return typeof text === "string" ? {
|
|
@@ -503,5 +503,4 @@ var MultilingualString = class MultilingualString {
|
|
|
503
503
|
};
|
|
504
504
|
}
|
|
505
505
|
};
|
|
506
|
-
//#endregion
|
|
507
506
|
export { MultilingualString };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/parsers/property-token.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The attributes a property value can carry its text in
|
|
4
3
|
*/
|
|
@@ -31,5 +30,4 @@ export declare function readPropertyValueText(value: PropertyValueTextSource, re
|
|
|
31
30
|
export declare function readPropertyValueUuid(value: {
|
|
32
31
|
uuid?: string;
|
|
33
32
|
} | undefined): string | null;
|
|
34
|
-
//#endregion
|
|
35
33
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/parsers/property-token.ts
|
|
2
2
|
/**
|
|
3
3
|
* The text a property value stands for
|
|
4
4
|
*
|
|
@@ -25,5 +25,4 @@ function readPropertyValueText(value, readContentText) {
|
|
|
25
25
|
function readPropertyValueUuid(value) {
|
|
26
26
|
return value?.uuid == null || value.uuid === "" ? null : value.uuid;
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { readPropertyValueText, readPropertyValueUuid };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MultilingualString, MultilingualStringText } from "./multilingual.mjs";
|
|
2
2
|
import { XMLContent, XMLString } from "../xml/types.mjs";
|
|
3
|
-
//#region src/parsers/string.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Rewrite a permanent identification URL as an OCHRE API endpoint
|
|
6
5
|
*
|
|
@@ -45,5 +44,4 @@ export declare function parseXMLContent<V extends ReadonlyArray<string>>(item: X
|
|
|
45
44
|
*
|
|
46
45
|
* @internal
|
|
47
46
|
*/
|
|
48
|
-
export declare function extractAliases(content: XMLContent | undefined): Array<string> | null;
|
|
49
|
-
//#endregion
|
|
47
|
+
export declare function extractAliases(content: XMLContent | undefined): Array<string> | null;
|
package/dist/parsers/string.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { MultilingualString } from "./multilingual.mjs";
|
|
|
6
6
|
import { readPropertyValueText, readPropertyValueUuid } from "./property-token.mjs";
|
|
7
7
|
import { renderOptionsSchema } from "../schemas.mjs";
|
|
8
8
|
import * as v from "valibot";
|
|
9
|
-
|
|
9
|
+
// src/parsers/string.ts
|
|
10
10
|
const TEXT_ANNOTATION_TOKEN = "text-annotation";
|
|
11
11
|
const TEXT_STYLING_TOKEN = "text-styling";
|
|
12
12
|
const HOVER_CARD_TOKEN = "hover-card";
|
|
@@ -507,5 +507,4 @@ function extractAliases(content) {
|
|
|
507
507
|
}
|
|
508
508
|
return aliases.length > 0 ? aliases : null;
|
|
509
509
|
}
|
|
510
|
-
//#endregion
|
|
511
510
|
export { extractAliases, parseXMLContent, parseXMLString, transformPermanentIdentificationUrl, transformPermanentIdentificationUrlToItemLink };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/parsers/website/bounds.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Parses raw bounds data into a standardized bounds structure
|
|
4
3
|
*
|
|
@@ -6,5 +5,4 @@
|
|
|
6
5
|
* @returns Parsed bounds object
|
|
7
6
|
* @internal
|
|
8
7
|
*/
|
|
9
|
-
export declare function parseBounds(bounds: string): [[number, number], [number, number]];
|
|
10
|
-
//#endregion
|
|
8
|
+
export declare function parseBounds(bounds: string): [[number, number], [number, number]];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/parsers/website/bounds.ts
|
|
2
2
|
/**
|
|
3
3
|
* Parses raw bounds data into a standardized bounds structure
|
|
4
4
|
*
|
|
@@ -24,5 +24,4 @@ function parseJsonBounds(bounds) {
|
|
|
24
24
|
function isNumberPairArray(value) {
|
|
25
25
|
return Array.isArray(value) && value.every((pair) => Array.isArray(pair) && pair.every((coordinate) => typeof coordinate === "number"));
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { parseBounds };
|
|
@@ -4,7 +4,6 @@ import { XMLWebsiteResource } from "../../xml/types.mjs";
|
|
|
4
4
|
import { ParserOptions } from "../helpers.mjs";
|
|
5
5
|
import { WebsitePresentationReader } from "./reader.mjs";
|
|
6
6
|
import { WebsitePageSlugs } from "./slug.mjs";
|
|
7
|
-
//#region src/parsers/website/components.d.ts
|
|
8
7
|
/**
|
|
9
8
|
* What every component parser is handed
|
|
10
9
|
*
|
|
@@ -88,5 +87,4 @@ export declare function parseWebTitle<T extends ReadonlyArray<string>>(propertie
|
|
|
88
87
|
* @returns Parsed WebElement object
|
|
89
88
|
*/
|
|
90
89
|
export declare function parseWebElement<T extends ReadonlyArray<string>>(elementResource: XMLWebsiteResource, options: ParserOptions<T>, pageSlugs: WebsitePageSlugs | undefined): WebElement<T>;
|
|
91
|
-
//#endregion
|
|
92
90
|
export {};
|
|
@@ -11,7 +11,7 @@ import { websitePresentationReader } from "./reader.mjs";
|
|
|
11
11
|
import { parseResponsiveCssStyles } from "./styles.mjs";
|
|
12
12
|
import { normalizeWebsiteResources } from "./walk.mjs";
|
|
13
13
|
import * as v from "valibot";
|
|
14
|
-
|
|
14
|
+
// src/parsers/website/components.ts
|
|
15
15
|
/**
|
|
16
16
|
* Default values for a collection's display properties, shared between the
|
|
17
17
|
* "collection" component and the "query" component's collection overrides.
|
|
@@ -717,5 +717,4 @@ function parseWebElement(elementResource, options, pageSlugs) {
|
|
|
717
717
|
...properties
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
|
-
//#endregion
|
|
721
720
|
export { WEB_ELEMENT_COMPONENT_PARSERS, parseWebElement, parseWebTitle };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Webpage, Website } from "../../types/website.mjs";
|
|
2
2
|
import { XMLWebsiteData, XMLWebsiteResource } from "../../xml/types.mjs";
|
|
3
3
|
import { ParserOptions } from "../helpers.mjs";
|
|
4
|
-
//#region src/parsers/website/index.d.ts
|
|
5
4
|
export declare function parseWebpageView<T extends ReadonlyArray<string>>(view: {
|
|
6
5
|
resource?: Array<XMLWebsiteResource>;
|
|
7
6
|
} | undefined, options: ParserOptions<T>, context: Pick<Website<T>, "belongsTo" | "metadata">): Webpage<T> | null;
|
|
8
7
|
export declare function parseWebsite<const T extends ReadonlyArray<string> = ReadonlyArray<string>>(data: XMLWebsiteData, options?: {
|
|
9
8
|
languages?: T;
|
|
10
|
-
}): Website<T>;
|
|
11
|
-
//#endregion
|
|
9
|
+
}): Website<T>;
|
|
@@ -7,7 +7,7 @@ import { emptyResponsiveStyles, parseResponsiveCssStyles } from "./styles.mjs";
|
|
|
7
7
|
import { collectWebsitePageSlugs, normalizeWebsiteResources, readWebsitePages } from "./walk.mjs";
|
|
8
8
|
import { parseWebElement, parseWebTitle } from "./components.mjs";
|
|
9
9
|
import { parseWebsiteProperties } from "./properties.mjs";
|
|
10
|
-
|
|
10
|
+
// src/parsers/website/index.ts
|
|
11
11
|
function isSidebarResource(resource, options) {
|
|
12
12
|
const resourceProperties = parseSimplifiedProperties(resource.properties, options);
|
|
13
13
|
const resourceReader = websitePresentationReader(resourceProperties);
|
|
@@ -317,5 +317,4 @@ function parseWebsite(data, options) {
|
|
|
317
317
|
for (const stylesheet of website.properties.options.stylesheets.properties) if (stylesheet.category === "propertyValue") stylesheet.label = styleLabels.get(stylesheet.uuid) ?? null;
|
|
318
318
|
return website;
|
|
319
319
|
}
|
|
320
|
-
//#endregion
|
|
321
320
|
export { parseWebpageView, parseWebsite };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { WebImage } from "../../types/website.mjs";
|
|
2
2
|
import { ItemLink, ItemLinkCategory, ItemLinks, PropertyValueContent } from "../../types/index.mjs";
|
|
3
3
|
import { WebsitePageSlugs } from "./slug.mjs";
|
|
4
|
-
//#region src/parsers/website/links.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* The link categories a website can point at
|
|
7
6
|
*/
|
|
@@ -32,5 +31,4 @@ export declare function parseWebsiteLinkTarget<T extends ReadonlyArray<string>>(
|
|
|
32
31
|
* @returns The image
|
|
33
32
|
* @internal
|
|
34
33
|
*/
|
|
35
|
-
export declare function webImageFromLink<T extends ReadonlyArray<string>>(link: ItemLinks<T>[number], quality: WebImage<T>["quality"]): WebImage<T>;
|
|
36
|
-
//#endregion
|
|
34
|
+
export declare function webImageFromLink<T extends ReadonlyArray<string>>(link: ItemLinks<T>[number], quality: WebImage<T>["quality"]): WebImage<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { transformPermanentIdentificationUrlToItemLink } from "../string.mjs";
|
|
2
|
-
|
|
2
|
+
// src/parsers/website/links.ts
|
|
3
3
|
function isWebsiteLink(link, category) {
|
|
4
4
|
return link.category === category;
|
|
5
5
|
}
|
|
@@ -54,5 +54,4 @@ function webImageFromLink(link, quality) {
|
|
|
54
54
|
quality
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { findWebsiteLink, findWebsiteLinkByCategories, getWebsiteLinks, parseWebsiteLinkTarget, webImageFromLink };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { WebElementComponent } from "../../types/website.mjs";
|
|
2
2
|
import { XMLWebsiteResource } from "../../xml/types.mjs";
|
|
3
|
-
//#region src/parsers/website/messages.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Name a resource well enough to find it in OCHRE from an error message
|
|
6
5
|
*
|
|
@@ -20,5 +19,4 @@ export declare function formatXMLWebsiteResourceMetadata(resource: XMLWebsiteRes
|
|
|
20
19
|
* @returns The error message
|
|
21
20
|
* @internal
|
|
22
21
|
*/
|
|
23
|
-
export declare function formatComponentError(message: string, componentName: WebElementComponent["component"] | undefined, elementResource: XMLWebsiteResource): string;
|
|
24
|
-
//#endregion
|
|
22
|
+
export declare function formatComponentError(message: string, componentName: WebElementComponent["component"] | undefined, elementResource: XMLWebsiteResource): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parseStringContent } from "../helpers.mjs";
|
|
2
|
-
|
|
2
|
+
// src/parsers/website/messages.ts
|
|
3
3
|
/**
|
|
4
4
|
* Name a resource well enough to find it in OCHRE from an error message
|
|
5
5
|
*
|
|
@@ -27,5 +27,4 @@ function formatXMLWebsiteResourceMetadata(resource) {
|
|
|
27
27
|
function formatComponentError(message, componentName, elementResource) {
|
|
28
28
|
return `${message} for component “${componentName ?? "(unknown)"}” (${formatXMLWebsiteResourceMetadata(elementResource)})`;
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
export { formatComponentError, formatXMLWebsiteResourceMetadata };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { WebOptions } from "../../types/website.mjs";
|
|
2
2
|
import { XMLWebsiteOptions } from "../../xml/types.mjs";
|
|
3
3
|
import { ParserOptions } from "../helpers.mjs";
|
|
4
|
-
|
|
5
|
-
export declare function parseWebsiteOptions<T extends ReadonlyArray<string>>(rawOptions: XMLWebsiteOptions | undefined, options: ParserOptions<T>): WebOptions<T>;
|
|
6
|
-
//#endregion
|
|
4
|
+
export declare function parseWebsiteOptions<T extends ReadonlyArray<string>>(rawOptions: XMLWebsiteOptions | undefined, options: ParserOptions<T>): WebOptions<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseContentLike } from "../helpers.mjs";
|
|
2
2
|
import { parseIdentification, parseNotes } from "../index.mjs";
|
|
3
|
-
|
|
3
|
+
// src/parsers/website/options.ts
|
|
4
4
|
function parseContextTreeLevel(contextItemToParse, options) {
|
|
5
5
|
let type = "";
|
|
6
6
|
const levels = [];
|
|
@@ -110,5 +110,4 @@ function parseWebsiteOptions(rawOptions, options) {
|
|
|
110
110
|
}
|
|
111
111
|
return parsedOptions;
|
|
112
112
|
}
|
|
113
|
-
//#endregion
|
|
114
113
|
export { parseWebsiteOptions };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { WebSidebar, Website } from "../../types/website.mjs";
|
|
2
2
|
import { XMLWebsiteProperties, XMLWebsiteTree } from "../../xml/types.mjs";
|
|
3
3
|
import { ParserOptions } from "../helpers.mjs";
|
|
4
|
-
//#region src/parsers/website/properties.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Parses raw website properties into a standardized Website properties structure
|
|
7
6
|
*
|
|
8
7
|
* @param properties - Array of raw website properties in OCHRE format
|
|
9
8
|
* @returns Parsed WebsiteProperties object
|
|
10
9
|
*/
|
|
11
|
-
export declare function parseWebsiteProperties<T extends ReadonlyArray<string>>(properties: XMLWebsiteProperties["property"], websiteTree: XMLWebsiteTree, sidebar: WebSidebar<T> | null, options: ParserOptions<T>, parent: Website<T>["properties"] | null): Website<T>["properties"];
|
|
12
|
-
//#endregion
|
|
10
|
+
export declare function parseWebsiteProperties<T extends ReadonlyArray<string>>(properties: XMLWebsiteProperties["property"], websiteTree: XMLWebsiteTree, sidebar: WebSidebar<T> | null, options: ParserOptions<T>, parent: Website<T>["properties"] | null): Website<T>["properties"];
|
|
@@ -2,7 +2,7 @@ import { parseSimplifiedProperties } from "../index.mjs";
|
|
|
2
2
|
import { parseWebsiteOptions } from "./options.mjs";
|
|
3
3
|
import { websitePresentationReader } from "./reader.mjs";
|
|
4
4
|
import { parseStylesheets } from "./styles.mjs";
|
|
5
|
-
|
|
5
|
+
// src/parsers/website/properties.ts
|
|
6
6
|
/**
|
|
7
7
|
* Parses raw website properties into a standardized Website properties structure
|
|
8
8
|
*
|
|
@@ -156,5 +156,4 @@ function parseWebsiteProperties(properties, websiteTree, sidebar, options, paren
|
|
|
156
156
|
}
|
|
157
157
|
return returnProperties;
|
|
158
158
|
}
|
|
159
|
-
//#endregion
|
|
160
159
|
export { parseWebsiteProperties };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MultilingualString } from "../multilingual.mjs";
|
|
2
2
|
import { LanguageCodes, PropertyValueContent, SimplifiedProperty } from "../../types/index.mjs";
|
|
3
3
|
import { ParserOptions } from "../helpers.mjs";
|
|
4
|
-
//#region src/parsers/website/reader.d.ts
|
|
5
4
|
type WebsitePropertyContent<T extends LanguageCodes> = PropertyValueContent<T>["content"];
|
|
6
5
|
/**
|
|
7
6
|
* The fields of an object that hold a UUID, which are the only ones
|
|
@@ -74,5 +73,4 @@ export declare class WebsitePresentationReader<T extends LanguageCodes> {
|
|
|
74
73
|
get size(): number;
|
|
75
74
|
}
|
|
76
75
|
export declare function websitePresentationReader<T extends LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>): WebsitePresentationReader<T>;
|
|
77
|
-
//#endregion
|
|
78
76
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getProperty, getPropertyValue } from "../../getters.mjs";
|
|
2
2
|
import { multilingualFromText } from "../helpers.mjs";
|
|
3
|
-
|
|
3
|
+
// src/parsers/website/reader.ts
|
|
4
4
|
/**
|
|
5
5
|
* Reads a website's presentation properties
|
|
6
6
|
*
|
|
@@ -118,5 +118,4 @@ var WebsitePresentationReader = class WebsitePresentationReader {
|
|
|
118
118
|
function websitePresentationReader(properties) {
|
|
119
119
|
return new WebsitePresentationReader(properties);
|
|
120
120
|
}
|
|
121
|
-
//#endregion
|
|
122
121
|
export { WebsitePresentationReader, websitePresentationReader };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/parsers/website/slug.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* How a website page slug is built
|
|
4
3
|
*
|
|
@@ -63,5 +62,4 @@ export declare function childSlugPrefix(pageSlug: string, slugPrefix: string | u
|
|
|
63
62
|
* attribute.
|
|
64
63
|
* @internal
|
|
65
64
|
*/
|
|
66
|
-
export declare const WEBSITE_PAGE_SLUG_DECLARATIONS: string;
|
|
67
|
-
//#endregion
|
|
65
|
+
export declare const WEBSITE_PAGE_SLUG_DECLARATIONS: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringLiteral } from "../../xquery.mjs";
|
|
2
|
-
|
|
2
|
+
// src/parsers/website/slug.ts
|
|
3
3
|
/**
|
|
4
4
|
* How a website page slug is built
|
|
5
5
|
*
|
|
@@ -85,5 +85,4 @@ declare function local:page-child-slug-prefix($resource, $slug-prefix) {
|
|
|
85
85
|
else local:page-slug($resource, $slug-prefix)
|
|
86
86
|
};
|
|
87
87
|
`;
|
|
88
|
-
//#endregion
|
|
89
88
|
export { SEGMENT_UNIQUE_SLUG_PREFIX_PATTERN, WEBSITE_PAGE_SLUG_DECLARATIONS, WEBSITE_PAGE_SLUG_SEPARATOR, childSlugPrefix, cleanWebsitePageSlug, prefixSlug };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ResponsiveStyles, StylesheetItem } from "../../types/website.mjs";
|
|
2
2
|
import { LanguageCodes, SimplifiedProperty } from "../../types/index.mjs";
|
|
3
3
|
import { XMLWebsiteStyle } from "../../xml/types.mjs";
|
|
4
|
-
//#region src/parsers/website/styles.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* The CSS declarations for every viewport a resource defines
|
|
7
6
|
* @param properties - Array of properties to parse
|
|
@@ -24,5 +23,4 @@ export declare function emptyResponsiveStyles(): ResponsiveStyles;
|
|
|
24
23
|
* @returns The parsed stylesheet items
|
|
25
24
|
* @internal
|
|
26
25
|
*/
|
|
27
|
-
export declare function parseStylesheets<T extends LanguageCodes>(styles: Array<XMLWebsiteStyle>): Array<StylesheetItem<T>>;
|
|
28
|
-
//#endregion
|
|
26
|
+
export declare function parseStylesheets<T extends LanguageCodes>(styles: Array<XMLWebsiteStyle>): Array<StylesheetItem<T>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getProperty } from "../../getters.mjs";
|
|
2
|
-
|
|
2
|
+
// src/parsers/website/styles.ts
|
|
3
3
|
const STYLESHEET_NON_STYLE_KEYS = /* @__PURE__ */ new Set([
|
|
4
4
|
"variableUuid",
|
|
5
5
|
"valueUuid",
|
|
@@ -100,5 +100,4 @@ function parseStylesheets(styles) {
|
|
|
100
100
|
}
|
|
101
101
|
return parsedStyles;
|
|
102
102
|
}
|
|
103
|
-
//#endregion
|
|
104
103
|
export { emptyResponsiveStyles, parseResponsiveCssStyles, parseStylesheets };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { XMLWebsiteResource, XMLWebsiteResourceItem, XMLWebsiteTree } from "../../xml/types.mjs";
|
|
2
2
|
import { ParserOptions } from "../helpers.mjs";
|
|
3
3
|
import { WebsitePageSlugs } from "./slug.mjs";
|
|
4
|
-
//#region src/parsers/website/walk.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* A page in a website, with its slug already resolved
|
|
7
6
|
*
|
|
@@ -64,5 +63,4 @@ export declare function collectWebsitePageSlugs<T extends ReadonlyArray<string>>
|
|
|
64
63
|
* presentation and reads segments off the same sequence.
|
|
65
64
|
* @internal
|
|
66
65
|
*/
|
|
67
|
-
export declare const WEBSITE_WALK_DECLARATIONS: string;
|
|
68
|
-
//#endregion
|
|
66
|
+
export declare const WEBSITE_WALK_DECLARATIONS: string;
|
|
@@ -4,7 +4,7 @@ import { stringLiteral } from "../../xquery.mjs";
|
|
|
4
4
|
import { formatXMLWebsiteResourceMetadata } from "./messages.mjs";
|
|
5
5
|
import { websitePresentationReader } from "./reader.mjs";
|
|
6
6
|
import { WEBSITE_PAGE_SLUG_DECLARATIONS, childSlugPrefix, cleanWebsitePageSlug, prefixSlug } from "./slug.mjs";
|
|
7
|
-
|
|
7
|
+
// src/parsers/website/walk.ts
|
|
8
8
|
/**
|
|
9
9
|
* Flatten the wrapper elements OCHRE nests resources in
|
|
10
10
|
*
|
|
@@ -112,5 +112,4 @@ declare function local:presentation($resource) {
|
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
${WEBSITE_PAGE_SLUG_DECLARATIONS}`;
|
|
115
|
-
//#endregion
|
|
116
115
|
export { WEBSITE_WALK_DECLARATIONS, collectWebsitePageSlugs, normalizeWebsiteResources, readWebsitePages };
|
package/dist/query.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PropertyRelation, Query } from "./types/index.mjs";
|
|
2
2
|
import { OchreContentLanguage, OchreQueryContext } from "./xquery.mjs";
|
|
3
|
-
//#region src/query.d.ts
|
|
4
3
|
export declare function buildBelongsToCollectionQueryExpression(belongsToCollectionScopeUuids: ReadonlyArray<string>, belongsToCollectionPropertyVariableUuid: string): string | null;
|
|
5
4
|
/**
|
|
6
5
|
* The scope variable and searchable path of each item container
|
|
@@ -111,5 +110,4 @@ export declare function getPropertyFacetSelectors(queries: Query | null): Array<
|
|
|
111
110
|
uuid: string;
|
|
112
111
|
relation: PropertyRelation | null;
|
|
113
112
|
}>;
|
|
114
|
-
//#endregion
|
|
115
113
|
export {};
|
package/dist/query.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BELONGS_TO_COLLECTION_UUID } from "./constants.mjs";
|
|
2
2
|
import { OCHRE_RESPONSE_PADDING, compileOchreQuery, stringLiteral } from "./xquery.mjs";
|
|
3
3
|
import { OCR_WORD_CONTENT_ATTRIBUTE, OCR_WORD_QNAMES, buildOcrWordPath } from "./ocr.mjs";
|
|
4
|
-
|
|
4
|
+
// src/query.ts
|
|
5
5
|
const CTS_INCLUDES_STOP_WORDS = /* @__PURE__ */ new Set([
|
|
6
6
|
"and",
|
|
7
7
|
"at",
|
|
@@ -1340,5 +1340,4 @@ function getPropertyFacetSelectors(queries) {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
return selectors.values().toArray();
|
|
1342
1342
|
}
|
|
1343
|
-
//#endregion
|
|
1344
1343
|
export { buildBelongsToCollectionQueryExpression, buildQueryPlan, compileContainerItemsQuery, getItemFilterQueries, getPropertyFacetSelectors };
|
package/dist/reflection.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/reflection.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Reading values whose shape is not known at compile time
|
|
4
3
|
*
|
|
@@ -60,5 +59,4 @@ export declare function readArrayProperty(value: unknown, key: PropertyKey): Rea
|
|
|
60
59
|
* @returns The string, or null when the property is absent or not one
|
|
61
60
|
* @internal
|
|
62
61
|
*/
|
|
63
|
-
export declare function readStringProperty(value: unknown, key: PropertyKey): string | null;
|
|
64
|
-
//#endregion
|
|
62
|
+
export declare function readStringProperty(value: unknown, key: PropertyKey): string | null;
|