@dxos/react-ui-editor 0.6.6 → 0.6.7-staging.1976059

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.
Files changed (33) hide show
  1. package/dist/lib/browser/index.mjs +20 -8
  2. package/dist/lib/browser/index.mjs.map +3 -3
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/types/src/components/Toolbar/Toolbar.d.ts +8 -8
  5. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
  6. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +13 -10
  7. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
  8. package/dist/types/src/extensions/automerge/automerge.stories.d.ts +6 -4
  9. package/dist/types/src/extensions/automerge/automerge.stories.d.ts.map +1 -1
  10. package/dist/types/src/extensions/automerge/defs.d.ts.map +1 -1
  11. package/dist/types/src/extensions/automerge/update-automerge.d.ts.map +1 -1
  12. package/dist/types/src/extensions/blast.d.ts.map +1 -1
  13. package/dist/types/src/extensions/command/state.d.ts +1 -1
  14. package/dist/types/src/extensions/command/state.d.ts.map +1 -1
  15. package/dist/types/src/extensions/comments.d.ts.map +1 -1
  16. package/dist/types/src/extensions/factories.d.ts.map +1 -1
  17. package/dist/types/src/extensions/state.d.ts.map +1 -1
  18. package/dist/types/src/hooks/InputMode.stories.d.ts +5 -3
  19. package/dist/types/src/hooks/InputMode.stories.d.ts.map +1 -1
  20. package/dist/types/src/hooks/TextEditor.stories.d.ts +26 -24
  21. package/dist/types/src/hooks/TextEditor.stories.d.ts.map +1 -1
  22. package/dist/types/src/hooks/useActionHandler.d.ts +1 -1
  23. package/dist/types/src/hooks/useTextEditor.d.ts.map +1 -1
  24. package/dist/types/src/themes/default.d.ts.map +1 -1
  25. package/dist/types/src/translations.d.ts +2 -0
  26. package/dist/types/src/translations.d.ts.map +1 -1
  27. package/dist/types/src/util.d.ts.map +1 -1
  28. package/package.json +27 -27
  29. package/src/components/Toolbar/Toolbar.tsx +9 -1
  30. package/src/extensions/automerge/automerge.stories.tsx +1 -1
  31. package/src/extensions/comments.ts +4 -0
  32. package/src/themes/default.ts +11 -7
  33. package/src/translations.ts +2 -0
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import '@dxosTheme';
2
+ import React from 'react';
3
3
  import { type UseTextEditorProps } from './useTextEditor';
