@dxos/plugin-attention 0.8.4-main.f5c0578 → 0.8.4-main.fcc0d83b33

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.
Files changed (94) hide show
  1. package/dist/lib/browser/chunk-DTGSOFCE.mjs +41 -0
  2. package/dist/lib/browser/chunk-DTGSOFCE.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +48 -68
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/operations/index.mjs +7 -0
  7. package/dist/lib/browser/operations/index.mjs.map +7 -0
  8. package/dist/lib/browser/select-CI2OLVWT.mjs +46 -0
  9. package/dist/lib/browser/select-CI2OLVWT.mjs.map +7 -0
  10. package/dist/lib/browser/types/index.mjs +7 -4
  11. package/dist/lib/node-esm/chunk-HMHKU4FO.mjs +43 -0
  12. package/dist/lib/node-esm/chunk-HMHKU4FO.mjs.map +7 -0
  13. package/dist/lib/node-esm/index.mjs +48 -67
  14. package/dist/lib/node-esm/index.mjs.map +4 -4
  15. package/dist/lib/node-esm/meta.json +1 -1
  16. package/dist/lib/node-esm/operations/index.mjs +9 -0
  17. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  18. package/dist/lib/node-esm/select-QNJSO4Q5.mjs +47 -0
  19. package/dist/lib/node-esm/select-QNJSO4Q5.mjs.map +7 -0
  20. package/dist/lib/node-esm/types/index.mjs +7 -4
  21. package/dist/types/src/AttentionPlugin.d.ts +2 -1
  22. package/dist/types/src/AttentionPlugin.d.ts.map +1 -1
  23. package/dist/types/src/capabilities/index.d.ts +6 -5
  24. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/keyboard.d.ts +3 -2
  26. package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
  27. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  28. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  29. package/dist/types/src/capabilities/react-context.d.ts +4 -2
  30. package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
  31. package/dist/types/src/index.d.ts +2 -5
  32. package/dist/types/src/index.d.ts.map +1 -1
  33. package/dist/types/src/meta.d.ts +2 -3
  34. package/dist/types/src/meta.d.ts.map +1 -1
  35. package/dist/types/src/operations/index.d.ts +3 -0
  36. package/dist/types/src/operations/index.d.ts.map +1 -0
  37. package/dist/types/src/operations/select.d.ts +5 -0
  38. package/dist/types/src/operations/select.d.ts.map +1 -0
  39. package/dist/types/src/types/capabilities.d.ts +7 -0
  40. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  41. package/dist/types/src/types/events.d.ts +5 -0
  42. package/dist/types/src/types/events.d.ts.map +1 -0
  43. package/dist/types/src/types/index.d.ts +2 -0
  44. package/dist/types/src/types/index.d.ts.map +1 -1
  45. package/dist/types/src/types/types.d.ts +3 -3
  46. package/dist/types/src/types/types.d.ts.map +1 -1
  47. package/dist/types/tsconfig.tsbuildinfo +1 -1
  48. package/package.json +32 -23
  49. package/src/AttentionPlugin.ts +38 -38
  50. package/src/capabilities/index.ts +8 -6
  51. package/src/capabilities/keyboard.ts +15 -16
  52. package/src/capabilities/operation-handler.ts +16 -0
  53. package/src/capabilities/react-context.tsx +29 -25
  54. package/src/index.ts +2 -6
  55. package/src/meta.ts +8 -5
  56. package/src/operations/index.ts +7 -0
  57. package/src/operations/select.ts +43 -0
  58. package/src/types/capabilities.ts +13 -0
  59. package/src/types/events.ts +11 -0
  60. package/src/types/index.ts +2 -0
  61. package/src/types/types.ts +4 -4
  62. package/dist/lib/browser/chunk-DF2PBRKK.mjs +0 -12
  63. package/dist/lib/browser/chunk-DF2PBRKK.mjs.map +0 -7
  64. package/dist/lib/browser/chunk-LRNGQJHD.mjs +0 -16
  65. package/dist/lib/browser/chunk-LRNGQJHD.mjs.map +0 -7
  66. package/dist/lib/browser/chunk-WOQAO42V.mjs +0 -25
  67. package/dist/lib/browser/chunk-WOQAO42V.mjs.map +0 -7
  68. package/dist/lib/browser/intent-resolver-E7G6R755.mjs +0 -51
  69. package/dist/lib/browser/intent-resolver-E7G6R755.mjs.map +0 -7
  70. package/dist/lib/browser/keyboard-JTQ2RGL7.mjs +0 -28
  71. package/dist/lib/browser/keyboard-JTQ2RGL7.mjs.map +0 -7
  72. package/dist/lib/browser/react-context-IUBFXFFZ.mjs +0 -29
  73. package/dist/lib/browser/react-context-IUBFXFFZ.mjs.map +0 -7
  74. package/dist/lib/node-esm/chunk-K3STXVKU.mjs +0 -17
  75. package/dist/lib/node-esm/chunk-K3STXVKU.mjs.map +0 -7
  76. package/dist/lib/node-esm/chunk-MS46IMND.mjs +0 -26
  77. package/dist/lib/node-esm/chunk-MS46IMND.mjs.map +0 -7
  78. package/dist/lib/node-esm/chunk-YUJM7ABN.mjs +0 -14
  79. package/dist/lib/node-esm/chunk-YUJM7ABN.mjs.map +0 -7
  80. package/dist/lib/node-esm/intent-resolver-ELLJ67CV.mjs +0 -52
  81. package/dist/lib/node-esm/intent-resolver-ELLJ67CV.mjs.map +0 -7
  82. package/dist/lib/node-esm/keyboard-S7SW6XBY.mjs +0 -29
  83. package/dist/lib/node-esm/keyboard-S7SW6XBY.mjs.map +0 -7
  84. package/dist/lib/node-esm/react-context-2RSEVMNC.mjs +0 -30
  85. package/dist/lib/node-esm/react-context-2RSEVMNC.mjs.map +0 -7
  86. package/dist/types/src/capabilities/capabilities.d.ts +0 -6
  87. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  88. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  89. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  90. package/dist/types/src/events.d.ts +0 -4
  91. package/dist/types/src/events.d.ts.map +0 -1
  92. package/src/capabilities/capabilities.ts +0 -13
  93. package/src/capabilities/intent-resolver.ts +0 -43
  94. package/src/events.ts +0 -11
