@dxos/plugin-attention 0.8.4-main.e098934 → 0.8.4-main.e8ec1fe

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 (66) hide show
  1. package/dist/lib/browser/chunk-62F4J5KY.mjs +15 -0
  2. package/dist/lib/browser/chunk-62F4J5KY.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-WOQAO42V.mjs → chunk-NG4RYQK5.mjs} +5 -5
  4. package/dist/lib/browser/chunk-NG4RYQK5.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-NIBJFU73.mjs +16 -0
  6. package/dist/lib/browser/chunk-NIBJFU73.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +8 -11
  8. package/dist/lib/browser/index.mjs.map +3 -3
  9. package/dist/lib/browser/{intent-resolver-E7G6R755.mjs → intent-resolver-OE6EFE7U.mjs} +7 -7
  10. package/dist/lib/browser/intent-resolver-OE6EFE7U.mjs.map +7 -0
  11. package/dist/lib/browser/{keyboard-JTQ2RGL7.mjs → keyboard-QDSNLHR3.mjs} +6 -6
  12. package/dist/lib/browser/keyboard-QDSNLHR3.mjs.map +7 -0
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/{react-context-IUBFXFFZ.mjs → react-context-HXORYGNN.mjs} +9 -8
  15. package/dist/lib/browser/react-context-HXORYGNN.mjs.map +7 -0
  16. package/dist/lib/browser/types/index.mjs +2 -2
  17. package/dist/lib/node-esm/{chunk-K3STXVKU.mjs → chunk-BH4E4TWY.mjs} +5 -5
  18. package/dist/lib/node-esm/chunk-BH4E4TWY.mjs.map +7 -0
  19. package/dist/lib/node-esm/{chunk-MS46IMND.mjs → chunk-JJFC7PBD.mjs} +5 -5
  20. package/dist/lib/node-esm/chunk-JJFC7PBD.mjs.map +7 -0
  21. package/dist/lib/node-esm/chunk-T6SUMOZA.mjs +17 -0
  22. package/dist/lib/node-esm/chunk-T6SUMOZA.mjs.map +7 -0
  23. package/dist/lib/node-esm/index.mjs +8 -11
  24. package/dist/lib/node-esm/index.mjs.map +3 -3
  25. package/dist/lib/node-esm/{intent-resolver-ELLJ67CV.mjs → intent-resolver-QAU7TPNB.mjs} +7 -7
  26. package/dist/lib/node-esm/intent-resolver-QAU7TPNB.mjs.map +7 -0
  27. package/dist/lib/node-esm/{keyboard-S7SW6XBY.mjs → keyboard-GWCD2NVU.mjs} +6 -6
  28. package/dist/lib/node-esm/keyboard-GWCD2NVU.mjs.map +7 -0
  29. package/dist/lib/node-esm/meta.json +1 -1
  30. package/dist/lib/node-esm/{react-context-2RSEVMNC.mjs → react-context-D5BP2M6I.mjs} +9 -8
  31. package/dist/lib/node-esm/react-context-D5BP2M6I.mjs.map +7 -0
  32. package/dist/lib/node-esm/types/index.mjs +2 -2
  33. package/dist/types/src/AttentionPlugin.d.ts +1 -1
  34. package/dist/types/src/AttentionPlugin.d.ts.map +1 -1
  35. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  36. package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
  37. package/dist/types/src/events.d.ts.map +1 -1
  38. package/dist/types/src/meta.d.ts +0 -1
  39. package/dist/types/src/meta.d.ts.map +1 -1
  40. package/dist/types/src/types/types.d.ts +3 -3
  41. package/dist/types/src/types/types.d.ts.map +1 -1
  42. package/dist/types/tsconfig.tsbuildinfo +1 -1
  43. package/package.json +14 -14
  44. package/src/AttentionPlugin.ts +31 -32
  45. package/src/capabilities/capabilities.ts +3 -3
  46. package/src/capabilities/intent-resolver.ts +1 -1
  47. package/src/capabilities/keyboard.ts +1 -1
  48. package/src/capabilities/react-context.tsx +4 -3
  49. package/src/events.ts +2 -2
  50. package/src/meta.ts +6 -3
  51. package/src/types/types.ts +3 -3
  52. package/dist/lib/browser/chunk-DF2PBRKK.mjs +0 -12
  53. package/dist/lib/browser/chunk-DF2PBRKK.mjs.map +0 -7
  54. package/dist/lib/browser/chunk-LRNGQJHD.mjs +0 -16
  55. package/dist/lib/browser/chunk-LRNGQJHD.mjs.map +0 -7
  56. package/dist/lib/browser/chunk-WOQAO42V.mjs.map +0 -7
  57. package/dist/lib/browser/intent-resolver-E7G6R755.mjs.map +0 -7
  58. package/dist/lib/browser/keyboard-JTQ2RGL7.mjs.map +0 -7
  59. package/dist/lib/browser/react-context-IUBFXFFZ.mjs.map +0 -7
  60. package/dist/lib/node-esm/chunk-K3STXVKU.mjs.map +0 -7
  61. package/dist/lib/node-esm/chunk-MS46IMND.mjs.map +0 -7
  62. package/dist/lib/node-esm/chunk-YUJM7ABN.mjs +0 -14
  63. package/dist/lib/node-esm/chunk-YUJM7ABN.mjs.map +0 -7
  64. package/dist/lib/node-esm/intent-resolver-ELLJ67CV.mjs.map +0 -7
  65. package/dist/lib/node-esm/keyboard-S7SW6XBY.mjs.map +0 -7
  66. package/dist/lib/node-esm/react-context-2RSEVMNC.mjs.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-attention",
