@dxos/plugin-attention 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef
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/AttentionPlugin-74FLOEWA.mjs +59 -0
- package/dist/lib/browser/AttentionPlugin-74FLOEWA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-BDLH2DQU.mjs → chunk-DTGSOFCE.mjs} +1 -1
- package/dist/lib/browser/{chunk-BDLH2DQU.mjs.map → chunk-DTGSOFCE.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +7 -57
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +2 -8
- package/dist/lib/browser/operations/index.mjs.map +3 -3
- package/dist/lib/browser/{select-HQCLOXD6.mjs → select-CI2OLVWT.mjs} +6 -9
- package/dist/lib/browser/select-CI2OLVWT.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -2
- package/dist/lib/node-esm/AttentionPlugin-XWSCV227.mjs +61 -0
- package/dist/lib/node-esm/AttentionPlugin-XWSCV227.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GWUE2YCZ.mjs → chunk-HMHKU4FO.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-GWUE2YCZ.mjs.map → chunk-HMHKU4FO.mjs.map} +2 -2
- package/dist/lib/node-esm/index.mjs +7 -56
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +2 -7
- package/dist/lib/node-esm/operations/index.mjs.map +3 -3
- package/dist/lib/node-esm/{select-GLRAU6S2.mjs → select-QNJSO4Q5.mjs} +6 -9
- package/dist/lib/node-esm/select-QNJSO4Q5.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -2
- package/dist/types/src/AttentionPlugin.d.ts +1 -0
- package/dist/types/src/AttentionPlugin.d.ts.map +1 -1
- package/dist/types/src/AttentionPlugin.test.d.ts +2 -0
- package/dist/types/src/AttentionPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/select.d.ts +3 -3
- package/dist/types/src/operations/select.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -20
- package/src/AttentionPlugin.test.ts +32 -0
- package/src/AttentionPlugin.ts +3 -1
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/index.ts +7 -2
- package/src/operations/index.ts +1 -3
- package/src/operations/select.ts +4 -4
- package/dist/lib/browser/chunk-55HTXC2G.mjs +0 -39
- package/dist/lib/browser/chunk-55HTXC2G.mjs.map +0 -7
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/browser/select-HQCLOXD6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HQWPPQXC.mjs +0 -40
- package/dist/lib/node-esm/chunk-HQWPPQXC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
- package/dist/lib/node-esm/select-GLRAU6S2.mjs.map +0 -7
- package/dist/types/src/operations/definitions.d.ts +0 -23
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/src/operations/definitions.ts +0 -25
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// src/AttentionPlugin.ts
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from "@dxos/app-framework";
|
|
4
|
+
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
5
|
+
import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
|
|
6
|
+
import { Keyboard, OperationHandler, ReactContext } from "#capabilities";
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
import { AttentionEvents } from "#types";
|
|
9
|
+
import { AttentionCapabilities } from "#types";
|
|
10
|
+
var AttentionPlugin = Plugin.define(meta).pipe(AppPlugin.addOperationHandlerModule({
|
|
11
|
+
activate: OperationHandler
|
|
12
|
+
}), Plugin.addModule({
|
|
13
|
+
id: "attention",
|
|
14
|
+
activatesOn: ActivationEvents.Startup,
|
|
15
|
+
firesAfterActivation: [
|
|
16
|
+
AttentionEvents.AttentionReady
|
|
17
|
+
],
|
|
18
|
+
activate: () => Effect.gen(function* () {
|
|
19
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
20
|
+
const attention = new AttentionManager(registry);
|
|
21
|
+
const selection = new SelectionManager(registry);
|
|
22
|
+
setupDevtools(attention);
|
|
23
|
+
return [
|
|
24
|
+
Capability.contributes(AttentionCapabilities.Attention, attention),
|
|
25
|
+
Capability.contributes(AttentionCapabilities.Selection, selection)
|
|
26
|
+
];
|
|
27
|
+
})
|
|
28
|
+
}), Plugin.addModule({
|
|
29
|
+
activatesOn: ActivationEvents.Startup,
|
|
30
|
+
activate: ReactContext
|
|
31
|
+
}), Plugin.addModule({
|
|
32
|
+
activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, AttentionEvents.AttentionReady),
|
|
33
|
+
activate: Keyboard
|
|
34
|
+
}), Plugin.make);
|
|
35
|
+
var setupDevtools = (attention) => {
|
|
36
|
+
globalThis.composer ??= {};
|
|
37
|
+
globalThis.composer.attention = {
|
|
38
|
+
get manager() {
|
|
39
|
+
return attention;
|
|
40
|
+
},
|
|
41
|
+
get attended() {
|
|
42
|
+
return attention.getCurrent();
|
|
43
|
+
},
|
|
44
|
+
get currentSpace() {
|
|
45
|
+
for (const id of attention.getCurrent()) {
|
|
46
|
+
const segments = id.split("/");
|
|
47
|
+
if (segments.length > 1 && segments[1].length === 33) {
|
|
48
|
+
return segments[1];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
var AttentionPlugin_default = AttentionPlugin;
|
|
55
|
+
export {
|
|
56
|
+
AttentionPlugin,
|
|
57
|
+
AttentionPlugin_default as default
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=AttentionPlugin-74FLOEWA.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/AttentionPlugin.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { AttentionManager, SelectionManager } from '@dxos/react-ui-attention';\n\nimport { Keyboard, OperationHandler, ReactContext } from '#capabilities';\nimport { meta } from '#meta';\nimport { AttentionEvents } from '#types';\nimport { AttentionCapabilities } from '#types';\n\nexport const AttentionPlugin = Plugin.define(meta).pipe(\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n Plugin.addModule({\n id: 'attention',\n activatesOn: ActivationEvents.Startup,\n firesAfterActivation: [AttentionEvents.AttentionReady],\n activate: () =>\n Effect.gen(function* () {\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const attention = new AttentionManager(registry);\n const selection = new SelectionManager(registry);\n setupDevtools(attention);\n return [\n Capability.contributes(AttentionCapabilities.Attention, attention),\n Capability.contributes(AttentionCapabilities.Selection, selection),\n ];\n }),\n }),\n Plugin.addModule({\n activatesOn: ActivationEvents.Startup,\n activate: ReactContext,\n }),\n Plugin.addModule({\n activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, AttentionEvents.AttentionReady),\n activate: Keyboard,\n }),\n Plugin.make,\n);\n\nconst setupDevtools = (attention: AttentionManager) => {\n (globalThis as any).composer ??= {};\n\n (globalThis as any).composer.attention = {\n get manager() {\n return attention;\n },\n get attended() {\n return attention.getCurrent();\n },\n get currentSpace() {\n for (const id of attention.getCurrent()) {\n const segments = id.split('/');\n if (segments.length > 1 && segments[1].length === 33) {\n return segments[1];\n }\n }\n },\n };\n};\n\nexport default AttentionPlugin;\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiBC,kBAAkBC,cAAcC,YAAYC,cAAc;AACpF,SAASC,qBAAqBC,iBAAiB;AAC/C,SAASC,kBAAkBC,wBAAwB;AAEnD,SAASC,UAAUC,kBAAkBC,oBAAoB;AACzD,SAASC,YAAY;AACrB,SAASC,uBAAuB;AAChC,SAASC,6BAA6B;AAE/B,IAAMC,kBAAkBX,OAAOY,OAAOJ,IAAAA,EAAMK,KACjDX,UAAUY,0BAA0B;EAAEC,UAAUT;AAAiB,CAAA,GACjEN,OAAOgB,UAAU;EACfC,IAAI;EACJC,aAAarB,iBAAiBsB;EAC9BC,sBAAsB;IAACX,gBAAgBY;;EACvCN,UAAU,MACDO,WAAI,aAAA;AACT,UAAMC,WAAW,OAAOxB,WAAWyB,IAAI1B,aAAa2B,YAAY;AAChE,UAAMC,YAAY,IAAIvB,iBAAiBoB,QAAAA;AACvC,UAAMI,YAAY,IAAIvB,iBAAiBmB,QAAAA;AACvCK,kBAAcF,SAAAA;AACd,WAAO;MACL3B,WAAW8B,YAAYnB,sBAAsBoB,WAAWJ,SAAAA;MACxD3B,WAAW8B,YAAYnB,sBAAsBqB,WAAWJ,SAAAA;;EAE5D,CAAA;AACJ,CAAA,GACA3B,OAAOgB,UAAU;EACfE,aAAarB,iBAAiBsB;EAC9BJ,UAAUR;AACZ,CAAA,GACAP,OAAOgB,UAAU;EACfE,aAAatB,gBAAgBoC,MAAM/B,oBAAoBgC,eAAexB,gBAAgBY,cAAc;EACpGN,UAAUV;AACZ,CAAA,GACAL,OAAOkC,IAAI;AAGb,IAAMN,gBAAgB,CAACF,cAAAA;AACpBS,aAAmBC,aAAa,CAAC;AAEjCD,aAAmBC,SAASV,YAAY;IACvC,IAAIW,UAAU;AACZ,aAAOX;IACT;IACA,IAAIY,WAAW;AACb,aAAOZ,UAAUa,WAAU;IAC7B;IACA,IAAIC,eAAe;AACjB,iBAAWvB,MAAMS,UAAUa,WAAU,GAAI;AACvC,cAAME,WAAWxB,GAAGyB,MAAM,GAAA;AAC1B,YAAID,SAASE,SAAS,KAAKF,SAAS,CAAA,EAAGE,WAAW,IAAI;AACpD,iBAAOF,SAAS,CAAA;QAClB;MACF;IACF;EACF;AACF;AAEA,IAAA,0BAAe9B;",
|
|
6
|
+
"names": ["Effect", "ActivationEvent", "ActivationEvents", "Capabilities", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "AttentionManager", "SelectionManager", "Keyboard", "OperationHandler", "ReactContext", "meta", "AttentionEvents", "AttentionCapabilities", "AttentionPlugin", "define", "pipe", "addOperationHandlerModule", "activate", "addModule", "id", "activatesOn", "Startup", "firesAfterActivation", "AttentionReady", "gen", "registry", "get", "AtomRegistry", "attention", "selection", "setupDevtools", "contributes", "Attention", "Selection", "allOf", "AppGraphReady", "make", "globalThis", "composer", "manager", "attended", "getCurrent", "currentSpace", "segments", "split", "length"]
|
|
7
|
+
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/types/types.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { type AttentionManager, type SelectionManager } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\n\nexport namespace AttentionCapabilities {\n export const Attention = Capability.make<AttentionManager>(`${meta.id}.capability.attention`);\n export const Selection = Capability.make<SelectionManager>(`${meta.id}.capability.selection`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport namespace AttentionEvents {\n export const AttentionReady = ActivationEvent.make(`${meta.id}.event.attention-ready`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { SelectionSchema } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\n\nexport namespace AttentionAction {\n const ATTENTION_ACTION = `${meta.id}.action`;\n\n export class Select extends Schema.TaggedClass<Select>()(`${ATTENTION_ACTION}.select`, {\n input: Schema.Struct({\n contextId: Schema.String,\n selection: SelectionSchema,\n }),\n output: Schema.Void,\n }) {}\n}\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,kBAAkB;AAG3B,SAASC,YAAY;UAEJC,wBAAAA;yBACFC,
|
|
6
|
-
"names": ["Capability", "meta", "AttentionCapabilities", "Attention", "
|
|
5
|
+
"mappings": ";AAIA,SAASA,kBAAkB;AAG3B,SAASC,YAAY;UAEJC,wBAAAA;yBACFC,YAAYH,WAAWI,KAAuB,GAAGH,KAAKI,EAAE,uBAAuB;yBAC/EC,YAAYN,WAAWI,KAAuB,GAAGH,KAAKI,EAAE,uBAAuB;AAC9F,GAHiBH,0BAAAA,wBAAAA,CAAAA,EAAAA;;;;ACLjB,SAASK,uBAAuB;AAEhC,SAASC,QAAAA,aAAY;UAEJC,kBAAAA;mBACFC,iBAAiBH,gBAAgBI,KAAK,GAAGH,MAAKI,EAAE,wBAAwB;AACvF,GAFiBH,oBAAAA,kBAAAA,CAAAA,EAAAA;;;;ACJjB,YAAYI,YAAY;AAExB,SAASC,uBAAuB;AAEhC,SAASC,QAAAA,aAAY;UAEJC,kBAAAA;AACf,QAAMC,mBAAmB,GAAGF,MAAKG,EAAE;EAE5B,MAAMC,eAAsBC,mBAAW,EAAW,GAAGH,gBAAAA,WAA2B;IACrFI,OAAcC,cAAO;MACnBC,WAAkBC;MAClBC,WAAWX;IACb,CAAA;IACAY,QAAeC;EACjB,CAAA,EAAA;EAAI;mBANSR,SAAAA;AAOf,GAViBH,oBAAAA,kBAAAA,CAAAA,EAAAA;;",
|
|
6
|
+
"names": ["Capability", "meta", "AttentionCapabilities", "Attention", "make", "id", "Selection", "ActivationEvent", "meta", "AttentionEvents", "AttentionReady", "make", "id", "Schema", "SelectionSchema", "meta", "AttentionAction", "ATTENTION_ACTION", "id", "Select", "TaggedClass", "input", "Struct", "contextId", "String", "selection", "output", "Void"]
|
|
7
7
|
}
|
|
@@ -1,62 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// src/AttentionPlugin.ts
|
|
4
|
-
import * as Effect from "effect/Effect";
|
|
5
|
-
import { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from "@dxos/app-framework";
|
|
6
|
-
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
7
|
-
import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
|
|
8
|
-
import { Keyboard, OperationHandler, ReactContext } from "#capabilities";
|
|
9
|
-
import { meta } from "#meta";
|
|
10
|
-
import { AttentionEvents } from "#types";
|
|
11
|
-
import { AttentionCapabilities } from "#types";
|
|
12
|
-
var AttentionPlugin = Plugin.define(meta).pipe(AppPlugin.addOperationHandlerModule({
|
|
13
|
-
activate: OperationHandler
|
|
14
|
-
}), Plugin.addModule({
|
|
15
|
-
id: "attention",
|
|
16
|
-
activatesOn: ActivationEvents.Startup,
|
|
17
|
-
activatesAfter: [
|
|
18
|
-
AttentionEvents.AttentionReady
|
|
19
|
-
],
|
|
20
|
-
activate: () => Effect.gen(function* () {
|
|
21
|
-
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
22
|
-
const attention = new AttentionManager(registry);
|
|
23
|
-
const selection = new SelectionManager(registry);
|
|
24
|
-
setupDevtools(attention);
|
|
25
|
-
return [
|
|
26
|
-
Capability.contributes(AttentionCapabilities.Attention, attention),
|
|
27
|
-
Capability.contributes(AttentionCapabilities.Selection, selection)
|
|
28
|
-
];
|
|
29
|
-
})
|
|
30
|
-
}), Plugin.addModule({
|
|
31
|
-
activatesOn: ActivationEvents.Startup,
|
|
32
|
-
activate: ReactContext
|
|
33
|
-
}), Plugin.addModule({
|
|
34
|
-
activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, AttentionEvents.AttentionReady),
|
|
35
|
-
activate: Keyboard
|
|
36
|
-
}), Plugin.make);
|
|
37
|
-
var setupDevtools = (attention) => {
|
|
38
|
-
globalThis.composer ??= {};
|
|
39
|
-
globalThis.composer.attention = {
|
|
40
|
-
get manager() {
|
|
41
|
-
return attention;
|
|
42
|
-
},
|
|
43
|
-
get attended() {
|
|
44
|
-
return attention.getCurrent();
|
|
45
|
-
},
|
|
46
|
-
get currentSpace() {
|
|
47
|
-
for (const id of attention.getCurrent()) {
|
|
48
|
-
const segments = id.split("/");
|
|
49
|
-
if (segments.length > 1 && segments[1].length === 33) {
|
|
50
|
-
return segments[1];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
};
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
56
3
|
|
|
57
4
|
// src/meta.ts
|
|
58
5
|
import { trim } from "@dxos/util";
|
|
59
|
-
var
|
|
6
|
+
var meta = {
|
|
60
7
|
id: "org.dxos.plugin.attention",
|
|
61
8
|
name: "Attention",
|
|
62
9
|
description: trim`
|
|
@@ -64,8 +11,11 @@ var meta2 = {
|
|
|
64
11
|
Highlight items requiring action and coordinate team focus on priority work.
|
|
65
12
|
`
|
|
66
13
|
};
|
|
14
|
+
|
|
15
|
+
// src/index.ts
|
|
16
|
+
var AttentionPlugin = Plugin.lazy(meta, () => import("./AttentionPlugin-74FLOEWA.mjs"));
|
|
67
17
|
export {
|
|
68
18
|
AttentionPlugin,
|
|
69
|
-
|
|
19
|
+
meta
|
|
70
20
|
};
|
|
71
21
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/index.ts", "../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const AttentionPlugin = Plugin.lazy(meta, () => import('./AttentionPlugin'));\n\nexport * from './meta';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.attention',\n name: 'Attention',\n description: trim`\n Track and manage focused attention on objects across your workspace.\n Highlight items requiring action and coordinate team focus on priority work.\n `,\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;AAIf;;;ADNO,IAAMK,kBAAkBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,gCAAA,CAAA;",
|
|
6
|
+
"names": ["Plugin", "trim", "meta", "id", "name", "description", "AttentionPlugin", "Plugin", "lazy", "meta"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/AttentionPlugin.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1293,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/AttentionPlugin.ts":{"bytes":7982,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":976,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/AttentionPlugin.ts","kind":"dynamic-import","original":"./AttentionPlugin"}],"format":"esm"},"src/types/capabilities.ts":{"bytes":1628,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/events.ts":{"bytes":1160,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/types.ts":{"bytes":2131,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":551,"imports":[{"path":"src/types/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/types/events.ts","kind":"import-statement","original":"./events"},{"path":"src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/operations/select.ts":{"bytes":5402,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/operations/index.ts":{"bytes":843,"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"src/operations/select.ts","kind":"dynamic-import","original":"./select"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1043},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"dist/lib/browser/AttentionPlugin-74FLOEWA.mjs","kind":"dynamic-import"}],"exports":["AttentionPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":135},"src/meta.ts":{"bytesInOutput":286}},"bytes":543},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-DTGSOFCE.mjs","kind":"import-statement"}],"exports":["AttentionAction","AttentionCapabilities","AttentionEvents"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":212},"dist/lib/browser/operations/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":457},"dist/lib/browser/operations/index.mjs":{"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"dist/lib/browser/select-CI2OLVWT.mjs","kind":"dynamic-import"}],"exports":["AttentionOperationHandlerSet"],"entryPoint":"src/operations/index.ts","inputs":{"src/operations/index.ts":{"bytesInOutput":154}},"bytes":259},"dist/lib/browser/AttentionPlugin-74FLOEWA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4186},"dist/lib/browser/AttentionPlugin-74FLOEWA.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["AttentionPlugin","default"],"entryPoint":"src/AttentionPlugin.ts","inputs":{"src/AttentionPlugin.ts":{"bytesInOutput":1939}},"bytes":2087},"dist/lib/browser/select-CI2OLVWT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2952},"dist/lib/browser/select-CI2OLVWT.mjs":{"imports":[{"path":"dist/lib/browser/chunk-DTGSOFCE.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/select.ts","inputs":{"src/operations/select.ts":{"bytesInOutput":1168}},"bytes":1346},"dist/lib/browser/chunk-DTGSOFCE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2394},"dist/lib/browser/chunk-DTGSOFCE.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["AttentionAction","AttentionCapabilities","AttentionEvents"],"inputs":{"src/types/capabilities.ts":{"bytesInOutput":380},"src/types/index.ts":{"bytesInOutput":0},"src/types/events.ts":{"bytesInOutput":287},"src/types/types.ts":{"bytesInOutput":534}},"bytes":1396}}}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
definitions_exports
|
|
3
|
-
} from "../chunk-55HTXC2G.mjs";
|
|
4
|
-
import "../chunk-J5LGTIGS.mjs";
|
|
5
|
-
|
|
6
1
|
// src/operations/index.ts
|
|
7
|
-
import { OperationHandlerSet } from "@dxos/
|
|
8
|
-
var AttentionOperationHandlerSet = OperationHandlerSet.lazy(() => import("../select-
|
|
2
|
+
import { OperationHandlerSet } from "@dxos/compute";
|
|
3
|
+
var AttentionOperationHandlerSet = OperationHandlerSet.lazy(() => import("../select-CI2OLVWT.mjs"));
|
|
9
4
|
export {
|
|
10
|
-
definitions_exports as AttentionOperation,
|
|
11
5
|
AttentionOperationHandlerSet
|
|
12
6
|
};
|
|
13
7
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/operations/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["OperationHandlerSet", "AttentionOperationHandlerSet", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const AttentionOperationHandlerSet = OperationHandlerSet.lazy(() => import('./select'));\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,2BAA2B;AAE7B,IAAMC,+BAA+BD,oBAAoBE,KAAK,MAAM,OAAO,wBAAA,CAAA;",
|
|
6
|
+
"names": ["OperationHandlerSet", "AttentionOperationHandlerSet", "lazy"]
|
|
7
7
|
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AttentionCapabilities
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
Select
|
|
6
|
-
} from "./chunk-55HTXC2G.mjs";
|
|
7
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
3
|
+
} from "./chunk-DTGSOFCE.mjs";
|
|
8
4
|
|
|
9
5
|
// src/operations/select.ts
|
|
10
6
|
import * as Effect from "effect/Effect";
|
|
11
7
|
import * as Match from "effect/Match";
|
|
12
8
|
import { Capability } from "@dxos/app-framework";
|
|
13
|
-
import {
|
|
14
|
-
|
|
9
|
+
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
10
|
+
import { Operation } from "@dxos/compute";
|
|
11
|
+
var handler = LayoutOperation.Select.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
|
|
15
12
|
const selection = yield* Capability.get(AttentionCapabilities.Selection);
|
|
16
|
-
Match.value(input.
|
|
13
|
+
Match.value(input.subject).pipe(Match.when({
|
|
17
14
|
mode: "single",
|
|
18
15
|
id: void 0
|
|
19
16
|
}, () => {
|
|
@@ -46,4 +43,4 @@ var select_default = handler;
|
|
|
46
43
|
export {
|
|
47
44
|
select_default as default
|
|
48
45
|
};
|
|
49
|
-
//# sourceMappingURL=select-
|
|
46
|
+
//# sourceMappingURL=select-CI2OLVWT.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/select.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Match from 'effect/Match';\n\nimport { Capability } from '@dxos/app-framework';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { AttentionCapabilities } from '../types';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.Select> = LayoutOperation.Select.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const selection = yield* Capability.get(AttentionCapabilities.Selection);\n Match.value(input.subject).pipe(\n Match.when({ mode: 'single', id: undefined }, () => {\n selection.clearSelection(input.contextId);\n }),\n Match.when({ mode: 'single' }, (s) => {\n selection.updateSingle(input.contextId, s.id!);\n }),\n Match.when({ mode: 'multi' }, (s) => {\n selection.updateMulti(input.contextId, s.ids);\n }),\n Match.when({ mode: 'range', from: undefined, to: undefined }, () => {\n selection.clearSelection(input.contextId);\n }),\n Match.when({ mode: 'range' }, (s) => {\n selection.updateRange(input.contextId, s.from!, s.to!);\n }),\n Match.when({ mode: 'multi-range' }, (s) => {\n selection.updateMultiRange(input.contextId, s.ranges);\n }),\n Match.exhaustive,\n );\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAI1B,IAAMC,UAAgEC,gBAAgBC,OAAOC,KAC3FC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAMC,YAAY,OAAOC,WAAWC,IAAIC,sBAAsBC,SAAS;AACvEC,EAAMC,YAAMP,MAAMQ,OAAO,EAAEZ,KACnBa,WAAK;IAAEC,MAAM;IAAUC,IAAIC;EAAU,GAAG,MAAA;AAC5CX,cAAUY,eAAeb,MAAMc,SAAS;EAC1C,CAAA,GACML,WAAK;IAAEC,MAAM;EAAS,GAAG,CAACK,MAAAA;AAC9Bd,cAAUe,aAAahB,MAAMc,WAAWC,EAAEJ,EAAE;EAC9C,CAAA,GACMF,WAAK;IAAEC,MAAM;EAAQ,GAAG,CAACK,MAAAA;AAC7Bd,cAAUgB,YAAYjB,MAAMc,WAAWC,EAAEG,GAAG;EAC9C,CAAA,GACMT,WAAK;IAAEC,MAAM;IAASS,MAAMP;IAAWQ,IAAIR;EAAU,GAAG,MAAA;AAC5DX,cAAUY,eAAeb,MAAMc,SAAS;EAC1C,CAAA,GACML,WAAK;IAAEC,MAAM;EAAQ,GAAG,CAACK,MAAAA;AAC7Bd,cAAUoB,YAAYrB,MAAMc,WAAWC,EAAEI,MAAOJ,EAAEK,EAAE;EACtD,CAAA,GACMX,WAAK;IAAEC,MAAM;EAAc,GAAG,CAACK,MAAAA;AACnCd,cAAUqB,iBAAiBtB,MAAMc,WAAWC,EAAEQ,MAAM;EACtD,CAAA,GACMC,gBAAU;AAEpB,CAAA,CAAA,CAAA;AAIJ,IAAA,iBAAe/B;",
|
|
6
|
+
"names": ["Effect", "Match", "Capability", "LayoutOperation", "Operation", "handler", "LayoutOperation", "Select", "pipe", "Operation", "withHandler", "fnUntraced", "input", "selection", "Capability", "get", "AttentionCapabilities", "Selection", "Match", "value", "subject", "when", "mode", "id", "undefined", "clearSelection", "contextId", "s", "updateSingle", "updateMulti", "ids", "from", "to", "updateRange", "updateMultiRange", "ranges", "exhaustive"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/AttentionPlugin.ts
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from "@dxos/app-framework";
|
|
6
|
+
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
7
|
+
import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
|
|
8
|
+
import { Keyboard, OperationHandler, ReactContext } from "#capabilities";
|
|
9
|
+
import { meta } from "#meta";
|
|
10
|
+
import { AttentionEvents } from "#types";
|
|
11
|
+
import { AttentionCapabilities } from "#types";
|
|
12
|
+
var AttentionPlugin = Plugin.define(meta).pipe(AppPlugin.addOperationHandlerModule({
|
|
13
|
+
activate: OperationHandler
|
|
14
|
+
}), Plugin.addModule({
|
|
15
|
+
id: "attention",
|
|
16
|
+
activatesOn: ActivationEvents.Startup,
|
|
17
|
+
firesAfterActivation: [
|
|
18
|
+
AttentionEvents.AttentionReady
|
|
19
|
+
],
|
|
20
|
+
activate: () => Effect.gen(function* () {
|
|
21
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
22
|
+
const attention = new AttentionManager(registry);
|
|
23
|
+
const selection = new SelectionManager(registry);
|
|
24
|
+
setupDevtools(attention);
|
|
25
|
+
return [
|
|
26
|
+
Capability.contributes(AttentionCapabilities.Attention, attention),
|
|
27
|
+
Capability.contributes(AttentionCapabilities.Selection, selection)
|
|
28
|
+
];
|
|
29
|
+
})
|
|
30
|
+
}), Plugin.addModule({
|
|
31
|
+
activatesOn: ActivationEvents.Startup,
|
|
32
|
+
activate: ReactContext
|
|
33
|
+
}), Plugin.addModule({
|
|
34
|
+
activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, AttentionEvents.AttentionReady),
|
|
35
|
+
activate: Keyboard
|
|
36
|
+
}), Plugin.make);
|
|
37
|
+
var setupDevtools = (attention) => {
|
|
38
|
+
globalThis.composer ??= {};
|
|
39
|
+
globalThis.composer.attention = {
|
|
40
|
+
get manager() {
|
|
41
|
+
return attention;
|
|
42
|
+
},
|
|
43
|
+
get attended() {
|
|
44
|
+
return attention.getCurrent();
|
|
45
|
+
},
|
|
46
|
+
get currentSpace() {
|
|
47
|
+
for (const id of attention.getCurrent()) {
|
|
48
|
+
const segments = id.split("/");
|
|
49
|
+
if (segments.length > 1 && segments[1].length === 33) {
|
|
50
|
+
return segments[1];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
var AttentionPlugin_default = AttentionPlugin;
|
|
57
|
+
export {
|
|
58
|
+
AttentionPlugin,
|
|
59
|
+
AttentionPlugin_default as default
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=AttentionPlugin-XWSCV227.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/AttentionPlugin.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { AttentionManager, SelectionManager } from '@dxos/react-ui-attention';\n\nimport { Keyboard, OperationHandler, ReactContext } from '#capabilities';\nimport { meta } from '#meta';\nimport { AttentionEvents } from '#types';\nimport { AttentionCapabilities } from '#types';\n\nexport const AttentionPlugin = Plugin.define(meta).pipe(\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n Plugin.addModule({\n id: 'attention',\n activatesOn: ActivationEvents.Startup,\n firesAfterActivation: [AttentionEvents.AttentionReady],\n activate: () =>\n Effect.gen(function* () {\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const attention = new AttentionManager(registry);\n const selection = new SelectionManager(registry);\n setupDevtools(attention);\n return [\n Capability.contributes(AttentionCapabilities.Attention, attention),\n Capability.contributes(AttentionCapabilities.Selection, selection),\n ];\n }),\n }),\n Plugin.addModule({\n activatesOn: ActivationEvents.Startup,\n activate: ReactContext,\n }),\n Plugin.addModule({\n activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, AttentionEvents.AttentionReady),\n activate: Keyboard,\n }),\n Plugin.make,\n);\n\nconst setupDevtools = (attention: AttentionManager) => {\n (globalThis as any).composer ??= {};\n\n (globalThis as any).composer.attention = {\n get manager() {\n return attention;\n },\n get attended() {\n return attention.getCurrent();\n },\n get currentSpace() {\n for (const id of attention.getCurrent()) {\n const segments = id.split('/');\n if (segments.length > 1 && segments[1].length === 33) {\n return segments[1];\n }\n }\n },\n };\n};\n\nexport default AttentionPlugin;\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiBC,kBAAkBC,cAAcC,YAAYC,cAAc;AACpF,SAASC,qBAAqBC,iBAAiB;AAC/C,SAASC,kBAAkBC,wBAAwB;AAEnD,SAASC,UAAUC,kBAAkBC,oBAAoB;AACzD,SAASC,YAAY;AACrB,SAASC,uBAAuB;AAChC,SAASC,6BAA6B;AAE/B,IAAMC,kBAAkBX,OAAOY,OAAOJ,IAAAA,EAAMK,KACjDX,UAAUY,0BAA0B;EAAEC,UAAUT;AAAiB,CAAA,GACjEN,OAAOgB,UAAU;EACfC,IAAI;EACJC,aAAarB,iBAAiBsB;EAC9BC,sBAAsB;IAACX,gBAAgBY;;EACvCN,UAAU,MACDO,WAAI,aAAA;AACT,UAAMC,WAAW,OAAOxB,WAAWyB,IAAI1B,aAAa2B,YAAY;AAChE,UAAMC,YAAY,IAAIvB,iBAAiBoB,QAAAA;AACvC,UAAMI,YAAY,IAAIvB,iBAAiBmB,QAAAA;AACvCK,kBAAcF,SAAAA;AACd,WAAO;MACL3B,WAAW8B,YAAYnB,sBAAsBoB,WAAWJ,SAAAA;MACxD3B,WAAW8B,YAAYnB,sBAAsBqB,WAAWJ,SAAAA;;EAE5D,CAAA;AACJ,CAAA,GACA3B,OAAOgB,UAAU;EACfE,aAAarB,iBAAiBsB;EAC9BJ,UAAUR;AACZ,CAAA,GACAP,OAAOgB,UAAU;EACfE,aAAatB,gBAAgBoC,MAAM/B,oBAAoBgC,eAAexB,gBAAgBY,cAAc;EACpGN,UAAUV;AACZ,CAAA,GACAL,OAAOkC,IAAI;AAGb,IAAMN,gBAAgB,CAACF,cAAAA;AACpBS,aAAmBC,aAAa,CAAC;AAEjCD,aAAmBC,SAASV,YAAY;IACvC,IAAIW,UAAU;AACZ,aAAOX;IACT;IACA,IAAIY,WAAW;AACb,aAAOZ,UAAUa,WAAU;IAC7B;IACA,IAAIC,eAAe;AACjB,iBAAWvB,MAAMS,UAAUa,WAAU,GAAI;AACvC,cAAME,WAAWxB,GAAGyB,MAAM,GAAA;AAC1B,YAAID,SAASE,SAAS,KAAKF,SAAS,CAAA,EAAGE,WAAW,IAAI;AACpD,iBAAOF,SAAS,CAAA;QAClB;MACF;IACF;EACF;AACF;AAEA,IAAA,0BAAe9B;",
|
|
6
|
+
"names": ["Effect", "ActivationEvent", "ActivationEvents", "Capabilities", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "AttentionManager", "SelectionManager", "Keyboard", "OperationHandler", "ReactContext", "meta", "AttentionEvents", "AttentionCapabilities", "AttentionPlugin", "define", "pipe", "addOperationHandlerModule", "activate", "addModule", "id", "activatesOn", "Startup", "firesAfterActivation", "AttentionReady", "gen", "registry", "get", "AtomRegistry", "attention", "selection", "setupDevtools", "contributes", "Attention", "Selection", "allOf", "AppGraphReady", "make", "globalThis", "composer", "manager", "attended", "getCurrent", "currentSpace", "segments", "split", "length"]
|
|
7
|
+
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/types/types.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { type AttentionManager, type SelectionManager } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\n\nexport namespace AttentionCapabilities {\n export const Attention = Capability.make<AttentionManager>(`${meta.id}.capability.attention`);\n export const Selection = Capability.make<SelectionManager>(`${meta.id}.capability.selection`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport namespace AttentionEvents {\n export const AttentionReady = ActivationEvent.make(`${meta.id}.event.attention-ready`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { SelectionSchema } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\n\nexport namespace AttentionAction {\n const ATTENTION_ACTION = `${meta.id}.action`;\n\n export class Select extends Schema.TaggedClass<Select>()(`${ATTENTION_ACTION}.select`, {\n input: Schema.Struct({\n contextId: Schema.String,\n selection: SelectionSchema,\n }),\n output: Schema.Void,\n }) {}\n}\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,kBAAkB;AAG3B,SAASC,YAAY;UAEJC,wBAAAA;yBACFC,
|
|
6
|
-
"names": ["Capability", "meta", "AttentionCapabilities", "Attention", "
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,kBAAkB;AAG3B,SAASC,YAAY;UAEJC,wBAAAA;yBACFC,YAAYH,WAAWI,KAAuB,GAAGH,KAAKI,EAAE,uBAAuB;yBAC/EC,YAAYN,WAAWI,KAAuB,GAAGH,KAAKI,EAAE,uBAAuB;AAC9F,GAHiBH,0BAAAA,wBAAAA,CAAAA,EAAAA;;;;ACLjB,SAASK,uBAAuB;AAEhC,SAASC,QAAAA,aAAY;UAEJC,kBAAAA;mBACFC,iBAAiBH,gBAAgBI,KAAK,GAAGH,MAAKI,EAAE,wBAAwB;AACvF,GAFiBH,oBAAAA,kBAAAA,CAAAA,EAAAA;;;;ACJjB,YAAYI,YAAY;AAExB,SAASC,uBAAuB;AAEhC,SAASC,QAAAA,aAAY;UAEJC,kBAAAA;AACf,QAAMC,mBAAmB,GAAGF,MAAKG,EAAE;EAE5B,MAAMC,eAAsBC,mBAAW,EAAW,GAAGH,gBAAAA,WAA2B;IACrFI,OAAcC,cAAO;MACnBC,WAAkBC;MAClBC,WAAWX;IACb,CAAA;IACAY,QAAeC;EACjB,CAAA,EAAA;EAAI;mBANSR,SAAAA;AAOf,GAViBH,oBAAAA,kBAAAA,CAAAA,EAAAA;;",
|
|
6
|
+
"names": ["Capability", "meta", "AttentionCapabilities", "Attention", "make", "id", "Selection", "ActivationEvent", "meta", "AttentionEvents", "AttentionReady", "make", "id", "Schema", "SelectionSchema", "meta", "AttentionAction", "ATTENTION_ACTION", "id", "Select", "TaggedClass", "input", "Struct", "contextId", "String", "selection", "output", "Void"]
|
|
7
7
|
}
|
|
@@ -1,63 +1,11 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import "./chunk-HSLMI22Q.mjs";
|
|
3
2
|
|
|
4
|
-
// src/
|
|
5
|
-
import
|
|
6
|
-
import { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from "@dxos/app-framework";
|
|
7
|
-
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
8
|
-
import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
|
|
9
|
-
import { Keyboard, OperationHandler, ReactContext } from "#capabilities";
|
|
10
|
-
import { meta } from "#meta";
|
|
11
|
-
import { AttentionEvents } from "#types";
|
|
12
|
-
import { AttentionCapabilities } from "#types";
|
|
13
|
-
var AttentionPlugin = Plugin.define(meta).pipe(AppPlugin.addOperationHandlerModule({
|
|
14
|
-
activate: OperationHandler
|
|
15
|
-
}), Plugin.addModule({
|
|
16
|
-
id: "attention",
|
|
17
|
-
activatesOn: ActivationEvents.Startup,
|
|
18
|
-
activatesAfter: [
|
|
19
|
-
AttentionEvents.AttentionReady
|
|
20
|
-
],
|
|
21
|
-
activate: () => Effect.gen(function* () {
|
|
22
|
-
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
23
|
-
const attention = new AttentionManager(registry);
|
|
24
|
-
const selection = new SelectionManager(registry);
|
|
25
|
-
setupDevtools(attention);
|
|
26
|
-
return [
|
|
27
|
-
Capability.contributes(AttentionCapabilities.Attention, attention),
|
|
28
|
-
Capability.contributes(AttentionCapabilities.Selection, selection)
|
|
29
|
-
];
|
|
30
|
-
})
|
|
31
|
-
}), Plugin.addModule({
|
|
32
|
-
activatesOn: ActivationEvents.Startup,
|
|
33
|
-
activate: ReactContext
|
|
34
|
-
}), Plugin.addModule({
|
|
35
|
-
activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, AttentionEvents.AttentionReady),
|
|
36
|
-
activate: Keyboard
|
|
37
|
-
}), Plugin.make);
|
|
38
|
-
var setupDevtools = (attention) => {
|
|
39
|
-
globalThis.composer ??= {};
|
|
40
|
-
globalThis.composer.attention = {
|
|
41
|
-
get manager() {
|
|
42
|
-
return attention;
|
|
43
|
-
},
|
|
44
|
-
get attended() {
|
|
45
|
-
return attention.getCurrent();
|
|
46
|
-
},
|
|
47
|
-
get currentSpace() {
|
|
48
|
-
for (const id of attention.getCurrent()) {
|
|
49
|
-
const segments = id.split("/");
|
|
50
|
-
if (segments.length > 1 && segments[1].length === 33) {
|
|
51
|
-
return segments[1];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
};
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { Plugin } from "@dxos/app-framework";
|
|
57
5
|
|
|
58
6
|
// src/meta.ts
|
|
59
7
|
import { trim } from "@dxos/util";
|
|
60
|
-
var
|
|
8
|
+
var meta = {
|
|
61
9
|
id: "org.dxos.plugin.attention",
|
|
62
10
|
name: "Attention",
|
|
63
11
|
description: trim`
|
|
@@ -65,8 +13,11 @@ var meta2 = {
|
|
|
65
13
|
Highlight items requiring action and coordinate team focus on priority work.
|
|
66
14
|
`
|
|
67
15
|
};
|
|
16
|
+
|
|
17
|
+
// src/index.ts
|
|
18
|
+
var AttentionPlugin = Plugin.lazy(meta, () => import("./AttentionPlugin-XWSCV227.mjs"));
|
|
68
19
|
export {
|
|
69
20
|
AttentionPlugin,
|
|
70
|
-
|
|
21
|
+
meta
|
|
71
22
|
};
|
|
72
23
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/index.ts", "../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const AttentionPlugin = Plugin.lazy(meta, () => import('./AttentionPlugin'));\n\nexport * from './meta';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.attention',\n name: 'Attention',\n description: trim`\n Track and manage focused attention on objects across your workspace.\n Highlight items requiring action and coordinate team focus on priority work.\n `,\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;AAIf;;;ADNO,IAAMK,kBAAkBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,gCAAA,CAAA;",
|
|
6
|
+
"names": ["Plugin", "trim", "meta", "id", "name", "description", "AttentionPlugin", "Plugin", "lazy", "meta"]
|
|
7
7
|
}
|