@univerjs/core 0.4.0-alpha.0 → 0.4.0-alpha.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.
@@ -1,4 +1,4 @@
1
- import { UpdateDocsAttributeType } from '../../../../shared';
2
1
  import { IDocumentBody, ITextRun } from '../../../../types/interfaces';
2
+ import { UpdateDocsAttributeType } from '../../../../shared';
3
3
  export declare function updateAttribute(body: IDocumentBody, updateBody: IDocumentBody, textLength: number, currentIndex: number, coverType: UpdateDocsAttributeType): IDocumentBody;
4
4
  export declare function coverTextRuns(updateDataTextRuns: ITextRun[], removeTextRuns: ITextRun[], coverType: UpdateDocsAttributeType): ITextRun[];
@@ -1,4 +1,6 @@
1
- import { DataStreamTreeTokenType, ICustomRange, ITextRange } from '@univerjs/core';
1
+ import { ITextRange } from '../../../../sheets/typedef';
2
+ import { ICustomRange } from '../../../../types/interfaces';
3
+ import { DataStreamTreeTokenType } from '../../types';
2
4
  export declare function isCustomRangeSplitSymbol(text: string): text is DataStreamTreeTokenType.CUSTOM_RANGE_START | DataStreamTreeTokenType.CUSTOM_RANGE_END;
3
5
  export declare function isIntersecting(line1Start: number, line1End: number, line2Start: number, line2End: number): boolean;
4
6
  export declare function shouldDeleteCustomRange(deleteStart: number, deleteLen: number, customRange: ICustomRange, dataStream: string): boolean;
@@ -7,7 +9,7 @@ export declare function copyCustomRange(range: ICustomRange): {
7
9
  rangeId: string;
8
10
  startIndex: number;
9
11
  endIndex: number;
10
- rangeType: import('@univerjs/core').CustomRangeType | number;
12
+ rangeType: import('../../../..').CustomRangeType | number;
11
13
  wholeEntity?: boolean;
12
14
  properties?: Record<string, any> | undefined;
13
15
  };
@@ -27,5 +27,13 @@ export declare class BuildTextUtils {
27
27
  fromPlainText: (text: string) => import('../../../..').IDocumentBody;
28
28
  isEmptyDocument: (dataStream?: string) => boolean;
29
29
  };
30
+ static paragraph: {
31
+ bullet: {
32
+ set: (params: import('./paragraph').ISetParagraphBulletParams) => false | import('../text-x').TextX;
33
+ switch: (params: import('./paragraph').ISwitchParagraphBulletParams) => import('../text-x').TextX;
34
+ toggleChecklist: (params: import('./paragraph').IToggleChecklistParagraphParams) => false | import('../text-x').TextX;
35
+ changeNestLevel: (params: import('./paragraph').IChangeParagraphBulletNestLevelParams) => import('../text-x').TextX;
36
+ };
37
+ };
30
38
  }
31
39
  export type { IAddCustomRangeTextXParam, IDeleteCustomRangeParam, IReplaceSelectionTextXParams } from './text-x-utils';
@@ -0,0 +1,31 @@
1
+ import { ICustomTable, IParagraph } from '../../../../types/interfaces';
2
+ import { DocumentDataModel } from '../../document-data-model';
3
+ import { TextX } from '../text-x';
4
+ export interface ISwitchParagraphBulletParams {
5
+ paragraphs: IParagraph[];
6
+ listType: string;
7
+ segmentId?: string;
8
+ document: DocumentDataModel;
9
+ }
10
+ export declare const switchParagraphBullet: (params: ISwitchParagraphBulletParams) => TextX;
11
+ export interface IToggleChecklistParagraphParams {
12
+ paragraphIndex: number;
13
+ segmentId?: string;
14
+ document: DocumentDataModel;
15
+ }
16
+ export declare const toggleChecklistParagraph: (params: IToggleChecklistParagraphParams) => false | TextX;
17
+ export interface ISetParagraphBulletParams {
18
+ paragraphs: IParagraph[];
19
+ listType: string;
20
+ segmentId?: string;
21
+ document: DocumentDataModel;
22
+ }
23
+ export declare const setParagraphBullet: (params: ISetParagraphBulletParams) => false | TextX;
24
+ export interface IChangeParagraphBulletNestLevelParams {
25
+ paragraphs: IParagraph[];
26
+ segmentId?: string;
27
+ document: DocumentDataModel;
28
+ type: 1 | -1;
29
+ }
30
+ export declare function hasParagraphInTable(paragraph: IParagraph, tables: ICustomTable[]): boolean;
31
+ export declare const changeParagraphBulletNestLevel: (params: IChangeParagraphBulletNestLevelParams) => TextX;
@@ -1,9 +1,9 @@
1
1
  import { IAccessor } from '@wendellhu/redi';
