@dxos/plugin-attention 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5

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 (92) hide show
  1. package/dist/lib/browser/chunk-55HTXC2G.mjs +39 -0
  2. package/dist/lib/browser/chunk-55HTXC2G.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-BDLH2DQU.mjs +41 -0
  4. package/dist/lib/browser/chunk-BDLH2DQU.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  6. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +49 -59
  8. package/dist/lib/browser/index.mjs.map +4 -4
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/operations/index.mjs +13 -0
  11. package/dist/lib/browser/operations/index.mjs.map +7 -0
  12. package/dist/lib/browser/select-HQCLOXD6.mjs +49 -0
  13. package/dist/lib/browser/select-HQCLOXD6.mjs.map +7 -0
  14. package/dist/lib/browser/types/index.mjs +12 -0
  15. package/dist/lib/browser/types/index.mjs.map +7 -0
  16. package/dist/lib/node-esm/chunk-GWUE2YCZ.mjs +43 -0
  17. package/dist/lib/node-esm/chunk-GWUE2YCZ.mjs.map +7 -0
  18. package/dist/lib/node-esm/chunk-HQWPPQXC.mjs +40 -0
  19. package/dist/lib/node-esm/chunk-HQWPPQXC.mjs.map +7 -0
  20. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  21. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  22. package/dist/lib/node-esm/index.mjs +49 -59
  23. package/dist/lib/node-esm/index.mjs.map +4 -4
  24. package/dist/lib/node-esm/meta.json +1 -1
  25. package/dist/lib/node-esm/operations/index.mjs +14 -0
  26. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  27. package/dist/lib/node-esm/select-GLRAU6S2.mjs +50 -0
  28. package/dist/lib/node-esm/select-GLRAU6S2.mjs.map +7 -0
  29. package/dist/lib/node-esm/types/index.mjs +13 -0
  30. package/dist/lib/node-esm/types/index.mjs.map +7 -0
  31. package/dist/types/src/AttentionPlugin.d.ts +2 -1
  32. package/dist/types/src/AttentionPlugin.d.ts.map +1 -1
  33. package/dist/types/src/capabilities/index.d.ts +6 -4
  34. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  35. package/dist/types/src/capabilities/keyboard.d.ts +3 -2
  36. package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
  37. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  38. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  39. package/dist/types/src/capabilities/react-context.d.ts +4 -2
  40. package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
  41. package/dist/types/src/index.d.ts +2 -5
  42. package/dist/types/src/index.d.ts.map +1 -1
  43. package/dist/types/src/meta.d.ts +2 -3
  44. package/dist/types/src/meta.d.ts.map +1 -1
  45. package/dist/types/src/operations/definitions.d.ts +23 -0
  46. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  47. package/dist/types/src/operations/index.d.ts +4 -0
  48. package/dist/types/src/operations/index.d.ts.map +1 -0
  49. package/dist/types/src/operations/select.d.ts +5 -0
  50. package/dist/types/src/operations/select.d.ts.map +1 -0
  51. package/dist/types/src/types/capabilities.d.ts +7 -0
  52. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  53. package/dist/types/src/types/events.d.ts +5 -0
  54. package/dist/types/src/types/events.d.ts.map +1 -0
  55. package/dist/types/src/types/index.d.ts +4 -0
  56. package/dist/types/src/types/index.d.ts.map +1 -0
  57. package/dist/types/src/types/types.d.ts +32 -0
  58. package/dist/types/src/types/types.d.ts.map +1 -0
  59. package/dist/types/tsconfig.tsbuildinfo +1 -1
  60. package/package.json +47 -17
  61. package/src/AttentionPlugin.ts +38 -33
  62. package/src/capabilities/index.ts +8 -5
  63. package/src/capabilities/keyboard.ts +15 -16
  64. package/src/capabilities/operation-handler.ts +16 -0
  65. package/src/capabilities/react-context.tsx +29 -24
  66. package/src/index.ts +2 -6
  67. package/src/meta.ts +8 -5
  68. package/src/operations/definitions.ts +25 -0
  69. package/src/operations/index.ts +9 -0
  70. package/src/operations/select.ts +43 -0
  71. package/src/types/capabilities.ts +13 -0
  72. package/src/types/events.ts +11 -0
  73. package/src/types/index.ts +7 -0
  74. package/src/types/types.ts +21 -0
  75. package/dist/lib/browser/chunk-O6FNOKYX.mjs +0 -21
  76. package/dist/lib/browser/chunk-O6FNOKYX.mjs.map +0 -7
  77. package/dist/lib/browser/keyboard-IYF35Z4E.mjs +0 -27
  78. package/dist/lib/browser/keyboard-IYF35Z4E.mjs.map +0 -7
  79. package/dist/lib/browser/react-context-JVGQB2CO.mjs +0 -27
  80. package/dist/lib/browser/react-context-JVGQB2CO.mjs.map +0 -7
  81. package/dist/lib/node-esm/chunk-SVV7GQYN.mjs +0 -23
  82. package/dist/lib/node-esm/chunk-SVV7GQYN.mjs.map +0 -7
  83. package/dist/lib/node-esm/keyboard-GSUNGWNE.mjs +0 -28
  84. package/dist/lib/node-esm/keyboard-GSUNGWNE.mjs.map +0 -7
  85. package/dist/lib/node-esm/react-context-SVXVOSRH.mjs +0 -28
  86. package/dist/lib/node-esm/react-context-SVXVOSRH.mjs.map +0 -7
  87. package/dist/types/src/capabilities/capabilities.d.ts +0 -6
  88. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  89. package/dist/types/src/events.d.ts +0 -4
  90. package/dist/types/src/events.d.ts.map +0 -1
  91. package/src/capabilities/capabilities.ts +0 -13
  92. package/src/events.ts +0 -11
