@omniviewdev/runtime 0.23.0 → 0.24.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.
@@ -1,2 +1,3 @@
1
1
  export * from './provider';
2
2
  export * from './registry';
3
+ export * from './resource-editor';
@@ -0,0 +1,22 @@
1
+ import { ExtensionContributionRegistration } from '../types/extensions';
2
+ import { ResourceEditorContext, ResourceEditorContribution, ResourceEditorPath } from '../types/resource-editor';
3
+ /** Returns a safe diagnostic, never contributor source or field values. */
4
+ export declare function validateResourceEditorContribution(value: unknown): string | null;
5
+ /** Segment matching avoids granting specFoo when a provider owns spec. */
6
+ export declare function resourceEditorPathContains(owner: ResourceEditorPath, candidate: ResourceEditorPath): boolean;
7
+ /** Pure matcher; host-validated local captures permit inspection, never mutation. */
8
+ export declare function matchesResourceEditor(contribution: ResourceEditorContribution, context: ResourceEditorContext): boolean;
9
+ export type ResourceEditorSelection = {
10
+ status: 'selected';
11
+ contribution: ExtensionContributionRegistration<ResourceEditorContribution>;
12
+ } | {
13
+ status: 'choose';
14
+ contributions: readonly ExtensionContributionRegistration<ResourceEditorContribution>[];
15
+ } | {
16
+ status: 'fallback';
17
+ };
18
+ /** IDs and built-in ownership come from the host, never descriptor metadata. */
19
+ export declare function selectResourceEditor(contributions: readonly ExtensionContributionRegistration<ResourceEditorContribution>[], context: ResourceEditorContext, options: {
20
+ preferredID?: string;
21
+ builtinPluginID: string;
22
+ }): ResourceEditorSelection;