@omniviewdev/runtime 0.13.0 → 0.15.0
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/api.cjs +1 -1
- package/dist/api.d.ts +2 -2
- package/dist/api.js +199 -175
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/models.d.ts +18 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/settings/binding.d.ts +8 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/settings/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/settings/models.d.ts +33 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/profiling/servicewrapper.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/profiling/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/profiling/models.d.ts +12 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/models.d.ts +8 -0
- package/dist/context/plugins/usePluginContext.d.ts +0 -1
- package/dist/context/settings/SettingsContext.d.ts +0 -1
- package/dist/hooks/settings/index.d.ts +1 -0
- package/dist/hooks/settings/useScopedSettings.d.ts +30 -0
- package/dist/index.cjs +4 -4
- package/dist/index.js +1829 -1756
- package/dist/{models-Cg1YRHQm.js → models-BJgLAHwq.js} +1 -1
- package/dist/{models-UwESEW2B.js → models-BTzXdmUY.js} +183 -175
- package/dist/{models-dzj-SsFZ.cjs → models-BhsFYb70.cjs} +1 -1
- package/dist/models-NYvUa5Yc.cjs +1 -0
- package/dist/models.cjs +1 -1
- package/dist/models.js +8 -8
- package/dist/servicewrapper-CZ9BUUjp.js +662 -0
- package/dist/servicewrapper-lF8bBrIo.cjs +1 -0
- package/package.json +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/servicewrapper.d.ts +0 -19
- package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/index.d.ts +0 -2
- package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/servicewrapper.d.ts +0 -52
- package/dist/models-DSGyy8lg.cjs +0 -1
- package/dist/servicewrapper-BhxHs5DR.js +0 -688
- package/dist/servicewrapper-CNtZecKV.cjs +0 -1
- /package/dist/bindings/github.com/omniviewdev/omniview/{backend/pkg/plugin/settings → internal/profiling}/index.d.ts +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CancellablePromise as $CancellablePromise } from '@wailsio/runtime';
|
|
2
|
+
import * as settings$0 from "../../../../plugin-sdk/settings/models.js";
|
|
3
|
+
import * as $models from "./models.js";
|
|
4
|
+
export declare function Commit(scope: $models.Scope, values: {
|
|
5
|
+
[_ in string]?: any;
|
|
6
|
+
}): $CancellablePromise<$models.CommitResult>;
|
|
7
|
+
export declare function GetSnapshot(scope: $models.Scope): $CancellablePromise<$models.Snapshot>;
|
|
8
|
+
export declare function Validate(scope: $models.Scope, id: string, value: any): $CancellablePromise<settings$0.ValidationResult>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as settings$0 from "../../../../plugin-sdk/settings/models.js";
|
|
2
|
+
export declare class CommitResult {
|
|
3
|
+
"snapshot": Snapshot;
|
|
4
|
+
"applied": boolean;
|
|
5
|
+
"uncertain": boolean;
|
|
6
|
+
"message": string;
|
|
7
|
+
/** Creates a new CommitResult instance. */
|
|
8
|
+
constructor($$source?: Partial<CommitResult>);
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new CommitResult instance from a string or object.
|
|
11
|
+
*/
|
|
12
|
+
static createFrom($$source?: any): CommitResult;
|
|
13
|
+
}
|
|
14
|
+
export declare class Scope {
|
|
15
|
+
"kind": string;
|
|
16
|
+
"pluginId"?: string;
|
|
17
|
+
/** Creates a new Scope instance. */
|
|
18
|
+
constructor($$source?: Partial<Scope>);
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new Scope instance from a string or object.
|
|
21
|
+
*/
|
|
22
|
+
static createFrom($$source?: any): Scope;
|
|
23
|
+
}
|
|
24
|
+
export declare class Snapshot {
|
|
25
|
+
"scope": Scope;
|
|
26
|
+
"categories": settings$0.Store;
|
|
27
|
+
/** Creates a new Snapshot instance. */
|
|
28
|
+
constructor($$source?: Partial<Snapshot>);
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new Snapshot instance from a string or object.
|
|
31
|
+
*/
|
|
32
|
+
static createFrom($$source?: any): Snapshot;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Status } from './models.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Status {
|
|
2
|
+
"running": boolean;
|
|
3
|
+
"url": string;
|
|
4
|
+
"source": string;
|
|
5
|
+
"error": string;
|
|
6
|
+
/** Creates a new Status instance. */
|
|
7
|
+
constructor($$source?: Partial<Status>);
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new Status instance from a string or object.
|
|
10
|
+
*/
|
|
11
|
+
static createFrom($$source?: any): Status;
|
|
12
|
+
}
|
|
@@ -62,6 +62,14 @@ export declare class Setting {
|
|
|
62
62
|
* DevOnly indicates the setting should only be visible when dev mode is active.
|
|
63
63
|
*/
|
|
64
64
|
"devOnly": boolean;
|
|
65
|
+
/**
|
|
66
|
+
* RequiresRestart declares that changes apply after restart.
|
|
67
|
+
*/
|
|
68
|
+
"requiresRestart": boolean;
|
|
69
|
+
/**
|
|
70
|
+
* PendingRestart is host snapshot projection, not provider-owned state.
|
|
71
|
+
*/
|
|
72
|
+
"pendingRestart": boolean;
|
|
65
73
|
/** Creates a new Setting instance. */
|
|
66
74
|
constructor($$source?: Partial<Setting>);
|
|
67
75
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface SettingsContextType {
|
|
3
3
|
settings: Record<string, any>;
|
|
4
|
-
reload: () => void;
|
|
5
4
|
}
|
|
6
5
|
export declare const SettingsContext: React.Context<SettingsContextType | undefined>;
|
|
7
6
|
export declare const SettingsProvider: ({ children }: {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Category, Setting, ValidationResult } from '../../bindings/github.com/omniviewdev/plugin-sdk/settings/models';
|
|
2
|
+
import { CommitResult, Snapshot } from '../../bindings/github.com/omniviewdev/omniview/backend/pkg/settings/models';
|
|
3
|
+
export type SettingsScope = {
|
|
4
|
+
kind: 'host';
|
|
5
|
+
pluginId?: never;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'plugin';
|
|
8
|
+
pluginId: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const HOST_SETTINGS_SCOPE: SettingsScope;
|
|
11
|
+
export type SettingsSetting = Setting;
|
|
12
|
+
export type SettingsCategory = Category;
|
|
13
|
+
export type SettingsSnapshot = Omit<Snapshot, 'scope'> & {
|
|
14
|
+
scope: SettingsScope;
|
|
15
|
+
};
|
|
16
|
+
export type SettingsCommitResult = Omit<CommitResult, 'snapshot'> & {
|
|
17
|
+
snapshot: SettingsSnapshot;
|
|
18
|
+
};
|
|
19
|
+
export type SettingsValidationResult = ValidationResult;
|
|
20
|
+
export declare const settingsQueryKey: (scope: SettingsScope) => readonly ["settings", "plugin" | "host", string];
|
|
21
|
+
/** Host IDs are canonical category.setting IDs; plugin IDs remain opaque. */
|
|
22
|
+
export declare function scopedSettingID(scope: SettingsScope, category: string, id: string): string;
|
|
23
|
+
export declare function useScopedSettings(scope: SettingsScope): {
|
|
24
|
+
snapshot: SettingsSnapshot | undefined;
|
|
25
|
+
categories: import('../../models').Store;
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
error: Error | undefined;
|
|
28
|
+
commit: import('@tanstack/react-query').UseMutateAsyncFunction<SettingsCommitResult, Error, Record<string, unknown>, unknown>;
|
|
29
|
+
validate: (id: string, value: unknown) => Promise<SettingsValidationResult>;
|
|
30
|
+
};
|