@dxos/plugin-preview 0.8.4-main.2e9d522 → 0.8.4-main.5ea62a8

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 (56) 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-F5B3N276.mjs} +138 -61
  6. package/dist/lib/browser/react-surface-F5B3N276.mjs.map +7 -0
  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-4TLL7CWP.mjs} +138 -61
  12. package/dist/lib/node-esm/react-surface-4TLL7CWP.mjs.map +7 -0
  13. package/dist/types/src/capabilities/index.d.ts +2 -2
  14. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  15. package/dist/types/src/capabilities/preview-popover.d.ts +1 -1
  16. package/dist/types/src/capabilities/preview-popover.d.ts.map +1 -1
  17. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  18. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  19. package/dist/types/src/components/CardSubjectMenu.d.ts +10 -0
  20. package/dist/types/src/components/CardSubjectMenu.d.ts.map +1 -0
  21. package/dist/types/src/components/ContactCard.d.ts +1 -1
  22. package/dist/types/src/components/ContactCard.d.ts.map +1 -1
  23. package/dist/types/src/components/OrganizationCard.d.ts +1 -1
  24. package/dist/types/src/components/OrganizationCard.d.ts.map +1 -1
  25. package/dist/types/src/components/ProjectCard.d.ts +1 -1
  26. package/dist/types/src/components/ProjectCard.d.ts.map +1 -1
  27. package/dist/types/src/stories/Card.stories.d.ts +24 -0
  28. package/dist/types/src/stories/Card.stories.d.ts.map +1 -0
  29. package/dist/types/src/stories/testing.d.ts +17 -0
  30. package/dist/types/src/stories/testing.d.ts.map +1 -0
  31. package/dist/types/src/types.d.ts +2 -1
  32. package/dist/types/src/types.d.ts.map +1 -1
  33. package/dist/types/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +29 -25
  35. package/src/capabilities/preview-popover.ts +2 -2
  36. package/src/capabilities/react-surface.tsx +7 -6
  37. package/src/components/CardSubjectMenu.tsx +56 -0
  38. package/src/components/ContactCard.tsx +28 -22
  39. package/src/components/OrganizationCard.tsx +10 -7
  40. package/src/components/ProjectCard.tsx +10 -3
  41. package/src/stories/Card.stories.tsx +59 -0
  42. package/src/{testing/util.tsx → stories/testing.tsx} +44 -21
  43. package/src/types.ts +2 -2
  44. package/dist/lib/browser/react-surface-CZMUEWPV.mjs.map +0 -7
  45. package/dist/lib/node-esm/react-surface-IPZBISWS.mjs.map +0 -7
  46. package/dist/types/src/testing/ExtrinsicPreviews.stories.d.ts +0 -35
  47. package/dist/types/src/testing/ExtrinsicPreviews.stories.d.ts.map +0 -1
  48. package/dist/types/src/testing/IntrinsicPreviews.stories.d.ts +0 -35
  49. package/dist/types/src/testing/IntrinsicPreviews.stories.d.ts.map +0 -1
  50. package/dist/types/src/testing/PopoverPreviews.stories.d.ts +0 -35
  51. package/dist/types/src/testing/PopoverPreviews.stories.d.ts.map +0 -1
  52. package/dist/types/src/testing/util.d.ts +0 -80
  53. package/dist/types/src/testing/util.d.ts.map +0 -1
  54. package/src/testing/ExtrinsicPreviews.stories.tsx +0 -55
  55. package/src/testing/IntrinsicPreviews.stories.tsx +0 -55
  56. package/src/testing/PopoverPreviews.stories.tsx +0 -55
@@ -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
- };