3
- "version": "0.8.4-main.e098934",
3
+ "version": "0.8.4-main.e8ec1fe",
4
4
  "description": "Plugin for attention",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -36,24 +36,24 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@preact-signals/safe-react": "^0.9.0",
39
- "@preact/signals-core": "^1.9.0",
40
- "effect": "3.17.7",
41
- "@dxos/app-framework": "0.8.4-main.e098934",
42
- "@dxos/echo": "0.8.4-main.e098934",
43
- "@dxos/keyboard": "0.8.4-main.e098934",
44
- "@dxos/echo-schema": "0.8.4-main.e098934",
45
- "@dxos/echo-signals": "0.8.4-main.e098934",
46
- "@dxos/react-ui-attention": "0.8.4-main.e098934"
39
+ "@preact/signals-core": "^1.12.1",
40
+ "effect": "3.18.3",
41
+ "@dxos/app-framework": "0.8.4-main.e8ec1fe",
42
+ "@dxos/echo": "0.8.4-main.e8ec1fe",
43
+ "@dxos/keyboard": "0.8.4-main.e8ec1fe",
44
+ "@dxos/util": "0.8.4-main.e8ec1fe",
45
+ "@dxos/echo-signals": "0.8.4-main.e8ec1fe",
46
+ "@dxos/react-ui-attention": "0.8.4-main.e8ec1fe"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/react": "~18.2.0",
50
- "react": "~18.2.0",
51
- "react-dom": "~18.2.0"
49
+ "@types/react": "~19.2.2",
50
+ "react": "~19.2.0",
51
+ "react-dom": "~19.2.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "effect": "^3.13.3",
55
- "react": "~18.2.0",
56
- "react-dom": "~18.2.0"
55
+ "react": "^19.0.0",
56
+ "react-dom": "^19.0.0"
57
57
  },
