@univerjs/core 1.0.0-alpha.1 → 1.0.0-insiders.20260701-0ef51b0

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/lib/cjs/index.js CHANGED
@@ -3407,6 +3407,10 @@ let DrawingTypeEnum = /* @__PURE__ */ function(DrawingTypeEnum) {
3407
3407
  * Dom element, allows inserting HTML elements as floating objects into the document
3408
3408
  */
3409
3409
  DrawingTypeEnum[DrawingTypeEnum["DRAWING_DOM"] = 8] = "DRAWING_DOM";
3410
+ /**
3411
+ * Block element, allows host products to place embeddable unit-backed blocks as drawing objects.
3412
+ */
3413
+ DrawingTypeEnum[DrawingTypeEnum["DRAWING_BLOCK"] = 9] = "DRAWING_BLOCK";
3410
3414
  return DrawingTypeEnum;
3411
3415
  }({});
3412
3416
 
@@ -4129,6 +4133,7 @@ let CommandType = /* @__PURE__ */ function(CommandType) {
4129
4133
  CommandType[CommandType["MUTATION"] = 2] = "MUTATION";
4130
4134
  return CommandType;
4131
4135
  }({});
4136
+ const COMMAND_EXECUTION_INJECTOR_KEY = Symbol("univer.command.execution-injector");
4132
4137
  /**
4133
4138
  * The identifier of the command service.
4134
4139
  */
@@ -4354,7 +4359,8 @@ let CommandService = class CommandService extends Disposable {
4354
4359
  this._commandExecutingLevel++;
4355
4360
  let result;
4356
4361
  try {
4357
- result = await this._injector.invoke(command.handler, params, options);
4362
+ var _options$COMMAND_EXEC;
4363
+ result = await ((_options$COMMAND_EXEC = options === null || options === void 0 ? void 0 : options[COMMAND_EXECUTION_INJECTOR_KEY]) !== null && _options$COMMAND_EXEC !== void 0 ? _options$COMMAND_EXEC : this._injector).invoke(command.handler, params, options);
4358
4364
  this._commandExecutingLevel--;
4359
4365
  } catch (e) {
4360
4366
  result = false;
@@ -4369,7 +4375,8 @@ let CommandService = class CommandService extends Disposable {
4369
4375
  this._commandExecutingLevel++;
4370
4376
  let result;
4371
4377
  try {
4372
- result = this._injector.invoke(command.handler, params, options);
4378
+ var _options$COMMAND_EXEC2;
4379
+ result = ((_options$COMMAND_EXEC2 = options === null || options === void 0 ? void 0 : options[COMMAND_EXECUTION_INJECTOR_KEY]) !== null && _options$COMMAND_EXEC2 !== void 0 ? _options$COMMAND_EXEC2 : this._injector).invoke(command.handler, params, options);
4373
4380
  if (result instanceof Promise) throw new TypeError("[CommandService]: Command handler should not return a promise.");
4374
4381
  this._commandExecutingLevel--;
4375
4382
  } catch (e) {
@@ -15750,7 +15757,7 @@ const IURLImageService = (0, _wendellhu_redi.createIdentifier)("core.url-image.s
15750
15757
  //#endregion
15751
15758
  //#region package.json
15752
15759
  var name = "@univerjs/core";
15753
- var version = "1.0.0-alpha.1";
15760
+ var version = "1.0.0-insiders.20260701-0ef51b0";
15754
15761
 
15755
15762
  //#endregion
15756
15763
  //#region src/sheets/empty-snapshot.ts
@@ -18292,6 +18299,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18292
18299
  this._contextService = _contextService;
18293
18300
  this._logService = _logService;
18294
18301
  _defineProperty(this, "_unitsByType", /* @__PURE__ */ new Map());
18302
+ _defineProperty(this, "_unitCreateOptions", /* @__PURE__ */ new Map());
18295
18303
  _defineProperty(this, "_createHandler", void 0);
18296
18304
  _defineProperty(this, "_ctorByType", /* @__PURE__ */ new Map());
18297
18305
  _defineProperty(this, "_currentUnits", /* @__PURE__ */ new Map());
@@ -18312,6 +18320,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18312
18320
  this._currentUnits.forEach((unit) => unit === null || unit === void 0 ? void 0 : unit.dispose());
18313
18321
  this._currentUnits.clear();
18314
18322
  this._unitsByType.clear();
18323
+ this._unitCreateOptions.clear();
18315
18324
  }
18316
18325
  __setCreateHandler(handler) {
18317
18326
  this._createHandler = handler;
@@ -18340,6 +18349,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18340
18349
  setCurrentUnitForType(unitId) {
18341
18350
  const result = this._getUnitById(unitId);
18342
18351
  if (!result) throw new Error(`[UniverInstanceService]: no document with unitId ${unitId}!`);
18352
+ if (this._currentUnits.get(result[1]) === result[0]) return;
18343
18353
  this._currentUnits.set(result[1], result[0]);
18344
18354
  this._currentUnits$.next(this._currentUnits);
18345
18355
  }
@@ -18362,6 +18372,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18362
18372
  const newUnitId = unit.getUnitId();
18363
18373
  if (units.findIndex((u) => u.getUnitId() === newUnitId) !== -1) throw new Error(`[UniverInstanceService]: cannot create a unit with the same unit id: ${newUnitId}.`);
18364
18374
  units.push(unit);
18375
+ if (options) this._unitCreateOptions.set(newUnitId, { ...options });
18365
18376
  this._unitAdded$.next({
18366
18377
  unit,
18367
18378
  options
@@ -18377,6 +18388,10 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18377
18388
  if (type && (unit === null || unit === void 0 ? void 0 : unit.type) !== type) return null;
18378
18389
  return unit;
18379
18390
  }
18391
+ getUnitCreateOptions(unitId) {
18392
+ var _this$_unitCreateOpti;
18393
+ return (_this$_unitCreateOpti = this._unitCreateOptions.get(unitId)) !== null && _this$_unitCreateOpti !== void 0 ? _this$_unitCreateOpti : null;
18394
+ }
18380
18395
  getCurrentUniverDocInstance() {
18381
18396
  return this.getCurrentUnitOfType(_univerjs_protocol.UniverType.UNIVER_DOC);
18382
18397
  }
@@ -18407,6 +18422,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18407
18422
  }
18408
18423
  focusUnit(id) {
18409
18424
  var _this$focused;
18425
+ if (this._focused$.getValue() === id) return;
18410
18426
  this._focused$.next(id);
18411
18427
  if (this.focused instanceof Workbook) {
18412
18428
  this._contextService.setContextValue(FOCUSING_UNIT, true);
@@ -18455,6 +18471,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18455
18471
  this._tryResetCurrentOnRemoval(unitId, type);
18456
18472
  this._tryResetFocusOnRemoval(unitId);
18457
18473
  this._unitDisposed$.next(unit);
18474
+ this._unitCreateOptions.delete(unitId);
18458
18475
  unit.dispose();
18459
18476
  return true;
18460
18477
  }
@@ -20849,6 +20866,11 @@ let ResourceLoaderService = class ResourceLoaderService extends Disposable {
20849
20866
  loadHookResource(hook, workbook.getUnitId(), workbook.getSnapshot().resources, "Workbook");
20850
20867
  });
20851
20868
  break;
20869
+ case _univerjs_protocol.UniverType.UNIVER_BASE:
20870
+ this._univerInstanceService.getAllUnitsForType(_univerjs_protocol.UniverType.UNIVER_BASE).forEach((base) => {
20871
+ loadHookResource(hook, base.getUnitId(), base.getSnapshot().resources, "Base");
20872
+ });
20873
+ break;
20852
20874
  }
20853
20875
  });
20854
20876
  };
@@ -20866,12 +20888,19 @@ let ResourceLoaderService = class ResourceLoaderService extends Disposable {
20866
20888
  const { unit: slide } = event;
20867
20889
  this._resourceManagerService.loadResources(slide.getUnitId(), slide.getSnapshot().resources);
20868
20890
  }));
20891
+ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(_univerjs_protocol.UniverType.UNIVER_BASE).subscribe((event) => {
20892
+ const { unit: base } = event;
20893
+ this._resourceManagerService.loadResources(base.getUnitId(), base.getSnapshot().resources);
20894
+ }));
20869
20895
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(_univerjs_protocol.UniverType.UNIVER_SHEET).subscribe((workbook) => {
20870
20896
  this._resourceManagerService.unloadResources(workbook.getUnitId(), _univerjs_protocol.UniverType.UNIVER_SHEET);
20871
20897
  }));
20872
20898
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(_univerjs_protocol.UniverType.UNIVER_DOC).subscribe((doc) => {
20873
20899
  this._resourceManagerService.unloadResources(doc.getUnitId(), _univerjs_protocol.UniverType.UNIVER_DOC);
20874
20900
  }));
20901
+ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(_univerjs_protocol.UniverType.UNIVER_BASE).subscribe((base) => {
20902
+ this._resourceManagerService.unloadResources(base.getUnitId(), _univerjs_protocol.UniverType.UNIVER_BASE);
20903
+ }));
20875
20904
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(_univerjs_protocol.UniverType.UNIVER_SLIDE).subscribe((slide) => {
20876
20905
  this._resourceManagerService.unloadResources(slide.getUnitId(), _univerjs_protocol.UniverType.UNIVER_SLIDE);
20877
20906
  }));
@@ -21101,6 +21130,7 @@ exports.BuildTextUtils = BuildTextUtils;
21101
21130
  exports.BulletAlignment = BulletAlignment;
