@dxos/plugin-preview 0.8.3-main.672df60 → 0.8.3-main.7f5a14c
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/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-FGMSZTOE.mjs → react-surface-NWPFQYVG.mjs} +11 -9
- package/dist/lib/browser/react-surface-NWPFQYVG.mjs.map +7 -0
- package/dist/lib/node/index.cjs +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-FI63RLWN.cjs → react-surface-VV3IADFZ.cjs} +12 -10
- package/dist/lib/node/react-surface-VV3IADFZ.cjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-EHIW3IEA.mjs → react-surface-5PIIPXEP.mjs} +11 -9
- package/dist/lib/node-esm/react-surface-5PIIPXEP.mjs.map +7 -0
- package/dist/types/src/Preview.stories.d.ts +6 -18
- package/dist/types/src/Preview.stories.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/Preview.stories.tsx +8 -7
- package/src/capabilities/react-surface.tsx +16 -8
- package/dist/lib/browser/react-surface-FGMSZTOE.mjs.map +0 -7
- package/dist/lib/node/react-surface-FI63RLWN.cjs.map +0 -7
- package/dist/lib/node-esm/react-surface-EHIW3IEA.mjs.map +0 -7
|
@@ -11,7 +11,7 @@ import { DataType } from "@dxos/schema";
|
|
|
11
11
|
// packages/plugins/plugin-preview/src/capabilities/index.ts
|
|
12
12
|
import { lazy } from "@dxos/app-framework";
|
|
13
13
|
var PreviewPopover = lazy(() => import("./preview-popover-2AWEEK32.mjs"));
|
|
14
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
14
|
+
var ReactSurface = lazy(() => import("./react-surface-NWPFQYVG.mjs"));
|
|
15
15
|
|
|
16
16
|
// packages/plugins/plugin-preview/src/translations.ts
|
|
17
17
|
var translations_default = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":745,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8458,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9249,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":4743,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":2581,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":17075,"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-schema","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-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"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":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3134},"packages/plugins/plugin-preview/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.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":"packages/plugins/plugin-preview/dist/lib/browser/preview-popover-2AWEEK32.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/browser/react-surface-FGMSZTOE.mjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","meta"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1690},"packages/plugins/plugin-preview/dist/lib/browser/preview-popover-2AWEEK32.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4413},"packages/plugins/plugin-preview/dist/lib/browser/preview-popover-2AWEEK32.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2079}},"bytes":2253},"packages/plugins/plugin-preview/dist/lib/browser/react-surface-FGMSZTOE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16594},"packages/plugins/plugin-preview/dist/lib/browser/react-surface-FGMSZTOE.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.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-schema","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-table","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":"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":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4227},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2882},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1436},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":707}},"bytes":9756},"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":613},"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.mjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216}},"bytes":345}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":745,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8458,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9249,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":4743,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":2581,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":17453,"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-schema","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-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"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":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3134},"packages/plugins/plugin-preview/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.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":"packages/plugins/plugin-preview/dist/lib/browser/preview-popover-2AWEEK32.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/browser/react-surface-NWPFQYVG.mjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","meta"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1690},"packages/plugins/plugin-preview/dist/lib/browser/preview-popover-2AWEEK32.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4413},"packages/plugins/plugin-preview/dist/lib/browser/preview-popover-2AWEEK32.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2079}},"bytes":2253},"packages/plugins/plugin-preview/dist/lib/browser/react-surface-NWPFQYVG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16786},"packages/plugins/plugin-preview/dist/lib/browser/react-surface-NWPFQYVG.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.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-schema","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-table","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":"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":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4285},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2882},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1436},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":707}},"bytes":9814},"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":613},"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.mjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216}},"bytes":345}}}
|
|
@@ -5,11 +5,12 @@ import {
|
|
|
5
5
|
// packages/plugins/plugin-preview/src/capabilities/react-surface.tsx
|
|
6
6
|
import React4, { useCallback } from "react";
|
|
7
7
|
import { Capabilities, LayoutAction, Surface, contributes, createIntent, createSurface, useIntentDispatcher } from "@dxos/app-framework";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { fullyQualifiedId, getSchema, getSpace } from "@dxos/client/echo";
|
|
9
|
+
import { Obj, Filter } from "@dxos/echo";
|
|
10
|
+
import { setValue } from "@dxos/echo-schema";
|
|
10
11
|
import { useTranslation } from "@dxos/react-ui";
|
|
11
12
|
import { Form } from "@dxos/react-ui-form";
|
|
12
|
-
import { Card as Card4 } from "@dxos/react-ui-stack";
|
|
13
|
+
import { Card as Card4, cardSpacing } from "@dxos/react-ui-stack";
|
|
13
14
|
import { TableType } from "@dxos/react-ui-table";
|
|
14
15
|
import { descriptionMessage } from "@dxos/react-ui-theme";
|
|
15
16
|
import { DataType } from "@dxos/schema";
|
|
@@ -150,7 +151,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
150
151
|
"card--kanban",
|
|
151
152
|
"card"
|
|
152
153
|
],
|
|
153
|
-
filter: (data) =>
|
|
154
|
+
filter: (data) => Obj.instanceOf(DataType.Person, data.subject),
|
|
154
155
|
component: ({ data, role }) => {
|
|
155
156
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
156
157
|
const handleOrgClick = useCallback(async (org) => {
|
|
@@ -197,7 +198,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
197
198
|
"card--kanban",
|
|
198
199
|
"card"
|
|
199
200
|
],
|
|
200
|
-
filter: (data) =>
|
|
201
|
+
filter: (data) => Obj.instanceOf(DataType.Organization, data.subject),
|
|
201
202
|
component: ({ data, role }) => /* @__PURE__ */ React4.createElement(OrganizationCard, {
|
|
202
203
|
role,
|
|
203
204
|
subject: data.subject
|
|
@@ -213,7 +214,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
213
214
|
"card--kanban",
|
|
214
215
|
"card"
|
|
215
216
|
],
|
|
216
|
-
filter: (data) =>
|
|
217
|
+
filter: (data) => Obj.instanceOf(DataType.Project, data.subject),
|
|
217
218
|
component: ({ data, role }) => /* @__PURE__ */ React4.createElement(ProjectCard, {
|
|
218
219
|
subject: data.subject,
|
|
219
220
|
role
|
|
@@ -230,7 +231,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
230
231
|
"card"
|
|
231
232
|
],
|
|
232
233
|
position: "fallback",
|
|
233
|
-
filter: (data) =>
|
|
234
|
+
filter: (data) => Obj.isObject(data.subject),
|
|
234
235
|
component: ({ data, role }) => {
|
|
235
236
|
const schema = getSchema(data.subject);
|
|
236
237
|
const { t } = useTranslation(PREVIEW_PLUGIN);
|
|
@@ -253,7 +254,8 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
253
254
|
values: data.subject,
|
|
254
255
|
readonly: role === "popover",
|
|
255
256
|
onSave: handleSave,
|
|
256
|
-
autoSave: true
|
|
257
|
+
autoSave: true,
|
|
258
|
+
classNames: cardSpacing
|
|
257
259
|
}));
|
|
258
260
|
}
|
|
259
261
|
})
|
|
@@ -261,4 +263,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
261
263
|
export {
|
|
262
264
|
react_surface_default as default
|
|
263
265
|
};
|
|
264
|
-
//# sourceMappingURL=react-surface-
|
|
266
|
+
//# sourceMappingURL=react-surface-NWPFQYVG.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/ContactCard.tsx", "../../../src/components/OrganizationCard.tsx", "../../../src/components/ProjectCard.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n Surface,\n contributes,\n createIntent,\n createSurface,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getSchema, getSpace } from '@dxos/client/echo';\nimport { Obj, Filter } from '@dxos/echo';\nimport { type JsonPath, setValue } from '@dxos/echo-schema';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { Card, cardSpacing } from '@dxos/react-ui-stack';\nimport { TableType } from '@dxos/react-ui-table';\nimport { descriptionMessage } from '@dxos/react-ui-theme';\nimport { DataType } from '@dxos/schema';\n\nimport { ContactCard, OrganizationCard, ProjectCard } from '../components';\nimport { PREVIEW_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--contact`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Person } => Obj.instanceOf(DataType.Person, data.subject),\n component: ({ data, role }) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const handleOrgClick = useCallback(\n async (org: DataType.Organization) => {\n const space = getSpace(org);\n const tablesQuery = await space?.db.query(Filter.type(TableType)).run();\n const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {\n return table.view?.target?.query?.typename === DataType.Organization.typename;\n });\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n options: {\n state: false,\n anchorId: '',\n },\n }),\n );\n if (currentSpaceOrgTable) {\n return dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [fullyQualifiedId(currentSpaceOrgTable)],\n options: { workspace: space?.id },\n }),\n );\n }\n },\n [dispatch],\n );\n return (\n <ContactCard role={role} subject={data.subject} onOrgClick={handleOrgClick}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--organization`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Organization } => Obj.instanceOf(DataType.Organization, data.subject),\n component: ({ data, role }) => (\n <OrganizationCard role={role} subject={data.subject}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--project`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Project } => Obj.instanceOf(DataType.Project, data.subject),\n component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,\n }),\n\n //\n // Fallback for any object.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/fallback-popover`,\n role: ['popover', 'card--kanban', 'card'],\n position: 'fallback',\n filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),\n component: ({ data, role }) => {\n const schema = getSchema(data.subject);\n const { t } = useTranslation(PREVIEW_PLUGIN);\n if (!schema) {\n return <p className={descriptionMessage}>{t('unable to create preview message')}</p>;\n }\n\n const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {\n const changedPaths = Object.keys(changed).filter((path) => changed[path]);\n for (const path of changedPaths) {\n const value = values[path];\n setValue(data.subject, path as JsonPath, value);\n }\n }, []);\n\n return (\n <Card.Container role={role}>\n <Form\n schema={schema}\n values={data.subject}\n readonly={role === 'popover'}\n onSave={handleSave}\n autoSave\n classNames={cardSpacing}\n />\n </Card.Container>\n );\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Icon, Avatar, Button } from '@dxos/react-ui';\nimport { Card, cardHeading, cardText } from '@dxos/react-ui-stack';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ContactCard = ({\n children,\n subject: { fullName, image, organization, emails },\n onOrgClick,\n role,\n}: PreviewProps<DataType.Person> & { onOrgClick?: (org: DataType.Organization) => void }) => {\n const organizationName = organization && typeof organization === 'object' ? organization.target?.name : organization;\n return (\n <Card.Container role={role}>\n <Avatar.Root>\n <Card.Text role='group' classNames='grid gap-3 grid-cols-[min-content_1fr]'>\n <Avatar.Content imgSrc={image} icon='ph--user--regular' size={16} hue='neutral' />\n <div role='none' className='bs-min self-center'>\n <Avatar.Label asChild>\n <h2 className={cardHeading}>{fullName}</h2>\n </Avatar.Label>\n </div>\n </Card.Text>\n </Avatar.Root>\n {organizationName && (\n <Card.Chrome>\n {typeof organization === 'object' && onOrgClick ? (\n <Button variant='ghost' classNames='gap-2 text-start' onClick={() => onOrgClick(organization.target!)}>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n <Icon icon='ph--arrow-right--regular' />\n </Button>\n ) : (\n <p className='dx-button gap-2' data-variant='ghost'>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n </p>\n )}\n </Card.Chrome>\n )}\n <dl\n className={mx(\n cardText,\n 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',\n )}\n >\n {emails?.length &&\n emails.map(({ label, value }) => (\n <Fragment key={value}>\n <dt>\n <Icon icon='ph--at--regular' size={5} />\n </dt>\n <dd key={value} className='break-words'>\n {value}\n </dd>\n </Fragment>\n ))}\n </dl>\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const OrganizationCard = ({\n children,\n subject: { name, image, description, website },\n role,\n}: PreviewProps<DataType.Organization>) => {\n return (\n <Card.Container role={role}>\n <Card.Poster alt={name!} {...(image ? { image } : { icon: 'ph--building-office--regular' })} />\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n {website && (\n <Card.Chrome>\n <a\n className='dx-button dx-focus-ring gap-2'\n data-variant='ghost'\n href={website}\n target='_blank'\n rel='noreferrer'\n >\n <Icon icon='ph--link--regular' size={5} classNames='text-subdued' />\n <span className='grow'>{website}</span>\n <Icon icon='ph--arrow-square-out--regular' />\n </a>\n </Card.Chrome>\n )}\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ProjectCard = ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => {\n return (\n <Card.Container role={role}>\n {image && <Card.Poster image={image} alt={name} aspect='auto' />}\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n </Card.Container>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,OAAOA,UAASC,mBAAmB;AAEnC,SACEC,cACAC,cACAC,SACAC,aACAC,cACAC,eACAC,2BACK;AACP,SAASC,kBAAkBC,WAAWC,gBAAgB;AACtD,SAASC,KAAKC,cAAc;AAC5B,SAAwBC,gBAAgB;AACxC,SAASC,sBAAsB;AAC/B,SAASC,YAAY;AACrB,SAASC,QAAAA,OAAMC,mBAAmB;AAClC,SAASC,iBAAiB;AAC1B,SAASC,0BAA0B;AACnC,SAASC,gBAAgB;;;;ACnBzB,OAAOC,SAASC,gBAAgB;AAEhC,SAASC,MAAMC,QAAQC,cAAc;AACrC,SAASC,MAAMC,aAAaC,gBAAgB;AAC5C,SAASC,UAAU;AAKZ,IAAMC,cAAc,CAAC,EAC1BC,UACAC,SAAS,EAAEC,UAAUC,OAAOC,cAAcC,OAAM,GAChDC,YACAC,KAAI,MACkF;;;AACtF,UAAMC,mBAAmBJ,gBAAgB,OAAOA,iBAAiB,WAAWA,aAAaK,QAAQC,OAAON;AACxG,WACE,sBAAA,cAACO,KAAKC,WAAS;MAACL;OACd,sBAAA,cAACM,OAAOC,MAAI,MACV,sBAAA,cAACH,KAAKI,MAAI;MAACR,MAAK;MAAQS,YAA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K;QACb+D,UAAUtE,SAAS;QACnBuE,QAAQb;QACRc,UAAAA;QACAC,YAAYC;;IAIpB;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["React", "useCallback", "Capabilities", "LayoutAction", "Surface", "contributes", "createIntent", "createSurface", "useIntentDispatcher", "fullyQualifiedId", "getSchema", "getSpace", "Obj", "Filter", "setValue", "useTranslation", "Form", "Card", "cardSpacing", "TableType", "descriptionMessage", "DataType", "React", "Fragment", "Icon", "Avatar", "Button", "Card", "cardHeading", "cardText", "mx", "ContactCard", "children", "subject", "fullName", "image", "organization", "emails", "onOrgClick", "role", "organizationName", "target", "name", "Card", "Container", "Avatar", "Root", "Text", "classNames", "Content", "imgSrc", "icon", "size", "hue", "div", "className", "Label", "asChild", "h2", "cardHeading", "Chrome", "Button", "variant", "onClick", "Icon", "span", "p", "data-variant", "dl", "mx", "cardText", "length", "map", "label", "value", "Fragment", "key", "dt", "dd", "React", "Icon", "Card", "OrganizationCard", "children", "subject", "name", "image", "description", "website", "role", "React", "Card", "Container", "Poster", "alt", "icon", "Heading", "Text", "classNames", "Chrome", "a", "className", "data-variant", "href", "target", "rel", "Icon", "size", "span", "React", "Card", "ProjectCard", "subject", "name", "image", "description", "role", "React", "Card", "Container", "Poster", "alt", "aspect", "Heading", "Text", "classNames", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PREVIEW_PLUGIN", "role", "filter", "data", "Obj", "instanceOf", "DataType", "Person", "subject", "component", "dispatchPromise", "dispatch", "useIntentDispatcher", "handleOrgClick", "useCallback", "org", "space", "getSpace", "tablesQuery", "db", "query", "Filter", "type", "TableType", "run", "currentSpaceOrgTable", "objects", "find", "table", "view", "target", "typename", "Organization", "createIntent", "LayoutAction", "UpdatePopover", "part", "options", "state", "anchorId", "Open", "fullyQualifiedId", "workspace", "React", "ContactCard", "onOrgClick", "Surface", "OrganizationCard", "Project", "ProjectCard", "position", "isObject", "schema", "getSchema", "t", "useTranslation", "p", "className", "descriptionMessage", "handleSave", "values", "changed", "changedPaths", "Object", "keys", "path", "value", "setValue", "Card", "Container", "Form", "readonly", "onSave", "autoSave", "classNames", "cardSpacing"]
|
|
7
|
+
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -39,7 +39,7 @@ var import_plugin_client = require("@dxos/plugin-client");
|
|
|
39
39
|
var import_schema = require("@dxos/schema");
|
|
40
40
|
var import_app_framework2 = require("@dxos/app-framework");
|
|
41
41
|
var PreviewPopover = (0, import_app_framework2.lazy)(() => import("./preview-popover-K4E7UEQU.cjs"));
|
|
42
|
-
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-
|
|
42
|
+
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-VV3IADFZ.cjs"));
|
|
43
43
|
var translations_default = [
|
|
44
44
|
{
|
|
45
45
|
"en-US": {
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":745,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8458,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9249,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":4743,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":2581,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":17075,"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-schema","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-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"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":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3134},"packages/plugins/plugin-preview/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs","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":"packages/plugins/plugin-preview/dist/lib/node/preview-popover-K4E7UEQU.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/node/react-surface-FI63RLWN.cjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","meta"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1690},"packages/plugins/plugin-preview/dist/lib/node/preview-popover-K4E7UEQU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4413},"packages/plugins/plugin-preview/dist/lib/node/preview-popover-K4E7UEQU.cjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2079}},"bytes":2253},"packages/plugins/plugin-preview/dist/lib/node/react-surface-FI63RLWN.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16594},"packages/plugins/plugin-preview/dist/lib/node/react-surface-FI63RLWN.cjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs","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-schema","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-table","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":"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":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4227},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2882},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1436},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":707}},"bytes":9756},"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":613},"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216}},"bytes":345}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":745,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8458,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9249,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":4743,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":2581,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":17453,"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-schema","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-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"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":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3134},"packages/plugins/plugin-preview/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs","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":"packages/plugins/plugin-preview/dist/lib/node/preview-popover-K4E7UEQU.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/node/react-surface-VV3IADFZ.cjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","meta"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1690},"packages/plugins/plugin-preview/dist/lib/node/preview-popover-K4E7UEQU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4413},"packages/plugins/plugin-preview/dist/lib/node/preview-popover-K4E7UEQU.cjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2079}},"bytes":2253},"packages/plugins/plugin-preview/dist/lib/node/react-surface-VV3IADFZ.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16786},"packages/plugins/plugin-preview/dist/lib/node/react-surface-VV3IADFZ.cjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs","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-schema","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-table","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":"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":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4285},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2882},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1436},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":707}},"bytes":9814},"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":613},"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216}},"bytes":345}}}
|
|
@@ -26,15 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var react_surface_VV3IADFZ_exports = {};
|
|
30
|
+
__export(react_surface_VV3IADFZ_exports, {
|
|
31
31
|
default: () => react_surface_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(react_surface_VV3IADFZ_exports);
|
|
34
34
|
var import_chunk_XGHMBEIV = require("./chunk-XGHMBEIV.cjs");
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_app_framework = require("@dxos/app-framework");
|
|
37
37
|
var import_echo = require("@dxos/client/echo");
|
|
38
|
+
var import_echo2 = require("@dxos/echo");
|
|
38
39
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
39
40
|
var import_react_ui = require("@dxos/react-ui");
|
|
40
41
|
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
@@ -171,12 +172,12 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
171
172
|
"card--kanban",
|
|
172
173
|
"card"
|
|
173
174
|
],
|
|
174
|
-
filter: (data) =>
|
|
175
|
+
filter: (data) => import_echo2.Obj.instanceOf(import_schema.DataType.Person, data.subject),
|
|
175
176
|
component: ({ data, role }) => {
|
|
176
177
|
const { dispatchPromise: dispatch } = (0, import_app_framework.useIntentDispatcher)();
|
|
177
178
|
const handleOrgClick = (0, import_react.useCallback)(async (org) => {
|
|
178
179
|
const space = (0, import_echo.getSpace)(org);
|
|
179
|
-
const tablesQuery = await space?.db.query(
|
|
180
|
+
const tablesQuery = await space?.db.query(import_echo2.Filter.type(import_react_ui_table.TableType)).run();
|
|
180
181
|
const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {
|
|
181
182
|
return table.view?.target?.query?.typename === import_schema.DataType.Organization.typename;
|
|
182
183
|
});
|
|
@@ -218,7 +219,7 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
218
219
|
"card--kanban",
|
|
219
220
|
"card"
|
|
220
221
|
],
|
|
221
|
-
filter: (data) =>
|
|
222
|
+
filter: (data) => import_echo2.Obj.instanceOf(import_schema.DataType.Organization, data.subject),
|
|
222
223
|
component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(OrganizationCard, {
|
|
223
224
|
role,
|
|
224
225
|
subject: data.subject
|
|
@@ -234,7 +235,7 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
234
235
|
"card--kanban",
|
|
235
236
|
"card"
|
|
236
237
|
],
|
|
237
|
-
filter: (data) =>
|
|
238
|
+
filter: (data) => import_echo2.Obj.instanceOf(import_schema.DataType.Project, data.subject),
|
|
238
239
|
component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(ProjectCard, {
|
|
239
240
|
subject: data.subject,
|
|
240
241
|
role
|
|
@@ -251,7 +252,7 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
251
252
|
"card"
|
|
252
253
|
],
|
|
253
254
|
position: "fallback",
|
|
254
|
-
filter: (data) =>
|
|
255
|
+
filter: (data) => import_echo2.Obj.isObject(data.subject),
|
|
255
256
|
component: ({ data, role }) => {
|
|
256
257
|
const schema = (0, import_echo.getSchema)(data.subject);
|
|
257
258
|
const { t } = (0, import_react_ui.useTranslation)(import_chunk_XGHMBEIV.PREVIEW_PLUGIN);
|
|
@@ -274,9 +275,10 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
274
275
|
values: data.subject,
|
|
275
276
|
readonly: role === "popover",
|
|
276
277
|
onSave: handleSave,
|
|
277
|
-
autoSave: true
|
|
278
|
+
autoSave: true,
|
|
279
|
+
classNames: import_react_ui_stack.cardSpacing
|
|
278
280
|
}));
|
|
279
281
|
}
|
|
280
282
|
})
|
|
281
283
|
]);
|
|
282
|
-
//# sourceMappingURL=react-surface-
|
|
284
|
+
//# sourceMappingURL=react-surface-VV3IADFZ.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/ContactCard.tsx", "../../../src/components/OrganizationCard.tsx", "../../../src/components/ProjectCard.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n Surface,\n contributes,\n createIntent,\n createSurface,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getSchema, getSpace } from '@dxos/client/echo';\nimport { Obj, Filter } from '@dxos/echo';\nimport { type JsonPath, setValue } from '@dxos/echo-schema';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { Card, cardSpacing } from '@dxos/react-ui-stack';\nimport { TableType } from '@dxos/react-ui-table';\nimport { descriptionMessage } from '@dxos/react-ui-theme';\nimport { DataType } from '@dxos/schema';\n\nimport { ContactCard, OrganizationCard, ProjectCard } from '../components';\nimport { PREVIEW_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--contact`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Person } => Obj.instanceOf(DataType.Person, data.subject),\n component: ({ data, role }) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const handleOrgClick = useCallback(\n async (org: DataType.Organization) => {\n const space = getSpace(org);\n const tablesQuery = await space?.db.query(Filter.type(TableType)).run();\n const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {\n return table.view?.target?.query?.typename === DataType.Organization.typename;\n });\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n options: {\n state: false,\n anchorId: '',\n },\n }),\n );\n if (currentSpaceOrgTable) {\n return dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [fullyQualifiedId(currentSpaceOrgTable)],\n options: { workspace: space?.id },\n }),\n );\n }\n },\n [dispatch],\n );\n return (\n <ContactCard role={role} subject={data.subject} onOrgClick={handleOrgClick}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--organization`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Organization } => Obj.instanceOf(DataType.Organization, data.subject),\n component: ({ data, role }) => (\n <OrganizationCard role={role} subject={data.subject}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--project`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Project } => Obj.instanceOf(DataType.Project, data.subject),\n component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,\n }),\n\n //\n // Fallback for any object.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/fallback-popover`,\n role: ['popover', 'card--kanban', 'card'],\n position: 'fallback',\n filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),\n component: ({ data, role }) => {\n const schema = getSchema(data.subject);\n const { t } = useTranslation(PREVIEW_PLUGIN);\n if (!schema) {\n return <p className={descriptionMessage}>{t('unable to create preview message')}</p>;\n }\n\n const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {\n const changedPaths = Object.keys(changed).filter((path) => changed[path]);\n for (const path of changedPaths) {\n const value = values[path];\n setValue(data.subject, path as JsonPath, value);\n }\n }, []);\n\n return (\n <Card.Container role={role}>\n <Form\n schema={schema}\n values={data.subject}\n readonly={role === 'popover'}\n onSave={handleSave}\n autoSave\n classNames={cardSpacing}\n />\n </Card.Container>\n );\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Icon, Avatar, Button } from '@dxos/react-ui';\nimport { Card, cardHeading, cardText } from '@dxos/react-ui-stack';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ContactCard = ({\n children,\n subject: { fullName, image, organization, emails },\n onOrgClick,\n role,\n}: PreviewProps<DataType.Person> & { onOrgClick?: (org: DataType.Organization) => void }) => {\n const organizationName = organization && typeof organization === 'object' ? organization.target?.name : organization;\n return (\n <Card.Container role={role}>\n <Avatar.Root>\n <Card.Text role='group' classNames='grid gap-3 grid-cols-[min-content_1fr]'>\n <Avatar.Content imgSrc={image} icon='ph--user--regular' size={16} hue='neutral' />\n <div role='none' className='bs-min self-center'>\n <Avatar.Label asChild>\n <h2 className={cardHeading}>{fullName}</h2>\n </Avatar.Label>\n </div>\n </Card.Text>\n </Avatar.Root>\n {organizationName && (\n <Card.Chrome>\n {typeof organization === 'object' && onOrgClick ? (\n <Button variant='ghost' classNames='gap-2 text-start' onClick={() => onOrgClick(organization.target!)}>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n <Icon icon='ph--arrow-right--regular' />\n </Button>\n ) : (\n <p className='dx-button gap-2' data-variant='ghost'>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n </p>\n )}\n </Card.Chrome>\n )}\n <dl\n className={mx(\n cardText,\n 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',\n )}\n >\n {emails?.length &&\n emails.map(({ label, value }) => (\n <Fragment key={value}>\n <dt>\n <Icon icon='ph--at--regular' size={5} />\n </dt>\n <dd key={value} className='break-words'>\n {value}\n </dd>\n </Fragment>\n ))}\n </dl>\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const OrganizationCard = ({\n children,\n subject: { name, image, description, website },\n role,\n}: PreviewProps<DataType.Organization>) => {\n return (\n <Card.Container role={role}>\n <Card.Poster alt={name!} {...(image ? { image } : { icon: 'ph--building-office--regular' })} />\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n {website && (\n <Card.Chrome>\n <a\n className='dx-button dx-focus-ring gap-2'\n data-variant='ghost'\n href={website}\n target='_blank'\n rel='noreferrer'\n >\n <Icon icon='ph--link--regular' size={5} classNames='text-subdued' />\n <span className='grow'>{website}</span>\n <Icon icon='ph--arrow-square-out--regular' />\n </a>\n </Card.Chrome>\n )}\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ProjectCard = ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => {\n return (\n <Card.Container role={role}>\n {image && <Card.Poster image={image} alt={name} aspect='auto' />}\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clam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"import_react_ui_theme", "ContactCard", "children", "subject", "fullName", "image", "organization", "emails", "onOrgClick", "role", "organizationName", "target", "name", "React", "Card", "Container", "Avatar", "Root", "Text", "classNames", "Content", "imgSrc", "icon", "size", "hue", "div", "className", "Label", "asChild", "h2", "cardHeading", "Chrome", "Button", "variant", "onClick", "Icon", "span", "p", "data-variant", "dl", "mx", "cardText", "length", "map", "label", "value", "Fragment", "key", "dt", "dd", "OrganizationCard", "description", "website", "Poster", "alt", "Heading", "a", "href", "rel", "ProjectCard", "aspect", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PREVIEW_PLUGIN", "filter", "data", "Obj", "instanceOf", "DataType", "Person", "component", "dispatchPromise", "dispatch", "useIntentDispatcher", "handleOrgClick", "useCallback", "org", "space", "getSpace", "tablesQuery", "db", "query", "Filter", "type", "TableType", "run", "currentSpaceOrgTable", "objects", "find", "table", "view", "typename", "Organization", "createIntent", "LayoutAction", "UpdatePopover", "part", "options", "state", "anchorId", "Open", "fullyQualifiedId", "workspace", "Surface", "Project", "position", "isObject", "schema", "getSchema", "t", "useTranslation", "descriptionMessage", "handleSave", "values", "changed", "changedPaths", "Object", "keys", "path", "setValue", "Form", "readonly", "onSave", "autoSave", "cardSpacing"]
|
|
7
|
+
}
|
|
@@ -12,7 +12,7 @@ import { DataType } from "@dxos/schema";
|
|
|
12
12
|
// packages/plugins/plugin-preview/src/capabilities/index.ts
|
|
13
13
|
import { lazy } from "@dxos/app-framework";
|
|
14
14
|
var PreviewPopover = lazy(() => import("./preview-popover-W5FPZQM3.mjs"));
|
|
15
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
15
|
+
var ReactSurface = lazy(() => import("./react-surface-5PIIPXEP.mjs"));
|
|
16
16
|
|
|
17
17
|
// packages/plugins/plugin-preview/src/translations.ts
|
|
18
18
|
var translations_default = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":745,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8458,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9249,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":4743,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":2581,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":17075,"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-schema","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-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"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":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3135},"packages/plugins/plugin-preview/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.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":"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-EHIW3IEA.mjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","meta"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1782},"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4415},"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2079}},"bytes":2346},"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-EHIW3IEA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16595},"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-EHIW3IEA.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.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-schema","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-table","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":"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":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4227},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2882},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1436},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":707}},"bytes":9848},"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":615},"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216}},"bytes":438}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":745,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8458,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9249,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":4743,"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}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":2581,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":17453,"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-schema","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-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"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":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3135},"packages/plugins/plugin-preview/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.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":"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-5PIIPXEP.mjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","meta"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1782},"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4415},"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2079}},"bytes":2346},"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-5PIIPXEP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16787},"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-5PIIPXEP.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.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-schema","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-table","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":"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":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4285},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2882},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1436},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":707}},"bytes":9906},"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":615},"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216}},"bytes":438}}}
|
|
@@ -6,11 +6,12 @@ import {
|
|
|
6
6
|
// packages/plugins/plugin-preview/src/capabilities/react-surface.tsx
|
|
7
7
|
import React4, { useCallback } from "react";
|
|
8
8
|
import { Capabilities, LayoutAction, Surface, contributes, createIntent, createSurface, useIntentDispatcher } from "@dxos/app-framework";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { fullyQualifiedId, getSchema, getSpace } from "@dxos/client/echo";
|
|
10
|
+
import { Obj, Filter } from "@dxos/echo";
|
|
11
|
+
import { setValue } from "@dxos/echo-schema";
|
|
11
12
|
import { useTranslation } from "@dxos/react-ui";
|
|
12
13
|
import { Form } from "@dxos/react-ui-form";
|
|
13
|
-
import { Card as Card4 } from "@dxos/react-ui-stack";
|
|
14
|
+
import { Card as Card4, cardSpacing } from "@dxos/react-ui-stack";
|
|
14
15
|
import { TableType } from "@dxos/react-ui-table";
|
|
15
16
|
import { descriptionMessage } from "@dxos/react-ui-theme";
|
|
16
17
|
import { DataType } from "@dxos/schema";
|
|
@@ -151,7 +152,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
151
152
|
"card--kanban",
|
|
152
153
|
"card"
|
|
153
154
|
],
|
|
154
|
-
filter: (data) =>
|
|
155
|
+
filter: (data) => Obj.instanceOf(DataType.Person, data.subject),
|
|
155
156
|
component: ({ data, role }) => {
|
|
156
157
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
157
158
|
const handleOrgClick = useCallback(async (org) => {
|
|
@@ -198,7 +199,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
198
199
|
"card--kanban",
|
|
199
200
|
"card"
|
|
200
201
|
],
|
|
201
|
-
filter: (data) =>
|
|
202
|
+
filter: (data) => Obj.instanceOf(DataType.Organization, data.subject),
|
|
202
203
|
component: ({ data, role }) => /* @__PURE__ */ React4.createElement(OrganizationCard, {
|
|
203
204
|
role,
|
|
204
205
|
subject: data.subject
|
|
@@ -214,7 +215,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
214
215
|
"card--kanban",
|
|
215
216
|
"card"
|
|
216
217
|
],
|
|
217
|
-
filter: (data) =>
|
|
218
|
+
filter: (data) => Obj.instanceOf(DataType.Project, data.subject),
|
|
218
219
|
component: ({ data, role }) => /* @__PURE__ */ React4.createElement(ProjectCard, {
|
|
219
220
|
subject: data.subject,
|
|
220
221
|
role
|
|
@@ -231,7 +232,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
231
232
|
"card"
|
|
232
233
|
],
|
|
233
234
|
position: "fallback",
|
|
234
|
-
filter: (data) =>
|
|
235
|
+
filter: (data) => Obj.isObject(data.subject),
|
|
235
236
|
component: ({ data, role }) => {
|
|
236
237
|
const schema = getSchema(data.subject);
|
|
237
238
|
const { t } = useTranslation(PREVIEW_PLUGIN);
|
|
@@ -254,7 +255,8 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
254
255
|
values: data.subject,
|
|
255
256
|
readonly: role === "popover",
|
|
256
257
|
onSave: handleSave,
|
|
257
|
-
autoSave: true
|
|
258
|
+
autoSave: true,
|
|
259
|
+
classNames: cardSpacing
|
|
258
260
|
}));
|
|
259
261
|
}
|
|
260
262
|
})
|
|
@@ -262,4 +264,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
262
264
|
export {
|
|
263
265
|
react_surface_default as default
|
|
264
266
|
};
|
|
265
|
-
//# sourceMappingURL=react-surface-
|
|
267
|
+
//# sourceMappingURL=react-surface-5PIIPXEP.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/ContactCard.tsx", "../../../src/components/OrganizationCard.tsx", "../../../src/components/ProjectCard.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n Surface,\n contributes,\n createIntent,\n createSurface,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getSchema, getSpace } from '@dxos/client/echo';\nimport { Obj, Filter } from '@dxos/echo';\nimport { type JsonPath, setValue } from '@dxos/echo-schema';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { Card, cardSpacing } from '@dxos/react-ui-stack';\nimport { TableType } from '@dxos/react-ui-table';\nimport { descriptionMessage } from '@dxos/react-ui-theme';\nimport { DataType } from '@dxos/schema';\n\nimport { ContactCard, OrganizationCard, ProjectCard } from '../components';\nimport { PREVIEW_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--contact`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Person } => Obj.instanceOf(DataType.Person, data.subject),\n component: ({ data, role }) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const handleOrgClick = useCallback(\n async (org: DataType.Organization) => {\n const space = getSpace(org);\n const tablesQuery = await space?.db.query(Filter.type(TableType)).run();\n const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {\n return table.view?.target?.query?.typename === DataType.Organization.typename;\n });\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n options: {\n state: false,\n anchorId: '',\n },\n }),\n );\n if (currentSpaceOrgTable) {\n return dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [fullyQualifiedId(currentSpaceOrgTable)],\n options: { workspace: space?.id },\n }),\n );\n }\n },\n [dispatch],\n );\n return (\n <ContactCard role={role} subject={data.subject} onOrgClick={handleOrgClick}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--organization`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Organization } => Obj.instanceOf(DataType.Organization, data.subject),\n component: ({ data, role }) => (\n <OrganizationCard role={role} subject={data.subject}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--project`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Project } => Obj.instanceOf(DataType.Project, data.subject),\n component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,\n }),\n\n //\n // Fallback for any object.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/fallback-popover`,\n role: ['popover', 'card--kanban', 'card'],\n position: 'fallback',\n filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),\n component: ({ data, role }) => {\n const schema = getSchema(data.subject);\n const { t } = useTranslation(PREVIEW_PLUGIN);\n if (!schema) {\n return <p className={descriptionMessage}>{t('unable to create preview message')}</p>;\n }\n\n const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {\n const changedPaths = Object.keys(changed).filter((path) => changed[path]);\n for (const path of changedPaths) {\n const value = values[path];\n setValue(data.subject, path as JsonPath, value);\n }\n }, []);\n\n return (\n <Card.Container role={role}>\n <Form\n schema={schema}\n values={data.subject}\n readonly={role === 'popover'}\n onSave={handleSave}\n autoSave\n classNames={cardSpacing}\n />\n </Card.Container>\n );\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Icon, Avatar, Button } from '@dxos/react-ui';\nimport { Card, cardHeading, cardText } from '@dxos/react-ui-stack';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ContactCard = ({\n children,\n subject: { fullName, image, organization, emails },\n onOrgClick,\n role,\n}: PreviewProps<DataType.Person> & { onOrgClick?: (org: DataType.Organization) => void }) => {\n const organizationName = organization && typeof organization === 'object' ? organization.target?.name : organization;\n return (\n <Card.Container role={role}>\n <Avatar.Root>\n <Card.Text role='group' classNames='grid gap-3 grid-cols-[min-content_1fr]'>\n <Avatar.Content imgSrc={image} icon='ph--user--regular' size={16} hue='neutral' />\n <div role='none' className='bs-min self-center'>\n <Avatar.Label asChild>\n <h2 className={cardHeading}>{fullName}</h2>\n </Avatar.Label>\n </div>\n </Card.Text>\n </Avatar.Root>\n {organizationName && (\n <Card.Chrome>\n {typeof organization === 'object' && onOrgClick ? (\n <Button variant='ghost' classNames='gap-2 text-start' onClick={() => onOrgClick(organization.target!)}>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n <Icon icon='ph--arrow-right--regular' />\n </Button>\n ) : (\n <p className='dx-button gap-2' data-variant='ghost'>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n </p>\n )}\n </Card.Chrome>\n )}\n <dl\n className={mx(\n cardText,\n 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',\n )}\n >\n {emails?.length &&\n emails.map(({ label, value }) => (\n <Fragment key={value}>\n <dt>\n <Icon icon='ph--at--regular' size={5} />\n </dt>\n <dd key={value} className='break-words'>\n {value}\n </dd>\n </Fragment>\n ))}\n </dl>\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const OrganizationCard = ({\n children,\n subject: { name, image, description, website },\n role,\n}: PreviewProps<DataType.Organization>) => {\n return (\n <Card.Container role={role}>\n <Card.Poster alt={name!} {...(image ? { image } : { icon: 'ph--building-office--regular' })} />\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n {website && (\n <Card.Chrome>\n <a\n className='dx-button dx-focus-ring gap-2'\n data-variant='ghost'\n href={website}\n target='_blank'\n rel='noreferrer'\n >\n <Icon icon='ph--link--regular' size={5} classNames='text-subdued' />\n <span className='grow'>{website}</span>\n <Icon icon='ph--arrow-square-out--regular' />\n </a>\n </Card.Chrome>\n )}\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ProjectCard = ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => {\n return (\n <Card.Container role={role}>\n {image && <Card.Poster image={image} alt={name} aspect='auto' />}\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n </Card.Container>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,OAAOA,UAASC,mBAAmB;AAEnC,SACEC,cACAC,cACAC,SACAC,aACAC,cACAC,eACAC,2BACK;AACP,SAASC,kBAAkBC,WAAWC,gBAAgB;AACtD,SAASC,KAAKC,cAAc;AAC5B,SAAwBC,gBAAgB;AACxC,SAASC,sBAAsB;AAC/B,SAASC,YAAY;AACrB,SAASC,QAAAA,OAAMC,mBAAmB;AAClC,SAASC,iBAAiB;AAC1B,SAASC,0BAA0B;AACnC,SAASC,gBAAgB;;;;ACnBzB,OAAOC,SAASC,gBAAgB;AAEhC,SAASC,MAAMC,QAAQC,cAAc;AACrC,SAASC,MAAMC,aAAaC,gBAAgB;AAC5C,SAASC,UAAU;AAKZ,IAAMC,cAAc,CAAC,EAC1BC,UACAC,SAAS,EAAEC,UAAUC,OAAOC,cAAcC,OAAM,GAChDC,YACAC,KAAI,MACkF;;;AACtF,UAAMC,mBAAmBJ,gBAAgB,OAAOA,iBAAiB,WAAWA,aAAaK,QAAQC,OAAON;AACxG,WACE,sBAAA,cAACO,KAAKC,WAAS;MAACL;OACd,sBAAA,cAACM,OAAOC,MAAI,MACV,sBAAA,cAACH,KAAKI,MAAI;MAACR,MAAK;MAAQS,YAAW;OACjC,sBAAA,cAACH,OAAOI,SAAO;MAACC,QAAQf;MAAOgB,MAAK;MAAoBC,MAAM;MAAIC,KAAI;QACtE,sBA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|
+
"names": ["React", "useCallback", "Capabilities", "LayoutAction", "Surface", "contributes", "createIntent", "createSurface", "useIntentDispatcher", "fullyQualifiedId", "getSchema", "getSpace", "Obj", "Filter", "setValue", "useTranslation", "Form", "Card", "cardSpacing", "TableType", "descriptionMessage", "DataType", "React", "Fragment", "Icon", "Avatar", "Button", "Card", "cardHeading", "cardText", "mx", "ContactCard", "children", "subject", "fullName", "image", "organization", "emails", "onOrgClick", "role", "organizationName", "target", "name", "Card", "Container", "Avatar", "Root", "Text", "classNames", "Content", "imgSrc", "icon", "size", "hue", "div", "className", "Label", "asChild", "h2", "cardHeading", "Chrome", "Button", "variant", "onClick", "Icon", "span", "p", "data-variant", "dl", "mx", "cardText", "length", "map", "label", "value", "Fragment", "key", "dt", "dd", "React", "Icon", "Card", "OrganizationCard", "children", "subject", "name", "image", "description", "website", "role", "React", "Card", "Container", "Poster", "alt", "icon", "Heading", "Text", "classNames", "Chrome", "a", "className", "data-variant", "href", "target", "rel", "Icon", "size", "span", "React", "Card", "ProjectCard", "subject", "name", "image", "description", "role", "React", "Card", "Container", "Poster", "alt", "aspect", "Heading", "Text", "classNames", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PREVIEW_PLUGIN", "role", "filter", "data", "Obj", "instanceOf", "DataType", "Person", "subject", "component", "dispatchPromise", "dispatch", "useIntentDispatcher", "handleOrgClick", "useCallback", "org", "space", "getSpace", "tablesQuery", "db", "query", "Filter", "type", "TableType", "run", "currentSpaceOrgTable", "objects", "find", "table", "view", "target", "typename", "Organization", "createIntent", "LayoutAction", "UpdatePopover", "part", "options", "state", "anchorId", "Open", "fullyQualifiedId", "workspace", "React", "ContactCard", "onOrgClick", "Surface", "OrganizationCard", "Project", "ProjectCard", "position", "isObject", "schema", "getSchema", "t", "useTranslation", "p", "className", "descriptionMessage", "handleSave", "values", "changed", "changedPaths", "Object", "keys", "path", "value", "setValue", "Card", "Container", "Form", "readonly", "onSave", "autoSave", "classNames", "cardSpacing"]
|
|
7
|
+
}
|
|
@@ -16,7 +16,7 @@ export declare const ContactWithImage: {
|
|
|
16
16
|
onOrgClick?: (org: DataType.Organization) => void;
|
|
17
17
|
}) => React.JSX.Element;
|
|
18
18
|
icon: string;
|
|
19
|
-
subject:
|
|
19
|
+
subject: import("@dxos/live-object").Live<{
|
|
20
20
|
readonly id: string;
|
|
21
21
|
fields?: {
|
|
22
22
|
readonly label: string;
|
|
@@ -67,11 +67,7 @@ export declare const ContactWithImage: {
|
|
|
67
67
|
readonly value: string;
|
|
68
68
|
}[] | undefined;
|
|
69
69
|
birthday?: string | undefined;
|
|
70
|
-
}
|
|
71
|
-
id?: string;
|
|
72
|
-
} & {
|
|
73
|
-
id: string;
|
|
74
|
-
};
|
|
70
|
+
}>;
|
|
75
71
|
role: string;
|
|
76
72
|
};
|
|
77
73
|
};
|
|
@@ -89,18 +85,14 @@ export declare const OrganizationWithImage: {
|
|
|
89
85
|
args: {
|
|
90
86
|
Component: ({ children, subject: { name, image, description, website }, role, }: PreviewProps<DataType.Organization>) => React.JSX.Element;
|
|
91
87
|
icon: string;
|
|
92
|
-
subject:
|
|
88
|
+
subject: import("@dxos/live-object").Live<{
|
|
93
89
|
readonly id: string;
|
|
94
90
|
image?: string | undefined;
|
|
95
91
|
status?: "active" | "prospect" | "qualified" | "commit" | "reject" | undefined;
|
|
96
92
|
name?: string | undefined;
|
|
97
93
|
description?: string | undefined;
|
|
98
94
|
website?: string | undefined;
|
|
99
|
-
}
|
|
100
|
-
id?: string;
|
|
101
|
-
} & {
|
|
102
|
-
id: string;
|
|
103
|
-
};
|
|
95
|
+
}>;
|
|
104
96
|
role: string;
|
|
105
97
|
};
|
|
106
98
|
};
|
|
@@ -116,16 +108,12 @@ export declare const ProjectWithImage: {
|
|
|
116
108
|
args: {
|
|
117
109
|
Component: ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => React.JSX.Element;
|
|
118
110
|
icon: string;
|
|
119
|
-
subject:
|
|
111
|
+
subject: import("@dxos/live-object").Live<{
|
|
120
112
|
readonly id: string;
|
|
121
113
|
image?: string | undefined;
|
|
122
114
|
name: string;
|
|
123
115
|
description?: string | undefined;
|
|
124
|
-
}
|
|
125
|
-
id?: string;
|
|
126
|
-
} & {
|
|
127
|
-
id: string;
|
|
128
|
-
};
|
|
116
|
+
}>;
|
|
129
117
|
role: string;
|
|
130
118
|
};
|
|
131
119
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preview.stories.d.ts","sourceRoot":"","sources":["../../../src/Preview.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Preview.stories.d.ts","sourceRoot":"","sources":["../../../src/Preview.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,KAAK,UAAU,GAAG;IAChB,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAsB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AA2CpB,eAAO,MAAM,gBAAgB;;;sBA7EpB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFT,CAAC;AAEF,eAAO,MAAM,cAAc;;;sBAtFlB,CAAC;;;;;;CA6FT,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;CAOjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;CAO/B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;CAO5B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EAOb,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EAOb,MAAM,qBAAqB,CAAC;;AAc7B,wBAoGK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-preview",
|
|
3
|
-
"version": "0.8.3-main.
|
|
3
|
+
"version": "0.8.3-main.7f5a14c",
|
|
4
4
|
"description": "Preview plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -25,31 +25,31 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@preact-signals/safe-react": "^0.9.0",
|
|
27
27
|
"effect": "3.14.21",
|
|
28
|
-
"@dxos/app-framework": "0.8.3-main.
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/
|
|
31
|
-
"@dxos/echo-schema": "0.8.3-main.
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/react-ui": "0.8.3-main.
|
|
39
|
-
"@dxos/react-ui-
|
|
40
|
-
"@dxos/react-ui-
|
|
41
|
-
"@dxos/react-ui-stack": "0.8.3-main.
|
|
42
|
-
"@dxos/schema": "0.8.3-main.
|
|
43
|
-
"@dxos/react-ui-
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
28
|
+
"@dxos/app-framework": "0.8.3-main.7f5a14c",
|
|
29
|
+
"@dxos/echo": "0.8.3-main.7f5a14c",
|
|
30
|
+
"@dxos/client": "0.8.3-main.7f5a14c",
|
|
31
|
+
"@dxos/echo-schema": "0.8.3-main.7f5a14c",
|
|
32
|
+
"@dxos/keys": "0.8.3-main.7f5a14c",
|
|
33
|
+
"@dxos/async": "0.8.3-main.7f5a14c",
|
|
34
|
+
"@dxos/log": "0.8.3-main.7f5a14c",
|
|
35
|
+
"@dxos/plugin-client": "0.8.3-main.7f5a14c",
|
|
36
|
+
"@dxos/react-client": "0.8.3-main.7f5a14c",
|
|
37
|
+
"@dxos/lit-ui": "0.8.3-main.7f5a14c",
|
|
38
|
+
"@dxos/react-ui": "0.8.3-main.7f5a14c",
|
|
39
|
+
"@dxos/react-ui-form": "0.8.3-main.7f5a14c",
|
|
40
|
+
"@dxos/react-ui-editor": "0.8.3-main.7f5a14c",
|
|
41
|
+
"@dxos/react-ui-stack": "0.8.3-main.7f5a14c",
|
|
42
|
+
"@dxos/schema": "0.8.3-main.7f5a14c",
|
|
43
|
+
"@dxos/react-ui-theme": "0.8.3-main.7f5a14c",
|
|
44
|
+
"@dxos/react-ui-table": "0.8.3-main.7f5a14c",
|
|
45
|
+
"@dxos/util": "0.8.3-main.7f5a14c"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"effect": "3.14.21",
|
|
49
49
|
"react": "~18.2.0",
|
|
50
50
|
"react-dom": "~18.2.0",
|
|
51
51
|
"vite": "5.4.7",
|
|
52
|
-
"@dxos/random": "0.8.3-main.
|
|
52
|
+
"@dxos/random": "0.8.3-main.7f5a14c"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"effect": "^3.13.3",
|
package/src/Preview.stories.tsx
CHANGED
|
@@ -7,9 +7,8 @@ import '@dxos-theme';
|
|
|
7
7
|
import { type Meta } from '@storybook/react';
|
|
8
8
|
import React, { type FC } from 'react';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
11
11
|
import { faker } from '@dxos/random';
|
|
12
|
-
import { makeRef } from '@dxos/react-client/echo';
|
|
13
12
|
import { Icon, Popover } from '@dxos/react-ui';
|
|
14
13
|
import { DataType } from '@dxos/schema';
|
|
15
14
|
import { withTheme, withLayout } from '@dxos/storybook-utils';
|
|
@@ -32,7 +31,9 @@ const meta: Meta<StoryProps> = {
|
|
|
32
31
|
return (
|
|
33
32
|
<Popover.Root open>
|
|
34
33
|
<Popover.Content>
|
|
35
|
-
<
|
|
34
|
+
<Popover.Viewport>
|
|
35
|
+
<Component {...args} role='popover' />
|
|
36
|
+
</Popover.Viewport>
|
|
36
37
|
<Popover.Arrow />
|
|
37
38
|
</Popover.Content>
|
|
38
39
|
<Popover.Trigger>
|
|
@@ -53,7 +54,7 @@ export default meta;
|
|
|
53
54
|
const omitImage = ({ image, ...rest }: any) => rest;
|
|
54
55
|
|
|
55
56
|
const data = (() => {
|
|
56
|
-
const organization =
|
|
57
|
+
const organization = Obj.make(DataType.Organization, {
|
|
57
58
|
name: faker.company.name(),
|
|
58
59
|
image:
|
|
59
60
|
'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',
|
|
@@ -61,11 +62,11 @@ const data = (() => {
|
|
|
61
62
|
description: faker.lorem.paragraph(),
|
|
62
63
|
});
|
|
63
64
|
|
|
64
|
-
const contact =
|
|
65
|
+
const contact = Obj.make(DataType.Person, {
|
|
65
66
|
fullName: faker.person.fullName(),
|
|
66
67
|
image:
|
|
67
68
|
'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',
|
|
68
|
-
organization:
|
|
69
|
+
organization: Ref.make(organization),
|
|
69
70
|
emails: [
|
|
70
71
|
{
|
|
71
72
|
label: 'Work',
|
|
@@ -82,7 +83,7 @@ const data = (() => {
|
|
|
82
83
|
],
|
|
83
84
|
});
|
|
84
85
|
|
|
85
|
-
const project =
|
|
86
|
+
const project = Obj.make(DataType.Project, {
|
|
86
87
|
name: faker.person.fullName(),
|
|
87
88
|
image: 'https://dxos.network/dxos-logotype-blue.png',
|
|
88
89
|
description: faker.lorem.paragraph(),
|
|
@@ -13,11 +13,12 @@ import {
|
|
|
13
13
|
createSurface,
|
|
14
14
|
useIntentDispatcher,
|
|
15
15
|
} from '@dxos/app-framework';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { fullyQualifiedId, getSchema, getSpace } from '@dxos/client/echo';
|
|
17
|
+
import { Obj, Filter } from '@dxos/echo';
|
|
18
|
+
import { type JsonPath, setValue } from '@dxos/echo-schema';
|
|
18
19
|
import { useTranslation } from '@dxos/react-ui';
|
|
19
20
|
import { Form } from '@dxos/react-ui-form';
|
|
20
|
-
import { Card } from '@dxos/react-ui-stack';
|
|
21
|
+
import { Card, cardSpacing } from '@dxos/react-ui-stack';
|
|
21
22
|
import { TableType } from '@dxos/react-ui-table';
|
|
22
23
|
import { descriptionMessage } from '@dxos/react-ui-theme';
|
|
23
24
|
import { DataType } from '@dxos/schema';
|
|
@@ -33,7 +34,7 @@ export default () =>
|
|
|
33
34
|
createSurface({
|
|
34
35
|
id: `${PREVIEW_PLUGIN}/schema-popover--contact`,
|
|
35
36
|
role: ['popover', 'card--kanban', 'card'],
|
|
36
|
-
filter: (data): data is { subject: DataType.Person } =>
|
|
37
|
+
filter: (data): data is { subject: DataType.Person } => Obj.instanceOf(DataType.Person, data.subject),
|
|
37
38
|
component: ({ data, role }) => {
|
|
38
39
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
39
40
|
const handleOrgClick = useCallback(
|
|
@@ -74,7 +75,7 @@ export default () =>
|
|
|
74
75
|
createSurface({
|
|
75
76
|
id: `${PREVIEW_PLUGIN}/schema-popover--organization`,
|
|
76
77
|
role: ['popover', 'card--kanban', 'card'],
|
|
77
|
-
filter: (data): data is { subject: DataType.Organization } =>
|
|
78
|
+
filter: (data): data is { subject: DataType.Organization } => Obj.instanceOf(DataType.Organization, data.subject),
|
|
78
79
|
component: ({ data, role }) => (
|
|
79
80
|
<OrganizationCard role={role} subject={data.subject}>
|
|
80
81
|
{role === 'popover' && <Surface role='related' data={data} />}
|
|
@@ -84,7 +85,7 @@ export default () =>
|
|
|
84
85
|
createSurface({
|
|
85
86
|
id: `${PREVIEW_PLUGIN}/schema-popover--project`,
|
|
86
87
|
role: ['popover', 'card--kanban', 'card'],
|
|
87
|
-
filter: (data): data is { subject: DataType.Project } =>
|
|
88
|
+
filter: (data): data is { subject: DataType.Project } => Obj.instanceOf(DataType.Project, data.subject),
|
|
88
89
|
component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,
|
|
89
90
|
}),
|
|
90
91
|
|
|
@@ -95,7 +96,7 @@ export default () =>
|
|
|
95
96
|
id: `${PREVIEW_PLUGIN}/fallback-popover`,
|
|
96
97
|
role: ['popover', 'card--kanban', 'card'],
|
|
97
98
|
position: 'fallback',
|
|
98
|
-
filter: (data): data is { subject:
|
|
99
|
+
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
99
100
|
component: ({ data, role }) => {
|
|
100
101
|
const schema = getSchema(data.subject);
|
|
101
102
|
const { t } = useTranslation(PREVIEW_PLUGIN);
|
|
@@ -113,7 +114,14 @@ export default () =>
|
|
|
113
114
|
|
|
114
115
|
return (
|
|
115
116
|
<Card.Container role={role}>
|
|
116
|
-
<Form
|
|
117
|
+
<Form
|
|
118
|
+
schema={schema}
|
|
119
|
+
values={data.subject}
|
|
120
|
+
readonly={role === 'popover'}
|
|
121
|
+
onSave={handleSave}
|
|
122
|
+
autoSave
|
|
123
|
+
classNames={cardSpacing}
|
|
124
|
+
/>
|
|
117
125
|
</Card.Container>
|
|
118
126
|
);
|
|
119
127
|
},
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/ContactCard.tsx", "../../../src/components/OrganizationCard.tsx", "../../../src/components/ProjectCard.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n Surface,\n contributes,\n createIntent,\n createSurface,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { Filter, fullyQualifiedId, getSchema, getSpace, isEchoObject, type AnyLiveObject } from '@dxos/client/echo';\nimport { isInstanceOf, type JsonPath, setValue } from '@dxos/echo-schema';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { Card } from '@dxos/react-ui-stack';\nimport { TableType } from '@dxos/react-ui-table';\nimport { descriptionMessage } from '@dxos/react-ui-theme';\nimport { DataType } from '@dxos/schema';\n\nimport { ContactCard, OrganizationCard, ProjectCard } from '../components';\nimport { PREVIEW_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--contact`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Person } => isInstanceOf(DataType.Person, data.subject),\n component: ({ data, role }) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const handleOrgClick = useCallback(\n async (org: DataType.Organization) => {\n const space = getSpace(org);\n const tablesQuery = await space?.db.query(Filter.type(TableType)).run();\n const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {\n return table.view?.target?.query?.typename === DataType.Organization.typename;\n });\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n options: {\n state: false,\n anchorId: '',\n },\n }),\n );\n if (currentSpaceOrgTable) {\n return dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [fullyQualifiedId(currentSpaceOrgTable)],\n options: { workspace: space?.id },\n }),\n );\n }\n },\n [dispatch],\n );\n return (\n <ContactCard role={role} subject={data.subject} onOrgClick={handleOrgClick}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--organization`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Organization } => isInstanceOf(DataType.Organization, data.subject),\n component: ({ data, role }) => (\n <OrganizationCard role={role} subject={data.subject}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--project`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Project } => isInstanceOf(DataType.Project, data.subject),\n component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,\n }),\n\n //\n // Fallback for any object.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/fallback-popover`,\n role: ['popover', 'card--kanban', 'card'],\n position: 'fallback',\n filter: (data): data is { subject: AnyLiveObject<any> } => isEchoObject(data.subject),\n component: ({ data, role }) => {\n const schema = getSchema(data.subject);\n const { t } = useTranslation(PREVIEW_PLUGIN);\n if (!schema) {\n return <p className={descriptionMessage}>{t('unable to create preview message')}</p>;\n }\n\n const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {\n const changedPaths = Object.keys(changed).filter((path) => changed[path]);\n for (const path of changedPaths) {\n const value = values[path];\n setValue(data.subject, path as JsonPath, value);\n }\n }, []);\n\n return (\n <Card.Container role={role}>\n <Form schema={schema} values={data.subject} readonly={role === 'popover'} onSave={handleSave} autoSave />\n </Card.Container>\n );\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Icon, Avatar, Button } from '@dxos/react-ui';\nimport { Card, cardHeading, cardText } from '@dxos/react-ui-stack';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ContactCard = ({\n children,\n subject: { fullName, image, organization, emails },\n onOrgClick,\n role,\n}: PreviewProps<DataType.Person> & { onOrgClick?: (org: DataType.Organization) => void }) => {\n const organizationName = organization && typeof organization === 'object' ? organization.target?.name : organization;\n return (\n <Card.Container role={role}>\n <Avatar.Root>\n <Card.Text role='group' classNames='grid gap-3 grid-cols-[min-content_1fr]'>\n <Avatar.Content imgSrc={image} icon='ph--user--regular' size={16} hue='neutral' />\n <div role='none' className='bs-min self-center'>\n <Avatar.Label asChild>\n <h2 className={cardHeading}>{fullName}</h2>\n </Avatar.Label>\n </div>\n </Card.Text>\n </Avatar.Root>\n {organizationName && (\n <Card.Chrome>\n {typeof organization === 'object' && onOrgClick ? (\n <Button variant='ghost' classNames='gap-2 text-start' onClick={() => onOrgClick(organization.target!)}>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n <Icon icon='ph--arrow-right--regular' />\n </Button>\n ) : (\n <p className='dx-button gap-2' data-variant='ghost'>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n </p>\n )}\n </Card.Chrome>\n )}\n <dl\n className={mx(\n cardText,\n 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',\n )}\n >\n {emails?.length &&\n emails.map(({ label, value }) => (\n <Fragment key={value}>\n <dt>\n <Icon icon='ph--at--regular' size={5} />\n </dt>\n <dd key={value} className='break-words'>\n {value}\n </dd>\n </Fragment>\n ))}\n </dl>\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const OrganizationCard = ({\n children,\n subject: { name, image, description, website },\n role,\n}: PreviewProps<DataType.Organization>) => {\n return (\n <Card.Container role={role}>\n <Card.Poster alt={name!} {...(image ? { image } : { icon: 'ph--building-office--regular' })} />\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n {website && (\n <Card.Chrome>\n <a\n className='dx-button dx-focus-ring gap-2'\n data-variant='ghost'\n href={website}\n target='_blank'\n rel='noreferrer'\n >\n <Icon icon='ph--link--regular' size={5} classNames='text-subdued' />\n <span className='grow'>{website}</span>\n <Icon icon='ph--arrow-square-out--regular' />\n </a>\n </Card.Chrome>\n )}\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ProjectCard = ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => {\n return (\n <Card.Container role={role}>\n {image && <Card.Poster image={image} alt={name} aspect='auto' />}\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n </Card.Container>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,OAAOA,UAASC,mBAAmB;AAEnC,SACEC,cACAC,cACAC,SACAC,aACAC,cACAC,eACAC,2BACK;AACP,SAASC,QAAQC,kBAAkBC,WAAWC,UAAUC,oBAAwC;AAChG,SAASC,cAA6BC,gBAAgB;AAC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AAAA;AAC7B,UAAI,CAACmD,QAAQ;AACX,eAAO,gBAAAT,OAAA,cAACa,KAAAA;UAAEC,WAAWC;WAAqBJ,EAAE,kCAAA,CAAA;MAC9C;AAEA,YAAMK,aAAa7C,YAAY,CAAC8C,QAAa,EAAEC,QAAO,MAAwC;AAC5F,cAAMC,eAAeC,OAAOC,KAAKH,OAAAA,EAAS1D,OAAO,CAAC8D,SAASJ,QAAQI,IAAAA,CAAK;AACxE,mBAAWA,QAAQH,cAAc;AAC/B,gBAAMI,QAAQN,OAAOK,IAAAA;AACrBE,mBAAS/D,KAAKI,SAASyD,MAAkBC,KAAAA;QAC3C;MACF,GAAG,CAAA,CAAE;AAEL,aACE,gBAAAvB,OAAA,cAACyB,MAAKC,WAAS;QAACnE;SACd,gBAAAyC,OAAA,cAAC2B,MAAAA;QAAKlB;QAAgBQ,QAAQxD,KAAKI;QAAS+D,UAAUrE,SAAS;QAAWsE,QAAQb;QAAYc,UAAAA;;IAGpG;EACF,CAAA;CACD;",
|
|
6
|
-
"names": ["React", "useCallback", "Capabilities", "LayoutAction", "Surface", "contributes", "createIntent", "createSurface", "useIntentDispatcher", "Filter", "fullyQualifiedId", "getSchema", "getSpace", "isEchoObject", "isInstanceOf", "setValue", "useTranslation", "Form", "Card", "TableType", "descriptionMessage", "DataType", "React", "Fragment", "Icon", "Avatar", "Button", "Card", "cardHeading", "cardText", "mx", "ContactCard", "children", "subject", "fullName", "image", "organization", "emails", "onOrgClick", "role", "organizationName", "target", "name", "Card", "Container", "Avatar", "Root", "Text", "classNames", "Content", "imgSrc", "icon", "size", "hue", "div", "className", "Label", "asChild", "h2", "cardHeading", "Chrome", "Button", "variant", "onClick", "Icon", "span", "p", "data-variant", "dl", "mx", "cardText", "length", "map", "label", "value", "Fragment", "key", "dt", "dd", "React", "Icon", "Card", "OrganizationCard", "children", "subject", "name", "image", "description", "website", "role", "React", "Card", "Container", "Poster", "alt", "icon", "Heading", "Text", "classNames", "Chrome", "a", "className", "data-variant", "href", "target", "rel", "Icon", "size", "span", "React", "Card", "ProjectCard", "subject", "name", "image", "description", "role", "React", "Card", "Container", "Poster", "alt", "aspect", "Heading", "Text", "classNames", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PREVIEW_PLUGIN", "role", "filter", "data", "isInstanceOf", "DataType", "Person", "subject", "component", "dispatchPromise", "dispatch", "useIntentDispatcher", "handleOrgClick", "useCallback", "org", "space", "getSpace", "tablesQuery", "db", "query", "Filter", "type", "TableType", "run", "currentSpaceOrgTable", "objects", "find", "table", "view", "target", "typename", "Organization", "createIntent", "LayoutAction", "UpdatePopover", "part", "options", "state", "anchorId", "Open", "fullyQualifiedId", "workspace", "React", "ContactCard", "onOrgClick", "Surface", "OrganizationCard", "Project", "ProjectCard", "position", "isEchoObject", "schema", "getSchema", "t", "useTranslation", "p", "className", "descriptionMessage", "handleSave", "values", "changed", "changedPaths", "Object", "keys", "path", "value", "setValue", "Card", "Container", "Form", "readonly", "onSave", "autoSave"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/ContactCard.tsx", "../../../src/components/OrganizationCard.tsx", "../../../src/components/ProjectCard.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n Surface,\n contributes,\n createIntent,\n createSurface,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { Filter, fullyQualifiedId, getSchema, getSpace, isEchoObject, type AnyLiveObject } from '@dxos/client/echo';\nimport { isInstanceOf, type JsonPath, setValue } from '@dxos/echo-schema';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { Card } from '@dxos/react-ui-stack';\nimport { TableType } from '@dxos/react-ui-table';\nimport { descriptionMessage } from '@dxos/react-ui-theme';\nimport { DataType } from '@dxos/schema';\n\nimport { ContactCard, OrganizationCard, ProjectCard } from '../components';\nimport { PREVIEW_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--contact`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Person } => isInstanceOf(DataType.Person, data.subject),\n component: ({ data, role }) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const handleOrgClick = useCallback(\n async (org: DataType.Organization) => {\n const space = getSpace(org);\n const tablesQuery = await space?.db.query(Filter.type(TableType)).run();\n const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {\n return table.view?.target?.query?.typename === DataType.Organization.typename;\n });\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n options: {\n state: false,\n anchorId: '',\n },\n }),\n );\n if (currentSpaceOrgTable) {\n return dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [fullyQualifiedId(currentSpaceOrgTable)],\n options: { workspace: space?.id },\n }),\n );\n }\n },\n [dispatch],\n );\n return (\n <ContactCard role={role} subject={data.subject} onOrgClick={handleOrgClick}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--organization`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Organization } => isInstanceOf(DataType.Organization, data.subject),\n component: ({ data, role }) => (\n <OrganizationCard role={role} subject={data.subject}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--project`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Project } => isInstanceOf(DataType.Project, data.subject),\n component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,\n }),\n\n //\n // Fallback for any object.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/fallback-popover`,\n role: ['popover', 'card--kanban', 'card'],\n position: 'fallback',\n filter: (data): data is { subject: AnyLiveObject<any> } => isEchoObject(data.subject),\n component: ({ data, role }) => {\n const schema = getSchema(data.subject);\n const { t } = useTranslation(PREVIEW_PLUGIN);\n if (!schema) {\n return <p className={descriptionMessage}>{t('unable to create preview message')}</p>;\n }\n\n const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {\n const changedPaths = Object.keys(changed).filter((path) => changed[path]);\n for (const path of changedPaths) {\n const value = values[path];\n setValue(data.subject, path as JsonPath, value);\n }\n }, []);\n\n return (\n <Card.Container role={role}>\n <Form schema={schema} values={data.subject} readonly={role === 'popover'} onSave={handleSave} autoSave />\n </Card.Container>\n );\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Icon, Avatar, Button } from '@dxos/react-ui';\nimport { Card, cardHeading, cardText } from '@dxos/react-ui-stack';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ContactCard = ({\n children,\n subject: { fullName, image, organization, emails },\n onOrgClick,\n role,\n}: PreviewProps<DataType.Person> & { onOrgClick?: (org: DataType.Organization) => void }) => {\n const organizationName = organization && typeof organization === 'object' ? organization.target?.name : organization;\n return (\n <Card.Container role={role}>\n <Avatar.Root>\n <Card.Text role='group' classNames='grid gap-3 grid-cols-[min-content_1fr]'>\n <Avatar.Content imgSrc={image} icon='ph--user--regular' size={16} hue='neutral' />\n <div role='none' className='bs-min self-center'>\n <Avatar.Label asChild>\n <h2 className={cardHeading}>{fullName}</h2>\n </Avatar.Label>\n </div>\n </Card.Text>\n </Avatar.Root>\n {organizationName && (\n <Card.Chrome>\n {typeof organization === 'object' && onOrgClick ? (\n <Button variant='ghost' classNames='gap-2 text-start' onClick={() => onOrgClick(organization.target!)}>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n <Icon icon='ph--arrow-right--regular' />\n </Button>\n ) : (\n <p className='dx-button gap-2' data-variant='ghost'>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n </p>\n )}\n </Card.Chrome>\n )}\n <dl\n className={mx(\n cardText,\n 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',\n )}\n >\n {emails?.length &&\n emails.map(({ label, value }) => (\n <Fragment key={value}>\n <dt>\n <Icon icon='ph--at--regular' size={5} />\n </dt>\n <dd key={value} className='break-words'>\n {value}\n </dd>\n </Fragment>\n ))}\n </dl>\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const OrganizationCard = ({\n children,\n subject: { name, image, description, website },\n role,\n}: PreviewProps<DataType.Organization>) => {\n return (\n <Card.Container role={role}>\n <Card.Poster alt={name!} {...(image ? { image } : { icon: 'ph--building-office--regular' })} />\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n {website && (\n <Card.Chrome>\n <a\n className='dx-button dx-focus-ring gap-2'\n data-variant='ghost'\n href={website}\n target='_blank'\n rel='noreferrer'\n >\n <Icon icon='ph--link--regular' size={5} classNames='text-subdued' />\n <span className='grow'>{website}</span>\n <Icon icon='ph--arrow-square-out--regular' />\n </a>\n </Card.Chrome>\n )}\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ProjectCard = ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => {\n return (\n <Card.Container role={role}>\n {image && <Card.Poster image={image} alt={name} aspect='auto' />}\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n </Card.Container>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAmC;AAEnC,2BAQO;AACP,kBAAgG;AAChG,yBAAsD;AACtD,sBAA+B;AAC/B,2BAAqB;AACrB,4BAAqB;AACrB,4BAA0B;AAC1B,4BAAmC;AACnC,oBAAyB;;AClBzB,IAAAA,gBAAgC;AAEhC,IAAAC,mBAAqC;AACrC,IAAAC,yBAA4C;AAC5C,IAAAC,yBAAmB;;ACJnB,IAAAH,gBAAkB;AAElB,IAAAC,mBAAqB;AACrB,IAAAC,yBAAqB;;ACHrB,IAAAF,gBAAkB;AAElB,IAAAE,yBAAqB;AFOd,IAAME,cAAc,CAAC,EAC1BC,UACAC,SAAS,EAAEC,UAAUC,OAAOC,cAAcC,OAAM,GAChDC,YACAC,KAAI,MACkF;;;AACtF,UAAMC,mBAAmBJ,gBAAgB,OAAOA,iBAAiB,WAAWA,aAAaK,QAAQC,OAAON;AACxG,WACE,8BAAAO,QAAA,cAACC,4BAAKC,WAAS;MAACN;OACd,8BAAAI,QAAA,cAACG,wBAAOC,MAAI,MACV,8BAAAJ,QAAA,cAACC,4BAAKI,MAAI;MAACT,MAAK;MAAQU,YAAW;OACjC,8BAAAN,QAAA,cAACG,wBAAOI,SAAO;MAACC,QAAQhB;MAAOiB,MAAK;MAAoBC,MAAM;MAAIC,KAAI;QACtE,8BAAAX,QAAA,cAACY,OAAAA;MAAIhB,MAAK;MAAOiB,WAAU;OACzB,8BAAAb,QAAA,cAACG,wBAAOW,OAAK;MAACC,SAAAA;OACZ,8BAAAf,QAAA,cAACgB,MAAAA;MAAGH,WAAWI;OAAc1B,QAAAA,CAAAA,CAAA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AYW,UAAAA;;IAGpG;EACF,CAAA;CACD;",
|
|
6
|
-
"names": ["import_react", "import_react_ui", "import_react_ui_stack", "import_react_ui_theme", "ContactCard", "children", "subject", "fullName", "image", "organization", "emails", "onOrgClick", "role", "organizationName", "target", "name", "React", "Card", "Container", "Avatar", "Root", "Text", "classNames", "Content", "imgSrc", "icon", "size", "hue", "div", "className", "Label", "asChild", "h2", "cardHeading", "Chrome", "Button", "variant", "onClick", "Icon", "span", "p", "data-variant", "dl", "mx", "cardText", "length", "map", "label", "value", "Fragment", "key", "dt", "dd", "OrganizationCard", "description", "website", "Poster", "alt", "Heading", "a", "href", "rel", "ProjectCard", "aspect", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PREVIEW_PLUGIN", "filter", "data", "isInstanceOf", "DataType", "Person", "component", "dispatchPromise", "dispatch", "useIntentDispatcher", "handleOrgClick", "useCallback", "org", "space", "getSpace", "tablesQuery", "db", "query", "Filter", "type", "TableType", "run", "currentSpaceOrgTable", "objects", "find", "table", "view", "typename", "Organization", "createIntent", "LayoutAction", "UpdatePopover", "part", "options", "state", "anchorId", "Open", "fullyQualifiedId", "workspace", "Surface", "Project", "position", "isEchoObject", "schema", "getSchema", "t", "useTranslation", "descriptionMessage", "handleSave", "values", "changed", "changedPaths", "Object", "keys", "path", "setValue", "Form", "readonly", "onSave", "autoSave"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/ContactCard.tsx", "../../../src/components/OrganizationCard.tsx", "../../../src/components/ProjectCard.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n Surface,\n contributes,\n createIntent,\n createSurface,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { Filter, fullyQualifiedId, getSchema, getSpace, isEchoObject, type AnyLiveObject } from '@dxos/client/echo';\nimport { isInstanceOf, type JsonPath, setValue } from '@dxos/echo-schema';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { Card } from '@dxos/react-ui-stack';\nimport { TableType } from '@dxos/react-ui-table';\nimport { descriptionMessage } from '@dxos/react-ui-theme';\nimport { DataType } from '@dxos/schema';\n\nimport { ContactCard, OrganizationCard, ProjectCard } from '../components';\nimport { PREVIEW_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--contact`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Person } => isInstanceOf(DataType.Person, data.subject),\n component: ({ data, role }) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const handleOrgClick = useCallback(\n async (org: DataType.Organization) => {\n const space = getSpace(org);\n const tablesQuery = await space?.db.query(Filter.type(TableType)).run();\n const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {\n return table.view?.target?.query?.typename === DataType.Organization.typename;\n });\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n options: {\n state: false,\n anchorId: '',\n },\n }),\n );\n if (currentSpaceOrgTable) {\n return dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [fullyQualifiedId(currentSpaceOrgTable)],\n options: { workspace: space?.id },\n }),\n );\n }\n },\n [dispatch],\n );\n return (\n <ContactCard role={role} subject={data.subject} onOrgClick={handleOrgClick}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--organization`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Organization } => isInstanceOf(DataType.Organization, data.subject),\n component: ({ data, role }) => (\n <OrganizationCard role={role} subject={data.subject}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--project`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Project } => isInstanceOf(DataType.Project, data.subject),\n component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,\n }),\n\n //\n // Fallback for any object.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/fallback-popover`,\n role: ['popover', 'card--kanban', 'card'],\n position: 'fallback',\n filter: (data): data is { subject: AnyLiveObject<any> } => isEchoObject(data.subject),\n component: ({ data, role }) => {\n const schema = getSchema(data.subject);\n const { t } = useTranslation(PREVIEW_PLUGIN);\n if (!schema) {\n return <p className={descriptionMessage}>{t('unable to create preview message')}</p>;\n }\n\n const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {\n const changedPaths = Object.keys(changed).filter((path) => changed[path]);\n for (const path of changedPaths) {\n const value = values[path];\n setValue(data.subject, path as JsonPath, value);\n }\n }, []);\n\n return (\n <Card.Container role={role}>\n <Form schema={schema} values={data.subject} readonly={role === 'popover'} onSave={handleSave} autoSave />\n </Card.Container>\n );\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Icon, Avatar, Button } from '@dxos/react-ui';\nimport { Card, cardHeading, cardText } from '@dxos/react-ui-stack';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ContactCard = ({\n children,\n subject: { fullName, image, organization, emails },\n onOrgClick,\n role,\n}: PreviewProps<DataType.Person> & { onOrgClick?: (org: DataType.Organization) => void }) => {\n const organizationName = organization && typeof organization === 'object' ? organization.target?.name : organization;\n return (\n <Card.Container role={role}>\n <Avatar.Root>\n <Card.Text role='group' classNames='grid gap-3 grid-cols-[min-content_1fr]'>\n <Avatar.Content imgSrc={image} icon='ph--user--regular' size={16} hue='neutral' />\n <div role='none' className='bs-min self-center'>\n <Avatar.Label asChild>\n <h2 className={cardHeading}>{fullName}</h2>\n </Avatar.Label>\n </div>\n </Card.Text>\n </Avatar.Root>\n {organizationName && (\n <Card.Chrome>\n {typeof organization === 'object' && onOrgClick ? (\n <Button variant='ghost' classNames='gap-2 text-start' onClick={() => onOrgClick(organization.target!)}>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n <Icon icon='ph--arrow-right--regular' />\n </Button>\n ) : (\n <p className='dx-button gap-2' data-variant='ghost'>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n </p>\n )}\n </Card.Chrome>\n )}\n <dl\n className={mx(\n cardText,\n 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',\n )}\n >\n {emails?.length &&\n emails.map(({ label, value }) => (\n <Fragment key={value}>\n <dt>\n <Icon icon='ph--at--regular' size={5} />\n </dt>\n <dd key={value} className='break-words'>\n {value}\n </dd>\n </Fragment>\n ))}\n </dl>\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const OrganizationCard = ({\n children,\n subject: { name, image, description, website },\n role,\n}: PreviewProps<DataType.Organization>) => {\n return (\n <Card.Container role={role}>\n <Card.Poster alt={name!} {...(image ? { image } : { icon: 'ph--building-office--regular' })} />\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n {website && (\n <Card.Chrome>\n <a\n className='dx-button dx-focus-ring gap-2'\n data-variant='ghost'\n href={website}\n target='_blank'\n rel='noreferrer'\n >\n <Icon icon='ph--link--regular' size={5} classNames='text-subdued' />\n <span className='grow'>{website}</span>\n <Icon icon='ph--arrow-square-out--regular' />\n </a>\n </Card.Chrome>\n )}\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ProjectCard = ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => {\n return (\n <Card.Container role={role}>\n {image && <Card.Poster image={image} alt={name} aspect='auto' />}\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n </Card.Container>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,OAAOA,UAASC,mBAAmB;AAEnC,SACEC,cACAC,cACAC,SACAC,aACAC,cACAC,eACAC,2BACK;AACP,SAASC,QAAQC,kBAAkBC,WAAWC,UAAUC,oBAAwC;AAChG,SAASC,cAA6BC,gBAAgB;AACtD,SAASC,sBAAsB;AAC/B,SAASC,YAAY;AACrB,SAASC,QAAAA,aAAY;AACrB,SAASC,iBAAiB;AAC1B,SAASC,0BAA0B;AACnC,SAASC,gBAAgB;;;;AClBzB,OAAOC,SAASC,gBAAgB;AAEhC,SAASC,MAAMC,QAAQC,cAAc;AACrC,SAASC,MAAMC,aAAaC,gBAAgB;AAC5C,SAASC,UAAU;AAKZ,IAAMC,cAAc,CAAC,EAC1BC,UACAC,SAAS,EAAEC,UAAUC,OAAOC,cAAcC,OAAM,GAChDC,YACAC,KAAI,MACkF;;;AACtF,UAAMC,mBAAmBJ,gBAAgB,OAAOA,iBAAiB,WAAWA,aAAaK,QAAQC,OAAON;AACxG,WACE,sBAAA,cAACO,KAAKC,WAAS;MAACL;OACd,sBAAA,cAACM,OAAOC,MAAI,MACV,sBAAA,cAACH,KAAKI,MAAI;MAACR,MAAK;MAAQS,YAAW;OACjC,sBAAA,cAACH,OAAOI,SAAO;MAACC,QAAQf;MAAOgB,MAAK;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",
|
|
6
|
-
"names": ["React", "useCallback", "Capabilities", "LayoutAction", "Surface", "contributes", "createIntent", "createSurface", "useIntentDispatcher", "Filter", "fullyQualifiedId", "getSchema", "getSpace", "isEchoObject", "isInstanceOf", "setValue", "useTranslation", "Form", "Card", "TableType", "descriptionMessage", "DataType", "React", "Fragment", "Icon", "Avatar", "Button", "Card", "cardHeading", "cardText", "mx", "ContactCard", "children", "subject", "fullName", "image", "organization", "emails", "onOrgClick", "role", "organizationName", "target", "name", "Card", "Container", "Avatar", "Root", "Text", "classNames", "Content", "imgSrc", "icon", "size", "hue", "div", "className", "Label", "asChild", "h2", "cardHeading", "Chrome", "Button", "variant", "onClick", "Icon", "span", "p", "data-variant", "dl", "mx", "cardText", "length", "map", "label", "value", "Fragment", "key", "dt", "dd", "React", "Icon", "Card", "OrganizationCard", "children", "subject", "name", "image", "description", "website", "role", "React", "Card", "Container", "Poster", "alt", "icon", "Heading", "Text", "classNames", "Chrome", "a", "className", "data-variant", "href", "target", "rel", "Icon", "size", "span", "React", "Card", "ProjectCard", "subject", "name", "image", "description", "role", "React", "Card", "Container", "Poster", "alt", "aspect", "Heading", "Text", "classNames", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PREVIEW_PLUGIN", "role", "filter", "data", "isInstanceOf", "DataType", "Person", "subject", "component", "dispatchPromise", "dispatch", "useIntentDispatcher", "handleOrgClick", "useCallback", "org", "space", "getSpace", "tablesQuery", "db", "query", "Filter", "type", "TableType", "run", "currentSpaceOrgTable", "objects", "find", "table", "view", "target", "typename", "Organization", "createIntent", "LayoutAction", "UpdatePopover", "part", "options", "state", "anchorId", "Open", "fullyQualifiedId", "workspace", "React", "ContactCard", "onOrgClick", "Surface", "OrganizationCard", "Project", "ProjectCard", "position", "isEchoObject", "schema", "getSchema", "t", "useTranslation", "p", "className", "descriptionMessage", "handleSave", "values", "changed", "changedPaths", "Object", "keys", "path", "value", "setValue", "Card", "Container", "Form", "readonly", "onSave", "autoSave"]
|
|
7
|
-
}
|