@a3s-lab/office 0.32.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +62 -8
  2. package/dist/0~3539.js +2 -2
  3. package/dist/0~3557.js +1 -1
  4. package/dist/0~3635.js +1 -1
  5. package/dist/0~5809.js +123 -0
  6. package/dist/0~7048.js +1 -2
  7. package/dist/{0~7614.js → 0~7828.js} +376 -5
  8. package/dist/{0~6090.js → 0~8136.js} +71 -2
  9. package/dist/{0~4595.js → 0~9073.js} +3 -72
  10. package/dist/0~9445.js +1 -1
  11. package/dist/0~document-editor.js +2 -2
  12. package/dist/0~markdown-editor.js +2 -2
  13. package/dist/0~pdf-page-organization-engine.js +187 -0
  14. package/dist/0~pdf-viewer.js +1018 -30
  15. package/dist/0~presentation-editor.js +580 -68
  16. package/dist/0~spreadsheet-editor.js +2 -2
  17. package/dist/0~work-pptx-export.js +50 -14
  18. package/dist/0~work-pptx-import.js +21 -9
  19. package/dist/4121.js +122 -1
  20. package/dist/4560.js +33 -0
  21. package/dist/core.d.ts +1 -0
  22. package/dist/internal/features/work/editors/pdf-editor-extensions.d.ts +11 -0
  23. package/dist/internal/features/work/editors/pdf-page-organization-engine.d.ts +2 -0
  24. package/dist/internal/features/work/editors/pdf-page-organization-plan.d.ts +10 -0
  25. package/dist/internal/features/work/editors/pdf-page-organization-types.d.ts +68 -0
  26. package/dist/internal/features/work/editors/pdf-page-organization-worker-client.d.ts +2 -0
  27. package/dist/internal/features/work/editors/pdf-page-organization-worker-protocol.d.ts +13 -0
  28. package/dist/internal/features/work/editors/pdf-page-organization.d.ts +3 -0
  29. package/dist/internal/features/work/editors/pdf-page-organization.worker.d.ts +1 -0
  30. package/dist/internal/features/work/editors/pdf-page-organizer-dialog.d.ts +17 -0
  31. package/dist/internal/features/work/editors/pdf-thumbnail-rail.d.ts +4 -0
  32. package/dist/internal/features/work/editors/pdf-toolbar.d.ts +2 -1
  33. package/dist/internal/features/work/editors/pdf-viewer.d.ts +3 -1
  34. package/dist/internal/features/work/editors/presentation-animation-panel.d.ts +11 -0
  35. package/dist/internal/features/work/editors/presentation-command-types.d.ts +16 -1
  36. package/dist/internal/features/work/editors/presentation-presenter-view.d.ts +2 -1
  37. package/dist/internal/features/work/editors/presentation-slide-canvas.d.ts +11 -3
  38. package/dist/internal/features/work/editors/use-pdf-page-organization.d.ts +38 -0
  39. package/dist/internal/features/work/editors/use-presentation-animation-commands.d.ts +15 -0
  40. package/dist/internal/features/work/work-pptx-animation.d.ts +13 -0
  41. package/dist/internal/features/work/work-pptx-groups.d.ts +4 -0
  42. package/dist/internal/features/work/work-presentation-animation-constraints.d.ts +4 -0
  43. package/dist/internal/features/work/work-presentation-animation.d.ts +20 -0
  44. package/dist/internal/features/work/work-presentation-clipboard.d.ts +10 -3
  45. package/dist/internal/features/work/work-types.d.ts +17 -0
  46. package/dist/office-kernel.wasm +0 -0
  47. package/dist/pdf-page-organization.worker.js +19667 -0
  48. package/dist/pdf-page-organization.worker.js.LICENSE.txt +14 -0
  49. package/dist/react.d.ts +1 -0
  50. package/dist/styles.css +438 -0
  51. package/dist/vue.d.ts +3 -1
  52. package/dist/vue.js +2 -0
  53. package/dist/web-component.d.ts +3 -1
  54. package/dist/web-component.js +9 -0
  55. package/docs/latest/en/browser-editor-architecture.md +29 -6
  56. package/package.json +8 -1
  57. package/dist/0~work-presentation-transition.js +0 -38
@@ -1,9 +1,9 @@
1
1
  import jszip from "jszip";
2
- import { descendants, directChildren, directChild, xmlNamespacePrefix, attribute, firstDescendant, parseXml } from "./4121.js";
2
+ import { directChildren, xmlNamespacePrefix, parseXml, firstDescendant, descendants, directChild, attribute, createOfficeId as createWorkId } from "./4121.js";
3
3
  import { normalizePresentationChartDataLabelPosition, normalizePresentationChartDataLabels, normalizePresentationChartSeriesStyle } from "./0~work-presentation-charts.js";
4
4
  import { parseXlsxChartSeriesStyle, xlsxChartSeriesMarkerXml, parseXlsxTrendline, isSupportedXlsxChartLegend, isSupportedXlsxChartPlotLayout, isSupportedXlsxChartSeriesFormatting, parseXlsxChartPlotLayout, parseXlsxChartLegend, xlsxChartSeriesShapePropertiesXml, parseXlsxErrorBars } from "./4166.js";
5
5
  import { workSpreadsheetChartSupportsErrorBars, workSpreadsheetChartSupportsGrouping, normalizeWorkSpreadsheetChartSmoothLines, workSpreadsheetChartSupportsSeriesAnalysis, normalizeWorkSpreadsheetChartSeriesStyle, normalizeWorkSpreadsheetErrorBars, normalizeWorkSpreadsheetChartOverlap, workSpreadsheetChartUsesNumericXAxis, workSpreadsheetChartSupportsBarSpacing, normalizeWorkSpreadsheetChartLegendOverlay, normalizeWorkSpreadsheetChartGapWidth, normalizeWorkSpreadsheetChartGrouping, workSpreadsheetChartSupportsTrendlines, workSpreadsheetChartSupportsSmoothLines, normalizeWorkSpreadsheetTrendline } from "./8715.js";
6
- import { createWorkSlideTransition } from "./0~work-presentation-transition.js";
6
+ import { normalizeWorkSlideAnimation, createWorkSlideTransition } from "./0~5809.js";
7
7
  const PRESENTATION_NAMESPACE = 'http://schemas.openxmlformats.org/presentationml/2006/main';
8
8
  const DRAWING_NAMESPACE = 'http://schemas.openxmlformats.org/drawingml/2006/main';
9
9
  const OFFICE_RELATIONSHIPS_NAMESPACE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships';
