@omniviewdev/runtime 0.15.0 → 0.16.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.
@@ -0,0 +1,35 @@
1
+ import { ComponentType } from 'react';
2
+ import { Setting } from './models';
3
+ export declare const SETTINGS_EDITOR_EXTENSION_POINT_ID = "omniview/settings/editor";
4
+ /** Metadata for one authorized field. Stored values and defaults are never exposed here. */
5
+ export type SettingsEditorMetadata = Pick<Setting, 'id' | 'label' | 'description' | 'type' | 'options' | 'fileSelection' | 'sensitive' | 'requiresRestart'>;
6
+ /** Host owns drafts, validation, save/reset, labels and focus. Editors only propose values. */
7
+ export type SettingsEditorProps = {
8
+ settingId: string;
9
+ setting: SettingsEditorMetadata;
10
+ value: unknown;
11
+ dirty: boolean;
12
+ disabled?: boolean;
13
+ validation?: {
14
+ valid: boolean;
15
+ message: string;
16
+ };
17
+ inputId: string;
18
+ labelledBy: string;
19
+ describedBy: string;
20
+ onChange: (value: unknown) => void;
21
+ /** Attach to the editable control; detach with null when that control unmounts. */
22
+ registerFocusTarget?: (element: HTMLElement | null) => void;
23
+ };
24
+ /**
25
+ * Export through extensionRegistrations at omniview/settings/editor, with this object
26
+ * as registration.value. settingId is opaque (including dots), and can name only
27
+ * an existing field owned by the loading plugin. Registration.plugin is ignored.
28
+ * One editor per plugin/field is allowed; ambiguity or failures use the generic field.
29
+ * No settings rows are created by a contribution. No save or commit API is exposed.
30
+ */
31
+ export type SettingsEditorV1 = {
32
+ schemaVersion: 1;
33
+ settingId: string;
34
+ editor: ComponentType<SettingsEditorProps>;
35
+ };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Omniview",
3
3
  "license": "AGPL-3.0-only",
4
4
  "name": "@omniviewdev/runtime",
5
- "version": "0.15.0",
5
+ "version": "0.16.0",
6
6
  "description": "Runtime shared library for Omniview",
7
7
  "sideEffects": false,
8
8
  "type": "module",