@dxos/plugin-preview 0.8.4-main.dedc0f3 → 0.8.4-main.e8ec1fe
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 +11 -10
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{preview-popover-HC6LHWXZ.mjs → preview-popover-IAPAEKZL.mjs} +7 -6
- package/dist/lib/browser/preview-popover-IAPAEKZL.mjs.map +7 -0
- package/dist/lib/browser/react-surface-LRMZKOJS.mjs +498 -0
- package/dist/lib/browser/react-surface-LRMZKOJS.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 +11 -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-ROGTBCTT.mjs → preview-popover-CH2LDYWM.mjs} +7 -6
- package/dist/lib/node-esm/preview-popover-CH2LDYWM.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-65UVGBIZ.mjs +499 -0
- package/dist/lib/node-esm/react-surface-65UVGBIZ.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/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 +3 -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 +3 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +10 -5
- 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 +5 -5
- package/src/capabilities/react-surface.tsx +89 -96
- package/src/cards/OrganizationCard.tsx +34 -0
- package/src/cards/PersonCard.tsx +63 -0
- package/src/cards/ProjectCard.tsx +24 -0
- package/src/{components → cards}/TaskCard.tsx +10 -10
- 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 +21 -21
- package/src/translations.ts +3 -0
- package/src/types.ts +23 -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-HC6LHWXZ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-JGO43GLE.mjs +0 -381
- package/dist/lib/browser/react-surface-JGO43GLE.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-ROGTBCTT.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-Q7F36L3Z.mjs +0 -382
- package/dist/lib/node-esm/react-surface-Q7F36L3Z.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/dist/types/src/components/TaskCard.d.ts +0 -5
- package/dist/types/src/components/TaskCard.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 -28
|
@@ -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;
|
|
@@ -12,6 +11,9 @@ declare const meta: {
|
|
|
12
11
|
readonly 'todo label': "To do";
|
|
13
12
|
readonly 'in-progress label': "In progress";
|
|
14
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";
|
|
15
17
|
};
|
|
16
18
|
};
|
|
17
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"}
|
|
@@ -6,6 +6,9 @@ export declare const translations: [{
|
|
|
6
6
|
readonly 'todo label': "To do";
|
|
7
7
|
readonly 'in-progress label': "In progress";
|
|
8
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";
|
|
9
12
|
};
|
|
10
13
|
};
|
|
11
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
|
-
|
|
6
|
-
|
|
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, {
|
|
9
|
+
activeSpace?: Space;
|
|
10
|
+
onSelect?: (obj: Obj.Any) => void;
|
|
11
|
+
}, Role>>;
|
|
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,CACnB,OAAO,EACP;IAEE,WAAW,CAAC,EAAE,KAAK,CAAC;IAEpB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,KAAK,IAAI,CAAC;CACnC,EACD,IAAI,CACL,CACF,CAAC"}
|