@dxos/react-ui-editor 0.8.4-main.cb12b3f963 → 0.8.4-main.d05539e30a

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-editor",
3
- "version": "0.8.4-main.cb12b3f963",
3
+ "version": "0.8.4-main.d05539e30a",
4
4
  "description": "Text editor components.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -8,7 +8,7 @@
8
8
  "type": "git",
9
9
  "url": "https://github.com/dxos/dxos"
10
10
  },
11
- "license": "MIT",
11
+ "license": "FSL-1.1-Apache-2.0",
12
12
  "author": "DXOS.org",
13
13
  "sideEffects": false,
14
14
  "type": "module",
@@ -50,7 +50,7 @@
50
50
  "@codemirror/search": "^6.5.11",
51
51
  "@codemirror/state": "^6.5.2",
52
52
  "@codemirror/theme-one-dark": "^6.1.3",
53
- "@codemirror/view": "^6.38.4",
53
+ "@codemirror/view": "^6.38.5",
54
54
  "@fluentui/react-tabster": "9.26.11",
55
55
  "@lezer/common": "^1.2.2",
56
56
  "@lezer/generator": "^1.7.1",
@@ -69,31 +69,31 @@
69
69
  "lodash.merge": "^4.6.2",
70
70
  "lodash.sortby": "^4.7.0",
71
71
  "style-mod": "^4.1.0",
72
- "@dxos/app-graph": "0.8.4-main.cb12b3f963",
73
- "@dxos/async": "0.8.4-main.cb12b3f963",
74
- "@dxos/debug": "0.8.4-main.cb12b3f963",
75
- "@dxos/client": "0.8.4-main.cb12b3f963",
76
- "@dxos/context": "0.8.4-main.cb12b3f963",
77
- "@dxos/display-name": "0.8.4-main.cb12b3f963",
78
- "@dxos/echo": "0.8.4-main.cb12b3f963",
79
- "@dxos/effect": "0.8.4-main.cb12b3f963",
80
- "@dxos/invariant": "0.8.4-main.cb12b3f963",
81
- "@dxos/echo-db": "0.8.4-main.cb12b3f963",
82
- "@dxos/lit-ui": "0.8.4-main.cb12b3f963",
83
- "@dxos/log": "0.8.4-main.cb12b3f963",
84
- "@dxos/protocols": "0.8.4-main.cb12b3f963",
85
- "@dxos/react-hooks": "0.8.4-main.cb12b3f963",
86
- "@dxos/react-ui-mosaic": "0.8.4-main.cb12b3f963",
87
- "@dxos/react-ui-menu": "0.8.4-main.cb12b3f963",
88
- "@dxos/ui": "0.8.4-main.cb12b3f963",
89
- "@dxos/ui-editor": "0.8.4-main.cb12b3f963",
90
- "@dxos/util": "0.8.4-main.cb12b3f963",
91
- "@dxos/ui-theme": "0.8.4-main.cb12b3f963"
72
+ "@dxos/app-graph": "0.8.4-main.d05539e30a",
73
+ "@dxos/async": "0.8.4-main.d05539e30a",
74
+ "@dxos/client": "0.8.4-main.d05539e30a",
75
+ "@dxos/context": "0.8.4-main.d05539e30a",
76
+ "@dxos/echo": "0.8.4-main.d05539e30a",
77
+ "@dxos/display-name": "0.8.4-main.d05539e30a",
78
+ "@dxos/effect": "0.8.4-main.d05539e30a",
79
+ "@dxos/echo-db": "0.8.4-main.d05539e30a",
80
+ "@dxos/invariant": "0.8.4-main.d05539e30a",
81
+ "@dxos/debug": "0.8.4-main.d05539e30a",
82
+ "@dxos/lit-ui": "0.8.4-main.d05539e30a",
83
+ "@dxos/log": "0.8.4-main.d05539e30a",
84
+ "@dxos/protocols": "0.8.4-main.d05539e30a",
85
+ "@dxos/react-hooks": "0.8.4-main.d05539e30a",
86
+ "@dxos/react-ui-menu": "0.8.4-main.d05539e30a",
87
+ "@dxos/ui": "0.8.4-main.d05539e30a",
88
+ "@dxos/react-ui-mosaic": "0.8.4-main.d05539e30a",
89
+ "@dxos/ui-editor": "0.8.4-main.d05539e30a",
90
+ "@dxos/ui-theme": "0.8.4-main.d05539e30a",
91
+ "@dxos/util": "0.8.4-main.d05539e30a"
92
92
  },
