@vscode/markdown-editor 0.0.2-85 → 0.0.2-86

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,4 +1,5 @@
1
1
  import { ContentType } from '@vscode/web-editors';
2
+ import { HostTransport } from '@vscode/web-editors';
2
3
  import { IDisposable } from '@vscode/observables';
3
4
 
4
5
  export declare interface CodeBlockEditorProviderDefinition {
@@ -71,8 +72,11 @@ declare interface IEmbeddedCodeEditorFactory {
71
72
  create(language: string, infoString: string, initialContent: string): IEmbeddedCodeEditor | undefined;
72
73
  }
73
74
 
75
+ export declare type IframeEmbeddedEditorHostTransport = HostTransport & IDisposable;
76
+
74
77
  export declare interface IframeEmbeddedEditorProvider extends CodeBlockEditorProviderDefinition {
75
78
  readonly resolve: (infoString: string) => Promise<ResolvedIframeEmbeddedEditor | undefined>;
79
+ readonly createHostTransport?: (runtimeKey: string) => IframeEmbeddedEditorHostTransport;
76
80
  }
77
81
 
78
82
  export declare type IframeEmbeddedEditorProviderSelector = CodeBlockEditorSelector;
@@ -113,6 +117,7 @@ declare class OffsetRange {
113
117
 
114
118
  declare class PhysicalIframe implements IDisposable {
115
119
  private readonly _descriptor;
120
+ private readonly _hostTransport;
116
121
  private readonly _frameRoot;
117
122
  private readonly _scriptNonce;
118
123
  private readonly _themeCss;
@@ -122,9 +127,10 @@ declare class PhysicalIframe implements IDisposable {
122
127
  private _host;
123
128
  private _transport;
124
129
  private _pendingEditor;
130
+ private _reportedHeight;
125
131
  private _disposed;
126
132
  private readonly _onWindowMessage;
127
- constructor(pool: PhysicalIframePool, _descriptor: ResolvedIframeEmbeddedEditor, frameLayer: HTMLElement, _frameRoot: HTMLElement, _scriptNonce: string | undefined, _themeCss: string | (() => string) | undefined);
133
+ constructor(pool: PhysicalIframePool, _descriptor: ResolvedIframeEmbeddedEditor, _hostTransport: IframeEmbeddedEditorHostTransport | undefined, frameLayer: HTMLElement, _frameRoot: HTMLElement, _scriptNonce: string | undefined, _themeCss: string | (() => string) | undefined);
128
134
  bind(editor: VirtualizedIframeEmbeddedEditor): void;
129
135
  unbind(): void;
130
136
  layout(editor: VirtualizedIframeEmbeddedEditor): void;
@@ -132,16 +138,18 @@ declare class PhysicalIframe implements IDisposable {
132
138
  private _setup;
133
139
  private _getThemeCss;
134
140
  private _postTheme;
141
+ private _applyReportedHeight;
135
142
  }
136
143
 
137
144
  declare class PhysicalIframePool implements IDisposable {
145
+ private readonly _provider;
138
146
  private readonly _frameLayer;
139
147
  private readonly _frameRoot;
140
148
  private readonly _scriptNonce;
141
149
  private readonly _themeCss;
142
150
  readonly descriptor: ResolvedIframeEmbeddedEditor;
143
151
  private readonly _frames;
144
- constructor(descriptor: ResolvedIframeEmbeddedEditor, _frameLayer: HTMLElement, _frameRoot: HTMLElement, _scriptNonce: string | undefined, _themeCss: string | (() => string) | undefined);
152
+ constructor(_provider: IframeEmbeddedEditorProvider, descriptor: ResolvedIframeEmbeddedEditor, _frameLayer: HTMLElement, _frameRoot: HTMLElement, _scriptNonce: string | undefined, _themeCss: string | (() => string) | undefined);
145
153
  get leasedFrames(): number;
146
154
  get idleFrames(): number;
147
155
  acquire(editor: VirtualizedIframeEmbeddedEditor): void;
@@ -154,6 +162,9 @@ declare class PhysicalIframePool implements IDisposable {
154
162
 
155
163
  export declare interface ResolvedIframeEmbeddedEditor {
156
164
  readonly html: string;
165
+ readonly runtimeKey: string;
166
+ readonly resourceBaseUrl?: string;
167
+ readonly hostTransport?: boolean;
157
168
  readonly contentType?: ContentType;
158
169
  readonly initialHeight?: number;
159
170
  readonly sandbox?: IframeSandboxOptions;