@dxos/plugin-preview 0.8.2-staging.4d6ad0f → 0.8.3-main.672df60
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 +14 -0
- package/dist/lib/browser/chunk-LFAK2TMG.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +5 -17
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{preview-popover-S3OY3CFZ.mjs → preview-popover-2AWEEK32.mjs} +13 -9
- package/dist/lib/browser/preview-popover-2AWEEK32.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-XDHP6EN7.mjs → react-surface-FGMSZTOE.mjs} +46 -67
- package/dist/lib/browser/react-surface-FGMSZTOE.mjs.map +7 -0
- package/dist/lib/node/{chunk-VFSOM2B4.cjs → chunk-XGHMBEIV.cjs} +6 -24
- package/dist/lib/node/chunk-XGHMBEIV.cjs.map +7 -0
- package/dist/lib/node/index.cjs +12 -24
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{preview-popover-GPBOHU5E.cjs → preview-popover-K4E7UEQU.cjs} +16 -12
- package/dist/lib/node/preview-popover-K4E7UEQU.cjs.map +7 -0
- package/dist/lib/node/{react-surface-CPAQ7ZYR.cjs → react-surface-FI63RLWN.cjs} +53 -68
- package/dist/lib/node/react-surface-FI63RLWN.cjs.map +7 -0
- package/dist/lib/node-esm/chunk-7BPXNL44.mjs +16 -0
- package/dist/lib/node-esm/chunk-7BPXNL44.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +5 -17
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{preview-popover-EQAEYYDT.mjs → preview-popover-W5FPZQM3.mjs} +13 -9
- package/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-QJRHN4PN.mjs → react-surface-EHIW3IEA.mjs} +46 -67
- package/dist/lib/node-esm/react-surface-EHIW3IEA.mjs.map +7 -0
- package/dist/types/src/Preview.stories.d.ts +8 -9
- 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/dist/types/src/components/ContactCard.d.ts +1 -1
- package/dist/types/src/components/ContactCard.d.ts.map +1 -1
- package/dist/types/src/components/OrganizationCard.d.ts +1 -1
- package/dist/types/src/components/OrganizationCard.d.ts.map +1 -1
- package/dist/types/src/components/ProjectCard.d.ts +1 -1
- package/dist/types/src/components/ProjectCard.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +3 -22
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +20 -19
- package/src/Preview.stories.tsx +3 -2
- package/src/capabilities/preview-popover.ts +9 -5
- package/src/capabilities/react-surface.tsx +6 -11
- package/src/components/ContactCard.tsx +11 -11
- package/src/components/OrganizationCard.tsx +9 -16
- package/src/components/ProjectCard.tsx +8 -12
- package/src/types.ts +4 -33
- package/dist/lib/browser/chunk-B2VK6GFP.mjs +0 -28
- package/dist/lib/browser/chunk-B2VK6GFP.mjs.map +0 -7
- package/dist/lib/browser/preview-popover-S3OY3CFZ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-XDHP6EN7.mjs.map +0 -7
- package/dist/lib/node/chunk-VFSOM2B4.cjs.map +0 -7
- package/dist/lib/node/preview-popover-GPBOHU5E.cjs.map +0 -7
- package/dist/lib/node/react-surface-CPAQ7ZYR.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-PYKIS3N7.mjs +0 -30
- package/dist/lib/node-esm/chunk-PYKIS3N7.mjs.map +0 -7
- package/dist/lib/node-esm/preview-popover-EQAEYYDT.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-QJRHN4PN.mjs.map +0 -7
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// packages/plugins/plugin-preview/src/meta.ts
|
|
2
|
+
var PREVIEW_PLUGIN = "dxos.org/plugin/preview";
|
|
3
|
+
var meta = {
|
|
4
|
+
id: PREVIEW_PLUGIN,
|
|
5
|
+
name: "Preview",
|
|
6
|
+
icon: "ph--eye--regular",
|
|
7
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview"
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
PREVIEW_PLUGIN,
|
|
12
|
+
meta
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=chunk-LFAK2TMG.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const PREVIEW_PLUGIN = 'dxos.org/plugin/preview';\n\nexport const meta: PluginMeta = {\n id: PREVIEW_PLUGIN,\n name: 'Preview',\n icon: 'ph--eye--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview',\n};\n"],
|
|
5
|
+
"mappings": ";AAMO,IAAMA,iBAAiB;AAEvB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
+
"names": ["PREVIEW_PLUGIN", "meta", "id", "name", "icon", "source"]
|
|
7
|
+
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PREVIEW_PLUGIN,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
meta,
|
|
6
|
-
popoverCard,
|
|
7
|
-
previewChrome,
|
|
8
|
-
previewProse,
|
|
9
|
-
previewTitle
|
|
10
|
-
} from "./chunk-B2VK6GFP.mjs";
|
|
3
|
+
meta
|
|
4
|
+
} from "./chunk-LFAK2TMG.mjs";
|
|
11
5
|
|
|
12
6
|
// packages/plugins/plugin-preview/src/PreviewPlugin.tsx
|
|
13
7
|
import { Capabilities, Events, contributes, defineModule, definePlugin } from "@dxos/app-framework";
|
|
@@ -16,8 +10,8 @@ import { DataType } from "@dxos/schema";
|
|
|
16
10
|
|
|
17
11
|
// packages/plugins/plugin-preview/src/capabilities/index.ts
|
|
18
12
|
import { lazy } from "@dxos/app-framework";
|
|
19
|
-
var PreviewPopover = lazy(() => import("./preview-popover-
|
|
20
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
13
|
+
var PreviewPopover = lazy(() => import("./preview-popover-2AWEEK32.mjs"));
|
|
14
|
+
var ReactSurface = lazy(() => import("./react-surface-FGMSZTOE.mjs"));
|
|
21
15
|
|
|
22
16
|
// packages/plugins/plugin-preview/src/translations.ts
|
|
23
17
|
var translations_default = [
|
|
@@ -61,12 +55,6 @@ var PreviewPlugin = () => definePlugin(meta, [
|
|
|
61
55
|
export {
|
|
62
56
|
PREVIEW_PLUGIN,
|
|
63
57
|
PreviewPlugin,
|
|
64
|
-
|
|
65
|
-
kanbanCardWithoutPoster,
|
|
66
|
-
meta,
|
|
67
|
-
popoverCard,
|
|
68
|
-
previewChrome,
|
|
69
|
-
previewProse,
|
|
70
|
-
previewTitle
|
|
58
|
+
meta
|
|
71
59
|
};
|
|
72
60
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/PreviewPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { DataType } from '@dxos/schema';\n\nimport { PreviewPopover, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\n\nexport const PreviewPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => [contributes(ClientCapabilities.Schema, [DataType.Person, DataType.Organization])],\n }),\n defineModule({\n id: `${meta.id}/module/preview-popover`,\n activatesOn: Events.Startup,\n activate: PreviewPopover,\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const PreviewPopover = lazy(() => import('./preview-popover'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { PREVIEW_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [PREVIEW_PLUGIN]: {\n 'unable to create preview message': 'No preview',\n },\n },\n },\n];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;AAIA,SAASA,cAAcC,QAAQC,aAAaC,cAAcC,oBAAoB;AAC9E,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,gBAAgB;;;ACFzB,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACD9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,cAAAA,GAAiB;QAChB,oCAAoC;MACtC;IACF;EACF;;;;AFDK,IAAMC,gBAAgB,MAC3BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaQ,aAAaC;IAC1BN,UAAU,MAAM;MAACC,YAAYM,mBAAmBC,QAAQ;QAACC,SAASC;QAAQD,SAASE;OAAa;;EAClG,CAAA;EACAhB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOc;IACpBZ,UAAUa;EACZ,CAAA;EACAlB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOgB;IACpBd,UAAUe;EACZ,CAAA;CACD;",
|
|
6
6
|
"names": ["Capabilities", "Events", "contributes", "defineModule", "definePlugin", "ClientCapabilities", "ClientEvents", "DataType", "lazy", "PreviewPopover", "lazy", "ReactSurface", "PREVIEW_PLUGIN", "PreviewPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "DataType", "Person", "Organization", "Startup", "PreviewPopover", "SetupReactSurface", "ReactSurface"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":3596,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8209,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9715,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":6173,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":3139,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":17294,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3140},"packages/plugins/plugin-preview/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/browser/chunk-B2VK6GFP.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/browser/preview-popover-S3OY3CFZ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/browser/react-surface-XDHP6EN7.mjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","defaultCard","kanbanCardWithoutPoster","meta","popoverCard","previewChrome","previewProse","previewTitle"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1902},"packages/plugins/plugin-preview/dist/lib/browser/preview-popover-S3OY3CFZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4302},"packages/plugins/plugin-preview/dist/lib/browser/preview-popover-S3OY3CFZ.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2014}},"bytes":2188},"packages/plugins/plugin-preview/dist/lib/browser/react-surface-XDHP6EN7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17740},"packages/plugins/plugin-preview/dist/lib/browser/react-surface-XDHP6EN7.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/browser/chunk-B2VK6GFP.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4191},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2972},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1881},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":855}},"bytes":10509},"packages/plugins/plugin-preview/dist/lib/browser/chunk-B2VK6GFP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2193},"packages/plugins/plugin-preview/dist/lib/browser/chunk-B2VK6GFP.mjs":{"imports":[],"exports":["PREVIEW_PLUGIN","defaultCard","kanbanCardWithoutPoster","meta","popoverCard","previewChrome","previewProse","previewTitle"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216},"packages/plugins/plugin-preview/src/types.ts":{"bytesInOutput":342}},"bytes":842}}}
|
|
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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3134},"packages/plugins/plugin-preview/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.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/browser/preview-popover-2AWEEK32.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/browser/react-surface-FGMSZTOE.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":1690},"packages/plugins/plugin-preview/dist/lib/browser/preview-popover-2AWEEK32.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4413},"packages/plugins/plugin-preview/dist/lib/browser/preview-popover-2AWEEK32.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":2253},"packages/plugins/plugin-preview/dist/lib/browser/react-surface-FGMSZTOE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16594},"packages/plugins/plugin-preview/dist/lib/browser/react-surface-FGMSZTOE.mjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.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":9756},"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":613},"packages/plugins/plugin-preview/dist/lib/browser/chunk-LFAK2TMG.mjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216}},"bytes":345}}}
|
|
@@ -12,15 +12,19 @@ var customEventOptions = {
|
|
|
12
12
|
passive: false
|
|
13
13
|
};
|
|
14
14
|
var handlePreviewLookup = async (client, defaultSpace, { ref, label }) => {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
try {
|
|
16
|
+
const dxn = DXN.parse(ref);
|
|
17
|
+
if (!dxn) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const object = await resolveRef(client, dxn, defaultSpace);
|
|
21
|
+
return {
|
|
22
|
+
label,
|
|
23
|
+
object
|
|
24
|
+
};
|
|
25
|
+
} catch (err) {
|
|
17
26
|
return null;
|
|
18
27
|
}
|
|
19
|
-
const object = await resolveRef(client, dxn, defaultSpace);
|
|
20
|
-
return {
|
|
21
|
-
label,
|
|
22
|
-
object
|
|
23
|
-
};
|
|
24
28
|
};
|
|
25
29
|
var preview_popover_default = (context) => {
|
|
26
30
|
const handleDxRefTagActivate = async ({ refId, label, trigger }) => {
|
|
@@ -52,7 +56,7 @@ var preview_popover_default = (context) => {
|
|
|
52
56
|
} else {
|
|
53
57
|
log.warn("No default view found", void 0, {
|
|
54
58
|
F: __dxlog_file,
|
|
55
|
-
L:
|
|
59
|
+
L: 65,
|
|
56
60
|
S: void 0,
|
|
57
61
|
C: (f, a) => f(...a)
|
|
58
62
|
});
|
|
@@ -62,4 +66,4 @@ var preview_popover_default = (context) => {
|
|
|
62
66
|
export {
|
|
63
67
|
preview_popover_default as default
|
|
64
68
|
};
|
|
65
|
-
//# sourceMappingURL=preview-popover-
|
|
69
|
+
//# sourceMappingURL=preview-popover-2AWEEK32.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/preview-popover.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, LayoutAction, contributes, createIntent, type PluginContext } from '@dxos/app-framework';\nimport { addEventListener } from '@dxos/async';\nimport { type Client, resolveRef } from '@dxos/client';\nimport { parseId, type Space } from '@dxos/client/echo';\nimport { DXN } from '@dxos/keys';\nimport { type DxRefTagActivate } from '@dxos/lit-ui';\nimport { log } from '@dxos/log';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { type PreviewLinkRef, type PreviewLinkTarget } from '@dxos/react-ui-editor';\n\nconst customEventOptions = { capture: true, passive: false };\n\nconst handlePreviewLookup = async (\n client: Client,\n defaultSpace: Space,\n { ref, label }: PreviewLinkRef,\n): Promise<PreviewLinkTarget | null> => {\n try {\n const dxn = DXN.parse(ref);\n if (!dxn) {\n return null;\n }\n\n const object = await resolveRef(client, dxn, defaultSpace);\n return { label, object };\n } catch (err) {\n return null;\n }\n};\n\nexport default (context: PluginContext) => {\n // TODO(wittjosiah): Factor out lookup handlers to other plugins to make not ECHO-specific.\n const handleDxRefTagActivate = async ({ refId, label, trigger }: DxRefTagActivate) => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const client = context.getCapability(ClientCapabilities.Client);\n const [layout] = context.getCapabilities(Capabilities.Layout);\n const { spaceId } = parseId(layout.workspace);\n const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;\n const result = await handlePreviewLookup(client, space, { ref: refId, label });\n if (!result) {\n return;\n }\n\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n subject: result.object,\n options: {\n state: true,\n variant: 'virtual',\n anchor: trigger,\n },\n }),\n );\n };\n\n let cleanup: () => void;\n if (document.defaultView) {\n cleanup = addEventListener(document.defaultView, 'dx-ref-tag-activate', handleDxRefTagActivate, customEventOptions);\n } else {\n log.warn('No default view found');\n }\n\n return contributes(Capabilities.Null, null, () => cleanup());\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAcC,cAAcC,aAAaC,oBAAwC;AAC1F,SAASC,wBAAwB;AACjC,SAAsBC,kBAAkB;AACxC,SAASC,eAA2B;AACpC,SAASC,WAAW;AAEpB,SAASC,WAAW;AACpB,SAASC,0BAA0B;;AAGnC,IAAMC,qBAAqB;EAAEC,SAAS;EAAMC,SAAS;AAAM;AAE3D,IAAMC,sBAAsB,OAC1BC,QACAC,cACA,EAAEC,KAAKC,MAAK,MAAkB;AAE9B,MAAI;AACF,UAAMC,MAAMX,IAAIY,MAAMH,GAAAA;AACtB,QAAI,CAACE,KAAK;AACR,aAAO;IACT;AAEA,UAAME,SAAS,MAAMf,WAAWS,QAAQI,KAAKH,YAAAA;AAC7C,WAAO;MAAEE;MAAOG;IAAO;EACzB,SAASC,KAAK;AACZ,WAAO;EACT;AACF;AAEA,IAAA,0BAAe,CAACC,YAAAA;AAEd,QAAMC,yBAAyB,OAAO,EAAEC,OAAOP,OAAOQ,QAAO,MAAoB;AAC/E,UAAM,EAAEC,iBAAiBC,SAAQ,IAAKL,QAAQM,cAAc5B,aAAa6B,gBAAgB;AACzF,UAAMf,SAASQ,QAAQM,cAAcnB,mBAAmBqB,MAAM;AAC9D,UAAM,CAACC,MAAAA,IAAUT,QAAQU,gBAAgBhC,aAAaiC,MAAM;AAC5D,UAAM,EAAEC,QAAO,IAAK5B,QAAQyB,OAAOI,SAAS;AAC5C,UAAMC,SAASF,WAAWpB,OAAOuB,OAAOC,IAAIJ,OAAAA,MAAapB,OAAOuB,OAAOE;AACvE,UAAMC,SAAS,MAAM3B,oBAAoBC,QAAQsB,OAAO;MAAEpB,KAAKQ;MAAOP;IAAM,CAAA;AAC5E,QAAI,CAACuB,QAAQ;AACX;IACF;AAEA,UAAMb,SACJxB,aAAaF,aAAawC,eAAe;MACvCC,MAAM;MACNC,SAASH,OAAOpB;MAChBwB,SAAS;QACPC,OAAO;QACPC,SAAS;QACTC,QAAQtB;MACV;IACF,CAAA,CAAA;EAEJ;AAEA,MAAIuB;AACJ,MAAIC,SAASC,aAAa;AACxBF,cAAU5C,iBAAiB6C,SAASC,aAAa,uBAAuB3B,wBAAwBb,kBAAAA;EAClG,OAAO;AACLF,QAAI2C,KAAK,yBAAA,QAAA;;;;;;EACX;AAEA,SAAOjD,YAAYF,aAAaoD,MAAM,MAAM,MAAMJ,QAAAA,CAAAA;AACpD;",
|
|
6
|
+
"names": ["Capabilities", "LayoutAction", "contributes", "createIntent", "addEventListener", "resolveRef", "parseId", "DXN", "log", "ClientCapabilities", "customEventOptions", "capture", "passive", "handlePreviewLookup", "client", "defaultSpace", "ref", "label", "dxn", "parse", "object", "err", "context", "handleDxRefTagActivate", "refId", "trigger", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "Client", "layout", "getCapabilities", "Layout", "spaceId", "workspace", "space", "spaces", "get", "default", "result", "UpdatePopover", "part", "subject", "options", "state", "variant", "anchor", "cleanup", "document", "defaultView", "warn", "Null"]
|
|
7
|
+
}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
PREVIEW_PLUGIN
|
|
3
|
-
|
|
4
|
-
kanbanCardWithoutPoster,
|
|
5
|
-
popoverCard,
|
|
6
|
-
previewChrome,
|
|
7
|
-
previewProse,
|
|
8
|
-
previewTitle
|
|
9
|
-
} from "./chunk-B2VK6GFP.mjs";
|
|
2
|
+
PREVIEW_PLUGIN
|
|
3
|
+
} from "./chunk-LFAK2TMG.mjs";
|
|
10
4
|
|
|
11
5
|
// packages/plugins/plugin-preview/src/capabilities/react-surface.tsx
|
|
12
6
|
import React4, { useCallback } from "react";
|
|
@@ -15,6 +9,7 @@ import { Filter, fullyQualifiedId, getSchema, getSpace, isEchoObject } from "@dx
|
|
|
15
9
|
import { isInstanceOf, setValue } from "@dxos/echo-schema";
|
|
16
10
|
import { useTranslation } from "@dxos/react-ui";
|
|
17
11
|
import { Form } from "@dxos/react-ui-form";
|
|
12
|
+
import { Card as Card4 } from "@dxos/react-ui-stack";
|
|
18
13
|
import { TableType } from "@dxos/react-ui-table";
|
|
19
14
|
import { descriptionMessage } from "@dxos/react-ui-theme";
|
|
20
15
|
import { DataType } from "@dxos/schema";
|
|
@@ -23,17 +18,17 @@ import { DataType } from "@dxos/schema";
|
|
|
23
18
|
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
24
19
|
import React, { Fragment } from "react";
|
|
25
20
|
import { Icon, Avatar, Button } from "@dxos/react-ui";
|
|
21
|
+
import { Card, cardHeading, cardText } from "@dxos/react-ui-stack";
|
|
26
22
|
import { mx } from "@dxos/react-ui-theme";
|
|
27
|
-
var ContactCard = ({ children,
|
|
23
|
+
var ContactCard = ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role }) => {
|
|
28
24
|
var _effect = _useSignals();
|
|
29
25
|
try {
|
|
30
26
|
const organizationName = organization && typeof organization === "object" ? organization.target?.name : organization;
|
|
31
|
-
return /* @__PURE__ */ React.createElement(
|
|
32
|
-
role
|
|
33
|
-
|
|
34
|
-
}, /* @__PURE__ */ React.createElement(Avatar.Root, null, /* @__PURE__ */ React.createElement("div", {
|
|
27
|
+
return /* @__PURE__ */ React.createElement(Card.Container, {
|
|
28
|
+
role
|
|
29
|
+
}, /* @__PURE__ */ React.createElement(Avatar.Root, null, /* @__PURE__ */ React.createElement(Card.Text, {
|
|
35
30
|
role: "group",
|
|
36
|
-
|
|
31
|
+
classNames: "grid gap-3 grid-cols-[min-content_1fr]"
|
|
37
32
|
}, /* @__PURE__ */ React.createElement(Avatar.Content, {
|
|
38
33
|
imgSrc: image,
|
|
39
34
|
icon: "ph--user--regular",
|
|
@@ -45,11 +40,8 @@ var ContactCard = ({ children, classNames, role, subject: { fullName, image, org
|
|
|
45
40
|
}, /* @__PURE__ */ React.createElement(Avatar.Label, {
|
|
46
41
|
asChild: true
|
|
47
42
|
}, /* @__PURE__ */ React.createElement("h2", {
|
|
48
|
-
className:
|
|
49
|
-
}, fullName))))), organizationName && /* @__PURE__ */ React.createElement("
|
|
50
|
-
role: "none",
|
|
51
|
-
className: previewChrome
|
|
52
|
-
}, typeof organization === "object" && onOrgClick ? /* @__PURE__ */ React.createElement(Button, {
|
|
43
|
+
className: cardHeading
|
|
44
|
+
}, fullName))))), organizationName && /* @__PURE__ */ React.createElement(Card.Chrome, null, typeof organization === "object" && onOrgClick ? /* @__PURE__ */ React.createElement(Button, {
|
|
53
45
|
variant: "ghost",
|
|
54
46
|
classNames: "gap-2 text-start",
|
|
55
47
|
onClick: () => onOrgClick(organization.target)
|
|
@@ -71,7 +63,7 @@ var ContactCard = ({ children, classNames, role, subject: { fullName, image, org
|
|
|
71
63
|
}), /* @__PURE__ */ React.createElement("span", {
|
|
72
64
|
className: "min-is-0 flex-1 truncate"
|
|
73
65
|
}, organizationName))), /* @__PURE__ */ React.createElement("dl", {
|
|
74
|
-
className: mx(
|
|
66
|
+
className: mx(cardText, "grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0")
|
|
75
67
|
}, emails?.length && emails.map(({ label, value }) => /* @__PURE__ */ React.createElement(Fragment, {
|
|
76
68
|
key: value
|
|
77
69
|
}, /* @__PURE__ */ React.createElement("dt", null, /* @__PURE__ */ React.createElement(Icon, {
|
|
@@ -90,31 +82,22 @@ var ContactCard = ({ children, classNames, role, subject: { fullName, image, org
|
|
|
90
82
|
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
91
83
|
import React2 from "react";
|
|
92
84
|
import { Icon as Icon2 } from "@dxos/react-ui";
|
|
93
|
-
import {
|
|
94
|
-
var OrganizationCard = ({ children,
|
|
85
|
+
import { Card as Card2 } from "@dxos/react-ui-stack";
|
|
86
|
+
var OrganizationCard = ({ children, subject: { name, image, description, website }, role }) => {
|
|
95
87
|
var _effect = _useSignals2();
|
|
96
88
|
try {
|
|
97
|
-
return /* @__PURE__ */ React2.createElement(
|
|
98
|
-
role
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
size: 10
|
|
110
|
-
})), /* @__PURE__ */ React2.createElement("h2", {
|
|
111
|
-
className: mx2(previewTitle, previewProse)
|
|
112
|
-
}, name), description && /* @__PURE__ */ React2.createElement("p", {
|
|
113
|
-
className: mx2(previewProse, "line-clamp-2")
|
|
114
|
-
}, description), website && /* @__PURE__ */ React2.createElement("div", {
|
|
115
|
-
role: "none",
|
|
116
|
-
className: previewChrome
|
|
117
|
-
}, /* @__PURE__ */ React2.createElement("a", {
|
|
89
|
+
return /* @__PURE__ */ React2.createElement(Card2.Container, {
|
|
90
|
+
role
|
|
91
|
+
}, /* @__PURE__ */ React2.createElement(Card2.Poster, {
|
|
92
|
+
alt: name,
|
|
93
|
+
...image ? {
|
|
94
|
+
image
|
|
95
|
+
} : {
|
|
96
|
+
icon: "ph--building-office--regular"
|
|
97
|
+
}
|
|
98
|
+
}), /* @__PURE__ */ React2.createElement(Card2.Heading, null, name), description && /* @__PURE__ */ React2.createElement(Card2.Text, {
|
|
99
|
+
classNames: "line-clamp-2"
|
|
100
|
+
}, description), website && /* @__PURE__ */ React2.createElement(Card2.Chrome, null, /* @__PURE__ */ React2.createElement("a", {
|
|
118
101
|
className: "dx-button dx-focus-ring gap-2",
|
|
119
102
|
"data-variant": "ghost",
|
|
120
103
|
href: website,
|
|
@@ -137,21 +120,18 @@ var OrganizationCard = ({ children, classNames, subject: { name, image, descript
|
|
|
137
120
|
// packages/plugins/plugin-preview/src/components/ProjectCard.tsx
|
|
138
121
|
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
139
122
|
import React3 from "react";
|
|
140
|
-
import {
|
|
141
|
-
var ProjectCard = ({
|
|
123
|
+
import { Card as Card3 } from "@dxos/react-ui-stack";
|
|
124
|
+
var ProjectCard = ({ subject: { name, image, description }, role }) => {
|
|
142
125
|
var _effect = _useSignals3();
|
|
143
126
|
try {
|
|
144
|
-
return /* @__PURE__ */ React3.createElement(
|
|
145
|
-
role
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
className: mx3(previewTitle, "pli-3 mlb-3")
|
|
153
|
-
}, name), description && /* @__PURE__ */ React3.createElement("p", {
|
|
154
|
-
className: "pli-3 line-clamp-2 mlb-3"
|
|
127
|
+
return /* @__PURE__ */ React3.createElement(Card3.Container, {
|
|
128
|
+
role
|
|
129
|
+
}, image && /* @__PURE__ */ React3.createElement(Card3.Poster, {
|
|
130
|
+
image,
|
|
131
|
+
alt: name,
|
|
132
|
+
aspect: "auto"
|
|
133
|
+
}), /* @__PURE__ */ React3.createElement(Card3.Heading, null, name), description && /* @__PURE__ */ React3.createElement(Card3.Text, {
|
|
134
|
+
classNames: "line-clamp-2"
|
|
155
135
|
}, description));
|
|
156
136
|
} finally {
|
|
157
137
|
_effect.f();
|
|
@@ -201,9 +181,9 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
201
181
|
dispatch
|
|
202
182
|
]);
|
|
203
183
|
return /* @__PURE__ */ React4.createElement(ContactCard, {
|
|
184
|
+
role,
|
|
204
185
|
subject: data.subject,
|
|
205
|
-
onOrgClick: handleOrgClick
|
|
206
|
-
role
|
|
186
|
+
onOrgClick: handleOrgClick
|
|
207
187
|
}, role === "popover" && /* @__PURE__ */ React4.createElement(Surface, {
|
|
208
188
|
role: "related",
|
|
209
189
|
data
|
|
@@ -219,8 +199,8 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
219
199
|
],
|
|
220
200
|
filter: (data) => isInstanceOf(DataType.Organization, data.subject),
|
|
221
201
|
component: ({ data, role }) => /* @__PURE__ */ React4.createElement(OrganizationCard, {
|
|
222
|
-
|
|
223
|
-
|
|
202
|
+
role,
|
|
203
|
+
subject: data.subject
|
|
224
204
|
}, role === "popover" && /* @__PURE__ */ React4.createElement(Surface, {
|
|
225
205
|
role: "related",
|
|
226
206
|
data
|
|
@@ -266,20 +246,19 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
266
246
|
setValue(data.subject, path, value);
|
|
267
247
|
}
|
|
268
248
|
}, []);
|
|
269
|
-
return /* @__PURE__ */ React4.createElement(
|
|
249
|
+
return /* @__PURE__ */ React4.createElement(Card4.Container, {
|
|
250
|
+
role
|
|
251
|
+
}, /* @__PURE__ */ React4.createElement(Form, {
|
|
270
252
|
schema,
|
|
271
253
|
values: data.subject,
|
|
272
254
|
readonly: role === "popover",
|
|
273
255
|
onSave: handleSave,
|
|
274
|
-
autoSave: true
|
|
275
|
-
|
|
276
|
-
classNames: kanbanCardWithoutPoster
|
|
277
|
-
}
|
|
278
|
-
});
|
|
256
|
+
autoSave: true
|
|
257
|
+
}));
|
|
279
258
|
}
|
|
280
259
|
})
|
|
281
260
|
]);
|
|
282
261
|
export {
|
|
283
262
|
react_surface_default as default
|
|
284
263
|
};
|
|
285
|
-
//# sourceMappingURL=react-surface-
|
|
264
|
+
//# sourceMappingURL=react-surface-FGMSZTOE.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 { Filter, fullyQualifiedId, getSchema, getSpace, isEchoObject, type AnyLiveObject } from '@dxos/client/echo';\nimport { isInstanceOf, 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 } from '@dxos/react-ui-theme';\nimport { DataType } from '@dxos/schema';\n\nimport { ContactCard, OrganizationCard, ProjectCard } from '../components';\nimport { PREVIEW_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--contact`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Person } => isInstanceOf(DataType.Person, data.subject),\n component: ({ data, role }) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const handleOrgClick = useCallback(\n async (org: DataType.Organization) => {\n const space = getSpace(org);\n const tablesQuery = await space?.db.query(Filter.type(TableType)).run();\n const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {\n return table.view?.target?.query?.typename === DataType.Organization.typename;\n });\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n options: {\n state: false,\n anchorId: '',\n },\n }),\n );\n if (currentSpaceOrgTable) {\n return dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [fullyQualifiedId(currentSpaceOrgTable)],\n options: { workspace: space?.id },\n }),\n );\n }\n },\n [dispatch],\n );\n return (\n <ContactCard role={role} subject={data.subject} onOrgClick={handleOrgClick}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--organization`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Organization } => isInstanceOf(DataType.Organization, data.subject),\n component: ({ data, role }) => (\n <OrganizationCard role={role} subject={data.subject}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--project`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Project } => isInstanceOf(DataType.Project, data.subject),\n component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,\n }),\n\n //\n // Fallback for any object.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/fallback-popover`,\n role: ['popover', 'card--kanban', 'card'],\n position: 'fallback',\n filter: (data): data is { subject: AnyLiveObject<any> } => isEchoObject(data.subject),\n component: ({ data, role }) => {\n const schema = getSchema(data.subject);\n const { t } = useTranslation(PREVIEW_PLUGIN);\n if (!schema) {\n return <p className={descriptionMessage}>{t('unable to create preview message')}</p>;\n }\n\n const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {\n const changedPaths = Object.keys(changed).filter((path) => changed[path]);\n for (const path of changedPaths) {\n const value = values[path];\n setValue(data.subject, path as JsonPath, value);\n }\n }, []);\n\n return (\n <Card.Container role={role}>\n <Form schema={schema} values={data.subject} readonly={role === 'popover'} onSave={handleSave} autoSave />\n </Card.Container>\n );\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Icon, Avatar, Button } from '@dxos/react-ui';\nimport { Card, cardHeading, cardText } from '@dxos/react-ui-stack';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ContactCard = ({\n children,\n subject: { fullName, image, organization, emails },\n onOrgClick,\n role,\n}: PreviewProps<DataType.Person> & { onOrgClick?: (org: DataType.Organization) => void }) => {\n const organizationName = organization && typeof organization === 'object' ? organization.target?.name : organization;\n return (\n <Card.Container role={role}>\n <Avatar.Root>\n <Card.Text role='group' classNames='grid gap-3 grid-cols-[min-content_1fr]'>\n <Avatar.Content imgSrc={image} icon='ph--user--regular' size={16} hue='neutral' />\n <div role='none' className='bs-min self-center'>\n <Avatar.Label asChild>\n <h2 className={cardHeading}>{fullName}</h2>\n </Avatar.Label>\n </div>\n </Card.Text>\n </Avatar.Root>\n {organizationName && (\n <Card.Chrome>\n {typeof organization === 'object' && onOrgClick ? (\n <Button variant='ghost' classNames='gap-2 text-start' onClick={() => onOrgClick(organization.target!)}>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n <Icon icon='ph--arrow-right--regular' />\n </Button>\n ) : (\n <p className='dx-button gap-2' data-variant='ghost'>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n </p>\n )}\n </Card.Chrome>\n )}\n <dl\n className={mx(\n cardText,\n 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',\n )}\n >\n {emails?.length &&\n emails.map(({ label, value }) => (\n <Fragment key={value}>\n <dt>\n <Icon icon='ph--at--regular' size={5} />\n </dt>\n <dd key={value} className='break-words'>\n {value}\n </dd>\n </Fragment>\n ))}\n </dl>\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const OrganizationCard = ({\n children,\n subject: { name, image, description, website },\n role,\n}: PreviewProps<DataType.Organization>) => {\n return (\n <Card.Container role={role}>\n <Card.Poster alt={name!} {...(image ? { image } : { icon: 'ph--building-office--regular' })} />\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n {website && (\n <Card.Chrome>\n <a\n className='dx-button dx-focus-ring gap-2'\n data-variant='ghost'\n href={website}\n target='_blank'\n rel='noreferrer'\n >\n <Icon icon='ph--link--regular' size={5} classNames='text-subdued' />\n <span className='grow'>{website}</span>\n <Icon icon='ph--arrow-square-out--regular' />\n </a>\n </Card.Chrome>\n )}\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ProjectCard = ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => {\n return (\n <Card.Container role={role}>\n {image && <Card.Poster image={image} alt={name} aspect='auto' />}\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n </Card.Container>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,OAAOA,UAASC,mBAAmB;AAEnC,SACEC,cACAC,cACAC,SACAC,aACAC,cACAC,eACAC,2BACK;AACP,SAASC,QAAQC,kBAAkBC,WAAWC,UAAUC,oBAAwC;AAChG,SAASC,cAA6BC,gBAAgB;AACtD,SAASC,sBAAsB;AAC/B,SAASC,YAAY;AACrB,SAASC,QAAAA,aAAY;AACrB,SAASC,iBAAiB;AAC1B,SAASC,0BAA0B;AACnC,SAASC,gBAAgB;;;;AClBzB,OAAOC,SAASC,gBAAgB;AAEhC,SAASC,MAAMC,QAAQC,cAAc;AACrC,SAASC,MAAMC,aAAaC,gBAAgB;AAC5C,SAASC,UAAU;AAKZ,IAAMC,cAAc,CAAC,EAC1BC,U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xE,mBAAWA,QAAQH,cAAc;AAC/B,gBAAMI,QAAQN,OAAOK,IAAAA;AACrBE,mBAAS/D,KAAKI,SAASyD,MAAkBC,KAAAA;QAC3C;MACF,GAAG,CAAA,CAAE;AAEL,aACE,gBAAAvB,OAAA,cAACyB,MAAKC,WAAS;QAACnE;SACd,gBAAAyC,OAAA,cAAC2B,MAAAA;QAAKlB;QAAgBQ,QAAQxD,KAAKI;QAAS+D,UAAUrE,SAAS;QAAWsE,QAAQb;QAAYc,UAAAA;;IAGpG;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["React", "useCallback", "Capabilities", "LayoutAction", "Surface", "contributes", "createIntent", "createSurface", "useIntentDispatcher", "Filter", "fullyQualifiedId", "getSchema", "getSpace", "isEchoObject", "isInstanceOf", "setValue", "useTranslation", "Form", "Card", "TableType", "descriptionMessage", "DataType", "React", "Fragment", "Icon", "Avatar", "Button", "Card", "cardHeading", "cardText", "mx", "ContactCard", "children", "subject", "fullName", "image", "organization", "emails", "onOrgClick", "role", "organizationName", "target", "name", "Card", "Container", "Avatar", "Root", "Text", "classNames", "Content", "imgSrc", "icon", "size", "hue", "div", "className", "Label", "asChild", "h2", "cardHeading", "Chrome", "Button", "variant", "onClick", "Icon", "span", "p", "data-variant", "dl", "mx", "cardText", "length", "map", "label", "value", "Fragment", "key", "dt", "dd", "React", "Icon", "Card", "OrganizationCard", "children", "subject", "name", "image", "description", "website", "role", "React", "Card", "Container", "Poster", "alt", "icon", "Heading", "Text", "classNames", "Chrome", "a", "className", "data-variant", "href", "target", "rel", "Icon", "size", "span", "React", "Card", "ProjectCard", "subject", "name", "image", "description", "role", "React", "Card", "Container", "Poster", "alt", "aspect", "Heading", "Text", "classNames", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PREVIEW_PLUGIN", "role", "filter", "data", "isInstanceOf", "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", "isEchoObject", "schema", "getSchema", "t", "useTranslation", "p", "className", "descriptionMessage", "handleSave", "values", "changed", "changedPaths", "Object", "keys", "path", "value", "setValue", "Card", "Container", "Form", "readonly", "onSave", "autoSave"]
|
|
7
|
+
}
|
|
@@ -16,18 +16,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_XGHMBEIV_exports = {};
|
|
20
|
+
__export(chunk_XGHMBEIV_exports, {
|
|
21
21
|
PREVIEW_PLUGIN: () => PREVIEW_PLUGIN,
|
|
22
|
-
|
|
23
|
-
kanbanCardWithoutPoster: () => kanbanCardWithoutPoster,
|
|
24
|
-
meta: () => meta,
|
|
25
|
-
popoverCard: () => popoverCard,
|
|
26
|
-
previewChrome: () => previewChrome,
|
|
27
|
-
previewProse: () => previewProse,
|
|
28
|
-
previewTitle: () => previewTitle
|
|
22
|
+
meta: () => meta
|
|
29
23
|
});
|
|
30
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_XGHMBEIV_exports);
|
|
31
25
|
var PREVIEW_PLUGIN = "dxos.org/plugin/preview";
|
|
32
26
|
var meta = {
|
|
33
27
|
id: PREVIEW_PLUGIN,
|
|
@@ -35,21 +29,9 @@ var meta = {
|
|
|
35
29
|
icon: "ph--eye--regular",
|
|
36
30
|
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview"
|
|
37
31
|
};
|
|
38
|
-
var popoverCard = "popover-card-width rounded-lg overflow-hidden";
|
|
39
|
-
var defaultCard = "";
|
|
40
|
-
var kanbanCardWithoutPoster = "pbs-[--rail-action]";
|
|
41
|
-
var previewTitle = "text-lg font-medium line-clamp-2";
|
|
42
|
-
var previewProse = "pli-3 mlb-3";
|
|
43
|
-
var previewChrome = "pli-1.5 mlb-1.5 [&_.dx-button]:pli-1.5 [&_.dx-button]:text-start [&_.dx-button]:is-full";
|
|
44
32
|
// Annotate the CommonJS export names for ESM import in node:
|
|
45
33
|
0 && (module.exports = {
|
|
46
34
|
PREVIEW_PLUGIN,
|
|
47
|
-
|
|
48
|
-
kanbanCardWithoutPoster,
|
|
49
|
-
meta,
|
|
50
|
-
popoverCard,
|
|
51
|
-
previewChrome,
|
|
52
|
-
previewProse,
|
|
53
|
-
previewTitle
|
|
35
|
+
meta
|
|
54
36
|
});
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-XGHMBEIV.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const PREVIEW_PLUGIN = 'dxos.org/plugin/preview';\n\nexport const meta: PluginMeta = {\n id: PREVIEW_PLUGIN,\n name: 'Preview',\n icon: 'ph--eye--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview',\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,iBAAiB;AAEvB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
+
"names": ["PREVIEW_PLUGIN", "meta", "id", "name", "icon", "source"]
|
|
7
|
+
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -28,41 +28,35 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var node_exports = {};
|
|
30
30
|
__export(node_exports, {
|
|
31
|
-
PREVIEW_PLUGIN: () =>
|
|
31
|
+
PREVIEW_PLUGIN: () => import_chunk_XGHMBEIV.PREVIEW_PLUGIN,
|
|
32
32
|
PreviewPlugin: () => PreviewPlugin,
|
|
33
|
-
|
|
34
|
-
kanbanCardWithoutPoster: () => import_chunk_VFSOM2B4.kanbanCardWithoutPoster,
|
|
35
|
-
meta: () => import_chunk_VFSOM2B4.meta,
|
|
36
|
-
popoverCard: () => import_chunk_VFSOM2B4.popoverCard,
|
|
37
|
-
previewChrome: () => import_chunk_VFSOM2B4.previewChrome,
|
|
38
|
-
previewProse: () => import_chunk_VFSOM2B4.previewProse,
|
|
39
|
-
previewTitle: () => import_chunk_VFSOM2B4.previewTitle
|
|
33
|
+
meta: () => import_chunk_XGHMBEIV.meta
|
|
40
34
|
});
|
|
41
35
|
module.exports = __toCommonJS(node_exports);
|
|
42
|
-
var
|
|
36
|
+
var import_chunk_XGHMBEIV = require("./chunk-XGHMBEIV.cjs");
|
|
43
37
|
var import_app_framework = require("@dxos/app-framework");
|
|
44
38
|
var import_plugin_client = require("@dxos/plugin-client");
|
|
45
39
|
var import_schema = require("@dxos/schema");
|
|
46
40
|
var import_app_framework2 = require("@dxos/app-framework");
|
|
47
|
-
var PreviewPopover = (0, import_app_framework2.lazy)(() => import("./preview-popover-
|
|
48
|
-
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-
|
|
41
|
+
var PreviewPopover = (0, import_app_framework2.lazy)(() => import("./preview-popover-K4E7UEQU.cjs"));
|
|
42
|
+
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-FI63RLWN.cjs"));
|
|
49
43
|
var translations_default = [
|
|
50
44
|
{
|
|
51
45
|
"en-US": {
|
|
52
|
-
[
|
|
46
|
+
[import_chunk_XGHMBEIV.PREVIEW_PLUGIN]: {
|
|
53
47
|
"unable to create preview message": "No preview"
|
|
54
48
|
}
|
|
55
49
|
}
|
|
56
50
|
}
|
|
57
51
|
];
|
|
58
|
-
var PreviewPlugin = () => (0, import_app_framework.definePlugin)(
|
|
52
|
+
var PreviewPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_XGHMBEIV.meta, [
|
|
59
53
|
(0, import_app_framework.defineModule)({
|
|
60
|
-
id: `${
|
|
54
|
+
id: `${import_chunk_XGHMBEIV.meta.id}/module/translations`,
|
|
61
55
|
activatesOn: import_app_framework.Events.SetupTranslations,
|
|
62
56
|
activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Translations, translations_default)
|
|
63
57
|
}),
|
|
64
58
|
(0, import_app_framework.defineModule)({
|
|
65
|
-
id: `${
|
|
59
|
+
id: `${import_chunk_XGHMBEIV.meta.id}/module/schema`,
|
|
66
60
|
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
67
61
|
activate: () => [
|
|
68
62
|
(0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.Schema, [
|
|
@@ -72,12 +66,12 @@ var PreviewPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_VF
|
|
|
72
66
|
]
|
|
73
67
|
}),
|
|
74
68
|
(0, import_app_framework.defineModule)({
|
|
75
|
-
id: `${
|
|
69
|
+
id: `${import_chunk_XGHMBEIV.meta.id}/module/preview-popover`,
|
|
76
70
|
activatesOn: import_app_framework.Events.Startup,
|
|
77
71
|
activate: PreviewPopover
|
|
78
72
|
}),
|
|
79
73
|
(0, import_app_framework.defineModule)({
|
|
80
|
-
id: `${
|
|
74
|
+
id: `${import_chunk_XGHMBEIV.meta.id}/module/react-surface`,
|
|
81
75
|
activatesOn: import_app_framework.Events.SetupReactSurface,
|
|
82
76
|
activate: ReactSurface
|
|
83
77
|
})
|
|
@@ -86,12 +80,6 @@ var PreviewPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_VF
|
|
|
86
80
|
0 && (module.exports = {
|
|
87
81
|
PREVIEW_PLUGIN,
|
|
88
82
|
PreviewPlugin,
|
|
89
|
-
|
|
90
|
-
kanbanCardWithoutPoster,
|
|
91
|
-
meta,
|
|
92
|
-
popoverCard,
|
|
93
|
-
previewChrome,
|
|
94
|
-
previewProse,
|
|
95
|
-
previewTitle
|
|
83
|
+
meta
|
|
96
84
|
});
|
|
97
85
|
//# sourceMappingURL=index.cjs.map
|