@dxos/plugin-preview 0.8.4-staging.60fe92afc8 → 0.9.1-main.c7dcc2e112

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 (50) hide show
  1. package/dist/lib/neutral/capabilities/index.mjs +2 -2
  2. package/dist/lib/neutral/chunk-SXDHWUBO.mjs +32 -0
  3. package/dist/lib/neutral/chunk-SXDHWUBO.mjs.map +7 -0
  4. package/dist/lib/neutral/index.mjs +1 -1
  5. package/dist/lib/neutral/meta.json +1 -1
  6. package/dist/lib/neutral/meta.mjs +1 -1
  7. package/dist/lib/neutral/plugin.mjs +1 -1
  8. package/dist/lib/neutral/{preview-popover-FLMYMFCH.mjs → preview-popover-KTNVSMHZ.mjs} +4 -4
  9. package/dist/lib/neutral/preview-popover-KTNVSMHZ.mjs.map +7 -0
  10. package/dist/lib/neutral/{react-surface-FE7E2JP7.mjs → react-surface-6SBWLXAY.mjs} +69 -47
  11. package/dist/lib/neutral/react-surface-6SBWLXAY.mjs.map +7 -0
  12. package/dist/lib/neutral/translations.mjs +1 -1
  13. package/dist/lib/neutral/translations.mjs.map +3 -3
  14. package/dist/types/dx.config.d.ts +28 -0
  15. package/dist/types/dx.config.d.ts.map +1 -0
  16. package/dist/types/src/capabilities/index.d.ts +2 -2
  17. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  18. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  19. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  20. package/dist/types/src/cards/FormCard.d.ts +2 -2
  21. package/dist/types/src/cards/FormCard.d.ts.map +1 -1
  22. package/dist/types/src/cards/JsonCard.d.ts.map +1 -1
  23. package/dist/types/src/cards/OrganizationCard.d.ts.map +1 -1
  24. package/dist/types/src/cards/PersonCard.d.ts.map +1 -1
  25. package/dist/types/src/cards/ProjectCard.d.ts.map +1 -1
  26. package/dist/types/src/meta.d.ts +28 -2
  27. package/dist/types/src/meta.d.ts.map +1 -1
  28. package/dist/types/src/stories/Card.stories.d.ts +4 -6
  29. package/dist/types/src/stories/Card.stories.d.ts.map +1 -1
  30. package/dist/types/src/stories/testing.d.ts +2 -1
  31. package/dist/types/src/stories/testing.d.ts.map +1 -1
  32. package/dist/types/tsconfig.tsbuildinfo +1 -1
  33. package/dx.config.ts +21 -0
  34. package/package.json +25 -24
  35. package/src/PreviewPlugin.test.ts +1 -1
  36. package/src/capabilities/preview-popover.ts +3 -3
  37. package/src/capabilities/react-surface.tsx +15 -18
  38. package/src/cards/FormCard.tsx +17 -6
  39. package/src/cards/JsonCard.tsx +23 -8
  40. package/src/cards/OrganizationCard.tsx +1 -5
  41. package/src/cards/PersonCard.tsx +26 -21
  42. package/src/cards/ProjectCard.tsx +5 -1
  43. package/src/meta.ts +3 -14
  44. package/src/stories/Card.stories.tsx +16 -35
  45. package/src/stories/testing.tsx +5 -0
  46. package/src/translations.ts +1 -1
  47. package/dist/lib/neutral/chunk-QOM5APM7.mjs +0 -23
  48. package/dist/lib/neutral/chunk-QOM5APM7.mjs.map +0 -7
  49. package/dist/lib/neutral/preview-popover-FLMYMFCH.mjs.map +0 -7
  50. package/dist/lib/neutral/react-surface-FE7E2JP7.mjs.map +0 -7
@@ -1,7 +1,7 @@
1
1
  // src/capabilities/index.ts
2
2
  import { Capability } from "@dxos/app-framework";
