oasis-editor 0.0.145 → 0.0.147

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 (59) hide show
  1. package/dist/{OasisEditorApp-CskQWKEC.js → OasisEditorApp-DM9mi2EU.js} +4258 -4167
  2. package/dist/__tests__/ooxml/markupCompatibilityEngine.test.d.ts +1 -0
  3. package/dist/__tests__/ooxml/milestone2Integration.test.d.ts +1 -0
  4. package/dist/__tests__/ooxml/namespaceRegistry.test.d.ts +1 -0
  5. package/dist/__tests__/ooxml/preservationBag.test.d.ts +1 -0
  6. package/dist/__tests__/ooxml/universalContainerPatcher.test.d.ts +1 -0
  7. package/dist/app/controllers/tableOpsMutationCommands.d.ts +14 -3
  8. package/dist/app/controllers/tableOpsSelectionRanges.d.ts +4 -1
  9. package/dist/app/controllers/useEditorTableOperations.d.ts +2 -2
  10. package/dist/assets/importDocxWorker-BLm3QMHu.js +12 -0
  11. package/dist/core/commands/table/tableCommandUtils.d.ts +7 -1
  12. package/dist/core/editorState/nodeFactories.d.ts +1 -1
  13. package/dist/core/model/documentIndex.d.ts +35 -2
  14. package/dist/core/model/index.d.ts +2 -2
  15. package/dist/core/model/types/docxSourcePackage.d.ts +7 -0
  16. package/dist/core/model/types/nodes.d.ts +2 -1
  17. package/dist/export/docx/docxNumbering.d.ts +4 -1
  18. package/dist/export/docx/endnotesXml.d.ts +2 -5
  19. package/dist/export/docx/footnotesXml.d.ts +3 -21
  20. package/dist/export/docx/noteDocxIds.d.ts +9 -0
  21. package/dist/export/docx/opc/commentEntrySourcePatcher.d.ts +5 -0
  22. package/dist/export/docx/opc/commentsExtendedSourcePatcher.d.ts +5 -0
  23. package/dist/export/docx/opc/documentRootSourcePatcher.d.ts +5 -0
  24. package/dist/export/docx/opc/extensionMarkupMerge.d.ts +9 -0
  25. package/dist/export/docx/opc/headerFooterRootSourcePatcher.d.ts +11 -0
  26. package/dist/export/docx/opc/headerFooterSourcePatcher.d.ts +9 -0
  27. package/dist/export/docx/opc/headerFooterStoryReferences.d.ts +14 -0
  28. package/dist/export/docx/opc/noteEntrySourcePatcher.d.ts +4 -0
  29. package/dist/export/docx/opc/numberingSourcePatcher.d.ts +5 -0
  30. package/dist/export/docx/opc/rebuiltPartHashes.d.ts +5 -0
  31. package/dist/export/docx/opc/relatedStoryRootSourcePatcher.d.ts +11 -0
  32. package/dist/export/docx/opc/sectionPropertiesSourcePatcher.d.ts +10 -0
  33. package/dist/export/docx/opc/sourceBackedDocxPatcher.d.ts +4 -0
  34. package/dist/export/docx/opc/sourceOnlySingletonFilter.d.ts +19 -0
  35. package/dist/export/docx/opc/sourcePackagePatcher.d.ts +7 -3
  36. package/dist/export/docx/opc/styleParagraphPropertiesSourcePatcher.d.ts +5 -0
  37. package/dist/export/docx/opc/styleRunPropertiesSourcePatcher.d.ts +5 -0
  38. package/dist/export/docx/opc/styleTablePropertiesSourcePatcher.d.ts +5 -0
  39. package/dist/export/docx/opc/universalContainerPatcher.d.ts +1 -0
  40. package/dist/export/docx/opc/wordPartRootSourcePatcher.d.ts +21 -0
  41. package/dist/export/docx/opc/wordSingletonSourcePatcher.d.ts +14 -0
  42. package/dist/export/docx/tableSourcePropertiesXml.d.ts +13 -0
  43. package/dist/export/docx/tableSourceXml.d.ts +10 -0
  44. package/dist/export/docx/tableXml.d.ts +5 -3
  45. package/dist/export/docx/text/sourceParagraphPropertiesXml.d.ts +8 -0
  46. package/dist/export/docx/text/sourceRunPropertiesXml.d.ts +7 -0
  47. package/dist/import/docx/opc/sourcePackage.d.ts +1 -0
  48. package/dist/{index-DOtfE4EA.js → index-CXKg4TC3.js} +5960 -875
  49. package/dist/oasis-editor.js +79 -79
  50. package/dist/oasis-editor.umd.cjs +4 -4
  51. package/dist/ooxml/markupCompatibilityEngine.d.ts +16 -0
  52. package/dist/ooxml/namespaceRegistry.d.ts +17 -0
  53. package/dist/ooxml/preservationBag.d.ts +21 -0
  54. package/dist/ooxml/schemaOrder.d.ts +7 -0
  55. package/dist/ooxml/word/numberingMetadata.d.ts +4 -0
  56. package/dist/ooxml/word/sourceFragments.d.ts +39 -3
  57. package/dist/ui/tableGeometry.d.ts +2 -3
  58. package/package.json +1 -1
  59. package/dist/assets/importDocxWorker-5S8lX4CZ.js +0 -12
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,11 +1,22 @@
1
- import { findParagraphTableLocation, EditorBlockNode, EditorEditingZone, EditorParagraphNode, EditorState, EditorTableNode } from '../../core/model.js';
1
+ import { findParagraphTablePathLocation, EditorBlockNode, EditorEditingZone, EditorParagraphNode, EditorState, EditorTableCellNode, EditorTableNode } from '../../core/model.js';
2
2
 