58
58
  "publishConfig": {
59
59
  "access": "public"
@@ -9,38 +9,37 @@ import { AttentionCapabilities, IntentResolver, Keyboard, ReactContext } from '.
9
9
  import { AttentionEvents } from './events';
10
10
  import { meta } from './meta';
11
11
 
12
- export const AttentionPlugin = () =>
13
- definePlugin(meta, [
14
- defineModule({
15
- id: `${meta.id}/module/attention`,
16
- activatesOn: Events.Startup,
17
- activatesAfter: [AttentionEvents.AttentionReady],
18
- activate: () => {
19
- const attention = new AttentionManager();
20
- const selection = new SelectionManager();
21
- setupDevtools(attention);
22
- return [
23
- contributes(AttentionCapabilities.Attention, attention),
24
- contributes(AttentionCapabilities.Selection, selection),
25
- ];
26
- },
27
- }),
28
- defineModule({
29
- id: `${meta.id}/module/react-context`,
30
- activatesOn: Events.Startup,
31
- activate: ReactContext,
32
- }),
33
- defineModule({
34
- id: `${meta.id}/module/keyboard`,
35
- activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),
36
- activate: Keyboard,
37
- }),
38
- defineModule({
39
- id: `${meta.id}/module/intent-resolver`,
40
- activatesOn: Events.SetupIntentResolver,
41
- activate: IntentResolver,
42
- }),
43
- ]);
12
+ export const AttentionPlugin = definePlugin(meta, () => [
13
+ defineModule({
14
+ id: `${meta.id}/module/attention`,
15
+ activatesOn: Events.Startup,
16
+ activatesAfter: [AttentionEvents.AttentionReady],
17
+ activate: () => {
18
+ const attention = new AttentionManager();
19
+ const selection = new SelectionManager();
20
+ setupDevtools(attention);
21
+ return [
22
+ contributes(AttentionCapabilities.Attention, attention),
23
+ contributes(AttentionCapabilities.Selection, selection),
24
+ ];
25
+ },
26
+ }),
27
+ defineModule({
28
+ id: `${meta.id}/module/react-context`,
29
+ activatesOn: Events.Startup,
30
+ activate: ReactContext,
31
+ }),
32
+ defineModule({
33
+ id: `${meta.id}/module/keyboard`,
34
+ activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),
35
+ activate: Keyboard,
36
+ }),
37
+ defineModule({
38
+ id: `${meta.id}/module/intent-resolver`,
39
+ activatesOn: Events.SetupIntentResolver,
40
+ activate: IntentResolver,
41
+ }),
42
+ ]);
44
43
 
45
44
  const setupDevtools = (attention: AttentionManager) => {
46
45
  (globalThis as any).composer ??= {};
@@ -5,9 +5,9 @@
5
5
  import { defineCapability } from '@dxos/app-framework';
6
6
  import { type AttentionManager, type SelectionManager } from '@dxos/react-ui-attention';
7
7
 
8
- import { ATTENTION_PLUGIN } from '../meta';
8
+ import { meta } from '../meta';
9
9
 
10
10
  export namespace AttentionCapabilities {
11
- export const Attention = defineCapability<AttentionManager>(`${ATTENTION_PLUGIN}/capability/attention`);
12
- export const Selection = defineCapability<SelectionManager>(`${ATTENTION_PLUGIN}/capability/selection`);
11
+ export const Attention = defineCapability<AttentionManager>(`${meta.id}/capability/attention`);
12
+ export const Selection = defineCapability<SelectionManager>(`${meta.id}/capability/selection`);
13
13
  }
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Match } from 'effect';
5
+ import * as Match from 'effect/Match';
6
6
 
7
7
  import { Capabilities, type PluginContext, contributes, createResolver } from '@dxos/app-framework';
8
8
  import { type Selection } from '@dxos/react-ui-attention';
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import { effect } from '@preact/signals-core';
6
- import { Option } from 'effect';
6
+ import * as Option from 'effect/Option';
7
7
 
8
8
  import { Capabilities as AppCapabilities, type PluginContext, contributes } from '@dxos/app-framework';
9
9
  import { Keyboard } from '@dxos/keyboard';
@@ -4,16 +4,17 @@
4
4
 
5
5
  import React, { type PropsWithChildren } from 'react';
6
6
 
