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

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 (60) hide show
  1. package/dist/lib/browser/chunk-DF2PBRKK.mjs +12 -0
  2. package/dist/lib/browser/chunk-DF2PBRKK.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-O6FNOKYX.mjs → chunk-LRNGQJHD.mjs} +4 -9
  4. package/dist/lib/browser/chunk-LRNGQJHD.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-WOQAO42V.mjs +25 -0
  6. package/dist/lib/browser/chunk-WOQAO42V.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +13 -5
  8. package/dist/lib/browser/index.mjs.map +3 -3
  9. package/dist/lib/browser/intent-resolver-E7G6R755.mjs +51 -0
  10. package/dist/lib/browser/intent-resolver-E7G6R755.mjs.map +7 -0
  11. package/dist/lib/browser/{keyboard-IYF35Z4E.mjs → keyboard-JTQ2RGL7.mjs} +3 -2
  12. package/dist/lib/{node-esm/keyboard-GSUNGWNE.mjs.map → browser/keyboard-JTQ2RGL7.mjs.map} +2 -2
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/{react-context-JVGQB2CO.mjs → react-context-IUBFXFFZ.mjs} +5 -3
  15. package/dist/lib/browser/react-context-IUBFXFFZ.mjs.map +7 -0
  16. package/dist/lib/browser/types/index.mjs +8 -0
  17. package/dist/lib/browser/types/index.mjs.map +7 -0
  18. package/dist/lib/node-esm/{chunk-SVV7GQYN.mjs → chunk-K3STXVKU.mjs} +4 -10
  19. package/dist/lib/node-esm/chunk-K3STXVKU.mjs.map +7 -0
  20. package/dist/lib/node-esm/chunk-MS46IMND.mjs +26 -0
  21. package/dist/lib/node-esm/chunk-MS46IMND.mjs.map +7 -0
  22. package/dist/lib/node-esm/chunk-YUJM7ABN.mjs +14 -0
  23. package/dist/lib/node-esm/chunk-YUJM7ABN.mjs.map +7 -0
  24. package/dist/lib/node-esm/index.mjs +13 -5
  25. package/dist/lib/node-esm/index.mjs.map +3 -3
  26. package/dist/lib/node-esm/intent-resolver-ELLJ67CV.mjs +52 -0
  27. package/dist/lib/node-esm/intent-resolver-ELLJ67CV.mjs.map +7 -0
  28. package/dist/lib/node-esm/{keyboard-GSUNGWNE.mjs → keyboard-S7SW6XBY.mjs} +3 -2
  29. package/dist/lib/{browser/keyboard-IYF35Z4E.mjs.map → node-esm/keyboard-S7SW6XBY.mjs.map} +2 -2
  30. package/dist/lib/node-esm/meta.json +1 -1
  31. package/dist/lib/node-esm/{react-context-SVXVOSRH.mjs → react-context-2RSEVMNC.mjs} +5 -3
  32. package/dist/lib/node-esm/react-context-2RSEVMNC.mjs.map +7 -0
  33. package/dist/lib/node-esm/types/index.mjs +9 -0
  34. package/dist/lib/node-esm/types/index.mjs.map +7 -0
  35. package/dist/types/src/AttentionPlugin.d.ts.map +1 -1
  36. package/dist/types/src/capabilities/capabilities.d.ts +1 -1
  37. package/dist/types/src/capabilities/index.d.ts +1 -0
  38. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  39. package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
  40. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
  41. package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
  42. package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
  43. package/dist/types/src/types/index.d.ts +2 -0
  44. package/dist/types/src/types/index.d.ts.map +1 -0
  45. package/dist/types/src/types/types.d.ts +32 -0
  46. package/dist/types/src/types/types.d.ts.map +1 -0
  47. package/dist/types/tsconfig.tsbuildinfo +1 -1
  48. package/package.json +20 -9
  49. package/src/AttentionPlugin.ts +7 -2
  50. package/src/capabilities/capabilities.ts +1 -1
  51. package/src/capabilities/index.ts +1 -0
  52. package/src/capabilities/intent-resolver.ts +43 -0
  53. package/src/capabilities/keyboard.ts +1 -1
  54. package/src/capabilities/react-context.tsx +2 -1
  55. package/src/types/index.ts +5 -0
  56. package/src/types/types.ts +21 -0
  57. package/dist/lib/browser/chunk-O6FNOKYX.mjs.map +0 -7
  58. package/dist/lib/browser/react-context-JVGQB2CO.mjs.map +0 -7
  59. package/dist/lib/node-esm/chunk-SVV7GQYN.mjs.map +0 -7
  60. package/dist/lib/node-esm/react-context-SVXVOSRH.mjs.map +0 -7
