@dxos/plugin-preview 0.8.4-main.406dc2a → 0.8.4-main.43cb759274
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/LICENSE +102 -5
- package/dist/lib/neutral/PreviewPlugin.mjs +9 -0
- package/dist/lib/neutral/PreviewPlugin.mjs.map +7 -0
- package/dist/lib/neutral/PreviewPlugin.node.mjs +17 -0
- package/dist/lib/neutral/PreviewPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/PreviewPlugin.workerd.mjs +17 -0
- package/dist/lib/neutral/PreviewPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +9 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-3SWUVHXJ.mjs +28 -0
- package/dist/lib/neutral/chunk-3SWUVHXJ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QOM5APM7.mjs +23 -0
- package/dist/lib/neutral/chunk-QOM5APM7.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +7 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +7 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +11 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/preview-popover-FLMYMFCH.mjs +94 -0
- package/dist/lib/neutral/preview-popover-FLMYMFCH.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-HDOPNIQM.mjs +406 -0
- package/dist/lib/neutral/react-surface-HDOPNIQM.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +7 -0
- package/dist/lib/neutral/testing.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +21 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/types/src/PreviewPlugin.d.ts +3 -1
- package/dist/types/src/PreviewPlugin.d.ts.map +1 -1
- package/dist/types/src/PreviewPlugin.node.d.ts +4 -0
- package/dist/types/src/PreviewPlugin.node.d.ts.map +1 -0
- package/dist/types/src/PreviewPlugin.test.d.ts +2 -0
- package/dist/types/src/PreviewPlugin.test.d.ts.map +1 -0
- package/dist/types/src/PreviewPlugin.workerd.d.ts +4 -0
- package/dist/types/src/PreviewPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +3 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/preview-popover.d.ts +3 -2
- package/dist/types/src/capabilities/preview-popover.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/cards/ExpandoCard.d.ts +4 -0
- package/dist/types/src/cards/ExpandoCard.d.ts.map +1 -0
- package/dist/types/src/cards/FormCard.d.ts +17 -0
- package/dist/types/src/cards/FormCard.d.ts.map +1 -0
- package/dist/types/src/cards/JsonCard.d.ts +5 -0
- package/dist/types/src/cards/JsonCard.d.ts.map +1 -0
- package/dist/types/src/cards/OrganizationCard.d.ts +5 -0
- package/dist/types/src/cards/OrganizationCard.d.ts.map +1 -0
- package/dist/types/src/cards/PersonCard.d.ts +5 -0
- package/dist/types/src/cards/PersonCard.d.ts.map +1 -0
- package/dist/types/src/cards/ProjectCard.d.ts +5 -0
- package/dist/types/src/cards/ProjectCard.d.ts.map +1 -0
- package/dist/types/src/cards/TaskCard.d.ts +5 -0
- package/dist/types/src/cards/TaskCard.d.ts.map +1 -0
- package/dist/types/src/cards/index.d.ts +8 -0
- package/dist/types/src/cards/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +0 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/stories/Card.stories.d.ts +42 -14
- package/dist/types/src/stories/Card.stories.d.ts.map +1 -1
- package/dist/types/src/stories/testing.d.ts +52 -11
- package/dist/types/src/stories/testing.d.ts.map +1 -1
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +8 -9
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +80 -39
- package/src/PreviewPlugin.node.ts +16 -0
- package/src/PreviewPlugin.test.ts +25 -0
- package/src/PreviewPlugin.tsx +17 -26
- package/src/PreviewPlugin.workerd.ts +16 -0
- package/src/capabilities/index.ts +3 -3
- package/src/capabilities/preview-popover.ts +93 -41
- package/src/capabilities/react-surface.tsx +139 -121
- package/src/cards/ExpandoCard.tsx +76 -0
- package/src/cards/FormCard.tsx +115 -0
- package/src/cards/JsonCard.tsx +19 -0
- package/src/cards/OrganizationCard.tsx +29 -0
- package/src/cards/PersonCard.tsx +65 -0
- package/src/cards/ProjectCard.tsx +22 -0
- package/src/cards/TaskCard.tsx +45 -0
- package/src/cards/index.ts +11 -0
- package/src/index.ts +0 -3
- package/src/meta.ts +12 -4
- package/src/plugin.ts +9 -0
- package/src/stories/Card.stories.tsx +141 -23
- package/src/stories/testing.tsx +117 -78
- package/src/testing.ts +7 -0
- package/src/translations.ts +8 -8
- package/dist/lib/browser/chunk-XKCIQK3C.mjs +0 -12
- package/dist/lib/browser/chunk-XKCIQK3C.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -64
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/preview-popover-RKHENTFP.mjs +0 -65
- package/dist/lib/browser/preview-popover-RKHENTFP.mjs.map +0 -7
- package/dist/lib/browser/react-surface-X56QWACK.mjs +0 -448
- package/dist/lib/browser/react-surface-X56QWACK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-L3IZVX56.mjs +0 -14
- package/dist/lib/node-esm/chunk-L3IZVX56.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -65
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/preview-popover-TZKX67EY.mjs +0 -67
- package/dist/lib/node-esm/preview-popover-TZKX67EY.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-4P7UCMK7.mjs +0 -449
- package/dist/lib/node-esm/react-surface-4P7UCMK7.mjs.map +0 -7
- package/dist/types/src/components/CardSubjectMenu.d.ts +0 -12
- package/dist/types/src/components/CardSubjectMenu.d.ts.map +0 -1
- package/dist/types/src/components/ContactCard.d.ts +0 -7
- package/dist/types/src/components/ContactCard.d.ts.map +0 -1
- package/dist/types/src/components/OrganizationCard.d.ts +0 -5
- package/dist/types/src/components/OrganizationCard.d.ts.map +0 -1
- package/dist/types/src/components/ProjectCard.d.ts +0 -5
- package/dist/types/src/components/ProjectCard.d.ts.map +0 -1
- package/dist/types/src/components/TaskCard.d.ts +0 -5
- package/dist/types/src/components/TaskCard.d.ts.map +0 -1
- package/dist/types/src/components/index.d.ts +0 -4
- package/dist/types/src/components/index.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -9
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/components/CardSubjectMenu.tsx +0 -82
- package/src/components/ContactCard.tsx +0 -78
- package/src/components/OrganizationCard.tsx +0 -44
- package/src/components/ProjectCard.tsx +0 -28
- package/src/components/TaskCard.tsx +0 -46
- package/src/components/index.ts +0 -7
- package/src/types.ts +0 -14
package/src/meta.ts
CHANGED
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { DXN } from '@dxos/keys';
|
|
7
|
+
import { trim } from '@dxos/util';
|
|
6
8
|
|
|
7
|
-
export const meta
|
|
8
|
-
|
|
9
|
+
export const meta = Plugin.makeMeta({
|
|
10
|
+
key: DXN.make('org.dxos.plugin.preview'),
|
|
9
11
|
name: 'Preview',
|
|
12
|
+
author: 'DXOS',
|
|
13
|
+
description: trim`
|
|
14
|
+
Rich preview panel for viewing object content without opening full editors.
|
|
15
|
+
Quick peek at documents, images, and data with inline rendering.
|
|
16
|
+
`,
|
|
10
17
|
icon: 'ph--eye--regular',
|
|
11
18
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview',
|
|
12
|
-
|
|
19
|
+
tags: ['system'],
|
|
20
|
+
});
|
package/src/plugin.ts
ADDED
|
@@ -3,57 +3,175 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
6
7
|
|
|
7
|
-
import { IntentPlugin } from '@dxos/app-framework';
|
|
8
8
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
9
|
-
import {
|
|
9
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
10
|
+
import { random } from '@dxos/random';
|
|
11
|
+
import { Card } from '@dxos/react-ui';
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
13
|
+
import { type Expando } from '@dxos/schema';
|
|
14
|
+
import { type Organization, type Person, type Pipeline, type Task } from '@dxos/types';
|
|
10
15
|
|
|
11
|
-
import { translations } from '
|
|
16
|
+
import { translations } from '#translations';
|
|
12
17
|
|
|
13
|
-
import {
|
|
18
|
+
import { ExpandoCard, FormCard, JsonCard, OrganizationCard, PersonCard, ProjectCard, TaskCard } from '../cards';
|
|
19
|
+
import {
|
|
20
|
+
DefaultStory,
|
|
21
|
+
createExpando,
|
|
22
|
+
createOrganization,
|
|
23
|
+
createPerson,
|
|
24
|
+
createPersonEmpty,
|
|
25
|
+
createProject,
|
|
26
|
+
createTableEmpty,
|
|
27
|
+
createTask,
|
|
28
|
+
createUnknown,
|
|
29
|
+
} from './testing';
|
|
30
|
+
|
|
31
|
+
random.seed(999);
|
|
14
32
|
|
|
15
33
|
const meta = {
|
|
16
|
-
title: 'plugins/plugin-preview/Card',
|
|
17
|
-
render:
|
|
34
|
+
title: 'plugins/plugin-preview/cards/Card',
|
|
35
|
+
render: DefaultStory,
|
|
18
36
|
decorators: [
|
|
19
|
-
|
|
20
|
-
|
|
37
|
+
// `Card` and its descendants in `@dxos/react-ui` consume `ThemeContext`
|
|
38
|
+
// for tx-token resolution; without this the stories trip the surface's
|
|
39
|
+
// `ErrorBoundary` with "Missing ThemeContext" and the storybook test
|
|
40
|
+
// assert-no-error fails.
|
|
41
|
+
withTheme(),
|
|
42
|
+
withLayout({ layout: 'fullscreen' }),
|
|
43
|
+
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
44
|
+
withPluginManager({ plugins: corePlugins() }),
|
|
21
45
|
],
|
|
22
46
|
parameters: {
|
|
23
|
-
layout: '
|
|
47
|
+
layout: 'fullscreen',
|
|
24
48
|
translations,
|
|
25
49
|
},
|
|
26
50
|
tags: ['cards'],
|
|
27
|
-
} satisfies Meta<typeof
|
|
51
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
28
52
|
|
|
29
53
|
export default meta;
|
|
30
54
|
|
|
31
|
-
|
|
55
|
+
export const _Form: StoryObj<typeof DefaultStory<Person.Person>> = {
|
|
56
|
+
args: {
|
|
57
|
+
Component: FormCard,
|
|
58
|
+
createObject: createPerson,
|
|
59
|
+
image: true,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const _FormEditable: StoryObj<typeof DefaultStory<Person.Person>> = {
|
|
64
|
+
args: {
|
|
65
|
+
Component: FormCard,
|
|
66
|
+
createObject: createPerson,
|
|
67
|
+
image: true,
|
|
68
|
+
componentProps: { readonly: false, layout: 'full' },
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Empty-state variant: the subject has no resolvable schema so `FormCard` renders
|
|
74
|
+
* `<Card.Body><Card.Row><Card.Text variant='description'>No preview</Card.Text></Card.Row></Card.Body>`.
|
|
75
|
+
* Use this story to verify the empty message lands in the card's center column.
|
|
76
|
+
*/
|
|
77
|
+
export const _FormEmpty: StoryObj<typeof DefaultStory> = {
|
|
78
|
+
args: {
|
|
79
|
+
Component: FormCard,
|
|
80
|
+
createObject: createUnknown,
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* No-values variant: the subject has a valid schema (Person) but no populated
|
|
86
|
+
* fields, so `FormCard` falls through to the same empty state instead of
|
|
87
|
+
* rendering an empty scrollarea.
|
|
88
|
+
*/
|
|
89
|
+
export const _FormNoValues: StoryObj<typeof DefaultStory<Person.Person>> = {
|
|
90
|
+
args: {
|
|
91
|
+
Component: FormCard,
|
|
92
|
+
createObject: createPersonEmpty,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Table-like variant: the subject has values only in form-hidden fields
|
|
98
|
+
* (`view`, `sizes` annotated `FormInputAnnotation.set(false)`). `FormCard`
|
|
99
|
+
* must consult the schema's form-input annotations — not just `Object.keys` —
|
|
100
|
+
* to recognize this case and fall through to the empty state.
|
|
101
|
+
*/
|
|
102
|
+
export const _FormTableEmpty: StoryObj<typeof DefaultStory<any>> = {
|
|
103
|
+
args: {
|
|
104
|
+
Component: FormCard,
|
|
105
|
+
createObject: createTableEmpty,
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const _Person: StoryObj<typeof DefaultStory<Person.Person>> = {
|
|
110
|
+
args: {
|
|
111
|
+
Component: PersonCard,
|
|
112
|
+
createObject: createPerson,
|
|
113
|
+
image: true,
|
|
114
|
+
},
|
|
115
|
+
};
|
|
32
116
|
|
|
33
|
-
export const
|
|
117
|
+
export const _Organization: StoryObj<typeof DefaultStory<Organization.Organization>> = {
|
|
34
118
|
args: {
|
|
35
|
-
|
|
36
|
-
|
|
119
|
+
Component: OrganizationCard,
|
|
120
|
+
createObject: createOrganization,
|
|
121
|
+
image: true,
|
|
37
122
|
},
|
|
38
123
|
};
|
|
39
124
|
|
|
40
|
-
export const
|
|
125
|
+
export const _Project: StoryObj<typeof DefaultStory<Pipeline.Pipeline>> = {
|
|
41
126
|
args: {
|
|
42
|
-
|
|
43
|
-
|
|
127
|
+
Component: ProjectCard,
|
|
128
|
+
createObject: createProject,
|
|
129
|
+
image: true,
|
|
44
130
|
},
|
|
45
131
|
};
|
|
46
132
|
|
|
47
|
-
export const
|
|
133
|
+
export const _Task: StoryObj<typeof DefaultStory<Task.Task>> = {
|
|
48
134
|
args: {
|
|
49
|
-
|
|
50
|
-
|
|
135
|
+
Component: TaskCard,
|
|
136
|
+
createObject: createTask,
|
|
137
|
+
image: true,
|
|
51
138
|
},
|
|
52
139
|
};
|
|
53
140
|
|
|
54
|
-
export const
|
|
141
|
+
export const _Expando: StoryObj<typeof DefaultStory<Expando.Expando>> = {
|
|
55
142
|
args: {
|
|
56
|
-
|
|
57
|
-
|
|
143
|
+
Component: ExpandoCard,
|
|
144
|
+
createObject: createExpando,
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export const _Json = {
|
|
149
|
+
render: () => {
|
|
150
|
+
const data = {
|
|
151
|
+
subject: {
|
|
152
|
+
id: random.string.uuid(),
|
|
153
|
+
name: random.person.fullName(),
|
|
154
|
+
email: random.internet.email(),
|
|
155
|
+
tags: [random.lorem.word(), random.lorem.word(), random.lorem.word()],
|
|
156
|
+
nested: {
|
|
157
|
+
count: random.number.int({ max: 100 }),
|
|
158
|
+
active: random.datatype.boolean(),
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<div className='flex justify-center p-16'>
|
|
165
|
+
<div className='dx-card-min-width dx-card-max-width'>
|
|
166
|
+
<Card.Root>
|
|
167
|
+
<Card.Header>
|
|
168
|
+
<Card.IconBlock />
|
|
169
|
+
<Card.Title>JSON</Card.Title>
|
|
170
|
+
</Card.Header>
|
|
171
|
+
<JsonCard data={data} />
|
|
172
|
+
</Card.Root>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
);
|
|
58
176
|
},
|
|
59
177
|
};
|
package/src/stories/testing.tsx
CHANGED
|
@@ -2,39 +2,55 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
import React, { type FC, useMemo } from 'react';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
|
+
import { DXN, Obj, Ref, Type } from '@dxos/echo';
|
|
10
|
+
import { Annotation } from '@dxos/echo';
|
|
11
|
+
import { random } from '@dxos/random';
|
|
12
|
+
import { Card } from '@dxos/react-ui';
|
|
13
|
+
import { CardContainer, type CardContainerProps } from '@dxos/react-ui-mosaic/testing';
|
|
14
|
+
import { Expando } from '@dxos/schema';
|
|
15
|
+
import { Organization, Person, Pipeline, Task } from '@dxos/types';
|
|
11
16
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
faker.seed(1234);
|
|
17
|
-
|
|
18
|
-
type CardProps<T extends object> = {
|
|
19
|
-
Component: FC<PreviewProps<T>>;
|
|
20
|
-
subject: T;
|
|
21
|
-
icon?: string;
|
|
17
|
+
export type DefaultStoryProps<T extends Obj.Any, P extends {} = {}> = {
|
|
18
|
+
Component: FC<AppSurface.ObjectCardProps<T> & P>;
|
|
19
|
+
createObject: () => T;
|
|
22
20
|
image?: boolean;
|
|
21
|
+
componentProps?: P;
|
|
23
22
|
};
|
|
24
23
|
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export const DefaultStory = <T extends Obj.Any, P extends {} = {}>({
|
|
25
|
+
Component,
|
|
26
|
+
createObject,
|
|
27
|
+
image,
|
|
28
|
+
componentProps,
|
|
29
|
+
}: DefaultStoryProps<T, P>) => {
|
|
30
|
+
const object = useMemo(() => createObject(), [createObject]);
|
|
31
|
+
const roles: CardContainerProps['role'][] = ['intrinsic', 'popover'];
|
|
29
32
|
|
|
30
|
-
export const Defaultstory = ({ role, cards }: DefaultstoryProps) => {
|
|
31
33
|
return (
|
|
32
|
-
<div className='grid grid-cols-
|
|
33
|
-
{
|
|
34
|
-
<div key={i} className='flex justify-center'>
|
|
35
|
-
<
|
|
36
|
-
<
|
|
37
|
-
|
|
34
|
+
<div className='h-full w-full grid grid-cols-2 py-16 gap-8'>
|
|
35
|
+
{roles.map((role, i) => (
|
|
36
|
+
<div key={i} className='flex h-full justify-center overflow-hidden'>
|
|
37
|
+
<div className='flex flex-col gap-4 w-full items-center'>
|
|
38
|
+
<span className='text-sm text-description'>{role}</span>
|
|
39
|
+
<CardContainer role={role}>
|
|
40
|
+
<Card.Root border={false}>
|
|
41
|
+
<Card.Header>
|
|
42
|
+
<Card.DragHandle />
|
|
43
|
+
<Card.Title>{Obj.getLabel(object)}</Card.Title>
|
|
44
|
+
<Card.Menu />
|
|
45
|
+
</Card.Header>
|
|
46
|
+
<Component
|
|
47
|
+
role={role ?? 'card--content'}
|
|
48
|
+
subject={image ? object : omitImage(object)}
|
|
49
|
+
{...(componentProps ?? ({} as P))}
|
|
50
|
+
/>
|
|
51
|
+
</Card.Root>
|
|
52
|
+
</CardContainer>
|
|
53
|
+
</div>
|
|
38
54
|
</div>
|
|
39
55
|
))}
|
|
40
56
|
</div>
|
|
@@ -43,72 +59,95 @@ export const Defaultstory = ({ role, cards }: DefaultstoryProps) => {
|
|
|
43
59
|
|
|
44
60
|
export const omitImage = ({ image: _, ...rest }: any) => rest;
|
|
45
61
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Factory functions for creating test objects at render time.
|
|
64
|
+
*/
|
|
65
|
+
export const createOrganization = (): Organization.Organization => {
|
|
66
|
+
return Obj.make(Organization.Organization, {
|
|
67
|
+
name: random.company.name(),
|
|
50
68
|
image:
|
|
51
69
|
'https://plus.unsplash.com/premium_photo-1672116452571-896980a801c8?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
52
|
-
website:
|
|
53
|
-
description:
|
|
70
|
+
website: random.internet.url(),
|
|
71
|
+
description: random.lorem.paragraph(),
|
|
54
72
|
});
|
|
73
|
+
};
|
|
55
74
|
|
|
56
|
-
|
|
57
|
-
|
|
75
|
+
export const createPerson = (): Person.Person => {
|
|
76
|
+
const organization = createOrganization();
|
|
77
|
+
return Obj.make(Person.Person, {
|
|
78
|
+
fullName: random.person.fullName(),
|
|
58
79
|
image:
|
|
59
80
|
'https://plus.unsplash.com/premium_photo-1664536392779-049ba8fde933?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
60
81
|
organization: Ref.make(organization),
|
|
61
82
|
emails: [
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: 'Work',
|
|
68
|
-
value: faker.internet.email(),
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
label: 'Work',
|
|
72
|
-
value: faker.internet.email(),
|
|
73
|
-
},
|
|
83
|
+
{ label: 'Work', value: random.internet.email() },
|
|
84
|
+
{ label: 'Work', value: random.internet.email() },
|
|
85
|
+
{ label: 'Work', value: random.internet.email() },
|
|
74
86
|
],
|
|
75
87
|
});
|
|
88
|
+
};
|
|
76
89
|
|
|
77
|
-
|
|
78
|
-
|
|
90
|
+
export const createProject = (): Pipeline.Pipeline => {
|
|
91
|
+
return Obj.make(Pipeline.Pipeline, {
|
|
92
|
+
name: random.person.fullName(),
|
|
79
93
|
image: 'https://dxos.network/dxos-logotype-blue.png',
|
|
80
|
-
description:
|
|
94
|
+
description: random.lorem.paragraph(),
|
|
95
|
+
columns: [],
|
|
81
96
|
});
|
|
97
|
+
};
|
|
82
98
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
99
|
+
export const createTask = (): Task.Task => {
|
|
100
|
+
return Obj.make(Task.Task, {
|
|
101
|
+
title: random.lorem.sentence(),
|
|
102
|
+
status: random.helpers.arrayElement(['todo', 'in-progress', 'done'] as const),
|
|
86
103
|
});
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Plain object cast as `Obj.Any` — has no schema, typename, or database, so cards
|
|
108
|
+
* like `FormCard` fall through to their empty/unsupported state. Use to story-pin
|
|
109
|
+
* fallback rendering.
|
|
110
|
+
*/
|
|
111
|
+
export const createUnknown = (): Obj.Any => ({}) as unknown as Obj.Any;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Typed object with no user-facing values (only `id`). All Person fields are
|
|
115
|
+
* optional, so `Obj.make(Person, {})` is valid and triggers the FormCard
|
|
116
|
+
* "no values" branch in readonly mode.
|
|
117
|
+
*/
|
|
118
|
+
export const createPersonEmpty = (): Person.Person => Obj.make(Person.Person, {});
|
|
87
119
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Mock of the `Table` schema (org.dxos.type.table): an optional `name` plus
|
|
122
|
+
* `view` and `sizes` fields annotated with `FormInputAnnotation.set(false)`.
|
|
123
|
+
* When constructed without a `name`, no form-renderable field has a value so
|
|
124
|
+
* FormCard should fall through to its empty state — even though
|
|
125
|
+
* `Object.keys(subject)` includes `view`/`sizes`.
|
|
126
|
+
*/
|
|
127
|
+
const TableLike = Schema.Struct({
|
|
128
|
+
name: Schema.String.pipe(Schema.optional),
|
|
129
|
+
view: Schema.String.pipe(Annotation.FormInputAnnotation.set(false)),
|
|
130
|
+
sizes: Schema.Record({ key: Schema.String, value: Schema.Number }).pipe(
|
|
131
|
+
Schema.mutable,
|
|
132
|
+
Annotation.FormInputAnnotation.set(false),
|
|
133
|
+
),
|
|
134
|
+
}).pipe(Type.makeObject(DXN.make('org.dxos.test.tableLike', '0.1.0')));
|
|
135
|
+
type TableLike = Type.InstanceType<typeof TableLike>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Table-like object with values only in form-hidden fields (`view`, `sizes`).
|
|
139
|
+
* `Object.keys` includes them, but a naive `hasValues` check would
|
|
140
|
+
* misclassify this as having data. FormCard must consult the schema's
|
|
141
|
+
* form-input annotations to correctly fall through to the empty state.
|
|
142
|
+
*/
|
|
143
|
+
export const createTableEmpty = (): TableLike =>
|
|
144
|
+
Obj.make(TableLike, { view: 'view-dxn:placeholder', sizes: {} } as Obj.MakeProps<typeof TableLike>);
|
|
145
|
+
|
|
146
|
+
export const createExpando = (): Expando.Expando => {
|
|
147
|
+
return Expando.make({
|
|
148
|
+
name: random.person.fullName(),
|
|
149
|
+
email: random.internet.email(),
|
|
150
|
+
age: random.number.int({ min: 18, max: 80 }),
|
|
151
|
+
active: random.datatype.boolean(),
|
|
152
|
+
});
|
|
114
153
|
};
|
package/src/testing.ts
ADDED
package/src/translations.ts
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
|
|
7
|
-
import { meta } from '
|
|
7
|
+
import { meta } from '#meta';
|
|
8
8
|
|
|
9
9
|
export const translations = [
|
|
10
10
|
{
|
|
11
11
|
'en-US': {
|
|
12
12
|
[meta.id]: {
|
|
13
|
-
'unable
|
|
14
|
-
'todo
|
|
15
|
-
'in-progress
|
|
16
|
-
'done
|
|
17
|
-
'open
|
|
18
|
-
'add
|
|
19
|
-
'more
|
|
13
|
+
'unable-to-create-preview.message': 'No preview',
|
|
14
|
+
'todo.label': 'To do',
|
|
15
|
+
'in-progress.label': 'In progress',
|
|
16
|
+
'done.label': 'Done',
|
|
17
|
+
'open-object.label': 'Open',
|
|
18
|
+
'add-object-to-space.label': 'Add to space',
|
|
19
|
+
'more-options.label': 'More options',
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
},
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
var meta = {
|
|
3
|
-
id: "dxos.org/plugin/preview",
|
|
4
|
-
name: "Preview",
|
|
5
|
-
icon: "ph--eye--regular",
|
|
6
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview"
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
meta
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=chunk-XKCIQK3C.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const meta: PluginMeta = {\n id: 'dxos.org/plugin/preview',\n name: 'Preview',\n icon: 'ph--eye--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview',\n};\n"],
|
|
5
|
-
"mappings": ";AAMO,IAAMA,OAAmB;EAC9BC,IAAI;EACJC,MAAM;EACNC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
-
"names": ["meta", "id", "name", "icon", "source"]
|
|
7
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
meta
|
|
3
|
-
} from "./chunk-XKCIQK3C.mjs";
|
|
4
|
-
|
|
5
|
-
// src/PreviewPlugin.tsx
|
|
6
|
-
import { Capabilities, Events, contributes, defineModule, definePlugin } from "@dxos/app-framework";
|
|
7
|
-
import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
|
|
8
|
-
import { DataType } from "@dxos/schema";
|
|
9
|
-
|
|
10
|
-
// src/capabilities/index.ts
|
|
11
|
-
import { lazy } from "@dxos/app-framework";
|
|
12
|
-
var PreviewPopover = lazy(() => import("./preview-popover-RKHENTFP.mjs"));
|
|
13
|
-
var ReactSurface = lazy(() => import("./react-surface-X56QWACK.mjs"));
|
|
14
|
-
|
|
15
|
-
// src/translations.ts
|
|
16
|
-
var translations = [
|
|
17
|
-
{
|
|
18
|
-
"en-US": {
|
|
19
|
-
[meta.id]: {
|
|
20
|
-
"unable to create preview message": "No preview",
|
|
21
|
-
"todo label": "To do",
|
|
22
|
-
"in-progress label": "In progress",
|
|
23
|
-
"done label": "Done",
|
|
24
|
-
"open object label": "Open",
|
|
25
|
-
"add object to space label": "Add to space",
|
|
26
|
-
"more options label": "More options"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
// src/PreviewPlugin.tsx
|
|
33
|
-
var PreviewPlugin = definePlugin(meta, () => [
|
|
34
|
-
defineModule({
|
|
35
|
-
id: `${meta.id}/module/translations`,
|
|
36
|
-
activatesOn: Events.SetupTranslations,
|
|
37
|
-
activate: () => contributes(Capabilities.Translations, translations)
|
|
38
|
-
}),
|
|
39
|
-
defineModule({
|
|
40
|
-
id: `${meta.id}/module/schema`,
|
|
41
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
42
|
-
activate: () => [
|
|
43
|
-
contributes(ClientCapabilities.Schema, [
|
|
44
|
-
DataType.Person,
|
|
45
|
-
DataType.Organization
|
|
46
|
-
])
|
|
47
|
-
]
|
|
48
|
-
}),
|
|
49
|
-
defineModule({
|
|
50
|
-
id: `${meta.id}/module/preview-popover`,
|
|
51
|
-
activatesOn: Events.Startup,
|
|
52
|
-
activate: PreviewPopover
|
|
53
|
-
}),
|
|
54
|
-
defineModule({
|
|
55
|
-
id: `${meta.id}/module/react-surface`,
|
|
56
|
-
activatesOn: Events.SetupReactSurface,
|
|
57
|
-
activate: ReactSurface
|
|
58
|
-
})
|
|
59
|
-
]);
|
|
60
|
-
export {
|
|
61
|
-
PreviewPlugin,
|
|
62
|
-
meta
|
|
63
|
-
};
|
|
64
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/PreviewPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { DataType } from '@dxos/schema';\n\nimport { PreviewPopover, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\n\nexport const PreviewPlugin = definePlugin(meta, () => [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => [contributes(ClientCapabilities.Schema, [DataType.Person, DataType.Organization])],\n }),\n defineModule({\n id: `${meta.id}/module/preview-popover`,\n activatesOn: Events.Startup,\n activate: PreviewPopover,\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const PreviewPopover = lazy(() => import('./preview-popover'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'unable to create preview message': 'No preview',\n 'todo label': 'To do',\n 'in-progress label': 'In progress',\n 'done label': 'Done',\n 'open object label': 'Open',\n 'add object to space label': 'Add to space',\n 'more options label': 'More options',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,cAAcC,QAAQC,aAAaC,cAAcC,oBAAoB;AAC9E,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,gBAAgB;;;ACFzB,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACCvC,IAAME,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,oCAAoC;QACpC,cAAc;QACd,qBAAqB;QACrB,cAAc;QACd,qBAAqB;QACrB,6BAA6B;QAC7B,sBAAsB;MACxB;IACF;EACF;;;;AFTK,IAAMC,gBAAgBC,aAAaC,MAAM,MAAM;EACpDC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,YAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaQ,aAAaC;IAC1BN,UAAU,MAAM;MAACC,YAAYM,mBAAmBC,QAAQ;QAACC,SAASC;QAAQD,SAASE;OAAa;;EAClG,CAAA;EACAhB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOc;IACpBZ,UAAUa;EACZ,CAAA;EACAlB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOgB;IACpBd,UAAUe;EACZ,CAAA;CACD;",
|
|
6
|
-
"names": ["Capabilities", "Events", "contributes", "defineModule", "definePlugin", "ClientCapabilities", "ClientEvents", "DataType", "lazy", "PreviewPopover", "lazy", "ReactSurface", "translations", "meta", "id", "PreviewPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "DataType", "Person", "Organization", "Startup", "PreviewPopover", "SetupReactSurface", "ReactSurface"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":1069,"imports":[],"format":"esm"},"src/capabilities/preview-popover.ts":{"bytes":8281,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/components/CardSubjectMenu.tsx":{"bytes":9993,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/components/ContactCard.tsx":{"bytes":10312,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/components/CardSubjectMenu.tsx","kind":"import-statement","original":"./CardSubjectMenu"}],"format":"esm"},"src/components/OrganizationCard.tsx":{"bytes":6117,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/components/CardSubjectMenu.tsx","kind":"import-statement","original":"./CardSubjectMenu"}],"format":"esm"},"src/components/ProjectCard.tsx":{"bytes":4160,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/components/CardSubjectMenu.tsx","kind":"import-statement","original":"./CardSubjectMenu"}],"format":"esm"},"src/components/index.ts":{"bytes":687,"imports":[{"path":"src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"src/components/TaskCard.tsx":{"bytes":6988,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/components/CardSubjectMenu.tsx","kind":"import-statement","original":"./CardSubjectMenu"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":18997,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"src/components/TaskCard.tsx","kind":"import-statement","original":"../components/TaskCard"},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1037,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":1903,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/PreviewPlugin.tsx":{"bytes":4683,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":595,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3502},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-XKCIQK3C.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/preview-popover-RKHENTFP.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/react-surface-X56QWACK.mjs","kind":"dynamic-import"}],"exports":["PreviewPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/PreviewPlugin.tsx":{"bytesInOutput":952},"src/capabilities/index.ts":{"bytesInOutput":190},"src/translations.ts":{"bytesInOutput":378}},"bytes":1744},"dist/lib/browser/preview-popover-RKHENTFP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4339},"dist/lib/browser/preview-popover-RKHENTFP.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/preview-popover.ts","inputs":{"src/capabilities/preview-popover.ts":{"bytesInOutput":2001}},"bytes":2143},"dist/lib/browser/react-surface-X56QWACK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":28001},"dist/lib/browser/react-surface-X56QWACK.mjs":{"imports":[{"path":"dist/lib/browser/chunk-XKCIQK3C.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@effect-rx/rx-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":4854},"src/components/ContactCard.tsx":{"bytesInOutput":3174},"src/components/CardSubjectMenu.tsx":{"bytesInOutput":2599},"src/components/index.ts":{"bytesInOutput":0},"src/components/OrganizationCard.tsx":{"bytesInOutput":1836},"src/components/ProjectCard.tsx":{"bytesInOutput":1189},"src/components/TaskCard.tsx":{"bytesInOutput":1787}},"bytes":15879},"dist/lib/browser/chunk-XKCIQK3C.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":526},"dist/lib/browser/chunk-XKCIQK3C.mjs":{"imports":[],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":179}},"bytes":258}}}
|