@dxos/plugin-preview 0.8.4-main.c1de068 → 0.8.4-main.fd6878d

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 (38) hide show
  1. package/dist/lib/browser/index.mjs +2 -2
  2. package/dist/lib/browser/meta.json +1 -1
  3. package/dist/lib/browser/{preview-popover-2UCEZUQW.mjs → preview-popover-MAIBTJKJ.mjs} +1 -1
  4. package/dist/lib/browser/{preview-popover-2UCEZUQW.mjs.map → preview-popover-MAIBTJKJ.mjs.map} +2 -2
  5. package/dist/lib/browser/{react-surface-CZMUEWPV.mjs → react-surface-SC522FSX.mjs} +3 -3
  6. package/dist/lib/browser/{react-surface-CZMUEWPV.mjs.map → react-surface-SC522FSX.mjs.map} +3 -3
  7. package/dist/lib/node-esm/index.mjs +2 -2
  8. package/dist/lib/node-esm/meta.json +1 -1
  9. package/dist/lib/node-esm/{preview-popover-OSHWR2YE.mjs → preview-popover-LZGHYW23.mjs} +1 -1
  10. package/dist/lib/node-esm/{preview-popover-OSHWR2YE.mjs.map → preview-popover-LZGHYW23.mjs.map} +2 -2
  11. package/dist/lib/node-esm/{react-surface-IPZBISWS.mjs → react-surface-PDXF35OF.mjs} +3 -3
  12. package/dist/lib/node-esm/{react-surface-IPZBISWS.mjs.map → react-surface-PDXF35OF.mjs.map} +3 -3
  13. package/dist/types/src/capabilities/preview-popover.d.ts.map +1 -1
  14. package/dist/types/src/components/ContactCard.d.ts.map +1 -1
  15. package/dist/types/src/stories/Card.stories.d.ts +50 -0
  16. package/dist/types/src/stories/Card.stories.d.ts.map +1 -0
  17. package/dist/types/src/stories/testing.d.ts +18 -0
  18. package/dist/types/src/stories/testing.d.ts.map +1 -0
  19. package/dist/types/src/types.d.ts +2 -1
  20. package/dist/types/src/types.d.ts.map +1 -1
  21. package/dist/types/tsconfig.tsbuildinfo +1 -1
  22. package/package.json +25 -24
  23. package/src/capabilities/preview-popover.ts +2 -2
  24. package/src/components/ContactCard.tsx +21 -19
  25. package/src/stories/Card.stories.tsx +53 -0
  26. package/src/{testing/util.tsx → stories/testing.tsx} +44 -20
  27. package/src/types.ts +2 -2
  28. package/dist/types/src/testing/ExtrinsicPreviews.stories.d.ts +0 -35
  29. package/dist/types/src/testing/ExtrinsicPreviews.stories.d.ts.map +0 -1
  30. package/dist/types/src/testing/IntrinsicPreviews.stories.d.ts +0 -35
  31. package/dist/types/src/testing/IntrinsicPreviews.stories.d.ts.map +0 -1
  32. package/dist/types/src/testing/PopoverPreviews.stories.d.ts +0 -35
  33. package/dist/types/src/testing/PopoverPreviews.stories.d.ts.map +0 -1
  34. package/dist/types/src/testing/util.d.ts +0 -80
  35. package/dist/types/src/testing/util.d.ts.map +0 -1
  36. package/src/testing/ExtrinsicPreviews.stories.tsx +0 -55
  37. package/src/testing/IntrinsicPreviews.stories.tsx +0 -55
  38. package/src/testing/PopoverPreviews.stories.tsx +0 -55
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-preview",
3
- "version": "0.8.4-main.c1de068",
3
+ "version": "0.8.4-main.fd6878d",
4
4
  "description": "Preview plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,6 +10,7 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
15
  "browser": "./dist/lib/browser/index.mjs"
15
16
  }
