@yudaocode/univer-docs-ui 1.6.218 → 1.6.219

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/lib/es/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  // src/controllers/docs-ui.controller.ts
13
13
  import {
14
14
  Disposable as Disposable2,
15
- ICommandService as ICommandService10,
15
+ ICommandService as ICommandService11,
16
16
  Inject,
17
17
  Injector,
18
18
  LocaleService as LocaleService3,
@@ -31,7 +31,7 @@ import {
31
31
  KeyCode,
32
32
  MetaKeys
33
33
  } from "@univerjs/ui";
34
- import React9 from "react";
34
+ import React10 from "react";
35
35
 
36
36
  // src/icons/doc-icons.tsx
37
37
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -170,10 +170,12 @@ var DocsUIFeatureService = class extends Disposable {
170
170
  this._modalOpen$ = new BehaviorSubject(false);
171
171
  this._editingChartId$ = new BehaviorSubject(null);
172
172
  this._editingMiniSheetId$ = new BehaviorSubject(null);
173
+ this._editingSmartArtId$ = new BehaviorSubject(null);
173
174
  this._slashMenuOpen$ = new BehaviorSubject(false);
174
175
  this.modalOpen$ = this._modalOpen$.asObservable();
175
176
  this.editingChartId$ = this._editingChartId$.asObservable();
176
177
  this.editingMiniSheetId$ = this._editingMiniSheetId$.asObservable();
178
+ this.editingSmartArtId$ = this._editingSmartArtId$.asObservable();
177
179
  this.slashMenuOpen$ = this._slashMenuOpen$.asObservable();
178
180
  const resolvedFeatures = resolveDocsUIFeatures(initial);
179
181
  this._baseIoModal = cloneIoModalConfig(initialIoModal ?? resolvedFeatures.ioModal);
@@ -194,6 +196,7 @@ var DocsUIFeatureService = class extends Disposable {
194
196
  this._ioModal$.complete();
195
197
  this._editingChartId$.complete();
196
198
  this._editingMiniSheetId$.complete();
199
+ this._editingSmartArtId$.complete();
197
200
  this._slashMenuOpen$.complete();
198
201
  }
199
202
  });
