@beyondwork/docx-react-component 1.0.128 → 1.0.129
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/api/public-types.cjs +215 -61
- package/dist/api/public-types.d.cts +2 -2
- package/dist/api/public-types.d.ts +2 -2
- package/dist/api/public-types.js +2 -2
- package/dist/api/v3.cjs +896 -71
- package/dist/api/v3.d.cts +3 -3
- package/dist/api/v3.d.ts +3 -3
- package/dist/api/v3.js +8 -8
- package/dist/{canonical-document-CXCFCbAz.d.cts → canonical-document-BMtONpgf.d.cts} +6 -0
- package/dist/{canonical-document-CXCFCbAz.d.ts → canonical-document-BMtONpgf.d.ts} +6 -0
- package/dist/{chunk-KV435YXO.js → chunk-5DSHUYSY.js} +1 -1
- package/dist/{chunk-TQDQU2E3.js → chunk-63FYIGCT.js} +2 -2
- package/dist/{chunk-ZDOAUP3V.js → chunk-DDN2AIGE.js} +1 -1
- package/dist/{chunk-6F5QW44A.js → chunk-DJU2W4E4.js} +2 -2
- package/dist/{chunk-4EENH4FG.js → chunk-EZKJXIPH.js} +1 -1
- package/dist/{chunk-CXSYRB37.js → chunk-HUIHBBAQ.js} +166 -49
- package/dist/{chunk-ESJ2MES5.js → chunk-JJGVE5J7.js} +1 -1
- package/dist/{chunk-LZVBNDGU.js → chunk-LJH64PV3.js} +3 -3
- package/dist/{chunk-MWSBGJQO.js → chunk-OTQIW2TC.js} +2 -2
- package/dist/{chunk-2QL5DAKF.js → chunk-PGKUJZXV.js} +3 -3
- package/dist/{chunk-6EROGFUF.js → chunk-PRAZBHNF.js} +441 -128
- package/dist/{chunk-4YJVRIUB.js → chunk-Q3QYGKFE.js} +51 -8
- package/dist/{chunk-YHZHPXDB.js → chunk-RMRTQGW3.js} +50 -13
- package/dist/{chunk-XRACP43Q.js → chunk-SKPTKQHF.js} +351 -13
- package/dist/{chunk-D5HYZQTG.js → chunk-VNLDQJ47.js} +1 -1
- package/dist/{chunk-BYSRJ4FE.js → chunk-W34X3KBR.js} +1 -1
- package/dist/{chunk-V6XVZFFH.js → chunk-XMHSGPLN.js} +2 -2
- package/dist/{chunk-LCYYR57Q.js → chunk-XQCAMKIQ.js} +421 -6
- package/dist/{chunk-YD2JE54B.js → chunk-YZDZ4FGR.js} +1 -1
- package/dist/compare.d.cts +1 -1
- package/dist/compare.d.ts +1 -1
- package/dist/core/commands/formatting-commands.d.cts +2 -2
- package/dist/core/commands/formatting-commands.d.ts +2 -2
- package/dist/core/commands/image-commands.cjs +166 -49
- package/dist/core/commands/image-commands.d.cts +2 -2
- package/dist/core/commands/image-commands.d.ts +2 -2
- package/dist/core/commands/image-commands.js +4 -4
- package/dist/core/commands/section-layout-commands.d.cts +2 -2
- package/dist/core/commands/section-layout-commands.d.ts +2 -2
- package/dist/core/commands/style-commands.d.cts +2 -2
- package/dist/core/commands/style-commands.d.ts +2 -2
- package/dist/core/commands/table-structure-commands.cjs +166 -49
- package/dist/core/commands/table-structure-commands.d.cts +2 -2
- package/dist/core/commands/table-structure-commands.d.ts +2 -2
- package/dist/core/commands/table-structure-commands.js +3 -3
- package/dist/core/commands/text-commands.cjs +166 -49
- package/dist/core/commands/text-commands.d.cts +2 -2
- package/dist/core/commands/text-commands.d.ts +2 -2
- package/dist/core/commands/text-commands.js +4 -4
- package/dist/core/selection/mapping.d.cts +2 -2
- package/dist/core/selection/mapping.d.ts +2 -2
- package/dist/core/state/editor-state.d.cts +2 -2
- package/dist/core/state/editor-state.d.ts +2 -2
- package/dist/index.cjs +1486 -211
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +46 -22
- package/dist/io/docx-session.cjs +51 -8
- package/dist/io/docx-session.d.cts +4 -4
- package/dist/io/docx-session.d.ts +4 -4
- package/dist/io/docx-session.js +3 -3
- package/dist/legal.d.cts +1 -1
- package/dist/legal.d.ts +1 -1
- package/dist/legal.js +2 -2
- package/dist/{loader-19ct2Be0.d.ts → loader-4qsw4eIU.d.ts} +3 -3
- package/dist/{loader-CoXQ2wGd.d.cts → loader-B8TKhmQi.d.cts} +3 -3
- package/dist/{public-types-B-CskQen.d.cts → public-types-B5CRoR6f.d.cts} +128 -1
- package/dist/{public-types-7KZsNGE2.d.ts → public-types-p9b8rfy8.d.ts} +128 -1
- package/dist/public-types.cjs +215 -61
- package/dist/public-types.d.cts +2 -2
- package/dist/public-types.d.ts +2 -2
- package/dist/public-types.js +2 -2
- package/dist/runtime/collab.d.cts +3 -3
- package/dist/runtime/collab.d.ts +3 -3
- package/dist/runtime/document-runtime.cjs +980 -185
- package/dist/runtime/document-runtime.d.cts +2 -2
- package/dist/runtime/document-runtime.d.ts +2 -2
- package/dist/runtime/document-runtime.js +13 -13
- package/dist/{session-B5015J4v.d.cts → session-BnGIjaex.d.cts} +3 -3
- package/dist/{session-C2i8-d6v.d.ts → session-vEYKf-w3.d.ts} +3 -3
- package/dist/session.cjs +51 -8
- package/dist/session.d.cts +5 -5
- package/dist/session.d.ts +5 -5
- package/dist/session.js +4 -4
- package/dist/tailwind.cjs +215 -61
- package/dist/tailwind.d.cts +2 -2
- package/dist/tailwind.d.ts +2 -2
- package/dist/tailwind.js +5 -5
- package/dist/{types-DNhN0WeN.d.cts → types-BLuvZ6cQ.d.cts} +2 -2
- package/dist/{types-yvrQuGX9.d.ts → types-Dutlyj0T.d.ts} +2 -2
- package/dist/ui-tailwind/editor-surface/search-plugin.d.cts +3 -3
- package/dist/ui-tailwind/editor-surface/search-plugin.d.ts +3 -3
- package/dist/ui-tailwind/editor-surface/search-plugin.js +3 -3
- package/dist/ui-tailwind.cjs +215 -61
- package/dist/ui-tailwind.d.cts +3 -3
- package/dist/ui-tailwind.d.ts +3 -3
- package/dist/ui-tailwind.js +5 -5
- package/package.json +1 -1
package/dist/api/v3.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-
|
|
2
|
-
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-
|
|
1
|
+
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-B5CRoR6f.cjs';
|
|
2
|
+
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-B5CRoR6f.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
|
6
|
-
import '../canonical-document-
|
|
6
|
+
import '../canonical-document-BMtONpgf.cjs';
|
|
7
7
|
import 'prosemirror-state';
|
|
8
8
|
import 'prosemirror-model';
|
|
9
9
|
|
package/dist/api/v3.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-
|
|
2
|
-
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-
|
|
1
|
+
import { u as MockPayload, A as ApiStatus, U as UxIntent, v as RuntimeApiHandle, w as UiControllerFactory, x as ApiV3Ui } from '../public-types-p9b8rfy8.js';
|
|
2
|
+
export { y as AgentMetadata, z as AiPe2EvidenceOptions, B as AiPe2GraphOracleReference, D as AiPe2OracleEvidence, F as AiPe2OracleEvidenceProvider, G as AiPe2OracleEvidenceProviderInput, H as AiPe2OracleVerdict, J as ApiV3, K as ApiV3FnMetadata, N as ApiV3UiChrome, O as ApiV3UiDebug, Q as ApiV3UiOverlays, V as ApiV3UiSession, W as ApiV3UiSurface, X as ApiV3UiViewport, Y as BroadcastsVia, Z as ChromeDebugMode, _ as ChromeDocumentMode, $ as ChromeHostPosture, a0 as ChromeMarkupDisplay, a1 as ChromePosture, a2 as ChromeReviewMode, a3 as ChromeSurface, a4 as ChromeSurfaceKind, a5 as CreateApiV3Opts, a6 as DebugAttachment, a7 as DebugSession, a8 as GeometryRect, a9 as LiveEvidence, aa as MockShape, ab as OverlayAnchorQuery, ac as PersistsTo, ad as ScrollTarget, ae as ScrollTargetBehavior, af as SelectionRangeInput, ag as SourceLayer, ah as StateClass, ai as SubscriptionShape, aj as UiBinding, ak as UiController, al as UiControllerKind, am as UiListener, an as UiUnsubscribe, ao as ViewportState, ap as createApiV3, aq as validateApiV3Metadata } from '../public-types-p9b8rfy8.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yjs';
|
|
5
5
|
import 'y-protocols/awareness';
|
|
6
|
-
import '../canonical-document-
|
|
6
|
+
import '../canonical-document-BMtONpgf.js';
|
|
7
7
|
import 'prosemirror-state';
|
|
8
8
|
import 'prosemirror-model';
|
|
9
9
|
|
package/dist/api/v3.js
CHANGED
|
@@ -5,22 +5,22 @@ import {
|
|
|
5
5
|
mockId,
|
|
6
6
|
mockPayload,
|
|
7
7
|
validateApiV3Metadata
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-XQCAMKIQ.js";
|
|
9
|
+
import "../chunk-SKPTKQHF.js";
|
|
10
10
|
import "../chunk-C2LWJ4CZ.js";
|
|
11
11
|
import {
|
|
12
12
|
createUiApi,
|
|
13
13
|
emitUxResponse
|
|
14
14
|
} from "../chunk-YIYM4ZAP.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-RMRTQGW3.js";
|
|
16
16
|
import "../chunk-KFCQYZXR.js";
|
|
17
17
|
import "../chunk-QIO6V46H.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-HUIHBBAQ.js";
|
|
19
19
|
import "../chunk-OYGMRRR7.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-63FYIGCT.js";
|
|
21
|
+
import "../chunk-XMHSGPLN.js";
|
|
22
|
+
import "../chunk-JJGVE5J7.js";
|
|
23
|
+
import "../chunk-Q3QYGKFE.js";
|
|
24
24
|
import "../chunk-4BJ6K26R.js";
|
|
25
25
|
import "../chunk-5DGKFNQT.js";
|
|
26
26
|
import "../chunk-OL2UEHRP.js";
|
|
@@ -634,6 +634,8 @@ interface NumberingLevelParagraphGeometry {
|
|
|
634
634
|
readonly tabStops?: TabStop[];
|
|
635
635
|
}
|
|
636
636
|
interface NumberingLevelDefinition {
|
|
637
|
+
/** Source numbering-part pointer for level-specific joins and command readback. */
|
|
638
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
637
639
|
readonly level: number;
|
|
638
640
|
readonly format: string;
|
|
639
641
|
readonly text: string;
|
|
@@ -652,6 +654,8 @@ interface NumberingLevelDefinition {
|
|
|
652
654
|
readonly picBulletId?: string;
|
|
653
655
|
}
|
|
654
656
|
interface NumberingLevelOverrideDefinition {
|
|
657
|
+
/** Source numbering-part pointer for override-level definition joins. */
|
|
658
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
655
659
|
readonly level: number;
|
|
656
660
|
readonly format?: string;
|
|
657
661
|
readonly text?: string;
|
|
@@ -672,6 +676,8 @@ interface NumberingInstance {
|
|
|
672
676
|
readonly overrides: NumberingLevelOverride[];
|
|
673
677
|
}
|
|
674
678
|
interface NumberingLevelOverride {
|
|
679
|
+
/** Source numbering-part pointer for `<w:lvlOverride>`. */
|
|
680
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
675
681
|
readonly level: number;
|
|
676
682
|
readonly startAt?: number;
|
|
677
683
|
readonly levelDefinition?: NumberingLevelOverrideDefinition;
|
|
@@ -634,6 +634,8 @@ interface NumberingLevelParagraphGeometry {
|
|
|
634
634
|
readonly tabStops?: TabStop[];
|
|
635
635
|
}
|
|
636
636
|
interface NumberingLevelDefinition {
|
|
637
|
+
/** Source numbering-part pointer for level-specific joins and command readback. */
|
|
638
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
637
639
|
readonly level: number;
|
|
638
640
|
readonly format: string;
|
|
639
641
|
readonly text: string;
|
|
@@ -652,6 +654,8 @@ interface NumberingLevelDefinition {
|
|
|
652
654
|
readonly picBulletId?: string;
|
|
653
655
|
}
|
|
654
656
|
interface NumberingLevelOverrideDefinition {
|
|
657
|
+
/** Source numbering-part pointer for override-level definition joins. */
|
|
658
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
655
659
|
readonly level: number;
|
|
656
660
|
readonly format?: string;
|
|
657
661
|
readonly text?: string;
|
|
@@ -672,6 +676,8 @@ interface NumberingInstance {
|
|
|
672
676
|
readonly overrides: NumberingLevelOverride[];
|
|
673
677
|
}
|
|
674
678
|
interface NumberingLevelOverride {
|
|
679
|
+
/** Source numbering-part pointer for `<w:lvlOverride>`. */
|
|
680
|
+
readonly sourceRef?: CanonicalSourceRef;
|
|
675
681
|
readonly level: number;
|
|
676
682
|
readonly startAt?: number;
|
|
677
683
|
readonly levelDefinition?: NumberingLevelOverrideDefinition;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadDocxSessionAsync
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XMHSGPLN.js";
|
|
4
4
|
import {
|
|
5
5
|
buildCompatibilityReport,
|
|
6
6
|
createLoadScheduler
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JJGVE5J7.js";
|
|
8
8
|
import {
|
|
9
9
|
decodePersistedSourcePackageBytes,
|
|
10
10
|
hasValidPersistedSourcePackageDigest,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TextTransactionError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5DSHUYSY.js";
|
|
4
4
|
import {
|
|
5
5
|
replaceParagraphScope,
|
|
6
6
|
resolveParagraphScope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-W34X3KBR.js";
|
|
8
8
|
import {
|
|
9
9
|
cloneParagraphProperties,
|
|
10
10
|
cloneStoryUnit,
|
|
@@ -1366,12 +1366,13 @@ function getLevelStartAt(level, levelDefinitions) {
|
|
|
1366
1366
|
return levelDefinitions.get(level)?.startAt ?? DEFAULT_NUMBERING_START_AT;
|
|
1367
1367
|
}
|
|
1368
1368
|
function getNumberingFormatPosture(format, value) {
|
|
1369
|
-
|
|
1369
|
+
const registryEntry = getNumberingFormatRegistryEntry(format);
|
|
1370
|
+
if (!registryEntry || registryEntry.renderSupport === "approximated") {
|
|
1370
1371
|
return {
|
|
1371
1372
|
status: "approximated",
|
|
1372
1373
|
requestedFormat: format,
|
|
1373
1374
|
renderedFormat: "decimal",
|
|
1374
|
-
reason: "unsupported-numbering-format-decimal-fallback"
|
|
1375
|
+
reason: registryEntry?.fallbackReason ?? "unsupported-numbering-format-decimal-fallback"
|
|
1375
1376
|
};
|
|
1376
1377
|
}
|
|
1377
1378
|
if (value !== void 0 && ((format === "upperRoman" || format === "lowerRoman") && (value <= 0 || value >= 4e3) || (format === "cardinalText" || format === "ordinalText") && (!Number.isInteger(value) || value < 1 || value > 999) || (format === "upperLetter" || format === "lowerLetter" || format === "chicago") && value < 1)) {
|
|
@@ -1402,56 +1403,148 @@ function renderLevelText(text, counters, levelDefinitions) {
|
|
|
1402
1403
|
});
|
|
1403
1404
|
return rendered.trim().length > 0 ? rendered : null;
|
|
1404
1405
|
}
|
|
1405
|
-
var SUPPORTED_NUMBERING_FORMATS = /* @__PURE__ */ new Set([
|
|
1406
|
-
"decimal",
|
|
1407
|
-
"decimalZero",
|
|
1408
|
-
"upperLetter",
|
|
1409
|
-
"lowerLetter",
|
|
1410
|
-
"upperRoman",
|
|
1411
|
-
"lowerRoman",
|
|
1412
|
-
"hex",
|
|
1413
|
-
"ordinal",
|
|
1414
|
-
"cardinalText",
|
|
1415
|
-
"ordinalText",
|
|
1416
|
-
"chicago",
|
|
1417
|
-
"bullet",
|
|
1418
|
-
"none"
|
|
1419
|
-
]);
|
|
1420
1406
|
function isSupportedNumberingFormat(format) {
|
|
1421
|
-
return
|
|
1407
|
+
return getNumberingFormatRegistryEntry(format)?.renderSupport === "supported";
|
|
1408
|
+
}
|
|
1409
|
+
function getNumberingFormatRegistryEntry(format) {
|
|
1410
|
+
return NUMBERING_FORMAT_REGISTRY.get(format);
|
|
1422
1411
|
}
|
|
1423
1412
|
function formatCounter(value, format) {
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1413
|
+
return getNumberingFormatRegistryEntry(format)?.render(value) ?? String(value);
|
|
1414
|
+
}
|
|
1415
|
+
var exactNumberingFormatEntries = [
|
|
1416
|
+
{
|
|
1417
|
+
format: "decimal",
|
|
1418
|
+
renderSupport: "supported",
|
|
1419
|
+
renderedFormat: "decimal",
|
|
1420
|
+
supportsMutation: true,
|
|
1421
|
+
render: (value) => String(value)
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
format: "decimalZero",
|
|
1425
|
+
renderSupport: "supported",
|
|
1426
|
+
renderedFormat: "decimalZero",
|
|
1427
|
+
supportsMutation: true,
|
|
1428
|
+
render: (value) => String(value).padStart(2, "0")
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
format: "upperLetter",
|
|
1432
|
+
renderSupport: "supported",
|
|
1433
|
+
renderedFormat: "upperLetter",
|
|
1434
|
+
supportsMutation: true,
|
|
1435
|
+
render: (value) => toAlphabetic2(value).toUpperCase()
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
format: "lowerLetter",
|
|
1439
|
+
renderSupport: "supported",
|
|
1440
|
+
renderedFormat: "lowerLetter",
|
|
1441
|
+
supportsMutation: true,
|
|
1442
|
+
render: (value) => toAlphabetic2(value).toLowerCase()
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
format: "upperRoman",
|
|
1446
|
+
renderSupport: "supported",
|
|
1447
|
+
renderedFormat: "upperRoman",
|
|
1448
|
+
supportsMutation: true,
|
|
1449
|
+
render: (value) => toRoman2(value).toUpperCase()
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
format: "lowerRoman",
|
|
1453
|
+
renderSupport: "supported",
|
|
1454
|
+
renderedFormat: "lowerRoman",
|
|
1455
|
+
supportsMutation: true,
|
|
1456
|
+
render: (value) => toRoman2(value).toLowerCase()
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
format: "hex",
|
|
1460
|
+
renderSupport: "supported",
|
|
1461
|
+
renderedFormat: "hex",
|
|
1462
|
+
supportsMutation: true,
|
|
1463
|
+
render: (value) => value >= 0 ? value.toString(16).toUpperCase() : String(value)
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
format: "ordinal",
|
|
1467
|
+
renderSupport: "supported",
|
|
1468
|
+
renderedFormat: "ordinal",
|
|
1469
|
+
supportsMutation: true,
|
|
1470
|
+
render: toOrdinal2
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
format: "cardinalText",
|
|
1474
|
+
renderSupport: "supported",
|
|
1475
|
+
renderedFormat: "cardinalText",
|
|
1476
|
+
supportsMutation: true,
|
|
1477
|
+
render: toCardinalText2
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
format: "ordinalText",
|
|
1481
|
+
renderSupport: "supported",
|
|
1482
|
+
renderedFormat: "ordinalText",
|
|
1483
|
+
supportsMutation: true,
|
|
1484
|
+
render: toOrdinalText2
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
format: "chicago",
|
|
1488
|
+
renderSupport: "supported",
|
|
1489
|
+
renderedFormat: "chicago",
|
|
1490
|
+
supportsMutation: true,
|
|
1491
|
+
render: toChicago2
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
format: "bullet",
|
|
1495
|
+
renderSupport: "supported",
|
|
1496
|
+
renderedFormat: "bullet",
|
|
1497
|
+
supportsMutation: true,
|
|
1498
|
+
render: () => ""
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
format: "none",
|
|
1502
|
+
renderSupport: "supported",
|
|
1503
|
+
renderedFormat: "none",
|
|
1504
|
+
supportsMutation: true,
|
|
1505
|
+
render: () => ""
|
|
1453
1506
|
}
|
|
1454
|
-
|
|
1507
|
+
];
|
|
1508
|
+
var approximatedDecimalFormats = [
|
|
1509
|
+
"decimalEnclosedCircle",
|
|
1510
|
+
"decimalEnclosedFullstop",
|
|
1511
|
+
"decimalEnclosedParen",
|
|
1512
|
+
"decimalFullWidth",
|
|
1513
|
+
"decimalHalfWidth",
|
|
1514
|
+
"aiueo",
|
|
1515
|
+
"iroha",
|
|
1516
|
+
"ganada",
|
|
1517
|
+
"chosung",
|
|
1518
|
+
"russianLower",
|
|
1519
|
+
"russianUpper",
|
|
1520
|
+
"hebrew1",
|
|
1521
|
+
"hebrew2",
|
|
1522
|
+
"arabicAlpha",
|
|
1523
|
+
"arabicAbjad",
|
|
1524
|
+
"thaiLetters",
|
|
1525
|
+
"thaiNumbers",
|
|
1526
|
+
"hindiLetters",
|
|
1527
|
+
"hindiNumbers",
|
|
1528
|
+
"ideographDigital",
|
|
1529
|
+
"ideographTraditional",
|
|
1530
|
+
"chineseCounting",
|
|
1531
|
+
"japaneseCounting",
|
|
1532
|
+
"japaneseLegal"
|
|
1533
|
+
];
|
|
1534
|
+
var approximatedNumberingFormatEntries = approximatedDecimalFormats.map((format) => ({
|
|
1535
|
+
format,
|
|
1536
|
+
renderSupport: "approximated",
|
|
1537
|
+
renderedFormat: "decimal",
|
|
1538
|
+
supportsMutation: false,
|
|
1539
|
+
fallbackReason: "unsupported-numbering-format-decimal-fallback",
|
|
1540
|
+
render: (value) => String(value)
|
|
1541
|
+
}));
|
|
1542
|
+
var NUMBERING_FORMAT_REGISTRY = new Map(
|
|
1543
|
+
[...exactNumberingFormatEntries, ...approximatedNumberingFormatEntries].map((entry) => [
|
|
1544
|
+
entry.format,
|
|
1545
|
+
entry
|
|
1546
|
+
])
|
|
1547
|
+
);
|
|
1455
1548
|
function toOrdinal2(value) {
|
|
1456
1549
|
if (value <= 0) return String(value);
|
|
1457
1550
|
const lastTwo = value % 100;
|
|
@@ -2105,12 +2198,36 @@ var DEFAULT_HYPERLINK_COLOR_HEX = "0563C1";
|
|
|
2105
2198
|
function resolveHyperlinkRunFormatting(input, catalog, resolver) {
|
|
2106
2199
|
const augmentedInput = input.characterStyleId === void 0 ? { ...input, characterStyleId: HYPERLINK_CHARACTER_STYLE_ID } : input;
|
|
2107
2200
|
const cascade = resolveEffectiveRunFormatting(augmentedInput, catalog);
|
|
2108
|
-
const resolvedColor = resolveHyperlinkColorHex(
|
|
2201
|
+
const resolvedColor = resolveHyperlinkColorHex(
|
|
2202
|
+
stripInheritedColorHexForImplicitHyperlink(input, catalog, cascade),
|
|
2203
|
+
resolver
|
|
2204
|
+
);
|
|
2109
2205
|
if (resolvedColor && resolvedColor !== cascade.colorHex) {
|
|
2110
2206
|
return { ...cascade, colorHex: resolvedColor };
|
|
2111
2207
|
}
|
|
2112
2208
|
return cascade;
|
|
2113
2209
|
}
|
|
2210
|
+
function hasDirectNonAutoColor(input) {
|
|
2211
|
+
return Boolean(input.direct?.colorHex && input.direct.colorHex !== "auto");
|
|
2212
|
+
}
|
|
2213
|
+
function characterStyleDeclaresColorHex(styleId, catalog) {
|
|
2214
|
+
if (!catalog) return false;
|
|
2215
|
+
const chain = resolveCharacterStyleChain(styleId, catalog);
|
|
2216
|
+
return chain.some((chainStyleId) => {
|
|
2217
|
+
const colorHex = catalog.characters[chainStyleId]?.runProperties?.colorHex;
|
|
2218
|
+
return Boolean(colorHex && colorHex !== "auto");
|
|
2219
|
+
});
|
|
2220
|
+
}
|
|
2221
|
+
function stripInheritedColorHexForImplicitHyperlink(originalInput, catalog, cascade) {
|
|
2222
|
+
if (originalInput.characterStyleId !== void 0 || hasDirectNonAutoColor(originalInput) || !cascade.colorHex || cascade.colorHex === "auto" || characterStyleDeclaresColorHex(HYPERLINK_CHARACTER_STYLE_ID, catalog)) {
|
|
2223
|
+
return cascade;
|
|
2224
|
+
}
|
|
2225
|
+
const inheritedCascade = resolveEffectiveRunFormatting(originalInput, catalog);
|
|
2226
|
+
if (inheritedCascade.colorHex !== cascade.colorHex) {
|
|
2227
|
+
return cascade;
|
|
2228
|
+
}
|
|
2229
|
+
return { ...cascade, colorHex: void 0 };
|
|
2230
|
+
}
|
|
2114
2231
|
function resolveHyperlinkColorHex(cascade, resolver) {
|
|
2115
2232
|
if (cascade.colorHex && cascade.colorHex !== "auto") {
|
|
2116
2233
|
return cascade.colorHex;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-Y4XZCMCS.js";
|
|
4
4
|
import {
|
|
5
5
|
applyTextTransaction
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5DSHUYSY.js";
|
|
7
7
|
import {
|
|
8
8
|
createInsertedTableBlock,
|
|
9
9
|
createNoopStructuralMutation,
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
replaceParagraphScope,
|
|
12
12
|
resolveInsertedTableStyleId,
|
|
13
13
|
resolveParagraphScope
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-W34X3KBR.js";
|
|
15
15
|
import {
|
|
16
16
|
NO_EDITABLE_TARGETS_INDEX,
|
|
17
17
|
createEditorSurfaceSnapshot
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HUIHBBAQ.js";
|
|
19
19
|
import {
|
|
20
20
|
createSelectionSnapshot
|
|
21
21
|
} from "./chunk-OYGMRRR7.js";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
PAGE_STACK_GAP_PX,
|
|
4
4
|
defaultChromeReservations,
|
|
5
5
|
resolveDefaultZoom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RMRTQGW3.js";
|
|
7
7
|
import {
|
|
8
8
|
storyTargetKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HUIHBBAQ.js";
|
|
10
10
|
import {
|
|
11
11
|
MAIN_STORY_KEY,
|
|
12
12
|
collectCanonicalLayoutInputs,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
incrementInvalidationCounter,
|
|
3
3
|
recordPerfSample,
|
|
4
4
|
resolvePageOverlayRectsFromGeometry
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OTQIW2TC.js";
|
|
6
6
|
import {
|
|
7
7
|
buildPageAnchorAttributes,
|
|
8
8
|
buildPageAnchorSelector,
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
findPageForOffset,
|
|
21
21
|
getUsableColumnWidth,
|
|
22
22
|
sanitizeMarkdown
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RMRTQGW3.js";
|
|
24
24
|
import {
|
|
25
25
|
createCanvasBackend
|
|
26
26
|
} from "./chunk-KFCQYZXR.js";
|
|
27
27
|
import {
|
|
28
28
|
storyTargetKey
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-HUIHBBAQ.js";
|
|
30
30
|
import {
|
|
31
31
|
EMU_PER_INCH,
|
|
32
32
|
EMU_PER_PX,
|