oasis-editor 0.0.111 → 0.0.113

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.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Maps OOXML `w:cnfStyle` attribute names to EditorTableConditionalType keys.
3
+ * Shared by import (parsing `w:cnfStyle`) and export (serializing `w:cnfStyle`).
4
+ * The order matches the 12-bit legacy bitmask in `w:val`.
5
+ */
6
+ export declare const TABLE_CONDITIONAL_FLAG_ATTRIBUTES: readonly [["firstRow", "firstRow"], ["lastRow", "lastRow"], ["firstColumn", "firstCol"], ["lastColumn", "lastCol"], ["oddVBand", "band1Vert"], ["evenVBand", "band2Vert"], ["oddHBand", "band1Horz"], ["evenHBand", "band2Horz"], ["firstRowFirstColumn", "nwCell"], ["firstRowLastColumn", "neCell"], ["lastRowFirstColumn", "swCell"], ["lastRowLastColumn", "seCell"]];
7
+ /**
8
+ * Maps OOXML `w:tblBorders` element names to EditorTableStyle borders keys.
9
+ * Shared by export paths that serialize table-level borders.
10
+ */
11
+ export declare const TABLE_BORDER_EDGE_KEYS: readonly [["top", "borderTop"], ["left", "borderLeft"], ["bottom", "borderBottom"], ["right", "borderRight"], ["insideH", "borderInsideH"], ["insideV", "borderInsideV"]];
@@ -45,7 +45,7 @@ export declare function createEditorStateFromDocument(document: EditorDocument,
45
45
  }): EditorState;
46
46
  export declare function createSectionBoundaryParagraph(zone: "header" | "footer"): EditorParagraphNode;
47
47
  export declare function createInitialEditorState(): EditorState;
48
- export declare function createEditorStateFromTexts(texts: string[], selection?: {
48
+ type SelectionSpec = {
49
49
  anchor?: {
50
50
  blockIndex: number;
51
51
  offset: number;
@@ -56,20 +56,11 @@ export declare function createEditorStateFromTexts(texts: string[], selection?:
56
56
  };
57
57
  blockIndex?: number;
58
58
  offset?: number;
59
- }): EditorState;
59
+ };
60
+ export declare function createEditorStateFromTexts(texts: string[], selection?: SelectionSpec): EditorState;
60
61
  export declare function createEditorStateFromParagraphRuns(paragraphsSpec: Array<Array<{
61
62
  text: string;
62
63
  styles?: EditorTextStyle;
63
64
  image?: EditorImageRunData;
64
- }>>, selection?: {
65
- anchor?: {
66
- blockIndex: number;
67
- offset: number;
68
- };
69
- focus?: {
70
- blockIndex: number;
71
- offset: number;
72
- };
73
- blockIndex?: number;
74
- offset?: number;
75
- }): EditorState;
65
+ }>>, selection?: SelectionSpec): EditorState;
66
+ export {};