@dxos/plugin-preview 0.8.4-main.5ea62a8 → 0.8.4-main.66e292d
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-CEWM5LJG.mjs +17 -0
- package/dist/lib/browser/chunk-CEWM5LJG.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +14 -10
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{preview-popover-MAIBTJKJ.mjs → preview-popover-4QZ2WDE6.mjs} +9 -13
- package/dist/lib/browser/preview-popover-4QZ2WDE6.mjs.map +7 -0
- package/dist/lib/browser/react-surface-X4KEMECS.mjs +498 -0
- package/dist/lib/browser/react-surface-X4KEMECS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Q5MUNELK.mjs +19 -0
- package/dist/lib/node-esm/chunk-Q5MUNELK.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +14 -10
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{preview-popover-LZGHYW23.mjs → preview-popover-FJ2ARIGS.mjs} +9 -13
- package/dist/lib/node-esm/preview-popover-FJ2ARIGS.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-DR3UAH6F.mjs +499 -0
- package/dist/lib/node-esm/react-surface-DR3UAH6F.mjs.map +7 -0
- package/dist/types/src/PreviewPlugin.d.ts +1 -1
- package/dist/types/src/PreviewPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/preview-popover.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- 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 +5 -0
- package/dist/types/src/cards/index.d.ts.map +1 -0
- package/dist/types/src/components/CardComponents.d.ts +16 -0
- package/dist/types/src/components/CardComponents.d.ts.map +1 -0
- package/dist/types/src/components/CardSubjectMenu.d.ts +3 -5
- package/dist/types/src/components/CardSubjectMenu.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/stories/Card.stories.d.ts +6 -1
- package/dist/types/src/stories/Card.stories.d.ts.map +1 -1
- package/dist/types/src/stories/testing.d.ts +4 -3
- package/dist/types/src/stories/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +6 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +9 -4
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +33 -32
- package/src/PreviewPlugin.tsx +23 -24
- package/src/capabilities/preview-popover.ts +7 -12
- package/src/capabilities/react-surface.tsx +90 -97
- package/src/cards/OrganizationCard.tsx +34 -0
- package/src/cards/PersonCard.tsx +63 -0
- package/src/cards/ProjectCard.tsx +24 -0
- package/src/cards/TaskCard.tsx +46 -0
- package/src/cards/index.ts +8 -0
- package/src/components/CardComponents.tsx +67 -0
- package/src/components/CardSubjectMenu.tsx +73 -26
- package/src/components/index.ts +2 -3
- package/src/meta.ts +6 -3
- package/src/stories/Card.stories.tsx +11 -8
- package/src/stories/testing.tsx +31 -19
- package/src/translations.ts +6 -0
- package/src/types.ts +19 -5
- package/dist/lib/browser/chunk-Z73ENKLE.mjs +0 -14
- package/dist/lib/browser/chunk-Z73ENKLE.mjs.map +0 -7
- package/dist/lib/browser/preview-popover-MAIBTJKJ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-F5B3N276.mjs +0 -380
- package/dist/lib/browser/react-surface-F5B3N276.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2ORSL4GJ.mjs +0 -16
- package/dist/lib/node-esm/chunk-2ORSL4GJ.mjs.map +0 -7
- package/dist/lib/node-esm/preview-popover-LZGHYW23.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-4TLL7CWP.mjs +0 -381
- package/dist/lib/node-esm/react-surface-4TLL7CWP.mjs.map +0 -7
- 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/src/components/ContactCard.tsx +0 -76
- package/src/components/OrganizationCard.tsx +0 -44
- package/src/components/ProjectCard.tsx +0 -27
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type CardPreviewProps } from '../types';
|
|
3
|
+
export declare const gridRow = "is-full grid grid-cols-[1.5rem_1fr_min-content] gap-2 items-center";
|
|
4
|
+
export declare const CardHeader: ({ label, subject, activeSpace }: {
|
|
5
|
+
label?: string;
|
|
6
|
+
} & CardPreviewProps) => React.JSX.Element;
|
|
7
|
+
export declare const CardRow: ({ icon, label, onClick }: {
|
|
8
|
+
icon: string;
|
|
9
|
+
label: string;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
export declare const CardLink: ({ label, href }: {
|
|
13
|
+
label: string;
|
|
14
|
+
href: string;
|
|
15
|
+
}) => React.JSX.Element;
|
|
16
|
+
//# sourceMappingURL=CardComponents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardComponents.d.ts","sourceRoot":"","sources":["../../../../src/components/CardComponents.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,eAAO,MAAM,OAAO,uEAAuE,CAAC;AAI5F,eAAO,MAAM,UAAU,GAAI,iCAAiC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,sBAOhG,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,0BAA0B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,sBAqBtG,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,iBAAiB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,sBAgBxE,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type AnyEchoObject } from '@dxos/echo-schema';
|
|
3
2
|
import { type IconButtonProps } from '@dxos/react-ui';
|
|
3
|
+
import { type CardPreviewProps } from '../types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Generic menu for objects; builds menu with common actions.
|
|
6
6
|
*/
|
|
7
|
-
export declare const CardSubjectMenu: ({ subject, ...props }: Omit<IconButtonProps, "icon" | "label">
|
|
8
|
-
subject: AnyEchoObject;
|
|
9
|
-
}) => React.JSX.Element;
|
|
7
|
+
export declare const CardSubjectMenu: ({ subject, activeSpace, ...props }: CardPreviewProps & Omit<IconButtonProps, "icon" | "label">) => React.JSX.Element | null;
|
|
10
8
|
//# sourceMappingURL=CardSubjectMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardSubjectMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/CardSubjectMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CardSubjectMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/CardSubjectMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAc,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAUlF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;GAEG;AAEH,eAAO,MAAM,eAAe,GAAI,oCAI7B,gBAAgB,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,6BAuB5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,eAAO,MAAM,IAAI,EAAE,UASlB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
3
2
|
declare const meta: {
|
|
4
3
|
title: string;
|
|
@@ -9,6 +8,12 @@ declare const meta: {
|
|
|
9
8
|
readonly 'en-US': {
|
|
10
9
|
readonly [meta.id]: {
|
|
11
10
|
readonly 'unable to create preview message': "No preview";
|
|
11
|
+
readonly 'todo label': "To do";
|
|
12
|
+
readonly 'in-progress label': "In progress";
|
|
13
|
+
readonly 'done label': "Done";
|
|
14
|
+
readonly 'open object label': "Open";
|
|
15
|
+
readonly 'add object to space label': "Add to space";
|
|
16
|
+
readonly 'more options label': "More options";
|
|
12
17
|
};
|
|
13
18
|
};
|
|
14
19
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAajE,QAAA,MAAM,IAAI;;;;;;;yBAVA,CAAQ,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;CAsBW,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAK9B,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { type FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
type
|
|
4
|
-
|
|
2
|
+
import { Obj } from '@dxos/echo';
|
|
3
|
+
import { type CardPreviewProps } from '../types';
|
|
4
|
+
type CardProps<T extends Obj.Any> = {
|
|
5
|
+
Component: FC<CardPreviewProps<T>>;
|
|
5
6
|
subject: T;
|
|
6
7
|
icon?: string;
|
|
7
8
|
image?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/stories/testing.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/stories/testing.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,GAAG,EAAO,MAAM,YAAY,CAAC;AAOtC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,KAAK,SAAS,CAAC,CAAC,SAAS,GAAG,CAAC,GAAG,IAAI;IAClC,SAAS,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;IACrF,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,iBAAiB,iBAAiB,sBAc9D,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,uBAAuB,GAAG,QAAS,CAAC;AAG9D,eAAO,MAAM,WAAW,GAAI,eAAY,KAAG,SAAS,CAAC,GAAG,CAAC,EAmExD,CAAC"}
|
|
@@ -3,6 +3,12 @@ export declare const translations: [{
|
|
|
3
3
|
readonly 'en-US': {
|
|
4
4
|
readonly [meta.id]: {
|
|
5
5
|
readonly 'unable to create preview message': "No preview";
|
|
6
|
+
readonly 'todo label': "To do";
|
|
7
|
+
readonly 'in-progress label': "In progress";
|
|
8
|
+
readonly 'done label': "Done";
|
|
9
|
+
readonly 'open object label': "Open";
|
|
10
|
+
readonly 'add object to space label': "Add to space";
|
|
11
|
+
readonly 'more options label': "More options";
|
|
6
12
|
};
|
|
7
13
|
};
|
|
8
14
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;;;;UAQR;;EAGwB,CAAC"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { type Schema } from 'effect';
|
|
2
1
|
import { type PropsWithChildren } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { type SurfaceCardRole, type SurfaceComponentProps } from '@dxos/app-framework/react';
|
|
3
|
+
import { type Obj } from '@dxos/echo';
|
|
4
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use {@link SurfaceComponentProps} instead.
|
|
7
|
+
*/
|
|
8
|
+
export type CardPreviewProps<Subject extends Obj.Any = Obj.Any, Role extends SurfaceCardRole = SurfaceCardRole> = PropsWithChildren<SurfaceComponentProps<Subject, Role> & {
|
|
9
|
+
activeSpace?: Space;
|
|
10
|
+
onSelect?: (obj: Obj.Any) => void;
|
|
6
11
|
}>;
|
|
7
12
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD;;GAEG;AAEH,MAAM,MAAM,gBAAgB,CAC1B,OAAO,SAAS,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,EACjC,IAAI,SAAS,eAAe,GAAG,eAAe,IAC5C,iBAAiB,CACnB,qBAAqB,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG;IAErC,WAAW,CAAC,EAAE,KAAK,CAAC;IAEpB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,KAAK,IAAI,CAAC;CACnC,CACF,CAAC"}
|