3
+ export declare function getTableOperationTargetBlocks(current: EditorState, zone: EditorEditingZone): EditorBlockNode[];
3
4
  export declare const updateBlocksInCurrentSection: (current: EditorState, blocks: EditorBlockNode[], zone?: EditorEditingZone) => EditorState;
4
- export declare const applyTableAwareParagraphEdit: (current: EditorState, getTargetBlocks: (state: EditorState, zone: EditorEditingZone) => EditorBlockNode[], edit: (tempState: EditorState) => EditorState) => EditorState;
5
+ type TablePathLocation = NonNullable<ReturnType<typeof findParagraphTablePathLocation>>;
5
6
  export interface TableLocationMutation {
6
7
  tableBlock: EditorTableNode;
7
- location: NonNullable<ReturnType<typeof findParagraphTableLocation>>;
8
+ targetCell: EditorTableCellNode;
9
+ location: TablePathLocation;
8
10
  targetBlocks: EditorBlockNode[];
9
11
  }
12
+ /**
13
+ * Clones only the top-level table that owns `location.tablePath`, then resolves
14
+ * the cloned path to the innermost table and active cell. All mutation callers
15
+ * therefore operate on the intended nested table while unrelated document
16
+ * blocks retain structural sharing.
17
+ */
18
+ export declare function resolveTablePathMutation(current: EditorState, getTargetBlocks: (state: EditorState, zone: EditorEditingZone) => EditorBlockNode[], location: TablePathLocation): TableLocationMutation | null;
19
+ export declare const applyTableAwareParagraphEdit: (current: EditorState, getTargetBlocks: (state: EditorState, zone: EditorEditingZone) => EditorBlockNode[], edit: (tempState: EditorState) => EditorState) => EditorState;
10
20
  export declare function resolveLocationTableMutation(current: EditorState, getTargetBlocks: (state: EditorState, zone: EditorEditingZone) => EditorBlockNode[]): TableLocationMutation | null;
11
21
  export declare function commitTableMutation(current: EditorState, targetBlocks: EditorBlockNode[], zone: EditorEditingZone, nextParagraph: EditorParagraphNode | null | undefined): EditorState;
22
+ export {};
@@ -1,9 +1,10 @@
1
- import { EditorBlockNode, EditorEditingZone, EditorState } from '../../core/model.js';
1
+ import { EditorBlockNode, EditorEditingZone, EditorState, TablePathSegment } from '../../core/model.js';
2
2
  import { TableCellLayoutEntry } from '../../core/tableLayout.js';
3
3
  import { EditorLogger } from '../../utils/logger.js';
4
4
 
5
5
  export interface HorizontalTableCellRange {
6
6
  blockIndex: number;
7
+ tablePath: TablePathSegment[];
7
8
  rowIndex: number;
8
9
  startCellIndex: number;
9
10
  endCellIndex: number;
@@ -11,6 +12,7 @@ export interface HorizontalTableCellRange {
11
12
  }
12
13
  export interface VerticalTableCellRange {
13
14
  blockIndex: number;
15
+ tablePath: TablePathSegment[];
14
16
  startRowIndex: number;
15
17
  endRowIndex: number;
16
18
  cellIndex: number;
@@ -18,6 +20,7 @@ export interface VerticalTableCellRange {
18
20
  }
19
21
  export interface SelectedTableCells {
20
22
  blockIndex: number;
23
+ tablePath: TablePathSegment[];
21
24
  cells: TableCellLayoutEntry[];
22
25
  zone: EditorEditingZone;
23
26
  }
@@ -1,5 +1,5 @@
1
1
  import { MergeKey } from '../../core/transactionMergeKeys.js';
2
- import { EditorBlockNode, EditorState, EditorEditingZone } from '../../core/model.js';
2
+ import { EditorState } from '../../core/model.js';
3
3
  import { EditorLogger } from '../../utils/logger.js';
4
4
 
5
5
  export interface EditorTableOperationsDeps {
@@ -37,7 +37,7 @@ declare function createEditorTableOperationsImpl(deps: EditorTableOperationsDeps
37
37
  getTableVisualWidth: (table: import('../../core/model.js').EditorTableNode) => number;
38
38
  findCellAtVisualColumn: (row: import('../../core/model.js').EditorTableRowNode, visualColumn: number) => import('../../core/model.js').EditorTableCellNode | null;
39
39
  findFirstNavigableParagraphInTable: (table: import('../../core/model.js').EditorTableNode) => import('../../core/model.js').EditorParagraphNode | null;
40
- updateBlocksInCurrentSection: (current: EditorState, blocks: EditorBlockNode[], zone?: EditorEditingZone) => EditorState;
40
+ updateBlocksInCurrentSection: (current: EditorState, blocks: import('../../core/model.js').EditorBlockNode[], zone?: import('../../core/model.js').EditorEditingZone) => EditorState;
41
41
  resolveAdjacentTableCellPosition: (document: import('../../core/model.js').EditorDocument, paragraphId: string, delta: -1 | 1) => import('../../core/model.js').EditorPosition | null;
42
42
  applyTableAwareParagraphEdit: (current: EditorState, edit: (tempState: EditorState) => EditorState) => EditorState;
43
43
  withExpandedTableCellSelection: (current: EditorState) => EditorState;