@rowsncolumns/spreadsheet 10.18.0 → 10.19.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.
Files changed (65) hide show
  1. package/dist/cjs/api/fill-series.d.ts +18 -0
  2. package/dist/cjs/api/fill-series.d.ts.map +1 -1
  3. package/dist/cjs/api/fill-series.js +95 -1
  4. package/dist/cjs/atoms/cell-input-context.atom.d.ts.map +1 -1
  5. package/dist/cjs/atoms/fill-series-dialog.atom.d.ts +6 -0
  6. package/dist/cjs/atoms/fill-series-dialog.atom.d.ts.map +1 -1
  7. package/dist/cjs/atoms/frozen-area-sent.atom.d.ts +42 -0
  8. package/dist/cjs/atoms/frozen-area-sent.atom.d.ts.map +1 -0
  9. package/dist/cjs/atoms/frozen-area-sent.atom.js +29 -0
  10. package/dist/cjs/atoms/index.d.ts +2 -0
  11. package/dist/cjs/atoms/index.d.ts.map +1 -1
  12. package/dist/cjs/atoms/index.js +2 -0
  13. package/dist/cjs/atoms/undo-redo-sent.atom.d.ts +25 -0
  14. package/dist/cjs/atoms/undo-redo-sent.atom.d.ts.map +1 -0
  15. package/dist/cjs/atoms/undo-redo-sent.atom.js +23 -0
  16. package/dist/cjs/components/canvas-grid/frozen-start.d.ts +25 -10
  17. package/dist/cjs/components/canvas-grid/frozen-start.d.ts.map +1 -1
  18. package/dist/cjs/components/canvas-grid/frozen-start.js +25 -18
  19. package/dist/cjs/components/canvas-grid/index.d.ts.map +1 -1
  20. package/dist/cjs/components/canvas-grid/index.js +131 -24
  21. package/dist/cjs/components/canvas-grid/typings.d.ts +15 -0
  22. package/dist/cjs/components/canvas-grid/typings.d.ts.map +1 -1
  23. package/dist/cjs/components/fill-series-dialog/index.d.ts +10 -1
  24. package/dist/cjs/components/fill-series-dialog/index.d.ts.map +1 -1
  25. package/dist/cjs/components/fill-series-dialog/index.js +14 -4
  26. package/dist/cjs/hooks/use-selection-interceptors.d.ts.map +1 -1
  27. package/dist/cjs/hooks/use-selection-interceptors.js +9 -0
  28. package/dist/cjs/hooks/use-selection.d.ts +8 -1
  29. package/dist/cjs/hooks/use-selection.d.ts.map +1 -1
  30. package/dist/cjs/hooks/use-selection.js +39 -9
  31. package/dist/cjs/release-date.js +1 -1
  32. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  33. package/dist/esm/api/fill-series.d.ts +18 -0
  34. package/dist/esm/api/fill-series.d.ts.map +1 -1
  35. package/dist/esm/api/fill-series.js +89 -0
  36. package/dist/esm/atoms/cell-input-context.atom.d.ts.map +1 -1
  37. package/dist/esm/atoms/fill-series-dialog.atom.d.ts +6 -0
  38. package/dist/esm/atoms/fill-series-dialog.atom.d.ts.map +1 -1
  39. package/dist/esm/atoms/frozen-area-sent.atom.d.ts +42 -0
  40. package/dist/esm/atoms/frozen-area-sent.atom.d.ts.map +1 -0
  41. package/dist/esm/atoms/frozen-area-sent.atom.js +21 -0
  42. package/dist/esm/atoms/index.d.ts +2 -0
  43. package/dist/esm/atoms/index.d.ts.map +1 -1
  44. package/dist/esm/atoms/index.js +2 -0
  45. package/dist/esm/atoms/undo-redo-sent.atom.d.ts +25 -0
  46. package/dist/esm/atoms/undo-redo-sent.atom.d.ts.map +1 -0
  47. package/dist/esm/atoms/undo-redo-sent.atom.js +18 -0
  48. package/dist/esm/components/canvas-grid/frozen-start.d.ts +25 -10
  49. package/dist/esm/components/canvas-grid/frozen-start.d.ts.map +1 -1
  50. package/dist/esm/components/canvas-grid/frozen-start.js +25 -18
  51. package/dist/esm/components/canvas-grid/index.d.ts.map +1 -1
  52. package/dist/esm/components/canvas-grid/index.js +129 -22
  53. package/dist/esm/components/canvas-grid/typings.d.ts +15 -0
  54. package/dist/esm/components/canvas-grid/typings.d.ts.map +1 -1
  55. package/dist/esm/components/fill-series-dialog/index.d.ts +10 -1
  56. package/dist/esm/components/fill-series-dialog/index.d.ts.map +1 -1
  57. package/dist/esm/components/fill-series-dialog/index.js +14 -4
  58. package/dist/esm/hooks/use-selection-interceptors.d.ts.map +1 -1
  59. package/dist/esm/hooks/use-selection-interceptors.js +10 -1
  60. package/dist/esm/hooks/use-selection.d.ts +8 -1
  61. package/dist/esm/hooks/use-selection.d.ts.map +1 -1
  62. package/dist/esm/hooks/use-selection.js +35 -5
  63. package/dist/esm/release-date.js +1 -1
  64. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  65. package/package.json +2 -1
