@mog-sdk/node 0.1.11 → 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/index.cjs CHANGED
@@ -295,36 +295,6 @@ var init_errors = __esm({
295
295
  }
296
296
  });
297
297
 
298
- // ../../contracts/src/document/protection.ts
299
- var DEFAULT_PROTECTION_OPTIONS, DEFAULT_WORKBOOK_PROTECTION_OPTIONS;
300
- var init_protection = __esm({
301
- "../../contracts/src/document/protection.ts"() {
302
- "use strict";
303
- init_cjs_shims();
304
- DEFAULT_PROTECTION_OPTIONS = {
305
- // Selection defaults to true (users can always select cells)
306
- selectLockedCells: true,
307
- selectUnlockedCells: true,
308
- // All other operations blocked by default
309
- insertRows: false,
310
- insertColumns: false,
311
- deleteRows: false,
312
- deleteColumns: false,
313
- formatCells: false,
314
- formatColumns: false,
315
- formatRows: false,
316
- sort: false,
317
- useAutoFilter: false,
318
- usePivotTableReports: false,
319
- editObjects: false,
320
- editScenarios: false
321
- };
322
- DEFAULT_WORKBOOK_PROTECTION_OPTIONS = {
323
- structure: true
324
- };
325
- }
326
- });
327
-
328
298
  // ../../infra/transport/src/command-metadata.gen.ts
329
299
  var BYTES_TUPLE_COMMANDS, RECALC_COMMANDS;