93
93
  "devDependencies": {
94
94
  "@automerge/automerge": "3.2.6",
95
- "@automerge/automerge-repo": "2.6.0-subduction.17",
96
- "@automerge/automerge-repo-network-broadcastchannel": "2.6.0-subduction.17",
95
+ "@automerge/automerge-repo": "2.6.0-subduction.20",
96
+ "@automerge/automerge-repo-network-broadcastchannel": "2.6.0-subduction.20",
97
97
  "@effect-atom/atom-react": "^0.5.0",
98
98
  "@effect/ai": "0.33.2",
99
99
  "@effect/platform": "0.94.4",
@@ -114,23 +114,23 @@
114
114
  "react": "~19.2.3",
115
115
  "react-dom": "~19.2.3",
116
116
  "react-test-renderer": "~19.2.0",
117
- "vite": "^8.0.10",
117
+ "vite": "^8.0.13",
118
118
  "vite-plugin-top-level-await": "^1.6.0",
119
119
  "vite-plugin-wasm": "^3.6.0",
120
- "@dxos/echo-atom": "0.8.4-main.cb12b3f963",
121
- "@dxos/config": "0.8.4-main.cb12b3f963",
122
- "@dxos/echo": "0.8.4-main.cb12b3f963",
123
- "@dxos/random": "0.8.4-main.cb12b3f963",
124
- "@dxos/keyboard": "0.8.4-main.cb12b3f963",
125
- "@dxos/react-client": "0.8.4-main.cb12b3f963",
126
- "@dxos/react-ui": "0.8.4-main.cb12b3f963",
127
- "@dxos/react-ui-attention": "0.8.4-main.cb12b3f963",
128
- "@dxos/storybook-utils": "0.8.4-main.cb12b3f963",
129
- "@dxos/schema": "0.8.4-main.cb12b3f963",
130
- "@dxos/ui-theme": "0.8.4-main.cb12b3f963",
131
- "@dxos/ui-types": "0.8.4-main.cb12b3f963",
132
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.cb12b3f963",
133
- "@dxos/ai": "0.8.4-main.cb12b3f963"
120
+ "@dxos/ai": "0.8.4-main.d05539e30a",
121
+ "@dxos/config": "0.8.4-main.d05539e30a",
122
+ "@dxos/echo": "0.8.4-main.d05539e30a",
123
+ "@dxos/echo-atom": "0.8.4-main.d05539e30a",
124
+ "@dxos/keyboard": "0.8.4-main.d05539e30a",
125
+ "@dxos/random": "0.8.4-main.d05539e30a",
126
+ "@dxos/react-client": "0.8.4-main.d05539e30a",
127
+ "@dxos/react-ui-attention": "0.8.4-main.d05539e30a",
128
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.d05539e30a",
129
+ "@dxos/react-ui": "0.8.4-main.d05539e30a",
130
+ "@dxos/storybook-utils": "0.8.4-main.d05539e30a",
131
+ "@dxos/ui-theme": "0.8.4-main.d05539e30a",
132
+ "@dxos/ui-types": "0.8.4-main.d05539e30a",
133
+ "@dxos/schema": "0.8.4-main.d05539e30a"
134
134
  },
135
135
  "peerDependencies": {
136
136
  "@effect-atom/atom-react": "^0.5.0",
@@ -138,9 +138,9 @@
138
138
  "effect": "3.20.0",
139
139
  "react": "~19.2.3",
140
140
  "react-dom": "~19.2.3",
141
- "@dxos/ui-theme": "0.8.4-main.cb12b3f963",
142
- "@dxos/react-client": "0.8.4-main.cb12b3f963",
143
- "@dxos/react-ui": "0.8.4-main.cb12b3f963"
141
+ "@dxos/react-client": "0.8.4-main.d05539e30a",
142
+ "@dxos/react-ui": "0.8.4-main.d05539e30a",
143
+ "@dxos/ui-theme": "0.8.4-main.d05539e30a"
144
144
  },