21102
21131
  exports.COLORS = COLORS;
21103
21132
  exports.COLOR_STYLE_KEYS = COLOR_STYLE_KEYS;
21133
+ exports.COMMAND_EXECUTION_INJECTOR_KEY = COMMAND_EXECUTION_INJECTOR_KEY;
21104
21134
  exports.COMMAND_LOG_EXECUTION_CONFIG_KEY = COMMAND_LOG_EXECUTION_CONFIG_KEY;
21105
21135
  exports.CanceledError = CanceledError;
21106
21136
  exports.CellModeEnum = CellModeEnum;
package/lib/es/index.js CHANGED
@@ -3373,6 +3373,10 @@ let DrawingTypeEnum = /* @__PURE__ */ function(DrawingTypeEnum) {
3373
3373
  * Dom element, allows inserting HTML elements as floating objects into the document
3374
3374
  */
3375
3375
  DrawingTypeEnum[DrawingTypeEnum["DRAWING_DOM"] = 8] = "DRAWING_DOM";
3376
+ /**
3377
+ * Block element, allows host products to place embeddable unit-backed blocks as drawing objects.
3378
+ */
3379
+ DrawingTypeEnum[DrawingTypeEnum["DRAWING_BLOCK"] = 9] = "DRAWING_BLOCK";
3376
3380
  return DrawingTypeEnum;
3377
3381
  }({});
3378
3382
 
@@ -4095,6 +4099,7 @@ let CommandType = /* @__PURE__ */ function(CommandType) {
4095
4099
  CommandType[CommandType["MUTATION"] = 2] = "MUTATION";
4096
4100
  return CommandType;
4097
4101
  }({});
4102
+ const COMMAND_EXECUTION_INJECTOR_KEY = Symbol("univer.command.execution-injector");
4098
4103
  /**
4099
4104
  * The identifier of the command service.
4100
4105
  */
@@ -4320,7 +4325,8 @@ let CommandService = class CommandService extends Disposable {
4320
4325
  this._commandExecutingLevel++;
4321
4326
  let result;
4322
4327
  try {
4323
- result = await this._injector.invoke(command.handler, params, options);
4328
+ var _options$COMMAND_EXEC;
4329
+ result = await ((_options$COMMAND_EXEC = options === null || options === void 0 ? void 0 : options[COMMAND_EXECUTION_INJECTOR_KEY]) !== null && _options$COMMAND_EXEC !== void 0 ? _options$COMMAND_EXEC : this._injector).invoke(command.handler, params, options);
4324
4330
  this._commandExecutingLevel--;
4325
4331
  } catch (e) {
4326
4332
  result = false;
@@ -4335,7 +4341,8 @@ let CommandService = class CommandService extends Disposable {
4335
4341
  this._commandExecutingLevel++;
4336
4342
  let result;
4337
4343
  try {
4338
- result = this._injector.invoke(command.handler, params, options);
4344
+ var _options$COMMAND_EXEC2;
4345
+ result = ((_options$COMMAND_EXEC2 = options === null || options === void 0 ? void 0 : options[COMMAND_EXECUTION_INJECTOR_KEY]) !== null && _options$COMMAND_EXEC2 !== void 0 ? _options$COMMAND_EXEC2 : this._injector).invoke(command.handler, params, options);
4339
4346
  if (result instanceof Promise) throw new TypeError("[CommandService]: Command handler should not return a promise.");
4340
4347
  this._commandExecutingLevel--;
4341
4348
  } catch (e) {
@@ -15716,7 +15723,7 @@ const IURLImageService = createIdentifier("core.url-image.service");
15716
15723
  //#endregion
15717
15724
  //#region package.json
15718
15725
  var name = "@univerjs/core";
15719
- var version = "1.0.0-alpha.1";
15726
+ var version = "1.0.0-insiders.20260701-0ef51b0";
15720
15727
 
15721
15728
  //#endregion
15722
15729
  //#region src/sheets/empty-snapshot.ts
@@ -18258,6 +18265,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18258
18265
  this._contextService = _contextService;
18259
18266
  this._logService = _logService;
18260
18267
  _defineProperty(this, "_unitsByType", /* @__PURE__ */ new Map());
18268
+ _defineProperty(this, "_unitCreateOptions", /* @__PURE__ */ new Map());
18261
18269
  _defineProperty(this, "_createHandler", void 0);
18262
18270
  _defineProperty(this, "_ctorByType", /* @__PURE__ */ new Map());
18263
18271
  _defineProperty(this, "_currentUnits", /* @__PURE__ */ new Map());
@@ -18278,6 +18286,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18278
18286
  this._currentUnits.forEach((unit) => unit === null || unit === void 0 ? void 0 : unit.dispose());
18279
18287
  this._currentUnits.clear();
18280
18288
  this._unitsByType.clear();
18289
+ this._unitCreateOptions.clear();
18281
18290
  }
18282
18291
  __setCreateHandler(handler) {
18283
18292
  this._createHandler = handler;
@@ -18306,6 +18315,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18306
18315
  setCurrentUnitForType(unitId) {
18307
18316
  const result = this._getUnitById(unitId);
18308
18317
  if (!result) throw new Error(`[UniverInstanceService]: no document with unitId ${unitId}!`);
18318
+ if (this._currentUnits.get(result[1]) === result[0]) return;
18309
18319
  this._currentUnits.set(result[1], result[0]);
18310
18320
  this._currentUnits$.next(this._currentUnits);
18311
18321
  }
@@ -18328,6 +18338,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18328
18338
  const newUnitId = unit.getUnitId();
18329
18339
  if (units.findIndex((u) => u.getUnitId() === newUnitId) !== -1) throw new Error(`[UniverInstanceService]: cannot create a unit with the same unit id: ${newUnitId}.`);
18330
18340
  units.push(unit);
18341
+ if (options) this._unitCreateOptions.set(newUnitId, { ...options });
18331
18342
  this._unitAdded$.next({
18332
18343
  unit,
18333
18344
  options
@@ -18343,6 +18354,10 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18343
18354
  if (type && (unit === null || unit === void 0 ? void 0 : unit.type) !== type) return null;
18344
18355
  return unit;
18345
18356
  }
18357
+ getUnitCreateOptions(unitId) {
18358
+ var _this$_unitCreateOpti;
18359
+ return (_this$_unitCreateOpti = this._unitCreateOptions.get(unitId)) !== null && _this$_unitCreateOpti !== void 0 ? _this$_unitCreateOpti : null;
18360
+ }
18346
18361
  getCurrentUniverDocInstance() {
18347
18362
  return this.getCurrentUnitOfType(UniverInstanceType.UNIVER_DOC);
18348
18363
  }
@@ -18373,6 +18388,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18373
18388
  }
18374
18389
  focusUnit(id) {
18375
18390
  var _this$focused;
18391
+ if (this._focused$.getValue() === id) return;
18376
18392
  this._focused$.next(id);
18377
18393
  if (this.focused instanceof Workbook) {
18378
18394
  this._contextService.setContextValue(FOCUSING_UNIT, true);
@@ -18421,6 +18437,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18421
18437
  this._tryResetCurrentOnRemoval(unitId, type);
18422
18438
  this._tryResetFocusOnRemoval(unitId);
18423
18439
  this._unitDisposed$.next(unit);
18440
+ this._unitCreateOptions.delete(unitId);
18424
18441
  unit.dispose();
18425
18442
  return true;
18426
18443
  }
@@ -20815,6 +20832,11 @@ let ResourceLoaderService = class ResourceLoaderService extends Disposable {
20815
20832
  loadHookResource(hook, workbook.getUnitId(), workbook.getSnapshot().resources, "Workbook");
20816
20833
  });
20817
20834
  break;
20835
+ case UniverInstanceType.UNIVER_BASE:
20836
+ this._univerInstanceService.getAllUnitsForType(UniverInstanceType.UNIVER_BASE).forEach((base) => {
20837
+ loadHookResource(hook, base.getUnitId(), base.getSnapshot().resources, "Base");
20838
+ });
20839
+ break;
20818
20840
  }
20819
20841
  });
20820
20842
  };
@@ -20832,12 +20854,19 @@ let ResourceLoaderService = class ResourceLoaderService extends Disposable {
20832
20854
  const { unit: slide } = event;
20833
20855
  this._resourceManagerService.loadResources(slide.getUnitId(), slide.getSnapshot().resources);
20834
20856
  }));
20857
+ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_BASE).subscribe((event) => {
20858
+ const { unit: base } = event;
20859
+ this._resourceManagerService.loadResources(base.getUnitId(), base.getSnapshot().resources);
20860
+ }));
20835
20861
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {
20836
20862
  this._resourceManagerService.unloadResources(workbook.getUnitId(), UniverInstanceType.UNIVER_SHEET);
20837
20863
  }));
20838
20864
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_DOC).subscribe((doc) => {
20839
20865
  this._resourceManagerService.unloadResources(doc.getUnitId(), UniverInstanceType.UNIVER_DOC);
20840
20866
  }));
20867
+ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_BASE).subscribe((base) => {
20868
+ this._resourceManagerService.unloadResources(base.getUnitId(), UniverInstanceType.UNIVER_BASE);
20869
+ }));
20841
20870
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_SLIDE).subscribe((slide) => {
20842
20871
  this._resourceManagerService.unloadResources(slide.getUnitId(), UniverInstanceType.UNIVER_SLIDE);
20843
20872
  }));
