@dxos/react-ui-editor 0.6.10-main.e92b5eb → 0.6.10-staging.00555f6
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 +737 -719
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/InputMode.stories.d.ts +1 -0
- package/dist/types/src/InputMode.stories.d.ts.map +1 -1
- package/dist/types/src/TextEditor.stories.d.ts +19 -12
- package/dist/types/src/TextEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/defaults.d.ts +5 -1
- package/dist/types/src/defaults.d.ts.map +1 -1
- package/dist/types/src/extensions/autocomplete.d.ts +3 -2
- package/dist/types/src/extensions/autocomplete.d.ts.map +1 -1
- package/dist/types/src/extensions/automerge/automerge.stories.d.ts +1 -0
- package/dist/types/src/extensions/automerge/automerge.stories.d.ts.map +1 -1
- package/dist/types/src/extensions/comments.d.ts.map +1 -1
- package/dist/types/src/extensions/dnd.d.ts.map +1 -1
- package/dist/types/src/extensions/factories.d.ts +2 -2
- package/dist/types/src/extensions/factories.d.ts.map +1 -1
- package/dist/types/src/extensions/folding.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/action.d.ts +1 -1
- package/dist/types/src/extensions/markdown/action.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/bundle.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/changes.d.ts +10 -0
- package/dist/types/src/extensions/markdown/changes.d.ts.map +1 -0
- package/dist/types/src/extensions/markdown/changes.test.d.ts +2 -0
- package/dist/types/src/extensions/markdown/changes.test.d.ts.map +1 -0
- package/dist/types/src/extensions/markdown/debug.d.ts +11 -0
- package/dist/types/src/extensions/markdown/debug.d.ts.map +1 -0
- package/dist/types/src/extensions/markdown/decorate.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/formatting.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/index.d.ts +1 -0
- package/dist/types/src/extensions/markdown/index.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/styles.d.ts +4 -0
- package/dist/types/src/extensions/markdown/styles.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/styles/theme.d.ts +1 -1
- package/dist/types/src/styles/theme.d.ts.map +1 -1
- package/dist/types/src/styles/tokens.d.ts +2 -4
- package/dist/types/src/styles/tokens.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +26 -27
- package/src/TextEditor.stories.tsx +123 -75
- package/src/components/Toolbar/Toolbar.tsx +91 -92
- package/src/defaults.ts +16 -11
- package/src/extensions/annotations.ts +2 -2
- package/src/extensions/autocomplete.ts +4 -1
- package/src/extensions/awareness/awareness.ts +1 -1
- package/src/extensions/comments.ts +11 -45
- package/src/extensions/dnd.ts +3 -5
- package/src/extensions/factories.ts +4 -4
- package/src/extensions/folding.tsx +3 -4
- package/src/extensions/markdown/action.ts +1 -0
- package/src/extensions/markdown/bundle.ts +0 -1
- package/src/extensions/markdown/{link-paste.test.ts → changes.test.ts} +2 -2
- package/src/extensions/markdown/changes.ts +148 -0
- package/src/extensions/markdown/debug.ts +44 -0
- package/src/extensions/markdown/decorate.ts +14 -93
- package/src/extensions/markdown/formatting.ts +1 -2
- package/src/extensions/markdown/highlight.ts +2 -2
- package/src/extensions/markdown/index.ts +1 -0
- package/src/extensions/markdown/styles.ts +103 -0
- package/src/index.ts +0 -2
- package/src/styles/theme.ts +85 -147
- package/src/styles/tokens.ts +5 -5
- package/src/translations.ts +1 -0
- package/dist/types/src/extensions/markdown/link-paste.d.ts +0 -9
- package/dist/types/src/extensions/markdown/link-paste.d.ts.map +0 -1
- package/dist/types/src/extensions/markdown/link-paste.test.d.ts +0 -2
- package/dist/types/src/extensions/markdown/link-paste.test.d.ts.map +0 -1
- package/src/extensions/markdown/link-paste.ts +0 -107
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/action.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAsBnD,MAAM,MAAM,UAAU,GAClB,WAAW,GACX,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,GACP,UAAU,GACV,MAAM,GACN,MAAM,GACN,aAAa,GACb,cAAc,GACd,WAAW,GACX,SAAS,GACT,QAAQ,GACR,eAAe,GACf,OAAO,CAAC;AAEZ,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AAEvE,eAAO,MAAM,aAAa,EAAE,aA4D3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/action.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAsBnD,MAAM,MAAM,UAAU,GAClB,WAAW,GACX,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,GACP,UAAU,GACV,MAAM,GACN,MAAM,GACN,aAAa,GACb,cAAc,GACd,WAAW,GACX,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,eAAe,GACf,OAAO,CAAC;AAEZ,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AAEvE,eAAO,MAAM,aAAa,EAAE,aA4D3B,CAAC"}
|
|
@@ -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;AAInD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAIhD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,mBAAmB,qBAAqB,KAAQ,SAAS,
|
|
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;AAInD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAIhD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,mBAAmB,qBAAqB,KAAQ,SAAS,EA0C7F,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ViewPlugin, type ViewUpdate } from '@codemirror/view';
|
|
2
|
+
/**
|
|
3
|
+
* Monitors and augments changes.
|
|
4
|
+
*/
|
|
5
|
+
export declare const adjustChanges: () => ViewPlugin<{
|
|
6
|
+
update(update: ViewUpdate): void;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const createLink: (url: URL, label: string) => string;
|
|
9
|
+
export declare const createLinkLabel: (url: URL) => string;
|
|
10
|
+
//# sourceMappingURL=changes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/changes.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AAEjF;;GAEG;AAEH,eAAO,MAAM,aAAa;mBAGL,UAAU;EAoF9B,CAAC;AAMF,eAAO,MAAM,UAAU,QAAS,GAAG,SAAS,MAAM,KAAG,MAepD,CAAC;AAEF,eAAO,MAAM,eAAe,QAAS,GAAG,KAAG,MAW1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes.test.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/changes.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type EditorState, StateField } from '@codemirror/state';
|
|
2
|
+
export declare const debugTree: (cb: (tree: DebugNode) => void) => StateField<void>;
|
|
3
|
+
export type DebugNode = {
|
|
4
|
+
type: string;
|
|
5
|
+
from: number;
|
|
6
|
+
to: number;
|
|
7
|
+
text: string;
|
|
8
|
+
children: DebugNode[];
|
|
9
|
+
};
|
|
10
|
+
export declare const convertTreeToJson: (state: EditorState) => DebugNode;
|
|
11
|
+
//# sourceMappingURL=debug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/debug.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGjE,eAAO,MAAM,SAAS,OAAQ,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,qBAInD,CAAC;AAEL,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,WAAW,KAAG,SAqBtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorate.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/decorate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decorate.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/decorate.ts"],"names":[],"mappings":"AAmcA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD;AAED,eAAO,MAAM,gBAAgB,aAAa,eAAe,4CAgExD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/formatting.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/formatting.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,WAAW,EAKjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAU,MAAM,kBAAkB,CAAC;AAYtD,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IAGpB,SAAS,CAAC,EACN,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,WAAW,GACX,WAAW,GACX,IAAI,CAAC;IAET,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,gBAAgB,MAAO,UAAU,KAAK,UAAU,YAQ9B,CAAC;AAEhC,oBAAY,MAAM;IAChB,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,aAAa,IAAI;IACjB,IAAI,IAAI;CACT;AAED,oBAAY,IAAI;IACd,OAAO,IAAA;IACP,MAAM,IAAA;IACN,IAAI,IAAA;CACL;AAMD,eAAO,MAAM,UAAU,UAAW,MAAM,KAAG,YAmE1C,CAAC;AAMF,eAAO,MAAM,QAAQ,SAAU,MAAM,UAAU,OAAO,KAAG,YAqKxD,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,MAAM,KAAG,YAAqC,CAAC;AAE/E,eAAO,MAAM,WAAW,UAAW,MAAM,KAAG,YAAsC,CAAC;AAEnF,eAAO,MAAM,WAAW,UAAW,MAAM,KAAG,YAc3C,CAAC;AAEF,eAAO,MAAM,YAAY,cAA6B,CAAC;AACvD,eAAO,MAAM,cAAc,cAA+B,CAAC;AAC3D,eAAO,MAAM,mBAAmB,cAAoC,CAAC;AACrE,eAAO,MAAM,gBAAgB,cAA2B,CAAC;AA0EzD,eAAO,MAAM,WAAW,SAAU,UAAU,SAS3C,CAAC;AA4BF,eAAO,MAAM,UAAU,EAAE,YAUxB,CAAC;AAGF,eAAO,MAAM,OAAO,oBAAoB;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,KAAQ,YA6FhF,CAAC;AAMF,eAAO,MAAM,OAAO,SAAU,IAAI,KAAG,YAmJpC,CAAC;AAEF,eAAO,MAAM,UAAU,SAAU,IAAI,KAAG,YA+DvC,CAAC;AAEF,eAAO,MAAM,UAAU,SAAU,IAAI,KAAG,YAOvC,CAAC;AAqBF,eAAO,MAAM,aAAa,WAAY,OAAO,KAAG,YAyE/C,CAAC;AAEF,eAAO,MAAM,aAAa,cAAsB,CAAC;AAEjD,eAAO,MAAM,gBAAgB,cAAuB,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,YAE9B,CAAC;AAMF,eAAO,MAAM,YAAY,EAAE,YA8D1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,YA0C7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,YAE7B,CAAC;AAMF,MAAM,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEnC,eAAO,MAAM,gBAAgB,cAAc,iBAAiB,KAAQ,SAanE,CAAC;AA4CF;;GAEG;AACH,eAAO,MAAM,aAAa,UAAW,WAAW,KAAG,UAqKlD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAO,CAAC,UAAU,GAAG,SAAS,EAAE,SAAS,CAoBvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/markdown/styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C,eAAO,MAAM,gBAAgB,uCA2F3B,CAAC"}
|
|
@@ -3,7 +3,6 @@ export { type Extension, type EditorState } from '@codemirror/state';
|
|
|
3
3
|
export { type EditorView, keymap } from '@codemirror/view';
|
|
4
4
|
export { tags } from '@lezer/highlight';
|
|
5
5
|
export { TextKind } from '@dxos/protocols/proto/dxos/echo/model/text';
|
|
6
|
-
export { getToken } from './styles';
|
|
7
6
|
export * from './components';
|
|
8
7
|
export * from './defaults';
|
|
9
8
|
export * from './extensions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAEtE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAEtE,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AAEvB,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -31,8 +31,8 @@ export type ThemeStyles = Record<string, StyleSpec>;
|
|
|
31
31
|
* </div>
|
|
32
32
|
* </div>
|
|
33
33
|
*
|
|
34
|
-
* NOTE: Use one of '&', '&light', and '&dark' prefix to scope instance.
|
|
35
34
|
* NOTE: `light` and `dark` selectors are preprocessed by CodeMirror and can only be in the base theme.
|
|
35
|
+
* NOTE: Use 'unset' to remove default CM style.
|
|
36
36
|
*/
|
|
37
37
|
export declare const defaultTheme: ThemeStyles;
|
|
38
38
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/styles/theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/styles/theme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,YAAY,EAAE,WAyM1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/styles/tokens.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/styles/tokens.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,QAAQ,QAA8B,CAAC;AACpD,eAAO,MAAM,QAAQ,QAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,oBAAoB,CAAC
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhD,wBA+BE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-editor",
|
|
3
|
-
"version": "0.6.10-
|
|
3
|
+
"version": "0.6.10-staging.00555f6",
|
|
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",
|
|
@@ -43,22 +43,23 @@
|
|
|
43
43
|
"lib0": "^0.2.65",
|
|
44
44
|
"lodash.defaultsdeep": "^4.6.1",
|
|
45
45
|
"lodash.get": "^4.4.2",
|
|
46
|
+
"lodash.merge": "^4.6.2",
|
|
46
47
|
"lodash.sortby": "^4.7.0",
|
|
47
48
|
"react-dropzone": "^14.2.3",
|
|
48
49
|
"style-mod": "^4.1.0",
|
|
49
|
-
"@dxos/async": "0.6.10-
|
|
50
|
-
"@dxos/automerge": "0.6.10-
|
|
51
|
-
"@dxos/context": "0.6.10-
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/echo-schema": "0.6.10-
|
|
55
|
-
"@dxos/invariant": "0.6.10-
|
|
56
|
-
"@dxos/log": "0.6.10-
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/react-
|
|
59
|
-
"@dxos/react-ui": "0.6.10-
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/util": "0.6.10-
|
|
50
|
+
"@dxos/async": "0.6.10-staging.00555f6",
|
|
51
|
+
"@dxos/automerge": "0.6.10-staging.00555f6",
|
|
52
|
+
"@dxos/context": "0.6.10-staging.00555f6",
|
|
53
|
+
"@dxos/debug": "0.6.10-staging.00555f6",
|
|
54
|
+
"@dxos/display-name": "0.6.10-staging.00555f6",
|
|
55
|
+
"@dxos/echo-schema": "0.6.10-staging.00555f6",
|
|
56
|
+
"@dxos/invariant": "0.6.10-staging.00555f6",
|
|
57
|
+
"@dxos/log": "0.6.10-staging.00555f6",
|
|
58
|
+
"@dxos/react-async": "0.6.10-staging.00555f6",
|
|
59
|
+
"@dxos/react-ui": "0.6.10-staging.00555f6",
|
|
60
|
+
"@dxos/react-ui-theme": "0.6.10-staging.00555f6",
|
|
61
|
+
"@dxos/protocols": "0.6.10-staging.00555f6",
|
|
62
|
+
"@dxos/util": "0.6.10-staging.00555f6"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -68,12 +69,11 @@
|
|
|
68
69
|
"@testing-library/user-event": "^14.4.3",
|
|
69
70
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
70
71
|
"@types/lodash.get": "^4.4.7",
|
|
72
|
+
"@types/lodash.merge": "^4.6.6",
|
|
71
73
|
"@types/lodash.sortby": "^4.7.7",
|
|
72
74
|
"@types/react": "~18.2.0",
|
|
73
75
|
"@types/react-dom": "~18.2.0",
|
|
74
76
|
"@types/react-test-renderer": "^17.0.2",
|
|
75
|
-
"@vitest/browser": "^1.6.0",
|
|
76
|
-
"@vitest/ui": "^1.6.0",
|
|
77
77
|
"happy-dom": "^13.3.1",
|
|
78
78
|
"jsdom": "^24.0.0",
|
|
79
79
|
"react": "~18.2.0",
|
|
@@ -82,22 +82,21 @@
|
|
|
82
82
|
"vite": "^5.3.4",
|
|
83
83
|
"vite-plugin-top-level-await": "^1.4.1",
|
|
84
84
|
"vite-plugin-wasm": "^3.3.0",
|
|
85
|
-
"
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/echo-signals": "0.6.10-
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/storybook-utils": "0.6.10-main.e92b5eb"
|
|
85
|
+
"@dxos/automerge": "0.6.10-staging.00555f6",
|
|
86
|
+
"@dxos/config": "0.6.10-staging.00555f6",
|
|
87
|
+
"@dxos/echo-typegen": "0.6.10-staging.00555f6",
|
|
88
|
+
"@dxos/echo-signals": "0.6.10-staging.00555f6",
|
|
89
|
+
"@dxos/keyboard": "0.6.10-staging.00555f6",
|
|
90
|
+
"@dxos/react-client": "0.6.10-staging.00555f6",
|
|
91
|
+
"@dxos/react-ui": "0.6.10-staging.00555f6",
|
|
92
|
+
"@dxos/random": "0.6.10-staging.00555f6",
|
|
93
|
+
"@dxos/storybook-utils": "0.6.10-staging.00555f6"
|
|
95
94
|
},
|
|
96
95
|
"peerDependencies": {
|
|
97
96
|
"@phosphor-icons/react": "^2.1.5",
|
|
98
97
|
"react": "^18.0.0",
|
|
99
98
|
"react-dom": "^18.0.0",
|
|
100
|
-
"@dxos/react-client": "0.6.10-
|
|
99
|
+
"@dxos/react-client": "0.6.10-staging.00555f6"
|
|
101
100
|
},
|
|
102
101
|
"publishConfig": {
|
|
103
102
|
"access": "public"
|
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
7
|
import { markdown } from '@codemirror/lang-markdown';
|
|
8
|
+
import { openSearchPanel } from '@codemirror/search';
|
|
9
|
+
import { type Extension } from '@codemirror/state';
|
|
10
|
+
import { type EditorView } from '@codemirror/view';
|
|
8
11
|
import { ArrowSquareOut, X } from '@phosphor-icons/react';
|
|
9
12
|
import { effect, useSignal } from '@preact/signals-react';
|
|
10
13
|
import defaultsDeep from 'lodash.defaultsdeep';
|
|
11
|
-
import React, { type FC, type KeyboardEvent,
|
|
14
|
+
import React, { type FC, type KeyboardEvent, useEffect, useState } from 'react';
|
|
12
15
|
import { createRoot } from 'react-dom/client';
|
|
13
16
|
|
|
14
17
|
import { create, Expando } from '@dxos/echo-schema';
|
|
@@ -50,6 +53,8 @@ import {
|
|
|
50
53
|
type Comment,
|
|
51
54
|
type CommentsOptions,
|
|
52
55
|
type EditorSelectionState,
|
|
56
|
+
debugTree,
|
|
57
|
+
type DebugNode,
|
|
53
58
|
} from './extensions';
|
|
54
59
|
import { renderRoot } from './extensions/util';
|
|
55
60
|
import { useTextEditor, type UseTextEditorProps } from './hooks';
|
|
@@ -109,7 +114,7 @@ const content = {
|
|
|
109
114
|
code: str(
|
|
110
115
|
'### Code',
|
|
111
116
|
'',
|
|
112
|
-
'```',
|
|
117
|
+
'```bash',
|
|
113
118
|
'$ ls -las',
|
|
114
119
|
'```',
|
|
115
120
|
'',
|
|
@@ -199,6 +204,7 @@ const text = str(
|
|
|
199
204
|
content.table,
|
|
200
205
|
content.image,
|
|
201
206
|
content.footer,
|
|
207
|
+
'=== LAST LINE ===',
|
|
202
208
|
);
|
|
203
209
|
|
|
204
210
|
const links = [
|
|
@@ -212,17 +218,15 @@ const links = [
|
|
|
212
218
|
const names = ['adam', 'alice', 'alison', 'bob', 'carol', 'charlie', 'sayuri', 'shoko'];
|
|
213
219
|
|
|
214
220
|
const hover =
|
|
215
|
-
'rounded-sm text-
|
|
221
|
+
'rounded-sm text-baseText text-primary-600 hover:text-primary-500 dark:text-primary-300 hover:dark:text-primary-200';
|
|
216
222
|
|
|
217
223
|
const renderLinkTooltip = (el: Element, url: string) => {
|
|
218
224
|
const web = new URL(url);
|
|
219
225
|
createRoot(el).render(
|
|
220
|
-
<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
</a>
|
|
225
|
-
</StrictMode>,
|
|
226
|
+
<a href={url} target='_blank' rel='noreferrer' className={hover}>
|
|
227
|
+
{web.origin}
|
|
228
|
+
<ArrowSquareOut weight='bold' className={mx(getSize(4), 'inline-block leading-none mis-1')} />
|
|
229
|
+
</a>,
|
|
226
230
|
);
|
|
227
231
|
};
|
|
228
232
|
|
|
@@ -234,26 +238,22 @@ const Key: FC<{ char: string }> = ({ char }) => (
|
|
|
234
238
|
|
|
235
239
|
const onCommentsHover: CommentsOptions['onHover'] = (el, shortcut) => {
|
|
236
240
|
createRoot(el).render(
|
|
237
|
-
<
|
|
238
|
-
<div
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
{
|
|
242
|
-
|
|
243
|
-
))}
|
|
244
|
-
</div>
|
|
241
|
+
<div className='flex items-center gap-2 px-2 py-2 bg-neutral-700 text-white text-xs rounded'>
|
|
242
|
+
<div>Create comment</div>
|
|
243
|
+
<div className='flex gap-1'>
|
|
244
|
+
{keySymbols(parseShortcut(shortcut)).map((char) => (
|
|
245
|
+
<Key key={char} char={char} />
|
|
246
|
+
))}
|
|
245
247
|
</div>
|
|
246
|
-
</
|
|
248
|
+
</div>,
|
|
247
249
|
);
|
|
248
250
|
};
|
|
249
251
|
|
|
250
252
|
const renderLinkButton = (el: Element, url: string) => {
|
|
251
253
|
createRoot(el).render(
|
|
252
|
-
<
|
|
253
|
-
<
|
|
254
|
-
|
|
255
|
-
</a>
|
|
256
|
-
</StrictMode>,
|
|
254
|
+
<a href={url} target='_blank' rel='noreferrer' className={hover}>
|
|
255
|
+
<ArrowSquareOut weight='bold' className={mx(getSize(4), 'inline-block leading-none mis-1 mb-[2px]')} />
|
|
256
|
+
</a>,
|
|
257
257
|
);
|
|
258
258
|
};
|
|
259
259
|
|
|
@@ -263,29 +263,34 @@ const renderLinkButton = (el: Element, url: string) => {
|
|
|
263
263
|
|
|
264
264
|
type StoryProps = {
|
|
265
265
|
id?: string;
|
|
266
|
+
debug?: boolean;
|
|
266
267
|
text?: string;
|
|
267
268
|
readonly?: boolean;
|
|
268
269
|
placeholder?: string;
|
|
270
|
+
onReady?: (view: EditorView) => void;
|
|
269
271
|
} & Pick<UseTextEditorProps, 'scrollTo' | 'selection' | 'extensions'>;
|
|
270
272
|
|
|
271
273
|
const Story = ({
|
|
272
274
|
id = 'editor-' + PublicKey.random().toHex().slice(0, 8),
|
|
275
|
+
debug,
|
|
273
276
|
text,
|
|
274
277
|
extensions,
|
|
275
278
|
readonly,
|
|
276
279
|
placeholder = 'New document.',
|
|
277
280
|
scrollTo,
|
|
278
281
|
selection,
|
|
282
|
+
onReady,
|
|
279
283
|
}: StoryProps) => {
|
|
280
284
|
const [object] = useState(createEchoObject(create(Expando, { content: text ?? '' })));
|
|
281
285
|
const { themeMode } = useThemeContext();
|
|
282
|
-
const
|
|
286
|
+
const [tree, setTree] = useState<DebugNode>();
|
|
287
|
+
const { parentRef, focusAttributes, view } = useTextEditor(
|
|
283
288
|
() => ({
|
|
284
289
|
id,
|
|
285
290
|
initialValue: text,
|
|
286
291
|
extensions: [
|
|
287
292
|
createDataExtensions({ id, text: createDocAccessor(object, ['content']) }),
|
|
288
|
-
createBasicExtensions({ readonly, placeholder }),
|
|
293
|
+
createBasicExtensions({ readonly, placeholder, scrollPastEnd: true }),
|
|
289
294
|
createMarkdownExtensions({ themeMode }),
|
|
290
295
|
createThemeExtensions({
|
|
291
296
|
themeMode,
|
|
@@ -296,6 +301,7 @@ const Story = ({
|
|
|
296
301
|
},
|
|
297
302
|
}),
|
|
298
303
|
extensions || [],
|
|
304
|
+
debug ? debugTree(setTree) : [],
|
|
299
305
|
],
|
|
300
306
|
scrollTo,
|
|
301
307
|
selection,
|
|
@@ -303,7 +309,24 @@ const Story = ({
|
|
|
303
309
|
[object, extensions, themeMode],
|
|
304
310
|
);
|
|
305
311
|
|
|
306
|
-
|
|
312
|
+
useEffect(() => {
|
|
313
|
+
if (view) {
|
|
314
|
+
onReady?.(view);
|
|
315
|
+
}
|
|
316
|
+
}, [view]);
|
|
317
|
+
|
|
318
|
+
return (
|
|
319
|
+
<div className='flex w-full'>
|
|
320
|
+
<div role='none' className='flex w-full overflow-hidden' ref={parentRef} {...focusAttributes} />
|
|
321
|
+
{debug && (
|
|
322
|
+
<div className='w-[800px] border-l border-separator overflow-auto'>
|
|
323
|
+
<pre className='p-1 font-mono text-xs text-green-800 dark:text-green-200'>
|
|
324
|
+
{JSON.stringify(tree, null, 2)}
|
|
325
|
+
</pre>
|
|
326
|
+
</div>
|
|
327
|
+
)}
|
|
328
|
+
</div>
|
|
329
|
+
);
|
|
307
330
|
};
|
|
308
331
|
|
|
309
332
|
export default {
|
|
@@ -313,7 +336,7 @@ export default {
|
|
|
313
336
|
parameters: { translations, layout: 'fullscreen' },
|
|
314
337
|
};
|
|
315
338
|
|
|
316
|
-
const
|
|
339
|
+
const defaultExtensions: Extension[] = [
|
|
317
340
|
autocomplete({
|
|
318
341
|
onSearch: (text) => links.filter(({ label }) => label.toLowerCase().includes(text.toLowerCase())),
|
|
319
342
|
}),
|
|
@@ -323,37 +346,34 @@ const defaults = [
|
|
|
323
346
|
];
|
|
324
347
|
|
|
325
348
|
export const Default = {
|
|
326
|
-
render: () => <Story text={text} extensions={
|
|
349
|
+
render: () => <Story text={text} extensions={defaultExtensions} selection={{ anchor: 99, head: 110 }} />,
|
|
327
350
|
};
|
|
328
351
|
|
|
329
|
-
export const
|
|
330
|
-
render: () => {
|
|
331
|
-
// NOTE: Selection won't appear if text is reformatted.
|
|
332
|
-
const word = 'Scroll to here...';
|
|
333
|
-
const text = str('# Scroll To', longText, '', word, '', longText);
|
|
334
|
-
const idx = text.indexOf(word);
|
|
335
|
-
return (
|
|
336
|
-
<Story text={text} extensions={defaults} scrollTo={idx} selection={{ anchor: idx, head: idx + word.length }} />
|
|
337
|
-
);
|
|
338
|
-
},
|
|
352
|
+
export const Empty = {
|
|
353
|
+
render: () => <Story extensions={defaultExtensions} />,
|
|
339
354
|
};
|
|
340
355
|
|
|
341
356
|
export const Readonly = {
|
|
342
|
-
render: () => <Story text={text} extensions={
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
export const Empty = {
|
|
346
|
-
render: () => <Story extensions={defaults} />,
|
|
357
|
+
render: () => <Story text={text} extensions={defaultExtensions} readonly />,
|
|
347
358
|
};
|
|
348
359
|
|
|
349
360
|
export const NoExtensions = {
|
|
350
361
|
render: () => <Story text={text} />,
|
|
351
362
|
};
|
|
352
363
|
|
|
353
|
-
export const
|
|
354
|
-
render: () =>
|
|
364
|
+
export const Vim = {
|
|
365
|
+
render: () => (
|
|
366
|
+
<Story
|
|
367
|
+
text={str('# Vim Mode', '', 'The distant future. The year 2000.', '', content.paragraphs)}
|
|
368
|
+
extensions={[defaultExtensions, InputModeExtensions.vim]}
|
|
369
|
+
/>
|
|
370
|
+
),
|
|
355
371
|
};
|
|
356
372
|
|
|
373
|
+
//
|
|
374
|
+
// Scrolling
|
|
375
|
+
//
|
|
376
|
+
|
|
357
377
|
const longText = faker.helpers.multiple(() => faker.lorem.paragraph({ min: 8, max: 16 }), { count: 20 }).join('\n\n');
|
|
358
378
|
|
|
359
379
|
const largeWithImages = faker.helpers
|
|
@@ -367,12 +387,12 @@ const headings = str(
|
|
|
367
387
|
.flat(),
|
|
368
388
|
);
|
|
369
389
|
|
|
370
|
-
export const Headings = {
|
|
371
|
-
render: () => <Story text={headings} extensions={decorateMarkdown({ numberedHeadings: { from: 2, to: 4 } })} />,
|
|
372
|
-
};
|
|
373
|
-
|
|
374
390
|
const global = new Map<string, EditorSelectionState>();
|
|
375
391
|
|
|
392
|
+
export const Folding = {
|
|
393
|
+
render: () => <Story text={text} extensions={[editorGutter, folding()]} />,
|
|
394
|
+
};
|
|
395
|
+
|
|
376
396
|
export const Scrolling = {
|
|
377
397
|
render: () => (
|
|
378
398
|
<Story
|
|
@@ -386,7 +406,34 @@ export const Scrolling = {
|
|
|
386
406
|
};
|
|
387
407
|
|
|
388
408
|
export const ScrollingWithImages = {
|
|
389
|
-
render: () =>
|
|
409
|
+
render: () => (
|
|
410
|
+
<Story text={str('# Large Document', '', largeWithImages)} extensions={[decorateMarkdown(), image()]} />
|
|
411
|
+
),
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
export const ScrollTo = {
|
|
415
|
+
render: () => {
|
|
416
|
+
// NOTE: Selection won't appear if text is reformatted.
|
|
417
|
+
const word = 'Scroll to here...';
|
|
418
|
+
const text = str('# Scroll To', longText, '', word, '', longText);
|
|
419
|
+
const idx = text.indexOf(word);
|
|
420
|
+
return (
|
|
421
|
+
<Story
|
|
422
|
+
text={text}
|
|
423
|
+
extensions={defaultExtensions}
|
|
424
|
+
scrollTo={idx}
|
|
425
|
+
selection={{ anchor: idx, head: idx + word.length }}
|
|
426
|
+
/>
|
|
427
|
+
);
|
|
428
|
+
},
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
//
|
|
432
|
+
// Markdown
|
|
433
|
+
//
|
|
434
|
+
|
|
435
|
+
export const Headings = {
|
|
436
|
+
render: () => <Story text={headings} extensions={decorateMarkdown({ numberedHeadings: { from: 2, to: 4 } })} />,
|
|
390
437
|
};
|
|
391
438
|
|
|
392
439
|
export const Links = {
|
|
@@ -419,35 +466,39 @@ export const OrderedList = {
|
|
|
419
466
|
};
|
|
420
467
|
|
|
421
468
|
export const TaskList = {
|
|
422
|
-
render: () => <Story text={str(content.tasks, content.footer)} extensions={[decorateMarkdown()]} />,
|
|
469
|
+
render: () => <Story text={str(content.tasks, content.footer)} extensions={[decorateMarkdown()]} debug />,
|
|
423
470
|
};
|
|
424
471
|
|
|
425
472
|
export const Table = {
|
|
426
|
-
render: () => <Story text={str(content.table, content.footer)} extensions={[table()]} />,
|
|
473
|
+
render: () => <Story text={str(content.table, content.footer)} extensions={[decorateMarkdown(), table()]} />,
|
|
427
474
|
};
|
|
428
475
|
|
|
429
|
-
export const
|
|
476
|
+
export const CommentedOut = {
|
|
430
477
|
render: () => (
|
|
431
478
|
<Story
|
|
432
|
-
text={str('#
|
|
479
|
+
text={str('# Commented out', '', content.comment, content.footer)}
|
|
433
480
|
extensions={[
|
|
434
|
-
decorateMarkdown(
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}),
|
|
481
|
+
decorateMarkdown(),
|
|
482
|
+
markdown(),
|
|
483
|
+
// commentBlock()
|
|
438
484
|
]}
|
|
439
485
|
/>
|
|
440
486
|
),
|
|
441
487
|
};
|
|
442
488
|
|
|
443
|
-
|
|
489
|
+
//
|
|
490
|
+
// Custom
|
|
491
|
+
//
|
|
492
|
+
|
|
493
|
+
export const Autocomplete = {
|
|
444
494
|
render: () => (
|
|
445
495
|
<Story
|
|
446
|
-
text={str('#
|
|
496
|
+
text={str('# Autocomplete', '', 'Press Ctrl-Space...', content.footer)}
|
|
447
497
|
extensions={[
|
|
448
|
-
decorateMarkdown(),
|
|
449
|
-
|
|
450
|
-
|
|
498
|
+
decorateMarkdown({ renderLinkButton }),
|
|
499
|
+
autocomplete({
|
|
500
|
+
onSearch: (text) => links.filter(({ label }) => label.toLowerCase().includes(text.toLowerCase())),
|
|
501
|
+
}),
|
|
451
502
|
]}
|
|
452
503
|
/>
|
|
453
504
|
),
|
|
@@ -466,7 +517,13 @@ export const Mention = {
|
|
|
466
517
|
),
|
|
467
518
|
};
|
|
468
519
|
|
|
469
|
-
const
|
|
520
|
+
export const Search = {
|
|
521
|
+
render: () => (
|
|
522
|
+
<Story text={str('# Search', text)} extensions={defaultExtensions} onReady={(view) => openSearchPanel(view)} />
|
|
523
|
+
),
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
const CommandDialog = ({ onClose }: { onClose: (action?: CommandAction) => void }) => {
|
|
470
527
|
const [text, setText] = useState('');
|
|
471
528
|
const handleInsert = () => {
|
|
472
529
|
onClose(text.length ? { insert: text + '\n' } : undefined);
|
|
@@ -561,15 +618,6 @@ export const Comments = {
|
|
|
561
618
|
},
|
|
562
619
|
};
|
|
563
620
|
|
|
564
|
-
export const Vim = {
|
|
565
|
-
render: () => (
|
|
566
|
-
<Story
|
|
567
|
-
text={str('# Vim Mode', '', 'The distant future. The year 2000.', '', content.paragraphs)}
|
|
568
|
-
extensions={[defaults, InputModeExtensions.vim]}
|
|
569
|
-
/>
|
|
570
|
-
),
|
|
571
|
-
};
|
|
572
|
-
|
|
573
621
|
export const Annotations = {
|
|
574
622
|
render: () => <Story text={str('# Annotations', '', longText)} extensions={[annotations({ match: /volup/gi })]} />,
|
|
575
623
|
};
|
|
@@ -589,8 +637,6 @@ export const DND = {
|
|
|
589
637
|
),
|
|
590
638
|
};
|
|
591
639
|
|
|
592
|
-
const typewriterItems = localStorage.getItem('dxos.org/plugin/markdown/typewriter')?.split(',');
|
|
593
|
-
|
|
594
640
|
export const Listener = {
|
|
595
641
|
render: () => (
|
|
596
642
|
<Story
|
|
@@ -609,6 +655,8 @@ export const Listener = {
|
|
|
609
655
|
),
|
|
610
656
|
};
|
|
611
657
|
|
|
658
|
+
const typewriterItems = localStorage.getItem('dxos.org/plugin/markdown/typewriter')?.split(',');
|
|
659
|
+
|
|
612
660
|
export const Typewriter = {
|
|
613
661
|
render: () => (
|
|
614
662
|
<Story
|