7
- import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
7
+ import { Capabilities, contributes } from '@dxos/app-framework';
8
+ import { useCapability } from '@dxos/app-framework/react';
8
9
  import { RootAttentionProvider, SelectionProvider } from '@dxos/react-ui-attention';
9
10
 
10
- import { ATTENTION_PLUGIN } from '../meta';
11
+ import { meta } from '../meta';
11
12
 
12
13
  import { AttentionCapabilities } from './capabilities';
13
14
 
14
15
  export default () =>
15
16
  contributes(Capabilities.ReactContext, {
16
- id: ATTENTION_PLUGIN,
17
+ id: meta.id,
17
18
  context: (props: PropsWithChildren) => {
18
19
  const attention = useCapability(AttentionCapabilities.Attention);
19
20
  const selection = useCapability(AttentionCapabilities.Selection);
package/src/events.ts CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  import { defineEvent } from '@dxos/app-framework';
6
6
 
7
- import { ATTENTION_PLUGIN } from './meta';
7
+ import { meta } from './meta';
8
8
 
9
9
  export namespace AttentionEvents {
10
- export const AttentionReady = defineEvent(`${ATTENTION_PLUGIN}/event/attention-ready`);
10
+ export const AttentionReady = defineEvent(`${meta.id}/event/attention-ready`);
11
11
  }
package/src/meta.ts CHANGED
@@ -3,10 +3,13 @@
3
3
  //
4
4
 
5
5
  import { type PluginMeta } from '@dxos/app-framework';
6
-
7
- export const ATTENTION_PLUGIN = 'dxos.org/plugin/attention';
6
+ import { trim } from '@dxos/util';
8
7
 
9
8
  export const meta: PluginMeta = {
10
- id: ATTENTION_PLUGIN,
9
+ id: 'dxos.org/plugin/attention',
11
10
  name: 'Attention',
11
+ description: trim`
12
+ Track and manage focused attention on objects across your workspace.
13
+ Highlight items requiring action and coordinate team focus on priority work.
14
+ `,
12
15
  };
@@ -2,14 +2,14 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
 
7
7
  import { SelectionSchema } from '@dxos/react-ui-attention';
8
8
 
9
- import { ATTENTION_PLUGIN } from '../meta';
9
+ import { meta } from '../meta';
10
10
 
11
11
  export namespace AttentionAction {
12
- const ATTENTION_ACTION = `${ATTENTION_PLUGIN}/action`;
12
+ const ATTENTION_ACTION = `${meta.id}/action`;
13
13
 
14
14
  export class Select extends Schema.TaggedClass<Select>()(`${ATTENTION_ACTION}/select`, {
15
15
  input: Schema.Struct({
@@ -1,12 +0,0 @@
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
@@ -1,7 +0,0 @@
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,16 +0,0 @@
1
- import {
2
- ATTENTION_PLUGIN
3
- } from "./chunk-DF2PBRKK.mjs";
4
-
5
- // src/capabilities/capabilities.ts
6
- import { defineCapability } from "@dxos/app-framework";
7
- (function(AttentionCapabilities2) {
8
- AttentionCapabilities2.Attention = defineCapability(`${ATTENTION_PLUGIN}/capability/attention`);
9
- AttentionCapabilities2.Selection = defineCapability(`${ATTENTION_PLUGIN}/capability/selection`);
10
- })(AttentionCapabilities || (AttentionCapabilities = {}));
11
- var AttentionCapabilities;
12
-
13
- export {
14
- AttentionCapabilities
15
- };
16
- //# sourceMappingURL=chunk-LRNGQJHD.mjs.map
@@ -1,7 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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,7 +0,0 @@
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,7 +0,0 @@
1
- {
2
- "version": 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, 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
- "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
- }
@@ -1,7 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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,14 +0,0 @@
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
@@ -1,7 +0,0 @@
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,7 +0,0 @@
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,7 +0,0 @@
1
- {
2
- "version": 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, 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
- "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
- }
@@ -1,7 +0,0 @@
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
- }