@mog-sdk/node 0.1.13 → 0.1.14

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/index.js CHANGED
@@ -307,6 +307,36 @@ var init_errors = __esm({
307
307
  }
308
308
  });
309
309
 
310
+ // ../../contracts/src/document/protection.ts
311
+ var DEFAULT_PROTECTION_OPTIONS, DEFAULT_WORKBOOK_PROTECTION_OPTIONS;
312
+ var init_protection = __esm({
313
+ "../../contracts/src/document/protection.ts"() {
314
+ "use strict";
315
+ init_esm_shims();
316
+ DEFAULT_PROTECTION_OPTIONS = {
317
+ // Selection defaults to true (users can always select cells)
318
+ selectLockedCells: true,
319
+ selectUnlockedCells: true,
320
+ // All other operations blocked by default
321
+ insertRows: false,
322
+ insertColumns: false,
323
+ deleteRows: false,
324
+ deleteColumns: false,
325
+ formatCells: false,
326
+ formatColumns: false,
327
+ formatRows: false,
328
+ sort: false,
329
+ useAutoFilter: false,
330
+ usePivotTableReports: false,
331
+ editObjects: false,
332
+ editScenarios: false
333
+ };
334
+ DEFAULT_WORKBOOK_PROTECTION_OPTIONS = {
335
+ structure: true
336
+ };
337
+ }
338
+ });
339
+
310
340
  // ../../infra/transport/src/command-metadata.gen.ts
311
341
  var BYTES_TUPLE_COMMANDS, RECALC_COMMANDS;
312
342
  var init_command_metadata_gen = __esm({
@@ -786,165 +816,6 @@ var init_napi_transport = __esm({
786
816
  }
787
817
  });
788
818
 
789
- // ../../node_modules/.pnpm/@tauri-apps+api@2.10.1/node_modules/@tauri-apps/api/external/tslib/tslib.es6.js
790
- function __classPrivateFieldGet(receiver, state, kind, f) {
791
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
792
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
793
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
794
- }
795
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
796
- if (kind === "m") throw new TypeError("Private method is not writable");
797
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
798
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
799
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
800
- }
801
- var init_tslib_es6 = __esm({
802
- "../../node_modules/.pnpm/@tauri-apps+api@2.10.1/node_modules/@tauri-apps/api/external/tslib/tslib.es6.js"() {
803
- "use strict";
804
- init_esm_shims();
805
- }
806
- });
807
-
808
- // ../../node_modules/.pnpm/@tauri-apps+api@2.10.1/node_modules/@tauri-apps/api/core.js
809
- var core_exports = {};
810
- __export(core_exports, {
811
- Channel: () => Channel,
812
- PluginListener: () => PluginListener,
813
- Resource: () => Resource,
814
- SERIALIZE_TO_IPC_FN: () => SERIALIZE_TO_IPC_FN,
815
- addPluginListener: () => addPluginListener,
816
- checkPermissions: () => checkPermissions,
817
- convertFileSrc: () => convertFileSrc,
818
- invoke: () => invoke,
819
- isTauri: () => isTauri2,
820
- requestPermissions: () => requestPermissions,
821
- transformCallback: () => transformCallback
822
- });
823
- function transformCallback(callback, once = false) {
824
- return window.__TAURI_INTERNALS__.transformCallback(callback, once);
825
- }
826
- async function addPluginListener(plugin, event, cb) {
827
- const handler = new Channel(cb);
828
- try {
829
- await invoke(`plugin:${plugin}|register_listener`, {
830
- event,
831
- handler
832
- });
833
- return new PluginListener(plugin, event, handler.id);
834
- } catch {
835
- await invoke(`plugin:${plugin}|registerListener`, { event, handler });
836
- return new PluginListener(plugin, event, handler.id);
837
- }
838
- }
839
- async function checkPermissions(plugin) {
840
- return invoke(`plugin:${plugin}|check_permissions`);
841
- }
842
- async function requestPermissions(plugin) {
843
- return invoke(`plugin:${plugin}|request_permissions`);
844
- }
845
- async function invoke(cmd, args = {}, options) {
846
- return window.__TAURI_INTERNALS__.invoke(cmd, args, options);
847
- }
848
- function convertFileSrc(filePath, protocol = "asset") {
849
- return window.__TAURI_INTERNALS__.convertFileSrc(filePath, protocol);
850
- }
851
- function isTauri2() {
852
- return !!(globalThis || window).isTauri;
853
- }
854
- var _Channel_onmessage, _Channel_nextMessageIndex, _Channel_pendingMessages, _Channel_messageEndIndex, _Resource_rid, SERIALIZE_TO_IPC_FN, Channel, PluginListener, Resource;
855
- var init_core = __esm({
856
- "../../node_modules/.pnpm/@tauri-apps+api@2.10.1/node_modules/@tauri-apps/api/core.js"() {
857
- "use strict";
858
- init_esm_shims();
859
- init_tslib_es6();
860
- SERIALIZE_TO_IPC_FN = "__TAURI_TO_IPC_KEY__";
861
- Channel = class {
862
- constructor(onmessage) {
863
- _Channel_onmessage.set(this, void 0);
864
- _Channel_nextMessageIndex.set(this, 0);
865
- _Channel_pendingMessages.set(this, []);
866
- _Channel_messageEndIndex.set(this, void 0);
867
- __classPrivateFieldSet(this, _Channel_onmessage, onmessage || (() => {
868
- }), "f");
869
- this.id = transformCallback((rawMessage) => {
870
- const index = rawMessage.index;
871
- if ("end" in rawMessage) {
872
- if (index == __classPrivateFieldGet(this, _Channel_nextMessageIndex, "f")) {
873
- this.cleanupCallback();
874
- } else {
875
- __classPrivateFieldSet(this, _Channel_messageEndIndex, index, "f");
876
- }
877
- return;
878
- }
879
- const message = rawMessage.message;
880
- if (index == __classPrivateFieldGet(this, _Channel_nextMessageIndex, "f")) {
881
- __classPrivateFieldGet(this, _Channel_onmessage, "f").call(this, message);
882
- __classPrivateFieldSet(this, _Channel_nextMessageIndex, __classPrivateFieldGet(this, _Channel_nextMessageIndex, "f") + 1, "f");
883
- while (__classPrivateFieldGet(this, _Channel_nextMessageIndex, "f") in __classPrivateFieldGet(this, _Channel_pendingMessages, "f")) {
884
- const message2 = __classPrivateFieldGet(this, _Channel_pendingMessages, "f")[__classPrivateFieldGet(this, _Channel_nextMessageIndex, "f")];
885
- __classPrivateFieldGet(this, _Channel_onmessage, "f").call(this, message2);
886
- delete __classPrivateFieldGet(this, _Channel_pendingMessages, "f")[__classPrivateFieldGet(this, _Channel_nextMessageIndex, "f")];
887
- __classPrivateFieldSet(this, _Channel_nextMessageIndex, __classPrivateFieldGet(this, _Channel_nextMessageIndex, "f") + 1, "f");
888
- }
889
- if (__classPrivateFieldGet(this, _Channel_nextMessageIndex, "f") === __classPrivateFieldGet(this, _Channel_messageEndIndex, "f")) {
890
- this.cleanupCallback();
891
- }
892
- } else {
893
- __classPrivateFieldGet(this, _Channel_pendingMessages, "f")[index] = message;
894
- }
895
- });
896
- }
897
- cleanupCallback() {
898
- window.__TAURI_INTERNALS__.unregisterCallback(this.id);
899
- }
900
- set onmessage(handler) {
901
- __classPrivateFieldSet(this, _Channel_onmessage, handler, "f");
902
- }
903
- get onmessage() {
904
- return __classPrivateFieldGet(this, _Channel_onmessage, "f");
905
- }
906
- [(_Channel_onmessage = /* @__PURE__ */ new WeakMap(), _Channel_nextMessageIndex = /* @__PURE__ */ new WeakMap(), _Channel_pendingMessages = /* @__PURE__ */ new WeakMap(), _Channel_messageEndIndex = /* @__PURE__ */ new WeakMap(), SERIALIZE_TO_IPC_FN)]() {
907
- return `__CHANNEL__:${this.id}`;
908
- }
909
- toJSON() {
910
- return this[SERIALIZE_TO_IPC_FN]();
911
- }
912
- };
913
- PluginListener = class {
914
- constructor(plugin, event, channelId) {
915
- this.plugin = plugin;
916
- this.event = event;
917
- this.channelId = channelId;
918
- }
919
- async unregister() {
920
- return invoke(`plugin:${this.plugin}|remove_listener`, {
921
- event: this.event,
922
- channelId: this.channelId
923
- });
924
- }
925
- };
926
- Resource = class {
927
- get rid() {
928
- return __classPrivateFieldGet(this, _Resource_rid, "f");
929
- }
930
- constructor(rid) {
931
- _Resource_rid.set(this, void 0);
932
- __classPrivateFieldSet(this, _Resource_rid, rid, "f");
933
- }
934
- /**
935
- * Destroys and cleans up this resource from memory.
936
- * **You should not call any method on this object anymore and should drop any reference to it.**
937
- */
938
- async close() {
939
- return invoke("plugin:resources|close", {
940
- rid: this.rid
941
- });
942
- }
943
- };
944
- _Resource_rid = /* @__PURE__ */ new WeakMap();
945
- }
946
- });
947
-
948
819
  // ../../infra/transport/src/tauri-transport.ts
