@univerjs/core 0.2.4-alpha.0 → 0.2.5

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.
@@ -15,6 +15,7 @@
15
15
  */
16
16
  export declare const DOCS_NORMAL_EDITOR_UNIT_ID_KEY = "__INTERNAL_EDITOR__DOCS_NORMAL";
17
17
  export declare const DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY = "__INTERNAL_EDITOR__DOCS_FORMULA_BAR";
18
+ export declare const DOCS_ZEN_EDITOR_UNIT_ID_KEY = "__defaultDocumentZenEditorSpecialUnitId_20231218__";
18
19
  export declare const DEFAULT_EMPTY_DOCUMENT_VALUE = "\r\n";
19
20
  export declare function createInternalEditorID(id: string): string;
20
21
  export declare function isInternalEditorID(id: string): boolean;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export type Serializable = {
17
+ [property: string]: Serializable;
18
+ } | readonly Serializable[] | string | number | boolean | null;
@@ -16,6 +16,7 @@ export declare class TextX {
16
16
  insert(len: number, body: IDocumentBody, segmentId?: string): this;
17
17
  retain(len: number, segmentId?: string, body?: IDocumentBody, coverType?: UpdateDocsAttributeType): this;
18
18
  delete(len: number, segmentId?: string): this;
19
+ empty(): this;
19
20
  serialize(): TextXAction[];
20
21
  push(...args: TextXAction[]): this;
21
22
  protected trimEndUselessRetainAction(): this;
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ export type { Serializable } from './common/json';
16
17
  export { DEFAULT_DOCUMENT_SUB_COMPONENT_ID } from './docs/data-model/subdocument';
17
18
  export { type UnitType, UnitModel, UniverInstanceType } from './common/unit';
18
19
  export { Registry, RegistryAsMap } from './common/registry';
@@ -22,7 +23,7 @@ export { isNumeric, isSafeNumeric } from './common/number';
22
23
  export { isBooleanString } from './common/boolean';
23
24
  export { dedupe, remove, rotate, groupBy, makeArray } from './common/array';
24
25
  export { mergeSets } from './common/set';
25
- export { DEFAULT_EMPTY_DOCUMENT_VALUE, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, createInternalEditorID, isInternalEditorID, } from './common/const';
26
+ export { DEFAULT_EMPTY_DOCUMENT_VALUE, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOCS_ZEN_EDITOR_UNIT_ID_KEY, createInternalEditorID, isInternalEditorID, } from './common/const';
26
27
  export { throttle } from './common/function';
27
28
  export { MemoryCursor } from './common/memory-cursor';
28
29
  export { requestImmediateMacroTask } from './common/request-immediate-macro-task';
@@ -37,7 +38,7 @@ export type { TPriority } from './docs/data-model/text-x/text-x';
37
38
  export { JSONX, JSON1 } from './docs/data-model/json-x/json-x';
38
39
  export type { JSONXActions, JSONXPath } from './docs/data-model/json-x/json-x';
39
40
  export { replaceInDocumentBody } from './docs/data-model/replacement';
40
- export { type IEventObserver, EventState, EventSubject } from './observer/observable';
41
+ export { type IEventObserver, EventState, EventSubject, fromEventSubject } from './observer/observable';
41
42
  export { Plugin } from './services/plugin/plugin';
42
43
  export { PluginService, DependentOn } from './services/plugin/plugin.service';
43
44
  export { type CommandListener, CommandService, CommandType, type ICommand, type ICommandInfo, ICommandService, type IExecutionOptions, type IMultiCommand, type IMutation, type IMutationCommonParams, type IMutationInfo, type IOperation, type IOperationInfo, NilCommand, sequenceExecute, sequenceExecuteAsync, } from './services/command/command.service';
@@ -1,4 +1,4 @@
1
- import { Observer as RxObserver, Subscription, Subject } from 'rxjs';
1
+ import { Observer as RxObserver, Subscription, Observable, Subject } from 'rxjs';
2
2
 
3
3
  /**
4
4
  * A class serves as a medium between the observable and its observers
@@ -44,4 +44,5 @@ export declare class EventSubject<T> extends Subject<[T, EventState]> {
44
44
  clearObservers(): void;
45
45
  emitEvent(event: T): INotifyObserversReturn;
46
46
  }
47
+ export declare function fromEventSubject<T>(subject$: EventSubject<T>): Observable<T>;
47
48
  export {};
@@ -30,6 +30,7 @@ export interface IReferenceSource {
30
30
  lists?: ILists;
31
31
  drawings?: IDrawings;
32
32
  drawingsOrder?: string[];
33
+ headerFooterDrawingsOrder?: string[];
33
34
  }
34
35
  export interface IDocumentSettings {
35
36
  zoomRatio?: number;
@@ -758,5 +759,7 @@ export interface ITransformState extends IAbsoluteTransform, IRotationSkewFlipTr
758
759
  export interface IDrawingParam extends IDrawingSearch {
759
760
  drawingType: DrawingType;
760
761
  transform?: Nullable<ITransformState>;
762
+ transforms?: Nullable<ITransformState[]>;
763
+ isMultiTransform?: BooleanNumber;
761
764
  groupId?: string;
762
765
  }