@@ -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
+ }
@@ -1,65 +1,37 @@
1
- import {
2
- AttentionCapabilities
3
- } from "./chunk-LRNGQJHD.mjs";
4
- import {
5
- ATTENTION_PLUGIN,
6
- meta
7
- } from "./chunk-DF2PBRKK.mjs";
8
-
9
- // src/index.ts
10
- export * from "@dxos/react-ui-attention";
11
-
12
1
  // src/AttentionPlugin.ts
13
- import { Events, allOf, contributes, defineModule, definePlugin } from "@dxos/app-framework";
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";
14
5
  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-E7G6R755.mjs"));
19
- var Keyboard = lazy(() => import("./keyboard-JTQ2RGL7.mjs"));
20
- var ReactContext = lazy(() => import("./react-context-IUBFXFFZ.mjs"));
21
-
22
- // src/events.ts
23
- import { defineEvent } from "@dxos/app-framework";
24
- (function(AttentionEvents2) {
25
- AttentionEvents2.AttentionReady = defineEvent(`${ATTENTION_PLUGIN}/event/attention-ready`);
26
- })(AttentionEvents || (AttentionEvents = {}));
27
- var AttentionEvents;
28
-
29
- // src/AttentionPlugin.ts
30
- var AttentionPlugin = () => definePlugin(meta, [
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
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
+ ];
61
27
  })
62
- ]);
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);
63
35
  var setupDevtools = (attention) => {
64
36
  globalThis.composer ??= {};
65
37
  globalThis.composer.attention = {
@@ -67,23 +39,31 @@ var setupDevtools = (attention) => {
67
39
  return attention;
68
40
  },
69
41
  get attended() {
70
- return attention.current;
42
+ return attention.getCurrent();
71
43
  },
72
44
  get currentSpace() {
73
- for (const id of attention.current) {
74
- const [spaceId, objectId] = id.split(":");
75
- if (spaceId && objectId && spaceId.length === 33) {
76
- return spaceId;
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];
77
49
  }
78
50
  }
79
51
  }
80
52
  };
81
53
  };
