@dxos/plugin-preview 0.8.3-main.672df60 → 0.8.3-staging.0fa589b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/index.mjs +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{preview-popover-2AWEEK32.mjs → preview-popover-NRFVC4QQ.mjs} +2 -2
- package/dist/lib/browser/{preview-popover-2AWEEK32.mjs.map → preview-popover-NRFVC4QQ.mjs.map} +2 -2
- package/dist/lib/browser/{react-surface-FGMSZTOE.mjs → react-surface-J2R6Q33B.mjs} +18 -10
- package/dist/lib/browser/react-surface-J2R6Q33B.mjs.map +7 -0
- package/dist/lib/node/index.cjs +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{preview-popover-K4E7UEQU.cjs → preview-popover-HIXRYF6L.cjs} +5 -5
- package/dist/lib/node/{preview-popover-K4E7UEQU.cjs.map → preview-popover-HIXRYF6L.cjs.map} +2 -2
- package/dist/lib/node/{react-surface-FI63RLWN.cjs → react-surface-ZSNNAKBG.cjs} +19 -11
- package/dist/lib/node/react-surface-ZSNNAKBG.cjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{preview-popover-W5FPZQM3.mjs → preview-popover-HBGSL64N.mjs} +2 -2
- package/dist/lib/node-esm/{preview-popover-W5FPZQM3.mjs.map → preview-popover-HBGSL64N.mjs.map} +2 -2
- package/dist/lib/node-esm/{react-surface-EHIW3IEA.mjs → react-surface-UKEVHG5K.mjs} +18 -10
- package/dist/lib/node-esm/react-surface-UKEVHG5K.mjs.map +7 -0
- package/dist/types/src/Preview.stories.d.ts +10 -23
- package/dist/types/src/Preview.stories.d.ts.map +1 -1
- package/dist/types/src/capabilities/preview-popover.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/Preview.stories.tsx +8 -7
- package/src/capabilities/preview-popover.ts +6 -1
- package/src/capabilities/react-surface.tsx +22 -13
- package/dist/lib/browser/react-surface-FGMSZTOE.mjs.map +0 -7
- package/dist/lib/node/react-surface-FI63RLWN.cjs.map +0 -7
- package/dist/lib/node-esm/react-surface-EHIW3IEA.mjs.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":745,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8458,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9249,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":4743,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":2581,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":17075,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3135},"packages/plugins/plugin-preview/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-EHIW3IEA.mjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","meta"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1782},"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4415},"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2079}},"bytes":2346},"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-EHIW3IEA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16595},"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-EHIW3IEA.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4227},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2882},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1436},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":707}},"bytes":9848},"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":615},"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216}},"bytes":438}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":745,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8510,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9249,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":4743,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":2581,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":18015,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3135},"packages/plugins/plugin-preview/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-HBGSL64N.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-UKEVHG5K.mjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","meta"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1782},"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-HBGSL64N.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4454},"packages/plugins/plugin-preview/dist/lib/node-esm/preview-popover-HBGSL64N.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2079}},"bytes":2346},"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-UKEVHG5K.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16989},"packages/plugins/plugin-preview/dist/lib/node-esm/react-surface-UKEVHG5K.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4441},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2882},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1436},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":707}},"bytes":10062},"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":615},"packages/plugins/plugin-preview/dist/lib/node-esm/chunk-7BPXNL44.mjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216}},"bytes":438}}}
|
|
@@ -58,7 +58,7 @@ var preview_popover_default = (context) => {
|
|
|
58
58
|
} else {
|
|
59
59
|
log.warn("No default view found", void 0, {
|
|
60
60
|
F: __dxlog_file,
|
|
61
|
-
L:
|
|
61
|
+
L: 70,
|
|
62
62
|
S: void 0,
|
|
63
63
|
C: (f, a) => f(...a)
|
|
64
64
|
});
|
|
@@ -68,4 +68,4 @@ var preview_popover_default = (context) => {
|
|
|
68
68
|
export {
|
|
69
69
|
preview_popover_default as default
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=preview-popover-
|
|
71
|
+
//# sourceMappingURL=preview-popover-HBGSL64N.mjs.map
|
package/dist/lib/node-esm/{preview-popover-W5FPZQM3.mjs.map → preview-popover-HBGSL64N.mjs.map}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/preview-popover.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, LayoutAction, contributes, createIntent, type PluginContext } from '@dxos/app-framework';\nimport { addEventListener } from '@dxos/async';\nimport { type Client, resolveRef } from '@dxos/client';\nimport { parseId, type Space } from '@dxos/client/echo';\nimport { DXN } from '@dxos/keys';\nimport { type DxRefTagActivate } from '@dxos/lit-ui';\nimport { log } from '@dxos/log';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { type PreviewLinkRef, type PreviewLinkTarget } from '@dxos/react-ui-editor';\n\nconst customEventOptions = { capture: true, passive: false };\n\nconst handlePreviewLookup = async (\n client: Client,\n defaultSpace: Space,\n { ref, label }: PreviewLinkRef,\n): Promise<PreviewLinkTarget | null> => {\n try {\n const dxn = DXN.parse(ref);\n if (!dxn) {\n return null;\n }\n\n const object = await resolveRef(client, dxn, defaultSpace);\n return { label, object };\n } catch (err) {\n return null;\n }\n};\n\nexport default (context: PluginContext) => {\n // TODO(wittjosiah): Factor out lookup handlers to other plugins to make not ECHO-specific.\n const handleDxRefTagActivate = async ({ refId, label, trigger }: DxRefTagActivate) => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const client = context.getCapability(ClientCapabilities.Client);\n const [layout] = context.getCapabilities(Capabilities.Layout);\n const { spaceId } = parseId(layout.workspace);\n const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;\n const result = await handlePreviewLookup(client, space, { ref: refId, label });\n if (!result) {\n return;\n }\n\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n subject: result.object,\n options: {\n state: true,\n variant: 'virtual',\n anchor: trigger,\n },\n }),\n );\n };\n\n let cleanup: () => void;\n if (document.defaultView) {\n cleanup = addEventListener(document.defaultView
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,cAAcC,cAAcC,aAAaC,oBAAwC;AAC1F,SAASC,wBAAwB;AACjC,SAAsBC,kBAAkB;AACxC,SAASC,eAA2B;AACpC,SAASC,WAAW;AAEpB,SAASC,WAAW;AACpB,SAASC,0BAA0B;;AAGnC,IAAMC,qBAAqB;EAAEC,SAAS;EAAMC,SAAS;AAAM;AAE3D,IAAMC,sBAAsB,OAC1BC,QACAC,cACA,EAAEC,KAAKC,MAAK,MAAkB;AAE9B,MAAI;AACF,UAAMC,MAAMX,IAAIY,MAAMH,GAAAA;AACtB,QAAI,CAACE,KAAK;AACR,aAAO;IACT;AAEA,UAAME,SAAS,MAAMf,WAAWS,QAAQI,KAAKH,YAAAA;AAC7C,WAAO;MAAEE;MAAOG;IAAO;EACzB,SAASC,KAAK;AACZ,WAAO;EACT;AACF;AAEA,IAAA,0BAAe,CAACC,YAAAA;AAEd,QAAMC,yBAAyB,OAAO,EAAEC,OAAOP,OAAOQ,QAAO,MAAoB;AAC/E,UAAM,EAAEC,iBAAiBC,SAAQ,IAAKL,QAAQM,cAAc5B,aAAa6B,gBAAgB;AACzF,UAAMf,SAASQ,QAAQM,cAAcnB,mBAAmBqB,MAAM;AAC9D,UAAM,CAACC,MAAAA,IAAUT,QAAQU,gBAAgBhC,aAAaiC,MAAM;AAC5D,UAAM,EAAEC,QAAO,IAAK5B,QAAQyB,OAAOI,SAAS;AAC5C,UAAMC,SAASF,WAAWpB,OAAOuB,OAAOC,IAAIJ,OAAAA,MAAapB,OAAOuB,OAAOE;AACvE,UAAMC,SAAS,MAAM3B,oBAAoBC,QAAQsB,OAAO;MAAEpB,KAAKQ;MAAOP;IAAM,CAAA;AAC5E,QAAI,CAACuB,QAAQ;AACX;IACF;AAEA,UAAMb,SACJxB,aAAaF,aAAawC,eAAe;MACvCC,MAAM;MACNC,SAASH,OAAOpB;MAChBwB,SAAS;QACPC,OAAO;QACPC,SAAS;QACTC,QAAQtB;MACV;IACF,CAAA,CAAA;EAEJ;AAEA,MAAIuB;AACJ,MAAIC,SAASC,aAAa;AACxBF,cAAU5C,
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, LayoutAction, contributes, createIntent, type PluginContext } from '@dxos/app-framework';\nimport { addEventListener } from '@dxos/async';\nimport { type Client, resolveRef } from '@dxos/client';\nimport { parseId, type Space } from '@dxos/client/echo';\nimport { DXN } from '@dxos/keys';\nimport { type DxRefTagActivate } from '@dxos/lit-ui';\nimport { log } from '@dxos/log';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { type PreviewLinkRef, type PreviewLinkTarget } from '@dxos/react-ui-editor';\n\nconst customEventOptions = { capture: true, passive: false };\n\nconst handlePreviewLookup = async (\n client: Client,\n defaultSpace: Space,\n { ref, label }: PreviewLinkRef,\n): Promise<PreviewLinkTarget | null> => {\n try {\n const dxn = DXN.parse(ref);\n if (!dxn) {\n return null;\n }\n\n const object = await resolveRef(client, dxn, defaultSpace);\n return { label, object };\n } catch (err) {\n return null;\n }\n};\n\nexport default (context: PluginContext) => {\n // TODO(wittjosiah): Factor out lookup handlers to other plugins to make not ECHO-specific.\n const handleDxRefTagActivate = async ({ refId, label, trigger }: DxRefTagActivate) => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const client = context.getCapability(ClientCapabilities.Client);\n const [layout] = context.getCapabilities(Capabilities.Layout);\n const { spaceId } = parseId(layout.workspace);\n const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;\n const result = await handlePreviewLookup(client, space, { ref: refId, label });\n if (!result) {\n return;\n }\n\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n subject: result.object,\n options: {\n state: true,\n variant: 'virtual',\n anchor: trigger,\n },\n }),\n );\n };\n\n let cleanup: () => void;\n if (document.defaultView) {\n cleanup = addEventListener(\n document.defaultView,\n 'dx-ref-tag-activate' as any,\n handleDxRefTagActivate,\n customEventOptions,\n );\n } else {\n log.warn('No default view found');\n }\n\n return contributes(Capabilities.Null, null, () => cleanup());\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,cAAcC,cAAcC,aAAaC,oBAAwC;AAC1F,SAASC,wBAAwB;AACjC,SAAsBC,kBAAkB;AACxC,SAASC,eAA2B;AACpC,SAASC,WAAW;AAEpB,SAASC,WAAW;AACpB,SAASC,0BAA0B;;AAGnC,IAAMC,qBAAqB;EAAEC,SAAS;EAAMC,SAAS;AAAM;AAE3D,IAAMC,sBAAsB,OAC1BC,QACAC,cACA,EAAEC,KAAKC,MAAK,MAAkB;AAE9B,MAAI;AACF,UAAMC,MAAMX,IAAIY,MAAMH,GAAAA;AACtB,QAAI,CAACE,KAAK;AACR,aAAO;IACT;AAEA,UAAME,SAAS,MAAMf,WAAWS,QAAQI,KAAKH,YAAAA;AAC7C,WAAO;MAAEE;MAAOG;IAAO;EACzB,SAASC,KAAK;AACZ,WAAO;EACT;AACF;AAEA,IAAA,0BAAe,CAACC,YAAAA;AAEd,QAAMC,yBAAyB,OAAO,EAAEC,OAAOP,OAAOQ,QAAO,MAAoB;AAC/E,UAAM,EAAEC,iBAAiBC,SAAQ,IAAKL,QAAQM,cAAc5B,aAAa6B,gBAAgB;AACzF,UAAMf,SAASQ,QAAQM,cAAcnB,mBAAmBqB,MAAM;AAC9D,UAAM,CAACC,MAAAA,IAAUT,QAAQU,gBAAgBhC,aAAaiC,MAAM;AAC5D,UAAM,EAAEC,QAAO,IAAK5B,QAAQyB,OAAOI,SAAS;AAC5C,UAAMC,SAASF,WAAWpB,OAAOuB,OAAOC,IAAIJ,OAAAA,MAAapB,OAAOuB,OAAOE;AACvE,UAAMC,SAAS,MAAM3B,oBAAoBC,QAAQsB,OAAO;MAAEpB,KAAKQ;MAAOP;IAAM,CAAA;AAC5E,QAAI,CAACuB,QAAQ;AACX;IACF;AAEA,UAAMb,SACJxB,aAAaF,aAAawC,eAAe;MACvCC,MAAM;MACNC,SAASH,OAAOpB;MAChBwB,SAAS;QACPC,OAAO;QACPC,SAAS;QACTC,QAAQtB;MACV;IACF,CAAA,CAAA;EAEJ;AAEA,MAAIuB;AACJ,MAAIC,SAASC,aAAa;AACxBF,cAAU5C,iBACR6C,SAASC,aACT,uBACA3B,wBACAb,kBAAAA;EAEJ,OAAO;AACLF,QAAI2C,KAAK,yBAAA,QAAA;;;;;;EACX;AAEA,SAAOjD,YAAYF,aAAaoD,MAAM,MAAM,MAAMJ,QAAAA,CAAAA;AACpD;",
|
|
6
6
|
"names": ["Capabilities", "LayoutAction", "contributes", "createIntent", "addEventListener", "resolveRef", "parseId", "DXN", "log", "ClientCapabilities", "customEventOptions", "capture", "passive", "handlePreviewLookup", "client", "defaultSpace", "ref", "label", "dxn", "parse", "object", "err", "context", "handleDxRefTagActivate", "refId", "trigger", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "Client", "layout", "getCapabilities", "Layout", "spaceId", "workspace", "space", "spaces", "get", "default", "result", "UpdatePopover", "part", "subject", "options", "state", "variant", "anchor", "cleanup", "document", "defaultView", "warn", "Null"]
|
|
7
7
|
}
|
|
@@ -6,13 +6,14 @@ import {
|
|
|
6
6
|
// packages/plugins/plugin-preview/src/capabilities/react-surface.tsx
|
|
7
7
|
import React4, { useCallback } from "react";
|
|
8
8
|
import { Capabilities, LayoutAction, Surface, contributes, createIntent, createSurface, useIntentDispatcher } from "@dxos/app-framework";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { fullyQualifiedId, getSchema, getSpace } from "@dxos/client/echo";
|
|
10
|
+
import { Obj, Filter } from "@dxos/echo";
|
|
11
|
+
import { setValue } from "@dxos/echo-schema";
|
|
11
12
|
import { useTranslation } from "@dxos/react-ui";
|
|
12
13
|
import { Form } from "@dxos/react-ui-form";
|
|
13
14
|
import { Card as Card4 } from "@dxos/react-ui-stack";
|
|
14
15
|
import { TableType } from "@dxos/react-ui-table";
|
|
15
|
-
import { descriptionMessage } from "@dxos/react-ui-theme";
|
|
16
|
+
import { descriptionMessage, mx as mx2 } from "@dxos/react-ui-theme";
|
|
16
17
|
import { DataType } from "@dxos/schema";
|
|
17
18
|
|
|
18
19
|
// packages/plugins/plugin-preview/src/components/ContactCard.tsx
|
|
@@ -149,9 +150,10 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
149
150
|
role: [
|
|
150
151
|
"popover",
|
|
151
152
|
"card--kanban",
|
|
153
|
+
"card--document",
|
|
152
154
|
"card"
|
|
153
155
|
],
|
|
154
|
-
filter: (data) =>
|
|
156
|
+
filter: (data) => Obj.instanceOf(DataType.Person, data.subject),
|
|
155
157
|
component: ({ data, role }) => {
|
|
156
158
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
157
159
|
const handleOrgClick = useCallback(async (org) => {
|
|
@@ -196,9 +198,10 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
196
198
|
role: [
|
|
197
199
|
"popover",
|
|
198
200
|
"card--kanban",
|
|
201
|
+
"card--document",
|
|
199
202
|
"card"
|
|
200
203
|
],
|
|
201
|
-
filter: (data) =>
|
|
204
|
+
filter: (data) => Obj.instanceOf(DataType.Organization, data.subject),
|
|
202
205
|
component: ({ data, role }) => /* @__PURE__ */ React4.createElement(OrganizationCard, {
|
|
203
206
|
role,
|
|
204
207
|
subject: data.subject
|
|
@@ -212,9 +215,10 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
212
215
|
role: [
|
|
213
216
|
"popover",
|
|
214
217
|
"card--kanban",
|
|
218
|
+
"card--document",
|
|
215
219
|
"card"
|
|
216
220
|
],
|
|
217
|
-
filter: (data) =>
|
|
221
|
+
filter: (data) => Obj.instanceOf(DataType.Project, data.subject),
|
|
218
222
|
component: ({ data, role }) => /* @__PURE__ */ React4.createElement(ProjectCard, {
|
|
219
223
|
subject: data.subject,
|
|
220
224
|
role
|
|
@@ -228,16 +232,17 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
228
232
|
role: [
|
|
229
233
|
"popover",
|
|
230
234
|
"card--kanban",
|
|
235
|
+
"card--document",
|
|
231
236
|
"card"
|
|
232
237
|
],
|
|
233
238
|
position: "fallback",
|
|
234
|
-
filter: (data) =>
|
|
239
|
+
filter: (data) => Obj.isObject(data.subject),
|
|
235
240
|
component: ({ data, role }) => {
|
|
236
241
|
const schema = getSchema(data.subject);
|
|
237
242
|
const { t } = useTranslation(PREVIEW_PLUGIN);
|
|
238
243
|
if (!schema) {
|
|
239
244
|
return /* @__PURE__ */ React4.createElement("p", {
|
|
240
|
-
className: descriptionMessage
|
|
245
|
+
className: mx2(descriptionMessage)
|
|
241
246
|
}, t("unable to create preview message"));
|
|
242
247
|
}
|
|
243
248
|
const handleSave = useCallback((values, { changed }) => {
|
|
@@ -254,7 +259,10 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
254
259
|
values: data.subject,
|
|
255
260
|
readonly: role === "popover",
|
|
256
261
|
onSave: handleSave,
|
|
257
|
-
autoSave: true
|
|
262
|
+
autoSave: true,
|
|
263
|
+
...role === "card--kanban" && {
|
|
264
|
+
outerSpacing: "blockStart-0"
|
|
265
|
+
}
|
|
258
266
|
}));
|
|
259
267
|
}
|
|
260
268
|
})
|
|
@@ -262,4 +270,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
262
270
|
export {
|
|
263
271
|
react_surface_default as default
|
|
264
272
|
};
|
|
265
|
-
//# sourceMappingURL=react-surface-
|
|
273
|
+
//# sourceMappingURL=react-surface-UKEVHG5K.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/ContactCard.tsx", "../../../src/components/OrganizationCard.tsx", "../../../src/components/ProjectCard.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n Surface,\n contributes,\n createIntent,\n createSurface,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, getSchema, getSpace } from '@dxos/client/echo';\nimport { Obj, Filter } from '@dxos/echo';\nimport { type JsonPath, setValue } from '@dxos/echo-schema';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { Card } from '@dxos/react-ui-stack';\nimport { TableType } from '@dxos/react-ui-table';\nimport { descriptionMessage, mx } from '@dxos/react-ui-theme';\nimport { DataType } from '@dxos/schema';\n\nimport { ContactCard, OrganizationCard, ProjectCard } from '../components';\nimport { PREVIEW_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--contact`,\n role: ['popover', 'card--kanban', 'card--document', 'card'],\n filter: (data): data is { subject: DataType.Person } => Obj.instanceOf(DataType.Person, data.subject),\n component: ({ data, role }) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const handleOrgClick = useCallback(\n async (org: DataType.Organization) => {\n const space = getSpace(org);\n const tablesQuery = await space?.db.query(Filter.type(TableType)).run();\n const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {\n return table.view?.target?.query?.typename === DataType.Organization.typename;\n });\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n options: {\n state: false,\n anchorId: '',\n },\n }),\n );\n if (currentSpaceOrgTable) {\n return dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [fullyQualifiedId(currentSpaceOrgTable)],\n options: { workspace: space?.id },\n }),\n );\n }\n },\n [dispatch],\n );\n return (\n <ContactCard role={role} subject={data.subject} onOrgClick={handleOrgClick}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--organization`,\n role: ['popover', 'card--kanban', 'card--document', 'card'],\n filter: (data): data is { subject: DataType.Organization } => Obj.instanceOf(DataType.Organization, data.subject),\n component: ({ data, role }) => (\n <OrganizationCard role={role} subject={data.subject}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--project`,\n role: ['popover', 'card--kanban', 'card--document', 'card'],\n filter: (data): data is { subject: DataType.Project } => Obj.instanceOf(DataType.Project, data.subject),\n component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,\n }),\n\n //\n // Fallback for any object.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/fallback-popover`,\n role: ['popover', 'card--kanban', 'card--document', 'card'],\n position: 'fallback',\n filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),\n component: ({ data, role }) => {\n const schema = getSchema(data.subject);\n const { t } = useTranslation(PREVIEW_PLUGIN);\n if (!schema) {\n // TODO(burdon): Use Alert.\n return <p className={mx(descriptionMessage)}>{t('unable to create preview message')}</p>;\n }\n\n const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {\n const changedPaths = Object.keys(changed).filter((path) => changed[path]);\n for (const path of changedPaths) {\n const value = values[path];\n setValue(data.subject, path as JsonPath, value);\n }\n }, []);\n\n return (\n <Card.Container role={role}>\n <Form\n schema={schema}\n values={data.subject}\n readonly={role === 'popover'}\n onSave={handleSave}\n autoSave\n {...(role === 'card--kanban' && { outerSpacing: 'blockStart-0' })}\n />\n </Card.Container>\n );\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Icon, Avatar, Button } from '@dxos/react-ui';\nimport { Card, cardHeading, cardText } from '@dxos/react-ui-stack';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ContactCard = ({\n children,\n subject: { fullName, image, organization, emails },\n onOrgClick,\n role,\n}: PreviewProps<DataType.Person> & { onOrgClick?: (org: DataType.Organization) => void }) => {\n const organizationName = organization && typeof organization === 'object' ? organization.target?.name : organization;\n return (\n <Card.Container role={role}>\n <Avatar.Root>\n <Card.Text role='group' classNames='grid gap-3 grid-cols-[min-content_1fr]'>\n <Avatar.Content imgSrc={image} icon='ph--user--regular' size={16} hue='neutral' />\n <div role='none' className='bs-min self-center'>\n <Avatar.Label asChild>\n <h2 className={cardHeading}>{fullName}</h2>\n </Avatar.Label>\n </div>\n </Card.Text>\n </Avatar.Root>\n {organizationName && (\n <Card.Chrome>\n {typeof organization === 'object' && onOrgClick ? (\n <Button variant='ghost' classNames='gap-2 text-start' onClick={() => onOrgClick(organization.target!)}>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n <Icon icon='ph--arrow-right--regular' />\n </Button>\n ) : (\n <p className='dx-button gap-2' data-variant='ghost'>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n </p>\n )}\n </Card.Chrome>\n )}\n <dl\n className={mx(\n cardText,\n 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',\n )}\n >\n {emails?.length &&\n emails.map(({ label, value }) => (\n <Fragment key={value}>\n <dt>\n <Icon icon='ph--at--regular' size={5} />\n </dt>\n <dd key={value} className='break-words'>\n {value}\n </dd>\n </Fragment>\n ))}\n </dl>\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const OrganizationCard = ({\n children,\n subject: { name, image, description, website },\n role,\n}: PreviewProps<DataType.Organization>) => {\n return (\n <Card.Container role={role}>\n <Card.Poster alt={name!} {...(image ? { image } : { icon: 'ph--building-office--regular' })} />\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n {website && (\n <Card.Chrome>\n <a\n className='dx-button dx-focus-ring gap-2'\n data-variant='ghost'\n href={website}\n target='_blank'\n rel='noreferrer'\n >\n <Icon icon='ph--link--regular' size={5} classNames='text-subdued' />\n <span className='grow'>{website}</span>\n <Icon icon='ph--arrow-square-out--regular' />\n </a>\n </Card.Chrome>\n )}\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ProjectCard = ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => {\n return (\n <Card.Container role={role}>\n {image && <Card.Poster image={image} alt={name} aspect='auto' />}\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n </Card.Container>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,OAAOA,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;MAAW;MAAgB;MAAkB;;IACpDiD,UAAU;IACVhD,QAAQ,CAACC,SAAuCC,IAAI+C,SAAShD,KAAKK,OAAO;IACzEC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAE;AACxB,YAAMmD,SAASC,UAAUlD,KAAKK,OAAO;AACrC,YAAM,EAAE8C,EAAC,IAAKC,eAAevD,cAAAA;AAC7B,UAAI,CAACoD,QAAQ;AAEX,eAAO,gBAAAT,OAAA,cAACa,KAAAA;UAAEC,WAAWC,IAAGC,kBAAAA;WAAsBL,EAAE,kCAAA,CAAA;MAClD;AAEA,YAAMM,aAAa9C,YAAY,CAAC+C,QAAa,EAAEC,QAAO,MAAwC;AAC5F,cAAMC,eAAeC,OAAOC,KAAKH,OAAAA,EAAS5D,OAAO,CAACgE,SAASJ,QAAQI,IAAAA,CAAK;AACxE,mBAAWA,QAAQH,cAAc;AAC/B,gBAAMI,QAAQN,OAAOK,IAAAA;AACrBE,mBAASjE,KAAKK,SAAS0D,MAAkBC,KAAAA;QAC3C;MACF,GAAG,CAAA,CAAE;AAEL,aACE,gBAAAxB,OAAA,cAAC0B,MAAKC,WAAS;QAACrE;SACd,gBAAA0C,OAAA,cAAC4B,MAAAA;QACCnB;QACAS,QAAQ1D,KAAKK;QACbgE,UAAUvE,SAAS;QACnBwE,QAAQb;QACRc,UAAAA;QACC,GAAIzE,SAAS,kBAAkB;UAAE0E,cAAc;QAAe;;IAIvE;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["React", "useCallback", "Capabilities", "LayoutAction", "Surface", "contributes", "createIntent", "createSurface", "useIntentDispatcher", "fullyQualifiedId", "getSchema", "getSpace", "Obj", "Filter", "setValue", "useTranslation", "Form", "Card", "TableType", "descriptionMessage", "mx", "DataType", "React", "Fragment", "Icon", "Avatar", "Button", "Card", "cardHeading", "cardText", "mx", "ContactCard", "children", "subject", "fullName", "image", "organization", "emails", "onOrgClick", "role", "organizationName", "target", "name", "Card", "Container", "Avatar", "Root", "Text", "classNames", "Content", "imgSrc", "icon", "size", "hue", "div", "className", "Label", "asChild", "h2", "cardHeading", "Chrome", "Button", "variant", "onClick", "Icon", "span", "p", "data-variant", "dl", "mx", "cardText", "length", "map", "label", "value", "Fragment", "key", "dt", "dd", "React", "Icon", "Card", "OrganizationCard", "children", "subject", "name", "image", "description", "website", "role", "React", "Card", "Container", "Poster", "alt", "icon", "Heading", "Text", "classNames", "Chrome", "a", "className", "data-variant", "href", "target", "rel", "Icon", "size", "span", "React", "Card", "ProjectCard", "subject", "name", "image", "description", "role", "React", "Card", "Container", "Poster", "alt", "aspect", "Heading", "Text", "classNames", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PREVIEW_PLUGIN", "role", "filter", "data", "Obj", "instanceOf", "DataType", "Person", "subject", "component", "dispatchPromise", "dispatch", "useIntentDispatcher", "handleOrgClick", "useCallback", "org", "space", "getSpace", "tablesQuery", "db", "query", "Filter", "type", "TableType", "run", "currentSpaceOrgTable", "objects", "find", "table", "view", "target", "typename", "Organization", "createIntent", "LayoutAction", "UpdatePopover", "part", "options", "state", "anchorId", "Open", "fullyQualifiedId", "workspace", "React", "ContactCard", "onOrgClick", "Surface", "OrganizationCard", "Project", "ProjectCard", "position", "isObject", "schema", "getSchema", "t", "useTranslation", "p", "className", "mx", "descriptionMessage", "handleSave", "values", "changed", "changedPaths", "Object", "keys", "path", "value", "setValue", "Card", "Container", "Form", "readonly", "onSave", "autoSave", "outerSpacing"]
|
|
7
|
+
}
|
|
@@ -16,8 +16,7 @@ export declare const ContactWithImage: {
|
|
|
16
16
|
onOrgClick?: (org: DataType.Organization) => void;
|
|
17
17
|
}) => React.JSX.Element;
|
|
18
18
|
icon: string;
|
|
19
|
-
subject:
|
|
20
|
-
readonly id: string;
|
|
19
|
+
subject: import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
21
20
|
fields?: {
|
|
22
21
|
readonly label: string;
|
|
23
22
|
readonly category?: string | undefined;
|
|
@@ -27,9 +26,9 @@ export declare const ContactWithImage: {
|
|
|
27
26
|
preferredName?: string | undefined;
|
|
28
27
|
nickname?: string | undefined;
|
|
29
28
|
image?: string | undefined;
|
|
30
|
-
organization?: import("@dxos/echo-schema").Ref<{
|
|
31
|
-
readonly id: string;
|
|
29
|
+
organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
32
30
|
description?: string | undefined;
|
|
31
|
+
id: string;
|
|
33
32
|
name?: string | undefined;
|
|
34
33
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
35
34
|
image?: string | undefined;
|
|
@@ -67,11 +66,7 @@ export declare const ContactWithImage: {
|
|
|
67
66
|
readonly value: string;
|
|
68
67
|
}[] | undefined;
|
|
69
68
|
birthday?: string | undefined;
|
|
70
|
-
}
|
|
71
|
-
id?: string;
|
|
72
|
-
} & {
|
|
73
|
-
id: string;
|
|
74
|
-
};
|
|
69
|
+
}>;
|
|
75
70
|
role: string;
|
|
76
71
|
};
|
|
77
72
|
};
|
|
@@ -89,18 +84,14 @@ export declare const OrganizationWithImage: {
|
|
|
89
84
|
args: {
|
|
90
85
|
Component: ({ children, subject: { name, image, description, website }, role, }: PreviewProps<DataType.Organization>) => React.JSX.Element;
|
|
91
86
|
icon: string;
|
|
92
|
-
subject:
|
|
93
|
-
readonly id: string;
|
|
87
|
+
subject: import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
94
88
|
image?: string | undefined;
|
|
89
|
+
id: string;
|
|
95
90
|
status?: "active" | "prospect" | "qualified" | "commit" | "reject" | undefined;
|
|
96
91
|
name?: string | undefined;
|
|
97
92
|
description?: string | undefined;
|
|
98
93
|
website?: string | undefined;
|
|
99
|
-
}
|
|
100
|
-
id?: string;
|
|
101
|
-
} & {
|
|
102
|
-
id: string;
|
|
103
|
-
};
|
|
94
|
+
}>;
|
|
104
95
|
role: string;
|
|
105
96
|
};
|
|
106
97
|
};
|
|
@@ -116,16 +107,12 @@ export declare const ProjectWithImage: {
|
|
|
116
107
|
args: {
|
|
117
108
|
Component: ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => React.JSX.Element;
|
|
118
109
|
icon: string;
|
|
119
|
-
subject:
|
|
120
|
-
readonly id: string;
|
|
110
|
+
subject: import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
121
111
|
image?: string | undefined;
|
|
112
|
+
id: string;
|
|
122
113
|
name: string;
|
|
123
114
|
description?: string | undefined;
|
|
124
|
-
}
|
|
125
|
-
id?: string;
|
|
126
|
-
} & {
|
|
127
|
-
id: string;
|
|
128
|
-
};
|
|
115
|
+
}>;
|
|
129
116
|
role: string;
|
|
130
117
|
};
|
|
131
118
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preview.stories.d.ts","sourceRoot":"","sources":["../../../src/Preview.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Preview.stories.d.ts","sourceRoot":"","sources":["../../../src/Preview.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,KAAK,UAAU,GAAG;IAChB,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAsB1B,CAAC;AAEF,eAAe,IAAI,CAAC;AA2CpB,eAAO,MAAM,gBAAgB;;;sBA7EpB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFT,CAAC;AAEF,eAAO,MAAM,cAAc;;;sBAtFlB,CAAC;;;;;;CA6FT,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;CAOjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;CAO/B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;CAO5B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-popover.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/preview-popover.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyD,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;yBA8BhG,SAAS,aAAa;AAAtC,
|
|
1
|
+
{"version":3,"file":"preview-popover.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/preview-popover.ts"],"names":[],"mappings":"AAIA,OAAO,EAAyD,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;yBA8BhG,SAAS,aAAa;AAAtC,wBAuCE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EAOb,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EAOb,MAAM,qBAAqB,CAAC;;AAc7B,wBAqGK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-preview",
|
|
3
|
-
"version": "0.8.3-
|
|
3
|
+
"version": "0.8.3-staging.0fa589b",
|
|
4
4
|
"description": "Preview plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -25,31 +25,32 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@preact-signals/safe-react": "^0.9.0",
|
|
27
27
|
"effect": "3.14.21",
|
|
28
|
-
"@dxos/app-framework": "0.8.3-
|
|
29
|
-
"@dxos/client": "0.8.3-
|
|
30
|
-
"@dxos/async": "0.8.3-
|
|
31
|
-
"@dxos/echo
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/keys": "0.8.3-
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/log": "0.8.3-
|
|
36
|
-
"@dxos/plugin-client": "0.8.3-
|
|
37
|
-
"@dxos/react-
|
|
38
|
-
"@dxos/react-
|
|
39
|
-
"@dxos/react-ui-editor": "0.8.3-
|
|
40
|
-
"@dxos/react-ui-form": "0.8.3-
|
|
41
|
-
"@dxos/react-ui-stack": "0.8.3-
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
28
|
+
"@dxos/app-framework": "0.8.3-staging.0fa589b",
|
|
29
|
+
"@dxos/client": "0.8.3-staging.0fa589b",
|
|
30
|
+
"@dxos/async": "0.8.3-staging.0fa589b",
|
|
31
|
+
"@dxos/echo": "0.8.3-staging.0fa589b",
|
|
32
|
+
"@dxos/echo-schema": "0.8.3-staging.0fa589b",
|
|
33
|
+
"@dxos/keys": "0.8.3-staging.0fa589b",
|
|
34
|
+
"@dxos/lit-ui": "0.8.3-staging.0fa589b",
|
|
35
|
+
"@dxos/log": "0.8.3-staging.0fa589b",
|
|
36
|
+
"@dxos/plugin-client": "0.8.3-staging.0fa589b",
|
|
37
|
+
"@dxos/react-ui": "0.8.3-staging.0fa589b",
|
|
38
|
+
"@dxos/react-client": "0.8.3-staging.0fa589b",
|
|
39
|
+
"@dxos/react-ui-editor": "0.8.3-staging.0fa589b",
|
|
40
|
+
"@dxos/react-ui-form": "0.8.3-staging.0fa589b",
|
|
41
|
+
"@dxos/react-ui-stack": "0.8.3-staging.0fa589b",
|
|
42
|
+
"@dxos/react-ui-theme": "0.8.3-staging.0fa589b",
|
|
43
|
+
"@dxos/schema": "0.8.3-staging.0fa589b",
|
|
44
|
+
"@dxos/react-ui-table": "0.8.3-staging.0fa589b",
|
|
45
|
+
"@dxos/util": "0.8.3-staging.0fa589b"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"effect": "3.14.21",
|
|
49
49
|
"react": "~18.2.0",
|
|
50
50
|
"react-dom": "~18.2.0",
|
|
51
51
|
"vite": "5.4.7",
|
|
52
|
-
"@dxos/random": "0.8.3-
|
|
52
|
+
"@dxos/random": "0.8.3-staging.0fa589b",
|
|
53
|
+
"@dxos/storybook-utils": "0.8.3-staging.0fa589b"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"effect": "^3.13.3",
|
package/src/Preview.stories.tsx
CHANGED
|
@@ -7,9 +7,8 @@ import '@dxos-theme';
|
|
|
7
7
|
import { type Meta } from '@storybook/react';
|
|
8
8
|
import React, { type FC } from 'react';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
11
11
|
import { faker } from '@dxos/random';
|
|
12
|
-
import { makeRef } from '@dxos/react-client/echo';
|
|
13
12
|
import { Icon, Popover } from '@dxos/react-ui';
|
|
14
13
|
import { DataType } from '@dxos/schema';
|
|
15
14
|
import { withTheme, withLayout } from '@dxos/storybook-utils';
|
|
@@ -32,7 +31,9 @@ const meta: Meta<StoryProps> = {
|
|
|
32
31
|
return (
|
|
33
32
|
<Popover.Root open>
|
|
34
33
|
<Popover.Content>
|
|
35
|
-
<
|
|
34
|
+
<Popover.Viewport>
|
|
35
|
+
<Component {...args} role='popover' />
|
|
36
|
+
</Popover.Viewport>
|
|
36
37
|
<Popover.Arrow />
|
|
37
38
|
</Popover.Content>
|
|
38
39
|
<Popover.Trigger>
|
|
@@ -53,7 +54,7 @@ export default meta;
|
|
|
53
54
|
const omitImage = ({ image, ...rest }: any) => rest;
|
|
54
55
|
|
|
55
56
|
const data = (() => {
|
|
56
|
-
const organization =
|
|
57
|
+
const organization = Obj.make(DataType.Organization, {
|
|
57
58
|
name: faker.company.name(),
|
|
58
59
|
image:
|
|
59
60
|
'https://plus.unsplash.com/premium_photo-1672116452571-896980a801c8?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
@@ -61,11 +62,11 @@ const data = (() => {
|
|
|
61
62
|
description: faker.lorem.paragraph(),
|
|
62
63
|
});
|
|
63
64
|
|
|
64
|
-
const contact =
|
|
65
|
+
const contact = Obj.make(DataType.Person, {
|
|
65
66
|
fullName: faker.person.fullName(),
|
|
66
67
|
image:
|
|
67
68
|
'https://plus.unsplash.com/premium_photo-1664536392779-049ba8fde933?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
68
|
-
organization:
|
|
69
|
+
organization: Ref.make(organization),
|
|
69
70
|
emails: [
|
|
70
71
|
{
|
|
71
72
|
label: 'Work',
|
|
@@ -82,7 +83,7 @@ const data = (() => {
|
|
|
82
83
|
],
|
|
83
84
|
});
|
|
84
85
|
|
|
85
|
-
const project =
|
|
86
|
+
const project = Obj.make(DataType.Project, {
|
|
86
87
|
name: faker.person.fullName(),
|
|
87
88
|
image: 'https://dxos.network/dxos-logotype-blue.png',
|
|
88
89
|
description: faker.lorem.paragraph(),
|
|
@@ -60,7 +60,12 @@ export default (context: PluginContext) => {
|
|
|
60
60
|
|
|
61
61
|
let cleanup: () => void;
|
|
62
62
|
if (document.defaultView) {
|
|
63
|
-
cleanup = addEventListener(
|
|
63
|
+
cleanup = addEventListener(
|
|
64
|
+
document.defaultView,
|
|
65
|
+
'dx-ref-tag-activate' as any,
|
|
66
|
+
handleDxRefTagActivate,
|
|
67
|
+
customEventOptions,
|
|
68
|
+
);
|
|
64
69
|
} else {
|
|
65
70
|
log.warn('No default view found');
|
|
66
71
|
}
|
|
@@ -13,13 +13,14 @@ import {
|
|
|
13
13
|
createSurface,
|
|
14
14
|
useIntentDispatcher,
|
|
15
15
|
} from '@dxos/app-framework';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { fullyQualifiedId, getSchema, getSpace } from '@dxos/client/echo';
|
|
17
|
+
import { Obj, Filter } from '@dxos/echo';
|
|
18
|
+
import { type JsonPath, setValue } from '@dxos/echo-schema';
|
|
18
19
|
import { useTranslation } from '@dxos/react-ui';
|
|
19
20
|
import { Form } from '@dxos/react-ui-form';
|
|
20
21
|
import { Card } from '@dxos/react-ui-stack';
|
|
21
22
|
import { TableType } from '@dxos/react-ui-table';
|
|
22
|
-
import { descriptionMessage } from '@dxos/react-ui-theme';
|
|
23
|
+
import { descriptionMessage, mx } from '@dxos/react-ui-theme';
|
|
23
24
|
import { DataType } from '@dxos/schema';
|
|
24
25
|
|
|
25
26
|
import { ContactCard, OrganizationCard, ProjectCard } from '../components';
|
|
@@ -32,8 +33,8 @@ export default () =>
|
|
|
32
33
|
//
|
|
33
34
|
createSurface({
|
|
34
35
|
id: `${PREVIEW_PLUGIN}/schema-popover--contact`,
|
|
35
|
-
role: ['popover', 'card--kanban', 'card'],
|
|
36
|
-
filter: (data): data is { subject: DataType.Person } =>
|
|
36
|
+
role: ['popover', 'card--kanban', 'card--document', 'card'],
|
|
37
|
+
filter: (data): data is { subject: DataType.Person } => Obj.instanceOf(DataType.Person, data.subject),
|
|
37
38
|
component: ({ data, role }) => {
|
|
38
39
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
39
40
|
const handleOrgClick = useCallback(
|
|
@@ -73,8 +74,8 @@ export default () =>
|
|
|
73
74
|
}),
|
|
74
75
|
createSurface({
|
|
75
76
|
id: `${PREVIEW_PLUGIN}/schema-popover--organization`,
|
|
76
|
-
role: ['popover', 'card--kanban', 'card'],
|
|
77
|
-
filter: (data): data is { subject: DataType.Organization } =>
|
|
77
|
+
role: ['popover', 'card--kanban', 'card--document', 'card'],
|
|
78
|
+
filter: (data): data is { subject: DataType.Organization } => Obj.instanceOf(DataType.Organization, data.subject),
|
|
78
79
|
component: ({ data, role }) => (
|
|
79
80
|
<OrganizationCard role={role} subject={data.subject}>
|
|
80
81
|
{role === 'popover' && <Surface role='related' data={data} />}
|
|
@@ -83,8 +84,8 @@ export default () =>
|
|
|
83
84
|
}),
|
|
84
85
|
createSurface({
|
|
85
86
|
id: `${PREVIEW_PLUGIN}/schema-popover--project`,
|
|
86
|
-
role: ['popover', 'card--kanban', 'card'],
|
|
87
|
-
filter: (data): data is { subject: DataType.Project } =>
|
|
87
|
+
role: ['popover', 'card--kanban', 'card--document', 'card'],
|
|
88
|
+
filter: (data): data is { subject: DataType.Project } => Obj.instanceOf(DataType.Project, data.subject),
|
|
88
89
|
component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,
|
|
89
90
|
}),
|
|
90
91
|
|
|
@@ -93,14 +94,15 @@ export default () =>
|
|
|
93
94
|
//
|
|
94
95
|
createSurface({
|
|
95
96
|
id: `${PREVIEW_PLUGIN}/fallback-popover`,
|
|
96
|
-
role: ['popover', 'card--kanban', 'card'],
|
|
97
|
+
role: ['popover', 'card--kanban', 'card--document', 'card'],
|
|
97
98
|
position: 'fallback',
|
|
98
|
-
filter: (data): data is { subject:
|
|
99
|
+
filter: (data): data is { subject: Obj.Any } => Obj.isObject(data.subject),
|
|
99
100
|
component: ({ data, role }) => {
|
|
100
101
|
const schema = getSchema(data.subject);
|
|
101
102
|
const { t } = useTranslation(PREVIEW_PLUGIN);
|
|
102
103
|
if (!schema) {
|
|
103
|
-
|
|
104
|
+
// TODO(burdon): Use Alert.
|
|
105
|
+
return <p className={mx(descriptionMessage)}>{t('unable to create preview message')}</p>;
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {
|
|
@@ -113,7 +115,14 @@ export default () =>
|
|
|
113
115
|
|
|
114
116
|
return (
|
|
115
117
|
<Card.Container role={role}>
|
|
116
|
-
<Form
|
|
118
|
+
<Form
|
|
119
|
+
schema={schema}
|
|
120
|
+
values={data.subject}
|
|
121
|
+
readonly={role === 'popover'}
|
|
122
|
+
onSave={handleSave}
|
|
123
|
+
autoSave
|
|
124
|
+
{...(role === 'card--kanban' && { outerSpacing: 'blockStart-0' })}
|
|
125
|
+
/>
|
|
117
126
|
</Card.Container>
|
|
118
127
|
);
|
|
119
128
|
},
|