@@ -0,0 +1,39 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-J5LGTIGS.mjs";
4
+
5
+ // src/operations/definitions.ts
6
+ var definitions_exports = {};
7
+ __export(definitions_exports, {
8
+ Select: () => Select
9
+ });
10
+ import * as Schema from "effect/Schema";
11
+ import { Capability } from "@dxos/app-framework";
12
+ import { Operation } from "@dxos/operation";
13
+ import { SelectionSchema } from "@dxos/react-ui-attention";
14
+ import { meta } from "#meta";
15
+ var Select = Operation.make({
16
+ meta: {
17
+ key: `${meta.id}.operation.select`,
18
+ name: "Select",
19
+ description: "Select items in an attention context."
20
+ },
21
+ services: [
22
+ Capability.Service
23
+ ],
24
+ input: Schema.Struct({
25
+ contextId: Schema.String.annotations({
26
+ description: "The id of the attention context."
27
+ }),
28
+ selection: SelectionSchema.annotations({
29
+ description: "The selection to apply."
30
+ })
31
+ }),
32
+ output: Schema.Void
33
+ });
34
+
35
+ export {
36
+ Select,
37
+ definitions_exports
38
+ };
39
+ //# sourceMappingURL=chunk-55HTXC2G.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/definitions.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/operation';\nimport { SelectionSchema } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\n\nexport const Select = Operation.make({\n meta: {\n key: `${meta.id}.operation.select`,\n name: 'Select',\n description: 'Select items in an attention context.',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n contextId: Schema.String.annotations({ description: 'The id of the attention context.' }),\n selection: SelectionSchema.annotations({ description: 'The selection to apply.' }),\n }),\n output: Schema.Void,\n});\n"],
5
+ "mappings": ";;;;;AAAA;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,uBAAuB;AAEhC,SAASC,YAAY;AAEd,IAAMC,SAASC,UAAUC,KAAK;EACnCC,MAAM;IACJC,KAAK,GAAGD,KAAKE,EAAE;IACfC,MAAM;IACNC,aAAa;EACf;EACAC,UAAU;IAACC,WAAWC;;EACtBC,OAAcC,cAAO;IACnBC,WAAkBC,cAAOC,YAAY;MAAER,aAAa;IAAmC,CAAA;IACvFS,WAAWC,gBAAgBF,YAAY;MAAER,aAAa;IAA0B,CAAA;EAClF,CAAA;EACAW,QAAeC;AACjB,CAAA;",
6
+ "names": ["Schema", "Capability", "Operation", "SelectionSchema", "meta", "Select", "Operation", "make", "meta", "key", "id", "name", "description", "services", "Capability", "Service", "input", "Struct", "contextId", "String", "annotations", "selection", "SelectionSchema", "output", "Void"]
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-BDLH2DQU.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,YAAYC,WAAWC,KAAuB,GAAGC,KAAKC,EAAE,uBAAuB;yBAC/EC,YAAYJ,WAAWC,KAAuB,GAAGC,KAAKC,EAAE,uBAAuB;AAC9F,GAHiBL,0BAAAA,wBAAAA,CAAAA,EAAAA;;;;ACLjB,SAASO,uBAAuB;AAEhC,SAASC,QAAAA,aAAY;UAEJC,kBAAAA;mBACFC,iBAAiBC,gBAAgBC,KAAK,GAAGC,MAAKC,EAAE,wBAAwB;AACvF,GAFiBL,oBAAAA,kBAAAA,CAAAA,EAAAA;;;;ACJjB,YAAYM,YAAY;AAExB,SAASC,uBAAuB;AAEhC,SAASC,QAAAA,aAAY;UAEJC,kBAAAA;AACf,QAAMC,mBAAmB,GAAGC,MAAKC,EAAE;EAE5B,MAAMC,eAAsBC,mBAAW,EAAW,GAAGJ,gBAAAA,WAA2B;IACrFK,OAAcC,cAAO;MACnBC,WAAkBC;MAClBC,WAAWC;IACb,CAAA;IACAC,QAAeC;EACjB,CAAA,EAAA;EAAI;mBANST,SAAAA;AAOf,GAViBJ,oBAAAA,kBAAAA,CAAAA,EAAAA;;",
6
+ "names": ["Capability", "meta", "AttentionCapabilities", "Attention", "Capability", "make", "meta", "id", "Selection", "ActivationEvent", "meta", "AttentionEvents", "AttentionReady", "ActivationEvent", "make", "meta", "id", "Schema", "SelectionSchema", "meta", "AttentionAction", "ATTENTION_ACTION", "meta", "id", "Select", "TaggedClass", "input", "Struct", "contextId", "String", "selection", "SelectionSchema", "output", "Void"]
7
+ }
@@ -0,0 +1,10 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export {
8
+ __export
9
+ };
10
+ //# sourceMappingURL=chunk-J5LGTIGS.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,57 +1,39 @@
1
- import {
2
- ATTENTION_PLUGIN,
3
- AttentionCapabilities,
4
- meta
5
- } from "./chunk-O6FNOKYX.mjs";
6
-
7
- // src/index.ts
8
- export * from "@dxos/react-ui-attention";
1
+ import "./chunk-J5LGTIGS.mjs";
9
2
 
