@dxos/plugin-preview 0.8.4-main.5ea62a8 → 0.8.4-main.ae835ea
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-CEWM5LJG.mjs +17 -0
- package/dist/lib/browser/chunk-CEWM5LJG.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +11 -7
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{preview-popover-MAIBTJKJ.mjs → preview-popover-RKHENTFP.mjs} +9 -13
- package/dist/lib/browser/preview-popover-RKHENTFP.mjs.map +7 -0
- package/dist/lib/browser/react-surface-3AR3BFLF.mjs +515 -0
- package/dist/lib/browser/react-surface-3AR3BFLF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Q5MUNELK.mjs +19 -0
- package/dist/lib/node-esm/chunk-Q5MUNELK.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +11 -7
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{preview-popover-LZGHYW23.mjs → preview-popover-TZKX67EY.mjs} +9 -13
- package/dist/lib/node-esm/preview-popover-TZKX67EY.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-L37JR7U2.mjs +516 -0
- package/dist/lib/node-esm/react-surface-L37JR7U2.mjs.map +7 -0
- package/dist/types/src/PreviewPlugin.d.ts +1 -1
- package/dist/types/src/PreviewPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/preview-popover.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/cards/ContactCard.d.ts +5 -0
- package/dist/types/src/cards/ContactCard.d.ts.map +1 -0
- package/dist/types/src/{components → cards}/OrganizationCard.d.ts +1 -1
- package/dist/types/src/cards/OrganizationCard.d.ts.map +1 -0
- package/dist/types/src/cards/ProjectCard.d.ts +5 -0
- package/dist/types/src/cards/ProjectCard.d.ts.map +1 -0
- package/dist/types/src/cards/TaskCard.d.ts +5 -0
- package/dist/types/src/cards/TaskCard.d.ts.map +1 -0
- package/dist/types/src/cards/index.d.ts +5 -0
- package/dist/types/src/cards/index.d.ts.map +1 -0
- package/dist/types/src/components/CardComponents.d.ts +16 -0
- package/dist/types/src/components/CardComponents.d.ts.map +1 -0
- package/dist/types/src/components/CardSubjectMenu.d.ts +3 -5
- package/dist/types/src/components/CardSubjectMenu.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/stories/Card.stories.d.ts +7 -1
- package/dist/types/src/stories/Card.stories.d.ts.map +1 -1
- package/dist/types/src/stories/testing.d.ts +2 -1
- package/dist/types/src/stories/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +6 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +5 -2
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -32
- package/src/PreviewPlugin.tsx +22 -23
- package/src/capabilities/preview-popover.ts +7 -12
- package/src/capabilities/react-surface.tsx +61 -76
- package/src/cards/ContactCard.tsx +65 -0
- package/src/cards/OrganizationCard.tsx +25 -0
- package/src/cards/ProjectCard.tsx +24 -0
- package/src/cards/TaskCard.tsx +46 -0
- package/src/cards/index.ts +8 -0
- package/src/components/CardComponents.tsx +67 -0
- package/src/components/CardSubjectMenu.tsx +60 -25
- package/src/components/index.ts +2 -3
- package/src/meta.ts +6 -3
- package/src/stories/Card.stories.tsx +12 -9
- package/src/stories/testing.tsx +24 -13
- package/src/translations.ts +6 -0
- package/src/types.ts +6 -2
- package/dist/lib/browser/chunk-Z73ENKLE.mjs +0 -14
- package/dist/lib/browser/chunk-Z73ENKLE.mjs.map +0 -7
- package/dist/lib/browser/preview-popover-MAIBTJKJ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-F5B3N276.mjs +0 -380
- package/dist/lib/browser/react-surface-F5B3N276.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2ORSL4GJ.mjs +0 -16
- package/dist/lib/node-esm/chunk-2ORSL4GJ.mjs.map +0 -7
- package/dist/lib/node-esm/preview-popover-LZGHYW23.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-4TLL7CWP.mjs +0 -381
- package/dist/lib/node-esm/react-surface-4TLL7CWP.mjs.map +0 -7
- package/dist/types/src/components/ContactCard.d.ts +0 -7
- package/dist/types/src/components/ContactCard.d.ts.map +0 -1
- package/dist/types/src/components/OrganizationCard.d.ts.map +0 -1
- package/dist/types/src/components/ProjectCard.d.ts +0 -5
- package/dist/types/src/components/ProjectCard.d.ts.map +0 -1
- package/src/components/ContactCard.tsx +0 -76
- package/src/components/OrganizationCard.tsx +0 -44
- package/src/components/ProjectCard.tsx +0 -27
|
@@ -5,48 +5,49 @@
|
|
|
5
5
|
import { Rx } from '@effect-rx/rx-react';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
9
|
import { ACTION_TYPE } from '@dxos/app-graph';
|
|
10
|
-
import {
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
|
+
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
12
|
+
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
11
13
|
import { IconButton, type IconButtonProps, useTranslation } from '@dxos/react-ui';
|
|
12
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
type ActionGraphProps,
|
|
16
|
+
DropdownMenu,
|
|
17
|
+
type MenuActions,
|
|
18
|
+
MenuProvider,
|
|
19
|
+
useMenuActions,
|
|
20
|
+
} from '@dxos/react-ui-menu';
|
|
13
21
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const result: ActionGraphProps = { edges: [], nodes: [] };
|
|
17
|
-
result.nodes.push({
|
|
18
|
-
type: ACTION_TYPE,
|
|
19
|
-
id: `${subject.id}/add-to-space`,
|
|
20
|
-
data: () => console.log('[TO DO]', 'add object to space', subject),
|
|
21
|
-
properties: {
|
|
22
|
-
label: ['add object to space label', { ns: 'os' }],
|
|
23
|
-
icon: 'ph--file-plus--regular',
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
result.nodes.forEach(({ id: target }) => {
|
|
27
|
-
result.edges.push({ source: 'root', target });
|
|
28
|
-
});
|
|
29
|
-
return useMenuActions(Rx.make(result));
|
|
30
|
-
};
|
|
22
|
+
import { meta } from '../meta';
|
|
23
|
+
import { type PreviewProps } from '../types';
|
|
31
24
|
|
|
32
25
|
/**
|
|
33
|
-
*
|
|
26
|
+
* Generic menu for objects; builds menu with common actions.
|
|
34
27
|
*/
|
|
28
|
+
// TODO(burdon): Reconcile title and menu with main Card header.
|
|
35
29
|
export const CardSubjectMenu = ({
|
|
36
30
|
subject,
|
|
31
|
+
activeSpace,
|
|
37
32
|
...props
|
|
38
|
-
}: Omit<IconButtonProps, 'icon' | 'label'>
|
|
39
|
-
const { t } = useTranslation(
|
|
40
|
-
const menuProps = useSubjectMenuGroupItems(subject);
|
|
33
|
+
}: PreviewProps & Omit<IconButtonProps, 'icon' | 'label'>) => {
|
|
34
|
+
const { t } = useTranslation(meta.id);
|
|
35
|
+
const menuProps = useSubjectMenuGroupItems({ subject, activeSpace });
|
|
36
|
+
|
|
37
|
+
if (!activeSpace) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
41
|
return (
|
|
42
42
|
<MenuProvider {...menuProps}>
|
|
43
43
|
<DropdownMenu.Root>
|
|
44
44
|
<DropdownMenu.Trigger asChild>
|
|
45
45
|
<IconButton
|
|
46
|
-
iconOnly
|
|
47
46
|
variant='ghost'
|
|
48
47
|
icon='ph--dots-three-vertical--bold'
|
|
48
|
+
iconOnly
|
|
49
49
|
label={t('more options label')}
|
|
50
|
+
size={5}
|
|
50
51
|
{...props}
|
|
51
52
|
/>
|
|
52
53
|
</DropdownMenu.Trigger>
|
|
@@ -54,3 +55,37 @@ export const CardSubjectMenu = ({
|
|
|
54
55
|
</MenuProvider>
|
|
55
56
|
);
|
|
56
57
|
};
|
|
58
|
+
|
|
59
|
+
const useSubjectMenuGroupItems = ({ subject, activeSpace }: PreviewProps): MenuActions => {
|
|
60
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
61
|
+
const result: ActionGraphProps = { edges: [], nodes: [] };
|
|
62
|
+
|
|
63
|
+
result.nodes.push({
|
|
64
|
+
type: ACTION_TYPE,
|
|
65
|
+
id: `${subject.id}/open`,
|
|
66
|
+
data: () => dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [fullyQualifiedId(subject)] })),
|
|
67
|
+
properties: {
|
|
68
|
+
label: ['open object label', { ns: meta.id }],
|
|
69
|
+
icon: 'ph--arrow-right--regular',
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
if (activeSpace && Obj.getDXN(subject).asQueueDXN()) {
|
|
74
|
+
result.nodes.push({
|
|
75
|
+
type: ACTION_TYPE,
|
|
76
|
+
id: `${subject.id}/add-to-space`,
|
|
77
|
+
// TODO(wittjosiah): Update reference to point to db object when adding?
|
|
78
|
+
data: () => dispatch(createIntent(SpaceAction.AddObject, { object: subject, target: activeSpace, hidden: true })),
|
|
79
|
+
properties: {
|
|
80
|
+
label: ['add object to space label', { ns: meta.id }],
|
|
81
|
+
icon: 'ph--file-plus--regular',
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
result.nodes.forEach(({ id: target }) => {
|
|
87
|
+
result.edges.push({ source: 'root', target });
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
return useMenuActions(Rx.make(result));
|
|
91
|
+
};
|
package/src/components/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type PluginMeta } from '@dxos/app-framework';
|
|
6
|
-
|
|
7
|
-
export const PREVIEW_PLUGIN = 'dxos.org/plugin/preview';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
8
7
|
|
|
9
8
|
export const meta: PluginMeta = {
|
|
10
|
-
id:
|
|
9
|
+
id: 'dxos.org/plugin/preview',
|
|
11
10
|
name: 'Preview',
|
|
11
|
+
description: trim`
|
|
12
|
+
Rich preview panel for viewing object content without opening full editors.
|
|
13
|
+
Quick peek at documents, images, and data with inline rendering.
|
|
14
|
+
`,
|
|
12
15
|
icon: 'ph--eye--regular',
|
|
13
16
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview',
|
|
14
17
|
};
|
|
@@ -2,27 +2,30 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
|
|
9
|
-
import {
|
|
7
|
+
import { IntentPlugin } from '@dxos/app-framework';
|
|
8
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
9
|
+
import { faker } from '@dxos/random';
|
|
10
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
10
11
|
|
|
11
12
|
import { translations } from '../translations';
|
|
12
13
|
|
|
13
14
|
import { Defaultstory, createCards } from './testing';
|
|
14
15
|
|
|
16
|
+
faker.seed(999);
|
|
17
|
+
|
|
15
18
|
const meta = {
|
|
16
19
|
title: 'plugins/plugin-preview/Card',
|
|
17
20
|
render: Defaultstory,
|
|
18
21
|
decorators: [
|
|
19
|
-
withTheme,
|
|
20
|
-
|
|
21
|
-
fullscreen: true,
|
|
22
|
-
classNames: 'flex flex-col justify-center',
|
|
23
|
-
}),
|
|
22
|
+
withTheme, // TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
23
|
+
withPluginManager({ plugins: [IntentPlugin()] }),
|
|
24
24
|
],
|
|
25
|
-
parameters: {
|
|
25
|
+
parameters: {
|
|
26
|
+
layout: 'fullscreen',
|
|
27
|
+
translations,
|
|
28
|
+
},
|
|
26
29
|
tags: ['cards'],
|
|
27
30
|
} satisfies Meta<typeof Defaultstory>;
|
|
28
31
|
|
package/src/stories/testing.tsx
CHANGED
|
@@ -9,12 +9,10 @@ import { faker } from '@dxos/random';
|
|
|
9
9
|
import { CardContainer } from '@dxos/react-ui-stack/testing';
|
|
10
10
|
import { DataType } from '@dxos/schema';
|
|
11
11
|
|
|
12
|
-
import { ContactCard, OrganizationCard, ProjectCard } from '../
|
|
12
|
+
import { ContactCard, OrganizationCard, ProjectCard, TaskCard } from '../cards';
|
|
13
13
|
import { type PreviewProps } from '../types';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
type CardProps<T extends object> = {
|
|
15
|
+
type CardProps<T extends Obj.Any> = {
|
|
18
16
|
Component: FC<PreviewProps<T>>;
|
|
19
17
|
subject: T;
|
|
20
18
|
icon?: string;
|
|
@@ -28,14 +26,16 @@ export type DefaultstoryProps = {
|
|
|
28
26
|
|
|
29
27
|
export const Defaultstory = ({ role, cards }: DefaultstoryProps) => {
|
|
30
28
|
return (
|
|
31
|
-
<div className='
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
<div className='flex bs-full'>
|
|
30
|
+
<div className='flex shrink-0 gap-8 overflow-x-auto pbe-4'>
|
|
31
|
+
{cards.map(({ Component, icon, image, subject }, i) => (
|
|
32
|
+
<div key={i} className='flex is-[24rem] justify-center'>
|
|
33
|
+
<CardContainer icon={icon} role={role}>
|
|
34
|
+
<Component role={role} subject={image ? subject : omitImage(subject)} />
|
|
35
|
+
</CardContainer>
|
|
36
|
+
</div>
|
|
37
|
+
))}
|
|
38
|
+
</div>
|
|
39
39
|
</div>
|
|
40
40
|
);
|
|
41
41
|
};
|
|
@@ -73,12 +73,17 @@ export const createCards = (image = true): CardProps<any>[] => {
|
|
|
73
73
|
],
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
const project =
|
|
76
|
+
const project = DataType.makeProject({
|
|
77
77
|
name: faker.person.fullName(),
|
|
78
78
|
image: 'https://dxos.network/dxos-logotype-blue.png',
|
|
79
79
|
description: faker.lorem.paragraph(),
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
+
const task = Obj.make(DataType.Task, {
|
|
83
|
+
title: faker.lorem.sentence(),
|
|
84
|
+
status: faker.helpers.arrayElement(['todo', 'in-progress', 'done']),
|
|
85
|
+
});
|
|
86
|
+
|
|
82
87
|
return [
|
|
83
88
|
{
|
|
84
89
|
Component: OrganizationCard,
|
|
@@ -98,5 +103,11 @@ export const createCards = (image = true): CardProps<any>[] => {
|
|
|
98
103
|
icon: 'ph--building--regular',
|
|
99
104
|
image,
|
|
100
105
|
},
|
|
106
|
+
{
|
|
107
|
+
Component: TaskCard,
|
|
108
|
+
subject: task,
|
|
109
|
+
icon: 'ph--list-checks--regular',
|
|
110
|
+
image,
|
|
111
|
+
},
|
|
101
112
|
];
|
|
102
113
|
};
|
package/src/translations.ts
CHANGED
|
@@ -11,6 +11,12 @@ export const translations = [
|
|
|
11
11
|
'en-US': {
|
|
12
12
|
[meta.id]: {
|
|
13
13
|
'unable to create preview message': 'No preview',
|
|
14
|
+
'todo label': 'To do',
|
|
15
|
+
'in-progress label': 'In progress',
|
|
16
|
+
'done label': 'Done',
|
|
17
|
+
'open object label': 'Open',
|
|
18
|
+
'add object to space label': 'Add to space',
|
|
19
|
+
'more options label': 'More options',
|
|
14
20
|
},
|
|
15
21
|
},
|
|
16
22
|
},
|
package/src/types.ts
CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type Schema } from 'effect';
|
|
6
5
|
import { type PropsWithChildren } from 'react';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
import { type Obj } from '@dxos/echo';
|
|
8
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
9
|
+
|
|
10
|
+
export type PreviewProps<T extends Obj.Any = Obj.Any> = PropsWithChildren<{
|
|
9
11
|
subject: T;
|
|
10
12
|
role?: string;
|
|
13
|
+
activeSpace?: Space;
|
|
14
|
+
onSelect?: (obj: Obj.Any) => void;
|
|
11
15
|
}>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
var PREVIEW_PLUGIN = "dxos.org/plugin/preview";
|
|
3
|
-
var meta = {
|
|
4
|
-
id: PREVIEW_PLUGIN,
|
|
5
|
-
name: "Preview",
|
|
6
|
-
icon: "ph--eye--regular",
|
|
7
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview"
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
PREVIEW_PLUGIN,
|
|
12
|
-
meta
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=chunk-Z73ENKLE.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const PREVIEW_PLUGIN = 'dxos.org/plugin/preview';\n\nexport const meta: PluginMeta = {\n id: PREVIEW_PLUGIN,\n name: 'Preview',\n icon: 'ph--eye--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview',\n};\n"],
|
|
5
|
-
"mappings": ";AAMO,IAAMA,iBAAiB;AAEvB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
-
"names": ["PREVIEW_PLUGIN", "meta", "id", "name", "icon", "source"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/preview-popover.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';\nimport { addEventListener } from '@dxos/async';\nimport { type Client, resolveRef } from '@dxos/client';\nimport { type Space, parseId } from '@dxos/client/echo';\nimport { DXN } from '@dxos/keys';\nimport { type DxRefTagActivate } from '@dxos/lit-ui';\nimport { log } from '@dxos/log';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { type PreviewLinkRef, type PreviewLinkTarget } from '@dxos/react-ui-editor';\n\nconst customEventOptions = { capture: true, passive: false };\n\nconst handlePreviewLookup = async (\n client: Client,\n defaultSpace: Space,\n { ref, label }: PreviewLinkRef,\n): Promise<PreviewLinkTarget | null> => {\n try {\n const dxn = DXN.parse(ref);\n if (!dxn) {\n return null;\n }\n\n const object = await resolveRef(client, dxn, defaultSpace);\n return { label, object };\n } catch (err) {\n return null;\n }\n};\n\nexport default (context: PluginContext) => {\n // TODO(wittjosiah): Factor out lookup handlers to other plugins to make not ECHO-specific.\n const handleDxRefTagActivate = async ({ refId, label, trigger }: DxRefTagActivate) => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const client = context.getCapability(ClientCapabilities.Client);\n const [layout] = context.getCapabilities(Capabilities.Layout);\n const { spaceId } = parseId(layout.workspace);\n const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;\n const result = await handlePreviewLookup(client, space, { ref: refId, label });\n if (!result) {\n return;\n }\n\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n subject: result.object,\n options: {\n state: true,\n variant: 'virtual',\n anchor: trigger,\n },\n }),\n );\n };\n\n let cleanup: () => void;\n if (document.defaultView) {\n cleanup = addEventListener(\n document.defaultView,\n 'dx-ref-tag-activate' as any,\n handleDxRefTagActivate,\n customEventOptions,\n );\n } else {\n log.warn('No default view found');\n }\n\n return contributes(Capabilities.Null, null, () => cleanup());\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,cAAcC,cAAkCC,aAAaC,oBAAoB;AAC1F,SAASC,wBAAwB;AACjC,SAAsBC,kBAAkB;AACxC,SAAqBC,eAAe;AACpC,SAASC,WAAW;AAEpB,SAASC,WAAW;AACpB,SAASC,0BAA0B;;AAGnC,IAAMC,qBAAqB;EAAEC,SAAS;EAAMC,SAAS;AAAM;AAE3D,IAAMC,sBAAsB,OAC1BC,QACAC,cACA,EAAEC,KAAKC,MAAK,MAAkB;AAE9B,MAAI;AACF,UAAMC,MAAMX,IAAIY,MAAMH,GAAAA;AACtB,QAAI,CAACE,KAAK;AACR,aAAO;IACT;AAEA,UAAME,SAAS,MAAMf,WAAWS,QAAQI,KAAKH,YAAAA;AAC7C,WAAO;MAAEE;MAAOG;IAAO;EACzB,SAASC,KAAK;AACZ,WAAO;EACT;AACF;AAEA,IAAA,0BAAe,CAACC,YAAAA;AAEd,QAAMC,yBAAyB,OAAO,EAAEC,OAAOP,OAAOQ,QAAO,MAAoB;AAC/E,UAAM,EAAEC,iBAAiBC,SAAQ,IAAKL,QAAQM,cAAc5B,aAAa6B,gBAAgB;AACzF,UAAMf,SAASQ,QAAQM,cAAcnB,mBAAmBqB,MAAM;AAC9D,UAAM,CAACC,MAAAA,IAAUT,QAAQU,gBAAgBhC,aAAaiC,MAAM;AAC5D,UAAM,EAAEC,QAAO,IAAK5B,QAAQyB,OAAOI,SAAS;AAC5C,UAAMC,SAASF,WAAWpB,OAAOuB,OAAOC,IAAIJ,OAAAA,MAAapB,OAAOuB,OAAOE;AACvE,UAAMC,SAAS,MAAM3B,oBAAoBC,QAAQsB,OAAO;MAAEpB,KAAKQ;MAAOP;IAAM,CAAA;AAC5E,QAAI,CAACuB,QAAQ;AACX;IACF;AAEA,UAAMb,SACJxB,aAAaF,aAAawC,eAAe;MACvCC,MAAM;MACNC,SAASH,OAAOpB;MAChBwB,SAAS;QACPC,OAAO;QACPC,SAAS;QACTC,QAAQtB;MACV;IACF,CAAA,CAAA;EAEJ;AAEA,MAAIuB;AACJ,MAAIC,SAASC,aAAa;AACxBF,cAAU5C,iBACR6C,SAASC,aACT,uBACA3B,wBACAb,kBAAAA;EAEJ,OAAO;AACLF,QAAI2C,KAAK,yBAAA,QAAA;;;;;;EACX;AAEA,SAAOjD,YAAYF,aAAaoD,MAAM,MAAM,MAAMJ,QAAAA,CAAAA;AACpD;",
|
|
6
|
-
"names": ["Capabilities", "LayoutAction", "contributes", "createIntent", "addEventListener", "resolveRef", "parseId", "DXN", "log", "ClientCapabilities", "customEventOptions", "capture", "passive", "handlePreviewLookup", "client", "defaultSpace", "ref", "label", "dxn", "parse", "object", "err", "context", "handleDxRefTagActivate", "refId", "trigger", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "Client", "layout", "getCapabilities", "Layout", "spaceId", "workspace", "space", "spaces", "get", "default", "result", "UpdatePopover", "part", "subject", "options", "state", "variant", "anchor", "cleanup", "document", "defaultView", "warn", "Null"]
|
|
7
|
-
}
|