@a3s-lab/office 0.18.0 → 0.20.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.
Files changed (32) hide show
  1. package/README.md +19 -6
  2. package/dist/0~3635.js +23 -2
  3. package/dist/0~spreadsheet-editor.js +4457 -4022
  4. package/dist/0~work-office-diagnostics.js +1 -1
  5. package/dist/4104.js +693 -279
  6. package/dist/{1992.js → 6164.js} +107 -1
  7. package/dist/core.js +1 -1
  8. package/dist/index.js +1 -1
  9. package/dist/internal/features/work/editors/office-color-picker.d.ts +6 -1
  10. package/dist/internal/features/work/editors/spreadsheet-alignment-ribbon.d.ts +7 -0
  11. package/dist/internal/features/work/editors/spreadsheet-cell-format.d.ts +2 -0
  12. package/dist/internal/features/work/editors/spreadsheet-clipboard-ribbon.d.ts +7 -0
  13. package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +119 -9
  14. package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +4 -2
  15. package/dist/internal/features/work/editors/spreadsheet-command-selection.d.ts +3 -0
  16. package/dist/internal/features/work/editors/spreadsheet-editing-ribbon.d.ts +6 -0
  17. package/dist/internal/features/work/editors/spreadsheet-keyboard-shortcut-runners.d.ts +16 -0
  18. package/dist/internal/features/work/editors/spreadsheet-keyboard-shortcuts.d.ts +3 -0
  19. package/dist/internal/features/work/editors/spreadsheet-rows-columns-ribbon.d.ts +5 -0
  20. package/dist/internal/features/work/editors/spreadsheet-selection-navigation-command.d.ts +3 -0
  21. package/dist/internal/features/work/editors/spreadsheet-structure-command.d.ts +5 -0
  22. package/dist/internal/features/work/editors/spreadsheet-text-orientation-command.d.ts +18 -0
  23. package/dist/internal/features/work/editors/spreadsheet-view-ribbon.d.ts +8 -0
  24. package/dist/internal/features/work/editors/spreadsheet-visibility-shortcuts.d.ts +3 -0
  25. package/dist/internal/features/work/work-spreadsheet-text-orientation.d.ts +21 -0
  26. package/dist/internal/features/work/work-xlsx-cell-style-origin.d.ts +44 -0
  27. package/dist/internal/features/work/work-xlsx-cell-style-values.d.ts +26 -0
  28. package/dist/internal/features/work/work-xlsx-cell-style-writer.d.ts +4 -1
  29. package/dist/internal/features/work/work-xlsx-cell-styles.d.ts +2 -0
  30. package/dist/office-kernel.wasm +0 -0
  31. package/dist/styles.css +103 -0
  32. package/package.json +6 -1
package/README.md CHANGED
@@ -563,8 +563,14 @@ interaction model.
563
563
  per-cell mixed-size stepping, native rectangle compaction, a 10,000-cell
564
564
  bound, and one-step Undo, a WPS-style Underline split control with single,
565
565
  double, single-accounting, and double-accounting styles, exact Format Cells
566
- and XLSX round trips, and active-style-aware `Cmd/Ctrl+U` toggling, plus a
567
- cell-border split control with side, all,
566
+ and XLSX round trips, active-style-aware `Cmd/Ctrl+U` toggling, and WPS
567
+ `Ctrl+2`, `Ctrl+3`, and `Ctrl+4` aliases for Bold, Italic, and Underline;
568
+ Automatic Color and No Fill remove direct text and background colors instead
569
+ of hard-coding replacements, a
570
+ keyboard-accessible WPS Text Orientation menu with horizontal, both 45-degree
571
+ angles, stacked vertical, rotate-up, and rotate-down choices, exact Fortune
572
+ `rt` / `tr='3'` and OOXML 0–180 / 255 round trips, a 10,000-cell guard, and
573
+ one-batch Undo, plus a cell-border split control with side, all,
568
574
  outside, inside, horizontal, vertical, clear, and diagonal targets, ten
569
575
  native line styles, exact color selection, compact overlapping range writes,
570
576
  `Cmd/Ctrl+Shift+&` Outside Borders and `Cmd/Ctrl+Shift+_` Clear Borders,
@@ -573,8 +579,11 @@ interaction model.
573
579
  sorting plus WPS-style AutoFilter under Data, finite current-region discovery,
574
580
  `Cmd/Ctrl+Shift+L` toggling, an `Alt+ArrowDown` keyboard filter menu,
575
581
  a Home and Cells Rows and Columns menu for inserting above, below, left, or