3
- var PreviewPopover = Capability.lazy("PreviewPopover", () => import("../preview-popover-FLMYMFCH.mjs"));
4
- var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-FE7E2JP7.mjs"));
3
+ var PreviewPopover = Capability.lazy("PreviewPopover", () => import("../preview-popover-KTNVSMHZ.mjs"));
4
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-6SBWLXAY.mjs"));
5
5
  export {
6
6
  PreviewPopover,
7
7
  ReactSurface
@@ -0,0 +1,32 @@
1
+ // src/meta.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+
4
+ // dx.config.ts
5
+ import { Config2 } from "@dxos/app-framework/config";
6
+ import { trim } from "@dxos/util";
7
+ var dx_config_default = Config2.make({
8
+ plugin: {
9
+ key: "org.dxos.plugin.preview",
10
+ name: "Preview",
11
+ author: "DXOS",
12
+ description: trim`
13
+ Rich preview panel for viewing object content without opening full editors.
14
+ Quick peek at documents, images, and data with inline rendering.
15
+ `,
16
+ icon: {
17
+ key: "ph--eye--regular"
18
+ },
19
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview",
20
+ tags: [
21
+ "system"
22
+ ]
23
+ }
24
+ });
25
+
26
+ // src/meta.ts
27
+ var meta = Plugin.getMetaFromConfig(dx_config_default);
28
+
29
+ export {
30
+ meta
31
+ };
32
+ //# sourceMappingURL=chunk-SXDHWUBO.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.preview',\n name: 'Preview',\n author: 'DXOS',\n description: trim`\n Rich preview panel for viewing object content without opening full editors.\n Quick peek at documents, images, and data with inline rendering.\n `,\n icon: { key: 'ph--eye--regular' },\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview',\n tags: ['system'],\n },\n});\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;IAIbO,MAAM;MAAEJ,KAAK;IAAmB;IAChCK,QAAQ;IACRC,MAAM;MAAC;;EACT;AACF,CAAA;;;ADZO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;",
6
+ "names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "icon", "source", "tags", "meta", "Plugin", "getMetaFromConfig", "config"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-QOM5APM7.mjs";
3
+ } from "./chunk-SXDHWUBO.mjs";
4
4
  export {
5
5
  meta
6
6
  };
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":2096,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":368,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/PreviewPlugin.tsx":{"bytes":3129,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/PreviewPlugin.node.ts":{"bytes":1738,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/PreviewPlugin.workerd.ts":{"bytes":1742,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/preview-popover.ts":{"bytes":14777,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/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},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/ExpandoCard.tsx":{"bytes":8147,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true}],"format":"esm"},"src/cards/FormCard.tsx":{"bytes":14994,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"@dxos/effect","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":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/cards/JsonCard.tsx":{"bytes":1589,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true}],"format":"esm"},"src/cards/OrganizationCard.tsx":{"bytes":2939,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/PersonCard.tsx":{"bytes":7865,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/ProjectCard.tsx":{"bytes":2313,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/TaskCard.tsx":{"bytes":5515,"imports":[{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/cards/index.ts":{"bytes":948,"imports":[{"path":"src/cards/ExpandoCard.tsx","kind":"import-statement","original":"./ExpandoCard"},{"path":"src/cards/FormCard.tsx","kind":"import-statement","original":"./FormCard"},{"path":"src/cards/JsonCard.tsx","kind":"import-statement","original":"./JsonCard"},{"path":"src/cards/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"src/cards/PersonCard.tsx","kind":"import-statement","original":"./PersonCard"},{"path":"src/cards/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"},{"path":"src/cards/TaskCard.tsx","kind":"import-statement","original":"./TaskCard"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":18734,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"src/cards/index.ts","kind":"import-statement","original":"../cards"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1152,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/plugin.ts":{"bytes":860,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/testing.ts":{"bytes":665,"imports":[{"path":"src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"},"src/translations.ts":{"bytes":1809,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/neutral/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":888},"dist/lib/neutral/translations.mjs":{"imports":[{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":408}},"bytes":500},"dist/lib/neutral/preview-popover-FLMYMFCH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6763},"dist/lib/neutral/preview-popover-FLMYMFCH.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/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},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/preview-popover.ts","inputs":{"src/capabilities/preview-popover.ts":{"bytesInOutput":2951}},"bytes":3093},"dist/lib/neutral/react-surface-FE7E2JP7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":31564},"dist/lib/neutral/react-surface-FE7E2JP7.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","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":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"@dxos/effect","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":"#meta","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-syntax-highlighter","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":4659},"src/cards/ExpandoCard.tsx":{"bytesInOutput":1788},"src/cards/index.ts":{"bytesInOutput":0},"src/cards/FormCard.tsx":{"bytesInOutput":2991},"src/cards/JsonCard.tsx":{"bytesInOutput":419},"src/cards/OrganizationCard.tsx":{"bytesInOutput":724},"src/cards/PersonCard.tsx":{"bytesInOutput":2060},"src/cards/ProjectCard.tsx":{"bytesInOutput":514},"src/cards/TaskCard.tsx":{"bytesInOutput":1125}},"bytes":14661},"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-QOM5APM7.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":101},"dist/lib/neutral/PreviewPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/PreviewPlugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-3SWUVHXJ.mjs","kind":"import-statement"}],"exports":["PreviewPlugin","default"],"entryPoint":"src/PreviewPlugin.tsx","inputs":{},"bytes":188},"dist/lib/neutral/PreviewPlugin.node.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":894},"dist/lib/neutral/PreviewPlugin.node.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["PreviewPlugin","default"],"entryPoint":"src/PreviewPlugin.node.ts","inputs":{"src/PreviewPlugin.node.ts":{"bytesInOutput":379}},"bytes":525},"dist/lib/neutral/PreviewPlugin.workerd.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":897},"dist/lib/neutral/PreviewPlugin.workerd.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["PreviewPlugin","default"],"entryPoint":"src/PreviewPlugin.workerd.ts","inputs":{"src/PreviewPlugin.workerd.ts":{"bytesInOutput":382}},"bytes":537},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":610},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/preview-popover-FLMYMFCH.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-surface-FE7E2JP7.mjs","kind":"dynamic-import"}],"exports":["PreviewPopover","ReactSurface"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":254}},"bytes":363},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-QOM5APM7.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":100},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":443},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-QOM5APM7.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["PreviewPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":110}},"bytes":239},"dist/lib/neutral/chunk-QOM5APM7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1029},"dist/lib/neutral/chunk-QOM5APM7.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":543}},"bytes":622},"dist/lib/neutral/testing.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/testing.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-3SWUVHXJ.mjs","kind":"import-statement"}],"exports":["PreviewPlugin"],"entryPoint":"src/testing.ts","inputs":{"src/testing.ts":{"bytesInOutput":0}},"bytes":121},"dist/lib/neutral/chunk-3SWUVHXJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1643},"dist/lib/neutral/chunk-3SWUVHXJ.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"exports":["PreviewPlugin","PreviewPlugin_default"],"inputs":{"src/PreviewPlugin.tsx":{"bytesInOutput":727}},"bytes":850}}}
1
+ {"inputs":{"dx.config.ts":{"bytes":2107,"imports":[{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/meta.ts":{"bytes":799,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dx.config.ts","kind":"import-statement","original":"../dx.config"}],"format":"esm"},"src/index.ts":{"bytes":368,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/PreviewPlugin.tsx":{"bytes":3129,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/PreviewPlugin.node.ts":{"bytes":1738,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/PreviewPlugin.workerd.ts":{"bytes":1742,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/preview-popover.ts":{"bytes":14815,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/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},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/ExpandoCard.tsx":{"bytes":8147,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true}],"format":"esm"},"src/cards/FormCard.tsx":{"bytes":15993,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"@dxos/effect","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":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/cards/JsonCard.tsx":{"bytes":3779,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true}],"format":"esm"},"src/cards/OrganizationCard.tsx":{"bytes":2557,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/PersonCard.tsx":{"bytes":8309,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/ProjectCard.tsx":{"bytes":2488,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/TaskCard.tsx":{"bytes":5515,"imports":[{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/cards/index.ts":{"bytes":948,"imports":[{"path":"src/cards/ExpandoCard.tsx","kind":"import-statement","original":"./ExpandoCard"},{"path":"src/cards/FormCard.tsx","kind":"import-statement","original":"./FormCard"},{"path":"src/cards/JsonCard.tsx","kind":"import-statement","original":"./JsonCard"},{"path":"src/cards/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"src/cards/PersonCard.tsx","kind":"import-statement","original":"./PersonCard"},{"path":"src/cards/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"},{"path":"src/cards/TaskCard.tsx","kind":"import-statement","original":"./TaskCard"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":18646,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"src/cards/index.ts","kind":"import-statement","original":"../cards"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1152,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/plugin.ts":{"bytes":860,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/testing.ts":{"bytes":665,"imports":[{"path":"src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"},"src/translations.ts":{"bytes":1862,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/neutral/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":916},"dist/lib/neutral/translations.mjs":{"imports":[{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":417}},"bytes":509},"dist/lib/neutral/preview-popover-KTNVSMHZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6742},"dist/lib/neutral/preview-popover-KTNVSMHZ.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/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},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/preview-popover.ts","inputs":{"src/capabilities/preview-popover.ts":{"bytesInOutput":2945}},"bytes":3087},"dist/lib/neutral/react-surface-6SBWLXAY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":33256},"dist/lib/neutral/react-surface-6SBWLXAY.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","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":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-react","kind":"import-statement","external":true},{"path":"@dxos/effect","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":"#meta","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-syntax-highlighter","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":4695},"src/cards/ExpandoCard.tsx":{"bytesInOutput":1788},"src/cards/index.ts":{"bytesInOutput":0},"src/cards/FormCard.tsx":{"bytesInOutput":3192},"src/cards/JsonCard.tsx":{"bytesInOutput":948},"src/cards/OrganizationCard.tsx":{"bytesInOutput":615},"src/cards/PersonCard.tsx":{"bytesInOutput":2230},"src/cards/ProjectCard.tsx":{"bytesInOutput":569},"src/cards/TaskCard.tsx":{"bytesInOutput":1125}},"bytes":15543},"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-SXDHWUBO.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":101},"dist/lib/neutral/PreviewPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/PreviewPlugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-3SWUVHXJ.mjs","kind":"import-statement"}],"exports":["PreviewPlugin","default"],"entryPoint":"src/PreviewPlugin.tsx","inputs":{},"bytes":188},"dist/lib/neutral/PreviewPlugin.node.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":894},"dist/lib/neutral/PreviewPlugin.node.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["PreviewPlugin","default"],"entryPoint":"src/PreviewPlugin.node.ts","inputs":{"src/PreviewPlugin.node.ts":{"bytesInOutput":379}},"bytes":525},"dist/lib/neutral/PreviewPlugin.workerd.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":897},"dist/lib/neutral/PreviewPlugin.workerd.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["PreviewPlugin","default"],"entryPoint":"src/PreviewPlugin.workerd.ts","inputs":{"src/PreviewPlugin.workerd.ts":{"bytesInOutput":382}},"bytes":537},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":610},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/preview-popover-KTNVSMHZ.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-surface-6SBWLXAY.mjs","kind":"dynamic-import"}],"exports":["PreviewPopover","ReactSurface"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":254}},"bytes":363},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-SXDHWUBO.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":100},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":443},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-SXDHWUBO.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["PreviewPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":110}},"bytes":239},"dist/lib/neutral/chunk-SXDHWUBO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1343},"dist/lib/neutral/chunk-SXDHWUBO.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":102},"dx.config.ts":{"bytesInOutput":576}},"bytes":790},"dist/lib/neutral/testing.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/testing.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-3SWUVHXJ.mjs","kind":"import-statement"}],"exports":["PreviewPlugin"],"entryPoint":"src/testing.ts","inputs":{"src/testing.ts":{"bytesInOutput":0}},"bytes":121},"dist/lib/neutral/chunk-3SWUVHXJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1643},"dist/lib/neutral/chunk-3SWUVHXJ.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"exports":["PreviewPlugin","PreviewPlugin_default"],"inputs":{"src/PreviewPlugin.tsx":{"bytesInOutput":727}},"bytes":850}}}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-QOM5APM7.mjs";
3
+ } from "./chunk-SXDHWUBO.mjs";
4
4
  export {
5
5
  meta
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-QOM5APM7.mjs";
3
+ } from "./chunk-SXDHWUBO.mjs";
4
4
 
