@dxos/plugin-native 0.8.4-main.f5c0578 → 0.8.4-main.fcc0d83b33
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/browser/index.mjs +31 -45
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +18 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/types/src/NativePlugin.d.ts +2 -1
- package/dist/types/src/NativePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +4 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/ollama.d.ts +5 -4
- package/dist/types/src/capabilities/ollama.d.ts.map +1 -1
- package/dist/types/src/capabilities/spotlight-listener.d.ts +8 -0
- package/dist/types/src/capabilities/spotlight-listener.d.ts.map +1 -0
- package/dist/types/src/capabilities/updater.d.ts +3 -2
- package/dist/types/src/capabilities/updater.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +2 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +5 -6
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -19
- package/src/NativePlugin.tsx +25 -23
- package/src/capabilities/index.ts +4 -3
- package/src/capabilities/ollama.ts +32 -23
- package/src/capabilities/spotlight-listener.ts +58 -0
- package/src/capabilities/updater.ts +107 -57
- package/src/constants.ts +7 -0
- package/src/meta.ts +8 -5
- package/src/translations.ts +5 -5
- package/dist/lib/browser/chunk-E2JDGVJI.mjs +0 -12
- package/dist/lib/browser/chunk-E2JDGVJI.mjs.map +0 -7
- package/dist/lib/browser/ollama-MF7YNEDS.mjs +0 -73
- package/dist/lib/browser/ollama-MF7YNEDS.mjs.map +0 -7
- package/dist/lib/browser/updater-MCAQYHED.mjs +0 -133
- package/dist/lib/browser/updater-MCAQYHED.mjs.map +0 -7
|
@@ -1,51 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { lazy } from "@dxos/app-framework";
|
|
12
|
-
var Updater = lazy(() => import("./updater-MCAQYHED.mjs"));
|
|
13
|
-
var Ollama = lazy(() => import("./ollama-MF7YNEDS.mjs"));
|
|
14
|
-
|
|
15
|
-
// src/translations.ts
|
|
16
|
-
var translations = [
|
|
17
|
-
{
|
|
18
|
-
"en-US": {
|
|
19
|
-
[meta.id]: {
|
|
20
|
-
"update ready label": "Ready to update",
|
|
21
|
-
"update ready description": "A new version of Composer is available.",
|
|
22
|
-
"update label": "Update",
|
|
23
|
-
"update alt": "Relaunch the app to update"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
];
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { trim } from "@dxos/util";
|
|
3
|
+
var meta = {
|
|
4
|
+
id: "org.dxos.plugin.native",
|
|
5
|
+
name: "Native",
|
|
6
|
+
description: trim`
|
|
7
|
+
Native platform integration providing desktop-specific features and system-level capabilities.
|
|
8
|
+
Access native file dialogs, notifications, and OS integrations.
|
|
9
|
+
`
|
|
10
|
+
};
|
|
28
11
|
|
|
29
12
|
// src/NativePlugin.tsx
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
13
|
+
import { ActivationEvents, Plugin } from "@dxos/app-framework";
|
|
14
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
15
|
+
import { AssistantEvents } from "@dxos/plugin-assistant/types";
|
|
16
|
+
import { Ollama, SpotlightListener, Updater } from "#capabilities";
|
|
17
|
+
import { meta as meta2 } from "#meta";
|
|
18
|
+
import { translations } from "#translations";
|
|
19
|
+
var NativePlugin = Plugin.define(meta2).pipe(AppPlugin.addTranslationsModule({
|
|
20
|
+
translations
|
|
21
|
+
}), Plugin.addModule({
|
|
22
|
+
id: "spotlight-listener",
|
|
23
|
+
activatesOn: ActivationEvents.OperationInvokerReady,
|
|
24
|
+
activate: SpotlightListener
|
|
25
|
+
}), Plugin.addModule({
|
|
26
|
+
id: "updater",
|
|
27
|
+
activatesOn: ActivationEvents.OperationInvokerReady,
|
|
28
|
+
activate: Updater
|
|
29
|
+
}), Plugin.addModule({
|
|
30
|
+
id: "ollama",
|
|
31
|
+
activatesOn: AssistantEvents.SetupAiServiceProviders,
|
|
32
|
+
activate: Ollama
|
|
33
|
+
}), Plugin.make);
|
|
47
34
|
export {
|
|
48
|
-
NATIVE_PLUGIN,
|
|
49
35
|
NativePlugin,
|
|
50
36
|
meta
|
|
51
37
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../src/NativePlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.native',\n name: 'Native',\n description: trim`\n Native platform integration providing desktop-specific features and system-level capabilities.\n Access native file dialogs, notifications, and OS integrations.\n `,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ActivationEvents, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { AssistantEvents } from '@dxos/plugin-assistant/types';\n\nimport { Ollama, SpotlightListener, Updater } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const NativePlugin = Plugin.define(meta).pipe(\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'spotlight-listener',\n activatesOn: ActivationEvents.OperationInvokerReady,\n activate: SpotlightListener,\n }),\n Plugin.addModule({\n id: 'updater',\n activatesOn: ActivationEvents.OperationInvokerReady,\n activate: Updater,\n }),\n Plugin.addModule({\n id: 'ollama',\n activatesOn: AssistantEvents.SetupAiServiceProviders,\n activate: Ollama,\n }),\n Plugin.make,\n);\n"],
|
|
5
|
+
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;AAIf;;;ACVA,SAASK,kBAAkBC,cAAc;AACzC,SAASC,iBAAiB;AAC1B,SAASC,uBAAuB;AAEhC,SAASC,QAAQC,mBAAmBC,eAAe;AACnD,SAASC,QAAAA,aAAY;AACrB,SAASC,oBAAoB;AAEtB,IAAMC,eAAeR,OAAOS,OAAOH,KAAAA,EAAMI,KAC9CT,UAAUU,sBAAsB;EAAEJ;AAAa,CAAA,GAC/CP,OAAOY,UAAU;EACfC,IAAI;EACJC,aAAaf,iBAAiBgB;EAC9BC,UAAUZ;AACZ,CAAA,GACAJ,OAAOY,UAAU;EACfC,IAAI;EACJC,aAAaf,iBAAiBgB;EAC9BC,UAAUX;AACZ,CAAA,GACAL,OAAOY,UAAU;EACfC,IAAI;EACJC,aAAaZ,gBAAgBe;EAC7BD,UAAUb;AACZ,CAAA,GACAH,OAAOkB,IAAI;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "ActivationEvents", "Plugin", "AppPlugin", "AssistantEvents", "Ollama", "SpotlightListener", "Updater", "meta", "translations", "NativePlugin", "define", "pipe", "addTranslationsModule", "addModule", "id", "activatesOn", "OperationInvokerReady", "activate", "SetupAiServiceProviders", "make"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1308,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/NativePlugin.tsx":{"bytes":3388,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-assistant/types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":468,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/NativePlugin.tsx","kind":"import-statement","original":"./NativePlugin"}],"format":"esm"},"src/translations.ts":{"bytes":1532,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2342},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-assistant/types","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"exports":["NativePlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":293},"src/index.ts":{"bytesInOutput":0},"src/NativePlugin.tsx":{"bytesInOutput":805}},"bytes":1208},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":765},"dist/lib/browser/translations.mjs":{"imports":[{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":323}},"bytes":415}}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/translations.ts
|
|
2
|
+
import { meta } from "#meta";
|
|
3
|
+
var translations = [
|
|
4
|
+
{
|
|
5
|
+
"en-US": {
|
|
6
|
+
[meta.id]: {
|
|
7
|
+
"update-ready.label": "Ready to update",
|
|
8
|
+
"update-ready.description": "A new version of Composer is available.",
|
|
9
|
+
"update.label": "Update",
|
|
10
|
+
"update.alt": "Relaunch the app to update"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
export {
|
|
16
|
+
translations
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=translations.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'update-ready.label': 'Ready to update',\n 'update-ready.description': 'A new version of Composer is available.',\n 'update.label': 'Update',\n 'update.alt': 'Relaunch the app to update',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";AAMA,SAASA,YAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,KAAKE,EAAE,GAAG;QACT,sBAAsB;QACtB,4BAA4B;QAC5B,gBAAgB;QAChB,cAAc;MAChB;IACF;EACF;;",
|
|
6
|
+
"names": ["meta", "translations", "id"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativePlugin.d.ts","sourceRoot":"","sources":["../../../src/NativePlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NativePlugin.d.ts","sourceRoot":"","sources":["../../../src/NativePlugin.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAoB,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQ/D,eAAO,MAAM,YAAY,4BAkBxB,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Ollama:
|
|
1
|
+
import { Capability } from '@dxos/app-framework';
|
|
2
|
+
export declare const Ollama: Capability.LazyCapability<[], import("./ollama").OllamaCapabilities, Error>;
|
|
3
|
+
export declare const SpotlightListener: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<null>>, Error>;
|
|
4
|
+
export declare const Updater: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<null>> | undefined, Error>;
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,MAAM,6EAAsD,CAAC;AAC1E,eAAO,MAAM,iBAAiB,8FAA6E,CAAC;AAC5G,eAAO,MAAM,OAAO,0GAAwD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
4
|
+
export type OllamaCapabilities = Capability.Capability<typeof AppCapabilities.AiModelResolver>;
|
|
5
|
+
declare const _default: (props: []) => Effect.Effect<OllamaCapabilities, Error, Capability.Service>;
|
|
5
6
|
export default _default;
|
|
6
7
|
//# sourceMappingURL=ollama.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ollama.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/ollama.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ollama.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/ollama.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMpD,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
/**
|
|
4
|
+
* Listens for spotlight:invoke events from the popover window and dispatches the corresponding operation.
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<null>>, Error, Capability.Service>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=spotlight-listener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spotlight-listener.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/spotlight-listener.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAU/D;;GAEG"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<null>> | undefined, Error, Capability.Service>;
|
|
3
4
|
export default _default;
|
|
4
5
|
//# sourceMappingURL=updater.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updater.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/updater.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"updater.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/updater.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB,UAAU,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const meta: PluginMeta;
|
|
1
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
2
|
+
export declare const meta: Plugin.Meta;
|
|
4
3
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,IAOzB,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { meta } from './meta';
|
|
2
1
|
export declare const translations: [{
|
|
3
2
|
readonly 'en-US': {
|
|
4
|
-
readonly [
|
|
5
|
-
readonly 'update
|
|
6
|
-
readonly 'update
|
|
7
|
-
readonly 'update
|
|
8
|
-
readonly 'update
|
|
3
|
+
readonly [x: string]: {
|
|
4
|
+
readonly 'update-ready.label': 'Ready to update';
|
|
5
|
+
readonly 'update-ready.description': 'A new version of Composer is available.';
|
|
6
|
+
readonly 'update.label': 'Update';
|
|
7
|
+
readonly 'update.alt': 'Relaunch the app to update';
|
|
9
8
|
};
|
|
10
9
|
};
|
|
11
10
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;2CAIK,iBAAiB;iDACX,yCAAyC;qCACrD,QAAQ;mCACV,4BAA4B;;;EAInB,CAAC"}
|