576
- right and deleting selected rows or columns through the shared structure
577
- command port, a Home and Alignment Merge and Center split control with
582
+ right, deleting selected rows or columns, and hiding or unhiding rows and
583
+ columns through the shared structure command port, including grid-scoped
584
+ `Cmd/Ctrl+9`, `Cmd/Ctrl+0`, `Cmd/Ctrl+Shift+9`, and `Cmd/Ctrl+Shift+0`
585
+ shortcuts with 10,000-row and 1,000-column allocation guards, a Home and
586
+ Alignment Merge and Center split control with
578
587
  Merge Cells, Merge Across, Unmerge Cells, Unmerge and Fill, and the WPS
579
588
  `Ctrl+M` shortcut through one controlled native workbook batch,
580
589
  a Home and Editing Clear menu for independently removing content, formats,
@@ -607,8 +616,10 @@ interaction model.
607
616
  keyboard navigation, a 10,000-cell bound, blank-cell styling, per-cell border
608
617
  semantics, current-style recognition without private markers, one-step
609
618
  history, and direct XLSX font, fill, alignment, wrap, rotation, border, and
610
- number-format XF round trips with theme, indexed, and tint colors normalized
611
- to stable RGB,
619
+ number-format XF round trips; imported theme, indexed, automatic, and tint
620
+ identities for direct font, solid-fill, and border colors survive unrelated
621
+ edits and Yjs transport when the rendered RGB and palette slot still agree,
622
+ while changed or conflicting colors safely export as explicit RGB,
612
623
  a View and Window Freeze Panes menu for current-cell, top-row, first-column,
613
624
  and unfreeze patterns with XLSX round trips, and visible F9 workbook
614
625
  recalculation,
@@ -1522,6 +1533,8 @@ without hard-coded return URLs.
1522
1533
 
1523
1534
  - [Live Playground](https://a3s-lab.github.io/Office/)
1524
1535
  - [Documentation center](https://a3s-lab.github.io/Office/docs/)
1536
+ - [A3S Office 0.20.0 documentation](https://a3s-lab.github.io/Office/docs/0.20.0/)
1537
+ - [A3S Office 0.19.0 documentation](https://a3s-lab.github.io/Office/docs/0.19.0/)
1525
1538
  - [A3S Office 0.18.0 documentation](https://a3s-lab.github.io/Office/docs/0.18.0/)
1526
1539
  - [A3S Office 0.17.0 documentation](https://a3s-lab.github.io/Office/docs/0.17.0/)
1527
1540
  - [A3S Office 0.16.0 documentation](https://a3s-lab.github.io/Office/docs/0.16.0/)
package/dist/0~3635.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { Check, ChevronDown } from "lucide-react";
2
+ import { Ban, Check, ChevronDown } from "lucide-react";
3
3
  import { useEffect, useRef, useState } from "react";
4
4
  import { button_Button, Popover } from "./0~6090.js";
5
5
  const THEME_COLORS = [
@@ -72,7 +72,7 @@ const OFFICE_COLORS = [
72
72
  ];
73
73
  const COLOR_GRID_COLUMNS = 10;
74
74
  const COLOR_GRID_COLUMNS_PROPERTY = '--work-office-color-grid-columns';
75
- function OfficeColorPicker({ ariaLabel, value, onValueChange, disabled = false, compact = false, className = '', triggerLabel, triggerIcon }) {
75
+ function OfficeColorPicker({ ariaLabel, value, onValueChange, disabled = false, compact = false, className = '', resetAction, triggerLabel, triggerIcon }) {
76
76
  const [draft, setDraft] = useState(value);
77
77
  const [open, setOpen] = useState(false);
78
78
  const [activeIndex, setActiveIndex] = useState(()=>Math.max(0, OFFICE_COLORS.indexOf(value.toLowerCase())));
@@ -186,6 +186,27 @@ function OfficeColorPicker({ ariaLabel, value, onValueChange, disabled = false,
186
186
  }),
187
187
  children: (close)=>/*#__PURE__*/ jsxs(Fragment, {
188
188
  children: [
189
+ resetAction ? /*#__PURE__*/ jsxs("button", {
190
+ type: "button",
191
+ className: "work-office-color-reset",
192
+ "data-kind": resetAction.kind,
193
+ onClick: ()=>{
194
+ close();
195
+ resetAction.onSelect();
196
+ },
197
+ children: [
198
+ /*#__PURE__*/ jsx("span", {
199
+ className: "work-office-color-reset-swatch",
200
+ "aria-hidden": "true",
201
+ children: 'none' === resetAction.kind ? /*#__PURE__*/ jsx(Ban, {
202
+ size: 13
203
+ }) : null
204
+ }),
205
+ /*#__PURE__*/ jsx("span", {
206
+ children: resetAction.label
207
+ })
208
+ ]
209
+ }) : null,
189
210
  /*#__PURE__*/ jsxs("div", {
190
211
  className: "work-office-color-palette",
191
212
  role: "listbox",