@@ -1 +1 @@
1
- {"root":["../../config.ts","../../helpers.ts","../../index.tsx","../../platform.ts","../../release-date.ts","../../test-setup.ts","../../themes.ts","../../types.ts","../../vitest.config.ts","../../api/animate.ts","../../api/autocomplete.ts","../../api/banded-ranges.ts","../../api/calculated-column-fill.ts","../../api/cf-data-bar.ts","../../api/cf-engine.ts","../../api/cf-icons.ts","../../api/cf-overlays.ts","../../api/cf-priority.ts","../../api/cf-window.ts","../../api/chart-sheet.ts","../../api/chart-source-ranges.ts","../../api/colors.ts","../../api/copy-paste.ts","../../api/editor-formula.ts","../../api/error-checking.ts","../../api/evaluate-formula.ts","../../api/excel-edit-value.ts","../../api/excel-validation-kinds.ts","../../api/fill-patterns.ts","../../api/fill-series.ts","../../api/font-loader.ts","../../api/go-to-special.ts","../../api/go-to.ts","../../api/heatmap.ts","../../api/index-ranges.ts","../../api/insert-options.ts","../../api/move-overwrite.ts","../../api/multi-selection.ts","../../api/scheduler.ts","../../api/scroller.ts","../../api/selections.ts","../../api/split-pane.ts","../../api/spreadsheet-api.ts","../../api/table-auto-expansion.ts","../../api/table.ts","../../api/validation-tooltip.tsx","../../api/validation.ts","../../atoms/active-editor.atom.ts","../../atoms/advanced-filter-dialog.atom.ts","../../atoms/calculated-column-fill.atom.ts","../../atoms/cell-editor-mode.atom.ts","../../atoms/cell-input-context.atom.ts","../../atoms/chart-actions.atom.ts","../../atoms/consolidate-dialog.atom.ts","../../atoms/copied-range.atom.ts","../../atoms/editing-cell.atom.ts","../../atoms/enter-key-direction.atom.ts","../../atoms/evaluate-formula-dialog.atom.ts","../../atoms/fill-options.atom.ts","../../atoms/fill-series-dialog.atom.ts","../../atoms/flash-fill-options.atom.ts","../../atoms/formula-bar-editor-value.atom.ts","../../atoms/formula-mode.atom.ts","../../atoms/formula-selection-state.atom.ts","../../atoms/formula-selections.atom.ts","../../atoms/go-to-dialog.atom.ts","../../atoms/goal-seek-dialog.atom.ts","../../atoms/index.ts","../../atoms/insert-cells-dialog.atom.ts","../../atoms/insert-options.atom.ts","../../atoms/loading-indicator.atom.ts","../../atoms/magic-fill-state.atom.ts","../../atoms/move-chart-dialog.atom.ts","../../atoms/move-overwrite-confirm.atom.ts","../../atoms/outline-settings-dialog.atom.ts","../../atoms/paste-menu.atom.ts","../../atoms/paste-special-dialog.atom.ts","../../atoms/persistent-tooltip.atom.ts","../../atoms/pick-list.atom.ts","../../atoms/popover.atom.ts","../../atoms/range-selector.atom.ts","../../atoms/remove-duplicates-dialog.atom.ts","../../atoms/selected-chart-embed.atom.ts","../../atoms/selected-chart-series.atom.ts","../../atoms/selected-object-formula.atom.ts","../../atoms/sheet-context.atom.ts","../../atoms/sheet-status-display.atom.ts","../../atoms/show-formula-help.atom.ts","../../atoms/sort-dialog.atom.ts","../../atoms/sparkline-dialog.atom.ts","../../atoms/spreadsheet-api.atom.ts","../../atoms/subtotal-dialog.atom.ts","../../atoms/table-auto-expansion.atom.ts","../../atoms/text-to-columns-dialog.atom.ts","../../atoms/validation-alert.atom.ts","../../atoms/watch-window.atom.ts","../../components/advanced-filter-dialog/index.tsx","../../components/autocorrect-options-smart-tag/index.tsx","../../components/bottom-bar/index.tsx","../../components/calculated-column-smart-tag/index.tsx","../../components/calculation-options-dialog/index.tsx","../../components/canvas-grid/frozen-start.ts","../../components/canvas-grid/helpers.ts","../../components/canvas-grid/index.tsx","../../components/canvas-grid/overflow.ts","../../components/canvas-grid/page-break-preview-styles.ts","../../components/canvas-grid/page-breaks.ts","../../components/canvas-grid/typings.ts","../../components/cell/alignment.ts","../../components/cell/cell-background.tsx","../../components/cell/cell-backgrounds.tsx","../../components/cell/cell-text-runs.tsx","../../components/cell/helpers.ts","../../components/cell/index.tsx","../../components/cell/line-height.ts","../../components/cell/number-format-layout.ts","../../components/cell/rich-text.ts","../../components/cell/typings.ts","../../components/cell-arrow/index.tsx","../../components/cell-calculated/index.tsx","../../components/cell-checkbox/index.tsx","../../components/cell-diff/index.tsx","../../components/cell-editor/calendar-popup.tsx","../../components/cell-editor/formula-result-preview.tsx","../../components/cell-editor/helpers.ts","../../components/cell-editor/index.tsx","../../components/cell-editor/style.tsx","../../components/cell-expand/index.tsx","../../components/cell-filter/index.tsx","../../components/cell-group/index.tsx","../../components/cell-indicator/index.tsx","../../components/cell-input/cell-input.tsx","../../components/cell-input/formula-bar-cell-input.tsx","../../components/cell-input/index.tsx","../../components/cell-input/style.tsx","../../components/cell-overlay/index.tsx","../../components/cell-structured/cell-image.tsx","../../components/cell-structured/image-geometry.ts","../../components/cell-structured/index.tsx","../../components/cell-structured/sparkline-math.ts","../../components/cell-structured/sparkline.tsx","../../components/cell-structured/types.ts","../../components/cell-tooltip/index.tsx","../../components/cell-tooltip/note-editor.tsx","../../components/cell-tooltip/style.tsx","../../components/cf-icon-preview/index.tsx","../../components/chart-sheet-view/index.tsx","../../components/consolidate-dialog/index.tsx","../../components/context-menu/embed-context-menu.tsx","../../components/context-menu/index.tsx","../../components/context-menu/menu.tsx","../../components/context-menu/style.tsx","../../components/context-menu/total-row-function-menu.tsx","../../components/context-menu/total-row-functions.ts","../../components/data-table-dialog/index.tsx","../../components/embeds/chart-component.tsx","../../components/embeds/embed-component.tsx","../../components/embeds/embed-draggable.tsx","../../components/embeds/index.tsx","../../components/embeds/linked-picture.tsx","../../components/embeds/object-cell-offset.ts","../../components/embeds/object-focus.ts","../../components/embeds/page-gaps.ts","../../components/embeds/pane-copy.tsx","../../components/embeds/shape-geometry.ts","../../components/embeds/shape-svg.tsx","../../components/embeds/slicer-component.tsx","../../components/embeds/text-box-view.tsx","../../components/error-check-smart-tag/index.tsx","../../components/evaluate-formula-dialog/index.tsx","../../components/fill-handle/index.tsx","../../components/fill-series-dialog/index.tsx","../../components/filter-box/date-tree.ts","../../components/filter-box/filter-by-color.tsx","../../components/filter-box/filter-by-condition.tsx","../../components/filter-box/filter-by-value.tsx","../../components/filter-box/index.tsx","../../components/flash-fill-options-smart-tag/index.tsx","../../components/floating-cell-editor/index.tsx","../../components/forecast-sheet-dialog/index.tsx","../../components/formula-bar/index.tsx","../../components/formula-bar/style.tsx","../../components/formula-input/index.tsx","../../components/go-to-dialog/index.tsx","../../components/goal-seek-dialog/index.tsx","../../components/grid-footer/index.tsx","../../components/header-cell/index.tsx","../../components/header-menu/index.tsx","../../components/header-move/index.tsx","../../components/header-resizer/index.tsx","../../components/hidden-markers/index.tsx","../../components/hidden-markers/style.tsx","../../components/insert-cells-dialog/index.tsx","../../components/insert-function-dialog/index.tsx","../../components/insert-options-smart-tag/index.tsx","../../components/loading-indicator/index.tsx","../../components/move-chart-dialog/index.tsx","../../components/move-overwrite-confirm-dialog/index.tsx","../../components/outline-gutter/index.tsx","../../components/outline-gutter/offsets.ts","../../components/outline-settings-dialog/index.tsx","../../components/page-layout-view/compute-page-layout.ts","../../components/page-layout-view/header-footer-codes.ts","../../components/page-layout-view/index.ts","../../components/page-layout-view/page-layout-chrome.tsx","../../components/paste-special-dialog/index.tsx","../../components/pivot-placeholder/index.tsx","../../components/print-preview/cell-styles.ts","../../components/print-preview/index.ts","../../components/print-preview/page-block.tsx","../../components/print-preview/page-break-preview.ts","../../components/print-preview/print-cells.ts","../../components/print-preview/print-comments.tsx","../../components/print-preview/print-preview-dialog.tsx","../../components/print-preview/run-print.ts","../../components/print-preview/settings.ts","../../components/print-preview/sheet-page-setup.ts","../../components/print-preview/use-page-layout.ts","../../components/protect-sheet-dialog/allow-edit-ranges-dialog.tsx","../../components/protect-sheet-dialog/constants.ts","../../components/protect-sheet-dialog/index.tsx","../../components/range-selector/index.tsx","../../components/remove-duplicates-dialog/index.tsx","../../components/resizer/index.tsx","../../components/scenario-manager-dialog/index.tsx","../../components/selection/avatar.tsx","../../components/selection/fill-options-menu.tsx","../../components/selection/index.tsx","../../components/selection/magic-fill.tsx","../../components/selection/paste-menu.tsx","../../components/selection/paste-options.ts","../../components/selection/quick-edit.tsx","../../components/selection/style.tsx","../../components/selection/suggestion-action.tsx","../../components/selection/title.tsx","../../components/selection/types.ts","../../components/selection-drop-menu/index.tsx","../../components/selection-input/index.tsx","../../components/selection-input/style.tsx","../../components/sheet-background/index.tsx","../../components/sheet-search/index.tsx","../../components/sheet-status/index.tsx","../../components/sheet-status/style.tsx","../../components/sheet-switcher/index.tsx","../../components/sheet-switcher/new-sheet-button.tsx","../../components/sheet-tabs/context-menu.tsx","../../components/sheet-tabs/index.tsx","../../components/sheet-tabs/sheet-tab.tsx","../../components/sheet-tabs/style.tsx","../../components/sheet-tabs/types.ts","../../components/solver-dialog/index.tsx","../../components/sort-range-dialog/index.tsx","../../components/sparkline-dialog/index.tsx","../../components/subtotal-dialog/index.tsx","../../components/table-auto-expansion-smart-tag/index.tsx","../../components/text-to-columns-dialog/index.tsx","../../components/toolbar/background-color-selector.tsx","../../components/toolbar/border-color-selector.tsx","../../components/toolbar/border-line-style-options.tsx","../../components/toolbar/border-line-style-selector.tsx","../../components/toolbar/border-location-options.tsx","../../components/toolbar/border-selector.tsx","../../components/toolbar/buttons.tsx","../../components/toolbar/cell-style-selector.tsx","../../components/toolbar/color-selector.tsx","../../components/toolbar/fill-selectors.tsx","../../components/toolbar/font-family-selector.tsx","../../components/toolbar/font-size-selector.tsx","../../components/toolbar/index.tsx","../../components/toolbar/insert-menu.tsx","../../components/toolbar/merge-cells-selector.tsx","../../components/toolbar/scale-selector.tsx","../../components/toolbar/sparkline-actions.tsx","../../components/toolbar/style.tsx","../../components/toolbar/table-actions.tsx","../../components/toolbar/table-style-editor.tsx","../../components/toolbar/table-style-selector.tsx","../../components/toolbar/text-color-selector.tsx","../../components/toolbar/text-format-selector.tsx","../../components/toolbar/text-horizontal-align-selector.tsx","../../components/toolbar/text-rotation-selector.tsx","../../components/toolbar/text-vertical-align-selector.tsx","../../components/toolbar/text-wrap-selector.tsx","../../components/toolbar/theme-selector.tsx","../../components/toolbar/toolbar.tsx","../../components/toolbar/types.ts","../../components/toolbar/view-menu.tsx","../../components/validation-alert-dialog/index.tsx","../../components/watch-window/index.tsx","../../helpers/merged-cell-borders.ts","../../hooks/export-range-tiles.ts","../../hooks/index.ts","../../hooks/object-clipboard-payload.ts","../../hooks/object-spec-schema.generated.ts","../../hooks/show-zeros.ts","../../hooks/use-async.ts","../../hooks/use-border-styles.ts","../../hooks/use-callback-ref.ts","../../hooks/use-cell-diff-highlight.ts","../../hooks/use-cell-popover.tsx","../../hooks/use-cell-renderer.tsx","../../hooks/use-chart-clipboard.ts","../../hooks/use-chart-source-ranges.ts","../../hooks/use-column-color-icons.ts","../../hooks/use-conditional-formatting.ts","../../hooks/use-context-menu.tsx","../../hooks/use-context-setter.ts","../../hooks/use-copy-paste-cut.tsx","../../hooks/use-create-address-from-selection.ts","../../hooks/use-create-formula-tokenizer.ts","../../hooks/use-delayed-value.ts","../../hooks/use-editable.tsx","../../hooks/use-editor-cancel.ts","../../hooks/use-editor-change.ts","../../hooks/use-editor-keydown.ts","../../hooks/use-editor-submit.ts","../../hooks/use-embeds-charts.tsx","../../hooks/use-expand-cell.tsx","../../hooks/use-export-range.ts","../../hooks/use-filter.ts","../../hooks/use-flash-fill-suggestion.ts","../../hooks/use-flash.ts","../../hooks/use-fonts.ts","../../hooks/use-formula-range-helpers.ts","../../hooks/use-get-tooltip.tsx","../../hooks/use-get-values-from-range.ts","../../hooks/use-grid-children.tsx","../../hooks/use-header-actions.tsx","../../hooks/use-hidden-dimension-markers.tsx","../../hooks/use-hidden-dimensions.ts","../../hooks/use-hovered-selection-ids.ts","../../hooks/use-isomorphic-layout-effect.ts","../../hooks/use-keyboard-handler.tsx","../../hooks/use-licensekey-validator.tsx","../../hooks/use-memo-compare.ts","../../hooks/use-merge.refs.ts","../../hooks/use-move-columns-rows.tsx","../../hooks/use-navigate-sheet-range.ts","../../hooks/use-previous.ts","../../hooks/use-raf.ts","../../hooks/use-resize-observer.ts","../../hooks/use-reveal-chart-embed.ts","../../hooks/use-scale-listener.ts","../../hooks/use-selected-rows-columns.ts","../../hooks/use-selection-aware-formatting.ts","../../hooks/use-selection-change.ts","../../hooks/use-selection-drag-copy.ts","../../hooks/use-selection-interceptors.ts","../../hooks/use-selection-move.ts","../../hooks/use-selection-renderer.tsx","../../hooks/use-selection-resize.ts","../../hooks/use-selection.ts","../../hooks/use-sheet-change-handler.ts","../../hooks/use-shown-notes.tsx","../../hooks/use-sizer.ts","../../hooks/use-spreadsheet-theme.ts","../../hooks/use-stable-ref.ts","../../hooks/use-structured-reference-selection.ts","../../hooks/use-table-hit-zones.ts","../../hooks/use-table-resizer.tsx","../../hooks/use-text-dimensions.ts","../../hooks/use-tooltip.ts","../../hooks/use-touch.ts","../../providers/spreadsheet-provider.tsx","../../signals/scroll-subscriber.ts","../../utils/copy-as-picture.ts","../../utils/maybe.ts","../../utils/pivot-chart-field-buttons.ts","../../utils/z-order.ts"],"version":"5.8.3"}
1
+ {"root":["../../config.ts","../../helpers.ts","../../index.tsx","../../platform.ts","../../release-date.ts","../../test-setup.ts","../../themes.ts","../../types.ts","../../vitest.config.ts","../../api/animate.ts","../../api/autocomplete.ts","../../api/banded-ranges.ts","../../api/calculated-column-fill.ts","../../api/cf-data-bar.ts","../../api/cf-engine.ts","../../api/cf-icons.ts","../../api/cf-overlays.ts","../../api/cf-priority.ts","../../api/cf-window.ts","../../api/chart-sheet.ts","../../api/chart-source-ranges.ts","../../api/colors.ts","../../api/copy-paste.ts","../../api/editor-formula.ts","../../api/error-checking.ts","../../api/evaluate-formula.ts","../../api/excel-edit-value.ts","../../api/excel-validation-kinds.ts","../../api/fill-patterns.ts","../../api/fill-series.ts","../../api/font-loader.ts","../../api/go-to-special.ts","../../api/go-to.ts","../../api/heatmap.ts","../../api/index-ranges.ts","../../api/insert-options.ts","../../api/move-overwrite.ts","../../api/multi-selection.ts","../../api/scheduler.ts","../../api/scroller.ts","../../api/selections.ts","../../api/split-pane.ts","../../api/spreadsheet-api.ts","../../api/table-auto-expansion.ts","../../api/table.ts","../../api/validation-tooltip.tsx","../../api/validation.ts","../../atoms/active-editor.atom.ts","../../atoms/advanced-filter-dialog.atom.ts","../../atoms/calculated-column-fill.atom.ts","../../atoms/cell-editor-mode.atom.ts","../../atoms/cell-input-context.atom.ts","../../atoms/chart-actions.atom.ts","../../atoms/consolidate-dialog.atom.ts","../../atoms/copied-range.atom.ts","../../atoms/editing-cell.atom.ts","../../atoms/enter-key-direction.atom.ts","../../atoms/evaluate-formula-dialog.atom.ts","../../atoms/fill-options.atom.ts","../../atoms/fill-series-dialog.atom.ts","../../atoms/flash-fill-options.atom.ts","../../atoms/formula-bar-editor-value.atom.ts","../../atoms/formula-mode.atom.ts","../../atoms/formula-selection-state.atom.ts","../../atoms/formula-selections.atom.ts","../../atoms/frozen-area-sent.atom.ts","../../atoms/go-to-dialog.atom.ts","../../atoms/goal-seek-dialog.atom.ts","../../atoms/index.ts","../../atoms/insert-cells-dialog.atom.ts","../../atoms/insert-options.atom.ts","../../atoms/loading-indicator.atom.ts","../../atoms/magic-fill-state.atom.ts","../../atoms/move-chart-dialog.atom.ts","../../atoms/move-overwrite-confirm.atom.ts","../../atoms/outline-settings-dialog.atom.ts","../../atoms/paste-menu.atom.ts","../../atoms/paste-special-dialog.atom.ts","../../atoms/persistent-tooltip.atom.ts","../../atoms/pick-list.atom.ts","../../atoms/popover.atom.ts","../../atoms/range-selector.atom.ts","../../atoms/remove-duplicates-dialog.atom.ts","../../atoms/selected-chart-embed.atom.ts","../../atoms/selected-chart-series.atom.ts","../../atoms/selected-object-formula.atom.ts","../../atoms/sheet-context.atom.ts","../../atoms/sheet-status-display.atom.ts","../../atoms/show-formula-help.atom.ts","../../atoms/sort-dialog.atom.ts","../../atoms/sparkline-dialog.atom.ts","../../atoms/spreadsheet-api.atom.ts","../../atoms/subtotal-dialog.atom.ts","../../atoms/table-auto-expansion.atom.ts","../../atoms/text-to-columns-dialog.atom.ts","../../atoms/undo-redo-sent.atom.ts","../../atoms/validation-alert.atom.ts","../../atoms/watch-window.atom.ts","../../components/advanced-filter-dialog/index.tsx","../../components/autocorrect-options-smart-tag/index.tsx","../../components/bottom-bar/index.tsx","../../components/calculated-column-smart-tag/index.tsx","../../components/calculation-options-dialog/index.tsx","../../components/canvas-grid/frozen-start.ts","../../components/canvas-grid/helpers.ts","../../components/canvas-grid/index.tsx","../../components/canvas-grid/overflow.ts","../../components/canvas-grid/page-break-preview-styles.ts","../../components/canvas-grid/page-breaks.ts","../../components/canvas-grid/typings.ts","../../components/cell/alignment.ts","../../components/cell/cell-background.tsx","../../components/cell/cell-backgrounds.tsx","../../components/cell/cell-text-runs.tsx","../../components/cell/helpers.ts","../../components/cell/index.tsx","../../components/cell/line-height.ts","../../components/cell/number-format-layout.ts","../../components/cell/rich-text.ts","../../components/cell/typings.ts","../../components/cell-arrow/index.tsx","../../components/cell-calculated/index.tsx","../../components/cell-checkbox/index.tsx","../../components/cell-diff/index.tsx","../../components/cell-editor/calendar-popup.tsx","../../components/cell-editor/formula-result-preview.tsx","../../components/cell-editor/helpers.ts","../../components/cell-editor/index.tsx","../../components/cell-editor/style.tsx","../../components/cell-expand/index.tsx","../../components/cell-filter/index.tsx","../../components/cell-group/index.tsx","../../components/cell-indicator/index.tsx","../../components/cell-input/cell-input.tsx","../../components/cell-input/formula-bar-cell-input.tsx","../../components/cell-input/index.tsx","../../components/cell-input/style.tsx","../../components/cell-overlay/index.tsx","../../components/cell-structured/cell-image.tsx","../../components/cell-structured/image-geometry.ts","../../components/cell-structured/index.tsx","../../components/cell-structured/sparkline-math.ts","../../components/cell-structured/sparkline.tsx","../../components/cell-structured/types.ts","../../components/cell-tooltip/index.tsx","../../components/cell-tooltip/note-editor.tsx","../../components/cell-tooltip/style.tsx","../../components/cf-icon-preview/index.tsx","../../components/chart-sheet-view/index.tsx","../../components/consolidate-dialog/index.tsx","../../components/context-menu/embed-context-menu.tsx","../../components/context-menu/index.tsx","../../components/context-menu/menu.tsx","../../components/context-menu/style.tsx","../../components/context-menu/total-row-function-menu.tsx","../../components/context-menu/total-row-functions.ts","../../components/data-table-dialog/index.tsx","../../components/embeds/chart-component.tsx","../../components/embeds/embed-component.tsx","../../components/embeds/embed-draggable.tsx","../../components/embeds/index.tsx","../../components/embeds/linked-picture.tsx","../../components/embeds/object-cell-offset.ts","../../components/embeds/object-focus.ts","../../components/embeds/page-gaps.ts","../../components/embeds/pane-copy.tsx","../../components/embeds/shape-geometry.ts","../../components/embeds/shape-svg.tsx","../../components/embeds/slicer-component.tsx","../../components/embeds/text-box-view.tsx","../../components/error-check-smart-tag/index.tsx","../../components/evaluate-formula-dialog/index.tsx","../../components/fill-handle/index.tsx","../../components/fill-series-dialog/index.tsx","../../components/filter-box/date-tree.ts","../../components/filter-box/filter-by-color.tsx","../../components/filter-box/filter-by-condition.tsx","../../components/filter-box/filter-by-value.tsx","../../components/filter-box/index.tsx","../../components/flash-fill-options-smart-tag/index.tsx","../../components/floating-cell-editor/index.tsx","../../components/forecast-sheet-dialog/index.tsx","../../components/formula-bar/index.tsx","../../components/formula-bar/style.tsx","../../components/formula-input/index.tsx","../../components/go-to-dialog/index.tsx","../../components/goal-seek-dialog/index.tsx","../../components/grid-footer/index.tsx","../../components/header-cell/index.tsx","../../components/header-menu/index.tsx","../../components/header-move/index.tsx","../../components/header-resizer/index.tsx","../../components/hidden-markers/index.tsx","../../components/hidden-markers/style.tsx","../../components/insert-cells-dialog/index.tsx","../../components/insert-function-dialog/index.tsx","../../components/insert-options-smart-tag/index.tsx","../../components/loading-indicator/index.tsx","../../components/move-chart-dialog/index.tsx","../../components/move-overwrite-confirm-dialog/index.tsx","../../components/outline-gutter/index.tsx","../../components/outline-gutter/offsets.ts","../../components/outline-settings-dialog/index.tsx","../../components/page-layout-view/compute-page-layout.ts","../../components/page-layout-view/header-footer-codes.ts","../../components/page-layout-view/index.ts","../../components/page-layout-view/page-layout-chrome.tsx","../../components/paste-special-dialog/index.tsx","../../components/pivot-placeholder/index.tsx","../../components/print-preview/cell-styles.ts","../../components/print-preview/index.ts","../../components/print-preview/page-block.tsx","../../components/print-preview/page-break-preview.ts","../../components/print-preview/print-cells.ts","../../components/print-preview/print-comments.tsx","../../components/print-preview/print-preview-dialog.tsx","../../components/print-preview/run-print.ts","../../components/print-preview/settings.ts","../../components/print-preview/sheet-page-setup.ts","../../components/print-preview/use-page-layout.ts","../../components/protect-sheet-dialog/allow-edit-ranges-dialog.tsx","../../components/protect-sheet-dialog/constants.ts","../../components/protect-sheet-dialog/index.tsx","../../components/range-selector/index.tsx","../../components/remove-duplicates-dialog/index.tsx","../../components/resizer/index.tsx","../../components/scenario-manager-dialog/index.tsx","../../components/selection/avatar.tsx","../../components/selection/fill-options-menu.tsx","../../components/selection/index.tsx","../../components/selection/magic-fill.tsx","../../components/selection/paste-menu.tsx","../../components/selection/paste-options.ts","../../components/selection/quick-edit.tsx","../../components/selection/style.tsx","../../components/selection/suggestion-action.tsx","../../components/selection/title.tsx","../../components/selection/types.ts","../../components/selection-drop-menu/index.tsx","../../components/selection-input/index.tsx","../../components/selection-input/style.tsx","../../components/sheet-background/index.tsx","../../components/sheet-search/index.tsx","../../components/sheet-status/index.tsx","../../components/sheet-status/style.tsx","../../components/sheet-switcher/index.tsx","../../components/sheet-switcher/new-sheet-button.tsx","../../components/sheet-tabs/context-menu.tsx","../../components/sheet-tabs/index.tsx","../../components/sheet-tabs/sheet-tab.tsx","../../components/sheet-tabs/style.tsx","../../components/sheet-tabs/types.ts","../../components/solver-dialog/index.tsx","../../components/sort-range-dialog/index.tsx","../../components/sparkline-dialog/index.tsx","../../components/subtotal-dialog/index.tsx","../../components/table-auto-expansion-smart-tag/index.tsx","../../components/text-to-columns-dialog/index.tsx","../../components/toolbar/background-color-selector.tsx","../../components/toolbar/border-color-selector.tsx","../../components/toolbar/border-line-style-options.tsx","../../components/toolbar/border-line-style-selector.tsx","../../components/toolbar/border-location-options.tsx","../../components/toolbar/border-selector.tsx","../../components/toolbar/buttons.tsx","../../components/toolbar/cell-style-selector.tsx","../../components/toolbar/color-selector.tsx","../../components/toolbar/fill-selectors.tsx","../../components/toolbar/font-family-selector.tsx","../../components/toolbar/font-size-selector.tsx","../../components/toolbar/index.tsx","../../components/toolbar/insert-menu.tsx","../../components/toolbar/merge-cells-selector.tsx","../../components/toolbar/scale-selector.tsx","../../components/toolbar/sparkline-actions.tsx","../../components/toolbar/style.tsx","../../components/toolbar/table-actions.tsx","../../components/toolbar/table-style-editor.tsx","../../components/toolbar/table-style-selector.tsx","../../components/toolbar/text-color-selector.tsx","../../components/toolbar/text-format-selector.tsx","../../components/toolbar/text-horizontal-align-selector.tsx","../../components/toolbar/text-rotation-selector.tsx","../../components/toolbar/text-vertical-align-selector.tsx","../../components/toolbar/text-wrap-selector.tsx","../../components/toolbar/theme-selector.tsx","../../components/toolbar/toolbar.tsx","../../components/toolbar/types.ts","../../components/toolbar/view-menu.tsx","../../components/validation-alert-dialog/index.tsx","../../components/watch-window/index.tsx","../../helpers/merged-cell-borders.ts","../../hooks/export-range-tiles.ts","../../hooks/index.ts","../../hooks/object-clipboard-payload.ts","../../hooks/object-spec-schema.generated.ts","../../hooks/show-zeros.ts","../../hooks/use-async.ts","../../hooks/use-border-styles.ts","../../hooks/use-callback-ref.ts","../../hooks/use-cell-diff-highlight.ts","../../hooks/use-cell-popover.tsx","../../hooks/use-cell-renderer.tsx","../../hooks/use-chart-clipboard.ts","../../hooks/use-chart-source-ranges.ts","../../hooks/use-column-color-icons.ts","../../hooks/use-conditional-formatting.ts","../../hooks/use-context-menu.tsx","../../hooks/use-context-setter.ts","../../hooks/use-copy-paste-cut.tsx","../../hooks/use-create-address-from-selection.ts","../../hooks/use-create-formula-tokenizer.ts","../../hooks/use-delayed-value.ts","../../hooks/use-editable.tsx","../../hooks/use-editor-cancel.ts","../../hooks/use-editor-change.ts","../../hooks/use-editor-keydown.ts","../../hooks/use-editor-submit.ts","../../hooks/use-embeds-charts.tsx","../../hooks/use-expand-cell.tsx","../../hooks/use-export-range.ts","../../hooks/use-filter.ts","../../hooks/use-flash-fill-suggestion.ts","../../hooks/use-flash.ts","../../hooks/use-fonts.ts","../../hooks/use-formula-range-helpers.ts","../../hooks/use-get-tooltip.tsx","../../hooks/use-get-values-from-range.ts","../../hooks/use-grid-children.tsx","../../hooks/use-header-actions.tsx","../../hooks/use-hidden-dimension-markers.tsx","../../hooks/use-hidden-dimensions.ts","../../hooks/use-hovered-selection-ids.ts","../../hooks/use-isomorphic-layout-effect.ts","../../hooks/use-keyboard-handler.tsx","../../hooks/use-licensekey-validator.tsx","../../hooks/use-memo-compare.ts","../../hooks/use-merge.refs.ts","../../hooks/use-move-columns-rows.tsx","../../hooks/use-navigate-sheet-range.ts","../../hooks/use-previous.ts","../../hooks/use-raf.ts","../../hooks/use-resize-observer.ts","../../hooks/use-reveal-chart-embed.ts","../../hooks/use-scale-listener.ts","../../hooks/use-selected-rows-columns.ts","../../hooks/use-selection-aware-formatting.ts","../../hooks/use-selection-change.ts","../../hooks/use-selection-drag-copy.ts","../../hooks/use-selection-interceptors.ts","../../hooks/use-selection-move.ts","../../hooks/use-selection-renderer.tsx","../../hooks/use-selection-resize.ts","../../hooks/use-selection.ts","../../hooks/use-sheet-change-handler.ts","../../hooks/use-shown-notes.tsx","../../hooks/use-sizer.ts","../../hooks/use-spreadsheet-theme.ts","../../hooks/use-stable-ref.ts","../../hooks/use-structured-reference-selection.ts","../../hooks/use-table-hit-zones.ts","../../hooks/use-table-resizer.tsx","../../hooks/use-text-dimensions.ts","../../hooks/use-tooltip.ts","../../hooks/use-touch.ts","../../providers/spreadsheet-provider.tsx","../../signals/scroll-subscriber.ts","../../utils/copy-as-picture.ts","../../utils/maybe.ts","../../utils/pivot-chart-field-buttons.ts","../../utils/z-order.ts"],"version":"5.8.3"}
@@ -1,5 +1,23 @@
1
1
  import type { GridRange } from "@rowsncolumns/grid";
