@dxos/react-ui-thread 0.4.10-main.e2d2318 → 0.4.10-main.e9f9c10

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Comments.stories.d.ts","sourceRoot":"","sources":["../../../../src/Thread/Comments.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAGpB,OAAO,KAAwD,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAM5D,OAAO,EAML,KAAK,KAAK,EAMX,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAmE9C,KAAK,kBAAkB,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,aAAa,CAAC;QAAE,OAAO,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC,EAAE,CAAC;CACrD,CAAC;AA6IF,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;;;;;;;;;;mBA+He,UAAU;;;;;;;;;;;;;;;;;;;;;AAJ3B,wBAME;AAWF,eAAO,MAAM,OAAO;;;;CAInB,CAAC"}
1
+ {"version":3,"file":"Comments.stories.d.ts","sourceRoot":"","sources":["../../../../src/Thread/Comments.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAGpB,OAAO,KAAwD,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAO5D,OAAO,EAML,KAAK,KAAK,EAMX,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAmE9C,KAAK,kBAAkB,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,aAAa,CAAC;QAAE,OAAO,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC,EAAE,CAAC;CACrD,CAAC;AA6IF,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;;;;;;;;;;mBA+He,UAAU;;;;;;;;;;;;;;;;;;;;;AAJ3B,wBAME;AAWF,eAAO,MAAM,OAAO;;;;CAInB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-thread",
3
- "version": "0.4.10-main.e2d2318",
3
+ "version": "0.4.10-main.e9f9c10",
4
4
  "description": "A set of components to use with threads, including comments and messages.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -18,11 +18,11 @@
18
18
  "dependencies": {
19
19
  "@radix-ui/react-primitive": "^1.0.2",
20
20
  "date-fns": "^3.3.1",
21
- "@dxos/react-ui-editor": "0.4.10-main.e2d2318",
22
- "@dxos/react-ui-theme": "0.4.10-main.e2d2318",
23
- "@dxos/react-ui-mosaic": "0.4.10-main.e2d2318",
24
- "@dxos/util": "0.4.10-main.e2d2318",
25
- "@dxos/react-ui": "0.4.10-main.e2d2318"
21
+ "@dxos/react-ui": "0.4.10-main.e9f9c10",
22
+ "@dxos/react-ui-editor": "0.4.10-main.e9f9c10",
23
+ "@dxos/react-ui-mosaic": "0.4.10-main.e9f9c10",
24
+ "@dxos/react-ui-theme": "0.4.10-main.e9f9c10",
25
+ "@dxos/util": "0.4.10-main.e9f9c10"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@phosphor-icons/react": "^2.0.5",
@@ -32,12 +32,12 @@
32
32
  "react-dom": "^18.2.0",
33
33
  "vite": "^5.1.7",
34
34
  "vite-plugin-turbosnap": "^1.0.2",
35
- "@braneframe/types": "0.4.10-main.e2d2318",
36
- "@dxos/keys": "0.4.10-main.e2d2318",
37
- "@dxos/log": "0.4.10-main.e2d2318",
38
- "@dxos/random": "0.4.10-main.e2d2318",
39
- "@dxos/storybook-utils": "0.4.10-main.e2d2318",
40
- "@dxos/echo-schema": "0.4.10-main.e2d2318"
35
+ "@braneframe/types": "0.4.10-main.e9f9c10",
36
+ "@dxos/echo-schema": "0.4.10-main.e9f9c10",
37
+ "@dxos/log": "0.4.10-main.e9f9c10",
38
+ "@dxos/keys": "0.4.10-main.e9f9c10",
39
+ "@dxos/storybook-utils": "0.4.10-main.e9f9c10",
40
+ "@dxos/random": "0.4.10-main.e9f9c10"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@phosphor-icons/react": "^2.0.5",
@@ -8,7 +8,8 @@ import { Check, Trash } from '@phosphor-icons/react';
8
8
  import React, { type FC, useEffect, useMemo, useRef, useState } from 'react';
9
9
 
10
10
  import { MessageType, TextV0Type } from '@braneframe/types';
11
- import { createDocAccessor, create } from '@dxos/echo-schema';
11
+ import * as E from '@dxos/echo-schema';
12
+ import { createDocAccessor } from '@dxos/echo-schema';
12
13
  import { PublicKey } from '@dxos/keys';
13
14
  import { log } from '@dxos/log';
14
15
  import { faker } from '@dxos/random';
@@ -109,7 +110,7 @@ type StoryCommentThread = {
109
110
  const StoryMessageBlock = (props: MessageBlockProps<{ content?: TextV0Type }>) => {
110
111
  const { themeMode } = useThemeContext();
111
112
  const doc = props.block.content?.content;
112
- const accessor = createDocAccessor(props.block.content!, ['content']);
113
+ const accessor = E.createDocAccessor(props.block.content!, ['content']);
113
114
  const { parentRef } = useTextEditor(
114
115
  () => ({
115
116
  doc,
@@ -160,12 +161,12 @@ const StoryThread: FC<{
160
161
 
161
162
  const handleCreateMessage = () => {
162
163
  if (messageRef.current?.length) {
163
- const message = create(MessageType, {
164
+ const message = E.object(MessageType, {
164
165
  from: { identityKey: authorId },
165
166
  blocks: [
166
167
  {
167
168
  timestamp: new Date().toISOString(),
168
- content: create(TextV0Type, { content: messageRef.current }),
169
+ content: E.object(TextV0Type, { content: messageRef.current }),
169
170
  },
170
171
  ],
171
172
  });
@@ -251,7 +252,7 @@ type StoryProps = {
251
252
  };
252
253
 
253
254
  const Story = ({ text, autoCreate }: StoryProps) => {
254
- const [item] = useState(create(TextV0Type, { content: text ?? '' }));
255
+ const [item] = useState(E.object(TextV0Type, { content: text ?? '' }));
255
256
  const [threads, setThreads] = useState<StoryCommentThread[]>([]);
256
257
  const [selected, setSelected] = useState<string>();
257
258
 
@@ -277,7 +278,7 @@ const Story = ({ text, autoCreate }: StoryProps) => {
277
278
  blocks: [
278
279
  {
279
280
  timestamp: new Date().toISOString(),
280
- content: create(TextV0Type, { content: faker.lorem.sentence() }),
281
+ content: E.object(TextV0Type, { content: faker.lorem.sentence() }),
281
282
  },
282
283
  ],
283
284
  }),