4
4
  type StoryProps = {
5
5
  id?: string;
@@ -10,7 +10,7 @@ type StoryProps = {
10
10
  declare const _default: {
11
11
  title: string;
12
12
  decorators: import("@storybook/react/*").Decorator[];
13
- render: ({ id, text, extensions: _extensions, readonly, placeholder, selection, }: StoryProps) => JSX.Element;
13
+ render: ({ id, text, extensions: _extensions, readonly, placeholder, selection, }: StoryProps) => React.JSX.Element;
14
14
  parameters: {
15
15
  translations: {
16
16
  'en-US': {
@@ -26,6 +26,8 @@ declare const _default: {
26
26
  'blockquote label': string;
27
27
  'codeblock label': string;
28
28
  'comment label': string;
29
+ 'selection overlaps existing comment label': string;
30
+ 'select text to comment label': string;
29
31
  'image label': string;
30
32
  'heading label': string;
31
33
  'table label': string;
@@ -44,69 +46,69 @@ declare const _default: {
44
46
  };
45
47
  export default _default;
46
48
  export declare const Default: {
47
- render: () => JSX.Element;
49
+ render: () => React.JSX.Element;
48
50
  };
49
51
  export declare const Readonly: {
50
- render: () => JSX.Element;
52
+ render: () => React.JSX.Element;
51
53
  };
52
54
  export declare const NoExtensions: {
53
- render: () => JSX.Element;
55
+ render: () => React.JSX.Element;
54
56
  };
55
57
  export declare const Empty: {
56
- render: () => JSX.Element;
58
+ render: () => React.JSX.Element;
57
59
  };
58
60
  export declare const Scrolling: {
59
- render: () => JSX.Element;
61
+ render: () => React.JSX.Element;
60
62
  };
61
63
  export declare const ScrollingWithImages: {
62
- render: () => JSX.Element;
64
+ render: () => React.JSX.Element;
63
65
  };
64
66
  export declare const Links: {
65
- render: () => JSX.Element;
67
+ render: () => React.JSX.Element;
66
68
  };
67
69
  export declare const Image: {
68
- render: () => JSX.Element;
70
+ render: () => React.JSX.Element;
69
71
  };
70
72
  export declare const Code: {
71
- render: () => JSX.Element;
73
+ render: () => React.JSX.Element;
72
74
  };
73
75
  export declare const Lists: {
74
- render: () => JSX.Element;
76
+ render: () => React.JSX.Element;
75
77
  };
76
78
  export declare const Table: {
77
- render: () => JSX.Element;
79
+ render: () => React.JSX.Element;
78
80
  };
79
81
  export declare const Autocomplete: {
80
- render: () => JSX.Element;
82
+ render: () => React.JSX.Element;
81
83
  };
82
84
  export declare const CommentedOut: {
83
- render: () => JSX.Element;
85
+ render: () => React.JSX.Element;
84
86
  };
85
87
  export declare const Mention: {
86
- render: () => JSX.Element;
88
+ render: () => React.JSX.Element;
87
89
  };
88
90
  export declare const Command: {
89
- render: () => JSX.Element;
91
+ render: () => React.JSX.Element;
90
92
  };
91
93
  export declare const Comments: {
92
- render: () => JSX.Element;
94
+ render: () => React.JSX.Element;
93
95
  };
94
96
  export declare const Vim: {
95
- render: () => JSX.Element;
97
+ render: () => React.JSX.Element;
96
98
  };
97
99
  export declare const Annotations: {
98
- render: () => JSX.Element;
100
+ render: () => React.JSX.Element;
99
101
  };
100
102
  export declare const DND: {
101
- render: () => JSX.Element;
103
+ render: () => React.JSX.Element;
102
104
  };
103
105
  export declare const Listener: {
104
- render: () => JSX.Element;
106
+ render: () => React.JSX.Element;
105
107
  };
106
108
  export declare const Typewriter: {
107
- render: () => JSX.Element;
109
+ render: () => React.JSX.Element;
108
110
  };
109
111
  export declare const Blast: {
110
- render: () => JSX.Element;
112
+ render: () => React.JSX.Element;
111
113
  };
112
114
  //# sourceMappingURL=TextEditor.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextEditor.stories.d.ts","sourceRoot":"","sources":["../../../../src/hooks/TextEditor.stories.tsx"],"names":[],"mappings":";AAIA,OAAO,YAAY,CAAC;AAmBpB,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA0NzE,KAAK,UAAU,GAAG;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C;AAEF,eAAO,MAAM,KAAK;;CAqBjB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { type EditorView } from '@codemirror/view';
2
2
  import { type ToolbarProps } from '../components';
3
- export declare const useActionHandler: (view?: EditorView | null) => ToolbarProps['onAction'];
3
+ export declare const useActionHandler: (view?: EditorView | null) => ToolbarProps["onAction"];
4
4
  //# sourceMappingURL=useActionHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTextEditor.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTextEditor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAK5D,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,GAAG;QACtD,QAAQ,EAAE,CAAC,CAAC;QACZ,OAAO,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAC;KAC/C,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,iBAA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K,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,YAAY,CAAC,GAAG;IACrF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,aAAa,WACjB,aAAa,CAAC,kBAAkB,CAAC,SAClC,cAAc,KACnB,aA6HF,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,WAgR1B,CAAC"}
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,WAoR1B,CAAC"}
@@ -13,6 +13,8 @@ declare const _default: {
13
13
  'blockquote label': string;
14
14
  'codeblock label': string;
15
15
  'comment label': string;
16
+ 'selection overlaps existing comment label': string;
17
+ 'select text to comment label': string;
16
18
  'image label': string;
17
19
  'heading label': string;
18
20
  'table label': string;
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhD,wBA4BE"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhD,wBA8BE"}
@@ -1 +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,2BAA4B,CAAC,KAAG,CAOxC,CAAC;AAErB,eAAO,MAAM,UAAU,QAAS,SAAS,WAAW,EAAE,SAmBrD,CAAC"}
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,GAAI,CAAC,SAAS,QAAQ,MAAM,CAAC,KAAG,CAOxC,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.6.6",
3
+ "version": "0.6.7-staging.1976059",
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",
@@ -47,19 +47,19 @@
47
47
  "lodash.sortby": "^4.7.0",
48
48
  "react-dropzone": "^14.2.3",
49
49
  "style-mod": "^4.1.0",
50
- "@dxos/async": "0.6.6",
51
- "@dxos/automerge": "0.6.6",
52
- "@dxos/context": "0.6.6",
53
- "@dxos/debug": "0.6.6",
54
- "@dxos/display-name": "0.6.6",
55
- "@dxos/echo-schema": "0.6.6",
56
- "@dxos/invariant": "0.6.6",
57
- "@dxos/log": "0.6.6",
58
- "@dxos/protocols": "0.6.6",
59
- "@dxos/react-async": "0.6.6",
60
- "@dxos/react-ui": "0.6.6",
61
- "@dxos/react-ui-theme": "0.6.6",
62
- "@dxos/util": "0.6.6"
50
+ "@dxos/async": "0.6.7-staging.1976059",
51
+ "@dxos/context": "0.6.7-staging.1976059",
52
+ "@dxos/debug": "0.6.7-staging.1976059",
53
+ "@dxos/automerge": "0.6.7-staging.1976059",
54
+ "@dxos/invariant": "0.6.7-staging.1976059",
55
+ "@dxos/display-name": "0.6.7-staging.1976059",
56
+ "@dxos/echo-schema": "0.6.7-staging.1976059",
57
+ "@dxos/log": "0.6.7-staging.1976059",
58
+ "@dxos/protocols": "0.6.7-staging.1976059",
59
+ "@dxos/react-async": "0.6.7-staging.1976059",
60
+ "@dxos/react-ui": "0.6.7-staging.1976059",
61
+ "@dxos/react-ui-theme": "0.6.7-staging.1976059",
62
+ "@dxos/util": "0.6.7-staging.1976059"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@phosphor-icons/react": "^2.1.5",
@@ -71,8 +71,8 @@
71
71
  "@types/lodash.get": "^4.4.7",
72
72
  "@types/lodash.pick": "^4.4.7",
73
73
  "@types/lodash.sortby": "^4.7.7",
74
- "@types/react": "^18.0.21",
75
- "@types/react-dom": "^18.0.6",
74
+ "@types/react": "~18.2.0",
75
+ "@types/react-dom": "~18.2.0",
76
76
  "@types/react-test-renderer": "^17.0.2",
77
77
  "@vitest/browser": "^1.5.0",
78
78
  "@vitest/ui": "^1.5.0",
@@ -85,22 +85,22 @@
85
85
  "vite-plugin-top-level-await": "^1.4.1",
86
86
  "vite-plugin-wasm": "^3.3.0",
87
87
  "vitest": "^1.5.0",
88
- "@dxos/automerge": "0.6.6",
89
- "@dxos/config": "0.6.6",
90
- "@dxos/echo-signals": "0.6.6",
91
- "@braneframe/types": "0.6.6",
92
- "@dxos/echo-typegen": "0.6.6",
93
- "@dxos/keyboard": "0.6.6",
94
- "@dxos/random": "0.6.6",
95
- "@dxos/react-client": "0.6.6",
96
- "@dxos/react-ui": "0.6.6",
97
- "@dxos/storybook-utils": "0.6.6"
88
+ "@dxos/automerge": "0.6.7-staging.1976059",
89
+ "@braneframe/types": "0.6.7-staging.1976059",
90
+ "@dxos/config": "0.6.7-staging.1976059",
91
+ "@dxos/echo-signals": "0.6.7-staging.1976059",
92
+ "@dxos/echo-typegen": "0.6.7-staging.1976059",
93
+ "@dxos/keyboard": "0.6.7-staging.1976059",
94
+ "@dxos/random": "0.6.7-staging.1976059",
95
+ "@dxos/react-ui": "0.6.7-staging.1976059",
96
+ "@dxos/react-client": "0.6.7-staging.1976059",
97
+ "@dxos/storybook-utils": "0.6.7-staging.1976059"
98
98
  },
99
99
  "peerDependencies": {
100
100
  "@phosphor-icons/react": "^2.1.5",
101
101
  "react": "^18.0.0",
102
102
  "react-dom": "^18.0.0",
103
- "@dxos/react-client": "0.6.6"
103
+ "@dxos/react-client": "0.6.7-staging.1976059"
104
104
  },
105
105
  "publishConfig": {
106
106
  "access": "public"
@@ -482,6 +482,14 @@ const MarkdownCustom = ({ onUpload }: MarkdownCustomOptions = {}) => {
482
482
  const MarkdownActions = () => {
483
483
  const { onAction, state } = useToolbarContext('MarkdownActions');
484
484
  const { t } = useTranslation(translationKey);
485
+
486
+ let toolTipKey = 'comment label';
487
+ if (state?.comment) {
488
+ toolTipKey = 'selection overlaps existing comment label';
489
+ } else if (state?.selection === false) {
490
+ toolTipKey = 'select text to comment label';
491
+ }
492
+
485
493
  return (
486
494
  <>
487
495
  {/* TODO(burdon): Toggle readonly state. */}
@@ -495,7 +503,7 @@ const MarkdownActions = () => {
495
503
  onClick={() => onAction?.({ type: 'comment' })}
496
504
  disabled={!state || state.comment || !state.selection}
497
505
  >
498
- {t('comment label')}
506
+ {t(toolTipKey)}
499
507
  </ToolbarButton>
500
508
  </>
501
509
  );
@@ -10,7 +10,7 @@ import React, { useEffect, useState } from 'react';
10
10
  import { TextType } from '@braneframe/types';
11
11
  import { Repo } from '@dxos/automerge/automerge-repo';
12
12
  import { BroadcastChannelNetworkAdapter } from '@dxos/automerge/automerge-repo-network-broadcastchannel';
13
- import { create, type Expando } from '@dxos/echo-schema';
13
+ import { type Expando, create } from '@dxos/echo-schema';
14
14
  import { type PublicKey } from '@dxos/keys';
15
15
  import { Filter, DocAccessor, createDocAccessor, useSpace, useQuery, type Space } from '@dxos/react-client/echo';
16
16
  import { useIdentity, type Identity } from '@dxos/react-client/halo';
@@ -611,6 +611,10 @@ const hasActiveSelection = (state: EditorState): boolean => {
611
611
  return state.selection.ranges.some((range) => !range.empty);
612
612
  };
613
613
 
614
+ /**
615
+ * Manages external comment synchronization for the editor.
616
+ * This class subscribes to external comment updates and applies them to the editor view.
617
+ */
614
618
  class ExternalCommentSync implements PluginValue {
615
619
  private readonly unsubscribe: () => void;
616
620
 
@@ -150,9 +150,7 @@ export const defaultTheme: ThemeStyles = {
150
150
  //
151
151
  // tooltip
152
152
  //
153
- '.cm-tooltip': {
154
- border: 'none',
155
- },
153
+ '.cm-tooltip': {},
156
154
  '&light .cm-tooltip': {
157
155
  background: `${get(tokens, 'extend.colors.neutral.100')} !important`,
158
156
  },
@@ -165,21 +163,27 @@ export const defaultTheme: ThemeStyles = {
165
163
  // autocomplete
166
164
  // https://github.com/codemirror/autocomplete/blob/main/src/completion.ts
167
165
  //
168
- '.cm-tooltip-autocomplete': {
166
+ '.cm-tooltip.cm-tooltip-autocomplete': {
169
167
  marginTop: '4px',
170
168
  marginLeft: '-3px',
171
169
  },
172
- '.cm-tooltip-autocomplete > ul': {
170
+ '.cm-tooltip.cm-tooltip-autocomplete > ul': {
173
171
  maxHeight: '20em !important',
174
172
  },
175
- '.cm-tooltip-autocomplete > ul > li': {},
176
- '.cm-tooltip-autocomplete > ul > li[aria-selected]': {},
173
+ '.cm-tooltip.cm-tooltip-autocomplete > ul > li': {},
174
+ '.cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected]': {},
177
175
  // TODO(burdon): Can we add a class prefix to avoid adding !important?
178
176
  '.cm-tooltip.cm-tooltip-autocomplete > ul > completion-section': {
179
177
  paddingLeft: '4px !important',
180
178
  borderBottom: 'none !important',
181
179
  color: get(tokens, 'extend.colors.primary.500'),
182
180
  },
181
+ '.cm-tooltip.cm-completionInfo': {
182
+ border: get(tokens, 'extend.colors.neutral.500'),
183
+ width: '360px !important',
184
+ margin: '-10px 1px 0 1px',
185
+ padding: '8px !important',
186
+ },
183
187
  '.cm-completionIcon': {
184
188
  display: 'none',
185
189
  },
@@ -19,6 +19,8 @@ export default [
19
19
  'blockquote label': 'Block quote',
20
20
  'codeblock label': 'Code block',
21
21
  'comment label': 'Create comment',
22
+ 'selection overlaps existing comment label': 'Selection overlaps existing comment',
23
+ 'select text to comment label': 'Select text to comment',
22
24
  'image label': 'Insert image',
23
25
  'heading label': 'Heading level',
24
26
  'table label': 'Create table',