@@ -24,34 +25,34 @@
24
25
  ],
25
26
  "dependencies": {
26
27
  "@preact-signals/safe-react": "^0.9.0",
27
- "@dxos/app-framework": "0.8.4-main.c1de068",
28
- "@dxos/async": "0.8.4-main.c1de068",
29
- "@dxos/client": "0.8.4-main.c1de068",
30
- "@dxos/echo": "0.8.4-main.c1de068",
31
- "@dxos/keys": "0.8.4-main.c1de068",
32
- "@dxos/lit-ui": "0.8.4-main.c1de068",
33
- "@dxos/log": "0.8.4-main.c1de068",
34
- "@dxos/echo-schema": "0.8.4-main.c1de068",
35
- "@dxos/plugin-attention": "0.8.4-main.c1de068",
36
- "@dxos/plugin-client": "0.8.4-main.c1de068",
37
- "@dxos/plugin-deck": "0.8.4-main.c1de068",
38
- "@dxos/react-client": "0.8.4-main.c1de068",
39
- "@dxos/react-ui": "0.8.4-main.c1de068",
40
- "@dxos/react-ui-editor": "0.8.4-main.c1de068",
41
- "@dxos/react-ui-form": "0.8.4-main.c1de068",
42
- "@dxos/react-ui-stack": "0.8.4-main.c1de068",
43
- "@dxos/react-ui-table": "0.8.4-main.c1de068",
44
- "@dxos/react-ui-theme": "0.8.4-main.c1de068",
45
- "@dxos/schema": "0.8.4-main.c1de068",
46
- "@dxos/util": "0.8.4-main.c1de068"
28
+ "@dxos/app-framework": "0.8.4-main.fd6878d",
29
+ "@dxos/async": "0.8.4-main.fd6878d",
30
+ "@dxos/echo": "0.8.4-main.fd6878d",
31
+ "@dxos/client": "0.8.4-main.fd6878d",
32
+ "@dxos/keys": "0.8.4-main.fd6878d",
33
+ "@dxos/lit-ui": "0.8.4-main.fd6878d",
34
+ "@dxos/echo-schema": "0.8.4-main.fd6878d",
35
+ "@dxos/log": "0.8.4-main.fd6878d",
36
+ "@dxos/plugin-attention": "0.8.4-main.fd6878d",
37
+ "@dxos/plugin-client": "0.8.4-main.fd6878d",
38
+ "@dxos/plugin-deck": "0.8.4-main.fd6878d",
39
+ "@dxos/react-ui": "0.8.4-main.fd6878d",
40
+ "@dxos/react-client": "0.8.4-main.fd6878d",
41
+ "@dxos/react-ui-editor": "0.8.4-main.fd6878d",
42
+ "@dxos/react-ui-form": "0.8.4-main.fd6878d",
43
+ "@dxos/react-ui-stack": "0.8.4-main.fd6878d",
44
+ "@dxos/react-ui-table": "0.8.4-main.fd6878d",
45
+ "@dxos/react-ui-theme": "0.8.4-main.fd6878d",
46
+ "@dxos/schema": "0.8.4-main.fd6878d",
47
+ "@dxos/util": "0.8.4-main.fd6878d"
47
48
  },
48
49
  "devDependencies": {
49
- "effect": "3.17.0",
50
+ "effect": "3.17.7",
50
51
  "react": "~18.2.0",
51
52
  "react-dom": "~18.2.0",
52
53
  "vite": "5.4.7",
53
- "@dxos/random": "0.8.4-main.c1de068",
54
- "@dxos/storybook-utils": "0.8.4-main.c1de068"
54
+ "@dxos/storybook-utils": "0.8.4-main.fd6878d",
55
+ "@dxos/random": "0.8.4-main.fd6878d"
55
56
  },
