@dxos/plugin-attention 0.8.4-main.fd6878d → 0.8.4-staging.60fe92afc8
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/AttentionPlugin.mjs +9 -0
- package/dist/lib/neutral/capabilities/index.mjs +11 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-DPUSNLAH.mjs +60 -0
- package/dist/lib/neutral/chunk-DPUSNLAH.mjs.map +7 -0
- package/dist/lib/neutral/chunk-DTGSOFCE.mjs +41 -0
- package/dist/lib/neutral/chunk-DTGSOFCE.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GMJVXKMY.mjs +21 -0
- package/dist/lib/neutral/chunk-GMJVXKMY.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QSTYRKHK.mjs +8 -0
- package/dist/lib/neutral/chunk-QSTYRKHK.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +15 -0
- package/dist/lib/neutral/keyboard-6CPNUR24.mjs +19 -0
- package/dist/lib/neutral/keyboard-6CPNUR24.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +7 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-O5PDEBTC.mjs +11 -0
- package/dist/lib/neutral/operation-handler-O5PDEBTC.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +7 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +15 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/{browser/react-context-IUBFXFFZ.mjs → neutral/react-context-W7BGQDHK.mjs} +9 -12
- package/dist/lib/neutral/react-context-W7BGQDHK.mjs.map +7 -0
- package/dist/lib/neutral/select-CI2OLVWT.mjs +46 -0
- package/dist/lib/neutral/select-CI2OLVWT.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +7 -0
- package/dist/lib/neutral/testing.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +11 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- 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 +1 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- 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/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.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 +58 -31
- package/src/AttentionPlugin.test.ts +32 -0
- package/src/AttentionPlugin.ts +40 -38
- 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 +1 -5
- package/src/meta.ts +12 -6
- package/src/operations/index.ts +7 -0
- package/src/operations/select.ts +43 -0
- package/src/plugin.ts +11 -0
- package/src/testing.ts +7 -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-DF2PBRKK.mjs +0 -12
- package/dist/lib/browser/chunk-DF2PBRKK.mjs.map +0 -7
- package/dist/lib/browser/chunk-LRNGQJHD.mjs +0 -16
- package/dist/lib/browser/chunk-LRNGQJHD.mjs.map +0 -7
- package/dist/lib/browser/chunk-WOQAO42V.mjs +0 -25
- package/dist/lib/browser/chunk-WOQAO42V.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -89
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-E7G6R755.mjs +0 -51
- package/dist/lib/browser/intent-resolver-E7G6R755.mjs.map +0 -7
- package/dist/lib/browser/keyboard-JTQ2RGL7.mjs +0 -28
- package/dist/lib/browser/keyboard-JTQ2RGL7.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-context-IUBFXFFZ.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -8
- package/dist/lib/node-esm/chunk-K3STXVKU.mjs +0 -17
- package/dist/lib/node-esm/chunk-K3STXVKU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MS46IMND.mjs +0 -26
- package/dist/lib/node-esm/chunk-MS46IMND.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YUJM7ABN.mjs +0 -14
- package/dist/lib/node-esm/chunk-YUJM7ABN.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -90
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-ELLJ67CV.mjs +0 -52
- package/dist/lib/node-esm/intent-resolver-ELLJ67CV.mjs.map +0 -7
- package/dist/lib/node-esm/keyboard-S7SW6XBY.mjs +0 -29
- package/dist/lib/node-esm/keyboard-S7SW6XBY.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-context-2RSEVMNC.mjs +0 -30
- package/dist/lib/node-esm/react-context-2RSEVMNC.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -9
- 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
- /package/dist/lib/{browser/types/index.mjs.map → neutral/AttentionPlugin.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/README.md
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
|
|
11
11
|
Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
|
|
12
12
|
|
|
13
|
-
License: [
|
|
13
|
+
License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2024 © DXOS
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/capabilities/index.ts
|
|
2
|
+
import { Capability } from "@dxos/app-framework";
|
|
3
|
+
var Keyboard = Capability.lazy("Keyboard", () => import("../keyboard-6CPNUR24.mjs"));
|
|
4
|
+
var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-O5PDEBTC.mjs"));
|
|
5
|
+
var ReactContext = Capability.lazy("ReactContext", () => import("../react-context-W7BGQDHK.mjs"));
|
|
6
|
+
export {
|
|
7
|
+
Keyboard,
|
|
8
|
+
OperationHandler,
|
|
9
|
+
ReactContext
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/capabilities/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const Keyboard = Capability.lazy('Keyboard', () => import('./keyboard'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\nexport const ReactContext = Capability.lazy('ReactContext', () => import('./react-context'));\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,kBAAkB;AAGpB,IAAMC,WAAWD,WAAWE,KAAK,YAAY,MAAM,OAAO,0BAAA,CAAA;AAC1D,IAAMC,mBAAmBH,WAAWE,KACzC,oBACA,MAAM,OAAO,mCAAA,CAAA;AAER,IAAME,eAAeJ,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
|
+
"names": ["Capability", "Keyboard", "lazy", "OperationHandler", "ReactContext"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
|
|
56
|
+
export {
|
|
57
|
+
AttentionPlugin,
|
|
58
|
+
AttentionPlugin_default
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=chunk-DPUSNLAH.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
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/types/capabilities.ts
|
|
2
|
+
import { Capability } from "@dxos/app-framework";
|
|
3
|
+
import { meta } from "#meta";
|
|
4
|
+
(function(AttentionCapabilities2) {
|
|
5
|
+
AttentionCapabilities2.Attention = Capability.make(`${meta.id}.capability.attention`);
|
|
6
|
+
AttentionCapabilities2.Selection = Capability.make(`${meta.id}.capability.selection`);
|
|
7
|
+
})(AttentionCapabilities || (AttentionCapabilities = {}));
|
|
8
|
+
var AttentionCapabilities;
|
|
9
|
+
|
|
10
|
+
// src/types/events.ts
|
|
11
|
+
import { ActivationEvent } from "@dxos/app-framework";
|
|
12
|
+
import { meta as meta2 } from "#meta";
|
|
13
|
+
(function(AttentionEvents2) {
|
|
14
|
+
AttentionEvents2.AttentionReady = ActivationEvent.make(`${meta2.id}.event.attention-ready`);
|
|
15
|
+
})(AttentionEvents || (AttentionEvents = {}));
|
|
16
|
+
var AttentionEvents;
|
|
17
|
+
|
|
18
|
+
// src/types/types.ts
|
|
19
|
+
import * as Schema from "effect/Schema";
|
|
20
|
+
import { SelectionSchema } from "@dxos/react-ui-attention";
|
|
21
|
+
import { meta as meta3 } from "#meta";
|
|
22
|
+
(function(AttentionAction2) {
|
|
23
|
+
const ATTENTION_ACTION = `${meta3.id}.action`;
|
|
24
|
+
class Select extends Schema.TaggedClass()(`${ATTENTION_ACTION}.select`, {
|
|
25
|
+
input: Schema.Struct({
|
|
26
|
+
contextId: Schema.String,
|
|
27
|
+
selection: SelectionSchema
|
|
28
|
+
}),
|
|
29
|
+
output: Schema.Void
|
|
30
|
+
}) {
|
|
31
|
+
}
|
|
32
|
+
AttentionAction2.Select = Select;
|
|
33
|
+
})(AttentionAction || (AttentionAction = {}));
|
|
34
|
+
var AttentionAction;
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
AttentionCapabilities,
|
|
38
|
+
AttentionEvents,
|
|
39
|
+
AttentionAction
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=chunk-DTGSOFCE.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/types/types.ts"],
|
|
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,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
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
import { DXN } from "@dxos/keys";
|
|
4
|
+
import { trim } from "@dxos/util";
|
|
5
|
+
var meta = Plugin.makeMeta({
|
|
6
|
+
key: DXN.make("org.dxos.plugin.attention"),
|
|
7
|
+
name: "Attention",
|
|
8
|
+
author: "DXOS",
|
|
9
|
+
description: trim`
|
|
10
|
+
Track and manage focused attention on objects across your workspace.
|
|
11
|
+
Highlight items requiring action and coordinate team focus on priority work.
|
|
12
|
+
`,
|
|
13
|
+
tags: [
|
|
14
|
+
"system"
|
|
15
|
+
]
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
meta
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-GMJVXKMY.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.attention'),\n name: 'Attention',\n author: 'DXOS',\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 tags: ['system'],\n});\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,2BAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaP;;;;EAIbQ,MAAM;IAAC;;AACT,CAAA;",
|
|
6
|
+
"names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "description", "tags"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/operations/index.ts
|
|
2
|
+
import { OperationHandlerSet } from "@dxos/compute";
|
|
3
|
+
var AttentionOperationHandlerSet = OperationHandlerSet.lazy(() => import("./select-CI2OLVWT.mjs"));
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
AttentionOperationHandlerSet
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=chunk-QSTYRKHK.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,uBAAA,CAAA;",
|
|
6
|
+
"names": ["OperationHandlerSet", "AttentionOperationHandlerSet", "lazy"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-GMJVXKMY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
AttentionAction,
|
|
6
|
+
AttentionCapabilities,
|
|
7
|
+
AttentionEvents
|
|
8
|
+
} from "./chunk-DTGSOFCE.mjs";
|
|
9
|
+
export {
|
|
10
|
+
AttentionAction,
|
|
11
|
+
AttentionCapabilities,
|
|
12
|
+
AttentionEvents,
|
|
13
|
+
meta
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/capabilities/keyboard.ts
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
4
|
+
import { Keyboard } from "@dxos/keyboard";
|
|
5
|
+
import { AttentionCapabilities } from "#types";
|
|
6
|
+
var keyboard_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
7
|
+
const attention = yield* Capability.get(AttentionCapabilities.Attention);
|
|
8
|
+
const unsubscribe = attention.subscribeCurrent((current) => {
|
|
9
|
+
const id = current[0];
|
|
10
|
+
if (id) {
|
|
11
|
+
Keyboard.singleton.setCurrentContext(id);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => unsubscribe()));
|
|
15
|
+
}));
|
|
16
|
+
export {
|
|
17
|
+
keyboard_default as default
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=keyboard-6CPNUR24.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/keyboard.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Keyboard } from '@dxos/keyboard';\n\nimport { AttentionCapabilities } from '#types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const attention = yield* Capability.get(AttentionCapabilities.Attention);\n\n const unsubscribe = attention.subscribeCurrent((current) => {\n const id = current[0];\n if (id) {\n Keyboard.singleton.setCurrentContext(id);\n }\n });\n\n return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => unsubscribe()));\n }),\n);\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,gBAAgB;AAEzB,SAASC,6BAA6B;AAEtC,IAAA,mBAAeF,WAAWG,WACjBC,kBAAW,aAAA;AAChB,QAAMC,YAAY,OAAOL,WAAWM,IAAIJ,sBAAsBK,SAAS;AAEvE,QAAMC,cAAcH,UAAUI,iBAAiB,CAACC,YAAAA;AAC9C,UAAMC,KAAKD,QAAQ,CAAA;AACnB,QAAIC,IAAI;AACNV,eAASW,UAAUC,kBAAkBF,EAAAA;IACvC;EACF,CAAA;AAEA,SAAOX,WAAWc,YAAYf,aAAagB,MAAM,MAAM,MAAaC,YAAK,MAAMR,YAAAA,CAAAA,CAAAA;AACjF,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capabilities", "Capability", "Keyboard", "AttentionCapabilities", "makeModule", "fnUntraced", "attention", "get", "Attention", "unsubscribe", "subscribeCurrent", "current", "id", "singleton", "setCurrentContext", "contributes", "Null", "sync"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1801,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"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/index.ts":{"bytes":449,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"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/capabilities/keyboard.ts":{"bytes":2713,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/operation-handler.ts":{"bytes":1679,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#operations","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/react-context.tsx":{"bytes":4534,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1593,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/keyboard.ts","kind":"dynamic-import","original":"./keyboard"},{"path":"src/capabilities/operation-handler.ts","kind":"dynamic-import","original":"./operation-handler"},{"path":"src/capabilities/react-context.tsx","kind":"dynamic-import","original":"./react-context"}],"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"},"src/plugin.ts":{"bytes":1095,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/operations/index.ts","kind":"import-statement","original":"./operations"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/testing.ts":{"bytes":673,"imports":[{"path":"src/AttentionPlugin.ts","kind":"import-statement","original":"./AttentionPlugin"}],"format":"esm"}},"outputs":{"dist/lib/neutral/keyboard-6CPNUR24.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1481},"dist/lib/neutral/keyboard-6CPNUR24.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/keyboard.ts","inputs":{"src/capabilities/keyboard.ts":{"bytesInOutput":618}},"bytes":739},"dist/lib/neutral/operation-handler-O5PDEBTC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":935},"dist/lib/neutral/operation-handler-O5PDEBTC.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#operations","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/operation-handler.ts","inputs":{"src/capabilities/operation-handler.ts":{"bytesInOutput":351}},"bytes":499},"dist/lib/neutral/react-context-W7BGQDHK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2297},"dist/lib/neutral/react-context-W7BGQDHK.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-context.tsx","inputs":{"src/capabilities/react-context.tsx":{"bytesInOutput":901}},"bytes":1038},"dist/lib/neutral/select-CI2OLVWT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2952},"dist/lib/neutral/select-CI2OLVWT.mjs":{"imports":[{"path":"dist/lib/neutral/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/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-GMJVXKMY.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-DTGSOFCE.mjs","kind":"import-statement"}],"exports":["AttentionAction","AttentionCapabilities","AttentionEvents","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":266},"dist/lib/neutral/AttentionPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/AttentionPlugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-DPUSNLAH.mjs","kind":"import-statement"}],"exports":["AttentionPlugin","default"],"entryPoint":"src/AttentionPlugin.ts","inputs":{},"bytes":198},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":871},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/keyboard-6CPNUR24.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/operation-handler-O5PDEBTC.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-context-W7BGQDHK.mjs","kind":"dynamic-import"}],"exports":["Keyboard","OperationHandler","ReactContext"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":346}},"bytes":469},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-GMJVXKMY.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":100},"dist/lib/neutral/operations/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/operations/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-QSTYRKHK.mjs","kind":"import-statement"}],"exports":["AttentionOperationHandlerSet"],"entryPoint":"src/operations/index.ts","inputs":{},"bytes":150},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":514},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-GMJVXKMY.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-QSTYRKHK.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["AttentionOperationHandlerSet","AttentionPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":112}},"bytes":346},"dist/lib/neutral/chunk-GMJVXKMY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":884},"dist/lib/neutral/chunk-GMJVXKMY.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":440}},"bytes":519},"dist/lib/neutral/chunk-QSTYRKHK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":454},"dist/lib/neutral/chunk-QSTYRKHK.mjs":{"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"dist/lib/neutral/select-CI2OLVWT.mjs","kind":"dynamic-import"}],"exports":["AttentionOperationHandlerSet"],"inputs":{"src/operations/index.ts":{"bytesInOutput":153}},"bytes":268},"dist/lib/neutral/testing.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/testing.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-DPUSNLAH.mjs","kind":"import-statement"}],"exports":["AttentionPlugin"],"entryPoint":"src/testing.ts","inputs":{"src/testing.ts":{"bytesInOutput":0}},"bytes":125},"dist/lib/neutral/chunk-DPUSNLAH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4186},"dist/lib/neutral/chunk-DPUSNLAH.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","AttentionPlugin_default"],"inputs":{"src/AttentionPlugin.ts":{"bytesInOutput":1939}},"bytes":2067},"dist/lib/neutral/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/types/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-DTGSOFCE.mjs","kind":"import-statement"}],"exports":["AttentionAction","AttentionCapabilities","AttentionEvents"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":212},"dist/lib/neutral/chunk-DTGSOFCE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2394},"dist/lib/neutral/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}}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/capabilities/operation-handler.ts
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
4
|
+
import { AttentionOperationHandlerSet } from "#operations";
|
|
5
|
+
var operation_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
6
|
+
return Capability.contributes(Capabilities.OperationHandler, AttentionOperationHandlerSet);
|
|
7
|
+
}));
|
|
8
|
+
export {
|
|
9
|
+
operation_handler_default as default
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=operation-handler-O5PDEBTC.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/operation-handler.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport type { OperationHandlerSet } from '@dxos/compute';\n\nimport { AttentionOperationHandlerSet } from '#operations';\n\nexport default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Capabilities.OperationHandler, AttentionOperationHandlerSet);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AAGzC,SAASC,oCAAoC;AAE7C,IAAA,4BAAeD,WAAWE,WACjBC,kBAAW,aAAA;AAChB,SAAOH,WAAWI,YAAYL,aAAaM,kBAAkBJ,4BAAAA;AAC/D,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capabilities", "Capability", "AttentionOperationHandlerSet", "makeModule", "fnUntraced", "contributes", "OperationHandler"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-GMJVXKMY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
AttentionOperationHandlerSet
|
|
6
|
+
} from "./chunk-QSTYRKHK.mjs";
|
|
7
|
+
|
|
8
|
+
// src/plugin.ts
|
|
9
|
+
import { Plugin } from "@dxos/app-framework";
|
|
10
|
+
var AttentionPlugin = Plugin.lazy(meta, () => import("#plugin"));
|
|
11
|
+
export {
|
|
12
|
+
AttentionOperationHandlerSet,
|
|
13
|
+
AttentionPlugin
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=plugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/plugin.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('#plugin'));\n\nexport { AttentionOperationHandlerSet } from './operations';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,SAASA,cAAc;AAIhB,IAAMC,kBAAkBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
|
|
6
|
+
"names": ["Plugin", "AttentionPlugin", "Plugin", "lazy", "meta"]
|
|
7
|
+
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AttentionCapabilities
|
|
3
|
-
} from "./chunk-LRNGQJHD.mjs";
|
|
4
|
-
import {
|
|
5
|
-
ATTENTION_PLUGIN
|
|
6
|
-
} from "./chunk-DF2PBRKK.mjs";
|
|
7
|
-
|
|
8
1
|
// src/capabilities/react-context.tsx
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
9
3
|
import React from "react";
|
|
10
|
-
import { Capabilities,
|
|
4
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
5
|
+
import { useCapability } from "@dxos/app-framework/ui";
|
|
11
6
|
import { RootAttentionProvider, SelectionProvider } from "@dxos/react-ui-attention";
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
import { AttentionCapabilities } from "#types";
|
|
9
|
+
var react_context_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactContext, {
|
|
10
|
+
id: meta.id,
|
|
14
11
|
context: (props) => {
|
|
15
12
|
const attention = useCapability(AttentionCapabilities.Attention);
|
|
16
13
|
const selection = useCapability(AttentionCapabilities.Selection);
|
|
@@ -22,8 +19,8 @@ var react_context_default = () => contributes(Capabilities.ReactContext, {
|
|
|
22
19
|
selection
|
|
23
20
|
}, props.children));
|
|
24
21
|
}
|
|
25
|
-
});
|
|
22
|
+
})));
|
|
26
23
|
export {
|
|
27
24
|
react_context_default as default
|
|
28
25
|
};
|
|
29
|
-
//# sourceMappingURL=react-context-
|
|
26
|
+
//# sourceMappingURL=react-context-W7BGQDHK.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-context.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { type PropsWithChildren } from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { RootAttentionProvider, SelectionProvider } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\nimport { AttentionCapabilities } from '#types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactContext, {\n id: meta.id,\n context: (props: PropsWithChildren) => {\n const attention = useCapability(AttentionCapabilities.Attention);\n const selection = useCapability(AttentionCapabilities.Selection);\n\n return (\n <RootAttentionProvider\n attention={attention}\n onChange={(nextAttended) => {\n // TODO(Zan): Workout why this was in deck plugin. It didn't seem to work?\n // if (layout.values.scrollIntoView && nextAttended.has(layout.values.scrollIntoView)) {\n // layout.values.scrollIntoView = undefined;\n // }\n }}\n >\n <SelectionProvider selection={selection}>{props.children}</SelectionProvider>\n </RootAttentionProvider>\n );\n },\n }),\n ),\n);\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAuC;AAE9C,SAASC,cAAcC,kBAAkB;AACzC,SAASC,qBAAqB;AAC9B,SAASC,uBAAuBC,yBAAyB;AAEzD,SAASC,YAAY;AACrB,SAASC,6BAA6B;AAEtC,IAAA,wBAAeL,WAAWM,WAAW,MAC5BC,eACLP,WAAWQ,YAAYT,aAAaU,cAAc;EAChDC,IAAIN,KAAKM;EACTC,SAAS,CAACC,UAAAA;AACR,UAAMC,YAAYZ,cAAcI,sBAAsBS,SAAS;AAC/D,UAAMC,YAAYd,cAAcI,sBAAsBW,SAAS;AAE/D,WACE,sBAAA,cAACd,uBAAAA;MACCW;MACAI,UAAU,CAACC,iBAAAA;MAKX;OAEA,sBAAA,cAACf,mBAAAA;MAAkBY;OAAuBH,MAAMO,QAAQ,CAAA;EAG9D;AACF,CAAA,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "React", "Capabilities", "Capability", "useCapability", "RootAttentionProvider", "SelectionProvider", "meta", "AttentionCapabilities", "makeModule", "succeed", "contributes", "ReactContext", "id", "context", "props", "attention", "Attention", "selection", "Selection", "onChange", "nextAttended", "children"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AttentionCapabilities
|
|
3
|
+
} from "./chunk-DTGSOFCE.mjs";
|
|
4
|
+
|
|
5
|
+
// src/operations/select.ts
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Match from "effect/Match";
|
|
8
|
+
import { Capability } from "@dxos/app-framework";
|
|
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) {
|
|
12
|
+
const selection = yield* Capability.get(AttentionCapabilities.Selection);
|
|
13
|
+
Match.value(input.subject).pipe(Match.when({
|
|
14
|
+
mode: "single",
|
|
15
|
+
id: void 0
|
|
16
|
+
}, () => {
|
|
17
|
+
selection.clearSelection(input.contextId);
|
|
18
|
+
}), Match.when({
|
|
19
|
+
mode: "single"
|
|
20
|
+
}, (s) => {
|
|
21
|
+
selection.updateSingle(input.contextId, s.id);
|
|
22
|
+
}), Match.when({
|
|
23
|
+
mode: "multi"
|
|
24
|
+
}, (s) => {
|
|
25
|
+
selection.updateMulti(input.contextId, s.ids);
|
|
26
|
+
}), Match.when({
|
|
27
|
+
mode: "range",
|
|
28
|
+
from: void 0,
|
|
29
|
+
to: void 0
|
|
30
|
+
}, () => {
|
|
31
|
+
selection.clearSelection(input.contextId);
|
|
32
|
+
}), Match.when({
|
|
33
|
+
mode: "range"
|
|
34
|
+
}, (s) => {
|
|
35
|
+
selection.updateRange(input.contextId, s.from, s.to);
|
|
36
|
+
}), Match.when({
|
|
37
|
+
mode: "multi-range"
|
|
38
|
+
}, (s) => {
|
|
39
|
+
selection.updateMultiRange(input.contextId, s.ranges);
|
|
40
|
+
}), Match.exhaustive);
|
|
41
|
+
})));
|
|
42
|
+
var select_default = handler;
|
|
43
|
+
export {
|
|
44
|
+
select_default as default
|
|
45
|
+
};
|
|
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
|
+
}
|