@dxos/plugin-preview 0.9.1-main.c7dcc2e112 → 0.9.1-staging.ee54ba693a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/capabilities/index.mjs +2 -2
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/{preview-popover-KTNVSMHZ.mjs → preview-popover-EEQQJAH5.mjs} +13 -6
- package/dist/lib/neutral/preview-popover-EEQQJAH5.mjs.map +7 -0
- package/dist/lib/neutral/{react-surface-6SBWLXAY.mjs → react-surface-2CN3DRU6.mjs} +13 -21
- package/dist/lib/neutral/react-surface-2CN3DRU6.mjs.map +7 -0
- package/dist/types/src/capabilities/preview-popover.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/cards/FormCard.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/stories/Card.stories.d.ts +1 -1
- package/dist/types/src/stories/testing.d.ts +4 -5
- package/dist/types/src/stories/testing.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +31 -30
- package/src/capabilities/preview-popover.ts +12 -10
- package/src/capabilities/react-surface.tsx +8 -7
- package/src/cards/FormCard.tsx +2 -10
- package/src/stories/testing.tsx +2 -2
- package/dist/lib/neutral/preview-popover-KTNVSMHZ.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-6SBWLXAY.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-
|
|
4
|
-
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-
|
|
3
|
+
var PreviewPopover = Capability.lazy("PreviewPopover", () => import("../preview-popover-EEQQJAH5.mjs"));
|
|
4
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-2CN3DRU6.mjs"));
|
|
5
5
|
export {
|
|
6
6
|
PreviewPopover,
|
|
7
7
|
ReactSurface
|
|
@@ -1 +1 @@
|
|
|
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
|
+
{"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":15525,"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":14845,"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":19058,"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":"@dxos/util","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-EEQQJAH5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6936},"dist/lib/neutral/preview-popover-EEQQJAH5.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":3080}},"bytes":3222},"dist/lib/neutral/react-surface-2CN3DRU6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":32832},"dist/lib/neutral/react-surface-2CN3DRU6.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":"@dxos/util","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":4783},"src/cards/ExpandoCard.tsx":{"bytesInOutput":1788},"src/cards/index.ts":{"bytesInOutput":0},"src/cards/FormCard.tsx":{"bytesInOutput":2769},"src/cards/JsonCard.tsx":{"bytesInOutput":948},"src/cards/OrganizationCard.tsx":{"bytesInOutput":615},"src/cards/PersonCard.tsx":{"bytesInOutput":2220},"src/cards/ProjectCard.tsx":{"bytesInOutput":569},"src/cards/TaskCard.tsx":{"bytesInOutput":1125}},"bytes":15198},"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-EEQQJAH5.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-surface-2CN3DRU6.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}}}
|
|
@@ -13,11 +13,18 @@ var customEventOptions = {
|
|
|
13
13
|
capture: true,
|
|
14
14
|
passive: false
|
|
15
15
|
};
|
|
16
|
-
var handlePreviewLookup = async (
|
|
16
|
+
var handlePreviewLookup = async (space, { dxn, label }) => {
|
|
17
|
+
const eid = EID.tryParse(dxn);
|
|
18
|
+
if (!eid) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
17
21
|
try {
|
|
18
|
-
const object = await
|
|
22
|
+
const object = await space.db.makeRef(eid).load();
|
|
23
|
+
const resolvedLabel = Obj.getLabel(object, {
|
|
24
|
+
fallback: "typename"
|
|
25
|
+
});
|
|
19
26
|
return {
|
|
20
|
-
label,
|
|
27
|
+
label: resolvedLabel ?? label,
|
|
21
28
|
object
|
|
22
29
|
};
|
|
23
30
|
} catch {
|
|
@@ -47,7 +54,7 @@ var preview_popover_default = Capability.makeModule(Effect.fnUntraced(function*
|
|
|
47
54
|
if (!space) {
|
|
48
55
|
return;
|
|
49
56
|
}
|
|
50
|
-
const result = await handlePreviewLookup(
|
|
57
|
+
const result = await handlePreviewLookup(space, {
|
|
51
58
|
dxn,
|
|
52
59
|
label
|
|
53
60
|
});
|
|
@@ -84,11 +91,11 @@ var preview_popover_default = Capability.makeModule(Effect.fnUntraced(function*
|
|
|
84
91
|
if (document.defaultView) {
|
|
85
92
|
cleanup = addEventListener(document.defaultView, DX_ANCHOR_ACTIVATE, handleAnchorActivate, customEventOptions);
|
|
86
93
|
} else {
|
|
87
|
-
log.warn("no default view found", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L:
|
|
94
|
+
log.warn("no default view found", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 111, S: this });
|
|
88
95
|
}
|
|
89
96
|
return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cleanup?.()));
|
|
90
97
|
}));
|
|
91
98
|
export {
|
|
92
99
|
preview_popover_default as default
|
|
93
100
|
};
|
|
94
|
-
//# sourceMappingURL=preview-popover-
|
|
101
|
+
//# sourceMappingURL=preview-popover-EEQQJAH5.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 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-types';\n\nconst customEventOptions = { capture: true, passive: false };\n\n// TODO(burdon): Factor out?\nconst handlePreviewLookup = async (space: Space, { dxn, label }: PreviewLinkRef): Promise<PreviewLinkTarget | null> => {\n const eid = EID.tryParse(dxn);\n if (!eid) {\n // dxn: type URIs and other non-EID refs cannot be resolved to an object.\n return null;\n }\n try {\n const object = await space.db.makeRef(eid).load();\n const resolvedLabel = Obj.getLabel(object as any, { fallback: 'typename' });\n return { label: resolvedLabel ?? 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(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;AAEjC,SAASC,WAAW;AACpB,SAASC,WAAW;AACpB,SAASC,WAAW;AACpB,SAASC,0BAA0B;AACnC,SAASC,0BAAiD;AAG1D,IAAA,eAAMC;IAAsCC,qBAAS;EAAM,SAAA;EAE3D,SAAA;AACA;IAEE,sBAAU,OAAA,OAAA,EAAA,KAAA,MAAA,MAAA;QACR,MAAA,IAAA,SAAA,GAAA;MACA,CAAA,KAAA;AAEE,WAAA;;MAEF;UAAoDC,SAAU,MAAA,MAAA,GAAA,QAAA,GAAA,EAAA,KAAA;AAAW,UAAA,gBAAA,IAAA,SAAA,QAAA;MACzE,UAAO;;WAAiCC;MAAO,OAAA,iBAAA;MAC/C;IACA;EACF,QAAA;AACF,WAAA;EAEA;;IAGI,0BAAMC,WAAe,WAAkBC,kBAAO,aAAA;AAG9C,QAAA,eAAA,OAAA,WAAA;MAcE,qBAAmBC;QACnB,uBAAuB,OAAGF,EAAAA,KAAaG,OAAInB,SAAAA,OAAaoB,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,gBAAiBhB,MAAAA;AACzD,UAAKuB,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;;UAAuDG,SAAAA,MAAAA,oBAAAA,OAAAA;MAAM;MACzD;;AAEJ,QAAA,CAAA,QAAA;AACA;IACA;AAGA,QAAA,aAAA,oBAAA;AAEA;;AAA8E,UAAA,QAAA,aAAA,IAAA,SAAA,OAAA,QAAA;MAE9E,UAAMC;;UAEJC,cAAgBhB,gBAAM,eAAA;MACtBU,YAAO;MACPJ,SAAS,OAAA;MACTC,OAAAA;MACA,SAAIE;cAAUA;MAAK,GAAC,QAAA;QAChBQ;;MAAiB,GAAC,SAAA;QAClBC;;MAAe,GAAC,QAAA;QAChBC;;MAAiB,GAAC,SAAA;QACxB;MACF;IAEIC,CAAAA;EACJ;MACEA;AAMF,MAAA,SAAO,aAAA;AACL1B,cAAS,iBAAA,SAAA,aAAA,oBAAA,sBAAA,kBAAA;EACX,OAAA;AAEA,QAAOR,KAAAA,yBAAuBD,QAAaoC,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", "fallback", "object", "capabilities", "Service", "activationSequence", "get", "OperationInvoker", "variant", "anchor", "trigger", "kind", "state", "space", "spaceId", "spaces", "label", "invokePromise", "subject", "title", "side", "props", "cleanup", "Null", "sync"]
|
|
7
|
+
}
|
|
@@ -8,6 +8,7 @@ import { Obj as Obj5, Type as Type3 } from "@dxos/echo";
|
|
|
8
8
|
import { Card as Card8 } from "@dxos/react-ui";
|
|
9
9
|
import { Expando } from "@dxos/schema";
|
|
10
10
|
import { Organization, Person, Pipeline, Task as Task2 } from "@dxos/types";
|
|
11
|
+
import { Position } from "@dxos/util";
|
|
11
12
|
|
|
12
13
|
// src/cards/ExpandoCard.tsx
|
|
13
14
|
import * as Schema from "effect/Schema";
|
|
@@ -72,7 +73,7 @@ import React2, { useCallback as useCallback2, useMemo as useMemo2 } from "react"
|
|
|
72
73
|
import { Obj as Obj2, Type } from "@dxos/echo";
|
|
73
74
|
import { useType } from "@dxos/echo-react";
|
|
74
75
|
import { SchemaEx as SchemaEx2 } from "@dxos/effect";
|
|
75
|
-
import { Card as Card2,
|
|
76
|
+
import { Card as Card2, useTranslation } from "@dxos/react-ui";
|
|
76
77
|
import { Form as Form2, getFormProperties, omitId } from "@dxos/react-ui-form";
|
|
77
78
|
import { meta } from "#meta";
|
|
78
79
|
var FormCard = ({ subject, projection, readonly = true, layout }) => {
|
|
@@ -147,16 +148,7 @@ var FormCard = ({ subject, projection, readonly = true, layout }) => {
|
|
|
147
148
|
layout: resolvedLayout,
|
|
148
149
|
autoSave: true,
|
|
149
150
|
onSave: handleSave
|
|
150
|
-
}, /* @__PURE__ */ React2.createElement(Form2.Viewport, null, /* @__PURE__ */ React2.createElement(Form2.Content, null, /* @__PURE__ */ React2.createElement(Form2.FieldSet, null))))
|
|
151
|
-
fullWidth: true
|
|
152
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
153
|
-
className: "pt-1"
|
|
154
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
155
|
-
"data-hue": hue,
|
|
156
|
-
className: "inline-flex items-center gap-1 dx-tag"
|
|
157
|
-
}, /* @__PURE__ */ React2.createElement(Icon, {
|
|
158
|
-
icon
|
|
159
|
-
}), /* @__PURE__ */ React2.createElement("span", null, Obj2.getTypename(subject))))));
|
|
151
|
+
}, /* @__PURE__ */ React2.createElement(Form2.Viewport, null, /* @__PURE__ */ React2.createElement(Form2.Content, null, /* @__PURE__ */ React2.createElement(Form2.FieldSet, null)))));
|
|
160
152
|
};
|
|
161
153
|
|
|
162
154
|
// src/cards/JsonCard.tsx
|
|
@@ -209,7 +201,7 @@ import { LayoutOperation, Paths } from "@dxos/app-toolkit";
|
|
|
209
201
|
import { Obj as Obj3 } from "@dxos/echo";
|
|
210
202
|
import { EffectEx } from "@dxos/effect";
|
|
211
203
|
import { Avatar } from "@dxos/react-ui";
|
|
212
|
-
import { Card as Card5, Icon
|
|
204
|
+
import { Card as Card5, Icon } from "@dxos/react-ui";
|
|
213
205
|
var PersonCard = ({ subject }) => {
|
|
214
206
|
const { invoke } = useOperationInvoker();
|
|
215
207
|
const { image, organization: { target: organization } = {}, emails = [] } = subject;
|
|
@@ -248,7 +240,7 @@ var PersonCard = ({ subject }) => {
|
|
|
248
240
|
icon: "ph--buildings--regular",
|
|
249
241
|
label: organization.name,
|
|
250
242
|
onClick: handleOrganizationClick
|
|
251
|
-
}), emails.length > 0 && /* @__PURE__ */ React5.createElement(Card5.Row, null, /* @__PURE__ */ React5.createElement(Card5.Block, null, /* @__PURE__ */ React5.createElement(
|
|
243
|
+
}), emails.length > 0 && /* @__PURE__ */ React5.createElement(Card5.Row, null, /* @__PURE__ */ React5.createElement(Card5.Block, null, /* @__PURE__ */ React5.createElement(Icon, {
|
|
252
244
|
icon: "ph--at--regular"
|
|
253
245
|
})), /* @__PURE__ */ React5.createElement(Card5.Text, {
|
|
254
246
|
truncate: true,
|
|
@@ -304,7 +296,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
|
|
|
304
296
|
//
|
|
305
297
|
Surface.create({
|
|
306
298
|
id: "schemaPopoverContact",
|
|
307
|
-
position:
|
|
299
|
+
position: Position.first,
|
|
308
300
|
filter: AppSurface.object(AppSurface.CardContent, Person.Person),
|
|
309
301
|
component: ({ data, role }) => {
|
|
310
302
|
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(PersonCard, {
|
|
@@ -319,7 +311,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
|
|
|
319
311
|
}),
|
|
320
312
|
Surface.create({
|
|
321
313
|
id: "schemaPopoverOrganization",
|
|
322
|
-
position:
|
|
314
|
+
position: Position.first,
|
|
323
315
|
filter: AppSurface.object(AppSurface.CardContent, Organization.Organization),
|
|
324
316
|
component: ({ data, role }) => {
|
|
325
317
|
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(OrganizationCard, {
|
|
@@ -334,7 +326,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
|
|
|
334
326
|
}),
|
|
335
327
|
Surface.create({
|
|
336
328
|
id: "schemaPopoverProject",
|
|
337
|
-
position:
|
|
329
|
+
position: Position.first,
|
|
338
330
|
filter: AppSurface.object(AppSurface.CardContent, Pipeline.Pipeline),
|
|
339
331
|
component: ({ data, role }) => {
|
|
340
332
|
return /* @__PURE__ */ React8.createElement(ProjectCard, {
|
|
@@ -345,7 +337,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
|
|
|
345
337
|
}),
|
|
346
338
|
Surface.create({
|
|
347
339
|
id: "schemaPopoverTask",
|
|
348
|
-
position:
|
|
340
|
+
position: Position.first,
|
|
349
341
|
filter: AppSurface.object(AppSurface.CardContent, Task2.Task),
|
|
350
342
|
component: ({ data, role }) => {
|
|
351
343
|
return /* @__PURE__ */ React8.createElement(TaskCard, {
|
|
@@ -397,7 +389,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
|
|
|
397
389
|
//
|
|
398
390
|
Surface.create({
|
|
399
391
|
id: "fallbackPopover",
|
|
400
|
-
position:
|
|
392
|
+
position: Position.last,
|
|
401
393
|
filter: AppSurface.subject(AppSurface.CardContent, Obj5.isObject),
|
|
402
394
|
component: ({ data, role }) => {
|
|
403
395
|
return /* @__PURE__ */ React8.createElement(FormCard, {
|
|
@@ -410,7 +402,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
|
|
|
410
402
|
Surface.create({
|
|
411
403
|
id: "fallbackJson",
|
|
412
404
|
filter: Surface.makeFilter(AppSurface.CardContent),
|
|
413
|
-
position:
|
|
405
|
+
position: Position.last,
|
|
414
406
|
component: ({ data }) => {
|
|
415
407
|
return /* @__PURE__ */ React8.createElement(JsonCard, {
|
|
416
408
|
data
|
|
@@ -419,7 +411,7 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
|
|
|
419
411
|
}),
|
|
420
412
|
Surface.create({
|
|
421
413
|
id: "section",
|
|
422
|
-
position:
|
|
414
|
+
position: Position.last,
|
|
423
415
|
filter: AppSurface.subject(AppSurface.Section, Obj5.isObject),
|
|
424
416
|
component: ({ data }) => {
|
|
425
417
|
return /* @__PURE__ */ React8.createElement("div", {
|
|
@@ -437,4 +429,4 @@ var react_surface_default = Capability.makeModule(() => Effect2.succeed(Capabili
|
|
|
437
429
|
export {
|
|
438
430
|
react_surface_default as default
|
|
439
431
|
};
|
|
440
|
-
//# sourceMappingURL=react-surface-
|
|
432
|
+
//# sourceMappingURL=react-surface-2CN3DRU6.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/cards/ExpandoCard.tsx", "../../../src/cards/FormCard.tsx", "../../../src/cards/JsonCard.tsx", "../../../src/cards/OrganizationCard.tsx", "../../../src/cards/PersonCard.tsx", "../../../src/cards/ProjectCard.tsx", "../../../src/cards/TaskCard.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\nimport { Obj, Type } from '@dxos/echo';\nimport { Card } from '@dxos/react-ui';\nimport { Expando } from '@dxos/schema';\nimport { Organization, Person, Pipeline, Task } from '@dxos/types';\nimport { Position } from '@dxos/util';\n\nimport { ExpandoCard, FormCard, JsonCard, OrganizationCard, PersonCard, ProjectCard, TaskCard } from '../cards';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n // TODO(burdon): Create helpers and factor out.\n //\n\n Surface.create<{ subject: Person.Person }>({\n id: 'schemaPopoverContact',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Person.Person),\n component: ({ data, role }) => {\n return (\n <>\n <PersonCard role={role} subject={data.subject} />\n <Surface.Surface type={AppSurface.Related} data={data} limit={1} />\n </>\n );\n },\n }),\n Surface.create({\n id: 'schemaPopoverOrganization',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Organization.Organization),\n component: ({ data, role }) => {\n return (\n <>\n <OrganizationCard role={role} subject={data.subject} />\n <Surface.Surface type={AppSurface.Related} data={data} limit={1} />\n </>\n );\n },\n }),\n Surface.create({\n id: 'schemaPopoverProject',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Pipeline.Pipeline),\n component: ({ data, role }) => {\n return <ProjectCard role={role} subject={data.subject} />;\n },\n }),\n Surface.create({\n id: 'schemaPopoverTask',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Task.Task),\n component: ({ data, role }) => {\n return <TaskCard role={role} subject={data.subject} />;\n },\n }),\n Surface.create<AppSurface.ObjectCardData<Expando.Expando>>({\n id: 'schemaPopoverExpando',\n filter: AppSurface.object(AppSurface.CardContent, Expando.Expando),\n component: ({ data, role }) => {\n return <ExpandoCard role={role} subject={data.subject} ignorePaths={data.ignorePaths} />;\n },\n }),\n\n Surface.create({\n id: 'schemaPopoverDynamicType',\n filter: AppSurface.subject(AppSurface.CardContent, (subject): subject is Obj.Unknown => {\n if (!Obj.isObject(subject)) {\n return false;\n }\n const type = Obj.getType(subject);\n if (type) {\n return Type.getDatabase(type) != null;\n }\n // Obj.getType fails for database-registered schemas (DXN mismatch); fall back to typename query.\n try {\n const db = Obj.getDatabase(subject);\n const typename = Obj.getTypename(subject);\n return (\n !!db &&\n !!typename &&\n db.graph.registry\n .list()\n .filter(Type.isType)\n .some((t) => Type.getTypename(t) === typename)\n );\n } catch {\n return false;\n }\n }),\n component: ({ data, role }) => {\n // Dynamic/mutable schemas render an editable, full-layout form;\n // FormCard handles both static and runtime schema resolution internally.\n return <FormCard role={role} subject={data.subject} readonly={false} layout='full' />;\n },\n }),\n\n //\n // Fallback for any object.\n //\n\n Surface.create({\n id: 'fallbackPopover',\n position: Position.last,\n filter: AppSurface.subject(AppSurface.CardContent, Obj.isObject),\n component: ({ data, role }) => {\n return <FormCard role={role} subject={data.subject} projection={data.projection} />;\n },\n }),\n\n Surface.create({\n id: 'fallbackJson',\n filter: Surface.makeFilter(AppSurface.CardContent),\n position: Position.last,\n component: ({ data }) => {\n return <JsonCard data={data} />;\n },\n }),\n\n Surface.create({\n id: 'section',\n position: Position.last,\n filter: AppSurface.subject(AppSurface.Section, Obj.isObject),\n component: ({ data }) => {\n return (\n <div className='flex w-full justify-center'>\n <div className='py-2 dx-card-min-width dx-card-max-width'>\n <Card.Root>\n <Surface.Surface type={AppSurface.CardContent} data={data} limit={1} />\n </Card.Root>\n </div>\n </div>\n );\n },\n }),\n ]),\n ),\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Obj } from '@dxos/echo';\nimport { SchemaEx } from '@dxos/effect';\nimport { Card } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\n\nconst schemaForValue = (value: unknown): Schema.Schema.AnyNoContext | undefined => {\n switch (typeof value) {\n case 'string':\n return Schema.String;\n case 'number':\n return Schema.Number;\n case 'boolean':\n return Schema.Boolean;\n default:\n return undefined;\n }\n};\n\n/**\n * Reserved keys: `id`, plus any `~`-prefixed key (ECHO uses `~`-prefixed\n * string keys to brand entity instances and schemas — KindId,\n * SchemaKindId, SnapshotKindId, etc. — and the `~` namespace is reserved\n * for that purpose). They show up in `Object.keys` but aren't user data.\n */\nconst isInternalKey = (key: string) => key === 'id' || key.startsWith('~');\n\nexport const ExpandoCard = ({ subject, ignorePaths }: AppSurface.ObjectCardProps) => {\n const schema = useMemo(() => {\n const ignored = new Set(ignorePaths ?? []);\n const fields: Record<string, Schema.Schema.AnyNoContext> = {};\n for (const key of Object.keys(subject)) {\n if (isInternalKey(key) || ignored.has(key)) {\n continue;\n }\n const fieldSchema = schemaForValue((subject as any)[key]);\n if (fieldSchema) {\n fields[key] = fieldSchema;\n }\n }\n return Schema.Struct(fields);\n }, [subject, ignorePaths]);\n\n const handleSave = useCallback(\n (values: any, { changed }: { changed: Record<string, boolean> }) => {\n const paths = Object.keys(changed).filter((path) => changed[path]);\n Obj.update(subject, () => {\n for (const path of paths) {\n const value = values[path];\n const parts = SchemaEx.splitJsonPath(path as SchemaEx.JsonPath);\n Obj.setValue(subject, parts, value);\n }\n });\n },\n [subject],\n );\n\n return (\n <Card.Body>\n <Form.Root schema={schema} values={subject} autoSave onSave={handleSave}>\n <Form.Viewport>\n <Form.Content>\n <Form.FieldSet />\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n </Card.Body>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Obj, Type } from '@dxos/echo';\nimport { useType } from '@dxos/echo-react';\nimport { type AnyProperties } from '@dxos/echo/internal';\nimport { SchemaEx } from '@dxos/effect';\nimport { Card, useTranslation } from '@dxos/react-ui';\nimport { Form, type FormPresentation, type FormUpdateMeta, getFormProperties, omitId } from '@dxos/react-ui-form';\nimport { type ProjectionModel } from '@dxos/schema';\n\nimport { meta } from '#meta';\n\nexport type FormCardProps = AppSurface.ObjectCardProps & {\n projection?: ProjectionModel;\n readonly?: boolean;\n layout?: FormPresentation;\n};\n\n/**\n * Default/fallback card for any ECHO object.\n * Renders a `Form` against the object's schema — either the static schema\n * from `Obj.getSchema` or, for runtime/mutable schemas, the reactive\n * schema looked up via `useType`.\n */\nexport const FormCard = ({ subject, projection, readonly = true, layout }: FormCardProps) => {\n const { t } = useTranslation(meta.profile.key);\n // Readonly cards default to the `static` presentation — plain DOM, undefined values\n // omitted — which reads as a preview rather than a form. Editable cards keep the\n // `compact` form layout. Callers can override either via the explicit `layout` prop.\n const resolvedLayout: FormPresentation = layout ?? (readonly ? 'static' : 'compact');\n\n // Try the static schema first; fall back to the runtime/database schema for\n // dynamic types whose schema isn't reachable via `Obj.getSchema` (DXN mismatch).\n const staticType = Obj.getType(subject);\n const db = Obj.getDatabase(subject);\n // `Obj.getTypeURI` throws on corrupted objects that are missing a type; swallow that\n // and fall through to the \"unable to create preview\" path rather than crashing the card.\n const fallbackTypeUri = useMemo(() => {\n if (staticType) {\n return undefined;\n }\n try {\n return Obj.getTypeURI(subject);\n } catch {\n return undefined;\n }\n }, [staticType, subject]);\n const runtimeType = useType(db, fallbackTypeUri);\n const schema = useMemo((): Schema.Schema.AnyNoContext | undefined => {\n const resolvedType = runtimeType ?? staticType;\n return resolvedType ? omitId(Type.getSchema(resolvedType)) : undefined;\n }, [runtimeType, staticType]);\n\n // Predict whether the form would render anything visible. Without this guard,\n // readonly + compact mode produces an empty scrollarea when every form-renderable\n // field is unset (e.g., a Table object whose `view`/`sizes` are FormInput-hidden\n // and whose `name` is undefined).\n //\n // - In editable mode (`!readonly`), the form renders empty fields, so we only\n // bail when there are no form-renderable properties at all.\n // - In readonly mode, the form hides fields with null/undefined values, so we\n // bail when no form-renderable property has a non-null value.\n const hasRenderableContent = useMemo(() => {\n if (!schema) {\n return false;\n }\n const properties = getFormProperties(schema.ast);\n if (properties.length === 0) {\n return false;\n }\n if (!readonly) {\n return true;\n }\n return properties.some((prop) => (subject as any)?.[prop.name] != null);\n }, [schema, subject, readonly]);\n\n const handleSave = useCallback(\n (values: AnyProperties, { changed }: FormUpdateMeta<AnyProperties>) => {\n const paths = (Object.keys(changed) as SchemaEx.JsonPath[]).filter((path) => changed[path]);\n Obj.update(subject, () => {\n for (const path of paths) {\n const parts = SchemaEx.splitJsonPath(path);\n const value = Obj.getValue(values as any, parts);\n Obj.setValue(subject, parts, value);\n }\n });\n },\n [subject],\n );\n\n if (!schema || !hasRenderableContent) {\n return (\n <Card.Body>\n <Card.Row>\n <Card.Text variant='description'>{t('unable-to-create-preview.message')}</Card.Text>\n </Card.Row>\n </Card.Body>\n );\n }\n\n const { icon, hue } = Obj.getIcon(subject) ?? { icon: 'ph--circle-dashed--regular', hue: 'neutral' };\n\n return (\n <Card.Body>\n <Form.Root\n schema={schema}\n projection={projection}\n values={subject}\n readonly={readonly}\n layout={resolvedLayout}\n autoSave\n onSave={handleSave}\n >\n <Form.Viewport>\n <Form.Content>\n <Form.FieldSet />\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n </Card.Body>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { Card, ToggleIconButton } from '@dxos/react-ui';\nimport { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';\n\nexport const JsonCard = ({ data }: { data: unknown }) => {\n const [open, setOpen] = useState(false);\n // JSON.stringify throws on circular references / unsupported values (e.g. BigInt); keep the card stable.\n let collapsedLength = 0;\n try {\n collapsedLength = JSON.stringify(data)?.length ?? 0;\n } catch {}\n return (\n <Card.Row>\n <Card.Block>\n <ToggleIconButton\n variant='ghost'\n icon='ph--caret-right--regular'\n iconOnly\n active={open}\n onClick={() => setOpen(!open)}\n label='Toggle JSON'\n />\n </Card.Block>\n {(open && <JsonHighlighter data={data} classNames='py-1.5 col-span-full text-xs overflow-auto' />) || (\n <Card.Text variant='description'>{collapsedLength}</Card.Text>\n )}\n </Card.Row>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Card } from '@dxos/react-ui';\nimport { type Organization } from '@dxos/types';\n\nexport const OrganizationCard = ({ subject }: AppSurface.ObjectCardProps<Organization.Organization>) => {\n const { name, image, description, website } = subject;\n\n return (\n <Card.Body>\n {image && <Card.Poster alt={name ?? ''} image={image} />}\n {description && (\n <Card.Row>\n <Card.Text variant='description'>{description}</Card.Text>\n </Card.Row>\n )}\n {website && <Card.Link label={website} href={website} />}\n </Card.Body>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { useCallback } from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation, Paths } from '@dxos/app-toolkit';\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Obj } from '@dxos/echo';\nimport { EffectEx } from '@dxos/effect';\nimport { Avatar } from '@dxos/react-ui';\nimport { Card, Icon } from '@dxos/react-ui';\nimport { type Person } from '@dxos/types';\n\nexport const PersonCard = ({ subject }: AppSurface.ObjectCardProps<Person.Person>) => {\n const { invoke } = useOperationInvoker();\n const { image, organization: { target: organization } = {}, emails = [] } = subject;\n\n const handleOrganizationClick = useCallback(() => {\n if (!organization) {\n return;\n }\n\n return Effect.gen(function* () {\n const organizationPath = Paths.getObjectPathFromObject(organization);\n const db = Obj.getDatabase(organization);\n yield* invoke(LayoutOperation.UpdatePopover, { state: false, anchorId: '' });\n yield* invoke(LayoutOperation.Open, {\n subject: [organizationPath],\n workspace: db ? Paths.getSpacePath(db.spaceId) : undefined,\n });\n }).pipe(EffectEx.runAndForwardErrors);\n }, [invoke, organization]);\n\n return (\n <Card.Body>\n {image && (\n <Card.Row>\n <Avatar.Root>\n <Avatar.Content\n imgSrc={image}\n icon='ph--user--regular'\n size={20}\n classNames={[!image && 'opacity-50']}\n hue='neutral'\n variant='square'\n />\n </Avatar.Root>\n </Card.Row>\n )}\n {organization?.name && (\n <Card.Action icon='ph--buildings--regular' label={organization.name} onClick={handleOrganizationClick} />\n )}\n {emails.length > 0 && (\n <Card.Row>\n <Card.Block>\n <Icon icon='ph--at--regular' />\n </Card.Block>\n <Card.Text truncate className='text-sky-text text-sm'>\n {emails.map(({ value }) => (\n <div key={value}>{value}</div>\n ))}\n </Card.Text>\n </Card.Row>\n )}\n </Card.Body>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Obj } from '@dxos/echo';\nimport { Card } from '@dxos/react-ui';\nimport { type Pipeline } from '@dxos/types';\n\nexport const ProjectCard = ({ subject }: AppSurface.ObjectCardProps<Pipeline.Pipeline>) => {\n const { image, description } = subject;\n\n return (\n <Card.Body>\n {image && <Card.Poster image={image} alt={Obj.getLabel(subject) ?? ''} aspect='auto' />}\n {/* <CardHeader label={name} subject={subject} db={db} /> */}\n {description && (\n <Card.Row>\n <Card.Text variant='description'>{description}</Card.Text>\n </Card.Row>\n )}\n </Card.Body>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as SchemaAST from 'effect/SchemaAST';\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Type } from '@dxos/echo';\nimport { type PropertyMetaAnnotation, PropertyMetaAnnotationId } from '@dxos/echo/internal';\nimport { Card } from '@dxos/react-ui';\nimport { Task } from '@dxos/types';\n\nexport const TaskCard = ({ subject }: AppSurface.ObjectCardProps<Task.Task>) => {\n const { title, status } = subject;\n const statusOption = getActiveStatusOption(status);\n\n return (\n <Card.Body>\n <Card.Row>\n {statusOption && (\n <div>\n <span className='dx-tag' data-hue={statusOption.color}>\n {statusOption.title}\n </span>\n </div>\n )}\n </Card.Row>\n </Card.Body>\n );\n};\n\n// TODO(thure): Should this move upstream as a helper? Is there an easier way to get options?\nconst getActiveStatusOption = (status?: string) => {\n const properties = SchemaAST.getPropertySignatures(Type.getSchema(Task.Task).ast);\n const statusProperty = properties.find((p) => p.name === 'status');\n // TODO(thure): Typescript asserts `.type` doesn’t have `.types`, but in runtime it does.\n const statusMeta = SchemaAST.getAnnotation<PropertyMetaAnnotation>(PropertyMetaAnnotationId)(\n (statusProperty!.type as any).types[0],\n );\n\n // TODO(thure): Typescript asserts `statusMeta` doesn’t have `.value`, but in runtime it does.\n const options = (statusMeta as any).value.singleSelect.options as { id: string; title: string; color: string }[];\n return options.find(({ id }) => id === status);\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,aAAY;AACxB,OAAOC,YAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAC3B,SAASC,OAAAA,MAAKC,QAAAA,aAAY;AAC1B,SAASC,QAAAA,aAAY;AACrB,SAASC,eAAe;AACxB,SAASC,cAAcC,QAAQC,UAAUC,QAAAA,aAAY;AACrD,SAASC,gBAAgB;;;ACVzB,YAAYC,YAAY;AACxB,OAAOC,SAASC,aAAaC,eAAe;AAG5C,SAASC,WAAW;AACpB,SAASC,gBAAgB;AACzB,SAASC,YAAY;AACrB,SAASC,YAAY;AAErB,IAAMC,iBAAiB,CAACC,UAAAA;AACtB,UAAQ,OAAOA,OAAAA;IACb,KAAK;AACH,aAAcC;IAChB,KAAK;AACH,aAAcC;IAChB,KAAK;AACH,aAAcC;IAChB;AACE,aAAOC;EACX;AACF;AAQA,IAAMC,gBAAgB,CAACC,QAAgBA,QAAQ,QAAQA,IAAIC,WAAW,GAAA;AAE/D,IAAMC,cAAc,CAAC,EAAEC,SAASC,YAAW,MAA8B;AAC9E,QAAMC,SAASjB,QAAQ,MAAA;AACrB,UAAMkB,UAAU,IAAIC,IAAIH,eAAe,CAAA,CAAE;AACzC,UAAMI,SAAqD,CAAC;AAC5D,eAAWR,OAAOS,OAAOC,KAAKP,OAAAA,GAAU;AACtC,UAAIJ,cAAcC,GAAAA,KAAQM,QAAQK,IAAIX,GAAAA,GAAM;AAC1C;MACF;AACA,YAAMY,cAAcnB,eAAgB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0C;IACnBnC,WAAW,CAAC,EAAEC,KAAI,MAAE;AAClB,aAAO,gBAAAE,OAAA,cAACmC,UAAAA;QAASrC;;IACnB;EACF,CAAA;EAEAZ,QAAQC,OAAO;IACbC,IAAI;IACJC,UAAUC,SAAS0C;IACnBxC,QAAQC,WAAWS,QAAQT,WAAW2C,SAASrB,KAAIC,QAAQ;IAC3DnB,WAAW,CAAC,EAAEC,KAAI,MAAE;AAClB,aACE,gBAAAE,OAAA,cAACqC,OAAAA;QAAIC,WAAU;SACb,gBAAAtC,OAAA,cAACqC,OAAAA;QAAIC,WAAU;SACb,gBAAAtC,OAAA,cAACuC,MAAKC,MAAI,MACR,gBAAAxC,OAAA,cAACd,QAAQA,SAAO;QAACiB,MAAMV,WAAWE;QAAaG;QAAYO,OAAO;;IAK5E;EACF,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "React", "Capabilities", "Capability", "Surface", "AppSurface", "Obj", "Type", "Card", "Expando", "Organization", "Person", "Pipeline", "Task", "Position", "Schema", "React", "useCallback", "useMemo", "Obj", "SchemaEx", "Card", "Form", "schemaForValue", "value", "String", "Number", "Boolean", "undefined", "isInternalKey", "key", "startsWith", "ExpandoCard", "subject", "ignorePaths", "schema", "ignored", "Set", "fields", "Object", "keys", "has", "fieldSchema", "Struct", "handleSave", "values", "changed", "paths", "filter", "path", "update", "parts", "splitJsonPath", "setValue", "Body", "Root", "autoSave", "onSave", "Viewport", "Content", "FieldSet", "React", "useCallback", "useMemo", "Obj", "Type", "useType", "SchemaEx", "Card", "useTranslation", "Form", "getFormProperties", "omitId", "meta", "FormCard", "subject", "projection", "readonly", "layout", "t", "profile", "key", "resolvedLayout", "staticType", "getType", "db", "getDatabase", "fallbackTypeUri", "undefined", "getTypeURI", "runtimeType", "schema", "resolvedType", "getSchema", "hasRenderableContent", "properties", "ast", "length", "some", "prop", "name", "handleSave", "values", "changed", "paths", "Object", "keys", "filter", "path", "update", "parts", "splitJsonPath", "value", "getValue", "setValue", "Body", "Row", "Text", "variant", "icon", "hue", "getIcon", "Root", "autoSave", "onSave", "Viewport", "Content", "FieldSet", "React", "useState", "Card", "ToggleIconButton", "JsonHighlighter", "JsonCard", "data", "open", "setOpen", "collapsedLength", "JSON", "stringify", "length", "Row", "Block", "variant", "icon", "iconOnly", "active", "onClick", "label", "classNames", "Text", "React", "Card", "OrganizationCard", "subject", "name", "image", "description", "website", "Body", "Poster", "alt", "Row", "Text", "variant", "Link", "label", "href", "Effect", "React", "useCallback", "useOperationInvoker", "LayoutOperation", "Paths", "Obj", "EffectEx", "Avatar", "Card", "Icon", "PersonCard", "subject", "invoke", "image", "organization", "target", "emails", "handleOrganizationClick", "gen", "organizationPath", "getObjectPathFromObject", "db", "getDatabase", "UpdatePopover", "state", "anchorId", "Open", "workspace", "getSpacePath", "spaceId", "undefined", "pipe", "runAndForwardErrors", "Body", "Row", "Root", "Content", "imgSrc", "icon", "size", "classNames", "hue", "variant", "name", "Action", "label", "onClick", "length", "Block", "Text", "truncate", "className", "map", "value", "div", "key", "React", "Obj", "Card", "ProjectCard", "subject", "image", "description", "Body", "Poster", "alt", "getLabel", "aspect", "Row", "Text", "variant", "SchemaAST", "React", "Type", "PropertyMetaAnnotationId", "Card", "Task", "TaskCard", "subject", "title", "status", "statusOption", "getActiveStatusOption", "Body", "Row", "div", "span", "className", "data-hue", "color", "properties", "getPropertySignatures", "getSchema", "ast", "statusProperty", "find", "p", "name", "statusMeta", "getAnnotation", "type", "types", "options", "value", "singleSelect", "id", "Capability", "makeModule", "succeed", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "position", "Position", "first", "filter", "AppSurface", "object", "CardContent", "Person", "component", "data", "role", "React", "PersonCard", "subject", "type", "Related", "limit", "Organization", "OrganizationCard", "Pipeline", "ProjectCard", "Task", "TaskCard", "Expando", "ExpandoCard", "ignorePaths", "Obj", "isObject", "getType", "Type", "getDatabase", "db", "typename", "getTypename", "graph", "registry", "list", "isType", "some", "t", "FormCard", "readonly", "layout", "last", "projection", "makeFilter", "JsonCard", "Section", "div", "className", "Card", "Root"]
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
declare const _default: (props: void) => Effect.Effect<Capability.
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Any, never, Capability.Service>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=preview-popover.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
declare const _default: (props: void) => Effect.Effect<Capability.
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Any, never, never>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormCard.d.ts","sourceRoot":"","sources":["../../../../src/cards/FormCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAMvD,OAAO,
|
|
1
|
+
{"version":3,"file":"FormCard.d.ts","sourceRoot":"","sources":["../../../../src/cards/FormCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAMvD,OAAO,EAAQ,KAAK,gBAAgB,EAAkD,MAAM,qBAAqB,CAAC;AAClH,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,eAAe,GAAG;IACvD,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,8CAAsD,aAAa,sBAiGvF,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare const meta: {
|
|
|
16
16
|
} | undefined;
|
|
17
17
|
readonly dependsOn?: readonly string[] | undefined;
|
|
18
18
|
readonly spec?: string | undefined;
|
|
19
|
+
readonly createdAt?: string | undefined;
|
|
19
20
|
readonly author?: string | undefined;
|
|
20
21
|
};
|
|
21
22
|
readonly release?: {
|
|
@@ -24,6 +25,9 @@ export declare const meta: {
|
|
|
24
25
|
readonly dependencies?: {
|
|
25
26
|
readonly [x: string]: string;
|
|
26
27
|
} | undefined;
|
|
28
|
+
readonly pluginKey?: string | undefined;
|
|
29
|
+
readonly manifestHash?: string | undefined;
|
|
30
|
+
readonly createdAt?: string | undefined;
|
|
27
31
|
} | undefined;
|
|
28
32
|
};
|
|
29
33
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { type Organization, type Person, type Pipeline, type Task } from '@dxos/
|
|
|
4
4
|
import { DefaultStory } from './testing';
|
|
5
5
|
declare const meta: {
|
|
6
6
|
title: string;
|
|
7
|
-
render: <T extends import("@dxos/echo/Obj").Any, P extends {} = {}>({ Component, createObject, image, json, componentProps, }: import("./testing").
|
|
7
|
+
render: <T extends import("@dxos/echo/Obj").Any, P extends {} = {}>({ Component, createObject, image, json, componentProps, }: import("./testing").StoryArgs<T, P>) => import("react").JSX.Element;
|
|
8
8
|
decorators: import("@storybook/react").Decorator[];
|
|
9
9
|
parameters: {
|
|
10
10
|
layout: string;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
1
|
import React, { type FC } from 'react';
|
|
3
2
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
4
3
|
import { Obj, Type } from '@dxos/echo';
|
|
5
4
|
import { Expando } from '@dxos/schema';
|
|
6
5
|
import { Organization, Person, Pipeline, Task } from '@dxos/types';
|
|
7
|
-
export type
|
|
6
|
+
export type StoryArgs<T extends Obj.Any, P extends {} = {}> = {
|
|
8
7
|
Component: FC<AppSurface.ObjectCardProps<T> & P>;
|
|
9
8
|
createObject: () => T;
|
|
10
9
|
image?: boolean;
|
|
11
10
|
json?: boolean;
|
|
12
11
|
componentProps?: P;
|
|
13
12
|
};
|
|
14
|
-
export declare const DefaultStory: <T extends Obj.Any, P extends {} = {}>({ Component, createObject, image, json, componentProps, }:
|
|
13
|
+
export declare const DefaultStory: <T extends Obj.Any, P extends {} = {}>({ Component, createObject, image, json, componentProps, }: StoryArgs<T, P>) => React.JSX.Element;
|
|
15
14
|
export declare const omitImage: ({ image: _, ...rest }: any) => any;
|
|
16
15
|
/**
|
|
17
16
|
* Factory functions for creating test objects at render time.
|
|
@@ -39,13 +38,13 @@ export declare const createPersonEmpty: () => Person.Person;
|
|
|
39
38
|
* FormCard should fall through to its empty state — even though
|
|
40
39
|
* `Object.keys(subject)` includes `view`/`sizes`.
|
|
41
40
|
*/
|
|
42
|
-
declare const TableLike: Type.
|
|
41
|
+
declare const TableLike: Type.ObjClass<unknown, {
|
|
43
42
|
readonly name?: string | undefined;
|
|
44
43
|
readonly view: string;
|
|
45
44
|
readonly sizes: {
|
|
46
45
|
[x: string]: number;
|
|
47
46
|
};
|
|
48
|
-
},
|
|
47
|
+
}, {}>;
|
|
49
48
|
type TableLike = Type.InstanceType<typeof TableLike>;
|
|
50
49
|
/**
|
|
51
50
|
* Table-like object with values only in form-hidden fields (`view`, `sizes`).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/stories/testing.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/stories/testing.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAO,GAAG,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAKjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAInE,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI;IAC5D,SAAS,EAAE,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD,YAAY,EAAE,MAAM,CAAC,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,CAAC,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,6DAM9D,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,sBA8BjB,CAAC;AAEF,eAAO,MAAM,SAAS,0BAA2B,GAAG,QAAS,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAO,YAAY,CAAC,YAQlD,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,MAAM,CAAC,MAatC,CAAC;AAEF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