@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.js CHANGED
@@ -272,36 +272,6 @@ var init_errors = __esm({
272
272
  }
273
273
  });
274
274
 
275
- // ../../contracts/src/document/protection.ts
276
- var DEFAULT_PROTECTION_OPTIONS, DEFAULT_WORKBOOK_PROTECTION_OPTIONS;
277
- var init_protection = __esm({
278
- "../../contracts/src/document/protection.ts"() {
279
- "use strict";
280
- init_esm_shims();
281
- DEFAULT_PROTECTION_OPTIONS = {
282
- // Selection defaults to true (users can always select cells)
283
- selectLockedCells: true,
284
- selectUnlockedCells: true,
285
- // All other operations blocked by default
286
- insertRows: false,
287
- insertColumns: false,
288
- deleteRows: false,
289
- deleteColumns: false,
290
- formatCells: false,
291
- formatColumns: false,
292
- formatRows: false,
293
- sort: false,
294
- useAutoFilter: false,
295
- usePivotTableReports: false,
296
- editObjects: false,
297
- editScenarios: false
298
- };
299
- DEFAULT_WORKBOOK_PROTECTION_OPTIONS = {
300
- structure: true
301
- };
302
- }
303
- });
304
-
305
275
  // ../../infra/transport/src/command-metadata.gen.ts
306
276
  var BYTES_TUPLE_COMMANDS, RECALC_COMMANDS;
