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

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 (27) hide show
  1. package/dist/lib/browser/{chunk-YEQJ7A3R.mjs → chunk-O6FNOKYX.mjs} +3 -3
  2. package/dist/lib/browser/index.mjs +8 -8
  3. package/dist/lib/browser/{keyboard-XRG4AMLB.mjs → keyboard-IYF35Z4E.mjs} +3 -3
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/browser/{react-context-NZGF7FD3.mjs → react-context-JVGQB2CO.mjs} +3 -3
  6. package/dist/lib/node-esm/{chunk-3T5SKJPF.mjs → chunk-SVV7GQYN.mjs} +3 -3
  7. package/dist/lib/node-esm/index.mjs +8 -8
  8. package/dist/lib/node-esm/{keyboard-OPXHNWLR.mjs → keyboard-GSUNGWNE.mjs} +3 -3
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/lib/node-esm/{react-context-U5NGNO27.mjs → react-context-SVXVOSRH.mjs} +3 -3
  11. package/dist/types/tsconfig.tsbuildinfo +1 -1
  12. package/package.json +8 -8
  13. package/dist/lib/node/chunk-QVPXINV3.cjs +0 -43
  14. package/dist/lib/node/chunk-QVPXINV3.cjs.map +0 -7
  15. package/dist/lib/node/index.cjs +0 -107
  16. package/dist/lib/node/index.cjs.map +0 -7
  17. package/dist/lib/node/keyboard-KFM7CJVV.cjs +0 -43
  18. package/dist/lib/node/keyboard-KFM7CJVV.cjs.map +0 -7
  19. package/dist/lib/node/meta.json +0 -1
  20. package/dist/lib/node/react-context-L5W4HPSA.cjs +0 -52
  21. package/dist/lib/node/react-context-L5W4HPSA.cjs.map +0 -7
  22. /package/dist/lib/browser/{chunk-YEQJ7A3R.mjs.map → chunk-O6FNOKYX.mjs.map} +0 -0
  23. /package/dist/lib/browser/{keyboard-XRG4AMLB.mjs.map → keyboard-IYF35Z4E.mjs.map} +0 -0
  24. /package/dist/lib/browser/{react-context-NZGF7FD3.mjs.map → react-context-JVGQB2CO.mjs.map} +0 -0
  25. /package/dist/lib/node-esm/{chunk-3T5SKJPF.mjs.map → chunk-SVV7GQYN.mjs.map} +0 -0
  26. /package/dist/lib/node-esm/{keyboard-OPXHNWLR.mjs.map → keyboard-GSUNGWNE.mjs.map} +0 -0
  27. /package/dist/lib/node-esm/{react-context-U5NGNO27.mjs.map → react-context-SVXVOSRH.mjs.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-attention",
3
- "version": "0.8.3",
3
+ "version": "0.8.4-main.f9ba587",
4
4
  "description": "Plugin for attention",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -26,13 +26,13 @@
26
26
  "dependencies": {
27
27
  "@preact-signals/safe-react": "^0.9.0",
28
28
  "@preact/signals-core": "^1.9.0",
29
- "effect": "3.14.21",
30
- "@dxos/app-framework": "0.8.3",
31
- "@dxos/echo": "0.8.3",
32
- "@dxos/echo-schema": "0.8.3",
33
- "@dxos/echo-signals": "0.8.3",
34
- "@dxos/keyboard": "0.8.3",
35
- "@dxos/react-ui-attention": "0.8.3"
29
+ "effect": "3.16.13",
30
+ "@dxos/app-framework": "0.8.4-main.f9ba587",
31
+ "@dxos/echo-schema": "0.8.4-main.f9ba587",
32
+ "@dxos/echo": "0.8.4-main.f9ba587",
33
+ "@dxos/echo-signals": "0.8.4-main.f9ba587",
34
+ "@dxos/keyboard": "0.8.4-main.f9ba587",
35
+ "@dxos/react-ui-attention": "0.8.4-main.f9ba587"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/react": "~18.2.0",
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_QVPXINV3_exports = {};
20
- __export(chunk_QVPXINV3_exports, {
21
- ATTENTION_PLUGIN: () => ATTENTION_PLUGIN,
22
- AttentionCapabilities: () => AttentionCapabilities,
23
- meta: () => meta
24
- });
25
- module.exports = __toCommonJS(chunk_QVPXINV3_exports);
26
- var import_app_framework = require("@dxos/app-framework");
27
- var ATTENTION_PLUGIN = "dxos.org/plugin/attention";
28
- var meta = {
29
- id: ATTENTION_PLUGIN,
30
- name: "Attention"
31
- };
32
- (function(AttentionCapabilities2) {
33
- AttentionCapabilities2.Attention = (0, import_app_framework.defineCapability)(`${ATTENTION_PLUGIN}/capability/attention`);
34
- AttentionCapabilities2.Selection = (0, import_app_framework.defineCapability)(`${ATTENTION_PLUGIN}/capability/selection`);
35
- })(AttentionCapabilities || (AttentionCapabilities = {}));
36
- var AttentionCapabilities;
37
- // Annotate the CommonJS export names for ESM import in node:
38
- 0 && (module.exports = {
39
- ATTENTION_PLUGIN,
40
- AttentionCapabilities,
41
- meta
42
- });
43
- //# sourceMappingURL=chunk-QVPXINV3.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts", "../../../src/capabilities/capabilities.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", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type SelectionManager, type AttentionManager } 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": ";;;;;;;;;;;;;;;;;;;;;;;;;ACIA,2BAAiC;ADE1B,IAAMA,mBAAmB;AAEzB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;AACR;UCFiBC,wBAAAA;yBACFC,gBAAYC,uCAAmC,GAAGN,gBAAAA,uBAAuC;yBACzFO,gBAAYD,uCAAmC,GAAGN,gBAAAA,uBAAuC;AACxG,GAHiBI,0BAAAA,wBAAAA,CAAAA,EAAAA;;",
6
- "names": ["ATTENTION_PLUGIN", "meta", "id", "name", "AttentionCapabilities", "Attention", "defineCapability", "Selection"]
7
- }
@@ -1,107 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
- var node_exports = {};
31
- __export(node_exports, {
32
- ATTENTION_PLUGIN: () => import_chunk_QVPXINV3.ATTENTION_PLUGIN,
33
- AttentionCapabilities: () => import_chunk_QVPXINV3.AttentionCapabilities,
34
- AttentionEvents: () => AttentionEvents,
35
- AttentionPlugin: () => AttentionPlugin,
36
- meta: () => import_chunk_QVPXINV3.meta
37
- });
38
- module.exports = __toCommonJS(node_exports);
39
- var import_chunk_QVPXINV3 = require("./chunk-QVPXINV3.cjs");
40
- __reExport(node_exports, require("@dxos/react-ui-attention"), module.exports);
41
- var import_app_framework = require("@dxos/app-framework");
42
- var import_react_ui_attention = require("@dxos/react-ui-attention");
43
- var import_app_framework2 = require("@dxos/app-framework");
44
- var import_app_framework3 = require("@dxos/app-framework");
45
- var Keyboard = (0, import_app_framework2.lazy)(() => import("./keyboard-KFM7CJVV.cjs"));
46
- var ReactContext = (0, import_app_framework2.lazy)(() => import("./react-context-L5W4HPSA.cjs"));
47
- (function(AttentionEvents2) {
48
- AttentionEvents2.AttentionReady = (0, import_app_framework3.defineEvent)(`${import_chunk_QVPXINV3.ATTENTION_PLUGIN}/event/attention-ready`);
49
- })(AttentionEvents || (AttentionEvents = {}));
50
- var AttentionEvents;
51
- var AttentionPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_QVPXINV3.meta, [
52
- (0, import_app_framework.defineModule)({
53
- id: `${import_chunk_QVPXINV3.meta.id}/module/attention`,
54
- activatesOn: import_app_framework.Events.Startup,
55
- activatesAfter: [
56
- AttentionEvents.AttentionReady
57
- ],
58
- activate: () => {
59
- const attention = new import_react_ui_attention.AttentionManager();
60
- const selection = new import_react_ui_attention.SelectionManager();
61
- setupDevtools(attention);
62
- return [
63
- (0, import_app_framework.contributes)(import_chunk_QVPXINV3.AttentionCapabilities.Attention, attention),
64
- (0, import_app_framework.contributes)(import_chunk_QVPXINV3.AttentionCapabilities.Selection, selection)
65
- ];
66
- }
67
- }),
68
- (0, import_app_framework.defineModule)({
69
- id: `${import_chunk_QVPXINV3.meta.id}/module/react-context`,
70
- activatesOn: import_app_framework.Events.Startup,
71
- activate: ReactContext
72
- }),
73
- (0, import_app_framework.defineModule)({
74
- id: `${import_chunk_QVPXINV3.meta.id}/module/keyboard`,
75
- activatesOn: (0, import_app_framework.allOf)(import_app_framework.Events.AppGraphReady, AttentionEvents.AttentionReady),
76
- activate: Keyboard
77
- })
78
- ]);
79
- var setupDevtools = (attention) => {
80
- globalThis.composer ??= {};
81
- globalThis.composer.attention = {
82
- get manager() {
83
- return attention;
84
- },
85
- get attended() {
86
- return attention.current;
87
- },
88
- get currentSpace() {
89
- for (const id of attention.current) {
90
- const [spaceId, objectId] = id.split(":");
91
- if (spaceId && objectId && spaceId.length === 33) {
92
- return spaceId;
93
- }
94
- }
95
- }
96
- };
97
- };
98
- // Annotate the CommonJS export names for ESM import in node:
99
- 0 && (module.exports = {
100
- ATTENTION_PLUGIN,
101
- AttentionCapabilities,
102
- AttentionEvents,
103
- AttentionPlugin,
104
- meta,
105
- ...require("@dxos/react-ui-attention")
106
- });
107
- //# sourceMappingURL=index.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/index.ts", "../../../src/AttentionPlugin.ts", "../../../src/capabilities/index.ts", "../../../src/events.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport * from '@dxos/react-ui-attention';\n\nexport * from './AttentionPlugin';\nexport { AttentionCapabilities } from './capabilities';\nexport * from './events';\nexport * from './meta';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineModule, definePlugin, Events, contributes, allOf } from '@dxos/app-framework';\nimport { AttentionManager, SelectionManager } from '@dxos/react-ui-attention';\n\nimport { AttentionCapabilities, Keyboard, ReactContext } from './capabilities';\nimport { AttentionEvents } from './events';\nimport { meta } from './meta';\n\nexport const AttentionPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/attention`,\n activatesOn: Events.Startup,\n activatesAfter: [AttentionEvents.AttentionReady],\n activate: () => {\n const attention = new AttentionManager();\n const selection = new SelectionManager();\n setupDevtools(attention);\n return [\n contributes(AttentionCapabilities.Attention, attention),\n contributes(AttentionCapabilities.Selection, selection),\n ];\n },\n }),\n defineModule({\n id: `${meta.id}/module/react-context`,\n activatesOn: Events.Startup,\n activate: ReactContext,\n }),\n defineModule({\n id: `${meta.id}/module/keyboard`,\n activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),\n activate: Keyboard,\n }),\n ]);\n\nconst setupDevtools = (attention: AttentionManager) => {\n (globalThis as any).composer ??= {};\n\n (globalThis as any).composer.attention = {\n get manager() {\n return attention;\n },\n get attended() {\n return attention.current;\n },\n get currentSpace() {\n for (const id of attention.current) {\n const [spaceId, objectId] = id.split(':');\n if (spaceId && objectId && spaceId.length === 33) {\n return spaceId;\n }\n }\n },\n };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const Keyboard = lazy(() => import('./keyboard'));\nexport const ReactContext = lazy(() => import('./react-context'));\n\nexport * from './capabilities';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineEvent } from '@dxos/app-framework';\n\nimport { ATTENTION_PLUGIN } from './meta';\n\nexport namespace AttentionEvents {\n export const AttentionReady = defineEvent(`${ATTENTION_PLUGIN}/event/attention-ready`);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,yBAAc;ACAd,2BAAuE;AACvE,gCAAmD;ACDnD,IAAAA,wBAAqB;ACArB,IAAAA,wBAA4B;ADErB,IAAMC,eAAWC,4BAAK,MAAM,OAAO,yBAAA,CAAA;AACnC,IAAMC,mBAAeD,4BAAK,MAAM,OAAO,8BAAA,CAAA;UCC7BE,kBAAAA;mBACFC,qBAAiBC,mCAAY,GAAGC,sCAAAA,wBAAwC;AACvF,GAFiBH,oBAAAA,kBAAAA,CAAAA,EAAAA;;AFGV,IAAMI,kBAAkB,UAC7BC,mCAAaC,4BAAM;MACjBC,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOC;IACpBC,gBAAgB;MAACZ,gBAAgBC;;IACjCY,UAAU,MAAA;AACR,YAAMC,YAAY,IAAIC,2CAAAA;AACtB,YAAMC,YAAY,IAAIC,2CAAAA;AACtBC,oBAAcJ,SAAAA;AACd,aAAO;YACLK,kCAAYC,4CAAsBC,WAAWP,SAAAA;YAC7CK,kCAAYC,4CAAsBE,WAAWN,SAAAA;;IAEjD;EACF,CAAA;MACAT,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOC;IACpBE,UAAUd;EACZ,CAAA;MACAQ,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,iBAAac,4BAAMb,4BAAOc,eAAexB,gBAAgBC,cAAc;IACvEY,UAAUhB;EACZ,CAAA;CACD;AAEH,IAAMqB,gBAAgB,CAACJ,cAAAA;AACpBW,aAAmBC,aAAa,CAAC;AAEjCD,aAAmBC,SAASZ,YAAY;IACvC,IAAIa,UAAU;AACZ,aAAOb;IACT;IACA,IAAIc,WAAW;AACb,aAAOd,UAAUe;IACnB;IACA,IAAIC,eAAe;AACjB,iBAAWtB,MAAMM,UAAUe,SAAS;AAClC,cAAM,CAACE,SAASC,QAAAA,IAAYxB,GAAGyB,MAAM,GAAA;AACrC,YAAIF,WAAWC,YAAYD,QAAQG,WAAW,IAAI;AAChD,iBAAOH;QACT;MACF;IACF;EACF;AACF;",
6
- "names": ["import_app_framework", "Keyboard", "lazy", "ReactContext", "AttentionEvents", "AttentionReady", "defineEvent", "ATTENTION_PLUGIN", "AttentionPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "Startup", "activatesAfter", "activate", "attention", "AttentionManager", "selection", "SelectionManager", "setupDevtools", "contributes", "AttentionCapabilities", "Attention", "Selection", "allOf", "AppGraphReady", "globalThis", "composer", "manager", "attended", "current", "currentSpace", "spaceId", "objectId", "split", "length"]
7
- }
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var keyboard_KFM7CJVV_exports = {};
20
- __export(keyboard_KFM7CJVV_exports, {
21
- default: () => keyboard_default
22
- });
23
- module.exports = __toCommonJS(keyboard_KFM7CJVV_exports);
24
- var import_chunk_QVPXINV3 = require("./chunk-QVPXINV3.cjs");
25
- var import_signals_core = require("@preact/signals-core");
26
- var import_effect = require("effect");
27
- var import_app_framework = require("@dxos/app-framework");
28
- var import_keyboard = require("@dxos/keyboard");
29
- var keyboard_default = (context) => {
30
- const { graph } = context.getCapability(import_app_framework.Capabilities.AppGraph);
31
- const attention = context.getCapability(import_chunk_QVPXINV3.AttentionCapabilities.Attention);
32
- const unsubscribe = (0, import_signals_core.effect)(() => {
33
- const id = Array.from(attention.current)[0];
34
- const path = id && graph.getPath({
35
- target: id
36
- }).pipe(import_effect.Option.getOrNull);
37
- if (path) {
38
- import_keyboard.Keyboard.singleton.setCurrentContext(path.join("/"));
39
- }
40
- });
41
- return (0, import_app_framework.contributes)(import_app_framework.Capabilities.Null, null, () => unsubscribe());
42
- };
43
- //# sourceMappingURL=keyboard-KFM7CJVV.cjs.map
@@ -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, 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,0BAAuB;AACvB,oBAAuB;AAEvB,2BAAiF;AACjF,sBAAyB;AAIzB,IAAA,mBAAe,CAACA,YAAAA;AACd,QAAM,EAAEC,MAAK,IAAKD,QAAQE,cAAcC,qBAAAA,aAAgBC,QAAQ;AAChE,QAAMC,YAAYL,QAAQE,cAAcI,4CAAsBC,SAAS;AAEvE,QAAMC,kBAAcC,4BAAO,MAAA;AACzB,UAAMC,KAAKC,MAAMC,KAAKP,UAAUQ,OAAO,EAAE,CAAA;AACzC,UAAMC,OAAOJ,MAAMT,MAAMc,QAAQ;MAAEC,QAAQN;IAAG,CAAA,EAAGO,KAAKC,qBAAOC,SAAS;AACtE,QAAIL,MAAM;AACRM,+BAASC,UAAUC,kBAAkBR,KAAKS,KAAK,GAAA,CAAA;IACjD;EACF,CAAA;AAEA,aAAOC,kCAAYrB,qBAAAA,aAAgBsB,MAAM,MAAM,MAAMjB,YAAAA,CAAAA;AACvD;",
6
- "names": ["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 +0,0 @@
1
- {"inputs":{"packages/plugins/plugin-attention/src/meta.ts":{"bytes":962,"imports":[],"format":"esm"},"packages/plugins/plugin-attention/src/capabilities/capabilities.ts":{"bytes":1805,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-attention/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-attention/src/capabilities/keyboard.ts":{"bytes":3540,"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":"packages/plugins/plugin-attention/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"}],"format":"esm"},"packages/plugins/plugin-attention/src/capabilities/react-context.tsx":{"bytes":4195,"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":"packages/plugins/plugin-attention/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-attention/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-attention/src/capabilities/index.ts":{"bytes":1111,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-attention/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-attention/src/capabilities/keyboard.ts","kind":"dynamic-import","original":"./keyboard"},{"path":"packages/plugins/plugin-attention/src/capabilities/react-context.tsx","kind":"dynamic-import","original":"./react-context"}],"format":"esm"},"packages/plugins/plugin-attention/src/events.ts":{"bytes":1251,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-attention/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-attention/src/AttentionPlugin.ts":{"bytes":6772,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-attention/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-attention/src/events.ts","kind":"import-statement","original":"./events"},{"path":"packages/plugins/plugin-attention/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-attention/src/index.ts":{"bytes":984,"imports":[{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-attention/src/AttentionPlugin.ts","kind":"import-statement","original":"./AttentionPlugin"},{"path":"packages/plugins/plugin-attention/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-attention/src/events.ts","kind":"import-statement","original":"./events"},{"path":"packages/plugins/plugin-attention/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-attention/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4622},"packages/plugins/plugin-attention/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-attention/dist/lib/node/chunk-QVPXINV3.cjs","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":"packages/plugins/plugin-attention/dist/lib/node/keyboard-KFM7CJVV.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-attention/dist/lib/node/react-context-L5W4HPSA.cjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["ATTENTION_PLUGIN","AttentionCapabilities","AttentionEvents","AttentionPlugin","meta"],"entryPoint":"packages/plugins/plugin-attention/src/index.ts","inputs":{"packages/plugins/plugin-attention/src/index.ts":{"bytesInOutput":42},"packages/plugins/plugin-attention/src/AttentionPlugin.ts":{"bytesInOutput":1435},"packages/plugins/plugin-attention/src/capabilities/index.ts":{"bytesInOutput":177},"packages/plugins/plugin-attention/src/events.ts":{"bytesInOutput":243}},"bytes":2415},"packages/plugins/plugin-attention/dist/lib/node/keyboard-KFM7CJVV.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1909},"packages/plugins/plugin-attention/dist/lib/node/keyboard-KFM7CJVV.cjs":{"imports":[{"path":"packages/plugins/plugin-attention/dist/lib/node/chunk-QVPXINV3.cjs","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":"packages/plugins/plugin-attention/src/capabilities/keyboard.ts","inputs":{"packages/plugins/plugin-attention/src/capabilities/keyboard.ts":{"bytesInOutput":725}},"bytes":945},"packages/plugins/plugin-attention/dist/lib/node/react-context-L5W4HPSA.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2098},"packages/plugins/plugin-attention/dist/lib/node/react-context-L5W4HPSA.cjs":{"imports":[{"path":"packages/plugins/plugin-attention/dist/lib/node/chunk-QVPXINV3.cjs","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":"packages/plugins/plugin-attention/src/capabilities/react-context.tsx","inputs":{"packages/plugins/plugin-attention/src/capabilities/react-context.tsx":{"bytesInOutput":701}},"bytes":957},"packages/plugins/plugin-attention/dist/lib/node/chunk-QVPXINV3.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1279},"packages/plugins/plugin-attention/dist/lib/node/chunk-QVPXINV3.cjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["ATTENTION_PLUGIN","AttentionCapabilities","meta"],"inputs":{"packages/plugins/plugin-attention/src/meta.ts":{"bytesInOutput":112},"packages/plugins/plugin-attention/src/capabilities/capabilities.ts":{"bytesInOutput":376}},"bytes":717}}}
@@ -1,52 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var react_context_L5W4HPSA_exports = {};
30
- __export(react_context_L5W4HPSA_exports, {
31
- default: () => react_context_default
32
- });
33
- module.exports = __toCommonJS(react_context_L5W4HPSA_exports);
34
- var import_chunk_QVPXINV3 = require("./chunk-QVPXINV3.cjs");
35
- var import_react = __toESM(require("react"));
36
- var import_app_framework = require("@dxos/app-framework");
37
- var import_react_ui_attention = require("@dxos/react-ui-attention");
38
- var react_context_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactContext, {
39
- id: import_chunk_QVPXINV3.ATTENTION_PLUGIN,
40
- context: (props) => {
41
- const attention = (0, import_app_framework.useCapability)(import_chunk_QVPXINV3.AttentionCapabilities.Attention);
42
- const selection = (0, import_app_framework.useCapability)(import_chunk_QVPXINV3.AttentionCapabilities.Selection);
43
- return /* @__PURE__ */ import_react.default.createElement(import_react_ui_attention.RootAttentionProvider, {
44
- attention,
45
- onChange: (nextAttended) => {
46
- }
47
- }, /* @__PURE__ */ import_react.default.createElement(import_react_ui_attention.SelectionProvider, {
48
- selection
49
- }, props.children));
50
- }
51
- });
52
- //# sourceMappingURL=react-context-L5W4HPSA.cjs.map
@@ -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 { AttentionCapabilities } from './capabilities';\nimport { ATTENTION_PLUGIN } from '../meta';\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,mBAA8C;AAE9C,2BAAyD;AACzD,gCAAyD;AAKzD,IAAA,wBAAe,UACbA,kCAAYC,kCAAaC,cAAc;EACrCC,IAAIC;EACJC,SAAS,CAACC,UAAAA;AACR,UAAMC,gBAAYC,oCAAcC,4CAAsBC,SAAS;AAC/D,UAAMC,gBAAYH,oCAAcC,4CAAsBG,SAAS;AAE/D,WACE,6BAAAC,QAAA,cAACC,iDAAAA;MACCP;MACAQ,UAAU,CAACC,iBAAAA;MAKX;OAEA,6BAAAH,QAAA,cAACI,6CAAAA;MAAkBN;OAAuBL,MAAMY,QAAQ,CAAA;EAG9D;AACF,CAAA;",
6
- "names": ["contributes", "Capabilities", "ReactContext", "id", "ATTENTION_PLUGIN", "context", "props", "attention", "useCapability", "AttentionCapabilities", "Attention", "selection", "Selection", "React", "RootAttentionProvider", "onChange", "nextAttended", "SelectionProvider", "children"]
7
- }