oasis-editor 0.0.88 → 0.0.90

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 (39) hide show
  1. package/dist/{OasisEditorApp-Bx4I4GCm.js → OasisEditorApp-2b7y3aGj.js} +1996 -646
  2. package/dist/assets/{importDocxWorker-BcELKms0.js → importDocxWorker-BN5o1geV.js} +1 -1
  3. package/dist/core/commands/table/tableCommandUtils.d.ts +2 -1
  4. package/dist/core/commands/table/tableFloatingCommands.d.ts +5 -0
  5. package/dist/core/commands/table.d.ts +1 -0
  6. package/dist/core/model/index.d.ts +2 -2
  7. package/dist/core/model/types/layout.d.ts +4 -0
  8. package/dist/core/model/types/nodes.d.ts +23 -7
  9. package/dist/core/model/types/primitives.d.ts +19 -0
  10. package/dist/core/model/types/styles.d.ts +63 -6
  11. package/dist/core/model.d.ts +1 -0
  12. package/dist/core/tableStyleResolver.d.ts +20 -0
  13. package/dist/export/docx/tableXml.d.ts +1 -0
  14. package/dist/export/pdf/OasisPdfWriter.d.ts +6 -102
  15. package/dist/export/pdf/draw/drawFragment.d.ts +15 -1
  16. package/dist/export/pdf/draw/drawTextBoxShape.d.ts +1 -0
  17. package/dist/export/pdf/writer/PdfContentStream.d.ts +20 -0
  18. package/dist/export/pdf/writer/PdfDocumentSerializer.d.ts +5 -0
  19. package/dist/export/pdf/writer/PdfFontTable.d.ts +38 -0
  20. package/dist/export/pdf/writer/PdfImageTable.d.ts +12 -0
  21. package/dist/export/pdf/writer/pdfPrimitives.d.ts +20 -0
  22. package/dist/export/pdf/writer/pdfTypes.d.ts +107 -0
  23. package/dist/i18n/locales/en.d.ts +18 -0
  24. package/dist/i18n/locales/pt-BR.d.ts +18 -0
  25. package/dist/import/docx/tableProperties.d.ts +2 -1
  26. package/dist/import/docx/tables.d.ts +1 -1
  27. package/dist/{index-Ds5uOUe8.js → index-DcElQi6c.js} +1946 -1204
  28. package/dist/layoutProjection/floatingObjects.d.ts +15 -1
  29. package/dist/layoutProjection/paginationTrack.d.ts +2 -0
  30. package/dist/layoutProjection/paragraphPagination.d.ts +2 -2
  31. package/dist/oasis-editor.js +50 -50
  32. package/dist/oasis-editor.umd.cjs +4 -4
  33. package/dist/ui/canvas/CanvasLayoutSnapshot.d.ts +1 -1
  34. package/dist/ui/canvas/CanvasTableLayout.d.ts +7 -1
  35. package/dist/ui/canvas/canvasBorders.d.ts +2 -0
  36. package/dist/ui/canvas/canvasSnapshotTypes.d.ts +12 -0
  37. package/dist/ui/components/Dialogs/TablePropertiesDialog.d.ts +22 -1
  38. package/dist/ui/editorUiTypes.d.ts +1 -1
  39. package/package.json +1 -1
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Public value/option types for the PDF writer. These are the interfaces that
3
+ * callers across `src/export/pdf` (and the font registry) depend on; the
4
+ * `OasisPdfWriter` facade re-exports them so existing import paths keep working.
5
+ */
6
+ export interface OasisPdfPageSize {
7
+ width: number;
8
+ height: number;
9
+ }
10
+ export interface OasisPdfPage {
11
+ width: number;
12
+ height: number;
13
+ commands: string[];
14
+ imageResourceNames: Set<string>;
15
+ }
16
+ export interface OasisPdfRectOptions {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
21
+ fill?: string;
22
+ stroke?: string;
23
+ lineWidth?: number;
24
+ }
25
+ export interface OasisPdfLineOptions {
26
+ x1: number;
27
+ y1: number;
28
+ x2: number;
29
+ y2: number;
30
+ stroke?: string;
31
+ lineWidth?: number;
32
+ dashArray?: number[];
33
+ }
34
+ export type OasisPdfPathSegment = {
35
+ type: "move";
36
+ x: number;
37
+ y: number;
38
+ } | {
39
+ type: "line";
40
+ x: number;
41
+ y: number;
42
+ } | {
43
+ type: "cubic";
44
+ x1: number;
45
+ y1: number;
46
+ x2: number;
47
+ y2: number;
48
+ x: number;
49
+ y: number;
50
+ } | {
51
+ type: "close";
52
+ };
53
+ export interface OasisPdfPathOptions {
54
+ segments: OasisPdfPathSegment[];
55
+ fill?: string;
56
+ stroke?: string;
57
+ lineWidth?: number;
58
+ }
59
+ export interface OasisPdfTextOptions {
60
+ x: number;
61
+ y: number;
62
+ text: string;
63
+ fontSize?: number;
64
+ color?: string;
65
+ bold?: boolean;
66
+ italic?: boolean;
67
+ fontResourceName?: string;
68
+ characterSpacing?: number;
69
+ horizontalScale?: number;
70
+ /** PDF text render mode (`Tr`): 0 fill (default), 1 stroke, 2 fill+stroke. */
71
+ renderMode?: number;
72
+ }
73
+ export interface OasisPdfImageResource {
74
+ resourceName: string;
75
+ width: number;
76
+ height: number;
77
+ data: Uint8Array;
78
+ filter: "DCTDecode";
79
+ }
80
+ export interface OasisPdfImageOptions {
81
+ resourceName: string;
82
+ x: number;
83
+ y: number;
84
+ width: number;
85
+ height: number;
86
+ rotation?: number;
87
+ }
88
+ export type OasisPdfFontResource = OasisPdfBase14FontResource | OasisPdfUnicodeFontResource;
89
+ export interface OasisPdfBase14FontResource {
90
+ kind: "base14";
91
+ resourceName: string;
92
+ baseFont: string;
93
+ }
94
+ export interface OasisPdfUnicodeFontResource {
95
+ kind: "unicode";
96
+ resourceName: string;
97
+ family: string;
98
+ fontData: Uint8Array;
99
+ postscriptName?: string;
100
+ }
101
+ /** A serialized indirect PDF object: its 1-based id and dictionary/stream body. */
102
+ export interface PdfObject {
103
+ id: number;
104
+ body: string;
105
+ }
106
+ /** Signature of the object-appending closure used during serialization. */
107
+ export type AddPdfObject = (body: string) => number;
@@ -204,6 +204,24 @@ export declare const en: {
204
204
  "table.wrapAround": string;
205
205
  "table.positioning": string;
206
206
  "table.positioningReadOnly": string;
207
+ "table.horizontalAnchor": string;
208
+ "table.verticalAnchor": string;
209
+ "table.anchorMargin": string;
210
+ "table.anchorPage": string;
211
+ "table.anchorText": string;
212
+ "table.positionX": string;
213
+ "table.positionY": string;
214
+ "table.horizontalAlignment": string;
215
+ "table.explicitOffset": string;
216
+ "table.distanceTop": string;
217
+ "table.distanceRight": string;
218
+ "table.distanceBottom": string;
219
+ "table.distanceLeft": string;
220
+ "table.allowOverlap": string;
221
+ "table.borderStart": string;
222
+ "table.borderEnd": string;
223
+ "table.borderTlBr": string;
224
+ "table.borderTrBl": string;
207
225
  "table.rowHeight": string;
208
226
  "table.rowHeightRule": string;
209
227
  "table.rowAuto": string;
@@ -204,6 +204,24 @@ export declare const ptBR: {
204
204
  "table.wrapAround": string;
205
205
  "table.positioning": string;
206
206
  "table.positioningReadOnly": string;
207
+ "table.horizontalAnchor": string;
208
+ "table.verticalAnchor": string;
209
+ "table.anchorMargin": string;
210
+ "table.anchorPage": string;
211
+ "table.anchorText": string;
212
+ "table.positionX": string;
213
+ "table.positionY": string;
214
+ "table.horizontalAlignment": string;
215
+ "table.explicitOffset": string;
216
+ "table.distanceTop": string;
217
+ "table.distanceRight": string;
218
+ "table.distanceBottom": string;
219
+ "table.distanceLeft": string;
220
+ "table.allowOverlap": string;
221
+ "table.borderStart": string;
222
+ "table.borderEnd": string;
223
+ "table.borderTlBr": string;
224
+ "table.borderTrBl": string;
207
225
  "table.rowHeight": string;
208
226
  "table.rowHeightRule": string;
209
227
  "table.rowAuto": string;
@@ -1,8 +1,9 @@
1
1
  import { Element as XmlElement } from '@xmldom/xmldom';
2
- import { EditorParagraphNode, EditorTableCellStyle, EditorTableRowNode, EditorTableRowStyle, EditorTableStyle } from '../../core/model.js';
2
+ import { EditorParagraphNode, EditorTableCellStyle, EditorTableRowNode, EditorTableRowStyle, EditorTableStyle, EditorTableConditionalFlags } from '../../core/model.js';
3
3
  import { EditorTableBorders } from './borders.js';
4
4
  import { ParagraphAutospacingFlags } from './paragraphStyle.js';
5
5
 
6
+ export declare function parseTableConditionalFlags(properties: XmlElement | null): EditorTableConditionalFlags | undefined;
6
7
  export declare function parseTableStyle(tblPr: XmlElement | null, tableStyleId?: string): EditorTableStyle | undefined;
7
8
  export declare function parseTableRowStyle(rowProperties: XmlElement | null): EditorTableRowStyle | undefined;
8
9
  export declare function getTableCellColSpan(cellProperties: XmlElement | null): number;
@@ -6,4 +6,4 @@ import { DocxImportTheme } from './theme.js';
6
6
  import { NumberingMaps } from './numbering.js';
7
7
  import { ParseNestedBlocks } from './runs/types.js';
8
8
 
9
- export declare function parseTableNode(tableNode: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, theme: DocxImportTheme, parseNestedBlocks: ParseNestedBlocks, styles?: Record<string, EditorNamedStyle>): Promise<EditorTableNode>;
9
+ export declare function parseTableNode(tableNode: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, theme: DocxImportTheme, parseNestedBlocks: ParseNestedBlocks, _styles?: Record<string, EditorNamedStyle>): Promise<EditorTableNode>;