@dxos/plugin-preview 0.8.2 → 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.
Files changed (58) hide show
  1. package/dist/lib/browser/chunk-LFAK2TMG.mjs +14 -0
  2. package/dist/lib/browser/chunk-LFAK2TMG.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +5 -17
  4. package/dist/lib/browser/index.mjs.map +1 -1
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/{preview-popover-S3OY3CFZ.mjs → preview-popover-2AWEEK32.mjs} +13 -9
  7. package/dist/lib/browser/preview-popover-2AWEEK32.mjs.map +7 -0
  8. package/dist/lib/browser/{react-surface-XDHP6EN7.mjs → react-surface-NWPFQYVG.mjs} +53 -72
  9. package/dist/lib/browser/react-surface-NWPFQYVG.mjs.map +7 -0
  10. package/dist/lib/node/{chunk-VFSOM2B4.cjs → chunk-XGHMBEIV.cjs} +6 -24
  11. package/dist/lib/node/chunk-XGHMBEIV.cjs.map +7 -0
  12. package/dist/lib/node/index.cjs +12 -24
  13. package/dist/lib/node/index.cjs.map +1 -1
  14. package/dist/lib/node/meta.json +1 -1
  15. package/dist/lib/node/{preview-popover-GPBOHU5E.cjs → preview-popover-K4E7UEQU.cjs} +16 -12
  16. package/dist/lib/node/preview-popover-K4E7UEQU.cjs.map +7 -0
  17. package/dist/lib/node/{react-surface-CPAQ7ZYR.cjs → react-surface-VV3IADFZ.cjs} +59 -72
  18. package/dist/lib/node/react-surface-VV3IADFZ.cjs.map +7 -0
  19. package/dist/lib/node-esm/chunk-7BPXNL44.mjs +16 -0
  20. package/dist/lib/node-esm/chunk-7BPXNL44.mjs.map +7 -0
  21. package/dist/lib/node-esm/index.mjs +5 -17
  22. package/dist/lib/node-esm/index.mjs.map +1 -1
  23. package/dist/lib/node-esm/meta.json +1 -1
  24. package/dist/lib/node-esm/{preview-popover-EQAEYYDT.mjs → preview-popover-W5FPZQM3.mjs} +13 -9
  25. package/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs.map +7 -0
  26. package/dist/lib/node-esm/{react-surface-QJRHN4PN.mjs → react-surface-5PIIPXEP.mjs} +53 -72
  27. package/dist/lib/node-esm/react-surface-5PIIPXEP.mjs.map +7 -0
  28. package/dist/types/src/Preview.stories.d.ts +14 -27
  29. package/dist/types/src/Preview.stories.d.ts.map +1 -1
  30. package/dist/types/src/capabilities/preview-popover.d.ts.map +1 -1
  31. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  32. package/dist/types/src/components/ContactCard.d.ts +1 -1
  33. package/dist/types/src/components/ContactCard.d.ts.map +1 -1
  34. package/dist/types/src/components/OrganizationCard.d.ts +1 -1
  35. package/dist/types/src/components/OrganizationCard.d.ts.map +1 -1
  36. package/dist/types/src/components/ProjectCard.d.ts +1 -1
  37. package/dist/types/src/components/ProjectCard.d.ts.map +1 -1
  38. package/dist/types/src/types.d.ts +3 -22
  39. package/dist/types/src/types.d.ts.map +1 -1
  40. package/package.json +20 -19
  41. package/src/Preview.stories.tsx +10 -8
  42. package/src/capabilities/preview-popover.ts +9 -5
  43. package/src/capabilities/react-surface.tsx +20 -17
  44. package/src/components/ContactCard.tsx +11 -11
  45. package/src/components/OrganizationCard.tsx +9 -16
  46. package/src/components/ProjectCard.tsx +8 -12
  47. package/src/types.ts +4 -33
  48. package/dist/lib/browser/chunk-B2VK6GFP.mjs +0 -28
  49. package/dist/lib/browser/chunk-B2VK6GFP.mjs.map +0 -7
  50. package/dist/lib/browser/preview-popover-S3OY3CFZ.mjs.map +0 -7
  51. package/dist/lib/browser/react-surface-XDHP6EN7.mjs.map +0 -7
  52. package/dist/lib/node/chunk-VFSOM2B4.cjs.map +0 -7
  53. package/dist/lib/node/preview-popover-GPBOHU5E.cjs.map +0 -7
  54. package/dist/lib/node/react-surface-CPAQ7ZYR.cjs.map +0 -7
  55. package/dist/lib/node-esm/chunk-PYKIS3N7.mjs +0 -30
  56. package/dist/lib/node-esm/chunk-PYKIS3N7.mjs.map +0 -7
  57. package/dist/lib/node-esm/preview-popover-EQAEYYDT.mjs.map +0 -7
  58. package/dist/lib/node-esm/react-surface-QJRHN4PN.mjs.map +0 -7