949
820
  function createTauriTransport() {
950
821
  let invokeFunc = null;
@@ -952,8 +823,8 @@ function createTauriTransport() {
952
823
  async call(command, args) {
953
824
  let fn = invokeFunc;
954
825
  if (!fn) {
955
- const { invoke: invoke2 } = await Promise.resolve().then(() => (init_core(), core_exports));
956
- fn = invoke2;
826
+ const { invoke } = await import("@tauri-apps/api/core");
827
+ fn = invoke;
957
828
  invokeFunc = fn;
958
829
  }
959
830
  try {
@@ -2215,6 +2086,101 @@ var init_mutation_result_handler = __esm({
2215
2086
  }
2216
2087
  });
2217
2088
 
2089
+ // ../../contracts/src/core/commands.ts
2090
+ var init_commands = __esm({
2091
+ "../../contracts/src/core/commands.ts"() {
2092
+ "use strict";
2093
+ init_esm_shims();
2094
+ }
2095
+ });
2096
+
2097
+ // ../../contracts/src/core/core.ts
2098
+ var init_core = __esm({
2099
+ "../../contracts/src/core/core.ts"() {
2100
+ "use strict";
2101
+ init_esm_shims();
2102
+ }
2103
+ });
2104
+
2105
+ // ../../contracts/src/core/disposable.ts
2106
+ var init_disposable = __esm({
2107
+ "../../contracts/src/core/disposable.ts"() {
2108
+ "use strict";
2109
+ init_esm_shims();
2110
+ }
2111
+ });
2112
+
2113
+ // ../../contracts/src/core/event-base.ts
2114
+ var init_event_base = __esm({
2115
+ "../../contracts/src/core/event-base.ts"() {
2116
+ "use strict";
2117
+ init_esm_shims();
2118
+ }
2119
+ });
2120
+
2121
+ // ../../contracts/src/core/execution.ts
2122
+ var init_execution = __esm({
2123
+ "../../contracts/src/core/execution.ts"() {
2124
+ "use strict";
2125
+ init_esm_shims();
2126
+ }
2127
+ });
2128
+
2129
+ // ../../contracts/src/core/result.ts
2130
+ var init_result = __esm({
2131
+ "../../contracts/src/core/result.ts"() {
2132
+ "use strict";
2133
+ init_esm_shims();
2134
+ }
2135
+ });
2136
+
2137
+ // ../../contracts/src/core/schema.ts
2138
+ var init_schema = __esm({
2139
+ "../../contracts/src/core/schema.ts"() {
2140
+ "use strict";
2141
+ init_esm_shims();
2142
+ }
2143
+ });
2144
+
2145
+ // ../../contracts/src/core/formatted-text.ts
2146
+ function asFormattedText(s) {
2147
+ return s;
2148
+ }
2149
+ function displayStringOrNull(text) {
2150
+ return text;
2151
+ }
2152
+ var init_formatted_text = __esm({
2153
+ "../../contracts/src/core/formatted-text.ts"() {
2154
+ "use strict";
2155
+ init_esm_shims();
2156
+ }
2157
+ });
2158
+
2159
+ // ../../contracts/src/core/testing.ts
2160
+ var init_testing = __esm({
2161
+ "../../contracts/src/core/testing.ts"() {
2162
+ "use strict";
2163
+ init_esm_shims();
2164
+ }
2165
+ });
2166
+
2167
+ // ../../contracts/src/core/index.ts
2168
+ var init_core2 = __esm({
2169
+ "../../contracts/src/core/index.ts"() {
2170
+ "use strict";
2171
+ init_esm_shims();
2172
+ init_commands();
2173
+ init_core();
2174
+ init_disposable();
2175
+ init_event_base();
2176
+ init_execution();
2177
+ init_result();
2178
+ init_schema();
2179
+ init_formatted_text();
2180
+ init_testing();
2181
+ }
2182
+ });
2183
+
2218
2184
  // ../../kernel/src/bridges/wire/constants.gen.ts
2219
2185
  var HEADER_SIZE, CELL_STRIDE, MERGE_STRIDE, DIM_STRIDE, NO_STRING, MUTATION_HEADER_SIZE, PATCH_STRIDE, OFF_NUMBER_VALUE, OFF_DISPLAY_OFF, OFF_ERROR_OFF, OFF_FLAGS, OFF_FORMAT_IDX, OFF_DISPLAY_LEN, OFF_ERROR_LEN, OFF_BG_COLOR_OVERRIDE, OFF_FONT_COLOR_OVERRIDE, DATA_BAR_ENTRY_STRIDE, ICON_ENTRY_STRIDE, MUT_HAS_PROJECTION_CHANGES, MUT_HAS_ERRORS, MUT_HAS_PALETTE, ICON_SET_NAMES;
2220
2186
  var init_constants_gen = __esm({
@@ -2272,12 +2238,12 @@ var init_constants_gen = __esm({
2272
2238
  });
2273
2239
 
2274
2240
  // ../../kernel/src/bridges/wire/binary-mutation-reader.ts
2275
- import { asFormattedText } from "@mog-sdk/spreadsheet-contracts/core";
2276
2241
  var sharedDecoder, BinaryMutationReader;
2277
2242
  var init_binary_mutation_reader = __esm({
2278
2243
  "../../kernel/src/bridges/wire/binary-mutation-reader.ts"() {
2279
2244
  "use strict";
2280
2245
  init_esm_shims();
2246
+ init_core2();
2281
2247
  init_constants_gen();
2282
2248
  sharedDecoder = new TextDecoder("utf-8");
2283
2249
  BinaryMutationReader = class {
@@ -2571,7 +2537,6 @@ var init_binary_mutation_reader = __esm({
2571
2537
  });
2572
2538
 
2573
2539
  // ../../kernel/src/bridges/wire/binary-viewport-buffer.ts
2574
- import { asFormattedText as asFormattedText2, displayStringOrNull } from "@mog-sdk/spreadsheet-contracts/core";
2575
2540
  function rgbaU32ToHex(value) {
2576
2541
  const r = value >>> 24 & 255;
2577
2542
  const g = value >>> 16 & 255;
@@ -2583,6 +2548,7 @@ var init_binary_viewport_buffer = __esm({
2583
2548
  "../../kernel/src/bridges/wire/binary-viewport-buffer.ts"() {
2584
2549
  "use strict";
2585
2550
  init_esm_shims();
2551
+ init_core2();
2586
2552
  init_constants_gen();
2587
2553
  init_constants_gen();
2588
2554
  sharedEncoder = new TextEncoder();
@@ -3679,7 +3645,7 @@ var init_binary_viewport_buffer = __esm({
3679
3645
  */
3680
3646
  get displayText() {
3681
3647
  const decoded = this._buffer.getOrDecodeString(this._displayOff, this._displayLen);
3682
- return decoded !== null ? asFormattedText2(decoded) : null;
3648
+ return decoded !== null ? asFormattedText(decoded) : null;
3683
3649
  }
3684
3650
  /**
3685
3651
  * Get the error text for the current cell.
@@ -3738,7 +3704,6 @@ var init_binary_viewport_buffer = __esm({
3738
3704
  });
3739
3705
 
3740
3706
  // ../../kernel/src/bridges/wire/viewport-coordinator.ts
3741
- import { displayStringOrNull as displayStringOrNull2 } from "@mog-sdk/spreadsheet-contracts/core";
3742
3707
  function cellKey(row, col) {
3743
3708
  return `${row},${col}`;
3744
3709
  }
@@ -3748,6 +3713,7 @@ var init_viewport_coordinator = __esm({
3748
3713
  "use strict";
3749
3714
  init_esm_shims();
3750
3715
  init_binary_viewport_buffer();
3716
+ init_core2();
3751
3717
  ViewportCoordinator = class {
3752
3718
  constructor(viewportId) {
3753
3719
  /** Monotonically increasing version, incremented on every write. */
@@ -3868,7 +3834,7 @@ var init_viewport_coordinator = __esm({
3868
3834
  flags: reader.patchFlags(i),
3869
3835
  numberValue: reader.patchNumberValue(i),
3870
3836
  formatIdx: reader.patchFormatIdx(i),
3871
- displayString: displayStringOrNull2(reader.patchDisplayText(i)),
3837
+ displayString: displayStringOrNull(reader.patchDisplayText(i)),
3872
3838
  errorString: reader.patchErrorText(i),
3873
3839
  bgColorOverride: reader.patchBgColorOverride(i),
3874
3840
  fontColorOverride: reader.patchFontColorOverride(i),
@@ -3885,7 +3851,7 @@ var init_viewport_coordinator = __esm({
3885
3851
  flags: reader.spillPatchFlags(i),
3886
3852
  numberValue: reader.spillPatchNumberValue(i),
3887
3853
  formatIdx: reader.spillPatchFormatIdx(i),
3888
- displayString: displayStringOrNull2(reader.spillPatchDisplayText(i)),
3854
+ displayString: displayStringOrNull(reader.spillPatchDisplayText(i)),
3889
3855
  errorString: reader.spillPatchErrorText(i),
3890
3856
  bgColorOverride: reader.spillPatchBgColorOverride(i),
3891
3857
  fontColorOverride: reader.spillPatchFontColorOverride(i),
@@ -6750,7 +6716,6 @@ __export(compute_bridge_exports, {
6750
6716
  wireTableToTableConfig: () => wireTableToTableConfig,
6751
6717
  wireToIdentityFormula: () => wireToIdentityFormula
6752
6718
  });
6753
- import { DEFAULT_PROTECTION_OPTIONS } from "@mog-sdk/spreadsheet-contracts/protection";
6754
6719
  function emptyMutationResult() {
6755
6720
  return {
6756
6721
  recalc: {
@@ -6821,6 +6786,7 @@ var init_compute_bridge = __esm({
6821
6786
  "use strict";
6822
6787
  init_esm_shims();
6823
6788
  init_formula_string();
6789
+ init_protection();
6824
6790
  init_src();
6825
6791
  init_compute_wire_converters();
6826
6792
  init_compute_core();
@@ -7246,8 +7212,65 @@ var init_compute_bridge = __esm({
7246
7212
  }
7247
7213
  });
7248
7214
 
7215
+ // ../../contracts/src/rendering/grid-renderer.ts
7216
+ var init_grid_renderer = __esm({
7217
+ "../../contracts/src/rendering/grid-renderer.ts"() {
7218
+ "use strict";
7219
+ init_esm_shims();
7220
+ }
7221
+ });
7222
+
7223
+ // ../../contracts/src/rendering/constants.ts
7224
+ var DEFAULT_COL_WIDTH_WINDOWS, DEFAULT_COL_WIDTH_MACOS, _isMac, DEFAULT_COL_WIDTH;
7225
+ var init_constants = __esm({
7226
+ "../../contracts/src/rendering/constants.ts"() {
7227
+ "use strict";
7228
+ init_esm_shims();
7229
+ DEFAULT_COL_WIDTH_WINDOWS = 64;
7230
+ DEFAULT_COL_WIDTH_MACOS = 72;
7231
+ _isMac = typeof navigator !== "undefined" && /Mac/.test(navigator.platform ?? "");
7232
+ DEFAULT_COL_WIDTH = _isMac ? DEFAULT_COL_WIDTH_MACOS : DEFAULT_COL_WIDTH_WINDOWS;
7233
+ }
7234
+ });
7235
+
7236
+ // ../../contracts/src/rendering/data-sources.ts
7237
+ var DEFAULT_CHROME_THEME;
7238
+ var init_data_sources = __esm({
7239
+ "../../contracts/src/rendering/data-sources.ts"() {
7240
+ "use strict";
7241
+ init_esm_shims();
7242
+ DEFAULT_CHROME_THEME = {
7243
+ canvasBackground: "#ffffff",
7244
+ gridlineColor: "#e0e0e0",
7245
+ headerBackground: "#f8f9fa",
7246
+ headerText: "#333333",
7247
+ headerBorder: "#dadce0",
7248
+ headerHighlightBackground: "#e8eaed",
7249
+ headerHighlightText: "#1a73e8",
7250
+ selectionFill: "rgba(66, 133, 244, 0.1)",
7251
+ selectionBorder: "#4285f4",
7252
+ activeCellBorder: "#1a73e8",
7253
+ fillHandleColor: "#4285f4",
7254
+ dragSourceColor: "rgba(66, 133, 244, 0.15)",
7255
+ dragTargetColor: "#4285f4",
7256
+ scrollbarTrack: "#f1f1f1",
7257
+ scrollbarThumb: "#c1c1c1"
7258
+ };
7259
+ }
7260
+ });
7261
+
7262
+ // ../../contracts/src/rendering/index.ts
7263
+ var init_rendering = __esm({
7264
+ "../../contracts/src/rendering/index.ts"() {
7265
+ "use strict";
7266
+ init_esm_shims();
7267
+ init_grid_renderer();
7268
+ init_constants();
7269
+ init_data_sources();
7270
+ }
7271
+ });
7272
+
7249
7273
  // ../../kernel/src/domain/sheets/sheet-meta-defaults.ts
7250
- import { DEFAULT_COL_WIDTH as _PLATFORM_COL_WIDTH } from "@mog-sdk/spreadsheet-contracts/rendering";
7251
7274
  function getSheetMetaDefault(field) {
7252
7275
  const def = SHEET_META_SCHEMA[field];
7253
7276
  return def.default;
@@ -7257,8 +7280,9 @@ var init_sheet_meta_defaults = __esm({
7257
7280
  "../../kernel/src/domain/sheets/sheet-meta-defaults.ts"() {
7258
7281
  "use strict";
7259
7282
  init_esm_shims();
7283
+ init_rendering();
7260
7284
  SHEET_META_DEFAULT_ROW_HEIGHT = 20;
7261
- SHEET_META_DEFAULT_COL_WIDTH = _PLATFORM_COL_WIDTH;
7285
+ SHEET_META_DEFAULT_COL_WIDTH = DEFAULT_COL_WIDTH;
7262
7286
  SHEET_META_DEFAULT_GRIDLINE_COLOR = "#e2e2e2";
7263
7287
  SHEET_META_SCHEMA = {
7264
7288
  // ===========================================================================
@@ -7787,7 +7811,6 @@ var init_sheet_meta = __esm({
7787
7811
  });
7788
7812
 
7789
7813
  // ../../spreadsheet-utils/src/range.ts
7790
- import { MAX_COLS, MAX_ROWS } from "@mog-sdk/spreadsheet-contracts/core";
7791
7814
  function normalizeRange(range2) {
7792
7815
  return {
7793
7816
  startRow: Math.min(range2.startRow, range2.endRow),
@@ -7803,6 +7826,7 @@ var init_range = __esm({
7803
7826
  "../../spreadsheet-utils/src/range.ts"() {
7804
7827
  "use strict";
7805
7828
  init_esm_shims();
7829
+ init_core2();
7806
7830
  }
7807
7831
  });
7808
7832
 
@@ -9268,7 +9292,7 @@ var init_data_extractor = __esm({
9268
9292
  });
9269
9293
 
9270
9294
  // ../../charts/src/core/index.ts
9271
- var init_core2 = __esm({
9295
+ var init_core3 = __esm({
9272
9296
  "../../charts/src/core/index.ts"() {
9273
9297
  "use strict";
9274
9298
  init_esm_shims();
@@ -13252,7 +13276,7 @@ var init_src2 = __esm({
13252
13276
  "../../charts/src/index.ts"() {
13253
13277
  "use strict";
13254
13278
  init_esm_shims();
13255
- init_core2();
13279
+ init_core3();
13256
13280
  init_primitives();
13257
13281
  init_compiler();
13258
13282
  }
@@ -16362,7 +16386,7 @@ function toDisposable(fn) {
16362
16386
  return disposable;
16363
16387
  }
16364
16388
  var DisposableBase, DisposableStore, DisposableNone;
16365
- var init_disposable = __esm({
16389
+ var init_disposable2 = __esm({
16366
16390
  "../../spreadsheet-utils/src/disposable.ts"() {
16367
16391
  "use strict";
16368
16392
  init_esm_shims();
@@ -16426,7 +16450,7 @@ function ok(value) {
16426
16450
  function err(error) {
16427
16451
  return { ok: false, error };
16428
16452
  }
16429
- var init_result = __esm({
16453
+ var init_result2 = __esm({
16430
16454
  "../../spreadsheet-utils/src/result.ts"() {
16431
16455
  "use strict";
16432
16456
  init_esm_shims();
@@ -16439,7 +16463,7 @@ var init_subscribable = __esm({
16439
16463
  "../../kernel/src/services/primitives/subscribable.ts"() {
16440
16464
  "use strict";
16441
16465
  init_esm_shims();
16442
- init_disposable();
16466
+ init_disposable2();
16443
16467
  Subscribable = class extends DisposableBase {
16444
16468
  constructor() {
16445
16469
  super(...arguments);
@@ -16499,7 +16523,7 @@ var init_event_emitter = __esm({
16499
16523
  "../../kernel/src/services/primitives/event-emitter.ts"() {
16500
16524
  "use strict";
16501
16525
  init_esm_shims();
16502
- init_disposable();
16526
+ init_disposable2();
16503
16527
  TypedEventEmitter = class extends DisposableBase {
16504
16528
  constructor() {
16505
16529
  super(...arguments);
@@ -16564,8 +16588,8 @@ var init_primitives3 = __esm({
16564
16588
  "../../kernel/src/services/primitives/index.ts"() {
16565
16589
  "use strict";
16566
16590
  init_esm_shims();
16567
- init_disposable();
16568
- init_result();
16591
+ init_disposable2();
16592
+ init_result2();
16569
16593
  init_subscribable();
16570
16594
  init_event_emitter();
16571
16595
  }
@@ -24615,8 +24639,34 @@ var init_equation_bridge = __esm({
24615
24639
  }
24616
24640
  });
24617
24641
 
24642
+ // ../../contracts/src/bridges/ink-recognition-bridge.ts
24643
+ var DEFAULT_RECOGNITION_THRESHOLDS;
24644
+ var init_ink_recognition_bridge = __esm({
24645
+ "../../contracts/src/bridges/ink-recognition-bridge.ts"() {
24646
+ "use strict";
24647
+ init_esm_shims();
24648
+ DEFAULT_RECOGNITION_THRESHOLDS = {
24649
+ line: 0.7,
24650
+ rectangle: 0.65,
24651
+ ellipse: 0.7,
24652
+ triangle: 0.6,
24653
+ arrow: 0.6,
24654
+ star: 0.65,
24655
+ text: 0.5
24656
+ };
24657
+ }
24658
+ });
24659
+
24660
+ // ../../contracts/src/bridges/index.ts
24661
+ var init_bridges = __esm({
24662
+ "../../contracts/src/bridges/index.ts"() {
24663
+ "use strict";
24664
+ init_esm_shims();
24665
+ init_ink_recognition_bridge();
24666
+ }
24667
+ });
24668
+
24618
24669
  // ../../kernel/src/domain/drawing/ink-recognition-bridge.ts
24619
- import { DEFAULT_RECOGNITION_THRESHOLDS } from "@mog-sdk/spreadsheet-contracts/bridges";
24620
24670
  function createInkRecognitionBridge(initialThresholds) {
24621
24671
  let thresholds = {
24622
24672
  ...DEFAULT_RECOGNITION_THRESHOLDS,
@@ -25032,10 +25082,11 @@ async function recognizeWithBrowserAPI(strokes) {
25032
25082
  }
25033
25083
  return null;
25034
25084
  }
25035
- var init_ink_recognition_bridge = __esm({
25085
+ var init_ink_recognition_bridge2 = __esm({
25036
25086
  "../../kernel/src/domain/drawing/ink-recognition-bridge.ts"() {
25037
25087
  "use strict";
25038
25088
  init_esm_shims();
25089
+ init_bridges();
25039
25090
  }
25040
25091
  });
25041
25092
 
@@ -30048,7 +30099,7 @@ var init_arrows = __esm({
30048
30099
 
30049
30100
  // ../../canvas/drawing/shapes/src/presets/constants.ts
30050
30101
  var KAPPA;
30051
- var init_constants = __esm({
30102
+ var init_constants2 = __esm({
30052
30103
  "../../canvas/drawing/shapes/src/presets/constants.ts"() {
30053
30104
  "use strict";
30054
30105
  init_esm_shims();
@@ -30072,7 +30123,7 @@ var init_primitives4 = __esm({
30072
30123
  "use strict";
30073
30124
  init_esm_shims();
30074
30125
  init_src3();
30075
- init_constants();
30126
+ init_constants2();
30076
30127
  }
30077
30128
  });
30078
30129
 
@@ -30082,7 +30133,7 @@ var init_basic = __esm({
30082
30133
  "use strict";
30083
30134
  init_esm_shims();
30084
30135
  init_src3();
30085
- init_constants();
30136
+ init_constants2();
30086
30137
  init_primitives4();
30087
30138
  init_registry3();
30088
30139
  init_primitives4();
@@ -70155,21 +70206,438 @@ var init_rules = __esm({
70155
70206
  }
70156
70207
  });
70157
70208
 
70209
+ // ../../contracts/src/smartart/layouts.ts
70210
+ var init_layouts2 = __esm({
70211
+ "../../contracts/src/smartart/layouts.ts"() {
70212
+ "use strict";
70213
+ init_esm_shims();
70214
+ }
70215
+ });
70216
+
70217
+ // ../../contracts/src/smartart/ooxml-algorithm-types.ts
70218
+ var ParameterId, VALID_PARAMS_BY_ALGORITHM;
70219
+ var init_ooxml_algorithm_types = __esm({
70220
+ "../../contracts/src/smartart/ooxml-algorithm-types.ts"() {
70221
+ "use strict";
70222
+ init_esm_shims();
70223
+ ParameterId = {
70224
+ // ── Alignment Parameters ──────────────────────────────────────────────────
70225
+ /** Horizontal alignment of children within the layout area. */
70226
+ horzAlign: "horzAlign",
70227
+ /** Vertical alignment of children within the layout area. */
70228
+ vertAlign: "vertAlign",
70229
+ /** Horizontal alignment for individual nodes (hierarchy algorithms). */
70230
+ nodeHorzAlign: "nodeHorzAlign",
70231
+ /** Vertical alignment for individual nodes (hierarchy algorithms). */
70232
+ nodeVertAlign: "nodeVertAlign",
70233
+ /** Hierarchy alignment (16 possible values for tree orientation). */
70234
+ hierAlign: "hierAlign",
70235
+ /** Text alignment (whether text should be aligned with shape). */
70236
+ alignTx: "alignTx",
70237
+ // ── Direction Parameters ──────────────────────────────────────────────────
70238
+ /** Child direction (horizontal or vertical arrangement of children). */
70239
+ chDir: "chDir",
70240
+ /** Child alignment (how children align on the cross-axis). */
70241
+ chAlign: "chAlign",
70242
+ /** Secondary child alignment (for complex hierarchy layouts). */
70243
+ secChAlign: "secChAlign",
70244
+ /** Linear direction (which edge children flow from). */
70245
+ linDir: "linDir",
70246
+ /** Secondary linear direction (for complex hierarchy layouts). */
70247
+ secLinDir: "secLinDir",
70248
+ /** Text direction (horizontal or vertical text blocks). */
70249
+ txDir: "txDir",
70250
+ /** Text block direction (horizontal or vertical text flow). */
70251
+ txBlDir: "txBlDir",
70252
+ /** Growth direction (which corner the snake starts from). */
70253
+ grDir: "grDir",
70254
+ /** Flow direction (whether snake flows by row or column). */
70255
+ flowDir: "flowDir",
70256
+ /** Continue direction (same direction or reversed for each row). */
70257
+ contDir: "contDir",
70258
+ // ── Connector Parameters ──────────────────────────────────────────────────
70259
+ /** Connector routing style (straight, bend, curve, long curve). */
70260
+ connRout: "connRout",
70261
+ /** Beginning/start arrowhead style for connectors. */
70262
+ begSty: "begSty",
70263
+ /** Ending arrowhead style for connectors. */
70264
+ endSty: "endSty",
70265
+ /** Connector dimension (1D, 2D, or custom). */
70266
+ dim: "dim",
70267
+ /** Source node name for connector routing. */
70268
+ srcNode: "srcNode",
70269
+ /** Destination node name for connector routing. */
70270
+ dstNode: "dstNode",
70271
+ /** Beginning connection points (which points on the source shape). */
70272
+ begPts: "begPts",
70273
+ /** Ending connection points (which points on the destination shape). */
70274
+ endPts: "endPts",
70275
+ /** Bend point position for right-angle connectors. */
70276
+ bendPt: "bendPt",
70277
+ // ── Cycle/Circular Parameters ─────────────────────────────────────────────
70278
+ /** Start angle in degrees for cycle algorithm. */
70279
+ stAng: "stAng",
70280
+ /** Span angle in degrees for cycle algorithm. */
70281
+ spanAng: "spanAng",
70282
+ /** Rotation path (none or along the circular path). */
70283
+ rotPath: "rotPath",
70284
+ /** Center shape mapping (whether first node goes to center). */
70285
+ ctrShpMap: "ctrShpMap",
70286
+ // ── Snake Parameters ──────────────────────────────────────────────────────
70287
+ /** Breakpoint logic for snake wrapping (end of canvas, balanced, fixed). */
70288
+ bkpt: "bkpt",
70289
+ /** Breakpoint fixed value (number of items per row when bkpt=fixed). */
70290
+ bkPtFixedVal: "bkPtFixedVal",
70291
+ /** Offset mode for staggered rows in snake layout. */
70292
+ off: "off",
70293
+ // ── Linear/Sequence Parameters ────────────────────────────────────────────
70294
+ /** Starting element index (which node type starts the alternating sequence). */
70295
+ stElem: "stElem",
70296
+ /** Starting bullet level for text algorithm. */
70297
+ stBulletLvl: "stBulletLvl",
70298
+ // ── Pyramid Parameters ────────────────────────────────────────────────────
70299
+ /** Pyramid accent position (before or after the level). */
70300
+ pyraAcctPos: "pyraAcctPos",
70301
+ /** Pyramid accent text margin (step or stack behavior). */
70302
+ pyraAcctTxMar: "pyraAcctTxMar",
70303
+ /** Pyramid level node name. */
70304
+ pyraLvlNode: "pyraLvlNode",
70305
+ /** Pyramid accent background node name. */
70306
+ pyraAcctBkgdNode: "pyraAcctBkgdNode",
70307
+ /** Pyramid accent text node name. */
70308
+ pyraAcctTxNode: "pyraAcctTxNode",
70309
+ // ── Text Parameters ───────────────────────────────────────────────────────
70310
+ /** Parent text LTR alignment. */
70311
+ parTxLTRAlign: "parTxLTRAlign",
70312
+ /** Parent text RTL alignment. */
70313
+ parTxRTLAlign: "parTxRTLAlign",
70314
+ /** Shape text LTR alignment for children. */
70315
+ shpTxLTRAlignCh: "shpTxLTRAlignCh",
70316
+ /** Shape text RTL alignment for children. */
70317
+ shpTxRTLAlignCh: "shpTxRTLAlignCh",
70318
+ /** Text anchor horizontal position. */
70319
+ txAnchorHorz: "txAnchorHorz",
70320
+ /** Text anchor vertical position. */
70321
+ txAnchorVert: "txAnchorVert",
70322
+ /** Text anchor horizontal position for children. */
70323
+ txAnchorHorzCh: "txAnchorHorzCh",
70324
+ /** Text anchor vertical position for children. */
70325
+ txAnchorVertCh: "txAnchorVertCh",
70326
+ /** Auto text rotation mode (none, upright, gravity-based). */
70327
+ autoTxRot: "autoTxRot",
70328
+ // ── Spacing & Sizing Parameters ───────────────────────────────────────────
70329
+ /** Aspect ratio value. */
70330
+ ar: "ar",
70331
+ /** Line spacing for parent text (percentage). */
70332
+ lnSpPar: "lnSpPar",
70333
+ /** Line spacing after parent paragraph (percentage). */
70334
+ lnSpAfParP: "lnSpAfParP",
70335
+ /** Line spacing for child text (percentage). */
70336
+ lnSpCh: "lnSpCh",
70337
+ /** Line spacing after child paragraph (percentage). */
70338
+ lnSpAfChP: "lnSpAfChP",
70339
+ // ── Hierarchy-Specific Parameters ─────────────────────────────────────────
70340
+ /** Root short distance flag (hierarchy algorithms). */
70341
+ rtShortDist: "rtShortDist",
70342
+ // ── Fallback Parameter ────────────────────────────────────────────────────
70343
+ /** Fallback dimension for the algorithm. */
70344
+ fallback: "fallback"
70345
+ };
70346
+ VALID_PARAMS_BY_ALGORITHM = {
70347
+ composite: [ParameterId.ar],
70348
+ lin: [
70349
+ ParameterId.linDir,
70350
+ ParameterId.chDir,
70351
+ ParameterId.chAlign,
70352
+ ParameterId.horzAlign,
70353
+ ParameterId.vertAlign,
70354
+ ParameterId.stElem,
70355
+ ParameterId.fallback,
70356
+ ParameterId.nodeHorzAlign,
70357
+ ParameterId.nodeVertAlign
70358
+ ],
70359
+ snake: [
70360
+ ParameterId.grDir,
70361
+ ParameterId.flowDir,
70362
+ ParameterId.contDir,
70363
+ ParameterId.bkpt,
70364
+ ParameterId.bkPtFixedVal,
70365
+ ParameterId.off
70366
+ ],
70367
+ cycle: [ParameterId.stAng, ParameterId.spanAng, ParameterId.rotPath, ParameterId.ctrShpMap],
70368
+ hierRoot: [
70369
+ ParameterId.hierAlign,
70370
+ ParameterId.nodeHorzAlign,
70371
+ ParameterId.nodeVertAlign,
70372
+ ParameterId.rtShortDist
70373
+ ],
70374
+ hierChild: [
70375
+ ParameterId.chAlign,
70376
+ ParameterId.linDir,
70377
+ ParameterId.secChAlign,
70378
+ ParameterId.secLinDir
70379
+ ],
70380
+ pyra: [
70381
+ ParameterId.linDir,
70382
+ ParameterId.txDir,
70383
+ ParameterId.pyraAcctPos,
70384
+ ParameterId.pyraAcctTxMar,
70385
+ ParameterId.pyraLvlNode,
70386
+ ParameterId.pyraAcctBkgdNode,
70387
+ ParameterId.pyraAcctTxNode
70388
+ ],
70389
+ conn: [
70390
+ ParameterId.srcNode,
70391
+ ParameterId.dstNode,
70392
+ ParameterId.connRout,
70393
+ ParameterId.begSty,
70394
+ ParameterId.endSty,
70395
+ ParameterId.dim,
70396
+ ParameterId.bendPt,
70397
+ ParameterId.begPts,
70398
+ ParameterId.endPts
70399
+ ],
70400
+ tx: [
70401
+ ParameterId.parTxLTRAlign,
70402
+ ParameterId.parTxRTLAlign,
70403
+ ParameterId.shpTxLTRAlignCh,
70404
+ ParameterId.shpTxRTLAlignCh,
70405
+ ParameterId.txAnchorVert,
70406
+ ParameterId.txAnchorHorz,
70407
+ ParameterId.txAnchorVertCh,
70408
+ ParameterId.txAnchorHorzCh,
70409
+ ParameterId.txBlDir,
70410
+ ParameterId.autoTxRot,
70411
+ ParameterId.stBulletLvl,
70412
+ ParameterId.lnSpPar,
70413
+ ParameterId.lnSpAfParP,
70414
+ ParameterId.lnSpCh,
70415
+ ParameterId.lnSpAfChP,
70416
+ ParameterId.alignTx
70417
+ ],
70418
+ sp: []
70419
+ };
70420
+ }
70421
+ });
70422
+
70423
+ // ../../contracts/src/smartart/ooxml-data-model-types.ts
70424
+ var init_ooxml_data_model_types = __esm({
70425
+ "../../contracts/src/smartart/ooxml-data-model-types.ts"() {
70426
+ "use strict";
70427
+ init_esm_shims();
70428
+ }
70429
+ });
70430
+
70431
+ // ../../contracts/src/smartart/ooxml-drawing-types.ts
70432
+ var init_ooxml_drawing_types = __esm({
70433
+ "../../contracts/src/smartart/ooxml-drawing-types.ts"() {
70434
+ "use strict";
70435
+ init_esm_shims();
70436
+ }
70437
+ });
70438
+
70439
+ // ../../contracts/src/smartart/ooxml-engine-types.ts
70440
+ var POSITIONAL_CONSTRAINT_TYPES, DIMENSIONAL_CONSTRAINT_TYPES, MARGIN_CONSTRAINT_TYPES, FONT_CONSTRAINT_TYPES, SPACING_CONSTRAINT_TYPES, GEOMETRY_CONSTRAINT_TYPES, USER_DEFINED_CONSTRAINT_TYPES, ALL_CONSTRAINT_TYPES, ALL_ELEMENT_TYPES, ALL_FUNCTION_TYPES, ALL_FUNCTION_OPERATORS, ALL_FUNCTION_ARGUMENTS;
70441
+ var init_ooxml_engine_types = __esm({
70442
+ "../../contracts/src/smartart/ooxml-engine-types.ts"() {
70443
+ "use strict";
70444
+ init_esm_shims();
70445
+ POSITIONAL_CONSTRAINT_TYPES = [
70446
+ "l",
70447
+ "t",
70448
+ "r",
70449
+ "b",
70450
+ "lOff",
70451
+ "tOff",
70452
+ "rOff",
70453
+ "bOff",
70454
+ "ctrX",
70455
+ "ctrY",
70456
+ "ctrXOff",
70457
+ "ctrYOff"
70458
+ ];
70459
+ DIMENSIONAL_CONSTRAINT_TYPES = [
70460
+ "w",
70461
+ "h",
70462
+ "wOff",
70463
+ "hOff"
70464
+ ];
70465
+ MARGIN_CONSTRAINT_TYPES = [
70466
+ "lMarg",
70467
+ "tMarg",
70468
+ "rMarg",
70469
+ "bMarg",
70470
+ "begMarg",
70471
+ "endMarg"
70472
+ ];
70473
+ FONT_CONSTRAINT_TYPES = [
70474
+ "primFontSz",
70475
+ "secFontSz"
70476
+ ];
70477
+ SPACING_CONSTRAINT_TYPES = [
70478
+ "sp",
70479
+ "sibSp",
70480
+ "secSibSp"
70481
+ ];
70482
+ GEOMETRY_CONSTRAINT_TYPES = [
70483
+ "connDist",
70484
+ "diam",
70485
+ "stemThick",
70486
+ "begPad",
70487
+ "endPad",
70488
+ "wArH",
70489
+ "hArH",
70490
+ "bendDist"
70491
+ ];
70492
+ USER_DEFINED_CONSTRAINT_TYPES = [
70493
+ "userA",
70494
+ "userB",
70495
+ "userC",
70496
+ "userD",
70497
+ "userE",
70498
+ "userF",
70499
+ "userG",
70500
+ "userH",
70501
+ "userI",
70502
+ "userJ",
70503
+ "userK",
70504
+ "userL",
70505
+ "userM",
70506
+ "userN",
70507
+ "userO",
70508
+ "userP",
70509
+ "userQ",
70510
+ "userR",
70511
+ "userS",
70512
+ "userT",
70513
+ "userU",
70514
+ "userV",
70515
+ "userW",
70516
+ "userX",
70517
+ "userY",
70518
+ "userZ"
70519
+ ];
70520
+ ALL_CONSTRAINT_TYPES = [
70521
+ ...POSITIONAL_CONSTRAINT_TYPES,
70522
+ ...DIMENSIONAL_CONSTRAINT_TYPES,
70523
+ ...MARGIN_CONSTRAINT_TYPES,
70524
+ ...FONT_CONSTRAINT_TYPES,
70525
+ ...SPACING_CONSTRAINT_TYPES,
70526
+ ...GEOMETRY_CONSTRAINT_TYPES,
70527
+ "pyraAcctRatio",
70528
+ "alignOff",
70529
+ ...USER_DEFINED_CONSTRAINT_TYPES,
70530
+ "none"
70531
+ ];
70532
+ ALL_ELEMENT_TYPES = [
70533
+ "all",
70534
+ "doc",
70535
+ "node",
70536
+ "norm",
70537
+ "nonNorm",
70538
+ "asst",
70539
+ "nonAsst",
70540
+ "parTrans",
70541
+ "pres",
70542
+ "sibTrans"
70543
+ ];
70544
+ ALL_FUNCTION_TYPES = [
70545
+ "cnt",
70546
+ "pos",
70547
+ "revPos",
70548
+ "posEven",
70549
+ "posOdd",
70550
+ "var",
70551
+ "depth",
70552
+ "maxDepth"
70553
+ ];
70554
+ ALL_FUNCTION_OPERATORS = [
70555
+ "equ",
70556
+ "neq",
70557
+ "gt",
70558
+ "lt",
70559
+ "gte",
70560
+ "lte"
70561
+ ];
70562
+ ALL_FUNCTION_ARGUMENTS = [
70563
+ "none",
70564
+ "orgChart",
70565
+ "chMax",
70566
+ "chPref",
70567
+ "bulEnabled",
70568
+ "dir",
70569
+ "hierBranch",
70570
+ "animOne",
70571
+ "animLvl",
70572
+ "resizeHandles"
70573
+ ];
70574
+ }
70575
+ });
70576
+
70577
+ // ../../contracts/src/smartart/ooxml-layout-types.ts
70578
+ var init_ooxml_layout_types = __esm({
70579
+ "../../contracts/src/smartart/ooxml-layout-types.ts"() {
70580
+ "use strict";
70581
+ init_esm_shims();
70582
+ }
70583
+ });
70584
+
70585
+ // ../../contracts/src/smartart/ooxml-style-types.ts
70586
+ var init_ooxml_style_types = __esm({
70587
+ "../../contracts/src/smartart/ooxml-style-types.ts"() {
70588
+ "use strict";
70589
+ init_esm_shims();
70590
+ }
70591
+ });
70592
+
70593
+ // ../../contracts/src/smartart/styles.ts
70594
+ var init_styles3 = __esm({
70595
+ "../../contracts/src/smartart/styles.ts"() {
70596
+ "use strict";
70597
+ init_esm_shims();
70598
+ }
70599
+ });
70600
+
70601
+ // ../../contracts/src/smartart/types.ts
70602
+ var init_types4 = __esm({
70603
+ "../../contracts/src/smartart/types.ts"() {
70604
+ "use strict";
70605
+ init_esm_shims();
70606
+ }
70607
+ });
70608
+
70609
+ // ../../contracts/src/smartart/index.ts
70610
+ var init_smartart = __esm({
70611
+ "../../contracts/src/smartart/index.ts"() {
70612
+ "use strict";
70613
+ init_esm_shims();
70614
+ init_layouts2();
70615
+ init_ooxml_algorithm_types();
70616
+ init_ooxml_data_model_types();
70617
+ init_ooxml_drawing_types();
70618
+ init_ooxml_engine_types();
70619
+ init_ooxml_layout_types();
70620
+ init_ooxml_style_types();
70621
+ init_styles3();
70622
+ init_types4();
70623
+ }
70624
+ });
70625
+
70158
70626
  // ../../canvas/drawing/smartart/src/engine/algorithms/composite.ts
70159
- import { AlgorithmType } from "@mog-sdk/spreadsheet-contracts/smartart";
70160
70627
  var init_composite = __esm({
70161
70628
  "../../canvas/drawing/smartart/src/engine/algorithms/composite.ts"() {
70162
70629
  "use strict";
70163
70630
  init_esm_shims();
70631
+ init_smartart();
70164
70632
  }
70165
70633
  });
70166
70634
 
70167
70635
  // ../../canvas/drawing/smartart/src/engine/algorithms/linear.ts
70168
- import { AlgorithmType as AlgorithmType2 } from "@mog-sdk/spreadsheet-contracts/smartart";
70169
70636
  var init_linear2 = __esm({
70170
70637
  "../../canvas/drawing/smartart/src/engine/algorithms/linear.ts"() {
70171
70638
  "use strict";
70172
70639
  init_esm_shims();
70640
+ init_smartart();
70173
70641
  }
70174
70642
  });
70175
70643
 
@@ -70182,82 +70650,82 @@ var init_param_utils = __esm({
70182
70650
  });
70183
70651
 
70184
70652
  // ../../canvas/drawing/smartart/src/engine/algorithms/snake.ts
70185
- import { AlgorithmType as AlgorithmType3 } from "@mog-sdk/spreadsheet-contracts/smartart";
70186
70653
  var init_snake = __esm({
70187
70654
  "../../canvas/drawing/smartart/src/engine/algorithms/snake.ts"() {
70188
70655
  "use strict";
70189
70656
  init_esm_shims();
70657
+ init_smartart();
70190
70658
  init_param_utils();
70191
70659
  }
70192
70660
  });
70193
70661
 
70194
70662
  // ../../canvas/drawing/smartart/src/engine/algorithms/cycle.ts
70195
- import { AlgorithmType as AlgorithmType4 } from "@mog-sdk/spreadsheet-contracts/smartart";
70196
70663
  var init_cycle2 = __esm({
70197
70664
  "../../canvas/drawing/smartart/src/engine/algorithms/cycle.ts"() {
70198
70665
  "use strict";
70199
70666
  init_esm_shims();
70667
+ init_smartart();
70200
70668
  init_param_utils();
70201
70669
  }
70202
70670
  });
70203
70671
 
70204
70672
  // ../../canvas/drawing/smartart/src/engine/algorithms/hier-root.ts
70205
- import { AlgorithmType as AlgorithmType5 } from "@mog-sdk/spreadsheet-contracts/smartart";
70206
70673
  var init_hier_root = __esm({
70207
70674
  "../../canvas/drawing/smartart/src/engine/algorithms/hier-root.ts"() {
70208
70675
  "use strict";
70209
70676
  init_esm_shims();
70677
+ init_smartart();
70210
70678
  init_param_utils();
70211
70679
  }
70212
70680
  });
70213
70681
 
70214
70682
  // ../../canvas/drawing/smartart/src/engine/algorithms/hier-child.ts
70215
- import { AlgorithmType as AlgorithmType6 } from "@mog-sdk/spreadsheet-contracts/smartart";
70216
70683
  var init_hier_child = __esm({
70217
70684
  "../../canvas/drawing/smartart/src/engine/algorithms/hier-child.ts"() {
70218
70685
  "use strict";
70219
70686
  init_esm_shims();
70687
+ init_smartart();
70220
70688
  init_param_utils();
70221
70689
  }
70222
70690
  });
70223
70691
 
70224
70692
  // ../../canvas/drawing/smartart/src/engine/algorithms/pyramid.ts
70225
- import { AlgorithmType as AlgorithmType7 } from "@mog-sdk/spreadsheet-contracts/smartart";
70226
70693
  var init_pyramid2 = __esm({
70227
70694
  "../../canvas/drawing/smartart/src/engine/algorithms/pyramid.ts"() {
70228
70695
  "use strict";
70229
70696
  init_esm_shims();
70697
+ init_smartart();
70230
70698
  init_param_utils();
70231
70699
  }
70232
70700
  });
70233
70701
 
70234
70702
  // ../../canvas/drawing/smartart/src/engine/algorithms/connector.ts
70235
- import { AlgorithmType as AlgorithmType8 } from "@mog-sdk/spreadsheet-contracts/smartart";
70236
70703
  var init_connector = __esm({
70237
70704
  "../../canvas/drawing/smartart/src/engine/algorithms/connector.ts"() {
70238
70705
  "use strict";
70239
70706
  init_esm_shims();
70707
+ init_smartart();
70240
70708
  init_connector_routing();
70241
70709
  init_param_utils();
70242
70710
  }
70243
70711
  });
70244
70712
 
70245
70713
  // ../../canvas/drawing/smartart/src/engine/algorithms/text.ts
70246
- import { AlgorithmType as AlgorithmType9 } from "@mog-sdk/spreadsheet-contracts/smartart";
70247
70714
  var init_text3 = __esm({
70248
70715
  "../../canvas/drawing/smartart/src/engine/algorithms/text.ts"() {
70249
70716
  "use strict";
70250
70717
  init_esm_shims();
70718
+ init_smartart();
70251
70719
  init_param_utils();
70252
70720
  }
70253
70721
  });
70254
70722
 
70255
70723
  // ../../canvas/drawing/smartart/src/engine/algorithms/space.ts
70256
- import { AlgorithmType as AlgorithmType10 } from "@mog-sdk/spreadsheet-contracts/smartart";
70257
70724
  var init_space = __esm({
70258
70725
  "../../canvas/drawing/smartart/src/engine/algorithms/space.ts"() {
70259
70726
  "use strict";
70260
70727
  init_esm_shims();
70728
+ init_smartart();
70261
70729
  }
70262
70730
  });
70263
70731
 
@@ -70416,18 +70884,12 @@ var init_drawing_parser = __esm({
70416
70884
  });
70417
70885
 
70418
70886
  // ../../canvas/drawing/smartart/src/parser/layout-def-parser.ts
70419
- import {
70420
- ALL_ELEMENT_TYPES,
70421
- ALL_FUNCTION_ARGUMENTS,
70422
- ALL_FUNCTION_OPERATORS,
70423
- ALL_FUNCTION_TYPES,
70424
- VARIABLE_LIST_DEFAULTS
70425
- } from "@mog-sdk/spreadsheet-contracts/smartart";
70426
70887
  var VALID_ELEMENT_TYPES, VALID_FUNCTION_TYPES, VALID_FUNCTION_OPERATORS, VALID_FUNCTION_ARGUMENTS;
70427
70888
  var init_layout_def_parser = __esm({
70428
70889
  "../../canvas/drawing/smartart/src/parser/layout-def-parser.ts"() {
70429
70890
  "use strict";
70430
70891
  init_esm_shims();
70892
+ init_smartart();
70431
70893
  init_data_model_parser();
70432
70894
  init_drawingml_helpers();
70433
70895
  init_xml_helpers();
@@ -74329,7 +74791,7 @@ var init_cell_anchor_resolver = __esm({
74329
74791
  });
74330
74792
 
74331
74793
  // ../../kernel/src/floating-objects/types.ts
74332
- var init_types4 = __esm({
74794
+ var init_types5 = __esm({
74333
74795
  "../../kernel/src/floating-objects/types.ts"() {
74334
74796
  "use strict";
74335
74797
  init_esm_shims();
@@ -74428,7 +74890,7 @@ var init_picture_manager = __esm({
74428
74890
  "use strict";
74429
74891
  init_esm_shims();
74430
74892
  init_document();
74431
- init_types4();
74893
+ init_types5();
74432
74894
  }
74433
74895
  });
74434
74896
 
@@ -74530,7 +74992,7 @@ var init_textbox_manager = __esm({
74530
74992
  "../../kernel/src/floating-objects/managers/textbox-manager.ts"() {
74531
74993
  "use strict";
74532
74994
  init_esm_shims();
74533
- init_types4();
74995
+ init_types5();
74534
74996
  DEFAULT_TEXTBOX_FILL = { type: "solid", color: "#ffffff" };
74535
74997
  DEFAULT_TEXTBOX_BORDER = { style: "solid", color: "#000000", width: 1 };
74536
74998
  }
@@ -75711,7 +76173,7 @@ var init_kernel_context = __esm({
75711
76173
  init_esm_shims();
75712
76174
  init_chart_bridge();
75713
76175
  init_equation_bridge();
75714
- init_ink_recognition_bridge();
76176
+ init_ink_recognition_bridge2();
75715
76177
  init_locale_bridge();
75716
76178
  init_pivot_bridge();
75717
76179
  init_schema_bridge();
@@ -76721,8 +77183,21 @@ var WorkbookHistoryImpl = class {
76721
77183
 
76722
77184
  // ../../kernel/src/api/workbook/names.ts
76723
77185
  init_esm_shims();
77186
+
77187
+ // ../../contracts/src/api/index.ts
77188
+ init_esm_shims();
77189
+
77190
+ // ../../contracts/src/api/types.ts
77191
+ init_esm_shims();
77192
+
77193
+ // ../../contracts/src/api/worksheet/index.ts
77194
+ init_esm_shims();
77195
+
77196
+ // ../../contracts/src/api/worksheet/format-mappings.ts
77197
+ init_esm_shims();
77198
+
77199
+ // ../../kernel/src/api/workbook/names.ts
76724
77200
  init_errors();
76725
- import { RangeValueType } from "@mog-sdk/spreadsheet-contracts/api";
76726
77201
 
76727
77202
  // ../../kernel/src/domain/formulas/named-ranges.ts
76728
77203
  init_esm_shims();
@@ -77344,13 +77819,13 @@ var WorkbookNamesImpl = class {
77344
77819
  if (!values) return null;
77345
77820
  return values.map(
77346
77821
  (row) => row.map((cell) => {
77347
- if (cell === null || cell === void 0) return RangeValueType.Empty;
77348
- if (typeof cell === "boolean") return RangeValueType.Boolean;
77349
- if (typeof cell === "number") return RangeValueType.Double;
77350
- if (typeof cell === "string") return RangeValueType.String;
77822
+ if (cell === null || cell === void 0) return "Empty" /* Empty */;
77823
+ if (typeof cell === "boolean") return "Boolean" /* Boolean */;
77824
+ if (typeof cell === "number") return "Double" /* Double */;
77825
+ if (typeof cell === "string") return "String" /* String */;
77351
77826
  if (typeof cell === "object" && cell !== null && "type" in cell)
77352
- return RangeValueType.Error;
77353
- return RangeValueType.String;
77827
+ return "Error" /* Error */;
77828
+ return "String" /* String */;
77354
77829
  })
77355
77830
  );
77356
77831
  }
@@ -77442,7 +77917,7 @@ var BUILT_IN_LISTS = [
77442
77917
  ];
77443
77918
 
77444
77919
  // ../../kernel/src/domain/workbook/workbook.ts
77445
- import { DEFAULT_WORKBOOK_PROTECTION_OPTIONS } from "@mog-sdk/spreadsheet-contracts/protection";
77920
+ init_protection();
77446
77921
 
77447
77922
  // ../../spreadsheet-utils/src/protection.ts
77448
77923
  init_esm_shims();
@@ -77898,9 +78373,9 @@ init_sheet_meta();
77898
78373
 
77899
78374
  // ../../kernel/src/api/worksheet/worksheet-impl.ts
77900
78375
  init_esm_shims();
78376
+ init_core2();
77901
78377
  init_errors3();
77902
78378
  init_errors();
77903
- import { displayStringOrNull as displayStringOrNull3 } from "@mog-sdk/spreadsheet-contracts/core";
77904
78379
 
77905
78380
  // ../../kernel/src/bridges/wire/cell-metadata-cache.ts
77906
78381
  init_esm_shims();
@@ -79483,10 +79958,6 @@ async function clearRange2(ctx, sheetId, range2) {
79483
79958
  init_esm_shims();
79484
79959
  init_a1();
79485
79960
  init_value_conversions();
79486
- import {
79487
- NumberFormatCategory,
79488
- RangeValueType as RangeValueType2
79489
- } from "@mog-sdk/spreadsheet-contracts/api";
79490
79961
  async function clearWithMode(ctx, sheetId, range2, applyTo = "all") {
79491
79962
  const n = normalizeRange(range2);
79492
79963
  const promises = [];
@@ -79586,7 +80057,7 @@ async function getValueTypes(ctx, sheetId, range2) {
79586
80057
  for (let col = n.startCol; col <= n.endCol; col++) {
79587
80058
  const cell = cellMap.get(`${row},${col}`);
79588
80059
  if (!cell) {
79589
- rowData.push(RangeValueType2.Empty);
80060
+ rowData.push("Empty" /* Empty */);
79590
80061
  } else {
79591
80062
  rowData.push(classifyValueType(normalizeCellValue(cell.value)));
79592
80063
  }
@@ -79596,16 +80067,16 @@ async function getValueTypes(ctx, sheetId, range2) {
79596
80067
  return result;
79597
80068
  }
79598
80069
  function classifyValueType(value) {
79599
- if (value === null || value === void 0) return RangeValueType2.Empty;
80070
+ if (value === null || value === void 0) return "Empty" /* Empty */;
79600
80071
  if (typeof value === "string") {
79601
- if (value === "") return RangeValueType2.Empty;
79602
- if (value.startsWith("#")) return RangeValueType2.Error;
79603
- return RangeValueType2.String;
80072
+ if (value === "") return "Empty" /* Empty */;
80073
+ if (value.startsWith("#")) return "Error" /* Error */;
80074
+ return "String" /* String */;
79604
80075
  }
79605
- if (typeof value === "number") return RangeValueType2.Double;
79606
- if (typeof value === "boolean") return RangeValueType2.Boolean;
79607
- if (typeof value === "object" && value !== null && "type" in value) return RangeValueType2.Error;
79608
- return RangeValueType2.String;
80076
+ if (typeof value === "number") return "Double" /* Double */;
80077
+ if (typeof value === "boolean") return "Boolean" /* Boolean */;
80078
+ if (typeof value === "object" && value !== null && "type" in value) return "Error" /* Error */;
80079
+ return "String" /* String */;
79609
80080
  }
79610
80081
  async function findInRange(ctx, sheetId, range2, text, options) {
79611
80082
  const n = normalizeRange(range2);
@@ -79702,46 +80173,46 @@ async function getNumberFormatCategories(ctx, sheetId, range2) {
79702
80173
  }
79703
80174
  function detectFormatType(formatCode) {
79704
80175
  if (!formatCode || formatCode === "" || formatCode === "General") {
79705
- return NumberFormatCategory.General;
80176
+ return "General" /* General */;
79706
80177
  }
79707
80178
  if (formatCode === "@") {
79708
- return NumberFormatCategory.Text;
80179
+ return "Text" /* Text */;
79709
80180
  }
79710
80181
  const stripped = formatCode.replace(/\[[^\]]*\]/g, "").replace(/"[^"]*"/g, "");
79711
80182
  if (/[yYmMdD]/.test(stripped) && /[yYdD]/.test(stripped)) {
79712
- return NumberFormatCategory.Date;
80183
+ return "Date" /* Date */;
79713
80184
  }
79714
80185
  if (/[hHsS]/.test(stripped)) {
79715
80186
  if (/[yYdD]/.test(stripped)) {
79716
- return NumberFormatCategory.Date;
80187
+ return "Date" /* Date */;
79717
80188
  }
79718
- return NumberFormatCategory.Time;
80189
+ return "Time" /* Time */;
79719
80190
  }
79720
80191
  if (/AM\/PM/i.test(stripped)) {
79721
- return NumberFormatCategory.Time;
80192
+ return "Time" /* Time */;
79722
80193
  }
79723
80194
  if (stripped.includes("%")) {
79724
- return NumberFormatCategory.Percentage;
80195
+ return "Percentage" /* Percentage */;
79725
80196
  }
79726
80197
  if (/[eE][+-]/.test(stripped)) {
79727
- return NumberFormatCategory.Scientific;
80198
+ return "Scientific" /* Scientific */;
79728
80199
  }
79729
80200
  if (stripped.includes("/") && !/[yYmMdDhHsS]/.test(stripped)) {
79730
- return NumberFormatCategory.Fraction;
80201
+ return "Fraction" /* Fraction */;
79731
80202
  }
79732
80203
  if (/[_*]/.test(stripped) && /[$(]/.test(stripped)) {
79733
- return NumberFormatCategory.Accounting;
80204
+ return "Accounting" /* Accounting */;
79734
80205
  }
79735
80206
  if (/[$€£¥₹]/.test(formatCode)) {
79736
- return NumberFormatCategory.Currency;
80207
+ return "Currency" /* Currency */;
79737
80208
  }
79738
80209
  if (/^0{5}/.test(stripped) || /^0{3}-0{2}-0{4}/.test(stripped)) {
79739
- return NumberFormatCategory.Special;
80210
+ return "Special" /* Special */;
79740
80211
  }
79741
80212
  if (/[#0]/.test(stripped)) {
79742
- return NumberFormatCategory.Number;
80213
+ return "Number" /* Number */;
79743
80214
  }
79744
- return NumberFormatCategory.Custom;
80215
+ return "Custom" /* Custom */;
79745
80216
  }
79746
80217
 
79747
80218
  // ../../kernel/src/api/worksheet/operations/sort-operations.ts
@@ -81583,25 +82054,12 @@ init_esm_shims();
81583
82054
 
81584
82055
  // ../../number-formats/src/constants.ts
81585
82056
  init_esm_shims();
81586
- import {
81587
- ACCOUNTING_FORMATS,
81588
- CURRENCY_FORMATS,
81589
- CURRENCY_SYMBOLS,
81590
- DATE_FORMATS,
81591
- DEFAULT_FORMAT_BY_TYPE,
81592
- EXCEL_BUILTIN_FORMATS,
81593
- FORMAT_CATEGORIES,
81594
- FORMAT_PRESETS,
81595
- FRACTION_FORMATS,
81596
- GENERAL_FORMATS,
81597
- NEGATIVE_FORMATS,
81598
- NUMBER_FORMATS,
81599
- PERCENTAGE_FORMATS,
81600
- SCIENTIFIC_FORMATS,
81601
- SPECIAL_FORMATS,
81602
- TEXT_FORMATS,
81603
- TIME_FORMATS
81604
- } from "@mog-sdk/spreadsheet-contracts/number-formats/constants";
82057
+
82058
+ // ../../contracts/src/number-formats/constants.ts
82059
+ init_esm_shims();
82060
+
82061
+ // ../../contracts/src/number-formats/constants.gen.ts
82062
+ init_esm_shims();
81605
82063
 
81606
82064
  // ../../number-formats/src/format-utils.ts
81607
82065
  init_esm_shims();
@@ -83306,7 +83764,7 @@ init_errors();
83306
83764
 
83307
83765
  // ../../kernel/src/api/worksheet/operations/sheet-management-operations.ts
83308
83766
  init_esm_shims();
83309
- import { DEFAULT_PROTECTION_OPTIONS as DEFAULT_PROTECTION_OPTIONS2 } from "@mog-sdk/spreadsheet-contracts/protection";
83767
+ init_protection();
83310
83768
  function parseCellRef2(ref) {
83311
83769
  const match = ref.match(/^([A-Z]+)(\d+)$/i);
83312
83770
  if (!match) return null;
@@ -88382,7 +88840,7 @@ var WorksheetImpl = class {
88382
88840
  case 1:
88383
88841
  return accessor.numberValue;
88384
88842
  case 2:
88385
- return displayStringOrNull3(accessor.displayText);
88843
+ return displayStringOrNull(accessor.displayText);
88386
88844
  case 3:
88387
88845
  return accessor.numberValue !== 0;
88388
88846
  case 4: {
@@ -89008,7 +89466,7 @@ var WorkbookThemeImpl = class {
89008
89466
 
89009
89467
  // ../../kernel/src/api/workbook/workbook-impl.ts
89010
89468
  init_esm_shims();
89011
- init_disposable();
89469
+ init_disposable2();
89012
89470
  init_errors();
89013
89471
 
89014
89472
  // ../../kernel/src/domain/form-controls/index.ts
@@ -89595,7 +90053,26 @@ var globalRegistry = new FunctionRegistry();
89595
90053
 
89596
90054
  // ../../spreadsheet-utils/src/function-catalog.ts
89597
90055
  init_esm_shims();
89598
- import { FunctionCategory } from "@mog-sdk/spreadsheet-contracts/utils/function-registry";
90056
+
90057
+ // ../../contracts/src/utils/function-registry.ts
90058
+ init_esm_shims();
90059
+ var FunctionCategory = /* @__PURE__ */ ((FunctionCategory2) => {
90060
+ FunctionCategory2["MATH"] = "Math";
90061
+ FunctionCategory2["STATISTICAL"] = "Statistical";
90062
+ FunctionCategory2["TEXT"] = "Text";
90063
+ FunctionCategory2["LOGICAL"] = "Logical";
90064
+ FunctionCategory2["DATE_TIME"] = "Date & Time";
90065
+ FunctionCategory2["LOOKUP"] = "Lookup & Reference";
90066
+ FunctionCategory2["FINANCIAL"] = "Financial";
90067
+ FunctionCategory2["INFORMATION"] = "Information";
90068
+ FunctionCategory2["DATABASE"] = "Database";
90069
+ FunctionCategory2["ENGINEERING"] = "Engineering";
90070
+ FunctionCategory2["WEB"] = "Web";
90071
+ FunctionCategory2["TESTING"] = "Testing";
90072
+ return FunctionCategory2;
90073
+ })(FunctionCategory || {});
90074
+
90075
+ // ../../spreadsheet-utils/src/function-catalog.ts
89599
90076
  var C = FunctionCategory;
89600
90077
  var INLINE_FUNCTIONS = [
89601
90078
  // Aggregates
@@ -90462,7 +90939,7 @@ function convertToFunctionInfo(metadata) {
90462
90939
 
90463
90940
  // ../../kernel/src/api/workbook/viewport.ts
90464
90941
  init_esm_shims();
90465
- init_disposable();
90942
+ init_disposable2();
90466
90943
  var regionCounter = 0;
90467
90944
  var ViewportRegionImpl = class extends DisposableBase {
90468
90945
  constructor(sheetId, bounds, computeBridge, viewportId) {
@@ -90516,7 +90993,7 @@ var WorkbookViewportImpl = class {
90516
90993
  };
90517
90994
 
90518
90995
  // ../../kernel/src/api/workbook/workbook-impl.ts
90519
- import { DEFAULT_CHROME_THEME } from "@mog-sdk/spreadsheet-contracts/rendering";
90996
+ init_rendering();
90520
90997
  var API_EVENT_TO_INTERNAL = {
90521
90998
  cellChanged: "cell:changed",
90522
90999
  rangeChanged: "range:changed",