56
57
  "peerDependencies": {
57
58
  "effect": "^3.13.3",
@@ -2,10 +2,10 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, LayoutAction, contributes, createIntent, type PluginContext } from '@dxos/app-framework';
5
+ import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
6
6
  import { addEventListener } from '@dxos/async';
7
7
  import { type Client, resolveRef } from '@dxos/client';
8
- import { parseId, type Space } from '@dxos/client/echo';
8
+ import { type Space, parseId } from '@dxos/client/echo';
9
9
  import { DXN } from '@dxos/keys';
10
10
  import { type DxRefTagActivate } from '@dxos/lit-ui';
11
11
  import { log } from '@dxos/log';
@@ -4,7 +4,7 @@
4
4
 
5
5
  import React, { Fragment } from 'react';
6
6
 
7
- import { Icon, Avatar, Button } from '@dxos/react-ui';
7
+ import { Avatar, Button, Icon } from '@dxos/react-ui';
8
8
  import { Card, cardHeading, cardText } from '@dxos/react-ui-stack';
9
9
  import { mx } from '@dxos/react-ui-theme';
10
10
  import { type DataType } from '@dxos/schema';
@@ -46,24 +46,26 @@ export const ContactCard = ({
46
46
  )}
47
47
  </Card.Chrome>
48
48
  )}
49
- <dl
50
- className={mx(
51
- cardText,
52
- 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',
53
- )}
54
- >
55
- {emails?.length &&
56
- emails.map(({ label, value }) => (
57
- <Fragment key={value}>
58
- <dt>
59
- <Icon icon='ph--at--regular' size={5} />
60
- </dt>
61
- <dd key={value} className='break-words'>
62
- {value}
63
- </dd>
64
- </Fragment>
65
- ))}
66
- </dl>
49
+ {emails?.length && (
50
+ <dl
51
+ className={mx(
52
+ cardText,
53
+ 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',
54
+ )}
55
+ >
56
+ {emails?.length &&
57
+ emails.map(({ label, value }) => (
58
+ <Fragment key={value}>
59
+ <dt>
60
+ <Icon icon='ph--at--regular' size={5} />
61
+ </dt>
62
+ <dd key={value} className='break-words'>
63
+ {value}
64
+ </dd>
65
+ </Fragment>
66
+ ))}
67
+ </dl>
68
+ )}
67
69
  {children}
68
70
  </Card.SurfaceRoot>
69
71
  );
@@ -0,0 +1,53 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import '@dxos-theme';
6
+
7
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
+
9
+ import { withLayout, withTheme } from '@dxos/storybook-utils';
10
+
11
+ import { translations } from '../translations';
12
+
13
+ import { Defaultstory, type DefaultstoryProps, createCards } from './testing';
14
+
15
+ const meta: Meta<DefaultstoryProps> = {
16
+ title: 'plugins/plugin-preview/Card',
17
+ render: Defaultstory,
18
+ decorators: [withTheme, withLayout({ fullscreen: true, classNames: 'flex flex-col justify-center' })],
19
+ parameters: { translations },
20
+ tags: ['cards'],
21
+ };
22
+
23
+ export default meta;
24
+
25
+ type Story = StoryObj<DefaultstoryProps>;
26
+
27
+ export const Popover = {
28
+ args: {
29
+ role: 'card--popover',
30
+ cards: createCards(),
31
+ },
32
+ } satisfies Story;
33
+
34
+ export const Intrinsic = {
35
+ args: {
36
+ role: 'card--intrinsic',
37
+ cards: createCards(),
38
+ },
39
+ } satisfies Story;
40
+
41
+ export const Extrinsic = {
42
+ args: {
43
+ role: 'card--extrinsic',
44
+ cards: createCards(),
45
+ },
46
+ } satisfies Story;
47
+
48
+ export const ExtrinsicNoImage = {
49
+ args: {
50
+ role: 'card--extrinsic',
51
+ cards: createCards(false),
52
+ },
53
+ } satisfies Story;
@@ -10,36 +10,41 @@ import { faker } from '@dxos/random';
10
10
  import { CardContainer } from '@dxos/react-ui-stack/testing';
