@univerjs/core 0.1.1 → 0.1.2

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.
@@ -0,0 +1,16 @@
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 {};
@@ -0,0 +1,17 @@
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
+ import type { IDocumentBody } from '../../types/interfaces/i-document-data';
17
+ export declare function replaceInDocumentBody(body: IDocumentBody, query: string, target: string): IDocumentBody;
@@ -19,9 +19,9 @@ import { type TextXAction } from '../action-types';
19
19
  export declare class TextX {
20
20
  static compose(thisActions: TextXAction[], otherActions: TextXAction[]): TextXAction[];
21
21
  private _actions;
22
- insert(len: number, body: IDocumentBody, segmentId: string): this;
23
- retain(len: number, segmentId: string, body?: IDocumentBody, coverType?: UpdateDocsAttributeType): this;
24
- delete(len: number, segmentId: string): this;
22
+ insert(len: number, body: IDocumentBody, segmentId?: string): this;
23
+ retain(len: number, segmentId?: string, body?: IDocumentBody, coverType?: UpdateDocsAttributeType): this;
24
+ delete(len: number, segmentId?: string): this;
25
25
  serialize(): TextXAction[];
26
26
  push(...args: TextXAction[]): this;
27
27
  trimEndUselessRetainAction(): this;
@@ -25,6 +25,7 @@ export { TextXActionType, type TextXAction, type IDeleteAction, type IInsertActi
25
25
  export { ActionIterator } from './docs/data-model/text-x/action-iterator';
26
26
  export { getBodySlice, composeBody } from './docs/data-model/text-x/utils';
27
27
  export { TextX } from './docs/data-model/text-x/text-x';
28
+ export { replaceInDocumentBody } from './docs/data-model/replacement';
28
29
  export * from './observer';
29
30
  export { Plugin, PluginType } from './plugin/plugin';
30
31
  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';
@@ -61,3 +62,6 @@ export * from './slides/domain';
61
62
  export * from './types/const';
62
63
  export * from './types/enum';
63
64
  export * from './types/interfaces';
65
+ export { UniverInstanceService } from './services/instance/instance.service';
66
+ export { LifecycleInitializerService } from './services/lifecycle/lifecycle.service';
67
+ export { ConfigService } from './services/config/config.service';
@@ -22,3 +22,4 @@ export declare const EDITOR_ACTIVATED = "EDITOR_ACTIVATED";
22
22
  export declare const FOCUSING_EDITOR_INPUT_FORMULA = "FOCUSING_EDITOR_INPUT_FORMULA";
23
23
  export declare const FOCUSING_FORMULA_EDITOR = "FOCUSING_FORMULA_EDITOR";
24
24
  export declare const FOCUSING_UNIVER_EDITOR = "FOCUSING_UNIVER_EDITOR";
25
+ export declare const FOCUSING_UNIVER_EDITOR_SINGLE_MODE = "FOCUSING_UNIVER_EDITOR_SINGLE_MODE";
@@ -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
+ type debounceFn<T extends (...args: any[]) => any> = (this: ThisParameterType<T>, ...args: Parameters<T>) => void;
17
+ export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): debounceFn<T>;
18
+ export {};
@@ -18,4 +18,4 @@
18
18
  * @param val The number or string to be judged
19
19
  * @returns Result
20
20
  */
21
- export declare function isRealNum(val: string | number): boolean;
21
+ export declare function isRealNum(val: string | number | boolean): boolean;
@@ -35,3 +35,4 @@ export * from './sequence';
35
35
  export * from './sort-rules';
36
36
  export * from './tools';
37
37
  export * from './types';
38
+ export * from './debounce';
@@ -0,0 +1,16 @@
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 {};
@@ -192,4 +192,26 @@ export declare class Worksheet {
192
192
  */
193
193
  getLastColumnWithContent(): number;
194
194
  cellHasValue(value: ICellData): boolean;
195
+ /**
196
+ * Iterate a range row by row.
197
+ *
198
+ * Performance intensive.
199
+ */
200
+ iterateByRow(range: IRange): Iterator<Readonly<ICell>, Readonly<ICell>>;
201
+ /**
202
+ * Iterate a range column by column. This is pretty similar to `iterateByRow` but with different order.
203
+ *
204
+ * Performance intensive.
205
+ */
206
+ iterateByColumn(range: IRange): Iterator<Readonly<ICell>, Readonly<ICell>>;
207
+ }
208
+ /**
209
+ * A cell info including its span (if it is the top-left cell of a merged cell).
210
+ */
211
+ export interface ICell {
212
+ row: number;
213
+ col: number;
214
+ rowSpan?: number;
215
+ colSpan?: number;
216
+ value: ICellData;
195
217
  }
@@ -77,7 +77,7 @@ export interface IDocStyles {
77
77
  }
78
78
  /**
79
79
  * Properties of document body
80
- * 三种更新类型,范围叠加、范围互斥、占位符
80
+ * Contain three update types: range overlay, range mutual exclusion, and placeholder
81
81
  * \v COLUMN_BREAK
82
82
  * \f PAGE_BREAK
83
83
  * \0 DOCS_END