145
145
  "publishConfig": {
146
146
  "access": "public"
@@ -110,11 +110,7 @@ type EditorContentProps = ThemedClassName<PropsWithChildren<{}>>;
110
110
  * Content component that wraps the toolbar and editor view area.
111
111
  */
112
112
  const EditorContent = ({ classNames, children }: EditorContentProps) => {
113
- return (
114
- <div role='none' className={mx('grid grid-rows-[min-content_1fr] h-full overflow-hidden', classNames)}>
115
- {children}
116
- </div>
117
- );
113
+ return <div className={mx('grid grid-rows-[min-content_1fr] h-full overflow-hidden', classNames)}>{children}</div>;
118
114
  };
119
115
 
120
116
  EditorContent.displayName = EDITOR_CONTENT_NAME;
@@ -88,9 +88,8 @@ export const EditorView = forwardRef<EditorController, EditorViewProps>(
88
88
 
89
89
  return (
90
90
  <div
91
- role='none'
92
91
  className={mx(
93
- 'w-full outline-hidden focus:border-accent-surface focus-within:border-neutral-focus-indicator',
92
+ 'w-full outline-hidden focus:border-accent-surface focus-within:border-focus-ring-subtle',
94
93
  classNames,
95
94
  )}
96
95
  {...(focusable ? focusAttributes : {})}
@@ -137,7 +137,7 @@ export const EditorMenuProvider = ({
137
137
  </Popover.Portal>
138
138
 
139
139
  {/* Content */}
140
- <div role='none' className='contents' ref={setRoot}>
140
+ <div className='contents' ref={setRoot}>
141
141
  {children}
142
142
  </div>
143
143
  </Popover.Root>
@@ -53,6 +53,7 @@ export const popover = (options: PopoverOptions = {}): Extension => {
53
53
  placeholder({
54
54
  // TODO(burdon): Translations.
55
55
  content: `Press '${Array.isArray(options.trigger) ? options.trigger[0] : options.trigger}' for commands`,
56
+ focusOnly: true,
56
57
  ...options.placeholder,
57
58
  }),
58
59
  ].filter(isTruthy);
@@ -68,7 +68,7 @@ export const EditorPreviewProvider = ({ children, onLookup }: EditorPreviewProvi
68
68
  <EditorPreviewContextProvider pending={value.pending} link={value.link} target={value.target}>
69
69
  <Popover.Root open={open} onOpenChange={setOpen}>
70
70
  <Popover.VirtualTrigger virtualRef={triggerRef as unknown as RefObject<HTMLButtonElement>} />
71
- <div role='none' className='contents' ref={setRoot}>
71
+ <div className='contents' ref={setRoot}>
72
72
  {children}
73
73
  </div>
74
74
  </Popover.Root>
@@ -74,15 +74,15 @@ export const assistant = (options: AssistantOptions): Extension[] => {
74
74
  },
75
75
  /** @apply dx-button */
76
76
  '.cm-panel button': {
77
- color: 'var(--color-base-surface-text) !important',
77
+ color: 'var(--color-base-foreground) !important',
78
78
  },
79
79
  '.cm-panel.cm-panel-lint ul': {
80
- color: 'var(--color-base-surface-text) !important',
80
+ color: 'var(--color-base-foreground) !important',
81
81
  backgroundColor: 'var(--color-base-surface) !important',
82
82
  marginRight: '2rem !important',
83
83
  },
84
84
  '.cm-panel.cm-panel-lint ul [aria-selected]': {
85
- color: 'var(--color-base-surface-text) !important',
85
+ color: 'var(--color-base-foreground) !important',
86
86
  backgroundColor: 'var(--color-base-surface) !important',
87
87
  },
88
88
  '.cm-panel.cm-panel-lint ul li': {
@@ -2,17 +2,17 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Repo } from '@automerge/automerge-repo';
5
+ import { Repo, initSubduction } from '@automerge/automerge-repo';
6
6
  import { BroadcastChannelNetworkAdapter } from '@automerge/automerge-repo-network-broadcastchannel';
7
7
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
8
  import React, { useCallback, useEffect, useState } from 'react';
9
9
 
10
- import { Obj, Ref } from '@dxos/echo';
10
+ import { Obj, Query, Ref } from '@dxos/echo';
11
11
  import { DocAccessor, createDocAccessor } from '@dxos/echo-db';
12
12
  import { TestSchema } from '@dxos/echo/testing';
13
13
  import { log } from '@dxos/log';
14
14
  import { type Messenger } from '@dxos/protocols';
15
- import { Query, useQuery, useSpace } from '@dxos/react-client/echo';
15
+ import { useQuery, useSpace } from '@dxos/react-client/echo';
16
16
  import { type Identity, useIdentity } from '@dxos/react-client/halo';
17
17
  import { useClientStory, withMultiClientProvider } from '@dxos/react-client/testing';
18
18
  import { Button, useThemeContext } from '@dxos/react-ui';
@@ -60,6 +60,9 @@ const DefaultStory = () => {
60
60
 
61
61
  useEffect(() => {
62
62
  queueMicrotask(async () => {
63
+ // Subduction-fork `Repo` constructs a `MemorySigner` internally; WASM must be
64
+ // initialized first or the constructor throws `'set_subduction_logger' of undefined`.
65
+ await initSubduction();
63
66
  const repo1 = new Repo({ network: [new BroadcastChannelNetworkAdapter()] });
64
67
  const repo2 = new Repo({ network: [new BroadcastChannelNetworkAdapter()] });
65
68
 
@@ -52,7 +52,7 @@ const DefaultStory = ({ autoFocus, initialValue, placeholder, viewMode = 'source
52
52
  <Editor.Root extensions={extensions} viewMode={viewMode}>
53
53
  <Editor.Content>
54
54
  <Editor.Toolbar classNames='dx-document' />
55
- <div role='none' className='dx-container dx-document bg-base-surface'>
55
+ <div className='dx-container dx-document bg-base-surface'>
56
56
  <Editor.View autoFocus={autoFocus} initialValue={initialValue} selectionEnd />
57
57
  </div>
58
58
  </Editor.Content>
@@ -206,7 +206,7 @@ export const links: Completion[] = [
206
206
  export const names = ['adam', 'alice', 'alison', 'bob', 'carol', 'charlie', 'sayuri', 'shoko'];
207
207
 
208
208
  const hover =
209
- 'rounded-xs text-base-surface-text text-primary-600 hover:text-primary-500 dark:text-primary-300 hover:dark:text-primary-200';
209
+ 'rounded-xs text-base-foreground text-primary-600 hover:text-primary-500 dark:text-primary-300 hover:dark:text-primary-200';
210
210
 
211
211
  export const renderLinkTooltip: RenderCallback<{ url: string }> = (el, { url }) => {
212
212
  el.appendChild(