@a3s-lab/office 0.13.0 → 0.13.1
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 +13 -1
- package/dist/0~6090.js +63 -4
- package/dist/0~spreadsheet-editor.js +2940 -2164
- package/dist/4104.js +1094 -18
- package/dist/internal/features/work/editors/office-menu-keyboard.d.ts +1 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-border-per-cell.d.ts +5 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-border.d.ts +15 -1
- package/dist/internal/features/work/editors/spreadsheet-cell-style-command.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-style-ribbon.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-style.d.ts +41 -0
- package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +134 -0
- package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +2 -0
- package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +3 -1
- package/dist/internal/features/work/editors/spreadsheet-number-format.d.ts +15 -3
- package/dist/internal/features/work/work-xlsx-cell-borders.d.ts +25 -0
- package/dist/internal/features/work/work-xlsx-cell-style-writer.d.ts +21 -0
- package/dist/internal/features/work/work-xlsx-cell-style-xml.d.ts +17 -0
- package/dist/internal/features/work/work-xlsx-cell-styles.d.ts +13 -0
- package/dist/internal/features/work/work-xlsx-colors.d.ts +6 -0
- package/dist/internal/features/work/work-xlsx-interop.d.ts +3 -1
- package/dist/internal/features/work/work-xlsx-worksheet-scan.d.ts +1 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +117 -0
- package/dist/work-spreadsheet-package-scan.worker.js +7 -3
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -547,6 +547,17 @@ interaction model.
|
|
|
547
547
|
relative-formula and style propagation, WPS `Cmd/Ctrl+D` and `Cmd/Ctrl+R`
|
|
548
548
|
shortcuts, one-step history, protected-range preflight, a 50,000-target-cell
|
|
549
549
|
guard, and sparse-row-safe execution,
|
|
550
|
+
Home and Number presets for General, Number, CNY Currency, Accounting,
|
|
551
|
+
Percentage, Short Date, Time, Scientific, Fraction, and Text, including the
|
|
552
|
+
seven standard `Cmd/Ctrl+Shift` format shortcuts, exact XLSX format-code
|
|
553
|
+
round trips, value/formula preservation, and one-step history,
|
|
554
|
+
a Home and Styles gallery with 17 WPS built-in cell styles grouped as Common,
|
|
555
|
+
Data and Model, and Titles and Totals, true native previews, two-dimensional
|
|
556
|
+
keyboard navigation, a 10,000-cell bound, blank-cell styling, per-cell border
|
|
557
|
+
semantics, current-style recognition without private markers, one-step
|
|
558
|
+
history, and direct XLSX font, fill, alignment, wrap, rotation, border, and
|
|
559
|
+
number-format XF round trips with theme, indexed, and tint colors normalized
|
|
560
|
+
to stable RGB,
|
|
550
561
|
a View and Window Freeze Panes menu for current-cell, top-row, first-column,
|
|
551
562
|
and unfreeze patterns with XLSX round trips, and visible F9 workbook
|
|
552
563
|
recalculation,
|
|
@@ -557,7 +568,7 @@ interaction model.
|
|
|
557
568
|
keyboard-operated cells and sheet tabs, direct type-to-edit,
|
|
558
569
|
permission-resilient multi-cell cut/copy/paste, clear, F2 editing, and
|
|
559
570
|
focus-safe Escape behavior, direct
|
|
560
|
-
font-family, vertical-alignment, text-wrap, number
|
|
571
|
+
font-family, vertical-alignment, text-wrap, number-format, and decimal
|
|
561
572
|
controls, charts, validation, protection, comments, and print settings.
|
|
562
573
|
_XLSX, XLS, ODS, and CSV import; XLSX and PDF export._
|
|
563
574
|
- **Presentation** — Typed slide scene graph, multi-selection, groups, object
|
|
@@ -1451,6 +1462,7 @@ without hard-coded return URLs.
|
|
|
1451
1462
|
|
|
1452
1463
|
- [Live Playground](https://a3s-lab.github.io/Office/)
|
|
1453
1464
|
- [Documentation center](https://a3s-lab.github.io/Office/docs/)
|
|
1465
|
+
- [A3S Office 0.13.1 documentation](https://a3s-lab.github.io/Office/docs/0.13.1/)
|
|
1454
1466
|
- [A3S Office 0.13.0 documentation](https://a3s-lab.github.io/Office/docs/0.13.0/)
|
|
1455
1467
|
- [A3S Office 0.12.0 documentation](https://a3s-lab.github.io/Office/docs/0.12.0/)
|
|
1456
1468
|
- [A3S Office 0.11.0 documentation](https://a3s-lab.github.io/Office/docs/0.11.0/)
|
package/dist/0~6090.js
CHANGED
|
@@ -1235,11 +1235,15 @@ const OFFICE_MENU_NAVIGATION_KEYS = [
|
|
|
1235
1235
|
'Home',
|
|
1236
1236
|
'End'
|
|
1237
1237
|
];
|
|
1238
|
+
const OFFICE_GRID_MENU_NAVIGATION_KEYS = [
|
|
1239
|
+
...OFFICE_MENU_NAVIGATION_KEYS,
|
|
1240
|
+
'ArrowLeft',
|
|
1241
|
+
'ArrowRight'
|
|
1242
|
+
];
|
|
1243
|
+
const OFFICE_MENU_BUTTON_SELECTOR = 'button[role="menuitem"]:not(:disabled), button[role="menuitemradio"]:not(:disabled), button[role="menuitemcheckbox"]:not(:disabled)';
|
|
1238
1244
|
function moveOfficeMenuFocus(event) {
|
|
1239
1245
|
if (!OFFICE_MENU_NAVIGATION_KEYS.includes(event.key)) return false;
|
|
1240
|
-
const buttons =
|
|
1241
|
-
...event.currentTarget.querySelectorAll('button[role="menuitem"]:not(:disabled), button[role="menuitemradio"]:not(:disabled), button[role="menuitemcheckbox"]:not(:disabled)')
|
|
1242
|
-
];
|
|
1246
|
+
const buttons = officeMenuButtons(event.currentTarget);
|
|
1243
1247
|
if (!buttons.length) return false;
|
|
1244
1248
|
event.preventDefault();
|
|
1245
1249
|
const current = buttons.indexOf(document.activeElement);
|
|
@@ -1247,6 +1251,61 @@ function moveOfficeMenuFocus(event) {
|
|
|
1247
1251
|
buttons[next]?.focus();
|
|
1248
1252
|
return true;
|
|
1249
1253
|
}
|
|
1254
|
+
function moveOfficeGridMenuFocus(event, columns) {
|
|
1255
|
+
if (!OFFICE_GRID_MENU_NAVIGATION_KEYS.includes(event.key)) return false;
|
|
1256
|
+
const buttons = officeMenuButtons(event.currentTarget);
|
|
1257
|
+
if (!buttons.length) return false;
|
|
1258
|
+
event.preventDefault();
|
|
1259
|
+
const currentButton = document.activeElement;
|
|
1260
|
+
const current = Math.max(0, buttons.indexOf(currentButton));
|
|
1261
|
+
if ('Home' === event.key || 'End' === event.key) {
|
|
1262
|
+
buttons['Home' === event.key ? 0 : buttons.length - 1]?.focus();
|
|
1263
|
+
return true;
|
|
1264
|
+
}
|
|
1265
|
+
if ('ArrowLeft' === event.key || 'ArrowRight' === event.key) {
|
|
1266
|
+
const delta = 'ArrowRight' === event.key ? 1 : -1;
|
|
1267
|
+
buttons[(current + delta + buttons.length) % buttons.length]?.focus();
|
|
1268
|
+
return true;
|
|
1269
|
+
}
|
|
1270
|
+
const groups = [
|
|
1271
|
+
...event.currentTarget.querySelectorAll('[data-office-menu-grid]')
|
|
1272
|
+
];
|
|
1273
|
+
const groupIndex = groups.findIndex((group)=>group.contains(currentButton));
|
|
1274
|
+
if (groupIndex < 0) {
|
|
1275
|
+
const delta = 'ArrowDown' === event.key ? columns : -columns;
|
|
1276
|
+
buttons[(current + delta + buttons.length) % buttons.length]?.focus();
|
|
1277
|
+
return true;
|
|
1278
|
+
}
|
|
1279
|
+
const groupButtons = officeMenuButtons(groups[groupIndex]);
|
|
1280
|
+
const localIndex = Math.max(0, groupButtons.indexOf(currentButton));
|
|
1281
|
+
const column = localIndex % columns;
|
|
1282
|
+
if ('ArrowDown' === event.key) {
|
|
1283
|
+
const nextRow = localIndex - column + columns;
|
|
1284
|
+
if (nextRow < groupButtons.length) {
|
|
1285
|
+
groupButtons[Math.min(nextRow + column, groupButtons.length - 1)]?.focus();
|
|
1286
|
+
return true;
|
|
1287
|
+
}
|
|
1288
|
+
const nextGroup = groups[(groupIndex + 1) % groups.length];
|
|
1289
|
+
const nextButtons = officeMenuButtons(nextGroup);
|
|
1290
|
+
nextButtons[Math.min(column, nextButtons.length - 1)]?.focus();
|
|
1291
|
+
return true;
|
|
1292
|
+
}
|
|
1293
|
+
const previousRow = localIndex - column - columns;
|
|
1294
|
+
if (previousRow >= 0) {
|
|
1295
|
+
groupButtons[previousRow + column]?.focus();
|
|
1296
|
+
return true;
|
|
1297
|
+
}
|
|
1298
|
+
const previousGroup = groups[(groupIndex - 1 + groups.length) % groups.length];
|
|
1299
|
+
const previousButtons = officeMenuButtons(previousGroup);
|
|
1300
|
+
const previousRowStart = Math.floor((previousButtons.length - 1) / columns) * columns;
|
|
1301
|
+
previousButtons[Math.min(previousRowStart + column, previousButtons.length - 1)]?.focus();
|
|
1302
|
+
return true;
|
|
1303
|
+
}
|
|
1304
|
+
function officeMenuButtons(root) {
|
|
1305
|
+
return [
|
|
1306
|
+
...root.querySelectorAll(OFFICE_MENU_BUTTON_SELECTOR)
|
|
1307
|
+
];
|
|
1308
|
+
}
|
|
1250
1309
|
function stepOfficeZoom(zoom, direction, { minimum = 50, maximum = 200, step = 10 } = {}) {
|
|
1251
1310
|
const delta = 'in' === direction ? step : -step;
|
|
1252
1311
|
return Math.min(maximum, Math.max(minimum, Math.round(zoom + delta)));
|
|
@@ -1280,4 +1339,4 @@ function useOfficeEditorWheelZoom({ enabled = true, scopeRef, onZoomIn, onZoomOu
|
|
|
1280
1339
|
scopeRef
|
|
1281
1340
|
]);
|
|
1282
1341
|
}
|
|
1283
|
-
export { CommittedOfficeTextArea, CommittedOfficeTextField, MarkdownSourcePresenceLayer, OfficePresenceAvatar, OfficeTiptapPresenceLayer, Popover, WorkOfficeCollaborationParticipants, button_Button, icon_button_IconButton, matchesAriaKeyShortcuts, matchesOfficeEditorKeyboardShortcut, moveOfficeMenuFocus, officeOverlayPortalRoot, officePresenceColor, officePresenceColorStyle, office_text_field_OfficeFileInput, office_text_field_OfficeTextArea, office_text_field_OfficeTextField, stepOfficeZoom, useDialogFocusScope, useOfficeEditorWheelZoom, useOfficePublishPresenceLocation, useOfficeRemoteParticipants };
|
|
1342
|
+
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 };
|