54
+
55
+ // src/meta.ts
56
+ import { trim } from "@dxos/util";
57
+ var meta2 = {
58
+ id: "org.dxos.plugin.attention",
59
+ name: "Attention",
60
+ description: trim`
61
+ Track and manage focused attention on objects across your workspace.
62
+ Highlight items requiring action and coordinate team focus on priority work.
63
+ `
64
+ };
82
65
  export {
83
- ATTENTION_PLUGIN,
84
- AttentionCapabilities,
85
- AttentionEvents,
86
66
  AttentionPlugin,
87
- meta
67
+ meta2 as meta
88
68
  };
89
69
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/index.ts", "../../../src/AttentionPlugin.ts", "../../../src/capabilities/index.ts", "../../../src/events.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport * from '@dxos/react-ui-attention';\n\nexport * from './AttentionPlugin';\nexport { AttentionCapabilities } from './capabilities';\nexport * from './events';\nexport * from './meta';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Events, allOf, contributes, defineModule, definePlugin } from '@dxos/app-framework';\nimport { AttentionManager, SelectionManager } from '@dxos/react-ui-attention';\n\nimport { AttentionCapabilities, IntentResolver, Keyboard, ReactContext } from './capabilities';\nimport { AttentionEvents } from './events';\nimport { meta } from './meta';\n\nexport const AttentionPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/attention`,\n activatesOn: Events.Startup,\n activatesAfter: [AttentionEvents.AttentionReady],\n activate: () => {\n const attention = new AttentionManager();\n const selection = new SelectionManager();\n setupDevtools(attention);\n return [\n contributes(AttentionCapabilities.Attention, attention),\n contributes(AttentionCapabilities.Selection, selection),\n ];\n },\n }),\n defineModule({\n id: `${meta.id}/module/react-context`,\n activatesOn: Events.Startup,\n activate: ReactContext,\n }),\n defineModule({\n id: `${meta.id}/module/keyboard`,\n activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),\n activate: Keyboard,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\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.current;\n },\n get currentSpace() {\n for (const id of attention.current) {\n const [spaceId, objectId] = id.split(':');\n if (spaceId && objectId && spaceId.length === 33) {\n return spaceId;\n }\n }\n },\n };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const Keyboard = lazy(() => import('./keyboard'));\nexport const ReactContext = lazy(() => import('./react-context'));\n\nexport * from './capabilities';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineEvent } from '@dxos/app-framework';\n\nimport { ATTENTION_PLUGIN } from './meta';\n\nexport namespace AttentionEvents {\n export const AttentionReady = defineEvent(`${ATTENTION_PLUGIN}/event/attention-ready`);\n}\n"],
5
- "mappings": ";;;;;;;;;AAIA,cAAc;;;ACAd,SAASA,QAAQC,OAAOC,aAAaC,cAAcC,oBAAoB;AACvE,SAASC,kBAAkBC,wBAAwB;;;ACDnD,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,WAAWD,KAAK,MAAM,OAAO,yBAAA,CAAA;AACnC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACJ9C,SAASG,mBAAmB;UAIXC,kBAAAA;mBACFC,iBAAiBC,YAAY,GAAGC,gBAAAA,wBAAwC;AACvF,GAFiBH,oBAAAA,kBAAAA,CAAAA,EAAAA;;;;AFGV,IAAMI,kBAAkB,MAC7BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,gBAAgB;MAACC,gBAAgBC;;IACjCC,UAAU,MAAA;AACR,YAAMC,YAAY,IAAIC,iBAAAA;AACtB,YAAMC,YAAY,IAAIC,iBAAAA;AACtBC,oBAAcJ,SAAAA;AACd,aAAO;QACLK,YAAYC,sBAAsBC,WAAWP,SAAAA;QAC7CK,YAAYC,sBAAsBE,WAAWN,SAAAA;;IAEjD;EACF,CAAA;EACAX,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBI,UAAUU;EACZ,CAAA;EACAlB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaiB,MAAMhB,OAAOiB,eAAed,gBAAgBC,cAAc;IACvEC,UAAUa;EACZ,CAAA;EACArB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOmB;IACpBd,UAAUe;EACZ,CAAA;CACD;AAEH,IAAMV,gBAAgB,CAACJ,cAAAA;AACpBe,aAAmBC,aAAa,CAAC;AAEjCD,aAAmBC,SAAShB,YAAY;IACvC,IAAIiB,UAAU;AACZ,aAAOjB;IACT;IACA,IAAIkB,WAAW;AACb,aAAOlB,UAAUmB;IACnB;IACA,IAAIC,eAAe;AACjB,iBAAW5B,MAAMQ,UAAUmB,SAAS;AAClC,cAAM,CAACE,SAASC,QAAAA,IAAY9B,GAAG+B,MAAM,GAAA;AACrC,YAAIF,WAAWC,YAAYD,QAAQG,WAAW,IAAI;AAChD,iBAAOH;QACT;MACF;IACF;EACF;AACF;",
6
- "names": ["Events", "allOf", "contributes", "defineModule", "definePlugin", "AttentionManager", "SelectionManager", "lazy", "IntentResolver", "lazy", "Keyboard", "ReactContext", "defineEvent", "AttentionEvents", "AttentionReady", "defineEvent", "ATTENTION_PLUGIN", "AttentionPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "Startup", "activatesAfter", "AttentionEvents", "AttentionReady", "activate", "attention", "AttentionManager", "selection", "SelectionManager", "setupDevtools", "contributes", "AttentionCapabilities", "Attention", "Selection", "ReactContext", "allOf", "AppGraphReady", "Keyboard", "SetupIntentResolver", "IntentResolver", "globalThis", "composer", "manager", "attended", "current", "currentSpace", "spaceId", "objectId", "split", "length"]
3
+ "sources": ["../../../src/AttentionPlugin.ts", "../../../src/meta.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", "//\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,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;;;AC1DA,SAASG,YAAY;AAEd,IAAMC,QAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;AAIf;",
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", "trim", "meta", "id", "name", "description"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":949,"imports":[],"format":"esm"},"src/capabilities/capabilities.ts":{"bytes":1792,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/types/types.ts":{"bytes":2264,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/types/index.ts":{"bytes":459,"imports":[{"path":"src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/capabilities/intent-resolver.ts":{"bytes":5997,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"}],"format":"esm"},"src/capabilities/keyboard.ts":{"bytes":3527,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"}],"format":"esm"},"src/capabilities/react-context.tsx":{"bytes":4182,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1355,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"src/capabilities/keyboard.ts","kind":"dynamic-import","original":"./keyboard"},{"path":"src/capabilities/react-context.tsx","kind":"dynamic-import","original":"./react-context"}],"format":"esm"},"src/events.ts":{"bytes":1238,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/AttentionPlugin.ts":{"bytes":7393,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/events.ts","kind":"import-statement","original":"./events"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/index.ts":{"bytes":971,"imports":[{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"src/AttentionPlugin.ts","kind":"import-statement","original":"./AttentionPlugin"},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/events.ts","kind":"import-statement","original":"./events"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5062},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-LRNGQJHD.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DF2PBRKK.mjs","kind":"import-statement"},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/intent-resolver-E7G6R755.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/keyboard-JTQ2RGL7.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/react-context-IUBFXFFZ.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["ATTENTION_PLUGIN","AttentionCapabilities","AttentionEvents","AttentionPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":42},"src/AttentionPlugin.ts":{"bytesInOutput":1577},"src/capabilities/index.ts":{"bytesInOutput":252},"src/events.ts":{"bytesInOutput":243}},"bytes":2501},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-WOQAO42V.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DF2PBRKK.mjs","kind":"import-statement"}],"exports":["AttentionAction"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":156},"dist/lib/browser/intent-resolver-E7G6R755.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3070},"dist/lib/browser/intent-resolver-E7G6R755.mjs":{"imports":[{"path":"dist/lib/browser/chunk-WOQAO42V.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-LRNGQJHD.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DF2PBRKK.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/intent-resolver.ts","inputs":{"src/capabilities/intent-resolver.ts":{"bytesInOutput":1210}},"bytes":1506},"dist/lib/browser/chunk-WOQAO42V.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1146},"dist/lib/browser/chunk-WOQAO42V.mjs":{"imports":[{"path":"dist/lib/browser/chunk-DF2PBRKK.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true}],"exports":["AttentionAction"],"inputs":{"src/types/types.ts":{"bytesInOutput":495},"src/types/index.ts":{"bytesInOutput":0}},"bytes":652},"dist/lib/browser/keyboard-JTQ2RGL7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1910},"dist/lib/browser/keyboard-JTQ2RGL7.mjs":{"imports":[{"path":"dist/lib/browser/chunk-LRNGQJHD.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DF2PBRKK.mjs","kind":"import-statement"},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/keyboard.ts","inputs":{"src/capabilities/keyboard.ts":{"bytesInOutput":725}},"bytes":942},"dist/lib/browser/react-context-IUBFXFFZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2102},"dist/lib/browser/react-context-IUBFXFFZ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-LRNGQJHD.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-DF2PBRKK.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-context.tsx","inputs":{"src/capabilities/react-context.tsx":{"bytesInOutput":701}},"bytes":962},"dist/lib/browser/chunk-LRNGQJHD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":900},"dist/lib/browser/chunk-LRNGQJHD.mjs":{"imports":[{"path":"dist/lib/browser/chunk-DF2PBRKK.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["AttentionCapabilities"],"inputs":{"src/capabilities/capabilities.ts":{"bytesInOutput":376}},"bytes":553},"dist/lib/browser/chunk-DF2PBRKK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":469},"dist/lib/browser/chunk-DF2PBRKK.mjs":{"imports":[],"exports":["ATTENTION_PLUGIN","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":112}},"bytes":211}}}
1
+ {"inputs":{"src/AttentionPlugin.ts":{"bytes":7878,"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/meta.ts":{"bytes":1293,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":592,"imports":[{"path":"src/AttentionPlugin.ts","kind":"import-statement","original":"./AttentionPlugin"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"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":4695},"dist/lib/browser/index.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},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["AttentionPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/AttentionPlugin.ts":{"bytesInOutput":1892},"src/index.ts":{"bytesInOutput":0},"src/meta.ts":{"bytesInOutput":287}},"bytes":2303},"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/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}}}
@@ -0,0 +1,7 @@
1
+ // src/operations/index.ts
2
+ import { OperationHandlerSet } from "@dxos/compute";
3
+ var AttentionOperationHandlerSet = OperationHandlerSet.lazy(() => import("../select-CI2OLVWT.mjs"));
4
+ export {
5
+ AttentionOperationHandlerSet
6
+ };
7
+ //# 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,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
+ }
@@ -1,8 +1,11 @@
1
1
  import {
2
- AttentionAction
3
- } from "../chunk-WOQAO42V.mjs";
4
- import "../chunk-DF2PBRKK.mjs";
2
+ AttentionAction,
3
+ AttentionCapabilities,
4
+ AttentionEvents
5
+ } from "../chunk-DTGSOFCE.mjs";
5
6
  export {
6
- AttentionAction
7
+ AttentionAction,
8
+ AttentionCapabilities,
9
+ AttentionEvents
7
10
  };
8
11
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,43 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // src/types/capabilities.ts
4
+ import { Capability } from "@dxos/app-framework";
5
+ import { meta } from "#meta";
6
+ (function(AttentionCapabilities2) {
7
+ AttentionCapabilities2.Attention = Capability.make(`${meta.id}.capability.attention`);
8
+ AttentionCapabilities2.Selection = Capability.make(`${meta.id}.capability.selection`);
9
+ })(AttentionCapabilities || (AttentionCapabilities = {}));
10
+ var AttentionCapabilities;
11
+
12
+ // src/types/events.ts
13
+ import { ActivationEvent } from "@dxos/app-framework";
14
+ import { meta as meta2 } from "#meta";
15
+ (function(AttentionEvents2) {
16
+ AttentionEvents2.AttentionReady = ActivationEvent.make(`${meta2.id}.event.attention-ready`);
17
+ })(AttentionEvents || (AttentionEvents = {}));
18
+ var AttentionEvents;
19
+
20
+ // src/types/types.ts
21
+ import * as Schema from "effect/Schema";
22
+ import { SelectionSchema } from "@dxos/react-ui-attention";
23
+ import { meta as meta3 } from "#meta";
24
+ (function(AttentionAction2) {
25
+ const ATTENTION_ACTION = `${meta3.id}.action`;
26
+ class Select extends Schema.TaggedClass()(`${ATTENTION_ACTION}.select`, {
27
+ input: Schema.Struct({
28
+ contextId: Schema.String,
29
+ selection: SelectionSchema
30
+ }),
31
+ output: Schema.Void
32
+ }) {
33
+ }
34
+ AttentionAction2.Select = Select;
35
+ })(AttentionAction || (AttentionAction = {}));
36
+ var AttentionAction;
37
+
38
+ export {
39
+ AttentionCapabilities,
40
+ AttentionEvents,
41
+ AttentionAction
42
+ };
43
+ //# sourceMappingURL=chunk-HMHKU4FO.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
+ }
@@ -1,66 +1,39 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- AttentionCapabilities
4
- } from "./chunk-K3STXVKU.mjs";
5
- import {
6
- ATTENTION_PLUGIN,
7
- meta
8
- } from "./chunk-YUJM7ABN.mjs";
9
-
10
- // src/index.ts
11
- export * from "@dxos/react-ui-attention";
12
2
 
13
3
  // src/AttentionPlugin.ts
14
- import { Events, allOf, contributes, defineModule, definePlugin } from "@dxos/app-framework";
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";
15
7
  import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
16
-
17
- // src/capabilities/index.ts
18
- import { lazy } from "@dxos/app-framework";
19
- var IntentResolver = lazy(() => import("./intent-resolver-ELLJ67CV.mjs"));
20
- var Keyboard = lazy(() => import("./keyboard-S7SW6XBY.mjs"));
21
- var ReactContext = lazy(() => import("./react-context-2RSEVMNC.mjs"));
22
-
23
- // src/events.ts
24
- import { defineEvent } from "@dxos/app-framework";
25
- (function(AttentionEvents2) {
26
- AttentionEvents2.AttentionReady = defineEvent(`${ATTENTION_PLUGIN}/event/attention-ready`);
27
- })(AttentionEvents || (AttentionEvents = {}));
28
- var AttentionEvents;
29
-
30
- // src/AttentionPlugin.ts
31
- var AttentionPlugin = () => definePlugin(meta, [
32
- defineModule({
33
- id: `${meta.id}/module/attention`,
34
- activatesOn: Events.Startup,
35
- activatesAfter: [
36
- AttentionEvents.AttentionReady
37
- ],
38
- activate: () => {
39
- const attention = new AttentionManager();
40
- const selection = new SelectionManager();
41
- setupDevtools(attention);
42
- return [
43
- contributes(AttentionCapabilities.Attention, attention),
44
- contributes(AttentionCapabilities.Selection, selection)
45
- ];
46
- }
47
- }),
48
- defineModule({
49
- id: `${meta.id}/module/react-context`,
50
- activatesOn: Events.Startup,
51
- activate: ReactContext
52
- }),
53
- defineModule({
54
- id: `${meta.id}/module/keyboard`,
55
- activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),
56
- activate: Keyboard
57
- }),
58
- defineModule({
59
- id: `${meta.id}/module/intent-resolver`,
60
- activatesOn: Events.SetupIntentResolver,
61
- activate: IntentResolver
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
+ ];
62
29
  })
63
- ]);
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);
64
37
  var setupDevtools = (attention) => {
65
38
  globalThis.composer ??= {};
66
39
  globalThis.composer.attention = {
@@ -68,23 +41,31 @@ var setupDevtools = (attention) => {
68
41
  return attention;
69
42
  },
70
43
  get attended() {
71
- return attention.current;
44
+ return attention.getCurrent();
72
45
  },
73
46
  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;
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];
78
51
  }
79
52
  }
80
53
  }
81
54
  };
82
55
  };
56
+
57
+ // src/meta.ts
58
+ import { trim } from "@dxos/util";
59
+ var meta2 = {
60
+ id: "org.dxos.plugin.attention",
61
+ name: "Attention",
62
+ description: trim`
63
+ Track and manage focused attention on objects across your workspace.
64
+ Highlight items requiring action and coordinate team focus on priority work.
65
+ `
66
+ };
83
67
  export {
84
- ATTENTION_PLUGIN,
85
- AttentionCapabilities,
86
- AttentionEvents,
87
68
  AttentionPlugin,
88
- meta
69
+ meta2 as meta
89
70
  };
90
71
  //# sourceMappingURL=index.mjs.map