@@ -0,0 +1,12 @@
1
+ // src/meta.ts
2
+ var ATTENTION_PLUGIN = "dxos.org/plugin/attention";
3
+ var meta = {
4
+ id: ATTENTION_PLUGIN,
5
+ name: "Attention"
6
+ };
7
+
8
+ export {
9
+ ATTENTION_PLUGIN,
10
+ meta
11
+ };
12
+ //# sourceMappingURL=chunk-DF2PBRKK.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const ATTENTION_PLUGIN = 'dxos.org/plugin/attention';\n\nexport const meta: PluginMeta = {\n id: ATTENTION_PLUGIN,\n name: 'Attention',\n};\n"],
5
+ "mappings": ";AAMO,IAAMA,mBAAmB;AAEzB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;AACR;",
6
+ "names": ["ATTENTION_PLUGIN", "meta", "id", "name"]
7
+ }
@@ -1,9 +1,6 @@
1
- // src/meta.ts
2
- var ATTENTION_PLUGIN = "dxos.org/plugin/attention";
3
- var meta = {
4
- id: ATTENTION_PLUGIN,
5
- name: "Attention"
6
- };
1
+ import {
2
+ ATTENTION_PLUGIN
3
+ } from "./chunk-DF2PBRKK.mjs";
7
4
 
8
5
  // src/capabilities/capabilities.ts
9
6
  import { defineCapability } from "@dxos/app-framework";
@@ -14,8 +11,6 @@ import { defineCapability } from "@dxos/app-framework";
14
11
  var AttentionCapabilities;
15
12
 
16
13
  export {
17
- ATTENTION_PLUGIN,
18
- meta,
19
14
  AttentionCapabilities
20
15
  };
21
- //# sourceMappingURL=chunk-O6FNOKYX.mjs.map
16
+ //# sourceMappingURL=chunk-LRNGQJHD.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/capabilities.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type AttentionManager, type SelectionManager } from '@dxos/react-ui-attention';\n\nimport { ATTENTION_PLUGIN } from '../meta';\n\nexport namespace AttentionCapabilities {\n export const Attention = defineCapability<AttentionManager>(`${ATTENTION_PLUGIN}/capability/attention`);\n export const Selection = defineCapability<SelectionManager>(`${ATTENTION_PLUGIN}/capability/selection`);\n}\n"],
5
+ "mappings": ";;;;;AAIA,SAASA,wBAAwB;UAKhBC,wBAAAA;yBACFC,YAAYC,iBAAmC,GAAGC,gBAAAA,uBAAuC;yBACzFC,YAAYF,iBAAmC,GAAGC,gBAAAA,uBAAuC;AACxG,GAHiBH,0BAAAA,wBAAAA,CAAAA,EAAAA;;",
6
+ "names": ["defineCapability", "AttentionCapabilities", "Attention", "defineCapability", "ATTENTION_PLUGIN", "Selection"]
7
+ }
@@ -0,0 +1,25 @@
1
+ import {
2
+ ATTENTION_PLUGIN
3
+ } from "./chunk-DF2PBRKK.mjs";
4
+
5
+ // src/types/types.ts
6
+ import { Schema } from "effect";
7
+ import { SelectionSchema } from "@dxos/react-ui-attention";
8
+ (function(AttentionAction2) {
9
+ const ATTENTION_ACTION = `${ATTENTION_PLUGIN}/action`;
10
+ class Select extends Schema.TaggedClass()(`${ATTENTION_ACTION}/select`, {
11
+ input: Schema.Struct({
12
+ contextId: Schema.String,
13
+ selection: SelectionSchema
14
+ }),
15
+ output: Schema.Void
16
+ }) {
17
+ }
18
+ AttentionAction2.Select = Select;
19
+ })(AttentionAction || (AttentionAction = {}));
20
+ var AttentionAction;
21
+
22
+ export {
23
+ AttentionAction
24
+ };
25
+ //# sourceMappingURL=chunk-WOQAO42V.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/types.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { SelectionSchema } from '@dxos/react-ui-attention';\n\nimport { ATTENTION_PLUGIN } from '../meta';\n\nexport namespace AttentionAction {\n const ATTENTION_ACTION = `${ATTENTION_PLUGIN}/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,cAAc;AAEvB,SAASC,uBAAuB;UAIfC,kBAAAA;AACf,QAAMC,mBAAmB,GAAGC,gBAAAA;EAErB,MAAMC,eAAeC,OAAOC,YAAW,EAAW,GAAGJ,gBAAAA,WAA2B;IACrFK,OAAOF,OAAOG,OAAO;MACnBC,WAAWJ,OAAOK;MAClBC,WAAWC;IACb,CAAA;IACAC,QAAQR,OAAOS;EACjB,CAAA,EAAA;EAAI;mBANSV,SAAAA;AAOf,GAViBH,oBAAAA,kBAAAA,CAAAA,EAAAA;;",
6
+ "names": ["Schema", "SelectionSchema", "AttentionAction", "ATTENTION_ACTION", "ATTENTION_PLUGIN", "Select", "Schema", "TaggedClass", "input", "Struct", "contextId", "String", "selection", "SelectionSchema", "output", "Void"]
7
+ }
@@ -1,20 +1,23 @@
1
+ import {
2
+ AttentionCapabilities
3
+ } from "./chunk-LRNGQJHD.mjs";
1
4
  import {
2
5
  ATTENTION_PLUGIN,
3
- AttentionCapabilities,
4
6
  meta
5
- } from "./chunk-O6FNOKYX.mjs";
7
+ } from "./chunk-DF2PBRKK.mjs";
6
8
 