@@ -288,6 +291,15 @@ var DocsUIFeatureService = class extends Disposable {
288
291
  closeMiniSheetEditor() {
289
292
  this._editingMiniSheetId$.next(null);
290
293
  }
294
+ getEditingSmartArtId() {
295
+ return this._editingSmartArtId$.getValue();
296
+ }
297
+ openSmartArtEditor(smartArtId) {
298
+ this._editingSmartArtId$.next(smartArtId);
299
+ }
300
+ closeSmartArtEditor() {
301
+ this._editingSmartArtId$.next(null);
302
+ }
291
303
  isSlashMenuOpen() {
292
304
  return this._slashMenuOpen$.getValue();
293
305
  }
@@ -705,8 +717,10 @@ import {
705
717
  AddDocCascadeRuleCommand,
706
718
  ApplyDocMacrosCommand,
707
719
  AutoFitDocTableCommand,
720
+ BuildDocTableOfFiguresCommand,
708
721
  checkDocumentSpellingAndTerms,
709
722
  CleanUpDocFormattingCommand,
723
+ CombineDocRevisionsCommand,
710
724
  ConvertTableToTextCommand,
711
725
  ConvertTextToTableCommand,
712
726
  DeleteDocAreaCommand,
@@ -718,6 +732,7 @@ import {
718
732
  FindAndReplaceDocTextCommand,
719
733
  getDocAreasFromSnapshot,
720
734
  getDocCascadeRulesFromSnapshot,
735
+ getDocLineNumberingFromSnapshot,
721
736
  getDocNoteSettingsFromSnapshot,
722
737
  getDocumentStatistics,
723
738
  getParagraphPagination,
@@ -727,6 +742,8 @@ import {
727
742
  IDocSdtService as IDocSdtService2,
728
743
  InsertDocAreaCommand,
729
744
  InsertDocBookmarkCommand,
745
+ InsertDocCaptionCommand,
746
+ InsertDocCrossRefCommand,
730
747
  InsertDocEndnoteCommand,
731
748
  InsertDocFootnoteCommand,
732
749
  InsertDocInlineFormulaCommand,
@@ -735,17 +752,22 @@ import {
735
752
  InsertDocTableRowCommand,
736
753
  InsertHorizontalDividerCommand,
737
754
  listDocBookmarks,
755
+ listDocCaptions,
756
+ listDocCrossRefs,
738
757
  listDocInlineFormulas,
739
758
  listDocMiniSheets,
740
759
  listDocNotesFromSnapshot,
741
760
  listDocSdtControls,
742
761
  listDocTables,
743
762
  listLiveDocCharts,
763
+ listLiveSmartArts,
744
764
  MergeDocTableCellsCommand,
745
765
  parseDateRangePair,
766
+ parseDocxBytesToDocData,
746
767
  RecalculateDocInlineFormulasCommand,
747
768
  RecalculateDocTableFormulasCommand,
748
769
  RecordDocRevisionCommand,
770
+ RefreshDocCaptionsAndCrossRefsCommand,
749
771
  RemoveDocBookmarkCommand,
750
772
  RemoveDocCascadeRuleCommand,
751
773
  ReplaceDocUnitSnapshotCommand as ReplaceDocUnitSnapshotCommand2,
@@ -755,6 +777,7 @@ import {
755
777
  SaveDocVersionCommand,
756
778
  SetDocActiveRoleCommand,
757
779
  SetDocAreaPropertiesCommand,
780
+ SetDocLineNumberingCommand,
758
781
  SetDocModeCommand,
759
782
  SetDocNoteSettingsCommand,
760
783
  SetDocTableBorderPresetCommand,
@@ -876,6 +899,12 @@ var DocInspectorPanel = () => {
876
899
  const [customDelim, setCustomDelim] = useState(",");
877
900
  const [delimTextInput, setDelimTextInput] = useState("");
878
901
  const [tableCellFormulaInput, setTableCellFormulaInput] = useState("=SUM(ABOVE)");
902
+ const [captionCategoryInput, setCaptionCategoryInput] = useState("figure");
903
+ const [captionTitleInput, setCaptionTitleInput] = useState("");
904
+ const [selectedCrossRefCapId, setSelectedCrossRefCapId] = useState("");
905
+ const [crossRefDisplayMode, setCrossRefDisplayMode] = useState("labelAndNumber");
906
+ const [combineAuthorsInput, setCombineAuthorsInput] = useState("\u6CD5\u52A1\u5F20\u5DE5,\u8D22\u52A1\u674E\u5DE5");
907
+ const [combineStatusTip, setCombineStatusTip] = useState("");
879
908
  const versionsTick = useObservable(sdtService.versionsChange$, "");
880
909
  useEffect(() => {
881
910
  const disp = commandService.onCommandExecuted((info) => {
@@ -921,9 +950,13 @@ var DocInspectorPanel = () => {
921
950
  const controls = listDocSdtControls(snapshot, { includeSegments: true });
922
951
  const tables = listDocTables(snapshot);
923
952
  const liveCharts = listLiveDocCharts(snapshot);
953
+ const liveSmartArts = listLiveSmartArts(snapshot);
924
954
  const miniSheets = listDocMiniSheets(snapshot);
925
955
  const inlineFormulas = listDocInlineFormulas(snapshot);
926
956
  const bookmarks = listDocBookmarks(snapshot);
957
+ const captions = listDocCaptions(snapshot);
958
+ const crossRefs = listDocCrossRefs(snapshot);
959
+ const lineNumbering = getDocLineNumberingFromSnapshot(snapshot);
927
960
  const docNotes = listDocNotesFromSnapshot(snapshot);
928
961
  const fnSettings = getDocNoteSettingsFromSnapshot(snapshot, "footnote");
929
962
  const docAreas = getDocAreasFromSnapshot(snapshot);
@@ -2201,8 +2234,8 @@ var DocInspectorPanel = () => {
2201
2234
  /* @__PURE__ */ jsxs2("div", { className: "yudao-doc-section", "data-testid": "yudao-charts-minisheets-card", children: [
2202
2235
  /* @__PURE__ */ jsxs2("div", { className: "yudao-doc-section-title", children: [
2203
2236
  /* @__PURE__ */ jsxs2("span", { children: [
2204
- "\u5185\u5D4C\u56FE\u8868\u4E0E\u5B9E\u65F6\u8BA1\u7B97\u8868 (",
2205
- liveCharts.length + miniSheets.length,
2237
+ "\u5185\u5D4C\u56FE\u8868\u3001\u667A\u80FD\u56FE\u793A\u4E0E\u8BA1\u7B97\u8868 (",
2238
+ liveCharts.length + liveSmartArts.length + miniSheets.length,
2206
2239
  ")"
2207
2240
  ] }),
2208
2241
  /* @__PURE__ */ jsxs2("div", { style: { display: "flex", gap: 4 }, children: [
@@ -2217,6 +2250,17 @@ var DocInspectorPanel = () => {
2217
2250
  children: "+ \u56FE\u8868"
2218
2251
  }
2219
2252
  ),
2253
+ /* @__PURE__ */ jsx2(
2254
+ "button",
2255
+ {
2256
+ type: "button",
2257
+ "data-testid": "yudao-inspector-new-smartart",
2258
+ className: "yudao-doc-mini-btn is-soft-primary",
2259
+ style: { padding: "2px 6px", fontSize: 10.5 },
2260
+ onClick: () => featureService.openSmartArtEditor("__new__"),
2261
+ children: "+ \u667A\u80FD\u56FE\u793A"
2262
+ }
2263
+ ),
2220
2264
  /* @__PURE__ */ jsx2(
2221
2265
  "button",
2222
2266
  {
@@ -2230,7 +2274,7 @@ var DocInspectorPanel = () => {
2230
2274
  )
2231
2275
  ] })
2232
2276
  ] }),
2233
- liveCharts.length === 0 && miniSheets.length === 0 ? /* @__PURE__ */ jsx2("div", { style: { fontSize: 11, color: "#7d8698" }, children: "\u652F\u6301\u539F\u751F Word OOXML \u56FE\u8868\u53CC\u5411\u5F80\u8FD4\u53CA\u53EF\u5B9E\u65F6\u516C\u5F0F\u8BA1\u7B97\u7684\u5185\u5D4C\u7535\u5B50\u8868\u683C\u3002" }) : /* @__PURE__ */ jsxs2("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
2277
+ liveCharts.length === 0 && liveSmartArts.length === 0 && miniSheets.length === 0 ? /* @__PURE__ */ jsx2("div", { style: { fontSize: 11, color: "#7d8698" }, children: "\u652F\u6301\u539F\u751F Word OOXML \u56FE\u8868\u3001SmartArt \u5C42\u7EA7\u7ED3\u6784\u56FE\u793A\u53CA\u5B9E\u65F6\u516C\u5F0F\u8BA1\u7B97\u8868\u3002" }) : /* @__PURE__ */ jsxs2("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
2234
2278
  liveCharts.map((ch) => /* @__PURE__ */ jsxs2(
2235
2279
  "div",
2236
2280
  {
@@ -2265,6 +2309,40 @@ var DocInspectorPanel = () => {
2265
2309
  },
2266
2310
  ch.id
2267
2311
  )),
2312
+ liveSmartArts.map((sa) => /* @__PURE__ */ jsxs2(
2313
+ "div",
2314
+ {
2315
+ style: {
2316
+ display: "flex",
2317
+ justifyContent: "space-between",
2318
+ alignItems: "center",
2319
+ padding: "4px 8px",
2320
+ borderRadius: 6,
2321
+ background: "#ffffff",
2322
+ border: "1px solid #e3e5ea"
2323
+ },
2324
+ children: [
2325
+ /* @__PURE__ */ jsxs2("span", { style: { fontSize: 11.5, color: "#1b1c1f", fontWeight: 500 }, children: [
2326
+ sa.title || "\u667A\u80FD\u7ED3\u6784\u56FE\u793A",
2327
+ " (",
2328
+ sa.layout,
2329
+ ")"
2330
+ ] }),
2331
+ /* @__PURE__ */ jsx2(
2332
+ "button",
2333
+ {
2334
+ type: "button",
2335
+ "data-testid": `yudao-inspector-edit-smartart-${sa.id}`,
2336
+ className: "yudao-doc-mini-btn is-soft-primary",
2337
+ style: { padding: "2px 7px", fontSize: 10.5 },
2338
+ onClick: () => featureService.openSmartArtEditor(sa.id),
2339
+ children: "\u7F16\u8F91\u56FE\u793A\u8282\u70B9"
2340
+ }
2341
+ )
2342
+ ]
2343
+ },
2344
+ sa.id
2345
+ )),
2268
2346
  miniSheets.map((ms) => /* @__PURE__ */ jsxs2(
2269
2347
  "div",
2270
2348
  {
@@ -2661,6 +2739,338 @@ var DocInspectorPanel = () => {
2661
2739
  )
2662
2740
  ] })
2663
2741
  ] }),
2742
+ /* @__PURE__ */ jsxs2("div", { className: "yudao-doc-section", "data-testid": "yudao-line-numbering-card", children: [
2743
+ /* @__PURE__ */ jsxs2("div", { className: "yudao-doc-section-title", children: [
2744
+ /* @__PURE__ */ jsx2("span", { children: "\u6B63\u6587\u9875\u8FB9\u884C\u53F7 (<w:lnNumType>)" }),
2745
+ /* @__PURE__ */ jsx2(
2746
+ "span",
2747
+ {
2748
+ style: {
2749
+ fontSize: 10.5,
2750
+ padding: "1px 6px",
2751
+ borderRadius: 999,
2752
+ background: lineNumbering.enabled ? "#f3f5ff" : "#eeeff1",
2753
+ color: lineNumbering.enabled ? "#2c53f1" : "#7d8698",
2754
+ fontWeight: 500
2755
+ },
2756
+ children: lineNumbering.enabled ? "\u5DF2\u542F\u7528" : "\u672A\u542F\u7528"
2757
+ }
2758
+ )
2759
+ ] }),
2760
+ /* @__PURE__ */ jsxs2("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 }, children: [
2761
+ /* @__PURE__ */ jsxs2("label", { style: { display: "flex", alignItems: "center", gap: 5, fontSize: 11.5, cursor: "pointer" }, children: [
2762
+ /* @__PURE__ */ jsx2(
2763
+ "input",
2764
+ {
2765
+ type: "checkbox",
2766
+ "data-testid": "yudao-linenum-enable-checkbox",
2767
+ checked: Boolean(lineNumbering.enabled),
2768
+ onChange: (e) => commandService.syncExecuteCommand(SetDocLineNumberingCommand.id, {
2769
+ unitId: unit.getUnitId(),
2770
+ config: {
2771
+ ...lineNumbering,
2772
+ enabled: e.target.checked
2773
+ }
2774
+ })
2775
+ }
2776
+ ),
2777
+ /* @__PURE__ */ jsx2("span", { children: "\u542F\u7528\u884C\u53F7" })
2778
+ ] }),
2779
+ /* @__PURE__ */ jsxs2("label", { style: { display: "flex", alignItems: "center", gap: 4, fontSize: 11 }, children: [
2780
+ /* @__PURE__ */ jsx2("span", { style: { color: "#4e5565" }, children: "\u8D77\u59CB\u53F7" }),
2781
+ /* @__PURE__ */ jsx2(
2782
+ "input",
2783
+ {
2784
+ type: "number",
2785
+ min: 1,
2786
+ "data-testid": "yudao-linenum-start-input",
2787
+ value: lineNumbering.start ?? 1,
2788
+ onChange: (e) => commandService.syncExecuteCommand(SetDocLineNumberingCommand.id, {
2789
+ unitId: unit.getUnitId(),
2790
+ config: {
2791
+ ...lineNumbering,
2792
+ enabled: Boolean(lineNumbering.enabled ?? true),
2793
+ start: Math.max(1, Number(e.target.value) || 1)
2794
+ }
2795
+ }),
2796
+ style: {
2797
+ width: 54,
2798
+ fontSize: 11,
2799
+ padding: "2px 5px",
2800
+ border: "1px solid #e3e5ea",
2801
+ borderRadius: 4,
2802
+ background: "#ffffff"
2803
+ }
2804
+ }
2805
+ )
2806
+ ] })
2807
+ ] }),
2808
+ /* @__PURE__ */ jsxs2("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
2809
+ /* @__PURE__ */ jsxs2("label", { style: { display: "flex", alignItems: "center", gap: 4, fontSize: 11, flex: 1 }, children: [
2810
+ /* @__PURE__ */ jsx2("span", { style: { color: "#4e5565", whiteSpace: "nowrap" }, children: "\u6B65\u957F" }),
2811
+ /* @__PURE__ */ jsxs2(
2812
+ "select",
2813
+ {
2814
+ "data-testid": "yudao-linenum-step-select",
2815
+ value: lineNumbering.countBy ?? 1,
2816
+ onChange: (e) => commandService.syncExecuteCommand(SetDocLineNumberingCommand.id, {
2817
+ unitId: unit.getUnitId(),
2818
+ config: {
2819
+ ...lineNumbering,
2820
+ enabled: Boolean(lineNumbering.enabled ?? true),
2821
+ countBy: Math.max(1, Number(e.target.value) || 1)
2822
+ }
2823
+ }),
2824
+ style: {
2825
+ flex: 1,
2826
+ fontSize: 11,
2827
+ padding: "3px 5px",
2828
+ border: "1px solid #e3e5ea",
2829
+ borderRadius: 4,
2830
+ background: "#ffffff"
2831
+ },
2832
+ children: [
2833
+ /* @__PURE__ */ jsx2("option", { value: 1, children: "1 (\u9010\u884C\u663E\u793A)" }),
2834
+ /* @__PURE__ */ jsx2("option", { value: 5, children: "5 (\u6BCF 5 \u884C)" }),
2835
+ /* @__PURE__ */ jsx2("option", { value: 10, children: "10 (\u6BCF 10 \u884C)" })
2836
+ ]
2837
+ }
2838
+ )
2839
+ ] }),
2840
+ /* @__PURE__ */ jsxs2("label", { style: { display: "flex", alignItems: "center", gap: 4, fontSize: 11, flex: 1.3 }, children: [
2841
+ /* @__PURE__ */ jsx2("span", { style: { color: "#4e5565", whiteSpace: "nowrap" }, children: "\u91CD\u7F16\u65B9\u5F0F" }),
2842
+ /* @__PURE__ */ jsxs2(
2843
+ "select",
2844
+ {
2845
+ "data-testid": "yudao-linenum-restart-select",
2846
+ value: lineNumbering.restart ?? "newPage",
2847
+ onChange: (e) => commandService.syncExecuteCommand(SetDocLineNumberingCommand.id, {
2848
+ unitId: unit.getUnitId(),
2849
+ config: {
2850
+ ...lineNumbering,
2851
+ enabled: Boolean(lineNumbering.enabled ?? true),
2852
+ restart: e.target.value
2853
+ }
2854
+ }),
2855
+ style: {
2856
+ flex: 1,
2857
+ fontSize: 11,
2858
+ padding: "3px 5px",
2859
+ border: "1px solid #e3e5ea",
2860
+ borderRadius: 4,
2861
+ background: "#ffffff"
2862
+ },
2863
+ children: [
2864
+ /* @__PURE__ */ jsx2("option", { value: "newPage", children: "\u6BCF\u9875\u91CD\u7F16" }),
2865
+ /* @__PURE__ */ jsx2("option", { value: "continuous", children: "\u8FDE\u7EED\u7F16\u53F7" }),
2866
+ /* @__PURE__ */ jsx2("option", { value: "newSection", children: "\u6BCF\u8282\u91CD\u7F16" })
2867
+ ]
2868
+ }
2869
+ )
2870
+ ] })
2871
+ ] })
2872
+ ] }),
2873
+ /* @__PURE__ */ jsxs2("div", { className: "yudao-doc-section", "data-testid": "yudao-captions-xrefs-card", children: [
2874
+ /* @__PURE__ */ jsxs2("div", { className: "yudao-doc-section-title", children: [
2875
+ /* @__PURE__ */ jsxs2("span", { children: [
2876
+ "\u9898\u6CE8\u3001\u56FE\u8868\u76EE\u5F55\u4E0E\u4EA4\u53C9\u5F15\u7528 (",
2877
+ captions.length,
2878
+ ")"
2879
+ ] }),
2880
+ /* @__PURE__ */ jsxs2("div", { style: { display: "flex", gap: 4 }, children: [
2881
+ /* @__PURE__ */ jsx2(
2882
+ "button",
2883
+ {
2884
+ type: "button",
2885
+ "data-testid": "yudao-refresh-captions-xrefs-btn",
2886
+ className: "yudao-doc-mini-btn",
2887
+ style: { padding: "2px 6px", fontSize: 10.5 },
2888
+ onClick: () => commandService.syncExecuteCommand(RefreshDocCaptionsAndCrossRefsCommand.id, {
2889
+ unitId: unit.getUnitId()
2890
+ }),
2891
+ children: "\u5237\u65B0\u7F16\u53F7"
2892
+ }
2893
+ ),
2894
+ /* @__PURE__ */ jsx2(
2895
+ "button",
2896
+ {
2897
+ type: "button",
2898
+ "data-testid": "yudao-build-tof-btn",
2899
+ className: "yudao-doc-mini-btn is-soft-primary",
2900
+ style: { padding: "2px 6px", fontSize: 10.5 },
2901
+ onClick: () => commandService.syncExecuteCommand(BuildDocTableOfFiguresCommand.id, {
2902
+ unitId: unit.getUnitId(),
2903
+ category: "all"
2904
+ }),
2905
+ children: "\u751F\u6210\u56FE\u8868\u76EE\u5F55"
2906
+ }
2907
+ )
2908
+ ] })
2909
+ ] }),
2910
+ /* @__PURE__ */ jsxs2("div", { style: { display: "flex", gap: 4 }, children: [
2911
+ /* @__PURE__ */ jsxs2(
2912
+ "select",
2913
+ {
2914
+ "data-testid": "yudao-caption-category-select",
2915
+ value: captionCategoryInput,
2916
+ onChange: (e) => setCaptionCategoryInput(e.target.value),
2917
+ style: {
2918
+ width: 76,
2919
+ fontSize: 11,
2920
+ padding: "3px 4px",
2921
+ border: "1px solid #e3e5ea",
2922
+ borderRadius: 6,
2923
+ background: "#ffffff"
2924
+ },
2925
+ children: [
2926
+ /* @__PURE__ */ jsx2("option", { value: "figure", children: "\u56FE" }),
2927
+ /* @__PURE__ */ jsx2("option", { value: "table", children: "\u8868" }),
2928
+ /* @__PURE__ */ jsx2("option", { value: "equation", children: "\u516C\u5F0F" })
2929
+ ]
2930
+ }
2931
+ ),
2932
+ /* @__PURE__ */ jsx2(
2933
+ "input",
2934
+ {
2935
+ type: "text",
2936
+ "data-testid": "yudao-caption-title-input",
2937
+ placeholder: "\u9898\u6CE8\u6807\u9898\uFF08\u5982\uFF1A\u7CFB\u7EDF\u603B\u4F53\u67B6\u6784\uFF09",
2938
+ value: captionTitleInput,
2939
+ onChange: (e) => setCaptionTitleInput(e.target.value),
2940
+ style: {
2941
+ flex: 1,
2942
+ fontSize: 11.5,
2943
+ padding: "4px 6px",
2944
+ border: "1px solid #e3e5ea",
2945
+ borderRadius: 6,
2946
+ background: "#ffffff"
2947
+ }
2948
+ }
2949
+ ),
2950
+ /* @__PURE__ */ jsx2(
2951
+ "button",
2952
+ {
2953
+ type: "button",
2954
+ "data-testid": "yudao-insert-caption-btn",
2955
+ className: "yudao-doc-mini-btn is-soft-primary",
2956
+ onClick: () => {
2957
+ commandService.syncExecuteCommand(InsertDocCaptionCommand.id, {
2958
+ unitId: unit.getUnitId(),
2959
+ category: captionCategoryInput,
2960
+ title: captionTitleInput.trim()
2961
+ });
2962
+ setCaptionTitleInput("");
2963
+ },
2964
+ children: "+ \u9898\u6CE8"
2965
+ }
2966
+ )
2967
+ ] }),
2968
+ captions.length > 0 && /* @__PURE__ */ jsxs2("div", { style: { display: "flex", gap: 4, alignItems: "center" }, children: [
2969
+ /* @__PURE__ */ jsx2(
2970
+ "select",
2971
+ {
2972
+ "data-testid": "yudao-xref-target-select",
2973
+ value: captions.some((c) => c.id === selectedCrossRefCapId) ? selectedCrossRefCapId : captions[0].id,
2974
+ onChange: (e) => setSelectedCrossRefCapId(e.target.value),
2975
+ style: {
2976
+ flex: 1.2,
2977
+ fontSize: 11,
2978
+ padding: "3px 5px",
2979
+ border: "1px solid #e3e5ea",
2980
+ borderRadius: 6,
2981
+ background: "#ffffff"
2982
+ },
2983
+ children: captions.map((c) => /* @__PURE__ */ jsxs2("option", { value: c.id, children: [
2984
+ c.prefixLabel,
2985
+ " ",
2986
+ c.seqNumber,
2987
+ c.title ? `\uFF1A${c.title}` : ""
2988
+ ] }, c.id))
2989
+ }
2990
+ ),
2991
+ /* @__PURE__ */ jsxs2(
2992
+ "select",
2993
+ {
2994
+ "data-testid": "yudao-xref-mode-select",
2995
+ value: crossRefDisplayMode,
2996
+ onChange: (e) => setCrossRefDisplayMode(e.target.value),
2997
+ style: {
2998
+ width: 90,
2999
+ fontSize: 11,
3000
+ padding: "3px 4px",
3001
+ border: "1px solid #e3e5ea",
3002
+ borderRadius: 6,
3003
+ background: "#ffffff"
3004
+ },
3005
+ children: [
3006
+ /* @__PURE__ */ jsx2("option", { value: "labelAndNumber", children: "\u6807\u7B7E+\u7F16\u53F7" }),
3007
+ /* @__PURE__ */ jsx2("option", { value: "fullCaption", children: "\u5B8C\u6574\u9898\u6CE8" }),
3008
+ /* @__PURE__ */ jsx2("option", { value: "pageNumber", children: "\u6240\u5728\u9875\u7801" })
3009
+ ]
3010
+ }
3011
+ ),
3012
+ /* @__PURE__ */ jsx2(
3013
+ "button",
3014
+ {
3015
+ type: "button",
3016
+ "data-testid": "yudao-insert-xref-btn",
3017
+ className: "yudao-doc-mini-btn is-soft-primary",
3018
+ onClick: () => {
3019
+ const targetId = captions.some((c) => c.id === selectedCrossRefCapId) ? selectedCrossRefCapId : captions[0]?.id;
3020
+ if (!targetId) return;
3021
+ commandService.syncExecuteCommand(InsertDocCrossRefCommand.id, {
3022
+ unitId: unit.getUnitId(),
3023
+ targetCaptionId: targetId,
3024
+ displayMode: crossRefDisplayMode
3025
+ });
3026
+ },
3027
+ children: "+ \u5F15\u7528"
3028
+ }
3029
+ )
3030
+ ] }),
3031
+ captions.length === 0 ? /* @__PURE__ */ jsxs2("div", { style: { fontSize: 11, color: "#7d8698" }, children: [
3032
+ "\u652F\u6301\u81EA\u52A8\u91CD\u7F16\u53F7\u9898\u6CE8\uFF08\u56FE 1 / \u8868 1\uFF09\u3001\u56FE\u8868\u76EE\u5F55\u53CA ",
3033
+ /* @__PURE__ */ jsx2("code", { children: "SEQ" }),
3034
+ " / ",
3035
+ /* @__PURE__ */ jsx2("code", { children: "REF" }),
3036
+ " \u4EA4\u53C9\u5F15\u7528\u81EA\u52A8\u5237\u65B0\u3002"
3037
+ ] }) : /* @__PURE__ */ jsxs2("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
3038
+ captions.map((cap) => /* @__PURE__ */ jsxs2(
3039
+ "div",
3040
+ {
3041
+ style: {
3042
+ display: "flex",
3043
+ justifyContent: "space-between",
3044
+ alignItems: "center",
3045
+ fontSize: 11,
3046
+ padding: "3px 7px",
3047
+ borderRadius: 5,
3048
+ background: "#ffffff",
3049
+ border: "1px solid #e3e5ea"
3050
+ },
3051
+ children: [
3052
+ /* @__PURE__ */ jsxs2("span", { style: { color: "#1b1c1f", fontWeight: 500 }, children: [
3053
+ cap.prefixLabel,
3054
+ " ",
3055
+ cap.seqNumber,
3056
+ cap.title ? `\uFF1A${cap.title}` : ""
3057
+ ] }),
3058
+ /* @__PURE__ */ jsxs2("span", { style: { color: "#7d8698", fontSize: 10 }, children: [
3059
+ "@",
3060
+ cap.anchorIndex
3061
+ ] })
3062
+ ]
3063
+ },
3064
+ cap.id
3065
+ )),
3066
+ crossRefs.length > 0 && /* @__PURE__ */ jsxs2("div", { style: { fontSize: 10.5, color: "#4e5565" }, children: [
3067
+ "\u5DF2\u5173\u8054\u4EA4\u53C9\u5F15\u7528 (",
3068
+ crossRefs.length,
3069
+ ")\uFF1A",
3070
+ crossRefs.map((xr) => xr.renderedText).join("\u3001")
3071
+ ] })
3072
+ ] })
3073
+ ] }),
2664
3074
  features.legacyFormatIo && /* @__PURE__ */ jsxs2("div", { className: "yudao-doc-section", children: [
2665
3075
  /* @__PURE__ */ jsxs2("div", { className: "yudao-doc-section-title", children: [
2666
3076
  /* @__PURE__ */ jsx2("span", { children: "\u90AE\u4EF6\u5408\u5E76\u4E0E\u591A\u683C\u5F0F\u517C\u5BB9 (.doc/.rtf/.odt)" }),
@@ -3058,14 +3468,113 @@ var DocInspectorPanel = () => {
3058
3468
  }
3059
3469
  )
3060
3470
  ] }),
3061
- (() => {
3062
- const pendingRevisions = (metadata.revisions ?? []).filter((r) => r.status === "pending");
3063
- if (pendingRevisions.length === 0) {
3064
- return /* @__PURE__ */ jsxs2("div", { style: { fontSize: 11, color: "#7d8698" }, children: [
3065
- "\u5F53\u524D\u65E0\u5F85\u5BA1\u9605\u4FEE\u8BA2\u8BB0\u5F55\uFF08\u517C\u5BB9 Word ",
3066
- /* @__PURE__ */ jsx2("code", { children: "<w:ins>" }),
3067
- " / ",
3068
- /* @__PURE__ */ jsx2("code", { children: "<w:del>" }),
3471
+ /* @__PURE__ */ jsxs2(
3472
+ "div",
3473
+ {
3474
+ style: {
3475
+ display: "flex",
3476
+ flexDirection: "column",
3477
+ gap: 5,
3478
+ padding: "6px 8px",
3479
+ borderRadius: 6,
3480
+ background: "#f8fafc",
3481
+ border: "1px dashed #cbd5e1"
3482
+ },
3483
+ children: [
3484
+ /* @__PURE__ */ jsxs2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 6 }, children: [
3485
+ /* @__PURE__ */ jsx2("span", { style: { fontSize: 11, fontWeight: 600, color: "#334155" }, children: "\u591A\u5BA1\u9605\u526F\u672C\u5408\u5E76 (Combine Revisions)" }),
3486
+ combineStatusTip && /* @__PURE__ */ jsx2("span", { style: { fontSize: 10, color: "#2c53f1", fontWeight: 500 }, children: combineStatusTip })
3487
+ ] }),
3488
+ /* @__PURE__ */ jsxs2("div", { style: { display: "flex", gap: 4 }, children: [
3489
+ /* @__PURE__ */ jsx2(
3490
+ "input",
3491
+ {
3492
+ type: "text",
3493
+ "data-testid": "yudao-combine-authors-input",
3494
+ value: combineAuthorsInput,
3495
+ onChange: (e) => setCombineAuthorsInput(e.target.value),
3496
+ placeholder: "\u5BA1\u9605\u4EBA\u5217\u8868\uFF08\u9017\u53F7\u5206\u9694\uFF0C\u5982 \u6CD5\u52A1\u5F20\u5DE5,\u8D22\u52A1\u674E\u5DE5\uFF09",
3497
+ style: {
3498
+ flex: 1,
3499
+ fontSize: 11,
3500
+ padding: "3px 6px",
3501
+ border: "1px solid #e3e5ea",
3502
+ borderRadius: 5,
3503
+ background: "#ffffff",
3504
+ color: "#1b1c1f"
3505
+ }
3506
+ }
3507
+ ),
3508
+ /* @__PURE__ */ jsx2(
3509
+ "button",
3510
+ {
3511
+ type: "button",
3512
+ "data-testid": "yudao-combine-revisions-btn",
3513
+ className: "yudao-doc-mini-btn is-soft-primary",
3514
+ style: { whiteSpace: "nowrap" },
3515
+ onClick: () => {
3516
+ const authors = combineAuthorsInput.split(/[,,]+/).map((s) => s.trim()).filter(Boolean);
3517
+ if (versions.length >= 2) {
3518
+ const baseSnap = versions[versions.length - 1].snapshot;
3519
+ const copies = versions.slice(0, Math.min(3, versions.length - 1)).map((ver, idx) => ({
3520
+ author: authors[idx] || ver.label || `\u5BA1\u9605\u4EBA${idx + 1}`,
3521
+ date: ver.createdAt,
3522
+ doc: ver.snapshot
3523
+ }));
3524
+ commandService.syncExecuteCommand(CombineDocRevisionsCommand.id, {
3525
+ unitId: unit.getUnitId(),
3526
+ baseDoc: baseSnap,
3527
+ reviewerCopies: copies
3528
+ });
3529
+ setCombineStatusTip(`\u5DF2\u5408\u5E76 ${copies.length} \u4EFD\u7248\u672C\u5BA1\u9605\u526F\u672C`);
3530
+ return;
3531
+ }
3532
+ if (typeof document === "undefined") return;
3533
+ const input = document.createElement("input");
3534
+ input.type = "file";
3535
+ input.accept = ".docx";
3536
+ input.multiple = true;
3537
+ input.onchange = async () => {
3538
+ const files = Array.from(input.files ?? []);
3539
+ if (files.length === 0) return;
3540
+ try {
3541
+ const copies = [];
3542
+ for (let i = 0; i < files.length; i++) {
3543
+ const file = files[i];
3544
+ const buf = new Uint8Array(await file.arrayBuffer());
3545
+ const parsed = await parseDocxBytesToDocData(buf);
3546
+ const fallbackName = file.name.replace(/\.docx$/i, "");
3547
+ copies.push({
3548
+ author: authors[i] || fallbackName || `\u5BA1\u9605\u4EBA${i + 1}`,
3549
+ doc: parsed
3550
+ });
3551
+ }
3552
+ commandService.syncExecuteCommand(CombineDocRevisionsCommand.id, {
3553
+ unitId: unit.getUnitId(),
3554
+ reviewerCopies: copies
3555
+ });
3556
+ setCombineStatusTip(`\u5DF2\u5408\u5E76 ${copies.length} \u4EFD .docx \u5BA1\u9605\u526F\u672C`);
3557
+ } catch (err) {
3558
+ setCombineStatusTip(`\u5408\u5E76\u5931\u8D25: ${err?.message || String(err)}`);
3559
+ }
3560
+ };
3561
+ input.click();
3562
+ },
3563
+ children: "\u5408\u5E76\u591A\u65B9\u5BA1\u9605\u526F\u672C"
3564
+ }
3565
+ )
3566
+ ] })
3567
+ ]
3568
+ }
3569
+ ),
3570
+ (() => {
3571
+ const pendingRevisions = (metadata.revisions ?? []).filter((r) => r.status === "pending");
3572
+ if (pendingRevisions.length === 0) {
3573
+ return /* @__PURE__ */ jsxs2("div", { style: { fontSize: 11, color: "#7d8698" }, children: [
3574
+ "\u5F53\u524D\u65E0\u5F85\u5BA1\u9605\u4FEE\u8BA2\u8BB0\u5F55\uFF08\u517C\u5BB9 Word ",
3575
+ /* @__PURE__ */ jsx2("code", { children: "<w:ins>" }),
3576
+ " / ",
3577
+ /* @__PURE__ */ jsx2("code", { children: "<w:del>" }),
3069
3578
  " \u53CC\u5411\u8BFB\u5199\uFF09\u3002"
3070
3579
  ] });
3071
3580
  }
@@ -4381,18 +4890,19 @@ var DocInspectorPanel = () => {
4381
4890
 
4382
4891
  // src/views/enhancements/DocCanvasEnhancementsHost.tsx
4383
4892
  import {
4384
- ICommandService as ICommandService6,
4385
- IUniverInstanceService as IUniverInstanceService6,
4386
- UniverInstanceType as UniverInstanceType6
4893
+ ICommandService as ICommandService7,
4894
+ IUniverInstanceService as IUniverInstanceService7,
4895
+ UniverInstanceType as UniverInstanceType7
4387
4896
  } from "@univerjs/core";
4388
4897
  import { DocSelectionManagerService as DocSelectionManagerService3, RichTextEditingMutation as RichTextEditingMutation2 } from "@univerjs/docs";
4389
- import { useDependency as useDependency5, useObservable as useObservable5 } from "@univerjs/ui";
4898
+ import { useDependency as useDependency6, useObservable as useObservable6 } from "@univerjs/ui";
4390
4899
  import {
4391
4900
  ApplyDocMarkdownShortcutCommand,
4392
4901
  applyDocMarkdownShortcut,
4393
4902
  DeleteDocNoteCommand as DeleteDocNoteCommand2,
4394
4903
  DOC_SUPPORTED_CODE_LANGUAGES,
4395
4904
  formatMiniSheetCellDisplay as formatMiniSheetCellDisplay2,
4905
+ getDocLineNumberingFromSnapshot as getDocLineNumberingFromSnapshot2,
4396
4906
  IDocSdtService as IDocSdtService3,
4397
4907
  InsertDocEndnoteCommand as InsertDocEndnoteCommand2,
4398
4908
  InsertDocFootnoteCommand as InsertDocFootnoteCommand3,
@@ -4402,6 +4912,7 @@ import {
4402
4912
  listDocNotesFromSnapshot as listDocNotesFromSnapshot2,
4403
4913
  listDocQuotes,
4404
4914
  listLiveDocCharts as listLiveDocCharts3,
4915
+ listLiveSmartArts as listLiveSmartArts3,
4405
4916
  miniSheetCellKey as miniSheetCellKey2,
4406
4917
  normalizeDocCodeLanguageLabel,
4407
4918
  RemoveDocCalloutCommand,
@@ -4409,14 +4920,16 @@ import {
4409
4920
  RemoveDocCodeBlockCommand,
4410
4921
  RemoveDocMiniSheetCommand,
4411
4922
  RemoveDocQuoteCommand,
4923
+ RemoveDocSmartArtCommand,
4412
4924
  renderDocChartSvg as renderDocChartSvg2,
4925
+ renderSmartArtSvg as renderSmartArtSvg2,
4413
4926
  tokenizeCodeLineForHighlight,
4414
4927
  UpdateDocCalloutCommand,
4415
4928
  UpdateDocCodeBlockCommand,
4416
4929
  UpdateDocNoteCommand as UpdateDocNoteCommand2,
4417
4930
  UpdateDocQuoteCommand
4418
4931
  } from "@yudaocode/univer-docs";
4419
- import { useEffect as useEffect3, useState as useState5 } from "react";
4932
+ import { useEffect as useEffect3, useState as useState6 } from "react";
4420
4933
 
4421
4934
  // src/views/enhancements/DocChartEditorModal.tsx
4422
4935
  import {
@@ -5348,6 +5861,7 @@ import {
5348
5861
  InsertDocListCommand,
5349
5862
  InsertDocMiniSheetCommand as InsertDocMiniSheetCommand2,
5350
5863
  InsertDocSdtCommand as InsertDocSdtCommand3,
5864
+ InsertDocSmartArtCommand,
5351
5865
  InsertDocTableOfContentsCommand,
5352
5866
  InsertHorizontalDividerCommand as InsertHorizontalDividerCommand2,
5353
5867
  ReplaceDocUnitSnapshotCommand as ReplaceDocUnitSnapshotCommand3,
@@ -5568,6 +6082,30 @@ var DocSlashMenu = ({
5568
6082
  featureService.openChartEditor(chartId);
5569
6083
  }
5570
6084
  },
6085
+ {
6086
+ id: "smartart",
6087
+ badge: "SMT",
6088
+ label: "\u667A\u80FD\u7ED3\u6784\u56FE\u793A (SmartArt)",
6089
+ desc: "\u9012\u8FDB\u6D41\u7A0B / \u7EC4\u7EC7\u5C42\u7EA7 / \u95ED\u73AF\u5FAA\u73AF / \u5206\u7EC4\u5217\u8868 / \u56DB\u8C61\u9650\u77E9\u9635",
6090
+ keywords: "smartart diagram flow hierarchy matrix \u667A\u80FD\u7ED3\u6784\u56FE\u793A \u6D41\u7A0B\u56FE \u7EC4\u7EC7\u67B6\u6784 \u77E9\u9635",
6091
+ action: () => {
6092
+ const saId = `smartart_${Date.now().toString(36)}`;
6093
+ commandService.syncExecuteCommand(InsertDocSmartArtCommand.id, {
6094
+ unitId,
6095
+ spec: {
6096
+ id: saId,
6097
+ title: "\u4E1A\u52A1\u6838\u5FC3\u7ED3\u6784\u56FE\u793A",
6098
+ layout: "process",
6099
+ nodes: [
6100
+ { id: "n1", label: "\u9700\u6C42\u7ACB\u9879", subLabel: "\u76EE\u6807\u786E\u8BA4" },
6101
+ { id: "n2", label: "\u65B9\u6848\u8BC4\u5BA1", subLabel: "\u5408\u89C4\u6838\u9A8C" },
6102
+ { id: "n3", label: "\u4EA4\u4ED8\u9A8C\u6536", subLabel: "\u5F52\u6863\u7B7E\u7F72" }
6103
+ ]
6104
+ }
6105
+ });
6106
+ featureService.openSmartArtEditor(saId);
6107
+ }
6108
+ },
5571
6109
  {
5572
6110
  id: "mini-sheet",
5573
6111
  badge: "FX",
@@ -5758,8 +6296,579 @@ var DocSlashMenu = ({
5758
6296
  );
5759
6297
  };
5760
6298
 
6299
+ // src/views/enhancements/DocSmartArtEditorModal.tsx
6300
+ import {
6301
+ generateRandomId as generateRandomId2,
6302
+ ICommandService as ICommandService6,
6303
+ IUniverInstanceService as IUniverInstanceService6,
6304
+ UniverInstanceType as UniverInstanceType6
6305
+ } from "@univerjs/core";
6306
+ import { useDependency as useDependency5, useObservable as useObservable5 } from "@univerjs/ui";
6307
+ import {
6308
+ InsertDocSmartArtCommand as InsertDocSmartArtCommand2,
6309
+ listLiveSmartArts as listLiveSmartArts2,
6310
+ renderSmartArtSvg,
6311
+ UpdateDocSmartArtCommand
6312
+ } from "@yudaocode/univer-docs";
6313
+ import { useMemo as useMemo4, useState as useState5 } from "react";
6314
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
6315
+ var SMARTART_LAYOUT_OPTIONS = [
6316
+ { value: "process", label: "\u9012\u8FDB\u6D41\u7A0B", desc: "process" },
6317
+ { value: "hierarchy", label: "\u7EC4\u7EC7\u5C42\u7EA7", desc: "hierarchy" },
6318
+ { value: "cycle", label: "\u95ED\u73AF\u5FAA\u73AF", desc: "cycle" },
6319
+ { value: "list", label: "\u5206\u7EC4\u5217\u8868", desc: "list" },
6320
+ { value: "matrix", label: "\u56DB\u8C61\u9650\u77E9\u9635", desc: "matrix" }
6321
+ ];
6322
+ var ACCENT_PALETTE = [
6323
+ "#2C53F1",
6324
+ "#059669",
6325
+ "#D97706",
6326
+ "#DC2626",
6327
+ "#7C3AED",
6328
+ "#0EA5E9",
6329
+ "#334155"
6330
+ ];
6331
+ function createDefaultNodes() {
6332
+ return [
6333
+ { id: "sa_n1", label: "\u9700\u6C42\u7ACB\u9879", subLabel: "\u4E1A\u52A1\u8C03\u7814\u4E0E\u76EE\u6807\u786E\u8BA4", subtitle: "\u4E1A\u52A1\u8C03\u7814\u4E0E\u76EE\u6807\u786E\u8BA4" },
6334
+ { id: "sa_n2", label: "\u65B9\u6848\u8BC4\u5BA1", subLabel: "\u67B6\u6784\u8BBE\u8BA1\u4E0E\u5408\u89C4\u6838\u9A8C", subtitle: "\u67B6\u6784\u8BBE\u8BA1\u4E0E\u5408\u89C4\u6838\u9A8C" },
6335
+ { id: "sa_n3", label: "\u4EA4\u4ED8\u4E0A\u7EBF", subLabel: "\u8054\u8C03\u6D4B\u8BD5\u4E0E\u5F52\u6863\u7B7E\u7F72", subtitle: "\u8054\u8C03\u6D4B\u8BD5\u4E0E\u5F52\u6863\u7B7E\u7F72" }
6336
+ ];
6337
+ }
6338
+ function cloneNodeTree(nodes) {
6339
+ return (nodes ?? []).map((n) => ({
6340
+ ...n,
6341
+ id: n.id || `nd_${generateRandomId2(5)}`,
6342
+ subtitle: n.subtitle ?? n.subLabel ?? "",
6343
+ subLabel: n.subLabel ?? n.subtitle ?? "",
6344
+ ...n.children?.length ? { children: cloneNodeTree(n.children) } : {}
6345
+ }));
6346
+ }
6347
+ function updateNodeAtPath(nodes, path, updater) {
6348
+ if (path.length === 0) return nodes;
6349
+ const [head, ...rest] = path;
6350
+ return nodes.map((nd, idx) => {
6351
+ if (idx !== head) return nd;
6352
+ if (rest.length === 0) {
6353
+ return updater(nd);
6354
+ }
6355
+ return {
6356
+ ...nd,
6357
+ children: updateNodeAtPath(nd.children ?? [], rest, updater)
6358
+ };
6359
+ });
6360
+ }
6361
+ function appendChildAtPath(nodes, path, child) {
6362
+ return updateNodeAtPath(nodes, path, (nd) => ({
6363
+ ...nd,
6364
+ children: [...nd.children ?? [], child]
6365
+ }));
6366
+ }
6367
+ function moveNodeAtPath(nodes, path, delta) {
6368
+ if (path.length === 0) return nodes;
6369
+ if (path.length === 1) {
6370
+ const idx = path[0];
6371
+ const target = idx + delta;
6372
+ if (target < 0 || target >= nodes.length) return nodes;
6373
+ const copy = [...nodes];
6374
+ const [picked] = copy.splice(idx, 1);
6375
+ copy.splice(target, 0, picked);
6376
+ return copy;
6377
+ }
6378
+ const parentPath = path.slice(0, -1);
6379
+ const childIdx = path[path.length - 1];
6380
+ return updateNodeAtPath(nodes, parentPath, (parent) => {
6381
+ const list = [...parent.children ?? []];
6382
+ const target = childIdx + delta;
6383
+ if (target < 0 || target >= list.length) return parent;
6384
+ const [picked] = list.splice(childIdx, 1);
6385
+ list.splice(target, 0, picked);
6386
+ return { ...parent, children: list };
6387
+ });
6388
+ }
6389
+ function deleteNodeAtPath(nodes, path) {
6390
+ if (path.length === 0) return nodes;
6391
+ if (path.length === 1) {
6392
+ if (nodes.length <= 1) return nodes;
6393
+ return nodes.filter((_, idx) => idx !== path[0]);
6394
+ }
6395
+ const parentPath = path.slice(0, -1);
6396
+ const childIdx = path[path.length - 1];
6397
+ return updateNodeAtPath(nodes, parentPath, (parent) => ({
6398
+ ...parent,
6399
+ children: (parent.children ?? []).filter((_, idx) => idx !== childIdx)
6400
+ }));
6401
+ }
6402
+ function renderLayoutIcon(layout, active) {
6403
+ const stroke = active ? "#2C53F1" : "#475569";
6404
+ if (layout === "hierarchy") {
6405
+ return /* @__PURE__ */ jsxs6("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
6406
+ /* @__PURE__ */ jsx6("rect", { x: "5", y: "1.5", width: "6", height: "3.5", rx: "1", stroke, strokeWidth: "1.3" }),
6407
+ /* @__PURE__ */ jsx6("rect", { x: "1.5", y: "10.5", width: "5", height: "3.5", rx: "1", stroke, strokeWidth: "1.3" }),
6408
+ /* @__PURE__ */ jsx6("rect", { x: "9.5", y: "10.5", width: "5", height: "3.5", rx: "1", stroke, strokeWidth: "1.3" }),
6409
+ /* @__PURE__ */ jsx6("path", { d: "M8 5V8M4 8H12M4 8V10.5M12 8V10.5", stroke, strokeWidth: "1.2" })
6410
+ ] });
6411
+ }
6412
+ if (layout === "cycle") {
6413
+ return /* @__PURE__ */ jsxs6("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
6414
+ /* @__PURE__ */ jsx6("circle", { cx: "8", cy: "8", r: "5.5", stroke, strokeWidth: "1.3", strokeDasharray: "3 1.5" }),
6415
+ /* @__PURE__ */ jsx6("path", { d: "M10.5 2.3L12.8 3.2L11.6 5.3", stroke, strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" })
6416
+ ] });
6417
+ }
6418
+ if (layout === "list") {
6419
+ return /* @__PURE__ */ jsxs6("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
6420
+ /* @__PURE__ */ jsx6("rect", { x: "2", y: "2.5", width: "12", height: "3", rx: "1", stroke, strokeWidth: "1.2" }),
6421
+ /* @__PURE__ */ jsx6("rect", { x: "2", y: "6.8", width: "12", height: "3", rx: "1", stroke, strokeWidth: "1.2" }),
6422
+ /* @__PURE__ */ jsx6("rect", { x: "2", y: "11.1", width: "12", height: "3", rx: "1", stroke, strokeWidth: "1.2" })
6423
+ ] });
6424
+ }
6425
+ if (layout === "matrix") {
6426
+ return /* @__PURE__ */ jsxs6("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
6427
+ /* @__PURE__ */ jsx6("rect", { x: "2", y: "2", width: "5.2", height: "5.2", rx: "1", stroke, strokeWidth: "1.2" }),
6428
+ /* @__PURE__ */ jsx6("rect", { x: "8.8", y: "2", width: "5.2", height: "5.2", rx: "1", stroke, strokeWidth: "1.2" }),
6429
+ /* @__PURE__ */ jsx6("rect", { x: "2", y: "8.8", width: "5.2", height: "5.2", rx: "1", stroke, strokeWidth: "1.2" }),
6430
+ /* @__PURE__ */ jsx6("rect", { x: "8.8", y: "8.8", width: "5.2", height: "5.2", rx: "1", stroke, strokeWidth: "1.2" })
6431
+ ] });
6432
+ }
6433
+ return /* @__PURE__ */ jsxs6("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
6434
+ /* @__PURE__ */ jsx6("rect", { x: "1.5", y: "5.5", width: "3.8", height: "5", rx: "1", stroke, strokeWidth: "1.2" }),
6435
+ /* @__PURE__ */ jsx6("rect", { x: "6.1", y: "5.5", width: "3.8", height: "5", rx: "1", stroke, strokeWidth: "1.2" }),
6436
+ /* @__PURE__ */ jsx6("rect", { x: "10.7", y: "5.5", width: "3.8", height: "5", rx: "1", stroke, strokeWidth: "1.2" })
6437
+ ] });
6438
+ }
6439
+ var DocSmartArtEditorModal = () => {
6440
+ const instanceService = useDependency5(IUniverInstanceService6);
6441
+ const commandService = useDependency5(ICommandService6);
6442
+ const featureService = useDependency5(IDocsUIFeatureService);
6443
+ const editingSmartArtId = useObservable5(
6444
+ featureService.editingSmartArtId$,
6445
+ featureService.getEditingSmartArtId()
6446
+ );
6447
+ const unit = useObservable5(
6448
+ () => instanceService.getCurrentTypeOfUnit$(UniverInstanceType6.UNIVER_DOC),
6449
+ instanceService.getCurrentUnitOfType(UniverInstanceType6.UNIVER_DOC),
6450
+ false,
6451
+ [instanceService]
6452
+ );
6453
+ const [syncedKey, setSyncedKey] = useState5(null);
6454
+ const [title, setTitle] = useState5("\u4E1A\u52A1\u6838\u5FC3\u7ED3\u6784\u56FE\u793A");
6455
+ const [layout, setLayout] = useState5("process");
6456
+ const [accentColor, setAccentColor] = useState5("#2C53F1");
6457
+ const [nodes, setNodes] = useState5(createDefaultNodes);
6458
+ const [width, setWidth] = useState5(440);
6459
+ const [height, setHeight] = useState5(210);
6460
+ const activeSyncKey = editingSmartArtId && unit ? `${unit.getUnitId()}:${editingSmartArtId}` : null;
6461
+ if (activeSyncKey && syncedKey !== activeSyncKey && unit) {
6462
+ setSyncedKey(activeSyncKey);
6463
+ if (editingSmartArtId === "__new__") {
6464
+ setTitle("\u4E1A\u52A1\u6838\u5FC3\u7ED3\u6784\u56FE\u793A");
6465
+ setLayout("process");
6466
+ setAccentColor("#2C53F1");
6467
+ setNodes(createDefaultNodes());
6468
+ setWidth(440);
6469
+ setHeight(210);
6470
+ } else {
6471
+ const existing = listLiveSmartArts2(unit.getSnapshot()).find((s) => s.id === editingSmartArtId);
6472
+ if (existing) {
6473
+ setTitle(existing.title || "");
6474
+ setLayout(existing.layout || "process");
6475
+ setAccentColor(existing.accentColor || "#2C53F1");
6476
+ setNodes(existing.nodes?.length ? cloneNodeTree(existing.nodes) : createDefaultNodes());
6477
+ setWidth(existing.width ?? 440);
6478
+ setHeight(existing.height ?? 210);
6479
+ }
6480
+ }
6481
+ } else if (!activeSyncKey && syncedKey !== null) {
6482
+ setSyncedKey(null);
6483
+ }
6484
+ const previewSpec = useMemo4(
6485
+ () => ({
6486
+ title,
6487
+ layout,
6488
+ accentColor,
6489
+ nodes,
6490
+ width,
6491
+ height
6492
+ }),
6493
+ [title, layout, accentColor, nodes, width, height]
6494
+ );
6495
+ const previewSvg = useMemo4(() => renderSmartArtSvg(previewSpec), [previewSpec]);
6496
+ if (!editingSmartArtId || !unit) return null;
6497
+ const handleAddRootNode = () => {
6498
+ const nextIdx = nodes.length + 1;
6499
+ setNodes((prev) => [
6500
+ ...prev,
6501
+ {
6502
+ id: `nd_${generateRandomId2(5)}`,
6503
+ label: `\u8282\u70B9 ${nextIdx}`,
6504
+ subLabel: "",
6505
+ subtitle: ""
6506
+ }
6507
+ ]);
6508
+ };
6509
+ const handleSave = () => {
6510
+ const unitId = unit.getUnitId();
6511
+ if (editingSmartArtId === "__new__") {
6512
+ commandService.syncExecuteCommand(InsertDocSmartArtCommand2.id, {
6513
+ unitId,
6514
+ spec: previewSpec
6515
+ });
6516
+ } else {
6517
+ commandService.syncExecuteCommand(UpdateDocSmartArtCommand.id, {
6518
+ unitId,
6519
+ id: editingSmartArtId,
6520
+ patch: previewSpec
6521
+ });
6522
+ }
6523
+ featureService.closeSmartArtEditor();
6524
+ };
6525
+ const renderNodeRows = (list, parentPath, depth) => list.map((nd, idx) => {
6526
+ const path = [...parentPath, idx];
6527
+ const pathKey = path.join("-");
6528
+ return /* @__PURE__ */ jsxs6(
6529
+ "div",
6530
+ {
6531
+ style: {
6532
+ marginLeft: depth * 18,
6533
+ display: "flex",
6534
+ flexDirection: "column",
6535
+ gap: 5
6536
+ },
6537
+ children: [
6538
+ /* @__PURE__ */ jsxs6(
6539
+ "div",
6540
+ {
6541
+ style: {
6542
+ display: "flex",
6543
+ alignItems: "center",
6544
+ gap: 5,
6545
+ padding: "5px 7px",
6546
+ borderRadius: 6,
6547
+ background: depth === 0 ? "#ffffff" : "#f8fafc",
6548
+ border: "1px solid #e2e8f0"
6549
+ },
6550
+ children: [
6551
+ /* @__PURE__ */ jsx6(
6552
+ "span",
6553
+ {
6554
+ style: {
6555
+ width: 8,
6556
+ height: 8,
6557
+ borderRadius: 999,
6558
+ background: nd.color || accentColor,
6559
+ flexShrink: 0
6560
+ }
6561
+ }
6562
+ ),
6563
+ /* @__PURE__ */ jsx6(
6564
+ "input",
6565
+ {
6566
+ type: "text",
6567
+ "data-testid": `yudao-smartart-node-label-${pathKey}`,
6568
+ value: nd.label,
6569
+ placeholder: "\u8282\u70B9\u6807\u9898",
6570
+ onChange: (e) => setNodes(
6571
+ (prev) => updateNodeAtPath(prev, path, (cur) => ({ ...cur, label: e.target.value }))
6572
+ ),
6573
+ style: {
6574
+ flex: 1.1,
6575
+ minWidth: 0,
6576
+ fontSize: 11.5,
6577
+ padding: "3px 6px",
6578
+ border: "1px solid #cbd5e1",
6579
+ borderRadius: 4,
6580
+ fontWeight: 600,
6581
+ color: "#1b1c1f"
6582
+ }
6583
+ }
6584
+ ),
6585
+ /* @__PURE__ */ jsx6(
6586
+ "input",
6587
+ {
6588
+ type: "text",
6589
+ "data-testid": `yudao-smartart-node-sub-${pathKey}`,
6590
+ value: nd.subtitle ?? nd.subLabel ?? "",
6591
+ placeholder: "\u526F\u6807\u9898 / \u5907\u6CE8",
6592
+ onChange: (e) => setNodes(
6593
+ (prev) => updateNodeAtPath(prev, path, (cur) => ({
6594
+ ...cur,
6595
+ subLabel: e.target.value,
6596
+ subtitle: e.target.value
6597
+ }))
6598
+ ),
6599
+ style: {
6600
+ flex: 1,
6601
+ minWidth: 0,
6602
+ fontSize: 11,
6603
+ padding: "3px 6px",
6604
+ border: "1px solid #e2e8f0",
6605
+ borderRadius: 4,
6606
+ color: "#475569"
6607
+ }
6608
+ }
6609
+ ),
6610
+ depth < 2 && /* @__PURE__ */ jsx6(
6611
+ "button",
6612
+ {
6613
+ type: "button",
6614
+ "data-testid": `yudao-smartart-add-child-${pathKey}`,
6615
+ className: "yudao-doc-mini-btn is-soft-primary",
6616
+ style: { padding: "2px 6px", fontSize: 10.5, whiteSpace: "nowrap" },
6617
+ title: "\u65B0\u589E\u5B50\u8282\u70B9",
6618
+ onClick: () => setNodes(
6619
+ (prev) => appendChildAtPath(prev, path, {
6620
+ id: `nd_${generateRandomId2(5)}`,
6621
+ label: `\u5B50\u8282\u70B9 ${(nd.children?.length ?? 0) + 1}`,
6622
+ subLabel: "",
6623
+ subtitle: ""
6624
+ })
6625
+ ),
6626
+ children: "+ \u65B0\u589E\u5B50\u8282\u70B9"
6627
+ }
6628
+ ),
6629
+ /* @__PURE__ */ jsx6(
6630
+ "button",
6631
+ {
6632
+ type: "button",
6633
+ className: "yudao-doc-mini-btn",
6634
+ style: { padding: "2px 5px", fontSize: 10 },
6635
+ disabled: idx === 0,
6636
+ title: "\u4E0A\u79FB",
6637
+ onClick: () => setNodes((prev) => moveNodeAtPath(prev, path, -1)),
6638
+ children: /* @__PURE__ */ jsx6("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx6("path", { d: "M6 2.5V9.5M6 2.5L3 5.5M6 2.5L9 5.5", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
6639
+ }
6640
+ ),
6641
+ /* @__PURE__ */ jsx6(
6642
+ "button",
6643
+ {
6644
+ type: "button",
6645
+ className: "yudao-doc-mini-btn",
6646
+ style: { padding: "2px 5px", fontSize: 10 },
6647
+ disabled: idx === list.length - 1,
6648
+ title: "\u4E0B\u79FB",
6649
+ onClick: () => setNodes((prev) => moveNodeAtPath(prev, path, 1)),
6650
+ children: /* @__PURE__ */ jsx6("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx6("path", { d: "M6 9.5V2.5M6 9.5L3 6.5M6 9.5L9 6.5", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
6651
+ }
6652
+ ),
6653
+ /* @__PURE__ */ jsx6(
6654
+ "button",
6655
+ {
6656
+ type: "button",
6657
+ className: "yudao-doc-mini-btn is-danger",
6658
+ style: { padding: "2px 5px", fontSize: 10 },
6659
+ disabled: depth === 0 && list.length <= 1,
6660
+ title: "\u5220\u9664\u8282\u70B9",
6661
+ onClick: () => setNodes((prev) => deleteNodeAtPath(prev, path)),
6662
+ children: "\u5220\u9664"
6663
+ }
6664
+ )
6665
+ ]
6666
+ }
6667
+ ),
6668
+ nd.children && nd.children.length > 0 && renderNodeRows(nd.children, path, depth + 1)
6669
+ ]
6670
+ },
6671
+ nd.id || pathKey
6672
+ );
6673
+ });
6674
+ return /* @__PURE__ */ jsx6(
6675
+ "div",
6676
+ {
6677
+ className: "yudao-doc-modal-backdrop",
6678
+ "data-testid": "yudao-smartart-editor-modal",
6679
+ onClick: () => featureService.closeSmartArtEditor(),
6680
+ children: /* @__PURE__ */ jsxs6(
6681
+ "div",
6682
+ {
6683
+ className: "yudao-doc-modal-card",
6684
+ style: { width: "min(960px, 95vw)", height: "min(660px, 89vh)" },
6685
+ onClick: (e) => e.stopPropagation(),
6686
+ children: [
6687
+ /* @__PURE__ */ jsxs6("div", { className: "yudao-doc-modal-header", children: [
6688
+ /* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
6689
+ /* @__PURE__ */ jsx6("span", { style: { fontSize: 13.5, fontWeight: 600, color: "#1b1c1f" }, children: editingSmartArtId === "__new__" ? "\u63D2\u5165\u667A\u80FD\u7ED3\u6784\u56FE\u793A (SmartArt)" : "\u7F16\u8F91\u56FE\u793A\u8282\u70B9\u4E0E\u5E03\u5C40" }),
6690
+ /* @__PURE__ */ jsx6(
6691
+ "span",
6692
+ {
6693
+ style: {
6694
+ fontSize: 10.5,
6695
+ padding: "1px 7px",
6696
+ borderRadius: 999,
6697
+ background: "#f3f5ff",
6698
+ color: "#2c53f1",
6699
+ fontWeight: 500
6700
+ },
6701
+ children: "\u77E2\u91CF SVG / DOCX / PDF \u540C\u6B65\u5F80\u8FD4"
6702
+ }
6703
+ )
6704
+ ] }),
6705
+ /* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: 6 }, children: [
6706
+ /* @__PURE__ */ jsx6(
6707
+ "button",
6708
+ {
6709
+ type: "button",
6710
+ className: "yudao-doc-mini-btn",
6711
+ onClick: () => featureService.closeSmartArtEditor(),
6712
+ children: "\u53D6\u6D88"
6713
+ }
6714
+ ),
6715
+ /* @__PURE__ */ jsx6(
6716
+ "button",
6717
+ {
6718
+ type: "button",
6719
+ "data-testid": "yudao-smartart-editor-save",
6720
+ className: "yudao-doc-mini-btn is-primary",
6721
+ onClick: handleSave,
6722
+ children: "\u4FDD\u5B58\u56FE\u793A"
6723
+ }
6724
+ )
6725
+ ] })
6726
+ ] }),
6727
+ /* @__PURE__ */ jsxs6(
6728
+ "div",
6729
+ {
6730
+ style: {
6731
+ flex: 1,
6732
+ display: "grid",
6733
+ gridTemplateColumns: "1fr 1.2fr",
6734
+ gap: 14,
6735
+ padding: 16,
6736
+ overflow: "auto"
6737
+ },
6738
+ children: [
6739
+ /* @__PURE__ */ jsxs6("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
6740
+ /* @__PURE__ */ jsx6(
6741
+ "div",
6742
+ {
6743
+ "data-testid": "yudao-smartart-live-preview",
6744
+ style: {
6745
+ border: "1px solid #e3e5ea",
6746
+ borderRadius: 8,
6747
+ background: "#f9fafb",
6748
+ padding: 10,
6749
+ display: "flex",
6750
+ alignItems: "center",
6751
+ justifyContent: "center",
6752
+ minHeight: 230,
6753
+ overflow: "hidden"
6754
+ },
6755
+ dangerouslySetInnerHTML: { __html: previewSvg }
6756
+ }
6757
+ ),
6758
+ /* @__PURE__ */ jsxs6("label", { className: "yudao-doc-field-row", children: [
6759
+ /* @__PURE__ */ jsx6("span", { children: "\u56FE\u793A\u6807\u9898" }),
6760
+ /* @__PURE__ */ jsx6(
6761
+ "input",
6762
+ {
6763
+ type: "text",
6764
+ "data-testid": "yudao-smartart-title-input",
6765
+ value: title,
6766
+ onChange: (e) => setTitle(e.target.value),
6767
+ placeholder: "\u8F93\u5165\u7ED3\u6784\u56FE\u793A\u6807\u9898"
6768
+ }
6769
+ )
6770
+ ] }),
6771
+ /* @__PURE__ */ jsxs6("div", { className: "yudao-doc-field-row", children: [
6772
+ /* @__PURE__ */ jsx6("span", { children: "\u56FE\u793A\u5E03\u5C40\u5207\u6362" }),
6773
+ /* @__PURE__ */ jsx6("div", { style: { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 6 }, children: SMARTART_LAYOUT_OPTIONS.map((opt) => {
6774
+ const active = layout === opt.value;
6775
+ return /* @__PURE__ */ jsxs6(
6776
+ "button",
6777
+ {
6778
+ type: "button",
6779
+ "data-testid": `yudao-smartart-layout-${opt.value}`,
6780
+ onClick: () => setLayout(opt.value),
6781
+ style: {
6782
+ display: "flex",
6783
+ alignItems: "center",
6784
+ gap: 5,
6785
+ padding: "5px 8px",
6786
+ borderRadius: 6,
6787
+ border: active ? "1.5px solid #2C53F1" : "1px solid #e2e8f0",
6788
+ background: active ? "#f3f5ff" : "#ffffff",
6789
+ color: active ? "#2C53F1" : "#334155",
6790
+ fontSize: 11.5,
6791
+ fontWeight: active ? 600 : 500,
6792
+ cursor: "pointer"
6793
+ },
6794
+ children: [
6795
+ renderLayoutIcon(opt.value, active),
6796
+ /* @__PURE__ */ jsx6("span", { children: opt.label })
6797
+ ]
6798
+ },
6799
+ opt.value
6800
+ );
6801
+ }) })
6802
+ ] }),
6803
+ /* @__PURE__ */ jsxs6("div", { className: "yudao-doc-field-row", children: [
6804
+ /* @__PURE__ */ jsx6("span", { children: "\u4E3B\u9898\u914D\u8272 (Accent Palette)" }),
6805
+ /* @__PURE__ */ jsx6("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: ACCENT_PALETTE.map((hex) => /* @__PURE__ */ jsx6(
6806
+ "button",
6807
+ {
6808
+ type: "button",
6809
+ "data-testid": `yudao-smartart-color-${hex.slice(1)}`,
6810
+ onClick: () => setAccentColor(hex),
6811
+ style: {
6812
+ width: 22,
6813
+ height: 22,
6814
+ borderRadius: 999,
6815
+ background: hex,
6816
+ border: accentColor.toUpperCase() === hex ? "2.5px solid #0f172a" : "2px solid #ffffff",
6817
+ boxShadow: "0 0 0 1px #cbd5e1",
6818
+ cursor: "pointer",
6819
+ padding: 0
6820
+ },
6821
+ title: hex
6822
+ },
6823
+ hex
6824
+ )) })
6825
+ ] })
6826
+ ] }),
6827
+ /* @__PURE__ */ jsxs6("div", { style: { display: "flex", flexDirection: "column", gap: 8, minWidth: 0 }, children: [
6828
+ /* @__PURE__ */ jsxs6("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
6829
+ /* @__PURE__ */ jsxs6("span", { style: { fontSize: 12, fontWeight: 600, color: "#1b1c1f" }, children: [
6830
+ "\u5C42\u7EA7\u8282\u70B9\u6811\u7F16\u8F91\u5668 (",
6831
+ nodes.length,
6832
+ " \u4E2A\u4E3B\u8282\u70B9)"
6833
+ ] }),
6834
+ /* @__PURE__ */ jsx6(
6835
+ "button",
6836
+ {
6837
+ type: "button",
6838
+ "data-testid": "yudao-smartart-add-node",
6839
+ className: "yudao-doc-mini-btn is-soft-primary",
6840
+ onClick: handleAddRootNode,
6841
+ children: "+ \u65B0\u589E\u8282\u70B9"
6842
+ }
6843
+ )
6844
+ ] }),
6845
+ /* @__PURE__ */ jsx6(
6846
+ "div",
6847
+ {
6848
+ style: {
6849
+ flex: 1,
6850
+ display: "flex",
6851
+ flexDirection: "column",
6852
+ gap: 6,
6853
+ overflowY: "auto",
6854
+ paddingRight: 2
6855
+ },
6856
+ children: renderNodeRows(nodes, [], 0)
6857
+ }
6858
+ )
6859
+ ] })
6860
+ ]
6861
+ }
6862
+ )
6863
+ ]
6864
+ }
6865
+ )
6866
+ }
6867
+ );
6868
+ };
6869
+
5761
6870
  // src/views/enhancements/DocCanvasEnhancementsHost.tsx
5762
- import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
6871
+ import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
5763
6872
  var CALLOUT_VISUAL_THEMES = {
5764
6873
  info: {
5765
6874
  bg: "#EFF6FF",
@@ -5833,54 +6942,54 @@ function toLowerRomanTag(num) {
5833
6942
  }
5834
6943
  function renderCalloutSvgIcon(preset, stroke) {
5835
6944
  if (preset === "warning") {
5836
- return /* @__PURE__ */ jsxs6("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
5837
- /* @__PURE__ */ jsx6("path", { d: "M8 2L14.5 13.5H1.5L8 2Z", stroke, strokeWidth: "1.5", strokeLinejoin: "round" }),
5838
- /* @__PURE__ */ jsx6("path", { d: "M8 6.2V9.4", stroke, strokeWidth: "1.5", strokeLinecap: "round" }),
5839
- /* @__PURE__ */ jsx6("circle", { cx: "8", cy: "11.5", r: "0.8", fill: stroke })
6945
+ return /* @__PURE__ */ jsxs7("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
6946
+ /* @__PURE__ */ jsx7("path", { d: "M8 2L14.5 13.5H1.5L8 2Z", stroke, strokeWidth: "1.5", strokeLinejoin: "round" }),
6947
+ /* @__PURE__ */ jsx7("path", { d: "M8 6.2V9.4", stroke, strokeWidth: "1.5", strokeLinecap: "round" }),
6948
+ /* @__PURE__ */ jsx7("circle", { cx: "8", cy: "11.5", r: "0.8", fill: stroke })
5840
6949
  ] });
5841
6950
  }
5842
6951
  if (preset === "success") {
5843
- return /* @__PURE__ */ jsxs6("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
5844
- /* @__PURE__ */ jsx6("circle", { cx: "8", cy: "8", r: "6", stroke, strokeWidth: "1.5" }),
5845
- /* @__PURE__ */ jsx6("path", { d: "M5.3 8.2L7.1 10L10.8 6.2", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
6952
+ return /* @__PURE__ */ jsxs7("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
6953
+ /* @__PURE__ */ jsx7("circle", { cx: "8", cy: "8", r: "6", stroke, strokeWidth: "1.5" }),
6954
+ /* @__PURE__ */ jsx7("path", { d: "M5.3 8.2L7.1 10L10.8 6.2", stroke, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
5846
6955
  ] });
5847
6956
  }
5848
6957
  if (preset === "danger") {
5849
- return /* @__PURE__ */ jsxs6("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
5850
- /* @__PURE__ */ jsx6("circle", { cx: "8", cy: "8", r: "6", stroke, strokeWidth: "1.5" }),
5851
- /* @__PURE__ */ jsx6("path", { d: "M5.8 5.8L10.2 10.2M10.2 5.8L5.8 10.2", stroke, strokeWidth: "1.5", strokeLinecap: "round" })
6958
+ return /* @__PURE__ */ jsxs7("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
6959
+ /* @__PURE__ */ jsx7("circle", { cx: "8", cy: "8", r: "6", stroke, strokeWidth: "1.5" }),
6960
+ /* @__PURE__ */ jsx7("path", { d: "M5.8 5.8L10.2 10.2M10.2 5.8L5.8 10.2", stroke, strokeWidth: "1.5", strokeLinecap: "round" })
5852
6961
  ] });
5853
6962
  }
5854
- return /* @__PURE__ */ jsxs6("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
5855
- /* @__PURE__ */ jsx6("circle", { cx: "8", cy: "8", r: "6", stroke, strokeWidth: "1.5" }),
5856
- /* @__PURE__ */ jsx6("path", { d: "M8 7.2V11", stroke, strokeWidth: "1.5", strokeLinecap: "round" }),
5857
- /* @__PURE__ */ jsx6("circle", { cx: "8", cy: "5", r: "0.8", fill: stroke })
6963
+ return /* @__PURE__ */ jsxs7("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
6964
+ /* @__PURE__ */ jsx7("circle", { cx: "8", cy: "8", r: "6", stroke, strokeWidth: "1.5" }),
6965
+ /* @__PURE__ */ jsx7("path", { d: "M8 7.2V11", stroke, strokeWidth: "1.5", strokeLinecap: "round" }),
6966
+ /* @__PURE__ */ jsx7("circle", { cx: "8", cy: "5", r: "0.8", fill: stroke })
5858
6967
  ] });
5859
6968
  }
5860
6969
  var DocCanvasEnhancementsHost = () => {
5861
- const instanceService = useDependency5(IUniverInstanceService6);
5862
- const commandService = useDependency5(ICommandService6);
5863
- const selectionManagerService = useDependency5(DocSelectionManagerService3);
5864
- const sdtService = useDependency5(IDocSdtService3);
5865
- const featureService = useDependency5(IDocsUIFeatureService);
5866
- const slashMenuOpen = useObservable5(
6970
+ const instanceService = useDependency6(IUniverInstanceService7);
6971
+ const commandService = useDependency6(ICommandService7);
6972
+ const selectionManagerService = useDependency6(DocSelectionManagerService3);
6973
+ const sdtService = useDependency6(IDocSdtService3);
6974
+ const featureService = useDependency6(IDocsUIFeatureService);
6975
+ const slashMenuOpen = useObservable6(
5867
6976
  featureService.slashMenuOpen$,
5868
6977
  featureService.isSlashMenuOpen()
5869
6978
  );
5870
- const metaTick = useObservable5(sdtService.metadataChange$, "");
5871
- const unit = useObservable5(
5872
- () => instanceService.getCurrentTypeOfUnit$(UniverInstanceType6.UNIVER_DOC),
5873
- instanceService.getCurrentUnitOfType(UniverInstanceType6.UNIVER_DOC),
6979
+ const metaTick = useObservable6(sdtService.metadataChange$, "");
6980
+ const unit = useObservable6(
6981
+ () => instanceService.getCurrentTypeOfUnit$(UniverInstanceType7.UNIVER_DOC),
6982
+ instanceService.getCurrentUnitOfType(UniverInstanceType7.UNIVER_DOC),
5874
6983
  false,
5875
6984
  [instanceService]
5876
6985
  );
5877
- const [rev, setRev] = useState5(0);
5878
- const [slashAnchor, setSlashAnchor] = useState5(null);
5879
- const [stripSlashOnExec, setStripSlashOnExec] = useState5(false);
5880
- const [dockCollapsed, setDockCollapsed] = useState5(false);
5881
- const [footnoteExpanded, setFootnoteExpanded] = useState5(true);
5882
- const [editingCodeId, setEditingCodeId] = useState5(null);
5883
- const [copiedCodeId, setCopiedCodeId] = useState5(null);
6986
+ const [rev, setRev] = useState6(0);
6987
+ const [slashAnchor, setSlashAnchor] = useState6(null);
6988
+ const [stripSlashOnExec, setStripSlashOnExec] = useState6(false);
6989
+ const [dockCollapsed, setDockCollapsed] = useState6(false);
6990
+ const [footnoteExpanded, setFootnoteExpanded] = useState6(true);
6991
+ const [editingCodeId, setEditingCodeId] = useState6(null);
6992
+ const [copiedCodeId, setCopiedCodeId] = useState6(null);
5884
6993
  useEffect3(() => {
5885
6994
  const disp = commandService.onCommandExecuted((info) => {
5886
6995
  if (info.id === RichTextEditingMutation2.id || info.id.startsWith("yudao-docs")) {
@@ -5970,11 +7079,13 @@ var DocCanvasEnhancementsHost = () => {
5970
7079
  const quotes = listDocQuotes(snapshot);
5971
7080
  const codeBlocks = listDocCodeBlocks(snapshot);
5972
7081
  const charts = listLiveDocCharts3(snapshot);
7082
+ const smartArts = listLiveSmartArts3(snapshot);
5973
7083
  const miniSheets = listDocMiniSheets3(snapshot);
7084
+ const lineNumbering = getDocLineNumberingFromSnapshot2(snapshot);
5974
7085
  const docNotes = listDocNotesFromSnapshot2(snapshot);
5975
7086
  const footnotes = docNotes.filter((n) => n.noteType !== "endnote");
5976
7087
  const endnotes = docNotes.filter((n) => n.noteType === "endnote");
5977
- const totalRichBlocks = callouts.length + quotes.length + codeBlocks.length + charts.length + miniSheets.length;
7088
+ const totalRichBlocks = callouts.length + quotes.length + codeBlocks.length + charts.length + smartArts.length + miniSheets.length;
5978
7089
  const jumpToDocOffset = (offset) => {
5979
7090
  if (typeof offset !== "number") return;
5980
7091
  try {
@@ -5997,8 +7108,8 @@ var DocCanvasEnhancementsHost = () => {
5997
7108
  setCopiedCodeId((prev) => prev === id ? null : prev);
5998
7109
  }, 1500);
5999
7110
  };
6000
- return /* @__PURE__ */ jsxs6(Fragment2, { children: [
6001
- !isReadonly && /* @__PURE__ */ jsx6(
7111
+ return /* @__PURE__ */ jsxs7(Fragment2, { children: [
7112
+ !isReadonly && /* @__PURE__ */ jsx7(
6002
7113
  "button",
6003
7114
  {
6004
7115
  type: "button",
@@ -6014,7 +7125,7 @@ var DocCanvasEnhancementsHost = () => {
6014
7125
  children: "+ \u63D2\u5165\u5757 (/)"
6015
7126
  }
6016
7127
  ),
6017
- /* @__PURE__ */ jsx6(
7128
+ /* @__PURE__ */ jsx7(
6018
7129
  DocSlashMenu,
6019
7130
  {
6020
7131
  open: slashMenuOpen,
@@ -6023,21 +7134,62 @@ var DocCanvasEnhancementsHost = () => {
6023
7134
  onClose: () => featureService.closeSlashMenu()
6024
7135
  }
6025
7136
  ),
6026
- /* @__PURE__ */ jsx6(DocChartEditorModal, {}),
6027
- /* @__PURE__ */ jsx6(DocMiniSheetModal, {}),
6028
- totalRichBlocks > 0 && /* @__PURE__ */ jsxs6(
7137
+ /* @__PURE__ */ jsx7(DocChartEditorModal, {}),
7138
+ /* @__PURE__ */ jsx7(DocMiniSheetModal, {}),
7139
+ /* @__PURE__ */ jsx7(DocSmartArtEditorModal, {}),
7140
+ lineNumbering.enabled && /* @__PURE__ */ jsx7(
7141
+ "div",
7142
+ {
7143
+ className: "yudao-doc-linenum-ruler",
7144
+ "data-testid": "yudao-line-number-ruler",
7145
+ title: `\u884C\u53F7\u5DF2\u542F\u7528 \xB7 \u8D77\u59CB ${lineNumbering.start ?? 1} \xB7 \u6B65\u957F ${lineNumbering.countBy ?? 1} \xB7 ${lineNumbering.restart === "continuous" ? "\u8FDE\u7EED\u7F16\u53F7" : lineNumbering.restart === "newSection" ? "\u6BCF\u8282\u91CD\u7F16" : "\u6BCF\u9875\u91CD\u7F16"}`,
7146
+ children: (() => {
7147
+ const bodyParas = snapshot.body?.paragraphs ?? [];
7148
+ const sortedParas = [...bodyParas].sort((a, b) => a.startIndex - b.startIndex);
7149
+ const estimatedLines = Math.max(
7150
+ 6,
7151
+ Math.min(
7152
+ 48,
7153
+ sortedParas.reduce((acc, p, idx) => {
7154
+ const st = idx === 0 ? 0 : sortedParas[idx - 1].startIndex + 1;
7155
+ const len = Math.max(1, p.startIndex - st);
7156
+ return acc + Math.max(1, Math.ceil(len / 38));
7157
+ }, 0)
7158
+ )
7159
+ );
7160
+ const startNum = Math.max(1, lineNumbering.start ?? 1);
7161
+ const step = Math.max(1, lineNumbering.countBy ?? 1);
7162
+ const linesPerPage = 32;
7163
+ return Array.from({ length: estimatedLines }, (_, idx) => {
7164
+ const offsetInSeq = lineNumbering.restart === "continuous" ? idx : idx % linesPerPage;
7165
+ const num = startNum + offsetInSeq;
7166
+ const visible = step <= 1 ? true : num % step === 0;
7167
+ return /* @__PURE__ */ jsx7(
7168
+ "div",
7169
+ {
7170
+ className: "yudao-doc-linenum-tick",
7171
+ "data-line": num,
7172
+ children: visible ? num : ""
7173
+ },
7174
+ idx
7175
+ );
7176
+ });
7177
+ })()
7178
+ }
7179
+ ),
7180
+ totalRichBlocks > 0 && /* @__PURE__ */ jsxs7(
6029
7181
  "div",
6030
7182
  {
6031
7183
  className: "yudao-doc-companion-dock",
6032
7184
  "data-testid": "yudao-doc-companion-dock",
6033
7185
  children: [
6034
- /* @__PURE__ */ jsxs6("div", { className: "yudao-doc-companion-header", children: [
6035
- /* @__PURE__ */ jsxs6("span", { style: { fontWeight: 600, fontSize: 11.5, color: "#1b1c1f" }, children: [
7186
+ /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-companion-header", children: [
7187
+ /* @__PURE__ */ jsxs7("span", { style: { fontWeight: 600, fontSize: 11.5, color: "#1b1c1f" }, children: [
6036
7188
  "\u5BCC\u6587\u672C\u5757\u4E0E\u56FE\u8868\u4EA4\u4E92\u5C42 (",
6037
7189
  totalRichBlocks,
6038
7190
  ")"
6039
7191
  ] }),
6040
- /* @__PURE__ */ jsx6(
7192
+ /* @__PURE__ */ jsx7(
6041
7193
  "button",
6042
7194
  {
6043
7195
  type: "button",
@@ -6048,10 +7200,10 @@ var DocCanvasEnhancementsHost = () => {
6048
7200
  }
6049
7201
  )
6050
7202
  ] }),
6051
- !dockCollapsed && /* @__PURE__ */ jsxs6("div", { className: "yudao-doc-companion-body", children: [
7203
+ !dockCollapsed && /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-companion-body", children: [
6052
7204
  callouts.map((c) => {
6053
7205
  const theme = CALLOUT_VISUAL_THEMES[c.preset] ?? CALLOUT_VISUAL_THEMES.info;
6054
- return /* @__PURE__ */ jsxs6(
7206
+ return /* @__PURE__ */ jsxs7(
6055
7207
  "div",
6056
7208
  {
6057
7209
  "data-testid": `yudao-callout-card-${c.id}`,
@@ -6066,15 +7218,15 @@ var DocCanvasEnhancementsHost = () => {
6066
7218
  gap: 6
6067
7219
  },
6068
7220
  children: [
6069
- /* @__PURE__ */ jsxs6("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 6 }, children: [
6070
- /* @__PURE__ */ jsxs6(
7221
+ /* @__PURE__ */ jsxs7("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 6 }, children: [
7222
+ /* @__PURE__ */ jsxs7(
6071
7223
  "div",
6072
7224
  {
6073
7225
  style: { display: "flex", alignItems: "center", gap: 5, cursor: "pointer" },
6074
7226
  onClick: () => jumpToDocOffset(c.startIndex),
6075
7227
  children: [
6076
7228
  renderCalloutSvgIcon(c.preset, theme.border),
6077
- /* @__PURE__ */ jsx6(
7229
+ /* @__PURE__ */ jsx7(
6078
7230
  "span",
6079
7231
  {
6080
7232
  style: {
@@ -6091,8 +7243,8 @@ var DocCanvasEnhancementsHost = () => {
6091
7243
  ]
6092
7244
  }
6093
7245
  ),
6094
- !isReadonly && /* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: 3, alignItems: "center" }, children: [
6095
- CALLOUT_SWITCH_PRESETS.map((sw) => /* @__PURE__ */ jsx6(
7246
+ !isReadonly && /* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 3, alignItems: "center" }, children: [
7247
+ CALLOUT_SWITCH_PRESETS.map((sw) => /* @__PURE__ */ jsx7(
6096
7248
  "button",
6097
7249
  {
6098
7250
  type: "button",
@@ -6115,7 +7267,7 @@ var DocCanvasEnhancementsHost = () => {
6115
7267
  },
6116
7268
  sw.preset
6117
7269
  )),
6118
- /* @__PURE__ */ jsx6(
7270
+ /* @__PURE__ */ jsx7(
6119
7271
  "button",
6120
7272
  {
6121
7273
  type: "button",
@@ -6130,7 +7282,7 @@ var DocCanvasEnhancementsHost = () => {
6130
7282
  )
6131
7283
  ] })
6132
7284
  ] }),
6133
- /* @__PURE__ */ jsx6(
7285
+ /* @__PURE__ */ jsx7(
6134
7286
  "input",
6135
7287
  {
6136
7288
  type: "text",
@@ -6156,7 +7308,7 @@ var DocCanvasEnhancementsHost = () => {
6156
7308
  c.id
6157
7309
  );
6158
7310
  }),
6159
- quotes.map((q) => /* @__PURE__ */ jsxs6(
7311
+ quotes.map((q) => /* @__PURE__ */ jsxs7(
6160
7312
  "div",
6161
7313
  {
6162
7314
  "data-testid": `yudao-quote-card-${q.id}`,
@@ -6171,8 +7323,8 @@ var DocCanvasEnhancementsHost = () => {
6171
7323
  gap: 5
6172
7324
  },
6173
7325
  children: [
6174
- /* @__PURE__ */ jsxs6("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
6175
- /* @__PURE__ */ jsx6(
7326
+ /* @__PURE__ */ jsxs7("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
7327
+ /* @__PURE__ */ jsx7(
6176
7328
  "span",
6177
7329
  {
6178
7330
  style: { fontSize: 11, fontWeight: 600, color: "#475569", cursor: "pointer" },
@@ -6180,7 +7332,7 @@ var DocCanvasEnhancementsHost = () => {
6180
7332
  children: "\u5F15\u7528\u5757 (Blockquote)"
6181
7333
  }
6182
7334
  ),
6183
- !isReadonly && /* @__PURE__ */ jsx6(
7335
+ !isReadonly && /* @__PURE__ */ jsx7(
6184
7336
  "button",
6185
7337
  {
6186
7338
  type: "button",
@@ -6194,10 +7346,10 @@ var DocCanvasEnhancementsHost = () => {
6194
7346
  }
6195
7347
  )
6196
7348
  ] }),
6197
- /* @__PURE__ */ jsx6("div", { style: { fontSize: 11.5, color: "#334155", fontStyle: "italic" }, children: q.text }),
6198
- /* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
6199
- /* @__PURE__ */ jsx6("span", { style: { fontSize: 10.5, color: "#64748b" }, children: "\u51FA\u5904\u6807\u7B7E\uFF1A" }),
6200
- /* @__PURE__ */ jsx6(
7349
+ /* @__PURE__ */ jsx7("div", { style: { fontSize: 11.5, color: "#334155", fontStyle: "italic" }, children: q.text }),
7350
+ /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
7351
+ /* @__PURE__ */ jsx7("span", { style: { fontSize: 10.5, color: "#64748b" }, children: "\u51FA\u5904\u6807\u7B7E\uFF1A" }),
7352
+ /* @__PURE__ */ jsx7(
6201
7353
  "input",
6202
7354
  {
6203
7355
  type: "text",
@@ -6228,7 +7380,7 @@ var DocCanvasEnhancementsHost = () => {
6228
7380
  const canonicalLang = normalizeDocCodeLanguageLabel(cb.language);
6229
7381
  const lines = (cb.code || "").split("\n");
6230
7382
  const isEditing = editingCodeId === cb.id;
6231
- return /* @__PURE__ */ jsxs6(
7383
+ return /* @__PURE__ */ jsxs7(
6232
7384
  "div",
6233
7385
  {
6234
7386
  "data-testid": `yudao-code-card-${cb.id}`,
@@ -6239,7 +7391,7 @@ var DocCanvasEnhancementsHost = () => {
6239
7391
  overflow: "hidden"
6240
7392
  },
6241
7393
  children: [
6242
- /* @__PURE__ */ jsxs6(
7394
+ /* @__PURE__ */ jsxs7(
6243
7395
  "div",
6244
7396
  {
6245
7397
  style: {
@@ -6252,7 +7404,7 @@ var DocCanvasEnhancementsHost = () => {
6252
7404
  gap: 6
6253
7405
  },
6254
7406
  children: [
6255
- /* @__PURE__ */ jsx6(
7407
+ /* @__PURE__ */ jsx7(
6256
7408
  "select",
6257
7409
  {
6258
7410
  "data-testid": `yudao-code-lang-${cb.id}`,
@@ -6272,11 +7424,11 @@ var DocCanvasEnhancementsHost = () => {
6272
7424
  color: "#0f172a",
6273
7425
  fontWeight: 600
6274
7426
  },
6275
- children: DOC_SUPPORTED_CODE_LANGUAGES.map((lang) => /* @__PURE__ */ jsx6("option", { value: lang.value, children: lang.label }, lang.value))
7427
+ children: DOC_SUPPORTED_CODE_LANGUAGES.map((lang) => /* @__PURE__ */ jsx7("option", { value: lang.value, children: lang.label }, lang.value))
6276
7428
  }
6277
7429
  ),
6278
- /* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: 4 }, children: [
6279
- /* @__PURE__ */ jsx6(
7430
+ /* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 4 }, children: [
7431
+ /* @__PURE__ */ jsx7(
6280
7432
  "button",
6281
7433
  {
6282
7434
  type: "button",
@@ -6287,8 +7439,8 @@ var DocCanvasEnhancementsHost = () => {
6287
7439
  children: copiedCodeId === cb.id ? "\u5DF2\u590D\u5236" : "\u590D\u5236\u4EE3\u7801"
6288
7440
  }
6289
7441
  ),
6290
- !isReadonly && /* @__PURE__ */ jsxs6(Fragment2, { children: [
6291
- /* @__PURE__ */ jsx6(
7442
+ !isReadonly && /* @__PURE__ */ jsxs7(Fragment2, { children: [
7443
+ /* @__PURE__ */ jsx7(
6292
7444
  "button",
6293
7445
  {
6294
7446
  type: "button",
@@ -6298,7 +7450,7 @@ var DocCanvasEnhancementsHost = () => {
6298
7450
  children: isEditing ? "\u9884\u89C8" : "\u7F16\u8F91"
6299
7451
  }
6300
7452
  ),
6301
- /* @__PURE__ */ jsx6(
7453
+ /* @__PURE__ */ jsx7(
6302
7454
  "button",
6303
7455
  {
6304
7456
  type: "button",
@@ -6316,7 +7468,7 @@ var DocCanvasEnhancementsHost = () => {
6316
7468
  ]
6317
7469
  }
6318
7470
  ),
6319
- isEditing ? /* @__PURE__ */ jsx6(
7471
+ isEditing ? /* @__PURE__ */ jsx7(
6320
7472
  "textarea",
6321
7473
  {
6322
7474
  rows: Math.min(10, Math.max(3, lines.length + 1)),
@@ -6339,7 +7491,7 @@ var DocCanvasEnhancementsHost = () => {
6339
7491
  color: "#0f172a"
6340
7492
  }
6341
7493
  }
6342
- ) : /* @__PURE__ */ jsx6(
7494
+ ) : /* @__PURE__ */ jsx7(
6343
7495
  "div",
6344
7496
  {
6345
7497
  style: {
@@ -6352,8 +7504,8 @@ var DocCanvasEnhancementsHost = () => {
6352
7504
  onClick: () => jumpToDocOffset(cb.startIndex),
6353
7505
  children: lines.map((ln, lIdx) => {
6354
7506
  const tokens = tokenizeCodeLineForHighlight(ln, canonicalLang);
6355
- return /* @__PURE__ */ jsxs6("div", { style: { display: "flex", whiteSpace: "pre" }, children: [
6356
- /* @__PURE__ */ jsx6(
7507
+ return /* @__PURE__ */ jsxs7("div", { style: { display: "flex", whiteSpace: "pre" }, children: [
7508
+ /* @__PURE__ */ jsx7(
6357
7509
  "span",
6358
7510
  {
6359
7511
  style: {
@@ -6367,7 +7519,7 @@ var DocCanvasEnhancementsHost = () => {
6367
7519
  children: lIdx + 1
6368
7520
  }
6369
7521
  ),
6370
- /* @__PURE__ */ jsx6("span", { children: tokens.length === 0 ? " " : tokens.map((tok, tIdx) => /* @__PURE__ */ jsx6(
7522
+ /* @__PURE__ */ jsx7("span", { children: tokens.length === 0 ? " " : tokens.map((tok, tIdx) => /* @__PURE__ */ jsx7(
6371
7523
  "span",
6372
7524
  {
6373
7525
  style: {
@@ -6382,18 +7534,89 @@ var DocCanvasEnhancementsHost = () => {
6382
7534
  ] }, lIdx);
6383
7535
  })
6384
7536
  }
6385
- )
6386
- ]
6387
- },
6388
- cb.id
6389
- );
6390
- }),
6391
- charts.map((ch) => /* @__PURE__ */ jsxs6(
7537
+ )
7538
+ ]
7539
+ },
7540
+ cb.id
7541
+ );
7542
+ }),
7543
+ charts.map((ch) => /* @__PURE__ */ jsxs7(
7544
+ "div",
7545
+ {
7546
+ "data-testid": `yudao-chart-card-${ch.id}`,
7547
+ onDoubleClick: () => {
7548
+ if (!isReadonly) featureService.openChartEditor(ch.id);
7549
+ },
7550
+ style: {
7551
+ border: "1px solid #e3e5ea",
7552
+ borderRadius: 6,
7553
+ background: "#ffffff",
7554
+ padding: 8,
7555
+ display: "flex",
7556
+ flexDirection: "column",
7557
+ gap: 6
7558
+ },
7559
+ children: [
7560
+ /* @__PURE__ */ jsxs7("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
7561
+ /* @__PURE__ */ jsxs7("span", { style: { fontSize: 11.5, fontWeight: 600, color: "#1b1c1f" }, children: [
7562
+ ch.title || "\u5185\u5D4C\u56FE\u8868",
7563
+ " (",
7564
+ ch.chartType,
7565
+ ")"
7566
+ ] }),
7567
+ !isReadonly && /* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 4 }, children: [
7568
+ /* @__PURE__ */ jsx7(
7569
+ "button",
7570
+ {
7571
+ type: "button",
7572
+ className: "yudao-doc-mini-btn is-soft-primary",
7573
+ style: { padding: "1px 6px", fontSize: 10.5 },
7574
+ onClick: () => featureService.openChartEditor(ch.id),
7575
+ children: "\u7F16\u8F91\u56FE\u8868\u6570\u636E"
7576
+ }
7577
+ ),
7578
+ /* @__PURE__ */ jsx7(
7579
+ "button",
7580
+ {
7581
+ type: "button",
7582
+ className: "yudao-doc-mini-btn is-danger",
7583
+ style: { padding: "1px 5px", fontSize: 10.5 },
7584
+ onClick: () => commandService.syncExecuteCommand(RemoveDocChartCommand.id, {
7585
+ unitId,
7586
+ id: ch.id
7587
+ }),
7588
+ children: "\u5220\u9664"
7589
+ }
7590
+ )
7591
+ ] })
7592
+ ] }),
7593
+ /* @__PURE__ */ jsx7(
7594
+ "div",
7595
+ {
7596
+ title: "\u53CC\u51FB\u6253\u5F00\u56FE\u8868\u6570\u636E\u7F16\u8F91\u5668",
7597
+ style: {
7598
+ cursor: isReadonly ? "default" : "pointer",
7599
+ overflow: "hidden",
7600
+ borderRadius: 4,
7601
+ maxHeight: 150,
7602
+ display: "flex",
7603
+ justifyContent: "center"
7604
+ },
7605
+ dangerouslySetInnerHTML: {
7606
+ __html: renderDocChartSvg2({ ...ch, width: 260, height: 140 })
7607
+ }
7608
+ }
7609
+ )
7610
+ ]
7611
+ },
7612
+ ch.id
7613
+ )),
7614
+ smartArts.map((sa) => /* @__PURE__ */ jsxs7(
6392
7615
  "div",
6393
7616
  {
6394
- "data-testid": `yudao-chart-card-${ch.id}`,
7617
+ "data-testid": `yudao-smartart-card-${sa.id}`,
6395
7618
  onDoubleClick: () => {
6396
- if (!isReadonly) featureService.openChartEditor(ch.id);
7619
+ if (!isReadonly) featureService.openSmartArtEditor(sa.id);
6397
7620
  },
6398
7621
  style: {
6399
7622
  border: "1px solid #e3e5ea",
@@ -6402,64 +7625,66 @@ var DocCanvasEnhancementsHost = () => {
6402
7625
  padding: 8,
6403
7626
  display: "flex",
6404
7627
  flexDirection: "column",
6405
- gap: 6
7628
+ gap: 6,
7629
+ cursor: isReadonly ? "default" : "pointer"
6406
7630
  },
7631
+ title: isReadonly ? sa.title || "\u667A\u80FD\u7ED3\u6784\u56FE\u793A" : "\u53CC\u51FB\u7F16\u8F91\u56FE\u793A\u8282\u70B9\u4E0E\u5E03\u5C40",
6407
7632
  children: [
6408
- /* @__PURE__ */ jsxs6("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
6409
- /* @__PURE__ */ jsxs6("span", { style: { fontSize: 11.5, fontWeight: 600, color: "#1b1c1f" }, children: [
6410
- ch.title || "\u5185\u5D4C\u56FE\u8868",
7633
+ /* @__PURE__ */ jsxs7("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
7634
+ /* @__PURE__ */ jsxs7("span", { style: { fontSize: 11.5, fontWeight: 600, color: "#1b1c1f" }, children: [
7635
+ sa.title || "\u667A\u80FD\u7ED3\u6784\u56FE\u793A",
6411
7636
  " (",
6412
- ch.chartType,
7637
+ sa.layout,
6413
7638
  ")"
6414
7639
  ] }),
6415
- !isReadonly && /* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: 4 }, children: [
6416
- /* @__PURE__ */ jsx6(
7640
+ !isReadonly && /* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 4 }, children: [
7641
+ /* @__PURE__ */ jsx7(
6417
7642
  "button",
6418
7643
  {
6419
7644
  type: "button",
7645
+ "data-testid": `yudao-smartart-edit-${sa.id}`,
6420
7646
  className: "yudao-doc-mini-btn is-soft-primary",
6421
7647
  style: { padding: "1px 6px", fontSize: 10.5 },
6422
- onClick: () => featureService.openChartEditor(ch.id),
6423
- children: "\u7F16\u8F91\u56FE\u8868\u6570\u636E"
7648
+ onClick: () => featureService.openSmartArtEditor(sa.id),
7649
+ children: "\u7F16\u8F91\u56FE\u793A\u8282\u70B9"
6424
7650
  }
6425
7651
  ),
6426
- /* @__PURE__ */ jsx6(
7652
+ /* @__PURE__ */ jsx7(
6427
7653
  "button",
6428
7654
  {
6429
7655
  type: "button",
6430
7656
  className: "yudao-doc-mini-btn is-danger",
6431
7657
  style: { padding: "1px 5px", fontSize: 10.5 },
6432
- onClick: () => commandService.syncExecuteCommand(RemoveDocChartCommand.id, {
7658
+ onClick: () => commandService.syncExecuteCommand(RemoveDocSmartArtCommand.id, {
6433
7659
  unitId,
6434
- id: ch.id
7660
+ id: sa.id
6435
7661
  }),
6436
7662
  children: "\u5220\u9664"
6437
7663
  }
6438
7664
  )
6439
7665
  ] })
6440
7666
  ] }),
6441
- /* @__PURE__ */ jsx6(
7667
+ /* @__PURE__ */ jsx7(
6442
7668
  "div",
6443
7669
  {
6444
- title: "\u53CC\u51FB\u6253\u5F00\u56FE\u8868\u6570\u636E\u7F16\u8F91\u5668",
6445
7670
  style: {
6446
- cursor: isReadonly ? "default" : "pointer",
6447
7671
  overflow: "hidden",
6448
7672
  borderRadius: 4,
7673
+ background: "#f8fafc",
6449
7674
  maxHeight: 150,
6450
7675
  display: "flex",
6451
7676
  justifyContent: "center"
6452
7677
  },
6453
7678
  dangerouslySetInnerHTML: {
6454
- __html: renderDocChartSvg2({ ...ch, width: 260, height: 140 })
7679
+ __html: renderSmartArtSvg2({ ...sa, width: 260, height: 140 })
6455
7680
  }
6456
7681
  }
6457
7682
  )
6458
7683
  ]
6459
7684
  },
6460
- ch.id
7685
+ sa.id
6461
7686
  )),
6462
- miniSheets.map((ms) => /* @__PURE__ */ jsxs6(
7687
+ miniSheets.map((ms) => /* @__PURE__ */ jsxs7(
6463
7688
  "div",
6464
7689
  {
6465
7690
  "data-testid": `yudao-minisheet-card-${ms.id}`,
@@ -6476,8 +7701,8 @@ var DocCanvasEnhancementsHost = () => {
6476
7701
  gap: 6
6477
7702
  },
6478
7703
  children: [
6479
- /* @__PURE__ */ jsxs6("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
6480
- /* @__PURE__ */ jsxs6("span", { style: { fontSize: 11.5, fontWeight: 600, color: "#1b1c1f" }, children: [
7704
+ /* @__PURE__ */ jsxs7("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
7705
+ /* @__PURE__ */ jsxs7("span", { style: { fontSize: 11.5, fontWeight: 600, color: "#1b1c1f" }, children: [
6481
7706
  ms.title || "\u5185\u5D4C\u8BA1\u7B97\u8868",
6482
7707
  " (",
6483
7708
  ms.rows,
@@ -6485,8 +7710,8 @@ var DocCanvasEnhancementsHost = () => {
6485
7710
  ms.cols,
6486
7711
  ")"
6487
7712
  ] }),
6488
- !isReadonly && /* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: 4 }, children: [
6489
- /* @__PURE__ */ jsx6(
7713
+ !isReadonly && /* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 4 }, children: [
7714
+ /* @__PURE__ */ jsx7(
6490
7715
  "button",
6491
7716
  {
6492
7717
  type: "button",
@@ -6496,7 +7721,7 @@ var DocCanvasEnhancementsHost = () => {
6496
7721
  children: "\u7F16\u8F91\u8BA1\u7B97\u8868"
6497
7722
  }
6498
7723
  ),
6499
- /* @__PURE__ */ jsx6(
7724
+ /* @__PURE__ */ jsx7(
6500
7725
  "button",
6501
7726
  {
6502
7727
  type: "button",
@@ -6511,9 +7736,9 @@ var DocCanvasEnhancementsHost = () => {
6511
7736
  )
6512
7737
  ] })
6513
7738
  ] }),
6514
- /* @__PURE__ */ jsx6("table", { style: { width: "100%", borderCollapse: "collapse", fontSize: 10.5 }, children: /* @__PURE__ */ jsx6("tbody", { children: Array.from({ length: Math.min(4, ms.rows) }, (_, r) => /* @__PURE__ */ jsx6("tr", { children: Array.from({ length: Math.min(4, ms.cols) }, (_2, c) => {
7739
+ /* @__PURE__ */ jsx7("table", { style: { width: "100%", borderCollapse: "collapse", fontSize: 10.5 }, children: /* @__PURE__ */ jsx7("tbody", { children: Array.from({ length: Math.min(4, ms.rows) }, (_, r) => /* @__PURE__ */ jsx7("tr", { children: Array.from({ length: Math.min(4, ms.cols) }, (_2, c) => {
6515
7740
  const cell = ms.cells[miniSheetCellKey2(r, c)];
6516
- return /* @__PURE__ */ jsx6(
7741
+ return /* @__PURE__ */ jsx7(
6517
7742
  "td",
6518
7743
  {
6519
7744
  style: {
@@ -6535,15 +7760,15 @@ var DocCanvasEnhancementsHost = () => {
6535
7760
  ]
6536
7761
  }
6537
7762
  ),
6538
- (docNotes.length > 0 || !isReadonly) && /* @__PURE__ */ jsxs6(
7763
+ (docNotes.length > 0 || !isReadonly) && /* @__PURE__ */ jsxs7(
6539
7764
  "div",
6540
7765
  {
6541
7766
  className: "yudao-doc-footnote-strip",
6542
7767
  "data-testid": "yudao-doc-footnote-strip",
6543
7768
  children: [
6544
- /* @__PURE__ */ jsxs6("div", { className: "yudao-doc-footnote-header", children: [
6545
- /* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
6546
- /* @__PURE__ */ jsx6(
7769
+ /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-footnote-header", children: [
7770
+ /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
7771
+ /* @__PURE__ */ jsx7(
6547
7772
  "button",
6548
7773
  {
6549
7774
  type: "button",
@@ -6553,15 +7778,15 @@ var DocCanvasEnhancementsHost = () => {
6553
7778
  children: footnoteExpanded && docNotes.length > 0 ? "\u6536\u8D77\u6CE8\u91CA\u680F" : `\u9875\u811A\u6CE8\u91CA\u680F (${docNotes.length})`
6554
7779
  }
6555
7780
  ),
6556
- /* @__PURE__ */ jsxs6("span", { style: { fontSize: 11, color: "#64748b" }, children: [
7781
+ /* @__PURE__ */ jsxs7("span", { style: { fontSize: 11, color: "#64748b" }, children: [
6557
7782
  "\u811A\u6CE8 ",
6558
7783
  footnotes.length,
6559
7784
  " \xB7 \u5C3E\u6CE8 ",
6560
7785
  endnotes.length
6561
7786
  ] })
6562
7787
  ] }),
6563
- !isReadonly && /* @__PURE__ */ jsxs6("div", { style: { display: "flex", gap: 5 }, children: [
6564
- /* @__PURE__ */ jsx6(
7788
+ !isReadonly && /* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 5 }, children: [
7789
+ /* @__PURE__ */ jsx7(
6565
7790
  "button",
6566
7791
  {
6567
7792
  type: "button",
@@ -6578,7 +7803,7 @@ var DocCanvasEnhancementsHost = () => {
6578
7803
  children: "+ \u65B0\u589E\u811A\u6CE8"
6579
7804
  }
6580
7805
  ),
6581
- /* @__PURE__ */ jsx6(
7806
+ /* @__PURE__ */ jsx7(
6582
7807
  "button",
6583
7808
  {
6584
7809
  type: "button",
@@ -6597,9 +7822,9 @@ var DocCanvasEnhancementsHost = () => {
6597
7822
  )
6598
7823
  ] })
6599
7824
  ] }),
6600
- footnoteExpanded && docNotes.length > 0 && /* @__PURE__ */ jsxs6("div", { className: "yudao-doc-footnote-items", children: [
6601
- footnotes.map((fn) => /* @__PURE__ */ jsxs6("div", { className: "yudao-doc-footnote-item", children: [
6602
- /* @__PURE__ */ jsx6(
7825
+ footnoteExpanded && docNotes.length > 0 && /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-footnote-items", children: [
7826
+ footnotes.map((fn) => /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-footnote-item", children: [
7827
+ /* @__PURE__ */ jsx7(
6603
7828
  "button",
6604
7829
  {
6605
7830
  type: "button",
@@ -6618,7 +7843,7 @@ var DocCanvasEnhancementsHost = () => {
6618
7843
  children: formatSuperscriptNumber(fn.number)
6619
7844
  }
6620
7845
  ),
6621
- /* @__PURE__ */ jsx6(
7846
+ /* @__PURE__ */ jsx7(
6622
7847
  "input",
6623
7848
  {
6624
7849
  type: "text",
@@ -6639,7 +7864,7 @@ var DocCanvasEnhancementsHost = () => {
6639
7864
  }
6640
7865
  }
6641
7866
  ),
6642
- !isReadonly && /* @__PURE__ */ jsx6(
7867
+ !isReadonly && /* @__PURE__ */ jsx7(
6643
7868
  "button",
6644
7869
  {
6645
7870
  type: "button",
@@ -6653,8 +7878,8 @@ var DocCanvasEnhancementsHost = () => {
6653
7878
  }
6654
7879
  )
6655
7880
  ] }, fn.id)),
6656
- endnotes.map((en) => /* @__PURE__ */ jsxs6("div", { className: "yudao-doc-footnote-item", children: [
6657
- /* @__PURE__ */ jsxs6(
7881
+ endnotes.map((en) => /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-footnote-item", children: [
7882
+ /* @__PURE__ */ jsxs7(
6658
7883
  "button",
6659
7884
  {
6660
7885
  type: "button",
@@ -6677,7 +7902,7 @@ var DocCanvasEnhancementsHost = () => {
6677
7902
  ]
6678
7903
  }
6679
7904
  ),
6680
- /* @__PURE__ */ jsx6(
7905
+ /* @__PURE__ */ jsx7(
6681
7906
  "input",
6682
7907
  {
6683
7908
  type: "text",
@@ -6698,7 +7923,7 @@ var DocCanvasEnhancementsHost = () => {
6698
7923
  }
6699
7924
  }
6700
7925
  ),
6701
- !isReadonly && /* @__PURE__ */ jsx6(
7926
+ !isReadonly && /* @__PURE__ */ jsx7(
6702
7927
  "button",
6703
7928
  {
6704
7929
  type: "button",
@@ -6721,14 +7946,14 @@ var DocCanvasEnhancementsHost = () => {
6721
7946
 
6722
7947
  // src/views/left-sidebar/DocLeftSidebar.tsx
6723
7948
  import {
6724
- ICommandService as ICommandService7,
6725
- IUniverInstanceService as IUniverInstanceService7,
7949
+ ICommandService as ICommandService8,
7950
+ IUniverInstanceService as IUniverInstanceService8,
6726
7951
  LocaleService,
6727
7952
  Quantity,
6728
- UniverInstanceType as UniverInstanceType7
7953
+ UniverInstanceType as UniverInstanceType8
6729
7954
  } from "@univerjs/core";
6730
7955
  import { DocSelectionManagerService as DocSelectionManagerService4, RichTextEditingMutation as RichTextEditingMutation3 } from "@univerjs/docs";
6731
- import { ISidebarService as ISidebarService2, useDependency as useDependency6, useObservable as useObservable6 } from "@univerjs/ui";
7956
+ import { ISidebarService as ISidebarService2, useDependency as useDependency7, useObservable as useObservable7 } from "@univerjs/ui";
6732
7957
  import {
6733
7958
  extractDocCatalog,
6734
7959
  extractDocCatalogTree,
@@ -6738,7 +7963,7 @@ import {
6738
7963
  InsertDocAreaCommand as InsertDocAreaCommand2,
6739
7964
  InsertDocBuildingBlockCommand,
6740
7965
  InsertDocCalloutCommand as InsertDocCalloutCommand2,
6741
- InsertDocCaptionCommand,
7966
+ InsertDocCaptionCommand as InsertDocCaptionCommand2,
6742
7967
  InsertDocChartCommand as InsertDocChartCommand3,
6743
7968
  InsertDocCodeBlockCommand as InsertDocCodeBlockCommand2,
6744
7969
  InsertDocColumnGroupCommand,
@@ -6755,7 +7980,7 @@ import {
6755
7980
  InsertDocRepeatingSectionCommand,
6756
7981
  InsertDocSdtCommand as InsertDocSdtCommand4,
6757
7982
  InsertDocShapeCommand,
6758
- InsertDocSmartArtCommand,
7983
+ InsertDocSmartArtCommand as InsertDocSmartArtCommand3,
6759
7984
  InsertDocTableOfContentsCommand as InsertDocTableOfContentsCommand2,
6760
7985
  InsertStyledSeparatorCommand,
6761
7986
  listDocSdtControls as listDocSdtControls2,
@@ -6763,8 +7988,8 @@ import {
6763
7988
  RemoveDocTableOfContentsCommand,
6764
7989
  ToggleHeadingCollapseCommand
6765
7990
  } from "@yudaocode/univer-docs";
6766
- import React6, { useEffect as useEffect4, useState as useState6 } from "react";
6767
- import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
7991
+ import React7, { useEffect as useEffect4, useState as useState7 } from "react";
7992
+ import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
6768
7993
  var YUDAO_DOC_FIELD_DND_MIME = "application/x-yudao-doc-field";
6769
7994
  var KIND_BADGE = {
6770
7995
  text: "\u6587\u672C",
@@ -6784,29 +8009,29 @@ var KIND_BADGE = {
6784
8009
  repeatingSection: "\u660E\u7EC6\u5217\u8868"
6785
8010
  };
6786
8011
  var DocLeftSidebar = () => {
6787
- const instanceService = useDependency6(IUniverInstanceService7);
6788
- const commandService = useDependency6(ICommandService7);
6789
- const selectionManagerService = useDependency6(DocSelectionManagerService4);
6790
- const sidebarService = useDependency6(ISidebarService2);
6791
- const sdtService = useDependency6(IDocSdtService4);
6792
- const featureService = useDependency6(IDocsUIFeatureService);
6793
- const localeService = useDependency6(LocaleService, Quantity.OPTIONAL);
8012
+ const instanceService = useDependency7(IUniverInstanceService8);
8013
+ const commandService = useDependency7(ICommandService8);
8014
+ const selectionManagerService = useDependency7(DocSelectionManagerService4);
8015
+ const sidebarService = useDependency7(ISidebarService2);
8016
+ const sdtService = useDependency7(IDocSdtService4);
8017
+ const featureService = useDependency7(IDocsUIFeatureService);
8018
+ const localeService = useDependency7(LocaleService, Quantity.OPTIONAL);
6794
8019
  const t = (key, fallback) => {
6795
8020
  if (!localeService) return fallback;
6796
8021
  const translated = localeService.t(key);
6797
8022
  return translated && translated !== key ? translated : fallback;
6798
8023
  };
6799
- const features = useObservable6(featureService.features$, featureService.getFeatures());
6800
- const activeControlId = useObservable6(sdtService.activeControlId$, sdtService.getActiveControlId());
6801
- const metaVersion = useObservable6(sdtService.metadataChange$, "");
6802
- const unit = useObservable6(
6803
- () => instanceService.getCurrentTypeOfUnit$(UniverInstanceType7.UNIVER_DOC),
6804
- instanceService.getCurrentUnitOfType(UniverInstanceType7.UNIVER_DOC),
8024
+ const features = useObservable7(featureService.features$, featureService.getFeatures());
8025
+ const activeControlId = useObservable7(sdtService.activeControlId$, sdtService.getActiveControlId());
8026
+ const metaVersion = useObservable7(sdtService.metadataChange$, "");
8027
+ const unit = useObservable7(
8028
+ () => instanceService.getCurrentTypeOfUnit$(UniverInstanceType8.UNIVER_DOC),
8029
+ instanceService.getCurrentUnitOfType(UniverInstanceType8.UNIVER_DOC),
6805
8030
  false,
6806
8031
  [instanceService]
6807
8032
  );
6808
- const [tab, setTab] = useState6("controls");
6809
- const [rev, setRev] = useState6(0);
8033
+ const [tab, setTab] = useState7("controls");
8034
+ const [rev, setRev] = useState7(0);
6810
8035
  useEffect4(() => {
6811
8036
  const disp = commandService.onCommandExecuted((info) => {
6812
8037
  if (info.id === RichTextEditingMutation3.id || info.id.startsWith("yudao-docs")) {
@@ -6899,9 +8124,9 @@ var DocLeftSidebar = () => {
6899
8124
  }
6900
8125
  });
6901
8126
  };
6902
- return /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-left-panel", children: [
6903
- /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-left-tabs", children: [
6904
- features.sdtControls && /* @__PURE__ */ jsxs7(
8127
+ return /* @__PURE__ */ jsxs8("div", { className: "yudao-doc-left-panel", children: [
8128
+ /* @__PURE__ */ jsxs8("div", { className: "yudao-doc-left-tabs", children: [
8129
+ features.sdtControls && /* @__PURE__ */ jsxs8(
6905
8130
  "button",
6906
8131
  {
6907
8132
  type: "button",
@@ -6915,7 +8140,7 @@ var DocLeftSidebar = () => {
6915
8140
  ]
6916
8141
  }
6917
8142
  ),
6918
- features.datasetBinding && /* @__PURE__ */ jsx7(
8143
+ features.datasetBinding && /* @__PURE__ */ jsx8(
6919
8144
  "button",
6920
8145
  {
6921
8146
  type: "button",
@@ -6924,7 +8149,7 @@ var DocLeftSidebar = () => {
6924
8149
  children: t("yudaoDocs.sidebar.tabDatasets", "\u6570\u636E\u96C6")
6925
8150
  }
6926
8151
  ),
6927
- /* @__PURE__ */ jsxs7(
8152
+ /* @__PURE__ */ jsxs8(
6928
8153
  "button",
6929
8154
  {
6930
8155
  type: "button",
@@ -6939,7 +8164,7 @@ var DocLeftSidebar = () => {
6939
8164
  }
6940
8165
  )
6941
8166
  ] }),
6942
- /* @__PURE__ */ jsxs7(
8167
+ /* @__PURE__ */ jsxs8(
6943
8168
  "div",
6944
8169
  {
6945
8170
  style: {
@@ -6952,8 +8177,8 @@ var DocLeftSidebar = () => {
6952
8177
  fontSize: 11
6953
8178
  },
6954
8179
  children: [
6955
- /* @__PURE__ */ jsxs7("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", color: "#4e5565" }, children: [
6956
- /* @__PURE__ */ jsxs7("span", { style: { fontWeight: 500 }, children: [
8180
+ /* @__PURE__ */ jsxs8("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", color: "#4e5565" }, children: [
8181
+ /* @__PURE__ */ jsxs8("span", { style: { fontWeight: 500 }, children: [
6957
8182
  t("yudaoDocs.sidebar.wordCountLabel", "\u5B57\u6570"),
6958
8183
  "\uFF1A",
6959
8184
  docStats.wordCount,
@@ -6963,7 +8188,7 @@ var DocLeftSidebar = () => {
6963
8188
  t("yudaoDocs.sidebar.charUnit", "\u5B57\u7B26"),
6964
8189
  ")"
6965
8190
  ] }),
6966
- features.sdtControls && /* @__PURE__ */ jsxs7(
8191
+ features.sdtControls && /* @__PURE__ */ jsxs8(
6967
8192
  "span",
6968
8193
  {
6969
8194
  style: {
@@ -6987,7 +8212,7 @@ var DocLeftSidebar = () => {
6987
8212
  }
6988
8213
  )
6989
8214
  ] }),
6990
- features.sdtControls && /* @__PURE__ */ jsx7("div", { style: { height: 3, borderRadius: 999, background: "#eeeff1", overflow: "hidden" }, children: /* @__PURE__ */ jsx7(
8215
+ features.sdtControls && /* @__PURE__ */ jsx8("div", { style: { height: 3, borderRadius: 999, background: "#eeeff1", overflow: "hidden" }, children: /* @__PURE__ */ jsx8(
6991
8216
  "div",
6992
8217
  {
6993
8218
  style: {
@@ -7001,9 +8226,9 @@ var DocLeftSidebar = () => {
7001
8226
  ]
7002
8227
  }
7003
8228
  ),
7004
- tab === "toc" ? /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-left-body", children: [
7005
- features.tocInsert && /* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 6 }, children: [
7006
- /* @__PURE__ */ jsx7(
8229
+ tab === "toc" ? /* @__PURE__ */ jsxs8("div", { className: "yudao-doc-left-body", children: [
8230
+ features.tocInsert && /* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: 6 }, children: [
8231
+ /* @__PURE__ */ jsx8(
7007
8232
  "button",
7008
8233
  {
7009
8234
  type: "button",
@@ -7016,7 +8241,7 @@ var DocLeftSidebar = () => {
7016
8241
  children: t("yudaoDocs.sidebar.insertAutoToc", "+ \u63D2\u5165\u81EA\u52A8\u76EE\u5F55")
7017
8242
  }
7018
8243
  ),
7019
- /* @__PURE__ */ jsx7(
8244
+ /* @__PURE__ */ jsx8(
7020
8245
  "button",
7021
8246
  {
7022
8247
  type: "button",
@@ -7027,7 +8252,7 @@ var DocLeftSidebar = () => {
7027
8252
  children: t("yudaoDocs.sidebar.refreshToc", "\u5237\u65B0\u76EE\u5F55")
7028
8253
  }
7029
8254
  ),
7030
- metadata.tocConfig && /* @__PURE__ */ jsx7(
8255
+ metadata.tocConfig && /* @__PURE__ */ jsx8(
7031
8256
  "button",
7032
8257
  {
7033
8258
  type: "button",
@@ -7039,8 +8264,8 @@ var DocLeftSidebar = () => {
7039
8264
  }
7040
8265
  )
7041
8266
  ] }),
7042
- /* @__PURE__ */ jsx7("div", { style: { fontSize: 11, color: "#4e5565", fontWeight: 600 }, children: t("yudaoDocs.sidebar.outlineGuide", "\u6587\u6863\u7AE0\u8282\u5927\u7EB2\uFF08\u70B9\u51FB\u5B9A\u4F4D\u7AE0\u8282\uFF0C\u652F\u6301\u6298\u53E0\u4E0E\u5C55\u5F00\uFF09\uFF1A") }),
7043
- catalogTree.length === 0 ? /* @__PURE__ */ jsx7("div", { style: { fontSize: 12, color: "#7d8698", textAlign: "center", padding: "24px 8px" }, children: t("yudaoDocs.sidebar.outlineEmpty", "\u672A\u68C0\u6D4B\u5230\u6807\u9898\u6216\u7AE0\u8282\u7ED3\u6784\u3002") }) : (() => {
8267
+ /* @__PURE__ */ jsx8("div", { style: { fontSize: 11, color: "#4e5565", fontWeight: 600 }, children: t("yudaoDocs.sidebar.outlineGuide", "\u6587\u6863\u7AE0\u8282\u5927\u7EB2\uFF08\u70B9\u51FB\u5B9A\u4F4D\u7AE0\u8282\uFF0C\u652F\u6301\u6298\u53E0\u4E0E\u5C55\u5F00\uFF09\uFF1A") }),
8268
+ catalogTree.length === 0 ? /* @__PURE__ */ jsx8("div", { style: { fontSize: 12, color: "#7d8698", textAlign: "center", padding: "24px 8px" }, children: t("yudaoDocs.sidebar.outlineEmpty", "\u672A\u68C0\u6D4B\u5230\u6807\u9898\u6216\u7AE0\u8282\u7ED3\u6784\u3002") }) : (() => {
7044
8269
  const sortedParas = [...liveSnapshot.body?.paragraphs ?? []].sort(
7045
8270
  (a, b) => a.startIndex - b.startIndex
7046
8271
  );
@@ -7048,8 +8273,8 @@ var DocLeftSidebar = () => {
7048
8273
  const paraIdx = sortedParas.findIndex((p) => p.startIndex >= item.startIndex);
7049
8274
  const isCollapsed = paraIdx >= 0 && collapsedParaSet.has(paraIdx);
7050
8275
  const pageBadgeText = `${t("yudaoDocs.sidebar.pagePrefix", "\u7B2C")}${item.pageNo ?? 1}${t("yudaoDocs.sidebar.pageSuffix", "\u9875")}`;
7051
- return /* @__PURE__ */ jsxs7(React6.Fragment, { children: [
7052
- /* @__PURE__ */ jsx7(
8276
+ return /* @__PURE__ */ jsxs8(React7.Fragment, { children: [
8277
+ /* @__PURE__ */ jsx8(
7053
8278
  "div",
7054
8279
  {
7055
8280
  className: "yudao-doc-ctrl-card",
@@ -7058,9 +8283,9 @@ var DocLeftSidebar = () => {
7058
8283
  cursor: "pointer"
7059
8284
  },
7060
8285
  onClick: () => handleJumpCatalog(item),
7061
- children: /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 6 }, children: [
7062
- /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: 6, minWidth: 0 }, children: [
7063
- /* @__PURE__ */ jsxs7(
8286
+ children: /* @__PURE__ */ jsxs8("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 6 }, children: [
8287
+ /* @__PURE__ */ jsxs8("div", { style: { display: "flex", alignItems: "center", gap: 6, minWidth: 0 }, children: [
8288
+ /* @__PURE__ */ jsxs8(
7064
8289
  "span",
7065
8290
  {
7066
8291
  style: {
@@ -7077,7 +8302,7 @@ var DocLeftSidebar = () => {
7077
8302
  ]
7078
8303
  }
7079
8304
  ),
7080
- /* @__PURE__ */ jsx7(
8305
+ /* @__PURE__ */ jsx8(
7081
8306
  "span",
7082
8307
  {
7083
8308
  style: {
@@ -7092,8 +8317,8 @@ var DocLeftSidebar = () => {
7092
8317
  }
7093
8318
  )
7094
8319
  ] }),
7095
- /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: 4, flexShrink: 0 }, children: [
7096
- /* @__PURE__ */ jsx7(
8320
+ /* @__PURE__ */ jsxs8("div", { style: { display: "flex", alignItems: "center", gap: 4, flexShrink: 0 }, children: [
8321
+ /* @__PURE__ */ jsx8(
7097
8322
  "span",
7098
8323
  {
7099
8324
  style: {
@@ -7107,7 +8332,7 @@ var DocLeftSidebar = () => {
7107
8332
  children: pageBadgeText
7108
8333
  }
7109
8334
  ),
7110
- features.headingCollapse && paraIdx >= 0 && /* @__PURE__ */ jsx7(
8335
+ features.headingCollapse && paraIdx >= 0 && /* @__PURE__ */ jsx8(
7111
8336
  "button",
7112
8337
  {
7113
8338
  type: "button",
@@ -7132,9 +8357,9 @@ var DocLeftSidebar = () => {
7132
8357
  });
7133
8358
  return renderCatalogNodes(catalogTree, 0);
7134
8359
  })()
7135
- ] }) : tab === "controls" && features.sdtControls ? /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-left-body", children: [
7136
- /* @__PURE__ */ jsx7("div", { style: { fontSize: 11, color: "#4e5565", fontWeight: 600 }, children: "\u5149\u6807\u5904\u5FEB\u901F\u63D2\u5165\u63A7\u4EF6\uFF1A" }),
7137
- /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-quick-grid", children: [
8360
+ ] }) : tab === "controls" && features.sdtControls ? /* @__PURE__ */ jsxs8("div", { className: "yudao-doc-left-body", children: [
8361
+ /* @__PURE__ */ jsx8("div", { style: { fontSize: 11, color: "#4e5565", fontWeight: 600 }, children: "\u5149\u6807\u5904\u5FEB\u901F\u63D2\u5165\u63A7\u4EF6\uFF1A" }),
8362
+ /* @__PURE__ */ jsxs8("div", { className: "yudao-doc-quick-grid", children: [
7138
8363
  [
7139
8364
  { kind: "text", label: "+ \u6587\u672C\u586B\u5199\u9879" },
7140
8365
  { kind: "richText", label: "+ \u5BCC\u6587\u672C\u57DF" },
@@ -7149,7 +8374,7 @@ var DocLeftSidebar = () => {
7149
8374
  { kind: "picture", label: "+ \u56FE\u7247\u5360\u4F4D\u57DF" },
7150
8375
  { kind: "signature", label: "+ \u624B\u5199\u7B7E\u540D\u57DF" },
7151
8376
  { kind: "group", label: "+ \u7EC4\u5408\u9501\u5B9A\u7EC4" }
7152
- ].filter((item) => canUseKind(item.kind)).map((item) => /* @__PURE__ */ jsx7(
8377
+ ].filter((item) => canUseKind(item.kind)).map((item) => /* @__PURE__ */ jsx8(
7153
8378
  "button",
7154
8379
  {
7155
8380
  type: "button",
@@ -7161,7 +8386,7 @@ var DocLeftSidebar = () => {
7161
8386
  },
7162
8387
  item.kind
7163
8388
  )),
7164
- /* @__PURE__ */ jsx7(
8389
+ /* @__PURE__ */ jsx8(
7165
8390
  "button",
7166
8391
  {
7167
8392
  type: "button",
@@ -7179,7 +8404,7 @@ var DocLeftSidebar = () => {
7179
8404
  children: "+ \u547D\u540D\u5B50\u533A\u57DF"
7180
8405
  }
7181
8406
  ),
7182
- /* @__PURE__ */ jsx7(
8407
+ /* @__PURE__ */ jsx8(
7183
8408
  "button",
7184
8409
  {
7185
8410
  type: "button",
@@ -7194,7 +8419,7 @@ var DocLeftSidebar = () => {
7194
8419
  children: "+ \u72B6\u6001\u5FBD\u7AE0\u6807\u7B7E"
7195
8420
  }
7196
8421
  ),
7197
- /* @__PURE__ */ jsx7(
8422
+ /* @__PURE__ */ jsx8(
7198
8423
  "button",
7199
8424
  {
7200
8425
  type: "button",
@@ -7209,10 +8434,10 @@ var DocLeftSidebar = () => {
7209
8434
  }
7210
8435
  )
7211
8436
  ] }),
7212
- features.specialBlocks && /* @__PURE__ */ jsxs7(Fragment3, { children: [
7213
- /* @__PURE__ */ jsx7("div", { style: { fontSize: 11, color: "#4e5565", fontWeight: 600, marginTop: 4 }, children: "\u4E13\u79D1\u516C\u5F0F / \u4EE3\u7801\u5757 / \u6761\u7801\u63D2\u5165\uFF1A" }),
7214
- /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-quick-grid", children: [
7215
- /* @__PURE__ */ jsx7(
8437
+ features.specialBlocks && /* @__PURE__ */ jsxs8(Fragment3, { children: [
8438
+ /* @__PURE__ */ jsx8("div", { style: { fontSize: 11, color: "#4e5565", fontWeight: 600, marginTop: 4 }, children: "\u4E13\u79D1\u516C\u5F0F / \u4EE3\u7801\u5757 / \u6761\u7801\u63D2\u5165\uFF1A" }),
8439
+ /* @__PURE__ */ jsxs8("div", { className: "yudao-doc-quick-grid", children: [
8440
+ /* @__PURE__ */ jsx8(
7216
8441
  "button",
7217
8442
  {
7218
8443
  type: "button",
@@ -7230,7 +8455,7 @@ var DocLeftSidebar = () => {
7230
8455
  children: "+ \u7259\u4F4D\u5341\u5B57\u56FE"
7231
8456
  }
7232
8457
  ),
7233
- /* @__PURE__ */ jsx7(
8458
+ /* @__PURE__ */ jsx8(
7234
8459
  "button",
7235
8460
  {
7236
8461
  type: "button",
@@ -7248,7 +8473,7 @@ var DocLeftSidebar = () => {
7248
8473
  children: "+ \u6708\u7ECF\u53F2\u516C\u5F0F"
7249
8474
  }
7250
8475
  ),
7251
- /* @__PURE__ */ jsx7(
8476
+ /* @__PURE__ */ jsx8(
7252
8477
  "button",
7253
8478
  {
7254
8479
  type: "button",
@@ -7265,7 +8490,7 @@ var DocLeftSidebar = () => {
7265
8490
  children: "+ \u533B\u5B66/\u6570\u5B66\u5206\u5F0F"
7266
8491
  }
7267
8492
  ),
7268
- /* @__PURE__ */ jsx7(
8493
+ /* @__PURE__ */ jsx8(
7269
8494
  "button",
7270
8495
  {
7271
8496
  type: "button",
@@ -7278,7 +8503,7 @@ var DocLeftSidebar = () => {
7278
8503
  children: "+ \u8BED\u6CD5\u4EE3\u7801\u5757"
7279
8504
  }
7280
8505
  ),
7281
- /* @__PURE__ */ jsx7(
8506
+ /* @__PURE__ */ jsx8(
7282
8507
  "button",
7283
8508
  {
7284
8509
  type: "button",
@@ -7295,7 +8520,7 @@ var DocLeftSidebar = () => {
7295
8520
  children: "+ \u9632\u4F2A\u4E8C\u7EF4\u7801"
7296
8521
  }
7297
8522
  ),
7298
- /* @__PURE__ */ jsx7(
8523
+ /* @__PURE__ */ jsx8(
7299
8524
  "button",
7300
8525
  {
7301
8526
  type: "button",
@@ -7313,10 +8538,10 @@ var DocLeftSidebar = () => {
7313
8538
  )
7314
8539
  ] })
7315
8540
  ] }),
7316
- features.v204Blocks && /* @__PURE__ */ jsxs7(Fragment3, { children: [
7317
- /* @__PURE__ */ jsx7("div", { style: { fontSize: 11, color: "#4e5565", fontWeight: 600, marginTop: 4 }, children: "\u6392\u7248\u589E\u5F3A\u5757 / \u811A\u6CE8\u5C3E\u6CE8 / \u5217\u8868 / \u56FE\u8868\uFF1A" }),
7318
- /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-quick-grid", children: [
7319
- /* @__PURE__ */ jsx7(
8541
+ features.v204Blocks && /* @__PURE__ */ jsxs8(Fragment3, { children: [
8542
+ /* @__PURE__ */ jsx8("div", { style: { fontSize: 11, color: "#4e5565", fontWeight: 600, marginTop: 4 }, children: "\u6392\u7248\u589E\u5F3A\u5757 / \u811A\u6CE8\u5C3E\u6CE8 / \u5217\u8868 / \u56FE\u8868\uFF1A" }),
8543
+ /* @__PURE__ */ jsxs8("div", { className: "yudao-doc-quick-grid", children: [
8544
+ /* @__PURE__ */ jsx8(
7320
8545
  "button",
7321
8546
  {
7322
8547
  type: "button",
@@ -7328,7 +8553,7 @@ var DocLeftSidebar = () => {
7328
8553
  children: "+ \u9875\u5E95\u811A\u6CE8"
7329
8554
  }
7330
8555
  ),
7331
- /* @__PURE__ */ jsx7(
8556
+ /* @__PURE__ */ jsx8(
7332
8557
  "button",
7333
8558
  {
7334
8559
  type: "button",
@@ -7340,7 +8565,7 @@ var DocLeftSidebar = () => {
7340
8565
  children: "+ \u6587\u672B\u5C3E\u6CE8"
7341
8566
  }
7342
8567
  ),
7343
- /* @__PURE__ */ jsx7(
8568
+ /* @__PURE__ */ jsx8(
7344
8569
  "button",
7345
8570
  {
7346
8571
  type: "button",
@@ -7356,7 +8581,7 @@ var DocLeftSidebar = () => {
7356
8581
  children: "+ \u591A\u7EA7\u7F16\u53F7\u5217\u8868"
7357
8582
  }
7358
8583
  ),
7359
- /* @__PURE__ */ jsx7(
8584
+ /* @__PURE__ */ jsx8(
7360
8585
  "button",
7361
8586
  {
7362
8587
  type: "button",
@@ -7372,7 +8597,7 @@ var DocLeftSidebar = () => {
7372
8597
  children: "+ \u4EFB\u52A1\u590D\u9009\u6E05\u5355"
7373
8598
  }
7374
8599
  ),
7375
- /* @__PURE__ */ jsx7(
8600
+ /* @__PURE__ */ jsx8(
7376
8601
  "button",
7377
8602
  {
7378
8603
  type: "button",
@@ -7387,7 +8612,7 @@ var DocLeftSidebar = () => {
7387
8612
  children: "+ LaTeX \u516C\u5F0F"
7388
8613
  }
7389
8614
  ),
7390
- /* @__PURE__ */ jsx7(
8615
+ /* @__PURE__ */ jsx8(
7391
8616
  "button",
7392
8617
  {
7393
8618
  type: "button",
@@ -7403,7 +8628,7 @@ var DocLeftSidebar = () => {
7403
8628
  children: "+ \u6807\u6CE8\u5757"
7404
8629
  }
7405
8630
  ),
7406
- /* @__PURE__ */ jsx7(
8631
+ /* @__PURE__ */ jsx8(
7407
8632
  "button",
7408
8633
  {
7409
8634
  type: "button",
@@ -7418,7 +8643,7 @@ var DocLeftSidebar = () => {
7418
8643
  children: "+ \u5F15\u7528\u5757"
7419
8644
  }
7420
8645
  ),
7421
- /* @__PURE__ */ jsx7(
8646
+ /* @__PURE__ */ jsx8(
7422
8647
  "button",
7423
8648
  {
7424
8649
  type: "button",
@@ -7435,7 +8660,7 @@ var DocLeftSidebar = () => {
7435
8660
  children: "+ \u5185\u5D4C\u56FE\u8868"
7436
8661
  }
7437
8662
  ),
7438
- /* @__PURE__ */ jsx7(
8663
+ /* @__PURE__ */ jsx8(
7439
8664
  "button",
7440
8665
  {
7441
8666
  type: "button",
@@ -7450,7 +8675,7 @@ var DocLeftSidebar = () => {
7450
8675
  children: "+ \u77E2\u91CF\u5F62\u72B6"
7451
8676
  }
7452
8677
  ),
7453
- canUseKind("repeatingSection") && /* @__PURE__ */ jsx7(
8678
+ canUseKind("repeatingSection") && /* @__PURE__ */ jsx8(
7454
8679
  "button",
7455
8680
  {
7456
8681
  type: "button",
@@ -7466,7 +8691,7 @@ var DocLeftSidebar = () => {
7466
8691
  children: "+ \u91CD\u590D\u8282\u63A7\u4EF6"
7467
8692
  }
7468
8693
  ),
7469
- /* @__PURE__ */ jsx7(
8694
+ /* @__PURE__ */ jsx8(
7470
8695
  "button",
7471
8696
  {
7472
8697
  type: "button",
@@ -7478,12 +8703,12 @@ var DocLeftSidebar = () => {
7478
8703
  children: "+ \u81EA\u52A8\u76EE\u5F55"
7479
8704
  }
7480
8705
  ),
7481
- /* @__PURE__ */ jsx7(
8706
+ /* @__PURE__ */ jsx8(
7482
8707
  "button",
7483
8708
  {
7484
8709
  type: "button",
7485
8710
  className: "yudao-doc-mini-btn",
7486
- onClick: () => commandService.syncExecuteCommand(InsertDocSmartArtCommand.id, {
8711
+ onClick: () => commandService.syncExecuteCommand(InsertDocSmartArtCommand3.id, {
7487
8712
  unitId: unit.getUnitId(),
7488
8713
  spec: {
7489
8714
  title: "\u5408\u540C\u5BA1\u6279\u6D41\u8F6C\u56FE",
@@ -7498,7 +8723,7 @@ var DocLeftSidebar = () => {
7498
8723
  children: "+ SmartArt \u56FE\u793A"
7499
8724
  }
7500
8725
  ),
7501
- /* @__PURE__ */ jsx7(
8726
+ /* @__PURE__ */ jsx8(
7502
8727
  "button",
7503
8728
  {
7504
8729
  type: "button",
@@ -7511,7 +8736,7 @@ var DocLeftSidebar = () => {
7511
8736
  children: "+ \u5206\u680F\u7EC4"
7512
8737
  }
7513
8738
  ),
7514
- /* @__PURE__ */ jsx7(
8739
+ /* @__PURE__ */ jsx8(
7515
8740
  "button",
7516
8741
  {
7517
8742
  type: "button",
@@ -7522,7 +8747,7 @@ var DocLeftSidebar = () => {
7522
8747
  children: "+ \u5206\u9875\u7B26"
7523
8748
  }
7524
8749
  ),
7525
- /* @__PURE__ */ jsx7(
8750
+ /* @__PURE__ */ jsx8(
7526
8751
  "button",
7527
8752
  {
7528
8753
  type: "button",
@@ -7532,7 +8757,7 @@ var DocLeftSidebar = () => {
7532
8757
  unitId: unit.getUnitId(),
7533
8758
  fieldType: "DATE"
7534
8759
  });
7535
- commandService.syncExecuteCommand(InsertDocCaptionCommand.id, {
8760
+ commandService.syncExecuteCommand(InsertDocCaptionCommand2.id, {
7536
8761
  unitId: unit.getUnitId(),
7537
8762
  category: "\u8868",
7538
8763
  title: "\u5408\u540C\u7ED3\u7B97\u660E\u7EC6\u8868"
@@ -7541,7 +8766,7 @@ var DocLeftSidebar = () => {
7541
8766
  children: "+ \u52A8\u6001\u57DF/\u9898\u6CE8"
7542
8767
  }
7543
8768
  ),
7544
- /* @__PURE__ */ jsx7(
8769
+ /* @__PURE__ */ jsx8(
7545
8770
  "button",
7546
8771
  {
7547
8772
  type: "button",
@@ -7563,19 +8788,19 @@ var DocLeftSidebar = () => {
7563
8788
  )
7564
8789
  ] })
7565
8790
  ] }),
7566
- /* @__PURE__ */ jsx7("div", { style: { fontSize: 11, color: "#4e5565", fontWeight: 600, marginTop: 4 }, children: "\u6587\u6863\u5185\u63A7\u4EF6\u5927\u7EB2\uFF08\u70B9\u51FB\u5B9A\u4F4D\uFF09\uFF1A" }),
7567
- controls.length === 0 ? /* @__PURE__ */ jsx7("div", { style: { fontSize: 12, color: "#7d8698", textAlign: "center", padding: "24px 8px" }, children: "\u6682\u65E0\u7ED3\u6784\u5316\u63A7\u4EF6\uFF0C\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\u6216\u5207\u6362\u81F3\u300C\u6570\u636E\u96C6\u300D\u63D2\u5165\u3002" }) : controls.map((ctrl) => /* @__PURE__ */ jsxs7(
8791
+ /* @__PURE__ */ jsx8("div", { style: { fontSize: 11, color: "#4e5565", fontWeight: 600, marginTop: 4 }, children: "\u6587\u6863\u5185\u63A7\u4EF6\u5927\u7EB2\uFF08\u70B9\u51FB\u5B9A\u4F4D\uFF09\uFF1A" }),
8792
+ controls.length === 0 ? /* @__PURE__ */ jsx8("div", { style: { fontSize: 12, color: "#7d8698", textAlign: "center", padding: "24px 8px" }, children: "\u6682\u65E0\u7ED3\u6784\u5316\u63A7\u4EF6\uFF0C\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\u6216\u5207\u6362\u81F3\u300C\u6570\u636E\u96C6\u300D\u63D2\u5165\u3002" }) : controls.map((ctrl) => /* @__PURE__ */ jsxs8(
7568
8793
  "div",
7569
8794
  {
7570
8795
  className: `yudao-doc-ctrl-card ${activeControlId === ctrl.id ? "is-active" : ""}`,
7571
8796
  onClick: () => handleFocusControl(ctrl),
7572
8797
  children: [
7573
- /* @__PURE__ */ jsxs7("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 4 }, children: [
7574
- /* @__PURE__ */ jsxs7("span", { style: { fontWeight: 600, fontSize: 12, color: "#1b1c1f" }, children: [
8798
+ /* @__PURE__ */ jsxs8("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 4 }, children: [
8799
+ /* @__PURE__ */ jsxs8("span", { style: { fontWeight: 600, fontSize: 12, color: "#1b1c1f" }, children: [
7575
8800
  ctrl.alias,
7576
- ctrl.required && /* @__PURE__ */ jsx7("span", { style: { color: "#d93025", marginLeft: 2 }, children: "*" })
8801
+ ctrl.required && /* @__PURE__ */ jsx8("span", { style: { color: "#d93025", marginLeft: 2 }, children: "*" })
7577
8802
  ] }),
7578
- /* @__PURE__ */ jsx7(
8803
+ /* @__PURE__ */ jsx8(
7579
8804
  "span",
7580
8805
  {
7581
8806
  style: {
@@ -7590,7 +8815,7 @@ var DocLeftSidebar = () => {
7590
8815
  }
7591
8816
  )
7592
8817
  ] }),
7593
- /* @__PURE__ */ jsx7(
8818
+ /* @__PURE__ */ jsx8(
7594
8819
  "div",
7595
8820
  {
7596
8821
  style: {
@@ -7604,21 +8829,21 @@ var DocLeftSidebar = () => {
7604
8829
  children: ctrl.displayText
7605
8830
  }
7606
8831
  ),
7607
- /* @__PURE__ */ jsxs7("div", { style: { display: "flex", gap: 6, marginTop: 4, fontSize: 10, color: "#7d8698", flexWrap: "wrap" }, children: [
7608
- /* @__PURE__ */ jsxs7("span", { children: [
8832
+ /* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: 6, marginTop: 4, fontSize: 10, color: "#7d8698", flexWrap: "wrap" }, children: [
8833
+ /* @__PURE__ */ jsxs8("span", { children: [
7609
8834
  "#",
7610
8835
  ctrl.tag
7611
8836
  ] }),
7612
- ctrl.segmentId && /* @__PURE__ */ jsxs7("span", { style: { color: "#2c53f1", fontWeight: 500 }, children: [
8837
+ ctrl.segmentId && /* @__PURE__ */ jsxs8("span", { style: { color: "#2c53f1", fontWeight: 500 }, children: [
7613
8838
  "[",
7614
8839
  liveSnapshot.headers?.[ctrl.segmentId] ? "\u9875\u7709" : "\u9875\u811A",
7615
8840
  "]"
7616
8841
  ] }),
7617
- ctrl.lock !== "unlocked" && /* @__PURE__ */ jsxs7("span", { children: [
8842
+ ctrl.lock !== "unlocked" && /* @__PURE__ */ jsxs8("span", { children: [
7618
8843
  "\u9501\u5B9A: ",
7619
8844
  ctrl.lock
7620
8845
  ] }),
7621
- ctrl.bindingPath && /* @__PURE__ */ jsxs7(
8846
+ ctrl.bindingPath && /* @__PURE__ */ jsxs8(
7622
8847
  "span",
7623
8848
  {
7624
8849
  style: {
@@ -7631,7 +8856,7 @@ var DocLeftSidebar = () => {
7631
8856
  ]
7632
8857
  }
7633
8858
  ),
7634
- ctrl.computedExpr && /* @__PURE__ */ jsxs7(
8859
+ ctrl.computedExpr && /* @__PURE__ */ jsxs8(
7635
8860
  "span",
7636
8861
  {
7637
8862
  style: {
@@ -7644,7 +8869,7 @@ var DocLeftSidebar = () => {
7644
8869
  ]
7645
8870
  }
7646
8871
  ),
7647
- ctrl.editableRoles?.length ? /* @__PURE__ */ jsxs7("span", { style: { color: "#4e5565" }, children: [
8872
+ ctrl.editableRoles?.length ? /* @__PURE__ */ jsxs8("span", { style: { color: "#4e5565" }, children: [
7648
8873
  "\u89D2\u8272: ",
7649
8874
  ctrl.editableRoles.join("/")
7650
8875
  ] }) : null
@@ -7653,8 +8878,8 @@ var DocLeftSidebar = () => {
7653
8878
  },
7654
8879
  ctrl.id
7655
8880
  ))
7656
- ] }) : /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-left-body", children: [
7657
- features.sampleFill && /* @__PURE__ */ jsx7(
8881
+ ] }) : /* @__PURE__ */ jsxs8("div", { className: "yudao-doc-left-body", children: [
8882
+ features.sampleFill && /* @__PURE__ */ jsx8(
7658
8883
  "button",
7659
8884
  {
7660
8885
  type: "button",
@@ -7663,10 +8888,10 @@ var DocLeftSidebar = () => {
7663
8888
  children: "\u4E00\u952E\u586B\u5145\u793A\u4F8B\u4E1A\u52A1\u6570\u636E"
7664
8889
  }
7665
8890
  ),
7666
- /* @__PURE__ */ jsx7("div", { style: { fontSize: 11, color: "#4e5565", lineHeight: 1.5 }, children: features.fieldDrag ? "\u70B9\u51FB\u6216\u62D6\u62FD\u4E0B\u65B9\u5B57\u6BB5\u81F3\u6B63\u6587\u753B\u5E03\uFF0C\u5373\u53EF\u63D2\u5165\u5DF2\u7ED1\u5B9A\u6570\u636E\u8DEF\u5F84\u7684\u7ED3\u6784\u5316\u63A7\u4EF6\uFF1A" : "\u70B9\u51FB\u4E0B\u65B9\u5B57\u6BB5\uFF0C\u5373\u53EF\u5728\u5F53\u524D Word \u5149\u6807\u4F4D\u7F6E\u63D2\u5165\u5DF2\u7ED1\u5B9A\u6570\u636E\u8DEF\u5F84\u7684\u7ED3\u6784\u5316\u63A7\u4EF6\uFF1A" }),
7667
- datasets.map((group) => /* @__PURE__ */ jsxs7("div", { className: "yudao-doc-section", style: { padding: "8px 10px" }, children: [
7668
- /* @__PURE__ */ jsx7("div", { className: "yudao-doc-section-title", children: group.name }),
7669
- /* @__PURE__ */ jsx7("div", { style: { display: "flex", flexDirection: "column", gap: 5 }, children: group.fields.map((field) => /* @__PURE__ */ jsxs7(
8891
+ /* @__PURE__ */ jsx8("div", { style: { fontSize: 11, color: "#4e5565", lineHeight: 1.5 }, children: features.fieldDrag ? "\u70B9\u51FB\u6216\u62D6\u62FD\u4E0B\u65B9\u5B57\u6BB5\u81F3\u6B63\u6587\u753B\u5E03\uFF0C\u5373\u53EF\u63D2\u5165\u5DF2\u7ED1\u5B9A\u6570\u636E\u8DEF\u5F84\u7684\u7ED3\u6784\u5316\u63A7\u4EF6\uFF1A" : "\u70B9\u51FB\u4E0B\u65B9\u5B57\u6BB5\uFF0C\u5373\u53EF\u5728\u5F53\u524D Word \u5149\u6807\u4F4D\u7F6E\u63D2\u5165\u5DF2\u7ED1\u5B9A\u6570\u636E\u8DEF\u5F84\u7684\u7ED3\u6784\u5316\u63A7\u4EF6\uFF1A" }),
8892
+ datasets.map((group) => /* @__PURE__ */ jsxs8("div", { className: "yudao-doc-section", style: { padding: "8px 10px" }, children: [
8893
+ /* @__PURE__ */ jsx8("div", { className: "yudao-doc-section-title", children: group.name }),
8894
+ /* @__PURE__ */ jsx8("div", { style: { display: "flex", flexDirection: "column", gap: 5 }, children: group.fields.map((field) => /* @__PURE__ */ jsxs8(
7670
8895
  "button",
7671
8896
  {
7672
8897
  type: "button",
@@ -7694,8 +8919,8 @@ var DocLeftSidebar = () => {
7694
8919
  },
7695
8920
  onClick: () => handleInsertBoundField(field),
7696
8921
  children: [
7697
- /* @__PURE__ */ jsx7("span", { children: field.label }),
7698
- /* @__PURE__ */ jsx7(
8922
+ /* @__PURE__ */ jsx8("span", { children: field.label }),
8923
+ /* @__PURE__ */ jsx8(
7699
8924
  "code",
7700
8925
  {
7701
8926
  style: {
@@ -7717,11 +8942,11 @@ var DocLeftSidebar = () => {
7717
8942
 
7718
8943
  // src/views/modal/DocPreviewAndIoModal.tsx
7719
8944
  import {
7720
- ICommandService as ICommandService8,
7721
- IUniverInstanceService as IUniverInstanceService8,
7722
- UniverInstanceType as UniverInstanceType8
8945
+ ICommandService as ICommandService9,
8946
+ IUniverInstanceService as IUniverInstanceService9,
8947
+ UniverInstanceType as UniverInstanceType9
7723
8948
  } from "@univerjs/core";
7724
- import { useDependency as useDependency7, useObservable as useObservable7 } from "@univerjs/ui";
8949
+ import { useDependency as useDependency8, useObservable as useObservable8 } from "@univerjs/ui";
7725
8950
  import {
7726
8951
  autoCropCanvasToPngDataUrl,
7727
8952
  DOC_IO_CAPABILITY_FORMATS,
@@ -7736,8 +8961,8 @@ import {
7736
8961
  ReplaceDocUnitSnapshotCommand as ReplaceDocUnitSnapshotCommand4,
7737
8962
  validateDocForm as validateDocForm2
7738
8963
  } from "@yudaocode/univer-docs";
7739
- import { useEffect as useEffect5, useRef as useRef2, useState as useState7 } from "react";
7740
- import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
8964
+ import { useEffect as useEffect5, useRef as useRef2, useState as useState8 } from "react";
8965
+ import { Fragment as Fragment4, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
7741
8966
  var MODAL_PEN_COLORS = [
7742
8967
  { hex: "#1B1C1F", label: "\u58A8\u9ED1" },
7743
8968
  { hex: "#2C53F1", label: "\u7B7E\u5B57\u84DD" },
@@ -7850,44 +9075,44 @@ function repaintModalSignatureCanvas(canvas, strokes) {
7850
9075
  }
7851
9076
  }
7852
9077
  var DocPreviewAndIoModal = () => {
7853
- const instanceService = useDependency7(IUniverInstanceService8);
7854
- const commandService = useDependency7(ICommandService8);
7855
- const ioService = useDependency7(IDocIoService3);
7856
- const sdtService = useDependency7(IDocSdtService5);
7857
- const featureService = useDependency7(IDocsUIFeatureService);
7858
- const open = useObservable7(featureService.modalOpen$, featureService.isModalOpen());
7859
- const tab = useObservable7(featureService.modalTab$, featureService.getModalTab());
7860
- const features = useObservable7(featureService.features$, featureService.getFeatures());
7861
- const ioModalConfig = useObservable7(
9078
+ const instanceService = useDependency8(IUniverInstanceService9);
9079
+ const commandService = useDependency8(ICommandService9);
9080
+ const ioService = useDependency8(IDocIoService3);
9081
+ const sdtService = useDependency8(IDocSdtService5);
9082
+ const featureService = useDependency8(IDocsUIFeatureService);
9083
+ const open = useObservable8(featureService.modalOpen$, featureService.isModalOpen());
9084
+ const tab = useObservable8(featureService.modalTab$, featureService.getModalTab());
9085
+ const features = useObservable8(featureService.features$, featureService.getFeatures());
9086
+ const ioModalConfig = useObservable8(
7862
9087
  featureService.ioModal$,
7863
9088
  featureService.getIoModalConfig()
7864
9089
  );
7865
- const ioAdapter = useObservable7(ioService.adapter$, ioService.getAdapter());
7866
- const unit = useObservable7(
7867
- () => instanceService.getCurrentTypeOfUnit$(UniverInstanceType8.UNIVER_DOC),
7868
- instanceService.getCurrentUnitOfType(UniverInstanceType8.UNIVER_DOC),
9090
+ const ioAdapter = useObservable8(ioService.adapter$, ioService.getAdapter());
9091
+ const unit = useObservable8(
9092
+ () => instanceService.getCurrentTypeOfUnit$(UniverInstanceType9.UNIVER_DOC),
9093
+ instanceService.getCurrentUnitOfType(UniverInstanceType9.UNIVER_DOC),
7869
9094
  false,
7870
9095
  [instanceService]
7871
9096
  );
7872
- const [datasetText, setDatasetText] = useState7("{}");
7873
- const [previewHtml, setPreviewHtml] = useState7("");
7874
- const [jsonEditorText, setJsonEditorText] = useState7("");
7875
- const [statusTip, setStatusTip] = useState7("");
7876
- const [watermarkText, setWatermarkText] = useState7("");
7877
- const [redHeaderTitle, setRedHeaderTitle] = useState7("");
7878
- const [straddleSealText, setStraddleSealText] = useState7("");
7879
- const [showLineNumbers, setShowLineNumbers] = useState7(false);
7880
- const [printFieldsOnly, setPrintFieldsOnly] = useState7(false);
7881
- const [signatureDataUrl, setSignatureDataUrl] = useState7("");
7882
- const [sigStrokes, setSigStrokes] = useState7([]);
7883
- const [sigPenColor, setSigPenColor] = useState7("#1B1C1F");
7884
- const [isDrawingSig, setIsDrawingSig] = useState7(false);
7885
- const [ioTarget, setIoTarget] = useState7("browser");
7886
- const [exportFormat, setExportFormat] = useState7("docx");
7887
- const [skipDatasetOnExport, setSkipDatasetOnExport] = useState7(false);
7888
- const [selectedImportFile, setSelectedImportFile] = useState7(null);
7889
- const [pendingImport, setPendingImport] = useState7(null);
7890
- const [ioError, setIoError] = useState7(null);
9097
+ const [datasetText, setDatasetText] = useState8("{}");
9098
+ const [previewHtml, setPreviewHtml] = useState8("");
9099
+ const [jsonEditorText, setJsonEditorText] = useState8("");
9100
+ const [statusTip, setStatusTip] = useState8("");
9101
+ const [watermarkText, setWatermarkText] = useState8("");
9102
+ const [redHeaderTitle, setRedHeaderTitle] = useState8("");
9103
+ const [straddleSealText, setStraddleSealText] = useState8("");
9104
+ const [showLineNumbers, setShowLineNumbers] = useState8(false);
9105
+ const [printFieldsOnly, setPrintFieldsOnly] = useState8(false);
9106
+ const [signatureDataUrl, setSignatureDataUrl] = useState8("");
9107
+ const [sigStrokes, setSigStrokes] = useState8([]);
9108
+ const [sigPenColor, setSigPenColor] = useState8("#1B1C1F");
9109
+ const [isDrawingSig, setIsDrawingSig] = useState8(false);
9110
+ const [ioTarget, setIoTarget] = useState8("browser");
9111
+ const [exportFormat, setExportFormat] = useState8("docx");
9112
+ const [skipDatasetOnExport, setSkipDatasetOnExport] = useState8(false);
9113
+ const [selectedImportFile, setSelectedImportFile] = useState8(null);
9114
+ const [pendingImport, setPendingImport] = useState8(null);
9115
+ const [ioError, setIoError] = useState8(null);
7891
9116
  const fileInputRef = useRef2(null);
7892
9117
  const sigCanvasRef = useRef2(null);
7893
9118
  const iframeRef = useRef2(null);
@@ -8161,7 +9386,7 @@ var DocPreviewAndIoModal = () => {
8161
9386
  }
8162
9387
  };
8163
9388
  const stagedStats = pendingImport?.snapshot?.body ? getDocumentStats2(pendingImport.snapshot) : null;
8164
- const renderIoControlCard = (opts) => /* @__PURE__ */ jsxs8(
9389
+ const renderIoControlCard = (opts) => /* @__PURE__ */ jsxs9(
8165
9390
  "div",
8166
9391
  {
8167
9392
  style: {
@@ -8174,20 +9399,20 @@ var DocPreviewAndIoModal = () => {
8174
9399
  gap: 6
8175
9400
  },
8176
9401
  children: [
8177
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: 11.5 }, children: [
8178
- /* @__PURE__ */ jsxs8("span", { style: { fontWeight: 600, color: "#1b1c1f" }, children: [
9402
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: 11.5 }, children: [
9403
+ /* @__PURE__ */ jsxs9("span", { style: { fontWeight: 600, color: "#1b1c1f" }, children: [
8179
9404
  "\u5BFC\u5165/\u5BFC\u51FA\u5904\u7406\u901A\u9053\uFF08\u9ED8\u8BA4: ",
8180
9405
  ioCaps.defaultIoTarget,
8181
9406
  "\uFF09"
8182
9407
  ] }),
8183
- /* @__PURE__ */ jsxs8("span", { style: { fontSize: 10.5, color: "#7d8698" }, children: [
9408
+ /* @__PURE__ */ jsxs9("span", { style: { fontSize: 10.5, color: "#7d8698" }, children: [
8184
9409
  "\u5FEB\u7167 ",
8185
9410
  snapSizeKb,
8186
9411
  " KB"
8187
9412
  ] })
8188
9413
  ] }),
8189
- /* @__PURE__ */ jsxs8("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
8190
- /* @__PURE__ */ jsxs8(
9414
+ /* @__PURE__ */ jsxs9("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
9415
+ /* @__PURE__ */ jsxs9(
8191
9416
  "button",
8192
9417
  {
8193
9418
  type: "button",
@@ -8206,12 +9431,12 @@ var DocPreviewAndIoModal = () => {
8206
9431
  },
8207
9432
  onClick: () => setIoTarget("browser"),
8208
9433
  children: [
8209
- /* @__PURE__ */ jsx8("span", { style: { fontWeight: 600, fontSize: 11.5, color: "#1b1c1f" }, children: "\u6D4F\u89C8\u5668\u5904\u7406" }),
8210
- /* @__PURE__ */ jsx8("span", { style: { fontSize: 9.5, color: "#4e5565", lineHeight: 1.3 }, children: browserSupportedFormats.length > 0 ? browserSupportedFormats.join(" / ") : "\u672A\u542F\u7528\u672C\u5730\u683C\u5F0F" })
9434
+ /* @__PURE__ */ jsx9("span", { style: { fontWeight: 600, fontSize: 11.5, color: "#1b1c1f" }, children: "\u6D4F\u89C8\u5668\u5904\u7406" }),
9435
+ /* @__PURE__ */ jsx9("span", { style: { fontSize: 9.5, color: "#4e5565", lineHeight: 1.3 }, children: browserSupportedFormats.length > 0 ? browserSupportedFormats.join(" / ") : "\u672A\u542F\u7528\u672C\u5730\u683C\u5F0F" })
8211
9436
  ]
8212
9437
  }
8213
9438
  ),
8214
- /* @__PURE__ */ jsxs8(
9439
+ /* @__PURE__ */ jsxs9(
8215
9440
  "button",
8216
9441
  {
8217
9442
  type: "button",
@@ -8230,14 +9455,14 @@ var DocPreviewAndIoModal = () => {
8230
9455
  },
8231
9456
  onClick: () => setIoTarget("server"),
8232
9457
  children: [
8233
- /* @__PURE__ */ jsx8("span", { style: { fontWeight: 600, fontSize: 11.5, color: "#1b1c1f" }, children: "\u670D\u52A1\u7AEF\u5904\u7406" }),
8234
- /* @__PURE__ */ jsx8("span", { style: { fontSize: 9.5, color: "#4e5565", lineHeight: 1.3 }, children: serverSupportedFormats.length > 0 ? serverSupportedFormats.join(" / ") : "\u672A\u63A5\u5165" })
9458
+ /* @__PURE__ */ jsx9("span", { style: { fontWeight: 600, fontSize: 11.5, color: "#1b1c1f" }, children: "\u670D\u52A1\u7AEF\u5904\u7406" }),
9459
+ /* @__PURE__ */ jsx9("span", { style: { fontSize: 9.5, color: "#4e5565", lineHeight: 1.3 }, children: serverSupportedFormats.length > 0 ? serverSupportedFormats.join(" / ") : "\u672A\u63A5\u5165" })
8235
9460
  ]
8236
9461
  }
8237
9462
  )
8238
9463
  ] }),
8239
- !opts?.hideFilePicker && /* @__PURE__ */ jsxs8(Fragment4, { children: [
8240
- /* @__PURE__ */ jsx8(
9464
+ !opts?.hideFilePicker && /* @__PURE__ */ jsxs9(Fragment4, { children: [
9465
+ /* @__PURE__ */ jsx9(
8241
9466
  "input",
8242
9467
  {
8243
9468
  ref: fileInputRef,
@@ -8248,8 +9473,8 @@ var DocPreviewAndIoModal = () => {
8248
9473
  onChange: handleFileInputChange
8249
9474
  }
8250
9475
  ),
8251
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
8252
- /* @__PURE__ */ jsx8(
9476
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
9477
+ /* @__PURE__ */ jsx9(
8253
9478
  "button",
8254
9479
  {
8255
9480
  type: "button",
@@ -8265,7 +9490,7 @@ var DocPreviewAndIoModal = () => {
8265
9490
  children: "\u9009\u62E9\u6587\u4EF6\u9884\u5BFC\u5165"
8266
9491
  }
8267
9492
  ),
8268
- selectedImportFile && !pendingImport && /* @__PURE__ */ jsx8(
9493
+ selectedImportFile && !pendingImport && /* @__PURE__ */ jsx9(
8269
9494
  "span",
8270
9495
  {
8271
9496
  style: {
@@ -8282,7 +9507,7 @@ var DocPreviewAndIoModal = () => {
8282
9507
  )
8283
9508
  ] })
8284
9509
  ] }),
8285
- pendingImport && /* @__PURE__ */ jsxs8(
9510
+ pendingImport && /* @__PURE__ */ jsxs9(
8286
9511
  "div",
8287
9512
  {
8288
9513
  "data-testid": "yudao-io-staged-result",
@@ -8298,9 +9523,9 @@ var DocPreviewAndIoModal = () => {
8298
9523
  color: "#1b1c1f"
8299
9524
  },
8300
9525
  children: [
8301
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 6 }, children: [
8302
- /* @__PURE__ */ jsx8("strong", { style: { wordBreak: "break-all" }, children: pendingImport.fileName }),
8303
- /* @__PURE__ */ jsx8(
9526
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 6 }, children: [
9527
+ /* @__PURE__ */ jsx9("strong", { style: { wordBreak: "break-all" }, children: pendingImport.fileName }),
9528
+ /* @__PURE__ */ jsx9(
8304
9529
  "span",
8305
9530
  {
8306
9531
  style: {
@@ -8316,7 +9541,7 @@ var DocPreviewAndIoModal = () => {
8316
9541
  }
8317
9542
  )
8318
9543
  ] }),
8319
- stagedStats && /* @__PURE__ */ jsxs8("div", { style: { fontSize: 10.5, color: "#4e5565" }, children: [
9544
+ stagedStats && /* @__PURE__ */ jsxs9("div", { style: { fontSize: 10.5, color: "#4e5565" }, children: [
8320
9545
  "\u6BB5\u843D ",
8321
9546
  stagedStats.paragraphCount,
8322
9547
  " \xB7 \u8868\u683C ",
@@ -8325,7 +9550,7 @@ var DocPreviewAndIoModal = () => {
8325
9550
  " ",
8326
9551
  stagedStats.sdtTotalCount
8327
9552
  ] }),
8328
- /* @__PURE__ */ jsx8(
9553
+ /* @__PURE__ */ jsx9(
8329
9554
  "ul",
8330
9555
  {
8331
9556
  "data-testid": "yudao-io-warnings",
@@ -8336,11 +9561,11 @@ var DocPreviewAndIoModal = () => {
8336
9561
  fontSize: 10.5,
8337
9562
  color: "#4e5565"
8338
9563
  },
8339
- children: pendingImport.warnings.length === 0 ? /* @__PURE__ */ jsx8("li", { children: "\u65E0\u683C\u5F0F\u964D\u7EA7\u544A\u8B66" }) : pendingImport.warnings.map((w, idx) => /* @__PURE__ */ jsx8("li", { children: w.message }, `${w.code}-${idx}`))
9564
+ children: pendingImport.warnings.length === 0 ? /* @__PURE__ */ jsx9("li", { children: "\u65E0\u683C\u5F0F\u964D\u7EA7\u544A\u8B66" }) : pendingImport.warnings.map((w, idx) => /* @__PURE__ */ jsx9("li", { children: w.message }, `${w.code}-${idx}`))
8340
9565
  }
8341
9566
  ),
8342
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: 6 }, children: [
8343
- /* @__PURE__ */ jsx8(
9567
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 6 }, children: [
9568
+ /* @__PURE__ */ jsx9(
8344
9569
  "button",
8345
9570
  {
8346
9571
  type: "button",
@@ -8351,7 +9576,7 @@ var DocPreviewAndIoModal = () => {
8351
9576
  children: "\u786E\u8BA4\u5E94\u7528\u5230\u8BBE\u8BA1\u5668"
8352
9577
  }
8353
9578
  ),
8354
- /* @__PURE__ */ jsx8(
9579
+ /* @__PURE__ */ jsx9(
8355
9580
  "button",
8356
9581
  {
8357
9582
  type: "button",
@@ -8365,7 +9590,7 @@ var DocPreviewAndIoModal = () => {
8365
9590
  ]
8366
9591
  }
8367
9592
  ),
8368
- ioError && /* @__PURE__ */ jsxs8(
9593
+ ioError && /* @__PURE__ */ jsxs9(
8369
9594
  "div",
8370
9595
  {
8371
9596
  "data-testid": "yudao-io-error-banner",
@@ -8381,8 +9606,8 @@ var DocPreviewAndIoModal = () => {
8381
9606
  gap: 6
8382
9607
  },
8383
9608
  children: [
8384
- /* @__PURE__ */ jsx8("div", { style: { lineHeight: 1.4 }, children: ioError.message }),
8385
- /* @__PURE__ */ jsx8(
9609
+ /* @__PURE__ */ jsx9("div", { style: { lineHeight: 1.4 }, children: ioError.message }),
9610
+ /* @__PURE__ */ jsx9(
8386
9611
  "button",
8387
9612
  {
8388
9613
  type: "button",
@@ -8395,8 +9620,8 @@ var DocPreviewAndIoModal = () => {
8395
9620
  ]
8396
9621
  }
8397
9622
  ),
8398
- features.datasetBinding && ioTarget === "browser" && /* @__PURE__ */ jsxs8("label", { style: { display: "flex", alignItems: "center", gap: 5, fontSize: 11, color: "#31363f", cursor: "pointer" }, children: [
8399
- /* @__PURE__ */ jsx8(
9623
+ features.datasetBinding && ioTarget === "browser" && /* @__PURE__ */ jsxs9("label", { style: { display: "flex", alignItems: "center", gap: 5, fontSize: 11, color: "#31363f", cursor: "pointer" }, children: [
9624
+ /* @__PURE__ */ jsx9(
8400
9625
  "input",
8401
9626
  {
8402
9627
  type: "checkbox",
@@ -8404,7 +9629,7 @@ var DocPreviewAndIoModal = () => {
8404
9629
  onChange: (e) => setSkipDatasetOnExport(e.target.checked)
8405
9630
  }
8406
9631
  ),
8407
- /* @__PURE__ */ jsx8("span", { children: "\u4EC5\u7F16\u7801\u5F53\u524D\u5FEB\u7167\uFF08\u4E0D\u91CD\u590D\u6267\u884C\u6570\u636E\u96C6\u586B\u6570\uFF09" })
9632
+ /* @__PURE__ */ jsx9("span", { children: "\u4EC5\u7F16\u7801\u5F53\u524D\u5FEB\u7167\uFF08\u4E0D\u91CD\u590D\u6267\u884C\u6570\u636E\u96C6\u586B\u6570\uFF09" })
8408
9633
  ] })
8409
9634
  ]
8410
9635
  }
@@ -8420,15 +9645,15 @@ var DocPreviewAndIoModal = () => {
8420
9645
  const isSplitPaneTab = effectiveTab === "import" || effectiveTab === "export" || effectiveTab === "print" || effectiveTab === "preview";
8421
9646
  const showPrintSettingsSection = !hasCompactTabs || effectiveTab === "print" || effectiveTab === "preview";
8422
9647
  const showExportActionsSection = !hasCompactTabs || effectiveTab === "export" || effectiveTab === "print" || effectiveTab === "preview";
8423
- return /* @__PURE__ */ jsx8("div", { className: "yudao-doc-modal-backdrop", onClick: () => featureService.closeModal(), children: /* @__PURE__ */ jsxs8(
9648
+ return /* @__PURE__ */ jsx9("div", { className: "yudao-doc-modal-backdrop", onClick: () => featureService.closeModal(), children: /* @__PURE__ */ jsxs9(
8424
9649
  "div",
8425
9650
  {
8426
9651
  className: "yudao-doc-modal-card",
8427
9652
  "data-testid": "yudao-io-modal",
8428
9653
  onClick: (e) => e.stopPropagation(),
8429
9654
  children: [
8430
- /* @__PURE__ */ jsxs8("div", { className: "yudao-doc-modal-header", children: [
8431
- /* @__PURE__ */ jsx8("div", { className: "yudao-doc-modal-tabs", children: visibleTabs.map((tabKey) => /* @__PURE__ */ jsx8(
9655
+ /* @__PURE__ */ jsxs9("div", { className: "yudao-doc-modal-header", children: [
9656
+ /* @__PURE__ */ jsx9("div", { className: "yudao-doc-modal-tabs", children: visibleTabs.map((tabKey) => /* @__PURE__ */ jsx9(
8432
9657
  "button",
8433
9658
  {
8434
9659
  type: "button",
@@ -8439,8 +9664,8 @@ var DocPreviewAndIoModal = () => {
8439
9664
  },
8440
9665
  tabKey
8441
9666
  )) }),
8442
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
8443
- showPipelineBadge && /* @__PURE__ */ jsxs8(
9667
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
9668
+ showPipelineBadge && /* @__PURE__ */ jsxs9(
8444
9669
  "span",
8445
9670
  {
8446
9671
  "data-testid": "yudao-io-pipeline-badge",
@@ -8459,7 +9684,7 @@ var DocPreviewAndIoModal = () => {
8459
9684
  ]
8460
9685
  }
8461
9686
  ),
8462
- /* @__PURE__ */ jsx8(
9687
+ /* @__PURE__ */ jsx9(
8463
9688
  "button",
8464
9689
  {
8465
9690
  type: "button",
@@ -8470,8 +9695,8 @@ var DocPreviewAndIoModal = () => {
8470
9695
  )
8471
9696
  ] })
8472
9697
  ] }),
8473
- isSplitPaneTab ? /* @__PURE__ */ jsxs8("div", { style: { flex: 1, minHeight: 0, display: "flex" }, children: [
8474
- /* @__PURE__ */ jsxs8(
9698
+ isSplitPaneTab ? /* @__PURE__ */ jsxs9("div", { style: { flex: 1, minHeight: 0, display: "flex" }, children: [
9699
+ /* @__PURE__ */ jsxs9(
8475
9700
  "div",
8476
9701
  {
8477
9702
  style: {
@@ -8487,9 +9712,9 @@ var DocPreviewAndIoModal = () => {
8487
9712
  children: [
8488
9713
  effectiveTab === "import" && renderIoControlCard(),
8489
9714
  hasCompactTabs && effectiveTab === "export" && renderIoControlCard({ hideFilePicker: true }),
8490
- features.datasetBinding ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
8491
- /* @__PURE__ */ jsx8("div", { style: { fontSize: 12, fontWeight: 600, color: "#1b1c1f" }, children: "\u4E1A\u52A1\u6570\u636E\u96C6 JSON\uFF08\u652F\u6301\u5355\u6761\u5BF9\u8C61\u6216\u6279\u91CF\u6570\u7EC4 [...]\uFF09" }),
8492
- /* @__PURE__ */ jsx8(
9715
+ features.datasetBinding ? /* @__PURE__ */ jsxs9(Fragment4, { children: [
9716
+ /* @__PURE__ */ jsx9("div", { style: { fontSize: 12, fontWeight: 600, color: "#1b1c1f" }, children: "\u4E1A\u52A1\u6570\u636E\u96C6 JSON\uFF08\u652F\u6301\u5355\u6761\u5BF9\u8C61\u6216\u6279\u91CF\u6570\u7EC4 [...]\uFF09" }),
9717
+ /* @__PURE__ */ jsx9(
8493
9718
  "textarea",
8494
9719
  {
8495
9720
  className: "yudao-doc-code-area",
@@ -8497,9 +9722,9 @@ var DocPreviewAndIoModal = () => {
8497
9722
  onChange: (e) => setDatasetText(e.target.value)
8498
9723
  }
8499
9724
  ),
8500
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: [
8501
- /* @__PURE__ */ jsx8("button", { type: "button", className: "yudao-doc-mini-btn", onClick: () => refreshHtmlPreview(), children: "\u5237\u65B0\u53F3\u4FA7\u9884\u89C8" }),
8502
- /* @__PURE__ */ jsx8(
9725
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: [
9726
+ /* @__PURE__ */ jsx9("button", { type: "button", className: "yudao-doc-mini-btn", onClick: () => refreshHtmlPreview(), children: "\u5237\u65B0\u53F3\u4FA7\u9884\u89C8" }),
9727
+ /* @__PURE__ */ jsx9(
8503
9728
  "button",
8504
9729
  {
8505
9730
  type: "button",
@@ -8509,19 +9734,19 @@ var DocPreviewAndIoModal = () => {
8509
9734
  }
8510
9735
  )
8511
9736
  ] })
8512
- ] }) : /* @__PURE__ */ jsxs8("div", { style: { fontSize: 12, color: "#4e5565", lineHeight: 1.6 }, children: [
9737
+ ] }) : /* @__PURE__ */ jsxs9("div", { style: { fontSize: 12, color: "#4e5565", lineHeight: 1.6 }, children: [
8513
9738
  "\u652F\u6301\u6309\u6B21\u9009\u62E9\u6D4F\u89C8\u5668\u672C\u5730\u5F15\u64CE\u6216\u670D\u52A1\u7AEF\u63A5\u53E3\u5BFC\u5165/\u5BFC\u51FA\u6807\u51C6 ",
8514
- /* @__PURE__ */ jsx8("code", { children: ".docx" }),
9739
+ /* @__PURE__ */ jsx9("code", { children: ".docx" }),
8515
9740
  "\u3001",
8516
- /* @__PURE__ */ jsx8("code", { children: ".pdf" }),
9741
+ /* @__PURE__ */ jsx9("code", { children: ".pdf" }),
8517
9742
  "\u3001",
8518
- /* @__PURE__ */ jsx8("code", { children: ".html" }),
9743
+ /* @__PURE__ */ jsx9("code", { children: ".html" }),
8519
9744
  "\u3001",
8520
- /* @__PURE__ */ jsx8("code", { children: ".md" }),
9745
+ /* @__PURE__ */ jsx9("code", { children: ".md" }),
8521
9746
  " \u7B49\u6587\u6863\u683C\u5F0F\u3002"
8522
9747
  ] }),
8523
- showPrintSettingsSection && /* @__PURE__ */ jsxs8("div", { style: { display: "flex", flexDirection: "column", gap: 6, paddingTop: 4, borderTop: "1px solid #e3e5ea" }, children: [
8524
- /* @__PURE__ */ jsx8(
9748
+ showPrintSettingsSection && /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", gap: 6, paddingTop: 4, borderTop: "1px solid #e3e5ea" }, children: [
9749
+ /* @__PURE__ */ jsx9(
8525
9750
  "input",
8526
9751
  {
8527
9752
  type: "text",
@@ -8541,7 +9766,7 @@ var DocPreviewAndIoModal = () => {
8541
9766
  }
8542
9767
  }
8543
9768
  ),
8544
- /* @__PURE__ */ jsx8(
9769
+ /* @__PURE__ */ jsx9(
8545
9770
  "input",
8546
9771
  {
8547
9772
  type: "text",
@@ -8561,7 +9786,7 @@ var DocPreviewAndIoModal = () => {
8561
9786
  }
8562
9787
  }
8563
9788
  ),
8564
- /* @__PURE__ */ jsx8(
9789
+ /* @__PURE__ */ jsx9(
8565
9790
  "input",
8566
9791
  {
8567
9792
  type: "text",
@@ -8581,8 +9806,8 @@ var DocPreviewAndIoModal = () => {
8581
9806
  }
8582
9807
  }
8583
9808
  ),
8584
- /* @__PURE__ */ jsxs8("label", { style: { display: "flex", alignItems: "center", gap: 6, fontSize: 11.5, color: "#31363f", cursor: "pointer" }, children: [
8585
- /* @__PURE__ */ jsx8(
9809
+ /* @__PURE__ */ jsxs9("label", { style: { display: "flex", alignItems: "center", gap: 6, fontSize: 11.5, color: "#31363f", cursor: "pointer" }, children: [
9810
+ /* @__PURE__ */ jsx9(
8586
9811
  "input",
8587
9812
  {
8588
9813
  type: "checkbox",
@@ -8593,10 +9818,10 @@ var DocPreviewAndIoModal = () => {
8593
9818
  }
8594
9819
  }
8595
9820
  ),
8596
- /* @__PURE__ */ jsx8("span", { children: "\u663E\u793A\u6CD5\u52A1\u5DE6\u4FA7\u884C\u53F7 (Line Numbers)" })
9821
+ /* @__PURE__ */ jsx9("span", { children: "\u663E\u793A\u6CD5\u52A1\u5DE6\u4FA7\u884C\u53F7 (Line Numbers)" })
8597
9822
  ] }),
8598
- /* @__PURE__ */ jsxs8("label", { style: { display: "flex", alignItems: "center", gap: 6, fontSize: 11.5, color: "#31363f", cursor: "pointer" }, children: [
8599
- /* @__PURE__ */ jsx8(
9823
+ /* @__PURE__ */ jsxs9("label", { style: { display: "flex", alignItems: "center", gap: 6, fontSize: 11.5, color: "#31363f", cursor: "pointer" }, children: [
9824
+ /* @__PURE__ */ jsx9(
8600
9825
  "input",
8601
9826
  {
8602
9827
  type: "checkbox",
@@ -8607,13 +9832,13 @@ var DocPreviewAndIoModal = () => {
8607
9832
  }
8608
9833
  }
8609
9834
  ),
8610
- /* @__PURE__ */ jsx8("span", { children: "\u4EC5\u5957\u6253\u586B\u7A7A\u503C (\u9690\u85CF\u56FA\u5B9A\u6B63\u6587)" })
9835
+ /* @__PURE__ */ jsx9("span", { children: "\u4EC5\u5957\u6253\u586B\u7A7A\u503C (\u9690\u85CF\u56FA\u5B9A\u6B63\u6587)" })
8611
9836
  ] }),
8612
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
8613
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: 11 }, children: [
8614
- /* @__PURE__ */ jsx8("span", { style: { fontWeight: 600, color: "#31363f" }, children: "\u843D\u6B3E\u624B\u5199\u7B7E\u540D\u677F" }),
8615
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: 4 }, children: [
8616
- /* @__PURE__ */ jsx8(
9837
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
9838
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: 11 }, children: [
9839
+ /* @__PURE__ */ jsx9("span", { style: { fontWeight: 600, color: "#31363f" }, children: "\u843D\u6B3E\u624B\u5199\u7B7E\u540D\u677F" }),
9840
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 4 }, children: [
9841
+ /* @__PURE__ */ jsx9(
8617
9842
  "button",
8618
9843
  {
8619
9844
  type: "button",
@@ -8631,7 +9856,7 @@ var DocPreviewAndIoModal = () => {
8631
9856
  children: "\u64A4\u9500"
8632
9857
  }
8633
9858
  ),
8634
- /* @__PURE__ */ jsx8(
9859
+ /* @__PURE__ */ jsx9(
8635
9860
  "button",
8636
9861
  {
8637
9862
  type: "button",
@@ -8648,7 +9873,7 @@ var DocPreviewAndIoModal = () => {
8648
9873
  )
8649
9874
  ] })
8650
9875
  ] }),
8651
- /* @__PURE__ */ jsx8("div", { style: { display: "flex", gap: 4 }, children: MODAL_PEN_COLORS.map((pen) => /* @__PURE__ */ jsxs8(
9876
+ /* @__PURE__ */ jsx9("div", { style: { display: "flex", gap: 4 }, children: MODAL_PEN_COLORS.map((pen) => /* @__PURE__ */ jsxs9(
8652
9877
  "button",
8653
9878
  {
8654
9879
  type: "button",
@@ -8656,7 +9881,7 @@ var DocPreviewAndIoModal = () => {
8656
9881
  style: { padding: "1px 6px", fontSize: 10.5 },
8657
9882
  onClick: () => setSigPenColor(pen.hex),
8658
9883
  children: [
8659
- /* @__PURE__ */ jsx8(
9884
+ /* @__PURE__ */ jsx9(
8660
9885
  "span",
8661
9886
  {
8662
9887
  style: {
@@ -8674,7 +9899,7 @@ var DocPreviewAndIoModal = () => {
8674
9899
  },
8675
9900
  pen.hex
8676
9901
  )) }),
8677
- /* @__PURE__ */ jsx8(
9902
+ /* @__PURE__ */ jsx9(
8678
9903
  "canvas",
8679
9904
  {
8680
9905
  ref: sigCanvasRef,
@@ -8732,9 +9957,9 @@ var DocPreviewAndIoModal = () => {
8732
9957
  ] }),
8733
9958
  !hasCompactTabs && effectiveTab !== "import" && renderIoControlCard(),
8734
9959
  hasCompactTabs && effectiveTab === "preview" && renderIoControlCard(),
8735
- showExportActionsSection && /* @__PURE__ */ jsxs8("div", { style: { display: "flex", flexDirection: "column", gap: 6, marginTop: 2 }, children: [
8736
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: 6 }, children: [
8737
- /* @__PURE__ */ jsxs8(
9960
+ showExportActionsSection && /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", gap: 6, marginTop: 2 }, children: [
9961
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 6 }, children: [
9962
+ /* @__PURE__ */ jsxs9(
8738
9963
  "select",
8739
9964
  {
8740
9965
  "data-testid": "yudao-io-export-format",
@@ -8750,19 +9975,19 @@ var DocPreviewAndIoModal = () => {
8750
9975
  background: "#ffffff"
8751
9976
  },
8752
9977
  children: [
8753
- /* @__PURE__ */ jsx8("option", { value: "docx", children: ".docx (Word)" }),
8754
- /* @__PURE__ */ jsx8("option", { value: "pdf", children: ".pdf (PDF)" }),
8755
- /* @__PURE__ */ jsx8("option", { value: "html", children: ".html (HTML)" }),
8756
- /* @__PURE__ */ jsx8("option", { value: "md", children: ".md (Markdown)" }),
8757
- /* @__PURE__ */ jsx8("option", { value: "rtf", children: ".rtf (RTF)" }),
8758
- /* @__PURE__ */ jsx8("option", { value: "odt", children: ".odt (ODT)" }),
8759
- /* @__PURE__ */ jsx8("option", { value: "doc", children: ".doc (\u517C\u5BB9)" }),
8760
- /* @__PURE__ */ jsx8("option", { value: "txt", children: ".txt (\u7EAF\u6587\u672C)" }),
8761
- /* @__PURE__ */ jsx8("option", { value: "json", children: ".json (\u5FEB\u7167)" })
9978
+ /* @__PURE__ */ jsx9("option", { value: "docx", children: ".docx (Word)" }),
9979
+ /* @__PURE__ */ jsx9("option", { value: "pdf", children: ".pdf (PDF)" }),
9980
+ /* @__PURE__ */ jsx9("option", { value: "html", children: ".html (HTML)" }),
9981
+ /* @__PURE__ */ jsx9("option", { value: "md", children: ".md (Markdown)" }),
9982
+ /* @__PURE__ */ jsx9("option", { value: "rtf", children: ".rtf (RTF)" }),
9983
+ /* @__PURE__ */ jsx9("option", { value: "odt", children: ".odt (ODT)" }),
9984
+ /* @__PURE__ */ jsx9("option", { value: "doc", children: ".doc (\u517C\u5BB9)" }),
9985
+ /* @__PURE__ */ jsx9("option", { value: "txt", children: ".txt (\u7EAF\u6587\u672C)" }),
9986
+ /* @__PURE__ */ jsx9("option", { value: "json", children: ".json (\u5FEB\u7167)" })
8762
9987
  ]
8763
9988
  }
8764
9989
  ),
8765
- /* @__PURE__ */ jsx8(
9990
+ /* @__PURE__ */ jsx9(
8766
9991
  "button",
8767
9992
  {
8768
9993
  type: "button",
@@ -8774,7 +9999,7 @@ var DocPreviewAndIoModal = () => {
8774
9999
  }
8775
10000
  )
8776
10001
  ] }),
8777
- /* @__PURE__ */ jsx8(
10002
+ /* @__PURE__ */ jsx9(
8778
10003
  "button",
8779
10004
  {
8780
10005
  type: "button",
@@ -8783,7 +10008,7 @@ var DocPreviewAndIoModal = () => {
8783
10008
  children: "\u5BFC\u51FA\u6B63\u5F0F\u9A91\u7F1D\u7AE0 PDF"
8784
10009
  }
8785
10010
  ),
8786
- /* @__PURE__ */ jsx8(
10011
+ /* @__PURE__ */ jsx9(
8787
10012
  "button",
8788
10013
  {
8789
10014
  type: "button",
@@ -8792,8 +10017,8 @@ var DocPreviewAndIoModal = () => {
8792
10017
  children: "\u6279\u91CF\u5957\u6253\u5408\u5E76\u5BFC\u51FA PDF"
8793
10018
  }
8794
10019
  ),
8795
- /* @__PURE__ */ jsxs8("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
8796
- /* @__PURE__ */ jsx8(
10020
+ /* @__PURE__ */ jsxs9("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 6 }, children: [
10021
+ /* @__PURE__ */ jsx9(
8797
10022
  "button",
8798
10023
  {
8799
10024
  type: "button",
@@ -8802,7 +10027,7 @@ var DocPreviewAndIoModal = () => {
8802
10027
  children: "\u5BFC\u51FA (.html)"
8803
10028
  }
8804
10029
  ),
8805
- /* @__PURE__ */ jsx8(
10030
+ /* @__PURE__ */ jsx9(
8806
10031
  "button",
8807
10032
  {
8808
10033
  type: "button",
@@ -8811,7 +10036,7 @@ var DocPreviewAndIoModal = () => {
8811
10036
  children: "\u5BFC\u51FA Markdown (.md)"
8812
10037
  }
8813
10038
  ),
8814
- /* @__PURE__ */ jsx8(
10039
+ /* @__PURE__ */ jsx9(
8815
10040
  "button",
8816
10041
  {
8817
10042
  type: "button",
@@ -8826,7 +10051,7 @@ var DocPreviewAndIoModal = () => {
8826
10051
  }
8827
10052
  )
8828
10053
  ] }),
8829
- ioAdapter.onSave && /* @__PURE__ */ jsx8(
10054
+ ioAdapter.onSave && /* @__PURE__ */ jsx9(
8830
10055
  "button",
8831
10056
  {
8832
10057
  type: "button",
@@ -8836,7 +10061,7 @@ var DocPreviewAndIoModal = () => {
8836
10061
  }
8837
10062
  )
8838
10063
  ] }),
8839
- statusTip && /* @__PURE__ */ jsx8(
10064
+ statusTip && /* @__PURE__ */ jsx9(
8840
10065
  "div",
8841
10066
  {
8842
10067
  "data-testid": "yudao-io-status-tip",
@@ -8854,7 +10079,7 @@ var DocPreviewAndIoModal = () => {
8854
10079
  ]
8855
10080
  }
8856
10081
  ),
8857
- /* @__PURE__ */ jsx8("div", { style: { flex: 1, background: "#eeeff1", padding: 20, overflow: "auto" }, children: /* @__PURE__ */ jsx8(
10082
+ /* @__PURE__ */ jsx9("div", { style: { flex: 1, background: "#eeeff1", padding: 20, overflow: "auto" }, children: /* @__PURE__ */ jsx9(
8858
10083
  "iframe",
8859
10084
  {
8860
10085
  ref: iframeRef,
@@ -8870,9 +10095,9 @@ var DocPreviewAndIoModal = () => {
8870
10095
  }
8871
10096
  }
8872
10097
  ) })
8873
- ] }) : effectiveTab === "form" ? /* @__PURE__ */ jsxs8("div", { style: { flex: 1, minHeight: 0, padding: 18, display: "flex", gap: 16 }, children: [
8874
- /* @__PURE__ */ jsxs8("div", { style: { width: 320, display: "flex", flexDirection: "column", gap: 10 }, children: [
8875
- /* @__PURE__ */ jsx8(
10098
+ ] }) : effectiveTab === "form" ? /* @__PURE__ */ jsxs9("div", { style: { flex: 1, minHeight: 0, padding: 18, display: "flex", gap: 16 }, children: [
10099
+ /* @__PURE__ */ jsxs9("div", { style: { width: 320, display: "flex", flexDirection: "column", gap: 10 }, children: [
10100
+ /* @__PURE__ */ jsx9(
8876
10101
  "div",
8877
10102
  {
8878
10103
  style: {
@@ -8887,7 +10112,7 @@ var DocPreviewAndIoModal = () => {
8887
10112
  children: validation.valid ? "\u6240\u6709\u5FC5\u586B\u7ED3\u6784\u5316\u63A7\u4EF6\u5747\u5DF2\u5408\u89C4\u586B\u5199\u5B8C\u6BD5" : `\u5B58\u5728 ${validation.issues.length} \u4E2A\u7ED3\u6784\u5316\u63A7\u4EF6\u5F85\u586B\u5199\u6216\u683C\u5F0F\u672A\u901A\u8FC7`
8888
10113
  }
8889
10114
  ),
8890
- validation.issues.map((it) => /* @__PURE__ */ jsxs8(
10115
+ validation.issues.map((it) => /* @__PURE__ */ jsxs9(
8891
10116
  "div",
8892
10117
  {
8893
10118
  style: {
@@ -8903,20 +10128,20 @@ var DocPreviewAndIoModal = () => {
8903
10128
  "\u2022 ",
8904
10129
  it.message,
8905
10130
  " (",
8906
- /* @__PURE__ */ jsx8("code", { children: it.tag }),
10131
+ /* @__PURE__ */ jsx9("code", { children: it.tag }),
8907
10132
  ")"
8908
10133
  ]
8909
10134
  },
8910
10135
  it.controlId
8911
10136
  ))
8912
10137
  ] }),
8913
- /* @__PURE__ */ jsxs8("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: 8 }, children: [
8914
- /* @__PURE__ */ jsxs8("div", { style: { fontSize: 12.5, fontWeight: 600, color: "#1b1c1f" }, children: [
10138
+ /* @__PURE__ */ jsxs9("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: 8 }, children: [
10139
+ /* @__PURE__ */ jsxs9("div", { style: { fontSize: 12.5, fontWeight: 600, color: "#1b1c1f" }, children: [
8915
10140
  "\u63D0\u53D6\u7684\u7ED3\u6784\u5316\u8868\u5355\u952E\u503C JSON (",
8916
- /* @__PURE__ */ jsx8("code", { children: "getFormValues()" }),
10141
+ /* @__PURE__ */ jsx9("code", { children: "getFormValues()" }),
8917
10142
  ")\uFF1A"
8918
10143
  ] }),
8919
- /* @__PURE__ */ jsx8(
10144
+ /* @__PURE__ */ jsx9(
8920
10145
  "textarea",
8921
10146
  {
8922
10147
  readOnly: true,
@@ -8925,17 +10150,17 @@ var DocPreviewAndIoModal = () => {
8925
10150
  }
8926
10151
  )
8927
10152
  ] })
8928
- ] }) : /* @__PURE__ */ jsxs8("div", { style: { flex: 1, minHeight: 0, padding: 16, display: "flex", flexDirection: "column", gap: 10 }, children: [
8929
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
8930
- /* @__PURE__ */ jsxs8("span", { style: { fontSize: 12.5, fontWeight: 600, color: "#1b1c1f" }, children: [
10153
+ ] }) : /* @__PURE__ */ jsxs9("div", { style: { flex: 1, minHeight: 0, padding: 16, display: "flex", flexDirection: "column", gap: 10 }, children: [
10154
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
10155
+ /* @__PURE__ */ jsxs9("span", { style: { fontSize: 12.5, fontWeight: 600, color: "#1b1c1f" }, children: [
8931
10156
  "Univer \u6807\u51C6 ",
8932
- /* @__PURE__ */ jsx8("code", { children: "IDocumentData" }),
10157
+ /* @__PURE__ */ jsx9("code", { children: "IDocumentData" }),
8933
10158
  " JSON\uFF08\u542B\u539F\u751F ",
8934
- /* @__PURE__ */ jsx8("code", { children: "CustomRangeType.SDT" }),
10159
+ /* @__PURE__ */ jsx9("code", { children: "CustomRangeType.SDT" }),
8935
10160
  "\uFF09"
8936
10161
  ] }),
8937
- /* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: 8 }, children: [
8938
- /* @__PURE__ */ jsx8(
10162
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 8 }, children: [
10163
+ /* @__PURE__ */ jsx9(
8939
10164
  "button",
8940
10165
  {
8941
10166
  type: "button",
@@ -8947,7 +10172,7 @@ var DocPreviewAndIoModal = () => {
8947
10172
  children: "\u590D\u5236 JSON"
8948
10173
  }
8949
10174
  ),
8950
- /* @__PURE__ */ jsx8(
10175
+ /* @__PURE__ */ jsx9(
8951
10176
  "button",
8952
10177
  {
8953
10178
  type: "button",
@@ -8978,8 +10203,8 @@ var DocPreviewAndIoModal = () => {
8978
10203
  )
8979
10204
  ] })
8980
10205
  ] }),
8981
- statusTip && /* @__PURE__ */ jsx8("div", { style: { fontSize: 12, color: "#2c53f1" }, children: statusTip }),
8982
- /* @__PURE__ */ jsx8(
10206
+ statusTip && /* @__PURE__ */ jsx9("div", { style: { fontSize: 12, color: "#2c53f1" }, children: statusTip }),
10207
+ /* @__PURE__ */ jsx9(
8983
10208
  "textarea",
8984
10209
  {
8985
10210
  className: "yudao-doc-code-area",
@@ -8997,17 +10222,17 @@ var DocPreviewAndIoModal = () => {
8997
10222
  import {
8998
10223
  CustomRangeType,
8999
10224
  DataStreamTreeTokenType as DataStreamTreeTokenType3,
9000
- ICommandService as ICommandService9,
9001
- IUniverInstanceService as IUniverInstanceService9,
10225
+ ICommandService as ICommandService10,
10226
+ IUniverInstanceService as IUniverInstanceService10,
9002
10227
  LocaleService as LocaleService2,
9003
10228
  Quantity as Quantity2,
9004
10229
  Tools as Tools2,
9005
- UniverInstanceType as UniverInstanceType9
10230
+ UniverInstanceType as UniverInstanceType10
9006
10231
  } from "@univerjs/core";
9007
10232
  import { DocSelectionManagerService as DocSelectionManagerService5 } from "@univerjs/docs";
9008
10233
  import { DocEventManagerService } from "@univerjs/docs-ui";
9009
10234
  import { IRenderManagerService } from "@univerjs/engine-render";
9010
- import { useDependency as useDependency8, useObservable as useObservable8 } from "@univerjs/ui";
10235
+ import { useDependency as useDependency9, useObservable as useObservable9 } from "@univerjs/ui";
9011
10236
  import {
9012
10237
  applyCopyPolicyToSelectedText,
9013
10238
  autoCropCanvasToPngDataUrl as autoCropCanvasToPngDataUrl2,
@@ -9020,7 +10245,7 @@ import {
9020
10245
  getMultiOptionHitIndexAtOffset,
9021
10246
  IDocExtensionRegistryService,
9022
10247
  IDocSdtService as IDocSdtService6,
9023
- InsertDocCaptionCommand as InsertDocCaptionCommand2,
10248
+ InsertDocCaptionCommand as InsertDocCaptionCommand3,
9024
10249
  InsertDocSdtCommand as InsertDocSdtCommand5,
9025
10250
  isOffsetReadonlyByArea,
9026
10251
  JumpDocSdtControlCommand,
@@ -9040,10 +10265,10 @@ import {
9040
10265
  UpdateDocImageTransformCommand,
9041
10266
  UpdateDocLatexFormulaCommand,
9042
10267
  UpdateDocSdtValueCommand as UpdateDocSdtValueCommand2,
9043
- UpdateDocSmartArtCommand
10268
+ UpdateDocSmartArtCommand as UpdateDocSmartArtCommand2
9044
10269
  } from "@yudaocode/univer-docs";
9045
- import { useEffect as useEffect6, useRef as useRef3, useState as useState8 } from "react";
9046
- import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
10270
+ import { useEffect as useEffect6, useRef as useRef3, useState as useState9 } from "react";
10271
+ import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
9047
10272
  var SIGNATURE_PEN_COLORS = [
9048
10273
  { hex: "#1B1C1F", label: "\u58A8\u9ED1" },
9049
10274
  { hex: "#2C53F1", label: "\u7B7E\u5B57\u84DD" },
@@ -9071,44 +10296,44 @@ function redrawSignatureCanvas(canvas, strokes) {
9071
10296
  }
9072
10297
  }
9073
10298
  var DocSdtCanvasPopupHost = () => {
9074
- const instanceService = useDependency8(IUniverInstanceService9);
9075
- const renderManagerService = useDependency8(IRenderManagerService);
9076
- const selectionManagerService = useDependency8(DocSelectionManagerService5);
9077
- const commandService = useDependency8(ICommandService9);
9078
- const sdtService = useDependency8(IDocSdtService6);
9079
- const featureService = useDependency8(IDocsUIFeatureService);
9080
- const extensionRegistry = useDependency8(IDocExtensionRegistryService, Quantity2.OPTIONAL);
9081
- const localeService = useDependency8(LocaleService2, Quantity2.OPTIONAL);
9082
- const features = useObservable8(featureService.features$, featureService.getFeatures());
10299
+ const instanceService = useDependency9(IUniverInstanceService10);
10300
+ const renderManagerService = useDependency9(IRenderManagerService);
10301
+ const selectionManagerService = useDependency9(DocSelectionManagerService5);
10302
+ const commandService = useDependency9(ICommandService10);
10303
+ const sdtService = useDependency9(IDocSdtService6);
10304
+ const featureService = useDependency9(IDocsUIFeatureService);
10305
+ const extensionRegistry = useDependency9(IDocExtensionRegistryService, Quantity2.OPTIONAL);
10306
+ const localeService = useDependency9(LocaleService2, Quantity2.OPTIONAL);
10307
+ const features = useObservable9(featureService.features$, featureService.getFeatures());
9083
10308
  const t = (key, fallback) => {
9084
10309
  if (!localeService) return fallback;
9085
10310
  const translated = localeService.t(key);
9086
10311
  return translated && translated !== key ? translated : fallback;
9087
10312
  };
9088
- const unit = useObservable8(
9089
- () => instanceService.getCurrentTypeOfUnit$(UniverInstanceType9.UNIVER_DOC),
9090
- instanceService.getCurrentUnitOfType(UniverInstanceType9.UNIVER_DOC),
10313
+ const unit = useObservable9(
10314
+ () => instanceService.getCurrentTypeOfUnit$(UniverInstanceType10.UNIVER_DOC),
10315
+ instanceService.getCurrentUnitOfType(UniverInstanceType10.UNIVER_DOC),
9091
10316
  false,
9092
10317
  [instanceService]
9093
10318
  );
9094
- const [popover, setPopover] = useState8(null);
9095
- const [hyperlinkBar, setHyperlinkBar] = useState8(null);
9096
- const [editingLinkMode, setEditingLinkMode] = useState8(false);
9097
- const [draftLinkUrl, setDraftLinkUrl] = useState8("");
9098
- const [linkCopied, setLinkCopied] = useState8(false);
9099
- const [blockBar, setBlockBar] = useState8(null);
9100
- const [editingBlockMode, setEditingBlockMode] = useState8(false);
9101
- const [draftBlockInput, setDraftBlockInput] = useState8("");
9102
- const [contextMenu, setContextMenu] = useState8(null);
9103
- const [openSubMenuKey, setOpenSubMenuKey] = useState8(null);
9104
- const [draftText, setDraftText] = useState8("");
9105
- const [draftRangeStart, setDraftRangeStart] = useState8("");
9106
- const [draftRangeEnd, setDraftRangeEnd] = useState8("");
9107
- const [cascaderValues, setCascaderValues] = useState8([]);
9108
- const [sigPenColor, setSigPenColor] = useState8("#1B1C1F");
9109
- const [sigStrokes, setSigStrokes] = useState8([]);
9110
- const [isDrawingSig, setIsDrawingSig] = useState8(false);
9111
- const metaTick = useObservable8(sdtService.metadataChange$, "");
10319
+ const [popover, setPopover] = useState9(null);
10320
+ const [hyperlinkBar, setHyperlinkBar] = useState9(null);
10321
+ const [editingLinkMode, setEditingLinkMode] = useState9(false);
10322
+ const [draftLinkUrl, setDraftLinkUrl] = useState9("");
10323
+ const [linkCopied, setLinkCopied] = useState9(false);
10324
+ const [blockBar, setBlockBar] = useState9(null);
10325
+ const [editingBlockMode, setEditingBlockMode] = useState9(false);
10326
+ const [draftBlockInput, setDraftBlockInput] = useState9("");
10327
+ const [contextMenu, setContextMenu] = useState9(null);
10328
+ const [openSubMenuKey, setOpenSubMenuKey] = useState9(null);
10329
+ const [draftText, setDraftText] = useState9("");
10330
+ const [draftRangeStart, setDraftRangeStart] = useState9("");
10331
+ const [draftRangeEnd, setDraftRangeEnd] = useState9("");
10332
+ const [cascaderValues, setCascaderValues] = useState9([]);
10333
+ const [sigPenColor, setSigPenColor] = useState9("#1B1C1F");
10334
+ const [sigStrokes, setSigStrokes] = useState9([]);
10335
+ const [isDrawingSig, setIsDrawingSig] = useState9(false);
10336
+ const metaTick = useObservable9(sdtService.metadataChange$, "");
9112
10337
  const lastPointerPosRef = useRef3({ x: 380, y: 180 });
9113
10338
  const popoverRef = useRef3(null);
9114
10339
  const overlayRef = useRef3(null);
@@ -9581,7 +10806,7 @@ var DocSdtCanvasPopupHost = () => {
9581
10806
  const handleAddBlockCaption = () => {
9582
10807
  if (!blockBar || isDocViewMode) return;
9583
10808
  const category = blockBar.kind === "latex" || blockBar.kind === "medical" ? "\u516C\u5F0F" : "\u56FE";
9584
- commandService.syncExecuteCommand(InsertDocCaptionCommand2.id, {
10809
+ commandService.syncExecuteCommand(InsertDocCaptionCommand3.id, {
9585
10810
  unitId,
9586
10811
  category,
9587
10812
  title: blockBar.blockId,
@@ -9620,7 +10845,7 @@ var DocSdtCanvasPopupHost = () => {
9620
10845
  } else if (blockBar.kind === "smartArt") {
9621
10846
  const existing = readDocTemplateMetadataFromSnapshot(unit.getSnapshot()).smartArts?.[blockBar.blockId];
9622
10847
  if (existing) {
9623
- commandService.syncExecuteCommand(UpdateDocSmartArtCommand.id, {
10848
+ commandService.syncExecuteCommand(UpdateDocSmartArtCommand2.id, {
9624
10849
  unitId,
9625
10850
  id: blockBar.blockId,
9626
10851
  spec: { ...existing, title: draftBlockInput.trim() }
@@ -9629,8 +10854,8 @@ var DocSdtCanvasPopupHost = () => {
9629
10854
  }
9630
10855
  setEditingBlockMode(false);
9631
10856
  };
9632
- const renderFloatingOverlays = () => /* @__PURE__ */ jsxs9("div", { ref: overlayRef, children: [
9633
- contextMenu && /* @__PURE__ */ jsx9(
10857
+ const renderFloatingOverlays = () => /* @__PURE__ */ jsxs10("div", { ref: overlayRef, children: [
10858
+ contextMenu && /* @__PURE__ */ jsx10(
9634
10859
  "div",
9635
10860
  {
9636
10861
  className: "yudao-doc-context-menu",
@@ -9649,7 +10874,7 @@ var DocSdtCanvasPopupHost = () => {
9649
10874
  onClick: (e) => e.stopPropagation(),
9650
10875
  children: contextMenu.items.map((item) => {
9651
10876
  if (item.isDivider) {
9652
- return /* @__PURE__ */ jsx9(
10877
+ return /* @__PURE__ */ jsx10(
9653
10878
  "div",
9654
10879
  {
9655
10880
  style: { height: 1, background: "#EEEFF1", margin: "4px 0" }
@@ -9659,13 +10884,13 @@ var DocSdtCanvasPopupHost = () => {
9659
10884
  }
9660
10885
  const hasChildren = Boolean(item.childMenus && item.childMenus.length > 0);
9661
10886
  const isSubOpen = openSubMenuKey === item.key;
9662
- return /* @__PURE__ */ jsxs9(
10887
+ return /* @__PURE__ */ jsxs10(
9663
10888
  "div",
9664
10889
  {
9665
10890
  style: { position: "relative" },
9666
10891
  onMouseEnter: () => setOpenSubMenuKey(hasChildren ? item.key : null),
9667
10892
  children: [
9668
- /* @__PURE__ */ jsxs9(
10893
+ /* @__PURE__ */ jsxs10(
9669
10894
  "button",
9670
10895
  {
9671
10896
  type: "button",
@@ -9694,12 +10919,12 @@ var DocSdtCanvasPopupHost = () => {
9694
10919
  setOpenSubMenuKey(null);
9695
10920
  },
9696
10921
  children: [
9697
- /* @__PURE__ */ jsx9("span", { children: item.name || item.key }),
9698
- /* @__PURE__ */ jsx9("span", { style: { fontSize: 10.5, color: "#7D8698" }, children: hasChildren ? ">" : item.shortCut || "" })
10922
+ /* @__PURE__ */ jsx10("span", { children: item.name || item.key }),
10923
+ /* @__PURE__ */ jsx10("span", { style: { fontSize: 10.5, color: "#7D8698" }, children: hasChildren ? ">" : item.shortCut || "" })
9699
10924
  ]
9700
10925
  }
9701
10926
  ),
9702
- hasChildren && isSubOpen && /* @__PURE__ */ jsx9(
10927
+ hasChildren && isSubOpen && /* @__PURE__ */ jsx10(
9703
10928
  "div",
9704
10929
  {
9705
10930
  style: {
@@ -9714,13 +10939,13 @@ var DocSdtCanvasPopupHost = () => {
9714
10939
  padding: "4px 0"
9715
10940
  },
9716
10941
  children: item.childMenus.map(
9717
- (child) => child.isDivider ? /* @__PURE__ */ jsx9(
10942
+ (child) => child.isDivider ? /* @__PURE__ */ jsx10(
9718
10943
  "div",
9719
10944
  {
9720
10945
  style: { height: 1, background: "#EEEFF1", margin: "4px 0" }
9721
10946
  },
9722
10947
  child.key
9723
- ) : /* @__PURE__ */ jsxs9(
10948
+ ) : /* @__PURE__ */ jsxs10(
9724
10949
  "button",
9725
10950
  {
9726
10951
  type: "button",
@@ -9745,8 +10970,8 @@ var DocSdtCanvasPopupHost = () => {
9745
10970
  setOpenSubMenuKey(null);
9746
10971
  },
9747
10972
  children: [
9748
- /* @__PURE__ */ jsx9("span", { children: child.name || child.key }),
9749
- child.shortCut && /* @__PURE__ */ jsx9("span", { style: { fontSize: 10.5, color: "#7D8698" }, children: child.shortCut })
10973
+ /* @__PURE__ */ jsx10("span", { children: child.name || child.key }),
10974
+ child.shortCut && /* @__PURE__ */ jsx10("span", { style: { fontSize: 10.5, color: "#7D8698" }, children: child.shortCut })
9750
10975
  ]
9751
10976
  },
9752
10977
  child.key
@@ -9761,7 +10986,7 @@ var DocSdtCanvasPopupHost = () => {
9761
10986
  })
9762
10987
  }
9763
10988
  ),
9764
- hyperlinkBar && !popover && /* @__PURE__ */ jsx9(
10989
+ hyperlinkBar && !popover && /* @__PURE__ */ jsx10(
9765
10990
  "div",
9766
10991
  {
9767
10992
  className: "yudao-doc-hyperlink-bar",
@@ -9781,8 +11006,8 @@ var DocSdtCanvasPopupHost = () => {
9781
11006
  fontSize: 11.5
9782
11007
  },
9783
11008
  onClick: (e) => e.stopPropagation(),
9784
- children: editingLinkMode ? /* @__PURE__ */ jsxs9(Fragment5, { children: [
9785
- /* @__PURE__ */ jsx9(
11009
+ children: editingLinkMode ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
11010
+ /* @__PURE__ */ jsx10(
9786
11011
  "input",
9787
11012
  {
9788
11013
  type: "text",
@@ -9800,7 +11025,7 @@ var DocSdtCanvasPopupHost = () => {
9800
11025
  }
9801
11026
  }
9802
11027
  ),
9803
- /* @__PURE__ */ jsx9(
11028
+ /* @__PURE__ */ jsx10(
9804
11029
  "button",
9805
11030
  {
9806
11031
  type: "button",
@@ -9818,7 +11043,7 @@ var DocSdtCanvasPopupHost = () => {
9818
11043
  children: t("yudaoDocs.hyperlinkBar.save", "\u4FDD\u5B58")
9819
11044
  }
9820
11045
  ),
9821
- /* @__PURE__ */ jsx9(
11046
+ /* @__PURE__ */ jsx10(
9822
11047
  "button",
9823
11048
  {
9824
11049
  type: "button",
@@ -9827,8 +11052,8 @@ var DocSdtCanvasPopupHost = () => {
9827
11052
  children: t("yudaoDocs.hyperlinkBar.cancel", "\u53D6\u6D88")
9828
11053
  }
9829
11054
  )
9830
- ] }) : /* @__PURE__ */ jsxs9(Fragment5, { children: [
9831
- /* @__PURE__ */ jsx9(
11055
+ ] }) : /* @__PURE__ */ jsxs10(Fragment5, { children: [
11056
+ /* @__PURE__ */ jsx10(
9832
11057
  "span",
9833
11058
  {
9834
11059
  title: hyperlinkBar.entry.url,
@@ -9843,7 +11068,7 @@ var DocSdtCanvasPopupHost = () => {
9843
11068
  children: hyperlinkBar.entry.url
9844
11069
  }
9845
11070
  ),
9846
- /* @__PURE__ */ jsx9(
11071
+ /* @__PURE__ */ jsx10(
9847
11072
  "button",
9848
11073
  {
9849
11074
  type: "button",
@@ -9852,8 +11077,8 @@ var DocSdtCanvasPopupHost = () => {
9852
11077
  children: t("yudaoDocs.hyperlinkBar.open", "\u6253\u5F00")
9853
11078
  }
9854
11079
  ),
9855
- !isDocViewMode && /* @__PURE__ */ jsxs9(Fragment5, { children: [
9856
- /* @__PURE__ */ jsx9(
11080
+ !isDocViewMode && /* @__PURE__ */ jsxs10(Fragment5, { children: [
11081
+ /* @__PURE__ */ jsx10(
9857
11082
  "button",
9858
11083
  {
9859
11084
  type: "button",
@@ -9865,7 +11090,7 @@ var DocSdtCanvasPopupHost = () => {
9865
11090
  children: t("yudaoDocs.hyperlinkBar.edit", "\u7F16\u8F91")
9866
11091
  }
9867
11092
  ),
9868
- /* @__PURE__ */ jsx9(
11093
+ /* @__PURE__ */ jsx10(
9869
11094
  "button",
9870
11095
  {
9871
11096
  type: "button",
@@ -9877,7 +11102,7 @@ var DocSdtCanvasPopupHost = () => {
9877
11102
  children: linkCopied ? t("yudaoDocs.hyperlinkBar.copied", "\u5DF2\u590D\u5236") : t("yudaoDocs.hyperlinkBar.copy", "\u590D\u5236")
9878
11103
  }
9879
11104
  ),
9880
- /* @__PURE__ */ jsx9(
11105
+ /* @__PURE__ */ jsx10(
9881
11106
  "button",
9882
11107
  {
9883
11108
  type: "button",
@@ -9896,7 +11121,7 @@ var DocSdtCanvasPopupHost = () => {
9896
11121
  ] })
9897
11122
  }
9898
11123
  ),
9899
- blockBar && !popover && !isDocViewMode && /* @__PURE__ */ jsx9(
11124
+ blockBar && !popover && !isDocViewMode && /* @__PURE__ */ jsx10(
9900
11125
  "div",
9901
11126
  {
9902
11127
  className: "yudao-doc-block-quick-toolbar",
@@ -9917,8 +11142,8 @@ var DocSdtCanvasPopupHost = () => {
9917
11142
  fontSize: 11
9918
11143
  },
9919
11144
  onClick: (e) => e.stopPropagation(),
9920
- children: editingBlockMode ? /* @__PURE__ */ jsxs9(Fragment5, { children: [
9921
- /* @__PURE__ */ jsx9(
11145
+ children: editingBlockMode ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
11146
+ /* @__PURE__ */ jsx10(
9922
11147
  "input",
9923
11148
  {
9924
11149
  type: "text",
@@ -9935,7 +11160,7 @@ var DocSdtCanvasPopupHost = () => {
9935
11160
  }
9936
11161
  }
9937
11162
  ),
9938
- /* @__PURE__ */ jsx9(
11163
+ /* @__PURE__ */ jsx10(
9939
11164
  "button",
9940
11165
  {
9941
11166
  type: "button",
@@ -9944,7 +11169,7 @@ var DocSdtCanvasPopupHost = () => {
9944
11169
  children: t("yudaoDocs.blockToolbar.save", "\u786E\u5B9A")
9945
11170
  }
9946
11171
  ),
9947
- /* @__PURE__ */ jsx9(
11172
+ /* @__PURE__ */ jsx10(
9948
11173
  "button",
9949
11174
  {
9950
11175
  type: "button",
@@ -9953,8 +11178,8 @@ var DocSdtCanvasPopupHost = () => {
9953
11178
  children: t("yudaoDocs.blockToolbar.cancel", "\u53D6\u6D88")
9954
11179
  }
9955
11180
  )
9956
- ] }) : /* @__PURE__ */ jsxs9(Fragment5, { children: [
9957
- (blockBar.kind === "latex" || blockBar.kind === "chart" || blockBar.kind === "smartArt") && /* @__PURE__ */ jsx9(
11181
+ ] }) : /* @__PURE__ */ jsxs10(Fragment5, { children: [
11182
+ (blockBar.kind === "latex" || blockBar.kind === "chart" || blockBar.kind === "smartArt") && /* @__PURE__ */ jsx10(
9958
11183
  "button",
9959
11184
  {
9960
11185
  type: "button",
@@ -9963,7 +11188,7 @@ var DocSdtCanvasPopupHost = () => {
9963
11188
  children: t("yudaoDocs.blockToolbar.edit", "\u7F16\u8F91")
9964
11189
  }
9965
11190
  ),
9966
- blockBar.kind === "chart" && /* @__PURE__ */ jsx9(
11191
+ blockBar.kind === "chart" && /* @__PURE__ */ jsx10(
9967
11192
  "button",
9968
11193
  {
9969
11194
  type: "button",
@@ -9972,7 +11197,7 @@ var DocSdtCanvasPopupHost = () => {
9972
11197
  children: "\u7F16\u8F91\u56FE\u8868\u6570\u636E"
9973
11198
  }
9974
11199
  ),
9975
- /* @__PURE__ */ jsx9(
11200
+ /* @__PURE__ */ jsx10(
9976
11201
  "button",
9977
11202
  {
9978
11203
  type: "button",
@@ -9981,7 +11206,7 @@ var DocSdtCanvasPopupHost = () => {
9981
11206
  children: t("yudaoDocs.blockToolbar.resize50", "50%")
9982
11207
  }
9983
11208
  ),
9984
- /* @__PURE__ */ jsx9(
11209
+ /* @__PURE__ */ jsx10(
9985
11210
  "button",
9986
11211
  {
9987
11212
  type: "button",
@@ -9990,7 +11215,7 @@ var DocSdtCanvasPopupHost = () => {
9990
11215
  children: t("yudaoDocs.blockToolbar.resize75", "75%")
9991
11216
  }
9992
11217
  ),
9993
- /* @__PURE__ */ jsx9(
11218
+ /* @__PURE__ */ jsx10(
9994
11219
  "button",
9995
11220
  {
9996
11221
  type: "button",
@@ -9999,8 +11224,8 @@ var DocSdtCanvasPopupHost = () => {
9999
11224
  children: t("yudaoDocs.blockToolbar.resize100", "100%")
10000
11225
  }
10001
11226
  ),
10002
- /* @__PURE__ */ jsx9("span", { style: { width: 1, height: 14, background: "#EEEFF1", margin: "0 2px" } }),
10003
- /* @__PURE__ */ jsx9(
11227
+ /* @__PURE__ */ jsx10("span", { style: { width: 1, height: 14, background: "#EEEFF1", margin: "0 2px" } }),
11228
+ /* @__PURE__ */ jsx10(
10004
11229
  "button",
10005
11230
  {
10006
11231
  type: "button",
@@ -10009,7 +11234,7 @@ var DocSdtCanvasPopupHost = () => {
10009
11234
  children: t("yudaoDocs.blockToolbar.wrapInline", "\u5D4C\u5165")
10010
11235
  }
10011
11236
  ),
10012
- /* @__PURE__ */ jsx9(
11237
+ /* @__PURE__ */ jsx10(
10013
11238
  "button",
10014
11239
  {
10015
11240
  type: "button",
@@ -10018,7 +11243,7 @@ var DocSdtCanvasPopupHost = () => {
10018
11243
  children: t("yudaoDocs.blockToolbar.wrapSquare", "\u56DB\u5468")
10019
11244
  }
10020
11245
  ),
10021
- /* @__PURE__ */ jsx9(
11246
+ /* @__PURE__ */ jsx10(
10022
11247
  "button",
10023
11248
  {
10024
11249
  type: "button",
@@ -10027,8 +11252,8 @@ var DocSdtCanvasPopupHost = () => {
10027
11252
  children: t("yudaoDocs.blockToolbar.wrapTopBottom", "\u4E0A\u4E0B")
10028
11253
  }
10029
11254
  ),
10030
- /* @__PURE__ */ jsx9("span", { style: { width: 1, height: 14, background: "#EEEFF1", margin: "0 2px" } }),
10031
- /* @__PURE__ */ jsx9(
11255
+ /* @__PURE__ */ jsx10("span", { style: { width: 1, height: 14, background: "#EEEFF1", margin: "0 2px" } }),
11256
+ /* @__PURE__ */ jsx10(
10032
11257
  "button",
10033
11258
  {
10034
11259
  type: "button",
@@ -10075,9 +11300,9 @@ var DocSdtCanvasPopupHost = () => {
10075
11300
  }
10076
11301
  return draftText;
10077
11302
  };
10078
- return /* @__PURE__ */ jsxs9(Fragment5, { children: [
11303
+ return /* @__PURE__ */ jsxs10(Fragment5, { children: [
10079
11304
  renderFloatingOverlays(),
10080
- /* @__PURE__ */ jsxs9(
11305
+ /* @__PURE__ */ jsxs10(
10081
11306
  "div",
10082
11307
  {
10083
11308
  ref: popoverRef,
@@ -10085,12 +11310,12 @@ var DocSdtCanvasPopupHost = () => {
10085
11310
  style: { left: popover.x, top: popover.y, minWidth: 268 },
10086
11311
  onClick: (e) => e.stopPropagation(),
10087
11312
  children: [
10088
- /* @__PURE__ */ jsxs9("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 }, children: [
10089
- /* @__PURE__ */ jsxs9("div", { style: { fontWeight: 600, fontSize: 12.5, color: "#1b1c1f" }, children: [
11313
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 }, children: [
11314
+ /* @__PURE__ */ jsxs10("div", { style: { fontWeight: 600, fontSize: 12.5, color: "#1b1c1f" }, children: [
10090
11315
  control.alias,
10091
- control.required && /* @__PURE__ */ jsx9("span", { style: { color: "#d93025", marginLeft: 3 }, children: "*" })
11316
+ control.required && /* @__PURE__ */ jsx10("span", { style: { color: "#d93025", marginLeft: 3 }, children: "*" })
10092
11317
  ] }),
10093
- /* @__PURE__ */ jsx9(
11318
+ /* @__PURE__ */ jsx10(
10094
11319
  "span",
10095
11320
  {
10096
11321
  style: {
@@ -10105,7 +11330,7 @@ var DocSdtCanvasPopupHost = () => {
10105
11330
  }
10106
11331
  )
10107
11332
  ] }),
10108
- control.hint && /* @__PURE__ */ jsxs9(
11333
+ control.hint && /* @__PURE__ */ jsxs10(
10109
11334
  "div",
10110
11335
  {
10111
11336
  style: {
@@ -10123,16 +11348,16 @@ var DocSdtCanvasPopupHost = () => {
10123
11348
  ]
10124
11349
  }
10125
11350
  ),
10126
- isRoleBlocked ? /* @__PURE__ */ jsxs9("div", { style: { fontSize: 11.5, color: "#4e5565", lineHeight: 1.5 }, children: [
11351
+ isRoleBlocked ? /* @__PURE__ */ jsxs10("div", { style: { fontSize: 11.5, color: "#4e5565", lineHeight: 1.5 }, children: [
10127
11352
  "\u5F53\u524D\u7B7E\u7F72\u89D2\u8272\u4E3A\u300C",
10128
11353
  currentActiveRole,
10129
11354
  "\u300D\uFF0C\u8BE5\u586B\u5199\u57DF\u4EC5\u5141\u8BB8\u89D2\u8272\u300C",
10130
11355
  (control.editableRoles ?? []).join(" / "),
10131
11356
  "\u300D\u5728\u8868\u5355\u534F\u540C\u7B7E\u7F72\u65F6\u4FEE\u6539\u3002"
10132
- ] }) : isReadOnly ? /* @__PURE__ */ jsx9("div", { style: { fontSize: 11.5, color: "#4e5565", lineHeight: 1.5 }, children: "\u8BE5\u63A7\u4EF6\u5DF2\u88AB\u8BBE\u7F6E\u4E3A\u53EA\u8BFB\u4FDD\u62A4\uFF0C\u53EF\u5728\u53F3\u4FA7\u68C0\u67E5\u5668\u89E3\u9501\u540E\u4FEE\u6539\u3002" }) : control.kind === "dropDownList" || control.kind === "comboBox" ? /* @__PURE__ */ jsx9("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: normalizedItems.map((item) => {
11357
+ ] }) : isReadOnly ? /* @__PURE__ */ jsx10("div", { style: { fontSize: 11.5, color: "#4e5565", lineHeight: 1.5 }, children: "\u8BE5\u63A7\u4EF6\u5DF2\u88AB\u8BBE\u7F6E\u4E3A\u53EA\u8BFB\u4FDD\u62A4\uFF0C\u53EF\u5728\u53F3\u4FA7\u68C0\u67E5\u5668\u89E3\u9501\u540E\u4FEE\u6539\u3002" }) : control.kind === "dropDownList" || control.kind === "comboBox" ? /* @__PURE__ */ jsx10("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: normalizedItems.map((item) => {
10133
11358
  const label = item.displayText || item.value;
10134
11359
  const selected = control.value === item.value || control.displayText === label;
10135
- return /* @__PURE__ */ jsxs9(
11360
+ return /* @__PURE__ */ jsxs10(
10136
11361
  "button",
10137
11362
  {
10138
11363
  type: "button",
@@ -10146,7 +11371,7 @@ var DocSdtCanvasPopupHost = () => {
10146
11371
  },
10147
11372
  item.value
10148
11373
  );
10149
- }) }) : control.kind === "radio" ? /* @__PURE__ */ jsx9(
11374
+ }) }) : control.kind === "radio" ? /* @__PURE__ */ jsx10(
10150
11375
  "div",
10151
11376
  {
10152
11377
  style: {
@@ -10158,7 +11383,7 @@ var DocSdtCanvasPopupHost = () => {
10158
11383
  children: normalizedItems.map((item) => {
10159
11384
  const label = item.displayText || item.value;
10160
11385
  const selected = control.value === item.value || control.displayText === label;
10161
- return /* @__PURE__ */ jsxs9(
11386
+ return /* @__PURE__ */ jsxs10(
10162
11387
  "button",
10163
11388
  {
10164
11389
  type: "button",
@@ -10174,8 +11399,8 @@ var DocSdtCanvasPopupHost = () => {
10174
11399
  );
10175
11400
  })
10176
11401
  }
10177
- ) : control.kind === "multiSelect" || control.kind === "checkbox" && normalizedItems.length > 0 ? /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
10178
- /* @__PURE__ */ jsx9(
11402
+ ) : control.kind === "multiSelect" || control.kind === "checkbox" && normalizedItems.length > 0 ? /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
11403
+ /* @__PURE__ */ jsx10(
10179
11404
  "div",
10180
11405
  {
10181
11406
  style: {
@@ -10191,7 +11416,7 @@ var DocSdtCanvasPopupHost = () => {
10191
11416
  );
10192
11417
  const checked = selectedSet.has(item.value) || selectedSet.has(label);
10193
11418
  const markBadge = control.kind === "checkbox" && control.checkboxMarkType === "cross" ? checked ? "[X]" : "[ ]" : null;
10194
- return /* @__PURE__ */ jsxs9(
11419
+ return /* @__PURE__ */ jsxs10(
10195
11420
  "label",
10196
11421
  {
10197
11422
  style: {
@@ -10203,7 +11428,7 @@ var DocSdtCanvasPopupHost = () => {
10203
11428
  padding: "2px 4px"
10204
11429
  },
10205
11430
  children: [
10206
- /* @__PURE__ */ jsx9(
11431
+ /* @__PURE__ */ jsx10(
10207
11432
  "input",
10208
11433
  {
10209
11434
  type: "checkbox",
@@ -10217,8 +11442,8 @@ var DocSdtCanvasPopupHost = () => {
10217
11442
  }
10218
11443
  }
10219
11444
  ),
10220
- markBadge && /* @__PURE__ */ jsx9("span", { style: { fontSize: 11, color: "#2C53F1", fontFamily: "monospace" }, children: markBadge }),
10221
- /* @__PURE__ */ jsx9("span", { children: label })
11445
+ markBadge && /* @__PURE__ */ jsx10("span", { style: { fontSize: 11, color: "#2C53F1", fontFamily: "monospace" }, children: markBadge }),
11446
+ /* @__PURE__ */ jsx10("span", { children: label })
10222
11447
  ]
10223
11448
  },
10224
11449
  item.value
@@ -10226,9 +11451,9 @@ var DocSdtCanvasPopupHost = () => {
10226
11451
  })
10227
11452
  }
10228
11453
  ),
10229
- /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "flex-end", gap: 6, marginTop: 4 }, children: [
10230
- /* @__PURE__ */ jsx9("button", { type: "button", className: "yudao-doc-mini-btn", onClick: () => applyValue(""), children: "\u6E05\u7A7A" }),
10231
- /* @__PURE__ */ jsx9(
11454
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", justifyContent: "flex-end", gap: 6, marginTop: 4 }, children: [
11455
+ /* @__PURE__ */ jsx10("button", { type: "button", className: "yudao-doc-mini-btn", onClick: () => applyValue(""), children: "\u6E05\u7A7A" }),
11456
+ /* @__PURE__ */ jsx10(
10232
11457
  "button",
10233
11458
  {
10234
11459
  type: "button",
@@ -10238,8 +11463,8 @@ var DocSdtCanvasPopupHost = () => {
10238
11463
  }
10239
11464
  )
10240
11465
  ] })
10241
- ] }) : control.kind === "picture" ? /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
10242
- typeof control.value === "string" && control.value.startsWith("data:image/") && /* @__PURE__ */ jsx9(
11466
+ ] }) : control.kind === "picture" ? /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
11467
+ typeof control.value === "string" && control.value.startsWith("data:image/") && /* @__PURE__ */ jsx10(
10243
11468
  "div",
10244
11469
  {
10245
11470
  style: {
@@ -10249,7 +11474,7 @@ var DocSdtCanvasPopupHost = () => {
10249
11474
  background: "#F9FAFB",
10250
11475
  textAlign: "center"
10251
11476
  },
10252
- children: /* @__PURE__ */ jsx9(
11477
+ children: /* @__PURE__ */ jsx10(
10253
11478
  "img",
10254
11479
  {
10255
11480
  src: control.value,
@@ -10259,7 +11484,7 @@ var DocSdtCanvasPopupHost = () => {
10259
11484
  )
10260
11485
  }
10261
11486
  ),
10262
- /* @__PURE__ */ jsx9(
11487
+ /* @__PURE__ */ jsx10(
10263
11488
  "input",
10264
11489
  {
10265
11490
  ref: picFileInputRef,
@@ -10279,9 +11504,9 @@ var DocSdtCanvasPopupHost = () => {
10279
11504
  }
10280
11505
  }
10281
11506
  ),
10282
- /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "flex-end", gap: 6 }, children: [
10283
- /* @__PURE__ */ jsx9("button", { type: "button", className: "yudao-doc-mini-btn", onClick: () => applyValue(""), children: "\u6E05\u7A7A\u56FE\u7247" }),
10284
- /* @__PURE__ */ jsx9(
11507
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", justifyContent: "flex-end", gap: 6 }, children: [
11508
+ /* @__PURE__ */ jsx10("button", { type: "button", className: "yudao-doc-mini-btn", onClick: () => applyValue(""), children: "\u6E05\u7A7A\u56FE\u7247" }),
11509
+ /* @__PURE__ */ jsx10(
10285
11510
  "button",
10286
11511
  {
10287
11512
  type: "button",
@@ -10291,9 +11516,9 @@ var DocSdtCanvasPopupHost = () => {
10291
11516
  }
10292
11517
  )
10293
11518
  ] })
10294
- ] }) : control.kind === "signature" ? /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
10295
- /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 6 }, children: [
10296
- /* @__PURE__ */ jsx9("div", { style: { display: "flex", gap: 4 }, children: SIGNATURE_PEN_COLORS.map((pen) => /* @__PURE__ */ jsxs9(
11519
+ ] }) : control.kind === "signature" ? /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
11520
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 6 }, children: [
11521
+ /* @__PURE__ */ jsx10("div", { style: { display: "flex", gap: 4 }, children: SIGNATURE_PEN_COLORS.map((pen) => /* @__PURE__ */ jsxs10(
10297
11522
  "button",
10298
11523
  {
10299
11524
  type: "button",
@@ -10301,7 +11526,7 @@ var DocSdtCanvasPopupHost = () => {
10301
11526
  style: { padding: "2px 6px", fontSize: 10.5 },
10302
11527
  onClick: () => setSigPenColor(pen.hex),
10303
11528
  children: [
10304
- /* @__PURE__ */ jsx9(
11529
+ /* @__PURE__ */ jsx10(
10305
11530
  "span",
10306
11531
  {
10307
11532
  style: {
@@ -10319,7 +11544,7 @@ var DocSdtCanvasPopupHost = () => {
10319
11544
  },
10320
11545
  pen.hex
10321
11546
  )) }),
10322
- /* @__PURE__ */ jsx9(
11547
+ /* @__PURE__ */ jsx10(
10323
11548
  "button",
10324
11549
  {
10325
11550
  type: "button",
@@ -10335,7 +11560,7 @@ var DocSdtCanvasPopupHost = () => {
10335
11560
  }
10336
11561
  )
10337
11562
  ] }),
10338
- /* @__PURE__ */ jsx9(
11563
+ /* @__PURE__ */ jsx10(
10339
11564
  "canvas",
10340
11565
  {
10341
11566
  ref: sigPopupCanvasRef,
@@ -10377,8 +11602,8 @@ var DocSdtCanvasPopupHost = () => {
10377
11602
  onPointerLeave: () => setIsDrawingSig(false)
10378
11603
  }
10379
11604
  ),
10380
- /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "flex-end", gap: 6 }, children: [
10381
- /* @__PURE__ */ jsx9(
11605
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", justifyContent: "flex-end", gap: 6 }, children: [
11606
+ /* @__PURE__ */ jsx10(
10382
11607
  "button",
10383
11608
  {
10384
11609
  type: "button",
@@ -10391,7 +11616,7 @@ var DocSdtCanvasPopupHost = () => {
10391
11616
  children: "\u6E05\u7A7A\u7B7E\u540D"
10392
11617
  }
10393
11618
  ),
10394
- /* @__PURE__ */ jsx9(
11619
+ /* @__PURE__ */ jsx10(
10395
11620
  "button",
10396
11621
  {
10397
11622
  type: "button",
@@ -10429,8 +11654,8 @@ var DocSdtCanvasPopupHost = () => {
10429
11654
  cascaderValues.join(sep),
10430
11655
  sep
10431
11656
  );
10432
- return /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
10433
- /* @__PURE__ */ jsx9(
11657
+ return /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
11658
+ /* @__PURE__ */ jsx10(
10434
11659
  "div",
10435
11660
  {
10436
11661
  style: {
@@ -10443,7 +11668,7 @@ var DocSdtCanvasPopupHost = () => {
10443
11668
  background: "#F9FAFB",
10444
11669
  padding: 4
10445
11670
  },
10446
- children: columns.map((colNodes, levelIdx) => /* @__PURE__ */ jsx9(
11671
+ children: columns.map((colNodes, levelIdx) => /* @__PURE__ */ jsx10(
10447
11672
  "div",
10448
11673
  {
10449
11674
  style: {
@@ -10459,7 +11684,7 @@ var DocSdtCanvasPopupHost = () => {
10459
11684
  children: colNodes.map((nd) => {
10460
11685
  const active = cascaderValues[levelIdx] === nd.value;
10461
11686
  const hasChildren = Boolean(nd.children && nd.children.length > 0);
10462
- return /* @__PURE__ */ jsxs9(
11687
+ return /* @__PURE__ */ jsxs10(
10463
11688
  "button",
10464
11689
  {
10465
11690
  type: "button",
@@ -10486,8 +11711,8 @@ var DocSdtCanvasPopupHost = () => {
10486
11711
  fontWeight: active ? 600 : 400
10487
11712
  },
10488
11713
  children: [
10489
- /* @__PURE__ */ jsx9("span", { children: nd.label }),
10490
- hasChildren && /* @__PURE__ */ jsx9("span", { style: { color: "#7D8698", fontSize: 10 }, children: ">" })
11714
+ /* @__PURE__ */ jsx10("span", { children: nd.label }),
11715
+ hasChildren && /* @__PURE__ */ jsx10("span", { style: { color: "#7D8698", fontSize: 10 }, children: ">" })
10491
11716
  ]
10492
11717
  },
10493
11718
  nd.value
@@ -10498,7 +11723,7 @@ var DocSdtCanvasPopupHost = () => {
10498
11723
  ))
10499
11724
  }
10500
11725
  ),
10501
- /* @__PURE__ */ jsxs9(
11726
+ /* @__PURE__ */ jsxs10(
10502
11727
  "div",
10503
11728
  {
10504
11729
  style: {
@@ -10508,9 +11733,9 @@ var DocSdtCanvasPopupHost = () => {
10508
11733
  gap: 6
10509
11734
  },
10510
11735
  children: [
10511
- /* @__PURE__ */ jsx9("span", { style: { fontSize: 11, color: "#4E5565" }, children: resolvedPreview.displayText || "\u672A\u9009\u62E9" }),
10512
- /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 6 }, children: [
10513
- /* @__PURE__ */ jsx9(
11736
+ /* @__PURE__ */ jsx10("span", { style: { fontSize: 11, color: "#4E5565" }, children: resolvedPreview.displayText || "\u672A\u9009\u62E9" }),
11737
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", gap: 6 }, children: [
11738
+ /* @__PURE__ */ jsx10(
10514
11739
  "button",
10515
11740
  {
10516
11741
  type: "button",
@@ -10522,7 +11747,7 @@ var DocSdtCanvasPopupHost = () => {
10522
11747
  children: "\u6E05\u7A7A"
10523
11748
  }
10524
11749
  ),
10525
- /* @__PURE__ */ jsx9(
11750
+ /* @__PURE__ */ jsx10(
10526
11751
  "button",
10527
11752
  {
10528
11753
  type: "button",
@@ -10536,9 +11761,9 @@ var DocSdtCanvasPopupHost = () => {
10536
11761
  }
10537
11762
  )
10538
11763
  ] });
10539
- })() : control.kind === "dateRange" ? /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
10540
- /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
10541
- /* @__PURE__ */ jsx9(
11764
+ })() : control.kind === "dateRange" ? /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
11765
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
11766
+ /* @__PURE__ */ jsx10(
10542
11767
  "input",
10543
11768
  {
10544
11769
  type: "date",
@@ -10557,8 +11782,8 @@ var DocSdtCanvasPopupHost = () => {
10557
11782
  }
10558
11783
  }
10559
11784
  ),
10560
- /* @__PURE__ */ jsx9("span", { style: { fontSize: 11.5, color: "#7d8698" }, children: "\u81F3" }),
10561
- /* @__PURE__ */ jsx9(
11785
+ /* @__PURE__ */ jsx10("span", { style: { fontSize: 11.5, color: "#7d8698" }, children: "\u81F3" }),
11786
+ /* @__PURE__ */ jsx10(
10562
11787
  "input",
10563
11788
  {
10564
11789
  type: "date",
@@ -10578,8 +11803,8 @@ var DocSdtCanvasPopupHost = () => {
10578
11803
  }
10579
11804
  )
10580
11805
  ] }),
10581
- /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "flex-end", gap: 6 }, children: [
10582
- /* @__PURE__ */ jsx9(
11806
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", justifyContent: "flex-end", gap: 6 }, children: [
11807
+ /* @__PURE__ */ jsx10(
10583
11808
  "button",
10584
11809
  {
10585
11810
  type: "button",
@@ -10593,7 +11818,7 @@ var DocSdtCanvasPopupHost = () => {
10593
11818
  children: "\u4E00\u5E74\u671F"
10594
11819
  }
10595
11820
  ),
10596
- /* @__PURE__ */ jsx9(
11821
+ /* @__PURE__ */ jsx10(
10597
11822
  "button",
10598
11823
  {
10599
11824
  type: "button",
@@ -10618,8 +11843,8 @@ var DocSdtCanvasPopupHost = () => {
10618
11843
  const isYearOnly = fmt === "YYYY";
10619
11844
  if (hasTime) {
10620
11845
  const dtVal = draftText.includes(" ") ? draftText.replace(" ", "T").slice(0, 19) : draftText.slice(0, 19);
10621
- return /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
10622
- /* @__PURE__ */ jsx9(
11846
+ return /* @__PURE__ */ jsxs10("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
11847
+ /* @__PURE__ */ jsx10(
10623
11848
  "input",
10624
11849
  {
10625
11850
  type: "datetime-local",
@@ -10637,7 +11862,7 @@ var DocSdtCanvasPopupHost = () => {
10637
11862
  }
10638
11863
  }
10639
11864
  ),
10640
- /* @__PURE__ */ jsx9(
11865
+ /* @__PURE__ */ jsx10(
10641
11866
  "button",
10642
11867
  {
10643
11868
  type: "button",
@@ -10652,7 +11877,7 @@ var DocSdtCanvasPopupHost = () => {
10652
11877
  children: "\u6B64\u523B"
10653
11878
  }
10654
11879
  ),
10655
- /* @__PURE__ */ jsx9(
11880
+ /* @__PURE__ */ jsx10(
10656
11881
  "button",
10657
11882
  {
10658
11883
  type: "button",
@@ -10664,8 +11889,8 @@ var DocSdtCanvasPopupHost = () => {
10664
11889
  ] });
10665
11890
  }
10666
11891
  if (isYearMonth) {
10667
- return /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
10668
- /* @__PURE__ */ jsx9(
11892
+ return /* @__PURE__ */ jsxs10("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
11893
+ /* @__PURE__ */ jsx10(
10669
11894
  "input",
10670
11895
  {
10671
11896
  type: "month",
@@ -10685,7 +11910,7 @@ var DocSdtCanvasPopupHost = () => {
10685
11910
  }
10686
11911
  }
10687
11912
  ),
10688
- /* @__PURE__ */ jsx9(
11913
+ /* @__PURE__ */ jsx10(
10689
11914
  "button",
10690
11915
  {
10691
11916
  type: "button",
@@ -10697,8 +11922,8 @@ var DocSdtCanvasPopupHost = () => {
10697
11922
  ] });
10698
11923
  }
10699
11924
  if (isYearOnly) {
10700
- return /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
10701
- /* @__PURE__ */ jsx9(
11925
+ return /* @__PURE__ */ jsxs10("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
11926
+ /* @__PURE__ */ jsx10(
10702
11927
  "input",
10703
11928
  {
10704
11929
  type: "number",
@@ -10718,7 +11943,7 @@ var DocSdtCanvasPopupHost = () => {
10718
11943
  }
10719
11944
  }
10720
11945
  ),
10721
- /* @__PURE__ */ jsx9(
11946
+ /* @__PURE__ */ jsx10(
10722
11947
  "button",
10723
11948
  {
10724
11949
  type: "button",
@@ -10727,7 +11952,7 @@ var DocSdtCanvasPopupHost = () => {
10727
11952
  children: "\u4ECA\u5E74"
10728
11953
  }
10729
11954
  ),
10730
- /* @__PURE__ */ jsx9(
11955
+ /* @__PURE__ */ jsx10(
10731
11956
  "button",
10732
11957
  {
10733
11958
  type: "button",
@@ -10738,8 +11963,8 @@ var DocSdtCanvasPopupHost = () => {
10738
11963
  )
10739
11964
  ] });
10740
11965
  }
10741
- return /* @__PURE__ */ jsxs9("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
10742
- /* @__PURE__ */ jsx9(
11966
+ return /* @__PURE__ */ jsxs10("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
11967
+ /* @__PURE__ */ jsx10(
10743
11968
  "input",
10744
11969
  {
10745
11970
  type: "date",
@@ -10761,7 +11986,7 @@ var DocSdtCanvasPopupHost = () => {
10761
11986
  }
10762
11987
  }
10763
11988
  ),
10764
- /* @__PURE__ */ jsx9(
11989
+ /* @__PURE__ */ jsx10(
10765
11990
  "button",
10766
11991
  {
10767
11992
  type: "button",
@@ -10771,8 +11996,8 @@ var DocSdtCanvasPopupHost = () => {
10771
11996
  }
10772
11997
  )
10773
11998
  ] });
10774
- })() : /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
10775
- /* @__PURE__ */ jsx9(
11999
+ })() : /* @__PURE__ */ jsxs10("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: [
12000
+ /* @__PURE__ */ jsx10(
10776
12001
  "input",
10777
12002
  {
10778
12003
  type: control.kind === "number" && !control.calculatorEnabled ? "number" : "text",
@@ -10805,7 +12030,7 @@ var DocSdtCanvasPopupHost = () => {
10805
12030
  }
10806
12031
  }
10807
12032
  ),
10808
- control.calculatorEnabled && /* @__PURE__ */ jsxs9(
12033
+ control.calculatorEnabled && /* @__PURE__ */ jsxs10(
10809
12034
  "div",
10810
12035
  {
10811
12036
  style: {
@@ -10819,7 +12044,7 @@ var DocSdtCanvasPopupHost = () => {
10819
12044
  },
10820
12045
  children: [
10821
12046
  ["7", "8", "9", "/", "4", "5", "6", "*", "1", "2", "3", "-", "0", ".", "=", "+"].map(
10822
- (key) => /* @__PURE__ */ jsx9(
12047
+ (key) => /* @__PURE__ */ jsx10(
10823
12048
  "button",
10824
12049
  {
10825
12050
  type: "button",
@@ -10837,7 +12062,7 @@ var DocSdtCanvasPopupHost = () => {
10837
12062
  key
10838
12063
  )
10839
12064
  ),
10840
- /* @__PURE__ */ jsx9(
12065
+ /* @__PURE__ */ jsx10(
10841
12066
  "button",
10842
12067
  {
10843
12068
  type: "button",
@@ -10847,7 +12072,7 @@ var DocSdtCanvasPopupHost = () => {
10847
12072
  children: "\u6E05\u96F6 (C)"
10848
12073
  }
10849
12074
  ),
10850
- /* @__PURE__ */ jsx9(
12075
+ /* @__PURE__ */ jsx10(
10851
12076
  "button",
10852
12077
  {
10853
12078
  type: "button",
@@ -10860,9 +12085,9 @@ var DocSdtCanvasPopupHost = () => {
10860
12085
  ]
10861
12086
  }
10862
12087
  ),
10863
- /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "flex-end", gap: 6 }, children: [
10864
- /* @__PURE__ */ jsx9("button", { type: "button", className: "yudao-doc-mini-btn", onClick: () => applyValue(""), children: "\u6E05\u7A7A\u7F6E\u56DE\u5360\u4F4D" }),
10865
- /* @__PURE__ */ jsx9(
12088
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", justifyContent: "flex-end", gap: 6 }, children: [
12089
+ /* @__PURE__ */ jsx10("button", { type: "button", className: "yudao-doc-mini-btn", onClick: () => applyValue(""), children: "\u6E05\u7A7A\u7F6E\u56DE\u5360\u4F4D" }),
12090
+ /* @__PURE__ */ jsx10(
10866
12091
  "button",
10867
12092
  {
10868
12093
  type: "button",
@@ -11036,12 +12261,12 @@ var yudaoDocsMenuSchema = {
11036
12261
  };
11037
12262
 
11038
12263
  // src/controllers/docs-ui.controller.ts
11039
- var DocsExtGlobalHost = () => React9.createElement(
11040
- React9.Fragment,
12264
+ var DocsExtGlobalHost = () => React10.createElement(
12265
+ React10.Fragment,
11041
12266
  null,
11042
- React9.createElement(DocSdtCanvasPopupHost),
11043
- React9.createElement(DocCanvasEnhancementsHost),
11044
- React9.createElement(DocPreviewAndIoModal)
12267
+ React10.createElement(DocSdtCanvasPopupHost),
12268
+ React10.createElement(DocCanvasEnhancementsHost),
12269
+ React10.createElement(DocPreviewAndIoModal)
11045
12270
  );
11046
12271
  var DocsExtUIController = class extends Disposable2 {
11047
12272
  constructor(_config, _injector, _commandService, _menuManagerService, _uiPartsService, _sidebarService, _componentManager, _iconManager, _localeService, _shortcutService) {
@@ -11139,7 +12364,7 @@ var DocsExtUIController = class extends Disposable2 {
11139
12364
  };
11140
12365
  DocsExtUIController = __decorateClass([
11141
12366
  __decorateParam(1, Inject(Injector)),
11142
- __decorateParam(2, ICommandService10),
12367
+ __decorateParam(2, ICommandService11),
11143
12368
  __decorateParam(3, IMenuManagerService),
11144
12369
  __decorateParam(4, IUIPartsService),
11145
12370
  __decorateParam(5, ISidebarService3),
@@ -11150,7 +12375,7 @@ DocsExtUIController = __decorateClass([
11150
12375
  ], DocsExtUIController);
11151
12376
 
11152
12377
  // src/plugin.ts
11153
- import { DependentOn, Inject as Inject2, Injector as Injector2, Plugin, UniverInstanceType as UniverInstanceType10 } from "@univerjs/core";
12378
+ import { DependentOn, Inject as Inject2, Injector as Injector2, Plugin, UniverInstanceType as UniverInstanceType11 } from "@univerjs/core";
11154
12379
  import { UniverDocsPlugin } from "@univerjs/docs";
11155
12380
  import { UniverDocsUIPlugin } from "@univerjs/docs-ui";
11156
12381
  import { UniverDocsExtPlugin } from "@yudaocode/univer-docs";
@@ -11182,7 +12407,7 @@ var UniverDocsExtUIPlugin = class extends Plugin {
11182
12407
  };
11183
12408
  UniverDocsExtUIPlugin.pluginName = UNIVER_DOCS_EXT_UI_PLUGIN_NAME;
11184
12409
  UniverDocsExtUIPlugin.packageName = "@yudaocode/univer-docs-ui";
11185
- UniverDocsExtUIPlugin.type = UniverInstanceType10.UNIVER_DOC;
12410
+ UniverDocsExtUIPlugin.type = UniverInstanceType11.UNIVER_DOC;
11186
12411
  UniverDocsExtUIPlugin = __decorateClass([
11187
12412
  DependentOn(UniverDocsPlugin, UniverDocsUIPlugin, UniverDocsExtPlugin),
11188
12413
  __decorateParam(1, Inject2(Injector2))
@@ -11199,6 +12424,7 @@ export {
11199
12424
  DocPreviewAndIoModal,
11200
12425
  DocSdtCanvasPopupHost,
11201
12426
  DocSlashMenu,
12427
+ DocSmartArtEditorModal,
11202
12428
  DocsExtUIController,
11203
12429
  DocsUIFeatureService,
11204
12430
  FillDocSampleDatasetOperation,