@dxos/react-ui-editor 0.3.11-main.4eab977 → 0.3.11-main.508f304
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.
- package/dist/lib/browser/index.mjs +779 -760
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/TextEditor/MarkdownEditor.stories.d.ts +16 -13
- package/dist/types/src/components/TextEditor/MarkdownEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/TextEditor.d.ts +20 -17
- package/dist/types/src/components/TextEditor/TextEditor.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/TextEditor.stories.d.ts +6 -6
- package/dist/types/src/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TextEditor/comments.stories.d.ts +26 -0
- package/dist/types/src/components/TextEditor/comments.stories.d.ts.map +1 -0
- package/dist/types/src/components/TextEditor/yjs.stories.d.ts +1 -1
- package/dist/types/src/extensions/autocomplete.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/automerge.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/cursor.d.ts +1 -1
- package/dist/types/src/extensions/automerge/cursor.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/defs.d.ts +7 -9
- package/dist/types/src/extensions/automerge/defs.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/index.d.ts +0 -1
- package/dist/types/src/extensions/automerge/index.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/semaphore.d.ts +7 -12
- package/dist/types/src/extensions/automerge/semaphore.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/update-automerge.d.ts +2 -2
- package/dist/types/src/extensions/awareness.d.ts +2 -0
- package/dist/types/src/extensions/awareness.d.ts.map +1 -1
- package/dist/types/src/extensions/basic.d.ts +4 -5
- package/dist/types/src/extensions/basic.d.ts.map +1 -1
- package/dist/types/src/extensions/code.d.ts.map +1 -1
- package/dist/types/src/extensions/comments.d.ts +31 -18
- package/dist/types/src/extensions/comments.d.ts.map +1 -1
- package/dist/types/src/{util → extensions}/cursor.d.ts +10 -2
- package/dist/types/src/extensions/cursor.d.ts.map +1 -0
- package/dist/types/src/extensions/hr.d.ts.map +1 -1
- package/dist/types/src/extensions/index.d.ts +2 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/bundle.d.ts +2 -5
- package/dist/types/src/extensions/markdown/bundle.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/highlight.d.ts.map +1 -1
- package/dist/types/src/extensions/mention.d.ts.map +1 -1
- package/dist/types/src/extensions/outliner.d.ts +4 -0
- package/dist/types/src/extensions/outliner.d.ts.map +1 -0
- package/dist/types/src/extensions/tasklist.d.ts.map +1 -1
- package/dist/types/src/extensions/yjs/cursor.d.ts +1 -1
- package/dist/types/src/extensions/yjs/cursor.d.ts.map +1 -1
- package/dist/types/src/hooks/automerge.d.ts +2 -1
- package/dist/types/src/hooks/automerge.d.ts.map +1 -1
- package/dist/types/src/hooks/defs.d.ts +28 -0
- package/dist/types/src/hooks/defs.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useTextModel.d.ts +2 -32
- package/dist/types/src/hooks/useTextModel.d.ts.map +1 -1
- package/dist/types/src/hooks/yjs.d.ts +2 -1
- package/dist/types/src/hooks/yjs.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/styles/markdown.d.ts.map +1 -1
- package/dist/types/src/themes/default.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +7 -0
- package/dist/types/src/util.d.ts.map +1 -0
- package/package.json +32 -31
- package/src/components/TextEditor/MarkdownEditor.stories.tsx +77 -79
- package/src/components/TextEditor/TextEditor.stories.tsx +12 -46
- package/src/components/TextEditor/TextEditor.tsx +124 -92
- package/src/components/TextEditor/comments.stories.tsx +357 -0
- package/src/extensions/autocomplete.ts +6 -3
- package/src/extensions/automerge/automerge.ts +40 -46
- package/src/extensions/automerge/cursor.ts +2 -1
- package/src/extensions/automerge/defs.ts +10 -31
- package/src/extensions/automerge/index.ts +0 -1
- package/src/extensions/automerge/semaphore.ts +23 -20
- package/src/extensions/automerge/update-automerge.ts +2 -2
- package/src/extensions/awareness.ts +45 -34
- package/src/extensions/basic.ts +22 -17
- package/src/extensions/code.ts +24 -18
- package/src/extensions/comments.ts +242 -234
- package/src/extensions/cursor.ts +50 -0
- package/src/extensions/hr.ts +49 -50
- package/src/extensions/image.ts +2 -2
- package/src/extensions/index.ts +2 -0
- package/src/extensions/link.ts +7 -7
- package/src/extensions/markdown/bundle.ts +18 -24
- package/src/extensions/markdown/highlight.ts +0 -8
- package/src/extensions/mention.ts +9 -2
- package/src/extensions/outliner.ts +12 -0
- package/src/extensions/table.ts +2 -2
- package/src/extensions/tasklist.ts +78 -86
- package/src/extensions/yjs/cursor.ts +2 -1
- package/src/extensions/yjs/yjs.test.ts +1 -1
- package/src/extensions/yjs/yjs.ts +2 -2
- package/src/hooks/automerge.ts +2 -1
- package/src/hooks/defs.ts +47 -0
- package/src/hooks/index.ts +3 -1
- package/src/hooks/useTextModel.ts +3 -49
- package/src/hooks/yjs.ts +2 -23
- package/src/index.ts +1 -0
- package/src/styles/markdown.ts +0 -2
- package/src/themes/default.ts +17 -50
- package/src/util.ts +41 -0
- package/dist/types/src/util/cursor.d.ts.map +0 -1
- package/dist/types/src/util/index.d.ts +0 -3
- package/dist/types/src/util/index.d.ts.map +0 -1
- package/dist/types/src/util/util.d.ts +0 -5
- package/dist/types/src/util/util.d.ts.map +0 -1
- package/src/util/cursor.ts +0 -29
- package/src/util/index.ts +0 -6
- package/src/util/util.ts +0 -18
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { type StateField } from '@codemirror/state';
|
|
2
2
|
import { type EditorView } from '@codemirror/view';
|
|
3
|
-
import {
|
|
4
|
-
import { type IDocHandle, type Value } from './defs';
|
|
5
|
-
type Doc<T> = automerge.Doc<T>;
|
|
6
|
-
type Heads = automerge.Heads;
|
|
7
|
-
type ChangeFn = (atHeads: Heads, change: (doc: Doc<unknown>) => void) => Heads | undefined;
|
|
3
|
+
import { type IDocHandle, type State } from './defs';
|
|
8
4
|
/**
|
|
9
|
-
*
|
|
5
|
+
* Implements three-way merge (on each mutation/keystroke).
|
|
10
6
|
*/
|
|
11
7
|
export declare class PatchSemaphore {
|
|
12
|
-
private readonly
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
constructor(
|
|
16
|
-
reconcile
|
|
8
|
+
private readonly _handle;
|
|
9
|
+
private readonly _state;
|
|
10
|
+
private _inReconcile;
|
|
11
|
+
constructor(_handle: IDocHandle, _state: StateField<State>);
|
|
12
|
+
reconcile(view: EditorView): void;
|
|
17
13
|
}
|
|
18
|
-
export {};
|
|
19
14
|
//# sourceMappingURL=semaphore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semaphore.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/semaphore.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"semaphore.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/automerge/semaphore.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,OAAO,EAML,KAAK,UAAU,EACf,KAAK,KAAK,EACX,MAAM,QAAQ,CAAC;AAIhB;;GAEG;AACH,qBAAa,cAAc;IAKvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALzB,OAAO,CAAC,YAAY,CAAS;gBAIV,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC;IAI5C,SAAS,CAAC,IAAI,EAAE,UAAU;CA8C3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type EditorState, type StateField, type Transaction } from '@codemirror/state';
|
|
2
2
|
import { type Heads } from '@dxos/automerge/automerge';
|
|
3
|
-
import { type IDocHandle, type
|
|
4
|
-
export declare const updateAutomerge: (field: StateField<
|
|
3
|
+
import { type IDocHandle, type State } from './defs';
|
|
4
|
+
export declare const updateAutomerge: (field: StateField<State>, handle: IDocHandle, transactions: Transaction[], state: EditorState) => Heads | undefined;
|
|
5
5
|
//# sourceMappingURL=update-automerge.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Facet, type Extension } from '@codemirror/state';
|
|
2
2
|
import { type DecorationSet, EditorView, type PluginValue, type ViewUpdate } from '@codemirror/view';
|
|
3
3
|
import { Event } from '@dxos/async';
|
|
4
|
+
import { type EditorModel } from '../hooks';
|
|
4
5
|
export interface AwarenessProvider {
|
|
5
6
|
remoteStateChange: Event<void>;
|
|
6
7
|
open(): void;
|
|
@@ -27,6 +28,7 @@ export type AwarenessState = {
|
|
|
27
28
|
* Extension provides presence information about other peers.
|
|
28
29
|
*/
|
|
29
30
|
export declare const awareness: (provider?: AwarenessProvider) => Extension;
|
|
31
|
+
export declare const useAwareness: ({ awareness, peer }: EditorModel) => void;
|
|
30
32
|
/**
|
|
31
33
|
* Generates selection decorations from remote peers.
|
|
32
34
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"awareness.d.ts","sourceRoot":"","sources":["../../../../src/extensions/awareness.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,KAAK,EAAE,KAAK,SAAS,EAAwB,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAEL,KAAK,aAAa,EAClB,UAAU,EACV,KAAK,WAAW,EAEhB,KAAK,UAAU,EAEhB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"awareness.d.ts","sourceRoot":"","sources":["../../../../src/extensions/awareness.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,KAAK,EAAE,KAAK,SAAS,EAAwB,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAEL,KAAK,aAAa,EAClB,UAAU,EACV,KAAK,WAAW,EAEhB,KAAK,UAAU,EAEhB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAOpC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,WAAW,iBAAiB;IAChC,iBAAiB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAE/B,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;IAEd,MAAM,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,GAAG,IAAI,CAAC;IACtD,eAAe,IAAI,cAAc,EAAE,CAAC;CACrC;AAYD,eAAO,MAAM,iBAAiB,6CAE5B,CAAC;AAKH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,oCAA+B,SAQpD,CAAC;AAEF,eAAO,MAAM,YAAY,wBAAyB,WAAW,SAW5D,CAAC;AAEF;;GAEG;AACH,qBAAa,yBAA0B,YAAW,WAAW;IACpD,WAAW,EAAE,aAAa,CAAmB;IAEpD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAiB;IAEtC,OAAO,CAAC,gBAAgB,CAAkB;IAC1C,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,WAAW,CAAC,CAAqB;IACzC,OAAO,CAAC,SAAS,CAAC,CAAqB;gBAE3B,IAAI,EAAE,UAAU;IAS5B,OAAO;IAKP,MAAM,CAAC,MAAM,EAAE,UAAU;IAKzB,OAAO,CAAC,qBAAqB;IAoB7B,OAAO,CAAC,uBAAuB;CA4EhC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type Extension } from '@codemirror/state';
|
|
2
|
-
import type
|
|
2
|
+
import { type ThemeMode } from '@dxos/react-ui';
|
|
3
|
+
import { type TextEditorProps } from '../components';
|
|
3
4
|
export type BasicBundleOptions = {
|
|
4
|
-
readonly?: boolean;
|
|
5
5
|
themeMode?: ThemeMode;
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
export declare const basicBundle: ({ readonly, themeMode, placeholder: _placeholder }: BasicBundleOptions) => Extension[];
|
|
6
|
+
} & Pick<TextEditorProps, 'placeholder' | 'multiline'>;
|
|
7
|
+
export declare const basicBundle: ({ themeMode, placeholder: _placeholder, multiline, }: BasicBundleOptions) => Extension[];
|
|
9
8
|
//# sourceMappingURL=basic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../../../src/extensions/basic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../../../src/extensions/basic.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAInD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,GAAG,IAAI,CAAC,eAAe,EAAE,aAAa,GAAG,WAAW,CAAC,CAAC;AAEvD,eAAO,MAAM,WAAW,yDAIrB,kBAAkB,KAAG,SAAS,EAahC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../src/extensions/code.ts"],"names":[],"mappings":"AAsDA,eAAO,MAAM,IAAI,+
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../src/extensions/code.ts"],"names":[],"mappings":"AAsDA,eAAO,MAAM,IAAI,+CAiDhB,CAAC"}
|
|
@@ -1,29 +1,39 @@
|
|
|
1
1
|
import { type Extension } from '@codemirror/state';
|
|
2
2
|
import { EditorView, type Rect } from '@codemirror/view';
|
|
3
|
-
import { type
|
|
4
|
-
type
|
|
3
|
+
import { type Comment, type Range } from '../hooks';
|
|
4
|
+
type CommentState = {
|
|
5
|
+
comment: Comment;
|
|
6
|
+
range: Range;
|
|
7
|
+
location?: Rect | null;
|
|
8
|
+
};
|
|
9
|
+
type SelectionState = {
|
|
5
10
|
active?: string;
|
|
6
11
|
closest?: string;
|
|
7
12
|
};
|
|
8
|
-
type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export type CommentsState = CommentSelected & {
|
|
12
|
-
ranges: ExtendedCommentRange[];
|
|
13
|
+
export type CommentsState = {
|
|
14
|
+
comments: CommentState[];
|
|
15
|
+
selection: SelectionState;
|
|
13
16
|
};
|
|
14
|
-
export declare const setFocus: (view: EditorView,
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
comments: CommentRange[];
|
|
18
|
-
}>;
|
|
19
|
-
export declare const setSelection: import("@codemirror/state").StateEffectType<CommentSelected>;
|
|
17
|
+
export declare const setFocus: (view: EditorView, id: string, center?: boolean) => void;
|
|
18
|
+
export declare const setComments: import("@codemirror/state").StateEffectType<Comment[]>;
|
|
19
|
+
export declare const setSelection: import("@codemirror/state").StateEffectType<SelectionState>;
|
|
20
20
|
export type CommentsOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* Key shortcut to create a new thread.
|
|
23
|
+
*/
|
|
21
24
|
key?: string;
|
|
22
|
-
footnote?: boolean;
|
|
23
25
|
/**
|
|
24
26
|
* Called to create a new thread and return the thread id.
|
|
25
27
|
*/
|
|
26
|
-
onCreate?: (
|
|
28
|
+
onCreate?: (cursor: string, location?: Rect | null) => string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Selection cut/deleted.
|
|
31
|
+
*/
|
|
32
|
+
onDelete?: (thread: string) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Called when a comment is moved.
|
|
35
|
+
*/
|
|
36
|
+
onUpdate?: (thread: string, cursor: string) => void;
|
|
27
37
|
/**
|
|
28
38
|
* Called to notify which thread is currently closest to the cursor.
|
|
29
39
|
*/
|
|
@@ -31,7 +41,7 @@ export type CommentsOptions = {
|
|
|
31
41
|
/**
|
|
32
42
|
* Called to render tooltip.
|
|
33
43
|
*/
|
|
34
|
-
onHover?: (el: Element) => void;
|
|
44
|
+
onHover?: (el: Element, shortcut: string) => void;
|
|
35
45
|
};
|
|
36
46
|
/**
|
|
37
47
|
* Comment threads.
|
|
@@ -42,9 +52,12 @@ export type CommentsOptions = {
|
|
|
42
52
|
* 4). Tracks the current cursor position to:
|
|
43
53
|
* a). Update the decoration to show if the cursor is within a current selection.
|
|
44
54
|
* b). Calls a handler to indicate which is the closest selection (e.g., to update the thread sidebar).
|
|
45
|
-
* 5). Optionally,
|
|
46
|
-
* 6). Optionally, implements a hoverTooltip to show hints when creating a selection range.
|
|
55
|
+
* 5). Optionally, implements a hoverTooltip to show hints when creating a selection range.
|
|
47
56
|
*/
|
|
48
57
|
export declare const comments: (options?: CommentsOptions) => Extension;
|
|
58
|
+
/**
|
|
59
|
+
* Update state field.
|
|
60
|
+
*/
|
|
61
|
+
export declare const useComments: (view?: EditorView | null, comments?: Comment[]) => void;
|
|
49
62
|
export {};
|
|
50
63
|
//# sourceMappingURL=comments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../../src/extensions/comments.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../../../src/extensions/comments.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAsC,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAkD,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AASzG,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAmBpD,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,QAAQ,SAAU,UAAU,MAAM,MAAM,2BAiBpD,CAAC;AAEF,eAAO,MAAM,WAAW,wDAAkC,CAAC;AAE3D,eAAO,MAAM,YAAY,6DAAuC,CAAC;AAwEjE,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,KAAK,MAAM,GAAG,SAAS,CAAC;IAC1E;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD,CAAC;AAuEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,aAAa,eAAe,KAAQ,SAqKxD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,UAAW,UAAU,GAAG,IAAI,aAAa,OAAO,EAAE,SAQzE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Facet } from '@codemirror/state';
|
|
1
|
+
import { type EditorState, Facet } from '@codemirror/state';
|
|
2
|
+
import type { Range } from '../hooks';
|
|
2
3
|
/**
|
|
3
4
|
* Converts indexes into the text document into stable peer-independent cursors.
|
|
4
5
|
*
|
|
@@ -13,5 +14,12 @@ export interface CursorConverter {
|
|
|
13
14
|
toCursor(position: number, assoc?: -1 | 1 | undefined): string;
|
|
14
15
|
fromCursor(cursor: string): number;
|
|
15
16
|
}
|
|
16
|
-
export declare
|
|
17
|
+
export declare class Cursor {
|
|
18
|
+
static readonly converter: Facet<CursorConverter, CursorConverter>;
|
|
19
|
+
static readonly getCursorFromRange: (state: EditorState, range: Range) => string;
|
|
20
|
+
static readonly getRangeFromCursor: (state: EditorState, cursor: string) => {
|
|
21
|
+
from: number;
|
|
22
|
+
to: number;
|
|
23
|
+
} | undefined;
|
|
24
|
+
}
|
|
17
25
|
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../src/extensions/cursor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC;IAC/D,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC;AAOD,qBAAa,MAAM;IACjB,MAAM,CAAC,QAAQ,CAAC,SAAS,0CAEtB;IAEH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,UAAW,WAAW,SAAS,KAAK,YAMpE;IAEF,MAAM,CAAC,QAAQ,CAAC,kBAAkB,UAAW,WAAW,UAAU,MAAM;;;kBAOtE;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hr.d.ts","sourceRoot":"","sources":["../../../../src/extensions/hr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hr.d.ts","sourceRoot":"","sources":["../../../../src/extensions/hr.ts"],"names":[],"mappings":"AAmDA,eAAO,MAAM,EAAE,+CAoBd,CAAC"}
|
|
@@ -5,12 +5,14 @@ export * from './basic';
|
|
|
5
5
|
export * from './blast';
|
|
6
6
|
export * from './code';
|
|
7
7
|
export * from './comments';
|
|
8
|
+
export * from './cursor';
|
|
8
9
|
export * from './hr';
|
|
9
10
|
export * from './image';
|
|
10
11
|
export * from './link';
|
|
11
12
|
export * from './listener';
|
|
12
13
|
export * from './markdown';
|
|
13
14
|
export * from './mention';
|
|
15
|
+
export * from './outliner';
|
|
14
16
|
export * from './table';
|
|
15
17
|
export * from './tasklist';
|
|
16
18
|
export * from './typewriter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/extensions/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { type Extension } from '@codemirror/state';
|
|
2
2
|
import type { ThemeMode } from '@dxos/react-ui';
|
|
3
|
+
import { type TextEditorProps } from '../../components';
|
|
3
4
|
export type MarkdownBundleOptions = {
|
|
4
|
-
readonly?: boolean;
|
|
5
5
|
themeMode?: ThemeMode;
|
|
6
|
-
|
|
7
|
-
};
|
|
6
|
+
} & Pick<TextEditorProps, 'readonly' | 'placeholder'>;
|
|
8
7
|
/**
|
|
9
8
|
* Markdown bundle.
|
|
10
9
|
* Refs:
|
|
11
|
-
* https://github.com/codemirror/basic-setup
|
|
12
|
-
* https://github.com/codemirror/basic-setup/blob/main/src/codemirror.ts#L50
|
|
13
10
|
* https://codemirror.net/docs/community
|
|
14
11
|
* https://codemirror.net/docs/ref/#codemirror.basicSetup
|
|
15
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/bundle.ts"],"names":[],"mappings":"AAUA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAYhE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/bundle.ts"],"names":[],"mappings":"AAUA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAYhE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,aAAa,CAAC,CAAC;AAEtD;;;;;GAKG;AAEH,eAAO,MAAM,cAAc,wDAIxB,qBAAqB,KAAG,SAAS,EAyDnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/highlight.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAmB,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,KAAK,cAAc,EAAS,MAAM,iBAAiB,CAAC;AAe7D;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/highlight.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAmB,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,KAAK,cAAc,EAAS,MAAM,iBAAiB,CAAC;AAe7D;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAexB,CAAC;AAaF,eAAO,MAAM,sBAAsB,EAAE,cAAc,EAKlD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,cAAe,OAAO,mBAyHxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../../src/extensions/mention.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;CACtC,CAAC;
|
|
1
|
+
{"version":3,"file":"mention.d.ts","sourceRoot":"","sources":["../../../../src/extensions/mention.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;CACtC,CAAC;AAGF,eAAO,MAAM,OAAO,iBAAkB,cAAc,KAAG,SAyBtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outliner.d.ts","sourceRoot":"","sources":["../../../../src/extensions/outliner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG,EAAE,CAAC;AAGjC,eAAO,MAAM,QAAQ,aAAa,eAAe,KAAQ,SAExD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasklist.d.ts","sourceRoot":"","sources":["../../../../src/extensions/tasklist.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tasklist.d.ts","sourceRoot":"","sources":["../../../../src/extensions/tasklist.ts"],"names":[],"mappings":"AAsFA,MAAM,MAAM,eAAe,GAAG,EAAE,CAAC;AAEjC,eAAO,MAAM,QAAQ,aAAa,eAAe,4CAsBhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/yjs/cursor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAIzB,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/yjs/cursor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAIzB,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,eAW7C,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { type EditorModel
|
|
1
|
+
import { type EditorModel } from './defs';
|
|
2
|
+
import { type UseTextModelProps } from './useTextModel';
|
|
2
3
|
export declare const createAutomergeModel: ({ space, identity, text }: UseTextModelProps) => EditorModel;
|
|
3
4
|
//# sourceMappingURL=automerge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automerge.d.ts","sourceRoot":"","sources":["../../../../src/hooks/automerge.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,WAAW,EAAc,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"automerge.d.ts","sourceRoot":"","sources":["../../../../src/hooks/automerge.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,WAAW,EAAc,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIxD,eAAO,MAAM,oBAAoB,8BAA+B,iBAAiB,KAAG,WAqCnF,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Extension, StateField } from '@codemirror/state';
|
|
2
|
+
import type * as YP from 'y-protocols/awareness';
|
|
3
|
+
import { type DocAccessor } from '@dxos/echo-schema';
|
|
4
|
+
import type { YText, YXmlFragment } from '@dxos/text-model';
|
|
5
|
+
export type Range = {
|
|
6
|
+
from: number;
|
|
7
|
+
to: number;
|
|
8
|
+
};
|
|
9
|
+
export type Comment = {
|
|
10
|
+
id: string;
|
|
11
|
+
cursor?: string;
|
|
12
|
+
};
|
|
13
|
+
export type EditorModel = {
|
|
14
|
+
id: string;
|
|
15
|
+
text: () => string;
|
|
16
|
+
extension?: Extension;
|
|
17
|
+
content: string | YText | YXmlFragment | DocAccessor;
|
|
18
|
+
awareness?: YP.Awareness;
|
|
19
|
+
peer?: {
|
|
20
|
+
id: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* State field makes the model available to other extensions.
|
|
26
|
+
*/
|
|
27
|
+
export declare const modelState: StateField<EditorModel | undefined>;
|
|
28
|
+
//# sourceMappingURL=defs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../src/hooks/defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAG5D,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAGF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,CAAC;IAGtB,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,YAAY,GAAG,WAAW,CAAC;IAGrD,SAAS,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC;IAGzB,IAAI,CAAC,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,qCAGrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AAEtB,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,36 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type * as YP from 'y-protocols/awareness';
|
|
3
|
-
import { type DocAccessor, type Space, type TextObject } from '@dxos/react-client/echo';
|
|
1
|
+
import { type Space, type TextObject } from '@dxos/react-client/echo';
|
|
4
2
|
import { type Identity } from '@dxos/react-client/halo';
|
|
5
|
-
import
|
|
6
|
-
/**
|
|
7
|
-
* State field makes the model available to other extensions.
|
|
8
|
-
*/
|
|
9
|
-
export declare const modelState: StateField<EditorModel | undefined>;
|
|
10
|
-
export type Range = {
|
|
11
|
-
from: number;
|
|
12
|
-
to: number;
|
|
13
|
-
};
|
|
14
|
-
export type CommentRange = {
|
|
15
|
-
id: string;
|
|
16
|
-
cursor: string;
|
|
17
|
-
};
|
|
18
|
-
export type EditorModel = {
|
|
19
|
-
id: string;
|
|
20
|
-
text: () => string;
|
|
21
|
-
extension?: Extension;
|
|
22
|
-
content: string | YText | YXmlFragment | DocAccessor;
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated Use CursorConverter.
|
|
25
|
-
*/
|
|
26
|
-
getCursorFromRange?: (value: Range) => string;
|
|
27
|
-
getRangeFromCursor?: (cursor: string) => Range | undefined;
|
|
28
|
-
awareness?: YP.Awareness;
|
|
29
|
-
peer?: {
|
|
30
|
-
id: string;
|
|
31
|
-
name?: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
3
|
+
import { type EditorModel } from './defs';
|
|
34
4
|
export type UseTextModelProps = {
|
|
35
5
|
identity?: Identity | null;
|
|
36
6
|
space?: Space;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextModel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTextModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTextModel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTextModel.ts"],"names":[],"mappings":"AAMA,OAAO,EAAqB,KAAK,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAI1C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,iBAAiB,KAAG,WAAW,GAAG,SAKrE,CAAC"}
|
|
@@ -2,7 +2,8 @@ import { Observable } from 'lib0/observable';
|
|
|
2
2
|
import * as YP from 'y-protocols/awareness';
|
|
3
3
|
import { type Doc } from 'yjs';
|
|
4
4
|
import { type Space } from '@dxos/react-client/echo';
|
|
5
|
-
import { type EditorModel
|
|
5
|
+
import { type EditorModel } from './defs';
|
|
6
|
+
import { type UseTextModelProps } from './useTextModel';
|
|
6
7
|
export declare const createYjsModel: ({ identity, space, text }: UseTextModelProps) => EditorModel;
|
|
7
8
|
/**
|
|
8
9
|
* Yjs awareness provider on top of a DXOS space.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yjs.d.ts","sourceRoot":"","sources":["../../../../src/hooks/yjs.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"yjs.d.ts","sourceRoot":"","sources":["../../../../src/hooks/yjs.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAI/B,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAIrD,OAAO,EAAE,KAAK,WAAW,EAAc,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,eAAO,MAAM,cAAc,8BAA+B,iBAAiB,KAAG,WAqB7E,CAAC;AAOF;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,UAAU,CAAC,GAAG,CAAC;IACrD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAe;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEtB,EACV,KAAK,EACL,GAAG,EACH,OAAO,EACP,SAAS,GACV,EAAE;QACD,KAAK,EAAE,KAAK,CAAC;QACb,GAAG,EAAE,GAAG,CAAC;QACT,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC;KAC1B;IA4BD,IAAI,SAAS,IAAI,EAAE,CAAC,SAAS,CAE5B;IAED,OAAO,CAAC,sBAAsB;IAS9B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,YAAY;IAoCpB,OAAO,CAAC,mBAAmB;CAG5B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { TextKind } from '@dxos/protocols/proto/dxos/echo/model/text';
|
|
2
2
|
export { Doc, YText, YXmlFragment } from '@dxos/text-model';
|
|
3
3
|
export { type Extension } from '@codemirror/state';
|
|
4
|
+
export { type EditorView } from '@codemirror/view';
|
|
4
5
|
export * from './components';
|
|
5
6
|
export * from './extensions';
|
|
6
7
|
export * from './hooks';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/styles/markdown.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAIjD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,CAOnD,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,YAAY,aAAa,OAAO,WAG9D,CAAC;AAEF,eAAO,MAAM,IAAI,2CAA2C,CAAC;AAC7D,eAAO,MAAM,KAAK,2CAA2C,CAAC;AAE9D,eAAO,MAAM,IAAI,QAAmE,CAAC;AAErF,eAAO,MAAM,SAAS,UAAU,CAAC;AAEjC,eAAO,MAAM,IAAI,cAAc,CAAC;AAChC,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,eAAO,MAAM,IAAI,mEAAmE,CAAC;AACrF,eAAO,MAAM,QAAQ,+BAA+B,CAAC;AACrD,eAAO,MAAM,SAAS,kDAAkD,CAAC;AAEzE,eAAO,MAAM,SAAS,QAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/styles/markdown.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAIjD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,CAOnD,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,YAAY,aAAa,OAAO,WAG9D,CAAC;AAEF,eAAO,MAAM,IAAI,2CAA2C,CAAC;AAC7D,eAAO,MAAM,KAAK,2CAA2C,CAAC;AAE9D,eAAO,MAAM,IAAI,QAAmE,CAAC;AAErF,eAAO,MAAM,SAAS,UAAU,CAAC;AAEjC,eAAO,MAAM,IAAI,cAAc,CAAC;AAChC,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,eAAO,MAAM,IAAI,mEAAmE,CAAC;AACrF,eAAO,MAAM,QAAQ,+BAA+B,CAAC;AACrD,eAAO,MAAM,SAAS,kDAAkD,CAAC;AAEzE,eAAO,MAAM,SAAS,QAAmB,CAAC;AAE1C,eAAO,MAAM,UAAU,QAAsF,CAAC;AAE9G,eAAO,MAAM,cAAc,0GAC8E,CAAC;AAG1G,eAAO,MAAM,aAAa,wHAC6F,CAAC;AACxH,eAAO,MAAM,WAAW,+IACkH,CAAC;AAE3I,eAAO,MAAM,QAAQ,gDAAgD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../src/themes/default.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAU,MAAM,WAAW,CAAC;AAKrD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../src/themes/default.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAU,MAAM,WAAW,CAAC;AAKrD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,WAiO1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAOvB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,WAO3B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAOvB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Transaction } from '@codemirror/state';
|
|
2
|
+
/**
|
|
3
|
+
* CodeMirror callbacks swallow errors so wrap handlers.
|
|
4
|
+
*/
|
|
5
|
+
export declare const callbackWrapper: <T extends Function>(fn: T) => T;
|
|
6
|
+
export declare const logChanges: (trs: readonly Transaction[]) => void;
|
|
7
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;GAEG;AAEH,eAAO,MAAM,eAAe,kCAOR,CAAC;AAErB,eAAO,MAAM,UAAU,QAAS,SAAS,WAAW,EAAE,SAmBrD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-editor",
|
|
3
|
-
"version": "0.3.11-main.
|
|
3
|
+
"version": "0.3.11-main.508f304",
|
|
4
4
|
"description": "Document editing experience within a DXOS shell.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -13,20 +13,20 @@
|
|
|
13
13
|
"src"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@codemirror/autocomplete": "^6.
|
|
17
|
-
"@codemirror/commands": "^6.3.
|
|
18
|
-
"@codemirror/lang-markdown": "^6.2.
|
|
19
|
-
"@codemirror/language": "^6.
|
|
16
|
+
"@codemirror/autocomplete": "^6.12.0",
|
|
17
|
+
"@codemirror/commands": "^6.3.3",
|
|
18
|
+
"@codemirror/lang-markdown": "^6.2.4",
|
|
19
|
+
"@codemirror/language": "^6.10.0",
|
|
20
20
|
"@codemirror/language-data": "^6.3.1",
|
|
21
21
|
"@codemirror/lint": "^6.4.2",
|
|
22
22
|
"@codemirror/search": "^6.5.5",
|
|
23
|
-
"@codemirror/state": "^6.
|
|
23
|
+
"@codemirror/state": "^6.4.0",
|
|
24
24
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
25
|
-
"@codemirror/view": "^6.
|
|
25
|
+
"@codemirror/view": "^6.23.0",
|
|
26
26
|
"@fluentui/react-tabster": "^9.16.1",
|
|
27
|
-
"@lezer/common": "^1.
|
|
27
|
+
"@lezer/common": "^1.2.1",
|
|
28
28
|
"@lezer/highlight": "^1.2.0",
|
|
29
|
-
"@lezer/markdown": "^1.
|
|
29
|
+
"@lezer/markdown": "^1.2.0",
|
|
30
30
|
"@replit/codemirror-vim": "^6.0.14",
|
|
31
31
|
"codemirror": "6.0.1",
|
|
32
32
|
"lib0": "^0.2.65",
|
|
@@ -38,24 +38,24 @@
|
|
|
38
38
|
"y-codemirror.next": "^0.3.2",
|
|
39
39
|
"y-protocols": "^1.0.5",
|
|
40
40
|
"yjs": "^13.6.10",
|
|
41
|
-
"@dxos/async": "0.3.11-main.
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/log": "0.3.11-main.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/react-
|
|
52
|
-
"@dxos/react-ui": "0.3.11-main.
|
|
53
|
-
"@dxos/text-model": "0.3.11-main.
|
|
54
|
-
"@dxos/util": "0.3.11-main.
|
|
41
|
+
"@dxos/async": "0.3.11-main.508f304",
|
|
42
|
+
"@dxos/context": "0.3.11-main.508f304",
|
|
43
|
+
"@dxos/automerge": "0.3.11-main.508f304",
|
|
44
|
+
"@dxos/display-name": "0.3.11-main.508f304",
|
|
45
|
+
"@dxos/echo-schema": "0.3.11-main.508f304",
|
|
46
|
+
"@dxos/debug": "0.3.11-main.508f304",
|
|
47
|
+
"@dxos/log": "0.3.11-main.508f304",
|
|
48
|
+
"@dxos/invariant": "0.3.11-main.508f304",
|
|
49
|
+
"@dxos/react-ui": "0.3.11-main.508f304",
|
|
50
|
+
"@dxos/protocols": "0.3.11-main.508f304",
|
|
51
|
+
"@dxos/react-async": "0.3.11-main.508f304",
|
|
52
|
+
"@dxos/react-ui-theme": "0.3.11-main.508f304",
|
|
53
|
+
"@dxos/text-model": "0.3.11-main.508f304",
|
|
54
|
+
"@dxos/util": "0.3.11-main.508f304"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@automerge/automerge-repo-network-broadcastchannel": "^1.0.19",
|
|
58
|
-
"@faker-js/faker": "^8.
|
|
58
|
+
"@faker-js/faker": "^8.3.1",
|
|
59
59
|
"@phosphor-icons/react": "^2.0.5",
|
|
60
60
|
"@preact/signals-react": "^1.3.6",
|
|
61
61
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
@@ -67,18 +67,19 @@
|
|
|
67
67
|
"deepsignal": "1.4.0-shallow.0",
|
|
68
68
|
"react": "^18.2.0",
|
|
69
69
|
"react-dom": "^18.2.0",
|
|
70
|
-
"@dxos/config": "0.3.11-main.
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
70
|
+
"@dxos/config": "0.3.11-main.508f304",
|
|
71
|
+
"@dxos/keyboard": "0.3.11-main.508f304",
|
|
72
|
+
"@dxos/echo-typegen": "0.3.11-main.508f304",
|
|
73
|
+
"@dxos/echo-signals": "0.3.11-main.508f304",
|
|
74
|
+
"@dxos/react-ui": "0.3.11-main.508f304",
|
|
75
|
+
"@dxos/react-client": "0.3.11-main.508f304",
|
|
76
|
+
"@dxos/storybook-utils": "0.3.11-main.508f304"
|
|
76
77
|
},
|
|
77
78
|
"peerDependencies": {
|
|
78
79
|
"@phosphor-icons/react": "^2.0.5",
|
|
79
80
|
"react": "^18.2.0",
|
|
80
81
|
"react-dom": "^18.2.0",
|
|
81
|
-
"@dxos/react-client": "0.3.11-main.
|
|
82
|
+
"@dxos/react-client": "0.3.11-main.508f304"
|
|
82
83
|
},
|
|
83
84
|
"publishConfig": {
|
|
84
85
|
"access": "public"
|