10
3
  // src/AttentionPlugin.ts
11
- import { defineModule, definePlugin, Events, contributes, allOf } 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";
12
7
  import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
13
-
14
- // src/capabilities/index.ts
15
- import { lazy } from "@dxos/app-framework";
16
- var Keyboard = lazy(() => import("./keyboard-IYF35Z4E.mjs"));
17
- var ReactContext = lazy(() => import("./react-context-JVGQB2CO.mjs"));
18
-
19
- // src/events.ts
20
- import { defineEvent } from "@dxos/app-framework";
21
- (function(AttentionEvents2) {
22
- AttentionEvents2.AttentionReady = defineEvent(`${ATTENTION_PLUGIN}/event/attention-ready`);
23
- })(AttentionEvents || (AttentionEvents = {}));
24
- var AttentionEvents;
25
-
26
- // src/AttentionPlugin.ts
27
- var AttentionPlugin = () => definePlugin(meta, [
28
- defineModule({
29
- id: `${meta.id}/module/attention`,
30
- activatesOn: Events.Startup,
31
- activatesAfter: [
32
- AttentionEvents.AttentionReady
33
- ],
34
- activate: () => {
35
- const attention = new AttentionManager();
36
- const selection = new SelectionManager();
37
- setupDevtools(attention);
38
- return [
39
- contributes(AttentionCapabilities.Attention, attention),
40
- contributes(AttentionCapabilities.Selection, selection)
41
- ];
42
- }
43
- }),
44
- defineModule({
45
- id: `${meta.id}/module/react-context`,
46
- activatesOn: Events.Startup,
47
- activate: ReactContext
48
- }),
49
- defineModule({
50
- id: `${meta.id}/module/keyboard`,
51
- activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),
52
- activate: Keyboard
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
+ ];
53
29
  })
