@stll/folio-core 0.59.0 → 0.61.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 +23 -1
- package/dist/ai-edits/apply.js +139 -32
- package/dist/ai-edits/headless.d.ts +3 -0
- package/dist/ai-edits/headless.js +57 -63
- package/dist/ai-edits/note-story-inventory.d.ts +7 -0
- package/dist/ai-edits/note-story-inventory.js +11 -0
- package/dist/ai-edits/read.js +16 -9
- package/dist/ai-edits/revisionStretches.js +52 -1
- package/dist/ai-edits/table-row-column-mutations.js +6 -1
- package/dist/compare/reproducible-package.js +2 -1
- package/dist/compare/verification.js +1 -0
- package/dist/compat/eigenpal.d.ts +4 -2
- package/dist/compat/eigenpal.js +2 -2
- package/dist/controller/canonicalClipboard.js +2 -1
- package/dist/controller/canonicalListRendering.d.ts +4 -6
- package/dist/controller/canonicalListRendering.js +3 -157
- package/dist/controller/canonicalSession.js +3 -2
- package/dist/controller/canonicalStructure.js +10 -7
- package/dist/controller/fontReadiness.js +1 -1
- package/dist/controller/headerFooterEditorManager.d.ts +1 -0
- package/dist/controller/headerFooterEditorManager.js +11 -0
- package/dist/controller/hiddenEditorManager.d.ts +1 -1
- package/dist/controller/hiddenEditorManager.js +3 -1
- package/dist/controller/layoutPipeline.d.ts +3 -1
- package/dist/controller/layoutPipeline.js +19 -4
- package/dist/controller/layoutSession.d.ts +4 -1
- package/dist/display-list/build/fontTable.js +7 -5
- package/dist/display-list/build/furniture.d.ts +1 -0
- package/dist/display-list/build/furniture.js +1 -0
- package/dist/display-list/build/imagePrimitives.js +3 -6
- package/dist/display-list/build/watermarkPrimitives.d.ts +2 -1
- package/dist/display-list/build/watermarkPrimitives.js +9 -3
- package/dist/display-list/editor/pageRenderer.js +1 -0
- package/dist/docx/bookmarkIdNormalization.d.ts +10 -0
- package/dist/docx/bookmarkIdNormalization.js +100 -0
- package/dist/docx/bookmarkParser.js +4 -2
- package/dist/docx/canonicalStoryRepack.js +3 -2
- package/dist/docx/commentTextParagraph.d.ts +6 -0
- package/dist/docx/commentTextParagraph.js +15 -0
- package/dist/docx/conformance.js +6 -1
- package/dist/docx/diagramPreview.js +2 -1
- package/dist/docx/documentParser.d.ts +13 -1
- package/dist/docx/documentParser.js +1 -1
- package/dist/docx/encryption/compoundFile.d.ts +0 -8
- package/dist/docx/encryption/compoundFile.js +2 -1
- package/dist/docx/encryption/cryptoBytes.d.ts +2 -2
- package/dist/docx/encryption/cryptoBytes.js +3 -18
- package/dist/docx/encryption/encryptionInfo.d.ts +0 -5
- package/dist/docx/encryption/encryptionInfo.js +2 -1
- package/dist/docx/ensureParaIds.js +2 -1
- package/dist/docx/groupDrawingParser.js +6 -1
- package/dist/docx/importedIdCollisions.d.ts +136 -0
- package/dist/docx/importedIdCollisions.js +215 -0
- package/dist/docx/listModelNormalization.d.ts +10 -0
- package/dist/docx/listModelNormalization.js +166 -0
- package/dist/docx/metadataPrivacy.js +3 -2
- package/dist/docx/metafileRaster.js +2 -1
- package/dist/docx/numberingParser.js +2 -2
- package/dist/docx/packageParts.js +6 -5
- package/dist/docx/paragraphParser.js +6 -4
- package/dist/docx/paragraphPropertySource.js +1 -2
- package/dist/docx/parseContext.d.ts +2 -1
- package/dist/docx/parseContext.js +1 -0
- package/dist/docx/parseWarningMessage.js +1 -0
- package/dist/docx/parser.js +10 -5
- package/dist/docx/preservedRunContent.js +11 -2
- package/dist/docx/relsParser.js +1 -1
- package/dist/docx/removeHeaderFooterParts.js +8 -7
- package/dist/docx/replyToComment.js +3 -13
- package/dist/docx/rezip.js +90 -90
- package/dist/docx/runParser.js +12 -6
- package/dist/docx/runPropertyPresence.d.ts +11 -0
- package/dist/docx/runPropertyPresence.js +14 -0
- package/dist/docx/selectedXmlIdentityScan.d.ts +10 -0
- package/dist/docx/selectedXmlIdentityScan.js +36 -0
- package/dist/docx/selectiveSave.js +19 -17
- package/dist/docx/selectiveXmlPatch.js +44 -52
- package/dist/docx/serializer/commentSerializer.d.ts +3 -1
- package/dist/docx/serializer/commentSerializer.js +11 -2
- package/dist/docx/serializer/runSerializer.js +5 -4
- package/dist/docx/serializer/tableSerializer.js +2 -1
- package/dist/docx/serializer/trackedChangeAttributes.d.ts +1 -3
- package/dist/docx/serializer/trackedChangeAttributes.js +1 -11
- package/dist/docx/server/applyDocxXmlPatchProposal.js +2 -2
- package/dist/docx/server/boundedArchive.js +2 -1
- package/dist/docx/server/evaluateDocxXmlPatchProposal.js +2 -1
- package/dist/docx/server/inspectDocxPackage.js +5 -1
- package/dist/docx/server/validateDocxConformance.js +2 -1
- package/dist/docx/tableParser.js +7 -4
- package/dist/docx/tableRowPropertyPresence.d.ts +9 -0
- package/dist/docx/tableRowPropertyPresence.js +15 -0
- package/dist/docx/unzip.js +2 -1
- package/dist/docx/xmlEncoding.js +6 -5
- package/dist/fonts/embeddedFontFingerprint.d.ts +5 -0
- package/dist/fonts/embeddedFontFingerprint.js +18 -0
- package/dist/fonts/embeddedFonts.d.ts +1 -1
- package/dist/fonts/embeddedFonts.js +1 -1
- package/dist/fonts/fontsourceFaces.js +2 -1
- package/dist/fonts/headlessMeasure.js +0 -0
- package/dist/fonts/sfnt/parse.js +6 -9
- package/dist/fonts/sfnt/subset.js +2 -1
- package/dist/fonts/sfnt/tables.js +2 -3
- package/dist/fonts/sfnt/woff.js +2 -1
- package/dist/headless-layout.js +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -2
- package/dist/internal/revisionResolutionInline.d.ts +2 -1
- package/dist/internal/revisionResolutionInline.js +22 -1
- package/dist/internal/wholeStoryRevisionResolution.js +24 -7
- package/dist/layout-bridge/convert/flowConversionShared.d.ts +4 -0
- package/dist/layout-bridge/convert/footnoteLayout.d.ts +5 -1
- package/dist/layout-bridge/convert/footnoteLayout.js +16 -3
- package/dist/layout-bridge/convert/headerFooterLayout.d.ts +6 -0
- package/dist/layout-bridge/convert/headerFooterLayout.js +13 -14
- package/dist/layout-bridge/convert/paragraphConversion.js +8 -1
- package/dist/layout-bridge/convert/paragraphRuns.js +2 -1
- package/dist/layout-bridge/convert/toFlowBlocks.js +25 -1
- package/dist/layout-engine/measure/cache.js +39 -7
- package/dist/layout-engine/measure/crossRunWords.js +12 -2
- package/dist/layout-engine/measure/lineTypography.js +1 -0
- package/dist/layout-engine/measure/listMarkerWidth.d.ts +1 -0
- package/dist/layout-engine/measure/listMarkerWidth.js +1 -0
- package/dist/layout-engine/measure/measureContainer.js +3 -4
- package/dist/layout-engine/measure/measureHelpers.d.ts +6 -9
- package/dist/layout-engine/measure/measureHelpers.js +21 -18
- package/dist/layout-engine/measure/measureParagraph.js +2 -0
- package/dist/layout-engine/measure/measureTypes.d.ts +2 -0
- package/dist/layout-engine/types.d.ts +4 -1
- package/dist/layout-painter/renderPage.d.ts +1 -0
- package/dist/layout-painter/renderPage.js +11 -3
- package/dist/layout-painter/renderParagraph.js +13 -3
- package/dist/layout-painter/renderWatermark.d.ts +1 -0
- package/dist/layout-painter/renderWatermark.js +7 -3
- package/dist/managers/AutoSaveManager.js +2 -1
- package/dist/managers/EditorModeManager.d.ts +10 -1
- package/dist/managers/EditorModeManager.js +15 -1
- package/dist/managers/TableSelectionManager.d.ts +1 -1
- package/dist/managers/autoSaveCodec.js +2 -6
- package/dist/managers/editorShortcuts.d.ts +2 -1
- package/dist/managers/editorShortcuts.js +2 -1
- package/dist/managers/reviewDisplayMode.d.ts +8 -0
- package/dist/managers/reviewDisplayMode.js +15 -0
- package/dist/paged-layout/pageText.d.ts +11 -2
- package/dist/paged-layout/pageText.js +8 -3
- package/dist/pdf/fonts.js +5 -14
- package/dist/pdf/images.js +3 -2
- package/dist/pdf/objects.d.ts +0 -11
- package/dist/pdf/objects.js +7 -9
- package/dist/pdf/writePdf.js +2 -1
- package/dist/prosemirror/canonicalSelectionRange.d.ts +4 -1
- package/dist/prosemirror/canonicalSelectionRange.js +9 -3
- package/dist/prosemirror/commands/comments.js +51 -13
- package/dist/prosemirror/containerFinalParagraph.d.ts +8 -8
- package/dist/prosemirror/containerFinalParagraph.js +8 -8
- package/dist/prosemirror/conversion/fromProseDoc.js +9 -4
- package/dist/prosemirror/conversion/toProseDoc.js +4 -4
- package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.d.ts +8 -2
- package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.js +39 -3
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +8 -2
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.js +4 -3
- package/dist/prosemirror/extensions/features/ImageDragExtension.js +4 -3
- package/dist/prosemirror/extensions/features/JoinedRunStyleExtension.js +4 -3
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +9 -3
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +6 -5
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +8 -2
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +11 -3
- package/dist/prosemirror/extensions/marks/RunIdentityExtension.js +4 -3
- package/dist/prosemirror/extensions/marks/markUtils.js +1 -1
- package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.js +16 -2
- package/dist/prosemirror/findReplaceSelection.d.ts +11 -1
- package/dist/prosemirror/findReplaceSelection.js +15 -1
- package/dist/prosemirror/markupViewProjection.d.ts +10 -1
- package/dist/prosemirror/markupViewProjection.js +21 -3
- package/dist/prosemirror/pluginKeyOwner.d.ts +13 -0
- package/dist/prosemirror/pluginKeyOwner.js +35 -0
- package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +11 -4
- package/dist/prosemirror/plugins/aiCitationDecorations.js +16 -3
- package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +11 -4
- package/dist/prosemirror/plugins/aiSuggestionDecorations.js +18 -3
- package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +11 -11
- package/dist/prosemirror/plugins/anonymizationDecorations.js +23 -13
- package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +8 -2
- package/dist/prosemirror/plugins/autocompleteSuggestion.js +27 -5
- package/dist/prosemirror/plugins/contentControlWidgets.d.ts +8 -2
- package/dist/prosemirror/plugins/contentControlWidgets.js +4 -3
- package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +6 -5
- package/dist/prosemirror/plugins/createDocScanPlugin.js +1 -1
- package/dist/prosemirror/plugins/documentNumbering.js +5 -3
- package/dist/prosemirror/plugins/documentStyleState.d.ts +8 -2
- package/dist/prosemirror/plugins/documentStyleState.js +2 -2
- package/dist/prosemirror/plugins/documentStyles.js +1 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +8 -2
- package/dist/prosemirror/plugins/selectionTracker.js +4 -3
- package/dist/prosemirror/plugins/suggestionMode.d.ts +8 -2
- package/dist/prosemirror/plugins/suggestionMode.js +4 -3
- package/dist/prosemirror/plugins/templateDirectives.d.ts +8 -2
- package/dist/prosemirror/plugins/templateDirectives.js +19 -4
- package/dist/prosemirror/plugins/templatePreviewValues.d.ts +8 -2
- package/dist/prosemirror/plugins/templatePreviewValues.js +27 -5
- package/dist/prosemirror/plugins/templateSlashMenu.d.ts +8 -2
- package/dist/prosemirror/plugins/templateSlashMenu.js +23 -5
- package/dist/prosemirror/plugins/transactionInvariants.js +29 -4
- package/dist/prosemirror/replacedAnnotations.d.ts +15 -1
- package/dist/prosemirror/replacedAnnotations.js +71 -12
- package/dist/prosemirror/runFormattingReconciliation.d.ts +3 -1
- package/dist/prosemirror/runFormattingReconciliation.js +10 -2
- package/dist/prosemirror/runIdentityAcrossRevisions.d.ts +5 -7
- package/dist/prosemirror/runIdentityAcrossRevisions.js +66 -38
- package/dist/prosemirror/runPropertyChangeResolution.js +13 -1
- package/dist/utils/base64.d.ts +1 -31
- package/dist/utils/base64.js +19 -33
- package/dist/utils/clipboard.js +5 -4
- package/dist/utils/colorResolver.js +11 -2
- package/dist/utils/findReplace.d.ts +5 -0
- package/dist/utils/fontLoader.d.ts +2 -2
- package/dist/utils/fontLoader.js +2 -7
- package/dist/utils/fontResolver.d.ts +7 -3
- package/dist/utils/fontResolver.js +6 -8
- package/dist/utils/replaceText.js +21 -4
- package/dist/utils/sliceText.d.ts +2 -0
- package/dist/utils/sliceText.js +2 -0
- package/dist/utils/textEncoding.d.ts +2 -0
- package/dist/utils/textEncoding.js +2 -0
- package/dist/utils/tiffConverter.d.ts +0 -9
- package/dist/utils/tiffConverter.js +2 -4
- package/package.json +73 -31
package/dist/utils/base64.js
CHANGED
|
@@ -1,40 +1,26 @@
|
|
|
1
|
+
import { bytesToBase64, bytesToBase64 as bytesToBase64$1, encodeBase64Portable } from "@stll/utf8-boundaries";
|
|
1
2
|
//#region src/utils/base64.ts
|
|
2
|
-
const BASE64_CODES = Uint8Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", (character) => character.charCodeAt(0));
|
|
3
|
-
const BASE64_PAD = 61;
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
6
|
-
* single array and decoded once, so a megabyte-scale input leaves the output
|
|
7
|
-
* string and nothing else.
|
|
4
|
+
* The package's one bytes-to-base64 encoder.
|
|
8
5
|
*
|
|
9
|
-
*
|
|
10
|
-
* and
|
|
6
|
+
* Every call site that spelled this itself got a different answer to the same
|
|
7
|
+
* two questions, and one of them got the first question wrong:
|
|
8
|
+
*
|
|
9
|
+
* - `btoa(new TextDecoder("latin1").decode(bytes))` is not a binary string.
|
|
10
|
+
* The Encoding standard maps the `latin1` label to windows-1252, so bytes
|
|
11
|
+
* 0x80-0x9F decode to characters outside Latin-1 and `btoa` throws
|
|
12
|
+
* `InvalidCharacterError` on them. Ordinary image bytes contain those values,
|
|
13
|
+
* so the browser path of that spelling fails on real input.
|
|
14
|
+
* - `String.fromCharCode(...chunk)` is correct but spreads a chunk's worth of
|
|
15
|
+
* arguments per call, and the intermediate binary string is as large as the
|
|
16
|
+
* input.
|
|
17
|
+
*
|
|
18
|
+
* Neither question has to be asked per call site, so it is asked here once.
|
|
19
|
+
* The runtime's own encoder answers it when the runtime has one, and the
|
|
20
|
+
* portable encoder in the shared owner answers it when not; both produce canonical base64,
|
|
21
|
+
* so the choice is invisible in the output.
|
|
11
22
|
*/
|
|
12
|
-
const encodeBase64Portable = (bytes) => {
|
|
13
|
-
const groups = Math.ceil(bytes.length / 3);
|
|
14
|
-
const encoded = new Uint8Array(groups * 4);
|
|
15
|
-
let read = 0;
|
|
16
|
-
let write = 0;
|
|
17
|
-
for (; read + 2 < bytes.length; read += 3) {
|
|
18
|
-
const triple = bytes[read] << 16 | bytes[read + 1] << 8 | bytes[read + 2];
|
|
19
|
-
encoded[write] = BASE64_CODES[triple >> 18 & 63];
|
|
20
|
-
encoded[write + 1] = BASE64_CODES[triple >> 12 & 63];
|
|
21
|
-
encoded[write + 2] = BASE64_CODES[triple >> 6 & 63];
|
|
22
|
-
encoded[write + 3] = BASE64_CODES[triple & 63];
|
|
23
|
-
write += 4;
|
|
24
|
-
}
|
|
25
|
-
const remaining = bytes.length - read;
|
|
26
|
-
if (remaining > 0) {
|
|
27
|
-
const tail = bytes[read] << 16 | (remaining === 2 ? bytes[read + 1] << 8 : 0);
|
|
28
|
-
encoded[write] = BASE64_CODES[tail >> 18 & 63];
|
|
29
|
-
encoded[write + 1] = BASE64_CODES[tail >> 12 & 63];
|
|
30
|
-
encoded[write + 2] = remaining === 2 ? BASE64_CODES[tail >> 6 & 63] : BASE64_PAD;
|
|
31
|
-
encoded[write + 3] = BASE64_PAD;
|
|
32
|
-
}
|
|
33
|
-
return new TextDecoder().decode(encoded);
|
|
34
|
-
};
|
|
35
|
-
/** Encode bytes as canonical, padded, standard-alphabet base64. */
|
|
36
|
-
const bytesToBase64 = ("toBase64" in Uint8Array.prototype ? (bytes) => bytes.toBase64() : void 0) ?? encodeBase64Portable;
|
|
37
23
|
/** Encode bytes as a `data:` URL with the given media type. */
|
|
38
|
-
const bytesToDataUrl = (bytes, mimeType) => `data:${mimeType};base64,${bytesToBase64(bytes)}`;
|
|
24
|
+
const bytesToDataUrl = (bytes, mimeType) => `data:${mimeType};base64,${bytesToBase64$1(bytes)}`;
|
|
39
25
|
//#endregion
|
|
40
26
|
export { bytesToBase64, bytesToDataUrl, encodeBase64Portable };
|
package/dist/utils/clipboard.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { htmlCommentEnd } from "./htmlComments.js";
|
|
2
2
|
import { stripXmlDeclarations } from "./stripXmlDeclarations.js";
|
|
3
|
+
import { encodeUtf8, readBlobText } from "./textEncoding.js";
|
|
3
4
|
import { sanitizeXmlCharacters } from "@stll/docx-core";
|
|
4
5
|
import createDOMPurify from "dompurify";
|
|
5
6
|
//#region src/utils/clipboard.ts
|
|
@@ -171,8 +172,8 @@ function paragraphsToClipboardContent(paragraphs, includeFormatting = true) {
|
|
|
171
172
|
async function writeToClipboard(content) {
|
|
172
173
|
try {
|
|
173
174
|
const items = [new ClipboardItem({
|
|
174
|
-
[CLIPBOARD_TYPES.PLAIN]: new Blob([content.plainText], { type: CLIPBOARD_TYPES.PLAIN }),
|
|
175
|
-
[CLIPBOARD_TYPES.HTML]: new Blob([content.html], { type: CLIPBOARD_TYPES.HTML })
|
|
175
|
+
[CLIPBOARD_TYPES.PLAIN]: new Blob([encodeUtf8(content.plainText)], { type: CLIPBOARD_TYPES.PLAIN }),
|
|
176
|
+
[CLIPBOARD_TYPES.HTML]: new Blob([encodeUtf8(content.html)], { type: CLIPBOARD_TYPES.HTML })
|
|
176
177
|
})];
|
|
177
178
|
await navigator.clipboard.write(items);
|
|
178
179
|
return true;
|
|
@@ -222,8 +223,8 @@ async function parseClipboardItems(items, cleanWordFormatting) {
|
|
|
222
223
|
let html = "";
|
|
223
224
|
let plainText = "";
|
|
224
225
|
for (const item of items) {
|
|
225
|
-
if (item.types.includes(CLIPBOARD_TYPES.HTML)) html = await (await item.getType(CLIPBOARD_TYPES.HTML))
|
|
226
|
-
if (item.types.includes(CLIPBOARD_TYPES.PLAIN)) plainText = await (await item.getType(CLIPBOARD_TYPES.PLAIN))
|
|
226
|
+
if (item.types.includes(CLIPBOARD_TYPES.HTML)) html = await readBlobText(await item.getType(CLIPBOARD_TYPES.HTML));
|
|
227
|
+
if (item.types.includes(CLIPBOARD_TYPES.PLAIN)) plainText = await readBlobText(await item.getType(CLIPBOARD_TYPES.PLAIN));
|
|
227
228
|
}
|
|
228
229
|
return parseClipboardHtml(html, plainText, cleanWordFormatting);
|
|
229
230
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { sliceText } from "./sliceText.js";
|
|
1
2
|
import { THEME_COLOR_BY_SCHEME_COLOR_VALUE, isSchemeColorValue, isThemeColor, themeColorSlot } from "@stll/docx-core/model";
|
|
2
3
|
//#region src/utils/colorResolver.ts
|
|
3
4
|
/**
|
|
@@ -109,7 +110,11 @@ function parseModifierValue(hexValue) {
|
|
|
109
110
|
* @returns RGB object with r, g, b values 0-255
|
|
110
111
|
*/
|
|
111
112
|
function hexToRgb(hex) {
|
|
112
|
-
const normalized =
|
|
113
|
+
const normalized = sliceText({
|
|
114
|
+
text: hex.padStart(6, "0"),
|
|
115
|
+
units: "codeUnits",
|
|
116
|
+
end: 6
|
|
117
|
+
});
|
|
113
118
|
const r = Number.parseInt(normalized.slice(0, 2), 16);
|
|
114
119
|
const g = Number.parseInt(normalized.slice(2, 4), 16);
|
|
115
120
|
const b = Number.parseInt(normalized.slice(4, 6), 16);
|
|
@@ -293,7 +298,11 @@ function parseColorString(colorString) {
|
|
|
293
298
|
const hex = normalized.replace(/^#/u, "").toUpperCase();
|
|
294
299
|
if (/^[0-9A-F]{6}$/iu.test(hex)) return { rgb: hex };
|
|
295
300
|
if (/^[0-9A-F]{3}$/iu.test(hex)) return { rgb: hex.split("").map((c) => c + c).join("") };
|
|
296
|
-
return { rgb:
|
|
301
|
+
return { rgb: sliceText({
|
|
302
|
+
text: hex.padStart(6, "0"),
|
|
303
|
+
units: "codeUnits",
|
|
304
|
+
end: 6
|
|
305
|
+
}) };
|
|
297
306
|
}
|
|
298
307
|
/**
|
|
299
308
|
* Create a ColorValue from theme color reference
|
|
@@ -7,6 +7,11 @@ type FindMatch = {
|
|
|
7
7
|
startOffset: number;
|
|
8
8
|
endOffset: number;
|
|
9
9
|
text: string;
|
|
10
|
+
/** Authored editor range when the match was found in a resolved markup view. */
|
|
11
|
+
authoredRange?: {
|
|
12
|
+
from: number;
|
|
13
|
+
to: number;
|
|
14
|
+
};
|
|
10
15
|
};
|
|
11
16
|
type FindOptions = {
|
|
12
17
|
matchCase: boolean;
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* Mapping from common Office/system fonts to bundled Croscore equivalents.
|
|
12
|
-
* The
|
|
13
|
-
*
|
|
12
|
+
* The resolver supplies the visual fallback stack; this map is used for
|
|
13
|
+
* font availability checks and preloading.
|
|
14
14
|
*/
|
|
15
15
|
declare const FONT_MAPPING: Record<string, string>;
|
|
16
16
|
/**
|
package/dist/utils/fontLoader.js
CHANGED
|
@@ -13,8 +13,8 @@ const loadCallbacks = /* @__PURE__ */ new Set();
|
|
|
13
13
|
let isLoadingAny = false;
|
|
14
14
|
/**
|
|
15
15
|
* Mapping from common Office/system fonts to bundled Croscore equivalents.
|
|
16
|
-
* The
|
|
17
|
-
*
|
|
16
|
+
* The resolver supplies the visual fallback stack; this map is used for
|
|
17
|
+
* font availability checks and preloading.
|
|
18
18
|
*/
|
|
19
19
|
const FONT_MAPPING = {
|
|
20
20
|
Aptos: "Lato",
|
|
@@ -42,11 +42,6 @@ const BUNDLED_FONTS = /* @__PURE__ */ new Set([
|
|
|
42
42
|
"Cousine",
|
|
43
43
|
"Lato",
|
|
44
44
|
"Source Sans 3",
|
|
45
|
-
"Calibri",
|
|
46
|
-
"Cambria",
|
|
47
|
-
"Arial",
|
|
48
|
-
"Times New Roman",
|
|
49
|
-
"Courier New",
|
|
50
45
|
"Noto Sans Arabic"
|
|
51
46
|
]);
|
|
52
47
|
/**
|
|
@@ -46,8 +46,12 @@ declare function isCjkFont(family: string): boolean;
|
|
|
46
46
|
declare const CJK_FALLBACK_FONT_FAMILY = "MS Mincho";
|
|
47
47
|
declare const setGoogleFontsEnabled: (enabled: boolean) => void;
|
|
48
48
|
declare const getGoogleFontsEnabled: () => boolean;
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
type FontResolutionOptions = {
|
|
50
|
+
alternateFontName?: string | undefined;
|
|
51
|
+
embeddedFontFamilyMap?: ReadonlyMap<string, string> | undefined;
|
|
52
|
+
};
|
|
53
|
+
/** Resolve against the calling editor's immutable embedded-font lookup. */
|
|
54
|
+
declare function resolveFontFamily(docxFontName: string, options?: FontResolutionOptions): ResolvedFont;
|
|
51
55
|
/**
|
|
52
56
|
* Split a CSS `font-family` list built by `quoteFontName` back into family
|
|
53
57
|
* names: the inverse of the quoting and escaping applied there. Quoted entries
|
|
@@ -93,4 +97,4 @@ declare function getGoogleFontEquivalent(docxFontName: string): string | null;
|
|
|
93
97
|
*/
|
|
94
98
|
declare function hasGoogleFontEquivalent(docxFontName: string): boolean;
|
|
95
99
|
//#endregion
|
|
96
|
-
export { CJK_FALLBACK_FONT_FAMILY, DEFAULT_SINGLE_LINE_RATIO, ResolvedFont, buildFontFamilyString, getGoogleFontEquivalent, getGoogleFontsEnabled, getGoogleFontsToLoad, hasGoogleFontEquivalent, isCjkFont, parseFontFamilyList, resolveFontFamily, resolveThemeFont,
|
|
100
|
+
export { CJK_FALLBACK_FONT_FAMILY, DEFAULT_SINGLE_LINE_RATIO, ResolvedFont, buildFontFamilyString, getGoogleFontEquivalent, getGoogleFontsEnabled, getGoogleFontsToLoad, hasGoogleFontEquivalent, isCjkFont, parseFontFamilyList, resolveFontFamily, resolveThemeFont, setGoogleFontsEnabled };
|
|
@@ -1043,11 +1043,9 @@ const setGoogleFontsEnabled = (enabled) => {
|
|
|
1043
1043
|
googleFontsEnabled = enabled;
|
|
1044
1044
|
};
|
|
1045
1045
|
const getGoogleFontsEnabled = () => googleFontsEnabled;
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
embeddedFontFamilyMap =
|
|
1049
|
-
};
|
|
1050
|
-
function resolveFontFamily(docxFontName, alternateFontName) {
|
|
1046
|
+
/** Resolve against the calling editor's immutable embedded-font lookup. */
|
|
1047
|
+
function resolveFontFamily(docxFontName, options = {}) {
|
|
1048
|
+
const { alternateFontName, embeddedFontFamilyMap } = options;
|
|
1051
1049
|
const normalizedName = docxFontName.trim().toLowerCase();
|
|
1052
1050
|
const scopedFamily = embeddedFontFamilyMap?.get(docxFontName) ?? null;
|
|
1053
1051
|
const aliasTarget = CJK_FONT_ALIASES[normalizedName];
|
|
@@ -1062,7 +1060,7 @@ function resolveFontFamily(docxFontName, alternateFontName) {
|
|
|
1062
1060
|
hasGoogleEquivalent: googleFontsEnabled,
|
|
1063
1061
|
singleLineRatio: mapping.singleLineRatio
|
|
1064
1062
|
};
|
|
1065
|
-
const alternate = resolveFontFamily(alternateFontName);
|
|
1063
|
+
const alternate = resolveFontFamily(alternateFontName, { embeddedFontFamilyMap });
|
|
1066
1064
|
const category = mapping.category;
|
|
1067
1065
|
const concreteStack = dedupeFontFamilies([
|
|
1068
1066
|
scopedFamily ?? docxFontName,
|
|
@@ -1080,7 +1078,7 @@ function resolveFontFamily(docxFontName, alternateFontName) {
|
|
|
1080
1078
|
}
|
|
1081
1079
|
const alternateName = alternateFontName?.trim();
|
|
1082
1080
|
if (alternateName && alternateName.toLowerCase() !== normalizedName) {
|
|
1083
|
-
const alternate = resolveFontFamily(alternateName);
|
|
1081
|
+
const alternate = resolveFontFamily(alternateName, { embeddedFontFamilyMap });
|
|
1084
1082
|
const category = detectFontCategory(docxFontName);
|
|
1085
1083
|
const concreteStack = dedupeFontFamilies([scopedFamily ?? docxFontName, ...parseFontFamilyList(alternate.cssFallback)]).filter((family) => !isCssGenericFontFamily(family));
|
|
1086
1084
|
return {
|
|
@@ -1258,4 +1256,4 @@ function hasGoogleFontEquivalent(docxFontName) {
|
|
|
1258
1256
|
return (CJK_FONT_ALIASES[normalizedName] ?? normalizedName) in FONT_MAPPINGS;
|
|
1259
1257
|
}
|
|
1260
1258
|
//#endregion
|
|
1261
|
-
export { CJK_FALLBACK_FONT_FAMILY, DEFAULT_SINGLE_LINE_RATIO, buildFontFamilyString, getGoogleFontEquivalent, getGoogleFontsEnabled, getGoogleFontsToLoad, hasGoogleFontEquivalent, isCjkFont, parseFontFamilyList, resolveFontFamily, resolveThemeFont,
|
|
1259
|
+
export { CJK_FALLBACK_FONT_FAMILY, DEFAULT_SINGLE_LINE_RATIO, buildFontFamilyString, getGoogleFontEquivalent, getGoogleFontsEnabled, getGoogleFontsToLoad, hasGoogleFontEquivalent, isCjkFont, parseFontFamilyList, resolveFontFamily, resolveThemeFont, setGoogleFontsEnabled };
|
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
import { cloneDocumentWithParagraphPropertySources } from "../docx/paragraphPropertySource.js";
|
|
2
|
+
import { textFormattingToMarks } from "../prosemirror/commands/formatting.js";
|
|
3
|
+
import { fromProseDoc } from "../prosemirror/conversion/fromProseDoc.js";
|
|
4
|
+
import { toProseDoc } from "../prosemirror/conversion/toProseDoc.js";
|
|
5
|
+
import { resolveFindMatchRange } from "../prosemirror/findReplaceSelection.js";
|
|
6
|
+
import { schema } from "../prosemirror/schema/index.js";
|
|
7
|
+
import { EditorState } from "prosemirror-state";
|
|
2
8
|
//#region src/utils/replaceText.ts
|
|
9
|
+
/**
|
|
10
|
+
* Lightweight text replacement on the document model.
|
|
11
|
+
* Used by find & replace. Operates immutably.
|
|
12
|
+
*/
|
|
3
13
|
/** Replace text within a range in the document. Returns a new document. */
|
|
4
14
|
function replaceTextInDocument(doc, range, text, formatting) {
|
|
5
15
|
const newDoc = cloneDocumentWithParagraphPropertySources(doc);
|
|
6
16
|
const body = newDoc.package.document;
|
|
7
17
|
const { start, end } = range;
|
|
8
18
|
if (start.paragraphIndex === end.paragraphIndex) {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
19
|
+
const proseDoc = toProseDoc(newDoc);
|
|
20
|
+
const proseRange = resolveFindMatchRange(proseDoc, {
|
|
21
|
+
paragraphIndex: start.paragraphIndex,
|
|
22
|
+
startOffset: start.offset,
|
|
23
|
+
endOffset: end.offset
|
|
24
|
+
});
|
|
25
|
+
if (proseRange === null) return newDoc;
|
|
26
|
+
const transaction = EditorState.create({ doc: proseDoc }).tr;
|
|
27
|
+
if (text.length > 0 && formatting !== void 0) transaction.replaceWith(proseRange.from, proseRange.to, schema.text(text, textFormattingToMarks(formatting)));
|
|
28
|
+
else transaction.insertText(text, proseRange.from, proseRange.to);
|
|
29
|
+
return fromProseDoc(transaction.doc, newDoc, { stylesheetSource: { type: "package" } });
|
|
13
30
|
} else {
|
|
14
31
|
const startParagraph = getParagraphByIndex(body, start.paragraphIndex);
|
|
15
32
|
if (!startParagraph) return newDoc;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { base64ToBytes, bytesToBase64, bytesToBase64Url, bytesToHex, createTextReader, decodeText, encodeBinaryString, encodeUtf16BE, encodeUtf16LE, encodeUtf8, readBlobText } from "@stll/utf8-boundaries";
|
|
2
|
+
export { base64ToBytes, bytesToBase64, bytesToBase64Url, bytesToHex, createTextReader, decodeText, encodeBinaryString, encodeUtf16BE, encodeUtf16LE, encodeUtf8, readBlobText };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { base64ToBytes, bytesToBase64, bytesToBase64Url, bytesToHex, createTextReader, decodeText, encodeBinaryString, encodeUtf16BE, encodeUtf16LE, encodeUtf8, readBlobText } from "@stll/utf8-boundaries";
|
|
2
|
+
export { base64ToBytes, bytesToBase64, bytesToBase64Url, bytesToHex, createTextReader, decodeText, encodeBinaryString, encodeUtf16BE, encodeUtf16LE, encodeUtf8, readBlobText };
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
//#region src/utils/tiffConverter.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* TIFF to PNG Converter
|
|
4
|
-
*
|
|
5
|
-
* Browsers don't support TIFF in `<img>` tags, so DOCX-embedded TIFFs are
|
|
6
|
-
* decoded with utif2 and re-encoded as PNG via the Canvas API. Returns
|
|
7
|
-
* null in environments without Canvas (Node.js parsing); callers fall
|
|
8
|
-
* back to the raw TIFF data URL, which won't render in browsers but is
|
|
9
|
-
* fine for headless round-trips.
|
|
10
|
-
*/
|
|
11
2
|
/**
|
|
12
3
|
* Budget shared by every TIFF in one package. The per-image cap bounds a single
|
|
13
4
|
* decode; without a running total a package of many large TIFFs still adds up.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { base64ToBytes } from "./textEncoding.js";
|
|
1
2
|
//#region src/utils/tiffConverter.ts
|
|
2
3
|
/**
|
|
3
4
|
* TIFF to PNG Converter
|
|
@@ -79,10 +80,7 @@ function dataUrlToArrayBuffer(dataUrl) {
|
|
|
79
80
|
const base64 = dataUrl.split(",", 2)[1];
|
|
80
81
|
if (!base64) return null;
|
|
81
82
|
try {
|
|
82
|
-
|
|
83
|
-
const bytes = new Uint8Array(binary.length);
|
|
84
|
-
for (let i = 0; i < binary.length; i++) bytes[i] = binary.codePointAt(i) ?? 0;
|
|
85
|
-
return bytes.buffer;
|
|
83
|
+
return base64ToBytes(base64).buffer;
|
|
86
84
|
} catch {
|
|
87
85
|
return null;
|
|
88
86
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/folio-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.0",
|
|
4
4
|
"description": "Headless, framework-neutral core of folio: the OOXML (.docx) parser, document model, ProseMirror integration, and page-layout engine. No React.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"document-model",
|
|
@@ -36,98 +36,123 @@
|
|
|
36
36
|
"exports": {
|
|
37
37
|
".": {
|
|
38
38
|
"types": "./dist/index.d.ts",
|
|
39
|
-
"import": "./dist/index.js"
|
|
39
|
+
"import": "./dist/index.js",
|
|
40
|
+
"default": "./dist/index.js"
|
|
40
41
|
},
|
|
41
42
|
"./i18n/messages/*": {
|
|
42
43
|
"types": "./dist/i18n/messages/*.gen.d.ts",
|
|
43
|
-
"import": "./dist/i18n/messages/*.gen.js"
|
|
44
|
+
"import": "./dist/i18n/messages/*.gen.js",
|
|
45
|
+
"default": "./dist/i18n/messages/*.gen.js"
|
|
44
46
|
},
|
|
45
47
|
"./i18n/messages/*.gen": {
|
|
46
48
|
"types": "./dist/i18n/messages/*.gen.d.ts",
|
|
47
|
-
"import": "./dist/i18n/messages/*.gen.js"
|
|
49
|
+
"import": "./dist/i18n/messages/*.gen.js",
|
|
50
|
+
"default": "./dist/i18n/messages/*.gen.js"
|
|
48
51
|
},
|
|
49
52
|
"./i18n/messages/locales": {
|
|
50
53
|
"types": "./dist/i18n/messages/locales.d.ts",
|
|
51
|
-
"import": "./dist/i18n/messages/locales.js"
|
|
54
|
+
"import": "./dist/i18n/messages/locales.js",
|
|
55
|
+
"default": "./dist/i18n/messages/locales.js"
|
|
52
56
|
},
|
|
53
57
|
"./markdown": {
|
|
54
58
|
"types": "./dist/markdown/index.d.ts",
|
|
55
|
-
"import": "./dist/markdown/index.js"
|
|
59
|
+
"import": "./dist/markdown/index.js",
|
|
60
|
+
"default": "./dist/markdown/index.js"
|
|
56
61
|
},
|
|
57
62
|
"./server": {
|
|
58
63
|
"types": "./dist/server.d.ts",
|
|
59
|
-
"import": "./dist/server.js"
|
|
64
|
+
"import": "./dist/server.js",
|
|
65
|
+
"default": "./dist/server.js"
|
|
60
66
|
},
|
|
61
67
|
"./redline": {
|
|
62
68
|
"types": "./dist/redline.d.ts",
|
|
63
|
-
"import": "./dist/redline.js"
|
|
69
|
+
"import": "./dist/redline.js",
|
|
70
|
+
"default": "./dist/redline.js"
|
|
64
71
|
},
|
|
65
72
|
"./ai-edits": {
|
|
66
73
|
"types": "./dist/ai-edits/index.d.ts",
|
|
67
|
-
"import": "./dist/ai-edits/index.js"
|
|
74
|
+
"import": "./dist/ai-edits/index.js",
|
|
75
|
+
"default": "./dist/ai-edits/index.js"
|
|
68
76
|
},
|
|
69
77
|
"./content-controls": {
|
|
70
78
|
"types": "./dist/content-controls/index.d.ts",
|
|
71
|
-
"import": "./dist/content-controls/index.js"
|
|
79
|
+
"import": "./dist/content-controls/index.js",
|
|
80
|
+
"default": "./dist/content-controls/index.js"
|
|
72
81
|
},
|
|
73
82
|
"./compat/eigenpal": {
|
|
74
83
|
"types": "./dist/compat/eigenpal.d.ts",
|
|
75
|
-
"import": "./dist/compat/eigenpal.js"
|
|
84
|
+
"import": "./dist/compat/eigenpal.js",
|
|
85
|
+
"default": "./dist/compat/eigenpal.js"
|
|
76
86
|
},
|
|
77
87
|
"./watermark": {
|
|
78
88
|
"types": "./dist/watermark/index.d.ts",
|
|
79
|
-
"import": "./dist/watermark/index.js"
|
|
89
|
+
"import": "./dist/watermark/index.js",
|
|
90
|
+
"default": "./dist/watermark/index.js"
|
|
80
91
|
},
|
|
81
92
|
"./layout-engine": {
|
|
82
93
|
"types": "./dist/layout-engine/index.d.ts",
|
|
83
|
-
"import": "./dist/layout-engine/index.js"
|
|
94
|
+
"import": "./dist/layout-engine/index.js",
|
|
95
|
+
"default": "./dist/layout-engine/index.js"
|
|
84
96
|
},
|
|
85
97
|
"./layout-painter": {
|
|
86
98
|
"types": "./dist/layout-painter/index.d.ts",
|
|
87
|
-
"import": "./dist/layout-painter/index.js"
|
|
99
|
+
"import": "./dist/layout-painter/index.js",
|
|
100
|
+
"default": "./dist/layout-painter/index.js"
|
|
88
101
|
},
|
|
89
102
|
"./layout-bridge/engine/measuring": {
|
|
90
103
|
"types": "./dist/layout-bridge/engine/measuring/index.d.ts",
|
|
91
|
-
"import": "./dist/layout-bridge/engine/measuring/index.js"
|
|
104
|
+
"import": "./dist/layout-bridge/engine/measuring/index.js",
|
|
105
|
+
"default": "./dist/layout-bridge/engine/measuring/index.js"
|
|
92
106
|
},
|
|
93
107
|
"./prosemirror": {
|
|
94
108
|
"types": "./dist/prosemirror/index.d.ts",
|
|
95
|
-
"import": "./dist/prosemirror/index.js"
|
|
109
|
+
"import": "./dist/prosemirror/index.js",
|
|
110
|
+
"default": "./dist/prosemirror/index.js"
|
|
96
111
|
},
|
|
97
112
|
"./prosemirror/attrs": {
|
|
98
113
|
"types": "./dist/prosemirror/attrs/index.d.ts",
|
|
99
|
-
"import": "./dist/prosemirror/attrs/index.js"
|
|
114
|
+
"import": "./dist/prosemirror/attrs/index.js",
|
|
115
|
+
"default": "./dist/prosemirror/attrs/index.js"
|
|
100
116
|
},
|
|
101
117
|
"./prosemirror/conversion": {
|
|
102
118
|
"types": "./dist/prosemirror/conversion/index.d.ts",
|
|
103
|
-
"import": "./dist/prosemirror/conversion/index.js"
|
|
119
|
+
"import": "./dist/prosemirror/conversion/index.js",
|
|
120
|
+
"default": "./dist/prosemirror/conversion/index.js"
|
|
104
121
|
},
|
|
105
122
|
"./prosemirror/extensions": {
|
|
106
123
|
"types": "./dist/prosemirror/extensions/index.d.ts",
|
|
107
|
-
"import": "./dist/prosemirror/extensions/index.js"
|
|
124
|
+
"import": "./dist/prosemirror/extensions/index.js",
|
|
125
|
+
"default": "./dist/prosemirror/extensions/index.js"
|
|
108
126
|
},
|
|
109
127
|
"./prosemirror/schema": {
|
|
110
128
|
"types": "./dist/prosemirror/schema/index.d.ts",
|
|
111
|
-
"import": "./dist/prosemirror/schema/index.js"
|
|
129
|
+
"import": "./dist/prosemirror/schema/index.js",
|
|
130
|
+
"default": "./dist/prosemirror/schema/index.js"
|
|
112
131
|
},
|
|
113
132
|
"./docx": {
|
|
114
133
|
"types": "./dist/docx/index.d.ts",
|
|
115
|
-
"import": "./dist/docx/index.js"
|
|
134
|
+
"import": "./dist/docx/index.js",
|
|
135
|
+
"default": "./dist/docx/index.js"
|
|
116
136
|
},
|
|
117
137
|
"./docx/document-clone": {
|
|
118
138
|
"types": "./dist/docx/documentClone.d.ts",
|
|
119
|
-
"import": "./dist/docx/documentClone.js"
|
|
139
|
+
"import": "./dist/docx/documentClone.js",
|
|
140
|
+
"default": "./dist/docx/documentClone.js"
|
|
120
141
|
},
|
|
121
142
|
"./text-shaping": {
|
|
122
143
|
"types": "./dist/text-shaping.d.ts",
|
|
123
|
-
"import": "./dist/text-shaping.js"
|
|
144
|
+
"import": "./dist/text-shaping.js",
|
|
145
|
+
"default": "./dist/text-shaping.js"
|
|
124
146
|
},
|
|
125
147
|
"./text-shaping/wasm": "./dist/generated/text_shaper_bg.wasm",
|
|
126
148
|
"./docx/paragraphPropertySource": null,
|
|
127
149
|
"./internal/*": null,
|
|
150
|
+
"./_virtual/*": null,
|
|
151
|
+
"./generated/*": null,
|
|
128
152
|
"./*": {
|
|
129
153
|
"types": "./dist/*.d.ts",
|
|
130
|
-
"import": "./dist/*.js"
|
|
154
|
+
"import": "./dist/*.js",
|
|
155
|
+
"default": "./dist/*.js"
|
|
131
156
|
}
|
|
132
157
|
},
|
|
133
158
|
"publishConfig": {
|
|
@@ -146,15 +171,23 @@
|
|
|
146
171
|
"perf": "bun scripts/profile-editor.ts"
|
|
147
172
|
},
|
|
148
173
|
"dependencies": {
|
|
149
|
-
"@stll/docx-core": "^0.
|
|
174
|
+
"@stll/docx-core": "^0.38.0",
|
|
150
175
|
"@stll/docx-utils": "^0.1.0",
|
|
151
176
|
"@stll/template-conditions": "^0.6.2",
|
|
177
|
+
"@stll/utf8-boundaries": "0.1.0",
|
|
152
178
|
"better-result": "3.0.1",
|
|
153
179
|
"csstype": "^3.1.3",
|
|
154
180
|
"dompurify": "^3.4.16",
|
|
155
181
|
"fast-xml-parser": "^5.10.1",
|
|
156
182
|
"hyphen": "1.14.1",
|
|
157
183
|
"jszip": "3.10.2",
|
|
184
|
+
"utif2": "^4.1.0",
|
|
185
|
+
"valibot": "1.5.0"
|
|
186
|
+
},
|
|
187
|
+
"devDependencies": {
|
|
188
|
+
"@fontsource/noto-sans-devanagari": "^5.3.0",
|
|
189
|
+
"@fontsource/noto-sans-hebrew": "^5.3.0",
|
|
190
|
+
"@types/hyphen": "1.14.0",
|
|
158
191
|
"prosemirror-commands": "^1.7.1",
|
|
159
192
|
"prosemirror-dropcursor": "^1.8.2",
|
|
160
193
|
"prosemirror-gapcursor": "^1.4.1",
|
|
@@ -166,16 +199,25 @@
|
|
|
166
199
|
"prosemirror-tables": "^1.8.5",
|
|
167
200
|
"prosemirror-transform": "^1.12.0",
|
|
168
201
|
"prosemirror-view": "^1.42.6",
|
|
169
|
-
"utif2": "^4.1.0",
|
|
170
|
-
"valibot": "1.5.0",
|
|
171
202
|
"y-prosemirror": "^1.3.7",
|
|
172
203
|
"y-protocols": "^1.0.6",
|
|
173
204
|
"yjs": "^13.6.31"
|
|
174
205
|
},
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
"
|
|
178
|
-
"
|
|
206
|
+
"peerDependencies": {
|
|
207
|
+
"prosemirror-commands": "^1.7.1",
|
|
208
|
+
"prosemirror-dropcursor": "^1.8.2",
|
|
209
|
+
"prosemirror-gapcursor": "^1.4.1",
|
|
210
|
+
"prosemirror-history": "^1.5.0",
|
|
211
|
+
"prosemirror-inputrules": "^1.5.0",
|
|
212
|
+
"prosemirror-keymap": "^1.2.3",
|
|
213
|
+
"prosemirror-model": "^1.25.9",
|
|
214
|
+
"prosemirror-state": "^1.4.4",
|
|
215
|
+
"prosemirror-tables": "^1.8.5",
|
|
216
|
+
"prosemirror-transform": "^1.12.0",
|
|
217
|
+
"prosemirror-view": "^1.42.6",
|
|
218
|
+
"y-prosemirror": "^1.3.7",
|
|
219
|
+
"y-protocols": "^1.0.6",
|
|
220
|
+
"yjs": "^13.6.31"
|
|
179
221
|
},
|
|
180
222
|
"main": "./dist/index.js",
|
|
181
223
|
"types": "./dist/index.d.ts"
|