11
11
  import { DataType } from '@dxos/schema';
12
12
 
13
- import type { PreviewProps } from '../types';
13
+ import { ContactCard, OrganizationCard, ProjectCard } from '../components';
14
+ import { type PreviewProps } from '../types';
14
15
 
15
16
  faker.seed(1234);
16
17
 
17
- export type StoryProps = {
18
- Component: FC<PreviewProps<any>>;
18
+ type CardProps<T extends object> = {
19
+ Component: FC<PreviewProps<T>>;
20
+ subject: T;
19
21
  icon?: string;
20
- withImage?: boolean;
21
- subject: 'project' | 'contact' | 'organization';
22
+ image?: boolean;
23
+ };
24
+
25
+ export type DefaultstoryProps = {
22
26
  role: 'card--popover' | 'card--intrinsic' | 'card--extrinsic' | 'card--transclusion';
27
+ cards: CardProps<any>[];
23
28
  };
24
29
 
25
- export const render: Meta<StoryProps>['render'] = ({
26
- Component,
27
- icon = 'ph--placeholder--regular',
28
- role,
29
- withImage,
30
- subject,
31
- ...args
32
- }) => {
30
+ export const Defaultstory: Meta<DefaultstoryProps>['render'] = ({ role, cards }) => {
33
31
  return (
34
- <CardContainer icon={icon} role={role}>
35
- <Component {...args} subject={withImage ? data[subject] : omitImage(data[subject])} role={role} />
36
- </CardContainer>
32
+ <div className='grid grid-cols-3'>
33
+ {cards.map(({ Component, icon, image, subject }, i) => (
34
+ <div key={i} className='flex justify-center'>
35
+ <CardContainer icon={icon} role={role}>
36
+ <Component role={role} subject={image ? subject : omitImage(subject)} />
37
+ </CardContainer>
38
+ </div>
39
+ ))}
40
+ </div>
37
41
  );
38
42
  };
39
43
 
40
- export const omitImage = ({ image, ...rest }: any) => rest;
44
+ export const omitImage = ({ image: _, ...rest }: any) => rest;
41
45
 
42
- export const data = (() => {
46
+ // TODO(burdon): Test data should exercise the standard data generators.
47
+ export const createCards = (image = true): CardProps<any>[] => {
43
48
  const organization = Obj.make(DataType.Organization, {
44
49
  name: faker.company.name(),
45
50
  image:
@@ -75,5 +80,24 @@ export const data = (() => {
75
80
  description: faker.lorem.paragraph(),
76
81
  });
77
82
 
78
- return { organization, contact, project };
79
- })();
83
+ return [
84
+ {
85
+ Component: OrganizationCard,
86
+ subject: organization,
87
+ icon: 'ph--building-office--regular',
88
+ image,
89
+ },
90
+ {
91
+ Component: ContactCard,
92
+ subject: contact,
93
+ icon: 'ph--user--regular',
94
+ image,
95
+ },
96
+ {
97
+ Component: ProjectCard,
98
+ subject: project,
99
+ icon: 'ph--building--regular',
100
+ image,
101
+ },
102
+ ];
103
+ };
package/src/types.ts CHANGED
@@ -2,10 +2,10 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { type Schema } from 'effect';
5
6
  import { type PropsWithChildren } from 'react';
6
7
 
7
- // TODO(burdon): Better place for these defs?
8
- export type PreviewProps<T extends object> = PropsWithChildren<{
8
+ export type PreviewProps<T extends Schema.Schema.Type<any>> = PropsWithChildren<{
9
9
  subject: T;
10
10
  role?: string;
11
11
  }>;
@@ -1,35 +0,0 @@
1
- import '@dxos-theme';
2
- import { type Meta } from '@storybook/react-vite';
3
- import { type StoryProps } from './util';
4
- declare const meta: Meta<StoryProps>;
5
- export default meta;
6
- export declare const Contact: {
7
- args: {
8
- Component: ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Person> & {
9
- onOrgClick?: (org: import("@dxos/schema").DataType.Organization) => void;
10
- }) => import("react").JSX.Element;
11
- icon: string;
12
- subject: string;
13
- withImage: boolean;
14
- role: string;
15
- };
16
- };
17
- export declare const Organization: {
18
- args: {
19
- Component: ({ children, subject: { name, image, description, website }, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Organization>) => import("react").JSX.Element;
20
- icon: string;
21
- subject: string;
22
- withImage: boolean;
23
- role: string;
24
- };
25
- };
26
- export declare const Project: {
27
- args: {
28
- Component: ({ subject: { name, image, description }, role }: import("..").PreviewProps<import("@dxos/schema").DataType.Project>) => import("react").JSX.Element;
29
- icon: string;
30
- subject: string;
31
- withImage: boolean;
32
- role: string;
33
- };
34
- };
35
- //# sourceMappingURL=ExtrinsicPreviews.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExtrinsicPreviews.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/ExtrinsicPreviews.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,EAAE,KAAK,UAAU,EAAU,MAAM,QAAQ,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAQ1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO;;;sBAPV,CAAC;;;;;;;CAeV,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;CAQxB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;CAQnB,CAAC"}
@@ -1,35 +0,0 @@
1
- import '@dxos-theme';
2
- import { type Meta } from '@storybook/react-vite';
3
- import { type StoryProps } from './util';
4
- declare const meta: Meta<StoryProps>;
5
- export default meta;
6
- export declare const Contact: {
7
- args: {
8
- Component: ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Person> & {
9
- onOrgClick?: (org: import("@dxos/schema").DataType.Organization) => void;
10
- }) => import("react").JSX.Element;
11
- icon: string;
12
- subject: string;
13
- withImage: boolean;
14
- role: string;
15
- };
16
- };
17
- export declare const Organization: {
18
- args: {
19
- Component: ({ children, subject: { name, image, description, website }, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Organization>) => import("react").JSX.Element;
20
- icon: string;
21
- subject: string;
22
- withImage: boolean;
23
- role: string;
24
- };
25
- };
26
- export declare const Project: {
27
- args: {
28
- Component: ({ subject: { name, image, description }, role }: import("..").PreviewProps<import("@dxos/schema").DataType.Project>) => import("react").JSX.Element;
29
- icon: string;
30
- subject: string;
31
- withImage: boolean;
32
- role: string;
33
- };
34
- };
35
- //# sourceMappingURL=IntrinsicPreviews.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IntrinsicPreviews.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/IntrinsicPreviews.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,EAAE,KAAK,UAAU,EAAU,MAAM,QAAQ,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAQ1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO;;;sBAPV,CAAC;;;;;;;CAeV,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;CAQxB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;CAQnB,CAAC"}
@@ -1,35 +0,0 @@
1
- import '@dxos-theme';
2
- import { type Meta } from '@storybook/react-vite';
3
- import { type StoryProps } from './util';
4
- declare const meta: Meta<StoryProps>;
5
- export default meta;
6
- export declare const Contact: {
7
- args: {
8
- Component: ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Person> & {
9
- onOrgClick?: (org: import("@dxos/schema").DataType.Organization) => void;
10
- }) => import("react").JSX.Element;
11
- icon: string;
12
- subject: string;
13
- withImage: boolean;
14
- role: string;
15
- };
16
- };
17
- export declare const Organization: {
18
- args: {
19
- Component: ({ children, subject: { name, image, description, website }, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Organization>) => import("react").JSX.Element;
20
- icon: string;
21
- subject: string;
22
- withImage: boolean;
23
- role: string;
24
- };
25
- };
26
- export declare const Project: {
27
- args: {
28
- Component: ({ subject: { name, image, description }, role }: import("..").PreviewProps<import("@dxos/schema").DataType.Project>) => import("react").JSX.Element;
29
- icon: string;
30
- subject: string;
31
- withImage: boolean;
32
- role: string;
33
- };
34
- };
35
- //# sourceMappingURL=PopoverPreviews.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PopoverPreviews.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/PopoverPreviews.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,EAAE,KAAK,UAAU,EAAU,MAAM,QAAQ,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAQ1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO;;;sBAPR,CAAC;;;;;;;CAeZ,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;CAQxB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;CAQnB,CAAC"}
@@ -1,80 +0,0 @@
1
- import type { Meta } from '@storybook/react-vite';
2
- import { type FC } from 'react';
3
- import type { PreviewProps } from '../types';
4
- export type StoryProps = {
5
- Component: FC<PreviewProps<any>>;
6
- icon?: string;
7
- withImage?: boolean;
8
- subject: 'project' | 'contact' | 'organization';
9
- role: 'card--popover' | 'card--intrinsic' | 'card--extrinsic' | 'card--transclusion';
10
- };
11
- export declare const render: Meta<StoryProps>['render'];
12
- export declare const omitImage: ({ image, ...rest }: any) => any;
13
- export declare const data: {
14
- organization: import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
15
- image?: string | undefined;
16
- id: string;
17
- status?: "active" | "prospect" | "qualified" | "commit" | "reject" | undefined;
18
- name?: string | undefined;
19
- description?: string | undefined;
20
- website?: string | undefined;
21
- }>;
22
- contact: import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
23
- fields?: {
24
- readonly label: string;
25
- readonly category?: string | undefined;
26
- readonly value: string;
27
- }[] | undefined;
28
- fullName?: string | undefined;
29
- preferredName?: string | undefined;
30
- nickname?: string | undefined;
31
- image?: string | undefined;
32
- organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
33
- id: string;
34
- name?: string | undefined;
35
- description?: string | undefined;
36
- status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
37
- image?: string | undefined;
38
- website?: string | undefined;
39
- }> | undefined;
40
- jobTitle?: string | undefined;
41
- department?: string | undefined;
42
- notes?: string | undefined;
43
- emails?: {
44
- readonly label?: string | undefined;
45
- readonly value: string;
46
- }[] | undefined;
47
- identities?: {
48
- readonly label?: string | undefined;
49
- readonly value: string;
50
- }[] | undefined;
51
- phoneNumbers?: {
52
- readonly label?: string | undefined;
53
- readonly value: string;
54
- }[] | undefined;
55
- addresses?: {
56
- readonly label?: string | undefined;
57
- readonly value: {
58
- readonly street?: string | undefined;
59
- readonly extended?: string | undefined;
60
- readonly locality?: string | undefined;
61
- readonly region?: string | undefined;
62
- readonly postalCode?: string | undefined;
63
- readonly postOfficeBoxNumber?: string | undefined;
64
- readonly country?: string | undefined;
65
- };
66
- }[] | undefined;
67
- urls?: {
68
- readonly label?: string | undefined;
69
- readonly value: string;
70
- }[] | undefined;
71
- birthday?: string | undefined;
72
- }>;
73
- project: import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
74
- image?: string | undefined;
75
- id: string;
76
- name: string;
77
- description?: string | undefined;
78
- }>;
79
- };
80
- //# sourceMappingURL=util.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/testing/util.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;IAChD,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;CACtF,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAa7C,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,oBAAoB,GAAG,QAAS,CAAC;AAE3D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCb,CAAC"}
@@ -1,55 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type Meta } from '@storybook/react-vite';
8
-
9
- import { withTheme, withLayout } from '@dxos/storybook-utils';
10
-
11
- import { type StoryProps, render } from './util';
12
- import { ContactCard, OrganizationCard, ProjectCard } from '../components';
13
- import { translations } from '../translations';
14
-
15
- const meta: Meta<StoryProps> = {
16
- title: 'Cards/plugin-preview/Extrinsic',
17
- render,
18
- decorators: [withTheme, withLayout()],
19
- parameters: {
20
- layout: 'centered',
21
- translations,
22
- },
23
- };
24
-
25
- export default meta;
26
-
27
- export const Contact = {
28
- args: {
29
- Component: ContactCard,
30
- icon: 'ph--user--regular',
31
- subject: 'contact',
32
- withImage: true,
33
- role: 'card--extrinsic',
34
- },
35
- };
36
-
37
- export const Organization = {
38
- args: {
39
- Component: OrganizationCard,
40
- icon: 'ph--building-office--regular',
41
- subject: 'organization',
42
- withImage: true,
43
- role: 'card--extrinsic',
44
- },
45
- };
46
-
47
- export const Project = {
48
- args: {
49
- Component: ProjectCard,
50
- icon: 'ph--building--regular',
51
- subject: 'project',
52
- withImage: true,
53
- role: 'card--extrinsic',
54
- },
55
- };
@@ -1,55 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type Meta } from '@storybook/react-vite';
8
-
9
- import { withTheme, withLayout } from '@dxos/storybook-utils';
10
-
11
- import { type StoryProps, render } from './util';
12
- import { ContactCard, OrganizationCard, ProjectCard } from '../components';
13
- import { translations } from '../translations';
14
-
15
- const meta: Meta<StoryProps> = {
16
- title: 'Cards/plugin-preview/Intrinsic',
17
- render,
18
- decorators: [withTheme, withLayout()],
19
- parameters: {
20
- layout: 'centered',
21
- translations,
22
- },
23
- };
24
-
25
- export default meta;
26
-
27
- export const Contact = {
28
- args: {
29
- Component: ContactCard,
30
- icon: 'ph--user--regular',
31
- subject: 'contact',
32
- withImage: true,
33
- role: 'card--intrinsic',
34
- },
35
- };
36
-
37
- export const Organization = {
38
- args: {
39
- Component: OrganizationCard,
40
- icon: 'ph--building-office--regular',
41
- subject: 'organization',
42
- withImage: true,
43
- role: 'card--intrinsic',
44
- },
45
- };
46
-
47
- export const Project = {
48
- args: {
49
- Component: ProjectCard,
50
- icon: 'ph--building--regular',
51
- subject: 'project',
52
- withImage: true,
53
- role: 'card--intrinsic',
54
- },
55
- };
@@ -1,55 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type Meta } from '@storybook/react-vite';
8
-
9
- import { withTheme, withLayout } from '@dxos/storybook-utils';
10
-
11
- import { type StoryProps, render } from './util';
12
- import { ContactCard, OrganizationCard, ProjectCard } from '../components';
13
- import { translations } from '../translations';
14
-
15
- const meta: Meta<StoryProps> = {
16
- title: 'Cards/plugin-preview/Popover',
17
- render,
18
- decorators: [withTheme, withLayout()],
19
- parameters: {
20
- layout: 'centered',
21
- translations,
22
- },
23
- };
24
-
25
- export default meta;
26
-
27
- export const Contact = {
28
- args: {
29
- Component: ContactCard,
30
- icon: 'ph--user--regular',
31
- subject: 'contact',
32
- withImage: true,
33
- role: 'card--popover',
34
- },
35
- };
36
-
37
- export const Organization = {
38
- args: {
39
- Component: OrganizationCard,
40
- icon: 'ph--building-office--regular',
41
- subject: 'organization',
42
- withImage: true,
43
- role: 'card--popover',
44
- },
45
- };
46
-
47
- export const Project = {
48
- args: {
49
- Component: ProjectCard,
50
- icon: 'ph--building--regular',
51
- subject: 'project',
52
- withImage: true,
53
- role: 'card--popover',
54
- },
55
- };