54
- ]);
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);
55
37
  var setupDevtools = (attention) => {
56
38
  globalThis.composer ??= {};
57
39
  globalThis.composer.attention = {
@@ -59,23 +41,31 @@ var setupDevtools = (attention) => {
59
41
  return attention;
60
42
  },
61
43
  get attended() {
62
- return attention.current;
44
+ return attention.getCurrent();
63
45
  },
64
46
  get currentSpace() {
65
- for (const id of attention.current) {
66
- const [spaceId, objectId] = id.split(":");
67
- if (spaceId && objectId && spaceId.length === 33) {
68
- 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];
69
51
  }
70
52
  }
71
53
  }
72
54
  };
73
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
+ };
74
67
  export {
75
- ATTENTION_PLUGIN,
76
- AttentionCapabilities,
77
- AttentionEvents,
78
68
  AttentionPlugin,
79
- meta
69
+ meta2 as meta
80
70
  };
81
71
  //# 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 { defineModule, definePlugin, Events, contributes, allOf } from '@dxos/app-framework';\nimport { AttentionManager, SelectionManager } from '@dxos/react-ui-attention';\n\nimport { AttentionCapabilities, 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 ]);\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 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,cAAcC,cAAcC,QAAQC,aAAaC,aAAa;AACvE,SAASC,kBAAkBC,wBAAwB;;;ACDnD,SAASC,YAAY;AAEd,IAAMC,WAAWC,KAAK,MAAM,OAAO,yBAAA,CAAA;AACnC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACH9C,SAASE,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;CACD;AAEH,IAAMR,gBAAgB,CAACJ,cAAAA;AACpBa,aAAmBC,aAAa,CAAC;AAEjCD,aAAmBC,SAASd,YAAY;IACvC,IAAIe,UAAU;AACZ,aAAOf;IACT;IACA,IAAIgB,WAAW;AACb,aAAOhB,UAAUiB;IACnB;IACA,IAAIC,eAAe;AACjB,iBAAW1B,MAAMQ,UAAUiB,SAAS;AAClC,cAAM,CAACE,SAASC,QAAAA,IAAY5B,GAAG6B,MAAM,GAAA;AACrC,YAAIF,WAAWC,YAAYD,QAAQG,WAAW,IAAI;AAChD,iBAAOH;QACT;MACF;IACF;EACF;AACF;",