@@ -21039,4 +21068,4 @@ function createUniverInjector(parentInjector, override) {
21039
21068
  installShims();
21040
21069
 
21041
21070
  //#endregion
21042
- export { ABCToNumber, AUTO_HEIGHT_FOR_MERGED_CELLS, AbsoluteRefType, ActionIterator, AlignTypeH, AlignTypeV, ArrangeTypeEnum, AsyncInterceptorManager, AsyncLock, AuthzIoLocalService, AutoFillSeries, BORDER_KEYS, BORDER_STYLE_KEYS, BaseDataModel, BaselineOffset, BlockType, BooleanNumber, BorderStyleTypes, BorderType, BuildTextUtils, BulletAlignment, COLORS, COLOR_STYLE_KEYS, COMMAND_LOG_EXECUTION_CONFIG_KEY, CanceledError, CellModeEnum, CellValueType, ColorKit, ColorType, ColumnLayoutType, ColumnResponsiveType, ColumnSeparatorType, CommandService, CommandType, CommonHideTypes, ConfigService, ContextService, CopyPasteType, CustomCommandExecutionError, CustomDecorationType, CustomRangeType, DEFAULT_CELL, DEFAULT_DOC, DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_ABOVE, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_BELOW, DEFAULT_DOCUMENT_SUB_COMPONENT_ID, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_NUMBER_FORMAT, DEFAULT_RANGE, DEFAULT_RANGE_ARRAY, DEFAULT_SELECTION, DEFAULT_STYLES, DEFAULT_TEXT_FORMAT, DEFAULT_TEXT_FORMAT_EXCEL, DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_COUNT_KEY, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY, DEFAULT_WORKSHEET_COLUMN_WIDTH, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY, DEFAULT_WORKSHEET_ROW_COUNT, DEFAULT_WORKSHEET_ROW_COUNT_KEY, DEFAULT_WORKSHEET_ROW_HEIGHT, DEFAULT_WORKSHEET_ROW_HEIGHT_KEY, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY, DOCS_COMMENT_EDITOR_UNIT_ID_KEY, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOC_DRAWING_PRINTING_COMPONENT_KEY, DOC_RANGE_TYPE, DashStyleType, DataStreamTreeNodeType, DataStreamTreeTokenType, DataValidationErrorStyle, DataValidationImeMode, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DependentOn, DesktopLogService, DeveloperMetadataVisibility, Dimension, Direction, Disposable, DisposableCollection, DocStyleType, DocumentBlockRangeType, DocumentBlockType, DocumentDataModel, DocumentFlavor, DrawingTypeEnum, EDITOR_ACTIVATED, EXTENSION_NAMES, ErrorService, EventState, EventSubject, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_DOC, FOCUSING_EDITOR_BUT_HIDDEN, FOCUSING_EDITOR_INPUT_FORMULA, FOCUSING_EDITOR_STANDALONE, FOCUSING_FX_BAR_EDITOR, FOCUSING_PANEL_EDITOR, FOCUSING_SHAPE_TEXT_EDITOR, FOCUSING_SHEET, FOCUSING_SLIDE, FOCUSING_UNIT, FOCUSING_UNIVER_EDITOR, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE, FORMULA_EDITOR_ACTIVATED, FollowNumberWithType, FontItalic, FontStyleType, FontWeight, GridType, HorizontalAlign, IAuthzIoService, ICommandService, IConfigService, IConfirmService, IContextService, IImageIoService, ILocalStorageService, ILogService, IMentionIOService, IPermissionService, IResourceLoaderService, IResourceManagerService, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE, IURLImageService, IUndoRedoService, IUniverInstanceService, ImageCacheMap, ImageSourceType, ImageUploadStatusType, Inject, InjectSelf, Injector, InterceptorEffectEnum, InterceptorManager, InterpolationPointType, json1 as JSON1, JSONX, LRUHelper, LRUMap, LifecycleService, LifecycleStages, LifecycleUnreachableError, ListGlyphType, LocalUndoRedoService, LocaleService, LocaleType, LogLevel, LookUp, MAX_COLUMN_COUNT, MAX_ROW_COUNT, MODERN_DOCUMENT_DEFAULT_MARGIN, MODERN_DOCUMENT_WIDTH, MOVE_BUFFER_VALUE, Many, MemoryCursor, MentionIOLocalService, MentionType, ModernDocumentWidthMode, NAMED_STYLE_MAP, NAMED_STYLE_SPACE_MAP, NamedStyleType, NilCommand, NumberUnitType, ObjectMatrix, ObjectRelativeFromH, ObjectRelativeFromV, Optional, PADDING_KEYS, PAGE_SIZE, PAPER_TYPES, PARAGRAPH_ID_PREFIX, PRESET_LIST_TYPE, PRINT_CHART_COMPONENT_KEY, PageOrientType, PaperType, ParagraphElementType, ParagraphStyleBuilder, ParagraphStyleValue, PermissionService, PermissionStatus, Plugin, PluginService, PositionedObjectLayoutType, PresetListType, ProtectionType, Quantity, QuickListType, QuickListTypeMap, RANGE_DIRECTION, RANGE_TYPE, RBush, RCDisposable, RESTORE_INSERTED_PARAGRAPH_IDS, RGBA_PAREN, RGB_PAREN, ROTATE_BUFFER_VALUE, RTree, Range, Rectangle, RediError, RedoCommand, RedoCommandId, RefAlias, Registry, RegistryAsMap, RelativeDate, ResourceManagerService, RichTextBuilder, RichTextValue, RxDisposable, SHEET_EDITOR_UNITS, STYLE_KEYS, SectionType, Self, SheetSkeleton, SheetTypes, SheetViewModel, Skeleton, SkipSelf, SliceBodyType, SpacingRule, Styles, TEXT_DECORATION_KEYS, TEXT_ROTATION_KEYS, THEME_COLORS, TabStopAlignment, TableAlignmentType, TableLayoutType, TableRowHeightRule, TableSizeType, TableTextWrapType, TestConfirmService, TextDecoration, TextDecorationBuilder, TextDirection, TextDirectionType, TextStyleBuilder, TextStyleValue, TextX, TextXActionType, ThemeColorType, ThemeColors, ThemeService, Tools, UndoCommand, UndoCommandId, UnitModel, Univer, UniverInstanceService, UniverInstanceType, UpdateDocsAttributeType, UserManagerService, VerticalAlign, VerticalAlignmentType, WithNew, Workbook, Worksheet, WrapStrategy, WrapTextType, addLinkToDocumentModel, afterInitApply, afterTime, awaitTime, binSearchFirstGreaterThanTarget, binarySearchArray, bufferDebounceTime, cellToRange, characterSpacingControlType, checkForSubstrings, checkIfMove, checkParagraphHasBullet, checkParagraphHasIndent, checkParagraphHasIndentByStyle, cloneBodyWithFreshParagraphIds, cloneCellData, cloneCellDataMatrix, cloneCellDataWithSpanAndDisplay, cloneParagraphWithId, cloneValue, cloneWorksheetData, codeToBlob, columnLabelToNumber, composeBody, composeInterceptors, composeStyles, concatMatrixArray, convertCellToRange, convertObservableToBehaviorSubject, covertCellValue, covertCellValues, createAsyncInterceptorKey, createDefaultBaseTableSnapshot, createDefaultUser, createDocumentModelWithStyle, createIdentifier, createInterceptorKey, createInternalEditorID, createParagraphId, createREGEXFromWildChar, createRandomId, createRowColIter, createSheetGapTestConfig, currencySymbols, customNameCharacterCheck, dateKit, debounce, dedupe, dedupeBy, deepCompare, delayAnimationFrame, deleteContent, escapeRegExp, extractPureTextFromCell, forwardRef, fromCallback, fromEventSubject, generateIntervalsByPoints, generateRandomId, get, getArrayLength, getBodySlice, getBorderStyleType, getCellCoordByIndexSimple, getCellInfoInMergeData, getCellValueType, getCellWithCoordByIndexCore, getColorStyle, getCustomBlockSlice, getCustomDecorationSlice, getCustomRangeSlice, getDisplayValueFromCell, getDocsUpdateBody, getEmptyBaseSnapshot, getEmptyCell, getIntersectRange, getNumfmtParseValueFilter, getOriginCellValue, getParagraphsSlice, getPlainText, getReverseDirection, getRichTextEditPath, getSectionBreakSlice, getTableSlice, getTextRunSlice, getTransformOffsetX, getTransformOffsetY, getWorksheetUID, groupBy, handleStyleToString, hashAlgorithm, horizontalLineSegmentsSubtraction, insertMatrixArray, insertTextToContent, invertColorByHSL, invertColorByMatrix, isAsyncDependencyItem, isAsyncHook, isBlackColor, isBooleanString, isCellCoverable, isCellV, isClassDependencyItem, isCommentEditorID, isCtor, isDefaultFormat, isDisposable, isEmptyCell, isFactoryDependencyItem, isFormulaId, isFormulaString, isICellData, isInternalEditorID, isNodeEnv, isNotNullOrUndefined, isNullCell, isNumeric, isPatternEqualWithoutDecimal, isRangesEqual, isRealNum, isSafeNumeric, isSafeUrl, isSameStyleTextRun, isTextFormat, isUnitRangesEqual, isValidRange, isValueDependencyItem, isWhiteColor, makeArray, makeCellRangeToRangeData, makeCellToSelection, makeCustomRangeStream, mapObjectMatrix, merge, mergeIntervals, mergeLocales, mergeOverrideWithDependencies, mergeSets, mergeWith, mergeWorksheetSnapshotWithDefault, mixinClass, moveMatrixArray, moveRangeByOffset, nameCharacterCheck, noop, normalizeBody, normalizeTextRuns, normalizeUrl, numberToABC, numberToListABC, numfmt, queryObjectMatrix, registerDependencies, remove, repeatStringNumTimes, replaceInDocumentBody, requestImmediateMacroTask, resolveWithBasePath, rotate, searchArray, searchInOrderedArray, selectionToArray, sequence, sequenceAsync, sequenceExecute, sequenceExecuteAsync, set, setDependencies, shallowEqual, skipParseTagNames, sliceMatrixArray, sortRules, sortRulesByDesc, sortRulesFactory, spliceArray, splitIntoGrid, takeAfter, throttle, toDisposable, touchDependencies, updateAttributeByDelete, updateAttributeByInsert, willLoseNumericPrecision };
21071
+ export { ABCToNumber, AUTO_HEIGHT_FOR_MERGED_CELLS, AbsoluteRefType, ActionIterator, AlignTypeH, AlignTypeV, ArrangeTypeEnum, AsyncInterceptorManager, AsyncLock, AuthzIoLocalService, AutoFillSeries, BORDER_KEYS, BORDER_STYLE_KEYS, BaseDataModel, BaselineOffset, BlockType, BooleanNumber, BorderStyleTypes, BorderType, BuildTextUtils, BulletAlignment, COLORS, COLOR_STYLE_KEYS, COMMAND_EXECUTION_INJECTOR_KEY, COMMAND_LOG_EXECUTION_CONFIG_KEY, CanceledError, CellModeEnum, CellValueType, ColorKit, ColorType, ColumnLayoutType, ColumnResponsiveType, ColumnSeparatorType, CommandService, CommandType, CommonHideTypes, ConfigService, ContextService, CopyPasteType, CustomCommandExecutionError, CustomDecorationType, CustomRangeType, DEFAULT_CELL, DEFAULT_DOC, DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_ABOVE, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_BELOW, DEFAULT_DOCUMENT_SUB_COMPONENT_ID, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_NUMBER_FORMAT, DEFAULT_RANGE, DEFAULT_RANGE_ARRAY, DEFAULT_SELECTION, DEFAULT_STYLES, DEFAULT_TEXT_FORMAT, DEFAULT_TEXT_FORMAT_EXCEL, DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_COUNT_KEY, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY, DEFAULT_WORKSHEET_COLUMN_WIDTH, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY, DEFAULT_WORKSHEET_ROW_COUNT, DEFAULT_WORKSHEET_ROW_COUNT_KEY, DEFAULT_WORKSHEET_ROW_HEIGHT, DEFAULT_WORKSHEET_ROW_HEIGHT_KEY, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY, DOCS_COMMENT_EDITOR_UNIT_ID_KEY, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOC_DRAWING_PRINTING_COMPONENT_KEY, DOC_RANGE_TYPE, DashStyleType, DataStreamTreeNodeType, DataStreamTreeTokenType, DataValidationErrorStyle, DataValidationImeMode, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DependentOn, DesktopLogService, DeveloperMetadataVisibility, Dimension, Direction, Disposable, DisposableCollection, DocStyleType, DocumentBlockRangeType, DocumentBlockType, DocumentDataModel, DocumentFlavor, DrawingTypeEnum, EDITOR_ACTIVATED, EXTENSION_NAMES, ErrorService, EventState, EventSubject, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_DOC, FOCUSING_EDITOR_BUT_HIDDEN, FOCUSING_EDITOR_INPUT_FORMULA, FOCUSING_EDITOR_STANDALONE, FOCUSING_FX_BAR_EDITOR, FOCUSING_PANEL_EDITOR, FOCUSING_SHAPE_TEXT_EDITOR, FOCUSING_SHEET, FOCUSING_SLIDE, FOCUSING_UNIT, FOCUSING_UNIVER_EDITOR, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE, FORMULA_EDITOR_ACTIVATED, FollowNumberWithType, FontItalic, FontStyleType, FontWeight, GridType, HorizontalAlign, IAuthzIoService, ICommandService, IConfigService, IConfirmService, IContextService, IImageIoService, ILocalStorageService, ILogService, IMentionIOService, IPermissionService, IResourceLoaderService, IResourceManagerService, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE, IURLImageService, IUndoRedoService, IUniverInstanceService, ImageCacheMap, ImageSourceType, ImageUploadStatusType, Inject, InjectSelf, Injector, InterceptorEffectEnum, InterceptorManager, InterpolationPointType, json1 as JSON1, JSONX, LRUHelper, LRUMap, LifecycleService, LifecycleStages, LifecycleUnreachableError, ListGlyphType, LocalUndoRedoService, LocaleService, LocaleType, LogLevel, LookUp, MAX_COLUMN_COUNT, MAX_ROW_COUNT, MODERN_DOCUMENT_DEFAULT_MARGIN, MODERN_DOCUMENT_WIDTH, MOVE_BUFFER_VALUE, Many, MemoryCursor, MentionIOLocalService, MentionType, ModernDocumentWidthMode, NAMED_STYLE_MAP, NAMED_STYLE_SPACE_MAP, NamedStyleType, NilCommand, NumberUnitType, ObjectMatrix, ObjectRelativeFromH, ObjectRelativeFromV, Optional, PADDING_KEYS, PAGE_SIZE, PAPER_TYPES, PARAGRAPH_ID_PREFIX, PRESET_LIST_TYPE, PRINT_CHART_COMPONENT_KEY, PageOrientType, PaperType, ParagraphElementType, ParagraphStyleBuilder, ParagraphStyleValue, PermissionService, PermissionStatus, Plugin, PluginService, PositionedObjectLayoutType, PresetListType, ProtectionType, Quantity, QuickListType, QuickListTypeMap, RANGE_DIRECTION, RANGE_TYPE, RBush, RCDisposable, RESTORE_INSERTED_PARAGRAPH_IDS, RGBA_PAREN, RGB_PAREN, ROTATE_BUFFER_VALUE, RTree, Range, Rectangle, RediError, RedoCommand, RedoCommandId, RefAlias, Registry, RegistryAsMap, RelativeDate, ResourceManagerService, RichTextBuilder, RichTextValue, RxDisposable, SHEET_EDITOR_UNITS, STYLE_KEYS, SectionType, Self, SheetSkeleton, SheetTypes, SheetViewModel, Skeleton, SkipSelf, SliceBodyType, SpacingRule, Styles, TEXT_DECORATION_KEYS, TEXT_ROTATION_KEYS, THEME_COLORS, TabStopAlignment, TableAlignmentType, TableLayoutType, TableRowHeightRule, TableSizeType, TableTextWrapType, TestConfirmService, TextDecoration, TextDecorationBuilder, TextDirection, TextDirectionType, TextStyleBuilder, TextStyleValue, TextX, TextXActionType, ThemeColorType, ThemeColors, ThemeService, Tools, UndoCommand, UndoCommandId, UnitModel, Univer, UniverInstanceService, UniverInstanceType, UpdateDocsAttributeType, UserManagerService, VerticalAlign, VerticalAlignmentType, WithNew, Workbook, Worksheet, WrapStrategy, WrapTextType, addLinkToDocumentModel, afterInitApply, afterTime, awaitTime, binSearchFirstGreaterThanTarget, binarySearchArray, bufferDebounceTime, cellToRange, characterSpacingControlType, checkForSubstrings, checkIfMove, checkParagraphHasBullet, checkParagraphHasIndent, checkParagraphHasIndentByStyle, cloneBodyWithFreshParagraphIds, cloneCellData, cloneCellDataMatrix, cloneCellDataWithSpanAndDisplay, cloneParagraphWithId, cloneValue, cloneWorksheetData, codeToBlob, columnLabelToNumber, composeBody, composeInterceptors, composeStyles, concatMatrixArray, convertCellToRange, convertObservableToBehaviorSubject, covertCellValue, covertCellValues, createAsyncInterceptorKey, createDefaultBaseTableSnapshot, createDefaultUser, createDocumentModelWithStyle, createIdentifier, createInterceptorKey, createInternalEditorID, createParagraphId, createREGEXFromWildChar, createRandomId, createRowColIter, createSheetGapTestConfig, currencySymbols, customNameCharacterCheck, dateKit, debounce, dedupe, dedupeBy, deepCompare, delayAnimationFrame, deleteContent, escapeRegExp, extractPureTextFromCell, forwardRef, fromCallback, fromEventSubject, generateIntervalsByPoints, generateRandomId, get, getArrayLength, getBodySlice, getBorderStyleType, getCellCoordByIndexSimple, getCellInfoInMergeData, getCellValueType, getCellWithCoordByIndexCore, getColorStyle, getCustomBlockSlice, getCustomDecorationSlice, getCustomRangeSlice, getDisplayValueFromCell, getDocsUpdateBody, getEmptyBaseSnapshot, getEmptyCell, getIntersectRange, getNumfmtParseValueFilter, getOriginCellValue, getParagraphsSlice, getPlainText, getReverseDirection, getRichTextEditPath, getSectionBreakSlice, getTableSlice, getTextRunSlice, getTransformOffsetX, getTransformOffsetY, getWorksheetUID, groupBy, handleStyleToString, hashAlgorithm, horizontalLineSegmentsSubtraction, insertMatrixArray, insertTextToContent, invertColorByHSL, invertColorByMatrix, isAsyncDependencyItem, isAsyncHook, isBlackColor, isBooleanString, isCellCoverable, isCellV, isClassDependencyItem, isCommentEditorID, isCtor, isDefaultFormat, isDisposable, isEmptyCell, isFactoryDependencyItem, isFormulaId, isFormulaString, isICellData, isInternalEditorID, isNodeEnv, isNotNullOrUndefined, isNullCell, isNumeric, isPatternEqualWithoutDecimal, isRangesEqual, isRealNum, isSafeNumeric, isSafeUrl, isSameStyleTextRun, isTextFormat, isUnitRangesEqual, isValidRange, isValueDependencyItem, isWhiteColor, makeArray, makeCellRangeToRangeData, makeCellToSelection, makeCustomRangeStream, mapObjectMatrix, merge, mergeIntervals, mergeLocales, mergeOverrideWithDependencies, mergeSets, mergeWith, mergeWorksheetSnapshotWithDefault, mixinClass, moveMatrixArray, moveRangeByOffset, nameCharacterCheck, noop, normalizeBody, normalizeTextRuns, normalizeUrl, numberToABC, numberToListABC, numfmt, queryObjectMatrix, registerDependencies, remove, repeatStringNumTimes, replaceInDocumentBody, requestImmediateMacroTask, resolveWithBasePath, rotate, searchArray, searchInOrderedArray, selectionToArray, sequence, sequenceAsync, sequenceExecute, sequenceExecuteAsync, set, setDependencies, shallowEqual, skipParseTagNames, sliceMatrixArray, sortRules, sortRulesByDesc, sortRulesFactory, spliceArray, splitIntoGrid, takeAfter, throttle, toDisposable, touchDependencies, updateAttributeByDelete, updateAttributeByInsert, willLoseNumericPrecision };
package/lib/index.js CHANGED
@@ -3373,6 +3373,10 @@ let DrawingTypeEnum = /* @__PURE__ */ function(DrawingTypeEnum) {
3373
3373
  * Dom element, allows inserting HTML elements as floating objects into the document
3374
3374
  */
3375
3375
  DrawingTypeEnum[DrawingTypeEnum["DRAWING_DOM"] = 8] = "DRAWING_DOM";
3376
+ /**
3377
+ * Block element, allows host products to place embeddable unit-backed blocks as drawing objects.
3378
+ */
3379
+ DrawingTypeEnum[DrawingTypeEnum["DRAWING_BLOCK"] = 9] = "DRAWING_BLOCK";
3376
3380
  return DrawingTypeEnum;
3377
3381
  }({});
3378
3382
 
@@ -4095,6 +4099,7 @@ let CommandType = /* @__PURE__ */ function(CommandType) {
4095
4099
  CommandType[CommandType["MUTATION"] = 2] = "MUTATION";
4096
4100
  return CommandType;
4097
4101
  }({});
4102
+ const COMMAND_EXECUTION_INJECTOR_KEY = Symbol("univer.command.execution-injector");
4098
4103
  /**
4099
4104
  * The identifier of the command service.
4100
4105
  */
@@ -4320,7 +4325,8 @@ let CommandService = class CommandService extends Disposable {
4320
4325
  this._commandExecutingLevel++;
4321
4326
  let result;
4322
4327
  try {
4323
- result = await this._injector.invoke(command.handler, params, options);
4328
+ var _options$COMMAND_EXEC;
4329
+ result = await ((_options$COMMAND_EXEC = options === null || options === void 0 ? void 0 : options[COMMAND_EXECUTION_INJECTOR_KEY]) !== null && _options$COMMAND_EXEC !== void 0 ? _options$COMMAND_EXEC : this._injector).invoke(command.handler, params, options);
4324
4330
  this._commandExecutingLevel--;
4325
4331
  } catch (e) {
4326
4332
  result = false;
@@ -4335,7 +4341,8 @@ let CommandService = class CommandService extends Disposable {
4335
4341
  this._commandExecutingLevel++;
4336
4342
  let result;
4337
4343
  try {
4338
- result = this._injector.invoke(command.handler, params, options);
4344
+ var _options$COMMAND_EXEC2;
4345
+ result = ((_options$COMMAND_EXEC2 = options === null || options === void 0 ? void 0 : options[COMMAND_EXECUTION_INJECTOR_KEY]) !== null && _options$COMMAND_EXEC2 !== void 0 ? _options$COMMAND_EXEC2 : this._injector).invoke(command.handler, params, options);
4339
4346
  if (result instanceof Promise) throw new TypeError("[CommandService]: Command handler should not return a promise.");
4340
4347
  this._commandExecutingLevel--;
4341
4348
  } catch (e) {
@@ -15716,7 +15723,7 @@ const IURLImageService = createIdentifier("core.url-image.service");
15716
15723
  //#endregion
15717
15724
  //#region package.json
15718
15725
  var name = "@univerjs/core";
15719
- var version = "1.0.0-alpha.1";
15726
+ var version = "1.0.0-insiders.20260701-0ef51b0";
15720
15727
 
15721
15728
  //#endregion
15722
15729
  //#region src/sheets/empty-snapshot.ts
@@ -18258,6 +18265,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18258
18265
  this._contextService = _contextService;
18259
18266
  this._logService = _logService;
18260
18267
  _defineProperty(this, "_unitsByType", /* @__PURE__ */ new Map());
18268
+ _defineProperty(this, "_unitCreateOptions", /* @__PURE__ */ new Map());
18261
18269
  _defineProperty(this, "_createHandler", void 0);
18262
18270
  _defineProperty(this, "_ctorByType", /* @__PURE__ */ new Map());
18263
18271
  _defineProperty(this, "_currentUnits", /* @__PURE__ */ new Map());
@@ -18278,6 +18286,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18278
18286
  this._currentUnits.forEach((unit) => unit === null || unit === void 0 ? void 0 : unit.dispose());
18279
18287
  this._currentUnits.clear();
18280
18288
  this._unitsByType.clear();
18289
+ this._unitCreateOptions.clear();
18281
18290
  }
18282
18291
  __setCreateHandler(handler) {
18283
18292
  this._createHandler = handler;
@@ -18306,6 +18315,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18306
18315
  setCurrentUnitForType(unitId) {
18307
18316
  const result = this._getUnitById(unitId);
18308
18317
  if (!result) throw new Error(`[UniverInstanceService]: no document with unitId ${unitId}!`);
18318
+ if (this._currentUnits.get(result[1]) === result[0]) return;
18309
18319
  this._currentUnits.set(result[1], result[0]);
18310
18320
  this._currentUnits$.next(this._currentUnits);
18311
18321
  }
@@ -18328,6 +18338,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18328
18338
  const newUnitId = unit.getUnitId();
18329
18339
  if (units.findIndex((u) => u.getUnitId() === newUnitId) !== -1) throw new Error(`[UniverInstanceService]: cannot create a unit with the same unit id: ${newUnitId}.`);
18330
18340
  units.push(unit);
18341
+ if (options) this._unitCreateOptions.set(newUnitId, { ...options });
18331
18342
  this._unitAdded$.next({
18332
18343
  unit,
18333
18344
  options
@@ -18343,6 +18354,10 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18343
18354
  if (type && (unit === null || unit === void 0 ? void 0 : unit.type) !== type) return null;
18344
18355
  return unit;
18345
18356
  }
18357
+ getUnitCreateOptions(unitId) {
18358
+ var _this$_unitCreateOpti;
18359
+ return (_this$_unitCreateOpti = this._unitCreateOptions.get(unitId)) !== null && _this$_unitCreateOpti !== void 0 ? _this$_unitCreateOpti : null;
18360
+ }
18346
18361
  getCurrentUniverDocInstance() {
18347
18362
  return this.getCurrentUnitOfType(UniverInstanceType.UNIVER_DOC);
18348
18363
  }
@@ -18373,6 +18388,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18373
18388
  }
18374
18389
  focusUnit(id) {
18375
18390
  var _this$focused;
18391
+ if (this._focused$.getValue() === id) return;
18376
18392
  this._focused$.next(id);
18377
18393
  if (this.focused instanceof Workbook) {
18378
18394
  this._contextService.setContextValue(FOCUSING_UNIT, true);
@@ -18421,6 +18437,7 @@ let UniverInstanceService = class UniverInstanceService extends Disposable {
18421
18437
  this._tryResetCurrentOnRemoval(unitId, type);
18422
18438
  this._tryResetFocusOnRemoval(unitId);
18423
18439
  this._unitDisposed$.next(unit);
18440
+ this._unitCreateOptions.delete(unitId);
18424
18441
  unit.dispose();
18425
18442
  return true;
18426
18443
  }
@@ -20815,6 +20832,11 @@ let ResourceLoaderService = class ResourceLoaderService extends Disposable {
20815
20832
  loadHookResource(hook, workbook.getUnitId(), workbook.getSnapshot().resources, "Workbook");
20816
20833
  });
20817
20834
  break;
20835
+ case UniverInstanceType.UNIVER_BASE:
20836
+ this._univerInstanceService.getAllUnitsForType(UniverInstanceType.UNIVER_BASE).forEach((base) => {
20837
+ loadHookResource(hook, base.getUnitId(), base.getSnapshot().resources, "Base");
20838
+ });
20839
+ break;
20818
20840
  }
20819
20841
  });
20820
20842
  };
@@ -20832,12 +20854,19 @@ let ResourceLoaderService = class ResourceLoaderService extends Disposable {
20832
20854
  const { unit: slide } = event;
20833
20855
  this._resourceManagerService.loadResources(slide.getUnitId(), slide.getSnapshot().resources);
20834
20856
  }));