@@ -904,6 +904,377 @@ function finiteNumber(value) {
904
904
  function work_pptx_chart_series_analysis_chartPartNumber(path) {
905
905
  return Number(/chart(\d+)\.xml$/.exec(path)?.[1] ?? Number.MAX_SAFE_INTEGER);
906
906
  }
907
+ const PRESENTATIONML_NAMESPACE = 'http://schemas.openxmlformats.org/presentationml/2006/main';
908
+ function readPptxAnimations(document, elementIdByPptxShapeId) {
909
+ const timing = directChild(document.documentElement, 'timing');
910
+ if (!timing) return {
911
+ animations: [],
912
+ diagnostics: []
913
+ };
914
+ const diagnostics = [];
915
+ if (elementNamespace(timing) !== PRESENTATIONML_NAMESPACE) return {
916
+ animations: [],
917
+ diagnostics: [
918
+ {
919
+ code: 'pptx.animation.namespace',
920
+ message: 'A namespace-spoofed animation timing tree was ignored instead of being treated as trusted PresentationML.'
921
+ }
922
+ ]
923
+ };
924
+ const animations = [];
925
+ const animatedElements = new Set();
926
+ const effectNodes = pptxDescendants(timing, 'cTn').filter((node)=>[
927
+ 'clickEffect',
928
+ 'withEffect',
929
+ 'afterEffect'
930
+ ].includes(attribute(node, 'nodeType') ?? ''));
931
+ if (effectNodes.length > 256) diagnostics.push({
932
+ code: 'pptx.animation.limit',
933
+ message: "Only the first 256 object animation timing records on a slide are inspected and imported."
934
+ });
935
+ for (const node of effectNodes.slice(0, 256)){
936
+ if ('entr' !== attribute(node, 'presetClass')) {
937
+ diagnostics.push({
938
+ code: 'pptx.animation.class',
939
+ message: 'An emphasis, exit, motion-path, or malformed animation remains in the source PPTX only.'
940
+ });
941
+ continue;
942
+ }
943
+ const targets = Array.from(new Set(pptxDescendants(node, 'spTgt').map((target)=>attribute(target, 'spid')?.trim()).filter((target)=>Boolean(target))));
944
+ if (1 !== targets.length) {
945
+ diagnostics.push({
946
+ code: 'pptx.animation.target',
947
+ message: 'An entrance animation with a missing or ambiguous object target was ignored.'
948
+ });
949
+ continue;
950
+ }
951
+ const elementId = elementIdByPptxShapeId.get(targets[0]);
952
+ if (!elementId) {
953
+ diagnostics.push({
954
+ code: 'pptx.animation.target',
955
+ message: 'An entrance animation points to an unavailable slide object and was ignored.'
956
+ });
957
+ continue;
958
+ }
959
+ if (animatedElements.has(elementId)) {
960
+ diagnostics.push({
961
+ code: 'pptx.animation.duplicate-target',
962
+ message: 'Only the first supported entrance animation for an object is editable; additional effects remain in the source PPTX only.'
963
+ });
964
+ continue;
965
+ }
966
+ const effectResult = readPptxAnimationEffect(node);
967
+ if (!effectResult.effect) {
968
+ diagnostics.push({
969
+ code: 'pptx.animation.effect',
970
+ message: 'An entrance animation uses an unsupported or malformed effect and remains in the source PPTX only.'
971
+ });
972
+ continue;
973
+ }
974
+ const timingResult = readPptxAnimationTiming(node);
975
+ if (timingResult.normalized) diagnostics.push({
976
+ code: 'pptx.animation.timing',
977
+ message: 'An invalid or out-of-range animation duration or delay was normalized to safe editable bounds.'
978
+ });
979
+ const animation = normalizeWorkSlideAnimation({
980
+ id: createWorkId('slide-animation'),
981
+ elementId,
982
+ effect: effectResult.effect,
983
+ trigger: pptxAnimationTrigger(attribute(node, 'nodeType')),
984
+ durationMs: timingResult.durationMs,
985
+ delayMs: timingResult.delayMs,
986
+ direction: effectResult.direction
987
+ });
988
+ animations.push(animation);
989
+ animatedElements.add(elementId);
990
+ }
991
+ if (!effectNodes.length) diagnostics.push({
992
+ code: 'pptx.animation.structure',
993
+ message: 'The slide timing tree does not contain a supported object entrance sequence and remains in the source PPTX only.'
994
+ });
995
+ return {
996
+ animations,
997
+ diagnostics
998
+ };
999
+ }
1000
+ async function patchPptxAnimations(buffer, slides, registry) {
1001
+ if (!slides.some((slide)=>slide.animations?.length)) return buffer;
1002
+ const archive = await jszip.loadAsync(buffer);
1003
+ for (const [index, slide] of slides.entries()){
1004
+ if (!slide.animations?.length) continue;
1005
+ const path = `ppt/slides/slide${index + 1}.xml`;
1006
+ const entry = archive.file(path);
1007
+ if (!entry) throw new Error(`PPTX animation export is missing generated slide ${index + 1}.`);
1008
+ const document = parseXml(await entry.async('text'), path);
1009
+ normalizePptxShapeIds(document);
1010
+ const targetByMarker = pptxTargetIdsByMarker(document);
1011
+ const scope = `slide:${slide.id}`;
1012
+ const targets = slide.animations.map((animation)=>{
1013
+ const marker = registry.markerForElement(scope, animation.elementId);
1014
+ const ids = marker ? targetByMarker.get(marker) : void 0;
1015
+ if (!marker || ids?.length !== 1) throw new Error(`PPTX animation export expected one generated object for animation ${animation.id}, but found ${ids?.length ?? 0}.`);
1016
+ return {
1017
+ animation,
1018
+ spid: ids[0]
1019
+ };
1020
+ });
1021
+ writePptxAnimations(document, targets);
1022
+ archive.file(path, new XMLSerializer().serializeToString(document));
1023
+ }
1024
+ return archive.generateAsync({
1025
+ type: 'arraybuffer',
1026
+ compression: 'DEFLATE'
1027
+ });
1028
+ }
1029
+ function writePptxAnimations(document, targets) {
1030
+ const root = document.documentElement;
1031
+ directChild(root, 'timing')?.remove();
1032
+ if (!targets.length) return;
1033
+ const source = parseXml(pptxAnimationTimingXml(targets), 'PPTX animations');
1034
+ const timing = clonePptxAnimationElement(document, source.documentElement);
1035
+ const extensionList = directChild(root, 'extLst') ?? null;
1036
+ root.insertBefore(timing, extensionList);
1037
+ }
1038
+ function clonePptxAnimationElement(document, source) {
1039
+ const element = document.createElementNS(PRESENTATIONML_NAMESPACE, `p:${source.localName}`);
1040
+ for (const item of Array.from(source.attributes))if (!('xmlns' === item.name || item.name.startsWith('xmlns:'))) element.setAttribute(item.name, item.value);
1041
+ for (const child of Array.from(source.childNodes))element.append(child instanceof Element ? clonePptxAnimationElement(document, child) : document.createTextNode(child.textContent ?? ''));
1042
+ return element;
1043
+ }
1044
+ function readPptxAnimationEffect(node) {
1045
+ const presetId = attribute(node, 'presetID');
1046
+ const animationEffects = pptxDescendants(node, 'animEffect');
1047
+ const filters = animationEffects.map((effect)=>attribute(effect, 'filter')?.trim()).filter((filter)=>Boolean(filter));
1048
+ const attributes = new Set(pptxDescendants(node, 'attrName').map((name)=>name.textContent?.trim()));
1049
+ if (filters.some((filter)=>'fade' === filter)) return {
1050
+ effect: 'fade'
1051
+ };
1052
+ for (const filter of filters){
1053
+ const direction = directionFromPptxSlideFilter(filter);
1054
+ if (direction) return {
1055
+ effect: 'fly-in',
1056
+ direction
1057
+ };
1058
+ }
1059
+ if ('23' === presetId || pptxDescendants(node, 'animScale').length > 0 || attributes.has('ppt_w') && attributes.has('ppt_h')) return {
1060
+ effect: 'zoom'
1061
+ };
1062
+ if ('2' === presetId && (attributes.has('ppt_x') || attributes.has('ppt_y'))) return {
1063
+ effect: 'fly-in',
1064
+ direction: directionFromPptxMotion(node)
1065
+ };
1066
+ if ('1' === presetId && pptxDescendants(node, 'set').length > 0 && 0 === animationEffects.length && 0 === pptxDescendants(node, 'anim').length && 0 === pptxDescendants(node, 'animScale').length) return {
1067
+ effect: 'appear'
1068
+ };
1069
+ return {};
1070
+ }
1071
+ function readPptxAnimationTiming(node) {
1072
+ const directDuration = nonnegativeInteger(attribute(node, 'dur'));
1073
+ const behaviorDurations = pptxDirectChildren(pptxDirectChild(node, 'childTnLst') ?? node).flatMap((behavior)=>pptxDescendants(behavior, 'cTn')).map((time)=>nonnegativeInteger(attribute(time, 'dur'))).filter((duration)=>void 0 !== duration);
1074
+ const behaviorDuration = Math.max(0, ...behaviorDurations);
1075
+ const rawDuration = directDuration ?? (behaviorDuration || 500);
1076
+ const delayValue = attribute(pptxChildPath(node, 'stCondLst', 'cond') ?? node, 'delay');
1077
+ const rawDelay = nonnegativeInteger(delayValue) ?? 0;
1078
+ const normalized = normalizeWorkSlideAnimation({
1079
+ id: 'timing',
1080
+ elementId: 'timing',
1081
+ effect: 'fade',
1082
+ trigger: 'on-click',
1083
+ durationMs: rawDuration,
1084
+ delayMs: rawDelay
1085
+ });
1086
+ return {
1087
+ durationMs: normalized.durationMs,
1088
+ delayMs: normalized.delayMs,
1089
+ normalized: normalized.durationMs !== rawDuration || normalized.delayMs !== rawDelay || null !== attribute(node, 'dur') && void 0 === directDuration || null !== delayValue && void 0 === nonnegativeInteger(delayValue)
1090
+ };
1091
+ }
1092
+ function pptxAnimationTrigger(value) {
1093
+ if ('withEffect' === value) return 'with-previous';
1094
+ if ('afterEffect' === value) return 'after-previous';
1095
+ return 'on-click';
1096
+ }
1097
+ function directionFromPptxSlideFilter(filter) {
1098
+ if ('slide(fromLeft)' === filter) return 'left';
1099
+ if ('slide(fromRight)' === filter) return 'right';
1100
+ if ('slide(fromTop)' === filter) return 'up';
1101
+ if ('slide(fromBottom)' === filter) return 'down';
1102
+ }
1103
+ function directionFromPptxMotion(node) {
1104
+ const values = pptxDescendants(node, 'strVal').map((value)=>attribute(value, 'val') ?? '').join(' ');
1105
+ if (values.includes('-#ppt_w/2')) return 'right';
1106
+ if (values.includes('1+#ppt_h/2')) return 'down';
1107
+ if (values.includes('-#ppt_h/2')) return 'up';
1108
+ return 'left';
1109
+ }
1110
+ function pptxAnimationTimingXml(targets) {
1111
+ let timeNodeId = 1;
1112
+ const nextId = ()=>timeNodeId++;
1113
+ const rootId = nextId();
1114
+ const mainSequenceId = nextId();
1115
+ const targetByAnimationId = new Map(targets.map((target)=>[
1116
+ target.animation.id,
1117
+ target
1118
+ ]));
1119
+ const groups = pptxAnimationGroups(targets.map((target)=>target.animation));
1120
+ const groupXml = groups.map((group)=>{
1121
+ const outerId = nextId();
1122
+ const wrappers = group.wrappers.map((animations)=>{
1123
+ const wrapperId = nextId();
1124
+ const effects = animations.map((animation)=>{
1125
+ const target = targetByAnimationId.get(animation.id);
1126
+ if (!target) return '';
1127
+ return pptxAnimationEffectXml(target, nextId);
1128
+ }).join('');
1129
+ return `<p:par><p:cTn id="${wrapperId}" fill="hold"><p:stCondLst><p:cond delay="0"/></p:stCondLst><p:childTnLst>${effects}</p:childTnLst></p:cTn></p:par>`;
1130
+ }).join('');
1131
+ const delay = group.automatic ? '0' : 'indefinite';
1132
+ return `<p:par><p:cTn id="${outerId}" fill="hold"><p:stCondLst><p:cond delay="${delay}"/></p:stCondLst><p:childTnLst>${wrappers}</p:childTnLst></p:cTn></p:par>`;
1133
+ }).join('');
1134
+ const builds = targets.map(({ spid })=>`<p:bldP spid="${spid}" grpId="0" animBg="1"/>`).join('');
1135
+ return `<p:timing xmlns:p="${PRESENTATIONML_NAMESPACE}"><p:tnLst><p:par><p:cTn id="${rootId}" dur="indefinite" restart="never" nodeType="tmRoot"><p:childTnLst><p:seq concurrent="1" nextAc="seek"><p:cTn id="${mainSequenceId}" dur="indefinite" nodeType="mainSeq"><p:childTnLst>${groupXml}</p:childTnLst></p:cTn><p:prevCondLst><p:cond evt="onPrev" delay="0"><p:tgtEl><p:sldTgt/></p:tgtEl></p:cond></p:prevCondLst><p:nextCondLst><p:cond evt="onNext" delay="0"><p:tgtEl><p:sldTgt/></p:tgtEl></p:cond></p:nextCondLst></p:seq></p:childTnLst></p:cTn></p:par></p:tnLst><p:bldLst>${builds}</p:bldLst></p:timing>`;
1136
+ }
1137
+ function pptxAnimationGroups(animations) {
1138
+ const groups = [];
1139
+ let current;
1140
+ for (const animation of animations)if (current && 'on-click' !== animation.trigger) if ('with-previous' === animation.trigger) current.wrappers.at(-1)?.push(animation);
1141
+ else current.wrappers.push([
1142
+ animation
1143
+ ]);
1144
+ else {
1145
+ current = {
1146
+ automatic: 'on-click' !== animation.trigger,
1147
+ wrappers: [
1148
+ [
1149
+ animation
1150
+ ]
1151
+ ]
1152
+ };
1153
+ groups.push(current);
1154
+ }
1155
+ return groups;
1156
+ }
1157
+ function pptxAnimationEffectXml(target, nextId) {
1158
+ const animation = normalizeWorkSlideAnimation(target.animation);
1159
+ const preset = pptxAnimationPreset(animation);
1160
+ const leafId = nextId();
1161
+ const visibilityId = nextId();
1162
+ const visibility = `<p:set><p:cBhvr><p:cTn id="${visibilityId}" dur="1" fill="hold"><p:stCondLst><p:cond delay="0"/></p:stCondLst></p:cTn><p:tgtEl><p:spTgt spid="${target.spid}"/></p:tgtEl><p:attrNameLst><p:attrName>style.visibility</p:attrName></p:attrNameLst></p:cBhvr><p:to><p:strVal val="visible"/></p:to></p:set>`;
1163
+ const behavior = pptxAnimationBehaviorXml(animation, target.spid, nextId);
1164
+ return `<p:par><p:cTn id="${leafId}" presetID="${preset.id}" presetClass="entr" presetSubtype="${preset.subtype}" fill="hold" nodeType="${pptxAnimationNodeType(animation.trigger)}" dur="${animation.durationMs}"><p:stCondLst><p:cond delay="${animation.delayMs}"/></p:stCondLst><p:childTnLst>${visibility}${behavior}</p:childTnLst></p:cTn></p:par>`;
1165
+ }
1166
+ function pptxAnimationBehaviorXml(animation, spid, nextId) {
1167
+ if ('appear' === animation.effect) return '';
1168
+ if ('zoom' === animation.effect) return [
1169
+ 'ppt_w',
1170
+ 'ppt_h'
1171
+ ].map((attributeName)=>{
1172
+ const id = nextId();
1173
+ return `<p:anim calcMode="lin" valueType="num"><p:cBhvr><p:cTn id="${id}" dur="${animation.durationMs}" fill="hold"/><p:tgtEl><p:spTgt spid="${spid}"/></p:tgtEl><p:attrNameLst><p:attrName>${attributeName}</p:attrName></p:attrNameLst></p:cBhvr><p:tavLst><p:tav tm="0"><p:val><p:fltVal val="0"/></p:val></p:tav><p:tav tm="100000"><p:val><p:strVal val="#${attributeName}"/></p:val></p:tav></p:tavLst></p:anim>`;
1174
+ }).join('');
1175
+ const id = nextId();
1176
+ const filter = 'fade' === animation.effect ? 'fade' : pptxSlideFilter(animation.direction ?? 'left');
1177
+ return `<p:animEffect transition="in" filter="${filter}"><p:cBhvr><p:cTn id="${id}" dur="${animation.durationMs}"/><p:tgtEl><p:spTgt spid="${spid}"/></p:tgtEl></p:cBhvr></p:animEffect>`;
1178
+ }
1179
+ function pptxAnimationPreset(animation) {
1180
+ if ('appear' === animation.effect) return {
1181
+ id: 1,
1182
+ subtype: 0
1183
+ };
1184
+ if ('fade' === animation.effect) return {
1185
+ id: 10,
1186
+ subtype: 0
1187
+ };
1188
+ if ('zoom' === animation.effect) return {
1189
+ id: 23,
1190
+ subtype: 16
1191
+ };
1192
+ const subtypes = {
1193
+ up: 1,
1194
+ right: 2,
1195
+ down: 4,
1196
+ left: 8
1197
+ };
1198
+ return {
1199
+ id: 2,
1200
+ subtype: subtypes[animation.direction ?? 'left']
1201
+ };
1202
+ }
1203
+ function pptxAnimationNodeType(trigger) {
1204
+ if ('with-previous' === trigger) return 'withEffect';
1205
+ if ('after-previous' === trigger) return 'afterEffect';
1206
+ return 'clickEffect';
1207
+ }
1208
+ function pptxSlideFilter(direction) {
1209
+ if ('right' === direction) return 'slide(fromRight)';
1210
+ if ('up' === direction) return 'slide(fromTop)';
1211
+ if ('down' === direction) return 'slide(fromBottom)';
1212
+ return 'slide(fromLeft)';
1213
+ }
1214
+ function normalizePptxShapeIds(document) {
1215
+ for (const shapeTree of descendants(document, 'spTree')){
1216
+ const used = new Set();
1217
+ let candidate = 1;
1218
+ for (const properties of descendants(shapeTree, 'cNvPr')){
1219
+ const current = Number(attribute(properties, 'id'));
1220
+ if (Number.isInteger(current) && current > 0 && !used.has(current)) {
1221
+ used.add(current);
1222
+ continue;
1223
+ }
1224
+ while(used.has(candidate))candidate += 1;
1225
+ properties.setAttribute('id', String(candidate));
1226
+ used.add(candidate);
1227
+ candidate += 1;
1228
+ }
1229
+ }
1230
+ }
1231
+ function pptxTargetIdsByMarker(document) {
1232
+ const targets = new Map();
1233
+ for (const properties of descendants(document, 'cNvPr')){
1234
+ const marker = attribute(properties, 'name');
1235
+ const id = Number(attribute(properties, 'id'));
1236
+ if (!marker || !Number.isInteger(id) || id <= 0) continue;
1237
+ const ids = targets.get(marker) ?? [];
1238
+ ids.push(id);
1239
+ targets.set(marker, ids);
1240
+ }
1241
+ return targets;
1242
+ }
1243
+ function nonnegativeInteger(value) {
1244
+ if (null === value || '' === value.trim()) return;
1245
+ const number = Number(value);
1246
+ return Number.isSafeInteger(number) && number >= 0 ? number : void 0;
1247
+ }
1248
+ function elementNamespace(element) {
1249
+ if (element.namespaceURI) return element.namespaceURI;
1250
+ const separator = element.tagName.indexOf(':');
1251
+ const prefix = element.prefix ?? (separator >= 0 ? element.tagName.slice(0, separator) : void 0);
1252
+ const declaration = prefix ? `xmlns:${prefix}` : 'xmlns';
1253
+ let current = element;
1254
+ while(current){
1255
+ const namespace = current.getAttribute(declaration);
1256
+ if (namespace) return namespace;
1257
+ current = current.parentElement;
1258
+ }
1259
+ return null;
1260
+ }
1261
+ function pptxDescendants(parent, localName) {
1262
+ return descendants(parent, localName).filter((element)=>elementNamespace(element) === PRESENTATIONML_NAMESPACE);
1263
+ }
1264
+ function pptxDirectChildren(parent, localName) {
1265
+ return directChildren(parent, localName).filter((element)=>elementNamespace(element) === PRESENTATIONML_NAMESPACE);
1266
+ }
1267
+ function pptxDirectChild(parent, localName) {
1268
+ return pptxDirectChildren(parent, localName)[0];
1269
+ }
1270
+ function pptxChildPath(parent, ...localNames) {
1271
+ let current = parent;
1272
+ for (const localName of localNames){
1273
+ if (!current) return;
1274
+ current = pptxDirectChild(current, localName);
1275
+ }
1276
+ return current instanceof Element ? current : void 0;
1277
+ }
907
1278
  const EFFECT_TYPES = new Set([
908
1279
  'fade',
909
1280
  'push',
@@ -956,7 +1327,7 @@ function readPptxTransition(document) {
956
1327
  speed: readSpeed(element, diagnostics),
957
1328
  advanceOnClick: readBoolean(attribute(element, 'advClick'), true)
958
1329
  };
959
- const advanceAfterMs = nonnegativeInteger(attribute(element, 'advTm'));
1330
+ const advanceAfterMs = work_pptx_transition_nonnegativeInteger(attribute(element, 'advTm'));
960
1331
  if (void 0 !== advanceAfterMs) transition.advanceAfterMs = advanceAfterMs;
961
1332
  else if (null !== attribute(element, 'advTm')) diagnostics.push({
962
1333
  code: 'pptx.transition.timing',
@@ -1030,9 +1401,9 @@ function readBoolean(value, fallback) {
1030
1401
  if (null === value) return fallback;
1031
1402
  return '1' === value || 'true' === value.toLowerCase();
1032
1403
  }
1033
- function nonnegativeInteger(value) {
1404
+ function work_pptx_transition_nonnegativeInteger(value) {
1034
1405
  if (null === value) return;
1035
1406
  const number = Number(value);
1036
1407
  return Number.isSafeInteger(number) && number >= 0 ? number : void 0;
1037
1408
  }
1038
- export { loadPptxCommentAuthors, patchPptxChartDataLabels, patchPptxChartLayoutAndSeriesStyles, patchPptxChartSeriesAnalysis, patchPptxComments, patchPptxTransitions, readPptxChartDataLabels, readPptxChartLayoutAndSeriesStyles, readPptxChartSeriesAnalysis, readPptxSlideComments, readPptxTransition };
1409
+ export { loadPptxCommentAuthors, patchPptxAnimations, patchPptxChartDataLabels, patchPptxChartLayoutAndSeriesStyles, patchPptxChartSeriesAnalysis, patchPptxComments, patchPptxTransitions, readPptxAnimations, readPptxChartDataLabels, readPptxChartLayoutAndSeriesStyles, readPptxChartSeriesAnalysis, readPptxSlideComments, readPptxTransition };
@@ -1,7 +1,7 @@
1
1
  import { forwardRef, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { Bot, LocateFixed, UsersRound, X } from "lucide-react";
3
4
  import { createPortal } from "react-dom";
4
- import { Bot, LocateFixed, UsersRound } from "lucide-react";
5
5
  import { useOfficeCollaborationPresence, useOfficeCollaborationParticipantNavigation } from "./432.js";
6
6
  const focusableSelector = 'button:not(:disabled), input:not(:disabled):not([type="hidden"]), textarea:not(:disabled), select:not(:disabled), a[href], [contenteditable="true"], [tabindex]:not([tabindex="-1"])';
7
7
  const activeFocusScopes = [];
@@ -292,6 +292,75 @@ const icon_button_IconButton = /*#__PURE__*/ forwardRef(function({ label, toolti
292
292
  children: children
293
293
  });
294
294
  });
295
+ function Dialog({ title, description, children, footer, onClose, closeDisabled = false, className, focusKey, restoreFocusTarget }) {
296
+ const titleId = useId();
297
+ const descriptionId = useId();
298
+ const portalRootRef = useRef(null);
299
+ if (!portalRootRef.current && "u" > typeof document) portalRootRef.current = officeOverlayPortalRoot(document, restoreFocusTarget?.());
300
+ const focusScope = useDialogFocusScope({
301
+ onEscape: onClose,
302
+ escapeDisabled: closeDisabled,
303
+ restoreFocusTarget
304
+ });
305
+ useEffect(()=>{
306
+ if (void 0 !== focusKey) focusScope.focusInitial();
307
+ }, [
308
+ focusKey,
309
+ focusScope.focusInitial
310
+ ]);
311
+ const dialog = /*#__PURE__*/ jsx("dialog", {
312
+ open: true,
313
+ className: "ds-dialog-backdrop",
314
+ role: "presentation",
315
+ onCancel: (event)=>{
316
+ event.preventDefault();
317
+ if (!closeDisabled) onClose();
318
+ },
319
+ children: /*#__PURE__*/ jsxs("section", {
320
+ ref: focusScope.scopeRef,
321
+ className: `ds-dialog${className ? ` ${className}` : ''}`,
322
+ role: "dialog",
323
+ "aria-modal": "true",
324
+ "aria-labelledby": titleId,
325
+ "aria-describedby": description ? descriptionId : void 0,
326
+ onKeyDown: focusScope.handleKeyDown,
327
+ children: [
328
+ /*#__PURE__*/ jsxs("header", {
329
+ children: [
330
+ /*#__PURE__*/ jsxs("div", {
331
+ children: [
332
+ /*#__PURE__*/ jsx("h2", {
333
+ id: titleId,
334
+ children: title
335
+ }),
336
+ description && /*#__PURE__*/ jsx("p", {
337
+ id: descriptionId,
338
+ children: description
339
+ })
340
+ ]
341
+ }),
342
+ /*#__PURE__*/ jsx(icon_button_IconButton, {
343
+ label: "关闭",
344
+ disabled: closeDisabled,
345
+ onClick: onClose,
346
+ children: /*#__PURE__*/ jsx(X, {
347
+ size: 16
348
+ })
349
+ })
350
+ ]
351
+ }),
352
+ /*#__PURE__*/ jsx("div", {
353
+ className: "ds-dialog-body",
354
+ children: children
355
+ }),
356
+ footer && /*#__PURE__*/ jsx("footer", {
357
+ children: footer
358
+ })
359
+ ]
360
+ })
361
+ });
362
+ return "u" > typeof document && portalRootRef.current ? /*#__PURE__*/ createPortal(dialog, portalRootRef.current) : dialog;
363
+ }
295
364
  const office_text_field_OfficeTextField = /*#__PURE__*/ forwardRef(function({ className = '', type = 'text', ...props }, ref) {
296
365
  return /*#__PURE__*/ jsx("input", {
297
366
  ref: ref,
@@ -1340,4 +1409,4 @@ function useOfficeEditorWheelZoom({ enabled = true, scopeRef, onZoomIn, onZoomOu
1340
1409
  scopeRef
1341
1410
  ]);
1342
1411
  }
1343
- export { CommittedOfficeTextArea, CommittedOfficeTextField, MarkdownSourcePresenceLayer, OfficePresenceAvatar, OfficeTiptapPresenceLayer, Popover, WorkOfficeCollaborationParticipants, button_Button, icon_button_IconButton, matchesAriaKeyShortcuts, matchesOfficeEditorKeyboardShortcut, moveOfficeGridMenuFocus, moveOfficeMenuFocus, officeOverlayPortalRoot, officePresenceColor, officePresenceColorStyle, office_text_field_OfficeFileInput, office_text_field_OfficeTextArea, office_text_field_OfficeTextField, stepOfficeZoom, useDialogFocusScope, useOfficeEditorWheelZoom, useOfficePublishPresenceLocation, useOfficeRemoteParticipants };
1412
+ export { CommittedOfficeTextArea, CommittedOfficeTextField, Dialog, MarkdownSourcePresenceLayer, OfficePresenceAvatar, OfficeTiptapPresenceLayer, Popover, WorkOfficeCollaborationParticipants, button_Button, icon_button_IconButton, matchesAriaKeyShortcuts, matchesOfficeEditorKeyboardShortcut, moveOfficeGridMenuFocus, moveOfficeMenuFocus, officeOverlayPortalRoot, officePresenceColor, officePresenceColorStyle, office_text_field_OfficeFileInput, office_text_field_OfficeTextArea, office_text_field_OfficeTextField, stepOfficeZoom, useDialogFocusScope, useOfficeEditorWheelZoom, useOfficePublishPresenceLocation, useOfficeRemoteParticipants };
@@ -1,8 +1,8 @@
1
1
  import { Fragment as jsx_runtime_Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Fragment, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
3
3
  import { createPortal } from "react-dom";
4
- import { ArrowUpRight, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Eye, Minus, Plus, X } from "lucide-react";
5
- import { WorkOfficeCollaborationParticipants, moveOfficeMenuFocus, useDialogFocusScope, icon_button_IconButton, Popover, matchesAriaKeyShortcuts, officeOverlayPortalRoot } from "./0~6090.js";
4
+ import { ArrowUpRight, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Eye, Minus, Plus } from "lucide-react";
5
+ import { WorkOfficeCollaborationParticipants, moveOfficeMenuFocus, Popover, matchesAriaKeyShortcuts, officeOverlayPortalRoot } from "./0~8136.js";
6
6
  const CONTEXT_MENU_MARGIN = 8;
7
7
  const CONTEXT_MENU_TAB_STOP_SELECTOR = 'a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), input:not(:disabled):not([type="hidden"]):not([tabindex="-1"]), select:not(:disabled):not([tabindex="-1"]), textarea:not(:disabled):not([tabindex="-1"]), [contenteditable="true"]:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])';
8
8
  function isWorkspaceContextMenuKeyboardEvent({ key, shiftKey }) {
@@ -274,75 +274,6 @@ function contextMenuAvailableBounds(ownerDocument, view, portalRoot) {
274
274
  function clampCoordinate(value, minimum, maximum) {
275
275
  return Math.max(minimum, Math.min(value, Math.max(minimum, maximum)));
276
276
  }
277
- function Dialog({ title, description, children, footer, onClose, closeDisabled = false, className, focusKey, restoreFocusTarget }) {
278
- const titleId = useId();
279
- const descriptionId = useId();
280
- const portalRootRef = useRef(null);
281
- if (!portalRootRef.current && "u" > typeof document) portalRootRef.current = officeOverlayPortalRoot(document, restoreFocusTarget?.());
282
- const focusScope = useDialogFocusScope({
283
- onEscape: onClose,
284
- escapeDisabled: closeDisabled,
285
- restoreFocusTarget
286
- });
287
- useEffect(()=>{
288
- if (void 0 !== focusKey) focusScope.focusInitial();
289
- }, [
290
- focusKey,
291
- focusScope.focusInitial
292
- ]);
293
- const dialog = /*#__PURE__*/ jsx("dialog", {
294
- open: true,
295
- className: "ds-dialog-backdrop",
296
- role: "presentation",
297
- onCancel: (event)=>{
298
- event.preventDefault();
299
- if (!closeDisabled) onClose();
300
- },
301
- children: /*#__PURE__*/ jsxs("section", {
302
- ref: focusScope.scopeRef,
303
- className: `ds-dialog${className ? ` ${className}` : ''}`,
304
- role: "dialog",
305
- "aria-modal": "true",
306
- "aria-labelledby": titleId,
307
- "aria-describedby": description ? descriptionId : void 0,
308
- onKeyDown: focusScope.handleKeyDown,
309
- children: [
310
- /*#__PURE__*/ jsxs("header", {
311
- children: [
312
- /*#__PURE__*/ jsxs("div", {
313
- children: [
314
- /*#__PURE__*/ jsx("h2", {
315
- id: titleId,
316
- children: title
317
- }),
318
- description && /*#__PURE__*/ jsx("p", {
319
- id: descriptionId,
320
- children: description
321
- })
322
- ]
323
- }),
324
- /*#__PURE__*/ jsx(icon_button_IconButton, {
325
- label: "关闭",
326
- disabled: closeDisabled,
327
- onClick: onClose,
328
- children: /*#__PURE__*/ jsx(X, {
329
- size: 16
330
- })
331
- })
332
- ]
333
- }),
334
- /*#__PURE__*/ jsx("div", {
335
- className: "ds-dialog-body",
336
- children: children
337
- }),
338
- footer && /*#__PURE__*/ jsx("footer", {
339
- children: footer
340
- })
341
- ]
342
- })
343
- });
344
- return "u" > typeof document && portalRootRef.current ? /*#__PURE__*/ createPortal(dialog, portalRootRef.current) : dialog;
345
- }
346
277
  function OfficeSelect({ ariaLabel, value, options, onValueChange, disabled = false, placeholder = '请选择', className = '', ariaKeyShortcuts, initialFocus = false }) {
347
278
  const reactId = useId().replaceAll(':', '');
348
279
  const [open, setOpen] = useState(false);
@@ -1293,4 +1224,4 @@ function WorkOfficeZoomControls({ zoom, minimum = 50, maximum = 200, step = 10,
1293
1224
  ]
1294
1225
  });
1295
1226
  }
1296
- export { Dialog, OfficeSelect, Tabs, WorkOfficePreviewBar, WorkOfficeRibbon, WorkOfficeRibbonButton, WorkOfficeRibbonGroup, WorkOfficeStatusBar, WorkOfficeZoomControls, WorkspaceContextMenu, isWorkspaceContextMenuKeyboardEvent, workspaceContextMenuPosition };
1227
+ export { OfficeSelect, Tabs, WorkOfficePreviewBar, WorkOfficeRibbon, WorkOfficeRibbonButton, WorkOfficeRibbonGroup, WorkOfficeStatusBar, WorkOfficeZoomControls, WorkspaceContextMenu, isWorkspaceContextMenuKeyboardEvent, workspaceContextMenuPosition };
package/dist/0~9445.js CHANGED
@@ -2,7 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Minus, Plus, Table2 } from "lucide-react";
3
3
  import { useEffect, useRef, useState } from "react";
4
4
  import { materializeWorkFile } from "./9356.js";
5
- import { Popover } from "./0~6090.js";
5
+ import { Popover } from "./0~8136.js";
6
6
  async function readOfficeFileAsDataUrl(file) {
7
7
  const ownedFile = await materializeWorkFile(file);
8
8
  return new Promise((resolve, reject)=>{
@@ -18,8 +18,8 @@ import { TableMap, isInTable, selectedRect } from "@tiptap/pm/tables";
18
18
  import { closeHistory } from "@tiptap/pm/history";
19
19
  import { documentTableSizing, transferChangedDocumentTextStatistics, documentPageBordersVisible, documentUnderlineStyle, DOCUMENT_PAGE_BORDER_EDGES, documentTableRowOptions, normalizeDocumentColumns, clampDocumentMargin, materializeLazyDocumentEditorRoot, documentKerningThresholdPoints, selectedDocumentIndexOptions, nextDocumentTabAlignment, DOCUMENT_BOOKMARK_DUPLICATE_MESSAGE, normalizedTabPosition, documentCitationCount, resolveDocumentPageBorders, documentLazyHtmlChunkFragment, DocumentFontFamily, normalizeDocumentHiddenText, documentLegacyTextEffectsConflict, DOCUMENT_CHUNK_VISIBLE_IDS_META, selectedDocumentIndexDraft, MAX_DOCUMENT_IMAGE_RELATIVE_HEIGHT, retainAnchoredDocumentComments, DocumentTableRowIdentity, work_document_page_margins_twipsToMillimeters, DEFAULT_DOCUMENT_TABLE_CELL_FORMAT, resolveWorkDocumentEditorInput, documentCharacterPositionPoints, documentBulletListStyle, collectDocumentTextLayoutParagraphs, readOfficeDocumentCollaboration as readWorkOfficeDocumentCollaboration, normalizeDocumentCharacterScalePercent, DOCUMENT_PARAGRAPH_FORMAT_ATTRIBUTES, documentOrderedListState, normalizeDocumentPageChrome, documentTextStatistics, documentPageMarginsForLayout, invalidateDocumentLazyHtmlProjection, documentTableCellFormat, normalizeDocumentPageGeometry, normalizeDocumentImageLayer, documentImageProperties, isValidDocumentCitationTag, sanitizeDocumentPageChromeHtml, pageTwipsToMillimeters, normalizeDocumentPageBorders, importWorkDocumentFile, DocumentParagraphFormatting, documentModelHasTrustedInitialIntegrityFeatures, normalizeDocumentHtml, documentInitialSectionLayout, activeDocumentSection, documentParagraphDirection, documentParagraphPagination, isDocumentCharacterFormatMark, documentModelUsesWindowing, documentPageChromeLegacyFields, documentChunkMountedIds, collectDocumentCommentAnchors, documentTextCaseKeyboardShortcuts, DocumentTextStyle, canChangeDocumentIndent, documentCharacterSpacingPoints, documentKerningIsEffective, DocumentSuperscript, documentSectionById, activeDocumentBookmark, DocumentEquation, documentLazyHtmlProjectionFingerprint, documentLazyHtmlProjection, normalizeDocumentParagraphIndent, updateDocumentGutterPosition, DocumentStrike, mountWorkLiveDocumentCapture, registerDocumentPageSurfaceGeometry, documentHiddenTextKeyboardShortcut, documentHasIndex, syncDocumentContentFromHtml, documentLegacyTextEffectsCss, editorDocumentCaptionTargets, resolveDocumentPageChrome, documentImageLayoutOptions, MAX_DOCUMENT_NUMBERING_START, resolveDocumentPageSize, editorDocumentBookmarkReferenceTargets, serializeWorkDocumentNode, DOCUMENT_CHUNK_PAGINATION_META, documentModelForContent, createOfficeDocumentCollaborationBinding as createWorkOfficeDocumentCollaborationBinding, documentLegacyTextEffectsFromTextStyleAttributes, normalizeDocumentEmphasisMark, selectedDocumentChunkId, documentCommentViews, documentParagraphSpacing, normalizeDocumentTabStops, patchDocumentLazyHtmlProjection, normalizeDocumentTextCase, documentUnderlineColor, documentBookmarkNameExists, collectDocumentChanges, DocumentImage, selectedDocumentTableOfContentsOptions, resolveDocumentPageMargins, updateDocumentPageMarginMode, serializeDocumentParagraphFormatting, canSetDocumentTableRowRepeatHeader, normalizeDocumentCharacterSpacingTwips, DocumentCharacterFormatting, millimetersToPixels as work_document_layout_millimetersToPixels, DOCUMENT_PARAGRAPH_CHANGE_ATTRIBUTES, serializeDocumentCharacterFormatting, DOCUMENT_CHUNK_HYDRATION_META, documentTabLeaderLabel, createSchemaDerivedWorkDocumentModel, updateDocumentCustomPageMillimeters, DocumentUnderline, documentCommentDraftRange, documentParagraphTabStops, documentTableHorizontalAlignment, documentUnderlineKeyboardShortcuts, documentParagraphIndent, DocumentScriptFontFormatting, canInsertDocumentComment, resolveAllDocumentChanges, documentHasTableOfContents, documentTextLayoutBatches, normalizeDocumentImageWrapSide, updateDocumentPageOrientation, documentCitationStyleDetails, validateDocumentBookmarkName, setCustomDocumentColumns, updateDocumentPageMarginMillimeters, documentCitationStyle, normalizeDocumentCharacterPositionHalfPoints, documentTransactionsOnlyHydrateChunks, normalizeDocumentKerningThresholdHalfPoints, forgetSourceBlob as forgetWorkSourceBlob, DEFAULT_DOCUMENT_TABLE_CELL_MARGINS, DOCUMENT_TABLE_STYLE_OPTIONS, updateDocumentColumnWidth, updateDocumentPaperSizePreset, documentPageMetrics, documentStrikeStyle, DocumentHighlight, createDocumentBibliography, DocumentSubscript, selectedDocumentIndexEntry, updateDocumentPageChromeVariant, updateDocumentMirrorMargins, activeDocumentTableStyle, measureDocumentLayoutBlocksIncrementally, documentWordLineHeightFactor, normalizeDocumentLegacyTextEffect, createWorkDocumentExtensions } from "./4174.js";
20
20
  import { useOfficeTaskPaneEscape, normalizeOfficeFontFamily, OfficeCheckbox, useOfficeDialog, useOfficeTaskPaneModal, CommittedOfficeNumberField, officeFontFamilyLabel, officeFontFamilies, CollectionState, createOfficeKernelClient, OfficeNumberField } from "./0~7048.js";
21
- import { moveOfficeMenuFocus, office_text_field_OfficeTextArea, Popover, officeOverlayPortalRoot, button_Button, useOfficePublishPresenceLocation, OfficeTiptapPresenceLayer, icon_button_IconButton, office_text_field_OfficeTextField, useDialogFocusScope, useOfficeEditorWheelZoom, office_text_field_OfficeFileInput } from "./0~6090.js";
22
- import { WorkOfficePreviewBar, isWorkspaceContextMenuKeyboardEvent, Tabs, WorkOfficeZoomControls, WorkOfficeStatusBar, Dialog, WorkOfficeRibbon, workspaceContextMenuPosition, OfficeSelect, WorkspaceContextMenu, WorkOfficeRibbonGroup, WorkOfficeRibbonButton } from "./0~4595.js";
21
+ import { moveOfficeMenuFocus, office_text_field_OfficeTextArea, Popover, officeOverlayPortalRoot, Dialog, button_Button, useOfficePublishPresenceLocation, OfficeTiptapPresenceLayer, icon_button_IconButton, office_text_field_OfficeTextField, useDialogFocusScope, useOfficeEditorWheelZoom, office_text_field_OfficeFileInput } from "./0~8136.js";
22
+ import { WorkOfficePreviewBar, isWorkspaceContextMenuKeyboardEvent, Tabs, WorkOfficeZoomControls, WorkOfficeStatusBar, WorkOfficeRibbon, workspaceContextMenuPosition, OfficeSelect, WorkspaceContextMenu, WorkOfficeRibbonGroup, WorkOfficeRibbonButton } from "./0~9073.js";
23
23
  import { documentFontNameFromCssFamily, normalizeDocumentRunBorder, parseDocumentScriptFonts, parseDocumentRunShading, DOCUMENT_RUN_BORDER_STYLES, serializeDocumentRunBorder, documentScriptFontDirectFamily, serializeDocumentRunShading, patchDocumentScriptFonts, serializeDocumentScriptFonts, documentRunBorderIsVisible, cssDocumentFontFamily, isDocumentParagraphArtBorderStyle, visibleWorkDocumentOutlineItems, DEFAULT_DOCUMENT_TABLE_OF_CONTENTS_OPTIONS, createOfficeId as createWorkId, DEFAULT_DOCUMENT_INDEX_OPTIONS, normalizeDocumentLanguageTag, currentWorkDocumentOutlineItem, normalizeDocumentNoProof, parseDocumentRunBorder, DocumentParagraphIdentity, parseDocumentProofingLanguages, collectWorkDocumentOutline, documentScriptFontSlotFromHint, documentBorderPresentation, documentScriptFontFamilyForRendering, normalizeDocumentRunShading, normalizeDocumentScriptFontSlot, documentScriptFontSegments, patchDocumentProofingLanguages, serializeDocumentProofingLanguages, documentRunShadingDomAttributes } from "./4121.js";
24
24
  import { normalizeDocumentHref, DOCUMENT_LINK_VALIDATION_MESSAGE } from "./0~work-document-links.js";
25
25
  import { OfficeColorPicker, isOfficeShortcutBlocked } from "./0~3635.js";
@@ -11,8 +11,8 @@ import { Markdown } from "@tiptap/markdown";
11
11
  import starter_kit from "@tiptap/starter-kit";
12
12
  import { Bold, Code2, Columns2, Image, Italic, Link2, List, ListChecks, ListOrdered, Minus, PencilLine, Quote, Redo2, Strikethrough, Table2, Undo2, Unlink } from "lucide-react";
13
13
  import { mergeOfficeTiptapExtensions, documentPlainTextAsHtml, customSelectionMenuItems } from "./0~5050.js";
14
- import { OfficeSelect, isWorkspaceContextMenuKeyboardEvent, WorkOfficeZoomControls, WorkOfficeStatusBar, Dialog, WorkOfficeRibbon, workspaceContextMenuPosition, WorkspaceContextMenu, WorkOfficeRibbonGroup, WorkOfficeRibbonButton, WorkOfficePreviewBar } from "./0~4595.js";
15
- import { button_Button, OfficeTiptapPresenceLayer, useOfficePublishPresenceLocation, stepOfficeZoom, office_text_field_OfficeTextField, useOfficeEditorWheelZoom, MarkdownSourcePresenceLayer } from "./0~6090.js";
14
+ import { OfficeSelect, isWorkspaceContextMenuKeyboardEvent, WorkOfficeZoomControls, WorkOfficeStatusBar, WorkOfficeRibbon, workspaceContextMenuPosition, WorkspaceContextMenu, WorkOfficeRibbonGroup, WorkOfficeRibbonButton, WorkOfficePreviewBar } from "./0~9073.js";
15
+ import { stepOfficeZoom, MarkdownSourcePresenceLayer, button_Button, OfficeTiptapPresenceLayer, useOfficePublishPresenceLocation, Dialog, office_text_field_OfficeTextField, useOfficeEditorWheelZoom } from "./0~8136.js";
16
16
  import { normalizeDocumentHref, DOCUMENT_LINK_VALIDATION_MESSAGE } from "./0~work-document-links.js";
17
17
  import { readOfficeMarkdownCollaboration as readWorkOfficeMarkdownCollaboration, createOfficeMarkdownCollaborationBinding as createWorkOfficeMarkdownCollaborationBinding } from "./2591.js";
18
18
  import { useOfficeEditorInitialFocus, useOfficeCollaborationLocationNavigator, WorkEditorLoadingState } from "./432.js";