@dxos/plugin-native 0.8.4-main.3eb6e50203 → 0.8.4-main.4a85c3132b
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 +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{window-WKAABR3P.mjs → window-GKYYTCEI.mjs} +3 -3
- package/dist/lib/browser/{window-WKAABR3P.mjs.map → window-GKYYTCEI.mjs.map} +2 -2
- package/dist/types/src/capabilities/ollama/ollama.d.ts +1 -1
- package/dist/types/src/capabilities/updater/updater.d.ts +1 -1
- package/dist/types/src/capabilities/window/window.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/src/capabilities/window/window.ts +4 -4
|
@@ -12,7 +12,7 @@ var Updater = Capability2.lazy("Updater", () => import("./updater-AR27PYM4.mjs")
|
|
|
12
12
|
|
|
13
13
|
// src/capabilities/window/index.ts
|
|
14
14
|
import { Capability as Capability3 } from "@dxos/app-framework";
|
|
15
|
-
var Window = Capability3.lazy("Window", () => import("./window-
|
|
15
|
+
var Window = Capability3.lazy("Window", () => import("./window-GKYYTCEI.mjs"));
|
|
16
16
|
|
|
17
17
|
// src/NativePlugin.tsx
|
|
18
18
|
import { ActivationEvents, Plugin } from "@dxos/app-framework";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/capabilities/ollama/ollama.ts":{"bytes":10906,"imports":[{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-shell","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/ManagedRuntime","kind":"import-statement","external":true},{"path":"@dxos/ai/resolvers","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/log","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/ollama/index.ts":{"bytes":848,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/ollama/ollama.ts","kind":"dynamic-import","original":"./ollama"}],"format":"esm"},"src/meta.ts":{"bytes":1392,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/updater/updater.ts":{"bytes":16552,"imports":[{"path":"@tauri-apps/plugin-os","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-process","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-updater","kind":"import-statement","external":true},{"path":"effect/Duration","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Fiber","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"effect/Schedule","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/log","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/updater/index.ts":{"bytes":856,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/updater/updater.ts","kind":"dynamic-import","original":"./updater"}],"format":"esm"},"src/capabilities/window/window.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/capabilities/ollama/ollama.ts":{"bytes":10906,"imports":[{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-shell","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/ManagedRuntime","kind":"import-statement","external":true},{"path":"@dxos/ai/resolvers","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/log","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/ollama/index.ts":{"bytes":848,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/ollama/ollama.ts","kind":"dynamic-import","original":"./ollama"}],"format":"esm"},"src/meta.ts":{"bytes":1392,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/updater/updater.ts":{"bytes":16552,"imports":[{"path":"@tauri-apps/plugin-os","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-process","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-updater","kind":"import-statement","external":true},{"path":"effect/Duration","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Fiber","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"effect/Schedule","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/log","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/updater/index.ts":{"bytes":856,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/updater/updater.ts","kind":"dynamic-import","original":"./updater"}],"format":"esm"},"src/capabilities/window/window.ts":{"bytes":6830,"imports":[{"path":"@tauri-apps/api/window","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/window/index.ts":{"bytes":848,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/window/window.ts","kind":"dynamic-import","original":"./window"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":637,"imports":[{"path":"src/capabilities/ollama/index.ts","kind":"import-statement","original":"./ollama"},{"path":"src/capabilities/updater/index.ts","kind":"import-statement","original":"./updater"},{"path":"src/capabilities/window/index.ts","kind":"import-statement","original":"./window"}],"format":"esm"},"src/translations.ts":{"bytes":1625,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/NativePlugin.tsx":{"bytes":3376,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-assistant","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":649,"imports":[{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/NativePlugin.tsx","kind":"import-statement","original":"./NativePlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3415},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-6374DBU4.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/ollama-QOB3EVAJ.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/updater-AR27PYM4.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/window-GKYYTCEI.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-assistant","kind":"import-statement","external":true}],"exports":["NativePlugin","Ollama","Updater","Window","meta"],"entryPoint":"src/index.ts","inputs":{"src/capabilities/ollama/index.ts":{"bytesInOutput":129},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/updater/index.ts":{"bytesInOutput":148},"src/capabilities/window/index.ts":{"bytesInOutput":145},"src/index.ts":{"bytesInOutput":0},"src/NativePlugin.tsx":{"bytesInOutput":622},"src/translations.ts":{"bytesInOutput":293}},"bytes":1671},"dist/lib/browser/ollama-QOB3EVAJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5474},"dist/lib/browser/ollama-QOB3EVAJ.mjs":{"imports":[{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-shell","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/ManagedRuntime","kind":"import-statement","external":true},{"path":"@dxos/ai/resolvers","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/log","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/ollama/ollama.ts","inputs":{"src/capabilities/ollama/ollama.ts":{"bytesInOutput":2668}},"bytes":2790},"dist/lib/browser/updater-AR27PYM4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7410},"dist/lib/browser/updater-AR27PYM4.mjs":{"imports":[{"path":"dist/lib/browser/chunk-6374DBU4.mjs","kind":"import-statement"},{"path":"@tauri-apps/plugin-os","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-process","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-updater","kind":"import-statement","external":true},{"path":"effect/Duration","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Fiber","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"effect/Schedule","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/log","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/updater/updater.ts","inputs":{"src/capabilities/updater/updater.ts":{"bytesInOutput":4868}},"bytes":5042},"dist/lib/browser/chunk-6374DBU4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":662},"dist/lib/browser/chunk-6374DBU4.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":293}},"bytes":372},"dist/lib/browser/window-GKYYTCEI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3464},"dist/lib/browser/window-GKYYTCEI.mjs":{"imports":[{"path":"@tauri-apps/api/window","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/window/window.ts","inputs":{"src/capabilities/window/window.ts":{"bytesInOutput":1215}},"bytes":1337}}}
|
|
@@ -9,14 +9,14 @@ var window_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
|
9
9
|
cleanupDragRegions();
|
|
10
10
|
}));
|
|
11
11
|
}));
|
|
12
|
-
var INTERACTIVE_SELECTORS = '.app-no-drag, button, a, input, select, textarea, [role="button"], [role="menuitem"]';
|
|
12
|
+
var INTERACTIVE_SELECTORS = '.dx-app-no-drag, button, a, input, select, textarea, [role="button"], [role="menuitem"]';
|
|
13
13
|
var setupWindowDrag = (appWindow) => {
|
|
14
14
|
const handleMouseDown = (event) => {
|
|
15
15
|
const target = event.target;
|
|
16
16
|
if (!target) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
const dragElement = target.closest(".app-drag");
|
|
19
|
+
const dragElement = target.closest(".dx-app-drag");
|
|
20
20
|
if (!dragElement) {
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
@@ -35,4 +35,4 @@ var setupWindowDrag = (appWindow) => {
|
|
|
35
35
|
export {
|
|
36
36
|
window_default as default
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=window-
|
|
38
|
+
//# sourceMappingURL=window-GKYYTCEI.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/window/window.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { getCurrentWindow } from '@tauri-apps/api/window';\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\n\n/**\n * Window capability module.\n * Sets up window drag regions for Tauri windows.\n * Note: Window state persistence (size/position) is handled on the Rust side\n * in src-tauri/src/window_state.rs for instant restoration on startup.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const appWindow = getCurrentWindow();\n\n // Set up drag regions for window dragging.\n const cleanupDragRegions = setupWindowDrag(appWindow);\n\n return Capability.contributes(\n Capabilities.Null,\n null,\n Effect.fnUntraced(function* () {\n cleanupDragRegions();\n }),\n );\n }),\n);\n\n/**\n * Interactive element selectors that should not trigger window dragging.\n */\nconst INTERACTIVE_SELECTORS = '.app-no-drag, button, a, input, select, textarea, [role=\"button\"], [role=\"menuitem\"]';\n\n/**\n * Sets up window drag regions.\n *\n * Tauri 2.0 does not support the `-webkit-app-region` CSS property with overlay titlebars.\n * This uses the Tauri window API to enable dragging on elements with the `app-drag` class.\n */\nconst setupWindowDrag = (appWindow: ReturnType<typeof getCurrentWindow>): (() => void) => {\n const handleMouseDown = (event: MouseEvent) => {\n const target = event.target as Element | null;\n if (!target) {\n return;\n }\n\n // Check if the click target or any ancestor has the app-drag class.\n const dragElement = target.closest('.app-drag');\n if (!dragElement) {\n return;\n }\n\n // Don't trigger drag on interactive elements within the drag region.\n const interactiveElement = target.closest(INTERACTIVE_SELECTORS);\n if (interactiveElement && dragElement.contains(interactiveElement)) {\n return;\n }\n\n event.preventDefault();\n void appWindow.startDragging();\n };\n\n document.addEventListener('mousedown', handleMouseDown);\n\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,wBAAwB;AACjC,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AAQzC,IAAA,iBAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,YAAYC,iBAAAA;AAGlB,QAAMC,qBAAqBC,gBAAgBH,SAAAA;AAE3C,SAAOH,WAAWO,YAChBC,aAAaC,MACb,MACOP,kBAAW,aAAA;AAChBG,uBAAAA;EACF,CAAA,CAAA;AAEJ,CAAA,CAAA;AAMF,IAAMK,wBAAwB;AAQ9B,IAAMJ,kBAAkB,CAACH,cAAAA;AACvB,QAAMQ,kBAAkB,CAACC,UAAAA;AACvB,UAAMC,SAASD,MAAMC;AACrB,QAAI,CAACA,QAAQ;AACX;IACF;AAGA,UAAMC,cAAcD,OAAOE,QAAQ,
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { getCurrentWindow } from '@tauri-apps/api/window';\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\n\n/**\n * Window capability module.\n * Sets up window drag regions for Tauri windows.\n * Note: Window state persistence (size/position) is handled on the Rust side\n * in src-tauri/src/window_state.rs for instant restoration on startup.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const appWindow = getCurrentWindow();\n\n // Set up drag regions for window dragging.\n const cleanupDragRegions = setupWindowDrag(appWindow);\n\n return Capability.contributes(\n Capabilities.Null,\n null,\n Effect.fnUntraced(function* () {\n cleanupDragRegions();\n }),\n );\n }),\n);\n\n/**\n * Interactive element selectors that should not trigger window dragging.\n */\nconst INTERACTIVE_SELECTORS = '.dx-app-no-drag, button, a, input, select, textarea, [role=\"button\"], [role=\"menuitem\"]';\n\n/**\n * Sets up window drag regions.\n *\n * Tauri 2.0 does not support the `-webkit-app-region` CSS property with overlay titlebars.\n * This uses the Tauri window API to enable dragging on elements with the `dx-app-drag` class.\n */\nconst setupWindowDrag = (appWindow: ReturnType<typeof getCurrentWindow>): (() => void) => {\n const handleMouseDown = (event: MouseEvent) => {\n const target = event.target as Element | null;\n if (!target) {\n return;\n }\n\n // Check if the click target or any ancestor has the dx-app-drag class.\n const dragElement = target.closest('.dx-app-drag');\n if (!dragElement) {\n return;\n }\n\n // Don't trigger drag on interactive elements within the drag region.\n const interactiveElement = target.closest(INTERACTIVE_SELECTORS);\n if (interactiveElement && dragElement.contains(interactiveElement)) {\n return;\n }\n\n event.preventDefault();\n void appWindow.startDragging();\n };\n\n document.addEventListener('mousedown', handleMouseDown);\n\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,wBAAwB;AACjC,YAAYC,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AAQzC,IAAA,iBAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,YAAYC,iBAAAA;AAGlB,QAAMC,qBAAqBC,gBAAgBH,SAAAA;AAE3C,SAAOH,WAAWO,YAChBC,aAAaC,MACb,MACOP,kBAAW,aAAA;AAChBG,uBAAAA;EACF,CAAA,CAAA;AAEJ,CAAA,CAAA;AAMF,IAAMK,wBAAwB;AAQ9B,IAAMJ,kBAAkB,CAACH,cAAAA;AACvB,QAAMQ,kBAAkB,CAACC,UAAAA;AACvB,UAAMC,SAASD,MAAMC;AACrB,QAAI,CAACA,QAAQ;AACX;IACF;AAGA,UAAMC,cAAcD,OAAOE,QAAQ,cAAA;AACnC,QAAI,CAACD,aAAa;AAChB;IACF;AAGA,UAAME,qBAAqBH,OAAOE,QAAQL,qBAAAA;AAC1C,QAAIM,sBAAsBF,YAAYG,SAASD,kBAAAA,GAAqB;AAClE;IACF;AAEAJ,UAAMM,eAAc;AACpB,SAAKf,UAAUgB,cAAa;EAC9B;AAEAC,WAASC,iBAAiB,aAAaV,eAAAA;AAEvC,SAAO,MAAA;AACLS,aAASE,oBAAoB,aAAaX,eAAAA;EAC5C;AACF;",
|
|
6
6
|
"names": ["getCurrentWindow", "Effect", "Capabilities", "Capability", "Capability", "makeModule", "fnUntraced", "appWindow", "getCurrentWindow", "cleanupDragRegions", "setupWindowDrag", "contributes", "Capabilities", "Null", "INTERACTIVE_SELECTORS", "handleMouseDown", "event", "target", "dragElement", "closest", "interactiveElement", "contains", "preventDefault", "startDragging", "document", "addEventListener", "removeEventListener"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@ import * as Effect from 'effect/Effect';
|
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
3
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
4
4
|
export type OllamaCapabilities = Capability.Capability<typeof AppCapabilities.AiModelResolver>;
|
|
5
|
-
declare const _default: (props
|
|
5
|
+
declare const _default: (props: []) => Effect.Effect<OllamaCapabilities, Error, Capability.Service>;
|
|
6
6
|
export default _default;
|
|
7
7
|
//# sourceMappingURL=ollama.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
declare const _default: (props
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<null>> | undefined, Error, Capability.Service>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=updater.d.ts.map
|
|
@@ -6,6 +6,6 @@ import { Capability } from '@dxos/app-framework';
|
|
|
6
6
|
* Note: Window state persistence (size/position) is handled on the Rust side
|
|
7
7
|
* in src-tauri/src/window_state.rs for instant restoration on startup.
|
|
8
8
|
*/
|
|
9
|
-
declare const _default: (props
|
|
9
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<null>>, never, never>;
|
|
10
10
|
export default _default;
|
|
11
11
|
//# sourceMappingURL=window.d.ts.map
|