@a3s-lab/office 0.13.1 → 0.15.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 +40 -5
- package/dist/0~7048.js +14 -4
- package/dist/0~spreadsheet-editor.js +14748 -8939
- package/dist/0~work-office-diagnostics.js +1 -1
- package/dist/{4476.js → 2180.js} +34 -1
- package/dist/4104.js +41 -19
- package/dist/core.js +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/features/work/editors/office-checkbox.d.ts +3 -2
- package/dist/internal/features/work/editors/spreadsheet-auto-sum-command.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-auto-sum.d.ts +19 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-format-command.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-format.d.ts +36 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-mutation-guard.d.ts +4 -0
- package/dist/internal/features/work/editors/spreadsheet-clipboard-shortcuts.d.ts +1 -0
- package/dist/internal/features/work/editors/spreadsheet-clipboard.d.ts +13 -0
- package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +142 -0
- package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +56 -0
- package/dist/internal/features/work/editors/spreadsheet-context-menu.d.ts +5 -15
- package/dist/internal/features/work/editors/spreadsheet-data-validation-command.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-data-validation-dialog.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-data-validation.d.ts +50 -0
- package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +1 -2
- package/dist/internal/features/work/editors/spreadsheet-editor-support.d.ts +1 -0
- package/dist/internal/features/work/editors/spreadsheet-format-cells-dialog-model.d.ts +86 -0
- package/dist/internal/features/work/editors/spreadsheet-format-cells-dialog-panels.d.ts +15 -0
- package/dist/internal/features/work/editors/spreadsheet-format-cells-dialog.d.ts +8 -0
- package/dist/internal/features/work/editors/spreadsheet-go-to.d.ts +24 -0
- package/dist/internal/features/work/editors/spreadsheet-hyperlink-command.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-hyperlink-dialog.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-hyperlink.d.ts +44 -0
- package/dist/internal/features/work/editors/spreadsheet-keyboard-navigation.d.ts +4 -0
- package/dist/internal/features/work/editors/spreadsheet-navigation-command.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-number-format-command.d.ts +24 -0
- package/dist/internal/features/work/editors/spreadsheet-paste-special-cell.d.ts +17 -0
- package/dist/internal/features/work/editors/spreadsheet-paste-special-dialog.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-paste-special-mode.d.ts +11 -0
- package/dist/internal/features/work/editors/spreadsheet-paste-special-plan.d.ts +4 -0
- package/dist/internal/features/work/editors/spreadsheet-paste-special-sheet.d.ts +23 -0
- package/dist/internal/features/work/editors/spreadsheet-paste-special-snapshot.d.ts +10 -0
- package/dist/internal/features/work/editors/spreadsheet-paste-special-types.d.ts +127 -0
- package/dist/internal/features/work/editors/spreadsheet-paste-special.d.ts +7 -0
- package/dist/internal/features/work/editors/use-spreadsheet-clipboard.d.ts +36 -0
- package/dist/internal/features/work/editors/use-spreadsheet-data-validation.d.ts +23 -0
- package/dist/internal/features/work/editors/use-spreadsheet-hyperlink.d.ts +24 -0
- package/dist/internal/features/work/work-spreadsheet-data-validation.d.ts +2 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +845 -1
- package/docs/latest/en/browser-editor-architecture.md +12 -1
- package/package.json +15 -3
package/README.md
CHANGED
|
@@ -517,16 +517,35 @@ interaction model.
|
|
|
517
517
|
selection-preserving undo/redo, deterministic Arrow, Enter, Tab, Home,
|
|
518
518
|
PageUp/PageDown, row, column, and all-cells selection shortcuts, Cmd/Ctrl
|
|
519
519
|
formatting through root-scoped capture before vendor grid listeners, an
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
520
|
+
WPS-style Home and Editing Find and Select menu whose editor-owned
|
|
521
|
+
`Cmd/Ctrl+F` search finds displayed values, raw values, formulas, and sparse
|
|
522
|
+
cells without opening browser Find, plus view-only `Ctrl+G` and `F5` Go To
|
|
523
|
+
for direct, quoted cross-sheet, and named ranges without content updates,
|
|
524
|
+
Undo records, or sparse materialization, with a viewport-safe phone Find
|
|
525
|
+
layout, touch-sized controls, bounded validation, and exact focus restoration,
|
|
523
526
|
desktop workbook task panes that become focus-contained phone dialogs with
|
|
524
527
|
an inert workbook background and exact ribbon-invoker restoration,
|
|
525
528
|
a WPS-familiar command catalog and tab order, quick-access Undo and Redo,
|
|
526
529
|
a priority-aware adaptive and collapsible ribbon with temporary tab
|
|
527
530
|
expansion, an executable Home clipboard group whose Paste, Cut, and Copy
|
|
528
531
|
commands share the permission-resilient local fallback with their WPS
|
|
529
|
-
shortcuts, a WPS-style
|
|
532
|
+
shortcuts, a WPS-style Paste split command with quick All, Values, Formulas,
|
|
533
|
+
and Formatting actions plus `Cmd/Ctrl+Alt+V` Paste Special for ten content
|
|
534
|
+
modes, arithmetic operations, Skip blanks, Transpose, translated formula
|
|
535
|
+
references, rich same-editor styles/comments/validation/merges/column widths,
|
|
536
|
+
bounded TSV fallback, one-step Undo, and fail-closed protected or unsafe
|
|
537
|
+
targets, an Insert and Links Hyperlink command with grid-scoped `Cmd/Ctrl+K`,
|
|
538
|
+
accessible Web page, cell-range, and worksheet targets, explicit Edit and
|
|
539
|
+
Remove, immutable dense/sparse updates, content/style/comment preservation,
|
|
540
|
+
exact focus restoration, one-step Undo, and fail-closed unsafe, hidden,
|
|
541
|
+
protected, pivot, or out-of-bounds targets, a Data and Data Tools Validation
|
|
542
|
+
command for lists, whole numbers, decimals, dates, and text length across
|
|
543
|
+
multiple ranges, compact rule writes and removal, input messages,
|
|
544
|
+
invalid-input blocking, 1900/1904-aware XLSX date round trips, exact focus
|
|
545
|
+
restoration, one-step Undo, and fail-closed protected, merged, pivot,
|
|
546
|
+
read-only, invalid, out-of-bounds, or over-10,000-cell targets, a WPS-style
|
|
547
|
+
Format Painter with
|
|
548
|
+
single-use and double-click locked
|
|
530
549
|
sessions, cross-sheet range-pattern tiling, Escape cancellation, and native
|
|
531
550
|
style-only writes, a Home and Font cell-border split control with side, all,
|
|
532
551
|
outside, inside, horizontal, vertical, clear, and diagonal targets, ten
|
|
@@ -547,10 +566,24 @@ interaction model.
|
|
|
547
566
|
relative-formula and style propagation, WPS `Cmd/Ctrl+D` and `Cmd/Ctrl+R`
|
|
548
567
|
shortcuts, one-step history, protected-range preflight, a 50,000-target-cell
|
|
549
568
|
guard, and sparse-row-safe execution,
|
|
569
|
+
a WPS AutoSum split command before Fill with Sum, Average, Count, Maximum,
|
|
570
|
+
and Minimum, the editor-scoped `Alt+=` Sum shortcut, contiguous source
|
|
571
|
+
inference above or left of a blank target, multi-formula totals rows and
|
|
572
|
+
columns, target-style preservation, merged/protected/read-only/pivot and
|
|
573
|
+
overwrite preflight, a 1,000-formula bound, sparse-safe native batches, and
|
|
574
|
+
one-step history,
|
|
550
575
|
Home and Number presets for General, Number, CNY Currency, Accounting,
|
|
551
576
|
Percentage, Short Date, Time, Scientific, Fraction, and Text, including the
|
|
552
577
|
seven standard `Cmd/Ctrl+Shift` format shortcuts, exact XLSX format-code
|
|
553
|
-
round trips, value/formula preservation, and one-step history,
|
|
578
|
+
round trips, value/formula preservation, and one-step history, plus
|
|
579
|
+
10,000-cell-bounded Increase/Decrease Decimal commands that retain every
|
|
580
|
+
cell's format family across mixed selections and commit one native batch,
|
|
581
|
+
a WPS-style Format Cells dialog under Home and Number with the editor-scoped
|
|
582
|
+
`Cmd/Ctrl+1` shortcut, functional Number, Alignment, Font, Border, Fill, and
|
|
583
|
+
Protection tabs, untouched mixed-value preservation, custom native number
|
|
584
|
+
codes, compact protection ranges, dense/sparse representation retention,
|
|
585
|
+
bounded blank-cell materialization, one controlled update and one Undo
|
|
586
|
+
record per Apply, and exact launcher or remounted-grid focus restoration,
|
|
554
587
|
a Home and Styles gallery with 17 WPS built-in cell styles grouped as Common,
|
|
555
588
|
Data and Model, and Titles and Totals, true native previews, two-dimensional
|
|
556
589
|
keyboard navigation, a 10,000-cell bound, blank-cell styling, per-cell border
|
|
@@ -1462,6 +1495,8 @@ without hard-coded return URLs.
|
|
|
1462
1495
|
|
|
1463
1496
|
- [Live Playground](https://a3s-lab.github.io/Office/)
|
|
1464
1497
|
- [Documentation center](https://a3s-lab.github.io/Office/docs/)
|
|
1498
|
+
- [A3S Office 0.15.0 documentation](https://a3s-lab.github.io/Office/docs/0.15.0/)
|
|
1499
|
+
- [A3S Office 0.14.0 documentation](https://a3s-lab.github.io/Office/docs/0.14.0/)
|
|
1465
1500
|
- [A3S Office 0.13.1 documentation](https://a3s-lab.github.io/Office/docs/0.13.1/)
|
|
1466
1501
|
- [A3S Office 0.13.0 documentation](https://a3s-lab.github.io/Office/docs/0.13.0/)
|
|
1467
1502
|
- [A3S Office 0.12.0 documentation](https://a3s-lab.github.io/Office/docs/0.12.0/)
|
package/dist/0~7048.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
3
|
-
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
3
|
+
import { Check, ChevronDown, ChevronUp, Minus } from "lucide-react";
|
|
4
4
|
import { Dialog } from "./0~4595.js";
|
|
5
5
|
import { button_Button, office_text_field_OfficeTextField, office_text_field_OfficeTextArea } from "./0~6090.js";
|
|
6
6
|
import { OFFICE_KERNEL_SPREADSHEET_MAX_ROWS as office_kernel_spreadsheet_protocol_OFFICE_KERNEL_SPREADSHEET_MAX_ROWS, isOfficeKernelSpreadsheetError } from "./5184.js";
|
|
@@ -433,13 +433,21 @@ function safelyNormalizeOfficeNumberDraft(normalizeValue, draft) {
|
|
|
433
433
|
return null;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
function OfficeCheckbox({ ariaLabel, checked, onCheckedChange, children, disabled = false, className = '' }) {
|
|
436
|
+
function OfficeCheckbox({ ariaLabel, checked, onCheckedChange, children, disabled = false, className = '', indeterminate = false }) {
|
|
437
|
+
const inputRef = useRef(null);
|
|
438
|
+
useEffect(()=>{
|
|
439
|
+
if (inputRef.current) inputRef.current.indeterminate = indeterminate;
|
|
440
|
+
}, [
|
|
441
|
+
indeterminate
|
|
442
|
+
]);
|
|
437
443
|
return /*#__PURE__*/ jsxs("label", {
|
|
438
|
-
className: `work-office-checkbox ${checked ? 'checked' : ''} ${disabled ? 'disabled' : ''} ${className}`.trim(),
|
|
444
|
+
className: `work-office-checkbox ${checked ? 'checked' : ''} ${indeterminate ? 'indeterminate' : ''} ${disabled ? 'disabled' : ''} ${className}`.trim(),
|
|
439
445
|
children: [
|
|
440
446
|
/*#__PURE__*/ jsx("input", {
|
|
447
|
+
ref: inputRef,
|
|
441
448
|
type: "checkbox",
|
|
442
449
|
"aria-label": ariaLabel,
|
|
450
|
+
"aria-checked": indeterminate ? 'mixed' : checked,
|
|
443
451
|
checked: checked,
|
|
444
452
|
disabled: disabled,
|
|
445
453
|
onChange: (event)=>onCheckedChange(event.target.checked)
|
|
@@ -447,7 +455,9 @@ function OfficeCheckbox({ ariaLabel, checked, onCheckedChange, children, disable
|
|
|
447
455
|
/*#__PURE__*/ jsx("span", {
|
|
448
456
|
className: "work-office-checkbox-box",
|
|
449
457
|
"aria-hidden": "true",
|
|
450
|
-
children:
|
|
458
|
+
children: indeterminate ? /*#__PURE__*/ jsx(Minus, {
|
|
459
|
+
size: 11
|
|
460
|
+
}) : checked && /*#__PURE__*/ jsx(Check, {
|
|
451
461
|
size: 11
|
|
452
462
|
})
|
|
453
463
|
}),
|