2
2
  import type { FillSeriesSpec } from "../types";
3
+ /**
4
+ * The Series dialog's Stop value as the serial the spec carries, read the way a cell entry is read,
5
+ * for a host that does not parse it itself (`CanvasGrid`'s `parseCellEntryNumber`, which the rnc
6
+ * engine's hook answers with the cell-entry inference). `undefined` when the text is empty or would
7
+ * not be a number in a cell (text, a boolean).
8
+ * - A day / month without a year (`3/4`, `15/1`) follows the locale's order (3 April and 15 January
9
+ * in en-GB, 4 March in en-US), in the current year, as a cell entry does. Where the decimal mark is a
10
+ * comma, `1.5` is such a date too (1 May in de-DE).
11
+ * - A plain number is taken as it is (`45306`, `-2.5`, `1e3`; `1.5` where the decimal mark is `.`).
12
+ * - A date with a year, a date and time, or a time, in the locale (`15/1/2024` in en-GB,
13
+ * `15.1.2024` in de-DE, `Jan 15, 2024`, `2024-01-15`, `1/15/2024 12:00`, `10:30`). A date counts
14
+ * in the workbook's date system (1462 lower in a 1904 workbook); a time part is kept.
15
+ * - A number the locale writes otherwise: `2,5` in de-DE, `50%` (0.5), `1,000` (1000) and `$5` in en-US.
16
+ */
17
+ export declare const parseSeriesStopValue: (text: string, options?: {
18
+ locale?: string;
19
+ date1904?: boolean;
20
+ }) => number | undefined;
3
21
  /**
4
22
  * The seed line of a Series-dialog fill: Excel treats the target range's first
5
23
  * row (Series in Columns — filling down) or first column (Series in Rows —
@@ -1 +1 @@
1
- {"version":3,"file":"fill-series.d.ts","sourceRoot":"","sources":["../../../api/fill-series.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,SAAS,EACjB,MAAM,cAAc,KACnB,SAGyD,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,EAC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rB,oEAAoE;IACpE,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,GAAI,8DAOpC,0BAA0B,KAAG,SAAS,GAAG,SAwB3C,CAAC"}
@@ -1,3 +1,92 @@
1
+ import { parseDate, parseNumber, parseTime } from "numfmt";
2
+ /** Days from the 1900 date system's day zero to the 1904 system's (`DATE1904_OFFSET`). */
3
+ const DATE_1904_OFFSET = 1462;
4
+ /** A locale's day / month order and decimal mark, from `Intl` (en-US conventions on a bad tag). */
5
+ const localeEntryConventions = (locale) => {
6
+ try {
7
+ const order = new Intl.DateTimeFormat(locale, {
8
+ year: "numeric",
9
+ month: "numeric",
10
+ day: "numeric",
11
+ })
12
+ .formatToParts(new Date(2024, 11, 25))
13
+ .map((part) => part.type);
14
+ const decimal = new Intl.NumberFormat(locale)
15
+ .formatToParts(1.5)
16
+ .find((part) => part.type === "decimal")?.value ?? ".";
17
+ return {
18
+ monthFirst: order.indexOf("month") < order.indexOf("day"),
19
+ decimal,
20
+ };
21
+ }
22
+ catch {
23
+ return { monthFirst: true, decimal: "." };
24
+ }
25
+ };
26
+ /** Excel's serial for a calendar date (UTC arithmetic, the same in every timezone; from 1 March 1900). */
27
+ const calendarSerial = (year, month, day) => (Date.UTC(year, month - 1, day) - Date.UTC(1899, 11, 30)) / 86_400_000;
28
+ /**
29
+ * The Series dialog's Stop value as the serial the spec carries, read the way a cell entry is read,
30
+ * for a host that does not parse it itself (`CanvasGrid`'s `parseCellEntryNumber`, which the rnc
31
+ * engine's hook answers with the cell-entry inference). `undefined` when the text is empty or would
32
+ * not be a number in a cell (text, a boolean).
33
+ * - A day / month without a year (`3/4`, `15/1`) follows the locale's order (3 April and 15 January
34
+ * in en-GB, 4 March in en-US), in the current year, as a cell entry does. Where the decimal mark is a
35
+ * comma, `1.5` is such a date too (1 May in de-DE).
36
+ * - A plain number is taken as it is (`45306`, `-2.5`, `1e3`; `1.5` where the decimal mark is `.`).
37
+ * - A date with a year, a date and time, or a time, in the locale (`15/1/2024` in en-GB,
38
+ * `15.1.2024` in de-DE, `Jan 15, 2024`, `2024-01-15`, `1/15/2024 12:00`, `10:30`). A date counts
39
+ * in the workbook's date system (1462 lower in a 1904 workbook); a time part is kept.
40
+ * - A number the locale writes otherwise: `2,5` in de-DE, `50%` (0.5), `1,000` (1000) and `$5` in en-US.
41
+ */
42
+ export const parseSeriesStopValue = (text, options = {}) => {
43
+ const trimmed = text.trim();
44
+ if (!trimmed)
45
+ return undefined;
46
+ const { locale } = options;
47
+ const shift = options.date1904 ? DATE_1904_OFFSET : 0;
48
+ const { monthFirst, decimal } = localeEntryConventions(locale);
49
+ const yearless = /^(\d{1,2})([/.-])(\d{1,2})$/.exec(trimmed);
50
+ if (yearless && (yearless[2] !== "." || decimal === ",")) {
51
+ const first = Number(yearless[1]);
52
+ const second = Number(yearless[3]);
53
+ const [month, day] = monthFirst ? [first, second] : [second, first];
54
+ const year = new Date().getFullYear();
55
+ const date = new Date(Date.UTC(year, month - 1, day));
56
+ if (month >= 1 &&
57
+ month <= 12 &&
58
+ date.getUTCMonth() === month - 1 &&
59
+ date.getUTCDate() === day) {
60
+ return calendarSerial(year, month, day) - shift;
61
+ }
62
+ return undefined;
63
+ }
64
+ if (/^[+-]?\d+$/.test(trimmed) || decimal === ".") {
65
+ const number = Number(trimmed);
66
+ if (Number.isFinite(number))
67
+ return number;
68
+ }
69
+ const parseOptions = locale ? { locale } : undefined;
70
+ try {
71
+ const date = parseDate(trimmed, parseOptions);
72
+ if (date && typeof date.v === "number" && Number.isFinite(date.v)) {
73
+ return date.v - shift;
74
+ }
75
+ // A time alone is a fraction of a day, the same in both date systems.
76
+ const time = parseTime(trimmed, parseOptions);
77
+ if (time && typeof time.v === "number" && Number.isFinite(time.v)) {
78
+ return time.v;
79
+ }
80
+ const number = parseNumber(trimmed, parseOptions);
81
+ if (number && typeof number.v === "number" && Number.isFinite(number.v)) {
82
+ return number.v;
83
+ }
84
+ }
85
+ catch {
86
+ // numfmt throws on a malformed locale tag: the text is then refused.
87
+ }
88
+ return undefined;
89
+ };
1
90
  /**
2
91
  * The seed line of a Series-dialog fill: Excel treats the target range's first
3
92
  * row (Series in Columns — filling down) or first column (Series in Rows —
@@ -1 +1 @@
1
- {"version":3,"file":"cell-input-context.atom.d.ts","sourceRoot":"","sources":["../../../atoms/cell-input-context.atom.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,mBAAmB;;;;oBACyq6F,CAAC;qBAAwB,CAAC;;;;;;;;;;;CADpp6F,CAAC"}
1
+ {"version":3,"file":"cell-input-context.atom.d.ts","sourceRoot":"","sources":["../../../atoms/cell-input-context.atom.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,mBAAmB;;;;oBAC4m8F,CAAC;qBAAwB,CAAC;;;;;;;;;;;CADvl8F,CAAC"}
@@ -16,6 +16,12 @@ export type FillSeriesDialogRequest = {
16
16
  /** Pre-selected axis (a right-drag seeds it from the drag direction). */
