@drghaliasri/butex 8.0.2 → 8.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/README.md +7 -7
- package/dist/document-cli.js +231 -88
- package/dist/document-cli.js.map +1 -1
- package/dist/document.d.mts +35 -2
- package/dist/document.d.ts +35 -2
- package/dist/document.js +187 -100
- package/dist/document.js.map +1 -1
- package/dist/document.mjs +182 -100
- package/dist/document.mjs.map +1 -1
- package/dist/react-document-preview.d.mts +4 -0
- package/dist/react-document-preview.d.ts +4 -0
- package/dist/react-document-preview.js +78 -71
- package/dist/react-document-preview.js.map +1 -1
- package/dist/react-document-preview.mjs +78 -71
- package/dist/react-document-preview.mjs.map +1 -1
- package/dist/react-document.d.mts +8 -1
- package/dist/react-document.d.ts +8 -1
- package/dist/react-document.js +177 -115
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +177 -115
- package/dist/react-document.mjs.map +1 -1
- package/package.json +1 -1
package/dist/document.d.mts
CHANGED
|
@@ -158,12 +158,14 @@ type MathObject2Json = {
|
|
|
158
158
|
source_owner?: 'imported-structured' | 'editor';
|
|
159
159
|
label_enabled?: boolean;
|
|
160
160
|
label?: string;
|
|
161
|
+
numbered?: boolean;
|
|
161
162
|
};
|
|
162
163
|
/** Positional metadata for a raw-only span that has no structured equation AST. */
|
|
163
164
|
type RawMathObject2Json = {
|
|
164
165
|
node_type: 'RawMathObject';
|
|
165
166
|
label_enabled?: boolean;
|
|
166
167
|
label?: string;
|
|
168
|
+
numbered?: boolean;
|
|
167
169
|
};
|
|
168
170
|
type DocumentMathObjectJson = MathObject2Json | RawMathObject2Json;
|
|
169
171
|
type ReferenceFieldSeparator = ',' | '،';
|
|
@@ -295,6 +297,8 @@ type MathToken2 = {
|
|
|
295
297
|
/** When true on display math, export as equation env with \\label. */
|
|
296
298
|
labelEnabled?: boolean;
|
|
297
299
|
label?: string;
|
|
300
|
+
/** Independent display-equation numbering override; absent means legacy semantics. */
|
|
301
|
+
numbered?: boolean;
|
|
298
302
|
};
|
|
299
303
|
type CiteToken2 = {
|
|
300
304
|
id: string;
|
|
@@ -426,6 +430,7 @@ type PreviewInline2 = {
|
|
|
426
430
|
display: boolean;
|
|
427
431
|
output: DocumentMathOutput;
|
|
428
432
|
editable: boolean;
|
|
433
|
+
numberLabel?: string;
|
|
429
434
|
} | {
|
|
430
435
|
kind: 'cite';
|
|
431
436
|
id: string;
|
|
@@ -585,8 +590,26 @@ declare function parseRefKeys(source: string): {
|
|
|
585
590
|
refCommand: 'ref' | 'eqref';
|
|
586
591
|
};
|
|
587
592
|
declare function refTokenLatex(keys: string[], refCommand: 'ref' | 'eqref'): string;
|
|
588
|
-
/**
|
|
593
|
+
/** Deterministic, reversible, TeX-safe reference key from a persisted target ID. */
|
|
594
|
+
declare function implicitReferenceKey(kind: DocumentLabelKind, ownerId: string, unitId?: string): string;
|
|
595
|
+
/** Explicit numbering wins; legacy labeled/equation-environment math stays numbered. */
|
|
596
|
+
declare function isNumberedEquation(token: MathToken2): boolean;
|
|
597
|
+
declare function isNumberedFloat(block: ImageBlock2 | TableBlock2): boolean;
|
|
598
|
+
type DocumentReferenceTarget = {
|
|
599
|
+
key: string;
|
|
600
|
+
kind: DocumentLabelKind;
|
|
601
|
+
caption: string;
|
|
602
|
+
ownerId: string;
|
|
603
|
+
/** null means a displayed equation that has not been numbered. */
|
|
604
|
+
number: number | null;
|
|
605
|
+
manualKey?: string;
|
|
606
|
+
};
|
|
607
|
+
/** Projection of object identities and ordinals; never mutates document state. */
|
|
608
|
+
declare function collectDocumentReferenceTargets(document: DocumentNode): DocumentReferenceTarget[];
|
|
609
|
+
/** Author-managed manual labels only; auto keys are not editable author metadata. */
|
|
589
610
|
declare function collectDocumentLabels(document: DocumentNode): DocumentLabelEntry[];
|
|
611
|
+
/** Key collision checks include generated aliases without adding persistence fields. */
|
|
612
|
+
declare function collectDocumentKeyLabels(document: DocumentNode): Array<Pick<DocumentLabelEntry, 'key' | 'ownerId'>>;
|
|
590
613
|
declare function labelNumberMap(document: DocumentNode): Map<string, {
|
|
591
614
|
kind: DocumentLabelKind;
|
|
592
615
|
number: number;
|
|
@@ -688,6 +711,7 @@ declare function updateDocumentTableMeta(document: DocumentNode, blockId: string
|
|
|
688
711
|
declare function updateMathTokenLabel(document: DocumentNode, tokenId: string, patch: {
|
|
689
712
|
labelEnabled?: boolean;
|
|
690
713
|
label?: string;
|
|
714
|
+
numbered?: boolean;
|
|
691
715
|
}): DocumentNode;
|
|
692
716
|
declare function insertRefTokenAtCaret(document: DocumentNode, fieldId: string, textTokenId: string | null, caretOffset: number, keys: string[], refCommand?: 'ref' | 'eqref'): DocumentNode;
|
|
693
717
|
declare function updateRefTokenKeys(document: DocumentNode, tokenId: string, keys: string[], refCommand?: 'ref' | 'eqref'): DocumentNode;
|
|
@@ -839,6 +863,11 @@ type DocumentCommand = ({
|
|
|
839
863
|
op: 'remove_inline_token';
|
|
840
864
|
field_id: string;
|
|
841
865
|
token_id: string;
|
|
866
|
+
} | {
|
|
867
|
+
op: 'set_equation_numbering';
|
|
868
|
+
field_id: string;
|
|
869
|
+
token_id: string;
|
|
870
|
+
numbered: boolean;
|
|
842
871
|
} | ({
|
|
843
872
|
op: 'insert_list';
|
|
844
873
|
ordered: boolean;
|
|
@@ -975,6 +1004,10 @@ type DocumentReferenceIndex = {
|
|
|
975
1004
|
citations: DocumentCitationIndexEntry[];
|
|
976
1005
|
cross_references: DocumentCrossReferenceIndexEntry[];
|
|
977
1006
|
labels: DocumentIndexedLabel[];
|
|
1007
|
+
reference_targets: Array<Omit<DocumentIndexedLabel, 'number'> & {
|
|
1008
|
+
number: number | null;
|
|
1009
|
+
manual_key?: string;
|
|
1010
|
+
}>;
|
|
978
1011
|
unresolved: {
|
|
979
1012
|
citation_keys: string[];
|
|
980
1013
|
cross_reference_keys: string[];
|
|
@@ -1153,4 +1186,4 @@ declare function documentPreview(document: DocumentNode, output?: DocumentMathOu
|
|
|
1153
1186
|
*/
|
|
1154
1187
|
declare function documentLatex(document: DocumentNode, options?: DocumentLatexOptions): string;
|
|
1155
1188
|
|
|
1156
|
-
export { type ArabicDigitsMapping, type ArabicXeLatexPreambleOptions, BUTEX_BASMALA, BUTEX_BASMALA_LINE1, BUTEX_BASMALA_LINE2, BUTEX_BASMALA_SALAWAT, BUTEX_CLOSING_HAMDALA, type BibliographyBlock2, type BlockSelectionRange, type BlockSelectionState, type CiteToken2, DEFAULT_DOCUMENT_HISTORY_MAX_DEPTH, DEFAULT_HIJRI_DATE, DEFAULT_REFERENCE_FIELD_SEPARATOR, type DocumentAnchor, type DocumentBlock, type DocumentBlockJson, type DocumentBlockMetadata, type DocumentCitationIndexEntry, type DocumentCommand, DocumentCommandError, type DocumentCommandErrorCode, type DocumentCrossReferenceIndexEntry, type DocumentDiagnostic, type DocumentDiff, type DocumentDiffChunk, type DocumentDiffChunkKind, type DocumentDirection, type DocumentHijriDate, type DocumentHistoryStacks, type DocumentImageAssetRef, type DocumentIndexedLabel, type DocumentInlineAnchor, type DocumentInlineIdsJson, type DocumentInlineTokenIdJson, type DocumentInlineTokenInput, type DocumentJson, type DocumentKeyError, type DocumentKeyNamespace, type DocumentLabelEntry, type DocumentLabelKind, type DocumentLatexOptions, type DocumentListItemAnchor, type DocumentMathObjectJson, type DocumentMathOutput, type DocumentMeta, type DocumentMetaProp, type DocumentNode, type DocumentOutlineEntry, type DocumentOutlineKind, type DocumentPreview, type DocumentPreviewOptions, type DocumentReferenceAnchor, type DocumentReferenceIndex, type DocumentTextBlockKind, DocumentValidationError, type DocumentValidationIssue, type DocumentValidationIssueCode, type DocumentValidationResult, type FloatMeta2, type FloatMetaPatch, type FormatCiteLabelOptions, type FormatFloatCaptionTitleOptions, HIJRI_MONTH_IDS, HIJRI_YEAR_MAX, HIJRI_YEAR_MIN, type HijriMonthId, type ImageBlock2, type ImportDocumentOptions, type InlineField2, type InlineToken2, type ListBlock2, type ListItem2, type MathIsland2, type MathObject2Json, type MathToken2, type PreviewBlock2, type PreviewInline2, type RawBlock2, type RawMathObject2Json, type RefToken2, type Reference2, type Reference2Json, type ReferenceFieldSeparator, type TableBlock2, type TextBlock2, type TextFormatSpan2Json, type TextStyle2, type TextToken2, absoluteHttpHref, addDocumentImageBlock, addDocumentListBlock, addDocumentListItem, addDocumentReference, addDocumentTableBlock, addDocumentTextBlock, applyDocumentCommand, applyFloatMetaPatch, arabicXeLatexPreambleCmd, arabicXeLatexPreambleFont, arabicXeLatexPreamblePkg, bibliographyEntryBody, bibliographyEntryLatex, butexBasmalaDisplayLatex, butexBasmalaDisplayTex, butexBasmalaTitlingPreamble, butexDiwaniDisplayLatex, butexDiwaniDisplayTex, butexInColumnMaketitleHook, butexMaghribiDisplayLatex, butexMaghribiDisplayTex, citeTokenLatex, clearDocumentImageAsset, cloneDocumentMeta, cloneDocumentNode, collectDocumentLabels, createDocumentHistory, createEmptyArabicEquationSession, createEmptyDocument, createEmptyEquationSession, createEmptyReference, createInlineField, defaultFloatMeta, detectInlineSpans, detectMathSpans, diffDocument, documentHasAbstract, documentHasMaketitle, documentHasTitleStack, documentHistoryCanRedo, documentHistoryCanUndo, documentKeyError, documentLatex, documentOutline, documentPreview, emptyBlockSelection, emptyDocumentMeta, ensureDocumentBibliographyBlock, extendBlockSelectionFromAnchor, fillDocumentMetaGaps, findFirstInlineField, formatBibliographyNumber, formatCiteLabel, formatFloatCaptionPreview, formatFloatCaptionTitle, formatHijriDate, formatRefLabel, fromDocumentJson, getArabicXeLatexPreamble, getDocumentReferenceIndex, getDocumentReferences, hasXeLatexUnsupportedEmoji, hijriMonthLabel, inlineFieldLatex, insertCiteTokenAtCaret, insertDocumentBlockAfter, insertMathToken, insertMathTokenAtCaret, insertRefTokenAtCaret, isDocumentValid, isDuplicateDocumentKey, isValidDocumentKey, labelNumberMap, mathNodeFromArabicSession, mathNodeFromSession, mathSourceFromArabicSession, mathSourceFromSession, mathTokenSourceForSide, mathTokenToArabicEditorSession, mathTokenToEditorSession, mergeDocumentMeta, moveDocumentBlockById, moveDocumentBlockRange, moveDocumentReference, normalizeBlockSelection, normalizeDocumentHijriDate, normalizeDocumentKey, normalizeDocumentMeta, normalizeReferenceFieldSeparator, parseCiteKeys, parseFloatMetaFromJson, parseRefKeys, pushDocumentSnapshot, refTokenLatex, referenceFromJson, referenceNumberMap, remapSelectionAfterRangeMove, removeCiteTokenById, removeDocumentBlockById, removeDocumentBlockRange, removeDocumentListItem, removeDocumentReference, removeMathTokenById, removeRefTokenById, replaceMathTokenFromSession, resolveCiteNumbers, restoreDocumentRedo, restoreDocumentUndo, setDocumentReferences, stripDisplayMathDelimiters, toDocumentJson, toggleBlockInSelection, toggleTextTokenStyle, updateCiteTokenKeys, updateDocumentImageAsset, updateDocumentImageMeta, updateDocumentImageValue, updateDocumentMeta, updateDocumentReference, updateDocumentTableMeta, updateDocumentTextBlockCentered, updateMathTokenLabel, updateRefTokenKeys, updateTextToken, validateDocument };
|
|
1189
|
+
export { type ArabicDigitsMapping, type ArabicXeLatexPreambleOptions, BUTEX_BASMALA, BUTEX_BASMALA_LINE1, BUTEX_BASMALA_LINE2, BUTEX_BASMALA_SALAWAT, BUTEX_CLOSING_HAMDALA, type BibliographyBlock2, type BlockSelectionRange, type BlockSelectionState, type CiteToken2, DEFAULT_DOCUMENT_HISTORY_MAX_DEPTH, DEFAULT_HIJRI_DATE, DEFAULT_REFERENCE_FIELD_SEPARATOR, type DocumentAnchor, type DocumentBlock, type DocumentBlockJson, type DocumentBlockMetadata, type DocumentCitationIndexEntry, type DocumentCommand, DocumentCommandError, type DocumentCommandErrorCode, type DocumentCrossReferenceIndexEntry, type DocumentDiagnostic, type DocumentDiff, type DocumentDiffChunk, type DocumentDiffChunkKind, type DocumentDirection, type DocumentHijriDate, type DocumentHistoryStacks, type DocumentImageAssetRef, type DocumentIndexedLabel, type DocumentInlineAnchor, type DocumentInlineIdsJson, type DocumentInlineTokenIdJson, type DocumentInlineTokenInput, type DocumentJson, type DocumentKeyError, type DocumentKeyNamespace, type DocumentLabelEntry, type DocumentLabelKind, type DocumentLatexOptions, type DocumentListItemAnchor, type DocumentMathObjectJson, type DocumentMathOutput, type DocumentMeta, type DocumentMetaProp, type DocumentNode, type DocumentOutlineEntry, type DocumentOutlineKind, type DocumentPreview, type DocumentPreviewOptions, type DocumentReferenceAnchor, type DocumentReferenceIndex, type DocumentReferenceTarget, type DocumentTextBlockKind, DocumentValidationError, type DocumentValidationIssue, type DocumentValidationIssueCode, type DocumentValidationResult, type FloatMeta2, type FloatMetaPatch, type FormatCiteLabelOptions, type FormatFloatCaptionTitleOptions, HIJRI_MONTH_IDS, HIJRI_YEAR_MAX, HIJRI_YEAR_MIN, type HijriMonthId, type ImageBlock2, type ImportDocumentOptions, type InlineField2, type InlineToken2, type ListBlock2, type ListItem2, type MathIsland2, type MathObject2Json, type MathToken2, type PreviewBlock2, type PreviewInline2, type RawBlock2, type RawMathObject2Json, type RefToken2, type Reference2, type Reference2Json, type ReferenceFieldSeparator, type TableBlock2, type TextBlock2, type TextFormatSpan2Json, type TextStyle2, type TextToken2, absoluteHttpHref, addDocumentImageBlock, addDocumentListBlock, addDocumentListItem, addDocumentReference, addDocumentTableBlock, addDocumentTextBlock, applyDocumentCommand, applyFloatMetaPatch, arabicXeLatexPreambleCmd, arabicXeLatexPreambleFont, arabicXeLatexPreamblePkg, bibliographyEntryBody, bibliographyEntryLatex, butexBasmalaDisplayLatex, butexBasmalaDisplayTex, butexBasmalaTitlingPreamble, butexDiwaniDisplayLatex, butexDiwaniDisplayTex, butexInColumnMaketitleHook, butexMaghribiDisplayLatex, butexMaghribiDisplayTex, citeTokenLatex, clearDocumentImageAsset, cloneDocumentMeta, cloneDocumentNode, collectDocumentKeyLabels, collectDocumentLabels, collectDocumentReferenceTargets, createDocumentHistory, createEmptyArabicEquationSession, createEmptyDocument, createEmptyEquationSession, createEmptyReference, createInlineField, defaultFloatMeta, detectInlineSpans, detectMathSpans, diffDocument, documentHasAbstract, documentHasMaketitle, documentHasTitleStack, documentHistoryCanRedo, documentHistoryCanUndo, documentKeyError, documentLatex, documentOutline, documentPreview, emptyBlockSelection, emptyDocumentMeta, ensureDocumentBibliographyBlock, extendBlockSelectionFromAnchor, fillDocumentMetaGaps, findFirstInlineField, formatBibliographyNumber, formatCiteLabel, formatFloatCaptionPreview, formatFloatCaptionTitle, formatHijriDate, formatRefLabel, fromDocumentJson, getArabicXeLatexPreamble, getDocumentReferenceIndex, getDocumentReferences, hasXeLatexUnsupportedEmoji, hijriMonthLabel, implicitReferenceKey, inlineFieldLatex, insertCiteTokenAtCaret, insertDocumentBlockAfter, insertMathToken, insertMathTokenAtCaret, insertRefTokenAtCaret, isDocumentValid, isDuplicateDocumentKey, isNumberedEquation, isNumberedFloat, isValidDocumentKey, labelNumberMap, mathNodeFromArabicSession, mathNodeFromSession, mathSourceFromArabicSession, mathSourceFromSession, mathTokenSourceForSide, mathTokenToArabicEditorSession, mathTokenToEditorSession, mergeDocumentMeta, moveDocumentBlockById, moveDocumentBlockRange, moveDocumentReference, normalizeBlockSelection, normalizeDocumentHijriDate, normalizeDocumentKey, normalizeDocumentMeta, normalizeReferenceFieldSeparator, parseCiteKeys, parseFloatMetaFromJson, parseRefKeys, pushDocumentSnapshot, refTokenLatex, referenceFromJson, referenceNumberMap, remapSelectionAfterRangeMove, removeCiteTokenById, removeDocumentBlockById, removeDocumentBlockRange, removeDocumentListItem, removeDocumentReference, removeMathTokenById, removeRefTokenById, replaceMathTokenFromSession, resolveCiteNumbers, restoreDocumentRedo, restoreDocumentUndo, setDocumentReferences, stripDisplayMathDelimiters, toDocumentJson, toggleBlockInSelection, toggleTextTokenStyle, updateCiteTokenKeys, updateDocumentImageAsset, updateDocumentImageMeta, updateDocumentImageValue, updateDocumentMeta, updateDocumentReference, updateDocumentTableMeta, updateDocumentTextBlockCentered, updateMathTokenLabel, updateRefTokenKeys, updateTextToken, validateDocument };
|
package/dist/document.d.ts
CHANGED
|
@@ -158,12 +158,14 @@ type MathObject2Json = {
|
|
|
158
158
|
source_owner?: 'imported-structured' | 'editor';
|
|
159
159
|
label_enabled?: boolean;
|
|
160
160
|
label?: string;
|
|
161
|
+
numbered?: boolean;
|
|
161
162
|
};
|
|
162
163
|
/** Positional metadata for a raw-only span that has no structured equation AST. */
|
|
163
164
|
type RawMathObject2Json = {
|
|
164
165
|
node_type: 'RawMathObject';
|
|
165
166
|
label_enabled?: boolean;
|
|
166
167
|
label?: string;
|
|
168
|
+
numbered?: boolean;
|
|
167
169
|
};
|
|
168
170
|
type DocumentMathObjectJson = MathObject2Json | RawMathObject2Json;
|
|
169
171
|
type ReferenceFieldSeparator = ',' | '،';
|
|
@@ -295,6 +297,8 @@ type MathToken2 = {
|
|
|
295
297
|
/** When true on display math, export as equation env with \\label. */
|
|
296
298
|
labelEnabled?: boolean;
|
|
297
299
|
label?: string;
|
|
300
|
+
/** Independent display-equation numbering override; absent means legacy semantics. */
|
|
301
|
+
numbered?: boolean;
|
|
298
302
|
};
|
|
299
303
|
type CiteToken2 = {
|
|
300
304
|
id: string;
|
|
@@ -426,6 +430,7 @@ type PreviewInline2 = {
|
|
|
426
430
|
display: boolean;
|
|
427
431
|
output: DocumentMathOutput;
|
|
428
432
|
editable: boolean;
|
|
433
|
+
numberLabel?: string;
|
|
429
434
|
} | {
|
|
430
435
|
kind: 'cite';
|
|
431
436
|
id: string;
|
|
@@ -585,8 +590,26 @@ declare function parseRefKeys(source: string): {
|
|
|
585
590
|
refCommand: 'ref' | 'eqref';
|
|
586
591
|
};
|
|
587
592
|
declare function refTokenLatex(keys: string[], refCommand: 'ref' | 'eqref'): string;
|
|
588
|
-
/**
|
|
593
|
+
/** Deterministic, reversible, TeX-safe reference key from a persisted target ID. */
|
|
594
|
+
declare function implicitReferenceKey(kind: DocumentLabelKind, ownerId: string, unitId?: string): string;
|
|
595
|
+
/** Explicit numbering wins; legacy labeled/equation-environment math stays numbered. */
|
|
596
|
+
declare function isNumberedEquation(token: MathToken2): boolean;
|
|
597
|
+
declare function isNumberedFloat(block: ImageBlock2 | TableBlock2): boolean;
|
|
598
|
+
type DocumentReferenceTarget = {
|
|
599
|
+
key: string;
|
|
600
|
+
kind: DocumentLabelKind;
|
|
601
|
+
caption: string;
|
|
602
|
+
ownerId: string;
|
|
603
|
+
/** null means a displayed equation that has not been numbered. */
|
|
604
|
+
number: number | null;
|
|
605
|
+
manualKey?: string;
|
|
606
|
+
};
|
|
607
|
+
/** Projection of object identities and ordinals; never mutates document state. */
|
|
608
|
+
declare function collectDocumentReferenceTargets(document: DocumentNode): DocumentReferenceTarget[];
|
|
609
|
+
/** Author-managed manual labels only; auto keys are not editable author metadata. */
|
|
589
610
|
declare function collectDocumentLabels(document: DocumentNode): DocumentLabelEntry[];
|
|
611
|
+
/** Key collision checks include generated aliases without adding persistence fields. */
|
|
612
|
+
declare function collectDocumentKeyLabels(document: DocumentNode): Array<Pick<DocumentLabelEntry, 'key' | 'ownerId'>>;
|
|
590
613
|
declare function labelNumberMap(document: DocumentNode): Map<string, {
|
|
591
614
|
kind: DocumentLabelKind;
|
|
592
615
|
number: number;
|
|
@@ -688,6 +711,7 @@ declare function updateDocumentTableMeta(document: DocumentNode, blockId: string
|
|
|
688
711
|
declare function updateMathTokenLabel(document: DocumentNode, tokenId: string, patch: {
|
|
689
712
|
labelEnabled?: boolean;
|
|
690
713
|
label?: string;
|
|
714
|
+
numbered?: boolean;
|
|
691
715
|
}): DocumentNode;
|
|
692
716
|
declare function insertRefTokenAtCaret(document: DocumentNode, fieldId: string, textTokenId: string | null, caretOffset: number, keys: string[], refCommand?: 'ref' | 'eqref'): DocumentNode;
|
|
693
717
|
declare function updateRefTokenKeys(document: DocumentNode, tokenId: string, keys: string[], refCommand?: 'ref' | 'eqref'): DocumentNode;
|
|
@@ -839,6 +863,11 @@ type DocumentCommand = ({
|
|
|
839
863
|
op: 'remove_inline_token';
|
|
840
864
|
field_id: string;
|
|
841
865
|
token_id: string;
|
|
866
|
+
} | {
|
|
867
|
+
op: 'set_equation_numbering';
|
|
868
|
+
field_id: string;
|
|
869
|
+
token_id: string;
|
|
870
|
+
numbered: boolean;
|
|
842
871
|
} | ({
|
|
843
872
|
op: 'insert_list';
|
|
844
873
|
ordered: boolean;
|
|
@@ -975,6 +1004,10 @@ type DocumentReferenceIndex = {
|
|
|
975
1004
|
citations: DocumentCitationIndexEntry[];
|
|
976
1005
|
cross_references: DocumentCrossReferenceIndexEntry[];
|
|
977
1006
|
labels: DocumentIndexedLabel[];
|
|
1007
|
+
reference_targets: Array<Omit<DocumentIndexedLabel, 'number'> & {
|
|
1008
|
+
number: number | null;
|
|
1009
|
+
manual_key?: string;
|
|
1010
|
+
}>;
|
|
978
1011
|
unresolved: {
|
|
979
1012
|
citation_keys: string[];
|
|
980
1013
|
cross_reference_keys: string[];
|
|
@@ -1153,4 +1186,4 @@ declare function documentPreview(document: DocumentNode, output?: DocumentMathOu
|
|
|
1153
1186
|
*/
|
|
1154
1187
|
declare function documentLatex(document: DocumentNode, options?: DocumentLatexOptions): string;
|
|
1155
1188
|
|
|
1156
|
-
export { type ArabicDigitsMapping, type ArabicXeLatexPreambleOptions, BUTEX_BASMALA, BUTEX_BASMALA_LINE1, BUTEX_BASMALA_LINE2, BUTEX_BASMALA_SALAWAT, BUTEX_CLOSING_HAMDALA, type BibliographyBlock2, type BlockSelectionRange, type BlockSelectionState, type CiteToken2, DEFAULT_DOCUMENT_HISTORY_MAX_DEPTH, DEFAULT_HIJRI_DATE, DEFAULT_REFERENCE_FIELD_SEPARATOR, type DocumentAnchor, type DocumentBlock, type DocumentBlockJson, type DocumentBlockMetadata, type DocumentCitationIndexEntry, type DocumentCommand, DocumentCommandError, type DocumentCommandErrorCode, type DocumentCrossReferenceIndexEntry, type DocumentDiagnostic, type DocumentDiff, type DocumentDiffChunk, type DocumentDiffChunkKind, type DocumentDirection, type DocumentHijriDate, type DocumentHistoryStacks, type DocumentImageAssetRef, type DocumentIndexedLabel, type DocumentInlineAnchor, type DocumentInlineIdsJson, type DocumentInlineTokenIdJson, type DocumentInlineTokenInput, type DocumentJson, type DocumentKeyError, type DocumentKeyNamespace, type DocumentLabelEntry, type DocumentLabelKind, type DocumentLatexOptions, type DocumentListItemAnchor, type DocumentMathObjectJson, type DocumentMathOutput, type DocumentMeta, type DocumentMetaProp, type DocumentNode, type DocumentOutlineEntry, type DocumentOutlineKind, type DocumentPreview, type DocumentPreviewOptions, type DocumentReferenceAnchor, type DocumentReferenceIndex, type DocumentTextBlockKind, DocumentValidationError, type DocumentValidationIssue, type DocumentValidationIssueCode, type DocumentValidationResult, type FloatMeta2, type FloatMetaPatch, type FormatCiteLabelOptions, type FormatFloatCaptionTitleOptions, HIJRI_MONTH_IDS, HIJRI_YEAR_MAX, HIJRI_YEAR_MIN, type HijriMonthId, type ImageBlock2, type ImportDocumentOptions, type InlineField2, type InlineToken2, type ListBlock2, type ListItem2, type MathIsland2, type MathObject2Json, type MathToken2, type PreviewBlock2, type PreviewInline2, type RawBlock2, type RawMathObject2Json, type RefToken2, type Reference2, type Reference2Json, type ReferenceFieldSeparator, type TableBlock2, type TextBlock2, type TextFormatSpan2Json, type TextStyle2, type TextToken2, absoluteHttpHref, addDocumentImageBlock, addDocumentListBlock, addDocumentListItem, addDocumentReference, addDocumentTableBlock, addDocumentTextBlock, applyDocumentCommand, applyFloatMetaPatch, arabicXeLatexPreambleCmd, arabicXeLatexPreambleFont, arabicXeLatexPreamblePkg, bibliographyEntryBody, bibliographyEntryLatex, butexBasmalaDisplayLatex, butexBasmalaDisplayTex, butexBasmalaTitlingPreamble, butexDiwaniDisplayLatex, butexDiwaniDisplayTex, butexInColumnMaketitleHook, butexMaghribiDisplayLatex, butexMaghribiDisplayTex, citeTokenLatex, clearDocumentImageAsset, cloneDocumentMeta, cloneDocumentNode, collectDocumentLabels, createDocumentHistory, createEmptyArabicEquationSession, createEmptyDocument, createEmptyEquationSession, createEmptyReference, createInlineField, defaultFloatMeta, detectInlineSpans, detectMathSpans, diffDocument, documentHasAbstract, documentHasMaketitle, documentHasTitleStack, documentHistoryCanRedo, documentHistoryCanUndo, documentKeyError, documentLatex, documentOutline, documentPreview, emptyBlockSelection, emptyDocumentMeta, ensureDocumentBibliographyBlock, extendBlockSelectionFromAnchor, fillDocumentMetaGaps, findFirstInlineField, formatBibliographyNumber, formatCiteLabel, formatFloatCaptionPreview, formatFloatCaptionTitle, formatHijriDate, formatRefLabel, fromDocumentJson, getArabicXeLatexPreamble, getDocumentReferenceIndex, getDocumentReferences, hasXeLatexUnsupportedEmoji, hijriMonthLabel, inlineFieldLatex, insertCiteTokenAtCaret, insertDocumentBlockAfter, insertMathToken, insertMathTokenAtCaret, insertRefTokenAtCaret, isDocumentValid, isDuplicateDocumentKey, isValidDocumentKey, labelNumberMap, mathNodeFromArabicSession, mathNodeFromSession, mathSourceFromArabicSession, mathSourceFromSession, mathTokenSourceForSide, mathTokenToArabicEditorSession, mathTokenToEditorSession, mergeDocumentMeta, moveDocumentBlockById, moveDocumentBlockRange, moveDocumentReference, normalizeBlockSelection, normalizeDocumentHijriDate, normalizeDocumentKey, normalizeDocumentMeta, normalizeReferenceFieldSeparator, parseCiteKeys, parseFloatMetaFromJson, parseRefKeys, pushDocumentSnapshot, refTokenLatex, referenceFromJson, referenceNumberMap, remapSelectionAfterRangeMove, removeCiteTokenById, removeDocumentBlockById, removeDocumentBlockRange, removeDocumentListItem, removeDocumentReference, removeMathTokenById, removeRefTokenById, replaceMathTokenFromSession, resolveCiteNumbers, restoreDocumentRedo, restoreDocumentUndo, setDocumentReferences, stripDisplayMathDelimiters, toDocumentJson, toggleBlockInSelection, toggleTextTokenStyle, updateCiteTokenKeys, updateDocumentImageAsset, updateDocumentImageMeta, updateDocumentImageValue, updateDocumentMeta, updateDocumentReference, updateDocumentTableMeta, updateDocumentTextBlockCentered, updateMathTokenLabel, updateRefTokenKeys, updateTextToken, validateDocument };
|
|
1189
|
+
export { type ArabicDigitsMapping, type ArabicXeLatexPreambleOptions, BUTEX_BASMALA, BUTEX_BASMALA_LINE1, BUTEX_BASMALA_LINE2, BUTEX_BASMALA_SALAWAT, BUTEX_CLOSING_HAMDALA, type BibliographyBlock2, type BlockSelectionRange, type BlockSelectionState, type CiteToken2, DEFAULT_DOCUMENT_HISTORY_MAX_DEPTH, DEFAULT_HIJRI_DATE, DEFAULT_REFERENCE_FIELD_SEPARATOR, type DocumentAnchor, type DocumentBlock, type DocumentBlockJson, type DocumentBlockMetadata, type DocumentCitationIndexEntry, type DocumentCommand, DocumentCommandError, type DocumentCommandErrorCode, type DocumentCrossReferenceIndexEntry, type DocumentDiagnostic, type DocumentDiff, type DocumentDiffChunk, type DocumentDiffChunkKind, type DocumentDirection, type DocumentHijriDate, type DocumentHistoryStacks, type DocumentImageAssetRef, type DocumentIndexedLabel, type DocumentInlineAnchor, type DocumentInlineIdsJson, type DocumentInlineTokenIdJson, type DocumentInlineTokenInput, type DocumentJson, type DocumentKeyError, type DocumentKeyNamespace, type DocumentLabelEntry, type DocumentLabelKind, type DocumentLatexOptions, type DocumentListItemAnchor, type DocumentMathObjectJson, type DocumentMathOutput, type DocumentMeta, type DocumentMetaProp, type DocumentNode, type DocumentOutlineEntry, type DocumentOutlineKind, type DocumentPreview, type DocumentPreviewOptions, type DocumentReferenceAnchor, type DocumentReferenceIndex, type DocumentReferenceTarget, type DocumentTextBlockKind, DocumentValidationError, type DocumentValidationIssue, type DocumentValidationIssueCode, type DocumentValidationResult, type FloatMeta2, type FloatMetaPatch, type FormatCiteLabelOptions, type FormatFloatCaptionTitleOptions, HIJRI_MONTH_IDS, HIJRI_YEAR_MAX, HIJRI_YEAR_MIN, type HijriMonthId, type ImageBlock2, type ImportDocumentOptions, type InlineField2, type InlineToken2, type ListBlock2, type ListItem2, type MathIsland2, type MathObject2Json, type MathToken2, type PreviewBlock2, type PreviewInline2, type RawBlock2, type RawMathObject2Json, type RefToken2, type Reference2, type Reference2Json, type ReferenceFieldSeparator, type TableBlock2, type TextBlock2, type TextFormatSpan2Json, type TextStyle2, type TextToken2, absoluteHttpHref, addDocumentImageBlock, addDocumentListBlock, addDocumentListItem, addDocumentReference, addDocumentTableBlock, addDocumentTextBlock, applyDocumentCommand, applyFloatMetaPatch, arabicXeLatexPreambleCmd, arabicXeLatexPreambleFont, arabicXeLatexPreamblePkg, bibliographyEntryBody, bibliographyEntryLatex, butexBasmalaDisplayLatex, butexBasmalaDisplayTex, butexBasmalaTitlingPreamble, butexDiwaniDisplayLatex, butexDiwaniDisplayTex, butexInColumnMaketitleHook, butexMaghribiDisplayLatex, butexMaghribiDisplayTex, citeTokenLatex, clearDocumentImageAsset, cloneDocumentMeta, cloneDocumentNode, collectDocumentKeyLabels, collectDocumentLabels, collectDocumentReferenceTargets, createDocumentHistory, createEmptyArabicEquationSession, createEmptyDocument, createEmptyEquationSession, createEmptyReference, createInlineField, defaultFloatMeta, detectInlineSpans, detectMathSpans, diffDocument, documentHasAbstract, documentHasMaketitle, documentHasTitleStack, documentHistoryCanRedo, documentHistoryCanUndo, documentKeyError, documentLatex, documentOutline, documentPreview, emptyBlockSelection, emptyDocumentMeta, ensureDocumentBibliographyBlock, extendBlockSelectionFromAnchor, fillDocumentMetaGaps, findFirstInlineField, formatBibliographyNumber, formatCiteLabel, formatFloatCaptionPreview, formatFloatCaptionTitle, formatHijriDate, formatRefLabel, fromDocumentJson, getArabicXeLatexPreamble, getDocumentReferenceIndex, getDocumentReferences, hasXeLatexUnsupportedEmoji, hijriMonthLabel, implicitReferenceKey, inlineFieldLatex, insertCiteTokenAtCaret, insertDocumentBlockAfter, insertMathToken, insertMathTokenAtCaret, insertRefTokenAtCaret, isDocumentValid, isDuplicateDocumentKey, isNumberedEquation, isNumberedFloat, isValidDocumentKey, labelNumberMap, mathNodeFromArabicSession, mathNodeFromSession, mathSourceFromArabicSession, mathSourceFromSession, mathTokenSourceForSide, mathTokenToArabicEditorSession, mathTokenToEditorSession, mergeDocumentMeta, moveDocumentBlockById, moveDocumentBlockRange, moveDocumentReference, normalizeBlockSelection, normalizeDocumentHijriDate, normalizeDocumentKey, normalizeDocumentMeta, normalizeReferenceFieldSeparator, parseCiteKeys, parseFloatMetaFromJson, parseRefKeys, pushDocumentSnapshot, refTokenLatex, referenceFromJson, referenceNumberMap, remapSelectionAfterRangeMove, removeCiteTokenById, removeDocumentBlockById, removeDocumentBlockRange, removeDocumentListItem, removeDocumentReference, removeMathTokenById, removeRefTokenById, replaceMathTokenFromSession, resolveCiteNumbers, restoreDocumentRedo, restoreDocumentUndo, setDocumentReferences, stripDisplayMathDelimiters, toDocumentJson, toggleBlockInSelection, toggleTextTokenStyle, updateCiteTokenKeys, updateDocumentImageAsset, updateDocumentImageMeta, updateDocumentImageValue, updateDocumentMeta, updateDocumentReference, updateDocumentTableMeta, updateDocumentTextBlockCentered, updateMathTokenLabel, updateRefTokenKeys, updateTextToken, validateDocument };
|