7
9
  // src/index.ts
8
10
  export * from "@dxos/react-ui-attention";
9
11
 
10
12
  // src/AttentionPlugin.ts
11
- import { defineModule, definePlugin, Events, contributes, allOf } from "@dxos/app-framework";
13
+ import { Events, allOf, contributes, defineModule, definePlugin } from "@dxos/app-framework";
12
14
  import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
13
15
 
14
16
  // src/capabilities/index.ts
15
17
  import { lazy } from "@dxos/app-framework";
16
- var Keyboard = lazy(() => import("./keyboard-IYF35Z4E.mjs"));
17
- var ReactContext = lazy(() => import("./react-context-JVGQB2CO.mjs"));
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"));
18
21
 
19
22
  // src/events.ts
20
23
  import { defineEvent } from "@dxos/app-framework";
@@ -50,6 +53,11 @@ var AttentionPlugin = () => definePlugin(meta, [
50
53
  id: `${meta.id}/module/keyboard`,
51
54
  activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),
52
55
  activate: Keyboard
56
+ }),
57
+ defineModule({
58
+ id: `${meta.id}/module/intent-resolver`,
59
+ activatesOn: Events.SetupIntentResolver,
60
+ activate: IntentResolver
53
61
  })
54
62
  ]);
55
63
  var setupDevtools = (attention) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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"]
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"]
7
7
  }