17
17
  initialIn?: FillSeriesSpec["in"];
18
18
  onApply(spec: FillSeriesSpec): void;
19
+ /** The workbook's locale, for a date typed in Stop value. */
20
+ locale?: string;
21
+ /** The workbook's 1904 date system, for a date typed in Stop value. */
22
+ date1904?: boolean;
23
+ /** The host's cell-entry reading of Stop value (`CanvasGrid` `parseCellEntryNumber`). */
24
+ parseStop?(text: string): number | undefined;
19
25
  };
20
26
  export declare const fillSeriesDialogAtom: import("jotai").PrimitiveAtom<FillSeriesDialogRequest | null> & {
21
27
  init: FillSeriesDialogRequest | null;
@@ -1 +1 @@
1
- {"version":3,"file":"fill-series-dialog.atom.d.ts","sourceRoot":"","sources":["../../../atoms/fill-series-dialog.atom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAA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,CAAC;IAChB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yFAAyF;IACzF,SAAS,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,oBAAoB;;CAA6C,CAAC;AAE/E,eAAO,MAAM,wBAAwB,uKAAsC,CAAC;AAE5E,oEAAoE;AACpE,eAAO,MAAM,uBAAuB,kBAGtB,uBAAuB,SAGpC,CAAC"}
@@ -0,0 +1,42 @@
1
+ /** One axis of a freeze as it is sent: how many lines, and the first of them (absent = line 1). */
2
+ export type FrozenAxisSent = {
3
+ count?: number;
4
+ start?: number | null;
5
+ };
6
+ /**
7
+ * The last Freeze Panes / unfreeze this window itself sent, counted, with the area it asked for.
8
+ * `CanvasGrid` reads it so that only this window's own freeze or unfreeze places its view the way a
9
+ * Freeze Panes does (a frozen start, demo-app-monorepo#57258 W-5); the same change arriving from
10
+ * another window keeps the view's first line instead.
11
+ *
12
+ * Set by the engine hook wherever it sends one (`useSpreadsheetEngine`'s `onFreezeRow`,
13
+ * `onFreezeColumn`, and an `onUpdateSheet` that carries frozen counts or starts), by the legacy
14
+ * `useSpreadsheetState` freeze, and by `CanvasGrid`'s own menu, so a host whose ribbon calls those
15
+ * needs nothing more. A host that sends the command some other way calls `useNoteFrozenAreaSent()`
16
+ * right before it.
17
+ */
18
+ export declare const frozenAreaSentAtom: import("jotai").PrimitiveAtom<{
19
+ seq: number;
20
+ sheetId: number;
21
+ rows?: FrozenAxisSent;
22
+ columns?: FrozenAxisSent;
23
+ } | null> & {
24
+ init: {
25
+ seq: number;
26
+ sheetId: number;
27
+ rows?: FrozenAxisSent;
28
+ columns?: FrozenAxisSent;
29
+ } | null;
30
+ };
31
+ export declare const useFrozenAreaSentValue: () => {
32
+ seq: number;
33
+ sheetId: number;
34
+ rows?: FrozenAxisSent;
35
+ columns?: FrozenAxisSent;
36
+ } | null;
37
+ /** Say "the next frozen-area change on this sheet is my own freeze" (see {@link frozenAreaSentAtom}). */
38
+ export declare const useNoteFrozenAreaSent: () => (sheetId: number, area: {
39
+ rows?: FrozenAxisSent;
40
+ columns?: FrozenAxisSent;
41
+ }) => void;
42
+ //# sourceMappingURL=frozen-area-sent.atom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frozen-area-sent.atom.d.ts","sourceRoot":"","sources":["../../../atoms/frozen-area-sent.atom.ts"],"names":[],"mappings":"AAGA,mGAAmG;AACnG,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAEvE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB;SACxB,MAAM;aACF,MAAM;WACR,cAAc;cACX,cAAc;;;aAHnB,MAAM;iBACF,MAAM;eACR,cAAc;kBACX,cAAc;;CACX,CAAC;AAEhB,eAAO,MAAM,sBAAsB;SAN5B,MAAM;aACF,MAAM;WACR,cAAc;cACX,cAAc;QAGkD,CAAC;AAE7E,yGAAyG;AACzG,eAAO,MAAM,qBAAqB,kBAGpB,MAAM,QAAQ;IAAE,IAAI,CAAC,EAAE,cAAc,CAAC;IAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,SAI9E,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { atom, useAtomValue, useSetAtom } from "jotai";
2
+ import { useCallback } from "react";
3
+ /**
4
+ * The last Freeze Panes / unfreeze this window itself sent, counted, with the area it asked for.
5
+ * `CanvasGrid` reads it so that only this window's own freeze or unfreeze places its view the way a
6
+ * Freeze Panes does (a frozen start, demo-app-monorepo#57258 W-5); the same change arriving from
7
+ * another window keeps the view's first line instead.
8
+ *
9
+ * Set by the engine hook wherever it sends one (`useSpreadsheetEngine`'s `onFreezeRow`,
10
+ * `onFreezeColumn`, and an `onUpdateSheet` that carries frozen counts or starts), by the legacy
11
+ * `useSpreadsheetState` freeze, and by `CanvasGrid`'s own menu, so a host whose ribbon calls those
12
+ * needs nothing more. A host that sends the command some other way calls `useNoteFrozenAreaSent()`
13
+ * right before it.
14
+ */
15
+ export const frozenAreaSentAtom = atom(null);
16
+ export const useFrozenAreaSentValue = () => useAtomValue(frozenAreaSentAtom);
17
+ /** Say "the next frozen-area change on this sheet is my own freeze" (see {@link frozenAreaSentAtom}). */
18
+ export const useNoteFrozenAreaSent = () => {
19
+ const set = useSetAtom(frozenAreaSentAtom);
20
+ return useCallback((sheetId, area) => set((previous) => ({ seq: (previous?.seq ?? 0) + 1, sheetId, ...area })), [set]);
21
+ };
@@ -35,6 +35,8 @@ export * from "./insert-cells-dialog.atom";
35
35
  export * from "./insert-options.atom";
36
36
  export * from "./chart-actions.atom";
37
37
  export * from "./table-auto-expansion.atom";
38
+ export * from "./undo-redo-sent.atom";
39
+ export * from "./frozen-area-sent.atom";
38
40
  export * from "./flash-fill-options.atom";
39
41
  export * from "./calculated-column-fill.atom";
40
42
  export * from "./sparkline-dialog.atom";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../atoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;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AC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC"}
@@ -35,6 +35,8 @@ export * from "./insert-cells-dialog.atom";
35
35
  export * from "./insert-options.atom";
36
36
  export * from "./chart-actions.atom";
37
37
  export * from "./table-auto-expansion.atom";
38
+ export * from "./undo-redo-sent.atom";
39
+ export * from "./frozen-area-sent.atom";
38
40
  export * from "./flash-fill-options.atom";
39
41
  export * from "./calculated-column-fill.atom";
40
42
  export * from "./sparkline-dialog.atom";
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The last undo / redo this window itself sent, counted. `CanvasGrid` reads it so that only this
3
+ * window's own undo or redo of its own Freeze Panes moves its view (a frozen start, demo-app-monorepo
4
+ * #57258 W-5); a change that arrives from another window never does.
5
+ *
6
+ * Set by the engines' undo / redo (`useSpreadsheetEngine`'s `onUndo` / `onRedo` / `undo` / `redo`) and
7
+ * by `CanvasGrid`'s own ⌘Z / ⇧⌘Z, so a host that calls those needs nothing more. A host that runs undo
8
+ * some other way (its own engine call) calls `useNoteUndoRedoSent()` right before it.
9
+ */
10
+ export declare const undoRedoSentAtom: import("jotai").PrimitiveAtom<{
11
+ kind: "undo" | "redo";
12
+ seq: number;
13
+ } | null> & {
14
+ init: {
15
+ kind: "undo" | "redo";
16
+ seq: number;
17
+ } | null;
18
+ };
19
+ export declare const useUndoRedoSentValue: () => {
20
+ kind: "undo" | "redo";
21
+ seq: number;
22
+ } | null;
23
+ /** Say "the next change is my own undo / redo" (see {@link undoRedoSentAtom}). */
24
+ export declare const useNoteUndoRedoSent: () => (kind: "undo" | "redo") => void;
25
+ //# sourceMappingURL=undo-redo-sent.atom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undo-redo-sent.atom.d.ts","sourceRoot":"","sources":["../../../atoms/undo-redo-sent.atom.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;UAAgB,MAAM,GAAG,MAAM;SAAO,MAAM;;;cAA5B,MAAM,GAAG,MAAM;aAAO,MAAM;;CAAgB,CAAC;AAE1F,eAAO,MAAM,oBAAoB;UAFY,MAAM,GAAG,MAAM;SAAO,MAAM;QAED,CAAC;AAEzE,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,eAGrB,MAAM,GAAG,MAAM,SAGzB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { atom, useAtomValue, useSetAtom } from "jotai";
2
+ import { useCallback } from "react";
3
+ /**
4
+ * The last undo / redo this window itself sent, counted. `CanvasGrid` reads it so that only this
5
+ * window's own undo or redo of its own Freeze Panes moves its view (a frozen start, demo-app-monorepo
6
+ * #57258 W-5); a change that arrives from another window never does.
7
+ *
8
+ * Set by the engines' undo / redo (`useSpreadsheetEngine`'s `onUndo` / `onRedo` / `undo` / `redo`) and
9
+ * by `CanvasGrid`'s own ⌘Z / ⇧⌘Z, so a host that calls those needs nothing more. A host that runs undo
10
+ * some other way (its own engine call) calls `useNoteUndoRedoSent()` right before it.
11
+ */
12
+ export const undoRedoSentAtom = atom(null);
13
+ export const useUndoRedoSentValue = () => useAtomValue(undoRedoSentAtom);
14
+ /** Say "the next change is my own undo / redo" (see {@link undoRedoSentAtom}). */
15
+ export const useNoteUndoRedoSent = () => {
16
+ const set = useSetAtom(undoRedoSentAtom);
17
+ return useCallback((kind) => set((previous) => ({ kind, seq: (previous?.seq ?? 0) + 1 })), [set]);
18
+ };
@@ -79,12 +79,21 @@ export type FrozenAxis = {
79
79
  lines: number;
80
80
  count: number;
81
81
  };
82
- /** A freeze or unfreeze this window sent and has not seen arrive yet. */
82
+ /**
83
+ * What this window just sent that may change the frozen area: a freeze or unfreeze (with the area
84
+ * it asked for and where the view was), or an undo / redo. Read by the next change on the axis,
85
+ * whatever it turns out to be, and dropped then.
86
+ */
83
87
  export type PendingFreeze = {
88
+ kind: "freeze";
84
89
  expected: FrozenAxis;
85
90
  scrollBefore: number;
91
+ } | {
92
+ kind: "undo";
93
+ } | {
94
+ kind: "redo";
86
95
  };
87
- /** The last freeze or unfreeze from a start this window made: its undo and redo are this window's. */
96
+ /** The last freeze or unfreeze from a start this window made, while nothing else has changed the area. */
88
97
  export type LocalFreeze = {
89
98
  before: FrozenAxis;
90
99
  after: FrozenAxis;
@@ -102,14 +111,20 @@ export type FrozenViewSnapshot = {
102
111
  * (demo-app-monorepo#57258 W-5). `undefined` = leave the scroll position as it is (every change
103
112
  * without a start, as before).
104
113
  *
105
- * - **A freeze or unfreeze this window sent** (`pending`, matched by the area it asked for): freezing
106
- * from a start puts the scrolling area right below the band (0); unfreezing keeps the start's line
107
- * first on screen. This window's next undo / redo of it is remembered (`local`).
108
- * - **This window's undo of that change** (the area goes back from `local.after` to `local.before`):
109
- * back where the window was before the change. Its redo: as the change itself.
110
- * - **Anything else** (another window's freeze, unfreeze, undo or redo): the same line stays first on
111
- * screen, at the same depth; the scroll moves by the band's change. When that line now lies in the
112
- * band or above the start it cannot stay: the view lands on the first scrolling line (0).
114
+ * The rule: **a window's view is repositioned only by a freeze, unfreeze, undo or redo that this
115
+ * window itself just sent, and by nothing else.** `pending` is what this window just sent; the change
116
+ * that follows reads it and drops it, matched or not.
117
+ *
118
+ * - **This window's freeze or unfreeze** (`pending.kind` "freeze", and the area is the one it asked
119
+ * for): freezing from a start puts the scrolling area right below the band (0); unfreezing keeps
120
+ * the start's line first on screen. Remembered as `local`, for this window's undo / redo of it.
121
+ * - **This window's undo** (`pending.kind` "undo", taking the area from `local.after` back to
122
+ * `local.before`): back where the view was before the freeze. Its **redo**: as the freeze did.
123
+ * - **Anything else** (another window's freeze, unfreeze, undo or redo, or a change that does not
124
+ * match what this window sent): the same line stays first on screen, at the same depth; the scroll
125
+ * moves by the band's change. When that line now lies in the band or above the start it cannot
126
+ * stay: the view lands on the first scrolling line (0). `local` is forgotten: a later change of the
127
+ * same shape is someone else's.
113
128
  *
114
129
  * `offset(index)` is a line's offset in the NEW layout; scroll positions are measured from the first
115
130
  * scrolling line, as the grid's are.
@@ -1 +1 @@
1
- {"version":3,"file":"frozen-start.d.ts","sourceRoot":"","sources":["../../../../components/canvas-grid/frozen-start.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEpF;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,aAAa,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,WAAW,MAAM,KAChB,MAOF,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,EAAE,YAAY,MAAM,YACf,CAAC;AAEtD,uGAAuG;AACvG,eAAO,MAAM,wBAAwB,GACnC,MAAM,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EAC/B,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C,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACnC,KAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,WAAW,CAAA;CAgC5D,CAAC"}
@@ -172,14 +172,20 @@ const sameAxis = (a, b) => a.lines === b.lines && a.count === b.count;
172
172
  * (demo-app-monorepo#57258 W-5). `undefined` = leave the scroll position as it is (every change
173
173
  * without a start, as before).
174
174
  *
175
- * - **A freeze or unfreeze this window sent** (`pending`, matched by the area it asked for): freezing
176
- * from a start puts the scrolling area right below the band (0); unfreezing keeps the start's line
177
- * first on screen. This window's next undo / redo of it is remembered (`local`).
178
- * - **This window's undo of that change** (the area goes back from `local.after` to `local.before`):
179
- * back where the window was before the change. Its redo: as the change itself.
180
- * - **Anything else** (another window's freeze, unfreeze, undo or redo): the same line stays first on
181
- * screen, at the same depth; the scroll moves by the band's change. When that line now lies in the
182
- * band or above the start it cannot stay: the view lands on the first scrolling line (0).
175
+ * The rule: **a window's view is repositioned only by a freeze, unfreeze, undo or redo that this
176
+ * window itself just sent, and by nothing else.** `pending` is what this window just sent; the change
177
+ * that follows reads it and drops it, matched or not.
178
+ *
179
+ * - **This window's freeze or unfreeze** (`pending.kind` "freeze", and the area is the one it asked
180
+ * for): freezing from a start puts the scrolling area right below the band (0); unfreezing keeps
181
+ * the start's line first on screen. Remembered as `local`, for this window's undo / redo of it.
182
+ * - **This window's undo** (`pending.kind` "undo", taking the area from `local.after` back to
183
+ * `local.before`): back where the view was before the freeze. Its **redo**: as the freeze did.
184
+ * - **Anything else** (another window's freeze, unfreeze, undo or redo, or a change that does not
185
+ * match what this window sent): the same line stays first on screen, at the same depth; the scroll
186
+ * moves by the band's change. When that line now lies in the band or above the start it cannot
187
+ * stay: the view lands on the first scrolling line (0). `local` is forgotten: a later change of the
188
+ * same shape is someone else's.
183
189
  *
184
190
  * `offset(index)` is a line's offset in the NEW layout; scroll positions are measured from the first
185
191
  * scrolling line, as the grid's are.
@@ -197,26 +203,27 @@ export const frozenStartScroll = ({ before, after, pending, local, snapshot, off
197
203
  }
198
204
  return undefined;
199
205
  };
200
- if (pending && sameAxis(after, pending.expected)) {
206
+ const consumed = pending !== undefined;
207
+ if (pending?.kind === "freeze" && sameAxis(after, pending.expected)) {
201
208
  return {
202
209
  scroll: asSent(),
203
- consumed: true,
210
+ consumed,
204
211
  local: withStart ? { before, after, scrollBefore: pending.scrollBefore } : undefined,
205
212
  };
206
213
  }
207
- if (local && sameAxis(before, local.after) && sameAxis(after, local.before)) {
208
- return { scroll: local.scrollBefore, consumed: false, local };
214
+ if (pending?.kind === "undo" && local && sameAxis(before, local.after) && sameAxis(after, local.before)) {
215
+ return { scroll: local.scrollBefore, consumed, local };
209
216
  }
210
- if (local && sameAxis(before, local.before) && sameAxis(after, local.after)) {
211
- return { scroll: asSent(), consumed: false, local };
217
+ if (pending?.kind === "redo" && local && sameAxis(before, local.before) && sameAxis(after, local.after)) {
218
+ return { scroll: asSent(), consumed, local };
212
219
  }
213
220
  if (!withStart || !snapshot)
214
- return { consumed: false, local };
221
+ return { consumed, local: undefined };
215
222
  if (snapshot.topLine < firstScrolling)
216
- return { scroll: 0, consumed: false, local };
223
+ return { scroll: 0, consumed, local: undefined };
217
224
  return {
218
225
  scroll: Math.max(0, offset(snapshot.topLine) + snapshot.intoLine - offset(firstScrolling)),
219
- consumed: false,
220
- local,
226
+ consumed,
227
+ local: undefined,
221
228
  };
222
229
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/canvas-grid/index.tsx"],"names":[],"mappings":"AAqEA,OAAO,KASN,MAAM,OAAO,CAAC;AAqRf,OAAO,KAAK,EAGV,QAAQ,EAcT,MAAM,aAAa,CAAC;AA0DrB,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EAEhB,MAAM,WAAW,CAAC;AA4mQnB,eAAO,MAAM,UAAU,EAA4C,CACjE,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,EAEvB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GACvB,wBAAwB,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAChE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/canvas-grid/index.tsx"],"names":[],"mappings":"AAqEA,OAAO,KASN,MAAM,OAAO,CAAC;AAuRf,OAAO,KAAK,EAGV,QAAQ,EAcT,MAAM,aAAa,CAAC;AA0DrB,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EAEhB,MAAM,WAAW,CAAC;AAkuQnB,eAAO,MAAM,UAAU,EAA4C,CACjE,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,EAEvB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GACvB,wBAAwB,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAChE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC"}