6
- "names": ["defineModule", "definePlugin", "Events", "contributes", "allOf", "AttentionManager", "SelectionManager", "lazy", "Keyboard", "lazy", "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", "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,kBAAkBC,OAAOC,OAAOC,IAAAA,EAAMC,KACjDC,UAAUC,0BAA0B;EAAEC,UAAUC;AAAiB,CAAA,GACjEP,OAAOQ,UAAU;EACfC,IAAI;EACJC,aAAaC,iBAAiBC;EAC9BC,sBAAsB;IAACC,gBAAgBC;;EACvCT,UAAU,MACDU,WAAI,aAAA;AACT,UAAMC,WAAW,OAAOC,WAAWC,IAAIC,aAAaC,YAAY;AAChE,UAAMC,YAAY,IAAIC,iBAAiBN,QAAAA;AACvC,UAAMO,YAAY,IAAIC,iBAAiBR,QAAAA;AACvCS,kBAAcJ,SAAAA;AACd,WAAO;MACLJ,WAAWS,YAAYC,sBAAsBC,WAAWP,SAAAA;MACxDJ,WAAWS,YAAYC,sBAAsBE,WAAWN,SAAAA;;EAE5D,CAAA;AACJ,CAAA,GACAxB,OAAOQ,UAAU;EACfE,aAAaC,iBAAiBC;EAC9BN,UAAUyB;AACZ,CAAA,GACA/B,OAAOQ,UAAU;EACfE,aAAasB,gBAAgBC,MAAMC,oBAAoBC,eAAerB,gBAAgBC,cAAc;EACpGT,UAAU8B;AACZ,CAAA,GACApC,OAAOqC,IAAI;AAGb,IAAMX,gBAAgB,CAACJ,cAAAA;AACpBgB,aAAmBC,aAAa,CAAC;AAEjCD,aAAmBC,SAASjB,YAAY;IACvC,IAAIkB,UAAU;AACZ,aAAOlB;IACT;IACA,IAAImB,WAAW;AACb,aAAOnB,UAAUoB,WAAU;IAC7B;IACA,IAAIC,eAAe;AACjB,iBAAWlC,MAAMa,UAAUoB,WAAU,GAAI;AACvC,cAAME,WAAWnC,GAAGoC,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,aAAaC;;;;AAIf;",
6
+ "names": ["Effect", "ActivationEvent", "ActivationEvents", "Capabilities", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "AttentionManager", "SelectionManager", "Keyboard", "OperationHandler", "ReactContext", "meta", "AttentionEvents", "AttentionCapabilities", "AttentionPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addOperationHandlerModule", "activate", "OperationHandler", "addModule", "id", "activatesOn", "ActivationEvents", "Startup", "firesAfterActivation", "AttentionEvents", "AttentionReady", "gen", "registry", "Capability", "get", "Capabilities", "AtomRegistry", "attention", "AttentionManager", "selection", "SelectionManager", "setupDevtools", "contributes", "AttentionCapabilities", "Attention", "Selection", "ReactContext", "ActivationEvent", "allOf", "AppActivationEvents", "AppGraphReady", "Keyboard", "make", "globalThis", "composer", "manager", "attended", "getCurrent", "currentSpace", "segments", "split", "length", "trim", "meta", "id", "name", "description", "trim"]
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/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/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1098,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"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":6759,"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":4622},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-O6FNOKYX.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/keyboard-IYF35Z4E.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/react-context-JVGQB2CO.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":1435},"src/capabilities/index.ts":{"bytesInOutput":177},"src/events.ts":{"bytesInOutput":243}},"bytes":2245},"dist/lib/browser/keyboard-IYF35Z4E.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1909},"dist/lib/browser/keyboard-IYF35Z4E.mjs":{"imports":[{"path":"dist/lib/browser/chunk-O6FNOKYX.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":911},"dist/lib/browser/react-context-JVGQB2CO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2098},"dist/lib/browser/react-context-JVGQB2CO.mjs":{"imports":[{"path":"dist/lib/browser/chunk-O6FNOKYX.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":923},"dist/lib/browser/chunk-O6FNOKYX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1279},"dist/lib/browser/chunk-O6FNOKYX.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["ATTENTION_PLUGIN","AttentionCapabilities","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":112},"src/capabilities/capabilities.ts":{"bytesInOutput":376}},"bytes":649}}}
1
+ {"inputs":{"src/AttentionPlugin.ts":{"bytes":7976,"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":1376,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":680,"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":1725,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/events.ts":{"bytes":1255,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/types.ts":{"bytes":2225,"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":645,"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/definitions.ts":{"bytes":2989,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/operation","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/operations/select.ts":{"bytes":5357,"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/operation","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/operations/index.ts":{"bytes":1149,"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/select.ts","kind":"dynamic-import","original":"./select"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4946},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"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":2335},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-BDLH2DQU.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["AttentionAction","AttentionCapabilities","AttentionEvents"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":244},"dist/lib/browser/operations/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":543},"dist/lib/browser/operations/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-55HTXC2G.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"dist/lib/browser/select-HQCLOXD6.mjs","kind":"dynamic-import"}],"exports":["AttentionOperation","AttentionOperationHandlerSet"],"entryPoint":"src/operations/index.ts","inputs":{"src/operations/index.ts":{"bytesInOutput":156}},"bytes":402},"dist/lib/browser/select-HQCLOXD6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2837},"dist/lib/browser/select-HQCLOXD6.mjs":{"imports":[{"path":"dist/lib/browser/chunk-BDLH2DQU.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-55HTXC2G.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.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/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/select.ts","inputs":{"src/operations/select.ts":{"bytesInOutput":1103}},"bytes":1361},"dist/lib/browser/chunk-BDLH2DQU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2470},"dist/lib/browser/chunk-BDLH2DQU.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},"dist/lib/browser/chunk-55HTXC2G.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1520},"dist/lib/browser/chunk-55HTXC2G.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["Select","definitions_exports"],"inputs":{"src/operations/definitions.ts":{"bytesInOutput":778}},"bytes":952},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
@@ -0,0 +1,13 @@
1
+ import {
2
+ definitions_exports
3
+ } from "../chunk-55HTXC2G.mjs";
4
+ import "../chunk-J5LGTIGS.mjs";
5
+
6
+ // src/operations/index.ts
7
+ import { OperationHandlerSet } from "@dxos/operation";
8
+ var AttentionOperationHandlerSet = OperationHandlerSet.lazy(() => import("../select-HQCLOXD6.mjs"));
9
+ export {
10
+ definitions_exports as AttentionOperation,
11
+ AttentionOperationHandlerSet
12
+ };
13
+ //# 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/operation';\n\nexport * as AttentionOperation from './definitions';\n\nexport const AttentionOperationHandlerSet = OperationHandlerSet.lazy(() => import('./select'));\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,2BAA2B;AAI7B,IAAMC,+BAA+BC,oBAAoBC,KAAK,MAAM,OAAO,wBAAA,CAAA;",
6
+ "names": ["OperationHandlerSet", "AttentionOperationHandlerSet", "OperationHandlerSet", "lazy"]
7
+ }
@@ -0,0 +1,49 @@
1
+ import {
2
+ AttentionCapabilities
3
+ } from "./chunk-BDLH2DQU.mjs";
4
+ import {
5
+ Select
6
+ } from "./chunk-55HTXC2G.mjs";
7
+ import "./chunk-J5LGTIGS.mjs";
8
+
9
+ // src/operations/select.ts
10
+ import * as Effect from "effect/Effect";
11
+ import * as Match from "effect/Match";
12
+ import { Capability } from "@dxos/app-framework";
13
+ import { Operation } from "@dxos/operation";
14
+ var handler = Select.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
15
+ const selection = yield* Capability.get(AttentionCapabilities.Selection);
16
+ Match.value(input.selection).pipe(Match.when({
17
+ mode: "single",
18
+ id: void 0
19
+ }, () => {
20
+ selection.clearSelection(input.contextId);
21
+ }), Match.when({
22
+ mode: "single"
23
+ }, (s) => {
24
+ selection.updateSingle(input.contextId, s.id);
25
+ }), Match.when({
26
+ mode: "multi"
27
+ }, (s) => {
28
+ selection.updateMulti(input.contextId, s.ids);
29
+ }), Match.when({
30
+ mode: "range",
31
+ from: void 0,
32
+ to: void 0
33
+ }, () => {
34
+ selection.clearSelection(input.contextId);
35
+ }), Match.when({
36
+ mode: "range"
37
+ }, (s) => {
38
+ selection.updateRange(input.contextId, s.from, s.to);
39
+ }), Match.when({
40
+ mode: "multi-range"
41
+ }, (s) => {
42
+ selection.updateMultiRange(input.contextId, s.ranges);
43
+ }), Match.exhaustive);
44
+ })));
45
+ var select_default = handler;
46
+ export {
47
+ select_default as default
48
+ };
49
+ //# sourceMappingURL=select-HQCLOXD6.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 { Operation } from '@dxos/operation';\n\nimport { AttentionCapabilities } from '../types';\nimport { Select } from './definitions';\n\nconst handler: Operation.WithHandler<typeof Select> = Select.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const selection = yield* Capability.get(AttentionCapabilities.Selection);\n Match.value(input.selection).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,iBAAiB;AAK1B,IAAMC,UAAgDC,OAAOC,KAC3DC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAMC,YAAY,OAAOC,WAAWC,IAAIC,sBAAsBC,SAAS;AACvEC,EAAMC,YAAMP,MAAMC,SAAS,EAAEL,KACrBY,WAAK;IAAEC,MAAM;IAAUC,IAAIC;EAAU,GAAG,MAAA;AAC5CV,cAAUW,eAAeZ,MAAMa,SAAS;EAC1C,CAAA,GACML,WAAK;IAAEC,MAAM;EAAS,GAAG,CAACK,MAAAA;AAC9Bb,cAAUc,aAAaf,MAAMa,WAAWC,EAAEJ,EAAE;EAC9C,CAAA,GACMF,WAAK;IAAEC,MAAM;EAAQ,GAAG,CAACK,MAAAA;AAC7Bb,cAAUe,YAAYhB,MAAMa,WAAWC,EAAEG,GAAG;EAC9C,CAAA,GACMT,WAAK;IAAEC,MAAM;IAASS,MAAMP;IAAWQ,IAAIR;EAAU,GAAG,MAAA;AAC5DV,cAAUW,eAAeZ,MAAMa,SAAS;EAC1C,CAAA,GACML,WAAK;IAAEC,MAAM;EAAQ,GAAG,CAACK,MAAAA;AAC7Bb,cAAUmB,YAAYpB,MAAMa,WAAWC,EAAEI,MAAOJ,EAAEK,EAAE;EACtD,CAAA,GACMX,WAAK;IAAEC,MAAM;EAAc,GAAG,CAACK,MAAAA;AACnCb,cAAUoB,iBAAiBrB,MAAMa,WAAWC,EAAEQ,MAAM;EACtD,CAAA,GACMC,gBAAU;AAEpB,CAAA,CAAA,CAAA;AAIJ,IAAA,iBAAe7B;",
6
+ "names": ["Effect", "Match", "Capability", "Operation", "handler", "Select", "pipe", "Operation", "withHandler", "fnUntraced", "input", "selection", "Capability", "get", "AttentionCapabilities", "Selection", "Match", "value", "when", "mode", "id", "undefined", "clearSelection", "contextId", "s", "updateSingle", "updateMulti", "ids", "from", "to", "updateRange", "updateMultiRange", "ranges", "exhaustive"]
7
+ }
@@ -0,0 +1,12 @@
1
+ import {
2
+ AttentionAction,
3
+ AttentionCapabilities,
4
+ AttentionEvents
5
+ } from "../chunk-BDLH2DQU.mjs";
6
+ import "../chunk-J5LGTIGS.mjs";
7
+ export {
8
+ AttentionAction,
9
+ AttentionCapabilities,
10
+ AttentionEvents
11
+ };
12
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -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-GWUE2YCZ.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,YAAYC,WAAWC,KAAuB,GAAGC,KAAKC,EAAE,uBAAuB;yBAC/EC,YAAYJ,WAAWC,KAAuB,GAAGC,KAAKC,EAAE,uBAAuB;AAC9F,GAHiBL,0BAAAA,wBAAAA,CAAAA,EAAAA;;;;ACLjB,SAASO,uBAAuB;AAEhC,SAASC,QAAAA,aAAY;UAEJC,kBAAAA;mBACFC,iBAAiBC,gBAAgBC,KAAK,GAAGC,MAAKC,EAAE,wBAAwB;AACvF,GAFiBL,oBAAAA,kBAAAA,CAAAA,EAAAA;;;;ACJjB,YAAYM,YAAY;AAExB,SAASC,uBAAuB;AAEhC,SAASC,QAAAA,aAAY;UAEJC,kBAAAA;AACf,QAAMC,mBAAmB,GAAGC,MAAKC,EAAE;EAE5B,MAAMC,eAAsBC,mBAAW,EAAW,GAAGJ,gBAAAA,WAA2B;IACrFK,OAAcC,cAAO;MACnBC,WAAkBC;MAClBC,WAAWC;IACb,CAAA;IACAC,QAAeC;EACjB,CAAA,EAAA;EAAI;mBANST,SAAAA;AAOf,GAViBJ,oBAAAA,kBAAAA,CAAAA,EAAAA;;",
6
+ "names": ["Capability", "meta", "AttentionCapabilities", "Attention", "Capability", "make", "meta", "id", "Selection", "ActivationEvent", "meta", "AttentionEvents", "AttentionReady", "ActivationEvent", "make", "meta", "id", "Schema", "SelectionSchema", "meta", "AttentionAction", "ATTENTION_ACTION", "meta", "id", "Select", "TaggedClass", "input", "Struct", "contextId", "String", "selection", "SelectionSchema", "output", "Void"]
7
+ }
@@ -0,0 +1,40 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ __export
4
+ } from "./chunk-HSLMI22Q.mjs";
5
+
6
+ // src/operations/definitions.ts
7
+ var definitions_exports = {};
8
+ __export(definitions_exports, {
9
+ Select: () => Select
10
+ });
11
+ import * as Schema from "effect/Schema";
12
+ import { Capability } from "@dxos/app-framework";
13
+ import { Operation } from "@dxos/operation";
14
+ import { SelectionSchema } from "@dxos/react-ui-attention";
15
+ import { meta } from "#meta";
16
+ var Select = Operation.make({
17
+ meta: {
18
+ key: `${meta.id}.operation.select`,
19
+ name: "Select",
20
+ description: "Select items in an attention context."
21
+ },
22
+ services: [
23
+ Capability.Service
24
+ ],
25
+ input: Schema.Struct({
26
+ contextId: Schema.String.annotations({
27
+ description: "The id of the attention context."
28
+ }),
29
+ selection: SelectionSchema.annotations({
30
+ description: "The selection to apply."
31
+ })
32
+ }),
33
+ output: Schema.Void
34
+ });
35
+
36
+ export {
37
+ Select,
38
+ definitions_exports
39
+ };
40
+ //# sourceMappingURL=chunk-HQWPPQXC.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/definitions.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/operation';\nimport { SelectionSchema } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\n\nexport const Select = Operation.make({\n meta: {\n key: `${meta.id}.operation.select`,\n name: 'Select',\n description: 'Select items in an attention context.',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n contextId: Schema.String.annotations({ description: 'The id of the attention context.' }),\n selection: SelectionSchema.annotations({ description: 'The selection to apply.' }),\n }),\n output: Schema.Void,\n});\n"],
5
+ "mappings": ";;;;;;AAAA;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,uBAAuB;AAEhC,SAASC,YAAY;AAEd,IAAMC,SAASC,UAAUC,KAAK;EACnCC,MAAM;IACJC,KAAK,GAAGD,KAAKE,EAAE;IACfC,MAAM;IACNC,aAAa;EACf;EACAC,UAAU;IAACC,WAAWC;;EACtBC,OAAcC,cAAO;IACnBC,WAAkBC,cAAOC,YAAY;MAAER,aAAa;IAAmC,CAAA;IACvFS,WAAWC,gBAAgBF,YAAY;MAAER,aAAa;IAA0B,CAAA;EAClF,CAAA;EACAW,QAAeC;AACjB,CAAA;",
6
+ "names": ["Schema", "Capability", "Operation", "SelectionSchema", "meta", "Select", "Operation", "make", "meta", "key", "id", "name", "description", "services", "Capability", "Service", "input", "Struct", "contextId", "String", "annotations", "selection", "SelectionSchema", "output", "Void"]
7
+ }
@@ -0,0 +1,11 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ var __defProp = Object.defineProperty;
3
+ var __export = (target, all) => {
4
+ for (var name in all)
5
+ __defProp(target, name, { get: all[name], enumerable: true });
6
+ };
7
+
8
+ export {
9
+ __export
10
+ };
11
+ //# sourceMappingURL=chunk-HSLMI22Q.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }