@heroiclands/package-build 25.1.0 → 25.1.2
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/CHANGELOG.md +19 -0
- package/bin/content-commands.mjs +43 -6
- package/docs/api.md +7 -0
- package/docs/encoding-core.md +65 -7
- package/docs/guides/writing-in-invented-scripts.md +7 -0
- package/docs/reference/format-details.md +66 -63
- package/docs/reference/note-types.md +54 -51
- package/engine/content-alerts.mjs +2 -2
- package/engine/content-blocks.mjs +2 -2
- package/engine/content-index.mjs +23 -1
- package/engine/content-scripts.mjs +15 -6
- package/engine/content-scroll.mjs +2 -4
- package/engine/content-session.mjs +1 -0
- package/engine/content-timings.mjs +13 -1
- package/engine/content-verse.mjs +2 -2
- package/engine/dictionary-rows.mjs +14 -2
- package/engine/encoding-language.mjs +47 -20
- package/engine/encoding-lexicon.mjs +17 -3
- package/engine/encoding-template.mjs +99 -42
- package/engine/encoding-terms.mjs +42 -5
- package/engine/encoding.mjs +28 -22
- package/engine/heading-attributes.mjs +2 -5
- package/engine/language-writings.mjs +34 -1
- package/engine/markdown-blocks.mjs +58 -0
- package/package.json +1 -1
- package/types/engine/content-index.d.mts +28 -2
- package/types/engine/content-session.d.mts +1 -0
- package/types/engine/content-timings.d.mts +7 -0
- package/types/engine/encoding-lexicon.d.mts +6 -35
- package/types/engine/encoding-template.d.mts +1 -0
- package/types/engine/encoding-terms.d.mts +42 -4
- package/types/engine/encoding.d.mts +1 -1
- package/types/engine/language-writings.d.mts +3 -1
- package/types/engine/markdown-blocks.d.mts +8 -0
|
@@ -59,24 +59,11 @@ export function languageNoteFindings(config: {
|
|
|
59
59
|
* word's 0-based place in `data.words`, `native` the form's in its `native`.
|
|
60
60
|
*/
|
|
61
61
|
export function nativeRows(records: Iterable<Record<string, any>>): Array<Record<string, string | number | null>>;
|
|
62
|
-
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
[k: string]: any;
|
|
68
|
-
} | undefined;
|
|
69
|
-
words: {
|
|
70
|
-
[k: string]: any;
|
|
71
|
-
}[];
|
|
72
|
-
affixes: {
|
|
73
|
-
[k: string]: any;
|
|
74
|
-
}[];
|
|
75
|
-
register: {
|
|
76
|
-
[k: string]: any;
|
|
77
|
-
}[];
|
|
78
|
-
};
|
|
79
|
-
} | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Project only conversion-readable language data to a JSON-safe object. The
|
|
64
|
+
* projection of one lexicon is made once and shared, so it must not be modified.
|
|
65
|
+
*/
|
|
66
|
+
export function serializeLexicon(lexicon: any): any;
|
|
80
67
|
/**
|
|
81
68
|
* Resolve encoding, face and optional language input without loading files.
|
|
82
69
|
*
|
|
@@ -129,23 +116,7 @@ export function encodingFor(ctx: import("./content-scripts.mjs").RunContext, { e
|
|
|
129
116
|
};
|
|
130
117
|
}>;
|
|
131
118
|
font: any;
|
|
132
|
-
lexicon:
|
|
133
|
-
language: any;
|
|
134
|
-
data: {
|
|
135
|
-
grammar?: {
|
|
136
|
-
[k: string]: any;
|
|
137
|
-
} | undefined;
|
|
138
|
-
words: {
|
|
139
|
-
[k: string]: any;
|
|
140
|
-
}[];
|
|
141
|
-
affixes: {
|
|
142
|
-
[k: string]: any;
|
|
143
|
-
}[];
|
|
144
|
-
register: {
|
|
145
|
-
[k: string]: any;
|
|
146
|
-
}[];
|
|
147
|
-
};
|
|
148
|
-
} | undefined;
|
|
119
|
+
lexicon: any;
|
|
149
120
|
} | undefined;
|
|
150
121
|
/** Why a face is incompatible with the selected encoding. */
|
|
151
122
|
export function fontProblem(encoding: any, font: any): string | undefined;
|
|
@@ -12,6 +12,17 @@ export const ENCODING_RULE_FIELDS: readonly ({
|
|
|
12
12
|
shape: string;
|
|
13
13
|
describe: any;
|
|
14
14
|
fields: any;
|
|
15
|
+
} | {
|
|
16
|
+
name: string;
|
|
17
|
+
kind: string;
|
|
18
|
+
shape: string;
|
|
19
|
+
entries: {
|
|
20
|
+
kind: string;
|
|
21
|
+
shape: string;
|
|
22
|
+
describe: string;
|
|
23
|
+
fields?: undefined;
|
|
24
|
+
};
|
|
25
|
+
describe: string;
|
|
15
26
|
} | {
|
|
16
27
|
name: string;
|
|
17
28
|
kind: string;
|
|
@@ -20,13 +31,21 @@ export const ENCODING_RULE_FIELDS: readonly ({
|
|
|
20
31
|
entries: {
|
|
21
32
|
kind: string;
|
|
22
33
|
shape: string;
|
|
23
|
-
fields: {
|
|
34
|
+
fields: ({
|
|
35
|
+
name: any;
|
|
36
|
+
kind: string;
|
|
37
|
+
shape: string;
|
|
38
|
+
describe: any;
|
|
39
|
+
required: boolean;
|
|
40
|
+
} | {
|
|
41
|
+
allowed: string[];
|
|
24
42
|
name: any;
|
|
25
43
|
kind: string;
|
|
26
44
|
shape: string;
|
|
27
45
|
describe: any;
|
|
28
46
|
required: boolean;
|
|
29
|
-
}[];
|
|
47
|
+
})[];
|
|
48
|
+
describe?: undefined;
|
|
30
49
|
};
|
|
31
50
|
})[];
|
|
32
51
|
/** The additional data keys a document may use to define its encoding. */
|
|
@@ -82,6 +101,17 @@ export const ENCODING_NOTE_FIELDS: readonly ({
|
|
|
82
101
|
shape: string;
|
|
83
102
|
describe: any;
|
|
84
103
|
fields: any;
|
|
104
|
+
} | {
|
|
105
|
+
name: string;
|
|
106
|
+
kind: string;
|
|
107
|
+
shape: string;
|
|
108
|
+
entries: {
|
|
109
|
+
kind: string;
|
|
110
|
+
shape: string;
|
|
111
|
+
describe: string;
|
|
112
|
+
fields?: undefined;
|
|
113
|
+
};
|
|
114
|
+
describe: string;
|
|
85
115
|
} | {
|
|
86
116
|
name: string;
|
|
87
117
|
kind: string;
|
|
@@ -90,13 +120,21 @@ export const ENCODING_NOTE_FIELDS: readonly ({
|
|
|
90
120
|
entries: {
|
|
91
121
|
kind: string;
|
|
92
122
|
shape: string;
|
|
93
|
-
fields: {
|
|
123
|
+
fields: ({
|
|
124
|
+
name: any;
|
|
125
|
+
kind: string;
|
|
126
|
+
shape: string;
|
|
127
|
+
describe: any;
|
|
128
|
+
required: boolean;
|
|
129
|
+
} | {
|
|
130
|
+
allowed: string[];
|
|
94
131
|
name: any;
|
|
95
132
|
kind: string;
|
|
96
133
|
shape: string;
|
|
97
134
|
describe: any;
|
|
98
135
|
required: boolean;
|
|
99
|
-
}[];
|
|
136
|
+
})[];
|
|
137
|
+
describe?: undefined;
|
|
100
138
|
};
|
|
101
139
|
})[];
|
|
102
140
|
describe: string;
|
|
@@ -128,7 +128,7 @@ export function encodeText(enc: ReturnType<typeof compileEncoding>, text: string
|
|
|
128
128
|
verse?: boolean;
|
|
129
129
|
}): string;
|
|
130
130
|
/**
|
|
131
|
-
* Decode
|
|
131
|
+
* Decode exact output or the conventional reading of an explicitly canonical note.
|
|
132
132
|
* @param {ReturnType<typeof compileEncoding>} enc - Compiled encoding note.
|
|
133
133
|
* @param {string} text - Native text with optional literal spans.
|
|
134
134
|
* @param {{font?: string}} [options] - Selected encoding face.
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export function nativeText(natives: unknown, enc: string, font: string | undefined): string | undefined;
|
|
18
18
|
/**
|
|
19
|
-
* The writings of a language's words under one encoding in one face.
|
|
19
|
+
* The writings of a language's words under one encoding in one face. One
|
|
20
|
+
* `data` yields one set of writings per encoding and face, and each word's
|
|
21
|
+
* writing is found once, so `data` must not be modified once it is read here.
|
|
20
22
|
*
|
|
21
23
|
* @param {Record<string, any>|undefined} data - The language note's `data`.
|
|
22
24
|
* @param {string} enc - The encoding's name.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The block tokens of a Markdown source. The array is shared between callers
|
|
3
|
+
* and must not be modified; an `inline` token carries no `children`.
|
|
4
|
+
*
|
|
5
|
+
* @param {unknown} source - Markdown.
|
|
6
|
+
* @returns {readonly import("markdown-it").Token[]} The block tokens, in order.
|
|
7
|
+
*/
|
|
8
|
+
export function blockTokens(source: unknown): readonly import("markdown-it").Token[];
|