@@ -0,0 +1,51 @@
1
+ import {
2
+ AttentionAction
3
+ } from "./chunk-WOQAO42V.mjs";
4
+ import {
5
+ AttentionCapabilities
6
+ } from "./chunk-LRNGQJHD.mjs";
7
+ import "./chunk-DF2PBRKK.mjs";
8
+
9
+ // src/capabilities/intent-resolver.ts
10
+ import { Match } from "effect";
11
+ import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
12
+ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolver, [
13
+ createResolver({
14
+ intent: AttentionAction.Select,
15
+ resolve: (data) => {
16
+ const selection = context.getCapability(AttentionCapabilities.Selection);
17
+ Match.type().pipe(Match.when({
18
+ mode: "single",
19
+ id: void 0
20
+ }, () => {
21
+ selection.clearSelection(data.contextId);
22
+ }), Match.when({
23
+ mode: "single"
24
+ }, (s) => {
25
+ selection.updateSingle(data.contextId, s.id);
26
+ }), Match.when({
27
+ mode: "multi"
28
+ }, (s) => {
29
+ selection.updateMulti(data.contextId, s.ids);
30
+ }), Match.when({
31
+ mode: "range",
32
+ from: void 0,
33
+ to: void 0
34
+ }, () => {
35
+ selection.clearSelection(data.contextId);
36
+ }), Match.when({
37
+ mode: "range"
38
+ }, (s) => {
39
+ selection.updateRange(data.contextId, s.from, s.to);
40
+ }), Match.when({
41
+ mode: "multi-range"
42
+ }, (s) => {
43
+ selection.updateMultiRange(data.contextId, s.ranges);
44
+ }), Match.exhaustive)(data.selection);
45
+ }
46
+ })
47
+ ]);
48
+ export {
49
+ intent_resolver_default as default
50
+ };
51
+ //# sourceMappingURL=intent-resolver-E7G6R755.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Match } from 'effect';\n\nimport { Capabilities, type PluginContext, contributes, createResolver } from '@dxos/app-framework';\nimport { type Selection } from '@dxos/react-ui-attention';\n\nimport { AttentionAction } from '../types';\n\nimport { AttentionCapabilities } from './capabilities';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.IntentResolver, [\n createResolver({\n intent: AttentionAction.Select,\n resolve: (data) => {\n const selection = context.getCapability(AttentionCapabilities.Selection);\n Match.type<Selection>().pipe(\n Match.when({ mode: 'single', id: undefined }, () => {\n selection.clearSelection(data.contextId);\n }),\n Match.when({ mode: 'single' }, (s) => {\n selection.updateSingle(data.contextId, s.id!);\n }),\n Match.when({ mode: 'multi' }, (s) => {\n selection.updateMulti(data.contextId, s.ids);\n }),\n Match.when({ mode: 'range', from: undefined, to: undefined }, () => {\n selection.clearSelection(data.contextId);\n }),\n Match.when({ mode: 'range' }, (s) => {\n selection.updateRange(data.contextId, s.from!, s.to!);\n }),\n Match.when({ mode: 'multi-range' }, (s) => {\n selection.updateMultiRange(data.contextId, s.ranges);\n }),\n Match.exhaustive,\n )(data.selection);\n },\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;;;;AAIA,SAASA,aAAa;AAEtB,SAASC,cAAkCC,aAAaC,sBAAsB;AAO9E,IAAA,0BAAe,CAACC,YACdC,YAAYC,aAAaC,gBAAgB;EACvCC,eAAe;IACbC,QAAQC,gBAAgBC;IACxBC,SAAS,CAACC,SAAAA;AACR,YAAMC,YAAYV,QAAQW,cAAcC,sBAAsBC,SAAS;AACvEC,YAAMC,KAAI,EAAcC,KACtBF,MAAMG,KAAK;QAAEC,MAAM;QAAUC,IAAIC;MAAU,GAAG,MAAA;AAC5CV,kBAAUW,eAAeZ,KAAKa,SAAS;MACzC,CAAA,GACAR,MAAMG,KAAK;QAAEC,MAAM;MAAS,GAAG,CAACK,MAAAA;AAC9Bb,kBAAUc,aAAaf,KAAKa,WAAWC,EAAEJ,EAAE;MAC7C,CAAA,GACAL,MAAMG,KAAK;QAAEC,MAAM;MAAQ,GAAG,CAACK,MAAAA;AAC7Bb,kBAAUe,YAAYhB,KAAKa,WAAWC,EAAEG,GAAG;MAC7C,CAAA,GACAZ,MAAMG,KAAK;QAAEC,MAAM;QAASS,MAAMP;QAAWQ,IAAIR;MAAU,GAAG,MAAA;AAC5DV,kBAAUW,eAAeZ,KAAKa,SAAS;MACzC,CAAA,GACAR,MAAMG,KAAK;QAAEC,MAAM;MAAQ,GAAG,CAACK,MAAAA;AAC7Bb,kBAAUmB,YAAYpB,KAAKa,WAAWC,EAAEI,MAAOJ,EAAEK,EAAE;MACrD,CAAA,GACAd,MAAMG,KAAK;QAAEC,MAAM;MAAc,GAAG,CAACK,MAAAA;AACnCb,kBAAUoB,iBAAiBrB,KAAKa,WAAWC,EAAEQ,MAAM;MACrD,CAAA,GACAjB,MAAMkB,UAAU,EAChBvB,KAAKC,SAAS;IAClB;EACF,CAAA;CACD;",
6
+ "names": ["Match", "Capabilities", "contributes", "createResolver", "context", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "AttentionAction", "Select", "resolve", "data", "selection", "getCapability", "AttentionCapabilities", "Selection", "Match", "type", "pipe", "when", "mode", "id", "undefined", "clearSelection", "contextId", "s", "updateSingle", "updateMulti", "ids", "from", "to", "updateRange", "updateMultiRange", "ranges", "exhaustive"]
7
+ }
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  AttentionCapabilities
3
- } from "./chunk-O6FNOKYX.mjs";
3
+ } from "./chunk-LRNGQJHD.mjs";
4
+ import "./chunk-DF2PBRKK.mjs";
4
5
 