307
277
  var init_command_metadata_gen = __esm({
@@ -2210,101 +2180,6 @@ var init_mutation_result_handler = __esm({
2210
2180
  }
2211
2181
  });
2212
2182
 
2213
- // ../../contracts/src/core/commands.ts
2214
- var init_commands = __esm({
2215
- "../../contracts/src/core/commands.ts"() {
2216
- "use strict";
2217
- init_esm_shims();
2218
- }
2219
- });
2220
-
2221
- // ../../contracts/src/core/core.ts
2222
- var init_core2 = __esm({
2223
- "../../contracts/src/core/core.ts"() {
2224
- "use strict";
2225
- init_esm_shims();
2226
- }
2227
- });
2228
-
2229
- // ../../contracts/src/core/disposable.ts
2230
- var init_disposable = __esm({
2231
- "../../contracts/src/core/disposable.ts"() {
2232
- "use strict";
2233
- init_esm_shims();
2234
- }
2235
- });
2236
-
2237
- // ../../contracts/src/core/event-base.ts
2238
- var init_event_base = __esm({
2239
- "../../contracts/src/core/event-base.ts"() {
2240
- "use strict";
2241
- init_esm_shims();
2242
- }
2243
- });
2244
-
2245
- // ../../contracts/src/core/execution.ts
2246
- var init_execution = __esm({
2247
- "../../contracts/src/core/execution.ts"() {
2248
- "use strict";
2249
- init_esm_shims();
2250
- }
2251
- });
2252
-
2253
- // ../../contracts/src/core/result.ts
2254
- var init_result = __esm({
2255
- "../../contracts/src/core/result.ts"() {
2256
- "use strict";
2257
- init_esm_shims();
2258
- }
2259
- });
2260
-
2261
- // ../../contracts/src/core/schema.ts
2262
- var init_schema = __esm({
2263
- "../../contracts/src/core/schema.ts"() {
2264
- "use strict";
2265
- init_esm_shims();
2266
- }
2267
- });
2268
-
2269
- // ../../contracts/src/core/formatted-text.ts
2270
- function asFormattedText(s) {
2271
- return s;
2272
- }
2273
- function displayStringOrNull(text) {
2274
- return text;
2275
- }
2276
- var init_formatted_text = __esm({
2277
- "../../contracts/src/core/formatted-text.ts"() {
2278
- "use strict";
2279
- init_esm_shims();
2280
- }
2281
- });
2282
-
2283
- // ../../contracts/src/core/testing.ts
2284
- var init_testing = __esm({
2285
- "../../contracts/src/core/testing.ts"() {
2286
- "use strict";
2287
- init_esm_shims();
2288
- }
2289
- });
2290
-
2291
- // ../../contracts/src/core/index.ts
2292
- var init_core3 = __esm({
2293
- "../../contracts/src/core/index.ts"() {
2294
- "use strict";
2295
- init_esm_shims();
2296
- init_commands();
2297
- init_core2();
2298
- init_disposable();
2299
- init_event_base();
2300
- init_execution();
2301
- init_result();
2302
- init_schema();
2303
- init_formatted_text();
2304
- init_testing();
2305
- }
2306
- });
2307
-
2308
2183
  // ../../kernel/src/bridges/wire/constants.gen.ts
2309
2184
  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;
2310
2185
  var init_constants_gen = __esm({
@@ -2362,12 +2237,12 @@ var init_constants_gen = __esm({
2362
2237
  });
2363
2238
 
2364
2239
  // ../../kernel/src/bridges/wire/binary-mutation-reader.ts
2240
+ import { asFormattedText } from "@mog-sdk/spreadsheet-contracts/core";
2365
2241
  var sharedDecoder, BinaryMutationReader;
2366
2242
  var init_binary_mutation_reader = __esm({
2367
2243
  "../../kernel/src/bridges/wire/binary-mutation-reader.ts"() {
2368
2244
  "use strict";
2369
2245
  init_esm_shims();
2370
- init_core3();
2371
2246
  init_constants_gen();
2372
2247
  sharedDecoder = new TextDecoder("utf-8");
2373
2248
  BinaryMutationReader = class {
@@ -2661,6 +2536,7 @@ var init_binary_mutation_reader = __esm({
2661
2536
  });
2662
2537
 
2663
2538
  // ../../kernel/src/bridges/wire/binary-viewport-buffer.ts
2539
+ import { asFormattedText as asFormattedText2, displayStringOrNull } from "@mog-sdk/spreadsheet-contracts/core";
2664
2540
  function rgbaU32ToHex(value) {
2665
2541
  const r = value >>> 24 & 255;
2666
2542
  const g = value >>> 16 & 255;
@@ -2672,7 +2548,6 @@ var init_binary_viewport_buffer = __esm({
2672
2548
  "../../kernel/src/bridges/wire/binary-viewport-buffer.ts"() {
2673
2549
  "use strict";
2674
2550
  init_esm_shims();
2675
- init_core3();
2676
2551
  init_constants_gen();
2677
2552
  init_constants_gen();
2678
2553
  sharedEncoder = new TextEncoder();
@@ -3769,7 +3644,7 @@ var init_binary_viewport_buffer = __esm({
3769
3644
  */
3770
3645
  get displayText() {
3771
3646
  const decoded = this._buffer.getOrDecodeString(this._displayOff, this._displayLen);
3772
- return decoded !== null ? asFormattedText(decoded) : null;
3647
+ return decoded !== null ? asFormattedText2(decoded) : null;
3773
3648
  }
3774
3649
  /**
3775
3650
  * Get the error text for the current cell.
@@ -3828,6 +3703,7 @@ var init_binary_viewport_buffer = __esm({
3828
3703
  });
3829
3704
 
3830
3705
  // ../../kernel/src/bridges/wire/viewport-coordinator.ts
3706
+ import { displayStringOrNull as displayStringOrNull2 } from "@mog-sdk/spreadsheet-contracts/core";
3831
3707
  function cellKey(row, col) {
3832
3708
  return `${row},${col}`;
3833
3709
  }
@@ -3837,7 +3713,6 @@ var init_viewport_coordinator = __esm({
3837
3713
  "use strict";
3838
3714
  init_esm_shims();
3839
3715
  init_binary_viewport_buffer();
3840
- init_core3();
3841
3716
  ViewportCoordinator = class {
3842
3717
  constructor(viewportId) {
3843
3718
  /** Monotonically increasing version, incremented on every write. */
@@ -3958,7 +3833,7 @@ var init_viewport_coordinator = __esm({
3958
3833
  flags: reader.patchFlags(i),
3959
3834
  numberValue: reader.patchNumberValue(i),
3960
3835
  formatIdx: reader.patchFormatIdx(i),
3961
- displayString: displayStringOrNull(reader.patchDisplayText(i)),
3836
+ displayString: displayStringOrNull2(reader.patchDisplayText(i)),
3962
3837
  errorString: reader.patchErrorText(i),
3963
3838
  bgColorOverride: reader.patchBgColorOverride(i),
3964
3839
  fontColorOverride: reader.patchFontColorOverride(i),
@@ -3975,7 +3850,7 @@ var init_viewport_coordinator = __esm({
3975
3850
  flags: reader.spillPatchFlags(i),
3976
3851
  numberValue: reader.spillPatchNumberValue(i),
3977
3852
  formatIdx: reader.spillPatchFormatIdx(i),
3978
- displayString: displayStringOrNull(reader.spillPatchDisplayText(i)),
3853
+ displayString: displayStringOrNull2(reader.spillPatchDisplayText(i)),
3979
3854
  errorString: reader.spillPatchErrorText(i),
3980
3855
  bgColorOverride: reader.spillPatchBgColorOverride(i),
3981
3856
  fontColorOverride: reader.spillPatchFontColorOverride(i),
@@ -6836,6 +6711,7 @@ __export(compute_bridge_exports, {
6836
6711
  wireTableToTableConfig: () => wireTableToTableConfig,
6837
6712
  wireToIdentityFormula: () => wireToIdentityFormula
6838
6713
  });
6714
+ import { DEFAULT_PROTECTION_OPTIONS } from "@mog-sdk/spreadsheet-contracts/protection";
6839
6715
  function emptyMutationResult() {
6840
6716
  return {
6841
6717
  recalc: {
@@ -6906,7 +6782,6 @@ var init_compute_bridge = __esm({
6906
6782
  "use strict";
6907
6783
  init_esm_shims();
6908
6784
  init_formula_string();
6909
- init_protection();
6910
6785
  init_src();
6911
6786
  init_compute_wire_converters();
6912
6787
  init_compute_core();
@@ -7332,65 +7207,8 @@ var init_compute_bridge = __esm({
7332
7207
  }
7333
7208
  });
7334
7209
 
7335
- // ../../contracts/src/rendering/grid-renderer.ts
7336
- var init_grid_renderer = __esm({
7337
- "../../contracts/src/rendering/grid-renderer.ts"() {
7338
- "use strict";
7339
- init_esm_shims();
7340
- }
7341
- });
7342
-
7343
- // ../../contracts/src/rendering/constants.ts
7344
- var DEFAULT_COL_WIDTH_WINDOWS, DEFAULT_COL_WIDTH_MACOS, _isMac, DEFAULT_COL_WIDTH;
7345
- var init_constants = __esm({
7346
- "../../contracts/src/rendering/constants.ts"() {
7347
- "use strict";
7348
- init_esm_shims();
7349
- DEFAULT_COL_WIDTH_WINDOWS = 64;
7350
- DEFAULT_COL_WIDTH_MACOS = 72;
7351
- _isMac = typeof navigator !== "undefined" && /Mac/.test(navigator.platform ?? "");
7352
- DEFAULT_COL_WIDTH = _isMac ? DEFAULT_COL_WIDTH_MACOS : DEFAULT_COL_WIDTH_WINDOWS;
7353
- }
7354
- });
7355
-
7356
- // ../../contracts/src/rendering/data-sources.ts
7357
- var DEFAULT_CHROME_THEME;
7358
- var init_data_sources = __esm({
7359
- "../../contracts/src/rendering/data-sources.ts"() {
7360
- "use strict";
7361
- init_esm_shims();
7362
- DEFAULT_CHROME_THEME = {
7363
- canvasBackground: "#ffffff",
7364
- gridlineColor: "#e0e0e0",
7365
- headerBackground: "#f8f9fa",
7366
- headerText: "#333333",
7367
- headerBorder: "#dadce0",
7368
- headerHighlightBackground: "#e8eaed",
7369
- headerHighlightText: "#1a73e8",
7370
- selectionFill: "rgba(66, 133, 244, 0.1)",
7371
- selectionBorder: "#4285f4",
7372
- activeCellBorder: "#1a73e8",
7373
- fillHandleColor: "#4285f4",
7374
- dragSourceColor: "rgba(66, 133, 244, 0.15)",
7375
- dragTargetColor: "#4285f4",
7376
- scrollbarTrack: "#f1f1f1",
7377
- scrollbarThumb: "#c1c1c1"
7378
- };
7379
- }
7380
- });
7381
-
7382
- // ../../contracts/src/rendering/index.ts
7383
- var init_rendering = __esm({
7384
- "../../contracts/src/rendering/index.ts"() {
7385
- "use strict";
7386
- init_esm_shims();
7387
- init_grid_renderer();
7388
- init_constants();
7389
- init_data_sources();
7390
- }
7391
- });
7392
-
7393
7210
  // ../../kernel/src/domain/sheets/sheet-meta-defaults.ts
7211
+ import { DEFAULT_COL_WIDTH as _PLATFORM_COL_WIDTH } from "@mog-sdk/spreadsheet-contracts/rendering";
7394
7212
  function getSheetMetaDefault(field) {
7395
7213
  const def = SHEET_META_SCHEMA[field];
7396
7214
  return def.default;
@@ -7400,9 +7218,8 @@ var init_sheet_meta_defaults = __esm({
7400
7218
  "../../kernel/src/domain/sheets/sheet-meta-defaults.ts"() {
7401
7219
  "use strict";
7402
7220
  init_esm_shims();
7403
- init_rendering();
7404
7221
  SHEET_META_DEFAULT_ROW_HEIGHT = 20;
7405
- SHEET_META_DEFAULT_COL_WIDTH = DEFAULT_COL_WIDTH;
7222
+ SHEET_META_DEFAULT_COL_WIDTH = _PLATFORM_COL_WIDTH;
7406
7223
  SHEET_META_DEFAULT_GRIDLINE_COLOR = "#e2e2e2";
7407
7224
  SHEET_META_SCHEMA = {
7408
7225
  // ===========================================================================
@@ -7931,6 +7748,7 @@ var init_sheet_meta = __esm({
7931
7748
  });
7932
7749
 
7933
7750
  // ../../spreadsheet-utils/src/range.ts
7751
+ import { MAX_COLS, MAX_ROWS } from "@mog-sdk/spreadsheet-contracts/core";
7934
7752
  function normalizeRange(range2) {
7935
7753
  return {
7936
7754
  startRow: Math.min(range2.startRow, range2.endRow),
@@ -7946,7 +7764,6 @@ var init_range = __esm({
7946
7764
  "../../spreadsheet-utils/src/range.ts"() {
7947
7765
  "use strict";
7948
7766
  init_esm_shims();
7949
- init_core3();
7950
7767
  }
7951
7768
  });
7952
7769
 
@@ -9403,7 +9220,7 @@ var init_data_extractor = __esm({
9403
9220
  });
9404
9221
 
9405
9222
  // ../../charts/src/core/index.ts
9406
- var init_core4 = __esm({
9223
+ var init_core2 = __esm({
9407
9224
  "../../charts/src/core/index.ts"() {
9408
9225
  "use strict";
9409
9226
  init_esm_shims();
@@ -13387,7 +13204,7 @@ var init_src2 = __esm({
13387
13204
  "../../charts/src/index.ts"() {
13388
13205
  "use strict";
13389
13206
  init_esm_shims();
13390
- init_core4();
13207
+ init_core2();
13391
13208
  init_primitives();
13392
13209
  init_compiler();
13393
13210
  }
@@ -16463,7 +16280,7 @@ function toDisposable(fn) {
16463
16280
  return disposable;
16464
16281
  }
16465
16282
  var DisposableBase, DisposableStore, DisposableNone;
16466
- var init_disposable2 = __esm({
16283
+ var init_disposable = __esm({
16467
16284
  "../../spreadsheet-utils/src/disposable.ts"() {
16468
16285
  "use strict";
16469
16286
  init_esm_shims();
@@ -16527,7 +16344,7 @@ function ok(value) {
16527
16344
  function err(error) {
16528
16345
  return { ok: false, error };
16529
16346
  }
16530
- var init_result2 = __esm({
16347
+ var init_result = __esm({
16531
16348
  "../../spreadsheet-utils/src/result.ts"() {
16532
16349
  "use strict";
16533
16350
  init_esm_shims();
@@ -16540,7 +16357,7 @@ var init_subscribable = __esm({
16540
16357
  "../../kernel/src/services/primitives/subscribable.ts"() {
16541
16358
  "use strict";
16542
16359
  init_esm_shims();
16543
- init_disposable2();
16360
+ init_disposable();
16544
16361
  Subscribable = class extends DisposableBase {
16545
16362
  constructor() {
16546
16363
  super(...arguments);
@@ -16600,7 +16417,7 @@ var init_event_emitter = __esm({
16600
16417
  "../../kernel/src/services/primitives/event-emitter.ts"() {
16601
16418
  "use strict";
16602
16419
  init_esm_shims();
16603
- init_disposable2();
16420
+ init_disposable();
16604
16421
  TypedEventEmitter = class extends DisposableBase {
16605
16422
  constructor() {
16606
16423
  super(...arguments);
@@ -16665,8 +16482,8 @@ var init_primitives3 = __esm({
16665
16482
  "../../kernel/src/services/primitives/index.ts"() {
16666
16483
  "use strict";
16667
16484
  init_esm_shims();
16668
- init_disposable2();
16669
- init_result2();
16485
+ init_disposable();
16486
+ init_result();
16670
16487
  init_subscribable();
16671
16488
  init_event_emitter();
16672
16489
  }
@@ -24716,34 +24533,8 @@ var init_equation_bridge = __esm({
24716
24533
  }
24717
24534
  });
24718
24535
 
24719
- // ../../contracts/src/bridges/ink-recognition-bridge.ts
24720
- var DEFAULT_RECOGNITION_THRESHOLDS;
24721
- var init_ink_recognition_bridge = __esm({
24722
- "../../contracts/src/bridges/ink-recognition-bridge.ts"() {
24723
- "use strict";
24724
- init_esm_shims();
24725
- DEFAULT_RECOGNITION_THRESHOLDS = {
24726
- line: 0.7,
24727
- rectangle: 0.65,
24728
- ellipse: 0.7,
24729
- triangle: 0.6,
24730
- arrow: 0.6,
24731
- star: 0.65,
24732
- text: 0.5
24733
- };
24734
- }
24735
- });
24736
-
24737
- // ../../contracts/src/bridges/index.ts
24738
- var init_bridges = __esm({
24739
- "../../contracts/src/bridges/index.ts"() {
24740
- "use strict";
24741
- init_esm_shims();
24742
- init_ink_recognition_bridge();
24743
- }
24744
- });
24745
-
24746
24536
  // ../../kernel/src/domain/drawing/ink-recognition-bridge.ts
24537
+ import { DEFAULT_RECOGNITION_THRESHOLDS } from "@mog-sdk/spreadsheet-contracts/bridges";
24747
24538
  function createInkRecognitionBridge(initialThresholds) {
24748
24539
  let thresholds = {
24749
24540
  ...DEFAULT_RECOGNITION_THRESHOLDS,
@@ -25159,11 +24950,10 @@ async function recognizeWithBrowserAPI(strokes) {
25159
24950
  }
25160
24951
  return null;
25161
24952
  }
25162
- var init_ink_recognition_bridge2 = __esm({
24953
+ var init_ink_recognition_bridge = __esm({
25163
24954
  "../../kernel/src/domain/drawing/ink-recognition-bridge.ts"() {
25164
24955
  "use strict";
25165
24956
  init_esm_shims();
25166
- init_bridges();
25167
24957
  }
25168
24958
  });
25169
24959
 
@@ -30176,7 +29966,7 @@ var init_arrows = __esm({
30176
29966
 
30177
29967
  // ../../canvas/drawing/shapes/src/presets/constants.ts
30178
29968
  var KAPPA;
30179
- var init_constants2 = __esm({
29969
+ var init_constants = __esm({
30180
29970
  "../../canvas/drawing/shapes/src/presets/constants.ts"() {
30181
29971
  "use strict";
30182
29972
  init_esm_shims();
@@ -30200,7 +29990,7 @@ var init_primitives4 = __esm({
30200
29990
  "use strict";
30201
29991
  init_esm_shims();
30202
29992
  init_src3();
30203
- init_constants2();
29993
+ init_constants();
30204
29994
  }
30205
29995
  });
30206
29996
 
@@ -30210,7 +30000,7 @@ var init_basic = __esm({
30210
30000
  "use strict";
30211
30001
  init_esm_shims();
30212
30002
  init_src3();
30213
- init_constants2();
30003
+ init_constants();
30214
30004
  init_primitives4();
30215
30005
  init_registry3();
30216
30006
  init_primitives4();
@@ -70283,438 +70073,21 @@ var init_rules = __esm({
70283
70073
  }
70284
70074
  });
70285
70075
 
70286
- // ../../contracts/src/smartart/layouts.ts
70287
- var init_layouts2 = __esm({
70288
- "../../contracts/src/smartart/layouts.ts"() {
70289
- "use strict";
70290
- init_esm_shims();
70291
- }
70292
- });
70293
-
70294
- // ../../contracts/src/smartart/ooxml-algorithm-types.ts
70295
- var ParameterId, VALID_PARAMS_BY_ALGORITHM;
70296
- var init_ooxml_algorithm_types = __esm({
70297
- "../../contracts/src/smartart/ooxml-algorithm-types.ts"() {
70298
- "use strict";
70299
- init_esm_shims();
70300
- ParameterId = {
70301
- // ── Alignment Parameters ──────────────────────────────────────────────────
70302
- /** Horizontal alignment of children within the layout area. */
70303
- horzAlign: "horzAlign",
70304
- /** Vertical alignment of children within the layout area. */
70305
- vertAlign: "vertAlign",
70306
- /** Horizontal alignment for individual nodes (hierarchy algorithms). */
70307
- nodeHorzAlign: "nodeHorzAlign",
70308
- /** Vertical alignment for individual nodes (hierarchy algorithms). */
70309
- nodeVertAlign: "nodeVertAlign",
70310
- /** Hierarchy alignment (16 possible values for tree orientation). */
70311
- hierAlign: "hierAlign",
70312
- /** Text alignment (whether text should be aligned with shape). */
70313
- alignTx: "alignTx",
70314
- // ── Direction Parameters ──────────────────────────────────────────────────
70315
- /** Child direction (horizontal or vertical arrangement of children). */
70316
- chDir: "chDir",
70317
- /** Child alignment (how children align on the cross-axis). */
70318
- chAlign: "chAlign",
70319
- /** Secondary child alignment (for complex hierarchy layouts). */
70320
- secChAlign: "secChAlign",
70321
- /** Linear direction (which edge children flow from). */
70322
- linDir: "linDir",
70323
- /** Secondary linear direction (for complex hierarchy layouts). */
70324
- secLinDir: "secLinDir",
70325
- /** Text direction (horizontal or vertical text blocks). */
70326
- txDir: "txDir",
70327
- /** Text block direction (horizontal or vertical text flow). */
70328
- txBlDir: "txBlDir",
70329
- /** Growth direction (which corner the snake starts from). */
70330
- grDir: "grDir",
70331
- /** Flow direction (whether snake flows by row or column). */
70332
- flowDir: "flowDir",
70333
- /** Continue direction (same direction or reversed for each row). */
70334
- contDir: "contDir",
70335
- // ── Connector Parameters ──────────────────────────────────────────────────
70336
- /** Connector routing style (straight, bend, curve, long curve). */
70337
- connRout: "connRout",
70338
- /** Beginning/start arrowhead style for connectors. */
70339
- begSty: "begSty",
70340
- /** Ending arrowhead style for connectors. */
70341
- endSty: "endSty",
70342
- /** Connector dimension (1D, 2D, or custom). */
70343
- dim: "dim",
70344
- /** Source node name for connector routing. */
70345
- srcNode: "srcNode",
70346
- /** Destination node name for connector routing. */
70347
- dstNode: "dstNode",
70348
- /** Beginning connection points (which points on the source shape). */
70349
- begPts: "begPts",
70350
- /** Ending connection points (which points on the destination shape). */
70351
- endPts: "endPts",
70352
- /** Bend point position for right-angle connectors. */
70353
- bendPt: "bendPt",
70354
- // ── Cycle/Circular Parameters ─────────────────────────────────────────────
70355
- /** Start angle in degrees for cycle algorithm. */
70356
- stAng: "stAng",
70357
- /** Span angle in degrees for cycle algorithm. */
70358
- spanAng: "spanAng",
70359
- /** Rotation path (none or along the circular path). */
70360
- rotPath: "rotPath",
70361
- /** Center shape mapping (whether first node goes to center). */
70362
- ctrShpMap: "ctrShpMap",
70363
- // ── Snake Parameters ──────────────────────────────────────────────────────
70364
- /** Breakpoint logic for snake wrapping (end of canvas, balanced, fixed). */
70365
- bkpt: "bkpt",
70366
- /** Breakpoint fixed value (number of items per row when bkpt=fixed). */
70367
- bkPtFixedVal: "bkPtFixedVal",
70368
- /** Offset mode for staggered rows in snake layout. */
70369
- off: "off",
70370
- // ── Linear/Sequence Parameters ────────────────────────────────────────────
70371
- /** Starting element index (which node type starts the alternating sequence). */
70372
- stElem: "stElem",
70373
- /** Starting bullet level for text algorithm. */
70374
- stBulletLvl: "stBulletLvl",
70375
- // ── Pyramid Parameters ────────────────────────────────────────────────────
70376
- /** Pyramid accent position (before or after the level). */
70377
- pyraAcctPos: "pyraAcctPos",
70378
- /** Pyramid accent text margin (step or stack behavior). */
70379
- pyraAcctTxMar: "pyraAcctTxMar",
70380
- /** Pyramid level node name. */
70381
- pyraLvlNode: "pyraLvlNode",
70382
- /** Pyramid accent background node name. */
70383
- pyraAcctBkgdNode: "pyraAcctBkgdNode",
70384
- /** Pyramid accent text node name. */
70385
- pyraAcctTxNode: "pyraAcctTxNode",
70386
- // ── Text Parameters ───────────────────────────────────────────────────────
70387
- /** Parent text LTR alignment. */
70388
- parTxLTRAlign: "parTxLTRAlign",
70389
- /** Parent text RTL alignment. */
70390
- parTxRTLAlign: "parTxRTLAlign",
70391
- /** Shape text LTR alignment for children. */
70392
- shpTxLTRAlignCh: "shpTxLTRAlignCh",
70393
- /** Shape text RTL alignment for children. */
70394
- shpTxRTLAlignCh: "shpTxRTLAlignCh",
70395
- /** Text anchor horizontal position. */
70396
- txAnchorHorz: "txAnchorHorz",
70397
- /** Text anchor vertical position. */
70398
- txAnchorVert: "txAnchorVert",
70399
- /** Text anchor horizontal position for children. */
70400
- txAnchorHorzCh: "txAnchorHorzCh",
70401
- /** Text anchor vertical position for children. */
70402
- txAnchorVertCh: "txAnchorVertCh",
70403
- /** Auto text rotation mode (none, upright, gravity-based). */
70404
- autoTxRot: "autoTxRot",
70405
- // ── Spacing & Sizing Parameters ───────────────────────────────────────────
70406
- /** Aspect ratio value. */
70407
- ar: "ar",
70408
- /** Line spacing for parent text (percentage). */
70409
- lnSpPar: "lnSpPar",
70410
- /** Line spacing after parent paragraph (percentage). */
70411
- lnSpAfParP: "lnSpAfParP",
70412
- /** Line spacing for child text (percentage). */
70413
- lnSpCh: "lnSpCh",
70414
- /** Line spacing after child paragraph (percentage). */
70415
- lnSpAfChP: "lnSpAfChP",
70416
- // ── Hierarchy-Specific Parameters ─────────────────────────────────────────
70417
- /** Root short distance flag (hierarchy algorithms). */
70418
- rtShortDist: "rtShortDist",
70419
- // ── Fallback Parameter ────────────────────────────────────────────────────
70420
- /** Fallback dimension for the algorithm. */
70421
- fallback: "fallback"
70422
- };
70423
- VALID_PARAMS_BY_ALGORITHM = {
70424
- composite: [ParameterId.ar],
70425
- lin: [
70426
- ParameterId.linDir,
70427
- ParameterId.chDir,
70428
- ParameterId.chAlign,
70429
- ParameterId.horzAlign,
70430
- ParameterId.vertAlign,
70431
- ParameterId.stElem,
70432
- ParameterId.fallback,
70433
- ParameterId.nodeHorzAlign,
70434
- ParameterId.nodeVertAlign
70435
- ],
70436
- snake: [
70437
- ParameterId.grDir,
70438
- ParameterId.flowDir,
70439
- ParameterId.contDir,
70440
- ParameterId.bkpt,
70441
- ParameterId.bkPtFixedVal,
70442
- ParameterId.off
70443
- ],
70444
- cycle: [ParameterId.stAng, ParameterId.spanAng, ParameterId.rotPath, ParameterId.ctrShpMap],
70445
- hierRoot: [
70446
- ParameterId.hierAlign,
70447
- ParameterId.nodeHorzAlign,
70448
- ParameterId.nodeVertAlign,
70449
- ParameterId.rtShortDist
70450
- ],
70451
- hierChild: [
70452
- ParameterId.chAlign,
70453
- ParameterId.linDir,
70454
- ParameterId.secChAlign,
70455
- ParameterId.secLinDir
70456
- ],
70457
- pyra: [
70458
- ParameterId.linDir,
70459
- ParameterId.txDir,
70460
- ParameterId.pyraAcctPos,
70461
- ParameterId.pyraAcctTxMar,
70462
- ParameterId.pyraLvlNode,
70463
- ParameterId.pyraAcctBkgdNode,
70464
- ParameterId.pyraAcctTxNode
70465
- ],
70466
- conn: [
70467
- ParameterId.srcNode,
70468
- ParameterId.dstNode,
70469
- ParameterId.connRout,
70470
- ParameterId.begSty,
70471
- ParameterId.endSty,
70472
- ParameterId.dim,
70473
- ParameterId.bendPt,
70474
- ParameterId.begPts,
70475
- ParameterId.endPts
70476
- ],
70477
- tx: [
70478
- ParameterId.parTxLTRAlign,
70479
- ParameterId.parTxRTLAlign,
70480
- ParameterId.shpTxLTRAlignCh,
70481
- ParameterId.shpTxRTLAlignCh,
70482
- ParameterId.txAnchorVert,
70483
- ParameterId.txAnchorHorz,
70484
- ParameterId.txAnchorVertCh,
70485
- ParameterId.txAnchorHorzCh,
70486
- ParameterId.txBlDir,
70487
- ParameterId.autoTxRot,
70488
- ParameterId.stBulletLvl,
70489
- ParameterId.lnSpPar,
70490
- ParameterId.lnSpAfParP,
70491
- ParameterId.lnSpCh,
70492
- ParameterId.lnSpAfChP,
70493
- ParameterId.alignTx
70494
- ],
70495
- sp: []
70496
- };
70497
- }
70498
- });
70499
-
70500
- // ../../contracts/src/smartart/ooxml-data-model-types.ts
70501
- var init_ooxml_data_model_types = __esm({
70502
- "../../contracts/src/smartart/ooxml-data-model-types.ts"() {
70503
- "use strict";
70504
- init_esm_shims();
70505
- }
70506
- });
70507
-
70508
- // ../../contracts/src/smartart/ooxml-drawing-types.ts
70509
- var init_ooxml_drawing_types = __esm({
70510
- "../../contracts/src/smartart/ooxml-drawing-types.ts"() {
70511
- "use strict";
70512
- init_esm_shims();
70513
- }
70514
- });
70515
-
70516
- // ../../contracts/src/smartart/ooxml-engine-types.ts
70517
- 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;
70518
- var init_ooxml_engine_types = __esm({
70519
- "../../contracts/src/smartart/ooxml-engine-types.ts"() {
70520
- "use strict";
70521
- init_esm_shims();
70522
- POSITIONAL_CONSTRAINT_TYPES = [
70523
- "l",
70524
- "t",
70525
- "r",
70526
- "b",
70527
- "lOff",
70528
- "tOff",
70529
- "rOff",
70530
- "bOff",
70531
- "ctrX",
70532
- "ctrY",
70533
- "ctrXOff",
70534
- "ctrYOff"
70535
- ];
70536
- DIMENSIONAL_CONSTRAINT_TYPES = [
70537
- "w",
70538
- "h",
70539
- "wOff",
70540
- "hOff"
70541
- ];
70542
- MARGIN_CONSTRAINT_TYPES = [
70543
- "lMarg",
70544
- "tMarg",
70545
- "rMarg",
70546
- "bMarg",
70547
- "begMarg",
70548
- "endMarg"
70549
- ];
70550
- FONT_CONSTRAINT_TYPES = [
70551
- "primFontSz",
70552
- "secFontSz"
70553
- ];
70554
- SPACING_CONSTRAINT_TYPES = [
70555
- "sp",
70556
- "sibSp",
70557
- "secSibSp"
70558
- ];
70559
- GEOMETRY_CONSTRAINT_TYPES = [
70560
- "connDist",
70561
- "diam",
70562
- "stemThick",
70563
- "begPad",
70564
- "endPad",
70565
- "wArH",
70566
- "hArH",
70567
- "bendDist"
70568
- ];
70569
- USER_DEFINED_CONSTRAINT_TYPES = [
70570
- "userA",
70571
- "userB",
70572
- "userC",
70573
- "userD",
70574
- "userE",
70575
- "userF",
70576
- "userG",
70577
- "userH",
70578
- "userI",
70579
- "userJ",
70580
- "userK",
70581
- "userL",
70582
- "userM",
70583
- "userN",
70584
- "userO",
70585
- "userP",
70586
- "userQ",
70587
- "userR",
70588
- "userS",
70589
- "userT",
70590
- "userU",
70591
- "userV",
70592
- "userW",
70593
- "userX",
70594
- "userY",
70595
- "userZ"
70596
- ];
70597
- ALL_CONSTRAINT_TYPES = [
70598
- ...POSITIONAL_CONSTRAINT_TYPES,
70599
- ...DIMENSIONAL_CONSTRAINT_TYPES,
70600
- ...MARGIN_CONSTRAINT_TYPES,
70601
- ...FONT_CONSTRAINT_TYPES,
70602
- ...SPACING_CONSTRAINT_TYPES,
70603
- ...GEOMETRY_CONSTRAINT_TYPES,
70604
- "pyraAcctRatio",
70605
- "alignOff",
70606
- ...USER_DEFINED_CONSTRAINT_TYPES,
70607
- "none"
70608
- ];
70609
- ALL_ELEMENT_TYPES = [
70610
- "all",
70611
- "doc",
70612
- "node",
70613
- "norm",
70614
- "nonNorm",
70615
- "asst",
70616
- "nonAsst",
70617
- "parTrans",
70618
- "pres",
70619
- "sibTrans"
70620
- ];
70621
- ALL_FUNCTION_TYPES = [
70622
- "cnt",
70623
- "pos",
70624
- "revPos",
70625
- "posEven",
70626
- "posOdd",
70627
- "var",
70628
- "depth",
70629
- "maxDepth"
70630
- ];
70631
- ALL_FUNCTION_OPERATORS = [
70632
- "equ",
70633
- "neq",
70634
- "gt",
70635
- "lt",
70636
- "gte",
70637
- "lte"
70638
- ];
70639
- ALL_FUNCTION_ARGUMENTS = [
70640
- "none",
70641
- "orgChart",
70642
- "chMax",
70643
- "chPref",
70644
- "bulEnabled",
70645
- "dir",
70646
- "hierBranch",
70647
- "animOne",
70648
- "animLvl",
70649
- "resizeHandles"
70650
- ];
70651
- }
70652
- });
70653
-
70654
- // ../../contracts/src/smartart/ooxml-layout-types.ts
70655
- var init_ooxml_layout_types = __esm({
70656
- "../../contracts/src/smartart/ooxml-layout-types.ts"() {
70657
- "use strict";
70658
- init_esm_shims();
70659
- }
70660
- });
70661
-
70662
- // ../../contracts/src/smartart/ooxml-style-types.ts
70663
- var init_ooxml_style_types = __esm({
70664
- "../../contracts/src/smartart/ooxml-style-types.ts"() {
70665
- "use strict";
70666
- init_esm_shims();
70667
- }
70668
- });
70669
-
70670
- // ../../contracts/src/smartart/styles.ts
70671
- var init_styles3 = __esm({
70672
- "../../contracts/src/smartart/styles.ts"() {
70673
- "use strict";
70674
- init_esm_shims();
70675
- }
70676
- });
70677
-
70678
- // ../../contracts/src/smartart/types.ts
70679
- var init_types4 = __esm({
70680
- "../../contracts/src/smartart/types.ts"() {
70681
- "use strict";
70682
- init_esm_shims();
70683
- }
70684
- });
70685
-
70686
- // ../../contracts/src/smartart/index.ts
70687
- var init_smartart = __esm({
70688
- "../../contracts/src/smartart/index.ts"() {
70689
- "use strict";
70690
- init_esm_shims();
70691
- init_layouts2();
70692
- init_ooxml_algorithm_types();
70693
- init_ooxml_data_model_types();
70694
- init_ooxml_drawing_types();
70695
- init_ooxml_engine_types();
70696
- init_ooxml_layout_types();
70697
- init_ooxml_style_types();
70698
- init_styles3();
70699
- init_types4();
70700
- }
70701
- });
70702
-
70703
70076
  // ../../canvas/drawing/smartart/src/engine/algorithms/composite.ts
70077
+ import { AlgorithmType } from "@mog-sdk/spreadsheet-contracts/smartart";
70704
70078
  var init_composite = __esm({
70705
70079
  "../../canvas/drawing/smartart/src/engine/algorithms/composite.ts"() {
70706
70080
  "use strict";
70707
70081
  init_esm_shims();
70708
- init_smartart();
70709
70082
  }
70710
70083
  });
70711
70084
 
70712
70085
  // ../../canvas/drawing/smartart/src/engine/algorithms/linear.ts
70086
+ import { AlgorithmType as AlgorithmType2 } from "@mog-sdk/spreadsheet-contracts/smartart";
70713
70087
  var init_linear2 = __esm({
70714
70088
  "../../canvas/drawing/smartart/src/engine/algorithms/linear.ts"() {
70715
70089
  "use strict";
70716
70090
  init_esm_shims();
70717
- init_smartart();
70718
70091
  }
70719
70092
  });
70720
70093
 
@@ -70727,82 +70100,82 @@ var init_param_utils = __esm({
70727
70100
  });
70728
70101
 
70729
70102
  // ../../canvas/drawing/smartart/src/engine/algorithms/snake.ts
70103
+ import { AlgorithmType as AlgorithmType3 } from "@mog-sdk/spreadsheet-contracts/smartart";
70730
70104
  var init_snake = __esm({
70731
70105
  "../../canvas/drawing/smartart/src/engine/algorithms/snake.ts"() {
70732
70106
  "use strict";
70733
70107
  init_esm_shims();
70734
- init_smartart();
70735
70108
  init_param_utils();
70736
70109
  }
70737
70110
  });
70738
70111
 
70739
70112
  // ../../canvas/drawing/smartart/src/engine/algorithms/cycle.ts
70113
+ import { AlgorithmType as AlgorithmType4 } from "@mog-sdk/spreadsheet-contracts/smartart";
70740
70114
  var init_cycle2 = __esm({
70741
70115
  "../../canvas/drawing/smartart/src/engine/algorithms/cycle.ts"() {
70742
70116
  "use strict";
70743
70117
  init_esm_shims();
70744
- init_smartart();
70745
70118
  init_param_utils();
70746
70119
  }
70747
70120
  });
70748
70121
 
70749
70122
  // ../../canvas/drawing/smartart/src/engine/algorithms/hier-root.ts
70123
+ import { AlgorithmType as AlgorithmType5 } from "@mog-sdk/spreadsheet-contracts/smartart";
70750
70124
  var init_hier_root = __esm({
70751
70125
  "../../canvas/drawing/smartart/src/engine/algorithms/hier-root.ts"() {
70752
70126
  "use strict";
70753
70127
  init_esm_shims();
70754
- init_smartart();
70755
70128
  init_param_utils();
70756
70129
  }
70757
70130
  });
70758
70131
 
70759
70132
  // ../../canvas/drawing/smartart/src/engine/algorithms/hier-child.ts
70133
+ import { AlgorithmType as AlgorithmType6 } from "@mog-sdk/spreadsheet-contracts/smartart";
70760
70134
  var init_hier_child = __esm({
70761
70135
  "../../canvas/drawing/smartart/src/engine/algorithms/hier-child.ts"() {
70762
70136
  "use strict";
70763
70137
  init_esm_shims();
70764
- init_smartart();
70765
70138
  init_param_utils();
70766
70139
  }
70767
70140
  });
70768
70141
 
70769
70142
  // ../../canvas/drawing/smartart/src/engine/algorithms/pyramid.ts
70143
+ import { AlgorithmType as AlgorithmType7 } from "@mog-sdk/spreadsheet-contracts/smartart";
70770
70144
  var init_pyramid2 = __esm({
70771
70145
  "../../canvas/drawing/smartart/src/engine/algorithms/pyramid.ts"() {
70772
70146
  "use strict";
70773
70147
  init_esm_shims();
70774
- init_smartart();
70775
70148
  init_param_utils();
70776
70149
  }
70777
70150
  });
70778
70151
 
70779
70152
  // ../../canvas/drawing/smartart/src/engine/algorithms/connector.ts
70153
+ import { AlgorithmType as AlgorithmType8 } from "@mog-sdk/spreadsheet-contracts/smartart";
70780
70154
  var init_connector = __esm({
70781
70155
  "../../canvas/drawing/smartart/src/engine/algorithms/connector.ts"() {
70782
70156
  "use strict";
70783
70157
  init_esm_shims();
70784
- init_smartart();
70785
70158
  init_connector_routing();
70786
70159
  init_param_utils();
70787
70160
  }
70788
70161
  });
70789
70162
 
70790
70163
  // ../../canvas/drawing/smartart/src/engine/algorithms/text.ts
70164
+ import { AlgorithmType as AlgorithmType9 } from "@mog-sdk/spreadsheet-contracts/smartart";
70791
70165
  var init_text3 = __esm({
70792
70166
  "../../canvas/drawing/smartart/src/engine/algorithms/text.ts"() {
70793
70167
  "use strict";
70794
70168
  init_esm_shims();
70795
- init_smartart();
70796
70169
  init_param_utils();
70797
70170
  }
70798
70171
  });
70799
70172
 
70800
70173
  // ../../canvas/drawing/smartart/src/engine/algorithms/space.ts
70174
+ import { AlgorithmType as AlgorithmType10 } from "@mog-sdk/spreadsheet-contracts/smartart";
70801
70175
  var init_space = __esm({
70802
70176
  "../../canvas/drawing/smartart/src/engine/algorithms/space.ts"() {
70803
70177
  "use strict";
70804
70178
  init_esm_shims();
70805
- init_smartart();
70806
70179
  }
70807
70180
  });
70808
70181
 
@@ -70961,12 +70334,18 @@ var init_drawing_parser = __esm({
70961
70334
  });
70962
70335
 
70963
70336
  // ../../canvas/drawing/smartart/src/parser/layout-def-parser.ts
70337
+ import {
70338
+ ALL_ELEMENT_TYPES,
70339
+ ALL_FUNCTION_ARGUMENTS,
70340
+ ALL_FUNCTION_OPERATORS,
70341
+ ALL_FUNCTION_TYPES,
70342
+ VARIABLE_LIST_DEFAULTS
70343
+ } from "@mog-sdk/spreadsheet-contracts/smartart";
70964
70344
  var VALID_ELEMENT_TYPES, VALID_FUNCTION_TYPES, VALID_FUNCTION_OPERATORS, VALID_FUNCTION_ARGUMENTS;
70965
70345
  var init_layout_def_parser = __esm({
70966
70346
  "../../canvas/drawing/smartart/src/parser/layout-def-parser.ts"() {
70967
70347
  "use strict";
70968
70348
  init_esm_shims();
70969
- init_smartart();
70970
70349
  init_data_model_parser();
70971
70350
  init_drawingml_helpers();
70972
70351
  init_xml_helpers();
@@ -74868,7 +74247,7 @@ var init_cell_anchor_resolver = __esm({
74868
74247
  });
74869
74248
 
74870
74249
  // ../../kernel/src/floating-objects/types.ts
74871
- var init_types5 = __esm({
74250
+ var init_types4 = __esm({
74872
74251
  "../../kernel/src/floating-objects/types.ts"() {
74873
74252
  "use strict";
74874
74253
  init_esm_shims();
@@ -74967,7 +74346,7 @@ var init_picture_manager = __esm({
74967
74346
  "use strict";
74968
74347
  init_esm_shims();
74969
74348
  init_document();
74970
- init_types5();
74349
+ init_types4();
74971
74350
  }
74972
74351
  });
74973
74352
 
@@ -75069,7 +74448,7 @@ var init_textbox_manager = __esm({
75069
74448
  "../../kernel/src/floating-objects/managers/textbox-manager.ts"() {
75070
74449
  "use strict";
75071
74450
  init_esm_shims();
75072
- init_types5();
74451
+ init_types4();
75073
74452
  DEFAULT_TEXTBOX_FILL = { type: "solid", color: "#ffffff" };
75074
74453
  DEFAULT_TEXTBOX_BORDER = { style: "solid", color: "#000000", width: 1 };
75075
74454
  }
@@ -76250,7 +75629,7 @@ var init_kernel_context = __esm({
76250
75629
  init_esm_shims();
76251
75630
  init_chart_bridge();
76252
75631
  init_equation_bridge();
76253
- init_ink_recognition_bridge2();
75632
+ init_ink_recognition_bridge();
76254
75633
  init_locale_bridge();
76255
75634
  init_pivot_bridge();
76256
75635
  init_schema_bridge();
@@ -77260,21 +76639,8 @@ var WorkbookHistoryImpl = class {
77260
76639
 
77261
76640
  // ../../kernel/src/api/workbook/names.ts
77262
76641
  init_esm_shims();
77263
-
77264
- // ../../contracts/src/api/index.ts
77265
- init_esm_shims();
77266
-
77267
- // ../../contracts/src/api/types.ts
77268
- init_esm_shims();
77269
-
77270
- // ../../contracts/src/api/worksheet/index.ts
77271
- init_esm_shims();
77272
-
77273
- // ../../contracts/src/api/worksheet/format-mappings.ts
77274
- init_esm_shims();
77275
-
77276
- // ../../kernel/src/api/workbook/names.ts
77277
76642
  init_errors();
76643
+ import { RangeValueType } from "@mog-sdk/spreadsheet-contracts/api";
77278
76644
 
77279
76645
  // ../../kernel/src/domain/formulas/named-ranges.ts
77280
76646
  init_esm_shims();
@@ -77896,13 +77262,13 @@ var WorkbookNamesImpl = class {
77896
77262
  if (!values) return null;
77897
77263
  return values.map(
77898
77264
  (row) => row.map((cell) => {
77899
- if (cell === null || cell === void 0) return "Empty" /* Empty */;
77900
- if (typeof cell === "boolean") return "Boolean" /* Boolean */;
77901
- if (typeof cell === "number") return "Double" /* Double */;
77902
- if (typeof cell === "string") return "String" /* String */;
77265
+ if (cell === null || cell === void 0) return RangeValueType.Empty;
77266
+ if (typeof cell === "boolean") return RangeValueType.Boolean;
77267
+ if (typeof cell === "number") return RangeValueType.Double;
77268
+ if (typeof cell === "string") return RangeValueType.String;
77903
77269
  if (typeof cell === "object" && cell !== null && "type" in cell)
77904
- return "Error" /* Error */;
77905
- return "String" /* String */;
77270
+ return RangeValueType.Error;
77271
+ return RangeValueType.String;
77906
77272
  })
77907
77273
  );
77908
77274
  }
@@ -77994,7 +77360,7 @@ var BUILT_IN_LISTS = [
77994
77360
  ];
77995
77361
 
77996
77362
  // ../../kernel/src/domain/workbook/workbook.ts
77997
- init_protection();
77363
+ import { DEFAULT_WORKBOOK_PROTECTION_OPTIONS } from "@mog-sdk/spreadsheet-contracts/protection";
77998
77364
 
77999
77365
  // ../../spreadsheet-utils/src/protection.ts
78000
77366
  init_esm_shims();
@@ -78450,9 +77816,9 @@ init_sheet_meta();
78450
77816
 
78451
77817
  // ../../kernel/src/api/worksheet/worksheet-impl.ts
78452
77818
  init_esm_shims();
78453
- init_core3();
78454
77819
  init_errors3();
78455
77820
  init_errors();
77821
+ import { displayStringOrNull as displayStringOrNull3 } from "@mog-sdk/spreadsheet-contracts/core";
78456
77822
 
78457
77823
  // ../../kernel/src/bridges/wire/cell-metadata-cache.ts
78458
77824
  init_esm_shims();
@@ -79363,9 +78729,13 @@ async function setCells(ctx, sheetId, cells) {
79363
78729
  const result = { cellsWritten: uniqueEdits.length, errors: null };
79364
78730
  if (duplicatesRemoved > 0) {
79365
78731
  result.warnings = [
79366
- createWarning("API_DUPLICATE_COORDINATES", `${duplicatesRemoved} duplicate coordinate(s) resolved by last-write-wins`, {
79367
- duplicatesRemoved
79368
- })
78732
+ createWarning(
78733
+ "API_DUPLICATE_COORDINATES",
78734
+ `${duplicatesRemoved} duplicate coordinate(s) resolved by last-write-wins`,
78735
+ {
78736
+ duplicatesRemoved
78737
+ }
78738
+ )
79369
78739
  ];
79370
78740
  }
79371
78741
  return result;
@@ -80035,6 +79405,10 @@ async function clearRange2(ctx, sheetId, range2) {
80035
79405
  init_esm_shims();
80036
79406
  init_a1();
80037
79407
  init_value_conversions();
79408
+ import {
79409
+ NumberFormatCategory,
79410
+ RangeValueType as RangeValueType2
79411
+ } from "@mog-sdk/spreadsheet-contracts/api";
80038
79412
  async function clearWithMode(ctx, sheetId, range2, applyTo = "all") {
80039
79413
  const n = normalizeRange(range2);
80040
79414
  const promises = [];
@@ -80134,7 +79508,7 @@ async function getValueTypes(ctx, sheetId, range2) {
80134
79508
  for (let col = n.startCol; col <= n.endCol; col++) {
80135
79509
  const cell = cellMap.get(`${row},${col}`);
80136
79510
  if (!cell) {
80137
- rowData.push("Empty" /* Empty */);
79511
+ rowData.push(RangeValueType2.Empty);
80138
79512
  } else {
80139
79513
  rowData.push(classifyValueType(viewportCellValueToCellValue(cell.value)));
80140
79514
  }
@@ -80144,12 +79518,12 @@ async function getValueTypes(ctx, sheetId, range2) {
80144
79518
  return result;
80145
79519
  }
80146
79520
  function classifyValueType(value) {
80147
- if (value === null || value === void 0) return "Empty" /* Empty */;
80148
- if (typeof value === "string") return value === "" ? "Empty" /* Empty */ : "String" /* String */;
80149
- if (typeof value === "number") return "Double" /* Double */;
80150
- if (typeof value === "boolean") return "Boolean" /* Boolean */;
80151
- if (typeof value === "object" && value !== null && "type" in value) return "Error" /* Error */;
80152
- return "String" /* String */;
79521
+ if (value === null || value === void 0) return RangeValueType2.Empty;
79522
+ if (typeof value === "string") return value === "" ? RangeValueType2.Empty : RangeValueType2.String;
79523
+ if (typeof value === "number") return RangeValueType2.Double;
79524
+ if (typeof value === "boolean") return RangeValueType2.Boolean;
79525
+ if (typeof value === "object" && value !== null && "type" in value) return RangeValueType2.Error;
79526
+ return RangeValueType2.String;
80153
79527
  }
80154
79528
  async function findInRange(ctx, sheetId, range2, text, options) {
80155
79529
  const n = normalizeRange(range2);
@@ -80246,46 +79620,46 @@ async function getNumberFormatCategories(ctx, sheetId, range2) {
80246
79620
  }
80247
79621
  function detectFormatType(formatCode) {
80248
79622
  if (!formatCode || formatCode === "" || formatCode === "General") {
80249
- return "General" /* General */;
79623
+ return NumberFormatCategory.General;
80250
79624
  }
80251
79625
  if (formatCode === "@") {
80252
- return "Text" /* Text */;
79626
+ return NumberFormatCategory.Text;
80253
79627
  }
80254
79628
  const stripped = formatCode.replace(/\[[^\]]*\]/g, "").replace(/"[^"]*"/g, "");
80255
79629
  if (/[yYmMdD]/.test(stripped) && /[yYdD]/.test(stripped)) {
80256
- return "Date" /* Date */;
79630
+ return NumberFormatCategory.Date;
80257
79631
  }
80258
79632
  if (/[hHsS]/.test(stripped)) {
80259
79633
  if (/[yYdD]/.test(stripped)) {
80260
- return "Date" /* Date */;
79634
+ return NumberFormatCategory.Date;
80261
79635
  }
80262
- return "Time" /* Time */;
79636
+ return NumberFormatCategory.Time;
80263
79637
  }
80264
79638
  if (/AM\/PM/i.test(stripped)) {
80265
- return "Time" /* Time */;
79639
+ return NumberFormatCategory.Time;
80266
79640
  }
80267
79641
  if (stripped.includes("%")) {
80268
- return "Percentage" /* Percentage */;
79642
+ return NumberFormatCategory.Percentage;
80269
79643
  }
80270
79644
  if (/[eE][+-]/.test(stripped)) {
80271
- return "Scientific" /* Scientific */;
79645
+ return NumberFormatCategory.Scientific;
80272
79646
  }
80273
79647
  if (stripped.includes("/") && !/[yYmMdDhHsS]/.test(stripped)) {
80274
- return "Fraction" /* Fraction */;
79648
+ return NumberFormatCategory.Fraction;
80275
79649
  }
80276
79650
  if (/[_*]/.test(stripped) && /[$(]/.test(stripped)) {
80277
- return "Accounting" /* Accounting */;
79651
+ return NumberFormatCategory.Accounting;
80278
79652
  }
80279
79653
  if (/[$€£¥₹]/.test(formatCode)) {
80280
- return "Currency" /* Currency */;
79654
+ return NumberFormatCategory.Currency;
80281
79655
  }
80282
79656
  if (/^0{5}/.test(stripped) || /^0{3}-0{2}-0{4}/.test(stripped)) {
80283
- return "Special" /* Special */;
79657
+ return NumberFormatCategory.Special;
80284
79658
  }
80285
79659
  if (/[#0]/.test(stripped)) {
80286
- return "Number" /* Number */;
79660
+ return NumberFormatCategory.Number;
80287
79661
  }
80288
- return "Custom" /* Custom */;
79662
+ return NumberFormatCategory.Custom;
80289
79663
  }
80290
79664
 
80291
79665
  // ../../kernel/src/api/worksheet/operations/sort-operations.ts
@@ -82387,7 +81761,11 @@ var WorksheetFormatsImpl = class {
82387
81761
  col = b;
82388
81762
  format = c;
82389
81763
  }
82390
- const result = await this.ctx.computeBridge.setFormatForRanges(this.sheetId, [[row, col, row, col]], format);
81764
+ const result = await this.ctx.computeBridge.setFormatForRanges(
81765
+ this.sheetId,
81766
+ [[row, col, row, col]],
81767
+ format
81768
+ );
82391
81769
  return { cellCount: result.propertyChanges?.length ?? 0 };
82392
81770
  }
82393
81771
  async setRange(a, b) {
@@ -82436,7 +81814,11 @@ var WorksheetFormatsImpl = class {
82436
81814
  }
82437
81815
  async get(a, b) {
82438
81816
  const { row, col } = resolveCell(a, b);
82439
- return this.ctx.computeBridge.getResolvedFormat(this.sheetId, row, col);
81817
+ return this.ctx.computeBridge.getResolvedFormat(
81818
+ this.sheetId,
81819
+ row,
81820
+ col
81821
+ );
82440
81822
  }
82441
81823
  async adjustIndent(a, b, c) {
82442
81824
  let row, col, amount;
@@ -83835,7 +83217,7 @@ init_errors();
83835
83217
 
83836
83218
  // ../../kernel/src/api/worksheet/operations/sheet-management-operations.ts
83837
83219
  init_esm_shims();
83838
- init_protection();
83220
+ import { DEFAULT_PROTECTION_OPTIONS as DEFAULT_PROTECTION_OPTIONS2 } from "@mog-sdk/spreadsheet-contracts/protection";
83839
83221
  function parseCellRef2(ref) {
83840
83222
  const match = ref.match(/^([A-Z]+)(\d+)$/i);
83841
83223
  if (!match) return null;
@@ -88359,9 +87741,7 @@ var WorksheetImpl = class {
88359
87741
  }
88360
87742
  const firstRowCells = (rowMap.get(finalRange.startRow) ?? []).slice().sort((a, b) => a.col - b.col);
88361
87743
  if (firstRowCells.length > 0) {
88362
- const allStrings = firstRowCells.every(
88363
- (vc) => typeof vc.value === "string" && !vc.formula
88364
- );
87744
+ const allStrings = firstRowCells.every((vc) => typeof vc.value === "string" && !vc.formula);
88365
87745
  if (allStrings) {
88366
87746
  const headers = firstRowCells.map((vc) => String(vc.value));
88367
87747
  lines.push(`Headers: ${headers.join(", ")}`);
@@ -88822,7 +88202,7 @@ var WorksheetImpl = class {
88822
88202
  case 1:
88823
88203
  return accessor.numberValue;
88824
88204
  case 2:
88825
- return displayStringOrNull(accessor.displayText);
88205
+ return displayStringOrNull3(accessor.displayText);
88826
88206
  case 3:
88827
88207
  return accessor.numberValue !== 0;
88828
88208
  case 4: {
@@ -89446,7 +88826,7 @@ var WorkbookThemeImpl = class {
89446
88826
 
89447
88827
  // ../../kernel/src/api/workbook/workbook-impl.ts
89448
88828
  init_esm_shims();
89449
- init_disposable2();
88829
+ init_disposable();
89450
88830
  init_errors();
89451
88831
 
89452
88832
  // ../../kernel/src/domain/form-controls/index.ts
@@ -90033,26 +89413,7 @@ var globalRegistry = new FunctionRegistry();
90033
89413
 
90034
89414
  // ../../spreadsheet-utils/src/function-catalog.ts
90035
89415
  init_esm_shims();
90036
-
90037
- // ../../contracts/src/utils/function-registry.ts
90038
- init_esm_shims();
90039
- var FunctionCategory = /* @__PURE__ */ ((FunctionCategory2) => {
90040
- FunctionCategory2["MATH"] = "Math";
90041
- FunctionCategory2["STATISTICAL"] = "Statistical";
90042
- FunctionCategory2["TEXT"] = "Text";
90043
- FunctionCategory2["LOGICAL"] = "Logical";
90044
- FunctionCategory2["DATE_TIME"] = "Date & Time";
90045
- FunctionCategory2["LOOKUP"] = "Lookup & Reference";
90046
- FunctionCategory2["FINANCIAL"] = "Financial";
90047
- FunctionCategory2["INFORMATION"] = "Information";
90048
- FunctionCategory2["DATABASE"] = "Database";
90049
- FunctionCategory2["ENGINEERING"] = "Engineering";
90050
- FunctionCategory2["WEB"] = "Web";
90051
- FunctionCategory2["TESTING"] = "Testing";
90052
- return FunctionCategory2;
90053
- })(FunctionCategory || {});
90054
-
90055
- // ../../spreadsheet-utils/src/function-catalog.ts
89416
+ import { FunctionCategory } from "@mog-sdk/spreadsheet-contracts/utils/function-registry";
90056
89417
  var C = FunctionCategory;
90057
89418
  var INLINE_FUNCTIONS = [
90058
89419
  // Aggregates
@@ -90919,7 +90280,7 @@ function convertToFunctionInfo(metadata) {
90919
90280
 
90920
90281
  // ../../kernel/src/api/workbook/viewport.ts
90921
90282
  init_esm_shims();
90922
- init_disposable2();
90283
+ init_disposable();
90923
90284
  var regionCounter = 0;
90924
90285
  var ViewportRegionImpl = class extends DisposableBase {
90925
90286
  constructor(sheetId, bounds, computeBridge, viewportId) {
@@ -90973,7 +90334,7 @@ var WorkbookViewportImpl = class {
90973
90334
  };
90974
90335
 
90975
90336
  // ../../kernel/src/api/workbook/workbook-impl.ts
90976
- init_rendering();
90337
+ import { DEFAULT_CHROME_THEME } from "@mog-sdk/spreadsheet-contracts/rendering";
90977
90338
  var API_EVENT_TO_INTERNAL = {
90978
90339
  cellChanged: "cell:changed",
90979
90340
  rangeChanged: "range:changed",
@@ -91314,7 +90675,10 @@ var WorkbookImpl = class {
91314
90675
  }
91315
90676
  async setIterativeCalculation(enabled) {
91316
90677
  const settings = await this.ctx.computeBridge.getWorkbookSettings();
91317
- const calcSettings = { ...settings.calculationSettings ?? {}, enableIterativeCalculation: enabled };
90678
+ const calcSettings = {
90679
+ ...settings.calculationSettings ?? {},
90680
+ enableIterativeCalculation: enabled
90681
+ };
91318
90682
  await this.ctx.computeBridge.patchWorkbookSettings({
91319
90683
  calculationSettings: calcSettings
91320
90684
  });
@@ -93838,7 +93202,7 @@ var api_spec_default = {
93838
93202
  usedTypes: []
93839
93203
  },
93840
93204
  setCriteria: {
93841
- signature: "setCriteria(\n filterId: string,\n col: number,\n criteria: ColumnFilterCriteria,\n ): Promise<void>;",
93205
+ signature: "setCriteria(filterId: string, col: number, criteria: ColumnFilterCriteria): Promise<void>;",
93842
93206
  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",
93843
93207
  usedTypes: [
93844
93208
  "ColumnFilterCriteria"