@omniviewdev/runtime 0.13.0 → 0.14.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.
Files changed (31) hide show
  1. package/dist/api.cjs +1 -1
  2. package/dist/api.d.ts +2 -2
  3. package/dist/api.js +199 -175
  4. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/settings/binding.d.ts +8 -0
  5. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/settings/index.d.ts +3 -0
  6. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/settings/models.d.ts +33 -0
  7. package/dist/bindings/github.com/omniviewdev/omniview/{backend/pkg/plugin/settings → internal/profiling}/index.d.ts +1 -0
  8. package/dist/bindings/github.com/omniviewdev/omniview/internal/profiling/models.d.ts +12 -0
  9. package/dist/bindings/github.com/omniviewdev/omniview/internal/profiling/servicewrapper.d.ts +3 -0
  10. package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/models.d.ts +8 -0
  11. package/dist/context/plugins/usePluginContext.d.ts +0 -1
  12. package/dist/context/settings/SettingsContext.d.ts +0 -1
  13. package/dist/hooks/settings/index.d.ts +1 -0
  14. package/dist/hooks/settings/useScopedSettings.d.ts +30 -0
  15. package/dist/index.cjs +4 -4
  16. package/dist/index.js +1829 -1756
  17. package/dist/{models-Cg1YRHQm.js → models-BJgLAHwq.js} +1 -1
  18. package/dist/{models-UwESEW2B.js → models-BTzXdmUY.js} +183 -175
  19. package/dist/{models-dzj-SsFZ.cjs → models-BhsFYb70.cjs} +1 -1
  20. package/dist/models-NYvUa5Yc.cjs +1 -0
  21. package/dist/models.cjs +1 -1
  22. package/dist/models.js +8 -8
  23. package/dist/servicewrapper-B-DdHGSp.cjs +1 -0
  24. package/dist/servicewrapper-Bl98xvmZ.js +639 -0
  25. package/package.json +1 -1
  26. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/servicewrapper.d.ts +0 -19
  27. package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/index.d.ts +0 -2
  28. package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/servicewrapper.d.ts +0 -52
  29. package/dist/models-DSGyy8lg.cjs +0 -1
  30. package/dist/servicewrapper-BhxHs5DR.js +0 -688
  31. package/dist/servicewrapper-CNtZecKV.cjs +0 -1
@@ -1,2 +1,3 @@
1
1
  import * as ServiceWrapper from "./servicewrapper.js";
2
2
  export { ServiceWrapper };
3
+ 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
+ }
@@ -0,0 +1,3 @@
1
+ import { CancellablePromise as $CancellablePromise } from '@wailsio/runtime';
2
+ import * as $models from "./models.js";
3
+ export declare function GetStatus(): $CancellablePromise<$models.Status>;
@@ -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,3 +1,2 @@
1
1
  import { PluginContextType } from './PluginContext';
2
2
  export declare function usePluginContext(): PluginContextType;
3
- export declare function usePluginSettings(): Record<string, any>;
@@ -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 }: {
@@ -1 +1,2 @@
1
1
  export * from './useSettings';
2
+ export * from './useScopedSettings';
@@ -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
+ };