5
6
  // src/capabilities/keyboard.ts
6
7
  import { effect } from "@preact/signals-core";
@@ -24,4 +25,4 @@ var keyboard_default = (context) => {
24
25
  export {
25
26
  keyboard_default as default
26
27
  };
27
- //# sourceMappingURL=keyboard-IYF35Z4E.mjs.map
28
+ //# sourceMappingURL=keyboard-JTQ2RGL7.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/keyboard.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { effect } from '@preact/signals-core';\nimport { Option } from 'effect';\n\nimport { Capabilities as AppCapabilities, contributes, type PluginContext } from '@dxos/app-framework';\nimport { Keyboard } from '@dxos/keyboard';\n\nimport { AttentionCapabilities } from './capabilities';\n\nexport default (context: PluginContext) => {\n const { graph } = context.getCapability(AppCapabilities.AppGraph);\n const attention = context.getCapability(AttentionCapabilities.Attention);\n\n const unsubscribe = effect(() => {\n const id = Array.from(attention.current)[0];\n const path = id && graph.getPath({ target: id }).pipe(Option.getOrNull);\n if (path) {\n Keyboard.singleton.setCurrentContext(path.join('/'));\n }\n });\n\n return contributes(AppCapabilities.Null, null, () => unsubscribe());\n};\n"],
5
- "mappings": ";;;;;;AAIA,SAASA,cAAc;AACvB,SAASC,cAAc;AAEvB,SAASC,gBAAgBC,iBAAiBC,mBAAuC;AACjF,SAASC,gBAAgB;AAIzB,IAAA,mBAAe,CAACC,YAAAA;AACd,QAAM,EAAEC,MAAK,IAAKD,QAAQE,cAAcC,gBAAgBC,QAAQ;AAChE,QAAMC,YAAYL,QAAQE,cAAcI,sBAAsBC,SAAS;AAEvE,QAAMC,cAAcC,OAAO,MAAA;AACzB,UAAMC,KAAKC,MAAMC,KAAKP,UAAUQ,OAAO,EAAE,CAAA;AACzC,UAAMC,OAAOJ,MAAMT,MAAMc,QAAQ;MAAEC,QAAQN;IAAG,CAAA,EAAGO,KAAKC,OAAOC,SAAS;AACtE,QAAIL,MAAM;AACRM,eAASC,UAAUC,kBAAkBR,KAAKS,KAAK,GAAA,CAAA;IACjD;EACF,CAAA;AAEA,SAAOC,YAAYrB,gBAAgBsB,MAAM,MAAM,MAAMjB,YAAAA,CAAAA;AACvD;",
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { effect } from '@preact/signals-core';\nimport { Option } from 'effect';\n\nimport { Capabilities as AppCapabilities, type PluginContext, contributes } from '@dxos/app-framework';\nimport { Keyboard } from '@dxos/keyboard';\n\nimport { AttentionCapabilities } from './capabilities';\n\nexport default (context: PluginContext) => {\n const { graph } = context.getCapability(AppCapabilities.AppGraph);\n const attention = context.getCapability(AttentionCapabilities.Attention);\n\n const unsubscribe = effect(() => {\n const id = Array.from(attention.current)[0];\n const path = id && graph.getPath({ target: id }).pipe(Option.getOrNull);\n if (path) {\n Keyboard.singleton.setCurrentContext(path.join('/'));\n }\n });\n\n return contributes(AppCapabilities.Null, null, () => unsubscribe());\n};\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,cAAc;AACvB,SAASC,cAAc;AAEvB,SAASC,gBAAgBC,iBAAqCC,mBAAmB;AACjF,SAASC,gBAAgB;AAIzB,IAAA,mBAAe,CAACC,YAAAA;AACd,QAAM,EAAEC,MAAK,IAAKD,QAAQE,cAAcC,gBAAgBC,QAAQ;AAChE,QAAMC,YAAYL,QAAQE,cAAcI,sBAAsBC,SAAS;AAEvE,QAAMC,cAAcC,OAAO,MAAA;AACzB,UAAMC,KAAKC,MAAMC,KAAKP,UAAUQ,OAAO,EAAE,CAAA;AACzC,UAAMC,OAAOJ,MAAMT,MAAMc,QAAQ;MAAEC,QAAQN;IAAG,CAAA,EAAGO,KAAKC,OAAOC,SAAS;AACtE,QAAIL,MAAM;AACRM,eAASC,UAAUC,kBAAkBR,KAAKS,KAAK,GAAA,CAAA;IACjD;EACF,CAAA;AAEA,SAAOC,YAAYrB,gBAAgBsB,MAAM,MAAM,MAAMjB,YAAAA,CAAAA;AACvD;",
6
6
  "names": ["effect", "Option", "Capabilities", "AppCapabilities", "contributes", "Keyboard", "context", "graph", "getCapability", "AppCapabilities", "AppGraph", "attention", "AttentionCapabilities", "Attention", "unsubscribe", "effect", "id", "Array", "from", "current", "path", "getPath", "target", "pipe", "Option", "getOrNull", "Keyboard", "singleton", "setCurrentContext", "join", "contributes", "Null"]
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/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,7 +1,9 @@
1
1
  import {
2
- ATTENTION_PLUGIN,
3
2
  AttentionCapabilities
4
- } from "./chunk-O6FNOKYX.mjs";
3
+ } from "./chunk-LRNGQJHD.mjs";
4
+ import {
5
+ ATTENTION_PLUGIN
6
+ } from "./chunk-DF2PBRKK.mjs";
5
7
 