2
- import { Nullable } from '../../../../shared';
3
2
  import { ITextRange, ITextRangeParam } from '../../../../sheets/typedef';
4
3
  import { CustomRangeType, IDocumentBody } from '../../../../types/interfaces';
5
4
  import { DocumentDataModel } from '../../document-data-model';
6
5
  import { IDeleteAction, IRetainAction } from '../action-types';
6
+ import { Nullable } from '../../../../shared';
7
7
  import { TextX } from '../text-x';
8
8
  export interface IDeleteCustomRangeParam {
9
9
  rangeId: string;
@@ -1,2 +1,3 @@
1
- import { IDocumentBody, IRetainAction } from '@univerjs/core';
1
+ import { IDocumentBody } from '../../../types/interfaces';
2
+ import { IRetainAction } from './action-types';
2
3
  export declare function transformBody(thisAction: IRetainAction, otherAction: IRetainAction, priority?: boolean): IDocumentBody;
@@ -84,7 +84,7 @@ export { isBlackColor, isWhiteColor } from './shared/color/color-kit';
84
84
  export { cellToRange } from './shared/common';
85
85
  export { getIntersectRange } from './shared/range';
86
86
  export { nameCharacterCheck } from './shared/name';
87
- export { fromCallback, takeAfter } from './shared/rxjs';
87
+ export { bufferDebounceTime, fromCallback, takeAfter } from './shared/rxjs';
88
88
  export { awaitTime } from './shared/timer';
89
89
  export { Range } from './sheets/range';
90
90
  export { 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, mergeWorksheetSnapshotWithDefault, } from './sheets/sheet-snapshot-utils';
@@ -111,4 +111,4 @@ export * from './types/interfaces';
111
111
  export type { ICellCustomRender, ICellRenderContext } from './types/interfaces/i-cell-custom-render';
112
112
  export type { IDataValidationRule, IDataValidationRuleBase, IDataValidationRuleInfo, IDataValidationRuleOptions, ISheetDataValidationRule } from './types/interfaces/i-data-validation';
113
113
  export { type IRTreeItem, RTree } from './shared/r-tree';
114
- export { Univer } from './univer';
114
+ export { type IUniverConfig, Univer } from './univer';
@@ -1,5 +1,6 @@
1
- import { ICommandService, Univer } from '@univerjs/core';
2
1
  import { Dependency } from '../../common/di';
2
+ import { Univer } from '../../univer';
3
+ import { ICommandService } from '../command/command.service';
3
4
  export declare const createTestBed: (dependencies?: Dependency[]) => {
4
5
  univer: Univer;
5
6
  get: {
@@ -10,7 +11,7 @@ export declare const createTestBed: (dependencies?: Dependency[]) => {
10
11
  <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantity?: import('@wendellhu/redi').Quantity, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
11
12
  <T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp, lookUp?: import('@wendellhu/redi').LookUp): T[] | T | null;
12
13
  };
13
- workbook: import('@univerjs/core').Workbook;
14
+ workbook: import('../..').UnitModel<object, number>;
14
15
  unitId: string;
15
16
  subUnitId: string;
16
17
  commandService: ICommandService;
@@ -1,6 +1,6 @@
1
- import { UniverInstanceType } from '@univerjs/core';
2
1
  import { Observable } from 'rxjs';
3
2
  import { IDisposable } from '../../common/di';
3
+ import { UniverInstanceType } from '../../common/unit';
4
4
  export type IResources = Array<{
5
5
  id?: string;
6
6
  name: string;
@@ -1,4 +1,4 @@
1
- import { Observable } from 'rxjs';
1
+ import { OperatorFunction, Observable } from 'rxjs';
2
2
  import { IDisposable } from '../common/di';
3
3
  type CallbackFn<T extends readonly unknown[]> = (cb: (...args: T) => void) => IDisposable;
4
4
  /**
@@ -15,4 +15,5 @@ export declare function fromCallback<T extends readonly unknown[]>(callback: Cal
15
15
  * An operator that would complete the stream once a condition is met. Consider it as a shortcut of `takeUntil`.
16
16
  */
17
17
  export declare function takeAfter<T>(callback: (value: T) => boolean): (source: Observable<T>) => Observable<T>;
18
+ export declare function bufferDebounceTime<T>(time?: number): OperatorFunction<T, T[]>;
18
19
  export {};