@mog-sdk/spreadsheet-contracts 0.1.12
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/dist/accessibility/index.d.ts +9 -0
- package/dist/accessibility/index.d.ts.map +1 -0
- package/dist/accessibility/types.d.ts +75 -0
- package/dist/accessibility/types.d.ts.map +1 -0
- package/dist/actions/comments.d.ts +31 -0
- package/dist/actions/comments.d.ts.map +1 -0
- package/dist/actions/index.d.ts +22 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/types.d.ts +448 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/actors/chart.d.ts +88 -0
- package/dist/actors/chart.d.ts.map +1 -0
- package/dist/actors/clipboard.d.ts +243 -0
- package/dist/actors/clipboard.d.ts.map +1 -0
- package/dist/actors/commands.d.ts +1343 -0
- package/dist/actors/commands.d.ts.map +1 -0
- package/dist/actors/comment.d.ts +84 -0
- package/dist/actors/comment.d.ts.map +1 -0
- package/dist/actors/draw-border.d.ts +89 -0
- package/dist/actors/draw-border.d.ts.map +1 -0
- package/dist/actors/editor.d.ts +161 -0
- package/dist/actors/editor.d.ts.map +1 -0
- package/dist/actors/find-replace.d.ts +88 -0
- package/dist/actors/find-replace.d.ts.map +1 -0
- package/dist/actors/focus.d.ts +91 -0
- package/dist/actors/focus.d.ts.map +1 -0
- package/dist/actors/index.d.ts +88 -0
- package/dist/actors/index.d.ts.map +1 -0
- package/dist/actors/input.d.ts +98 -0
- package/dist/actors/input.d.ts.map +1 -0
- package/dist/actors/object-interaction.d.ts +163 -0
- package/dist/actors/object-interaction.d.ts.map +1 -0
- package/dist/actors/object.d.ts +124 -0
- package/dist/actors/object.d.ts.map +1 -0
- package/dist/actors/page-break.d.ts +64 -0
- package/dist/actors/page-break.d.ts.map +1 -0
- package/dist/actors/pane-focus.d.ts +56 -0
- package/dist/actors/pane-focus.d.ts.map +1 -0
- package/dist/actors/renderer.d.ts +197 -0
- package/dist/actors/renderer.d.ts.map +1 -0
- package/dist/actors/selection.d.ts +170 -0
- package/dist/actors/selection.d.ts.map +1 -0
- package/dist/actors/slicer.d.ts +175 -0
- package/dist/actors/slicer.d.ts.map +1 -0
- package/dist/actors/smartart.d.ts +48 -0
- package/dist/actors/smartart.d.ts.map +1 -0
- package/dist/api/index.d.ts +19 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/mutation-receipt.d.ts +26 -0
- package/dist/api/mutation-receipt.d.ts.map +1 -0
- package/dist/api/types.d.ts +1542 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/workbook/history.d.ts +43 -0
- package/dist/api/workbook/history.d.ts.map +1 -0
- package/dist/api/workbook/index.d.ts +17 -0
- package/dist/api/workbook/index.d.ts.map +1 -0
- package/dist/api/workbook/names.d.ts +104 -0
- package/dist/api/workbook/names.d.ts.map +1 -0
- package/dist/api/workbook/notifications.d.ts +35 -0
- package/dist/api/workbook/notifications.d.ts.map +1 -0
- package/dist/api/workbook/protection.d.ts +14 -0
- package/dist/api/workbook/protection.d.ts.map +1 -0
- package/dist/api/workbook/scenarios.d.ts +45 -0
- package/dist/api/workbook/scenarios.d.ts.map +1 -0
- package/dist/api/workbook/sheets.d.ts +74 -0
- package/dist/api/workbook/sheets.d.ts.map +1 -0
- package/dist/api/workbook/slicers.d.ts +63 -0
- package/dist/api/workbook/slicers.d.ts.map +1 -0
- package/dist/api/workbook/styles.d.ts +19 -0
- package/dist/api/workbook/styles.d.ts.map +1 -0
- package/dist/api/workbook/theme.d.ts +38 -0
- package/dist/api/workbook/theme.d.ts.map +1 -0
- package/dist/api/workbook/viewport.d.ts +85 -0
- package/dist/api/workbook/viewport.d.ts.map +1 -0
- package/dist/api/workbook.d.ts +279 -0
- package/dist/api/workbook.d.ts.map +1 -0
- package/dist/api/worksheet/bindings.d.ts +66 -0
- package/dist/api/worksheet/bindings.d.ts.map +1 -0
- package/dist/api/worksheet/changes.d.ts +60 -0
- package/dist/api/worksheet/changes.d.ts.map +1 -0
- package/dist/api/worksheet/charts.d.ts +83 -0
- package/dist/api/worksheet/charts.d.ts.map +1 -0
- package/dist/api/worksheet/collections/connector-collection.d.ts +7 -0
- package/dist/api/worksheet/collections/connector-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/drawing-collection.d.ts +9 -0
- package/dist/api/worksheet/collections/drawing-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/equation-collection.d.ts +8 -0
- package/dist/api/worksheet/collections/equation-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/index.d.ts +12 -0
- package/dist/api/worksheet/collections/index.d.ts.map +1 -0
- package/dist/api/worksheet/collections/object-collection.d.ts +45 -0
- package/dist/api/worksheet/collections/object-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/picture-collection.d.ts +8 -0
- package/dist/api/worksheet/collections/picture-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/shape-collection.d.ts +8 -0
- package/dist/api/worksheet/collections/shape-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/textbox-collection.d.ts +8 -0
- package/dist/api/worksheet/collections/textbox-collection.d.ts.map +1 -0
- package/dist/api/worksheet/collections/wordart-collection.d.ts +8 -0
- package/dist/api/worksheet/collections/wordart-collection.d.ts.map +1 -0
- package/dist/api/worksheet/comments.d.ts +143 -0
- package/dist/api/worksheet/comments.d.ts.map +1 -0
- package/dist/api/worksheet/conditional-formats.d.ts +101 -0
- package/dist/api/worksheet/conditional-formats.d.ts.map +1 -0
- package/dist/api/worksheet/filters.d.ts +141 -0
- package/dist/api/worksheet/filters.d.ts.map +1 -0
- package/dist/api/worksheet/form-controls.d.ts +22 -0
- package/dist/api/worksheet/form-controls.d.ts.map +1 -0
- package/dist/api/worksheet/format-mappings.d.ts +50 -0
- package/dist/api/worksheet/format-mappings.d.ts.map +1 -0
- package/dist/api/worksheet/formats.d.ts +136 -0
- package/dist/api/worksheet/formats.d.ts.map +1 -0
- package/dist/api/worksheet/handles/chart-handle.d.ts +11 -0
- package/dist/api/worksheet/handles/chart-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/connector-handle.d.ts +9 -0
- package/dist/api/worksheet/handles/connector-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/drawing-handle.d.ts +14 -0
- package/dist/api/worksheet/handles/drawing-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/equation-handle.d.ts +9 -0
- package/dist/api/worksheet/handles/equation-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/floating-object-handle.d.ts +75 -0
- package/dist/api/worksheet/handles/floating-object-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/index.d.ts +16 -0
- package/dist/api/worksheet/handles/index.d.ts.map +1 -0
- package/dist/api/worksheet/handles/ole-object-handle.d.ts +10 -0
- package/dist/api/worksheet/handles/ole-object-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/picture-handle.d.ts +9 -0
- package/dist/api/worksheet/handles/picture-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/shape-handle.d.ts +11 -0
- package/dist/api/worksheet/handles/shape-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/slicer-handle.d.ts +13 -0
- package/dist/api/worksheet/handles/slicer-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/smartart-handle.d.ts +11 -0
- package/dist/api/worksheet/handles/smartart-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/textbox-handle.d.ts +9 -0
- package/dist/api/worksheet/handles/textbox-handle.d.ts.map +1 -0
- package/dist/api/worksheet/handles/wordart-handle.d.ts +10 -0
- package/dist/api/worksheet/handles/wordart-handle.d.ts.map +1 -0
- package/dist/api/worksheet/hyperlinks.d.ts +52 -0
- package/dist/api/worksheet/hyperlinks.d.ts.map +1 -0
- package/dist/api/worksheet/index.d.ts +35 -0
- package/dist/api/worksheet/index.d.ts.map +1 -0
- package/dist/api/worksheet/internal.d.ts +105 -0
- package/dist/api/worksheet/internal.d.ts.map +1 -0
- package/dist/api/worksheet/layout.d.ts +150 -0
- package/dist/api/worksheet/layout.d.ts.map +1 -0
- package/dist/api/worksheet/names.d.ts +52 -0
- package/dist/api/worksheet/names.d.ts.map +1 -0
- package/dist/api/worksheet/objects.d.ts +124 -0
- package/dist/api/worksheet/objects.d.ts.map +1 -0
- package/dist/api/worksheet/outline.d.ts +101 -0
- package/dist/api/worksheet/outline.d.ts.map +1 -0
- package/dist/api/worksheet/pivots.d.ts +257 -0
- package/dist/api/worksheet/pivots.d.ts.map +1 -0
- package/dist/api/worksheet/print.d.ts +108 -0
- package/dist/api/worksheet/print.d.ts.map +1 -0
- package/dist/api/worksheet/protection.d.ts +73 -0
- package/dist/api/worksheet/protection.d.ts.map +1 -0
- package/dist/api/worksheet/settings.d.ts +54 -0
- package/dist/api/worksheet/settings.d.ts.map +1 -0
- package/dist/api/worksheet/slicers.d.ts +101 -0
- package/dist/api/worksheet/slicers.d.ts.map +1 -0
- package/dist/api/worksheet/smartart.d.ts +49 -0
- package/dist/api/worksheet/smartart.d.ts.map +1 -0
- package/dist/api/worksheet/sparklines.d.ts +143 -0
- package/dist/api/worksheet/sparklines.d.ts.map +1 -0
- package/dist/api/worksheet/structure.d.ts +44 -0
- package/dist/api/worksheet/structure.d.ts.map +1 -0
- package/dist/api/worksheet/tables.d.ts +313 -0
- package/dist/api/worksheet/tables.d.ts.map +1 -0
- package/dist/api/worksheet/validation.d.ts +101 -0
- package/dist/api/worksheet/validation.d.ts.map +1 -0
- package/dist/api/worksheet/view.d.ts +91 -0
- package/dist/api/worksheet/view.d.ts.map +1 -0
- package/dist/api/worksheet.d.ts +370 -0
- package/dist/api/worksheet.d.ts.map +1 -0
- package/dist/app/index.d.ts +17 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/types.d.ts +349 -0
- package/dist/app/types.d.ts.map +1 -0
- package/dist/apps/api.d.ts +519 -0
- package/dist/apps/api.d.ts.map +1 -0
- package/dist/apps/bindings.d.ts +72 -0
- package/dist/apps/bindings.d.ts.map +1 -0
- package/dist/apps/index.d.ts +13 -0
- package/dist/apps/index.d.ts.map +1 -0
- package/dist/apps/types.d.ts +224 -0
- package/dist/apps/types.d.ts.map +1 -0
- package/dist/apps/views.d.ts +142 -0
- package/dist/apps/views.d.ts.map +1 -0
- package/dist/bridges/chart-bridge.d.ts +172 -0
- package/dist/bridges/chart-bridge.d.ts.map +1 -0
- package/dist/bridges/equation-bridge.d.ts +74 -0
- package/dist/bridges/equation-bridge.d.ts.map +1 -0
- package/dist/bridges/index.d.ts +25 -0
- package/dist/bridges/index.d.ts.map +1 -0
- package/dist/bridges/ink-recognition-bridge.d.ts +142 -0
- package/dist/bridges/ink-recognition-bridge.d.ts.map +1 -0
- package/dist/bridges/locale-bridge.d.ts +93 -0
- package/dist/bridges/locale-bridge.d.ts.map +1 -0
- package/dist/bridges/pivot-bridge.d.ts +201 -0
- package/dist/bridges/pivot-bridge.d.ts.map +1 -0
- package/dist/bridges/schema-bridge.d.ts +137 -0
- package/dist/bridges/schema-bridge.d.ts.map +1 -0
- package/dist/bridges/smartart-bridge.d.ts +217 -0
- package/dist/bridges/smartart-bridge.d.ts.map +1 -0
- package/dist/bridges/wordart-bridge.d.ts +86 -0
- package/dist/bridges/wordart-bridge.d.ts.map +1 -0
- package/dist/capabilities/errors.d.ts +16 -0
- package/dist/capabilities/errors.d.ts.map +1 -0
- package/dist/capabilities/gated-api.d.ts +355 -0
- package/dist/capabilities/gated-api.d.ts.map +1 -0
- package/dist/capabilities/grants.d.ts +239 -0
- package/dist/capabilities/grants.d.ts.map +1 -0
- package/dist/capabilities/index.d.ts +24 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/manifest.d.ts +128 -0
- package/dist/capabilities/manifest.d.ts.map +1 -0
- package/dist/capabilities/requester.d.ts +209 -0
- package/dist/capabilities/requester.d.ts.map +1 -0
- package/dist/capabilities/scope.d.ts +55 -0
- package/dist/capabilities/scope.d.ts.map +1 -0
- package/dist/capabilities/sensitive.d.ts +279 -0
- package/dist/capabilities/sensitive.d.ts.map +1 -0
- package/dist/capabilities/taxonomy.d.ts +15 -0
- package/dist/capabilities/taxonomy.d.ts.map +1 -0
- package/dist/capabilities/types.d.ts +91 -0
- package/dist/capabilities/types.d.ts.map +1 -0
- package/dist/cells/cell-identity.d.ts +281 -0
- package/dist/cells/cell-identity.d.ts.map +1 -0
- package/dist/cells/cell-style.d.ts +67 -0
- package/dist/cells/cell-style.d.ts.map +1 -0
- package/dist/cells/formula-string.d.ts +37 -0
- package/dist/cells/formula-string.d.ts.map +1 -0
- package/dist/cells/index.d.ts +7 -0
- package/dist/cells/index.d.ts.map +1 -0
- package/dist/cells/range-ref.d.ts +77 -0
- package/dist/cells/range-ref.d.ts.map +1 -0
- package/dist/cells/rich-text.d.ts +66 -0
- package/dist/cells/rich-text.d.ts.map +1 -0
- package/dist/cells/spill.d.ts +121 -0
- package/dist/cells/spill.d.ts.map +1 -0
- package/dist/conditional-format/index.d.ts +11 -0
- package/dist/conditional-format/index.d.ts.map +1 -0
- package/dist/conditional-format/presets.d.ts +54 -0
- package/dist/conditional-format/presets.d.ts.map +1 -0
- package/dist/conditional-format/range-utils.d.ts +11 -0
- package/dist/conditional-format/range-utils.d.ts.map +1 -0
- package/dist/conditional-format/render-types.d.ts +80 -0
- package/dist/conditional-format/render-types.d.ts.map +1 -0
- package/dist/connections/api-errors.d.ts +29 -0
- package/dist/connections/api-errors.d.ts.map +1 -0
- package/dist/connections/api.d.ts +879 -0
- package/dist/connections/api.d.ts.map +1 -0
- package/dist/connections/database-bridge-types.d.ts +108 -0
- package/dist/connections/database-bridge-types.d.ts.map +1 -0
- package/dist/connections/index.d.ts +5 -0
- package/dist/connections/index.d.ts.map +1 -0
- package/dist/connections/power-query.d.ts +1 -0
- package/dist/connections/power-query.d.ts.map +1 -0
- package/dist/connections/query.d.ts +144 -0
- package/dist/connections/query.d.ts.map +1 -0
- package/dist/context-menu/index.d.ts +10 -0
- package/dist/context-menu/index.d.ts.map +1 -0
- package/dist/context-menu/types.d.ts +28 -0
- package/dist/context-menu/types.d.ts.map +1 -0
- package/dist/core/commands.d.ts +143 -0
- package/dist/core/commands.d.ts.map +1 -0
- package/dist/core/core.d.ts +943 -0
- package/dist/core/core.d.ts.map +1 -0
- package/dist/core/disposable.d.ts +30 -0
- package/dist/core/disposable.d.ts.map +1 -0
- package/dist/core/event-base.d.ts +31 -0
- package/dist/core/event-base.d.ts.map +1 -0
- package/dist/core/execution.d.ts +79 -0
- package/dist/core/execution.d.ts.map +1 -0
- package/dist/core/formatted-text.d.ts +8 -0
- package/dist/core/formatted-text.d.ts.map +1 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/result.d.ts +23 -0
- package/dist/core/result.d.ts.map +1 -0
- package/dist/core/schema.d.ts +360 -0
- package/dist/core/schema.d.ts.map +1 -0
- package/dist/core/testing.d.ts +309 -0
- package/dist/core/testing.d.ts.map +1 -0
- package/dist/culture/index.d.ts +11 -0
- package/dist/culture/index.d.ts.map +1 -0
- package/dist/culture/types.d.ts +320 -0
- package/dist/culture/types.d.ts.map +1 -0
- package/dist/data/charts.d.ts +412 -0
- package/dist/data/charts.d.ts.map +1 -0
- package/dist/data/conditional-format.d.ts +188 -0
- package/dist/data/conditional-format.d.ts.map +1 -0
- package/dist/data/filter.d.ts +364 -0
- package/dist/data/filter.d.ts.map +1 -0
- package/dist/data/grouping.d.ts +170 -0
- package/dist/data/grouping.d.ts.map +1 -0
- package/dist/data/index.d.ts +12 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/named-ranges.d.ts +104 -0
- package/dist/data/named-ranges.d.ts.map +1 -0
- package/dist/data/pivot.d.ts +68 -0
- package/dist/data/pivot.d.ts.map +1 -0
- package/dist/data/slicers.d.ts +417 -0
- package/dist/data/slicers.d.ts.map +1 -0
- package/dist/data/sorting.d.ts +172 -0
- package/dist/data/sorting.d.ts.map +1 -0
- package/dist/data/sparklines.d.ts +358 -0
- package/dist/data/sparklines.d.ts.map +1 -0
- package/dist/data/tables.d.ts +333 -0
- package/dist/data/tables.d.ts.map +1 -0
- package/dist/data/trace-arrows.d.ts +165 -0
- package/dist/data/trace-arrows.d.ts.map +1 -0
- package/dist/diagnostics/core.d.ts +219 -0
- package/dist/diagnostics/core.d.ts.map +1 -0
- package/dist/diagnostics/index.d.ts +9 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/style.d.ts +196 -0
- package/dist/diagnostics/style.d.ts.map +1 -0
- package/dist/document/comments.d.ts +109 -0
- package/dist/document/comments.d.ts.map +1 -0
- package/dist/document/document.d.ts +182 -0
- package/dist/document/document.d.ts.map +1 -0
- package/dist/document/index.d.ts +5 -0
- package/dist/document/index.d.ts.map +1 -0
- package/dist/document/protection.d.ts +114 -0
- package/dist/document/protection.d.ts.map +1 -0
- package/dist/document/search.d.ts +202 -0
- package/dist/document/search.d.ts.map +1 -0
- package/dist/drawing/index.d.ts +8 -0
- package/dist/drawing/index.d.ts.map +1 -0
- package/dist/drawing/three-d.d.ts +171 -0
- package/dist/drawing/three-d.d.ts.map +1 -0
- package/dist/editor/drag.d.ts +178 -0
- package/dist/editor/drag.d.ts.map +1 -0
- package/dist/editor/editor.d.ts +59 -0
- package/dist/editor/editor.d.ts.map +1 -0
- package/dist/editor/form-controls.d.ts +428 -0
- package/dist/editor/form-controls.d.ts.map +1 -0
- package/dist/editor/index.d.ts +4 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/equation/errors.d.ts +19 -0
- package/dist/equation/errors.d.ts.map +1 -0
- package/dist/equation/index.d.ts +12 -0
- package/dist/equation/index.d.ts.map +1 -0
- package/dist/equation/omml-ast.d.ts +358 -0
- package/dist/equation/omml-ast.d.ts.map +1 -0
- package/dist/equation/templates.d.ts +26 -0
- package/dist/equation/templates.d.ts.map +1 -0
- package/dist/equation/types.d.ts +87 -0
- package/dist/equation/types.d.ts.map +1 -0
- package/dist/events/canvas-object-events.d.ts +31 -0
- package/dist/events/canvas-object-events.d.ts.map +1 -0
- package/dist/events/cell-events.d.ts +60 -0
- package/dist/events/cell-events.d.ts.map +1 -0
- package/dist/events/chart-events.d.ts +61 -0
- package/dist/events/chart-events.d.ts.map +1 -0
- package/dist/events/comment-events.d.ts +43 -0
- package/dist/events/comment-events.d.ts.map +1 -0
- package/dist/events/conditional-formatting-events.d.ts +40 -0
- package/dist/events/conditional-formatting-events.d.ts.map +1 -0
- package/dist/events/data-tools-events.d.ts +29 -0
- package/dist/events/data-tools-events.d.ts.map +1 -0
- package/dist/events/file-io-events.d.ts +39 -0
- package/dist/events/file-io-events.d.ts.map +1 -0
- package/dist/events/filter-events.d.ts +43 -0
- package/dist/events/filter-events.d.ts.map +1 -0
- package/dist/events/floating-object-events.d.ts +158 -0
- package/dist/events/floating-object-events.d.ts.map +1 -0
- package/dist/events/grouping-events.d.ts +75 -0
- package/dist/events/grouping-events.d.ts.map +1 -0
- package/dist/events/index.d.ts +129 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/ink-collaboration-events.d.ts +57 -0
- package/dist/events/ink-collaboration-events.d.ts.map +1 -0
- package/dist/events/ink-events.d.ts +33 -0
- package/dist/events/ink-events.d.ts.map +1 -0
- package/dist/events/ink-recognition-events.d.ts +149 -0
- package/dist/events/ink-recognition-events.d.ts.map +1 -0
- package/dist/events/ink-stroke-events.d.ts +197 -0
- package/dist/events/ink-stroke-events.d.ts.map +1 -0
- package/dist/events/merge-events.d.ts +46 -0
- package/dist/events/merge-events.d.ts.map +1 -0
- package/dist/events/named-range-events.d.ts +24 -0
- package/dist/events/named-range-events.d.ts.map +1 -0
- package/dist/events/pivot-events.d.ts +47 -0
- package/dist/events/pivot-events.d.ts.map +1 -0
- package/dist/events/print-events.d.ts +75 -0
- package/dist/events/print-events.d.ts.map +1 -0
- package/dist/events/recalc-events.d.ts +20 -0
- package/dist/events/recalc-events.d.ts.map +1 -0
- package/dist/events/scenario-events.d.ts +37 -0
- package/dist/events/scenario-events.d.ts.map +1 -0
- package/dist/events/selection-events.d.ts +16 -0
- package/dist/events/selection-events.d.ts.map +1 -0
- package/dist/events/settings-events.d.ts +41 -0
- package/dist/events/settings-events.d.ts.map +1 -0
- package/dist/events/sheet-events.d.ts +68 -0
- package/dist/events/sheet-events.d.ts.map +1 -0
- package/dist/events/slicer-events.d.ts +47 -0
- package/dist/events/slicer-events.d.ts.map +1 -0
- package/dist/events/smartart-events.d.ts +222 -0
- package/dist/events/smartart-events.d.ts.map +1 -0
- package/dist/events/sparkline-events.d.ts +68 -0
- package/dist/events/sparkline-events.d.ts.map +1 -0
- package/dist/events/store-events.d.ts +18 -0
- package/dist/events/store-events.d.ts.map +1 -0
- package/dist/events/structure-events.d.ts +76 -0
- package/dist/events/structure-events.d.ts.map +1 -0
- package/dist/events/table-events.d.ts +99 -0
- package/dist/events/table-events.d.ts.map +1 -0
- package/dist/events/validation-events.d.ts +85 -0
- package/dist/events/validation-events.d.ts.map +1 -0
- package/dist/events/view-events.d.ts +72 -0
- package/dist/events/view-events.d.ts.map +1 -0
- package/dist/events/wordart-events.d.ts +169 -0
- package/dist/events/wordart-events.d.ts.map +1 -0
- package/dist/events.d.ts +41 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/extensions/index.d.ts +9 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/types.d.ts +64 -0
- package/dist/extensions/types.d.ts.map +1 -0
- package/dist/filesystem/index.d.ts +11 -0
- package/dist/filesystem/index.d.ts.map +1 -0
- package/dist/filesystem/paths.d.ts +38 -0
- package/dist/filesystem/paths.d.ts.map +1 -0
- package/dist/filesystem/permissions.d.ts +89 -0
- package/dist/filesystem/permissions.d.ts.map +1 -0
- package/dist/filesystem/types.d.ts +251 -0
- package/dist/filesystem/types.d.ts.map +1 -0
- package/dist/fill/custom-lists.d.ts +41 -0
- package/dist/fill/custom-lists.d.ts.map +1 -0
- package/dist/fill/index.d.ts +11 -0
- package/dist/fill/index.d.ts.map +1 -0
- package/dist/fill/types.d.ts +102 -0
- package/dist/fill/types.d.ts.map +1 -0
- package/dist/formatting/format-registry.d.ts +45 -0
- package/dist/formatting/format-registry.d.ts.map +1 -0
- package/dist/formatting/index.d.ts +9 -0
- package/dist/formatting/index.d.ts.map +1 -0
- package/dist/formatting/theme.d.ts +108 -0
- package/dist/formatting/theme.d.ts.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/ink/index.d.ts +16 -0
- package/dist/ink/index.d.ts.map +1 -0
- package/dist/ink/spatial-index.d.ts +113 -0
- package/dist/ink/spatial-index.d.ts.map +1 -0
- package/dist/ink/types.d.ts +558 -0
- package/dist/ink/types.d.ts.map +1 -0
- package/dist/kernel/floating-object-manager.d.ts +68 -0
- package/dist/kernel/floating-object-manager.d.ts.map +1 -0
- package/dist/kernel/index.d.ts +12 -0
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/kernel-context.d.ts +129 -0
- package/dist/kernel/kernel-context.d.ts.map +1 -0
- package/dist/keyboard/actions.d.ts +328 -0
- package/dist/keyboard/actions.d.ts.map +1 -0
- package/dist/keyboard/binding-utils.d.ts +112 -0
- package/dist/keyboard/binding-utils.d.ts.map +1 -0
- package/dist/keyboard/customization.d.ts +121 -0
- package/dist/keyboard/customization.d.ts.map +1 -0
- package/dist/keyboard/display-utils.d.ts +9 -0
- package/dist/keyboard/display-utils.d.ts.map +1 -0
- package/dist/keyboard/excel-reference.d.ts +28 -0
- package/dist/keyboard/excel-reference.d.ts.map +1 -0
- package/dist/keyboard/index.d.ts +16 -0
- package/dist/keyboard/index.d.ts.map +1 -0
- package/dist/keyboard/input.d.ts +124 -0
- package/dist/keyboard/input.d.ts.map +1 -0
- package/dist/keyboard/physical-keys.d.ts +79 -0
- package/dist/keyboard/physical-keys.d.ts.map +1 -0
- package/dist/keyboard/shortcuts/definitions/index.d.ts +10 -0
- package/dist/keyboard/shortcuts/definitions/index.d.ts.map +1 -0
- package/dist/keyboard/shortcuts/types.d.ts +347 -0
- package/dist/keyboard/shortcuts/types.d.ts.map +1 -0
- package/dist/machines/index.d.ts +12 -0
- package/dist/machines/index.d.ts.map +1 -0
- package/dist/machines/snapshots.d.ts +160 -0
- package/dist/machines/snapshots.d.ts.map +1 -0
- package/dist/machines/types.d.ts +64 -0
- package/dist/machines/types.d.ts.map +1 -0
- package/dist/number-formats/constants.d.ts +39 -0
- package/dist/number-formats/constants.d.ts.map +1 -0
- package/dist/number-formats/index.d.ts +14 -0
- package/dist/number-formats/index.d.ts.map +1 -0
- package/dist/number-formats/locale/index.d.ts +5 -0
- package/dist/number-formats/locale/index.d.ts.map +1 -0
- package/dist/number-formats/locale/locale-defaults.d.ts +17 -0
- package/dist/number-formats/locale/locale-defaults.d.ts.map +1 -0
- package/dist/number-formats/registry.d.ts +52 -0
- package/dist/number-formats/registry.d.ts.map +1 -0
- package/dist/number-formats/types.d.ts +134 -0
- package/dist/number-formats/types.d.ts.map +1 -0
- package/dist/objects/canvas-object.d.ts +157 -0
- package/dist/objects/canvas-object.d.ts.map +1 -0
- package/dist/objects/drawing-object.d.ts +144 -0
- package/dist/objects/drawing-object.d.ts.map +1 -0
- package/dist/objects/floating-objects.d.ts +742 -0
- package/dist/objects/floating-objects.d.ts.map +1 -0
- package/dist/objects/index.d.ts +5 -0
- package/dist/objects/index.d.ts.map +1 -0
- package/dist/objects/object-bounds-reader.d.ts +25 -0
- package/dist/objects/object-bounds-reader.d.ts.map +1 -0
- package/dist/objects/object-mutator.d.ts +30 -0
- package/dist/objects/object-mutator.d.ts.map +1 -0
- package/dist/performance/index.d.ts +8 -0
- package/dist/performance/index.d.ts.map +1 -0
- package/dist/performance/profiler-types.d.ts +351 -0
- package/dist/performance/profiler-types.d.ts.map +1 -0
- package/dist/platform/identity.d.ts +24 -0
- package/dist/platform/identity.d.ts.map +1 -0
- package/dist/platform/index.d.ts +17 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/types.d.ts +359 -0
- package/dist/platform/types.d.ts.map +1 -0
- package/dist/rendering/canvas-bridge-types.d.ts +68 -0
- package/dist/rendering/canvas-bridge-types.d.ts.map +1 -0
- package/dist/rendering/constants.d.ts +76 -0
- package/dist/rendering/constants.d.ts.map +1 -0
- package/dist/rendering/coordinates.d.ts +452 -0
- package/dist/rendering/coordinates.d.ts.map +1 -0
- package/dist/rendering/coordinator-interfaces.d.ts +163 -0
- package/dist/rendering/coordinator-interfaces.d.ts.map +1 -0
- package/dist/rendering/data-sources.d.ts +372 -0
- package/dist/rendering/data-sources.d.ts.map +1 -0
- package/dist/rendering/grid-region.d.ts +32 -0
- package/dist/rendering/grid-region.d.ts.map +1 -0
- package/dist/rendering/grid-renderer.d.ts +391 -0
- package/dist/rendering/grid-renderer.d.ts.map +1 -0
- package/dist/rendering/grouping.d.ts +21 -0
- package/dist/rendering/grouping.d.ts.map +1 -0
- package/dist/rendering/hit-test-service.d.ts +58 -0
- package/dist/rendering/hit-test-service.d.ts.map +1 -0
- package/dist/rendering/hit-test.d.ts +223 -0
- package/dist/rendering/hit-test.d.ts.map +1 -0
- package/dist/rendering/index.d.ts +25 -0
- package/dist/rendering/index.d.ts.map +1 -0
- package/dist/rendering/interactive-elements.d.ts +121 -0
- package/dist/rendering/interactive-elements.d.ts.map +1 -0
- package/dist/rendering/primitives.d.ts +17 -0
- package/dist/rendering/primitives.d.ts.map +1 -0
- package/dist/rendering/render-context.d.ts +457 -0
- package/dist/rendering/render-context.d.ts.map +1 -0
- package/dist/rendering/text-measurement-service.d.ts +197 -0
- package/dist/rendering/text-measurement-service.d.ts.map +1 -0
- package/dist/ribbon/collapse-configs.d.ts +298 -0
- package/dist/ribbon/collapse-configs.d.ts.map +1 -0
- package/dist/ribbon/collapse-types.d.ts +76 -0
- package/dist/ribbon/collapse-types.d.ts.map +1 -0
- package/dist/ribbon/index.d.ts +25 -0
- package/dist/ribbon/index.d.ts.map +1 -0
- package/dist/selection/index.d.ts +10 -0
- package/dist/selection/index.d.ts.map +1 -0
- package/dist/selection/registry.d.ts +17 -0
- package/dist/selection/registry.d.ts.map +1 -0
- package/dist/selection/types.d.ts +82 -0
- package/dist/selection/types.d.ts.map +1 -0
- package/dist/selectors/index.d.ts +8 -0
- package/dist/selectors/index.d.ts.map +1 -0
- package/dist/selectors/smart-art.d.ts +58 -0
- package/dist/selectors/smart-art.d.ts.map +1 -0
- package/dist/services/index.d.ts +273 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/smartart/index.d.ts +26 -0
- package/dist/smartart/index.d.ts.map +1 -0
- package/dist/smartart/layouts.d.ts +193 -0
- package/dist/smartart/layouts.d.ts.map +1 -0
- package/dist/smartart/ooxml-algorithm-types.d.ts +939 -0
- package/dist/smartart/ooxml-algorithm-types.d.ts.map +1 -0
- package/dist/smartart/ooxml-data-model-types.d.ts +845 -0
- package/dist/smartart/ooxml-data-model-types.d.ts.map +1 -0
- package/dist/smartart/ooxml-drawing-types.d.ts +356 -0
- package/dist/smartart/ooxml-drawing-types.d.ts.map +1 -0
- package/dist/smartart/ooxml-engine-types.d.ts +873 -0
- package/dist/smartart/ooxml-engine-types.d.ts.map +1 -0
- package/dist/smartart/ooxml-layout-types.d.ts +405 -0
- package/dist/smartart/ooxml-layout-types.d.ts.map +1 -0
- package/dist/smartart/ooxml-style-types.d.ts +474 -0
- package/dist/smartart/ooxml-style-types.d.ts.map +1 -0
- package/dist/smartart/styles.d.ts +137 -0
- package/dist/smartart/styles.d.ts.map +1 -0
- package/dist/smartart/types.d.ts +323 -0
- package/dist/smartart/types.d.ts.map +1 -0
- package/dist/storage/capabilities.d.ts +33 -0
- package/dist/storage/capabilities.d.ts.map +1 -0
- package/dist/storage/connection.d.ts +183 -0
- package/dist/storage/connection.d.ts.map +1 -0
- package/dist/storage/index.d.ts +13 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/query.d.ts +91 -0
- package/dist/storage/query.d.ts.map +1 -0
- package/dist/storage/table-driver.d.ts +249 -0
- package/dist/storage/table-driver.d.ts.map +1 -0
- package/dist/store/cell-schema.d.ts +235 -0
- package/dist/store/cell-schema.d.ts.map +1 -0
- package/dist/store/equation-schema.d.ts +22 -0
- package/dist/store/equation-schema.d.ts.map +1 -0
- package/dist/store/index.d.ts +33 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/ink-schema.d.ts +26 -0
- package/dist/store/ink-schema.d.ts.map +1 -0
- package/dist/store/scenarios-schema.d.ts +105 -0
- package/dist/store/scenarios-schema.d.ts.map +1 -0
- package/dist/store/schema-types.d.ts +113 -0
- package/dist/store/schema-types.d.ts.map +1 -0
- package/dist/store/sheet-maps-schema.d.ts +222 -0
- package/dist/store/sheet-maps-schema.d.ts.map +1 -0
- package/dist/store/sheet-meta-schema.d.ts +16 -0
- package/dist/store/sheet-meta-schema.d.ts.map +1 -0
- package/dist/store/smartart-schema.d.ts +17 -0
- package/dist/store/smartart-schema.d.ts.map +1 -0
- package/dist/store/store-types.d.ts +381 -0
- package/dist/store/store-types.d.ts.map +1 -0
- package/dist/store/wordart-schema.d.ts +13 -0
- package/dist/store/wordart-schema.d.ts.map +1 -0
- package/dist/store/workbook-schema.d.ts +16 -0
- package/dist/store/workbook-schema.d.ts.map +1 -0
- package/dist/styles/built-in-styles.d.ts +10 -0
- package/dist/styles/built-in-styles.d.ts.map +1 -0
- package/dist/styles/index.d.ts +18 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/utils/a1.d.ts +12 -0
- package/dist/utils/a1.d.ts.map +1 -0
- package/dist/utils/datetime.d.ts +7 -0
- package/dist/utils/datetime.d.ts.map +1 -0
- package/dist/utils/function-registry.d.ts +40 -0
- package/dist/utils/function-registry.d.ts.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/protection.d.ts +9 -0
- package/dist/utils/protection.d.ts.map +1 -0
- package/dist/utils/range-navigation.d.ts +9 -0
- package/dist/utils/range-navigation.d.ts.map +1 -0
- package/dist/utils/range.d.ts +9 -0
- package/dist/utils/range.d.ts.map +1 -0
- package/dist/utils/rich-text.d.ts +9 -0
- package/dist/utils/rich-text.d.ts.map +1 -0
- package/dist/viewport/geometry.d.ts +90 -0
- package/dist/viewport/geometry.d.ts.map +1 -0
- package/dist/viewport/grid-canvas.d.ts +133 -0
- package/dist/viewport/grid-canvas.d.ts.map +1 -0
- package/dist/viewport/index.d.ts +5 -0
- package/dist/viewport/index.d.ts.map +1 -0
- package/dist/viewport/viewport-config.d.ts +95 -0
- package/dist/viewport/viewport-config.d.ts.map +1 -0
- package/dist/viewport/viewport.d.ts +191 -0
- package/dist/viewport/viewport.d.ts.map +1 -0
- package/dist/views/index.d.ts +9 -0
- package/dist/views/index.d.ts.map +1 -0
- package/dist/views/types.d.ts +161 -0
- package/dist/views/types.d.ts.map +1 -0
- package/dist/what-if/index.d.ts +2 -0
- package/dist/what-if/index.d.ts.map +1 -0
- package/dist/what-if/what-if.d.ts +152 -0
- package/dist/what-if/what-if.d.ts.map +1 -0
- package/dist/window-manager/index.d.ts +134 -0
- package/dist/window-manager/index.d.ts.map +1 -0
- package/dist/wordart/effects.d.ts +611 -0
- package/dist/wordart/effects.d.ts.map +1 -0
- package/dist/wordart/index.d.ts +17 -0
- package/dist/wordart/index.d.ts.map +1 -0
- package/dist/wordart/presets.d.ts +133 -0
- package/dist/wordart/presets.d.ts.map +1 -0
- package/dist/wordart/types.d.ts +444 -0
- package/dist/wordart/types.d.ts.map +1 -0
- package/dist/workflows/context.d.ts +777 -0
- package/dist/workflows/context.d.ts.map +1 -0
- package/dist/workflows/definition.d.ts +256 -0
- package/dist/workflows/definition.d.ts.map +1 -0
- package/dist/workflows/events.d.ts +397 -0
- package/dist/workflows/events.d.ts.map +1 -0
- package/dist/workflows/index.d.ts +19 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/instance.d.ts +358 -0
- package/dist/workflows/instance.d.ts.map +1 -0
- package/dist/workflows/runtime.d.ts +287 -0
- package/dist/workflows/runtime.d.ts.map +1 -0
- package/dist/workflows/triggers.d.ts +335 -0
- package/dist/workflows/triggers.d.ts.map +1 -0
- package/dist/workflows/versioning.d.ts +245 -0
- package/dist/workflows/versioning.d.ts.map +1 -0
- package/dist/xlsx-parser/conditional-format.d.ts +137 -0
- package/dist/xlsx-parser/conditional-format.d.ts.map +1 -0
- package/dist/xlsx-parser/core.d.ts +622 -0
- package/dist/xlsx-parser/core.d.ts.map +1 -0
- package/dist/xlsx-parser/data-validation.d.ts +55 -0
- package/dist/xlsx-parser/data-validation.d.ts.map +1 -0
- package/dist/xlsx-parser/errors.d.ts +38 -0
- package/dist/xlsx-parser/errors.d.ts.map +1 -0
- package/dist/xlsx-parser/index.d.ts +17 -0
- package/dist/xlsx-parser/index.d.ts.map +1 -0
- package/dist/xlsx-parser/options.d.ts +89 -0
- package/dist/xlsx-parser/options.d.ts.map +1 -0
- package/dist/xlsx-parser/styles.d.ts +157 -0
- package/dist/xlsx-parser/styles.d.ts.map +1 -0
- package/dist/xlsx-parser/table.d.ts +170 -0
- package/dist/xlsx-parser/table.d.ts.map +1 -0
- package/package.json +410 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coordinate System Types for Canvas Rendering
|
|
3
|
+
*
|
|
4
|
+
* These types define the coordinate spaces and dimension interfaces used
|
|
5
|
+
* throughout the renderer. Moved to contracts to enable decoupling of
|
|
6
|
+
* canvas and state subsystems.
|
|
7
|
+
*
|
|
8
|
+
* Coordinate Spaces:
|
|
9
|
+
* 1. CELL SPACE - Logical cell references { row: 0, col: 0 } = A1
|
|
10
|
+
* 2. DOCUMENT SPACE - Full document coordinates in pixels (no scroll, no zoom)
|
|
11
|
+
* 3. VIEWPORT SPACE - Canvas-absolute coordinates (accounts for scroll, zoom, includes headers)
|
|
12
|
+
* 4. LAYER SPACE - Layer-relative coordinates (accounts for scroll, zoom, NO headers - canvas translation handles headers)
|
|
13
|
+
* 5. CANVAS SPACE - Physical pixels on canvas (viewport * devicePixelRatio)
|
|
14
|
+
*
|
|
15
|
+
* @module @mog/spreadsheet-contracts/rendering/coordinates
|
|
16
|
+
*/
|
|
17
|
+
import type { CellRange } from '../core';
|
|
18
|
+
import type { Point, Rect } from '../viewport';
|
|
19
|
+
import type { HitTestResult } from './hit-test';
|
|
20
|
+
import type { CellCoord } from './primitives';
|
|
21
|
+
export type { CellCoord } from './primitives';
|
|
22
|
+
/** Brand for document coordinate space (unzoomed, from sheet origin) */
|
|
23
|
+
declare const DocumentBrand: unique symbol;
|
|
24
|
+
/** Brand for viewport coordinate space (zoomed, from canvas origin, includes headers) */
|
|
25
|
+
declare const ViewportBrand: unique symbol;
|
|
26
|
+
/** Brand for layer-relative coordinate space (zoomed, from cell area origin, no headers) */
|
|
27
|
+
declare const LayerBrand: unique symbol;
|
|
28
|
+
/**
|
|
29
|
+
* Point in document coordinates.
|
|
30
|
+
* - Origin: Top-left of sheet content (cell A1)
|
|
31
|
+
* - Units: Unzoomed pixels
|
|
32
|
+
* - Scroll: Not affected by scroll position
|
|
33
|
+
* - Use: Storage, formulas, cell references, floating object positions
|
|
34
|
+
*/
|
|
35
|
+
export type DocumentPoint = Point & {
|
|
36
|
+
readonly [DocumentBrand]: true;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Point in viewport coordinates.
|
|
40
|
+
* - Origin: Top-left of canvas element
|
|
41
|
+
* - Units: Screen pixels (zoomed)
|
|
42
|
+
* - Headers: Includes row header width (50px) and column header height (24px)
|
|
43
|
+
* - Use: Mouse events, canvas dimensions, absolute positioning, input handling
|
|
44
|
+
*/
|
|
45
|
+
export type ViewportPoint = Point & {
|
|
46
|
+
readonly [ViewportBrand]: true;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Point in layer-relative coordinates.
|
|
50
|
+
* - Origin: Top-left of cell area (after headers)
|
|
51
|
+
* - Units: Screen pixels (zoomed)
|
|
52
|
+
* - Headers: Does NOT include header offsets (canvas ctx.translate() handles them)
|
|
53
|
+
* - Use: Render layers, HitMap paths (paths are registered in layer-relative space)
|
|
54
|
+
*/
|
|
55
|
+
export type LayerPoint = Point & {
|
|
56
|
+
readonly [LayerBrand]: true;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Rectangle in document coordinates.
|
|
60
|
+
* @see DocumentPoint for coordinate space details
|
|
61
|
+
*/
|
|
62
|
+
export type DocumentRect = Rect & {
|
|
63
|
+
readonly [DocumentBrand]: true;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Rectangle in viewport coordinates.
|
|
67
|
+
* @see ViewportPoint for coordinate space details
|
|
68
|
+
*/
|
|
69
|
+
export type ViewportRect = Rect & {
|
|
70
|
+
readonly [ViewportBrand]: true;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Rectangle in layer-relative coordinates.
|
|
74
|
+
* @see LayerPoint for coordinate space details
|
|
75
|
+
*/
|
|
76
|
+
export type LayerRect = Rect & {
|
|
77
|
+
readonly [LayerBrand]: true;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* ScrollViewport bounds - defines the visible area and scroll position.
|
|
81
|
+
* Named ScrollViewport to distinguish from contracts Viewport which is
|
|
82
|
+
* a high-level rendering viewport with bounds, cellRange, scrollOffset, zoom.
|
|
83
|
+
*/
|
|
84
|
+
export interface ScrollViewport {
|
|
85
|
+
/** Pixels scrolled from top */
|
|
86
|
+
scrollTop: number;
|
|
87
|
+
/** Pixels scrolled from left */
|
|
88
|
+
scrollLeft: number;
|
|
89
|
+
/** Viewport width in CSS pixels */
|
|
90
|
+
width: number;
|
|
91
|
+
/** Viewport height in CSS pixels */
|
|
92
|
+
height: number;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Frozen pane configuration.
|
|
96
|
+
* Frozen rows/cols stay visible regardless of scroll position.
|
|
97
|
+
*/
|
|
98
|
+
export interface FrozenPanes {
|
|
99
|
+
/** Number of frozen rows (0 = none) */
|
|
100
|
+
rows: number;
|
|
101
|
+
/** Number of frozen cols (0 = none) */
|
|
102
|
+
cols: number;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Visible regions accounting for frozen panes.
|
|
106
|
+
* With frozen panes, the viewport is divided into up to 4 regions.
|
|
107
|
+
*
|
|
108
|
+
* Layout:
|
|
109
|
+
* +-------------+-------------------------+
|
|
110
|
+
* |frozenCorner | frozenRows |
|
|
111
|
+
* | (fixed) | (scrolls horizontally) |
|
|
112
|
+
* +-------------+-------------------------+
|
|
113
|
+
* | frozenCols | main |
|
|
114
|
+
* | (scrolls | (scrolls both ways) |
|
|
115
|
+
* | vertically)| |
|
|
116
|
+
* +-------------+-------------------------+
|
|
117
|
+
*/
|
|
118
|
+
export interface VisibleRegions {
|
|
119
|
+
/** Frozen corner - always visible at top-left (null if no frozen panes) */
|
|
120
|
+
frozenCorner: CellRange | null;
|
|
121
|
+
/** Frozen rows - scrolls horizontally only (null if no frozen rows) */
|
|
122
|
+
frozenRows: CellRange | null;
|
|
123
|
+
/** Frozen columns - scrolls vertically only (null if no frozen cols) */
|
|
124
|
+
frozenCols: CellRange | null;
|
|
125
|
+
/** Main scrollable area - scrolls both horizontally and vertically */
|
|
126
|
+
main: CellRange;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Minimal interface for viewport position index lookups.
|
|
130
|
+
* The concrete implementation is ViewportPositionIndex in @mog/grid-renderer.
|
|
131
|
+
*/
|
|
132
|
+
export interface ViewportPositionIndexLike {
|
|
133
|
+
/** O(1) - pixel position of row's top edge */
|
|
134
|
+
getRowTop(row: number): number;
|
|
135
|
+
/** O(1) - pixel position of column's left edge */
|
|
136
|
+
getColLeft(col: number): number;
|
|
137
|
+
/** O(1) - row height */
|
|
138
|
+
getRowHeight(row: number): number;
|
|
139
|
+
/** O(1) - column width */
|
|
140
|
+
getColWidth(col: number): number;
|
|
141
|
+
/** Whether position data is available */
|
|
142
|
+
readonly hasData: boolean;
|
|
143
|
+
/** Total number of rows in the sheet */
|
|
144
|
+
readonly totalRows: number;
|
|
145
|
+
/** Total number of columns in the sheet */
|
|
146
|
+
readonly totalCols: number;
|
|
147
|
+
/** Binary search for the row at a given Y position */
|
|
148
|
+
findRowAtY(y: number): number | null;
|
|
149
|
+
/** Binary search for the column at a given X position */
|
|
150
|
+
findColAtX(x: number): number | null;
|
|
151
|
+
/** Whether the given row is hidden */
|
|
152
|
+
isRowHidden(row: number): boolean;
|
|
153
|
+
/** Whether the given column is hidden */
|
|
154
|
+
isColHidden(col: number): boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Minimal merge region shape returned by merge index lookups.
|
|
158
|
+
*/
|
|
159
|
+
export interface MergeRegionLike {
|
|
160
|
+
startRow: number;
|
|
161
|
+
startCol: number;
|
|
162
|
+
endRow: number;
|
|
163
|
+
endCol: number;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Minimal interface for viewport merge index lookups.
|
|
167
|
+
* The concrete implementation is ViewportMergeIndex in @mog/grid-renderer.
|
|
168
|
+
*/
|
|
169
|
+
export interface ViewportMergeIndexLike {
|
|
170
|
+
/** O(1) - returns the merge region containing (row, col), or null */
|
|
171
|
+
getMergedRegion(row: number, col: number): MergeRegionLike | null;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* The CoordinateSystem is the single source of truth for all coordinate conversions.
|
|
175
|
+
*
|
|
176
|
+
* IMPORTANT: All components that need to convert between coordinate spaces
|
|
177
|
+
* MUST use this service. Do not implement coordinate math elsewhere.
|
|
178
|
+
*
|
|
179
|
+
* Type Safety: Methods use branded types (DocumentPoint, ViewportPoint, LayerPoint, etc.)
|
|
180
|
+
* to prevent coordinate space mismatches at compile time.
|
|
181
|
+
* @see plans/active/refactor/COORDINATE-SPACE-TYPE-SAFETY.md
|
|
182
|
+
*/
|
|
183
|
+
export interface CoordinateSystem {
|
|
184
|
+
/**
|
|
185
|
+
* Get the document-space rectangle for a cell.
|
|
186
|
+
* Accounts for: column widths, row heights, merged cells
|
|
187
|
+
* Does NOT account for: scroll, frozen panes, hidden rows/cols in position
|
|
188
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
189
|
+
* @param cell - The cell coordinate
|
|
190
|
+
*/
|
|
191
|
+
cellToDocument(sheetId: string, cell: CellCoord): DocumentRect;
|
|
192
|
+
/**
|
|
193
|
+
* Get the cell at a document-space point.
|
|
194
|
+
* Returns null if point is out of bounds.
|
|
195
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
196
|
+
* @param point - The document-space point
|
|
197
|
+
*/
|
|
198
|
+
documentToCell(sheetId: string, point: DocumentPoint): CellCoord | null;
|
|
199
|
+
/**
|
|
200
|
+
* Get document-space bounding rectangle for a range.
|
|
201
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
202
|
+
* @param range - The cell range
|
|
203
|
+
*/
|
|
204
|
+
rangeToDocument(sheetId: string, range: CellRange): DocumentRect;
|
|
205
|
+
/**
|
|
206
|
+
* Convert document rectangle to viewport coordinates (includes header offsets).
|
|
207
|
+
* Accounts for: scroll offset, frozen panes, zoom, header offsets
|
|
208
|
+
* Returns null if the rect is not visible in the viewport.
|
|
209
|
+
*
|
|
210
|
+
* Use this for: Input handling (mouse events to document coords)
|
|
211
|
+
* Do NOT use for: Render layers (they should use documentToLayerViewport)
|
|
212
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
213
|
+
* @param rect - Rectangle in document coordinates
|
|
214
|
+
*/
|
|
215
|
+
documentToViewport(sheetId: string, rect: DocumentRect): ViewportRect | null;
|
|
216
|
+
/**
|
|
217
|
+
* Convert document rectangle to layer-relative viewport coordinates.
|
|
218
|
+
*
|
|
219
|
+
* Unlike documentToViewport() which includes header offsets for input handling,
|
|
220
|
+
* this method returns coordinates suitable for render layers where the canvas
|
|
221
|
+
* translation (ctx.translate(vp.bounds.x, vp.bounds.y)) already accounts for headers.
|
|
222
|
+
*
|
|
223
|
+
* Coordinate spaces:
|
|
224
|
+
* - documentToViewport(): Returns canvas-absolute coords (for mouse events)
|
|
225
|
+
* - documentToLayerViewport(): Returns layer-relative coords (for rendering)
|
|
226
|
+
*
|
|
227
|
+
* Use this for: Render layers (overlay, selection, etc.)
|
|
228
|
+
* Use documentToViewport() for: Input handling (mouse events)
|
|
229
|
+
*
|
|
230
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
231
|
+
* @param rect - Rectangle in document coordinates
|
|
232
|
+
* @returns Rectangle in layer-relative viewport coordinates, or null if not visible
|
|
233
|
+
*/
|
|
234
|
+
documentToLayerViewport(sheetId: string, rect: DocumentRect): LayerRect | null;
|
|
235
|
+
/**
|
|
236
|
+
* Convert viewport point to document coordinates.
|
|
237
|
+
* Used for hit testing: viewport click -> document point -> cell
|
|
238
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
239
|
+
* @param point - Point in viewport coordinates
|
|
240
|
+
*/
|
|
241
|
+
viewportToDocument(sheetId: string, point: ViewportPoint): DocumentPoint;
|
|
242
|
+
/**
|
|
243
|
+
* Convert viewport point to layer-relative coordinates.
|
|
244
|
+
* Subtracts header offsets (ROW_HEADER_WIDTH, COL_HEADER_HEIGHT).
|
|
245
|
+
* Use for: Converting mouse events to layer space for HitMap queries.
|
|
246
|
+
*/
|
|
247
|
+
viewportToLayer(point: ViewportPoint): LayerPoint;
|
|
248
|
+
/**
|
|
249
|
+
* Convert layer-relative point to viewport coordinates.
|
|
250
|
+
* Adds header offsets (ROW_HEADER_WIDTH, COL_HEADER_HEIGHT).
|
|
251
|
+
*/
|
|
252
|
+
layerToViewport(point: LayerPoint): ViewportPoint;
|
|
253
|
+
/**
|
|
254
|
+
* Get the viewport-space rectangle for a cell.
|
|
255
|
+
* Returns null if cell is not currently visible.
|
|
256
|
+
* This is the most common operation for rendering.
|
|
257
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
258
|
+
* @param cell - The cell coordinate
|
|
259
|
+
*/
|
|
260
|
+
cellToViewport(sheetId: string, cell: CellCoord): ViewportRect | null;
|
|
261
|
+
/**
|
|
262
|
+
* Get the cell at a viewport-space point (e.g., mouse click).
|
|
263
|
+
* This is the most common operation for hit testing.
|
|
264
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
265
|
+
* @param point - Point in viewport coordinates (e.g., mouse click position)
|
|
266
|
+
*/
|
|
267
|
+
viewportToCell(sheetId: string, point: ViewportPoint): CellCoord | null;
|
|
268
|
+
/**
|
|
269
|
+
* Get viewport rectangles for a range.
|
|
270
|
+
* May return multiple rects if range spans frozen/non-frozen boundary.
|
|
271
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
272
|
+
* @param range - The cell range
|
|
273
|
+
*/
|
|
274
|
+
rangeToViewport(sheetId: string, range: CellRange): ViewportRect[];
|
|
275
|
+
/**
|
|
276
|
+
* Get the click position relative to a cell's top-left corner.
|
|
277
|
+
* Correctly handles frozen panes, zoom, and header offsets.
|
|
278
|
+
*
|
|
279
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
280
|
+
* @param point - Click position in viewport coordinates
|
|
281
|
+
* @param cell - The cell to get relative position within
|
|
282
|
+
* @returns Position within cell and cell dimensions, or null if cell not visible
|
|
283
|
+
*
|
|
284
|
+
* @note ALWAYS use this method instead of manually calculating
|
|
285
|
+
* `cellLeft - viewport.scrollLeft`. The manual calculation doesn't
|
|
286
|
+
* account for frozen panes, zoom, or header offsets.
|
|
287
|
+
*/
|
|
288
|
+
getClickPositionInCell(sheetId: string, point: ViewportPoint, cell: CellCoord): {
|
|
289
|
+
x: number;
|
|
290
|
+
y: number;
|
|
291
|
+
width: number;
|
|
292
|
+
height: number;
|
|
293
|
+
} | null;
|
|
294
|
+
/**
|
|
295
|
+
* Get the range of cells currently visible in the viewport.
|
|
296
|
+
* Critical for virtualized rendering - only render these cells.
|
|
297
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
298
|
+
*/
|
|
299
|
+
getVisibleRange(sheetId: string): CellRange;
|
|
300
|
+
/**
|
|
301
|
+
* Get visible range split by frozen panes.
|
|
302
|
+
* Returns up to 4 regions for frozen rows + frozen cols.
|
|
303
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
304
|
+
*/
|
|
305
|
+
getVisibleRegions(sheetId: string): VisibleRegions;
|
|
306
|
+
/**
|
|
307
|
+
* Check if a cell is currently visible in the viewport.
|
|
308
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
309
|
+
* @param cell - The cell coordinate to check
|
|
310
|
+
*/
|
|
311
|
+
isCellVisible(sheetId: string, cell: CellCoord): boolean;
|
|
312
|
+
/**
|
|
313
|
+
* Check if a cell is in the frozen region.
|
|
314
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
315
|
+
* @param cell - The cell coordinate to check
|
|
316
|
+
*/
|
|
317
|
+
isCellFrozen(sheetId: string, cell: CellCoord): boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Classify a viewport point for hit testing.
|
|
320
|
+
* Returns what type of element is at the given viewport coordinates.
|
|
321
|
+
*
|
|
322
|
+
* Used by components to determine if a click is on:
|
|
323
|
+
* - A cell (main grid area)
|
|
324
|
+
* - Column header (for column selection)
|
|
325
|
+
* - Row header (for row selection)
|
|
326
|
+
* - Column/row resize handle
|
|
327
|
+
* - Fill handle
|
|
328
|
+
* - Frozen corner (select all)
|
|
329
|
+
* - Empty area
|
|
330
|
+
*
|
|
331
|
+
* Plan 09 Group 10.3: Touch Target Sizing
|
|
332
|
+
* When isTouch is true, hit areas are expanded to meet touch target guidelines.
|
|
333
|
+
*
|
|
334
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
335
|
+
* @param point - Point in viewport coordinates (e.g., mouse click position)
|
|
336
|
+
* @param isTouch - Whether the input is from a touch device (larger hit areas)
|
|
337
|
+
*/
|
|
338
|
+
classifyPoint(sheetId: string, point: ViewportPoint, isTouch?: boolean): HitTestResult;
|
|
339
|
+
/**
|
|
340
|
+
* Calculate scroll offset to bring a cell into view.
|
|
341
|
+
* Returns null if cell is already visible.
|
|
342
|
+
*
|
|
343
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
344
|
+
* @param cell - The cell to scroll to
|
|
345
|
+
* @param padding - Optional padding in pixels from viewport edge
|
|
346
|
+
*/
|
|
347
|
+
getScrollToCell(sheetId: string, cell: CellCoord, padding?: number): {
|
|
348
|
+
top: number;
|
|
349
|
+
left: number;
|
|
350
|
+
} | null;
|
|
351
|
+
/**
|
|
352
|
+
* Get the maximum scroll bounds.
|
|
353
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
354
|
+
*/
|
|
355
|
+
getScrollBounds(sheetId: string): {
|
|
356
|
+
maxScrollTop: number;
|
|
357
|
+
maxScrollLeft: number;
|
|
358
|
+
};
|
|
359
|
+
/**
|
|
360
|
+
* Get viewport bounds for auto-scroll edge detection.
|
|
361
|
+
* Returns the scrollable region boundaries (excluding frozen panes and headers).
|
|
362
|
+
* Used by auto-scroll service during drag operations.
|
|
363
|
+
* @param sheetId - The sheet ID to use for coordinate calculations
|
|
364
|
+
*/
|
|
365
|
+
getViewportBounds(sheetId: string): {
|
|
366
|
+
left: number;
|
|
367
|
+
top: number;
|
|
368
|
+
right: number;
|
|
369
|
+
bottom: number;
|
|
370
|
+
};
|
|
371
|
+
/** Update viewport (scroll position, size) */
|
|
372
|
+
setViewport(viewport: ScrollViewport): void;
|
|
373
|
+
/** Get current viewport */
|
|
374
|
+
getViewport(): ScrollViewport;
|
|
375
|
+
/** Update frozen panes */
|
|
376
|
+
setFrozenPanes(panes: FrozenPanes): void;
|
|
377
|
+
/** Get current frozen panes */
|
|
378
|
+
getFrozenPanes(): FrozenPanes;
|
|
379
|
+
/**
|
|
380
|
+
* Get the current sheet ID being rendered.
|
|
381
|
+
* Returns null if no sheet is active.
|
|
382
|
+
*
|
|
383
|
+
* Used by callers that need the active sheet ID but don't have it
|
|
384
|
+
* available through other means (e.g., scroll coordination helpers).
|
|
385
|
+
*/
|
|
386
|
+
getCurrentSheetId(): string | null;
|
|
387
|
+
/**
|
|
388
|
+
* Get the underlying position index (alias for getViewportPositionIndex).
|
|
389
|
+
* Convenience method used by scroll coordination and object coordination
|
|
390
|
+
* for snap-to-cell and pixel-to-cell conversion.
|
|
391
|
+
*/
|
|
392
|
+
getPositionIndex(): ViewportPositionIndexLike | null;
|
|
393
|
+
/**
|
|
394
|
+
* Set the viewport position index for O(1) position lookups.
|
|
395
|
+
*
|
|
396
|
+
* @param index - The ViewportPositionIndex instance, or null to clear
|
|
397
|
+
*/
|
|
398
|
+
setViewportPositionIndex(index: ViewportPositionIndexLike | null): void;
|
|
399
|
+
/**
|
|
400
|
+
* Get the viewport position index.
|
|
401
|
+
* Returns null if no position index has been set.
|
|
402
|
+
*/
|
|
403
|
+
getViewportPositionIndex(): ViewportPositionIndexLike | null;
|
|
404
|
+
/** Update zoom level (1.0 = 100%) */
|
|
405
|
+
setZoom(zoom: number): void;
|
|
406
|
+
/** Get current zoom level */
|
|
407
|
+
getZoom(): number;
|
|
408
|
+
/** Get device pixel ratio (for canvas scaling) */
|
|
409
|
+
getDevicePixelRatio(): number;
|
|
410
|
+
/**
|
|
411
|
+
* Set the viewport merge index for merge-aware coordinate lookups.
|
|
412
|
+
*
|
|
413
|
+
* @param index - The ViewportMergeIndex instance, or null to clear
|
|
414
|
+
*/
|
|
415
|
+
setViewportMergeIndex(index: ViewportMergeIndexLike | null): void;
|
|
416
|
+
/**
|
|
417
|
+
* Get the viewport merge index.
|
|
418
|
+
* Returns null if no merge index has been set.
|
|
419
|
+
*/
|
|
420
|
+
getViewportMergeIndex(): ViewportMergeIndexLike | null;
|
|
421
|
+
/**
|
|
422
|
+
* Set outline gutter dimensions based on grouping state.
|
|
423
|
+
* This shifts all content (headers + cells) right/down to make room.
|
|
424
|
+
*
|
|
425
|
+
* @param rowGutterWidth - Width of row outline gutter (0 if no row groups)
|
|
426
|
+
* @param colGutterHeight - Height of column outline gutter (0 if no col groups)
|
|
427
|
+
*/
|
|
428
|
+
setOutlineGutter(rowGutterWidth: number, colGutterHeight: number): void;
|
|
429
|
+
/**
|
|
430
|
+
* Get current outline gutter dimensions.
|
|
431
|
+
* @returns Object with rowGutterWidth and colGutterHeight
|
|
432
|
+
*/
|
|
433
|
+
getOutlineGutter(): {
|
|
434
|
+
rowGutterWidth: number;
|
|
435
|
+
colGutterHeight: number;
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* Set header visibility.
|
|
439
|
+
* When headers are hidden, their dimensions are treated as 0 for coordinate calculations.
|
|
440
|
+
*
|
|
441
|
+
* @param visibility - Header visibility configuration
|
|
442
|
+
*/
|
|
443
|
+
setHeaderVisibility(visibility: import('./constants').HeaderVisibility): void;
|
|
444
|
+
/**
|
|
445
|
+
* Get current header visibility settings.
|
|
446
|
+
* Used by layers to determine header offsets for positioning.
|
|
447
|
+
*
|
|
448
|
+
* @returns Header visibility configuration
|
|
449
|
+
*/
|
|
450
|
+
getHeaderVisibility(): import('./constants').HeaderVisibility;
|
|
451
|
+
}
|
|
452
|
+
//# sourceMappingURL=coordinates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinates.d.ts","sourceRoot":"","sources":["../../src/rendering/coordinates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAY9C,wEAAwE;AACxE,OAAO,CAAC,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAE3C,yFAAyF;AACzF,OAAO,CAAC,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAE3C,4FAA4F;AAC5F,OAAO,CAAC,MAAM,UAAU,EAAE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+
*
|
|
4
|
+
* Pure interfaces extracted from the coordinator type definitions that have
|
|
5
|
+
* no app-internal dependencies. These enable cross-zone references to
|
|
6
|
+
* coordinator capabilities without creating DAG violations.
|
|
7
|
+
*
|
|
8
|
+
* @module @mog/spreadsheet-contracts/rendering
|
|
9
|
+
*/
|
|
10
|
+
import type { CellFormat, SheetViewOptions } from '../core';
|
|
11
|
+
import type { IFloatingObjectManager } from '../kernel/floating-object-manager';
|
|
12
|
+
import type { Point } from '../viewport/viewport';
|
|
13
|
+
import type { SplitViewportConfig } from '../viewport/viewport-config';
|
|
14
|
+
import type { CellCoord, FrozenPanes, GridRenderer, RendererFactory } from './index';
|
|
15
|
+
import type { ViewportReader } from '../api';
|
|
16
|
+
/**
|
|
17
|
+
* Minimal interface for coordinator access in mutations and object coordination.
|
|
18
|
+
*
|
|
19
|
+
* This interface defines the subset of coordinator methods needed by:
|
|
20
|
+
* - Object mutations (moveObject, resizeObject, rotateObject, etc.)
|
|
21
|
+
* - Object coordination module (for ink mode checking)
|
|
22
|
+
*
|
|
23
|
+
* Both SheetCoordinator and GridCoordinator implement this interface,
|
|
24
|
+
* allowing them to be used interchangeably in these contexts.
|
|
25
|
+
*
|
|
26
|
+
* @see plans/active/refactor/unified-floating-object-operations.md
|
|
27
|
+
*/
|
|
28
|
+
export interface FloatingObjectCoordinator {
|
|
29
|
+
/** Get the FloatingObjectManager for object CRUD operations */
|
|
30
|
+
getFloatingObjectManager(): IFloatingObjectManager | null;
|
|
31
|
+
/** Check if ink mode is active (for input isolation) */
|
|
32
|
+
isInkActive(): boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* PointerCaptureManager interface.
|
|
36
|
+
*
|
|
37
|
+
* Coordinator owns this manager and orchestrates pointer capture lifecycle
|
|
38
|
+
* based on state machine transitions (drag states).
|
|
39
|
+
*
|
|
40
|
+
* ARCHITECTURE:
|
|
41
|
+
* - Machines are PURE (no DOM access, no side effects)
|
|
42
|
+
* - Coordinator subscribes to machine state transitions
|
|
43
|
+
* - When drag state is entered -> coordinator calls onDragStart()
|
|
44
|
+
* - When drag state is exited -> coordinator calls onDragEnd()
|
|
45
|
+
* - Component provides DOM element via setContainerElement()
|
|
46
|
+
*
|
|
47
|
+
* @see plans/active/excel-parity/P0-01-POINTER-CAPTURE.md
|
|
48
|
+
*/
|
|
49
|
+
export interface PointerCaptureManager {
|
|
50
|
+
/**
|
|
51
|
+
* Set the DOM element that will capture pointer events.
|
|
52
|
+
* Called by the component/hook when container mounts.
|
|
53
|
+
*/
|
|
54
|
+
setContainerElement(element: HTMLElement | null): void;
|
|
55
|
+
/**
|
|
56
|
+
* Called by coordinator when a drag state is entered.
|
|
57
|
+
* Captures the pointer so events continue outside the window.
|
|
58
|
+
*/
|
|
59
|
+
onDragStart(pointerId: number): void;
|
|
60
|
+
/**
|
|
61
|
+
* Called by coordinator when a drag state is exited.
|
|
62
|
+
* Releases the pointer capture.
|
|
63
|
+
*/
|
|
64
|
+
onDragEnd(pointerId: number): void;
|
|
65
|
+
/**
|
|
66
|
+
* Check if pointer is currently captured.
|
|
67
|
+
*/
|
|
68
|
+
isCapturing(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Get the currently captured pointer ID (or null if not capturing).
|
|
71
|
+
*/
|
|
72
|
+
getCapturedPointerId(): number | null;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Interface for providing sheet state to the coordinator.
|
|
76
|
+
* The spreadsheet store implements this interface.
|
|
77
|
+
*
|
|
78
|
+
* This pattern ensures:
|
|
79
|
+
* 1. TypeScript enforces that all required methods are provided
|
|
80
|
+
* 2. Single point of wiring instead of many individual callbacks
|
|
81
|
+
* 3. New state accessors can be added by extending this interface
|
|
82
|
+
*/
|
|
83
|
+
export interface SheetStateProvider {
|
|
84
|
+
/** Get frozen panes configuration for a sheet */
|
|
85
|
+
getFrozenPanes(sheetId: string): FrozenPanes;
|
|
86
|
+
/** Get view options (gridlines, headers visibility, etc.) for a sheet */
|
|
87
|
+
getSheetViewOptions(sheetId: string): SheetViewOptions;
|
|
88
|
+
/**
|
|
89
|
+
* Get the workbook culture setting.
|
|
90
|
+
* Returns IETF language tag (e.g., 'en-US', 'de-DE').
|
|
91
|
+
* Used to apply initial culture on renderer initialization.
|
|
92
|
+
*/
|
|
93
|
+
getCulture(): string;
|
|
94
|
+
/**
|
|
95
|
+
* Get split view configuration for a sheet.
|
|
96
|
+
* Returns null if no split is configured.
|
|
97
|
+
* Used to restore split view on initialization and sheet switch.
|
|
98
|
+
*/
|
|
99
|
+
getSplitConfig(sheetId: string): SplitViewportConfig | null;
|
|
100
|
+
/** Get cell-level scroll position for a sheet (ground truth from Rust/Yrs). */
|
|
101
|
+
getScrollPosition(sheetId: string): {
|
|
102
|
+
topRow: number;
|
|
103
|
+
leftCol: number;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Dependencies needed by the coordinator to execute renderer side effects.
|
|
108
|
+
* These are provided by the component after mount since they require React hooks.
|
|
109
|
+
*/
|
|
110
|
+
export interface RendererDependencies {
|
|
111
|
+
/**
|
|
112
|
+
* ViewportReader for sync dimension data.
|
|
113
|
+
* The renderer execution creates position indices internally from this.
|
|
114
|
+
*/
|
|
115
|
+
viewport?: ViewportReader;
|
|
116
|
+
/** Factory function to create the renderer */
|
|
117
|
+
rendererFactory: RendererFactory;
|
|
118
|
+
/**
|
|
119
|
+
* Get cell display value.
|
|
120
|
+
* Receives sheetId at call time from RenderContext.currentSheetId.
|
|
121
|
+
* This eliminates stale closure bugs when sheets switch.
|
|
122
|
+
*/
|
|
123
|
+
getCellValue: (sheetId: string, cell: CellCoord) => unknown;
|
|
124
|
+
/**
|
|
125
|
+
* Get cell format.
|
|
126
|
+
* Receives sheetId at call time from RenderContext.currentSheetId.
|
|
127
|
+
* This eliminates stale closure bugs when sheets switch.
|
|
128
|
+
*/
|
|
129
|
+
getCellFormat: (sheetId: string, cell: CellCoord) => CellFormat | undefined;
|
|
130
|
+
/** Initial sheet ID */
|
|
131
|
+
initialSheetId: string;
|
|
132
|
+
/** Total rows */
|
|
133
|
+
totalRows?: number;
|
|
134
|
+
/** Total cols */
|
|
135
|
+
totalCols?: number;
|
|
136
|
+
/** Provides sheet state (frozen panes, view options) - required for correct initialization */
|
|
137
|
+
sheetStateProvider: SheetStateProvider;
|
|
138
|
+
/**
|
|
139
|
+
* Get the initial scroll position for a sheet.
|
|
140
|
+
* Called when switching to a sheet to restore scroll position.
|
|
141
|
+
* Returns {x: 0, y: 0} if no saved position exists.
|
|
142
|
+
*/
|
|
143
|
+
getInitialScrollPosition?: (sheetId: string) => Point;
|
|
144
|
+
/**
|
|
145
|
+
* Notify when scroll position changes for a sheet.
|
|
146
|
+
* Called on scroll events to save scroll position per sheet.
|
|
147
|
+
*/
|
|
148
|
+
onScrollPositionChanged?: (sheetId: string, position: Point) => void;
|
|
149
|
+
/**
|
|
150
|
+
* Reset the input system's internal scroll position without triggering events.
|
|
151
|
+
* Called during sheet switch after renderer.setScroll() restores the scroll position,
|
|
152
|
+
* so the InputCoordinator's physics engine syncs to the restored position.
|
|
153
|
+
* Without this, the next scroll gesture would jump from the stale position.
|
|
154
|
+
*/
|
|
155
|
+
onScrollPositionReset?: (position: Point) => void;
|
|
156
|
+
/**
|
|
157
|
+
* Called when the renderer is created.
|
|
158
|
+
* Use this to wire bridges (SmartArt, WordArt, Equation) that need the renderer.
|
|
159
|
+
* The renderer is guaranteed to exist when this callback is invoked.
|
|
160
|
+
*/
|
|
161
|
+
onRendererCreated?: (renderer: GridRenderer) => void;
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=coordinator-interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-interfaces.d.ts","sourceRoot":"","sources":["../../src/rendering/coordinator-interfaces.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,C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