@a3s-lab/office 0.37.4 → 0.38.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.
- package/README.md +10 -1
- package/dist/{0~4808.js → 0~5024.js} +150 -2
- package/dist/0~7240.js +26 -4
- package/dist/0~document-editor.js +455 -13
- package/dist/0~spreadsheet-editor.js +52 -36
- package/dist/0~work-docx-export.js +215 -18
- package/dist/0~work-docx-import.js +4 -2
- package/dist/0~work-office-diagnostics.js +57 -1
- package/dist/4174.js +313 -112
- package/dist/5416.js +56 -44
- package/dist/core.js +56 -10
- package/dist/internal/features/work/editors/document-font-dialog-model.d.ts +5 -4
- package/dist/internal/features/work/editors/document-font-dialog-opentype-model.d.ts +53 -0
- package/dist/internal/features/work/editors/document-font-dialog-script-font-model.d.ts +5 -0
- package/dist/internal/features/work/editors/spreadsheet-auto-filter-menu.d.ts +2 -2
- package/dist/internal/features/work/editors/spreadsheet-auto-filter.d.ts +3 -3
- package/dist/internal/features/work/editors/spreadsheet-date-time-command.d.ts +2 -1
- package/dist/internal/features/work/editors/spreadsheet-editor-support.d.ts +2 -2
- package/dist/internal/features/work/editors/spreadsheet-filter-reconciliation.d.ts +3 -2
- package/dist/internal/features/work/work-document-equations.d.ts +4 -3
- package/dist/internal/features/work/work-document-format-changes.d.ts +2 -0
- package/dist/internal/features/work/work-document-opentype.d.ts +39 -0
- package/dist/internal/features/work/work-document-word-line-metrics.d.ts +1 -0
- package/dist/internal/features/work/work-docx-opentype-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-opentype-export.d.ts +19 -0
- package/dist/internal/features/work/work-docx-opentype-import.d.ts +8 -0
- package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +2 -0
- package/dist/internal/features/work/work-spreadsheet-dynamic-filter.d.ts +3 -2
- package/dist/internal/features/work/work-types.d.ts +3 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +7 -3
- package/docs/latest/en/browser-editor-architecture.md +4 -2
- package/package.json +6 -1
|
@@ -17,6 +17,7 @@ declare module '@tiptap/extension-text-style' {
|
|
|
17
17
|
runShading?: string | null;
|
|
18
18
|
proofingLanguages?: string | null;
|
|
19
19
|
noProof?: boolean | null;
|
|
20
|
+
openTypeFeatures?: string | null;
|
|
20
21
|
kerningThresholdHalfPoints?: number | null;
|
|
21
22
|
scriptFonts?: string | null;
|
|
22
23
|
scriptFontSlot?: WorkDocumentScriptFontSlot | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type WorkDocumentOpenTypeFeatures } from './work-document-opentype';
|
|
2
|
+
export interface DocxOpenTypePatch {
|
|
3
|
+
marker: string;
|
|
4
|
+
style?: string;
|
|
5
|
+
features: WorkDocumentOpenTypeFeatures;
|
|
6
|
+
}
|
|
7
|
+
export declare class DocxOpenTypePatchCollector {
|
|
8
|
+
readonly patches: DocxOpenTypePatch[];
|
|
9
|
+
private nextMarker;
|
|
10
|
+
private readonly occupied;
|
|
11
|
+
private readonly patchesByMarker;
|
|
12
|
+
private readonly markersByFeaturesAndStyle;
|
|
13
|
+
constructor(source: string);
|
|
14
|
+
marker(value: unknown, inheritedStyle?: string): string;
|
|
15
|
+
lookup(marker: string | undefined): DocxOpenTypePatch | undefined;
|
|
16
|
+
private originalStyle;
|
|
17
|
+
}
|
|
18
|
+
export declare function patchDocxOpenTypeFeatures(buffer: ArrayBuffer, patches: readonly DocxOpenTypePatch[]): Promise<ArrayBuffer>;
|
|
19
|
+
export declare function appendDocxOpenTypeProperties(document: Document, properties: Element, source: unknown): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type WorkDocumentOpenTypeFeatures } from './work-document-opentype';
|
|
2
|
+
export interface ResolvedDocxOpenTypeFeatures {
|
|
3
|
+
features: WorkDocumentOpenTypeFeatures | null;
|
|
4
|
+
invalidCount: number;
|
|
5
|
+
spoofedCount: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const DOCX_WORD_2010_NAMESPACE = "http://schemas.microsoft.com/office/word/2010/wordml";
|
|
8
|
+
export declare function resolveDocxOpenTypeFeatures(propertySources: readonly Element[]): ResolvedDocxOpenTypeFeatures;
|
|
@@ -11,6 +11,7 @@ import { type DocumentRunBorder } from './work-document-run-border';
|
|
|
11
11
|
import { type DocumentRunShading } from './work-document-run-shading';
|
|
12
12
|
import { type WorkDocumentHighlight } from './work-document-highlight';
|
|
13
13
|
import { type WorkDocumentProofingLanguages } from './work-document-proofing';
|
|
14
|
+
import { type WorkDocumentOpenTypeFeatures } from './work-document-opentype';
|
|
14
15
|
export interface ImportedDocxRunFormatting {
|
|
15
16
|
bold?: boolean;
|
|
16
17
|
italic?: boolean;
|
|
@@ -44,6 +45,7 @@ export interface ImportedDocxRunFormatting {
|
|
|
44
45
|
runShading?: DocumentRunShading;
|
|
45
46
|
proofingLanguages?: WorkDocumentProofingLanguages;
|
|
46
47
|
noProof?: boolean;
|
|
48
|
+
openTypeFeatures?: WorkDocumentOpenTypeFeatures;
|
|
47
49
|
}
|
|
48
50
|
export interface ImportedDocxRunFormattingMarker {
|
|
49
51
|
startMarker: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Cell } from '@fortune-sheet/core';
|
|
2
|
-
import type { WorkSpreadsheetDynamicFilter } from './work-types';
|
|
2
|
+
import type { WorkSpreadsheetDateSystem, WorkSpreadsheetDynamicFilter } from './work-types';
|
|
3
3
|
export interface WorkSpreadsheetDynamicFilterContext {
|
|
4
|
+
dateSystem?: WorkSpreadsheetDateSystem;
|
|
4
5
|
now: Date;
|
|
5
6
|
}
|
|
6
7
|
export declare function workSpreadsheetDynamicFilterMatcher(kind: WorkSpreadsheetDynamicFilter, cells: Iterable<Cell | null>, context: WorkSpreadsheetDynamicFilterContext): ((cell: Cell | null) => boolean) | null;
|
|
7
|
-
export declare function workSpreadsheetCellIsDate(cell: Cell | null): boolean;
|
|
8
|
+
export declare function workSpreadsheetCellIsDate(cell: Cell | null, dateSystem?: WorkSpreadsheetDateSystem): boolean;
|
|
@@ -182,9 +182,12 @@ export interface WorkDocumentComment {
|
|
|
182
182
|
resolved: boolean;
|
|
183
183
|
replies?: WorkDocumentCommentReply[];
|
|
184
184
|
}
|
|
185
|
+
export type WorkSpreadsheetDateSystem = '1900' | '1904';
|
|
185
186
|
export interface WorkSpreadsheetContent {
|
|
186
187
|
type: 'spreadsheet';
|
|
187
188
|
sheets: WorkSpreadsheetSheet[];
|
|
189
|
+
/** Omitted values use the Excel-compatible 1900 date system. */
|
|
190
|
+
dateSystem?: WorkSpreadsheetDateSystem;
|
|
188
191
|
calculation?: WorkSpreadsheetCalculationSettings;
|
|
189
192
|
namedRanges?: WorkSpreadsheetNamedRange[];
|
|
190
193
|
printAreas?: WorkSpreadsheetPrintArea[];
|
package/dist/office-kernel.wasm
CHANGED
|
Binary file
|
package/dist/styles.css
CHANGED
|
@@ -9791,7 +9791,7 @@ button.work-office-collaboration-participant:hover .work-office-collaboration-lo
|
|
|
9791
9791
|
display: grid;
|
|
9792
9792
|
}
|
|
9793
9793
|
|
|
9794
|
-
.work-document-font-dialog-run-border, .work-document-font-dialog-run-shading {
|
|
9794
|
+
.work-document-font-dialog-run-border, .work-document-font-dialog-run-shading, .work-document-font-dialog-opentype {
|
|
9795
9795
|
border: 1px solid color-mix(in srgb, var(--a3s-line) 78%, transparent);
|
|
9796
9796
|
background: var(--a3s-panel-soft);
|
|
9797
9797
|
border-radius: 8px;
|
|
@@ -9808,7 +9808,11 @@ button.work-office-collaboration-participant:hover .work-office-collaboration-lo
|
|
|
9808
9808
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
9809
9809
|
}
|
|
9810
9810
|
|
|
9811
|
-
.work-document-font-dialog-
|
|
9811
|
+
.work-document-font-dialog-opentype {
|
|
9812
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
9813
|
+
}
|
|
9814
|
+
|
|
9815
|
+
.work-document-font-dialog-run-border > legend, .work-document-font-dialog-run-shading > legend, .work-document-font-dialog-opentype > legend {
|
|
9812
9816
|
color: var(--a3s-muted);
|
|
9813
9817
|
padding: 0 4px;
|
|
9814
9818
|
font-size: 11px;
|
|
@@ -9892,7 +9896,7 @@ button.work-office-collaboration-participant:hover .work-office-collaboration-lo
|
|
|
9892
9896
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
9893
9897
|
}
|
|
9894
9898
|
|
|
9895
|
-
.work-document-font-dialog-run-border, .work-document-font-dialog-run-shading {
|
|
9899
|
+
.work-document-font-dialog-run-border, .work-document-font-dialog-run-shading, .work-document-font-dialog-opentype {
|
|
9896
9900
|
grid-template-columns: minmax(0, 1fr);
|
|
9897
9901
|
}
|
|
9898
9902
|
|
|
@@ -1574,8 +1574,10 @@ number as a date. Relative weeks begin on Sunday; calendar month and quarter
|
|
|
1574
1574
|
families classify independently of year. Column profiling is cached per
|
|
1575
1575
|
immutable sheet and keeps typed dates out of numeric rank actions. The editor
|
|
1576
1576
|
uses the current local clock, while model tests inject a deterministic clock.
|
|
1577
|
-
The controlled model
|
|
1578
|
-
1904
|
|
1577
|
+
The controlled model carries one workbook-owned `dateSystem`; omission means
|
|
1578
|
+
1900 and imported 1904 workbooks retain the explicit alternate epoch. Numeric
|
|
1579
|
+
date serials remain numeric through import, filtering, controlled remounts,
|
|
1580
|
+
collaboration, export, and reopen, including valid 1904 serial zero.
|
|
1579
1581
|
|
|
1580
1582
|
The same closed `WorkSpreadsheetFilterCriteria` union now serves worksheet and
|
|
1581
1583
|
table native OOXML. Package scan and import read only the worksheet root's
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a3s-lab/office",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Open-source collaborative browser editors for documents, Markdown, spreadsheets, presentations, and PDFs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"office",
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
"playground:visual:document-character-position": "playwright test visual-tests/document-character-position.functional.spec.ts --config playwright.config.ts",
|
|
102
102
|
"playground:visual:document-character-spacing": "playwright test visual-tests/document-character-spacing.functional.spec.ts --config playwright.config.ts",
|
|
103
103
|
"playground:visual:document-script-fonts": "playwright test visual-tests/document-script-fonts.functional.spec.ts --config playwright.config.ts",
|
|
104
|
+
"playground:visual:document-opentype": "playwright test visual-tests/document-opentype.functional.spec.ts --config playwright.config.ts",
|
|
104
105
|
"playground:visual:document-strike": "playwright test visual-tests/document-strike.functional.spec.ts --config playwright.config.ts",
|
|
105
106
|
"playground:visual:spreadsheet-data-validation": "playwright test visual-tests/spreadsheet-data-validation.functional.spec.ts --config playwright.config.ts",
|
|
106
107
|
"playground:visual:spreadsheet-date-time": "playwright test visual-tests/spreadsheet-date-time.functional.spec.ts --config playwright.config.ts",
|
|
@@ -223,6 +224,8 @@
|
|
|
223
224
|
"test:e2e:spreadsheet-diagonal-borders:check": "a3s-test check tests/e2e/spreadsheet-diagonal-borders.acl --json",
|
|
224
225
|
"test:e2e:spreadsheet-date-time": "a3s-test run tests/e2e/spreadsheet-date-time.acl --json",
|
|
225
226
|
"test:e2e:spreadsheet-date-time:check": "a3s-test check tests/e2e/spreadsheet-date-time.acl --json",
|
|
227
|
+
"test:e2e:spreadsheet-1904-date-system": "A3S_TEST_SUITE=tests/e2e/spreadsheet-1904-date-system.acl bash scripts/run-a3s-test-web-gate.sh",
|
|
228
|
+
"test:e2e:spreadsheet-1904-date-system:check": "a3s-test check tests/e2e/spreadsheet-1904-date-system.acl --json",
|
|
226
229
|
"test:e2e:spreadsheet-copy-from-above": "A3S_TEST_SUITE=tests/e2e/spreadsheet-copy-from-above.acl bash scripts/run-a3s-test-web-gate.sh",
|
|
227
230
|
"test:e2e:spreadsheet-copy-from-above:check": "a3s-test check tests/e2e/spreadsheet-copy-from-above.acl --json",
|
|
228
231
|
"test:e2e:spreadsheet-font-dialog-shortcuts": "A3S_TEST_SUITE=tests/e2e/spreadsheet-font-dialog-shortcuts.acl bash scripts/run-a3s-test-web-gate.sh",
|
|
@@ -265,6 +268,8 @@
|
|
|
265
268
|
"test:e2e:writer-character-spacing:check": "a3s-test check tests/e2e/word-character-spacing.acl --json",
|
|
266
269
|
"test:e2e:writer-script-fonts": "A3S_TEST_SUITE=tests/e2e/word-script-fonts.acl bash scripts/run-a3s-test-web-gate.sh",
|
|
267
270
|
"test:e2e:writer-script-fonts:check": "a3s-test check tests/e2e/word-script-fonts.acl --json",
|
|
271
|
+
"test:e2e:writer-opentype": "A3S_TEST_SUITE=tests/e2e/word-opentype-typography.acl bash scripts/run-a3s-test-web-gate.sh",
|
|
272
|
+
"test:e2e:writer-opentype:check": "a3s-test check tests/e2e/word-opentype-typography.acl --json",
|
|
268
273
|
"test:e2e:writer-strike": "A3S_TEST_SUITE=tests/e2e/word-strike-styles.acl bash scripts/run-a3s-test-web-gate.sh",
|
|
269
274
|
"test:e2e:writer-strike:check": "a3s-test check tests/e2e/word-strike-styles.acl --json",
|
|
270
275
|
"test:e2e:writer-layout": "a3s-test run tests/e2e/word-insert-page-layout.acl --json",
|