@dxos/plugin-attention 0.8.4-main.a4bbb77 → 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-DTGSOFCE.mjs +41 -0
- package/dist/lib/browser/chunk-DTGSOFCE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +13 -80
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +7 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/select-CI2OLVWT.mjs +46 -0
- package/dist/lib/browser/select-CI2OLVWT.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -4
- 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-HMHKU4FO.mjs +43 -0
- package/dist/lib/node-esm/chunk-HMHKU4FO.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +13 -79
- 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 +9 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/select-QNJSO4Q5.mjs +47 -0
- package/dist/lib/node-esm/select-QNJSO4Q5.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -4
- package/dist/types/src/AttentionPlugin.d.ts +3 -1
- 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 +6 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts +3 -2
- package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context.d.ts +4 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/select.d.ts +5 -0
- package/dist/types/src/operations/select.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +7 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3 -3
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -23
- package/src/AttentionPlugin.test.ts +32 -0
- package/src/AttentionPlugin.ts +38 -35
- package/src/capabilities/index.ts +8 -6
- package/src/capabilities/keyboard.ts +15 -16
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-context.tsx +29 -25
- package/src/index.ts +5 -4
- package/src/meta.ts +8 -3
- package/src/operations/index.ts +7 -0
- package/src/operations/select.ts +43 -0
- package/src/types/capabilities.ts +13 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +2 -0
- package/src/types/types.ts +4 -4
- package/dist/lib/browser/chunk-7NDMCDGN.mjs +0 -25
- package/dist/lib/browser/chunk-7NDMCDGN.mjs.map +0 -7
- package/dist/lib/browser/chunk-EJ4ELAEO.mjs +0 -16
- package/dist/lib/browser/chunk-EJ4ELAEO.mjs.map +0 -7
- package/dist/lib/browser/chunk-NMXGUHSU.mjs +0 -10
- package/dist/lib/browser/chunk-NMXGUHSU.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-OKED4HZY.mjs +0 -51
- package/dist/lib/browser/intent-resolver-OKED4HZY.mjs.map +0 -7
- package/dist/lib/browser/keyboard-W57BF67Q.mjs +0 -28
- package/dist/lib/browser/keyboard-W57BF67Q.mjs.map +0 -7
- package/dist/lib/browser/react-context-7HCRTOWZ.mjs +0 -29
- package/dist/lib/browser/react-context-7HCRTOWZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FKQHPGTA.mjs +0 -17
- package/dist/lib/node-esm/chunk-FKQHPGTA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GC4PRMVZ.mjs +0 -12
- package/dist/lib/node-esm/chunk-GC4PRMVZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ICOLCHKJ.mjs +0 -26
- package/dist/lib/node-esm/chunk-ICOLCHKJ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-BCFMWW34.mjs +0 -52
- package/dist/lib/node-esm/intent-resolver-BCFMWW34.mjs.map +0 -7
- package/dist/lib/node-esm/keyboard-HCCT23BE.mjs +0 -29
- package/dist/lib/node-esm/keyboard-HCCT23BE.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-7RDGSUXD.mjs +0 -30
- package/dist/lib/node-esm/react-context-7RDGSUXD.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -6
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -13
- package/src/capabilities/intent-resolver.ts +0 -43
- package/src/events.ts +0 -11
|
@@ -1,88 +1,22 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
AttentionCapabilities
|
|
4
|
-
} from "./chunk-FKQHPGTA.mjs";
|
|
5
|
-
import {
|
|
6
|
-
meta
|
|
7
|
-
} from "./chunk-GC4PRMVZ.mjs";
|
|
8
2
|
|
|
9
3
|
// src/index.ts
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// src/AttentionPlugin.ts
|
|
13
|
-
import { Events, allOf, contributes, defineModule, definePlugin } from "@dxos/app-framework";
|
|
14
|
-
import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
|
|
15
|
-
|
|
16
|
-
// src/capabilities/index.ts
|
|
17
|
-
import { lazy } from "@dxos/app-framework";
|
|
18
|
-
var IntentResolver = lazy(() => import("./intent-resolver-BCFMWW34.mjs"));
|
|
19
|
-
var Keyboard = lazy(() => import("./keyboard-HCCT23BE.mjs"));
|
|
20
|
-
var ReactContext = lazy(() => import("./react-context-7RDGSUXD.mjs"));
|
|
4
|
+
import { Plugin } from "@dxos/app-framework";
|
|
21
5
|
|
|
22
|
-
// src/
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
defineModule({
|
|
32
|
-
id: `${meta.id}/module/attention`,
|
|
33
|
-
activatesOn: Events.Startup,
|
|
34
|
-
activatesAfter: [
|
|
35
|
-
AttentionEvents.AttentionReady
|
|
36
|
-
],
|
|
37
|
-
activate: () => {
|
|
38
|
-
const attention = new AttentionManager();
|
|
39
|
-
const selection = new SelectionManager();
|
|
40
|
-
setupDevtools(attention);
|
|
41
|
-
return [
|
|
42
|
-
contributes(AttentionCapabilities.Attention, attention),
|
|
43
|
-
contributes(AttentionCapabilities.Selection, selection)
|
|
44
|
-
];
|
|
45
|
-
}
|
|
46
|
-
}),
|
|
47
|
-
defineModule({
|
|
48
|
-
id: `${meta.id}/module/react-context`,
|
|
49
|
-
activatesOn: Events.Startup,
|
|
50
|
-
activate: ReactContext
|
|
51
|
-
}),
|
|
52
|
-
defineModule({
|
|
53
|
-
id: `${meta.id}/module/keyboard`,
|
|
54
|
-
activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),
|
|
55
|
-
activate: Keyboard
|
|
56
|
-
}),
|
|
57
|
-
defineModule({
|
|
58
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
59
|
-
activatesOn: Events.SetupIntentResolver,
|
|
60
|
-
activate: IntentResolver
|
|
61
|
-
})
|
|
62
|
-
]);
|
|
63
|
-
var setupDevtools = (attention) => {
|
|
64
|
-
var _globalThis;
|
|
65
|
-
(_globalThis = globalThis).composer ?? (_globalThis.composer = {});
|
|
66
|
-
globalThis.composer.attention = {
|
|
67
|
-
get manager() {
|
|
68
|
-
return attention;
|
|
69
|
-
},
|
|
70
|
-
get attended() {
|
|
71
|
-
return attention.current;
|
|
72
|
-
},
|
|
73
|
-
get currentSpace() {
|
|
74
|
-
for (const id of attention.current) {
|
|
75
|
-
const [spaceId, objectId] = id.split(":");
|
|
76
|
-
if (spaceId && objectId && spaceId.length === 33) {
|
|
77
|
-
return spaceId;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
6
|
+
// src/meta.ts
|
|
7
|
+
import { trim } from "@dxos/util";
|
|
8
|
+
var meta = {
|
|
9
|
+
id: "org.dxos.plugin.attention",
|
|
10
|
+
name: "Attention",
|
|
11
|
+
description: trim`
|
|
12
|
+
Track and manage focused attention on objects across your workspace.
|
|
13
|
+
Highlight items requiring action and coordinate team focus on priority work.
|
|
14
|
+
`
|
|
82
15
|
};
|
|
16
|
+
|
|
17
|
+
// src/index.ts
|
|
18
|
+
var AttentionPlugin = Plugin.lazy(meta, () => import("./AttentionPlugin-XWSCV227.mjs"));
|
|
83
19
|
export {
|
|
84
|
-
AttentionCapabilities,
|
|
85
|
-
AttentionEvents,
|
|
86
20
|
AttentionPlugin,
|
|
87
21
|
meta
|
|
88
22
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/index.ts", "../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\
|
|
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/meta.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/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1045},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/AttentionPlugin-XWSCV227.mjs","kind":"dynamic-import"}],"exports":["AttentionPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":135},"src/meta.ts":{"bytesInOutput":286}},"bytes":636},"dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HMHKU4FO.mjs","kind":"import-statement"}],"exports":["AttentionAction","AttentionCapabilities","AttentionEvents"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":304},"dist/lib/node-esm/operations/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":459},"dist/lib/node-esm/operations/index.mjs":{"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/select-QNJSO4Q5.mjs","kind":"dynamic-import"}],"exports":["AttentionOperationHandlerSet"],"entryPoint":"src/operations/index.ts","inputs":{"src/operations/index.ts":{"bytesInOutput":154}},"bytes":352},"dist/lib/node-esm/AttentionPlugin-XWSCV227.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4188},"dist/lib/node-esm/AttentionPlugin-XWSCV227.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":2180},"dist/lib/node-esm/select-QNJSO4Q5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2953},"dist/lib/node-esm/select-QNJSO4Q5.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HMHKU4FO.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":1438},"dist/lib/node-esm/chunk-HMHKU4FO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2396},"dist/lib/node-esm/chunk-HMHKU4FO.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":1489}}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/operations/index.ts
|
|
4
|
+
import { OperationHandlerSet } from "@dxos/compute";
|
|
5
|
+
var AttentionOperationHandlerSet = OperationHandlerSet.lazy(() => import("../select-QNJSO4Q5.mjs"));
|
|
6
|
+
export {
|
|
7
|
+
AttentionOperationHandlerSet
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/operations/index.ts"],
|
|
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
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
AttentionCapabilities
|
|
4
|
+
} from "./chunk-HMHKU4FO.mjs";
|
|
5
|
+
|
|
6
|
+
// src/operations/select.ts
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import * as Match from "effect/Match";
|
|
9
|
+
import { Capability } from "@dxos/app-framework";
|
|
10
|
+
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
11
|
+
import { Operation } from "@dxos/compute";
|
|
12
|
+
var handler = LayoutOperation.Select.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
|
|
13
|
+
const selection = yield* Capability.get(AttentionCapabilities.Selection);
|
|
14
|
+
Match.value(input.subject).pipe(Match.when({
|
|
15
|
+
mode: "single",
|
|
16
|
+
id: void 0
|
|
17
|
+
}, () => {
|
|
18
|
+
selection.clearSelection(input.contextId);
|
|
19
|
+
}), Match.when({
|
|
20
|
+
mode: "single"
|
|
21
|
+
}, (s) => {
|
|
22
|
+
selection.updateSingle(input.contextId, s.id);
|
|
23
|
+
}), Match.when({
|
|
24
|
+
mode: "multi"
|
|
25
|
+
}, (s) => {
|
|
26
|
+
selection.updateMulti(input.contextId, s.ids);
|
|
27
|
+
}), Match.when({
|
|
28
|
+
mode: "range",
|
|
29
|
+
from: void 0,
|
|
30
|
+
to: void 0
|
|
31
|
+
}, () => {
|
|
32
|
+
selection.clearSelection(input.contextId);
|
|
33
|
+
}), Match.when({
|
|
34
|
+
mode: "range"
|
|
35
|
+
}, (s) => {
|
|
36
|
+
selection.updateRange(input.contextId, s.from, s.to);
|
|
37
|
+
}), Match.when({
|
|
38
|
+
mode: "multi-range"
|
|
39
|
+
}, (s) => {
|
|
40
|
+
selection.updateMultiRange(input.contextId, s.ranges);
|
|
41
|
+
}), Match.exhaustive);
|
|
42
|
+
})));
|
|
43
|
+
var select_default = handler;
|
|
44
|
+
export {
|
|
45
|
+
select_default as default
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=select-QNJSO4Q5.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
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
-
AttentionAction
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
AttentionAction,
|
|
4
|
+
AttentionCapabilities,
|
|
5
|
+
AttentionEvents
|
|
6
|
+
} from "../chunk-HMHKU4FO.mjs";
|
|
6
7
|
export {
|
|
7
|
-
AttentionAction
|
|
8
|
+
AttentionAction,
|
|
9
|
+
AttentionCapabilities,
|
|
10
|
+
AttentionEvents
|
|
8
11
|
};
|
|
9
12
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { Plugin } from '@dxos/app-framework';
|
|
2
|
+
export declare const AttentionPlugin: Plugin.PluginFactory<void>;
|
|
3
|
+
export default AttentionPlugin;
|
|
2
4
|
//# sourceMappingURL=AttentionPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttentionPlugin.d.ts","sourceRoot":"","sources":["../../../src/AttentionPlugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AttentionPlugin.d.ts","sourceRoot":"","sources":["../../../src/AttentionPlugin.ts"],"names":[],"mappings":"AAMA,OAAO,EAA+D,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAS1G,eAAO,MAAM,eAAe,4BA2B3B,CAAC;eAuBa,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttentionPlugin.test.d.ts","sourceRoot":"","sources":["../../../src/AttentionPlugin.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
1
|
+
import { Capability } from '@dxos/app-framework';
|
|
2
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
3
|
+
export declare const Keyboard: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<null>>, Error>;
|
|
4
|
+
export declare const OperationHandler: Capability.LazyCapability<OperationHandlerSet.OperationHandlerSet, Capability.ModuleReturn, Error>;
|
|
5
|
+
export declare const ReactContext: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<Readonly<{
|
|
4
6
|
id: string;
|
|
5
7
|
dependsOn?: string[];
|
|
6
8
|
context: import("react").FC<import("react").PropsWithChildren>;
|
|
7
|
-
}
|
|
8
|
-
export * from './capabilities';
|
|
9
|
+
}>>>, Error>;
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,QAAQ,8FAA0D,CAAC;AAChF,eAAO,MAAM,gBAAgB,oGAG5B,CAAC;AACF,eAAO,MAAM,YAAY;;;;YAAmE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<null>>, Error, Capability.Service>;
|
|
3
4
|
export default _default;
|
|
4
5
|
//# sourceMappingURL=keyboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/keyboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/keyboard.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
4
|
+
declare const _default: (props: OperationHandlerSet.OperationHandlerSet) => Effect.Effect<Capability.ModuleReturn, Error, Capability.Service>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=operation-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-handler.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/operation-handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
1
2
|
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
|
|
3
|
+
import { Capability } from '@dxos/app-framework';
|
|
4
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Readonly<{
|
|
3
5
|
id: string;
|
|
4
6
|
dependsOn?: string[];
|
|
5
7
|
context: React.FC<PropsWithChildren>;
|
|
6
|
-
}
|
|
8
|
+
}>>>, never, never>;
|
|
7
9
|
export default _default;
|
|
8
10
|
//# sourceMappingURL=react-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-context.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-context.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"react-context.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-context.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export { AttentionCapabilities } from './capabilities';
|
|
4
|
-
export * from './events';
|
|
1
|
+
import { Plugin } from '@dxos/app-framework';
|
|
2
|
+
export declare const AttentionPlugin: Plugin.PluginFactory<void>;
|
|
5
3
|
export * from './meta';
|
|
6
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,eAAO,MAAM,eAAe,4BAAuD,CAAC;AAEpF,cAAc,QAAQ,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare const meta:
|
|
1
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
2
|
+
export declare const meta: Plugin.Meta;
|
|
3
3
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,IAOzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/operations/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,eAAO,MAAM,4BAA4B,yCAAqD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/operations/select.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI1C,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,MAAM,CA2BjE,CAAC;eAEa,OAAO"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Capability } from '@dxos/app-framework';
|
|
2
|
+
import { type AttentionManager, type SelectionManager } from '@dxos/react-ui-attention';
|
|
3
|
+
export declare namespace AttentionCapabilities {
|
|
4
|
+
const Attention: Capability.InterfaceDef<AttentionManager>;
|
|
5
|
+
const Selection: Capability.InterfaceDef<SelectionManager>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAIxF,yBAAiB,qBAAqB,CAAC,CAAC;IAC/B,MAAM,SAAS,2CAAuE,CAAC;IACvF,MAAM,SAAS,2CAAuE,CAAC;CAC/F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,yBAAiB,eAAe,CAAC,CAAC;IACzB,MAAM,cAAc,iCAA2D,CAAC;CACxF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
2
|
export declare namespace AttentionAction {
|
|
3
|
-
const Select_base: Schema.TaggedClass<Select, `${string}
|
|
4
|
-
readonly _tag: Schema.tag<`${string}
|
|
3
|
+
const Select_base: Schema.TaggedClass<Select, `${string}.select`, {
|
|
4
|
+
readonly _tag: Schema.tag<`${string}.select`>;
|
|
5
5
|
} & {
|
|
6
6
|
input: Schema.Struct<{
|
|
7
7
|
contextId: typeof Schema.String;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,yBAAiB,eAAe,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;IAGhC,MAAM,OAAO,MAAO,SAAQ,WAM1B;KAAG;;CACN"}
|