@dxos/plugin-native 0.9.0 → 0.9.1-main.c7dcc2e112
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/NativePlugin.mjs +2 -2
- package/dist/lib/neutral/NativePlugin.mjs.map +4 -4
- package/dist/lib/neutral/{NativeSettings-CLYG5TJH.mjs → NativeSettings-EYX4X3D3.mjs} +2 -2
- package/dist/lib/neutral/NativeSettings-EYX4X3D3.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +3 -3
- package/dist/lib/neutral/chunk-WU6IZ56J.mjs +43 -0
- package/dist/lib/neutral/chunk-WU6IZ56J.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +1 -1
- package/dist/lib/neutral/index.mjs +1 -1
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +1 -1
- package/dist/lib/neutral/{react-surface-ETNGHN4X.mjs → react-surface-BVH3ZPG5.mjs} +2 -2
- package/dist/lib/neutral/{react-surface-ETNGHN4X.mjs.map → react-surface-BVH3ZPG5.mjs.map} +3 -3
- package/dist/lib/neutral/{settings-HF6TQNU4.mjs → settings-S5MFUI42.mjs} +3 -3
- package/dist/lib/neutral/{settings-HF6TQNU4.mjs.map → settings-S5MFUI42.mjs.map} +3 -3
- package/dist/lib/neutral/translations.mjs +1 -1
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +2 -2
- package/dist/lib/neutral/types/index.mjs.map +3 -3
- package/dist/lib/neutral/{updater-JEBXWSSK.mjs → updater-5ETKR4S3.mjs} +6 -6
- package/dist/lib/neutral/{updater-JEBXWSSK.mjs.map → updater-5ETKR4S3.mjs.map} +2 -2
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +28 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types/NativeCapabilities.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +32 -0
- package/package.json +15 -14
- package/src/NativePlugin.tsx +1 -1
- package/src/capabilities/react-surface.tsx +1 -1
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/updater.ts +5 -5
- package/src/components/NativeSettings/NativeSettings.tsx +1 -1
- package/src/meta.ts +3 -25
- package/src/translations.ts +1 -1
- package/src/types/NativeCapabilities.ts +6 -2
- package/dist/lib/neutral/NativeSettings-CLYG5TJH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-75E24KAJ.mjs +0 -34
- package/dist/lib/neutral/chunk-75E24KAJ.mjs.map +0 -7
|
@@ -198,30 +198,30 @@ var updater_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
|
198
198
|
return true;
|
|
199
199
|
}
|
|
200
200
|
yield* invoke(LayoutOperation.AddToast, {
|
|
201
|
-
id: `${meta.
|
|
201
|
+
id: `${meta.profile.key}.update-ready`,
|
|
202
202
|
title: [
|
|
203
203
|
"update-ready.label",
|
|
204
204
|
{
|
|
205
|
-
ns: meta.
|
|
205
|
+
ns: meta.profile.key
|
|
206
206
|
}
|
|
207
207
|
],
|
|
208
208
|
description: [
|
|
209
209
|
"update-ready.description",
|
|
210
210
|
{
|
|
211
|
-
ns: meta.
|
|
211
|
+
ns: meta.profile.key
|
|
212
212
|
}
|
|
213
213
|
],
|
|
214
214
|
duration: Infinity,
|
|
215
215
|
actionLabel: [
|
|
216
216
|
"update.label",
|
|
217
217
|
{
|
|
218
|
-
ns: meta.
|
|
218
|
+
ns: meta.profile.key
|
|
219
219
|
}
|
|
220
220
|
],
|
|
221
221
|
actionAlt: [
|
|
222
222
|
"update.alt",
|
|
223
223
|
{
|
|
224
|
-
ns: meta.
|
|
224
|
+
ns: meta.profile.key
|
|
225
225
|
}
|
|
226
226
|
],
|
|
227
227
|
onAction: () => relaunch()
|
|
@@ -241,4 +241,4 @@ var updater_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
|
241
241
|
export {
|
|
242
242
|
updater_default as default
|
|
243
243
|
};
|
|
244
|
-
//# sourceMappingURL=updater-
|
|
244
|
+
//# sourceMappingURL=updater-5ETKR4S3.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/updater.ts", "../../../src/constants.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport { type } from '@tauri-apps/plugin-os';\nimport { relaunch } from '@tauri-apps/plugin-process';\nimport * as Updater from '@tauri-apps/plugin-updater';\nimport * as Duration from 'effect/Duration';\nimport * as Effect from 'effect/Effect';\nimport * as Fiber from 'effect/Fiber';\nimport * as Match from 'effect/Match';\nimport * as Schedule from 'effect/Schedule';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { log } from '@dxos/log';\n\nimport { meta } from '#meta';\nimport { NativeCapabilities, type Update } from '#types';\n\nimport { TAURI_LOCALHOST_PORT } from '../constants';\n\nconst SUPPORTS_OTA = ['linux', 'macos', 'windows'];\n\n/** Safe wrapper around Updater.check(). Distinguishes \"no update\" (ok with null update) from a thrown error. */\nconst safeCheck = async (): Promise<{ ok: true; update: Updater.Update | null } | { ok: false; error: string }> => {\n try {\n return { ok: true, update: await Updater.check() };\n } catch (error) {\n log.error('failed to check for updates', { error });\n return { ok: false, error: formatError(error) };\n }\n};\n\n/** Safe wrapper around update.downloadAndInstall(). */\nconst safeDownloadAndInstall = async (\n update: Updater.Update,\n onEvent: (event: Updater.DownloadEvent) => void,\n): Promise<{ ok: true } | { ok: false; error: string }> => {\n try {\n await update.downloadAndInstall(onEvent);\n return { ok: true };\n } catch (error) {\n log.error('failed to download and install update', { error });\n return { ok: false, error: formatError(error) };\n }\n};\n\n/** Extract a user-readable error string from whatever the Tauri updater threw. */\nconst formatError = (error: unknown): string => {\n if (typeof error === 'string') {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return String(error);\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const platform = type();\n const isDevServer = window.location.port !== TAURI_LOCALHOST_PORT;\n const enabled = SUPPORTS_OTA.includes(platform) && !isDevServer;\n\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const { invoke } = yield* Capability.get(Capabilities.OperationInvoker);\n\n const statusAtom = Atom.make<Update.Status>(enabled ? { kind: 'idle' } : { kind: 'unsupported' }).pipe(\n Atom.keepAlive,\n );\n\n // Updater.Update is a class with instance methods (downloadAndInstall) and can't live in an\n // atom value; cache it here between check and install.\n let pendingUpdate: Updater.Update | null = null;\n\n // Core: check for an update and update the status atom. Returns the update if available.\n const doCheck = async (): Promise<Updater.Update | null> => {\n registry.set(statusAtom, { kind: 'checking' });\n log.info('checking for updates');\n const result = await safeCheck();\n if (!result.ok) {\n pendingUpdate = null;\n registry.set(statusAtom, { kind: 'failed', error: result.error });\n return null;\n }\n const update = result.update;\n if (!update?.available) {\n pendingUpdate = null;\n registry.set(statusAtom, { kind: 'up-to-date', checkedAt: Date.now() });\n return null;\n }\n log.info('update available', { version: update.version });\n pendingUpdate = update;\n registry.set(statusAtom, { kind: 'available', version: update.version });\n return update;\n };\n\n // Core: download + install the cached pending update, streaming progress to the status atom.\n const doInstall = async (): Promise<boolean> => {\n const update = pendingUpdate;\n if (!update) {\n return false;\n }\n let downloaded = 0;\n let contentLength = 0;\n registry.set(statusAtom, { kind: 'downloading', downloaded: 0, contentLength: 0 });\n const onEvent = Match.type<Updater.DownloadEvent>().pipe(\n Match.when({ event: 'Started' }, (event) => {\n contentLength = event.data.contentLength ?? 0;\n registry.set(statusAtom, { kind: 'downloading', downloaded, contentLength });\n }),\n Match.when({ event: 'Progress' }, (event) => {\n downloaded += event.data.chunkLength;\n registry.set(statusAtom, { kind: 'downloading', downloaded, contentLength });\n }),\n Match.when({ event: 'Finished' }, () => {\n log.info('download completed');\n }),\n Match.exhaustive,\n );\n const result = await safeDownloadAndInstall(update, onEvent);\n if (result.ok) {\n registry.set(statusAtom, { kind: 'ready' });\n return true;\n }\n registry.set(statusAtom, { kind: 'failed', error: result.error });\n return false;\n };\n\n const manager: Update.Manager = {\n status: statusAtom,\n check: async () => {\n if (!enabled) {\n return;\n }\n await doCheck();\n },\n install: async () => {\n if (!enabled) {\n return;\n }\n await doInstall();\n },\n relaunch: async () => {\n await relaunch();\n },\n };\n\n const managerContribution = Capability.contributes(NativeCapabilities.UpdateManager, manager);\n\n if (!enabled) {\n log.info('updater disabled', { platform, port: window.location.port });\n return [managerContribution];\n }\n\n // Background flow: periodic check + auto-install + toast when ready.\n // The toast is the entry point for users who weren't watching the settings panel.\n const backgroundAction = Effect.gen(function* () {\n const update = yield* Effect.promise(() => doCheck());\n if (!update) {\n return true;\n }\n const ok = yield* Effect.promise(() => doInstall());\n if (!ok) {\n return true;\n }\n yield* invoke(LayoutOperation.AddToast, {\n id: `${meta.
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,YAAY;AACrB,SAASC,YAAY;AACrB,SAASC,gBAAgB;AACzB,YAAYC,aAAa;AACzB,YAAYC,cAAc;AAC1B,YAAYC,YAAY;AACxB,YAAYC,WAAW;AACvB,YAAYC,WAAW;AACvB,YAAYC,cAAc;AAE1B,SAASC,cAAcC,kBAAkB;AACzC,SAASC,uBAAuB;AAChC,SAASC,WAAW;AAEpB,SAASC,YAAY;AACrB,SAASC,0BAAuC;;;ACbzC,IAAMC,uBAAuB;;;ADiBpC,IAAA,eAAMC;IAAyB,eAAA;EAAS;EAAU;EAElD;;AAGW,IAAA,YAAA,YAAA;;WAAYC;MAA8B,IAAA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CAAA;AACAL,aAASU;;aAAkCnB,IAAOiB,YAAY;MAAC,MAAA;MAC/D,OAAO,OAAA;IACT,CAAA;AAEA,WAAMU;;QAEJC,UAAO;YACD;uBACF;AACF,UAAA,CAAA,SAAA;AACA;MACF;AACAC,YAAS,QAAA;;aAEL,YAAA;AACF,UAAA,CAAA,SAAA;AACA;MACF;AACAC,YAAU,UAAA;;IAEV,UAAA,YAAA;AACF,YAAA,SAAA;IAEA;EAEA;QACE/B,sBAAS,WAAoB,YAAA,mBAAA,eAAA,OAAA;gBAAEgC;QAAUC,KAAAA,oBAAsBA;MAAK;MACpE,MAAO,OAAA,SAAA;qBAACC,YAAAA,GAAAA,cAAAA,GAAAA,KAAAA,GAAAA,KAAAA,CAAAA;WAAoB;MAC9B;IAEA;EACA;QAGE,mBAAa,WAAA,aAAA;UACX,SAAO,OAAA,eAAA,MAAA,QAAA,CAAA;AACT,QAAA,CAAA,QAAA;AACA,aAAW;IACX;UACE,KAAO,OAAA,eAAA,MAAA,UAAA,CAAA;AACT,QAAA,CAAA,IAAA;AACA,aAAOC;;WAELC,OAAO,gBAAA,UAAA;UAAC,GAAA,KAAA,
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport { type } from '@tauri-apps/plugin-os';\nimport { relaunch } from '@tauri-apps/plugin-process';\nimport * as Updater from '@tauri-apps/plugin-updater';\nimport * as Duration from 'effect/Duration';\nimport * as Effect from 'effect/Effect';\nimport * as Fiber from 'effect/Fiber';\nimport * as Match from 'effect/Match';\nimport * as Schedule from 'effect/Schedule';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { log } from '@dxos/log';\n\nimport { meta } from '#meta';\nimport { NativeCapabilities, type Update } from '#types';\n\nimport { TAURI_LOCALHOST_PORT } from '../constants';\n\nconst SUPPORTS_OTA = ['linux', 'macos', 'windows'];\n\n/** Safe wrapper around Updater.check(). Distinguishes \"no update\" (ok with null update) from a thrown error. */\nconst safeCheck = async (): Promise<{ ok: true; update: Updater.Update | null } | { ok: false; error: string }> => {\n try {\n return { ok: true, update: await Updater.check() };\n } catch (error) {\n log.error('failed to check for updates', { error });\n return { ok: false, error: formatError(error) };\n }\n};\n\n/** Safe wrapper around update.downloadAndInstall(). */\nconst safeDownloadAndInstall = async (\n update: Updater.Update,\n onEvent: (event: Updater.DownloadEvent) => void,\n): Promise<{ ok: true } | { ok: false; error: string }> => {\n try {\n await update.downloadAndInstall(onEvent);\n return { ok: true };\n } catch (error) {\n log.error('failed to download and install update', { error });\n return { ok: false, error: formatError(error) };\n }\n};\n\n/** Extract a user-readable error string from whatever the Tauri updater threw. */\nconst formatError = (error: unknown): string => {\n if (typeof error === 'string') {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return String(error);\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const platform = type();\n const isDevServer = window.location.port !== TAURI_LOCALHOST_PORT;\n const enabled = SUPPORTS_OTA.includes(platform) && !isDevServer;\n\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const { invoke } = yield* Capability.get(Capabilities.OperationInvoker);\n\n const statusAtom = Atom.make<Update.Status>(enabled ? { kind: 'idle' } : { kind: 'unsupported' }).pipe(\n Atom.keepAlive,\n );\n\n // Updater.Update is a class with instance methods (downloadAndInstall) and can't live in an\n // atom value; cache it here between check and install.\n let pendingUpdate: Updater.Update | null = null;\n\n // Core: check for an update and update the status atom. Returns the update if available.\n const doCheck = async (): Promise<Updater.Update | null> => {\n registry.set(statusAtom, { kind: 'checking' });\n log.info('checking for updates');\n const result = await safeCheck();\n if (!result.ok) {\n pendingUpdate = null;\n registry.set(statusAtom, { kind: 'failed', error: result.error });\n return null;\n }\n const update = result.update;\n if (!update?.available) {\n pendingUpdate = null;\n registry.set(statusAtom, { kind: 'up-to-date', checkedAt: Date.now() });\n return null;\n }\n log.info('update available', { version: update.version });\n pendingUpdate = update;\n registry.set(statusAtom, { kind: 'available', version: update.version });\n return update;\n };\n\n // Core: download + install the cached pending update, streaming progress to the status atom.\n const doInstall = async (): Promise<boolean> => {\n const update = pendingUpdate;\n if (!update) {\n return false;\n }\n let downloaded = 0;\n let contentLength = 0;\n registry.set(statusAtom, { kind: 'downloading', downloaded: 0, contentLength: 0 });\n const onEvent = Match.type<Updater.DownloadEvent>().pipe(\n Match.when({ event: 'Started' }, (event) => {\n contentLength = event.data.contentLength ?? 0;\n registry.set(statusAtom, { kind: 'downloading', downloaded, contentLength });\n }),\n Match.when({ event: 'Progress' }, (event) => {\n downloaded += event.data.chunkLength;\n registry.set(statusAtom, { kind: 'downloading', downloaded, contentLength });\n }),\n Match.when({ event: 'Finished' }, () => {\n log.info('download completed');\n }),\n Match.exhaustive,\n );\n const result = await safeDownloadAndInstall(update, onEvent);\n if (result.ok) {\n registry.set(statusAtom, { kind: 'ready' });\n return true;\n }\n registry.set(statusAtom, { kind: 'failed', error: result.error });\n return false;\n };\n\n const manager: Update.Manager = {\n status: statusAtom,\n check: async () => {\n if (!enabled) {\n return;\n }\n await doCheck();\n },\n install: async () => {\n if (!enabled) {\n return;\n }\n await doInstall();\n },\n relaunch: async () => {\n await relaunch();\n },\n };\n\n const managerContribution = Capability.contributes(NativeCapabilities.UpdateManager, manager);\n\n if (!enabled) {\n log.info('updater disabled', { platform, port: window.location.port });\n return [managerContribution];\n }\n\n // Background flow: periodic check + auto-install + toast when ready.\n // The toast is the entry point for users who weren't watching the settings panel.\n const backgroundAction = Effect.gen(function* () {\n const update = yield* Effect.promise(() => doCheck());\n if (!update) {\n return true;\n }\n const ok = yield* Effect.promise(() => doInstall());\n if (!ok) {\n return true;\n }\n yield* invoke(LayoutOperation.AddToast, {\n id: `${meta.profile.key}.update-ready`,\n title: ['update-ready.label', { ns: meta.profile.key }],\n description: ['update-ready.description', { ns: meta.profile.key }],\n duration: Infinity,\n actionLabel: ['update.label', { ns: meta.profile.key }],\n actionAlt: ['update.alt', { ns: meta.profile.key }],\n onAction: () => relaunch(),\n });\n return false;\n });\n\n const schedule = Schedule.fixed(Duration.hours(1)).pipe(\n Schedule.whileInput((keepChecking: boolean) => keepChecking),\n );\n const fiber = yield* backgroundAction.pipe(Effect.repeat(schedule), Effect.forkDaemon);\n log.info('updater module initialized, update check scheduled');\n\n return [\n managerContribution,\n // Return the interruption effect directly; Fiber.interrupt is async and would throw\n // AsyncFiberException if wrapped in Effect.runSync.\n Capability.contributes(Capabilities.Null, null, () => Fiber.interrupt(fiber)),\n ];\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/// Stable port for the Tauri localhost asset server in production builds.\n/// Must match LOCALHOST_PORT in src-tauri/src/lib.rs.\nexport const TAURI_LOCALHOST_PORT = '26777';\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,YAAY;AACrB,SAASC,YAAY;AACrB,SAASC,gBAAgB;AACzB,YAAYC,aAAa;AACzB,YAAYC,cAAc;AAC1B,YAAYC,YAAY;AACxB,YAAYC,WAAW;AACvB,YAAYC,WAAW;AACvB,YAAYC,cAAc;AAE1B,SAASC,cAAcC,kBAAkB;AACzC,SAASC,uBAAuB;AAChC,SAASC,WAAW;AAEpB,SAASC,YAAY;AACrB,SAASC,0BAAuC;;;ACbzC,IAAMC,uBAAuB;;;ADiBpC,IAAA,eAAMC;IAAyB,eAAA;EAAS;EAAU;EAElD;;AAGW,IAAA,YAAA,YAAA;;WAAYC;MAA8B,IAAA;MACjD,QAAc,MAAA,cAAA;IACdC;WAA2CC,OAAAA;AAAM,QAAA,MAAA,+BAAA;MACjD;qBAAa,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,OAAA,CAAA;WAAOA;MAA0B,IAAA;MAChD,OAAA,YAAA,KAAA;IACF;EAEA;;AAMoCC,IAAAA,yBAAAA,OAAAA,QAAAA,YAAAA;MAChC;UAASC,OAAI,mBAAA,OAAA;AAAK,WAAA;MAClB,IAAOF;IACPD;WAAqDC,OAAAA;AAAM,QA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AAA,OAAA;gBAAEgC;QAAUC,KAAAA,oBAAsBA;MAAK;MACpE,MAAO,OAAA,SAAA;qBAACC,YAAAA,GAAAA,cAAAA,GAAAA,KAAAA,GAAAA,KAAAA,CAAAA;WAAoB;MAC9B;IAEA;EACA;QAGE,mBAAa,WAAA,aAAA;UACX,SAAO,OAAA,eAAA,MAAA,QAAA,CAAA;AACT,QAAA,CAAA,QAAA;AACA,aAAW;IACX;UACE,KAAO,OAAA,eAAA,MAAA,UAAA,CAAA;AACT,QAAA,CAAA,IAAA;AACA,aAAOC;;WAELC,OAAO,gBAAA,UAAA;UAAC,GAAA,KAAA,QAAA,GAAA;aAAsB;;QAAuB;UAAE,IAAA,KAAA,QAAA;QACvDC;;mBAA0C;;QAAuB;UAAE,IAAA,KAAA,QAAA;QACnEC;MACAC;gBAAc;mBAAgB;;QAAuB;UAAE,IAAA,KAAA,QAAA;QACvDC;;iBAA0B;;QAAuB;UAAE,IAAA,KAAA,QAAA;QACnDC;MACF;MACA,UAAO,MAAA,SAAA;IACT,CAAA;AAEA,WAAMC;EAGN,CAAA;AACA1C,QAAIiB,WAAK,eAAA,eAAA,CAAA,CAAA,EAAA,KAAA,oBAAA,CAAA,iBAAA,YAAA,CAAA;AAET,QAAA,QAAO,OAAA,iBAAA,KAAA,cAAA,QAAA,GAAA,iBAAA;MACLiB,KAAAA,sDAAAA,QAAAA,EAAAA,YAAAA,YAAAA,GAAAA,cAAAA,GAAAA,KAAAA,GAAAA,KAAAA,CAAAA;SACA;IACA;;;IAIJ,WAAA,YAAA,aAAA,MAAA,MAAA,MAAA,gBAAA,KAAA,CAAA;;;",
|
|
6
6
|
"names": ["Atom", "type", "relaunch", "Updater", "Duration", "Effect", "Fiber", "Match", "Schedule", "Capabilities", "Capability", "LayoutOperation", "log", "meta", "NativeCapabilities", "TAURI_LOCALHOST_PORT", "SUPPORTS_OTA", "update", "log", "error", "onEvent", "ok", "String", "Capability", "isDevServer", "window", "TAURI_LOCALHOST_PORT", "enabled", "registry", "get", "Capabilities", "statusAtom", "make", "kind", "pipe", "info", "result", "pendingUpdate", "set", "checkedAt", "version", "downloaded", "contentLength", "Match", "event", "safeDownloadAndInstall", "manager", "check", "install", "relaunch", "platform", "port", "managerContribution", "invoke", "title", "description", "duration", "actionLabel", "actionAlt", "onAction", "schedule"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
readonly plugin: {
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly description?: string | undefined;
|
|
6
|
+
readonly author?: string | undefined;
|
|
7
|
+
readonly homePage?: string | undefined;
|
|
8
|
+
readonly source?: string | undefined;
|
|
9
|
+
readonly screenshots?: readonly {
|
|
10
|
+
readonly light?: string | undefined;
|
|
11
|
+
readonly dark?: string | undefined;
|
|
12
|
+
}[] | undefined;
|
|
13
|
+
readonly tags?: readonly string[] | undefined;
|
|
14
|
+
readonly icon?: {
|
|
15
|
+
readonly key: string;
|
|
16
|
+
readonly hue?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
readonly spec?: string | undefined;
|
|
19
|
+
readonly dependsOn?: readonly string[] | undefined;
|
|
20
|
+
};
|
|
21
|
+
readonly publish?: {
|
|
22
|
+
readonly buildCommand?: string | undefined;
|
|
23
|
+
readonly outputDirectory?: string | undefined;
|
|
24
|
+
readonly assetBaseUrl?: string | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
28
|
+
//# sourceMappingURL=dx.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dx.config.d.ts","sourceRoot":"","sources":["../../dx.config.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Capability } from '@dxos/app-framework';
|
|
2
|
-
export declare const NativeSettings: Capability.LazyCapability<void,
|
|
3
|
-
export declare const Ollama: Capability.LazyCapability<[],
|
|
4
|
-
export declare const ReactSurface: Capability.LazyCapability<void, Capability.
|
|
5
|
-
export declare const SpotlightListener: Capability.LazyCapability<void, Capability.
|
|
6
|
-
export declare const Updater: Capability.LazyCapability<void,
|
|
2
|
+
export declare const NativeSettings: Capability.LazyCapability<void, Capability.ModuleReturn, Error>;
|
|
3
|
+
export declare const Ollama: Capability.LazyCapability<[], Capability.ModuleReturn, Error>;
|
|
4
|
+
export declare const ReactSurface: Capability.LazyCapability<void, Capability.ModuleReturn, Error>;
|
|
5
|
+
export declare const SpotlightListener: Capability.LazyCapability<void, Capability.ModuleReturn, Error>;
|
|
6
|
+
export declare const Updater: Capability.LazyCapability<void, Capability.ModuleReturn, Error>;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,cAAc,
|
|
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,cAAc,iEAAgE,CAAC;AAC5F,eAAO,MAAM,MAAM,+DAAsD,CAAC;AAC1E,eAAO,MAAM,YAAY,iEAAmE,CAAC;AAC7F,eAAO,MAAM,iBAAiB,iEAA6E,CAAC;AAC5G,eAAO,MAAM,OAAO,iEAAwD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<any>>, never, never>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const meta: {
|
|
2
|
+
readonly profile: {
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly description?: string | undefined;
|
|
6
|
+
readonly homePage?: string | undefined;
|
|
7
|
+
readonly source?: string | undefined;
|
|
8
|
+
readonly tags?: readonly string[] | undefined;
|
|
9
|
+
readonly screenshots?: readonly {
|
|
10
|
+
readonly light?: string | undefined;
|
|
11
|
+
readonly dark?: string | undefined;
|
|
12
|
+
}[] | undefined;
|
|
13
|
+
readonly icon?: {
|
|
14
|
+
readonly key: string;
|
|
15
|
+
readonly hue?: string | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly dependsOn?: readonly string[] | undefined;
|
|
18
|
+
readonly spec?: string | undefined;
|
|
19
|
+
readonly author?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
readonly release?: {
|
|
22
|
+
readonly version: string;
|
|
23
|
+
readonly moduleUrl: string;
|
|
24
|
+
readonly dependencies?: {
|
|
25
|
+
readonly [x: string]: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
};
|
|
3
29
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeCapabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/NativeCapabilities.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMjD,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"NativeCapabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/NativeCapabilities.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMjD,eAAO,MAAM,QAAQ,sGAEpB,CAAC;AACF,eAAO,MAAM,aAAa,qDAEzB,CAAC"}
|