@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,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SmartArt Bridge Interface
|
|
3
|
+
*
|
|
4
|
+
* Defines the contract for SmartArt diagram management and layout computation.
|
|
5
|
+
* This interface bridges the SmartArt system to the engine's reactive system.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Computed layout caching (invalidated on structure/style changes)
|
|
9
|
+
* - Event subscriptions for reactive updates
|
|
10
|
+
* - Node operations (add, remove, update, move)
|
|
11
|
+
* - Layout and style management
|
|
12
|
+
*
|
|
13
|
+
* Architecture Notes:
|
|
14
|
+
* - ComputedLayout is a runtime cache, NOT persisted to storage
|
|
15
|
+
* - The bridge listens to EventBus for automatic cache invalidation
|
|
16
|
+
* - Provides ctx.smartArt.* access pattern
|
|
17
|
+
* - Handles serialization/deserialization between TS interfaces and storage
|
|
18
|
+
*
|
|
19
|
+
* Layout Cache Invalidation Strategy:
|
|
20
|
+
* - All node events trigger invalidation: node-added, node-removed, node-updated, node-moved
|
|
21
|
+
* - Layout/style events trigger invalidation: layout-changed, style-changed
|
|
22
|
+
* - Batch events trigger invalidation: nodes-batch-added, nodes-batch-removed
|
|
23
|
+
*
|
|
24
|
+
* @see contracts/src/smartart/types.ts - Core SmartArt types
|
|
25
|
+
* @see engine/src/state/bridges/smartart-bridge.ts - Implementation
|
|
26
|
+
*/
|
|
27
|
+
import type { ComputedLayout, NodeId, SmartArtDiagram, SmartArtNode } from '../smartart/types';
|
|
28
|
+
import type { NodeMoveDirection, NodePosition } from '../api/worksheet/smartart';
|
|
29
|
+
export type { NodeMoveDirection, NodePosition };
|
|
30
|
+
/**
|
|
31
|
+
* Cache entry for computed SmartArt layout.
|
|
32
|
+
*
|
|
33
|
+
* This is a runtime-only cache, NOT persisted to Yjs.
|
|
34
|
+
* Invalidated whenever diagram structure or styling changes.
|
|
35
|
+
*/
|
|
36
|
+
export interface ComputedLayoutCache {
|
|
37
|
+
/** SmartArt object ID this cache entry belongs to */
|
|
38
|
+
objectId: string;
|
|
39
|
+
/** The computed layout result */
|
|
40
|
+
layout: ComputedLayout;
|
|
41
|
+
/** Timestamp when the layout was computed (ms since epoch) */
|
|
42
|
+
lastComputed: number;
|
|
43
|
+
/** Version number, incremented on each invalidation */
|
|
44
|
+
version: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Bridge interface for SmartArt diagram management.
|
|
48
|
+
*
|
|
49
|
+
* This interface provides methods for managing SmartArt diagrams,
|
|
50
|
+
* computing layouts, and handling node operations.
|
|
51
|
+
*
|
|
52
|
+
* LIFECYCLE:
|
|
53
|
+
* 1. Bridge is created during engine initialization
|
|
54
|
+
* 2. start() subscribes to ALL SmartArt events on EventBus
|
|
55
|
+
* 3. Event handlers filter by objectId and call invalidateLayout() automatically
|
|
56
|
+
* 4. stop()/destroy() unsubscribes all event listeners during shutdown
|
|
57
|
+
*
|
|
58
|
+
* CACHE MANAGEMENT:
|
|
59
|
+
* - Cache is per-objectId, stored in Map<objectId, ComputedLayoutCache>
|
|
60
|
+
* - getComputedLayout() returns cached result if valid, recomputes otherwise
|
|
61
|
+
* - invalidateLayout() marks a specific diagram for recomputation
|
|
62
|
+
* - invalidateAllLayouts() clears the entire cache (e.g., on style changes)
|
|
63
|
+
*/
|
|
64
|
+
export interface ISmartArtBridge {
|
|
65
|
+
/**
|
|
66
|
+
* Start the SmartArt bridge - subscribe to events for reactive updates.
|
|
67
|
+
*
|
|
68
|
+
* Subscribes to the following events for automatic cache invalidation:
|
|
69
|
+
* - smartart:node-added, smartart:node-removed, smartart:node-updated
|
|
70
|
+
* - smartart:node-moved, smartart:nodes-batch-added, smartart:nodes-batch-removed
|
|
71
|
+
* - smartart:layout-changed, smartart:style-changed
|
|
72
|
+
*
|
|
73
|
+
* @returns Cleanup function to stop the bridge
|
|
74
|
+
*/
|
|
75
|
+
start(): () => void;
|
|
76
|
+
/**
|
|
77
|
+
* Stop the SmartArt bridge and clean up subscriptions.
|
|
78
|
+
*/
|
|
79
|
+
stop(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Destroy the bridge - alias for stop().
|
|
82
|
+
*/
|
|
83
|
+
destroy(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Get a SmartArt diagram by object ID.
|
|
86
|
+
* Returns the deserialized TypeScript interface view.
|
|
87
|
+
*
|
|
88
|
+
* @param objectId - SmartArt floating object ID
|
|
89
|
+
* @returns The diagram or undefined if not found
|
|
90
|
+
*/
|
|
91
|
+
getDiagram(objectId: string): SmartArtDiagram | undefined | Promise<SmartArtDiagram | undefined>;
|
|
92
|
+
/**
|
|
93
|
+
* Get all SmartArt diagrams on a sheet.
|
|
94
|
+
*
|
|
95
|
+
* @param sheetId - Sheet ID
|
|
96
|
+
* @returns Array of diagrams on the sheet
|
|
97
|
+
*/
|
|
98
|
+
getDiagramsOnSheet(sheetId: string): SmartArtDiagram[] | Promise<SmartArtDiagram[]>;
|
|
99
|
+
/**
|
|
100
|
+
* Add a node to a diagram.
|
|
101
|
+
*
|
|
102
|
+
* The new node is positioned relative to the reference node:
|
|
103
|
+
* - 'before': Insert as sibling before reference node
|
|
104
|
+
* - 'after': Insert as sibling after reference node
|
|
105
|
+
* - 'above': Insert as parent of reference node (promote reference)
|
|
106
|
+
* - 'below': Insert as child of reference node
|
|
107
|
+
* - 'child': Same as 'below', insert as last child
|
|
108
|
+
*
|
|
109
|
+
* If referenceNodeId is null, the node is added as a new root.
|
|
110
|
+
*
|
|
111
|
+
* @param objectId - SmartArt object ID
|
|
112
|
+
* @param text - Initial text content for the node
|
|
113
|
+
* @param position - Position relative to reference node
|
|
114
|
+
* @param referenceNodeId - Reference node ID (null for root)
|
|
115
|
+
* @returns The ID of the newly created node
|
|
116
|
+
*/
|
|
117
|
+
addNode(objectId: string, text: string, position: NodePosition, referenceNodeId: NodeId | null): NodeId | Promise<NodeId>;
|
|
118
|
+
/**
|
|
119
|
+
* Remove a node and optionally its children.
|
|
120
|
+
*
|
|
121
|
+
* By default, children are promoted to the removed node's parent.
|
|
122
|
+
* If the node is a root node with no parent, children become new roots.
|
|
123
|
+
*
|
|
124
|
+
* @param objectId - SmartArt object ID
|
|
125
|
+
* @param nodeId - Node ID to remove
|
|
126
|
+
*/
|
|
127
|
+
removeNode(objectId: string, nodeId: NodeId): void | Promise<void>;
|
|
128
|
+
/**
|
|
129
|
+
* Update node properties.
|
|
130
|
+
*
|
|
131
|
+
* Only provided properties are updated; others remain unchanged.
|
|
132
|
+
* Passing undefined for an optional property removes it.
|
|
133
|
+
*
|
|
134
|
+
* @param objectId - SmartArt object ID
|
|
135
|
+
* @param nodeId - Node ID to update
|
|
136
|
+
* @param updates - Partial node properties to update
|
|
137
|
+
*/
|
|
138
|
+
updateNode(objectId: string, nodeId: NodeId, updates: Partial<SmartArtNode>): void | Promise<void>;
|
|
139
|
+
/**
|
|
140
|
+
* Move a node in the hierarchy.
|
|
141
|
+
*
|
|
142
|
+
* Movement directions:
|
|
143
|
+
* - 'promote': Move up one level (become sibling of current parent)
|
|
144
|
+
* - 'demote': Move down one level (become child of previous sibling)
|
|
145
|
+
* - 'move-up': Move earlier in sibling order
|
|
146
|
+
* - 'move-down': Move later in sibling order
|
|
147
|
+
*
|
|
148
|
+
* @param objectId - SmartArt object ID
|
|
149
|
+
* @param nodeId - Node ID to move
|
|
150
|
+
* @param direction - Direction to move the node
|
|
151
|
+
*/
|
|
152
|
+
moveNode(objectId: string, nodeId: NodeId, direction: NodeMoveDirection): void | Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* Get a node by ID.
|
|
155
|
+
*
|
|
156
|
+
* @param objectId - SmartArt object ID
|
|
157
|
+
* @param nodeId - Node ID to retrieve
|
|
158
|
+
* @returns The node or undefined if not found
|
|
159
|
+
*/
|
|
160
|
+
getNode(objectId: string, nodeId: NodeId): SmartArtNode | undefined | Promise<SmartArtNode | undefined>;
|
|
161
|
+
/**
|
|
162
|
+
* Change the diagram layout.
|
|
163
|
+
*
|
|
164
|
+
* Layout changes may affect node constraints (e.g., max levels, max nodes).
|
|
165
|
+
* The bridge validates the change and adjusts the diagram if needed.
|
|
166
|
+
*
|
|
167
|
+
* @param objectId - SmartArt object ID
|
|
168
|
+
* @param newLayoutId - New layout ID (e.g., 'hierarchy/org-chart')
|
|
169
|
+
*/
|
|
170
|
+
changeLayout(objectId: string, newLayoutId: string): void | Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Change the quick style.
|
|
173
|
+
*
|
|
174
|
+
* Quick styles control shape fill, stroke, and effects.
|
|
175
|
+
*
|
|
176
|
+
* @param objectId - SmartArt object ID
|
|
177
|
+
* @param quickStyleId - Quick style ID (e.g., 'subtle-effect', 'intense-effect')
|
|
178
|
+
*/
|
|
179
|
+
changeQuickStyle(objectId: string, quickStyleId: string): void | Promise<void>;
|
|
180
|
+
/**
|
|
181
|
+
* Change the color theme.
|
|
182
|
+
*
|
|
183
|
+
* Color themes control the color palette used for shapes.
|
|
184
|
+
*
|
|
185
|
+
* @param objectId - SmartArt object ID
|
|
186
|
+
* @param colorThemeId - Color theme ID (e.g., 'colorful-1', 'accent-1')
|
|
187
|
+
*/
|
|
188
|
+
changeColorTheme(objectId: string, colorThemeId: string): void | Promise<void>;
|
|
189
|
+
/**
|
|
190
|
+
* Get the computed layout for a diagram.
|
|
191
|
+
* Returns cached result if valid, otherwise recomputes.
|
|
192
|
+
*
|
|
193
|
+
* This is the PRIMARY method for accessing layout - it manages the cache.
|
|
194
|
+
* Layout computation can be expensive, so caching is important for performance.
|
|
195
|
+
*
|
|
196
|
+
* @param objectId - SmartArt object ID
|
|
197
|
+
* @returns Computed layout or undefined if diagram not found
|
|
198
|
+
*/
|
|
199
|
+
getComputedLayout(objectId: string): ComputedLayout | undefined | Promise<ComputedLayout | undefined>;
|
|
200
|
+
/**
|
|
201
|
+
* Invalidate the cached layout for a diagram.
|
|
202
|
+
* Called automatically when diagram structure or styling changes.
|
|
203
|
+
*
|
|
204
|
+
* After invalidation, the next call to getComputedLayout() will recompute.
|
|
205
|
+
*
|
|
206
|
+
* @param objectId - SmartArt object ID
|
|
207
|
+
*/
|
|
208
|
+
invalidateLayout(objectId: string): void;
|
|
209
|
+
/**
|
|
210
|
+
* Invalidate all cached layouts.
|
|
211
|
+
* Called on sheet changes or global style changes.
|
|
212
|
+
*
|
|
213
|
+
* Use sparingly as it forces recomputation of all diagrams.
|
|
214
|
+
*/
|
|
215
|
+
invalidateAllLayouts(): void;
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=smartart-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smartart-bridge.d.ts","sourceRoot":"","sources":["../../src/bridges/smartart-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/F,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGjF,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC;AAMhD;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IAEjB,iCAAiC;IACjC,MAAM,EAAE,cAAc,CAAC;IAEvB,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAC;IAErB,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,eAAe;IAK9B;;;;;;;;;OASG;IACH,KAAK,IAAI,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;IAMhB;;;;;;OAMG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAAC;IAEjG;;;;;OAKG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IAMpF;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CACL,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,YAAY,EACtB,eAAe,EAAE,MAAM,GAAG,IAAI,GAC7B,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE5B;;;;;;;;OAQG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnE;;;;;;;;;OASG;IACH,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAC7B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/F;;;;;;OAMG;IACH,OAAO,CACL,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,YAAY,GAAG,SAAS,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAMhE;;;;;;;;OAQG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1E;;;;;;;OAOG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/E;;;;;;;OAOG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAM/E;;;;;;;;;OASG;IACH,iBAAiB,CACf,QAAQ,EAAE,MAAM,GACf,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;IAEpE;;;;;;;OAOG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC;;;;;OAKG;IACH,oBAAoB,IAAI,IAAI,CAAC;CAC9B"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordArt Rendering Bridge Interface
|
|
3
|
+
*
|
|
4
|
+
* Defines the contract for WordArt rendering via DrawingObject[].
|
|
5
|
+
* The bridge computes DrawingObjects from WordArt config; the scene graph renders them.
|
|
6
|
+
*
|
|
7
|
+
* Architecture Notes:
|
|
8
|
+
* - DrawingObject[] is a runtime cache, NOT persisted to Yjs
|
|
9
|
+
* - The bridge listens to EventBus for automatic cache invalidation
|
|
10
|
+
* - Provides ctx.wordArt.* access pattern in DocumentContext
|
|
11
|
+
*
|
|
12
|
+
* @see contracts/src/objects/drawing-object.ts - DrawingObject type
|
|
13
|
+
* @see engine/src/bridges/wordart-bridge.ts - Implementation
|
|
14
|
+
*/
|
|
15
|
+
import type { DrawingObject } from '../objects/drawing-object';
|
|
16
|
+
/**
|
|
17
|
+
* Bridge interface for WordArt rendering.
|
|
18
|
+
*
|
|
19
|
+
* This interface provides a single computation method that produces
|
|
20
|
+
* DrawingObject[] from WordArt config, plus cache management.
|
|
21
|
+
*
|
|
22
|
+
* LIFECYCLE:
|
|
23
|
+
* 1. Bridge is created during engine initialization
|
|
24
|
+
* 2. start() subscribes to WordArt change events for cache invalidation
|
|
25
|
+
* 3. stop()/destroy() cleans up resources and event subscriptions
|
|
26
|
+
*
|
|
27
|
+
* CACHE MANAGEMENT:
|
|
28
|
+
* - Cache is per-objectId, storing computed DrawingObject[]
|
|
29
|
+
* - computeDrawingObjects() returns cached result if valid, recomputes otherwise
|
|
30
|
+
* - invalidateCache() marks a specific object for recomputation
|
|
31
|
+
* - clearCache() clears the entire cache
|
|
32
|
+
*/
|
|
33
|
+
export interface IWordArtRenderingBridge {
|
|
34
|
+
/**
|
|
35
|
+
* Start the WordArt rendering bridge - subscribe to events for reactive updates.
|
|
36
|
+
*
|
|
37
|
+
* Call this after creating the bridge to begin listening for WordArt changes.
|
|
38
|
+
* The bridge will automatically invalidate the render cache when changes occur.
|
|
39
|
+
*
|
|
40
|
+
* @returns Cleanup function to stop the bridge
|
|
41
|
+
*/
|
|
42
|
+
start(): () => void;
|
|
43
|
+
/**
|
|
44
|
+
* Stop the WordArt rendering bridge and clean up subscriptions.
|
|
45
|
+
*
|
|
46
|
+
* Call this to pause event listening. Can be restarted with start().
|
|
47
|
+
*/
|
|
48
|
+
stop(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Compute DrawingObjects for a WordArt object.
|
|
51
|
+
*
|
|
52
|
+
* Uses caching to avoid recomputation on every frame. Returns cached result
|
|
53
|
+
* if the config, text, and bounds haven't changed.
|
|
54
|
+
*
|
|
55
|
+
* @param objectId - Floating object ID of the WordArt
|
|
56
|
+
* @param bounds - Optional bounds override (uses object bounds if not provided)
|
|
57
|
+
* @returns Array of DrawingObjects or null if object not found/not WordArt
|
|
58
|
+
*/
|
|
59
|
+
computeDrawingObjects(objectId: string, bounds?: {
|
|
60
|
+
width: number;
|
|
61
|
+
height: number;
|
|
62
|
+
}): Promise<DrawingObject[] | null>;
|
|
63
|
+
/**
|
|
64
|
+
* Invalidate render cache for an object.
|
|
65
|
+
*
|
|
66
|
+
* Called automatically when WordArt config, text, or bounds change.
|
|
67
|
+
* After invalidation, the next call to computeDrawingObjects() will recompute.
|
|
68
|
+
*
|
|
69
|
+
* @param objectId - Floating object ID to invalidate
|
|
70
|
+
*/
|
|
71
|
+
invalidateCache(objectId: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* Clear entire render cache.
|
|
74
|
+
*
|
|
75
|
+
* Forces recomputation of all WordArt objects on next render.
|
|
76
|
+
* Use sparingly as it impacts performance.
|
|
77
|
+
*/
|
|
78
|
+
clearCache(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Clean up resources and event subscriptions.
|
|
81
|
+
*
|
|
82
|
+
* Call during engine shutdown or when the bridge is no longer needed.
|
|
83
|
+
*/
|
|
84
|
+
destroy(): void;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=wordart-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wordart-bridge.d.ts","sourceRoot":"","sources":["../../src/bridges/wordart-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM/D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;OAOG;IACH,KAAK,IAAI,MAAM,IAAI,CAAC;IAEpB;;;;OAIG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;;;;;;;;OASG;IACH,qBAAqB,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GACzC,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,CAAC;IAEnC;;;;;;;OAOG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC;;;;;OAKG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;;;OAIG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capability Errors - Error types for capability-related failures
|
|
3
|
+
*
|
|
4
|
+
* This file defines:
|
|
5
|
+
* - CapabilityErrorCode type
|
|
6
|
+
*
|
|
7
|
+
* Runtime error classes, type guards, and factory functions moved to
|
|
8
|
+
* @mog/spreadsheet-utils/capabilities/errors.
|
|
9
|
+
*
|
|
10
|
+
* @see plans/active/permission/CAPABILITY-IMPLEMENTATION.md
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Error codes for capability-related failures.
|
|
14
|
+
*/
|
|
15
|
+
export type CapabilityErrorCode = 'CAPABILITY_DENIED' | 'CAPABILITY_SCOPE_MISMATCH' | 'CAPABILITY_EXPIRED' | 'CAPABILITY_NOT_GRANTED' | 'CAPABILITY_REQUIRES_AUTH' | 'INVALID_SCOPE' | 'UNBOUNDED_WILDCARD';
|
|
16
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/capabilities/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,mBAAmB,GACnB,2BAA2B,GAC3B,oBAAoB,GACpB,wBAAwB,GACxB,0BAA0B,GAC1B,eAAe,GACf,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gated API Interfaces - Capability-based API access (Types Only)
|
|
3
|
+
*
|
|
4
|
+
* This file defines ONLY type/interface definitions:
|
|
5
|
+
* - IGatedAppKernelAPI interface (optional interfaces per capability)
|
|
6
|
+
* - ICapabilityIntrospection interface
|
|
7
|
+
* - Gated sub-API interfaces
|
|
8
|
+
*
|
|
9
|
+
* Runtime code (type guard functions: hasTableReadAccess, hasTableFullAccess,
|
|
10
|
+
* hasFilesystemAccess, hasNetworkAccess) has been moved to
|
|
11
|
+
* @mog/kernel/services/capabilities (gated-api.ts).
|
|
12
|
+
*
|
|
13
|
+
* @see plans/active/permission/CAPABILITY-IMPLEMENTATION.md
|
|
14
|
+
*/
|
|
15
|
+
import type { IAppClipboardAPI, IAppColumnsAPI, IAppEventsAPI, IAppRecordsAPI, IAppRelationsAPI, IAppTablesAPI } from '../apps/api';
|
|
16
|
+
import type { INotificationsService, IUndoService } from '../services';
|
|
17
|
+
import type { CapabilityScope } from './scope';
|
|
18
|
+
import type { CapabilityType } from './types';
|
|
19
|
+
/**
|
|
20
|
+
* Interface for apps to introspect their granted capabilities.
|
|
21
|
+
*
|
|
22
|
+
* Apps can use this to:
|
|
23
|
+
* - Check what capabilities they have before trying to use APIs
|
|
24
|
+
* - Adapt UI based on available capabilities
|
|
25
|
+
* - Determine if they have scoped or full access
|
|
26
|
+
*/
|
|
27
|
+
export interface ICapabilityIntrospection {
|
|
28
|
+
/**
|
|
29
|
+
* Check if the app has a specific capability.
|
|
30
|
+
*
|
|
31
|
+
* This checks for both direct grants and implied capabilities.
|
|
32
|
+
* For example, if the app has 'cells:write', has('cells:read') returns true.
|
|
33
|
+
*
|
|
34
|
+
* @param capability - The capability to check
|
|
35
|
+
* @returns True if the app has this capability
|
|
36
|
+
*/
|
|
37
|
+
has(capability: CapabilityType): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* List all capabilities the app currently has.
|
|
40
|
+
*
|
|
41
|
+
* Includes both directly granted capabilities and implied capabilities.
|
|
42
|
+
*
|
|
43
|
+
* @returns Array of all effective capabilities
|
|
44
|
+
*/
|
|
45
|
+
list(): CapabilityType[];
|
|
46
|
+
/**
|
|
47
|
+
* Check if a capability is scoped (limited to specific resources).
|
|
48
|
+
*
|
|
49
|
+
* @param capability - The capability to check
|
|
50
|
+
* @returns True if the capability is scoped
|
|
51
|
+
*/
|
|
52
|
+
isScoped(capability: CapabilityType): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Get the scope for a capability.
|
|
55
|
+
*
|
|
56
|
+
* @param capability - The capability to get scope for
|
|
57
|
+
* @returns The scope, or null if unscoped or not granted
|
|
58
|
+
*/
|
|
59
|
+
getScope(capability: CapabilityType): CapabilityScope | null;
|
|
60
|
+
/**
|
|
61
|
+
* Check if the app has access to a specific resource.
|
|
62
|
+
*
|
|
63
|
+
* This is a convenience method combining has() and scope checking.
|
|
64
|
+
*
|
|
65
|
+
* @param capability - The capability required
|
|
66
|
+
* @param resourceType - The type of resource (e.g., 'table')
|
|
67
|
+
* @param resourceId - The ID of the resource (e.g., 'contacts')
|
|
68
|
+
* @returns True if the app can access this resource
|
|
69
|
+
*/
|
|
70
|
+
hasAccessTo(capability: CapabilityType, resourceType: string, resourceId: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Request a capability at runtime.
|
|
73
|
+
*
|
|
74
|
+
* This triggers the consent flow for the requested capability.
|
|
75
|
+
* Returns a promise that resolves to true if granted, false if denied.
|
|
76
|
+
*
|
|
77
|
+
* @param capability - The capability to request
|
|
78
|
+
* @param reason - User-facing reason for the request
|
|
79
|
+
* @returns Promise resolving to grant result
|
|
80
|
+
*/
|
|
81
|
+
request(capability: CapabilityType, reason: string): Promise<boolean>;
|
|
82
|
+
/**
|
|
83
|
+
* Subscribe to capability changes.
|
|
84
|
+
*
|
|
85
|
+
* Called when capabilities are granted, revoked, or expire.
|
|
86
|
+
* Apps can use this to adapt their UI in real-time.
|
|
87
|
+
*
|
|
88
|
+
* @param callback - Called when capabilities change
|
|
89
|
+
* @returns Unsubscribe function
|
|
90
|
+
*/
|
|
91
|
+
onChange(callback: (capabilities: CapabilityType[]) => void): () => void;
|
|
92
|
+
/**
|
|
93
|
+
* Subscribe to capability expiration warnings.
|
|
94
|
+
*
|
|
95
|
+
* Called when a session-only capability is about to expire.
|
|
96
|
+
* Default warning is 60 seconds before expiration.
|
|
97
|
+
*
|
|
98
|
+
* @param callback - Called with the expiring capability
|
|
99
|
+
* @returns Unsubscribe function
|
|
100
|
+
*/
|
|
101
|
+
onExpiring(callback: (capability: CapabilityType, expiresInMs: number) => void): () => void;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Gated cells API - only methods allowed by granted capabilities.
|
|
105
|
+
*/
|
|
106
|
+
export interface IGatedCellsAPI {
|
|
107
|
+
readonly get?: (sheetId: string, row: number, col: number) => unknown;
|
|
108
|
+
readonly getRange?: (sheetId: string, range: string) => unknown[][];
|
|
109
|
+
readonly set?: (sheetId: string, row: number, col: number, value: unknown) => void;
|
|
110
|
+
readonly setRange?: (sheetId: string, range: string, values: unknown[][]) => void;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Gated sheets API - only methods allowed by granted capabilities.
|
|
114
|
+
*/
|
|
115
|
+
export interface IGatedSheetsAPI {
|
|
116
|
+
readonly list?: () => Array<{
|
|
117
|
+
id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
}>;
|
|
120
|
+
readonly get?: (sheetId: string) => {
|
|
121
|
+
id: string;
|
|
122
|
+
name: string;
|
|
123
|
+
} | null;
|
|
124
|
+
readonly create?: (name: string) => {
|
|
125
|
+
id: string;
|
|
126
|
+
name: string;
|
|
127
|
+
};
|
|
128
|
+
readonly delete?: (sheetId: string) => void;
|
|
129
|
+
readonly rename?: (sheetId: string, newName: string) => void;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Gated formulas API - only methods allowed by granted capabilities.
|
|
133
|
+
*/
|
|
134
|
+
export interface IGatedFormulasAPI {
|
|
135
|
+
readonly get?: (sheetId: string, row: number, col: number) => string | null;
|
|
136
|
+
readonly set?: (sheetId: string, row: number, col: number, formula: string) => void;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Gated formatting API - only methods allowed by granted capabilities.
|
|
140
|
+
*/
|
|
141
|
+
export interface IGatedFormattingAPI {
|
|
142
|
+
readonly get?: (sheetId: string, row: number, col: number) => Record<string, unknown>;
|
|
143
|
+
readonly set?: (sheetId: string, row: number, col: number, format: Record<string, unknown>) => void;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Gated checkpoints API - only methods allowed by granted capabilities.
|
|
147
|
+
*/
|
|
148
|
+
export interface IGatedCheckpointsAPI {
|
|
149
|
+
readonly list?: () => Array<{
|
|
150
|
+
id: string;
|
|
151
|
+
name: string;
|
|
152
|
+
createdAt: number;
|
|
153
|
+
}>;
|
|
154
|
+
readonly create?: (name: string) => {
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
createdAt: number;
|
|
158
|
+
};
|
|
159
|
+
readonly restore?: (checkpointId: string) => void;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Gated filesystem API - only methods allowed by granted capabilities.
|
|
163
|
+
*/
|
|
164
|
+
export interface IGatedFilesystemAPI {
|
|
165
|
+
readonly read?: (path: string) => Promise<ArrayBuffer>;
|
|
166
|
+
readonly readText?: (path: string) => Promise<string>;
|
|
167
|
+
readonly exists?: (path: string) => Promise<boolean>;
|
|
168
|
+
readonly list?: (path: string) => Promise<string[]>;
|
|
169
|
+
readonly write?: (path: string, data: ArrayBuffer) => Promise<void>;
|
|
170
|
+
readonly writeText?: (path: string, text: string) => Promise<void>;
|
|
171
|
+
readonly delete?: (path: string) => Promise<void>;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Gated dialogs API - only methods allowed by granted capabilities.
|
|
175
|
+
*/
|
|
176
|
+
export interface IGatedDialogsAPI {
|
|
177
|
+
readonly open?: (options?: {
|
|
178
|
+
filters?: Array<{
|
|
179
|
+
name: string;
|
|
180
|
+
extensions: string[];
|
|
181
|
+
}>;
|
|
182
|
+
multiple?: boolean;
|
|
183
|
+
}) => Promise<string[] | null>;
|
|
184
|
+
readonly save?: (options?: {
|
|
185
|
+
defaultPath?: string;
|
|
186
|
+
filters?: Array<{
|
|
187
|
+
name: string;
|
|
188
|
+
extensions: string[];
|
|
189
|
+
}>;
|
|
190
|
+
}) => Promise<string | null>;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Gated shell API - only methods allowed by granted capabilities.
|
|
194
|
+
*/
|
|
195
|
+
export interface IGatedShellAPI {
|
|
196
|
+
readonly setWindowTitle?: (title: string) => void;
|
|
197
|
+
readonly openExternal?: (url: string) => Promise<void>;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Gated network API - only methods allowed by granted capabilities.
|
|
201
|
+
*/
|
|
202
|
+
export interface IGatedNetworkAPI {
|
|
203
|
+
/**
|
|
204
|
+
* Make an HTTP request.
|
|
205
|
+
*
|
|
206
|
+
* The allowed URLs depend on the granted network capabilities:
|
|
207
|
+
* - network:sameorigin: Only same-origin URLs
|
|
208
|
+
* - network:allowlist: Only user-approved domains
|
|
209
|
+
* - network:localhost: localhost/127.0.0.1
|
|
210
|
+
* - network:any: Any remote URL (excludes localhost unless also granted)
|
|
211
|
+
*
|
|
212
|
+
* Throws CapabilityDeniedError if URL is not allowed.
|
|
213
|
+
*/
|
|
214
|
+
readonly fetch?: (url: string, options?: RequestInit) => Promise<Response>;
|
|
215
|
+
/**
|
|
216
|
+
* Get the list of allowed domains (for network:allowlist).
|
|
217
|
+
*/
|
|
218
|
+
readonly getAllowedDomains?: () => string[];
|
|
219
|
+
/**
|
|
220
|
+
* Request to add a domain to the allowlist (shows consent dialog).
|
|
221
|
+
*/
|
|
222
|
+
readonly requestDomain?: (domain: string, reason: string) => Promise<boolean>;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Gated connections API - only methods allowed by granted capabilities.
|
|
226
|
+
*/
|
|
227
|
+
export interface IGatedConnectionsAPI {
|
|
228
|
+
readonly list?: () => Array<{
|
|
229
|
+
id: string;
|
|
230
|
+
name: string;
|
|
231
|
+
type: string;
|
|
232
|
+
}>;
|
|
233
|
+
readonly query?: (connectionId: string, query: unknown) => Promise<unknown[]>;
|
|
234
|
+
readonly execute?: (connectionId: string, mutation: unknown) => Promise<unknown>;
|
|
235
|
+
readonly create?: (config: unknown) => Promise<{
|
|
236
|
+
id: string;
|
|
237
|
+
}>;
|
|
238
|
+
readonly delete?: (connectionId: string) => Promise<void>;
|
|
239
|
+
readonly executeNative?: (connectionId: string, rawQuery: string) => Promise<unknown>;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* The Capability-Gated App Kernel API.
|
|
243
|
+
*
|
|
244
|
+
* Unlike IAppKernelAPI where all interfaces are always present,
|
|
245
|
+
* IGatedAppKernelAPI only exposes interfaces for granted capabilities.
|
|
246
|
+
*
|
|
247
|
+
* Apps check if interfaces exist before using them:
|
|
248
|
+
* ```typescript
|
|
249
|
+
* if (api.tables) {
|
|
250
|
+
* const tables = api.tables.list();
|
|
251
|
+
* }
|
|
252
|
+
* ```
|
|
253
|
+
*
|
|
254
|
+
* Or use capability introspection:
|
|
255
|
+
* ```typescript
|
|
256
|
+
* if (api.capabilities.has('tables:read')) {
|
|
257
|
+
* const tables = api.tables!.list();
|
|
258
|
+
* }
|
|
259
|
+
* ```
|
|
260
|
+
*
|
|
261
|
+
* Design:
|
|
262
|
+
* - All sub-APIs are optional (undefined if not granted)
|
|
263
|
+
* - Methods within sub-APIs may also be optional based on read/write capabilities
|
|
264
|
+
* - capabilities introspection is ALWAYS available
|
|
265
|
+
* - batch() is always available (validates capabilities per operation)
|
|
266
|
+
*/
|
|
267
|
+
export interface IGatedAppKernelAPI {
|
|
268
|
+
/**
|
|
269
|
+
* Capability introspection - always available.
|
|
270
|
+
* Apps can check their capabilities and request new ones.
|
|
271
|
+
*/
|
|
272
|
+
readonly capabilities: ICapabilityIntrospection;
|
|
273
|
+
/** Cell operations (requires cells:read and/or cells:write) */
|
|
274
|
+
readonly cells?: IGatedCellsAPI;
|
|
275
|
+
/** Sheet operations (requires sheets:* capabilities) */
|
|
276
|
+
readonly sheets?: IGatedSheetsAPI;
|
|
277
|
+
/** Formula operations (requires formulas:read and/or formulas:write) */
|
|
278
|
+
readonly formulas?: IGatedFormulasAPI;
|
|
279
|
+
/** Formatting operations (requires formatting:read and/or formatting:write) */
|
|
280
|
+
readonly formatting?: IGatedFormattingAPI;
|
|
281
|
+
/** Trigger recalculation (requires recalc:trigger) */
|
|
282
|
+
readonly recalc?: {
|
|
283
|
+
readonly trigger: () => void;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* Table operations (requires tables:* capabilities).
|
|
287
|
+
* From base IAppTablesAPI, but methods may be undefined based on capabilities.
|
|
288
|
+
*/
|
|
289
|
+
readonly tables?: Partial<IAppTablesAPI>;
|
|
290
|
+
/**
|
|
291
|
+
* Column operations (requires tables:* capabilities).
|
|
292
|
+
*/
|
|
293
|
+
readonly columns?: Partial<IAppColumnsAPI>;
|
|
294
|
+
/**
|
|
295
|
+
* Record operations (requires tables:* capabilities).
|
|
296
|
+
*/
|
|
297
|
+
readonly records?: Partial<IAppRecordsAPI>;
|
|
298
|
+
/**
|
|
299
|
+
* Relation operations (requires tables:read).
|
|
300
|
+
*/
|
|
301
|
+
readonly relations?: Partial<IAppRelationsAPI>;
|
|
302
|
+
/**
|
|
303
|
+
* Event subscriptions (requires events:subscribe).
|
|
304
|
+
* Events are filtered by the app's read capabilities.
|
|
305
|
+
*/
|
|
306
|
+
readonly events?: IAppEventsAPI;
|
|
307
|
+
/**
|
|
308
|
+
* Clipboard operations (requires clipboard:read and/or clipboard:write).
|
|
309
|
+
*/
|
|
310
|
+
readonly clipboard?: Partial<IAppClipboardAPI>;
|
|
311
|
+
/**
|
|
312
|
+
* Undo/redo operations (requires undo:read and/or undo:write).
|
|
313
|
+
*/
|
|
314
|
+
readonly undo?: Partial<IUndoService>;
|
|
315
|
+
/**
|
|
316
|
+
* Notifications (requires notifications:send).
|
|
317
|
+
*/
|
|
318
|
+
readonly notifications?: Pick<INotificationsService, 'notify' | 'info' | 'success' | 'warning' | 'error'>;
|
|
319
|
+
/**
|
|
320
|
+
* Checkpoint operations (requires checkpoints:* capabilities).
|
|
321
|
+
*/
|
|
322
|
+
readonly checkpoints?: IGatedCheckpointsAPI;
|
|
323
|
+
/**
|
|
324
|
+
* Filesystem operations (requires filesystem:* capabilities).
|
|
325
|
+
*/
|
|
326
|
+
readonly filesystem?: IGatedFilesystemAPI;
|
|
327
|
+
/**
|
|
328
|
+
* File dialogs (requires dialogs:open and/or dialogs:save).
|
|
329
|
+
*/
|
|
330
|
+
readonly dialogs?: IGatedDialogsAPI;
|
|
331
|
+
/**
|
|
332
|
+
* Shell operations (requires shell:* capabilities).
|
|
333
|
+
*/
|
|
334
|
+
readonly shell?: IGatedShellAPI;
|
|
335
|
+
/**
|
|
336
|
+
* Network operations (requires network:* capabilities).
|
|
337
|
+
*/
|
|
338
|
+
readonly network?: IGatedNetworkAPI;
|
|
339
|
+
/**
|
|
340
|
+
* Database connections (requires connections:* capabilities).
|
|
341
|
+
*/
|
|
342
|
+
readonly connections?: IGatedConnectionsAPI;
|
|
343
|
+
/**
|
|
344
|
+
* Execute multiple operations in a single transaction.
|
|
345
|
+
*
|
|
346
|
+
* CRITICAL: Each operation is validated against the app's capabilities
|
|
347
|
+
* BEFORE any operation executes. If any operation is denied, the entire
|
|
348
|
+
* batch fails without executing anything.
|
|
349
|
+
*
|
|
350
|
+
* @param fn - Function containing operations to batch
|
|
351
|
+
* @param description - Description for undo history
|
|
352
|
+
*/
|
|
353
|
+
batch<T>(fn: () => T, description?: string): T;
|
|
354
|
+
}
|
|
355
|
+
//# sourceMappingURL=gated-api.d.ts.map
|