@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
package/dist/lib/node/index.cjs
CHANGED
|
@@ -28,191 +28,41 @@ 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: () => PREVIEW_PLUGIN,
|
|
31
|
+
PREVIEW_PLUGIN: () => import_chunk_VFSOM2B4.PREVIEW_PLUGIN,
|
|
32
32
|
PreviewPlugin: () => PreviewPlugin,
|
|
33
|
-
defaultCard: () => defaultCard,
|
|
34
|
-
kanbanCardWithoutPoster: () => kanbanCardWithoutPoster,
|
|
35
|
-
meta: () => meta,
|
|
36
|
-
popoverCard: () => popoverCard,
|
|
37
|
-
previewChrome: () => previewChrome,
|
|
38
|
-
previewProse: () => previewProse,
|
|
39
|
-
previewTitle: () => previewTitle
|
|
33
|
+
defaultCard: () => import_chunk_VFSOM2B4.defaultCard,
|
|
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
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(node_exports);
|
|
42
|
-
var
|
|
42
|
+
var import_chunk_VFSOM2B4 = require("./chunk-VFSOM2B4.cjs");
|
|
43
43
|
var import_app_framework = require("@dxos/app-framework");
|
|
44
|
-
var import_async = require("@dxos/async");
|
|
45
|
-
var import_client = require("@dxos/client");
|
|
46
|
-
var import_echo = require("@dxos/client/echo");
|
|
47
|
-
var import_echo_schema = require("@dxos/echo-schema");
|
|
48
|
-
var import_keys = require("@dxos/keys");
|
|
49
|
-
var import_log = require("@dxos/log");
|
|
50
44
|
var import_plugin_client = require("@dxos/plugin-client");
|
|
51
|
-
var import_react_ui = require("@dxos/react-ui");
|
|
52
|
-
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
53
|
-
var import_react_ui_table = require("@dxos/react-ui-table");
|
|
54
|
-
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
55
45
|
var import_schema = require("@dxos/schema");
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var import_react3 = __toESM(require("react"));
|
|
60
|
-
var import_react_ui3 = require("@dxos/react-ui");
|
|
61
|
-
var import_react_ui_theme3 = require("@dxos/react-ui-theme");
|
|
62
|
-
var import_react4 = __toESM(require("react"));
|
|
63
|
-
var import_react_ui_theme4 = require("@dxos/react-ui-theme");
|
|
64
|
-
var PREVIEW_PLUGIN = "dxos.org/plugin/preview";
|
|
65
|
-
var meta = {
|
|
66
|
-
id: PREVIEW_PLUGIN,
|
|
67
|
-
name: "Preview",
|
|
68
|
-
icon: "ph--eye--regular",
|
|
69
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview"
|
|
70
|
-
};
|
|
71
|
-
var popoverCard = "popover-consistent-width rounded-lg overflow-hidden";
|
|
72
|
-
var defaultCard = "";
|
|
73
|
-
var kanbanCardWithoutPoster = "pbs-[--rail-action]";
|
|
74
|
-
var previewTitle = "text-lg font-medium line-clamp-2";
|
|
75
|
-
var previewProse = "pli-3 mlb-3";
|
|
76
|
-
var previewChrome = "pli-1.5 mlb-1.5 [&_.dx-button]:pli-1.5 [&_.dx-button]:text-start [&_.dx-button]:is-full";
|
|
77
|
-
var ContactCard = ({ children, classNames, role, subject: { fullName, image, organization, emails }, onOrgClick }) => {
|
|
78
|
-
const organizationName = organization && typeof organization === "object" ? organization.target?.name : organization;
|
|
79
|
-
return /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
80
|
-
role: "none",
|
|
81
|
-
className: (0, import_react_ui_theme2.mx)(role === "popover" ? popoverCard : defaultCard, classNames)
|
|
82
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Avatar.Root, null, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
83
|
-
role: "group",
|
|
84
|
-
className: (0, import_react_ui_theme2.mx)(previewProse, "grid gap-3 grid-cols-[min-content_1fr]")
|
|
85
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Avatar.Content, {
|
|
86
|
-
imgSrc: image,
|
|
87
|
-
icon: "ph--user--regular",
|
|
88
|
-
size: 16,
|
|
89
|
-
hue: "neutral"
|
|
90
|
-
}), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
91
|
-
role: "none",
|
|
92
|
-
className: "bs-min self-center"
|
|
93
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Avatar.Label, {
|
|
94
|
-
asChild: true
|
|
95
|
-
}, /* @__PURE__ */ import_react2.default.createElement("h2", {
|
|
96
|
-
className: previewTitle
|
|
97
|
-
}, fullName))))), organizationName && /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
98
|
-
role: "none",
|
|
99
|
-
className: previewChrome
|
|
100
|
-
}, typeof organization === "object" && onOrgClick ? /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Button, {
|
|
101
|
-
variant: "ghost",
|
|
102
|
-
classNames: "gap-2 text-start",
|
|
103
|
-
onClick: () => onOrgClick(organization.target)
|
|
104
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Icon, {
|
|
105
|
-
icon: "ph--buildings--regular",
|
|
106
|
-
size: 5,
|
|
107
|
-
classNames: "text-subdued"
|
|
108
|
-
}), /* @__PURE__ */ import_react2.default.createElement("span", {
|
|
109
|
-
className: "min-is-0 flex-1 truncate"
|
|
110
|
-
}, organizationName), /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Icon, {
|
|
111
|
-
icon: "ph--arrow-right--regular"
|
|
112
|
-
})) : /* @__PURE__ */ import_react2.default.createElement("p", {
|
|
113
|
-
className: "dx-button gap-2",
|
|
114
|
-
"data-variant": "ghost"
|
|
115
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Icon, {
|
|
116
|
-
icon: "ph--buildings--regular",
|
|
117
|
-
size: 5,
|
|
118
|
-
classNames: "text-subdued"
|
|
119
|
-
}), /* @__PURE__ */ import_react2.default.createElement("span", {
|
|
120
|
-
className: "min-is-0 flex-1 truncate"
|
|
121
|
-
}, organizationName))), /* @__PURE__ */ import_react2.default.createElement("dl", {
|
|
122
|
-
className: (0, import_react_ui_theme2.mx)(previewProse, "grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0")
|
|
123
|
-
}, emails?.length && emails.map(({ label, value }) => /* @__PURE__ */ import_react2.default.createElement(import_react2.Fragment, {
|
|
124
|
-
key: value
|
|
125
|
-
}, /* @__PURE__ */ import_react2.default.createElement("dt", null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Icon, {
|
|
126
|
-
icon: "ph--at--regular",
|
|
127
|
-
size: 5
|
|
128
|
-
})), /* @__PURE__ */ import_react2.default.createElement("dd", {
|
|
129
|
-
key: value,
|
|
130
|
-
className: "break-words"
|
|
131
|
-
}, value)))), children);
|
|
132
|
-
};
|
|
133
|
-
var OrganizationCard = ({ children, classNames, subject: { name, image, description, website }, role }) => {
|
|
134
|
-
return /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
135
|
-
role: "none",
|
|
136
|
-
className: (0, import_react_ui_theme3.mx)(role === "popover" ? popoverCard : defaultCard, classNames)
|
|
137
|
-
}, image ? /* @__PURE__ */ import_react3.default.createElement("img", {
|
|
138
|
-
className: "aspect-video object-cover is-full bs-auto",
|
|
139
|
-
src: image,
|
|
140
|
-
alt: name
|
|
141
|
-
}) : /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
142
|
-
role: "image",
|
|
143
|
-
className: "grid aspect-video place-items-center bg-input text-subdued"
|
|
144
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui3.Icon, {
|
|
145
|
-
icon: "ph--building-office--regular",
|
|
146
|
-
size: 10
|
|
147
|
-
})), /* @__PURE__ */ import_react3.default.createElement("h2", {
|
|
148
|
-
className: (0, import_react_ui_theme3.mx)(previewTitle, previewProse)
|
|
149
|
-
}, name), description && /* @__PURE__ */ import_react3.default.createElement("p", {
|
|
150
|
-
className: (0, import_react_ui_theme3.mx)(previewProse, "line-clamp-2")
|
|
151
|
-
}, description), website && /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
152
|
-
role: "none",
|
|
153
|
-
className: previewChrome
|
|
154
|
-
}, /* @__PURE__ */ import_react3.default.createElement("a", {
|
|
155
|
-
className: "dx-button dx-focus-ring gap-2",
|
|
156
|
-
href: website,
|
|
157
|
-
target: "_blank",
|
|
158
|
-
rel: "noreferrer"
|
|
159
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui3.Icon, {
|
|
160
|
-
icon: "ph--link--regular",
|
|
161
|
-
size: 5,
|
|
162
|
-
classNames: "text-subdued"
|
|
163
|
-
}), /* @__PURE__ */ import_react3.default.createElement("span", {
|
|
164
|
-
className: "grow"
|
|
165
|
-
}, website), /* @__PURE__ */ import_react3.default.createElement(import_react_ui3.Icon, {
|
|
166
|
-
icon: "ph--arrow-square-out--regular"
|
|
167
|
-
}))), children);
|
|
168
|
-
};
|
|
169
|
-
var ProjectCard = ({ classNames, role, subject: { name, image, description } }) => {
|
|
170
|
-
return /* @__PURE__ */ import_react4.default.createElement("div", {
|
|
171
|
-
role: "none",
|
|
172
|
-
className: (0, import_react_ui_theme4.mx)(role === "popover" ? popoverCard : defaultCard, classNames)
|
|
173
|
-
}, image && /* @__PURE__ */ import_react4.default.createElement("img", {
|
|
174
|
-
className: "is-full bs-auto",
|
|
175
|
-
src: image,
|
|
176
|
-
alt: name
|
|
177
|
-
}), /* @__PURE__ */ import_react4.default.createElement("h2", {
|
|
178
|
-
className: (0, import_react_ui_theme4.mx)(previewTitle, "pli-3 mlb-3")
|
|
179
|
-
}, name), description && /* @__PURE__ */ import_react4.default.createElement("p", {
|
|
180
|
-
className: "pli-3 line-clamp-2 mlb-3"
|
|
181
|
-
}, description));
|
|
182
|
-
};
|
|
46
|
+
var import_app_framework2 = require("@dxos/app-framework");
|
|
47
|
+
var PreviewPopover = (0, import_app_framework2.lazy)(() => import("./preview-popover-GPBOHU5E.cjs"));
|
|
48
|
+
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-CPAQ7ZYR.cjs"));
|
|
183
49
|
var translations_default = [
|
|
184
50
|
{
|
|
185
51
|
"en-US": {
|
|
186
|
-
[PREVIEW_PLUGIN]: {
|
|
52
|
+
[import_chunk_VFSOM2B4.PREVIEW_PLUGIN]: {
|
|
187
53
|
"unable to create preview message": "No preview"
|
|
188
54
|
}
|
|
189
55
|
}
|
|
190
56
|
}
|
|
191
57
|
];
|
|
192
|
-
var
|
|
193
|
-
var customEventOptions = {
|
|
194
|
-
capture: true,
|
|
195
|
-
passive: false
|
|
196
|
-
};
|
|
197
|
-
var handlePreviewLookup = async (client, defaultSpace, { ref, label }) => {
|
|
198
|
-
const dxn = import_keys.DXN.parse(ref);
|
|
199
|
-
if (!dxn) {
|
|
200
|
-
return null;
|
|
201
|
-
}
|
|
202
|
-
const object = await (0, import_client.resolveRef)(client, dxn, defaultSpace);
|
|
203
|
-
return {
|
|
204
|
-
label,
|
|
205
|
-
object
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
var PreviewPlugin = () => (0, import_app_framework.definePlugin)(meta, [
|
|
58
|
+
var PreviewPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_VFSOM2B4.meta, [
|
|
209
59
|
(0, import_app_framework.defineModule)({
|
|
210
|
-
id: `${meta.id}/module/translations`,
|
|
60
|
+
id: `${import_chunk_VFSOM2B4.meta.id}/module/translations`,
|
|
211
61
|
activatesOn: import_app_framework.Events.SetupTranslations,
|
|
212
62
|
activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Translations, translations_default)
|
|
213
63
|
}),
|
|
214
64
|
(0, import_app_framework.defineModule)({
|
|
215
|
-
id: `${meta.id}/module/schema`,
|
|
65
|
+
id: `${import_chunk_VFSOM2B4.meta.id}/module/schema`,
|
|
216
66
|
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
217
67
|
activate: () => [
|
|
218
68
|
(0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.Schema, [
|
|
@@ -222,158 +72,14 @@ var PreviewPlugin = () => (0, import_app_framework.definePlugin)(meta, [
|
|
|
222
72
|
]
|
|
223
73
|
}),
|
|
224
74
|
(0, import_app_framework.defineModule)({
|
|
225
|
-
id: `${meta.id}/module/preview-popover`,
|
|
75
|
+
id: `${import_chunk_VFSOM2B4.meta.id}/module/preview-popover`,
|
|
226
76
|
activatesOn: import_app_framework.Events.Startup,
|
|
227
|
-
activate:
|
|
228
|
-
const handleDxRefTagActivate = async ({ ref, label, trigger }) => {
|
|
229
|
-
const { dispatchPromise: dispatch } = context.getCapability(import_app_framework.Capabilities.IntentDispatcher);
|
|
230
|
-
const client = context.getCapability(import_plugin_client.ClientCapabilities.Client);
|
|
231
|
-
const [layout] = context.getCapabilities(import_app_framework.Capabilities.Layout);
|
|
232
|
-
const { spaceId } = (0, import_echo.parseId)(layout.workspace);
|
|
233
|
-
const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;
|
|
234
|
-
const result = await handlePreviewLookup(client, space, {
|
|
235
|
-
ref,
|
|
236
|
-
label
|
|
237
|
-
});
|
|
238
|
-
if (!result) {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
await dispatch((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.UpdatePopover, {
|
|
242
|
-
part: "popover",
|
|
243
|
-
subject: result.object,
|
|
244
|
-
options: {
|
|
245
|
-
state: true,
|
|
246
|
-
variant: "virtual",
|
|
247
|
-
anchor: trigger
|
|
248
|
-
}
|
|
249
|
-
}));
|
|
250
|
-
};
|
|
251
|
-
if (!document.defaultView) {
|
|
252
|
-
import_log.log.warn("No default view found", void 0, {
|
|
253
|
-
F: __dxlog_file,
|
|
254
|
-
L: 106,
|
|
255
|
-
S: void 0,
|
|
256
|
-
C: (f, a) => f(...a)
|
|
257
|
-
});
|
|
258
|
-
return [];
|
|
259
|
-
}
|
|
260
|
-
const cleanup = (0, import_async.addEventListener)(document.defaultView, "dx-ref-tag-activate", handleDxRefTagActivate, customEventOptions);
|
|
261
|
-
return (0, import_app_framework.contributes)(import_app_framework.Capabilities.Null, null, () => cleanup());
|
|
262
|
-
}
|
|
77
|
+
activate: PreviewPopover
|
|
263
78
|
}),
|
|
264
79
|
(0, import_app_framework.defineModule)({
|
|
265
|
-
id: `${meta.id}/module/react-surface`,
|
|
80
|
+
id: `${import_chunk_VFSOM2B4.meta.id}/module/react-surface`,
|
|
266
81
|
activatesOn: import_app_framework.Events.SetupReactSurface,
|
|
267
|
-
activate:
|
|
268
|
-
// TODO(wittjosiah): Factor out to lazy capabilities like other plugins.
|
|
269
|
-
(0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, [
|
|
270
|
-
//
|
|
271
|
-
// Specific schema types.
|
|
272
|
-
//
|
|
273
|
-
(0, import_app_framework.createSurface)({
|
|
274
|
-
id: `${PREVIEW_PLUGIN}/schema-popover`,
|
|
275
|
-
role: [
|
|
276
|
-
"popover",
|
|
277
|
-
"card--kanban"
|
|
278
|
-
],
|
|
279
|
-
filter: (data) => (0, import_echo_schema.isInstanceOf)(import_schema.DataType.Person, data.subject),
|
|
280
|
-
component: ({ data, role }) => {
|
|
281
|
-
const { dispatchPromise: dispatch } = (0, import_app_framework.useIntentDispatcher)();
|
|
282
|
-
const handleOrgClick = (0, import_react.useCallback)(async (org) => {
|
|
283
|
-
const space = (0, import_echo.getSpace)(org);
|
|
284
|
-
const tablesQuery = await space?.db.query(import_echo.Filter.type(import_react_ui_table.TableType)).run();
|
|
285
|
-
const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {
|
|
286
|
-
return table.view?.target?.query?.typename === import_schema.DataType.Organization.typename;
|
|
287
|
-
});
|
|
288
|
-
await dispatch((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.UpdatePopover, {
|
|
289
|
-
part: "popover",
|
|
290
|
-
options: {
|
|
291
|
-
state: false,
|
|
292
|
-
anchorId: ""
|
|
293
|
-
}
|
|
294
|
-
}));
|
|
295
|
-
if (currentSpaceOrgTable) {
|
|
296
|
-
return dispatch((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.Open, {
|
|
297
|
-
part: "main",
|
|
298
|
-
subject: [
|
|
299
|
-
(0, import_echo.fullyQualifiedId)(currentSpaceOrgTable)
|
|
300
|
-
],
|
|
301
|
-
options: {
|
|
302
|
-
workspace: space?.id
|
|
303
|
-
}
|
|
304
|
-
}));
|
|
305
|
-
}
|
|
306
|
-
}, [
|
|
307
|
-
dispatch
|
|
308
|
-
]);
|
|
309
|
-
return /* @__PURE__ */ import_react.default.createElement(ContactCard, {
|
|
310
|
-
subject: data.subject,
|
|
311
|
-
onOrgClick: handleOrgClick,
|
|
312
|
-
role
|
|
313
|
-
}, role === "popover" && /* @__PURE__ */ import_react.default.createElement(import_app_framework.Surface, {
|
|
314
|
-
role: "related",
|
|
315
|
-
data
|
|
316
|
-
}));
|
|
317
|
-
}
|
|
318
|
-
}),
|
|
319
|
-
(0, import_app_framework.createSurface)({
|
|
320
|
-
id: `${PREVIEW_PLUGIN}/schema-popover`,
|
|
321
|
-
role: [
|
|
322
|
-
"popover",
|
|
323
|
-
"card--kanban"
|
|
324
|
-
],
|
|
325
|
-
filter: (data) => (0, import_echo_schema.isInstanceOf)(import_schema.DataType.Organization, data.subject),
|
|
326
|
-
component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(OrganizationCard, {
|
|
327
|
-
subject: data.subject,
|
|
328
|
-
role
|
|
329
|
-
}, role === "popover" && /* @__PURE__ */ import_react.default.createElement(import_app_framework.Surface, {
|
|
330
|
-
role: "related",
|
|
331
|
-
data
|
|
332
|
-
}))
|
|
333
|
-
}),
|
|
334
|
-
(0, import_app_framework.createSurface)({
|
|
335
|
-
id: `${PREVIEW_PLUGIN}/schema-popover`,
|
|
336
|
-
role: [
|
|
337
|
-
"popover",
|
|
338
|
-
"card--kanban"
|
|
339
|
-
],
|
|
340
|
-
filter: (data) => (0, import_echo_schema.isInstanceOf)(import_schema.DataType.Project, data.subject),
|
|
341
|
-
component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(ProjectCard, {
|
|
342
|
-
subject: data.subject,
|
|
343
|
-
role
|
|
344
|
-
})
|
|
345
|
-
}),
|
|
346
|
-
//
|
|
347
|
-
// Fallback for any object.
|
|
348
|
-
//
|
|
349
|
-
(0, import_app_framework.createSurface)({
|
|
350
|
-
id: `${PREVIEW_PLUGIN}/fallback-popover`,
|
|
351
|
-
role: [
|
|
352
|
-
"popover",
|
|
353
|
-
"card--kanban"
|
|
354
|
-
],
|
|
355
|
-
position: "fallback",
|
|
356
|
-
filter: (data) => (0, import_echo.isEchoObject)(data.subject),
|
|
357
|
-
component: ({ data, role }) => {
|
|
358
|
-
const schema = (0, import_echo.getSchema)(data.subject);
|
|
359
|
-
const { t } = (0, import_react_ui.useTranslation)(PREVIEW_PLUGIN);
|
|
360
|
-
if (!schema) {
|
|
361
|
-
return /* @__PURE__ */ import_react.default.createElement("p", {
|
|
362
|
-
className: import_react_ui_theme.descriptionMessage
|
|
363
|
-
}, t("unable to create preview message"));
|
|
364
|
-
}
|
|
365
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.Form, {
|
|
366
|
-
schema,
|
|
367
|
-
values: data.subject,
|
|
368
|
-
readonly: role === "popover",
|
|
369
|
-
...role === "card--kanban" && {
|
|
370
|
-
classNames: kanbanCardWithoutPoster
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
})
|
|
375
|
-
])
|
|
376
|
-
)
|
|
82
|
+
activate: ReactSurface
|
|
377
83
|
})
|
|
378
84
|
]);
|
|
379
85
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -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,2BAA8E;AAC9E,2BAAiD;AACjD,oBAAyB;ACFzB,IAAAA,wBAAqB;AAEd,IAAMC,qBAAiBC,4BAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,mBAAeD,4BAAK,MAAM,OAAO,8BAAA,CAAA;ACD9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,oCAAAA,GAAiB;QAChB,oCAAoC;MACtC;IACF;EACF;;AFDK,IAAMC,gBAAgB,UAC3BC,mCAAaC,4BAAM;MACjBC,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOC;IACpBC,UAAU,UAAMC,kCAAYC,kCAAaC,cAAcC,oBAAAA;EACzD,CAAA;MACAT,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaQ,kCAAaC;IAC1BN,UAAU,MAAM;UAACC,kCAAYM,wCAAmBC,QAAQ;QAACC,uBAASC;QAAQD,uBAASE;OAAa;;EAClG,CAAA;MACAhB,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOc;IACpBZ,UAAUZ;EACZ,CAAA;MACAO,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOe;IACpBb,UAAUV;EACZ,CAAA;CACD;",
|
|
6
|
+
"names": ["import_app_framework", "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", "SetupReactSurface"]
|
|
7
7
|
}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -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/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":25366},"packages/plugins/plugin-preview/dist/lib/node/index.cjs":{"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/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3140},"packages/plugins/plugin-preview/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node/chunk-VFSOM2B4.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/dist/lib/node/preview-popover-GPBOHU5E.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/node/react-surface-CPAQ7ZYR.cjs","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/node/preview-popover-GPBOHU5E.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4302},"packages/plugins/plugin-preview/dist/lib/node/preview-popover-GPBOHU5E.cjs":{"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/node/react-surface-CPAQ7ZYR.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17740},"packages/plugins/plugin-preview/dist/lib/node/react-surface-CPAQ7ZYR.cjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node/chunk-VFSOM2B4.cjs","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/node/chunk-VFSOM2B4.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2193},"packages/plugins/plugin-preview/dist/lib/node/chunk-VFSOM2B4.cjs":{"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,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var preview_popover_GPBOHU5E_exports = {};
|
|
20
|
+
__export(preview_popover_GPBOHU5E_exports, {
|
|
21
|
+
default: () => preview_popover_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(preview_popover_GPBOHU5E_exports);
|
|
24
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
25
|
+
var import_async = require("@dxos/async");
|
|
26
|
+
var import_client = require("@dxos/client");
|
|
27
|
+
var import_echo = require("@dxos/client/echo");
|
|
28
|
+
var import_keys = require("@dxos/keys");
|
|
29
|
+
var import_log = require("@dxos/log");
|
|
30
|
+
var import_plugin_client = require("@dxos/plugin-client");
|
|
31
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-preview/src/capabilities/preview-popover.ts";
|
|
32
|
+
var customEventOptions = {
|
|
33
|
+
capture: true,
|
|
34
|
+
passive: false
|
|
35
|
+
};
|
|
36
|
+
var handlePreviewLookup = async (client, defaultSpace, { ref, label }) => {
|
|
37
|
+
const dxn = import_keys.DXN.parse(ref);
|
|
38
|
+
if (!dxn) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const object = await (0, import_client.resolveRef)(client, dxn, defaultSpace);
|
|
42
|
+
return {
|
|
43
|
+
label,
|
|
44
|
+
object
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
var preview_popover_default = (context) => {
|
|
48
|
+
const handleDxRefTagActivate = async ({ refId, label, trigger }) => {
|
|
49
|
+
const { dispatchPromise: dispatch } = context.getCapability(import_app_framework.Capabilities.IntentDispatcher);
|
|
50
|
+
const client = context.getCapability(import_plugin_client.ClientCapabilities.Client);
|
|
51
|
+
const [layout] = context.getCapabilities(import_app_framework.Capabilities.Layout);
|
|
52
|
+
const { spaceId } = (0, import_echo.parseId)(layout.workspace);
|
|
53
|
+
const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;
|
|
54
|
+
const result = await handlePreviewLookup(client, space, {
|
|
55
|
+
ref: refId,
|
|
56
|
+
label
|
|
57
|
+
});
|
|
58
|
+
if (!result) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
await dispatch((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.UpdatePopover, {
|
|
62
|
+
part: "popover",
|
|
63
|
+
subject: result.object,
|
|
64
|
+
options: {
|
|
65
|
+
state: true,
|
|
66
|
+
variant: "virtual",
|
|
67
|
+
anchor: trigger
|
|
68
|
+
}
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
71
|
+
let cleanup;
|
|
72
|
+
if (document.defaultView) {
|
|
73
|
+
cleanup = (0, import_async.addEventListener)(document.defaultView, "dx-ref-tag-activate", handleDxRefTagActivate, customEventOptions);
|
|
74
|
+
} else {
|
|
75
|
+
import_log.log.warn("No default view found", void 0, {
|
|
76
|
+
F: __dxlog_file,
|
|
77
|
+
L: 61,
|
|
78
|
+
S: void 0,
|
|
79
|
+
C: (f, a) => f(...a)
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return (0, import_app_framework.contributes)(import_app_framework.Capabilities.Null, null, () => cleanup());
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=preview-popover-GPBOHU5E.cjs.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,2BAA0F;AAC1F,mBAAiC;AACjC,oBAAwC;AACxC,kBAAoC;AACpC,kBAAoB;AAEpB,iBAAoB;AACpB,2BAAmC;;AAGnC,IAAMA,qBAAqB;EAAEC,SAAS;EAAMC,SAAS;AAAM;AAE3D,IAAMC,sBAAsB,OAC1BC,QACAC,cACA,EAAEC,KAAKC,MAAK,MAAkB;AAE9B,QAAMC,MAAMC,gBAAIC,MAAMJ,GAAAA;AACtB,MAAI,CAACE,KAAK;AACR,WAAO;EACT;AAEA,QAAMG,SAAS,UAAMC,0BAAWR,QAAQI,KAAKH,YAAAA;AAC7C,SAAO;IAAEE;IAAOI;EAAO;AACzB;AAEA,IAAA,0BAAe,CAACE,YAAAA;AAEd,QAAMC,yBAAyB,OAAO,EAAEC,OAAOR,OAAOS,QAAO,MAAoB;AAC/E,UAAM,EAAEC,iBAAiBC,SAAQ,IAAKL,QAAQM,cAAcC,kCAAaC,gBAAgB;AACzF,UAAMjB,SAASS,QAAQM,cAAcG,wCAAmBC,MAAM;AAC9D,UAAM,CAACC,MAAAA,IAAUX,QAAQY,gBAAgBL,kCAAaM,MAAM;AAC5D,UAAM,EAAEC,QAAO,QAAKC,qBAAQJ,OAAOK,SAAS;AAC5C,UAAMC,SAASH,WAAWvB,OAAO2B,OAAOC,IAAIL,OAAAA,MAAavB,OAAO2B,OAAOE;AACvE,UAAMC,SAAS,MAAM/B,oBAAoBC,QAAQ0B,OAAO;MAAExB,KAAKS;MAAOR;IAAM,CAAA;AAC5E,QAAI,CAAC2B,QAAQ;AACX;IACF;AAEA,UAAMhB,aACJiB,mCAAaC,kCAAaC,eAAe;MACvCC,MAAM;MACNC,SAASL,OAAOvB;MAChB6B,SAAS;QACPC,OAAO;QACPC,SAAS;QACTC,QAAQ3B;MACV;IACF,CAAA,CAAA;EAEJ;AAEA,MAAI4B;AACJ,MAAIC,SAASC,aAAa;AACxBF,kBAAUG,+BAAiBF,SAASC,aAAa,uBAAuBhC,wBAAwBd,kBAAAA;EAClG,OAAO;AACLgD,mBAAIC,KAAK,yBAAA,QAAA;;;;;;EACX;AAEA,aAAOC,kCAAY9B,kCAAa+B,MAAM,MAAM,MAAMP,QAAAA,CAAAA;AACpD;",
|
|
6
|
+
"names": ["customEventOptions", "capture", "passive", "handlePreviewLookup", "client", "defaultSpace", "ref", "label", "dxn", "DXN", "parse", "object", "resolveRef", "context", "handleDxRefTagActivate", "refId", "trigger", "dispatchPromise", "dispatch", "getCapability", "Capabilities", "IntentDispatcher", "ClientCapabilities", "Client", "layout", "getCapabilities", "Layout", "spaceId", "parseId", "workspace", "space", "spaces", "get", "default", "result", "createIntent", "LayoutAction", "UpdatePopover", "part", "subject", "options", "state", "variant", "anchor", "cleanup", "document", "defaultView", "addEventListener", "log", "warn", "contributes", "Null"]
|
|
7
|
+
}
|