@omniviewdev/editors 1.0.2 → 3.0.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/index.d.ts CHANGED
@@ -1,12 +1,14 @@
1
+ import { BuiltInThemeId } from '../../../base-ui/src/index.ts';
1
2
  import { ForwardRefExoticComponent } from 'react';
2
3
  import { HTMLAttributes } from 'react';
3
4
  import * as monaco from 'monaco-editor';
4
5
  import { ReactNode } from 'react';
5
6
  import { RefAttributes } from 'react';
7
+ import { ThemeSummary } from '../../../base-ui/src/index.ts';
6
8
 
7
- export declare function buildMonacoTheme(mode: ThemeMode): MonacoThemeData;
9
+ export declare function buildMonacoTheme(mode: BuiltInThemeId, element?: HTMLElement | null): MonacoThemeData;
8
10
 
9
- export declare function buildXtermTheme(): XtermThemeData;
11
+ export declare function buildXtermTheme(element?: HTMLElement | null): XtermThemeData;
10
12
 
11
13
  export declare const CodeEditor: ForwardRefExoticComponent<CodeEditorProps & RefAttributes<CodeEditorHandle>>;
12
14
 
@@ -303,7 +305,13 @@ export declare class EditorSchemaRegistry {
303
305
  /** Singleton schema registry instance. */
304
306
  export declare const editorSchemas: EditorSchemaRegistry;
305
307
 
306
- export declare function getComputedToken(token: string): string;
308
+ export declare interface EditorTheme {
309
+ id: string;
310
+ base: BuiltInThemeId;
311
+ registration: Readonly<ThemeSummary>;
312
+ }
313
+
314
+ export declare function getComputedToken(token: string, element?: HTMLElement | null): string;
307
315
 
308
316
  export declare type InspectorFormat = 'json' | 'yaml';
309
317
 
@@ -552,9 +560,7 @@ export declare interface TerminalSearchOptions {
552
560
  */
553
561
  export declare type TerminalSignal = 'ERROR' | 'CLOSE' | 'SIGINT' | 'SIGQUIT' | 'SIGTERM' | 'SIGKILL' | 'SIGHUP' | 'SIGUSR1' | 'SIGUSR2' | 'SIGWINCH';
554
562
 
555
- declare type ThemeMode = 'dark' | 'light' | 'high-contrast-dark' | 'high-contrast-light';
556
-
557
- export declare function useEditorTheme(): ThemeMode;
563
+ export declare function useEditorTheme(): EditorTheme;
558
564
 
559
565
  export declare interface XtermThemeData {
560
566
  background: string;