@beyondwork/docx-react-component 1.0.121 → 1.0.123
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 +318 -32
- package/dist/api/public-types.d.cts +2 -2
- package/dist/api/public-types.d.ts +2 -2
- package/dist/api/public-types.js +3 -3
- package/dist/api/v3.cjs +349 -62
- package/dist/api/v3.d.cts +3 -3
- package/dist/api/v3.d.ts +3 -3
- package/dist/api/v3.js +10 -10
- package/dist/{canonical-document-ByIqTd4s.d.cts → canonical-document-CG2TgAzj.d.cts} +1 -1
- package/dist/{canonical-document-ByIqTd4s.d.ts → canonical-document-CG2TgAzj.d.ts} +1 -1
- package/dist/{chunk-B4YHWFE3.js → chunk-32ZAOQ54.js} +1 -1
- package/dist/{chunk-QNGJRZ2D.js → chunk-4IPEZYQX.js} +1 -1
- package/dist/{chunk-3OFSP2IX.js → chunk-BOHHIVQ2.js} +3 -3
- package/dist/{chunk-EMDH4IQN.js → chunk-E5IBDE5E.js} +4 -3
- package/dist/{chunk-TFSXOIAI.js → chunk-FNWKE74J.js} +43 -3
- package/dist/{chunk-IT2DK3A7.js → chunk-H2YQKA55.js} +9 -7
- package/dist/{chunk-3TUQCHYT.js → chunk-H6IL5ABU.js} +47 -7
- package/dist/{chunk-GON2DNTE.js → chunk-HXHQA4BU.js} +1 -1
- package/dist/{chunk-3OHVK2D6.js → chunk-IR7QV2BX.js} +17 -1
- package/dist/{chunk-ZKSDVHGH.js → chunk-KOHQFZMM.js} +1 -1
- package/dist/{chunk-XVFENXLK.js → chunk-LGWNN3L2.js} +2 -2
- package/dist/{chunk-TMU7JMXX.js → chunk-MB7RJBSN.js} +9 -21
- package/dist/{chunk-UWDWGQH5.js → chunk-ML4A4WUN.js} +1 -1
- package/dist/{chunk-GZW2ERUO.js → chunk-N4VIXI2Z.js} +3 -3
- package/dist/{chunk-S4ANOS2M.js → chunk-NNPVA5VL.js} +2 -2
- package/dist/{chunk-QFU7ZOAD.js → chunk-PFYUJU3Q.js} +176 -36
- package/dist/{chunk-37SEJQ3G.js → chunk-RSYN6FTS.js} +2 -2
- package/dist/{chunk-OBCP6VTG.js → chunk-RWERZWHR.js} +1 -1
- package/dist/{chunk-UHQOUTAX.js → chunk-SGSJ4DQA.js} +377 -50
- package/dist/{chunk-PCXTMEGY.js → chunk-UHJLCPLU.js} +24 -14
- package/dist/{chunk-G3B2OBCZ.js → chunk-ZRHLLPSJ.js} +271 -26
- 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 +50 -9
- 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 +5 -5
- 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 +50 -9
- 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 +4 -4
- package/dist/core/commands/text-commands.cjs +66 -9
- package/dist/core/commands/text-commands.d.cts +3 -2
- package/dist/core/commands/text-commands.d.ts +3 -2
- package/dist/core/commands/text-commands.js +5 -5
- 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 +1196 -197
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +278 -85
- package/dist/io/docx-session.cjs +10 -21
- package/dist/io/docx-session.d.cts +4 -4
- package/dist/io/docx-session.d.ts +4 -4
- package/dist/io/docx-session.js +4 -4
- package/dist/legal.cjs +8 -20
- package/dist/legal.d.cts +1 -1
- package/dist/legal.d.ts +1 -1
- package/dist/legal.js +3 -3
- package/dist/{loader-BF8ju_LK.d.ts → loader-D9KCtj4m.d.cts} +4 -22
- package/dist/{loader-g54WRvj1.d.cts → loader-D9y4ZRjj.d.ts} +4 -22
- package/dist/{public-types-Dl1jiWjk.d.ts → public-types-CNnMHZM9.d.ts} +263 -213
- package/dist/{public-types-D_y4Ptcj.d.cts → public-types-DajNGKV4.d.cts} +263 -213
- package/dist/public-types.cjs +318 -32
- package/dist/public-types.d.cts +2 -2
- package/dist/public-types.d.ts +2 -2
- package/dist/public-types.js +3 -3
- package/dist/runtime/collab.d.cts +3 -3
- package/dist/runtime/collab.d.ts +3 -3
- package/dist/runtime/document-runtime.cjs +752 -77
- package/dist/runtime/document-runtime.d.cts +2 -2
- package/dist/runtime/document-runtime.d.ts +2 -2
- package/dist/runtime/document-runtime.js +14 -14
- package/dist/{session-C1EPAkcI.d.ts → session-DEmaOEjA.d.ts} +3 -3
- package/dist/{session-D15QOO0Q.d.cts → session-DyQGlryH.d.cts} +3 -3
- package/dist/session.cjs +12 -618
- package/dist/session.d.cts +5 -5
- package/dist/session.d.ts +5 -5
- package/dist/session.js +7 -9
- package/dist/tailwind.cjs +489 -63
- package/dist/tailwind.d.cts +2 -2
- package/dist/tailwind.d.ts +2 -2
- package/dist/tailwind.js +7 -7
- package/dist/{types-BoSRp2Vg.d.cts → types-CxE1aZiv.d.cts} +2 -2
- package/dist/{types-DEvRwq9C.d.ts → types-DjJNaE9c.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 +4 -4
- package/dist/ui-tailwind/theme/tokens.css +387 -0
- package/dist/ui-tailwind.cjs +489 -63
- package/dist/ui-tailwind.d.cts +3 -3
- package/dist/ui-tailwind.d.ts +3 -3
- package/dist/ui-tailwind.js +7 -7
- package/package.json +7 -3
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
incrementInvalidationCounter,
|
|
3
3
|
recordPerfSample,
|
|
4
4
|
resolvePageOverlayRectsFromGeometry
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-N4VIXI2Z.js";
|
|
6
6
|
import {
|
|
7
7
|
buildPageAnchorAttributes,
|
|
8
8
|
buildPageAnchorSelector,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
resolveChromePreset,
|
|
11
11
|
resolveChromePresetOptions,
|
|
12
12
|
resolveChromeVisibilityForPreset
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HXHQA4BU.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_PAGE_ESTIMATE_PX_PER_TWIP,
|
|
16
16
|
DEFAULT_PX_PER_TWIP,
|
|
@@ -20,19 +20,19 @@ import {
|
|
|
20
20
|
findPageForOffset,
|
|
21
21
|
getUsableColumnWidth,
|
|
22
22
|
sanitizeMarkdown
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ZRHLLPSJ.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-H6IL5ABU.js";
|
|
30
30
|
import {
|
|
31
31
|
EMU_PER_INCH,
|
|
32
32
|
EMU_PER_PX,
|
|
33
33
|
ROTATION_UNITS_PER_DEGREE,
|
|
34
34
|
TWIPS_PER_PX
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-FNWKE74J.js";
|
|
36
36
|
import {
|
|
37
37
|
createPublicNodeAnchor,
|
|
38
38
|
createPublicRangeAnchor
|
|
@@ -84,14 +84,13 @@ var TOOLBAR_CHROME_REGISTRY = [
|
|
|
84
84
|
surfaces: ["top-toolbar"],
|
|
85
85
|
group: "text",
|
|
86
86
|
presets: ["advanced", "review", "workflow"],
|
|
87
|
-
roles:
|
|
87
|
+
roles: EDITOR_AND_REVIEW,
|
|
88
88
|
fullPlacement: "inline",
|
|
89
89
|
compactPlacement: "overflow",
|
|
90
90
|
runtimeBehavior: "formatting",
|
|
91
91
|
rolePlacement: {
|
|
92
92
|
editor: "inline",
|
|
93
|
-
review: "
|
|
94
|
-
workflow: "overflow"
|
|
93
|
+
review: "overflow"
|
|
95
94
|
}
|
|
96
95
|
},
|
|
97
96
|
{
|
|
@@ -99,14 +98,13 @@ var TOOLBAR_CHROME_REGISTRY = [
|
|
|
99
98
|
surfaces: ["top-toolbar"],
|
|
100
99
|
group: "text",
|
|
101
100
|
presets: ["simple", "advanced", "review", "workflow"],
|
|
102
|
-
roles:
|
|
101
|
+
roles: EDITOR_AND_REVIEW,
|
|
103
102
|
fullPlacement: "inline",
|
|
104
103
|
compactPlacement: "inline",
|
|
105
104
|
runtimeBehavior: "formatting",
|
|
106
105
|
rolePlacement: {
|
|
107
106
|
editor: "inline",
|
|
108
|
-
review: "
|
|
109
|
-
workflow: "overflow"
|
|
107
|
+
review: "overflow"
|
|
110
108
|
}
|
|
111
109
|
},
|
|
112
110
|
{
|
|
@@ -233,10 +231,9 @@ var TOOLBAR_CHROME_REGISTRY = [
|
|
|
233
231
|
surfaces: ["top-toolbar"],
|
|
234
232
|
group: "review",
|
|
235
233
|
presets: ["simple", "advanced", "review", "workflow"],
|
|
236
|
-
//
|
|
237
|
-
//
|
|
238
|
-
|
|
239
|
-
roles: ALL_ROLES,
|
|
234
|
+
// Comment authoring belongs to Edit / Review. Workflow mode keeps scope
|
|
235
|
+
// and work-item controls primary instead of carrying review chrome.
|
|
236
|
+
roles: EDITOR_AND_REVIEW,
|
|
240
237
|
fullPlacement: "inline",
|
|
241
238
|
compactPlacement: "inline",
|
|
242
239
|
runtimeBehavior: "comment"
|
|
@@ -1860,12 +1857,16 @@ function TwToolbar(props) {
|
|
|
1860
1857
|
const showUpdateActions = isToolbarChromeItemVisible(scopedChromePolicy, "update-actions");
|
|
1861
1858
|
const showSidebarToggle = (props.showSidebarToggle ?? false) && isToolbarChromeItemVisible(scopedChromePolicy, "sidebar-toggle");
|
|
1862
1859
|
const showStyleSelectorsInRow = getToolbarChromePlacement(scopedChromePolicy, "text-style-selectors") === "inline";
|
|
1860
|
+
const showStyleSelectorsInOverflow = getToolbarChromePlacement(scopedChromePolicy, "text-style-selectors") === "overflow";
|
|
1861
|
+
const showInlineFormattingInOverflow = getToolbarChromePlacement(scopedChromePolicy, "inline-formatting") === "overflow";
|
|
1862
|
+
const showTextColorsInOverflow = getToolbarChromePlacement(scopedChromePolicy, "text-colors") === "overflow";
|
|
1863
|
+
const showParagraphAlignmentInOverflow = getToolbarChromePlacement(scopedChromePolicy, "paragraph-alignment") === "overflow";
|
|
1863
1864
|
const showListActionsInRow = getToolbarChromePlacement(scopedChromePolicy, "list-actions") === "inline";
|
|
1864
1865
|
const showSpacingActionsInRow = getToolbarChromePlacement(scopedChromePolicy, "indentation") === "inline";
|
|
1865
1866
|
const showListContinuationInRow = getToolbarChromePlacement(scopedChromePolicy, "list-continuation") === "inline";
|
|
1866
1867
|
const showInsertActionsInRow = getToolbarChromePlacement(scopedChromePolicy, "insert-actions") === "inline";
|
|
1867
1868
|
const showUpdateActionsInRow = getToolbarChromePlacement(scopedChromePolicy, "update-actions") === "inline";
|
|
1868
|
-
const showCompactOverflow = getToolbarChromePlacement(scopedChromePolicy, "text-style-selectors") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "list-actions") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "indentation") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "list-continuation") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "insert-actions") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "update-actions") === "overflow";
|
|
1869
|
+
const showCompactOverflow = getToolbarChromePlacement(scopedChromePolicy, "text-style-selectors") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "inline-formatting") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "text-colors") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "paragraph-alignment") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "list-actions") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "indentation") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "list-continuation") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "insert-actions") === "overflow" || getToolbarChromePlacement(scopedChromePolicy, "update-actions") === "overflow";
|
|
1869
1870
|
const showPostFormattingDivider = showListActionsInRow || showSpacingActionsInRow || showInsertActionsInRow || showUpdateActionsInRow || showCompactOverflow;
|
|
1870
1871
|
const zoomLabel = typeof zoomLevel === "number" ? `${zoomLevel}%` : zoomLevel === "pageWidth" ? "Fit width" : "Fit page";
|
|
1871
1872
|
const showZoomSteppers = responsiveTier === "wide";
|
|
@@ -2160,14 +2161,26 @@ function TwToolbar(props) {
|
|
|
2160
2161
|
insertDisabledReason,
|
|
2161
2162
|
paragraphStyles,
|
|
2162
2163
|
showInsertMenu: getToolbarChromePlacement(scopedChromePolicy, "insert-actions") === "overflow",
|
|
2164
|
+
showInlineFormatting: showInlineFormattingInOverflow,
|
|
2163
2165
|
showListActions: getToolbarChromePlacement(scopedChromePolicy, "list-actions") === "overflow",
|
|
2164
2166
|
showParagraphActions: getToolbarChromePlacement(scopedChromePolicy, "indentation") === "overflow",
|
|
2167
|
+
showParagraphAlignment: showParagraphAlignmentInOverflow,
|
|
2165
2168
|
showListContinuation: getToolbarChromePlacement(scopedChromePolicy, "list-continuation") === "overflow",
|
|
2166
|
-
showStyleSelectors:
|
|
2169
|
+
showStyleSelectors: showStyleSelectorsInOverflow,
|
|
2170
|
+
showTextColors: showTextColorsInOverflow,
|
|
2167
2171
|
showUpdateActions: getToolbarChromePlacement(scopedChromePolicy, "update-actions") === "overflow",
|
|
2168
2172
|
onSetParagraphStyle: props.onSetParagraphStyle,
|
|
2169
2173
|
onSetFontFamily: props.onSetFontFamily,
|
|
2170
2174
|
onSetFontSize: props.onSetFontSize,
|
|
2175
|
+
onToggleBold: props.onToggleBold,
|
|
2176
|
+
onToggleItalic: props.onToggleItalic,
|
|
2177
|
+
onToggleUnderline: props.onToggleUnderline,
|
|
2178
|
+
onToggleStrikethrough: props.onToggleStrikethrough,
|
|
2179
|
+
onToggleSuperscript: props.onToggleSuperscript,
|
|
2180
|
+
onToggleSubscript: props.onToggleSubscript,
|
|
2181
|
+
onSetTextColor: props.onSetTextColor,
|
|
2182
|
+
onSetHighlightColor: props.onSetHighlightColor,
|
|
2183
|
+
onSetAlignment: props.onSetAlignment,
|
|
2171
2184
|
onToggleBulletedList: props.onToggleBulletedList,
|
|
2172
2185
|
onToggleNumberedList: props.onToggleNumberedList,
|
|
2173
2186
|
onOutdent: props.onOutdent,
|
|
@@ -2677,8 +2690,8 @@ function ToolbarFontSizeSelect(props) {
|
|
|
2677
2690
|
function ToolbarCompactOverflow(props) {
|
|
2678
2691
|
const [open, setOpen] = React4.useState(false);
|
|
2679
2692
|
const overflowGroups = [
|
|
2680
|
-
props.showStyleSelectors ? "Format" : null,
|
|
2681
|
-
props.showListActions || props.showParagraphActions || props.showListContinuation ? "Paragraph" : null,
|
|
2693
|
+
props.showStyleSelectors || props.showInlineFormatting || props.showTextColors ? "Format" : null,
|
|
2694
|
+
props.showListActions || props.showParagraphActions || props.showParagraphAlignment || props.showListContinuation ? "Paragraph" : null,
|
|
2682
2695
|
props.showInsertMenu ? "Insert" : null,
|
|
2683
2696
|
props.showUpdateActions ? "Update" : null
|
|
2684
2697
|
].filter((label) => Boolean(label));
|
|
@@ -2763,6 +2776,129 @@ function ToolbarCompactOverflow(props) {
|
|
|
2763
2776
|
] })
|
|
2764
2777
|
] })
|
|
2765
2778
|
] }) : null,
|
|
2779
|
+
props.showInlineFormatting || props.showTextColors ? /* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
|
|
2780
|
+
!props.showStyleSelectors ? /* @__PURE__ */ jsx6("div", { className: "px-1 text-[10px] font-semibold uppercase tracking-[var(--tracking-status)] text-tertiary", children: "Text" }) : null,
|
|
2781
|
+
props.showInlineFormatting ? /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
2782
|
+
/* @__PURE__ */ jsx6(
|
|
2783
|
+
ToolbarMenuButton,
|
|
2784
|
+
{
|
|
2785
|
+
ariaLabel: "Bold",
|
|
2786
|
+
disabled: !props.canEdit || !props.onToggleBold,
|
|
2787
|
+
disabledReason: props.editDisabledReason,
|
|
2788
|
+
icon: /* @__PURE__ */ jsx6(Bold, { className: "h-3.5 w-3.5" }),
|
|
2789
|
+
label: "Bold",
|
|
2790
|
+
onClick: () => {
|
|
2791
|
+
props.onToggleBold?.();
|
|
2792
|
+
setOpen(false);
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
),
|
|
2796
|
+
/* @__PURE__ */ jsx6(
|
|
2797
|
+
ToolbarMenuButton,
|
|
2798
|
+
{
|
|
2799
|
+
ariaLabel: "Italic",
|
|
2800
|
+
disabled: !props.canEdit || !props.onToggleItalic,
|
|
2801
|
+
disabledReason: props.editDisabledReason,
|
|
2802
|
+
icon: /* @__PURE__ */ jsx6(Italic, { className: "h-3.5 w-3.5" }),
|
|
2803
|
+
label: "Italic",
|
|
2804
|
+
onClick: () => {
|
|
2805
|
+
props.onToggleItalic?.();
|
|
2806
|
+
setOpen(false);
|
|
2807
|
+
}
|
|
2808
|
+
}
|
|
2809
|
+
),
|
|
2810
|
+
/* @__PURE__ */ jsx6(
|
|
2811
|
+
ToolbarMenuButton,
|
|
2812
|
+
{
|
|
2813
|
+
ariaLabel: "Underline",
|
|
2814
|
+
disabled: !props.canEdit || !props.onToggleUnderline,
|
|
2815
|
+
disabledReason: props.editDisabledReason,
|
|
2816
|
+
icon: /* @__PURE__ */ jsx6(Underline, { className: "h-3.5 w-3.5" }),
|
|
2817
|
+
label: "Underline",
|
|
2818
|
+
onClick: () => {
|
|
2819
|
+
props.onToggleUnderline?.();
|
|
2820
|
+
setOpen(false);
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
),
|
|
2824
|
+
/* @__PURE__ */ jsx6(
|
|
2825
|
+
ToolbarMenuButton,
|
|
2826
|
+
{
|
|
2827
|
+
ariaLabel: "Strikethrough",
|
|
2828
|
+
disabled: !props.canEdit || !props.onToggleStrikethrough,
|
|
2829
|
+
disabledReason: props.editDisabledReason,
|
|
2830
|
+
icon: /* @__PURE__ */ jsx6(Strikethrough, { className: "h-3.5 w-3.5" }),
|
|
2831
|
+
label: "Strikethrough",
|
|
2832
|
+
onClick: () => {
|
|
2833
|
+
props.onToggleStrikethrough?.();
|
|
2834
|
+
setOpen(false);
|
|
2835
|
+
}
|
|
2836
|
+
}
|
|
2837
|
+
),
|
|
2838
|
+
/* @__PURE__ */ jsx6(
|
|
2839
|
+
ToolbarMenuButton,
|
|
2840
|
+
{
|
|
2841
|
+
ariaLabel: "Superscript",
|
|
2842
|
+
disabled: !props.canEdit || !props.onToggleSuperscript,
|
|
2843
|
+
disabledReason: props.editDisabledReason,
|
|
2844
|
+
icon: /* @__PURE__ */ jsx6(Superscript, { className: "h-3.5 w-3.5" }),
|
|
2845
|
+
label: "Superscript",
|
|
2846
|
+
onClick: () => {
|
|
2847
|
+
props.onToggleSuperscript?.();
|
|
2848
|
+
setOpen(false);
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2851
|
+
),
|
|
2852
|
+
/* @__PURE__ */ jsx6(
|
|
2853
|
+
ToolbarMenuButton,
|
|
2854
|
+
{
|
|
2855
|
+
ariaLabel: "Subscript",
|
|
2856
|
+
disabled: !props.canEdit || !props.onToggleSubscript,
|
|
2857
|
+
disabledReason: props.editDisabledReason,
|
|
2858
|
+
icon: /* @__PURE__ */ jsx6(Subscript, { className: "h-3.5 w-3.5" }),
|
|
2859
|
+
label: "Subscript",
|
|
2860
|
+
onClick: () => {
|
|
2861
|
+
props.onToggleSubscript?.();
|
|
2862
|
+
setOpen(false);
|
|
2863
|
+
}
|
|
2864
|
+
}
|
|
2865
|
+
)
|
|
2866
|
+
] }) : null,
|
|
2867
|
+
props.showTextColors ? /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-2 gap-2 px-1 pt-1", children: [
|
|
2868
|
+
/* @__PURE__ */ jsx6(
|
|
2869
|
+
ToolbarColorPopover,
|
|
2870
|
+
{
|
|
2871
|
+
ariaLabel: "Text color",
|
|
2872
|
+
colors: TEXT_COLORS.map((value) => ({ value, label: value })),
|
|
2873
|
+
disabled: !props.canEdit || !props.onSetTextColor,
|
|
2874
|
+
disabledReason: props.editDisabledReason,
|
|
2875
|
+
icon: /* @__PURE__ */ jsx6(Baseline, { className: "h-3.5 w-3.5" }),
|
|
2876
|
+
onSelect: (value) => {
|
|
2877
|
+
if (value) {
|
|
2878
|
+
props.onSetTextColor?.(value);
|
|
2879
|
+
setOpen(false);
|
|
2880
|
+
}
|
|
2881
|
+
},
|
|
2882
|
+
title: "Text color"
|
|
2883
|
+
}
|
|
2884
|
+
),
|
|
2885
|
+
/* @__PURE__ */ jsx6(
|
|
2886
|
+
ToolbarColorPopover,
|
|
2887
|
+
{
|
|
2888
|
+
ariaLabel: "Highlight color",
|
|
2889
|
+
colors: HIGHLIGHT_COLORS.map((entry) => ({ value: entry.value, label: entry.label })),
|
|
2890
|
+
disabled: !props.canEdit || !props.onSetHighlightColor,
|
|
2891
|
+
disabledReason: props.editDisabledReason,
|
|
2892
|
+
icon: /* @__PURE__ */ jsx6(Highlighter2, { className: "h-3.5 w-3.5" }),
|
|
2893
|
+
onSelect: (value) => {
|
|
2894
|
+
props.onSetHighlightColor?.(value);
|
|
2895
|
+
setOpen(false);
|
|
2896
|
+
},
|
|
2897
|
+
title: "Highlight color"
|
|
2898
|
+
}
|
|
2899
|
+
)
|
|
2900
|
+
] }) : null
|
|
2901
|
+
] }) : null,
|
|
2766
2902
|
props.showListActions ? /* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
|
|
2767
2903
|
/* @__PURE__ */ jsx6("div", { className: "px-1 text-[10px] font-semibold uppercase tracking-[var(--tracking-status)] text-tertiary", children: "Structure" }),
|
|
2768
2904
|
/* @__PURE__ */ jsx6(
|
|
@@ -2794,8 +2930,20 @@ function ToolbarCompactOverflow(props) {
|
|
|
2794
2930
|
}
|
|
2795
2931
|
)
|
|
2796
2932
|
] }) : null,
|
|
2797
|
-
props.showParagraphActions || props.showListContinuation && props.activeListContext ? /* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
|
|
2933
|
+
props.showParagraphActions || props.showParagraphAlignment || props.showListContinuation && props.activeListContext ? /* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
|
|
2798
2934
|
/* @__PURE__ */ jsx6("div", { className: "px-1 text-[10px] font-semibold uppercase tracking-[var(--tracking-status)] text-tertiary", children: "Paragraph" }),
|
|
2935
|
+
props.showParagraphAlignment ? /* @__PURE__ */ jsx6("div", { className: "px-1 pb-1", children: /* @__PURE__ */ jsx6(
|
|
2936
|
+
ToolbarAlignmentPopover,
|
|
2937
|
+
{
|
|
2938
|
+
activeAlignment: props.formattingState?.alignment,
|
|
2939
|
+
disabled: !props.canEdit || !props.onSetAlignment,
|
|
2940
|
+
disabledReason: props.editDisabledReason,
|
|
2941
|
+
onSelect: (alignment) => {
|
|
2942
|
+
props.onSetAlignment?.(alignment);
|
|
2943
|
+
setOpen(false);
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
) }) : null,
|
|
2799
2947
|
props.showParagraphActions ? /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
2800
2948
|
/* @__PURE__ */ jsx6(
|
|
2801
2949
|
ToolbarMenuButton,
|
|
@@ -8088,10 +8236,7 @@ var TwPageStackOverlayLayer = ({
|
|
|
8088
8236
|
null
|
|
8089
8237
|
);
|
|
8090
8238
|
if (warm) {
|
|
8091
|
-
return
|
|
8092
|
-
warm,
|
|
8093
|
-
containsTableBoundaryRisk(scrollRoot) ? collectTableEmbeddedBoundaryIndices(scrollRoot) : []
|
|
8094
|
-
);
|
|
8239
|
+
return warm;
|
|
8095
8240
|
}
|
|
8096
8241
|
}
|
|
8097
8242
|
return resolveSkeletalPageOverlayRectsFromLayout(facet);
|
|
@@ -8132,7 +8277,7 @@ var TwPageStackOverlayLayer = ({
|
|
|
8132
8277
|
);
|
|
8133
8278
|
if (uiRects !== null) {
|
|
8134
8279
|
incrementInvalidationCounter("overlay.page.ui_api.hit");
|
|
8135
|
-
setRectsIfChanged(
|
|
8280
|
+
setRectsIfChanged(uiRects);
|
|
8136
8281
|
return;
|
|
8137
8282
|
}
|
|
8138
8283
|
incrementInvalidationCounter("overlay.page.ui_api.fallthrough");
|
|
@@ -8147,7 +8292,7 @@ var TwPageStackOverlayLayer = ({
|
|
|
8147
8292
|
);
|
|
8148
8293
|
if (geometryRects !== null) {
|
|
8149
8294
|
incrementInvalidationCounter("overlay.page.geometry.hit");
|
|
8150
|
-
setRectsIfChanged(
|
|
8295
|
+
setRectsIfChanged(geometryRects);
|
|
8151
8296
|
return;
|
|
8152
8297
|
}
|
|
8153
8298
|
incrementInvalidationCounter("overlay.page.geometry.fallthrough");
|
|
@@ -8516,11 +8661,6 @@ function buildParagraphStyle(block) {
|
|
|
8516
8661
|
style[cssKey] = `${width} ${bStyle} ${color}`;
|
|
8517
8662
|
}
|
|
8518
8663
|
}
|
|
8519
|
-
if (block.pageBreakBefore) {
|
|
8520
|
-
style.borderTop = "2px dashed rgba(0,0,0,0.1)";
|
|
8521
|
-
style.paddingTop = "8px";
|
|
8522
|
-
style.marginTop = "16px";
|
|
8523
|
-
}
|
|
8524
8664
|
const framePr = block.frameProperties;
|
|
8525
8665
|
const hasPosition = typeof framePr?.xTwips === "number" || typeof framePr?.yTwips === "number" || typeof framePr?.xAlign === "string" || typeof framePr?.yAlign === "string";
|
|
8526
8666
|
if (framePr && framePr.dropCap !== "drop" && framePr.dropCap !== "margin" && hasPosition) {
|
|
@@ -16995,7 +17135,7 @@ var TwPageStackChromeLayerInner = ({
|
|
|
16995
17135
|
const [activeStoryPageIndex, setActiveStoryPageIndex] = React34.useState(null);
|
|
16996
17136
|
const refreshRectsNow = React34.useCallback(() => {
|
|
16997
17137
|
const pageCount = facet.getPageCount();
|
|
16998
|
-
const
|
|
17138
|
+
const reconcileDomRects = (baseRects) => reconcilePageStackRectsWithFlow({
|
|
16999
17139
|
baseRects,
|
|
17000
17140
|
pageCount,
|
|
17001
17141
|
scrollRoot,
|
|
@@ -17003,7 +17143,7 @@ var TwPageStackChromeLayerInner = ({
|
|
|
17003
17143
|
});
|
|
17004
17144
|
const uiRects = resolveUiPageRects(pageCount);
|
|
17005
17145
|
if (uiRects !== null) {
|
|
17006
|
-
setRects(
|
|
17146
|
+
setRects(uiRects);
|
|
17007
17147
|
return;
|
|
17008
17148
|
}
|
|
17009
17149
|
if (geometryFacet) {
|
|
@@ -17013,7 +17153,7 @@ var TwPageStackChromeLayerInner = ({
|
|
|
17013
17153
|
visiblePageIndexRange
|
|
17014
17154
|
);
|
|
17015
17155
|
if (geometryRects !== null) {
|
|
17016
|
-
setRects(
|
|
17156
|
+
setRects(geometryRects);
|
|
17017
17157
|
return;
|
|
17018
17158
|
}
|
|
17019
17159
|
setRects([]);
|
|
@@ -17041,7 +17181,7 @@ var TwPageStackChromeLayerInner = ({
|
|
|
17041
17181
|
visiblePageIndexRange
|
|
17042
17182
|
});
|
|
17043
17183
|
setRects(
|
|
17044
|
-
|
|
17184
|
+
reconcileDomRects(domRects)
|
|
17045
17185
|
);
|
|
17046
17186
|
} else {
|
|
17047
17187
|
const widgets = measureWidgetsViaOffsetChain(scrollRoot, {
|
|
@@ -17056,7 +17196,7 @@ var TwPageStackChromeLayerInner = ({
|
|
|
17056
17196
|
visiblePageIndexRange
|
|
17057
17197
|
});
|
|
17058
17198
|
setRects(
|
|
17059
|
-
|
|
17199
|
+
reconcileDomRects(domRects)
|
|
17060
17200
|
);
|
|
17061
17201
|
}
|
|
17062
17202
|
}, [facet, geometryFacet, resolveUiPageRects, scrollRoot, visiblePageIndexRange]);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TextTransactionError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IR7QV2BX.js";
|
|
4
4
|
import {
|
|
5
5
|
replaceParagraphScope,
|
|
6
6
|
resolveParagraphScope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KOHQFZMM.js";
|
|
8
8
|
import {
|
|
9
9
|
cloneParagraphProperties,
|
|
10
10
|
cloneStoryUnit,
|