piral-blazor 1.0.0-pre.2217 → 1.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/LICENSE +1 -1
- package/README.md +55 -12
- package/convert.d.ts +13 -10
- package/convert.js +17 -12
- package/esm/converter.d.ts +10 -6
- package/esm/converter.js +164 -48
- package/esm/converter.js.map +1 -1
- package/esm/create.d.ts +21 -1
- package/esm/create.js +29 -15
- package/esm/create.js.map +1 -1
- package/esm/dependencies.d.ts +6 -3
- package/esm/dependencies.js +104 -14
- package/esm/dependencies.js.map +1 -1
- package/esm/events.d.ts +6 -0
- package/esm/events.js +145 -0
- package/esm/events.js.map +1 -0
- package/esm/interop.d.ts +29 -0
- package/esm/interop.js +205 -0
- package/esm/interop.js.map +1 -0
- package/esm/navigation.d.ts +2 -0
- package/esm/navigation.js +30 -0
- package/esm/navigation.js.map +1 -0
- package/esm/types.d.ts +97 -4
- package/infra.codegen +53 -68
- package/lib/converter.d.ts +10 -6
- package/lib/converter.js +164 -48
- package/lib/converter.js.map +1 -1
- package/lib/create.d.ts +21 -1
- package/lib/create.js +31 -17
- package/lib/create.js.map +1 -1
- package/lib/dependencies.d.ts +6 -3
- package/lib/dependencies.js +104 -14
- package/lib/dependencies.js.map +1 -1
- package/lib/events.d.ts +6 -0
- package/lib/events.js +154 -0
- package/lib/events.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/interop.d.ts +29 -0
- package/lib/interop.js +226 -0
- package/lib/interop.js.map +1 -0
- package/lib/navigation.d.ts +2 -0
- package/lib/navigation.js +35 -0
- package/lib/navigation.js.map +1 -0
- package/lib/types.d.ts +97 -4
- package/package.json +26 -13
- package/src/converter.ts +237 -57
- package/src/create.ts +53 -9
- package/src/dependencies.ts +122 -14
- package/src/events.ts +174 -0
- package/src/interop.ts +273 -0
- package/src/navigation.ts +36 -0
- package/src/types.ts +115 -4
- package/convert.ts +0 -17
- package/esm/internal/Environment.d.ts +0 -3
- package/esm/internal/Environment.js +0 -6
- package/esm/internal/Environment.js.map +0 -1
- package/esm/internal/Platform/BootConfig.d.ts +0 -20
- package/esm/internal/Platform/BootConfig.js +0 -10
- package/esm/internal/Platform/BootConfig.js.map +0 -1
- package/esm/internal/Platform/Mono/MonoDebugger.d.ts +0 -3
- package/esm/internal/Platform/Mono/MonoDebugger.js +0 -43
- package/esm/internal/Platform/Mono/MonoDebugger.js.map +0 -1
- package/esm/internal/Platform/Mono/MonoPlatform.d.ts +0 -2
- package/esm/internal/Platform/Mono/MonoPlatform.js +0 -403
- package/esm/internal/Platform/Mono/MonoPlatform.js.map +0 -1
- package/esm/internal/Platform/Mono/TimezoneDataFile.d.ts +0 -1
- package/esm/internal/Platform/Mono/TimezoneDataFile.js +0 -51
- package/esm/internal/Platform/Mono/TimezoneDataFile.js.map +0 -1
- package/esm/internal/Platform/Platform.d.ts +0 -31
- package/esm/internal/Platform/Platform.js +0 -2
- package/esm/internal/Platform/Platform.js.map +0 -1
- package/esm/internal/Platform/Url.d.ts +0 -2
- package/esm/internal/Platform/Url.js +0 -11
- package/esm/internal/Platform/Url.js.map +0 -1
- package/esm/internal/Platform/WebAssemblyConfigLoader.d.ts +0 -4
- package/esm/internal/Platform/WebAssemblyConfigLoader.js +0 -64
- package/esm/internal/Platform/WebAssemblyConfigLoader.js.map +0 -1
- package/esm/internal/Platform/WebAssemblyResourceLoader.d.ts +0 -24
- package/esm/internal/Platform/WebAssemblyResourceLoader.js +0 -223
- package/esm/internal/Platform/WebAssemblyResourceLoader.js.map +0 -1
- package/esm/internal/Platform/WebAssemblyStartOptions.d.ts +0 -13
- package/esm/internal/Platform/WebAssemblyStartOptions.js +0 -2
- package/esm/internal/Platform/WebAssemblyStartOptions.js.map +0 -1
- package/esm/internal/Rendering/BrowserRenderer.d.ts +0 -38
- package/esm/internal/Rendering/BrowserRenderer.js +0 -458
- package/esm/internal/Rendering/BrowserRenderer.js.map +0 -1
- package/esm/internal/Rendering/ElementReferenceCapture.d.ts +0 -1
- package/esm/internal/Rendering/ElementReferenceCapture.js +0 -24
- package/esm/internal/Rendering/ElementReferenceCapture.js.map +0 -1
- package/esm/internal/Rendering/EventDelegator.d.ts +0 -20
- package/esm/internal/Rendering/EventDelegator.js +0 -236
- package/esm/internal/Rendering/EventDelegator.js.map +0 -1
- package/esm/internal/Rendering/EventFieldInfo.d.ts +0 -6
- package/esm/internal/Rendering/EventFieldInfo.js +0 -32
- package/esm/internal/Rendering/EventFieldInfo.js.map +0 -1
- package/esm/internal/Rendering/EventForDotNet.d.ts +0 -10
- package/esm/internal/Rendering/EventForDotNet.js +0 -194
- package/esm/internal/Rendering/EventForDotNet.js.map +0 -1
- package/esm/internal/Rendering/LogicalElements.d.ts +0 -19
- package/esm/internal/Rendering/LogicalElements.js +0 -250
- package/esm/internal/Rendering/LogicalElements.js.map +0 -1
- package/esm/internal/Rendering/RenderBatch/BinaryDecoder.d.ts +0 -5
- package/esm/internal/Rendering/RenderBatch/BinaryDecoder.js +0 -34
- package/esm/internal/Rendering/RenderBatch/BinaryDecoder.js.map +0 -1
- package/esm/internal/Rendering/RenderBatch/OutOfProcessRenderBatch.d.ts +0 -18
- package/esm/internal/Rendering/RenderBatch/OutOfProcessRenderBatch.js +0 -190
- package/esm/internal/Rendering/RenderBatch/OutOfProcessRenderBatch.js.map +0 -1
- package/esm/internal/Rendering/RenderBatch/RenderBatch.d.ts +0 -87
- package/esm/internal/Rendering/RenderBatch/RenderBatch.js +0 -26
- package/esm/internal/Rendering/RenderBatch/RenderBatch.js.map +0 -1
- package/esm/internal/Rendering/RenderBatch/SharedMemoryRenderBatch.d.ts +0 -52
- package/esm/internal/Rendering/RenderBatch/SharedMemoryRenderBatch.js +0 -103
- package/esm/internal/Rendering/RenderBatch/SharedMemoryRenderBatch.js.map +0 -1
- package/esm/internal/Rendering/RenderBatch/Utf8Decoder.d.ts +0 -1
- package/esm/internal/Rendering/RenderBatch/Utf8Decoder.js +0 -63
- package/esm/internal/Rendering/RenderBatch/Utf8Decoder.js.map +0 -1
- package/esm/internal/Rendering/Renderer.d.ts +0 -8
- package/esm/internal/Rendering/Renderer.js +0 -69
- package/esm/internal/Rendering/Renderer.js.map +0 -1
- package/esm/internal/Rendering/RendererEventDispatcher.d.ts +0 -4
- package/esm/internal/Rendering/RendererEventDispatcher.js +0 -11
- package/esm/internal/Rendering/RendererEventDispatcher.js.map +0 -1
- package/esm/internal/Services/NavigationManager.d.ts +0 -16
- package/esm/internal/Services/NavigationManager.js +0 -138
- package/esm/internal/Services/NavigationManager.js.map +0 -1
- package/esm/internal/globals.d.ts +0 -1
- package/esm/internal/globals.js +0 -5
- package/esm/internal/globals.js.map +0 -1
- package/esm/internal/index.d.ts +0 -15
- package/esm/internal/index.js +0 -152
- package/esm/internal/index.js.map +0 -1
- package/lib/internal/Environment.d.ts +0 -3
- package/lib/internal/Environment.js +0 -9
- package/lib/internal/Environment.js.map +0 -1
- package/lib/internal/Platform/BootConfig.d.ts +0 -20
- package/lib/internal/Platform/BootConfig.js +0 -13
- package/lib/internal/Platform/BootConfig.js.map +0 -1
- package/lib/internal/Platform/Mono/MonoDebugger.d.ts +0 -3
- package/lib/internal/Platform/Mono/MonoDebugger.js +0 -48
- package/lib/internal/Platform/Mono/MonoDebugger.js.map +0 -1
- package/lib/internal/Platform/Mono/MonoPlatform.d.ts +0 -2
- package/lib/internal/Platform/Mono/MonoPlatform.js +0 -406
- package/lib/internal/Platform/Mono/MonoPlatform.js.map +0 -1
- package/lib/internal/Platform/Mono/TimezoneDataFile.d.ts +0 -1
- package/lib/internal/Platform/Mono/TimezoneDataFile.js +0 -55
- package/lib/internal/Platform/Mono/TimezoneDataFile.js.map +0 -1
- package/lib/internal/Platform/Platform.d.ts +0 -31
- package/lib/internal/Platform/Platform.js +0 -3
- package/lib/internal/Platform/Platform.js.map +0 -1
- package/lib/internal/Platform/Url.d.ts +0 -2
- package/lib/internal/Platform/Url.js +0 -16
- package/lib/internal/Platform/Url.js.map +0 -1
- package/lib/internal/Platform/WebAssemblyConfigLoader.d.ts +0 -4
- package/lib/internal/Platform/WebAssemblyConfigLoader.js +0 -67
- package/lib/internal/Platform/WebAssemblyConfigLoader.js.map +0 -1
- package/lib/internal/Platform/WebAssemblyResourceLoader.d.ts +0 -24
- package/lib/internal/Platform/WebAssemblyResourceLoader.js +0 -226
- package/lib/internal/Platform/WebAssemblyResourceLoader.js.map +0 -1
- package/lib/internal/Platform/WebAssemblyStartOptions.d.ts +0 -13
- package/lib/internal/Platform/WebAssemblyStartOptions.js +0 -3
- package/lib/internal/Platform/WebAssemblyStartOptions.js.map +0 -1
- package/lib/internal/Rendering/BrowserRenderer.d.ts +0 -38
- package/lib/internal/Rendering/BrowserRenderer.js +0 -461
- package/lib/internal/Rendering/BrowserRenderer.js.map +0 -1
- package/lib/internal/Rendering/ElementReferenceCapture.d.ts +0 -1
- package/lib/internal/Rendering/ElementReferenceCapture.js +0 -28
- package/lib/internal/Rendering/ElementReferenceCapture.js.map +0 -1
- package/lib/internal/Rendering/EventDelegator.d.ts +0 -20
- package/lib/internal/Rendering/EventDelegator.js +0 -239
- package/lib/internal/Rendering/EventDelegator.js.map +0 -1
- package/lib/internal/Rendering/EventFieldInfo.d.ts +0 -6
- package/lib/internal/Rendering/EventFieldInfo.js +0 -35
- package/lib/internal/Rendering/EventFieldInfo.js.map +0 -1
- package/lib/internal/Rendering/EventForDotNet.d.ts +0 -10
- package/lib/internal/Rendering/EventForDotNet.js +0 -197
- package/lib/internal/Rendering/EventForDotNet.js.map +0 -1
- package/lib/internal/Rendering/LogicalElements.d.ts +0 -19
- package/lib/internal/Rendering/LogicalElements.js +0 -265
- package/lib/internal/Rendering/LogicalElements.js.map +0 -1
- package/lib/internal/Rendering/RenderBatch/BinaryDecoder.d.ts +0 -5
- package/lib/internal/Rendering/RenderBatch/BinaryDecoder.js +0 -42
- package/lib/internal/Rendering/RenderBatch/BinaryDecoder.js.map +0 -1
- package/lib/internal/Rendering/RenderBatch/OutOfProcessRenderBatch.d.ts +0 -18
- package/lib/internal/Rendering/RenderBatch/OutOfProcessRenderBatch.js +0 -193
- package/lib/internal/Rendering/RenderBatch/OutOfProcessRenderBatch.js.map +0 -1
- package/lib/internal/Rendering/RenderBatch/RenderBatch.d.ts +0 -87
- package/lib/internal/Rendering/RenderBatch/RenderBatch.js +0 -29
- package/lib/internal/Rendering/RenderBatch/RenderBatch.js.map +0 -1
- package/lib/internal/Rendering/RenderBatch/SharedMemoryRenderBatch.d.ts +0 -52
- package/lib/internal/Rendering/RenderBatch/SharedMemoryRenderBatch.js +0 -106
- package/lib/internal/Rendering/RenderBatch/SharedMemoryRenderBatch.js.map +0 -1
- package/lib/internal/Rendering/RenderBatch/Utf8Decoder.d.ts +0 -1
- package/lib/internal/Rendering/RenderBatch/Utf8Decoder.js +0 -66
- package/lib/internal/Rendering/RenderBatch/Utf8Decoder.js.map +0 -1
- package/lib/internal/Rendering/Renderer.d.ts +0 -8
- package/lib/internal/Rendering/Renderer.js +0 -76
- package/lib/internal/Rendering/Renderer.js.map +0 -1
- package/lib/internal/Rendering/RendererEventDispatcher.d.ts +0 -4
- package/lib/internal/Rendering/RendererEventDispatcher.js +0 -16
- package/lib/internal/Rendering/RendererEventDispatcher.js.map +0 -1
- package/lib/internal/Services/NavigationManager.d.ts +0 -16
- package/lib/internal/Services/NavigationManager.js +0 -144
- package/lib/internal/Services/NavigationManager.js.map +0 -1
- package/lib/internal/globals.d.ts +0 -1
- package/lib/internal/globals.js +0 -7
- package/lib/internal/globals.js.map +0 -1
- package/lib/internal/index.d.ts +0 -15
- package/lib/internal/index.js +0 -161
- package/lib/internal/index.js.map +0 -1
- package/src/internal/Environment.ts +0 -11
- package/src/internal/Platform/BootConfig.ts +0 -21
- package/src/internal/Platform/Mono/MonoDebugger.ts +0 -48
- package/src/internal/Platform/Mono/MonoPlatform.ts +0 -494
- package/src/internal/Platform/Mono/MonoTypes.d.ts +0 -27
- package/src/internal/Platform/Mono/TimezoneDataFile.ts +0 -46
- package/src/internal/Platform/Platform.ts +0 -40
- package/src/internal/Platform/Url.ts +0 -11
- package/src/internal/Platform/WebAssemblyConfigLoader.ts +0 -34
- package/src/internal/Platform/WebAssemblyResourceLoader.ts +0 -234
- package/src/internal/Platform/WebAssemblyStartOptions.ts +0 -22
- package/src/internal/Rendering/BrowserRenderer.ts +0 -616
- package/src/internal/Rendering/ElementReferenceCapture.ts +0 -27
- package/src/internal/Rendering/EventDelegator.ts +0 -293
- package/src/internal/Rendering/EventFieldInfo.ts +0 -31
- package/src/internal/Rendering/EventForDotNet.ts +0 -370
- package/src/internal/Rendering/LogicalElements.ts +0 -289
- package/src/internal/Rendering/RenderBatch/BinaryDecoder.ts +0 -43
- package/src/internal/Rendering/RenderBatch/OutOfProcessRenderBatch.ts +0 -244
- package/src/internal/Rendering/RenderBatch/RenderBatch.ts +0 -100
- package/src/internal/Rendering/RenderBatch/SharedMemoryRenderBatch.ts +0 -137
- package/src/internal/Rendering/RenderBatch/Utf8Decoder.ts +0 -66
- package/src/internal/Rendering/Renderer.ts +0 -98
- package/src/internal/Rendering/RendererEventDispatcher.ts +0 -20
- package/src/internal/Services/NavigationManager.ts +0 -157
- package/src/internal/globals.ts +0 -5
- package/src/internal/index.ts +0 -170
package/src/types.ts
CHANGED
|
@@ -1,4 +1,76 @@
|
|
|
1
|
-
import type { ForeignComponent } from 'piral-core';
|
|
1
|
+
import type { ForeignComponent, PiletApi } from 'piral-core';
|
|
2
|
+
|
|
3
|
+
export type BlazorRootConfig = [
|
|
4
|
+
root: HTMLDivElement,
|
|
5
|
+
capabilities: Array<string>,
|
|
6
|
+
applyChanges: (pilet: PiletApi) => void,
|
|
7
|
+
];
|
|
8
|
+
|
|
9
|
+
export interface BlazorDependencyLoader {
|
|
10
|
+
(config: BlazorRootConfig): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type WebAssemblyBootResourceType = 'assembly' | 'pdb' | 'dotnetjs' | 'dotnetwasm' | 'globalization' | 'manifest';
|
|
14
|
+
|
|
15
|
+
export interface WebAssemblyStartOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Overrides the built-in boot resource loading mechanism so that boot resources can be fetched
|
|
18
|
+
* from a custom source, such as an external CDN.
|
|
19
|
+
* @param type The type of the resource to be loaded.
|
|
20
|
+
* @param name The name of the resource to be loaded.
|
|
21
|
+
* @param defaultUri The URI from which the framework would fetch the resource by default. The URI may be relative or absolute.
|
|
22
|
+
* @param integrity The integrity string representing the expected content in the response.
|
|
23
|
+
* @returns A URI string or a Response promise to override the loading process, or null/undefined to allow the default loading behavior.
|
|
24
|
+
*/
|
|
25
|
+
loadBootResource?(
|
|
26
|
+
type: WebAssemblyBootResourceType,
|
|
27
|
+
name: string,
|
|
28
|
+
defaultUri: string,
|
|
29
|
+
integrity: string,
|
|
30
|
+
): string | Promise<Response> | null | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Override built-in environment setting on start.
|
|
33
|
+
*/
|
|
34
|
+
environment?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Gets the application culture. This is a name specified in the BCP 47 format. See https://tools.ietf.org/html/bcp47
|
|
37
|
+
*/
|
|
38
|
+
applicationCulture?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare global {
|
|
42
|
+
interface Window {
|
|
43
|
+
Blazor: {
|
|
44
|
+
start(options?: Partial<WebAssemblyStartOptions>): Promise<void>;
|
|
45
|
+
emitPiralEvent(type: string, args: any): void;
|
|
46
|
+
emitRenderEvent(
|
|
47
|
+
source: HTMLElement,
|
|
48
|
+
name: string,
|
|
49
|
+
params: any,
|
|
50
|
+
sourceRef: any,
|
|
51
|
+
fallbackComponent: string | null,
|
|
52
|
+
): void;
|
|
53
|
+
emitNavigateEvent(target: Element, path: string, replace?: boolean, state?: any): void;
|
|
54
|
+
_internal: {
|
|
55
|
+
navigationManager: any;
|
|
56
|
+
applyHotReload: any;
|
|
57
|
+
NavigationLock: any;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
DotNet: any;
|
|
61
|
+
$blazorLoader: Promise<BlazorRootConfig>;
|
|
62
|
+
$blazorDependencyPrios: Array<{
|
|
63
|
+
prio: number;
|
|
64
|
+
load(): Promise<void>;
|
|
65
|
+
}>;
|
|
66
|
+
$blazorDependencies: Array<{
|
|
67
|
+
name: string;
|
|
68
|
+
url: string;
|
|
69
|
+
count: number;
|
|
70
|
+
promise: Promise<void>;
|
|
71
|
+
}>;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
2
74
|
|
|
3
75
|
declare module 'piral-core/lib/types/custom' {
|
|
4
76
|
interface PiletCustomApi extends PiletBlazorApi {}
|
|
@@ -8,6 +80,26 @@ declare module 'piral-core/lib/types/custom' {
|
|
|
8
80
|
}
|
|
9
81
|
}
|
|
10
82
|
|
|
83
|
+
export const enum BlazorLogLevel {
|
|
84
|
+
trace = 0,
|
|
85
|
+
debug = 1,
|
|
86
|
+
info = 2,
|
|
87
|
+
warn = 3,
|
|
88
|
+
error = 4,
|
|
89
|
+
critical = 5,
|
|
90
|
+
none = 6,
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Additional options for the Blazor component
|
|
95
|
+
*/
|
|
96
|
+
export interface BlazorOptions {
|
|
97
|
+
/**
|
|
98
|
+
* The root path where resources are located.
|
|
99
|
+
*/
|
|
100
|
+
resourcePathRoot?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
11
103
|
export interface BlazorComponent {
|
|
12
104
|
/**
|
|
13
105
|
* The name of the Blazor module to render.
|
|
@@ -21,11 +113,15 @@ export interface BlazorComponent {
|
|
|
21
113
|
* An optional dependency that needs to load before
|
|
22
114
|
* the component can be properly displayed.
|
|
23
115
|
*/
|
|
24
|
-
dependency?:
|
|
116
|
+
dependency?: BlazorDependencyLoader;
|
|
25
117
|
/**
|
|
26
118
|
* The type of the Blazor component.
|
|
27
119
|
*/
|
|
28
120
|
type: 'blazor';
|
|
121
|
+
/**
|
|
122
|
+
* Additional options for the Blazor component.
|
|
123
|
+
*/
|
|
124
|
+
options?: BlazorOptions;
|
|
29
125
|
}
|
|
30
126
|
|
|
31
127
|
/**
|
|
@@ -33,15 +129,30 @@ export interface BlazorComponent {
|
|
|
33
129
|
*/
|
|
34
130
|
export interface PiletBlazorApi {
|
|
35
131
|
/**
|
|
36
|
-
* Defines the additional libraries to Blazor via
|
|
132
|
+
* Defines the additional libraries (and their symbols) to Blazor via
|
|
133
|
+
* their URLs.
|
|
134
|
+
*
|
|
37
135
|
* @param referenceUrls The URLs pointing to the different DLLs to include.
|
|
136
|
+
* @param satellites The URLs of the potential satellite DLLs to include.
|
|
137
|
+
* @param prio The loading priority of the DLLs. Higher numbers will always be loaded before lower numbers.
|
|
38
138
|
*/
|
|
39
|
-
defineBlazorReferences(referenceUrls: Array<string
|
|
139
|
+
defineBlazorReferences(referenceUrls: Array<string>, satellites?: Record<string, Array<string>>, prio?: number): void;
|
|
40
140
|
/**
|
|
41
141
|
* Wraps a Blazor module for use in Piral.
|
|
142
|
+
*
|
|
42
143
|
* @param moduleName The name of the exposed Blazor component.
|
|
43
144
|
* @param args The optional props to use as arguments for the Blazor component.
|
|
44
145
|
* @returns The Piral Blazor component.
|
|
45
146
|
*/
|
|
46
147
|
fromBlazor(moduleName: string, args?: Record<string, any>): BlazorComponent;
|
|
148
|
+
/**
|
|
149
|
+
* Defines the additional options to be shared by all Blazor components.
|
|
150
|
+
*
|
|
151
|
+
* @param options The options for the Blazor components.
|
|
152
|
+
*/
|
|
153
|
+
defineBlazorOptions(options: BlazorOptions): void;
|
|
154
|
+
/**
|
|
155
|
+
* Releases all defined blazor references from the current pilet.
|
|
156
|
+
*/
|
|
157
|
+
releaseBlazorReferences(): void;
|
|
47
158
|
}
|
package/convert.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { HtmlComponent } from 'piral-core';
|
|
2
|
-
import { createConverter } from './lib/converter';
|
|
3
|
-
import { createDependencyLoader } from './lib/dependencies';
|
|
4
|
-
|
|
5
|
-
const convert = createConverter();
|
|
6
|
-
const loader = createDependencyLoader(convert);
|
|
7
|
-
|
|
8
|
-
export interface BlazorConverter {
|
|
9
|
-
(...params: Parameters<typeof convert>): HtmlComponent<any>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const fromBlazor: BlazorConverter = (moduleName, dependency, args) => ({
|
|
13
|
-
type: 'html',
|
|
14
|
-
component: convert(moduleName, dependency, args),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const defineBlazorReferences = loader.defineBlazorReferences;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.js","sourceRoot":"","sources":["../../src/internal/Environment.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,IAAI,QAAkB,CAAC;AAE9B,MAAM,UAAU,WAAW,CAAC,gBAA0B;IACpD,QAAQ,GAAG,gBAAgB,CAAC;IAC5B,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface BootJsonData {
|
|
2
|
-
entryAssembly: string;
|
|
3
|
-
resources: ResourceGroups;
|
|
4
|
-
debugBuild: boolean;
|
|
5
|
-
linkerEnabled: boolean;
|
|
6
|
-
cacheBootResources: boolean;
|
|
7
|
-
config: Array<string>;
|
|
8
|
-
}
|
|
9
|
-
export interface ResourceGroups {
|
|
10
|
-
assembly: ResourceList;
|
|
11
|
-
pdb?: ResourceList;
|
|
12
|
-
runtime: ResourceList;
|
|
13
|
-
satelliteResources?: Record<string, ResourceList>;
|
|
14
|
-
}
|
|
15
|
-
export declare type ResourceList = Record<string, string>;
|
|
16
|
-
export declare class BootConfigResult {
|
|
17
|
-
bootConfig: BootJsonData;
|
|
18
|
-
applicationEnvironment: string;
|
|
19
|
-
constructor(bootConfig: BootJsonData, applicationEnvironment?: string);
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var BootConfigResult = /** @class */ (function () {
|
|
2
|
-
function BootConfigResult(bootConfig, applicationEnvironment) {
|
|
3
|
-
if (applicationEnvironment === void 0) { applicationEnvironment = 'Production'; }
|
|
4
|
-
this.bootConfig = bootConfig;
|
|
5
|
-
this.applicationEnvironment = applicationEnvironment;
|
|
6
|
-
}
|
|
7
|
-
return BootConfigResult;
|
|
8
|
-
}());
|
|
9
|
-
export { BootConfigResult };
|
|
10
|
-
//# sourceMappingURL=BootConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BootConfig.js","sourceRoot":"","sources":["../../../src/internal/Platform/BootConfig.ts"],"names":[],"mappings":"AAkBA;IACE,0BAAmB,UAAwB,EAAS,sBAAqC;QAArC,uCAAA,EAAA,qCAAqC;QAAtE,eAAU,GAAV,UAAU,CAAc;QAAS,2BAAsB,GAAtB,sBAAsB,CAAe;IAAG,CAAC;IAC/F,uBAAC;AAAD,CAAC,AAFD,IAEC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
var currentBrowserIsChrome = window.chrome && navigator.userAgent.indexOf('Edge') < 0; // Edge pretends to be Chrome
|
|
2
|
-
var hasReferencedPdbs = false;
|
|
3
|
-
export function hasDebuggingEnabled() {
|
|
4
|
-
return hasReferencedPdbs && currentBrowserIsChrome;
|
|
5
|
-
}
|
|
6
|
-
export function attachDebuggerHotkey(resourceLoader) {
|
|
7
|
-
hasReferencedPdbs = !!resourceLoader.bootConfig.resources.pdb;
|
|
8
|
-
// Use the combination shift+alt+D because it isn't used by the major browsers
|
|
9
|
-
// for anything else by default
|
|
10
|
-
var altKeyName = navigator.platform.match(/^Mac/i) ? 'Cmd' : 'Alt';
|
|
11
|
-
if (hasDebuggingEnabled()) {
|
|
12
|
-
console.info("Debugging hotkey: Shift+" + altKeyName + "+D (when application has focus)");
|
|
13
|
-
}
|
|
14
|
-
// Even if debugging isn't enabled, we register the hotkey so we can report why it's not enabled
|
|
15
|
-
document.addEventListener('keydown', function (evt) {
|
|
16
|
-
if (evt.shiftKey && (evt.metaKey || evt.altKey) && evt.code === 'KeyD') {
|
|
17
|
-
if (!hasReferencedPdbs) {
|
|
18
|
-
console.error('Cannot start debugging, because the application was not compiled with debugging enabled.');
|
|
19
|
-
}
|
|
20
|
-
else if (!currentBrowserIsChrome) {
|
|
21
|
-
console.error('Currently, only Microsoft Edge (80+), or Google Chrome, are supported for debugging.');
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
launchDebugger();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function launchDebugger() {
|
|
30
|
-
// The noopener flag is essential, because otherwise Chrome tracks the association with the
|
|
31
|
-
// parent tab, and then when the parent tab pauses in the debugger, the child tab does so
|
|
32
|
-
// too (even if it's since navigated to a different page). This means that the debugger
|
|
33
|
-
// itself freezes, and not just the page being debugged.
|
|
34
|
-
//
|
|
35
|
-
// We have to construct a link element and simulate a click on it, because the more obvious
|
|
36
|
-
// window.open(..., 'noopener') always opens a new window instead of a new tab.
|
|
37
|
-
var link = document.createElement('a');
|
|
38
|
-
link.href = "_framework/debug?url=" + encodeURIComponent(location.href);
|
|
39
|
-
link.target = '_blank';
|
|
40
|
-
link.rel = 'noopener noreferrer';
|
|
41
|
-
link.click();
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=MonoDebugger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MonoDebugger.js","sourceRoot":"","sources":["../../../../src/internal/Platform/Mono/MonoDebugger.ts"],"names":[],"mappings":"AAEA,IAAM,sBAAsB,GAAI,MAAc,CAAC,MAAM,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,6BAA6B;AAE/H,IAAI,iBAAiB,GAAG,KAAK,CAAC;AAE9B,MAAM,UAAU,mBAAmB;IACjC,OAAO,iBAAiB,IAAI,sBAAsB,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,cAAyC;IAC5E,iBAAiB,GAAG,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC;IAE9D,8EAA8E;IAC9E,+BAA+B;IAC/B,IAAM,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACrE,IAAI,mBAAmB,EAAE,EAAE;QACzB,OAAO,CAAC,IAAI,CAAC,6BAA2B,UAAU,oCAAiC,CAAC,CAAC;KACtF;IAED,gGAAgG;IAChG,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,UAAC,GAAG;QACvC,IAAI,GAAG,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,EAAE;YACtE,IAAI,CAAC,iBAAiB,EAAE;gBACtB,OAAO,CAAC,KAAK,CAAC,0FAA0F,CAAC,CAAC;aAC3G;iBAAM,IAAI,CAAC,sBAAsB,EAAE;gBAClC,OAAO,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;aACvG;iBAAM;gBACL,cAAc,EAAE,CAAC;aAClB;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,cAAc;IACrB,2FAA2F;IAC3F,yFAAyF;IACzF,uFAAuF;IACvF,wDAAwD;IACxD,EAAE;IACF,2FAA2F;IAC3F,+EAA+E;IAC/E,IAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,CAAC,IAAI,GAAG,0BAAwB,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAG,CAAC;IACxE,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;IACvB,IAAI,CAAC,GAAG,GAAG,qBAAqB,CAAC;IACjC,IAAI,CAAC,KAAK,EAAE,CAAC;AACf,CAAC"}
|