6
8
  // src/capabilities/react-context.tsx
7
9
  import React from "react";
@@ -24,4 +26,4 @@ var react_context_default = () => contributes(Capabilities.ReactContext, {
24
26
  export {
25
27
  react_context_default as default
26
28
  };
27
- //# sourceMappingURL=react-context-JVGQB2CO.mjs.map
29
+ //# sourceMappingURL=react-context-IUBFXFFZ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-context.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { type PropsWithChildren } from 'react';\n\nimport { Capabilities, contributes, useCapability } from '@dxos/app-framework';\nimport { RootAttentionProvider, SelectionProvider } from '@dxos/react-ui-attention';\n\nimport { ATTENTION_PLUGIN } from '../meta';\n\nimport { AttentionCapabilities } from './capabilities';\n\nexport default () =>\n contributes(Capabilities.ReactContext, {\n id: ATTENTION_PLUGIN,\n context: (props: PropsWithChildren) => {\n const attention = useCapability(AttentionCapabilities.Attention);\n const selection = useCapability(AttentionCapabilities.Selection);\n\n return (\n <RootAttentionProvider\n attention={attention}\n onChange={(nextAttended) => {\n // TODO(Zan): Workout why this was in deck plugin. It didn't seem to work?\n // if (layout.values.scrollIntoView && nextAttended.has(layout.values.scrollIntoView)) {\n // layout.values.scrollIntoView = undefined;\n // }\n }}\n >\n <SelectionProvider selection={selection}>{props.children}</SelectionProvider>\n </RootAttentionProvider>\n );\n },\n });\n"],
5
+ "mappings": ";;;;;;;;AAIA,OAAOA,WAAuC;AAE9C,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,uBAAuBC,yBAAyB;AAMzD,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,IAAIC;EACJC,SAAS,CAACC,UAAAA;AACR,UAAMC,YAAYC,cAAcC,sBAAsBC,SAAS;AAC/D,UAAMC,YAAYH,cAAcC,sBAAsBG,SAAS;AAE/D,WACE,sBAAA,cAACC,uBAAAA;MACCN;MACAO,UAAU,CAACC,iBAAAA;MAKX;OAEA,sBAAA,cAACC,mBAAAA;MAAkBL;OAAuBL,MAAMW,QAAQ,CAAA;EAG9D;AACF,CAAA;",
6
+ "names": ["React", "Capabilities", "contributes", "useCapability", "RootAttentionProvider", "SelectionProvider", "contributes", "Capabilities", "ReactContext", "id", "ATTENTION_PLUGIN", "context", "props", "attention", "useCapability", "AttentionCapabilities", "Attention", "selection", "Selection", "RootAttentionProvider", "onChange", "nextAttended", "SelectionProvider", "children"]
7
+ }
@@ -0,0 +1,8 @@
1
+ import {
2
+ AttentionAction
3
+ } from "../chunk-WOQAO42V.mjs";
4
+ import "../chunk-DF2PBRKK.mjs";
5
+ export {
6
+ AttentionAction
7
+ };
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,11 +1,7 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
- // src/meta.ts
4
- var ATTENTION_PLUGIN = "dxos.org/plugin/attention";
5
- var meta = {
6
- id: ATTENTION_PLUGIN,
7
- name: "Attention"
8
- };
2
+ import {
3
+ ATTENTION_PLUGIN
4
+ } from "./chunk-YUJM7ABN.mjs";
9
5
 
10
6
  // src/capabilities/capabilities.ts
11
7
  import { defineCapability } from "@dxos/app-framework";
@@ -16,8 +12,6 @@ import { defineCapability } from "@dxos/app-framework";
16
12
  var AttentionCapabilities;
17
13
 
18
14
  export {
19
- ATTENTION_PLUGIN,
20
- meta,
21
15
  AttentionCapabilities
22
16
  };
23
- //# sourceMappingURL=chunk-SVV7GQYN.mjs.map
17
+ //# sourceMappingURL=chunk-K3STXVKU.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/capabilities.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type AttentionManager, type SelectionManager } from '@dxos/react-ui-attention';\n\nimport { ATTENTION_PLUGIN } from '../meta';\n\nexport namespace AttentionCapabilities {\n export const Attention = defineCapability<AttentionManager>(`${ATTENTION_PLUGIN}/capability/attention`);\n export const Selection = defineCapability<SelectionManager>(`${ATTENTION_PLUGIN}/capability/selection`);\n}\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,wBAAwB;UAKhBC,wBAAAA;yBACFC,YAAYC,iBAAmC,GAAGC,gBAAAA,uBAAuC;yBACzFC,YAAYF,iBAAmC,GAAGC,gBAAAA,uBAAuC;AACxG,GAHiBH,0BAAAA,wBAAAA,CAAAA,EAAAA;;",
6
+ "names": ["defineCapability", "AttentionCapabilities", "Attention", "defineCapability", "ATTENTION_PLUGIN", "Selection"]
7
+ }
@@ -0,0 +1,26 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ ATTENTION_PLUGIN
4
+ } from "./chunk-YUJM7ABN.mjs";
5
+
6
+ // src/types/types.ts
7
+ import { Schema } from "effect";
8
+ import { SelectionSchema } from "@dxos/react-ui-attention";
9
+ (function(AttentionAction2) {
10
+ const ATTENTION_ACTION = `${ATTENTION_PLUGIN}/action`;
11
+ class Select extends Schema.TaggedClass()(`${ATTENTION_ACTION}/select`, {
12
+ input: Schema.Struct({
13
+ contextId: Schema.String,
14
+ selection: SelectionSchema
15
+ }),
16
+ output: Schema.Void
17
+ }) {
18
+ }
19
+ AttentionAction2.Select = Select;
20
+ })(AttentionAction || (AttentionAction = {}));
21
+ var AttentionAction;
22
+
23
+ export {
24
+ AttentionAction
25
+ };
26
+ //# sourceMappingURL=chunk-MS46IMND.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/types.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { SelectionSchema } from '@dxos/react-ui-attention';\n\nimport { ATTENTION_PLUGIN } from '../meta';\n\nexport namespace AttentionAction {\n const ATTENTION_ACTION = `${ATTENTION_PLUGIN}/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,cAAc;AAEvB,SAASC,uBAAuB;UAIfC,kBAAAA;AACf,QAAMC,mBAAmB,GAAGC,gBAAAA;EAErB,MAAMC,eAAeC,OAAOC,YAAW,EAAW,GAAGJ,gBAAAA,WAA2B;IACrFK,OAAOF,OAAOG,OAAO;MACnBC,WAAWJ,OAAOK;MAClBC,WAAWC;IACb,CAAA;IACAC,QAAQR,OAAOS;EACjB,CAAA,EAAA;EAAI;mBANSV,SAAAA;AAOf,GAViBH,oBAAAA,kBAAAA,CAAAA,EAAAA;;",
6
+ "names": ["Schema", "SelectionSchema", "AttentionAction", "ATTENTION_ACTION", "ATTENTION_PLUGIN", "Select", "Schema", "TaggedClass", "input", "Struct", "contextId", "String", "selection", "SelectionSchema", "output", "Void"]
7
+ }
@@ -0,0 +1,14 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // src/meta.ts
4
+ var ATTENTION_PLUGIN = "dxos.org/plugin/attention";
5
+ var meta = {
6
+ id: ATTENTION_PLUGIN,
7
+ name: "Attention"
8
+ };
9
+
10
+ export {
11
+ ATTENTION_PLUGIN,
12
+ meta
13
+ };
14
+ //# sourceMappingURL=chunk-YUJM7ABN.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const ATTENTION_PLUGIN = 'dxos.org/plugin/attention';\n\nexport const meta: PluginMeta = {\n id: ATTENTION_PLUGIN,\n name: 'Attention',\n};\n"],
5
+ "mappings": ";;;AAMO,IAAMA,mBAAmB;AAEzB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;AACR;",
6
+ "names": ["ATTENTION_PLUGIN", "meta", "id", "name"]
7
+ }
@@ -1,21 +1,24 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ AttentionCapabilities
4
+ } from "./chunk-K3STXVKU.mjs";
2
5
  import {
3
6
  ATTENTION_PLUGIN,
4
- AttentionCapabilities,
5
7
  meta
6
- } from "./chunk-SVV7GQYN.mjs";
8
+ } from "./chunk-YUJM7ABN.mjs";
7
9
 