@@ -1,14 +1,8 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  PREVIEW_PLUGIN,
4
- defaultCard,
5
- kanbanCardWithoutPoster,
6
- meta,
7
- popoverCard,
8
- previewChrome,
9
- previewProse,
10
- previewTitle
11
- } from "./chunk-PYKIS3N7.mjs";
4
+ meta
5
+ } from "./chunk-7BPXNL44.mjs";
12
6
 
13
7
  // packages/plugins/plugin-preview/src/PreviewPlugin.tsx
14
8
  import { Capabilities, Events, contributes, defineModule, definePlugin } from "@dxos/app-framework";
@@ -17,8 +11,8 @@ import { DataType } from "@dxos/schema";
17
11
 
18
12
  // packages/plugins/plugin-preview/src/capabilities/index.ts
19
13
  import { lazy } from "@dxos/app-framework";
20
- var PreviewPopover = lazy(() => import("./preview-popover-EQAEYYDT.mjs"));
21
- var ReactSurface = lazy(() => import("./react-surface-QJRHN4PN.mjs"));
14
+ var PreviewPopover = lazy(() => import("./preview-popover-W5FPZQM3.mjs"));
15
+ var ReactSurface = lazy(() => import("./react-surface-5PIIPXEP.mjs"));
22
16
 
23
17
  // packages/plugins/plugin-preview/src/translations.ts
24
18
  var translations_default = [
@@ -62,12 +56,6 @@ var PreviewPlugin = () => definePlugin(meta, [
62
56
  export {
63
57
  PREVIEW_PLUGIN,
64
58
  PreviewPlugin,
65
- defaultCard,
66
- kanbanCardWithoutPoster,
67
- meta,
68
- popoverCard,
69
- previewChrome,
70
- previewProse,
71
- previewTitle
59
+ meta
72
60
  };
73
61
  //# sourceMappingURL=index.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/PreviewPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
4
4
  "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { DataType } from '@dxos/schema';\n\nimport { PreviewPopover, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\n\nexport const PreviewPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => [contributes(ClientCapabilities.Schema, [DataType.Person, DataType.Organization])],\n }),\n defineModule({\n id: `${meta.id}/module/preview-popover`,\n activatesOn: Events.Startup,\n activate: PreviewPopover,\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const PreviewPopover = lazy(() => import('./preview-popover'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { PREVIEW_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [PREVIEW_PLUGIN]: {\n 'unable to create preview message': 'No preview',\n },\n },\n },\n];\n"],
5
- "mappings": ";;;;;;;;;;;;;AAIA,SAASA,cAAcC,QAAQC,aAAaC,cAAcC,oBAAoB;AAC9E,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,gBAAgB;;;ACFzB,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACD9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,cAAAA,GAAiB;QAChB,oCAAoC;MACtC;IACF;EACF;;;;AFDK,IAAMC,gBAAgB,MAC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C,aAAaC,OAAOc;IACpBZ,UAAUa;EACZ,CAAA;EACAlB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOgB;IACpBd,UAAUe;EACZ,CAAA;CACD;",
6
6
  "names": ["Capabilities", "Events", "contributes", "defineModule", "definePlugin", "ClientCapabilities", "ClientEvents", "DataType", "lazy", "PreviewPopover", "lazy", "ReactSurface", "PREVIEW_PLUGIN", "PreviewPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "DataType", "Person", "Organization", "Startup", "PreviewPopover", "SetupReactSurface", "ReactSurface"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":3596,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8209,"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":9715,"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-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":6173,"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-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":3139,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"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":17294,"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-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"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"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":3141},"packages/plugins/plugin-preview/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-PYKIS3N7.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-EQAEYYDT.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-QJRHN4PN.mjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","defaultCard","kanbanCardWithoutPoster","meta","popoverCard","previewChrome","previewProse","previewTitle"],"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":1994},"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-EQAEYYDT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4304},"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-EQAEYYDT.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":2014}},"bytes":2281},"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-QJRHN4PN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17741},"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-QJRHN4PN.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-PYKIS3N7.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-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-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-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-theme","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":4191},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2972},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1881},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":855}},"bytes":10601},"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-PYKIS3N7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2195},"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-PYKIS3N7.mjs":{"imports":[],"exports":["PREVIEW_PLUGIN","defaultCard","kanbanCardWithoutPoster","meta","popoverCard","previewChrome","previewProse","previewTitle"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216},"packages/plugins/plugin-preview/src/types.ts":{"bytesInOutput":342}},"bytes":935}}}
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}}}
@@ -14,15 +14,19 @@ var customEventOptions = {
14
14
  passive: false
15
15
  };
