@dxos/plugin-preview 0.8.2-main.fbd8ed0 → 0.8.2-staging.42af850
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-B2VK6GFP.mjs +28 -0
- package/dist/lib/browser/chunk-B2VK6GFP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +17 -309
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/preview-popover-S3OY3CFZ.mjs +65 -0
- package/dist/lib/browser/preview-popover-S3OY3CFZ.mjs.map +7 -0
- package/dist/lib/browser/react-surface-XDHP6EN7.mjs +285 -0
- package/dist/lib/browser/react-surface-XDHP6EN7.mjs.map +7 -0
- package/dist/lib/node/chunk-VFSOM2B4.cjs +55 -0
- package/dist/lib/node/chunk-VFSOM2B4.cjs.map +7 -0
- package/dist/lib/node/index.cjs +20 -314
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/preview-popover-GPBOHU5E.cjs +84 -0
- package/dist/lib/node/preview-popover-GPBOHU5E.cjs.map +7 -0
- package/dist/lib/node/react-surface-CPAQ7ZYR.cjs +297 -0
- package/dist/lib/node/react-surface-CPAQ7ZYR.cjs.map +7 -0
- package/dist/lib/node-esm/chunk-PYKIS3N7.mjs +30 -0
- package/dist/lib/node-esm/chunk-PYKIS3N7.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +17 -310
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/preview-popover-EQAEYYDT.mjs +67 -0
- package/dist/lib/node-esm/preview-popover-EQAEYYDT.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-QJRHN4PN.mjs +286 -0
- package/dist/lib/node-esm/react-surface-QJRHN4PN.mjs.map +7 -0
- package/dist/types/src/Preview.stories.d.ts +6 -6
- package/dist/types/src/PreviewPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/preview-popover.d.ts +4 -0
- package/dist/types/src/capabilities/preview-popover.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/OrganizationCard.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +1 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +20 -19
- package/src/PreviewPlugin.tsx +5 -184
- package/src/capabilities/index.ts +8 -0
- package/src/capabilities/preview-popover.ts +65 -0
- package/src/capabilities/react-surface.tsx +126 -0
- package/src/components/OrganizationCard.tsx +8 -2
- package/src/types.ts +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
// packages/plugins/plugin-preview/src/types.ts
|
|
11
|
+
var popoverCard = "popover-card-width rounded-lg overflow-hidden";
|
|
12
|
+
var defaultCard = "";
|
|
13
|
+
var kanbanCardWithoutPoster = "pbs-[--rail-action]";
|
|
14
|
+
var previewTitle = "text-lg font-medium line-clamp-2";
|
|
15
|
+
var previewProse = "pli-3 mlb-3";
|
|
16
|
+
var previewChrome = "pli-1.5 mlb-1.5 [&_.dx-button]:pli-1.5 [&_.dx-button]:text-start [&_.dx-button]:is-full";
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
PREVIEW_PLUGIN,
|
|
20
|
+
meta,
|
|
21
|
+
popoverCard,
|
|
22
|
+
defaultCard,
|
|
23
|
+
kanbanCardWithoutPoster,
|
|
24
|
+
previewTitle,
|
|
25
|
+
previewProse,
|
|
26
|
+
previewChrome
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-B2VK6GFP.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../src/types.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", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type PropsWithChildren } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\n\n// TODO(burdon): Better place for these defs?\nexport type PreviewProps<T extends object> = PropsWithChildren<\n ThemedClassName<{\n subject: T;\n role: string;\n }>\n>;\n\n// TODO(burdon): Update react-ui-card (to use grid) and re-use here.\n// - See https://dxos-storybook.pages.dev/?path=/story/ui-react-ui-card-card--draggable\n// - Standardize Header, actions, image, body, etc.\n// - Support different grid layouts (e.g., image to the side, on top, etc.)\n// - Should co-exist naturally with react-ui-form (e.g., as main content).\n// - Considerations for drag-and-drop.\n/**\n * <Card.Root>\n * <Card.Header>\n * <Card.Title>\n * <Card.Action>\n * </Card.Header>\n * <Card.Body>\n * <Card.Image>\n * <Form />\n * </Card.Body>\n * </Card.Root>\n */\nexport const popoverCard = 'popover-card-width rounded-lg overflow-hidden';\nexport const defaultCard = '';\nexport const kanbanCardWithoutPoster = 'pbs-[--rail-action]';\nexport const previewTitle = 'text-lg font-medium line-clamp-2';\nexport const previewProse = 'pli-3 mlb-3';\nexport const previewChrome = 'pli-1.5 mlb-1.5 [&_.dx-button]:pli-1.5 [&_.dx-button]:text-start [&_.dx-button]:is-full';\n"],
|
|
5
|
+
"mappings": ";AAMO,IAAMA,iBAAiB;AAEvB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,MAAM;EACNC,QAAQ;AACV;;;ACqBO,IAAMC,cAAc;AACpB,IAAMC,cAAc;AACpB,IAAMC,0BAA0B;AAChC,IAAMC,eAAe;AACrB,IAAMC,eAAe;AACrB,IAAMC,gBAAgB;",
|
|
6
|
+
"names": ["PREVIEW_PLUGIN", "meta", "id", "name", "icon", "source", "popoverCard", "defaultCard", "kanbanCardWithoutPoster", "previewTitle", "previewProse", "previewChrome"]
|
|
7
|
+
}
|
|
@@ -1,155 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var popoverCard = "popover-consistent-width rounded-lg overflow-hidden";
|
|
12
|
-
var defaultCard = "";
|
|
13
|
-
var kanbanCardWithoutPoster = "pbs-[--rail-action]";
|
|
14
|
-
var previewTitle = "text-lg font-medium line-clamp-2";
|
|
15
|
-
var previewProse = "pli-3 mlb-3";
|
|
16
|
-
var previewChrome = "pli-1.5 mlb-1.5 [&_.dx-button]:pli-1.5 [&_.dx-button]:text-start [&_.dx-button]:is-full";
|
|
1
|
+
import {
|
|
2
|
+
PREVIEW_PLUGIN,
|
|
3
|
+
defaultCard,
|
|
4
|
+
kanbanCardWithoutPoster,
|
|
5
|
+
meta,
|
|
6
|
+
popoverCard,
|
|
7
|
+
previewChrome,
|
|
8
|
+
previewProse,
|
|
9
|
+
previewTitle
|
|
10
|
+
} from "./chunk-B2VK6GFP.mjs";
|
|
17
11
|
|
|
18
12
|
// packages/plugins/plugin-preview/src/PreviewPlugin.tsx
|
|
19
|
-
import
|
|
20
|
-
import { Capabilities, Events, LayoutAction, Surface, contributes, createIntent, createSurface, defineModule, definePlugin, useIntentDispatcher } from "@dxos/app-framework";
|
|
21
|
-
import { addEventListener } from "@dxos/async";
|
|
22
|
-
import { resolveRef } from "@dxos/client";
|
|
23
|
-
import { Filter, fullyQualifiedId, getSchema, getSpace, isEchoObject, parseId } from "@dxos/client/echo";
|
|
24
|
-
import { isInstanceOf } from "@dxos/echo-schema";
|
|
25
|
-
import { DXN } from "@dxos/keys";
|
|
26
|
-
import { log } from "@dxos/log";
|
|
13
|
+
import { Capabilities, Events, contributes, defineModule, definePlugin } from "@dxos/app-framework";
|
|
27
14
|
import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
|
|
28
|
-
import { useTranslation } from "@dxos/react-ui";
|
|
29
|
-
import { Form } from "@dxos/react-ui-form";
|
|
30
|
-
import { TableType } from "@dxos/react-ui-table";
|
|
31
|
-
import { descriptionMessage } from "@dxos/react-ui-theme";
|
|
32
15
|
import { DataType } from "@dxos/schema";
|
|
33
16
|
|
|
34
|
-
// packages/plugins/plugin-preview/src/
|
|
35
|
-
import
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var ContactCard = ({ children, classNames, role, subject: { fullName, image, organization, emails }, onOrgClick }) => {
|
|
39
|
-
const organizationName = organization && typeof organization === "object" ? organization.target?.name : organization;
|
|
40
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
41
|
-
role: "none",
|
|
42
|
-
className: mx(role === "popover" ? popoverCard : defaultCard, classNames)
|
|
43
|
-
}, /* @__PURE__ */ React.createElement(Avatar.Root, null, /* @__PURE__ */ React.createElement("div", {
|
|
44
|
-
role: "group",
|
|
45
|
-
className: mx(previewProse, "grid gap-3 grid-cols-[min-content_1fr]")
|
|
46
|
-
}, /* @__PURE__ */ React.createElement(Avatar.Content, {
|
|
47
|
-
imgSrc: image,
|
|
48
|
-
icon: "ph--user--regular",
|
|
49
|
-
size: 16,
|
|
50
|
-
hue: "neutral"
|
|
51
|
-
}), /* @__PURE__ */ React.createElement("div", {
|
|
52
|
-
role: "none",
|
|
53
|
-
className: "bs-min self-center"
|
|
54
|
-
}, /* @__PURE__ */ React.createElement(Avatar.Label, {
|
|
55
|
-
asChild: true
|
|
56
|
-
}, /* @__PURE__ */ React.createElement("h2", {
|
|
57
|
-
className: previewTitle
|
|
58
|
-
}, fullName))))), organizationName && /* @__PURE__ */ React.createElement("div", {
|
|
59
|
-
role: "none",
|
|
60
|
-
className: previewChrome
|
|
61
|
-
}, typeof organization === "object" && onOrgClick ? /* @__PURE__ */ React.createElement(Button, {
|
|
62
|
-
variant: "ghost",
|
|
63
|
-
classNames: "gap-2 text-start",
|
|
64
|
-
onClick: () => onOrgClick(organization.target)
|
|
65
|
-
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
66
|
-
icon: "ph--buildings--regular",
|
|
67
|
-
size: 5,
|
|
68
|
-
classNames: "text-subdued"
|
|
69
|
-
}), /* @__PURE__ */ React.createElement("span", {
|
|
70
|
-
className: "min-is-0 flex-1 truncate"
|
|
71
|
-
}, organizationName), /* @__PURE__ */ React.createElement(Icon, {
|
|
72
|
-
icon: "ph--arrow-right--regular"
|
|
73
|
-
})) : /* @__PURE__ */ React.createElement("p", {
|
|
74
|
-
className: "dx-button gap-2",
|
|
75
|
-
"data-variant": "ghost"
|
|
76
|
-
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
77
|
-
icon: "ph--buildings--regular",
|
|
78
|
-
size: 5,
|
|
79
|
-
classNames: "text-subdued"
|
|
80
|
-
}), /* @__PURE__ */ React.createElement("span", {
|
|
81
|
-
className: "min-is-0 flex-1 truncate"
|
|
82
|
-
}, organizationName))), /* @__PURE__ */ React.createElement("dl", {
|
|
83
|
-
className: mx(previewProse, "grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0")
|
|
84
|
-
}, emails?.length && emails.map(({ label, value }) => /* @__PURE__ */ React.createElement(Fragment, {
|
|
85
|
-
key: value
|
|
86
|
-
}, /* @__PURE__ */ React.createElement("dt", null, /* @__PURE__ */ React.createElement(Icon, {
|
|
87
|
-
icon: "ph--at--regular",
|
|
88
|
-
size: 5
|
|
89
|
-
})), /* @__PURE__ */ React.createElement("dd", {
|
|
90
|
-
key: value,
|
|
91
|
-
className: "break-words"
|
|
92
|
-
}, value)))), children);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
// packages/plugins/plugin-preview/src/components/OrganizationCard.tsx
|
|
96
|
-
import React2 from "react";
|
|
97
|
-
import { Icon as Icon2 } from "@dxos/react-ui";
|
|
98
|
-
import { mx as mx2 } from "@dxos/react-ui-theme";
|
|
99
|
-
var OrganizationCard = ({ children, classNames, subject: { name, image, description, website }, role }) => {
|
|
100
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
101
|
-
role: "none",
|
|
102
|
-
className: mx2(role === "popover" ? popoverCard : defaultCard, classNames)
|
|
103
|
-
}, image ? /* @__PURE__ */ React2.createElement("img", {
|
|
104
|
-
className: "aspect-video object-cover is-full bs-auto",
|
|
105
|
-
src: image,
|
|
106
|
-
alt: name
|
|
107
|
-
}) : /* @__PURE__ */ React2.createElement("div", {
|
|
108
|
-
role: "image",
|
|
109
|
-
className: "grid aspect-video place-items-center bg-input text-subdued"
|
|
110
|
-
}, /* @__PURE__ */ React2.createElement(Icon2, {
|
|
111
|
-
icon: "ph--building-office--regular",
|
|
112
|
-
size: 10
|
|
113
|
-
})), /* @__PURE__ */ React2.createElement("h2", {
|
|
114
|
-
className: mx2(previewTitle, previewProse)
|
|
115
|
-
}, name), description && /* @__PURE__ */ React2.createElement("p", {
|
|
116
|
-
className: mx2(previewProse, "line-clamp-2")
|
|
117
|
-
}, description), website && /* @__PURE__ */ React2.createElement("div", {
|
|
118
|
-
role: "none",
|
|
119
|
-
className: previewChrome
|
|
120
|
-
}, /* @__PURE__ */ React2.createElement("a", {
|
|
121
|
-
className: "dx-button dx-focus-ring gap-2",
|
|
122
|
-
href: website,
|
|
123
|
-
target: "_blank",
|
|
124
|
-
rel: "noreferrer"
|
|
125
|
-
}, /* @__PURE__ */ React2.createElement(Icon2, {
|
|
126
|
-
icon: "ph--link--regular",
|
|
127
|
-
size: 5,
|
|
128
|
-
classNames: "text-subdued"
|
|
129
|
-
}), /* @__PURE__ */ React2.createElement("span", {
|
|
130
|
-
className: "grow"
|
|
131
|
-
}, website), /* @__PURE__ */ React2.createElement(Icon2, {
|
|
132
|
-
icon: "ph--arrow-square-out--regular"
|
|
133
|
-
}))), children);
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
// packages/plugins/plugin-preview/src/components/ProjectCard.tsx
|
|
137
|
-
import React3 from "react";
|
|
138
|
-
import { mx as mx3 } from "@dxos/react-ui-theme";
|
|
139
|
-
var ProjectCard = ({ classNames, role, subject: { name, image, description } }) => {
|
|
140
|
-
return /* @__PURE__ */ React3.createElement("div", {
|
|
141
|
-
role: "none",
|
|
142
|
-
className: mx3(role === "popover" ? popoverCard : defaultCard, classNames)
|
|
143
|
-
}, image && /* @__PURE__ */ React3.createElement("img", {
|
|
144
|
-
className: "is-full bs-auto",
|
|
145
|
-
src: image,
|
|
146
|
-
alt: name
|
|
147
|
-
}), /* @__PURE__ */ React3.createElement("h2", {
|
|
148
|
-
className: mx3(previewTitle, "pli-3 mlb-3")
|
|
149
|
-
}, name), description && /* @__PURE__ */ React3.createElement("p", {
|
|
150
|
-
className: "pli-3 line-clamp-2 mlb-3"
|
|
151
|
-
}, description));
|
|
152
|
-
};
|
|
17
|
+
// packages/plugins/plugin-preview/src/capabilities/index.ts
|
|
18
|
+
import { lazy } from "@dxos/app-framework";
|
|
19
|
+
var PreviewPopover = lazy(() => import("./preview-popover-S3OY3CFZ.mjs"));
|
|
20
|
+
var ReactSurface = lazy(() => import("./react-surface-XDHP6EN7.mjs"));
|
|
153
21
|
|
|
154
22
|
// packages/plugins/plugin-preview/src/translations.ts
|
|
155
23
|
var translations_default = [
|
|
@@ -163,22 +31,6 @@ var translations_default = [
|
|
|
163
31
|
];
|
|
164
32
|
|
|
165
33
|
// packages/plugins/plugin-preview/src/PreviewPlugin.tsx
|
|
166
|
-
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-preview/src/PreviewPlugin.tsx";
|
|
167
|
-
var customEventOptions = {
|
|
168
|
-
capture: true,
|
|
169
|
-
passive: false
|
|
170
|
-
};
|
|
171
|
-
var handlePreviewLookup = async (client, defaultSpace, { ref, label }) => {
|
|
172
|
-
const dxn = DXN.parse(ref);
|
|
173
|
-
if (!dxn) {
|
|
174
|
-
return null;
|
|
175
|
-
}
|
|
176
|
-
const object = await resolveRef(client, dxn, defaultSpace);
|
|
177
|
-
return {
|
|
178
|
-
label,
|
|
179
|
-
object
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
34
|
var PreviewPlugin = () => definePlugin(meta, [
|
|
183
35
|
defineModule({
|
|
184
36
|
id: `${meta.id}/module/translations`,
|
|
@@ -198,156 +50,12 @@ var PreviewPlugin = () => definePlugin(meta, [
|
|
|
198
50
|
defineModule({
|
|
199
51
|
id: `${meta.id}/module/preview-popover`,
|
|
200
52
|
activatesOn: Events.Startup,
|
|
201
|
-
activate:
|
|
202
|
-
const handleDxRefTagActivate = async ({ ref, label, trigger }) => {
|
|
203
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
204
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
205
|
-
const [layout] = context.getCapabilities(Capabilities.Layout);
|
|
206
|
-
const { spaceId } = parseId(layout.workspace);
|
|
207
|
-
const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;
|
|
208
|
-
const result = await handlePreviewLookup(client, space, {
|
|
209
|
-
ref,
|
|
210
|
-
label
|
|
211
|
-
});
|
|
212
|
-
if (!result) {
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
await dispatch(createIntent(LayoutAction.UpdatePopover, {
|
|
216
|
-
part: "popover",
|
|
217
|
-
subject: result.object,
|
|
218
|
-
options: {
|
|
219
|
-
state: true,
|
|
220
|
-
variant: "virtual",
|
|
221
|
-
anchor: trigger
|
|
222
|
-
}
|
|
223
|
-
}));
|
|
224
|
-
};
|
|
225
|
-
if (!document.defaultView) {
|
|
226
|
-
log.warn("No default view found", void 0, {
|
|
227
|
-
F: __dxlog_file,
|
|
228
|
-
L: 106,
|
|
229
|
-
S: void 0,
|
|
230
|
-
C: (f, a) => f(...a)
|
|
231
|
-
});
|
|
232
|
-
return [];
|
|
233
|
-
}
|
|
234
|
-
const cleanup = addEventListener(document.defaultView, "dx-ref-tag-activate", handleDxRefTagActivate, customEventOptions);
|
|
235
|
-
return contributes(Capabilities.Null, null, () => cleanup());
|
|
236
|
-
}
|
|
53
|
+
activate: PreviewPopover
|
|
237
54
|
}),
|
|
238
55
|
defineModule({
|
|
239
56
|
id: `${meta.id}/module/react-surface`,
|
|
240
57
|
activatesOn: Events.SetupReactSurface,
|
|
241
|
-
activate:
|
|
242
|
-
// TODO(wittjosiah): Factor out to lazy capabilities like other plugins.
|
|
243
|
-
contributes(Capabilities.ReactSurface, [
|
|
244
|
-
//
|
|
245
|
-
// Specific schema types.
|
|
246
|
-
//
|
|
247
|
-
createSurface({
|
|
248
|
-
id: `${PREVIEW_PLUGIN}/schema-popover`,
|
|
249
|
-
role: [
|
|
250
|
-
"popover",
|
|
251
|
-
"card--kanban"
|
|
252
|
-
],
|
|
253
|
-
filter: (data) => isInstanceOf(DataType.Person, data.subject),
|
|
254
|
-
component: ({ data, role }) => {
|
|
255
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
256
|
-
const handleOrgClick = useCallback(async (org) => {
|
|
257
|
-
const space = getSpace(org);
|
|
258
|
-
const tablesQuery = await space?.db.query(Filter.type(TableType)).run();
|
|
259
|
-
const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {
|
|
260
|
-
return table.view?.target?.query?.typename === DataType.Organization.typename;
|
|
261
|
-
});
|
|
262
|
-
await dispatch(createIntent(LayoutAction.UpdatePopover, {
|
|
263
|
-
part: "popover",
|
|
264
|
-
options: {
|
|
265
|
-
state: false,
|
|
266
|
-
anchorId: ""
|
|
267
|
-
}
|
|
268
|
-
}));
|
|
269
|
-
if (currentSpaceOrgTable) {
|
|
270
|
-
return dispatch(createIntent(LayoutAction.Open, {
|
|
271
|
-
part: "main",
|
|
272
|
-
subject: [
|
|
273
|
-
fullyQualifiedId(currentSpaceOrgTable)
|
|
274
|
-
],
|
|
275
|
-
options: {
|
|
276
|
-
workspace: space?.id
|
|
277
|
-
}
|
|
278
|
-
}));
|
|
279
|
-
}
|
|
280
|
-
}, [
|
|
281
|
-
dispatch
|
|
282
|
-
]);
|
|
283
|
-
return /* @__PURE__ */ React4.createElement(ContactCard, {
|
|
284
|
-
subject: data.subject,
|
|
285
|
-
onOrgClick: handleOrgClick,
|
|
286
|
-
role
|
|
287
|
-
}, role === "popover" && /* @__PURE__ */ React4.createElement(Surface, {
|
|
288
|
-
role: "related",
|
|
289
|
-
data
|
|
290
|
-
}));
|
|
291
|
-
}
|
|
292
|
-
}),
|
|
293
|
-
createSurface({
|
|
294
|
-
id: `${PREVIEW_PLUGIN}/schema-popover`,
|
|
295
|
-
role: [
|
|
296
|
-
"popover",
|
|
297
|
-
"card--kanban"
|
|
298
|
-
],
|
|
299
|
-
filter: (data) => isInstanceOf(DataType.Organization, data.subject),
|
|
300
|
-
component: ({ data, role }) => /* @__PURE__ */ React4.createElement(OrganizationCard, {
|
|
301
|
-
subject: data.subject,
|
|
302
|
-
role
|
|
303
|
-
}, role === "popover" && /* @__PURE__ */ React4.createElement(Surface, {
|
|
304
|
-
role: "related",
|
|
305
|
-
data
|
|
306
|
-
}))
|
|
307
|
-
}),
|
|
308
|
-
createSurface({
|
|
309
|
-
id: `${PREVIEW_PLUGIN}/schema-popover`,
|
|
310
|
-
role: [
|
|
311
|
-
"popover",
|
|
312
|
-
"card--kanban"
|
|
313
|
-
],
|
|
314
|
-
filter: (data) => isInstanceOf(DataType.Project, data.subject),
|
|
315
|
-
component: ({ data, role }) => /* @__PURE__ */ React4.createElement(ProjectCard, {
|
|
316
|
-
subject: data.subject,
|
|
317
|
-
role
|
|
318
|
-
})
|
|
319
|
-
}),
|
|
320
|
-
//
|
|
321
|
-
// Fallback for any object.
|
|
322
|
-
//
|
|
323
|
-
createSurface({
|
|
324
|
-
id: `${PREVIEW_PLUGIN}/fallback-popover`,
|
|
325
|
-
role: [
|
|
326
|
-
"popover",
|
|
327
|
-
"card--kanban"
|
|
328
|
-
],
|
|
329
|
-
position: "fallback",
|
|
330
|
-
filter: (data) => isEchoObject(data.subject),
|
|
331
|
-
component: ({ data, role }) => {
|
|
332
|
-
const schema = getSchema(data.subject);
|
|
333
|
-
const { t } = useTranslation(PREVIEW_PLUGIN);
|
|
334
|
-
if (!schema) {
|
|
335
|
-
return /* @__PURE__ */ React4.createElement("p", {
|
|
336
|
-
className: descriptionMessage
|
|
337
|
-
}, t("unable to create preview message"));
|
|
338
|
-
}
|
|
339
|
-
return /* @__PURE__ */ React4.createElement(Form, {
|
|
340
|
-
schema,
|
|
341
|
-
values: data.subject,
|
|
342
|
-
readonly: role === "popover",
|
|
343
|
-
...role === "card--kanban" && {
|
|
344
|
-
classNames: kanbanCardWithoutPoster
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
})
|
|
349
|
-
])
|
|
350
|
-
)
|
|
58
|
+
activate: ReactSurface
|
|
351
59
|
})
|
|
352
60
|
]);
|
|
353
61
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
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", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type PropsWithChildren } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\n\n// TODO(burdon): Better place for these defs?\nexport type PreviewProps<T extends object> = PropsWithChildren<\n ThemedClassName<{\n subject: T;\n role: string;\n }>\n>;\n\n// TODO(burdon): Update react-ui-card (to use grid) and re-use here.\n// - See https://dxos-storybook.pages.dev/?path=/story/ui-react-ui-card-card--draggable\n// - Standardize Header, actions, image, body, etc.\n// - Support different grid layouts (e.g., image to the side, on top, etc.)\n// - Should co-exist naturally with react-ui-form (e.g., as main content).\n// - Considerations for drag-and-drop.\n/**\n * <Card.Root>\n * <Card.Header>\n * <Card.Title>\n * <Card.Action>\n * </Card.Header>\n * <Card.Body>\n * <Card.Image>\n * <Form />\n * </Card.Body>\n * </Card.Root>\n */\nexport const popoverCard = 'popover-consistent-width rounded-lg overflow-hidden';\nexport const defaultCard = '';\nexport const kanbanCardWithoutPoster = 'pbs-[--rail-action]';\nexport const previewTitle = 'text-lg font-medium line-clamp-2';\nexport const previewProse = 'pli-3 mlb-3';\nexport const previewChrome = 'pli-1.5 mlb-1.5 [&_.dx-button]:pli-1.5 [&_.dx-button]:text-start [&_.dx-button]:is-full';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport {\n Capabilities,\n Events,\n LayoutAction,\n Surface,\n contributes,\n createIntent,\n createSurface,\n defineModule,\n definePlugin,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { addEventListener } from '@dxos/async';\nimport { type Client, resolveRef } from '@dxos/client';\nimport {\n Filter,\n fullyQualifiedId,\n getSchema,\n getSpace,\n isEchoObject,\n parseId,\n type AnyLiveObject,\n type Space,\n} from '@dxos/client/echo';\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { DXN } from '@dxos/keys';\nimport { type DxRefTagActivate } from '@dxos/lit-ui';\nimport { log } from '@dxos/log';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { useTranslation } from '@dxos/react-ui';\nimport { type PreviewLinkRef, type PreviewLinkTarget } from '@dxos/react-ui-editor';\nimport { Form } from '@dxos/react-ui-form';\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 { meta, PREVIEW_PLUGIN } from './meta';\nimport translations from './translations';\nimport { kanbanCardWithoutPoster } from './types';\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 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};\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: (context) => {\n // TODO(wittjosiah): Factor out lookup handlers to other plugins to make not ECHO-specific.\n const handleDxRefTagActivate = async ({ ref, 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, 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 if (!document.defaultView) {\n log.warn('No default view found');\n return [];\n }\n\n const cleanup = addEventListener(\n document.defaultView,\n 'dx-ref-tag-activate',\n handleDxRefTagActivate,\n customEventOptions,\n );\n return contributes(Capabilities.Null, null, () => cleanup());\n },\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: () =>\n // TODO(wittjosiah): Factor out to lazy capabilities like other plugins.\n contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover`,\n role: ['popover', 'card--kanban'],\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 subject={data.subject} onOrgClick={handleOrgClick} role={role}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover`,\n role: ['popover', 'card--kanban'],\n filter: (data): data is { subject: DataType.Organization } =>\n isInstanceOf(DataType.Organization, data.subject),\n component: ({ data, role }) => (\n <OrganizationCard subject={data.subject} role={role}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover`,\n role: ['popover', 'card--kanban'],\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'],\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 return (\n <Form\n schema={schema}\n values={data.subject}\n readonly={role === 'popover'}\n {...(role === 'card--kanban' && { classNames: kanbanCardWithoutPoster })}\n />\n );\n },\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 { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps, popoverCard, previewTitle, previewProse, previewChrome, defaultCard } from '../types';\n\nexport const ContactCard = ({\n children,\n classNames,\n role,\n subject: { fullName, image, organization, emails },\n onOrgClick,\n}: PreviewProps<DataType.Person> & { onOrgClick?: (org: DataType.Organization) => void }) => {\n const organizationName = organization && typeof organization === 'object' ? organization.target?.name : organization;\n return (\n <div role='none' className={mx(role === 'popover' ? popoverCard : defaultCard, classNames)}>\n <Avatar.Root>\n <div role='group' className={mx(previewProse, '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={previewTitle}>{fullName}</h2>\n </Avatar.Label>\n </div>\n </div>\n </Avatar.Root>\n {organizationName && (\n <div role='none' className={previewChrome}>\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 </div>\n )}\n <dl\n className={mx(\n previewProse,\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 </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps, popoverCard, previewTitle, previewProse, previewChrome, defaultCard } from '../types';\n\nexport const OrganizationCard = ({\n children,\n classNames,\n subject: { name, image, description, website },\n role,\n}: PreviewProps<DataType.Organization>) => {\n return (\n <div role='none' className={mx(role === 'popover' ? popoverCard : defaultCard, classNames)}>\n {image ? (\n <img className='aspect-video object-cover is-full bs-auto' src={image} alt={name} />\n ) : (\n <div role='image' className='grid aspect-video place-items-center bg-input text-subdued'>\n <Icon icon='ph--building-office--regular' size={10} />\n </div>\n )}\n <h2 className={mx(previewTitle, previewProse)}>{name}</h2>\n {description && <p className={mx(previewProse, 'line-clamp-2')}>{description}</p>}\n {website && (\n <div role='none' className={previewChrome}>\n <a className='dx-button dx-focus-ring gap-2' href={website} target='_blank' rel='noreferrer'>\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 </div>\n )}\n {children}\n </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps, popoverCard, previewTitle, defaultCard } from '../types';\n\nexport const ProjectCard = ({\n classNames,\n role,\n subject: { name, image, description },\n}: PreviewProps<DataType.Project>) => {\n return (\n <div role='none' className={mx(role === 'popover' ? popoverCard : defaultCard, classNames)}>\n {image && <img className='is-full bs-auto' src={image} alt={name} />}\n <h2 className={mx(previewTitle, 'pli-3 mlb-3')}>{name}</h2>\n {description && <p className='pli-3 line-clamp-2 mlb-3'>{description}</p>}\n </div>\n );\n};\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": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/PreviewPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
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": ";;;;;;;;;;;;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
|
+
"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":1296,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":3670,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9429,"imports":[{"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":5727,"imports":[{"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":2969,"imports":[{"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":732,"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/translations.ts":{"bytes":1091,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":29117,"imports":[{"path":"react","kind":"import-statement","external":true},{"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/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"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/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":681,"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":25366},"packages/plugins/plugin-preview/dist/lib/browser/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"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/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"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":"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":"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":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"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/meta.ts":{"bytesInOutput":216},"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/types.ts":{"bytesInOutput":348},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":7176},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2709},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1618},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":674},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":13562}}}
|
|
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}}}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// packages/plugins/plugin-preview/src/capabilities/preview-popover.ts
|
|
2
|
+
import { Capabilities, LayoutAction, contributes, createIntent } from "@dxos/app-framework";
|
|
3
|
+
import { addEventListener } from "@dxos/async";
|
|
4
|
+
import { resolveRef } from "@dxos/client";
|
|
5
|
+
import { parseId } from "@dxos/client/echo";
|
|
6
|
+
import { DXN } from "@dxos/keys";
|
|
7
|
+
import { log } from "@dxos/log";
|
|
8
|
+
import { ClientCapabilities } from "@dxos/plugin-client";
|
|
9
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-preview/src/capabilities/preview-popover.ts";
|
|
10
|
+
var customEventOptions = {
|
|
11
|
+
capture: true,
|
|
12
|
+
passive: false
|
|
13
|
+
};
|
|
14
|
+
var handlePreviewLookup = async (client, defaultSpace, { ref, label }) => {
|
|
15
|
+
const dxn = DXN.parse(ref);
|
|
16
|
+
if (!dxn) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const object = await resolveRef(client, dxn, defaultSpace);
|
|
20
|
+
return {
|
|
21
|
+
label,
|
|
22
|
+
object
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
var preview_popover_default = (context) => {
|
|
26
|
+
const handleDxRefTagActivate = async ({ refId, label, trigger }) => {
|
|
27
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
28
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
29
|
+
const [layout] = context.getCapabilities(Capabilities.Layout);
|
|
30
|
+
const { spaceId } = parseId(layout.workspace);
|
|
31
|
+
const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;
|
|
32
|
+
const result = await handlePreviewLookup(client, space, {
|
|
33
|
+
ref: refId,
|
|
34
|
+
label
|
|
35
|
+
});
|
|
36
|
+
if (!result) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
await dispatch(createIntent(LayoutAction.UpdatePopover, {
|
|
40
|
+
part: "popover",
|
|
41
|
+
subject: result.object,
|
|
42
|
+
options: {
|
|
43
|
+
state: true,
|
|
44
|
+
variant: "virtual",
|
|
45
|
+
anchor: trigger
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
49
|
+
let cleanup;
|
|
50
|
+
if (document.defaultView) {
|
|
51
|
+
cleanup = addEventListener(document.defaultView, "dx-ref-tag-activate", handleDxRefTagActivate, customEventOptions);
|
|
52
|
+
} else {
|
|
53
|
+
log.warn("No default view found", void 0, {
|
|
54
|
+
F: __dxlog_file,
|
|
55
|
+
L: 61,
|
|
56
|
+
S: void 0,
|
|
57
|
+
C: (f, a) => f(...a)
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return contributes(Capabilities.Null, null, () => cleanup());
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
preview_popover_default as default
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=preview-popover-S3OY3CFZ.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 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};\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,QAAMC,MAAMX,IAAIY,MAAMH,GAAAA;AACtB,MAAI,CAACE,KAAK;AACR,WAAO;EACT;AAEA,QAAME,SAAS,MAAMf,WAAWS,QAAQI,KAAKH,YAAAA;AAC7C,SAAO;IAAEE;IAAOG;EAAO;AACzB;AAEA,IAAA,0BAAe,CAACC,YAAAA;AAEd,QAAMC,yBAAyB,OAAO,EAAEC,OAAON,OAAOO,QAAO,MAAoB;AAC/E,UAAM,EAAEC,iBAAiBC,SAAQ,IAAKL,QAAQM,cAAc3B,aAAa4B,gBAAgB;AACzF,UAAMd,SAASO,QAAQM,cAAclB,mBAAmBoB,MAAM;AAC9D,UAAM,CAACC,MAAAA,IAAUT,QAAQU,gBAAgB/B,aAAagC,MAAM;AAC5D,UAAM,EAAEC,QAAO,IAAK3B,QAAQwB,OAAOI,SAAS;AAC5C,UAAMC,SAASF,WAAWnB,OAAOsB,OAAOC,IAAIJ,OAAAA,MAAanB,OAAOsB,OAAOE;AACvE,UAAMC,SAAS,MAAM1B,oBAAoBC,QAAQqB,OAAO;MAAEnB,KAAKO;MAAON;IAAM,CAAA;AAC5E,QAAI,CAACsB,QAAQ;AACX;IACF;AAEA,UAAMb,SACJvB,aAAaF,aAAauC,eAAe;MACvCC,MAAM;MACNC,SAASH,OAAOnB;MAChBuB,SAAS;QACPC,OAAO;QACPC,SAAS;QACTC,QAAQtB;MACV;IACF,CAAA,CAAA;EAEJ;AAEA,MAAIuB;AACJ,MAAIC,SAASC,aAAa;AACxBF,cAAU3C,iBAAiB4C,SAASC,aAAa,uBAAuB3B,wBAAwBZ,kBAAAA;EAClG,OAAO;AACLF,QAAI0C,KAAK,yBAAA,QAAA;;;;;;EACX;AAEA,SAAOhD,YAAYF,aAAamD,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", "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
|
+
}
|