Skip to content

Commit

Permalink
feat(json-crdt-extensions): 🎸 improve Fragment code setup
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Nov 15, 2024
1 parent 5d90876 commit 3d2ef77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/json-crdt-extensions/peritext/Peritext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {CONST, updateNum} from '../../json-hash';
import {SESSION} from '../../json-crdt-patch/constants';
import {s} from '../../json-crdt-patch';
import {ExtraSlices} from './slice/ExtraSlices';
import {Fragment} from './block/Blocks';
import {Fragment} from './block/Fragment';
import {updateRga} from '../../json-crdt/hash';
import type {ITimestampStruct} from '../../json-crdt-patch/clock';
import type {Printable} from 'tree-dump/lib/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ import type {Printable} from 'tree-dump/lib/types';
import type {Peritext} from '../Peritext';
import type {Point} from '../rga/Point';

/**
* A *fragment* represents a structural slice of a rich-text document. A
* fragment can be bound to a specific range of text contents, however it
* always constructs a tree of {@link Block}s, which represent the nested
* structure of the text contents.
*/
export class Fragment implements Printable, Stateful {
public readonly root: Block;

Expand Down

0 comments on commit 3d2ef77

Please sign in to comment.