8
10
  // src/index.ts
9
11
  export * from "@dxos/react-ui-attention";
10
12
 
11
13
  // src/AttentionPlugin.ts
12
- import { defineModule, definePlugin, Events, contributes, allOf } from "@dxos/app-framework";
14
+ import { Events, allOf, contributes, defineModule, definePlugin } from "@dxos/app-framework";
13
15
  import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
14
16
 
15
17
  // src/capabilities/index.ts
16
18
  import { lazy } from "@dxos/app-framework";
17
- var Keyboard = lazy(() => import("./keyboard-GSUNGWNE.mjs"));
18
- var ReactContext = lazy(() => import("./react-context-SVXVOSRH.mjs"));
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"));
19
22
 
20
23
  // src/events.ts
21
24
  import { defineEvent } from "@dxos/app-framework";
@@ -51,6 +54,11 @@ var AttentionPlugin = () => definePlugin(meta, [
51
54
  id: `${meta.id}/module/keyboard`,
52
55
  activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),
53
56
  activate: Keyboard
57
+ }),
58
+ defineModule({
59
+ id: `${meta.id}/module/intent-resolver`,
60
+ activatesOn: Events.SetupIntentResolver,
61
+ activate: IntentResolver
54
62
  })
55
63
  ]);
56
64
  var setupDevtools = (attention) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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"]
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"]
7
7
  }
