Skip to content

Commit aa6fd5f

Browse files
committed
refactor: 💡 use tree-dump package throughout the repo
1 parent b75c48e commit aa6fd5f

File tree

38 files changed

+65
-70
lines changed

38 files changed

+65
-70
lines changed

src/json-crdt-extensions/cnt/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {delayed} from '../../json-crdt-patch/builder/DelayedValueBuilder';
22
import {ext} from '../../json-crdt/extensions';
33
import {ExtensionId} from '../constants';
4-
import {printTree} from '../../util/print/printTree';
4+
import {printTree} from 'tree-dump/lib/printTree';
55
import {NodeApi} from '../../json-crdt/model/api/nodes';
66
import type {ExtensionDefinition, ObjNode} from '../../json-crdt';
77
import type {ITimestampStruct} from '../../json-crdt-patch/clock';
88
import type {ExtensionJsonNode, JsonNode} from '../../json-crdt';
9-
import type {Printable} from '../../util/print/types';
9+
import type {Printable} from 'tree-dump/lib/types';
1010
import type {ExtensionApi} from '../../json-crdt';
1111

1212
const name = 'cnt';

src/json-crdt-extensions/mval/ValueMv.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {ArrNode} from '../../json-crdt/nodes/arr/ArrNode';
2-
import {printTree} from '../../util/print/printTree';
2+
import {printTree} from 'tree-dump/lib/printTree';
33
import type {ITimestampStruct} from '../../json-crdt-patch/clock';
44
import type {ExtensionJsonNode, JsonNode} from '../../json-crdt';
5-
import type {Printable} from '../../util/print/types';
5+
import type {Printable} from 'tree-dump/lib/types';
66

77
export class ValueMv implements ExtensionJsonNode, Printable {
88
public readonly id: ITimestampStruct;

src/json-crdt-extensions/peritext/Peritext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {interval} from '../../json-crdt-patch/clock';
1111
import {CONST, updateNum} from '../../json-hash';
1212
import type {ITimestampStruct} from '../../json-crdt-patch/clock';
1313
import type {Model} from '../../json-crdt/model';
14-
import type {Printable} from '../../util/print/types';
14+
import type {Printable} from 'tree-dump/lib/types';
1515
import type {StringChunk} from './util/types';
1616
import type {SliceType} from './types';
1717
import type {MarkerSlice} from './slice/MarkerSlice';

src/json-crdt-extensions/peritext/editor/Editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {PersistedSlice} from '../slice/PersistedSlice';
66
import {Chars} from '../constants';
77
import type {Range} from '../rga/Range';
88
import type {Peritext} from '../Peritext';
9-
import type {Printable} from '../../../util/print/types';
9+
import type {Printable} from 'tree-dump/lib/types';
1010
import type {Point} from '../rga/Point';
1111
import type {SliceType} from '../types';
1212
import type {MarkerSlice} from '../slice/MarkerSlice';

src/json-crdt-extensions/peritext/overlay/Overlay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {CONST, updateNum} from '../../../json-hash';
1212
import {MarkerSlice} from '../slice/MarkerSlice';
1313
import type {Peritext} from '../Peritext';
1414
import type {Stateful} from '../types';
15-
import type {Printable} from '../../../util/print/types';
15+
import type {Printable} from 'tree-dump/lib/types';
1616
import type {MutableSlice, Slice} from '../slice/types';
1717

1818
export class Overlay implements Printable, Stateful {

src/json-crdt-extensions/peritext/overlay/OverlayPoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {OverlayRef, OverlayRefSliceEnd, OverlayRefSliceStart} from './refs';
44
import {printTree} from 'tree-dump/lib/printTree';
55
import type {MarkerSlice} from '../slice/MarkerSlice';
66
import type {HeadlessNode} from 'sonic-forest/lib/types';
7-
import type {Printable} from '../../../util/print/types';
7+
import type {Printable} from 'tree-dump/lib/types';
88
import type {Slice} from '../slice/types';
99

1010
/**

src/json-crdt-extensions/peritext/rga/Point.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {ChunkSlice} from '../util/ChunkSlice';
44
import {updateId} from '../../../json-crdt/hash';
55
import type {AbstractRga, Chunk} from '../../../json-crdt/nodes/rga';
66
import type {Stateful} from '../types';
7-
import type {Printable} from '../../../util/print/types';
7+
import type {Printable} from 'tree-dump/lib/types';
88

99
/**
1010
* A "point" in a rich-text Peritext document. It is a combination of a

src/json-crdt-extensions/peritext/rga/Range.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Point} from './Point';
22
import {Anchor} from './constants';
33
import {updateNum} from '../../../json-hash';
44
import type {ITimestampStruct} from '../../../json-crdt-patch/clock';
5-
import type {Printable} from '../../../util/print/types';
5+
import type {Printable} from 'tree-dump/lib/types';
66
import type {AbstractRga, Chunk} from '../../../json-crdt/nodes/rga';
77
import type {Stateful} from '../types';
88

src/json-crdt-extensions/peritext/slice/Cursor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Point} from '../rga/Point';
22
import {CursorAnchor, SliceBehavior, Tags} from './constants';
33
import {Range} from '../rga/Range';
4-
import {printTree} from '../../../util/print/printTree';
4+
import {printTree} from 'tree-dump/lib/printTree';
55
import {updateNum} from '../../../json-hash';
66
import type {ITimestampStruct} from '../../../json-crdt-patch/clock';
77
import type {Peritext} from '../Peritext';

src/json-crdt-extensions/peritext/slice/PersistedSlice.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Point} from '../rga/Point';
22
import {Range} from '../rga/Range';
33
import {updateNode} from '../../../json-crdt/hash';
4-
import {printTree} from '../../../util/print/printTree';
4+
import {printTree} from 'tree-dump/lib/printTree';
55
import {Anchor} from '../rga/constants';
66
import {SliceHeaderMask, SliceHeaderShift, SliceBehavior, SliceTupleIndex} from './constants';
77
import {CONST} from '../../../json-hash';
@@ -15,7 +15,7 @@ import type {ArrChunk} from '../../../json-crdt/nodes';
1515
import type {MutableSlice, SliceUpdateParams} from './types';
1616
import type {Peritext} from '../Peritext';
1717
import type {SliceDto, SliceType, Stateful} from '../types';
18-
import type {Printable} from '../../../util/print/types';
18+
import type {Printable} from 'tree-dump/lib/types';
1919
import type {AbstractRga} from '../../../json-crdt/nodes/rga';
2020

2121
export class PersistedSlice<T = string> extends Range<T> implements MutableSlice<T>, Stateful, Printable {

0 commit comments

Comments
 (0)