@dxos/plugin-preview 0.8.3-staging.0fa589b → 0.8.4-main.c1de068
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/{chunk-LFAK2TMG.mjs → chunk-Z73ENKLE.mjs} +2 -2
- package/dist/lib/browser/index.mjs +10 -10
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{preview-popover-NRFVC4QQ.mjs → preview-popover-2UCEZUQW.mjs} +3 -3
- package/dist/lib/browser/{react-surface-J2R6Q33B.mjs → react-surface-CZMUEWPV.mjs} +73 -42
- package/dist/lib/browser/react-surface-CZMUEWPV.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7BPXNL44.mjs → chunk-2ORSL4GJ.mjs} +2 -2
- package/dist/lib/node-esm/index.mjs +10 -10
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{preview-popover-HBGSL64N.mjs → preview-popover-OSHWR2YE.mjs} +3 -3
- package/dist/lib/node-esm/{react-surface-UKEVHG5K.mjs → react-surface-IPZBISWS.mjs} +73 -42
- package/dist/lib/node-esm/react-surface-IPZBISWS.mjs.map +7 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/testing/ExtrinsicPreviews.stories.d.ts +35 -0
- package/dist/types/src/testing/ExtrinsicPreviews.stories.d.ts.map +1 -0
- package/dist/types/src/testing/IntrinsicPreviews.stories.d.ts +35 -0
- package/dist/types/src/testing/IntrinsicPreviews.stories.d.ts.map +1 -0
- package/dist/types/src/testing/PopoverPreviews.stories.d.ts +35 -0
- package/dist/types/src/testing/PopoverPreviews.stories.d.ts.map +1 -0
- package/dist/types/src/testing/util.d.ts +80 -0
- package/dist/types/src/testing/util.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +6 -6
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -23
- package/src/PreviewPlugin.tsx +1 -1
- package/src/capabilities/react-surface.tsx +70 -37
- package/src/components/ContactCard.tsx +2 -2
- package/src/components/OrganizationCard.tsx +2 -2
- package/src/components/ProjectCard.tsx +2 -2
- package/src/index.ts +1 -1
- package/src/testing/ExtrinsicPreviews.stories.tsx +55 -0
- package/src/testing/IntrinsicPreviews.stories.tsx +55 -0
- package/src/testing/PopoverPreviews.stories.tsx +55 -0
- package/src/testing/util.tsx +79 -0
- package/src/translations.ts +6 -4
- package/dist/lib/browser/react-surface-J2R6Q33B.mjs.map +0 -7
- package/dist/lib/node/chunk-XGHMBEIV.cjs +0 -37
- package/dist/lib/node/chunk-XGHMBEIV.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -85
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/preview-popover-HIXRYF6L.cjs +0 -88
- package/dist/lib/node/preview-popover-HIXRYF6L.cjs.map +0 -7
- package/dist/lib/node/react-surface-ZSNNAKBG.cjs +0 -290
- package/dist/lib/node/react-surface-ZSNNAKBG.cjs.map +0 -7
- package/dist/lib/node-esm/react-surface-UKEVHG5K.mjs.map +0 -7
- package/dist/types/src/Preview.stories.d.ts +0 -127
- package/dist/types/src/Preview.stories.d.ts.map +0 -1
- package/src/Preview.stories.tsx +0 -147
- /package/dist/lib/browser/{chunk-LFAK2TMG.mjs.map → chunk-Z73ENKLE.mjs.map} +0 -0
- /package/dist/lib/browser/{preview-popover-NRFVC4QQ.mjs.map → preview-popover-2UCEZUQW.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-7BPXNL44.mjs.map → chunk-2ORSL4GJ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{preview-popover-HBGSL64N.mjs.map → preview-popover-OSHWR2YE.mjs.map} +0 -0
|
@@ -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":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}}}
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1243,"imports":[],"format":"esm"},"src/capabilities/preview-popover.ts":{"bytes":8497,"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"},"src/components/ContactCard.tsx":{"bytes":9246,"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"},"src/components/OrganizationCard.tsx":{"bytes":4740,"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"},"src/components/ProjectCard.tsx":{"bytes":2578,"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"},"src/components/index.ts":{"bytes":687,"imports":[{"path":"src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":24033,"imports":[{"path":"effect","kind":"import-statement","external":true},{"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/plugin-attention/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1037,"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/translations.ts":{"bytes":1178,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/PreviewPlugin.tsx":{"bytes":4743,"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":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":595,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3231},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-2ORSL4GJ.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":"dist/lib/node-esm/preview-popover-OSHWR2YE.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/react-surface-IPZBISWS.mjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/PreviewPlugin.tsx":{"bytesInOutput":952},"src/capabilities/index.ts":{"bytesInOutput":190},"src/translations.ts":{"bytesInOutput":137}},"bytes":1631},"dist/lib/node-esm/preview-popover-OSHWR2YE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4454},"dist/lib/node-esm/preview-popover-OSHWR2YE.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":"src/capabilities/preview-popover.ts","inputs":{"src/capabilities/preview-popover.ts":{"bytesInOutput":2066}},"bytes":2301},"dist/lib/node-esm/react-surface-IPZBISWS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19895},"dist/lib/node-esm/react-surface-IPZBISWS.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-2ORSL4GJ.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"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/plugin-attention/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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/types","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":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":5926},"src/components/ContactCard.tsx":{"bytesInOutput":2884},"src/components/index.ts":{"bytesInOutput":0},"src/components/OrganizationCard.tsx":{"bytesInOutput":1438},"src/components/ProjectCard.tsx":{"bytesInOutput":709}},"bytes":11393},"dist/lib/node-esm/chunk-2ORSL4GJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":615},"dist/lib/node-esm/chunk-2ORSL4GJ.mjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":216}},"bytes":406}}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
//
|
|
3
|
+
// src/capabilities/preview-popover.ts
|
|
4
4
|
import { Capabilities, LayoutAction, contributes, createIntent } from "@dxos/app-framework";
|
|
5
5
|
import { addEventListener } from "@dxos/async";
|
|
6
6
|
import { resolveRef } from "@dxos/client";
|
|
@@ -8,7 +8,7 @@ import { parseId } from "@dxos/client/echo";
|
|
|
8
8
|
import { DXN } from "@dxos/keys";
|
|
9
9
|
import { log } from "@dxos/log";
|
|
10
10
|
import { ClientCapabilities } from "@dxos/plugin-client";
|
|
11
|
-
var __dxlog_file = "/
|
|
11
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-preview/src/capabilities/preview-popover.ts";
|
|
12
12
|
var customEventOptions = {
|
|
13
13
|
capture: true,
|
|
14
14
|
passive: false
|
|
@@ -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-OSHWR2YE.mjs.map
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
PREVIEW_PLUGIN
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2ORSL4GJ.mjs";
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// src/capabilities/react-surface.tsx
|
|
7
|
+
import { Effect } from "effect";
|
|
7
8
|
import React4, { useCallback } from "react";
|
|
8
9
|
import { Capabilities, LayoutAction, Surface, contributes, createIntent, createSurface, useIntentDispatcher } from "@dxos/app-framework";
|
|
9
10
|
import { fullyQualifiedId, getSchema, getSpace } from "@dxos/client/echo";
|
|
10
|
-
import {
|
|
11
|
+
import { Filter, Obj } from "@dxos/echo";
|
|
11
12
|
import { setValue } from "@dxos/echo-schema";
|
|
13
|
+
import { AttentionAction } from "@dxos/plugin-attention/types";
|
|
14
|
+
import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from "@dxos/plugin-deck/types";
|
|
15
|
+
import { useQuery, useSpace } from "@dxos/react-client/echo";
|
|
12
16
|
import { useTranslation } from "@dxos/react-ui";
|
|
13
17
|
import { Form } from "@dxos/react-ui-form";
|
|
14
18
|
import { Card as Card4 } from "@dxos/react-ui-stack";
|
|
15
|
-
import {
|
|
19
|
+
import { TableView } from "@dxos/react-ui-table/types";
|
|
16
20
|
import { descriptionMessage, mx as mx2 } from "@dxos/react-ui-theme";
|
|
17
21
|
import { DataType } from "@dxos/schema";
|
|
18
22
|
|
|
19
|
-
//
|
|
23
|
+
// src/components/ContactCard.tsx
|
|
20
24
|
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
21
25
|
import React, { Fragment } from "react";
|
|
22
26
|
import { Icon, Avatar, Button } from "@dxos/react-ui";
|
|
@@ -26,7 +30,7 @@ var ContactCard = ({ children, subject: { fullName, image, organization, emails
|
|
|
26
30
|
var _effect = _useSignals();
|
|
27
31
|
try {
|
|
28
32
|
const organizationName = organization && typeof organization === "object" ? organization.target?.name : organization;
|
|
29
|
-
return /* @__PURE__ */ React.createElement(Card.
|
|
33
|
+
return /* @__PURE__ */ React.createElement(Card.SurfaceRoot, {
|
|
30
34
|
role
|
|
31
35
|
}, /* @__PURE__ */ React.createElement(Avatar.Root, null, /* @__PURE__ */ React.createElement(Card.Text, {
|
|
32
36
|
role: "group",
|
|
@@ -80,7 +84,7 @@ var ContactCard = ({ children, subject: { fullName, image, organization, emails
|
|
|
80
84
|
}
|
|
81
85
|
};
|
|
82
86
|
|
|
83
|
-
//
|
|
87
|
+
// src/components/OrganizationCard.tsx
|
|
84
88
|
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
85
89
|
import React2 from "react";
|
|
86
90
|
import { Icon as Icon2 } from "@dxos/react-ui";
|
|
@@ -88,7 +92,7 @@ import { Card as Card2 } from "@dxos/react-ui-stack";
|
|
|
88
92
|
var OrganizationCard = ({ children, subject: { name, image, description, website }, role }) => {
|
|
89
93
|
var _effect = _useSignals2();
|
|
90
94
|
try {
|
|
91
|
-
return /* @__PURE__ */ React2.createElement(Card2.
|
|
95
|
+
return /* @__PURE__ */ React2.createElement(Card2.SurfaceRoot, {
|
|
92
96
|
role
|
|
93
97
|
}, /* @__PURE__ */ React2.createElement(Card2.Poster, {
|
|
94
98
|
alt: name,
|
|
@@ -119,14 +123,14 @@ var OrganizationCard = ({ children, subject: { name, image, description, website
|
|
|
119
123
|
}
|
|
120
124
|
};
|
|
121
125
|
|
|
122
|
-
//
|
|
126
|
+
// src/components/ProjectCard.tsx
|
|
123
127
|
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
124
128
|
import React3 from "react";
|
|
125
129
|
import { Card as Card3 } from "@dxos/react-ui-stack";
|
|
126
130
|
var ProjectCard = ({ subject: { name, image, description }, role }) => {
|
|
127
131
|
var _effect = _useSignals3();
|
|
128
132
|
try {
|
|
129
|
-
return /* @__PURE__ */ React3.createElement(Card3.
|
|
133
|
+
return /* @__PURE__ */ React3.createElement(Card3.SurfaceRoot, {
|
|
130
134
|
role
|
|
131
135
|
}, image && /* @__PURE__ */ React3.createElement(Card3.Poster, {
|
|
132
136
|
image,
|
|
@@ -140,7 +144,7 @@ var ProjectCard = ({ subject: { name, image, description }, role }) => {
|
|
|
140
144
|
}
|
|
141
145
|
};
|
|
142
146
|
|
|
143
|
-
//
|
|
147
|
+
// src/capabilities/react-surface.tsx
|
|
144
148
|
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
145
149
|
//
|
|
146
150
|
// Specific schema types.
|
|
@@ -148,46 +152,70 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
148
152
|
createSurface({
|
|
149
153
|
id: `${PREVIEW_PLUGIN}/schema-popover--contact`,
|
|
150
154
|
role: [
|
|
151
|
-
"popover",
|
|
152
|
-
"card--
|
|
153
|
-
"card--
|
|
155
|
+
"card--popover",
|
|
156
|
+
"card--intrinsic",
|
|
157
|
+
"card--transclusion",
|
|
158
|
+
"card--extrinsic",
|
|
154
159
|
"card"
|
|
155
160
|
],
|
|
156
161
|
filter: (data) => Obj.instanceOf(DataType.Person, data.subject),
|
|
157
162
|
component: ({ data, role }) => {
|
|
158
|
-
const {
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
const { dispatch } = useIntentDispatcher();
|
|
164
|
+
const space = getSpace(data.subject);
|
|
165
|
+
const defaultSpace = useSpace();
|
|
166
|
+
const currentSpaceOrgs = useQuery(space, Filter.type(DataType.Organization));
|
|
167
|
+
const currentSpaceViews = useQuery(space, Filter.type(DataType.View));
|
|
168
|
+
const defaultSpaceViews = useQuery(defaultSpace, Filter.type(DataType.View));
|
|
169
|
+
const currentSpaceOrgTable = currentSpaceViews.find((view) => view.query.typename === DataType.Organization.typename && Obj.instanceOf(TableView, view.presentation.target));
|
|
170
|
+
const defaultSpaceOrgTable = defaultSpaceViews.find((view) => view.query.typename === DataType.Organization.typename && Obj.instanceOf(TableView, view.presentation.target));
|
|
171
|
+
const handleOrgClick = useCallback((org) => Effect.gen(function* () {
|
|
172
|
+
const view = currentSpaceOrgs.includes(org) ? currentSpaceOrgTable : defaultSpaceOrgTable;
|
|
173
|
+
yield* dispatch(createIntent(LayoutAction.UpdatePopover, {
|
|
166
174
|
part: "popover",
|
|
167
175
|
options: {
|
|
168
176
|
state: false,
|
|
169
177
|
anchorId: ""
|
|
170
178
|
}
|
|
171
179
|
}));
|
|
172
|
-
if (
|
|
173
|
-
|
|
180
|
+
if (view) {
|
|
181
|
+
const id = fullyQualifiedId(view);
|
|
182
|
+
yield* dispatch(createIntent(LayoutAction.Open, {
|
|
174
183
|
part: "main",
|
|
175
184
|
subject: [
|
|
176
|
-
|
|
185
|
+
id
|
|
177
186
|
],
|
|
178
187
|
options: {
|
|
179
188
|
workspace: space?.id
|
|
180
189
|
}
|
|
181
190
|
}));
|
|
191
|
+
yield* dispatch(createIntent(DeckAction.ChangeCompanion, {
|
|
192
|
+
primary: id,
|
|
193
|
+
companion: [
|
|
194
|
+
id,
|
|
195
|
+
"selected-objects"
|
|
196
|
+
].join(ATTENDABLE_PATH_SEPARATOR)
|
|
197
|
+
}));
|
|
198
|
+
yield* dispatch(createIntent(AttentionAction.Select, {
|
|
199
|
+
contextId: id,
|
|
200
|
+
selection: {
|
|
201
|
+
mode: "multi",
|
|
202
|
+
ids: [
|
|
203
|
+
org.id
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
}));
|
|
182
207
|
}
|
|
183
|
-
}, [
|
|
184
|
-
dispatch
|
|
208
|
+
}).pipe(Effect.runPromise), [
|
|
209
|
+
dispatch,
|
|
210
|
+
currentSpaceOrgs,
|
|
211
|
+
currentSpaceOrgTable,
|
|
212
|
+
defaultSpaceOrgTable
|
|
185
213
|
]);
|
|
186
214
|
return /* @__PURE__ */ React4.createElement(ContactCard, {
|
|
187
215
|
role,
|
|
188
216
|
subject: data.subject,
|
|
189
217
|
onOrgClick: handleOrgClick
|
|
190
|
-
}, role === "popover" && /* @__PURE__ */ React4.createElement(Surface, {
|
|
218
|
+
}, role === "card--popover" && /* @__PURE__ */ React4.createElement(Surface, {
|
|
191
219
|
role: "related",
|
|
192
220
|
data
|
|
193
221
|
}));
|
|
@@ -196,16 +224,17 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
196
224
|
createSurface({
|
|
197
225
|
id: `${PREVIEW_PLUGIN}/schema-popover--organization`,
|
|
198
226
|
role: [
|
|
199
|
-
"popover",
|
|
200
|
-
"card--
|
|
201
|
-
"card--
|
|
227
|
+
"card--popover",
|
|
228
|
+
"card--intrinsic",
|
|
229
|
+
"card--transclusion",
|
|
230
|
+
"card--extrinsic",
|
|
202
231
|
"card"
|
|
203
232
|
],
|
|
204
233
|
filter: (data) => Obj.instanceOf(DataType.Organization, data.subject),
|
|
205
234
|
component: ({ data, role }) => /* @__PURE__ */ React4.createElement(OrganizationCard, {
|
|
206
235
|
role,
|
|
207
236
|
subject: data.subject
|
|
208
|
-
}, role === "popover" && /* @__PURE__ */ React4.createElement(Surface, {
|
|
237
|
+
}, role === "card--popover" && /* @__PURE__ */ React4.createElement(Surface, {
|
|
209
238
|
role: "related",
|
|
210
239
|
data
|
|
211
240
|
}))
|
|
@@ -213,9 +242,10 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
213
242
|
createSurface({
|
|
214
243
|
id: `${PREVIEW_PLUGIN}/schema-popover--project`,
|
|
215
244
|
role: [
|
|
216
|
-
"popover",
|
|
217
|
-
"card--
|
|
218
|
-
"card--
|
|
245
|
+
"card--popover",
|
|
246
|
+
"card--intrinsic",
|
|
247
|
+
"card--transclusion",
|
|
248
|
+
"card--extrinsic",
|
|
219
249
|
"card"
|
|
220
250
|
],
|
|
221
251
|
filter: (data) => Obj.instanceOf(DataType.Project, data.subject),
|
|
@@ -230,9 +260,10 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
230
260
|
createSurface({
|
|
231
261
|
id: `${PREVIEW_PLUGIN}/fallback-popover`,
|
|
232
262
|
role: [
|
|
233
|
-
"popover",
|
|
234
|
-
"card--
|
|
235
|
-
"card--
|
|
263
|
+
"card--popover",
|
|
264
|
+
"card--intrinsic",
|
|
265
|
+
"card--transclusion",
|
|
266
|
+
"card--extrinsic",
|
|
236
267
|
"card"
|
|
237
268
|
],
|
|
238
269
|
position: "fallback",
|
|
@@ -252,15 +283,15 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
252
283
|
setValue(data.subject, path, value);
|
|
253
284
|
}
|
|
254
285
|
}, []);
|
|
255
|
-
return /* @__PURE__ */ React4.createElement(Card4.
|
|
286
|
+
return /* @__PURE__ */ React4.createElement(Card4.SurfaceRoot, {
|
|
256
287
|
role
|
|
257
288
|
}, /* @__PURE__ */ React4.createElement(Form, {
|
|
258
289
|
schema,
|
|
259
290
|
values: data.subject,
|
|
260
|
-
readonly: role === "popover",
|
|
291
|
+
readonly: role === "card--popover",
|
|
261
292
|
onSave: handleSave,
|
|
262
293
|
autoSave: true,
|
|
263
|
-
...role === "card--
|
|
294
|
+
...role === "card--intrinsic" && {
|
|
264
295
|
outerSpacing: "blockStart-0"
|
|
265
296
|
}
|
|
266
297
|
}));
|
|
@@ -270,4 +301,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
270
301
|
export {
|
|
271
302
|
react_surface_default as default
|
|
272
303
|
};
|
|
273
|
-
//# sourceMappingURL=react-surface-
|
|
304
|
+
//# sourceMappingURL=react-surface-IPZBISWS.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 { Effect } from 'effect';\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 { Filter, Obj } from '@dxos/echo';\nimport { type JsonPath, setValue } from '@dxos/echo-schema';\nimport { AttentionAction } from '@dxos/plugin-attention/types';\nimport { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';\nimport { useQuery, useSpace } from '@dxos/react-client/echo';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { Card } from '@dxos/react-ui-stack';\nimport { TableView } from '@dxos/react-ui-table/types';\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: ['card--popover', 'card--intrinsic', 'card--transclusion', 'card--extrinsic', 'card'],\n filter: (data): data is { subject: DataType.Person } => Obj.instanceOf(DataType.Person, data.subject),\n component: ({ data, role }) => {\n const { dispatch } = useIntentDispatcher();\n const space = getSpace(data.subject);\n const defaultSpace = useSpace();\n\n const currentSpaceOrgs = useQuery(space, Filter.type(DataType.Organization));\n const currentSpaceViews = useQuery(space, Filter.type(DataType.View));\n const defaultSpaceViews = useQuery(defaultSpace, Filter.type(DataType.View));\n const currentSpaceOrgTable = currentSpaceViews.find(\n (view) =>\n view.query.typename === DataType.Organization.typename &&\n Obj.instanceOf(TableView, view.presentation.target),\n );\n const defaultSpaceOrgTable = defaultSpaceViews.find(\n (view) =>\n view.query.typename === DataType.Organization.typename &&\n Obj.instanceOf(TableView, view.presentation.target),\n );\n\n // TODO(wittjosiah): Generalized way of handling related objects navigation.\n const handleOrgClick = useCallback(\n (org: DataType.Organization) =>\n Effect.gen(function* () {\n const view = currentSpaceOrgs.includes(org) ? currentSpaceOrgTable : defaultSpaceOrgTable;\n yield* dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n options: {\n state: false,\n anchorId: '',\n },\n }),\n );\n if (view) {\n const id = fullyQualifiedId(view);\n yield* dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [id],\n options: { workspace: space?.id },\n }),\n );\n yield* dispatch(\n createIntent(DeckAction.ChangeCompanion, {\n primary: id,\n companion: [id, 'selected-objects'].join(ATTENDABLE_PATH_SEPARATOR),\n }),\n );\n yield* dispatch(\n createIntent(AttentionAction.Select, {\n contextId: id,\n selection: { mode: 'multi', ids: [org.id] },\n }),\n );\n }\n }).pipe(Effect.runPromise),\n [dispatch, currentSpaceOrgs, currentSpaceOrgTable, defaultSpaceOrgTable],\n );\n\n return (\n <ContactCard role={role} subject={data.subject} onOrgClick={handleOrgClick}>\n {role === 'card--popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--organization`,\n role: ['card--popover', 'card--intrinsic', 'card--transclusion', 'card--extrinsic', '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 === 'card--popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--project`,\n role: ['card--popover', 'card--intrinsic', 'card--transclusion', 'card--extrinsic', '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: ['card--popover', 'card--intrinsic', 'card--transclusion', 'card--extrinsic', '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.SurfaceRoot role={role}>\n <Form\n schema={schema}\n values={data.subject}\n readonly={role === 'card--popover'}\n onSave={handleSave}\n autoSave\n {...(role === 'card--intrinsic' && { outerSpacing: 'blockStart-0' })}\n />\n </Card.SurfaceRoot>\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.SurfaceRoot 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.SurfaceRoot>\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.SurfaceRoot 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.SurfaceRoot>\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.SurfaceRoot 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.SurfaceRoot>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,SAASA,cAAc;AACvB,OAAOC,UAASC,mBAAmB;AAEnC,SACEC,cACAC,cACAC,SACAC,aACAC,cACAC,eACAC,2BACK;AACP,SAASC,kBAAkBC,WAAWC,gBAAgB;AACtD,SAASC,QAAQC,WAAW;AAC5B,SAAwBC,gBAAgB;AACxC,SAASC,uBAAuB;AAChC,SAASC,2BAA2BC,kBAAkB;AACtD,SAASC,UAAUC,gBAAgB;AACnC,SAASC,sBAAsB;AAC/B,SAASC,YAAY;AACrB,SAASC,QAAAA,aAAY;AACrB,SAASC,iBAAiB;AAC1B,SAASC,oBAAoBC,MAAAA,WAAU;AACvC,SAASC,gBAAgB;;;;ACvBzB,OAAOC,SAASC,gBAAgB;AAEhC,SAASC,MAAMC,QAAQC,cAAc;AACrC,SAASC,MAAMC,aAAaC,gBAAgB;AAC5C,SAASC,UAAU;AAKZ,IAAMC,cAAc,CAAC,EAC1BC,UACAC,SAAS,EAAEC,UAAUC,OAAOC,cAAcC,OAAM,GAChDC,YACAC,KAAI,MACkF;;;AACtF,UAAMC,mBAAmBJ,gBAAgB,OAAOA,iBAAiB,WAAWA,aAAaK,QAAQC,OAAON;AACxG,WACE,sBAAA,cAACO,KAAKC,aAAW;MAACL;OAChB,sBAAA,cAACM,OAAOC,MAAI,MACV,sBAAA,cAACH,KAAKI,MAAI;MAACR,MAAK;MAAQS,YAAW;O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GAAGC,cAAAA;IACPC,MAAM;MAAC;MAAiB;MAAmB;MAAsB;MAAmB;;IACpFqE,UAAU;IACVpE,QAAQ,CAACC,SAAuCC,IAAImE,SAASpE,KAAKK,OAAO;IACzEC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAE;AACxB,YAAMuE,SAASC,UAAUtE,KAAKK,OAAO;AACrC,YAAM,EAAEkE,EAAC,IAAKC,eAAe3E,cAAAA;AAC7B,UAAI,CAACwE,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,EAAShF,OAAO,CAACoF,SAASJ,QAAQI,IAAAA,CAAK;AACxE,mBAAWA,QAAQH,cAAc;AAC/B,gBAAMI,QAAQN,OAAOK,IAAAA;AACrBE,mBAASrF,KAAKK,SAAS8E,MAAkBC,KAAAA;QAC3C;MACF,GAAG,CAAA,CAAE;AAEL,aACE,gBAAAxB,OAAA,cAAC0B,MAAKC,aAAW;QAACzF;SAChB,gBAAA8D,OAAA,cAAC4B,MAAAA;QACCnB;QACAS,QAAQ9E,KAAKK;QACboF,UAAU3F,SAAS;QACnB4F,QAAQb;QACRc,UAAAA;QACC,GAAI7F,SAAS,qBAAqB;UAAE8F,cAAc;QAAe;;IAI1E;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["Effect", "React", "useCallback", "Capabilities", "LayoutAction", "Surface", "contributes", "createIntent", "createSurface", "useIntentDispatcher", "fullyQualifiedId", "getSchema", "getSpace", "Filter", "Obj", "setValue", "AttentionAction", "ATTENDABLE_PATH_SEPARATOR", "DeckAction", "useQuery", "useSpace", "useTranslation", "Form", "Card", "TableView", "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", "SurfaceRoot", "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", "SurfaceRoot", "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", "SurfaceRoot", "Poster", "alt", "aspect", "Heading", "Text", "classNames", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PREVIEW_PLUGIN", "role", "filter", "data", "Obj", "instanceOf", "DataType", "Person", "subject", "component", "dispatch", "useIntentDispatcher", "space", "getSpace", "defaultSpace", "useSpace", "currentSpaceOrgs", "useQuery", "Filter", "type", "Organization", "currentSpaceViews", "View", "defaultSpaceViews", "currentSpaceOrgTable", "find", "view", "query", "typename", "TableView", "presentation", "target", "defaultSpaceOrgTable", "handleOrgClick", "useCallback", "org", "Effect", "gen", "includes", "createIntent", "LayoutAction", "UpdatePopover", "part", "options", "state", "anchorId", "fullyQualifiedId", "Open", "workspace", "DeckAction", "ChangeCompanion", "primary", "companion", "join", "ATTENDABLE_PATH_SEPARATOR", "AttentionAction", "Select", "contextId", "selection", "mode", "ids", "pipe", "runPromise", "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", "SurfaceRoot", "Form", "readonly", "onSave", "autoSave", "outerSpacing"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,YAAY,EAOb,MAAM,qBAAqB,CAAC;;AAiB7B,wBAkIK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,mBAAmB,SAAS,CAAC;AAE7B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import '@dxos-theme';
|
|
2
|
+
import { type Meta } from '@storybook/react-vite';
|
|
3
|
+
import { type StoryProps } from './util';
|
|
4
|
+
declare const meta: Meta<StoryProps>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Contact: {
|
|
7
|
+
args: {
|
|
8
|
+
Component: ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Person> & {
|
|
9
|
+
onOrgClick?: (org: import("@dxos/schema").DataType.Organization) => void;
|
|
10
|
+
}) => import("react").JSX.Element;
|
|
11
|
+
icon: string;
|
|
12
|
+
subject: string;
|
|
13
|
+
withImage: boolean;
|
|
14
|
+
role: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const Organization: {
|
|
18
|
+
args: {
|
|
19
|
+
Component: ({ children, subject: { name, image, description, website }, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Organization>) => import("react").JSX.Element;
|
|
20
|
+
icon: string;
|
|
21
|
+
subject: string;
|
|
22
|
+
withImage: boolean;
|
|
23
|
+
role: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const Project: {
|
|
27
|
+
args: {
|
|
28
|
+
Component: ({ subject: { name, image, description }, role }: import("..").PreviewProps<import("@dxos/schema").DataType.Project>) => import("react").JSX.Element;
|
|
29
|
+
icon: string;
|
|
30
|
+
subject: string;
|
|
31
|
+
withImage: boolean;
|
|
32
|
+
role: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=ExtrinsicPreviews.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtrinsicPreviews.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/ExtrinsicPreviews.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,EAAE,KAAK,UAAU,EAAU,MAAM,QAAQ,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAQ1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO;;;sBAPV,CAAC;;;;;;;CAeV,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;CAQxB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;CAQnB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import '@dxos-theme';
|
|
2
|
+
import { type Meta } from '@storybook/react-vite';
|
|
3
|
+
import { type StoryProps } from './util';
|
|
4
|
+
declare const meta: Meta<StoryProps>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Contact: {
|
|
7
|
+
args: {
|
|
8
|
+
Component: ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Person> & {
|
|
9
|
+
onOrgClick?: (org: import("@dxos/schema").DataType.Organization) => void;
|
|
10
|
+
}) => import("react").JSX.Element;
|
|
11
|
+
icon: string;
|
|
12
|
+
subject: string;
|
|
13
|
+
withImage: boolean;
|
|
14
|
+
role: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const Organization: {
|
|
18
|
+
args: {
|
|
19
|
+
Component: ({ children, subject: { name, image, description, website }, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Organization>) => import("react").JSX.Element;
|
|
20
|
+
icon: string;
|
|
21
|
+
subject: string;
|
|
22
|
+
withImage: boolean;
|
|
23
|
+
role: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const Project: {
|
|
27
|
+
args: {
|
|
28
|
+
Component: ({ subject: { name, image, description }, role }: import("..").PreviewProps<import("@dxos/schema").DataType.Project>) => import("react").JSX.Element;
|
|
29
|
+
icon: string;
|
|
30
|
+
subject: string;
|
|
31
|
+
withImage: boolean;
|
|
32
|
+
role: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=IntrinsicPreviews.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntrinsicPreviews.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/IntrinsicPreviews.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,EAAE,KAAK,UAAU,EAAU,MAAM,QAAQ,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAQ1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO;;;sBAPV,CAAC;;;;;;;CAeV,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;CAQxB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;CAQnB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import '@dxos-theme';
|
|
2
|
+
import { type Meta } from '@storybook/react-vite';
|
|
3
|
+
import { type StoryProps } from './util';
|
|
4
|
+
declare const meta: Meta<StoryProps>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Contact: {
|
|
7
|
+
args: {
|
|
8
|
+
Component: ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Person> & {
|
|
9
|
+
onOrgClick?: (org: import("@dxos/schema").DataType.Organization) => void;
|
|
10
|
+
}) => import("react").JSX.Element;
|
|
11
|
+
icon: string;
|
|
12
|
+
subject: string;
|
|
13
|
+
withImage: boolean;
|
|
14
|
+
role: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const Organization: {
|
|
18
|
+
args: {
|
|
19
|
+
Component: ({ children, subject: { name, image, description, website }, role, }: import("..").PreviewProps<import("@dxos/schema").DataType.Organization>) => import("react").JSX.Element;
|
|
20
|
+
icon: string;
|
|
21
|
+
subject: string;
|
|
22
|
+
withImage: boolean;
|
|
23
|
+
role: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const Project: {
|
|
27
|
+
args: {
|
|
28
|
+
Component: ({ subject: { name, image, description }, role }: import("..").PreviewProps<import("@dxos/schema").DataType.Project>) => import("react").JSX.Element;
|
|
29
|
+
icon: string;
|
|
30
|
+
subject: string;
|
|
31
|
+
withImage: boolean;
|
|
32
|
+
role: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=PopoverPreviews.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopoverPreviews.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/PopoverPreviews.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,EAAE,KAAK,UAAU,EAAU,MAAM,QAAQ,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAQ1B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO;;;sBAPR,CAAC;;;;;;;CAeZ,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;CAQxB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;CAQnB,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-vite';
|
|
2
|
+
import { type FC } from 'react';
|
|
3
|
+
import type { PreviewProps } from '../types';
|
|
4
|
+
export type StoryProps = {
|
|
5
|
+
Component: FC<PreviewProps<any>>;
|
|
6
|
+
icon?: string;
|
|
7
|
+
withImage?: boolean;
|
|
8
|
+
subject: 'project' | 'contact' | 'organization';
|
|
9
|
+
role: 'card--popover' | 'card--intrinsic' | 'card--extrinsic' | 'card--transclusion';
|
|
10
|
+
};
|
|
11
|
+
export declare const render: Meta<StoryProps>['render'];
|
|
12
|
+
export declare const omitImage: ({ image, ...rest }: any) => any;
|
|
13
|
+
export declare const data: {
|
|
14
|
+
organization: import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
15
|
+
image?: string | undefined;
|
|
16
|
+
id: string;
|
|
17
|
+
status?: "active" | "prospect" | "qualified" | "commit" | "reject" | undefined;
|
|
18
|
+
name?: string | undefined;
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
website?: string | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
contact: import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
23
|
+
fields?: {
|
|
24
|
+
readonly label: string;
|
|
25
|
+
readonly category?: string | undefined;
|
|
26
|
+
readonly value: string;
|
|
27
|
+
}[] | undefined;
|
|
28
|
+
fullName?: string | undefined;
|
|
29
|
+
preferredName?: string | undefined;
|
|
30
|
+
nickname?: string | undefined;
|
|
31
|
+
image?: string | undefined;
|
|
32
|
+
organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
33
|
+
id: string;
|
|
34
|
+
name?: string | undefined;
|
|
35
|
+
description?: string | undefined;
|
|
36
|
+
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
37
|
+
image?: string | undefined;
|
|
38
|
+
website?: string | undefined;
|
|
39
|
+
}> | undefined;
|
|
40
|
+
jobTitle?: string | undefined;
|
|
41
|
+
department?: string | undefined;
|
|
42
|
+
notes?: string | undefined;
|
|
43
|
+
emails?: {
|
|
44
|
+
readonly label?: string | undefined;
|
|
45
|
+
readonly value: string;
|
|
46
|
+
}[] | undefined;
|
|
47
|
+
identities?: {
|
|
48
|
+
readonly label?: string | undefined;
|
|
49
|
+
readonly value: string;
|
|
50
|
+
}[] | undefined;
|
|
51
|
+
phoneNumbers?: {
|
|
52
|
+
readonly label?: string | undefined;
|
|
53
|
+
readonly value: string;
|
|
54
|
+
}[] | undefined;
|
|
55
|
+
addresses?: {
|
|
56
|
+
readonly label?: string | undefined;
|
|
57
|
+
readonly value: {
|
|
58
|
+
readonly street?: string | undefined;
|
|
59
|
+
readonly extended?: string | undefined;
|
|
60
|
+
readonly locality?: string | undefined;
|
|
61
|
+
readonly region?: string | undefined;
|
|
62
|
+
readonly postalCode?: string | undefined;
|
|
63
|
+
readonly postOfficeBoxNumber?: string | undefined;
|
|
64
|
+
readonly country?: string | undefined;
|
|
65
|
+
};
|
|
66
|
+
}[] | undefined;
|
|
67
|
+
urls?: {
|
|
68
|
+
readonly label?: string | undefined;
|
|
69
|
+
readonly value: string;
|
|
70
|
+
}[] | undefined;
|
|
71
|
+
birthday?: string | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
project: import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
74
|
+
image?: string | undefined;
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
description?: string | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/testing/util.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;IAChD,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;CACtF,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAa7C,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,oBAAoB,GAAG,QAAS,CAAC;AAE3D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCb,CAAC"}
|