@@ -0,0 +1,52 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ AttentionAction
4
+ } from "./chunk-MS46IMND.mjs";
5
+ import {
6
+ AttentionCapabilities
7
+ } from "./chunk-K3STXVKU.mjs";
8
+ import "./chunk-YUJM7ABN.mjs";
9
+
10
+ // src/capabilities/intent-resolver.ts
11
+ import { Match } from "effect";
12
+ import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
13
+ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolver, [
14
+ createResolver({
15
+ intent: AttentionAction.Select,
16
+ resolve: (data) => {
17
+ const selection = context.getCapability(AttentionCapabilities.Selection);
18
+ Match.type().pipe(Match.when({
19
+ mode: "single",
20
+ id: void 0
21
+ }, () => {
22
+ selection.clearSelection(data.contextId);
23
+ }), Match.when({
24
+ mode: "single"
25
+ }, (s) => {
26
+ selection.updateSingle(data.contextId, s.id);
27
+ }), Match.when({
28
+ mode: "multi"
29
+ }, (s) => {
30
+ selection.updateMulti(data.contextId, s.ids);
31
+ }), Match.when({
32
+ mode: "range",
33
+ from: void 0,
34
+ to: void 0
35
+ }, () => {
36
+ selection.clearSelection(data.contextId);
37
+ }), Match.when({
38
+ mode: "range"
39
+ }, (s) => {
40
+ selection.updateRange(data.contextId, s.from, s.to);
41
+ }), Match.when({
42
+ mode: "multi-range"
43
+ }, (s) => {
44
+ selection.updateMultiRange(data.contextId, s.ranges);
45
+ }), Match.exhaustive)(data.selection);
46
+ }
47
+ })
48
+ ]);
49
+ export {
50
+ intent_resolver_default as default
51
+ };
52
+ //# sourceMappingURL=intent-resolver-ELLJ67CV.mjs.map