@dxos/plugin-testing 0.8.4-main.52d7546f51 → 0.8.4-main.6fa680abb7
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/{chunk-YHPXIILW.mjs → chunk-NWOKPVNQ.mjs} +3 -3
- package/dist/lib/browser/{chunk-YHPXIILW.mjs.map → chunk-NWOKPVNQ.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +13 -12
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{operation-resolver-FLU4ZARD.mjs → operation-resolver-SR4GZ7Q5.mjs} +2 -2
- package/dist/lib/browser/{state-MIKI67FF.mjs → state-TCYYH5JN.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-OWK6XE6C.mjs → chunk-NWN7D2LS.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-OWK6XE6C.mjs.map → chunk-NWN7D2LS.mjs.map} +1 -1
- package/dist/lib/node-esm/index.mjs +13 -12
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{operation-resolver-NWF6KBHP.mjs → operation-resolver-A6XLCTWX.mjs} +2 -2
- package/dist/lib/node-esm/{state-JQVVUKO2.mjs → state-ZJEK6SP7.mjs} +2 -2
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/state/index.d.ts +1 -1
- package/dist/types/src/capabilities/state/state.d.ts +1 -1
- package/dist/types/src/components/{Layout.d.ts → Layout/Layout.d.ts} +1 -1
- package/dist/types/src/components/Layout/Layout.d.ts.map +1 -0
- package/dist/types/src/components/Layout/index.d.ts +2 -0
- package/dist/types/src/components/Layout/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -16
- package/src/components/{Layout.tsx → Layout/Layout.tsx} +14 -12
- package/src/components/Layout/index.ts +5 -0
- package/src/meta.ts +1 -1
- package/src/types/capabilities.ts +1 -1
- package/dist/types/src/components/Layout.d.ts.map +0 -1
- /package/dist/lib/browser/{operation-resolver-FLU4ZARD.mjs.map → operation-resolver-SR4GZ7Q5.mjs.map} +0 -0
- /package/dist/lib/browser/{state-MIKI67FF.mjs.map → state-TCYYH5JN.mjs.map} +0 -0
- /package/dist/lib/node-esm/{operation-resolver-NWF6KBHP.mjs.map → operation-resolver-A6XLCTWX.mjs.map} +0 -0
- /package/dist/lib/node-esm/{state-JQVVUKO2.mjs.map → state-ZJEK6SP7.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-testing",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.6fa680abb7",
|
|
4
4
|
"description": "Plugin testing utils",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@effect-atom/atom": "^0.5.1",
|
|
29
29
|
"@effect-atom/atom-react": "^0.5.0",
|
|
30
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/plugin-
|
|
34
|
-
"@dxos/plugin-
|
|
35
|
-
"@dxos/plugin-
|
|
36
|
-
"@dxos/plugin-
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
30
|
+
"@dxos/app-framework": "0.8.4-main.6fa680abb7",
|
|
31
|
+
"@dxos/app-toolkit": "0.8.4-main.6fa680abb7",
|
|
32
|
+
"@dxos/operation": "0.8.4-main.6fa680abb7",
|
|
33
|
+
"@dxos/plugin-client": "0.8.4-main.6fa680abb7",
|
|
34
|
+
"@dxos/plugin-graph": "0.8.4-main.6fa680abb7",
|
|
35
|
+
"@dxos/plugin-attention": "0.8.4-main.6fa680abb7",
|
|
36
|
+
"@dxos/plugin-settings": "0.8.4-main.6fa680abb7",
|
|
37
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.6fa680abb7",
|
|
38
|
+
"@dxos/plugin-theme": "0.8.4-main.6fa680abb7",
|
|
39
|
+
"@dxos/util": "0.8.4-main.6fa680abb7"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/react": "~19.2.7",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"effect": "3.19.16",
|
|
45
45
|
"react": "~19.2.3",
|
|
46
46
|
"react-dom": "~19.2.3",
|
|
47
|
-
"vite": "7.1.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/ui
|
|
47
|
+
"vite": "^7.1.11",
|
|
48
|
+
"@dxos/ui-theme": "0.8.4-main.6fa680abb7",
|
|
49
|
+
"@dxos/react-ui": "0.8.4-main.6fa680abb7"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"effect": "3.19.16",
|
|
53
53
|
"react": "~19.2.3",
|
|
54
54
|
"react-dom": "~19.2.3",
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/ui
|
|
55
|
+
"@dxos/ui-theme": "0.8.4-main.6fa680abb7",
|
|
56
|
+
"@dxos/react-ui": "0.8.4-main.6fa680abb7"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
@@ -15,11 +15,12 @@ import {
|
|
|
15
15
|
toLocalizedString,
|
|
16
16
|
useTranslation,
|
|
17
17
|
} from '@dxos/react-ui';
|
|
18
|
-
import { Card
|
|
18
|
+
import { Card } from '@dxos/react-ui';
|
|
19
|
+
import { Mosaic } from '@dxos/react-ui-mosaic';
|
|
19
20
|
import { descriptionMessage, mx } from '@dxos/ui-theme';
|
|
20
21
|
|
|
21
|
-
import { meta } from '
|
|
22
|
-
import { LayoutState, type LayoutStateProps } from '
|
|
22
|
+
import { meta } from '../../meta';
|
|
23
|
+
import { LayoutState, type LayoutStateProps } from '../../types';
|
|
23
24
|
|
|
24
25
|
const debounce_delay = 100;
|
|
25
26
|
|
|
@@ -106,7 +107,7 @@ export const Layout = ({ children }: PropsWithChildren<{}>) => {
|
|
|
106
107
|
role='dialog'
|
|
107
108
|
data={layout.dialogContent}
|
|
108
109
|
limit={1}
|
|
109
|
-
fallback={
|
|
110
|
+
fallback={ErrorFallback}
|
|
110
111
|
placeholder={<div />}
|
|
111
112
|
/>
|
|
112
113
|
) : (
|
|
@@ -115,7 +116,7 @@ export const Layout = ({ children }: PropsWithChildren<{}>) => {
|
|
|
115
116
|
classNames={layout.dialogOverlayClasses}
|
|
116
117
|
style={layout.dialogOverlayStyle}
|
|
117
118
|
>
|
|
118
|
-
<Surface.Surface role='dialog' data={layout.dialogContent} limit={1} fallback={
|
|
119
|
+
<Surface.Surface role='dialog' data={layout.dialogContent} limit={1} fallback={ErrorFallback} />
|
|
119
120
|
</DialogOverlay>
|
|
120
121
|
)}
|
|
121
122
|
</DialogRoot>
|
|
@@ -140,7 +141,7 @@ export const Layout = ({ children }: PropsWithChildren<{}>) => {
|
|
|
140
141
|
) : (
|
|
141
142
|
<span />
|
|
142
143
|
)}
|
|
143
|
-
<Card.
|
|
144
|
+
<Card.CloseIconButton onClick={handleClose} />
|
|
144
145
|
</Card.Toolbar>
|
|
145
146
|
<Surface.Surface role='card--content' data={layout.popoverContent} limit={1} />
|
|
146
147
|
</Card.Root>
|
|
@@ -158,15 +159,16 @@ export const Layout = ({ children }: PropsWithChildren<{}>) => {
|
|
|
158
159
|
);
|
|
159
160
|
};
|
|
160
161
|
|
|
161
|
-
export const
|
|
162
|
+
export const ErrorFallback = ({ error }: { error?: Error }) => {
|
|
162
163
|
const { t } = useTranslation(meta.id);
|
|
163
164
|
const errorString = error?.toString() ?? '';
|
|
164
165
|
return (
|
|
165
|
-
<div
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
<div
|
|
167
|
+
role='alert'
|
|
168
|
+
data-testid='error-boundary-fallback'
|
|
169
|
+
className={mx('overflow-auto p-8 dx-attention-surface grid place-items-center')}
|
|
170
|
+
>
|
|
171
|
+
<p className={mx(descriptionMessage, 'break-words rounded-md p-8', errorString.length < 256 && 'text-lg')}>
|
|
170
172
|
{error ? errorString : t('error fallback message')}
|
|
171
173
|
</p>
|
|
172
174
|
</div>
|
package/src/meta.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
|
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
8
|
export const meta: Plugin.Meta = {
|
|
9
|
-
id: 'dxos.
|
|
9
|
+
id: 'org.dxos.plugin.storybook-layout',
|
|
10
10
|
name: 'Storybook',
|
|
11
11
|
description: trim`
|
|
12
12
|
Development layout optimized for Storybook component testing and documentation.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAwD,MAAM,OAAO,CAAC;AAqB5G,eAAO,MAAM,MAAM,GAAI,cAAc,iBAAiB,CAAC,EAAE,CAAC,sBAoIzD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,sBAaxD,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|