16
16
  var handlePreviewLookup = async (client, defaultSpace, { ref, label }) => {
17
- const dxn = DXN.parse(ref);
18
- if (!dxn) {
17
+ try {
18
+ const dxn = DXN.parse(ref);
19
+ if (!dxn) {
20
+ return null;
21
+ }
22
+ const object = await resolveRef(client, dxn, defaultSpace);
23
+ return {
24
+ label,
25
+ object
26
+ };
27
+ } catch (err) {
19
28
  return null;
20
29
  }
21
- const object = await resolveRef(client, dxn, defaultSpace);
22
- return {
23
- label,
24
- object
25
- };
26
30
  };
27
31
  var preview_popover_default = (context) => {
28
32
  const handleDxRefTagActivate = async ({ refId, label, trigger }) => {
@@ -54,7 +58,7 @@ var preview_popover_default = (context) => {
54
58
  } else {
55
59
  log.warn("No default view found", void 0, {
56
60
  F: __dxlog_file,
57
- L: 61,
61
+ L: 65,
58
62
  S: void 0,
59
63
  C: (f, a) => f(...a)
60
64
  });
@@ -64,4 +68,4 @@ var preview_popover_default = (context) => {
64
68
  export {
65
69
  preview_popover_default as default
66
70
  };
67
- //# sourceMappingURL=preview-popover-EQAEYYDT.mjs.map
71
+ //# sourceMappingURL=preview-popover-W5FPZQM3.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/preview-popover.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, LayoutAction, contributes, createIntent, type PluginContext } from '@dxos/app-framework';\nimport { addEventListener } from '@dxos/async';\nimport { type Client, resolveRef } from '@dxos/client';\nimport { parseId, type Space } from '@dxos/client/echo';\nimport { DXN } from '@dxos/keys';\nimport { type DxRefTagActivate } from '@dxos/lit-ui';\nimport { log } from '@dxos/log';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { type PreviewLinkRef, type PreviewLinkTarget } from '@dxos/react-ui-editor';\n\nconst customEventOptions = { capture: true, passive: false };\n\nconst handlePreviewLookup = async (\n client: Client,\n defaultSpace: Space,\n { ref, label }: PreviewLinkRef,\n): Promise<PreviewLinkTarget | null> => {\n try {\n const dxn = DXN.parse(ref);\n if (!dxn) {\n return null;\n }\n\n const object = await resolveRef(client, dxn, defaultSpace);\n return { label, object };\n } catch (err) {\n return null;\n }\n};\n\nexport default (context: PluginContext) => {\n // TODO(wittjosiah): Factor out lookup handlers to other plugins to make not ECHO-specific.\n const handleDxRefTagActivate = async ({ refId, label, trigger }: DxRefTagActivate) => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const client = context.getCapability(ClientCapabilities.Client);\n const [layout] = context.getCapabilities(Capabilities.Layout);\n const { spaceId } = parseId(layout.workspace);\n const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;\n const result = await handlePreviewLookup(client, space, { ref: refId, label });\n if (!result) {\n return;\n }\n\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n subject: result.object,\n options: {\n state: true,\n variant: 'virtual',\n anchor: trigger,\n },\n }),\n );\n };\n\n let cleanup: () => void;\n if (document.defaultView) {\n cleanup = addEventListener(document.defaultView, 'dx-ref-tag-activate', handleDxRefTagActivate, customEventOptions);\n } else {\n log.warn('No default view found');\n }\n\n return contributes(Capabilities.Null, null, () => cleanup());\n};\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAcC,cAAcC,aAAaC,oBAAwC;AAC1F,SAASC,wBAAwB;AACjC,SAAsBC,kBAAkB;AACxC,SAASC,eAA2B;AACpC,SAASC,WAAW;AAEpB,SAASC,WAAW;AACpB,SAASC,0BAA0B;;AAGnC,IAAMC,qBAAqB;EAAEC,SAAS;EAAMC,SAAS;AAAM;AAE3D,IAAMC,sBAAsB,OAC1BC,QACAC,cACA,EAAEC,KAAKC,MAAK,MAAkB;AAE9B,MAAI;AACF,UAAMC,MAAMX,IAAIY,MAAMH,GAAAA;AACtB,QAAI,CAACE,KAAK;AACR,aAAO;IACT;AAEA,UAAME,SAAS,MAAMf,WAAWS,QAAQI,KAAKH,YAAAA;AAC7C,WAAO;MAAEE;MAAOG;IAAO;EACzB,SAASC,KAAK;AACZ,WAAO;EACT;AACF;AAEA,IAAA,0BAAe,CAACC,YAAAA;AAEd,QAAMC,yBAAyB,OAAO,EAAEC,OAAOP,OAAOQ,QAAO,MAAoB;AAC/E,UAAM,EAAEC,iBAAiBC,SAAQ,IAAKL,QAAQM,cAAc5B,aAAa6B,gBAAgB;AACzF,UAAMf,SAASQ,QAAQM,cAAcnB,mBAAmBqB,MAAM;AAC9D,UAAM,CAACC,MAAAA,IAAUT,QAAQU,gBAAgBhC,aAAaiC,MAAM;AAC5D,UAAM,EAAEC,QAAO,IAAK5B,QAAQyB,OAAOI,SAAS;AAC5C,UAAMC,SAASF,WAAWpB,OAAOuB,OAAOC,IAAIJ,OAAAA,MAAapB,OAAOuB,OAAOE;AACvE,UAAMC,SAAS,MAAM3B,oBAAoBC,QAAQsB,OAAO;MAAEpB,KAAKQ;MAAOP;IAAM,CAAA;AAC5E,QAAI,CAACuB,QAAQ;AACX;IACF;AAEA,UAAMb,SACJxB,aAAaF,aAAawC,eAAe;MACvCC,MAAM;MACNC,SAASH,OAAOpB;MAChBwB,SAAS;QACPC,OAAO;QACPC,SAAS;QACTC,QAAQtB;MACV;IACF,CAAA,CAAA;EAEJ;AAEA,MAAIuB;AACJ,MAAIC,SAASC,aAAa;AACxBF,cAAU5C,iBAAiB6C,SAASC,aAAa,uBAAuB3B,wBAAwBb,kBAAAA;EAClG,OAAO;AACLF,QAAI2C,KAAK,yBAAA,QAAA;;;;;;EACX;AAEA,SAAOjD,YAAYF,aAAaoD,MAAM,MAAM,MAAMJ,QAAAA,CAAAA;AACpD;",
6
+ "names": ["Capabilities", "LayoutAction", "contributes", "createIntent", "addEventListener", "resolveRef", "parseId", "DXN", "log", "ClientCapabilities", "customEventOptions", "capture", "passive", "handlePreviewLookup", "client", "defaultSpace", "ref", "label", "dxn", "parse", "object", "err", "context", "handleDxRefTagActivate", "refId", "trigger", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "Client", "layout", "getCapabilities", "Layout", "spaceId", "workspace", "space", "spaces", "get", "default", "result", "UpdatePopover", "part", "subject", "options", "state", "variant", "anchor", "cleanup", "document", "defaultView", "warn", "Null"]
7
+ }
@@ -1,21 +1,17 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
- PREVIEW_PLUGIN,
4
- defaultCard,
5
- kanbanCardWithoutPoster,
6
- popoverCard,
7
- previewChrome,
8
- previewProse,
9
- previewTitle
10
- } from "./chunk-PYKIS3N7.mjs";
3
+ PREVIEW_PLUGIN
4
+ } from "./chunk-7BPXNL44.mjs";
11
5
 
12
6
  // packages/plugins/plugin-preview/src/capabilities/react-surface.tsx
13
7
  import React4, { useCallback } from "react";
14
8
  import { Capabilities, LayoutAction, Surface, contributes, createIntent, createSurface, useIntentDispatcher } from "@dxos/app-framework";
15
- import { Filter, fullyQualifiedId, getSchema, getSpace, isEchoObject } from "@dxos/client/echo";
16
- import { isInstanceOf, setValue } from "@dxos/echo-schema";
9
+ import { fullyQualifiedId, getSchema, getSpace } from "@dxos/client/echo";
10
+ import { Obj, Filter } from "@dxos/echo";
11
+ import { setValue } from "@dxos/echo-schema";
17
12
  import { useTranslation } from "@dxos/react-ui";
18
13
  import { Form } from "@dxos/react-ui-form";
14
+ import { Card as Card4, cardSpacing } from "@dxos/react-ui-stack";
19
15
  import { TableType } from "@dxos/react-ui-table";
20
16
  import { descriptionMessage } from "@dxos/react-ui-theme";
21
17
  import { DataType } from "@dxos/schema";
@@ -24,17 +20,17 @@ import { DataType } from "@dxos/schema";
24
20
  import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
25
21
  import React, { Fragment } from "react";
26
22
  import { Icon, Avatar, Button } from "@dxos/react-ui";
23
+ import { Card, cardHeading, cardText } from "@dxos/react-ui-stack";
27
24
  import { mx } from "@dxos/react-ui-theme";
28
- var ContactCard = ({ children, classNames, role, subject: { fullName, image, organization, emails }, onOrgClick }) => {
25
+ var ContactCard = ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role }) => {
29
26
  var _effect = _useSignals();
30
27
  try {
31
28
  const organizationName = organization && typeof organization === "object" ? organization.target?.name : organization;
32
- return /* @__PURE__ */ React.createElement("div", {
33
- role: "none",
34
- className: mx(role === "popover" ? popoverCard : defaultCard, classNames)
35
- }, /* @__PURE__ */ React.createElement(Avatar.Root, null, /* @__PURE__ */ React.createElement("div", {
29
+ return /* @__PURE__ */ React.createElement(Card.Container, {
30
+ role
31
+ }, /* @__PURE__ */ React.createElement(Avatar.Root, null, /* @__PURE__ */ React.createElement(Card.Text, {
36
32
  role: "group",
37
- className: mx(previewProse, "grid gap-3 grid-cols-[min-content_1fr]")
33
+ classNames: "grid gap-3 grid-cols-[min-content_1fr]"
38
34
  }, /* @__PURE__ */ React.createElement(Avatar.Content, {
39
35
  imgSrc: image,
40
36
  icon: "ph--user--regular",
@@ -46,11 +42,8 @@ var ContactCard = ({ children, classNames, role, subject: { fullName, image, org
46
42
  }, /* @__PURE__ */ React.createElement(Avatar.Label, {
47
43
  asChild: true
48
44
  }, /* @__PURE__ */ React.createElement("h2", {
49
- className: previewTitle
50
- }, fullName))))), organizationName && /* @__PURE__ */ React.createElement("div", {
51
- role: "none",
52
- className: previewChrome
53
- }, typeof organization === "object" && onOrgClick ? /* @__PURE__ */ React.createElement(Button, {
45
+ className: cardHeading
46
+ }, fullName))))), organizationName && /* @__PURE__ */ React.createElement(Card.Chrome, null, typeof organization === "object" && onOrgClick ? /* @__PURE__ */ React.createElement(Button, {
54
47
  variant: "ghost",
55
48
  classNames: "gap-2 text-start",
56
49
  onClick: () => onOrgClick(organization.target)
@@ -72,7 +65,7 @@ var ContactCard = ({ children, classNames, role, subject: { fullName, image, org
72
65
  }), /* @__PURE__ */ React.createElement("span", {
73
66
  className: "min-is-0 flex-1 truncate"
74
67
  }, organizationName))), /* @__PURE__ */ React.createElement("dl", {
75
- className: mx(previewProse, "grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0")
68
+ className: mx(cardText, "grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0")
76
69
  }, emails?.length && emails.map(({ label, value }) => /* @__PURE__ */ React.createElement(Fragment, {
77
70
  key: value
78
71
  }, /* @__PURE__ */ React.createElement("dt", null, /* @__PURE__ */ React.createElement(Icon, {
@@ -91,31 +84,22 @@ var ContactCard = ({ children, classNames, role, subject: { fullName, image, org
91
84
  import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
92
85
  import React2 from "react";
93
86
  import { Icon as Icon2 } from "@dxos/react-ui";
94
- import { mx as mx2 } from "@dxos/react-ui-theme";
95
- var OrganizationCard = ({ children, classNames, subject: { name, image, description, website }, role }) => {
87
+ import { Card as Card2 } from "@dxos/react-ui-stack";
88
+ var OrganizationCard = ({ children, subject: { name, image, description, website }, role }) => {
96
89
  var _effect = _useSignals2();
97
90
  try {
98
- return /* @__PURE__ */ React2.createElement("div", {
99
- role: "none",
100
- className: mx2(role === "popover" ? popoverCard : defaultCard, classNames)
101
- }, image ? /* @__PURE__ */ React2.createElement("img", {
102
- className: "aspect-video object-cover is-full bs-auto",
103
- src: image,
104
- alt: name
105
- }) : /* @__PURE__ */ React2.createElement("div", {
106
- role: "image",
107
- className: "grid aspect-video place-items-center bg-inputSurface text-subdued"
108
- }, /* @__PURE__ */ React2.createElement(Icon2, {
109
- icon: "ph--building-office--regular",
110
- size: 10
111
- })), /* @__PURE__ */ React2.createElement("h2", {
112
- className: mx2(previewTitle, previewProse)
113
- }, name), description && /* @__PURE__ */ React2.createElement("p", {
114
- className: mx2(previewProse, "line-clamp-2")
115
- }, description), website && /* @__PURE__ */ React2.createElement("div", {
116
- role: "none",
117
- className: previewChrome
118
- }, /* @__PURE__ */ React2.createElement("a", {
91
+ return /* @__PURE__ */ React2.createElement(Card2.Container, {
92
+ role
93
+ }, /* @__PURE__ */ React2.createElement(Card2.Poster, {
94
+ alt: name,
95
+ ...image ? {
96
+ image
97
+ } : {
98
+ icon: "ph--building-office--regular"
99
+ }
100
+ }), /* @__PURE__ */ React2.createElement(Card2.Heading, null, name), description && /* @__PURE__ */ React2.createElement(Card2.Text, {
101
+ classNames: "line-clamp-2"
102
+ }, description), website && /* @__PURE__ */ React2.createElement(Card2.Chrome, null, /* @__PURE__ */ React2.createElement("a", {
119
103
  className: "dx-button dx-focus-ring gap-2",
120
104
  "data-variant": "ghost",
121
105
  href: website,
@@ -138,21 +122,18 @@ var OrganizationCard = ({ children, classNames, subject: { name, image, descript
138
122
  // packages/plugins/plugin-preview/src/components/ProjectCard.tsx
139
123
  import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
140
124
  import React3 from "react";
141
- import { mx as mx3 } from "@dxos/react-ui-theme";
142
- var ProjectCard = ({ classNames, role, subject: { name, image, description } }) => {
125
+ import { Card as Card3 } from "@dxos/react-ui-stack";
126
+ var ProjectCard = ({ subject: { name, image, description }, role }) => {
143
127
  var _effect = _useSignals3();
144
128
  try {
145
- return /* @__PURE__ */ React3.createElement("div", {
146
- role: "none",
147
- className: mx3(role === "popover" ? popoverCard : defaultCard, classNames)
148
- }, image && /* @__PURE__ */ React3.createElement("img", {
149
- className: "is-full bs-auto",
150
- src: image,
151
- alt: name
152
- }), /* @__PURE__ */ React3.createElement("h2", {
153
- className: mx3(previewTitle, "pli-3 mlb-3")
154
- }, name), description && /* @__PURE__ */ React3.createElement("p", {
155
- className: "pli-3 line-clamp-2 mlb-3"
129
+ return /* @__PURE__ */ React3.createElement(Card3.Container, {
130
+ role
131
+ }, image && /* @__PURE__ */ React3.createElement(Card3.Poster, {
132
+ image,
133
+ alt: name,
134
+ aspect: "auto"
135
+ }), /* @__PURE__ */ React3.createElement(Card3.Heading, null, name), description && /* @__PURE__ */ React3.createElement(Card3.Text, {
136
+ classNames: "line-clamp-2"
156
137
  }, description));
157
138
  } finally {
158
139
  _effect.f();
@@ -171,7 +152,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
171
152
  "card--kanban",
172
153
  "card"
173
154
  ],
174
- filter: (data) => isInstanceOf(DataType.Person, data.subject),
155
+ filter: (data) => Obj.instanceOf(DataType.Person, data.subject),
175
156
  component: ({ data, role }) => {
176
157
  const { dispatchPromise: dispatch } = useIntentDispatcher();
177
158
  const handleOrgClick = useCallback(async (org) => {
@@ -202,9 +183,9 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
202
183
  dispatch
203
184
  ]);
204
185
  return /* @__PURE__ */ React4.createElement(ContactCard, {
186
+ role,
205
187
  subject: data.subject,
206
- onOrgClick: handleOrgClick,
207
- role
188
+ onOrgClick: handleOrgClick
208
189
  }, role === "popover" && /* @__PURE__ */ React4.createElement(Surface, {
209
190
  role: "related",
210
191
  data
@@ -218,10 +199,10 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
218
199
  "card--kanban",
219
200
  "card"
220
201
  ],
221
- filter: (data) => isInstanceOf(DataType.Organization, data.subject),
202
+ filter: (data) => Obj.instanceOf(DataType.Organization, data.subject),
222
203
  component: ({ data, role }) => /* @__PURE__ */ React4.createElement(OrganizationCard, {
223
- subject: data.subject,
224
- role
204
+ role,
205
+ subject: data.subject
225
206
  }, role === "popover" && /* @__PURE__ */ React4.createElement(Surface, {
226
207
  role: "related",
227
208
  data
@@ -234,7 +215,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
234
215
  "card--kanban",
235
216
  "card"
236
217
  ],
237
- filter: (data) => isInstanceOf(DataType.Project, data.subject),
218
+ filter: (data) => Obj.instanceOf(DataType.Project, data.subject),
238
219
  component: ({ data, role }) => /* @__PURE__ */ React4.createElement(ProjectCard, {
239
220
  subject: data.subject,
240
221
  role
@@ -251,7 +232,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
251
232
  "card"
252
233
  ],
253
234
  position: "fallback",
254
- filter: (data) => isEchoObject(data.subject),
235
+ filter: (data) => Obj.isObject(data.subject),
255
236
  component: ({ data, role }) => {
256
237
  const schema = getSchema(data.subject);
257
238
  const { t } = useTranslation(PREVIEW_PLUGIN);
@@ -267,20 +248,20 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
267
248
  setValue(data.subject, path, value);
268
249
  }
269
250
  }, []);
270
- return /* @__PURE__ */ React4.createElement(Form, {
251
+ return /* @__PURE__ */ React4.createElement(Card4.Container, {
252
+ role
253
+ }, /* @__PURE__ */ React4.createElement(Form, {
271
254
  schema,
272
255
  values: data.subject,
273
256
  readonly: role === "popover",
274
257
  onSave: handleSave,
275
258
  autoSave: true,
276
- ...role === "card--kanban" && {
277
- classNames: kanbanCardWithoutPoster
278
- }
279
- });
259
+ classNames: cardSpacing
260
+ }));
280
261
  }
281
262
  })
282
263
  ]);
283
264
  export {
284
265
  react_surface_default as default
285
266
  };
286
- //# sourceMappingURL=react-surface-QJRHN4PN.mjs.map
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,SA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IAAAA,CAAK;AACxE,mBAAWA,QAAQH,cAAc;AAC/B,gBAAMI,QAAQN,OAAOK,IAAAA;AACrBE,mBAAShE,KAAKK,SAASyD,MAAkBC,KAAAA;QAC3C;MACF,GAAG,CAAA,CAAE;AAEL,aACE,gBAAAvB,OAAA,cAACyB,MAAKC,WAAS;QAACpE;SACd,gBAAA0C,OAAA,cAAC2B,MAAAA;QACClB;QACAQ,QAAQzD,KAAKK;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
+ }
@@ -2,10 +2,9 @@ import '@dxos-theme';
2
2
  import { type Meta } from '@storybook/react';
3
3
  import React, { type FC } from 'react';
4
4
  import { DataType } from '@dxos/schema';
5
+ import { type PreviewProps } from './types';
5
6
  type StoryProps = {
6
- Component: FC<{
7
- subject: any;
8
- }>;
7
+ Component: FC<PreviewProps<any>>;
9
8
  icon: string;
10
9
  subject: any;
11
10
  };
@@ -13,11 +12,11 @@ declare const meta: Meta<StoryProps>;
13
12
  export default meta;
14
13
  export declare const ContactWithImage: {
15
14
  args: {
16
- Component: ({ children, classNames, role, subject: { fullName, image, organization, emails }, onOrgClick, }: import("./types").PreviewProps<DataType.Person> & {
15
+ Component: ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role, }: PreviewProps<DataType.Person> & {
17
16
  onOrgClick?: (org: DataType.Organization) => void;
18
17
  }) => React.JSX.Element;
19
18
  icon: string;
20
- subject: Omit<{
19
+ subject: import("@dxos/live-object").Live<{
21
20
  readonly id: string;
22
21
  fields?: {
23
22
  readonly label: string;
@@ -68,17 +67,13 @@ export declare const ContactWithImage: {
68
67
  readonly value: string;
69
68
  }[] | undefined;
70
69
  birthday?: string | undefined;
71
- }, "id"> & {
72
- id?: string;
73
- } & {
74
- id: string;
75
- };
70
+ }>;
76
71
  role: string;
77
72
  };
78
73
  };
79
74
  export declare const ContactNoImage: {
80
75
  args: {
81
- Component: ({ children, classNames, role, subject: { fullName, image, organization, emails }, onOrgClick, }: import("./types").PreviewProps<DataType.Person> & {
76
+ Component: ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role, }: PreviewProps<DataType.Person> & {
82
77
  onOrgClick?: (org: DataType.Organization) => void;
83
78
  }) => React.JSX.Element;
84
79
  icon: string;
@@ -88,26 +83,22 @@ export declare const ContactNoImage: {
88
83
  };
89
84
  export declare const OrganizationWithImage: {
90
85
  args: {
91
- Component: ({ children, classNames, subject: { name, image, description, website }, role, }: import("./types").PreviewProps<DataType.Organization>) => React.JSX.Element;
86
+ Component: ({ children, subject: { name, image, description, website }, role, }: PreviewProps<DataType.Organization>) => React.JSX.Element;
92
87
  icon: string;
93
- subject: Omit<{
88
+ subject: import("@dxos/live-object").Live<{
94
89
  readonly id: string;
95
90
  image?: string | undefined;
96
91
  status?: "active" | "prospect" | "qualified" | "commit" | "reject" | undefined;
97
92
  name?: string | undefined;
98
93
  description?: string | undefined;
99
94
  website?: string | undefined;
100
- }, "id"> & {
101
- id?: string;
102
- } & {
103
- id: string;
104
- };
95
+ }>;
105
96
  role: string;
106
97
  };
107
98
  };
108
99
  export declare const OrganizationNoImage: {
109
100
  args: {
110
- Component: ({ children, classNames, subject: { name, image, description, website }, role, }: import("./types").PreviewProps<DataType.Organization>) => React.JSX.Element;
101
+ Component: ({ children, subject: { name, image, description, website }, role, }: PreviewProps<DataType.Organization>) => React.JSX.Element;
111
102
  icon: string;
112
103
  subject: any;
113
104
  role: string;
@@ -115,24 +106,20 @@ export declare const OrganizationNoImage: {
115
106
  };
116
107
  export declare const ProjectWithImage: {
117
108
  args: {
118
- Component: ({ classNames, role, subject: { name, image, description }, }: import("./types").PreviewProps<DataType.Project>) => React.JSX.Element;
109
+ Component: ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => React.JSX.Element;
119
110
  icon: string;
120
- subject: Omit<{
111
+ subject: import("@dxos/live-object").Live<{
121
112
  readonly id: string;
122
113
  image?: string | undefined;
123
114
  name: string;
124
115
  description?: string | undefined;
125
- }, "id"> & {
126
- id?: string;
127
- } & {
128
- id: string;
129
- };
116
+ }>;
130
117
  role: string;
131
118
  };
132
119
  };
133
120
  export declare const ProjectNoImage: {
134
121
  args: {
135
- Component: ({ classNames, role, subject: { name, image, description }, }: import("./types").PreviewProps<DataType.Project>) => React.JSX.Element;
122
+ Component: ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => React.JSX.Element;
136
123
  icon: string;
137
124
  subject: any;
138
125
  role: string;
@@ -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;AAMvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAQxC,KAAK,UAAU,GAAG;IAChB,SAAS,EAAE,EAAE,CAAC;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAoB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AA2CpB,eAAO,MAAM,gBAAgB;;;sBA3ElB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFX,CAAC;AAEF,eAAO,MAAM,cAAc;;;sBApFhB,CAAC;;;;;;CA2FX,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
+ {"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":"preview-popover.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/preview-popover.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyD,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;yBA0BhG,SAAS,aAAa;AAAtC,wBAkCE"}
1
+ {"version":3,"file":"preview-popover.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/preview-popover.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyD,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;yBA8BhG,SAAS,aAAa;AAAtC,wBAkCE"}
@@ -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;;AAa7B,wBAkGK"}
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"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type DataType } from '@dxos/schema';
3
3
  import { type PreviewProps } from '../types';
4
- export declare const ContactCard: ({ children, classNames, role, subject: { fullName, image, organization, emails }, onOrgClick, }: PreviewProps<DataType.Person> & {
4
+ export declare const ContactCard: ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role, }: PreviewProps<DataType.Person> & {
5
5
  onOrgClick?: (org: DataType.Organization) => void;
6
6
  }) => React.JSX.Element;
7
7
  //# sourceMappingURL=ContactCard.d.ts.map