@dxos/plugin-attention 0.8.3-staging.0fa589b → 0.8.4-main.03d5cd7b56
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.
- package/dist/lib/neutral/AttentionPlugin.mjs +9 -0
- package/dist/lib/neutral/AttentionPlugin.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +11 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-DPUSNLAH.mjs +60 -0
- package/dist/lib/neutral/chunk-DPUSNLAH.mjs.map +7 -0
- package/dist/lib/neutral/chunk-DTGSOFCE.mjs +41 -0
- package/dist/lib/neutral/chunk-DTGSOFCE.mjs.map +7 -0
- package/dist/lib/neutral/chunk-PT4QDAR2.mjs +18 -0
- package/dist/lib/neutral/chunk-PT4QDAR2.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QSTYRKHK.mjs +8 -0
- package/dist/lib/neutral/chunk-QSTYRKHK.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +15 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/keyboard-6CPNUR24.mjs +19 -0
- package/dist/lib/neutral/keyboard-6CPNUR24.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +7 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-O5PDEBTC.mjs +11 -0
- package/dist/lib/neutral/operation-handler-O5PDEBTC.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +7 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +15 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/{browser/react-context-NZGF7FD3.mjs → neutral/react-context-W7BGQDHK.mjs} +10 -11
- package/dist/lib/neutral/react-context-W7BGQDHK.mjs.map +7 -0
- package/dist/lib/neutral/select-CI2OLVWT.mjs +46 -0
- package/dist/lib/neutral/select-CI2OLVWT.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +7 -0
- package/dist/lib/neutral/testing.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +11 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/AttentionPlugin.d.ts +3 -1
- package/dist/types/src/AttentionPlugin.d.ts.map +1 -1
- package/dist/types/src/AttentionPlugin.test.d.ts +2 -0
- package/dist/types/src/AttentionPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts +3 -2
- package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context.d.ts +4 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/select.d.ts +5 -0
- package/dist/types/src/operations/select.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +7 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +32 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +59 -24
- package/src/AttentionPlugin.test.ts +32 -0
- package/src/AttentionPlugin.ts +40 -33
- package/src/capabilities/index.ts +8 -5
- package/src/capabilities/keyboard.ts +15 -16
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-context.tsx +29 -24
- package/src/index.ts +1 -5
- package/src/meta.ts +9 -5
- package/src/operations/index.ts +7 -0
- package/src/operations/select.ts +43 -0
- package/src/plugin.ts +11 -0
- package/src/testing.ts +7 -0
- package/src/types/capabilities.ts +13 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +7 -0
- package/src/types/types.ts +21 -0
- package/dist/lib/browser/chunk-YEQJ7A3R.mjs +0 -21
- package/dist/lib/browser/chunk-YEQJ7A3R.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -81
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/keyboard-XRG4AMLB.mjs +0 -27
- package/dist/lib/browser/keyboard-XRG4AMLB.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-context-NZGF7FD3.mjs.map +0 -7
- package/dist/lib/node/chunk-QVPXINV3.cjs +0 -43
- package/dist/lib/node/chunk-QVPXINV3.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -107
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/keyboard-KFM7CJVV.cjs +0 -43
- package/dist/lib/node/keyboard-KFM7CJVV.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-context-L5W4HPSA.cjs +0 -52
- package/dist/lib/node/react-context-L5W4HPSA.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-3T5SKJPF.mjs +0 -23
- package/dist/lib/node-esm/chunk-3T5SKJPF.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -82
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/keyboard-OPXHNWLR.mjs +0 -28
- package/dist/lib/node-esm/keyboard-OPXHNWLR.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-context-U5NGNO27.mjs +0 -28
- package/dist/lib/node-esm/react-context-U5NGNO27.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -6
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -13
- package/src/events.ts +0 -11
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ATTENTION_PLUGIN,
|
|
3
|
-
AttentionCapabilities,
|
|
4
|
-
meta
|
|
5
|
-
} from "./chunk-YEQJ7A3R.mjs";
|
|
6
|
-
|
|
7
|
-
// packages/plugins/plugin-attention/src/index.ts
|
|
8
|
-
export * from "@dxos/react-ui-attention";
|
|
9
|
-
|
|
10
|
-
// packages/plugins/plugin-attention/src/AttentionPlugin.ts
|
|
11
|
-
import { defineModule, definePlugin, Events, contributes, allOf } from "@dxos/app-framework";
|
|
12
|
-
import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
|
|
13
|
-
|
|
14
|
-
// packages/plugins/plugin-attention/src/capabilities/index.ts
|
|
15
|
-
import { lazy } from "@dxos/app-framework";
|
|
16
|
-
var Keyboard = lazy(() => import("./keyboard-XRG4AMLB.mjs"));
|
|
17
|
-
var ReactContext = lazy(() => import("./react-context-NZGF7FD3.mjs"));
|
|
18
|
-
|
|
19
|
-
// packages/plugins/plugin-attention/src/events.ts
|
|
20
|
-
import { defineEvent } from "@dxos/app-framework";
|
|
21
|
-
(function(AttentionEvents2) {
|
|
22
|
-
AttentionEvents2.AttentionReady = defineEvent(`${ATTENTION_PLUGIN}/event/attention-ready`);
|
|
23
|
-
})(AttentionEvents || (AttentionEvents = {}));
|
|
24
|
-
var AttentionEvents;
|
|
25
|
-
|
|
26
|
-
// packages/plugins/plugin-attention/src/AttentionPlugin.ts
|
|
27
|
-
var AttentionPlugin = () => definePlugin(meta, [
|
|
28
|
-
defineModule({
|
|
29
|
-
id: `${meta.id}/module/attention`,
|
|
30
|
-
activatesOn: Events.Startup,
|
|
31
|
-
activatesAfter: [
|
|
32
|
-
AttentionEvents.AttentionReady
|
|
33
|
-
],
|
|
34
|
-
activate: () => {
|
|
35
|
-
const attention = new AttentionManager();
|
|
36
|
-
const selection = new SelectionManager();
|
|
37
|
-
setupDevtools(attention);
|
|
38
|
-
return [
|
|
39
|
-
contributes(AttentionCapabilities.Attention, attention),
|
|
40
|
-
contributes(AttentionCapabilities.Selection, selection)
|
|
41
|
-
];
|
|
42
|
-
}
|
|
43
|
-
}),
|
|
44
|
-
defineModule({
|
|
45
|
-
id: `${meta.id}/module/react-context`,
|
|
46
|
-
activatesOn: Events.Startup,
|
|
47
|
-
activate: ReactContext
|
|
48
|
-
}),
|
|
49
|
-
defineModule({
|
|
50
|
-
id: `${meta.id}/module/keyboard`,
|
|
51
|
-
activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),
|
|
52
|
-
activate: Keyboard
|
|
53
|
-
})
|
|
54
|
-
]);
|
|
55
|
-
var setupDevtools = (attention) => {
|
|
56
|
-
globalThis.composer ??= {};
|
|
57
|
-
globalThis.composer.attention = {
|
|
58
|
-
get manager() {
|
|
59
|
-
return attention;
|
|
60
|
-
},
|
|
61
|
-
get attended() {
|
|
62
|
-
return attention.current;
|
|
63
|
-
},
|
|
64
|
-
get currentSpace() {
|
|
65
|
-
for (const id of attention.current) {
|
|
66
|
-
const [spaceId, objectId] = id.split(":");
|
|
67
|
-
if (spaceId && objectId && spaceId.length === 33) {
|
|
68
|
-
return spaceId;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
export {
|
|
75
|
-
ATTENTION_PLUGIN,
|
|
76
|
-
AttentionCapabilities,
|
|
77
|
-
AttentionEvents,
|
|
78
|
-
AttentionPlugin,
|
|
79
|
-
meta
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=index.mjs.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,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"]
|
|
7
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AttentionCapabilities
|
|
3
|
-
} from "./chunk-YEQJ7A3R.mjs";
|
|
4
|
-
|
|
5
|
-
// packages/plugins/plugin-attention/src/capabilities/keyboard.ts
|
|
6
|
-
import { effect } from "@preact/signals-core";
|
|
7
|
-
import { Option } from "effect";
|
|
8
|
-
import { Capabilities as AppCapabilities, contributes } from "@dxos/app-framework";
|
|
9
|
-
import { Keyboard } from "@dxos/keyboard";
|
|
10
|
-
var keyboard_default = (context) => {
|
|
11
|
-
const { graph } = context.getCapability(AppCapabilities.AppGraph);
|
|
12
|
-
const attention = context.getCapability(AttentionCapabilities.Attention);
|
|
13
|
-
const unsubscribe = effect(() => {
|
|
14
|
-
const id = Array.from(attention.current)[0];
|
|
15
|
-
const path = id && graph.getPath({
|
|
16
|
-
target: id
|
|
17
|
-
}).pipe(Option.getOrNull);
|
|
18
|
-
if (path) {
|
|
19
|
-
Keyboard.singleton.setCurrentContext(path.join("/"));
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
return contributes(AppCapabilities.Null, null, () => unsubscribe());
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
keyboard_default as default
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=keyboard-XRG4AMLB.mjs.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,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;",
|
|
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 +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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4622},"packages/plugins/plugin-attention/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-attention/dist/lib/browser/chunk-YEQJ7A3R.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":"packages/plugins/plugin-attention/dist/lib/browser/keyboard-XRG4AMLB.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-attention/dist/lib/browser/react-context-NZGF7FD3.mjs","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/browser/keyboard-XRG4AMLB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1909},"packages/plugins/plugin-attention/dist/lib/browser/keyboard-XRG4AMLB.mjs":{"imports":[{"path":"packages/plugins/plugin-attention/dist/lib/browser/chunk-YEQJ7A3R.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":"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/browser/react-context-NZGF7FD3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2098},"packages/plugins/plugin-attention/dist/lib/browser/react-context-NZGF7FD3.mjs":{"imports":[{"path":"packages/plugins/plugin-attention/dist/lib/browser/chunk-YEQJ7A3R.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":"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/browser/chunk-YEQJ7A3R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1279},"packages/plugins/plugin-attention/dist/lib/browser/chunk-YEQJ7A3R.mjs":{"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,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,OAAOA,WAAuC;AAE9C,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,uBAAuBC,yBAAyB;AAKzD,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,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
|
-
}
|
package/dist/lib/node/index.cjs
DELETED
|
@@ -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
|
-
}
|
package/dist/lib/node/meta.json
DELETED
|
@@ -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
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// packages/plugins/plugin-attention/src/meta.ts
|
|
4
|
-
var ATTENTION_PLUGIN = "dxos.org/plugin/attention";
|
|
5
|
-
var meta = {
|
|
6
|
-
id: ATTENTION_PLUGIN,
|
|
7
|
-
name: "Attention"
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
// packages/plugins/plugin-attention/src/capabilities/capabilities.ts
|
|
11
|
-
import { defineCapability } from "@dxos/app-framework";
|
|
12
|
-
(function(AttentionCapabilities2) {
|
|
13
|
-
AttentionCapabilities2.Attention = defineCapability(`${ATTENTION_PLUGIN}/capability/attention`);
|
|
14
|
-
AttentionCapabilities2.Selection = defineCapability(`${ATTENTION_PLUGIN}/capability/selection`);
|
|
15
|
-
})(AttentionCapabilities || (AttentionCapabilities = {}));
|
|
16
|
-
var AttentionCapabilities;
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
ATTENTION_PLUGIN,
|
|
20
|
-
meta,
|
|
21
|
-
AttentionCapabilities
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=chunk-3T5SKJPF.mjs.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": ";;;AAMO,IAAMA,mBAAmB;AAEzB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;AACR;;;ACPA,SAASC,wBAAwB;UAKhBC,wBAAAA;yBACFC,YAAYC,iBAAmC,GAAGC,gBAAAA,uBAAuC;yBACzFC,YAAYF,iBAAmC,GAAGC,gBAAAA,uBAAuC;AACxG,GAHiBH,0BAAAA,wBAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["ATTENTION_PLUGIN", "meta", "id", "name", "defineCapability", "AttentionCapabilities", "Attention", "defineCapability", "ATTENTION_PLUGIN", "Selection"]
|
|
7
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ATTENTION_PLUGIN,
|
|
4
|
-
AttentionCapabilities,
|
|
5
|
-
meta
|
|
6
|
-
} from "./chunk-3T5SKJPF.mjs";
|
|
7
|
-
|
|
8
|
-
// packages/plugins/plugin-attention/src/index.ts
|
|
9
|
-
export * from "@dxos/react-ui-attention";
|
|
10
|
-
|
|
11
|
-
// packages/plugins/plugin-attention/src/AttentionPlugin.ts
|
|
12
|
-
import { defineModule, definePlugin, Events, contributes, allOf } from "@dxos/app-framework";
|
|
13
|
-
import { AttentionManager, SelectionManager } from "@dxos/react-ui-attention";
|
|
14
|
-
|
|
15
|
-
// packages/plugins/plugin-attention/src/capabilities/index.ts
|
|
16
|
-
import { lazy } from "@dxos/app-framework";
|
|
17
|
-
var Keyboard = lazy(() => import("./keyboard-OPXHNWLR.mjs"));
|
|
18
|
-
var ReactContext = lazy(() => import("./react-context-U5NGNO27.mjs"));
|
|
19
|
-
|
|
20
|
-
// packages/plugins/plugin-attention/src/events.ts
|
|
21
|
-
import { defineEvent } from "@dxos/app-framework";
|
|
22
|
-
(function(AttentionEvents2) {
|
|
23
|
-
AttentionEvents2.AttentionReady = defineEvent(`${ATTENTION_PLUGIN}/event/attention-ready`);
|
|
24
|
-
})(AttentionEvents || (AttentionEvents = {}));
|
|
25
|
-
var AttentionEvents;
|
|
26
|
-
|
|
27
|
-
// packages/plugins/plugin-attention/src/AttentionPlugin.ts
|
|
28
|
-
var AttentionPlugin = () => definePlugin(meta, [
|
|
29
|
-
defineModule({
|
|
30
|
-
id: `${meta.id}/module/attention`,
|
|
31
|
-
activatesOn: Events.Startup,
|
|
32
|
-
activatesAfter: [
|
|
33
|
-
AttentionEvents.AttentionReady
|
|
34
|
-
],
|
|
35
|
-
activate: () => {
|
|
36
|
-
const attention = new AttentionManager();
|
|
37
|
-
const selection = new SelectionManager();
|
|
38
|
-
setupDevtools(attention);
|
|
39
|
-
return [
|
|
40
|
-
contributes(AttentionCapabilities.Attention, attention),
|
|
41
|
-
contributes(AttentionCapabilities.Selection, selection)
|
|
42
|
-
];
|
|
43
|
-
}
|
|
44
|
-
}),
|
|
45
|
-
defineModule({
|
|
46
|
-
id: `${meta.id}/module/react-context`,
|
|
47
|
-
activatesOn: Events.Startup,
|
|
48
|
-
activate: ReactContext
|
|
49
|
-
}),
|
|
50
|
-
defineModule({
|
|
51
|
-
id: `${meta.id}/module/keyboard`,
|
|
52
|
-
activatesOn: allOf(Events.AppGraphReady, AttentionEvents.AttentionReady),
|
|
53
|
-
activate: Keyboard
|
|
54
|
-
})
|
|
55
|
-
]);
|
|
56
|
-
var setupDevtools = (attention) => {
|
|
57
|
-
globalThis.composer ??= {};
|
|
58
|
-
globalThis.composer.attention = {
|
|
59
|
-
get manager() {
|
|
60
|
-
return attention;
|
|
61
|
-
},
|
|
62
|
-
get attended() {
|
|
63
|
-
return attention.current;
|
|
64
|
-
},
|
|
65
|
-
get currentSpace() {
|
|
66
|
-
for (const id of attention.current) {
|
|
67
|
-
const [spaceId, objectId] = id.split(":");
|
|
68
|
-
if (spaceId && objectId && spaceId.length === 33) {
|
|
69
|
-
return spaceId;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
export {
|
|
76
|
-
ATTENTION_PLUGIN,
|
|
77
|
-
AttentionCapabilities,
|
|
78
|
-
AttentionEvents,
|
|
79
|
-
AttentionPlugin,
|
|
80
|
-
meta
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=index.mjs.map
|