5
5
  // src/plugin.ts
6
6
  import { Plugin } from "@dxos/app-framework";
@@ -1,7 +1,7 @@
1
1
  // src/capabilities/preview-popover.ts
2
2
  import * as Effect from "effect/Effect";
3
3
  import { Capabilities, Capability } from "@dxos/app-framework";
4
- import { AppCapabilities, LayoutOperation, getPersonalSpace, getSpaceIdFromPath } from "@dxos/app-toolkit";
4
+ import { AppCapabilities, AppSpace, LayoutOperation, Paths } from "@dxos/app-toolkit";
5
5
  import { addEventListener } from "@dxos/async";
6
6
  import { Obj } from "@dxos/echo";
7
7
  import { EID } from "@dxos/keys";
@@ -42,8 +42,8 @@ var preview_popover_default = Capability.makeModule(Effect.fnUntraced(function*
42
42
  const client = capabilities.get(ClientCapabilities.Client);
43
43
  const registry = capabilities.get(Capabilities.AtomRegistry);
44
44
  const [layoutAtom] = capabilities.getAll(AppCapabilities.Layout);
45
- const spaceId = layoutAtom && getSpaceIdFromPath(registry.get(layoutAtom).workspace);
46
- const space = (spaceId && client.spaces.get(spaceId)) ?? getPersonalSpace(client);
45
+ const spaceId = layoutAtom && Paths.getSpaceIdFromPath(registry.get(layoutAtom).workspace);
46
+ const space = (spaceId && client.spaces.get(spaceId)) ?? AppSpace.getPersonalSpace(client);
47
47
  if (!space) {
48
48
  return;
49
49
  }
@@ -91,4 +91,4 @@ var preview_popover_default = Capability.makeModule(Effect.fnUntraced(function*
91
91
  export {
92
92
  preview_popover_default as default
93
93
  };
94
- //# sourceMappingURL=preview-popover-FLMYMFCH.mjs.map
94
+ //# sourceMappingURL=preview-popover-KTNVSMHZ.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 * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppSpace, LayoutOperation, Paths } from '@dxos/app-toolkit';\nimport { addEventListener } from '@dxos/async';\nimport { type Client } from '@dxos/client';\nimport { type Space } from '@dxos/client/echo';\nimport { Obj } from '@dxos/echo';\nimport { EID } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { DX_ANCHOR_ACTIVATE, type DxAnchorActivate } from '@dxos/react-ui';\nimport { type PreviewLinkRef, type PreviewLinkTarget } from '@dxos/ui-editor';\n\nconst customEventOptions = { capture: true, passive: false };\n\nconst handlePreviewLookup = async (\n client: Client,\n defaultSpace: Space,\n { dxn, label }: PreviewLinkRef,\n): Promise<PreviewLinkTarget | null> => {\n try {\n const object = await defaultSpace.db.makeRef(EID.parse(dxn)).load();\n return { label, object };\n } catch {\n return null;\n }\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n // Get context for lazy capability access in callbacks.\n const capabilities = yield* Capability.Service;\n\n // TODO(wittjosiah): Factor out lookup handlers to other plugins to make not ECHO-specific.\n // Monotonic activation token: each invocation captures its own sequence; only the\n // most recent activation is allowed to commit popover state. Prevents a slow\n // open (async lookup) from clobbering a later close that fires while it's in flight.\n let activationSequence = 0;\n const handleAnchorActivate = async ({\n dxn,\n label,\n trigger,\n kind = 'card',\n title: titleProp,\n side,\n props,\n state,\n }: DxAnchorActivate) => {\n const sequence = ++activationSequence;\n const { invokePromise } = capabilities.get(Capabilities.OperationInvoker);\n\n // Explicit close: callers pass `state: false` on pointer-leave to dismiss\n // the popover. Operation schema requires anchor + kind, so use placeholders;\n // they're overwritten in ephemeral state but only `state` is read by the UI.\n if (state === false) {\n await invokePromise(LayoutOperation.UpdatePopover, {\n variant: 'virtual',\n anchor: trigger,\n kind: 'base',\n state: false,\n });\n return;\n }\n\n const client = capabilities.get(ClientCapabilities.Client);\n const registry = capabilities.get(Capabilities.AtomRegistry);\n // Layout is optional: in standalone harnesses (Storybook, tests) no plugin contributes\n // `AppCapabilities.Layout`, and `getAll` returns an empty array. Reading `registry.get(undefined)`\n // would crash inside Atom's identity check (`'~atom/Serializable' in undefined`). When layout\n // isn't available, fall through to the personal-space default.\n const [layoutAtom] = capabilities.getAll(AppCapabilities.Layout);\n const spaceId = layoutAtom && Paths.getSpaceIdFromPath(registry.get(layoutAtom).workspace);\n const space = (spaceId && client.spaces.get(spaceId)) ?? AppSpace.getPersonalSpace(client);\n if (!space) {\n return;\n }\n const result = await handlePreviewLookup(client, space, { dxn, label });\n if (!result) {\n return;\n }\n // A newer activation (open or close) arrived while the lookup was in flight; bail\n // out so we don't clobber the latest state.\n if (sequence !== activationSequence) {\n return;\n }\n\n const title = titleProp ?? Obj.getLabel(result.object, { fallback: 'typename' });\n\n await invokePromise(LayoutOperation.UpdatePopover, {\n subjectRef: dxn,\n subject: result.object,\n state: true,\n variant: 'virtual',\n anchor: trigger,\n ...(kind && { kind }),\n ...(title && { title }),\n ...(side && { side }),\n ...(props && { props }),\n });\n };\n\n let cleanup: () => void;\n if (document.defaultView) {\n cleanup = addEventListener(\n document.defaultView,\n DX_ANCHOR_ACTIVATE as any,\n handleAnchorActivate,\n customEventOptions,\n );\n } else {\n log.warn('no default view found');\n }\n\n return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cleanup?.()));\n }),\n);\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,UAAUC,iBAAiBC,aAAa;AAClE,SAASC,wBAAwB;AAGjC,SAASC,WAAW;AACpB,SAASC,WAAW;AACpB,SAASC,WAAW;AACpB,SAASC,0BAA0B;AACnC,SAASC,0BAAiD;AAG1D,IAAA,eAAMC;IAAsCC,qBAAS;EAAM,SAAA;EAE3D,SAAMC;;0BAMa,OAAMC,QAAaC,cAAeC,EAAAA,KAAMC,MAAMC,MAAI;MACjE;UAASC,SAAAA,MAAAA,aAAAA,GAAAA,QAAAA,IAAAA,MAAAA,GAAAA,CAAAA,EAAAA,KAAAA;WAAOC;MAAO;MACvB;IACA;EACF,QAAA;AACF,WAAA;EAEA;;IAGI,0BAAMC,WAAe,WAAkBC,kBAAO,aAAA;AAG9C,QAAA,eAAA,OAAA,WAAA;MAcE,qBAAmBC;QACnB,uBAAuB,OAAGF,EAAAA,KAAaG,OAAIzB,SAAAA,OAAa0B,QAAAA,OAAgB,WAAA,MAAA,OAAA,MAAA,MAAA;AAExE,UAAA,WAAA,EAAA;AACA,UAAA,EAAA,cAAA,IAAA,aAAA,IAAA,aAAA,gBAAA;kBAIIC,OAAS;YACTC,cAAQC,gBAAAA,eAAAA;QACRC,SAAM;QACNC,QAAO;QACT,MAAA;QACA,OAAA;MACF,CAAA;AAEA;IACA;AACA,UAAA,SAAA,aAAA,IAAA,mBAAA,MAAA;AACA,UAAA,WAAA,aAAA,IAAA,aAAA,YAAA;AAKA,UAAMC,CAAAA,UAASC,IAAAA,aAAkBC,OAAOT,gBAAiBtB,MAAAA;AACzD,UAAK6B,UAAO,cAAA,MAAA,mBAAA,SAAA,IAAA,UAAA,EAAA,SAAA;UACV,SAAA,WAAA,OAAA,OAAA,IAAA,OAAA,MAAA,SAAA,iBAAA,MAAA;AACF,QAAA,CAAA,OAAA;AACA;;UAA+DZ,SAAAA,MAAAA,oBAAAA,QAAAA,OAAAA;MAAM;MACjE;;AAEJ,QAAA,CAAA,QAAA;AACA;IACA;AAGA,QAAA,aAAA,oBAAA;AAEA;;AAA8E,UAAA,QAAA,aAAA,IAAA,SAAA,OAAA,QAAA;MAE9E,UAAMe;;UAEJC,cAAgBf,gBAAM,eAAA;MACtBU,YAAO;MACPJ,SAAS,OAAA;MACTC,OAAAA;MACA,SAAIE;cAAUA;MAAK,GAAC,QAAA;QAChBO;;MAAiB,GAAC,SAAA;QAClBC;;MAAe,GAAC,QAAA;QAChBC;;MAAiB,GAAC,SAAA;QACxB;MACF;IAEIC,CAAAA;EACJ;MACEA;AAMF,MAAA,SAAO,aAAA;AACL/B,cAAS,iBAAA,SAAA,aAAA,oBAAA,sBAAA,kBAAA;EACX,OAAA;AAEA,QAAOR,KAAAA,yBAAuBD,QAAayC,EAAAA,YAAY,YAAaC,GAAAA,cAAWF,GAAAA,KAAAA,GAAAA,KAAAA,CAAAA;EAEjF;;;",
6
+ "names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "AppSpace", "LayoutOperation", "Paths", "addEventListener", "Obj", "EID", "log", "ClientCapabilities", "DX_ANCHOR_ACTIVATE", "customEventOptions", "passive", "handlePreviewLookup", "defaultSpace", "db", "parse", "dxn", "load", "label", "object", "capabilities", "Service", "activationSequence", "get", "OperationInvoker", "variant", "anchor", "trigger", "kind", "state", "space", "spaceId", "spaces", "invokePromise", "subject", "title", "side", "props", "cleanup", "Null", "sync"]
7
+ }
@@ -76,11 +76,24 @@ import { Card as Card2, Icon, useTranslation } from "@dxos/react-ui";
76
76
  import { Form as Form2, getFormProperties, omitId } from "@dxos/react-ui-form";
77
77
  import { meta } from "#meta";
78
78
  var FormCard = ({ subject, projection, readonly = true, layout }) => {
79
- const { t } = useTranslation(meta.id);
79
+ const { t } = useTranslation(meta.profile.key);
80
80
  const resolvedLayout = layout ?? (readonly ? "static" : "compact");
81
81
  const staticType = Obj2.getType(subject);
82
82
  const db = Obj2.getDatabase(subject);
83
- const runtimeType = useType(db, staticType ? void 0 : Obj2.getTypeURI(subject));
83
+ const fallbackTypeUri = useMemo2(() => {
84
+ if (staticType) {
85
+ return void 0;
86
+ }
87
+ try {
88
+ return Obj2.getTypeURI(subject);
89
+ } catch {
90
+ return void 0;
91
+ }
92
+ }, [
93
+ staticType,
94
+ subject
95
+ ]);
96
+ const runtimeType = useType(db, fallbackTypeUri);
84
97
  const schema = useMemo2(() => {
85
98
  const resolvedType = runtimeType ?? staticType;
86
99
  return resolvedType ? omitId(Type.getSchema(resolvedType)) : void 0;
@@ -147,13 +160,29 @@ var FormCard = ({ subject, projection, readonly = true, layout }) => {
147
160
  };
148
161
 
149
162
  // src/cards/JsonCard.tsx
150
- import React3 from "react";
151
- import { Card as Card3 } from "@dxos/react-ui";
163
+ import React3, { useState } from "react";
164
+ import { Card as Card3, ToggleIconButton } from "@dxos/react-ui";
152
165
  import { JsonHighlighter } from "@dxos/react-ui-syntax-highlighter";
153
166
  var JsonCard = ({ data }) => {
154
- return /* @__PURE__ */ React3.createElement(Card3.Body, null, /* @__PURE__ */ React3.createElement("span", null), /* @__PURE__ */ React3.createElement(JsonHighlighter, {
155
- data
156
- }), /* @__PURE__ */ React3.createElement("span", null));
167
+ const [open, setOpen] = useState(false);
168
+ let collapsedLength = 0;
169
+ try {
170
+ collapsedLength = JSON.stringify(data)?.length ?? 0;
171
+ } catch {
172
+ }
173
+ return /* @__PURE__ */ React3.createElement(Card3.Row, null, /* @__PURE__ */ React3.createElement(Card3.Block, null, /* @__PURE__ */ React3.createElement(ToggleIconButton, {
174
+ variant: "ghost",
175
+ icon: "ph--caret-right--regular",
176
+ iconOnly: true,
177
+ active: open,
178
+ onClick: () => setOpen(!open),
179
+ label: "Toggle JSON"
180
+ })), open && /* @__PURE__ */ React3.createElement(JsonHighlighter, {
181
+ data,
182
+ classNames: "py-1.5 col-span-full text-xs overflow-auto"
183
+ }) || /* @__PURE__ */ React3.createElement(Card3.Text, {
184
+ variant: "description"
185
+ }, collapsedLength));
157
186
  };
158
187
 
159
188
  // src/cards/OrganizationCard.tsx
@@ -161,14 +190,9 @@ import React4 from "react";
161
190
  import { Card as Card4 } from "@dxos/react-ui";
162
191
  var OrganizationCard = ({ subject }) => {
163
192
  const { name, image, description, website } = subject;
164
- return /* @__PURE__ */ React4.createElement(Card4.Body, null, /* @__PURE__ */ React4.createElement(Card4.Poster, {
193
+ return /* @__PURE__ */ React4.createElement(Card4.Body, null, image && /* @__PURE__ */ React4.createElement(Card4.Poster, {
165
194
  alt: name ?? "",
166
- ...image ? {
167
- image
168
- } : {
169
- icon: "ph--building-office--regular"
170
- },
171
- classNames: !image && "opacity-50"
195
+ image
172
196
  }), description && /* @__PURE__ */ React4.createElement(Card4.Row, null, /* @__PURE__ */ React4.createElement(Card4.Text, {
173
197
  variant: "description"
174
198
  }, description)), website && /* @__PURE__ */ React4.createElement(Card4.Link, {
@@ -181,11 +205,11 @@ var OrganizationCard = ({ subject }) => {
181
205
  import * as Effect from "effect/Effect";
182
206
  import React5, { useCallback as useCallback3 } from "react";
183
207
  import { useOperationInvoker } from "@dxos/app-framework/ui";
184
- import { LayoutOperation, getObjectPathFromObject, getSpacePath } from "@dxos/app-toolkit";
208
+ import { LayoutOperation, Paths } from "@dxos/app-toolkit";
185
209
  import { Obj as Obj3 } from "@dxos/echo";
186
210
  import { EffectEx } from "@dxos/effect";
187
211
  import { Avatar } from "@dxos/react-ui";
188
- import { Card as Card5 } from "@dxos/react-ui";
212
+ import { Card as Card5, Icon as Icon2 } from "@dxos/react-ui";
189
213
  var PersonCard = ({ subject }) => {
190
214
  const { invoke } = useOperationInvoker();
191
215
  const { image, organization: { target: organization } = {}, emails = [] } = subject;
@@ -194,7 +218,7 @@ var PersonCard = ({ subject }) => {
194
218
  return;
195
219
  }
196
220
  return Effect.gen(function* () {
197
- const organizationPath = getObjectPathFromObject(organization);
221
+ const organizationPath = Paths.getObjectPathFromObject(organization);
198
222
  const db = Obj3.getDatabase(organization);
199
223
  yield* invoke(LayoutOperation.UpdatePopover, {
200
224
  state: false,
@@ -204,32 +228,33 @@ var PersonCard = ({ subject }) => {
204
228
  subject: [
205
229
  organizationPath
206
230
  ],
207
- workspace: db ? getSpacePath(db.spaceId) : void 0
231
+ workspace: db ? Paths.getSpacePath(db.spaceId) : void 0
208
232
  });
209
233
  }).pipe(EffectEx.runAndForwardErrors);
210
234
  }, [
211
235
  invoke,
212
236
  organization
213
237
  ]);
214
- return /* @__PURE__ */ React5.createElement(Card5.Body, null, /* @__PURE__ */ React5.createElement(Avatar.Root, null, image && /* @__PURE__ */ React5.createElement(Card5.Row, {
215
- className: "py-1"
216
- }, /* @__PURE__ */ React5.createElement(Avatar.Content, {
238
+ return /* @__PURE__ */ React5.createElement(Card5.Body, null, image && /* @__PURE__ */ React5.createElement(Card5.Row, null, /* @__PURE__ */ React5.createElement(Avatar.Root, null, /* @__PURE__ */ React5.createElement(Avatar.Content, {
217
239
  imgSrc: image,
218
240
  icon: "ph--user--regular",
219
241
  size: 20,
220
- classNames: !image && "opacity-50",
242
+ classNames: [
243
+ !image && "opacity-50"
244
+ ],
221
245
  hue: "neutral",
222
246
  variant: "square"
223
- })), organization?.name && /* @__PURE__ */ React5.createElement(Card5.Action, {
247
+ }))), organization?.name && /* @__PURE__ */ React5.createElement(Card5.Action, {
224
248
  icon: "ph--buildings--regular",
225
249
  label: organization.name,
226
250
  onClick: handleOrganizationClick
227
- }), emails.map(({ value }) => /* @__PURE__ */ React5.createElement(Card5.Row, {
228
- key: value,
251
+ }), emails.length > 0 && /* @__PURE__ */ React5.createElement(Card5.Row, null, /* @__PURE__ */ React5.createElement(Card5.Block, null, /* @__PURE__ */ React5.createElement(Icon2, {
229
252
  icon: "ph--at--regular"
230
- }, /* @__PURE__ */ React5.createElement(Card5.Text, {
253
+ })), /* @__PURE__ */ React5.createElement(Card5.Text, {
231
254
  truncate: true,
232
- className: "text-primary-text"
255
+ className: "text-sky-text text-sm"
256
+ }, emails.map(({ value }) => /* @__PURE__ */ React5.createElement("div", {
257
+ key: value
233
258
  }, value)))));
234
259
  };
235
260
 
@@ -243,9 +268,9 @@ var ProjectCard = ({ subject }) => {
243
268
  image,
244
269
  alt: Obj4.getLabel(subject) ?? "",
245
270
  aspect: "auto"
246
- }), description && /* @__PURE__ */ React6.createElement(Card6.Text, {
271
+ }), description && /* @__PURE__ */ React6.createElement(Card6.Row, null, /* @__PURE__ */ React6.createElement(Card6.Text, {
247
272
  variant: "description"
248
- }, description));
273
+ }, description)));
249
274
  };
250
275
 
251
276
  // src/cards/TaskCard.tsx
@@ -280,7 +305,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
280
305
  Surface.create({
281
306
  id: "schemaPopoverContact",
282
307
  position: "first",
283
- filter: AppSurface.object(AppSurface.Card, Person.Person),
308
+ filter: AppSurface.object(AppSurface.CardContent, Person.Person),
284
309
  component: ({ data, role }) => {
285
310
  return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(PersonCard, {
286
311
  role,
@@ -295,7 +320,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
295
320
  Surface.create({
296
321
  id: "schemaPopoverOrganization",
297
322
  position: "first",
298
- filter: AppSurface.object(AppSurface.Card, Organization.Organization),
323
+ filter: AppSurface.object(AppSurface.CardContent, Organization.Organization),
299
324
  component: ({ data, role }) => {
300
325
  return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(OrganizationCard, {
301
326
  role,
@@ -310,7 +335,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
310
335
  Surface.create({
311
336
  id: "schemaPopoverProject",
312
337
  position: "first",
313
- filter: AppSurface.object(AppSurface.Card, Pipeline.Pipeline),
338
+ filter: AppSurface.object(AppSurface.CardContent, Pipeline.Pipeline),
314
339
  component: ({ data, role }) => {
315
340
  return /* @__PURE__ */ React8.createElement(ProjectCard, {
316
341
  role,
@@ -321,7 +346,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
321
346
  Surface.create({
322
347
  id: "schemaPopoverTask",
323
348
  position: "first",
324
- filter: AppSurface.object(AppSurface.Card, Task2.Task),
349
+ filter: AppSurface.object(AppSurface.CardContent, Task2.Task),
325
350
  component: ({ data, role }) => {
326
351
  return /* @__PURE__ */ React8.createElement(TaskCard, {
327
352
  role,
@@ -331,7 +356,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
331
356
  }),
332
357
  Surface.create({
333
358
  id: "schemaPopoverExpando",
334
- filter: AppSurface.object(AppSurface.Card, Expando.Expando),
359
+ filter: AppSurface.object(AppSurface.CardContent, Expando.Expando),
335
360
  component: ({ data, role }) => {
336
361
  return /* @__PURE__ */ React8.createElement(ExpandoCard, {
337
362
  role,
@@ -342,23 +367,22 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
342
367
  }),
343
368
  Surface.create({
344
369
  id: "schemaPopoverDynamicType",
345
- role: "card--content",
346
- filter: (data) => {
347
- if (!Obj5.isObject(data.subject)) {
370
+ filter: AppSurface.subject(AppSurface.CardContent, (subject) => {
371
+ if (!Obj5.isObject(subject)) {
348
372
  return false;
349
373
  }
350
- const type = Obj5.getType(data.subject);
374
+ const type = Obj5.getType(subject);
351
375
  if (type) {
352
376
  return Type3.getDatabase(type) != null;
353
377
  }
354
378
  try {
355
- const db = Obj5.getDatabase(data.subject);
356
- const typename = Obj5.getTypename(data.subject);
379
+ const db = Obj5.getDatabase(subject);
380
+ const typename = Obj5.getTypename(subject);
357
381
  return !!db && !!typename && db.graph.registry.list().filter(Type3.isType).some((t) => Type3.getTypename(t) === typename);
358
382
  } catch {
359
383
  return false;
360
384
  }
361
- },
385
+ }),
362
386
  component: ({ data, role }) => {
363
387
  return /* @__PURE__ */ React8.createElement(FormCard, {
364
388
  role,
@@ -373,9 +397,8 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
373
397
  //
374
398
  Surface.create({
375
399
  id: "fallbackPopover",
376
- role: "card--content",
377
400
  position: "last",
378
- filter: (data) => Obj5.isObject(data.subject),
401
+ filter: AppSurface.subject(AppSurface.CardContent, Obj5.isObject),
379
402
  component: ({ data, role }) => {
380
403
  return /* @__PURE__ */ React8.createElement(FormCard, {
381
404
  role,
@@ -386,9 +409,8 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
386
409
  }),
387
410
  Surface.create({
388
411
  id: "fallbackJson",
389
- role: "card--content",
412
+ filter: Surface.makeFilter(AppSurface.CardContent),
390
413
  position: "last",
391
- filter: (data) => true,
392
414
  component: ({ data }) => {
393
415
  return /* @__PURE__ */ React8.createElement(JsonCard, {
394
416
  data
@@ -405,7 +427,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
405
427
  }, /* @__PURE__ */ React8.createElement("div", {
406
428
  className: "py-2 dx-card-min-width dx-card-max-width"
407
429
  }, /* @__PURE__ */ React8.createElement(Card8.Root, null, /* @__PURE__ */ React8.createElement(Surface.Surface, {
408
- type: AppSurface.Card,
430
+ type: AppSurface.CardContent,
409
431
  data,
410
432
  limit: 1
411
433
  }))));
@@ -415,4 +437,4 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
415
437
  export {
416
438
  react_surface_default as default
417
439
  };
418
- //# sourceMappingURL=react-surface-FE7E2JP7.mjs.map
440
+ //# sourceMappingURL=react-surface-6SBWLXAY.mjs.map