20857
+ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(UniverInstanceType.UNIVER_BASE).subscribe((event) => {
20858
+ const { unit: base } = event;
20859
+ this._resourceManagerService.loadResources(base.getUnitId(), base.getSnapshot().resources);
20860
+ }));
20835
20861
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_SHEET).subscribe((workbook) => {
20836
20862
  this._resourceManagerService.unloadResources(workbook.getUnitId(), UniverInstanceType.UNIVER_SHEET);
20837
20863
  }));
20838
20864
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_DOC).subscribe((doc) => {
20839
20865
  this._resourceManagerService.unloadResources(doc.getUnitId(), UniverInstanceType.UNIVER_DOC);
20840
20866
  }));
20867
+ this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_BASE).subscribe((base) => {
20868
+ this._resourceManagerService.unloadResources(base.getUnitId(), UniverInstanceType.UNIVER_BASE);
20869
+ }));
20841
20870
  this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(UniverInstanceType.UNIVER_SLIDE).subscribe((slide) => {
20842
20871
  this._resourceManagerService.unloadResources(slide.getUnitId(), UniverInstanceType.UNIVER_SLIDE);
20843
20872
  }));
@@ -21039,4 +21068,4 @@ function createUniverInjector(parentInjector, override) {
21039
21068
  installShims();
21040
21069
 
21041
21070
  //#endregion
21042
- export { ABCToNumber, AUTO_HEIGHT_FOR_MERGED_CELLS, AbsoluteRefType, ActionIterator, AlignTypeH, AlignTypeV, ArrangeTypeEnum, AsyncInterceptorManager, AsyncLock, AuthzIoLocalService, AutoFillSeries, BORDER_KEYS, BORDER_STYLE_KEYS, BaseDataModel, BaselineOffset, BlockType, BooleanNumber, BorderStyleTypes, BorderType, BuildTextUtils, BulletAlignment, COLORS, COLOR_STYLE_KEYS, COMMAND_LOG_EXECUTION_CONFIG_KEY, CanceledError, CellModeEnum, CellValueType, ColorKit, ColorType, ColumnLayoutType, ColumnResponsiveType, ColumnSeparatorType, CommandService, CommandType, CommonHideTypes, ConfigService, ContextService, CopyPasteType, CustomCommandExecutionError, CustomDecorationType, CustomRangeType, DEFAULT_CELL, DEFAULT_DOC, DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_ABOVE, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_BELOW, DEFAULT_DOCUMENT_SUB_COMPONENT_ID, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_NUMBER_FORMAT, DEFAULT_RANGE, DEFAULT_RANGE_ARRAY, DEFAULT_SELECTION, DEFAULT_STYLES, DEFAULT_TEXT_FORMAT, DEFAULT_TEXT_FORMAT_EXCEL, DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_COUNT_KEY, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY, DEFAULT_WORKSHEET_COLUMN_WIDTH, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY, DEFAULT_WORKSHEET_ROW_COUNT, DEFAULT_WORKSHEET_ROW_COUNT_KEY, DEFAULT_WORKSHEET_ROW_HEIGHT, DEFAULT_WORKSHEET_ROW_HEIGHT_KEY, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY, DOCS_COMMENT_EDITOR_UNIT_ID_KEY, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOC_DRAWING_PRINTING_COMPONENT_KEY, DOC_RANGE_TYPE, DashStyleType, DataStreamTreeNodeType, DataStreamTreeTokenType, DataValidationErrorStyle, DataValidationImeMode, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DependentOn, DesktopLogService, DeveloperMetadataVisibility, Dimension, Direction, Disposable, DisposableCollection, DocStyleType, DocumentBlockRangeType, DocumentBlockType, DocumentDataModel, DocumentFlavor, DrawingTypeEnum, EDITOR_ACTIVATED, EXTENSION_NAMES, ErrorService, EventState, EventSubject, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_DOC, FOCUSING_EDITOR_BUT_HIDDEN, FOCUSING_EDITOR_INPUT_FORMULA, FOCUSING_EDITOR_STANDALONE, FOCUSING_FX_BAR_EDITOR, FOCUSING_PANEL_EDITOR, FOCUSING_SHAPE_TEXT_EDITOR, FOCUSING_SHEET, FOCUSING_SLIDE, FOCUSING_UNIT, FOCUSING_UNIVER_EDITOR, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE, FORMULA_EDITOR_ACTIVATED, FollowNumberWithType, FontItalic, FontStyleType, FontWeight, GridType, HorizontalAlign, IAuthzIoService, ICommandService, IConfigService, IConfirmService, IContextService, IImageIoService, ILocalStorageService, ILogService, IMentionIOService, IPermissionService, IResourceLoaderService, IResourceManagerService, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE, IURLImageService, IUndoRedoService, IUniverInstanceService, ImageCacheMap, ImageSourceType, ImageUploadStatusType, Inject, InjectSelf, Injector, InterceptorEffectEnum, InterceptorManager, InterpolationPointType, json1 as JSON1, JSONX, LRUHelper, LRUMap, LifecycleService, LifecycleStages, LifecycleUnreachableError, ListGlyphType, LocalUndoRedoService, LocaleService, LocaleType, LogLevel, LookUp, MAX_COLUMN_COUNT, MAX_ROW_COUNT, MODERN_DOCUMENT_DEFAULT_MARGIN, MODERN_DOCUMENT_WIDTH, MOVE_BUFFER_VALUE, Many, MemoryCursor, MentionIOLocalService, MentionType, ModernDocumentWidthMode, NAMED_STYLE_MAP, NAMED_STYLE_SPACE_MAP, NamedStyleType, NilCommand, NumberUnitType, ObjectMatrix, ObjectRelativeFromH, ObjectRelativeFromV, Optional, PADDING_KEYS, PAGE_SIZE, PAPER_TYPES, PARAGRAPH_ID_PREFIX, PRESET_LIST_TYPE, PRINT_CHART_COMPONENT_KEY, PageOrientType, PaperType, ParagraphElementType, ParagraphStyleBuilder, ParagraphStyleValue, PermissionService, PermissionStatus, Plugin, PluginService, PositionedObjectLayoutType, PresetListType, ProtectionType, Quantity, QuickListType, QuickListTypeMap, RANGE_DIRECTION, RANGE_TYPE, RBush, RCDisposable, RESTORE_INSERTED_PARAGRAPH_IDS, RGBA_PAREN, RGB_PAREN, ROTATE_BUFFER_VALUE, RTree, Range, Rectangle, RediError, RedoCommand, RedoCommandId, RefAlias, Registry, RegistryAsMap, RelativeDate, ResourceManagerService, RichTextBuilder, RichTextValue, RxDisposable, SHEET_EDITOR_UNITS, STYLE_KEYS, SectionType, Self, SheetSkeleton, SheetTypes, SheetViewModel, Skeleton, SkipSelf, SliceBodyType, SpacingRule, Styles, TEXT_DECORATION_KEYS, TEXT_ROTATION_KEYS, THEME_COLORS, TabStopAlignment, TableAlignmentType, TableLayoutType, TableRowHeightRule, TableSizeType, TableTextWrapType, TestConfirmService, TextDecoration, TextDecorationBuilder, TextDirection, TextDirectionType, TextStyleBuilder, TextStyleValue, TextX, TextXActionType, ThemeColorType, ThemeColors, ThemeService, Tools, UndoCommand, UndoCommandId, UnitModel, Univer, UniverInstanceService, UniverInstanceType, UpdateDocsAttributeType, UserManagerService, VerticalAlign, VerticalAlignmentType, WithNew, Workbook, Worksheet, WrapStrategy, WrapTextType, addLinkToDocumentModel, afterInitApply, afterTime, awaitTime, binSearchFirstGreaterThanTarget, binarySearchArray, bufferDebounceTime, cellToRange, characterSpacingControlType, checkForSubstrings, checkIfMove, checkParagraphHasBullet, checkParagraphHasIndent, checkParagraphHasIndentByStyle, cloneBodyWithFreshParagraphIds, cloneCellData, cloneCellDataMatrix, cloneCellDataWithSpanAndDisplay, cloneParagraphWithId, cloneValue, cloneWorksheetData, codeToBlob, columnLabelToNumber, composeBody, composeInterceptors, composeStyles, concatMatrixArray, convertCellToRange, convertObservableToBehaviorSubject, covertCellValue, covertCellValues, createAsyncInterceptorKey, createDefaultBaseTableSnapshot, createDefaultUser, createDocumentModelWithStyle, createIdentifier, createInterceptorKey, createInternalEditorID, createParagraphId, createREGEXFromWildChar, createRandomId, createRowColIter, createSheetGapTestConfig, currencySymbols, customNameCharacterCheck, dateKit, debounce, dedupe, dedupeBy, deepCompare, delayAnimationFrame, deleteContent, escapeRegExp, extractPureTextFromCell, forwardRef, fromCallback, fromEventSubject, generateIntervalsByPoints, generateRandomId, get, getArrayLength, getBodySlice, getBorderStyleType, getCellCoordByIndexSimple, getCellInfoInMergeData, getCellValueType, getCellWithCoordByIndexCore, getColorStyle, getCustomBlockSlice, getCustomDecorationSlice, getCustomRangeSlice, getDisplayValueFromCell, getDocsUpdateBody, getEmptyBaseSnapshot, getEmptyCell, getIntersectRange, getNumfmtParseValueFilter, getOriginCellValue, getParagraphsSlice, getPlainText, getReverseDirection, getRichTextEditPath, getSectionBreakSlice, getTableSlice, getTextRunSlice, getTransformOffsetX, getTransformOffsetY, getWorksheetUID, groupBy, handleStyleToString, hashAlgorithm, horizontalLineSegmentsSubtraction, insertMatrixArray, insertTextToContent, invertColorByHSL, invertColorByMatrix, isAsyncDependencyItem, isAsyncHook, isBlackColor, isBooleanString, isCellCoverable, isCellV, isClassDependencyItem, isCommentEditorID, isCtor, isDefaultFormat, isDisposable, isEmptyCell, isFactoryDependencyItem, isFormulaId, isFormulaString, isICellData, isInternalEditorID, isNodeEnv, isNotNullOrUndefined, isNullCell, isNumeric, isPatternEqualWithoutDecimal, isRangesEqual, isRealNum, isSafeNumeric, isSafeUrl, isSameStyleTextRun, isTextFormat, isUnitRangesEqual, isValidRange, isValueDependencyItem, isWhiteColor, makeArray, makeCellRangeToRangeData, makeCellToSelection, makeCustomRangeStream, mapObjectMatrix, merge, mergeIntervals, mergeLocales, mergeOverrideWithDependencies, mergeSets, mergeWith, mergeWorksheetSnapshotWithDefault, mixinClass, moveMatrixArray, moveRangeByOffset, nameCharacterCheck, noop, normalizeBody, normalizeTextRuns, normalizeUrl, numberToABC, numberToListABC, numfmt, queryObjectMatrix, registerDependencies, remove, repeatStringNumTimes, replaceInDocumentBody, requestImmediateMacroTask, resolveWithBasePath, rotate, searchArray, searchInOrderedArray, selectionToArray, sequence, sequenceAsync, sequenceExecute, sequenceExecuteAsync, set, setDependencies, shallowEqual, skipParseTagNames, sliceMatrixArray, sortRules, sortRulesByDesc, sortRulesFactory, spliceArray, splitIntoGrid, takeAfter, throttle, toDisposable, touchDependencies, updateAttributeByDelete, updateAttributeByInsert, willLoseNumericPrecision };
21071
+ export { ABCToNumber, AUTO_HEIGHT_FOR_MERGED_CELLS, AbsoluteRefType, ActionIterator, AlignTypeH, AlignTypeV, ArrangeTypeEnum, AsyncInterceptorManager, AsyncLock, AuthzIoLocalService, AutoFillSeries, BORDER_KEYS, BORDER_STYLE_KEYS, BaseDataModel, BaselineOffset, BlockType, BooleanNumber, BorderStyleTypes, BorderType, BuildTextUtils, BulletAlignment, COLORS, COLOR_STYLE_KEYS, COMMAND_EXECUTION_INJECTOR_KEY, COMMAND_LOG_EXECUTION_CONFIG_KEY, CanceledError, CellModeEnum, CellValueType, ColorKit, ColorType, ColumnLayoutType, ColumnResponsiveType, ColumnSeparatorType, CommandService, CommandType, CommonHideTypes, ConfigService, ContextService, CopyPasteType, CustomCommandExecutionError, CustomDecorationType, CustomRangeType, DEFAULT_CELL, DEFAULT_DOC, DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_ABOVE, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_BELOW, DEFAULT_DOCUMENT_SUB_COMPONENT_ID, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_NUMBER_FORMAT, DEFAULT_RANGE, DEFAULT_RANGE_ARRAY, DEFAULT_SELECTION, DEFAULT_STYLES, DEFAULT_TEXT_FORMAT, DEFAULT_TEXT_FORMAT_EXCEL, DEFAULT_WORKSHEET_COLUMN_COUNT, DEFAULT_WORKSHEET_COLUMN_COUNT_KEY, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT, DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY, DEFAULT_WORKSHEET_COLUMN_WIDTH, DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY, DEFAULT_WORKSHEET_ROW_COUNT, DEFAULT_WORKSHEET_ROW_COUNT_KEY, DEFAULT_WORKSHEET_ROW_HEIGHT, DEFAULT_WORKSHEET_ROW_HEIGHT_KEY, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH, DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY, DOCS_COMMENT_EDITOR_UNIT_ID_KEY, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOC_DRAWING_PRINTING_COMPONENT_KEY, DOC_RANGE_TYPE, DashStyleType, DataStreamTreeNodeType, DataStreamTreeTokenType, DataValidationErrorStyle, DataValidationImeMode, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DependentOn, DesktopLogService, DeveloperMetadataVisibility, Dimension, Direction, Disposable, DisposableCollection, DocStyleType, DocumentBlockRangeType, DocumentBlockType, DocumentDataModel, DocumentFlavor, DrawingTypeEnum, EDITOR_ACTIVATED, EXTENSION_NAMES, ErrorService, EventState, EventSubject, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_DOC, FOCUSING_EDITOR_BUT_HIDDEN, FOCUSING_EDITOR_INPUT_FORMULA, FOCUSING_EDITOR_STANDALONE, FOCUSING_FX_BAR_EDITOR, FOCUSING_PANEL_EDITOR, FOCUSING_SHAPE_TEXT_EDITOR, FOCUSING_SHEET, FOCUSING_SLIDE, FOCUSING_UNIT, FOCUSING_UNIVER_EDITOR, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE, FORMULA_EDITOR_ACTIVATED, FollowNumberWithType, FontItalic, FontStyleType, FontWeight, GridType, HorizontalAlign, IAuthzIoService, ICommandService, IConfigService, IConfirmService, IContextService, IImageIoService, ILocalStorageService, ILogService, IMentionIOService, IPermissionService, IResourceLoaderService, IResourceManagerService, IS_ROW_STYLE_PRECEDE_COLUMN_STYLE, IURLImageService, IUndoRedoService, IUniverInstanceService, ImageCacheMap, ImageSourceType, ImageUploadStatusType, Inject, InjectSelf, Injector, InterceptorEffectEnum, InterceptorManager, InterpolationPointType, json1 as JSON1, JSONX, LRUHelper, LRUMap, LifecycleService, LifecycleStages, LifecycleUnreachableError, ListGlyphType, LocalUndoRedoService, LocaleService, LocaleType, LogLevel, LookUp, MAX_COLUMN_COUNT, MAX_ROW_COUNT, MODERN_DOCUMENT_DEFAULT_MARGIN, MODERN_DOCUMENT_WIDTH, MOVE_BUFFER_VALUE, Many, MemoryCursor, MentionIOLocalService, MentionType, ModernDocumentWidthMode, NAMED_STYLE_MAP, NAMED_STYLE_SPACE_MAP, NamedStyleType, NilCommand, NumberUnitType, ObjectMatrix, ObjectRelativeFromH, ObjectRelativeFromV, Optional, PADDING_KEYS, PAGE_SIZE, PAPER_TYPES, PARAGRAPH_ID_PREFIX, PRESET_LIST_TYPE, PRINT_CHART_COMPONENT_KEY, PageOrientType, PaperType, ParagraphElementType, ParagraphStyleBuilder, ParagraphStyleValue, PermissionService, PermissionStatus, Plugin, PluginService, PositionedObjectLayoutType, PresetListType, ProtectionType, Quantity, QuickListType, QuickListTypeMap, RANGE_DIRECTION, RANGE_TYPE, RBush, RCDisposable, RESTORE_INSERTED_PARAGRAPH_IDS, RGBA_PAREN, RGB_PAREN, ROTATE_BUFFER_VALUE, RTree, Range, Rectangle, RediError, RedoCommand, RedoCommandId, RefAlias, Registry, RegistryAsMap, RelativeDate, ResourceManagerService, RichTextBuilder, RichTextValue, RxDisposable, SHEET_EDITOR_UNITS, STYLE_KEYS, SectionType, Self, SheetSkeleton, SheetTypes, SheetViewModel, Skeleton, SkipSelf, SliceBodyType, SpacingRule, Styles, TEXT_DECORATION_KEYS, TEXT_ROTATION_KEYS, THEME_COLORS, TabStopAlignment, TableAlignmentType, TableLayoutType, TableRowHeightRule, TableSizeType, TableTextWrapType, TestConfirmService, TextDecoration, TextDecorationBuilder, TextDirection, TextDirectionType, TextStyleBuilder, TextStyleValue, TextX, TextXActionType, ThemeColorType, ThemeColors, ThemeService, Tools, UndoCommand, UndoCommandId, UnitModel, Univer, UniverInstanceService, UniverInstanceType, UpdateDocsAttributeType, UserManagerService, VerticalAlign, VerticalAlignmentType, WithNew, Workbook, Worksheet, WrapStrategy, WrapTextType, addLinkToDocumentModel, afterInitApply, afterTime, awaitTime, binSearchFirstGreaterThanTarget, binarySearchArray, bufferDebounceTime, cellToRange, characterSpacingControlType, checkForSubstrings, checkIfMove, checkParagraphHasBullet, checkParagraphHasIndent, checkParagraphHasIndentByStyle, cloneBodyWithFreshParagraphIds, cloneCellData, cloneCellDataMatrix, cloneCellDataWithSpanAndDisplay, cloneParagraphWithId, cloneValue, cloneWorksheetData, codeToBlob, columnLabelToNumber, composeBody, composeInterceptors, composeStyles, concatMatrixArray, convertCellToRange, convertObservableToBehaviorSubject, covertCellValue, covertCellValues, createAsyncInterceptorKey, createDefaultBaseTableSnapshot, createDefaultUser, createDocumentModelWithStyle, createIdentifier, createInterceptorKey, createInternalEditorID, createParagraphId, createREGEXFromWildChar, createRandomId, createRowColIter, createSheetGapTestConfig, currencySymbols, customNameCharacterCheck, dateKit, debounce, dedupe, dedupeBy, deepCompare, delayAnimationFrame, deleteContent, escapeRegExp, extractPureTextFromCell, forwardRef, fromCallback, fromEventSubject, generateIntervalsByPoints, generateRandomId, get, getArrayLength, getBodySlice, getBorderStyleType, getCellCoordByIndexSimple, getCellInfoInMergeData, getCellValueType, getCellWithCoordByIndexCore, getColorStyle, getCustomBlockSlice, getCustomDecorationSlice, getCustomRangeSlice, getDisplayValueFromCell, getDocsUpdateBody, getEmptyBaseSnapshot, getEmptyCell, getIntersectRange, getNumfmtParseValueFilter, getOriginCellValue, getParagraphsSlice, getPlainText, getReverseDirection, getRichTextEditPath, getSectionBreakSlice, getTableSlice, getTextRunSlice, getTransformOffsetX, getTransformOffsetY, getWorksheetUID, groupBy, handleStyleToString, hashAlgorithm, horizontalLineSegmentsSubtraction, insertMatrixArray, insertTextToContent, invertColorByHSL, invertColorByMatrix, isAsyncDependencyItem, isAsyncHook, isBlackColor, isBooleanString, isCellCoverable, isCellV, isClassDependencyItem, isCommentEditorID, isCtor, isDefaultFormat, isDisposable, isEmptyCell, isFactoryDependencyItem, isFormulaId, isFormulaString, isICellData, isInternalEditorID, isNodeEnv, isNotNullOrUndefined, isNullCell, isNumeric, isPatternEqualWithoutDecimal, isRangesEqual, isRealNum, isSafeNumeric, isSafeUrl, isSameStyleTextRun, isTextFormat, isUnitRangesEqual, isValidRange, isValueDependencyItem, isWhiteColor, makeArray, makeCellRangeToRangeData, makeCellToSelection, makeCustomRangeStream, mapObjectMatrix, merge, mergeIntervals, mergeLocales, mergeOverrideWithDependencies, mergeSets, mergeWith, mergeWorksheetSnapshotWithDefault, mixinClass, moveMatrixArray, moveRangeByOffset, nameCharacterCheck, noop, normalizeBody, normalizeTextRuns, normalizeUrl, numberToABC, numberToListABC, numfmt, queryObjectMatrix, registerDependencies, remove, repeatStringNumTimes, replaceInDocumentBody, requestImmediateMacroTask, resolveWithBasePath, rotate, searchArray, searchInOrderedArray, selectionToArray, sequence, sequenceAsync, sequenceExecute, sequenceExecuteAsync, set, setDependencies, shallowEqual, skipParseTagNames, sliceMatrixArray, sortRules, sortRulesByDesc, sortRulesFactory, spliceArray, splitIntoGrid, takeAfter, throttle, toDisposable, touchDependencies, updateAttributeByDelete, updateAttributeByInsert, willLoseNumericPrecision };
@@ -61,7 +61,7 @@ export { EventState, EventSubject, fromEventSubject } from './observer/observabl
61
61
  export type { IEventObserver } from './observer/observable';
62
62
  export { AuthzIoLocalService } from './services/authz-io/authz-io-local.service';
63
63
  export { IAuthzIoService } from './services/authz-io/type';
64
- export { COMMAND_LOG_EXECUTION_CONFIG_KEY, CommandService, CommandType, ICommandService, NilCommand, sequenceExecute, sequenceExecuteAsync, } from './services/command/command.service';
64
+ export { COMMAND_EXECUTION_INJECTOR_KEY, COMMAND_LOG_EXECUTION_CONFIG_KEY, CommandService, CommandType, ICommandService, NilCommand, sequenceExecute, sequenceExecuteAsync, } from './services/command/command.service';
65
65
  export type { CommandListener, ICommand, ICommandInfo, IExecutionOptions, IMultiCommand, IMutation, IMutationCommonParams, IMutationInfo, IOperation, IOperationInfo, } from './services/command/command.service';
66
66
  export { IConfigService } from './services/config/config.service';
67
67
  export { ConfigService } from './services/config/config.service';
@@ -179,9 +179,18 @@ export interface IExecutionOptions {
179
179
  * The actual execution will be handled asynchronously via onlyLocal.
180
180
  */
181
181
  syncOnly?: boolean;
182
- [key: PropertyKey]: string | number | boolean | undefined;
182
+ /**
183
+ * Execute the command handler against a scoped injector for this invocation.
184
+ * This is intentionally stored under a symbol so sync/remote serializers that
185
+ * stringify execution options do not treat the injector as command payload.
186
+ */
187
+ [COMMAND_EXECUTION_INJECTOR_KEY]?: Injector;
188
+ [key: string]: string | number | boolean | undefined;
189
+ [key: number]: string | number | boolean | undefined;
190
+ [key: symbol]: unknown;
183
191
  }
184
192
  export type CommandListener = (commandInfo: Readonly<ICommandInfo>, options?: IExecutionOptions) => void;
193
+ export declare const COMMAND_EXECUTION_INJECTOR_KEY: unique symbol;
185
194
  /**
186
195
  * The identifier of the command service.
187
196
  */
@@ -32,6 +32,28 @@ export interface ICreateUnitOptions {
32
32
  * @default true
33
33
  */
34
34
  makeCurrent?: boolean;
35
+ /**
36
+ * If product UI render services should skip their default main-canvas render
37
+ * creation. Embedded units create their render explicitly into a host-owned
38
+ * container instead.
39
+ *
40
+ * @default false
41
+ */
42
+ skipAutoRender?: boolean;
43
+ /**
44
+ * If render services should create the render unit as an embedded/non-main
45
+ * render. Embedded renders are mounted explicitly by a host container and
46
+ * must not mutate global workbench state while resolving their local view.
47
+ *
48
+ * @default false
49
+ */
50
+ embeddedRender?: boolean;
51
+ /**
52
+ * Optional parent injector for an embedded render unit. Render modules will
53
+ * resolve their dependencies from this injector before falling back to the
54
+ * root injector.
55
+ */
56
+ renderParentInjector?: Injector;
35
57
  }
36
58
  interface ICreateUnitEvent<T extends UnitModel = UnitModel> {
37
59
  unit: T;
@@ -71,6 +93,8 @@ export interface IUniverInstanceService {
71
93
  getCurrentTypeOfUnit$<T extends UnitModel>(type: UniverInstanceType): Observable<Nullable<T>>;
72
94
  /** Create a unit with snapshot info. */
73
95
  createUnit<T, U extends UnitModel>(type: UniverInstanceType, data: Partial<T>, options?: ICreateUnitOptions): U;
96
+ /** Get the options originally used to create a unit. */
97
+ getUnitCreateOptions(unitId: string): Nullable<ICreateUnitOptions>;
74
98
  /** Dispose a unit */
75
99
  disposeUnit(unitId: string): boolean;
76
100
  registerCtorForType<T extends UnitModel>(type: UniverInstanceType, ctor: new (...args: any[]) => T): IDisposable;
@@ -92,6 +116,7 @@ export declare class UniverInstanceService extends Disposable implements IUniver
92
116
  private readonly _contextService;
93
117
  private readonly _logService;
94
118
  private readonly _unitsByType;
119
+ private readonly _unitCreateOptions;
95
120
  constructor(_injector: Injector, _contextService: IContextService, _logService: ILogService);
96
121
  dispose(): void;
97
122
  private _createHandler;
@@ -121,6 +146,7 @@ export declare class UniverInstanceService extends Disposable implements IUniver
121
146
  readonly unitDisposed$: Observable<UnitModel<object, UniverInstanceType>>;
122
147
  getTypeOfUnitDisposed$<T extends UnitModel<object, number>>(type: UniverInstanceType): Observable<T>;
123
148
  getUnit<T extends UnitModel = UnitModel>(id: string, type?: UniverInstanceType): Nullable<T>;
149
+ getUnitCreateOptions(unitId: string): Nullable<ICreateUnitOptions>;
124
150
  getCurrentUniverDocInstance(): Nullable<DocumentDataModel>;
125
151
  getUniverDocInstance(unitId: string): Nullable<DocumentDataModel>;
126
152
  getUniverSheetInstance(unitId: string): Nullable<Workbook>;
@@ -21,7 +21,7 @@ export type IResources = Array<{
21
21
  name: string;
22
22
  data: string;
23
23
  }>;
24
- type IBusinessName = 'SHEET' | 'DOC' | 'SLIDE';
24
+ type IBusinessName = 'SHEET' | 'DOC' | 'SLIDE' | 'BASE' | 'UNIVER';
25
25
  export type IResourceName = `${IBusinessName}_${string}_PLUGIN`;
26
26
  export interface IResourceHook<T = any> {
27
27
  pluginName: IResourceName;
@@ -80,7 +80,11 @@ export declare enum DrawingTypeEnum {
80
80
  /**
81
81
  * Dom element, allows inserting HTML elements as floating objects into the document
82
82
  */
83
- DRAWING_DOM = 8
83
+ DRAWING_DOM = 8,
84
+ /**
85
+ * Block element, allows host products to place embeddable unit-backed blocks as drawing objects.
86
+ */
87
+ DRAWING_BLOCK = 9
84
88
  }
85
89
  export type DrawingType = DrawingTypeEnum | number;
86
90
  export interface IDrawingSpace {