@vscode/markdown-editor 0.0.2-85 → 0.0.2-87
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/web-editors.d.ts +16 -2
- package/dist/web-editors.js +1934 -1886
- package/dist/web-editors.js.map +1 -1
- package/package.json +2 -2
package/dist/web-editors.d.ts
CHANGED
|
@@ -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,19 @@ 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;
|
|
150
|
+
private readonly _iframeBootstrapUrl;
|
|
142
151
|
readonly descriptor: ResolvedIframeEmbeddedEditor;
|
|
143
152
|
private readonly _frames;
|
|
144
|
-
constructor(descriptor: ResolvedIframeEmbeddedEditor, _frameLayer: HTMLElement, _frameRoot: HTMLElement, _scriptNonce: string | undefined, _themeCss: string | (() => string) | undefined);
|
|
153
|
+
constructor(_provider: IframeEmbeddedEditorProvider, descriptor: ResolvedIframeEmbeddedEditor, _frameLayer: HTMLElement, _frameRoot: HTMLElement, _scriptNonce: string | undefined, _themeCss: string | (() => string) | undefined, _iframeBootstrapUrl: string | undefined);
|
|
145
154
|
get leasedFrames(): number;
|
|
146
155
|
get idleFrames(): number;
|
|
147
156
|
acquire(editor: VirtualizedIframeEmbeddedEditor): void;
|
|
@@ -154,6 +163,9 @@ declare class PhysicalIframePool implements IDisposable {
|
|
|
154
163
|
|
|
155
164
|
export declare interface ResolvedIframeEmbeddedEditor {
|
|
156
165
|
readonly html: string;
|
|
166
|
+
readonly runtimeKey: string;
|
|
167
|
+
readonly resourceBaseUrl?: string;
|
|
168
|
+
readonly hostTransport?: boolean;
|
|
157
169
|
readonly contentType?: ContentType;
|
|
158
170
|
readonly initialHeight?: number;
|
|
159
171
|
readonly sandbox?: IframeSandboxOptions;
|
|
@@ -274,6 +286,8 @@ export declare interface VirtualizedIframeEmbeddedEditorOptions {
|
|
|
274
286
|
readonly frameRoot?: HTMLElement;
|
|
275
287
|
readonly scriptNonce?: string;
|
|
276
288
|
readonly themeCss?: string | (() => string);
|
|
289
|
+
/** Optional same-origin document URL to load before writing the iframe content. */
|
|
290
|
+
readonly iframeBootstrapUrl?: string;
|
|
277
291
|
readonly defaultHeight?: number;
|
|
278
292
|
readonly onAmbiguous?: (language: string, providers: readonly CodeBlockEditorProviderDefinition[]) => void;
|
|
279
293
|
readonly onDidChange?: () => void;
|