330
300
  var init_command_metadata_gen = __esm({
@@ -2233,101 +2203,6 @@ var init_mutation_result_handler = __esm({
2233
2203
  }
2234
2204
  });
2235
2205
 
2236
- // ../../contracts/src/core/commands.ts
2237
- var init_commands = __esm({
2238
- "../../contracts/src/core/commands.ts"() {
2239
- "use strict";
2240
- init_cjs_shims();
2241
- }
2242
- });
2243
-
2244
- // ../../contracts/src/core/core.ts
2245
- var init_core2 = __esm({
2246
- "../../contracts/src/core/core.ts"() {
2247
- "use strict";
2248
- init_cjs_shims();
2249
- }
2250
- });
2251
-
2252
- // ../../contracts/src/core/disposable.ts
2253
- var init_disposable = __esm({
2254
- "../../contracts/src/core/disposable.ts"() {
2255
- "use strict";
2256
- init_cjs_shims();
2257
- }
2258
- });
2259
-
2260
- // ../../contracts/src/core/event-base.ts
2261
- var init_event_base = __esm({
2262
- "../../contracts/src/core/event-base.ts"() {
2263
- "use strict";
2264
- init_cjs_shims();
2265
- }
2266
- });
2267
-
2268
- // ../../contracts/src/core/execution.ts
2269
- var init_execution = __esm({
2270
- "../../contracts/src/core/execution.ts"() {
2271
- "use strict";
2272
- init_cjs_shims();
2273
- }
2274
- });
2275
-
2276
- // ../../contracts/src/core/result.ts
2277
- var init_result = __esm({
2278
- "../../contracts/src/core/result.ts"() {
2279
- "use strict";
2280
- init_cjs_shims();
2281
- }
2282
- });
2283
-
2284
- // ../../contracts/src/core/schema.ts
2285
- var init_schema = __esm({
2286
- "../../contracts/src/core/schema.ts"() {
2287
- "use strict";
2288
- init_cjs_shims();
2289
- }
2290
- });
2291
-
2292
- // ../../contracts/src/core/formatted-text.ts
2293
- function asFormattedText(s) {
2294
- return s;
2295
- }
2296
- function displayStringOrNull(text) {
2297
- return text;
2298
- }
2299
- var init_formatted_text = __esm({
2300
- "../../contracts/src/core/formatted-text.ts"() {
2301
- "use strict";
2302
- init_cjs_shims();
2303
- }
2304
- });
2305
-
2306
- // ../../contracts/src/core/testing.ts
2307
- var init_testing = __esm({
2308
- "../../contracts/src/core/testing.ts"() {
2309
- "use strict";
2310
- init_cjs_shims();
2311
- }
2312
- });
2313
-
2314
- // ../../contracts/src/core/index.ts
2315
- var init_core3 = __esm({
2316
- "../../contracts/src/core/index.ts"() {
2317
- "use strict";
2318
- init_cjs_shims();
2319
- init_commands();
2320
- init_core2();
2321
- init_disposable();
2322
- init_event_base();
2323
- init_execution();
2324
- init_result();
2325
- init_schema();
2326
- init_formatted_text();
2327
- init_testing();
2328
- }
2329
- });
2330
-
2331
2206
  // ../../kernel/src/bridges/wire/constants.gen.ts
2332
2207
  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;
2333
2208
  var init_constants_gen = __esm({
@@ -2385,12 +2260,12 @@ var init_constants_gen = __esm({
2385
2260
  });
2386
2261
 
2387
2262
  // ../../kernel/src/bridges/wire/binary-mutation-reader.ts
2388
- var sharedDecoder, BinaryMutationReader;
2263
+ var import_core, sharedDecoder, BinaryMutationReader;
2389
2264
  var init_binary_mutation_reader = __esm({
2390
2265
  "../../kernel/src/bridges/wire/binary-mutation-reader.ts"() {
2391
2266
  "use strict";
2392
2267
  init_cjs_shims();
2393
- init_core3();
2268
+ import_core = require("@mog-sdk/spreadsheet-contracts/core");
2394
2269
  init_constants_gen();
2395
2270
  sharedDecoder = new TextDecoder("utf-8");
2396
2271
  BinaryMutationReader = class {
@@ -2489,7 +2364,7 @@ var init_binary_mutation_reader = __esm({
2489
2364
  const displayLen = this._view.getUint16(recOff + OFF_DISPLAY_LEN, true);
2490
2365
  if (displayOff === NO_STRING || displayLen === 0) return null;
2491
2366
  const start = this._stringPoolStart + displayOff;
2492
- return asFormattedText(sharedDecoder.decode(this._bytes.subarray(start, start + displayLen)));
2367
+ return (0, import_core.asFormattedText)(sharedDecoder.decode(this._bytes.subarray(start, start + displayLen)));
2493
2368
  }
2494
2369
  /**
2495
2370
  * Get a zero-copy subarray view of the raw UTF-8 display bytes for patch i.
@@ -2641,7 +2516,7 @@ var init_binary_mutation_reader = __esm({
2641
2516
  const displayLen = this._view.getUint16(recOff + OFF_DISPLAY_LEN, true);
2642
2517
  if (displayOff === NO_STRING || displayLen === 0) return null;
2643
2518
  const start = this._stringPoolStart + displayOff;
2644
- return asFormattedText(sharedDecoder.decode(this._bytes.subarray(start, start + displayLen)));
2519
+ return (0, import_core.asFormattedText)(sharedDecoder.decode(this._bytes.subarray(start, start + displayLen)));
2645
2520
  }
2646
2521
  /**
2647
2522
  * Get a zero-copy subarray view of the raw UTF-8 display bytes for spill patch i.
@@ -2690,12 +2565,12 @@ function rgbaU32ToHex(value) {
2690
2565
  const b = value >>> 8 & 255;
2691
2566
  return "#" + (1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1).toUpperCase();
2692
2567
  }
2693
- var sharedEncoder, sharedDecoder2, EMPTY_FORMAT, BinaryViewportBuffer, CellAccessor;
2568
+ var import_core2, sharedEncoder, sharedDecoder2, EMPTY_FORMAT, BinaryViewportBuffer, CellAccessor;
2694
2569
  var init_binary_viewport_buffer = __esm({
2695
2570
  "../../kernel/src/bridges/wire/binary-viewport-buffer.ts"() {
2696
2571
  "use strict";
2697
2572
  init_cjs_shims();
2698
- init_core3();
2573
+ import_core2 = require("@mog-sdk/spreadsheet-contracts/core");
2699
2574
  init_constants_gen();
2700
2575
  init_constants_gen();
2701
2576
  sharedEncoder = new TextEncoder();
@@ -3015,7 +2890,7 @@ var init_binary_viewport_buffer = __esm({
3015
2890
  sampleCells.push({
3016
2891
  row,
3017
2892
  col,
3018
- displayText: displayStringOrNull(reader.patchDisplayText(i))
2893
+ displayText: (0, import_core2.displayStringOrNull)(reader.patchDisplayText(i))
3019
2894
  });
3020
2895
  }
3021
2896
  }
@@ -3034,7 +2909,7 @@ var init_binary_viewport_buffer = __esm({
3034
2909
  sampleCells.push({
3035
2910
  row,
3036
2911
  col,
3037
- displayText: displayStringOrNull(reader.spillPatchDisplayText(i))
2912
+ displayText: (0, import_core2.displayStringOrNull)(reader.spillPatchDisplayText(i))
3038
2913
  });
3039
2914
  }
3040
2915
  }
@@ -3792,7 +3667,7 @@ var init_binary_viewport_buffer = __esm({
3792
3667
  */
3793
3668
  get displayText() {
3794
3669
  const decoded = this._buffer.getOrDecodeString(this._displayOff, this._displayLen);
3795
- return decoded !== null ? asFormattedText(decoded) : null;
3670
+ return decoded !== null ? (0, import_core2.asFormattedText)(decoded) : null;
3796
3671
  }
3797
3672
  /**
3798
3673
  * Get the error text for the current cell.
@@ -3854,13 +3729,13 @@ var init_binary_viewport_buffer = __esm({
3854
3729
  function cellKey(row, col) {
3855
3730
  return `${row},${col}`;
3856
3731
  }
3857
- var ViewportCoordinator;
3732
+ var import_core3, ViewportCoordinator;
3858
3733
  var init_viewport_coordinator = __esm({
3859
3734
  "../../kernel/src/bridges/wire/viewport-coordinator.ts"() {
3860
3735
  "use strict";
3861
3736
  init_cjs_shims();
3862
3737
  init_binary_viewport_buffer();
3863
- init_core3();
3738
+ import_core3 = require("@mog-sdk/spreadsheet-contracts/core");
3864
3739
  ViewportCoordinator = class {
3865
3740
  constructor(viewportId) {
3866
3741
  /** Monotonically increasing version, incremented on every write. */
@@ -3981,7 +3856,7 @@ var init_viewport_coordinator = __esm({
3981
3856
  flags: reader.patchFlags(i),
3982
3857
  numberValue: reader.patchNumberValue(i),
3983
3858
  formatIdx: reader.patchFormatIdx(i),
3984
- displayString: displayStringOrNull(reader.patchDisplayText(i)),
3859
+ displayString: (0, import_core3.displayStringOrNull)(reader.patchDisplayText(i)),
3985
3860
  errorString: reader.patchErrorText(i),
3986
3861
  bgColorOverride: reader.patchBgColorOverride(i),
3987
3862
  fontColorOverride: reader.patchFontColorOverride(i),
@@ -3998,7 +3873,7 @@ var init_viewport_coordinator = __esm({
3998
3873
  flags: reader.spillPatchFlags(i),
3999
3874
  numberValue: reader.spillPatchNumberValue(i),
4000
3875
  formatIdx: reader.spillPatchFormatIdx(i),
4001
- displayString: displayStringOrNull(reader.spillPatchDisplayText(i)),
3876
+ displayString: (0, import_core3.displayStringOrNull)(reader.spillPatchDisplayText(i)),
4002
3877
  errorString: reader.spillPatchErrorText(i),
4003
3878
  bgColorOverride: reader.spillPatchBgColorOverride(i),
4004
3879
  fontColorOverride: reader.spillPatchFontColorOverride(i),
@@ -6923,13 +6798,13 @@ async function rustSchemaInferColumn(values) {
6923
6798
  const t = await getSchemaTransport();
6924
6799
  return t.call("compute_schema_infer_column", { values });
6925
6800
  }
6926
- var ComputeBridge, schemaTransport;
6801
+ var import_protection, ComputeBridge, schemaTransport;
6927
6802
  var init_compute_bridge = __esm({
6928
6803
  "../../kernel/src/bridges/compute/compute-bridge.ts"() {
6929
6804
  "use strict";
6930
6805
  init_cjs_shims();
6931
6806
  init_formula_string();
6932
- init_protection();
6807
+ import_protection = require("@mog-sdk/spreadsheet-contracts/protection");
6933
6808
  init_src();
6934
6809
  init_compute_wire_converters();
6935
6810
  init_compute_core();
@@ -7271,7 +7146,7 @@ var init_compute_bridge = __esm({
7271
7146
  async getSheetProtectionOptions(sheetId) {
7272
7147
  const settings = await this.getSheetSettings(sheetId);
7273
7148
  if (!settings.isProtected) return null;
7274
- return { ...DEFAULT_PROTECTION_OPTIONS, ...settings.protectionOptions };
7149
+ return { ...import_protection.DEFAULT_PROTECTION_OPTIONS, ...settings.protectionOptions };
7275
7150
  }
7276
7151
  /** Set multiple sheet settings at once (iterates entries). */
7277
7152
  async setSheetSettings(sheetId, updates) {
@@ -7355,77 +7230,19 @@ var init_compute_bridge = __esm({
7355
7230
  }
7356
7231
  });
7357
7232
 
7358
- // ../../contracts/src/rendering/grid-renderer.ts
7359
- var init_grid_renderer = __esm({
7360
- "../../contracts/src/rendering/grid-renderer.ts"() {
7361
- "use strict";
7362
- init_cjs_shims();
7363
- }
7364
- });
7365
-
7366
- // ../../contracts/src/rendering/constants.ts
7367
- var DEFAULT_COL_WIDTH_WINDOWS, DEFAULT_COL_WIDTH_MACOS, _isMac, DEFAULT_COL_WIDTH;
7368
- var init_constants = __esm({
7369
- "../../contracts/src/rendering/constants.ts"() {
7370
- "use strict";
7371
- init_cjs_shims();
7372
- DEFAULT_COL_WIDTH_WINDOWS = 64;
7373
- DEFAULT_COL_WIDTH_MACOS = 72;
7374
- _isMac = typeof navigator !== "undefined" && /Mac/.test(navigator.platform ?? "");
7375
- DEFAULT_COL_WIDTH = _isMac ? DEFAULT_COL_WIDTH_MACOS : DEFAULT_COL_WIDTH_WINDOWS;
7376
- }
7377
- });
7378
-
7379
- // ../../contracts/src/rendering/data-sources.ts
7380
- var DEFAULT_CHROME_THEME;
7381
- var init_data_sources = __esm({
7382
- "../../contracts/src/rendering/data-sources.ts"() {
7383
- "use strict";
7384
- init_cjs_shims();
7385
- DEFAULT_CHROME_THEME = {
7386
- canvasBackground: "#ffffff",
7387
- gridlineColor: "#e0e0e0",
7388
- headerBackground: "#f8f9fa",
7389
- headerText: "#333333",
7390
- headerBorder: "#dadce0",
7391
- headerHighlightBackground: "#e8eaed",
7392
- headerHighlightText: "#1a73e8",
7393
- selectionFill: "rgba(66, 133, 244, 0.1)",
7394
- selectionBorder: "#4285f4",
7395
- activeCellBorder: "#1a73e8",
7396
- fillHandleColor: "#4285f4",
7397
- dragSourceColor: "rgba(66, 133, 244, 0.15)",
7398
- dragTargetColor: "#4285f4",
7399
- scrollbarTrack: "#f1f1f1",
7400
- scrollbarThumb: "#c1c1c1"
7401
- };
7402
- }
7403
- });
7404
-
7405
- // ../../contracts/src/rendering/index.ts
7406
- var init_rendering = __esm({
7407
- "../../contracts/src/rendering/index.ts"() {
7408
- "use strict";
7409
- init_cjs_shims();
7410
- init_grid_renderer();
7411
- init_constants();
7412
- init_data_sources();
7413
- }
7414
- });
7415
-
7416
7233
  // ../../kernel/src/domain/sheets/sheet-meta-defaults.ts
7417
7234
  function getSheetMetaDefault(field) {
7418
7235
  const def = SHEET_META_SCHEMA[field];
7419
7236
  return def.default;
7420
7237
  }
7421
- var SHEET_META_DEFAULT_ROW_HEIGHT, SHEET_META_DEFAULT_COL_WIDTH, SHEET_META_DEFAULT_GRIDLINE_COLOR, SHEET_META_SCHEMA;
7238
+ var import_rendering, SHEET_META_DEFAULT_ROW_HEIGHT, SHEET_META_DEFAULT_COL_WIDTH, SHEET_META_DEFAULT_GRIDLINE_COLOR, SHEET_META_SCHEMA;
7422
7239
  var init_sheet_meta_defaults = __esm({
7423
7240
  "../../kernel/src/domain/sheets/sheet-meta-defaults.ts"() {
7424
7241
  "use strict";
7425
7242
  init_cjs_shims();
7426
- init_rendering();
7243
+ import_rendering = require("@mog-sdk/spreadsheet-contracts/rendering");
7427
7244
  SHEET_META_DEFAULT_ROW_HEIGHT = 20;
7428
- SHEET_META_DEFAULT_COL_WIDTH = DEFAULT_COL_WIDTH;
7245
+ SHEET_META_DEFAULT_COL_WIDTH = import_rendering.DEFAULT_COL_WIDTH;
7429
7246
  SHEET_META_DEFAULT_GRIDLINE_COLOR = "#e2e2e2";
7430
7247
  SHEET_META_SCHEMA = {
7431
7248
  // ===========================================================================
@@ -7965,11 +7782,12 @@ function normalizeRange(range2) {
7965
7782
  sheetId: range2.sheetId
7966
7783
  };
7967
7784
  }
7785
+ var import_core4;
7968
7786
  var init_range = __esm({
7969
7787
  "../../spreadsheet-utils/src/range.ts"() {
7970
7788
  "use strict";
7971
7789
  init_cjs_shims();
7972
- init_core3();
7790
+ import_core4 = require("@mog-sdk/spreadsheet-contracts/core");
7973
7791
  }
7974
7792
  });
7975
7793
 
@@ -9426,7 +9244,7 @@ var init_data_extractor = __esm({
9426
9244
  });
9427
9245
 
9428
9246
  // ../../charts/src/core/index.ts
9429
- var init_core4 = __esm({
9247
+ var init_core2 = __esm({
9430
9248
  "../../charts/src/core/index.ts"() {
9431
9249
  "use strict";
9432
9250
  init_cjs_shims();
@@ -13410,7 +13228,7 @@ var init_src2 = __esm({
13410
13228
  "../../charts/src/index.ts"() {
13411
13229
  "use strict";
13412
13230
  init_cjs_shims();
13413
- init_core4();
13231
+ init_core2();
13414
13232
  init_primitives();
13415
13233
  init_compiler();
13416
13234
  }
@@ -16486,7 +16304,7 @@ function toDisposable(fn) {
16486
16304
  return disposable;
16487
16305
  }
16488
16306
  var DisposableBase, DisposableStore, DisposableNone;
16489
- var init_disposable2 = __esm({
16307
+ var init_disposable = __esm({
16490
16308
  "../../spreadsheet-utils/src/disposable.ts"() {
16491
16309
  "use strict";
16492
16310
  init_cjs_shims();
@@ -16550,7 +16368,7 @@ function ok(value) {
16550
16368
  function err(error) {
16551
16369
  return { ok: false, error };
16552
16370
  }
16553
- var init_result2 = __esm({
16371
+ var init_result = __esm({
16554
16372
  "../../spreadsheet-utils/src/result.ts"() {
16555
16373
  "use strict";
16556
16374
  init_cjs_shims();
@@ -16563,7 +16381,7 @@ var init_subscribable = __esm({
16563
16381
  "../../kernel/src/services/primitives/subscribable.ts"() {
16564
16382
  "use strict";
16565
16383
  init_cjs_shims();
16566
- init_disposable2();
16384
+ init_disposable();
16567
16385
  Subscribable = class extends DisposableBase {
16568
16386
  constructor() {
16569
16387
  super(...arguments);
@@ -16623,7 +16441,7 @@ var init_event_emitter = __esm({
16623
16441
  "../../kernel/src/services/primitives/event-emitter.ts"() {
16624
16442
  "use strict";
16625
16443
  init_cjs_shims();
16626
- init_disposable2();
16444
+ init_disposable();
16627
16445
  TypedEventEmitter = class extends DisposableBase {
16628
16446
  constructor() {
16629
16447
  super(...arguments);
@@ -16688,8 +16506,8 @@ var init_primitives3 = __esm({
16688
16506
  "../../kernel/src/services/primitives/index.ts"() {
16689
16507
  "use strict";
16690
16508
  init_cjs_shims();
16691
- init_disposable2();
16692
- init_result2();
16509
+ init_disposable();
16510
+ init_result();
16693
16511
  init_subscribable();
16694
16512
  init_event_emitter();
16695
16513
  }
@@ -24739,37 +24557,10 @@ var init_equation_bridge = __esm({
24739
24557
  }
24740
24558
  });
24741
24559
 
24742
- // ../../contracts/src/bridges/ink-recognition-bridge.ts
24743
- var DEFAULT_RECOGNITION_THRESHOLDS;
24744
- var init_ink_recognition_bridge = __esm({
24745
- "../../contracts/src/bridges/ink-recognition-bridge.ts"() {
24746
- "use strict";
24747
- init_cjs_shims();
24748
- DEFAULT_RECOGNITION_THRESHOLDS = {
24749
- line: 0.7,
24750
- rectangle: 0.65,
24751
- ellipse: 0.7,
24752
- triangle: 0.6,
24753
- arrow: 0.6,
24754
- star: 0.65,
24755
- text: 0.5
24756
- };
24757
- }
24758
- });
24759
-
24760
- // ../../contracts/src/bridges/index.ts
24761
- var init_bridges = __esm({
24762
- "../../contracts/src/bridges/index.ts"() {
24763
- "use strict";
24764
- init_cjs_shims();
24765
- init_ink_recognition_bridge();
24766
- }
24767
- });
24768
-
24769
24560
  // ../../kernel/src/domain/drawing/ink-recognition-bridge.ts
24770
24561
  function createInkRecognitionBridge(initialThresholds) {
24771
24562
  let thresholds = {
24772
- ...DEFAULT_RECOGNITION_THRESHOLDS,
24563
+ ...import_bridges.DEFAULT_RECOGNITION_THRESHOLDS,
24773
24564
  ...initialThresholds
24774
24565
  };
24775
24566
  return {
@@ -25182,11 +24973,12 @@ async function recognizeWithBrowserAPI(strokes) {
25182
24973
  }
25183
24974
  return null;
25184
24975
  }
25185
- var init_ink_recognition_bridge2 = __esm({
24976
+ var import_bridges;
24977
+ var init_ink_recognition_bridge = __esm({
25186
24978
  "../../kernel/src/domain/drawing/ink-recognition-bridge.ts"() {
25187
24979
  "use strict";
25188
24980
  init_cjs_shims();
25189
- init_bridges();
24981
+ import_bridges = require("@mog-sdk/spreadsheet-contracts/bridges");
25190
24982
  }
25191
24983
  });
25192
24984
 
@@ -30199,7 +29991,7 @@ var init_arrows = __esm({
30199
29991
 
30200
29992
  // ../../canvas/drawing/shapes/src/presets/constants.ts
30201
29993
  var KAPPA;
30202
- var init_constants2 = __esm({
29994
+ var init_constants = __esm({
30203
29995
  "../../canvas/drawing/shapes/src/presets/constants.ts"() {
30204
29996
  "use strict";
30205
29997
  init_cjs_shims();
@@ -30223,7 +30015,7 @@ var init_primitives4 = __esm({
30223
30015
  "use strict";
30224
30016
  init_cjs_shims();
30225
30017
  init_src3();
30226
- init_constants2();
30018
+ init_constants();
30227
30019
  }
30228
30020
  });
30229
30021
 
@@ -30233,7 +30025,7 @@ var init_basic = __esm({
30233
30025
  "use strict";
30234
30026
  init_cjs_shims();
30235
30027
  init_src3();
30236
- init_constants2();
30028
+ init_constants();
30237
30029
  init_primitives4();
30238
30030
  init_registry3();
30239
30031
  init_primitives4();
@@ -70306,438 +70098,23 @@ var init_rules = __esm({
70306
70098
  }
70307
70099
  });
70308
70100
 
70309
- // ../../contracts/src/smartart/layouts.ts
70310
- var init_layouts2 = __esm({
70311
- "../../contracts/src/smartart/layouts.ts"() {
70312
- "use strict";
70313
- init_cjs_shims();
70314
- }
70315
- });
70316
-
70317
- // ../../contracts/src/smartart/ooxml-algorithm-types.ts
70318
- var ParameterId, VALID_PARAMS_BY_ALGORITHM;
70319
- var init_ooxml_algorithm_types = __esm({
70320
- "../../contracts/src/smartart/ooxml-algorithm-types.ts"() {
70321
- "use strict";
70322
- init_cjs_shims();
70323
- ParameterId = {
70324
- // ── Alignment Parameters ──────────────────────────────────────────────────
70325
- /** Horizontal alignment of children within the layout area. */
70326
- horzAlign: "horzAlign",
70327
- /** Vertical alignment of children within the layout area. */
70328
- vertAlign: "vertAlign",
70329
- /** Horizontal alignment for individual nodes (hierarchy algorithms). */
70330
- nodeHorzAlign: "nodeHorzAlign",
70331
- /** Vertical alignment for individual nodes (hierarchy algorithms). */
70332
- nodeVertAlign: "nodeVertAlign",
70333
- /** Hierarchy alignment (16 possible values for tree orientation). */
70334
- hierAlign: "hierAlign",
70335
- /** Text alignment (whether text should be aligned with shape). */
70336
- alignTx: "alignTx",
70337
- // ── Direction Parameters ──────────────────────────────────────────────────
70338
- /** Child direction (horizontal or vertical arrangement of children). */
70339
- chDir: "chDir",
70340
- /** Child alignment (how children align on the cross-axis). */
70341
- chAlign: "chAlign",
70342
- /** Secondary child alignment (for complex hierarchy layouts). */
70343
- secChAlign: "secChAlign",
70344
- /** Linear direction (which edge children flow from). */
70345
- linDir: "linDir",
70346
- /** Secondary linear direction (for complex hierarchy layouts). */
70347
- secLinDir: "secLinDir",
70348
- /** Text direction (horizontal or vertical text blocks). */
70349
- txDir: "txDir",
70350
- /** Text block direction (horizontal or vertical text flow). */
70351
- txBlDir: "txBlDir",
70352
- /** Growth direction (which corner the snake starts from). */
70353
- grDir: "grDir",
70354
- /** Flow direction (whether snake flows by row or column). */
70355
- flowDir: "flowDir",
70356
- /** Continue direction (same direction or reversed for each row). */
70357
- contDir: "contDir",
70358
- // ── Connector Parameters ──────────────────────────────────────────────────
70359
- /** Connector routing style (straight, bend, curve, long curve). */
70360
- connRout: "connRout",
70361
- /** Beginning/start arrowhead style for connectors. */
70362
- begSty: "begSty",
70363
- /** Ending arrowhead style for connectors. */
70364
- endSty: "endSty",
70365
- /** Connector dimension (1D, 2D, or custom). */
70366
- dim: "dim",
70367
- /** Source node name for connector routing. */
70368
- srcNode: "srcNode",
70369
- /** Destination node name for connector routing. */
70370
- dstNode: "dstNode",
70371
- /** Beginning connection points (which points on the source shape). */
70372
- begPts: "begPts",
70373
- /** Ending connection points (which points on the destination shape). */
70374
- endPts: "endPts",
70375
- /** Bend point position for right-angle connectors. */
70376
- bendPt: "bendPt",
70377
- // ── Cycle/Circular Parameters ─────────────────────────────────────────────
70378
- /** Start angle in degrees for cycle algorithm. */
70379
- stAng: "stAng",
70380
- /** Span angle in degrees for cycle algorithm. */
70381
- spanAng: "spanAng",
70382
- /** Rotation path (none or along the circular path). */
70383
- rotPath: "rotPath",
70384
- /** Center shape mapping (whether first node goes to center). */
70385
- ctrShpMap: "ctrShpMap",
70386
- // ── Snake Parameters ──────────────────────────────────────────────────────
70387
- /** Breakpoint logic for snake wrapping (end of canvas, balanced, fixed). */
70388
- bkpt: "bkpt",
70389
- /** Breakpoint fixed value (number of items per row when bkpt=fixed). */
70390
- bkPtFixedVal: "bkPtFixedVal",
70391
- /** Offset mode for staggered rows in snake layout. */
70392
- off: "off",
70393
- // ── Linear/Sequence Parameters ────────────────────────────────────────────
70394
- /** Starting element index (which node type starts the alternating sequence). */
70395
- stElem: "stElem",
70396
- /** Starting bullet level for text algorithm. */
70397
- stBulletLvl: "stBulletLvl",
70398
- // ── Pyramid Parameters ────────────────────────────────────────────────────
70399
- /** Pyramid accent position (before or after the level). */
70400
- pyraAcctPos: "pyraAcctPos",
70401
- /** Pyramid accent text margin (step or stack behavior). */
70402
- pyraAcctTxMar: "pyraAcctTxMar",
70403
- /** Pyramid level node name. */
70404
- pyraLvlNode: "pyraLvlNode",
70405
- /** Pyramid accent background node name. */
70406
- pyraAcctBkgdNode: "pyraAcctBkgdNode",
70407
- /** Pyramid accent text node name. */
70408
- pyraAcctTxNode: "pyraAcctTxNode",
70409
- // ── Text Parameters ───────────────────────────────────────────────────────
70410
- /** Parent text LTR alignment. */
70411
- parTxLTRAlign: "parTxLTRAlign",
70412
- /** Parent text RTL alignment. */
70413
- parTxRTLAlign: "parTxRTLAlign",
70414
- /** Shape text LTR alignment for children. */
70415
- shpTxLTRAlignCh: "shpTxLTRAlignCh",
70416
- /** Shape text RTL alignment for children. */
70417
- shpTxRTLAlignCh: "shpTxRTLAlignCh",
70418
- /** Text anchor horizontal position. */
70419
- txAnchorHorz: "txAnchorHorz",
70420
- /** Text anchor vertical position. */
70421
- txAnchorVert: "txAnchorVert",
70422
- /** Text anchor horizontal position for children. */
70423
- txAnchorHorzCh: "txAnchorHorzCh",
70424
- /** Text anchor vertical position for children. */
70425
- txAnchorVertCh: "txAnchorVertCh",
70426
- /** Auto text rotation mode (none, upright, gravity-based). */
70427
- autoTxRot: "autoTxRot",
70428
- // ── Spacing & Sizing Parameters ───────────────────────────────────────────
70429
- /** Aspect ratio value. */
70430
- ar: "ar",
70431
- /** Line spacing for parent text (percentage). */
70432
- lnSpPar: "lnSpPar",
70433
- /** Line spacing after parent paragraph (percentage). */
70434
- lnSpAfParP: "lnSpAfParP",
70435
- /** Line spacing for child text (percentage). */
70436
- lnSpCh: "lnSpCh",
70437
- /** Line spacing after child paragraph (percentage). */
70438
- lnSpAfChP: "lnSpAfChP",
70439
- // ── Hierarchy-Specific Parameters ─────────────────────────────────────────
70440
- /** Root short distance flag (hierarchy algorithms). */
70441
- rtShortDist: "rtShortDist",
70442
- // ── Fallback Parameter ────────────────────────────────────────────────────
70443
- /** Fallback dimension for the algorithm. */
70444
- fallback: "fallback"
70445
- };
70446
- VALID_PARAMS_BY_ALGORITHM = {
70447
- composite: [ParameterId.ar],
70448
- lin: [
70449
- ParameterId.linDir,
70450
- ParameterId.chDir,
70451
- ParameterId.chAlign,
70452
- ParameterId.horzAlign,
70453
- ParameterId.vertAlign,
70454
- ParameterId.stElem,
70455
- ParameterId.fallback,
70456
- ParameterId.nodeHorzAlign,
70457
- ParameterId.nodeVertAlign
70458
- ],
70459
- snake: [
70460
- ParameterId.grDir,
70461
- ParameterId.flowDir,
70462
- ParameterId.contDir,
70463
- ParameterId.bkpt,
70464
- ParameterId.bkPtFixedVal,
70465
- ParameterId.off
70466
- ],
70467
- cycle: [ParameterId.stAng, ParameterId.spanAng, ParameterId.rotPath, ParameterId.ctrShpMap],
70468
- hierRoot: [
70469
- ParameterId.hierAlign,
70470
- ParameterId.nodeHorzAlign,
70471
- ParameterId.nodeVertAlign,
70472
- ParameterId.rtShortDist
70473
- ],
70474
- hierChild: [
70475
- ParameterId.chAlign,
70476
- ParameterId.linDir,
70477
- ParameterId.secChAlign,
70478
- ParameterId.secLinDir
70479
- ],
70480
- pyra: [
70481
- ParameterId.linDir,
70482
- ParameterId.txDir,
70483
- ParameterId.pyraAcctPos,
70484
- ParameterId.pyraAcctTxMar,
70485
- ParameterId.pyraLvlNode,
70486
- ParameterId.pyraAcctBkgdNode,
70487
- ParameterId.pyraAcctTxNode
70488
- ],
70489
- conn: [
70490
- ParameterId.srcNode,
70491
- ParameterId.dstNode,
70492
- ParameterId.connRout,
70493
- ParameterId.begSty,
70494
- ParameterId.endSty,
70495
- ParameterId.dim,
70496
- ParameterId.bendPt,
70497
- ParameterId.begPts,
70498
- ParameterId.endPts
70499
- ],
70500
- tx: [
70501
- ParameterId.parTxLTRAlign,
70502
- ParameterId.parTxRTLAlign,
70503
- ParameterId.shpTxLTRAlignCh,
70504
- ParameterId.shpTxRTLAlignCh,
70505
- ParameterId.txAnchorVert,
70506
- ParameterId.txAnchorHorz,
70507
- ParameterId.txAnchorVertCh,
70508
- ParameterId.txAnchorHorzCh,
70509
- ParameterId.txBlDir,
70510
- ParameterId.autoTxRot,
70511
- ParameterId.stBulletLvl,
70512
- ParameterId.lnSpPar,
70513
- ParameterId.lnSpAfParP,
70514
- ParameterId.lnSpCh,
70515
- ParameterId.lnSpAfChP,
70516
- ParameterId.alignTx
70517
- ],
70518
- sp: []
70519
- };
70520
- }
70521
- });
70522
-
70523
- // ../../contracts/src/smartart/ooxml-data-model-types.ts
70524
- var init_ooxml_data_model_types = __esm({
70525
- "../../contracts/src/smartart/ooxml-data-model-types.ts"() {
70526
- "use strict";
70527
- init_cjs_shims();
70528
- }
70529
- });
70530
-
70531
- // ../../contracts/src/smartart/ooxml-drawing-types.ts
70532
- var init_ooxml_drawing_types = __esm({
70533
- "../../contracts/src/smartart/ooxml-drawing-types.ts"() {
70534
- "use strict";
70535
- init_cjs_shims();
70536
- }
70537
- });
70538
-
70539
- // ../../contracts/src/smartart/ooxml-engine-types.ts
70540
- 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;
70541
- var init_ooxml_engine_types = __esm({
70542
- "../../contracts/src/smartart/ooxml-engine-types.ts"() {
70543
- "use strict";
70544
- init_cjs_shims();
70545
- POSITIONAL_CONSTRAINT_TYPES = [
70546
- "l",
70547
- "t",
70548
- "r",
70549
- "b",
70550
- "lOff",
70551
- "tOff",
70552
- "rOff",
70553
- "bOff",
70554
- "ctrX",
70555
- "ctrY",
70556
- "ctrXOff",
70557
- "ctrYOff"
70558
- ];
70559
- DIMENSIONAL_CONSTRAINT_TYPES = [
70560
- "w",
70561
- "h",
70562
- "wOff",
70563
- "hOff"
70564
- ];
70565
- MARGIN_CONSTRAINT_TYPES = [
70566
- "lMarg",
70567
- "tMarg",
70568
- "rMarg",
70569
- "bMarg",
70570
- "begMarg",
70571
- "endMarg"
70572
- ];
70573
- FONT_CONSTRAINT_TYPES = [
70574
- "primFontSz",
70575
- "secFontSz"
70576
- ];
70577
- SPACING_CONSTRAINT_TYPES = [
70578
- "sp",
70579
- "sibSp",
70580
- "secSibSp"
70581
- ];
70582
- GEOMETRY_CONSTRAINT_TYPES = [
70583
- "connDist",
70584
- "diam",
70585
- "stemThick",
70586
- "begPad",
70587
- "endPad",
70588
- "wArH",
70589
- "hArH",
70590
- "bendDist"
70591
- ];
70592
- USER_DEFINED_CONSTRAINT_TYPES = [
70593
- "userA",
70594
- "userB",
70595
- "userC",
70596
- "userD",
70597
- "userE",
70598
- "userF",
70599
- "userG",
70600
- "userH",
70601
- "userI",
70602
- "userJ",
70603
- "userK",
70604
- "userL",
70605
- "userM",
70606
- "userN",
70607
- "userO",
70608
- "userP",
70609
- "userQ",
70610
- "userR",
70611
- "userS",
70612
- "userT",
70613
- "userU",
70614
- "userV",
70615
- "userW",
70616
- "userX",
70617
- "userY",
70618
- "userZ"
70619
- ];
70620
- ALL_CONSTRAINT_TYPES = [
70621
- ...POSITIONAL_CONSTRAINT_TYPES,
70622
- ...DIMENSIONAL_CONSTRAINT_TYPES,
70623
- ...MARGIN_CONSTRAINT_TYPES,
70624
- ...FONT_CONSTRAINT_TYPES,
70625
- ...SPACING_CONSTRAINT_TYPES,
70626
- ...GEOMETRY_CONSTRAINT_TYPES,
70627
- "pyraAcctRatio",
70628
- "alignOff",
70629
- ...USER_DEFINED_CONSTRAINT_TYPES,
70630
- "none"
70631
- ];
70632
- ALL_ELEMENT_TYPES = [
70633
- "all",
70634
- "doc",
70635
- "node",
70636
- "norm",
70637
- "nonNorm",
70638
- "asst",
70639
- "nonAsst",
70640
- "parTrans",
70641
- "pres",
70642
- "sibTrans"
70643
- ];
70644
- ALL_FUNCTION_TYPES = [
70645
- "cnt",
70646
- "pos",
70647
- "revPos",
70648
- "posEven",
70649
- "posOdd",
70650
- "var",
70651
- "depth",
70652
- "maxDepth"
70653
- ];
70654
- ALL_FUNCTION_OPERATORS = [
70655
- "equ",
70656
- "neq",
70657
- "gt",
70658
- "lt",
70659
- "gte",
70660
- "lte"
70661
- ];
70662
- ALL_FUNCTION_ARGUMENTS = [
70663
- "none",
70664
- "orgChart",
70665
- "chMax",
70666
- "chPref",
70667
- "bulEnabled",
70668
- "dir",
70669
- "hierBranch",
70670
- "animOne",
70671
- "animLvl",
70672
- "resizeHandles"
70673
- ];
70674
- }
70675
- });
70676
-
70677
- // ../../contracts/src/smartart/ooxml-layout-types.ts
70678
- var init_ooxml_layout_types = __esm({
70679
- "../../contracts/src/smartart/ooxml-layout-types.ts"() {
70680
- "use strict";
70681
- init_cjs_shims();
70682
- }
70683
- });
70684
-
70685
- // ../../contracts/src/smartart/ooxml-style-types.ts
70686
- var init_ooxml_style_types = __esm({
70687
- "../../contracts/src/smartart/ooxml-style-types.ts"() {
70688
- "use strict";
70689
- init_cjs_shims();
70690
- }
70691
- });
70692
-
70693
- // ../../contracts/src/smartart/styles.ts
70694
- var init_styles3 = __esm({
70695
- "../../contracts/src/smartart/styles.ts"() {
70696
- "use strict";
70697
- init_cjs_shims();
70698
- }
70699
- });
70700
-
70701
- // ../../contracts/src/smartart/types.ts
70702
- var init_types4 = __esm({
70703
- "../../contracts/src/smartart/types.ts"() {
70704
- "use strict";
70705
- init_cjs_shims();
70706
- }
70707
- });
70708
-
70709
- // ../../contracts/src/smartart/index.ts
70710
- var init_smartart = __esm({
70711
- "../../contracts/src/smartart/index.ts"() {
70712
- "use strict";
70713
- init_cjs_shims();
70714
- init_layouts2();
70715
- init_ooxml_algorithm_types();
70716
- init_ooxml_data_model_types();
70717
- init_ooxml_drawing_types();
70718
- init_ooxml_engine_types();
70719
- init_ooxml_layout_types();
70720
- init_ooxml_style_types();
70721
- init_styles3();
70722
- init_types4();
70723
- }
70724
- });
70725
-
70726
70101
  // ../../canvas/drawing/smartart/src/engine/algorithms/composite.ts
70102
+ var import_smartart2;
70727
70103
  var init_composite = __esm({
70728
70104
  "../../canvas/drawing/smartart/src/engine/algorithms/composite.ts"() {
70729
70105
  "use strict";
70730
70106
  init_cjs_shims();
70731
- init_smartart();
70107
+ import_smartart2 = require("@mog-sdk/spreadsheet-contracts/smartart");
70732
70108
  }
70733
70109
  });
70734
70110
 
70735
70111
  // ../../canvas/drawing/smartart/src/engine/algorithms/linear.ts
70112
+ var import_smartart3;
70736
70113
  var init_linear2 = __esm({
70737
70114
  "../../canvas/drawing/smartart/src/engine/algorithms/linear.ts"() {
70738
70115
  "use strict";
70739
70116
  init_cjs_shims();
70740
- init_smartart();
70117
+ import_smartart3 = require("@mog-sdk/spreadsheet-contracts/smartart");
70741
70118
  }
70742
70119
  });
70743
70120
 
@@ -70750,82 +70127,90 @@ var init_param_utils = __esm({
70750
70127
  });
70751
70128
 
70752
70129
  // ../../canvas/drawing/smartart/src/engine/algorithms/snake.ts
70130
+ var import_smartart4;
70753
70131
  var init_snake = __esm({
70754
70132
  "../../canvas/drawing/smartart/src/engine/algorithms/snake.ts"() {
70755
70133
  "use strict";
70756
70134
  init_cjs_shims();
70757
- init_smartart();
70135
+ import_smartart4 = require("@mog-sdk/spreadsheet-contracts/smartart");
70758
70136
  init_param_utils();
70759
70137
  }
70760
70138
  });
70761
70139
 
70762
70140
  // ../../canvas/drawing/smartart/src/engine/algorithms/cycle.ts
70141
+ var import_smartart5;
70763
70142
  var init_cycle2 = __esm({
70764
70143
  "../../canvas/drawing/smartart/src/engine/algorithms/cycle.ts"() {
70765
70144
  "use strict";
70766
70145
  init_cjs_shims();
70767
- init_smartart();
70146
+ import_smartart5 = require("@mog-sdk/spreadsheet-contracts/smartart");
70768
70147
  init_param_utils();
70769
70148
  }
70770
70149
  });
70771
70150
 
70772
70151
  // ../../canvas/drawing/smartart/src/engine/algorithms/hier-root.ts
70152
+ var import_smartart6;
70773
70153
  var init_hier_root = __esm({
70774
70154
  "../../canvas/drawing/smartart/src/engine/algorithms/hier-root.ts"() {
70775
70155
  "use strict";
70776
70156
  init_cjs_shims();
70777
- init_smartart();
70157
+ import_smartart6 = require("@mog-sdk/spreadsheet-contracts/smartart");
70778
70158
  init_param_utils();
70779
70159
  }
70780
70160
  });
70781
70161
 
70782
70162
  // ../../canvas/drawing/smartart/src/engine/algorithms/hier-child.ts
70163
+ var import_smartart7;
70783
70164
  var init_hier_child = __esm({
70784
70165
  "../../canvas/drawing/smartart/src/engine/algorithms/hier-child.ts"() {
70785
70166
  "use strict";
70786
70167
  init_cjs_shims();
70787
- init_smartart();
70168
+ import_smartart7 = require("@mog-sdk/spreadsheet-contracts/smartart");
70788
70169
  init_param_utils();
70789
70170
  }
70790
70171
  });
70791
70172
 
70792
70173
  // ../../canvas/drawing/smartart/src/engine/algorithms/pyramid.ts
70174
+ var import_smartart8;
70793
70175
  var init_pyramid2 = __esm({
70794
70176
  "../../canvas/drawing/smartart/src/engine/algorithms/pyramid.ts"() {
70795
70177
  "use strict";
70796
70178
  init_cjs_shims();
70797
- init_smartart();
70179
+ import_smartart8 = require("@mog-sdk/spreadsheet-contracts/smartart");
70798
70180
  init_param_utils();
70799
70181
  }
70800
70182
  });
70801
70183
 
70802
70184
  // ../../canvas/drawing/smartart/src/engine/algorithms/connector.ts
70185
+ var import_smartart9;
70803
70186
  var init_connector = __esm({
70804
70187
  "../../canvas/drawing/smartart/src/engine/algorithms/connector.ts"() {
70805
70188
  "use strict";
70806
70189
  init_cjs_shims();
70807
- init_smartart();
70190
+ import_smartart9 = require("@mog-sdk/spreadsheet-contracts/smartart");
70808
70191
  init_connector_routing();
70809
70192
  init_param_utils();
70810
70193
  }
70811
70194
  });
70812
70195
 
70813
70196
  // ../../canvas/drawing/smartart/src/engine/algorithms/text.ts
70197
+ var import_smartart10;
70814
70198
  var init_text3 = __esm({
70815
70199
  "../../canvas/drawing/smartart/src/engine/algorithms/text.ts"() {
70816
70200
  "use strict";
70817
70201
  init_cjs_shims();
70818
- init_smartart();
70202
+ import_smartart10 = require("@mog-sdk/spreadsheet-contracts/smartart");
70819
70203
  init_param_utils();
70820
70204
  }
70821
70205
  });
70822
70206
 
70823
70207
  // ../../canvas/drawing/smartart/src/engine/algorithms/space.ts
70208
+ var import_smartart11;
70824
70209
  var init_space = __esm({
70825
70210
  "../../canvas/drawing/smartart/src/engine/algorithms/space.ts"() {
70826
70211
  "use strict";
70827
70212
  init_cjs_shims();
70828
- init_smartart();
70213
+ import_smartart11 = require("@mog-sdk/spreadsheet-contracts/smartart");
70829
70214
  }
70830
70215
  });
70831
70216
 
@@ -70984,19 +70369,19 @@ var init_drawing_parser = __esm({
70984
70369
  });
70985
70370
 
70986
70371
  // ../../canvas/drawing/smartart/src/parser/layout-def-parser.ts
70987
- var VALID_ELEMENT_TYPES, VALID_FUNCTION_TYPES, VALID_FUNCTION_OPERATORS, VALID_FUNCTION_ARGUMENTS;
70372
+ var import_smartart12, VALID_ELEMENT_TYPES, VALID_FUNCTION_TYPES, VALID_FUNCTION_OPERATORS, VALID_FUNCTION_ARGUMENTS;
70988
70373
  var init_layout_def_parser = __esm({
70989
70374
  "../../canvas/drawing/smartart/src/parser/layout-def-parser.ts"() {
70990
70375
  "use strict";
70991
70376
  init_cjs_shims();
70992
- init_smartart();
70377
+ import_smartart12 = require("@mog-sdk/spreadsheet-contracts/smartart");
70993
70378
  init_data_model_parser();
70994
70379
  init_drawingml_helpers();
70995
70380
  init_xml_helpers();
70996
- VALID_ELEMENT_TYPES = new Set(ALL_ELEMENT_TYPES);
70997
- VALID_FUNCTION_TYPES = new Set(ALL_FUNCTION_TYPES);
70998
- VALID_FUNCTION_OPERATORS = new Set(ALL_FUNCTION_OPERATORS);
70999
- VALID_FUNCTION_ARGUMENTS = new Set(ALL_FUNCTION_ARGUMENTS);
70381
+ VALID_ELEMENT_TYPES = new Set(import_smartart12.ALL_ELEMENT_TYPES);
70382
+ VALID_FUNCTION_TYPES = new Set(import_smartart12.ALL_FUNCTION_TYPES);
70383
+ VALID_FUNCTION_OPERATORS = new Set(import_smartart12.ALL_FUNCTION_OPERATORS);
70384
+ VALID_FUNCTION_ARGUMENTS = new Set(import_smartart12.ALL_FUNCTION_ARGUMENTS);
71000
70385
  }
71001
70386
  });
71002
70387
 
@@ -74891,7 +74276,7 @@ var init_cell_anchor_resolver = __esm({
74891
74276
  });
74892
74277
 
74893
74278
  // ../../kernel/src/floating-objects/types.ts
74894
- var init_types5 = __esm({
74279
+ var init_types4 = __esm({
74895
74280
  "../../kernel/src/floating-objects/types.ts"() {
74896
74281
  "use strict";
74897
74282
  init_cjs_shims();
@@ -74990,7 +74375,7 @@ var init_picture_manager = __esm({
74990
74375
  "use strict";
74991
74376
  init_cjs_shims();
74992
74377
  init_document();
74993
- init_types5();
74378
+ init_types4();
74994
74379
  }
74995
74380
  });
74996
74381
 
@@ -75092,7 +74477,7 @@ var init_textbox_manager = __esm({
75092
74477
  "../../kernel/src/floating-objects/managers/textbox-manager.ts"() {
75093
74478
  "use strict";
75094
74479
  init_cjs_shims();
75095
- init_types5();
74480
+ init_types4();
75096
74481
  DEFAULT_TEXTBOX_FILL = { type: "solid", color: "#ffffff" };
75097
74482
  DEFAULT_TEXTBOX_BORDER = { style: "solid", color: "#000000", width: 1 };
75098
74483
  }
@@ -76273,7 +75658,7 @@ var init_kernel_context = __esm({
76273
75658
  init_cjs_shims();
76274
75659
  init_chart_bridge();
76275
75660
  init_equation_bridge();
76276
- init_ink_recognition_bridge2();
75661
+ init_ink_recognition_bridge();
76277
75662
  init_locale_bridge();
76278
75663
  init_pivot_bridge();
76279
75664
  init_schema_bridge();
@@ -77295,20 +76680,7 @@ var WorkbookHistoryImpl = class {
77295
76680
 
77296
76681
  // ../../kernel/src/api/workbook/names.ts
77297
76682
  init_cjs_shims();
77298
-
77299
- // ../../contracts/src/api/index.ts
77300
- init_cjs_shims();
77301
-
77302
- // ../../contracts/src/api/types.ts
77303
- init_cjs_shims();
77304
-
77305
- // ../../contracts/src/api/worksheet/index.ts
77306
- init_cjs_shims();
77307
-
77308
- // ../../contracts/src/api/worksheet/format-mappings.ts
77309
- init_cjs_shims();
77310
-
77311
- // ../../kernel/src/api/workbook/names.ts
76683
+ var import_api = require("@mog-sdk/spreadsheet-contracts/api");
77312
76684
  init_errors();
77313
76685
 
77314
76686
  // ../../kernel/src/domain/formulas/named-ranges.ts
@@ -77931,13 +77303,13 @@ var WorkbookNamesImpl = class {
77931
77303
  if (!values) return null;
77932
77304
  return values.map(
77933
77305
  (row) => row.map((cell) => {
77934
- if (cell === null || cell === void 0) return "Empty" /* Empty */;
77935
- if (typeof cell === "boolean") return "Boolean" /* Boolean */;
77936
- if (typeof cell === "number") return "Double" /* Double */;
77937
- if (typeof cell === "string") return "String" /* String */;
77306
+ if (cell === null || cell === void 0) return import_api.RangeValueType.Empty;
77307
+ if (typeof cell === "boolean") return import_api.RangeValueType.Boolean;
77308
+ if (typeof cell === "number") return import_api.RangeValueType.Double;
77309
+ if (typeof cell === "string") return import_api.RangeValueType.String;
77938
77310
  if (typeof cell === "object" && cell !== null && "type" in cell)
77939
- return "Error" /* Error */;
77940
- return "String" /* String */;
77311
+ return import_api.RangeValueType.Error;
77312
+ return import_api.RangeValueType.String;
77941
77313
  })
77942
77314
  );
77943
77315
  }
@@ -78029,7 +77401,7 @@ var BUILT_IN_LISTS = [
78029
77401
  ];
78030
77402
 
78031
77403
  // ../../kernel/src/domain/workbook/workbook.ts
78032
- init_protection();
77404
+ var import_protection2 = require("@mog-sdk/spreadsheet-contracts/protection");
78033
77405
 
78034
77406
  // ../../spreadsheet-utils/src/protection.ts
78035
77407
  init_cjs_shims();
@@ -78069,7 +77441,7 @@ async function setSelectedSheetIds(ctx, sheetIds, _origin = "user") {
78069
77441
  }
78070
77442
  async function protect(ctx, password, options, _origin = "user") {
78071
77443
  const fullOptions = {
78072
- ...DEFAULT_WORKBOOK_PROTECTION_OPTIONS,
77444
+ ...import_protection2.DEFAULT_WORKBOOK_PROTECTION_OPTIONS,
78073
77445
  ...options
78074
77446
  };
78075
77447
  const current = await getSettings(ctx);
@@ -78485,7 +77857,7 @@ init_sheet_meta();
78485
77857
 
78486
77858
  // ../../kernel/src/api/worksheet/worksheet-impl.ts
78487
77859
  init_cjs_shims();
78488
- init_core3();
77860
+ var import_core6 = require("@mog-sdk/spreadsheet-contracts/core");
78489
77861
  init_errors3();
78490
77862
  init_errors();
78491
77863
 
@@ -79398,9 +78770,13 @@ async function setCells(ctx, sheetId, cells) {
79398
78770
  const result = { cellsWritten: uniqueEdits.length, errors: null };
79399
78771
  if (duplicatesRemoved > 0) {
79400
78772
  result.warnings = [
79401
- createWarning("API_DUPLICATE_COORDINATES", `${duplicatesRemoved} duplicate coordinate(s) resolved by last-write-wins`, {
79402
- duplicatesRemoved
79403
- })
78773
+ createWarning(
78774
+ "API_DUPLICATE_COORDINATES",
78775
+ `${duplicatesRemoved} duplicate coordinate(s) resolved by last-write-wins`,
78776
+ {
78777
+ duplicatesRemoved
78778
+ }
78779
+ )
79404
78780
  ];
79405
78781
  }
79406
78782
  return result;
@@ -80068,6 +79444,7 @@ async function clearRange2(ctx, sheetId, range2) {
80068
79444
 
80069
79445
  // ../../kernel/src/api/worksheet/operations/range-query-operations.ts
80070
79446
  init_cjs_shims();
79447
+ var import_api3 = require("@mog-sdk/spreadsheet-contracts/api");
80071
79448
  init_a1();
80072
79449
  init_value_conversions();
80073
79450
  async function clearWithMode(ctx, sheetId, range2, applyTo = "all") {
@@ -80169,7 +79546,7 @@ async function getValueTypes(ctx, sheetId, range2) {
80169
79546
  for (let col = n.startCol; col <= n.endCol; col++) {
80170
79547
  const cell = cellMap.get(`${row},${col}`);
80171
79548
  if (!cell) {
80172
- rowData.push("Empty" /* Empty */);
79549
+ rowData.push(import_api3.RangeValueType.Empty);
80173
79550
  } else {
80174
79551
  rowData.push(classifyValueType(viewportCellValueToCellValue(cell.value)));
80175
79552
  }
@@ -80179,12 +79556,12 @@ async function getValueTypes(ctx, sheetId, range2) {
80179
79556
  return result;
80180
79557
  }
80181
79558
  function classifyValueType(value) {
80182
- if (value === null || value === void 0) return "Empty" /* Empty */;
80183
- if (typeof value === "string") return value === "" ? "Empty" /* Empty */ : "String" /* String */;
80184
- if (typeof value === "number") return "Double" /* Double */;
80185
- if (typeof value === "boolean") return "Boolean" /* Boolean */;
80186
- if (typeof value === "object" && value !== null && "type" in value) return "Error" /* Error */;
80187
- return "String" /* String */;
79559
+ if (value === null || value === void 0) return import_api3.RangeValueType.Empty;
79560
+ if (typeof value === "string") return value === "" ? import_api3.RangeValueType.Empty : import_api3.RangeValueType.String;
79561
+ if (typeof value === "number") return import_api3.RangeValueType.Double;
79562
+ if (typeof value === "boolean") return import_api3.RangeValueType.Boolean;
79563
+ if (typeof value === "object" && value !== null && "type" in value) return import_api3.RangeValueType.Error;
79564
+ return import_api3.RangeValueType.String;
80188
79565
  }
80189
79566
  async function findInRange(ctx, sheetId, range2, text, options) {
80190
79567
  const n = normalizeRange(range2);
@@ -80281,46 +79658,46 @@ async function getNumberFormatCategories(ctx, sheetId, range2) {
80281
79658
  }
80282
79659
  function detectFormatType(formatCode) {
80283
79660
  if (!formatCode || formatCode === "" || formatCode === "General") {
80284
- return "General" /* General */;
79661
+ return import_api3.NumberFormatCategory.General;
80285
79662
  }
80286
79663
  if (formatCode === "@") {
80287
- return "Text" /* Text */;
79664
+ return import_api3.NumberFormatCategory.Text;
80288
79665
  }
80289
79666
  const stripped = formatCode.replace(/\[[^\]]*\]/g, "").replace(/"[^"]*"/g, "");
80290
79667
  if (/[yYmMdD]/.test(stripped) && /[yYdD]/.test(stripped)) {
80291
- return "Date" /* Date */;
79668
+ return import_api3.NumberFormatCategory.Date;
80292
79669
  }
80293
79670
  if (/[hHsS]/.test(stripped)) {
80294
79671
  if (/[yYdD]/.test(stripped)) {
80295
- return "Date" /* Date */;
79672
+ return import_api3.NumberFormatCategory.Date;
80296
79673
  }
80297
- return "Time" /* Time */;
79674
+ return import_api3.NumberFormatCategory.Time;
80298
79675
  }
80299
79676
  if (/AM\/PM/i.test(stripped)) {
80300
- return "Time" /* Time */;
79677
+ return import_api3.NumberFormatCategory.Time;
80301
79678
  }
80302
79679
  if (stripped.includes("%")) {
80303
- return "Percentage" /* Percentage */;
79680
+ return import_api3.NumberFormatCategory.Percentage;
80304
79681
  }
80305
79682
  if (/[eE][+-]/.test(stripped)) {
80306
- return "Scientific" /* Scientific */;
79683
+ return import_api3.NumberFormatCategory.Scientific;
80307
79684
  }
80308
79685
  if (stripped.includes("/") && !/[yYmMdDhHsS]/.test(stripped)) {
80309
- return "Fraction" /* Fraction */;
79686
+ return import_api3.NumberFormatCategory.Fraction;
80310
79687
  }
80311
79688
  if (/[_*]/.test(stripped) && /[$(]/.test(stripped)) {
80312
- return "Accounting" /* Accounting */;
79689
+ return import_api3.NumberFormatCategory.Accounting;
80313
79690
  }
80314
79691
  if (/[$€£¥₹]/.test(formatCode)) {
80315
- return "Currency" /* Currency */;
79692
+ return import_api3.NumberFormatCategory.Currency;
80316
79693
  }
80317
79694
  if (/^0{5}/.test(stripped) || /^0{3}-0{2}-0{4}/.test(stripped)) {
80318
- return "Special" /* Special */;
79695
+ return import_api3.NumberFormatCategory.Special;
80319
79696
  }
80320
79697
  if (/[#0]/.test(stripped)) {
80321
- return "Number" /* Number */;
79698
+ return import_api3.NumberFormatCategory.Number;
80322
79699
  }
80323
- return "Custom" /* Custom */;
79700
+ return import_api3.NumberFormatCategory.Custom;
80324
79701
  }
80325
79702
 
80326
79703
  // ../../kernel/src/api/worksheet/operations/sort-operations.ts
@@ -82422,7 +81799,11 @@ var WorksheetFormatsImpl = class {
82422
81799
  col = b;
82423
81800
  format = c;
82424
81801
  }
82425
- const result = await this.ctx.computeBridge.setFormatForRanges(this.sheetId, [[row, col, row, col]], format);
81802
+ const result = await this.ctx.computeBridge.setFormatForRanges(
81803
+ this.sheetId,
81804
+ [[row, col, row, col]],
81805
+ format
81806
+ );
82426
81807
  return { cellCount: result.propertyChanges?.length ?? 0 };
82427
81808
  }
82428
81809
  async setRange(a, b) {
@@ -82471,7 +81852,11 @@ var WorksheetFormatsImpl = class {
82471
81852
  }
82472
81853
  async get(a, b) {
82473
81854
  const { row, col } = resolveCell(a, b);
82474
- return this.ctx.computeBridge.getResolvedFormat(this.sheetId, row, col);
81855
+ return this.ctx.computeBridge.getResolvedFormat(
81856
+ this.sheetId,
81857
+ row,
81858
+ col
81859
+ );
82475
81860
  }
82476
81861
  async adjustIndent(a, b, c) {
82477
81862
  let row, col, amount;
@@ -83870,7 +83255,7 @@ init_errors();
83870
83255
 
83871
83256
  // ../../kernel/src/api/worksheet/operations/sheet-management-operations.ts
83872
83257
  init_cjs_shims();
83873
- init_protection();
83258
+ var import_protection4 = require("@mog-sdk/spreadsheet-contracts/protection");
83874
83259
  function parseCellRef2(ref) {
83875
83260
  const match = ref.match(/^([A-Z]+)(\d+)$/i);
83876
83261
  if (!match) return null;
@@ -88394,9 +87779,7 @@ var WorksheetImpl = class {
88394
87779
  }
88395
87780
  const firstRowCells = (rowMap.get(finalRange.startRow) ?? []).slice().sort((a, b) => a.col - b.col);
88396
87781
  if (firstRowCells.length > 0) {
88397
- const allStrings = firstRowCells.every(
88398
- (vc) => typeof vc.value === "string" && !vc.formula
88399
- );
87782
+ const allStrings = firstRowCells.every((vc) => typeof vc.value === "string" && !vc.formula);
88400
87783
  if (allStrings) {
88401
87784
  const headers = firstRowCells.map((vc) => String(vc.value));
88402
87785
  lines.push(`Headers: ${headers.join(", ")}`);
@@ -88857,7 +88240,7 @@ var WorksheetImpl = class {
88857
88240
  case 1:
88858
88241
  return accessor.numberValue;
88859
88242
  case 2:
88860
- return displayStringOrNull(accessor.displayText);
88243
+ return (0, import_core6.displayStringOrNull)(accessor.displayText);
88861
88244
  case 3:
88862
88245
  return accessor.numberValue !== 0;
88863
88246
  case 4: {
@@ -89481,7 +88864,7 @@ var WorkbookThemeImpl = class {
89481
88864
 
89482
88865
  // ../../kernel/src/api/workbook/workbook-impl.ts
89483
88866
  init_cjs_shims();
89484
- init_disposable2();
88867
+ init_disposable();
89485
88868
  init_errors();
89486
88869
 
89487
88870
  // ../../kernel/src/domain/form-controls/index.ts
@@ -90068,27 +89451,8 @@ var globalRegistry = new FunctionRegistry();
90068
89451
 
90069
89452
  // ../../spreadsheet-utils/src/function-catalog.ts
90070
89453
  init_cjs_shims();
90071
-
90072
- // ../../contracts/src/utils/function-registry.ts
90073
- init_cjs_shims();
90074
- var FunctionCategory = /* @__PURE__ */ ((FunctionCategory2) => {
90075
- FunctionCategory2["MATH"] = "Math";
90076
- FunctionCategory2["STATISTICAL"] = "Statistical";
90077
- FunctionCategory2["TEXT"] = "Text";
90078
- FunctionCategory2["LOGICAL"] = "Logical";
90079
- FunctionCategory2["DATE_TIME"] = "Date & Time";
90080
- FunctionCategory2["LOOKUP"] = "Lookup & Reference";
90081
- FunctionCategory2["FINANCIAL"] = "Financial";
90082
- FunctionCategory2["INFORMATION"] = "Information";
90083
- FunctionCategory2["DATABASE"] = "Database";
90084
- FunctionCategory2["ENGINEERING"] = "Engineering";
90085
- FunctionCategory2["WEB"] = "Web";
90086
- FunctionCategory2["TESTING"] = "Testing";
90087
- return FunctionCategory2;
90088
- })(FunctionCategory || {});
90089
-
90090
- // ../../spreadsheet-utils/src/function-catalog.ts
90091
- var C = FunctionCategory;
89454
+ var import_function_registry = require("@mog-sdk/spreadsheet-contracts/utils/function-registry");
89455
+ var C = import_function_registry.FunctionCategory;
90092
89456
  var INLINE_FUNCTIONS = [
90093
89457
  // Aggregates
90094
89458
  ["SUM", C.MATH, "Adds all numbers in a range of cells", 1, -1],
@@ -90954,7 +90318,7 @@ function convertToFunctionInfo(metadata) {
90954
90318
 
90955
90319
  // ../../kernel/src/api/workbook/viewport.ts
90956
90320
  init_cjs_shims();
90957
- init_disposable2();
90321
+ init_disposable();
90958
90322
  var regionCounter = 0;
90959
90323
  var ViewportRegionImpl = class extends DisposableBase {
90960
90324
  constructor(sheetId, bounds, computeBridge, viewportId) {
@@ -91008,7 +90372,7 @@ var WorkbookViewportImpl = class {
91008
90372
  };
91009
90373
 
91010
90374
  // ../../kernel/src/api/workbook/workbook-impl.ts
91011
- init_rendering();
90375
+ var import_rendering2 = require("@mog-sdk/spreadsheet-contracts/rendering");
91012
90376
  var API_EVENT_TO_INTERNAL = {
91013
90377
  cellChanged: "cell:changed",
91014
90378
  rangeChanged: "range:changed",
@@ -91349,7 +90713,10 @@ var WorkbookImpl = class {
91349
90713
  }
91350
90714
  async setIterativeCalculation(enabled) {
91351
90715
  const settings = await this.ctx.computeBridge.getWorkbookSettings();
91352
- const calcSettings = { ...settings.calculationSettings ?? {}, enableIterativeCalculation: enabled };
90716
+ const calcSettings = {
90717
+ ...settings.calculationSettings ?? {},
90718
+ enableIterativeCalculation: enabled
90719
+ };
91353
90720
  await this.ctx.computeBridge.patchWorkbookSettings({
91354
90721
  calculationSettings: calcSettings
91355
90722
  });
@@ -91689,7 +91056,7 @@ var WorkbookImpl = class {
91689
91056
  get theme() {
91690
91057
  return this._theme ??= new WorkbookThemeImpl(
91691
91058
  { ctx: this.ctx, eventBus: this.eventBus },
91692
- DEFAULT_CHROME_THEME
91059
+ import_rendering2.DEFAULT_CHROME_THEME
91693
91060
  );
91694
91061
  }
91695
91062
  get viewport() {
@@ -93873,7 +93240,7 @@ var api_spec_default = {
93873
93240
  usedTypes: []
93874
93241
  },
93875
93242
  setCriteria: {
93876
- signature: "setCriteria(\n filterId: string,\n col: number,\n criteria: ColumnFilterCriteria,\n ): Promise<void>;",
93243
+ signature: "setCriteria(filterId: string, col: number, criteria: ColumnFilterCriteria): Promise<void>;",
93877
93244
  docstring: "Set filter criteria for a column using filter ID.\n\n@param filterId - Filter ID\n@param col - Column index (0-based)\n@param criteria - Filter criteria to apply",
93878
93245
  usedTypes: [
93879
93246
  "ColumnFilterCriteria"