├── SpawnDev.BlazorJS ├── Images │ └── icon-128.png ├── JSObjects │ ├── ImageBitmapRenderingContextSettings.cs │ ├── Point2D.cs │ ├── Point2DF.cs │ ├── ReadableStreamUnderlyingSource.cs │ ├── WebGPU │ │ ├── GPUCommandsMixin.cs │ │ ├── GPUCommandBufferDescriptor.cs │ │ ├── GPUExternalTextureBindingLayout.cs │ │ ├── GPURenderBundleDescriptor.cs │ │ ├── IGPUTextureOrTextureView.cs │ │ ├── GPUCommandEncoderDescriptor.cs │ │ ├── GPURenderBundle.cs │ │ ├── IGPUBindingResource.cs │ │ ├── GPUComputePipelineDescriptor.cs │ │ ├── GPUSamplerBindingLayout.cs │ │ ├── GPUBindGroup.cs │ │ ├── GPUSampler.cs │ │ ├── GPUSupportedFeatures.cs │ │ ├── GPUAutoLayoutMode.cs │ │ ├── GPUPipelineLayout.cs │ │ ├── GPUShaderModuleDescriptor.cs │ │ ├── GPULoadOp.cs │ │ ├── GPUBindGroupLayout.cs │ │ ├── GPUComputePassDescriptor.cs │ │ ├── GPUStoreOp.cs │ │ ├── GPUBlendState.cs │ │ ├── GPUFragmentState.cs │ │ ├── GPUObjectDescriptorBase.cs │ │ ├── GPUPipelineDescriptorBase.cs │ │ ├── GPUIndexFormat.cs │ │ ├── GPUOrigin2DDict.cs │ │ ├── GPUTextureView.cs │ │ ├── GPUQuerySetDescriptor.cs │ │ ├── GPUExternalTexture.cs │ │ ├── GPUBindGroupDescriptor.cs │ │ ├── GPUColorWriteFlags.cs │ │ ├── GPUColorDict.cs │ │ ├── GPUFilterMode.cs │ │ ├── GPUTexelCopyBufferInfo.cs │ │ ├── GPUPipelineLayoutDescriptor.cs │ │ ├── GPUExternalTextureDescriptor.cs │ │ ├── GPUMipmapFilterMode.cs │ │ ├── GPUCullMode.cs │ │ ├── GPUDeviceLostInfo.cs │ │ ├── GPUComputePipeline.cs │ │ ├── GPUBindGroupEntry.cs │ │ ├── GPUCommandBuffer.cs │ │ ├── GPUVertexAttribute.cs │ │ ├── GPURenderBundleEncoderDescriptor.cs │ │ ├── GPUBindGroupLayoutDescriptor.cs │ │ ├── GPUError.cs │ │ ├── GPUExtent3DDict.cs │ │ ├── GPUOrigin3DDict.cs │ │ ├── GPUShaderStageFlags.cs │ │ ├── GPUDebugCommandsMixin.cs │ │ ├── GPUVertexStepMode.cs │ │ ├── GPUShaderModule.cs │ │ └── GPUQuerySet.cs │ ├── WebRTC │ │ ├── RTCRtpSenderCapabilityHeaderExtension.cs │ │ ├── RTCDTMFSender.cs │ │ ├── RTCDtlsTransport.cs │ │ ├── RTCRtpSenderCapabilities.cs │ │ ├── RTCSdpType.cs │ │ ├── RTCErrorEvent.cs │ │ ├── RTCAnswerOptions.cs │ │ ├── RTCDataChannelEvent.cs │ │ ├── RTCPeerConnectionEvent.cs │ │ ├── RTCTrackEvent.cs │ │ ├── RTCPeerConnectionIceErrorEvent.cs │ │ ├── RTCOfferOptions.cs │ │ └── RTCDataChannelOptions.cs │ ├── DeviceMotionXYZ.cs │ ├── StorageManagerEstimateUsageDetails.cs │ ├── GetCurrentPositionOptions.cs │ ├── MediaRecorderErrorEvent.cs │ ├── DeviceMotionAlphaBetaGamma.cs │ ├── ImageBitmapRenderingContext.cs │ ├── WebXR │ │ ├── XRDOMOverlayInit.cs │ │ ├── XRLayer.cs │ │ ├── XRHand.cs │ │ ├── XRSessionEvent.cs │ │ ├── XRAnchorSet.cs │ │ ├── XRJointSpace.cs │ │ ├── XRJointPose.cs │ │ ├── XRLightProbeInit.cs │ │ ├── XRSubImage.cs │ │ ├── XRLayerEvent.cs │ │ ├── XRSessionMode.cs │ │ ├── XRAnchor.cs │ │ ├── XRWebGLDepthInformation.cs │ │ ├── XRViewerPose.cs │ │ └── XRSessionInit.cs │ ├── BackgroundFetchIconInfo.cs │ ├── PopStateEvent.cs │ ├── StorageManagerEstimate.cs │ ├── InputEvent.cs │ ├── PromiseCatchException.cs │ ├── MediaKeys.cs │ ├── EncryptParams.cs │ ├── AesKwParams.cs │ ├── HashChangeEvent.cs │ ├── MediaQueryListEvent.cs │ ├── RsaHash.cs │ ├── KeyDeriveParams.cs │ ├── WebGL │ │ ├── Extensions │ │ │ └── WEBGL_lose_context.cs │ │ ├── WebGLObject.cs │ │ ├── WebGLSync.cs │ │ ├── WebGLSampler.cs │ │ ├── WebGLQuery.cs │ │ ├── WebGLActiveInfo.cs │ │ ├── WebGLBuffer.cs │ │ ├── WebGLShader.cs │ │ ├── WebGLTexture.cs │ │ ├── WebGLFramebuffer.cs │ │ ├── WebGLUniformLocation.cs │ │ ├── WebGLProgram.cs │ │ ├── WebGLRenderbuffer.cs │ │ ├── WebGLTransformFeedback.cs │ │ ├── WebGLVertexArrayObject.cs │ │ ├── WebGLContextEvent.cs │ │ └── WebGLTypeDefinitions.cs │ ├── KeyGenParams.cs │ ├── CryptoSignParams.cs │ ├── CryptoKeyBase.cs │ ├── MIDIInputMap.cs │ ├── MIDIOutputMap.cs │ ├── RequestFullscreenOptions.cs │ ├── IScreen.cs │ ├── CountQueuingStrategyOptions.cs │ ├── DocumentTimelineOptions.cs │ ├── PasswordCredentialData.cs │ ├── PeriodicSyncOptions.cs │ ├── IDBDatabaseInfo.cs │ ├── RemoveEntryOptions.cs │ ├── SharedArrayBufferOptions.cs │ ├── ShowNotificationsOptionAction.cs │ ├── WatchAdvertisementsOptions.cs │ ├── MediaKeyCapabilities.cs │ ├── LockInfo.cs │ ├── ElementCreationOptions.cs │ ├── StorageEvent.cs │ ├── SerialPortRequestOptions.cs │ ├── CredentialCreatePasswordOptions.cs │ ├── GetHandleOptions.cs │ ├── Ink.cs │ ├── SVGImageElement.cs │ ├── StructuredCloneOptions.cs │ ├── FileSystemSyncReadWriteOptions.cs │ ├── ArrayBufferOptions.cs │ ├── CredentialGetPasswordOptions.cs │ ├── FileSystemCreateWritableOptions.cs │ ├── PredefinedColorSpace.cs │ ├── AudioDestinationNode.cs │ ├── ErrorOptions.cs │ ├── MediaStreamTrackGeneratorOptions.cs │ ├── SVGGraphicsElement.cs │ ├── WGSLLanguageFeatures.cs │ ├── CredentialGetOtpOptions.cs │ ├── OscillatorType.cs │ ├── GetRootNodeOptions.cs │ ├── InkPresenterParam.cs │ ├── PasswordCredential.cs │ ├── Touch.cs │ ├── FlowControlType.cs │ ├── PaymentCurrencyAmount.cs │ ├── XMLHttpRequestEventTarget.cs │ ├── GestureEvent.cs │ ├── CredentialCreateFederatedOptions.cs │ ├── MediaCapabilitiesInfo.cs │ ├── GetNotificationsOptions.cs │ ├── HIDConnectionEvent.cs │ ├── CredentialGetOtp.cs │ ├── XMLDocument.cs │ ├── BarcodeDetectorOptions.cs │ ├── EncodeIntoProgress.cs │ ├── VideoFrameRect.cs │ ├── MediaStreamAudioSourceNode.cs │ ├── NavigationPreloadState.cs │ ├── PageTransitionEvent.cs │ ├── CredentialGetPublicKeyOptions.cs │ ├── AudioSinkOptions.cs │ ├── CookieChangeEvent.cs │ ├── VideoResizeModeEnum.cs │ ├── CookieSubscription.cs │ ├── RegExp.cs │ ├── VideoFrameLayout.cs │ ├── CryptoImportParams.cs │ ├── MediaStreamTrackAudioSourceNode.cs │ ├── CredentialCreatePublicKeyOptions.cs │ ├── ReadableStreamBYOBRequest.cs │ ├── CredentialCreateOptions.cs │ ├── IDBDatabaseTransactionOptions.cs │ ├── CredentialGetFederatedOptions.cs │ ├── LockManagerState.cs │ ├── InstallPromptResult.cs │ ├── GamepadHand.cs │ ├── InkPresenterStyle.cs │ ├── UpdateUIOptions.cs │ ├── VideoFrameCopyOptions.cs │ ├── ConstrainULongRange.cs │ ├── InputDeviceCapabilities.cs │ ├── SerialPortRequestFilter.cs │ ├── USBConnectionEvent.cs │ ├── MediaStreamTrackProcessorOptions.cs │ ├── USBDeviceRequestOptions.cs │ ├── ContentIndexEvent.cs │ ├── GamepadHapticActuatorType.cs │ ├── HIDRequestDeviceOptions.cs │ ├── CredentialGetIdentityOptions.cs │ ├── ReadableStreamReaderReadResponse.cs │ ├── CredentialGetFederated.cs │ ├── QueueingStrategy.cs │ ├── MIDIAccessOptions.cs │ ├── SelfCapturePreferenceEnum.cs │ ├── ClipboardItemOptions.cs │ ├── ParityType.cs │ ├── VideoFacingModeEnum.cs │ ├── ByteLengthQueuingStrategyOptions.cs │ ├── HapticEffectParams.cs │ ├── MonitorTypeSurfacesEnum.cs │ ├── DocumentPictureInPictureEvent.cs │ ├── FilePickerType.cs │ ├── MIDIConnectionEvent.cs │ ├── SystemAudioPreferenceEnum.cs │ ├── HmacImportParams.cs │ ├── AllocationSizeOptions.cs │ ├── FocusEvent.cs │ ├── GeolocationPositionError.cs │ ├── MIDIInput.cs │ ├── GamepadEvent.cs │ ├── WhiteBalanceModeEnum.cs │ ├── BackgroundFetchEvent.cs │ ├── PaymentItem.cs │ ├── InputDeviceInfo.cs │ ├── ImageDataSettings.cs │ ├── MIDIMessageEvent.cs │ ├── ClipboardEvent.cs │ ├── AnimationTimeline.cs │ ├── ChannelInterpretation.cs │ ├── GeolocationPosition.cs │ ├── PushEvent.cs │ ├── SVGElement.cs │ └── MediaStreamTrackEvent.cs ├── IJSObject.cs ├── RemoteJSRuntime │ └── AsyncObjects │ │ ├── IDBObjectStoreAsync.cs │ │ ├── CryptoKeyBaseAsync.cs │ │ ├── EcdhKeyDeriveParamsAsync.cs │ │ └── AesCbcParamsAsync.cs ├── Toolbox │ └── Async.cs └── JsonConverters │ └── UnionConverterFactory.cs ├── SpawnDev.BlazorJS.Demo ├── wwwroot │ ├── favicon.png │ ├── icon-192.png │ └── sample-data │ │ └── weather.json ├── Pages │ └── Home.razor ├── Layout │ └── MainLayout.razor ├── _Imports.razor ├── App.razor └── SpawnDev.BlazorJS.Demo.csproj ├── SpawnDev.BlazorJS.Demo6 ├── wwwroot │ ├── favicon.ico │ ├── icon-192.png │ ├── css │ │ └── open-iconic │ │ │ └── font │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ ├── sample-data │ │ └── weather.json │ └── index.html ├── Pages │ ├── Index.razor │ └── Counter.razor ├── Shared │ ├── MainLayout.razor │ └── SurveyPrompt.razor ├── _Imports.razor ├── App.razor ├── SpawnDev.BlazorJS.Demo6.csproj └── Program.cs ├── SpawnDev.BlazorJS.Demo9 ├── wwwroot │ ├── favicon.png │ ├── icon-192.png │ └── sample-data │ │ └── weather.json ├── Pages │ ├── Home.razor │ └── Counter.razor ├── Layout │ └── MainLayout.razor ├── _Imports.razor ├── App.razor └── SpawnDev.BlazorJS.Demo9.csproj ├── .editorconfig └── .github ├── ISSUE_TEMPLATE └── feature_request.md └── FUNDING.yml /SpawnDev.BlazorJS/Images/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS/Images/icon-128.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS.Demo/wwwroot/favicon.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo/wwwroot/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS.Demo/wwwroot/icon-192.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS.Demo6/wwwroot/favicon.ico -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/wwwroot/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS.Demo6/wwwroot/icon-192.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo9/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS.Demo9/wwwroot/favicon.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo9/wwwroot/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS.Demo9/wwwroot/icon-192.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo/Pages/Home.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Home 4 | 5 |

Hello, world!

6 | 7 | Welcome to your new app. 8 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo9/Pages/Home.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Home 4 | 5 |

Hello, world!

6 | 7 | Welcome to your new app. 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # CA2018: 'Buffer.BlockCopy' expects the number of bytes to be copied for the 'count' argument 4 | dotnet_diagnostic.CA2018.severity = none 5 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ImageBitmapRenderingContextSettings.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class ImageBitmapRenderingContextSettings 4 | { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS.Demo6/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS.Demo6/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS.Demo6/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS/main/SpawnDev.BlazorJS.Demo6/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/Point2D.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class Point2D 4 | { 5 | public int X { get; set; } 6 | public int Y { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/Point2DF.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class Point2DF 4 | { 5 | public float X { get; set; } 6 | public float Y { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ReadableStreamUnderlyingSource.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public abstract class ReadableStreamUnderlyingSource { } 6 | } 7 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Index 4 | 5 |

Hello, world!

6 | 7 | Welcome to your new app. 8 | 9 | 10 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUCommandsMixin.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#gpucommandsmixin 5 | /// 6 | public interface GPUCommandsMixin { } 7 | } 8 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCRtpSenderCapabilityHeaderExtension.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 2 | { 3 | public class RTCRtpSenderCapabilityHeaderExtension 4 | { 5 | public string Uri { get; set; } = ""; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/IJSObject.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS 2 | { 3 | /// 4 | /// This interface is used to mark interfaces for deserialization as a IJSObjectProxy with specified itnerface 5 | /// 6 | public interface IJSObject { } 7 | } 8 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/DeviceMotionXYZ.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class DeviceMotionXYZ 4 | { 5 | public double X { get; set; } 6 | public double Y { get; set; } 7 | public double Z { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/StorageManagerEstimateUsageDetails.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class StorageManagerEstimateUsageDetails 4 | { 5 | public long Caches { get; set; } 6 | public long serviceWorkerRegistrations { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCDTMFSender.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 5 | { 6 | public class RTCDTMFSender : JSObject 7 | { 8 | public RTCDTMFSender(IJSInProcessObjectReference _ref) : base(_ref) { } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/GetCurrentPositionOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// GetCurrentPosition options 5 | /// 6 | [Obsolete("Use GeolocationOptions instead")] 7 | public class GetCurrentPositionOptions : GeolocationOptions { } 8 | } 9 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MediaRecorderErrorEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class MediaRecorderErrorEvent : Event 6 | { 7 | public MediaRecorderErrorEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCDtlsTransport.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 5 | { 6 | public class RTCDtlsTransport : JSObject 7 | { 8 | public RTCDtlsTransport(IJSInProcessObjectReference _ref) : base(_ref) { } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/DeviceMotionAlphaBetaGamma.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class DeviceMotionAlphaBetaGamma 4 | { 5 | public double Alpha { get; set; } 6 | public double Beta { get; set; } 7 | public double Gamma { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUCommandBufferDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#command-buffer-creation 5 | /// 6 | public class GPUCommandBufferDescriptor : GPUObjectDescriptorBase 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUExternalTextureBindingLayout.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpuexternaltexturebindinglayout 5 | /// 6 | public class GPUExternalTextureBindingLayout 7 | { 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ImageBitmapRenderingContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class ImageBitmapRenderingContext : JSObject 6 | { 7 | public ImageBitmapRenderingContext(IJSInProcessObjectReference _ref) : base(_ref) { } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPURenderBundleDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpurenderbundledescriptor 5 | /// 6 | public class GPURenderBundleDescriptor : GPUObjectDescriptorBase 7 | { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRDOMOverlayInit.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class XRDOMOverlayInit 6 | { 7 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 8 | public HTMLElement? Root { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/BackgroundFetchIconInfo.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchManager/fetch#icons 5 | /// 6 | [Obsolete("Use IconInfo instead")] 7 | public class BackgroundFetchIconInfo : IconInfo { } 8 | } 9 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/PopStateEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class PopStateEvent : Event 6 | { 7 | public PopStateEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 8 | public T StateAs() => JSRef!.Get("state"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/StorageManagerEstimate.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class StorageManagerEstimate 4 | { 5 | public long Quota { get; set; } 6 | public long Usage { get; set; } 7 | public StorageManagerEstimateUsageDetails? UsageDetails { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCRtpSenderCapabilities.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 2 | { 3 | public class RTCRtpSenderCapabilities 4 | { 5 | public List Codecs { get; set; } 6 | public List HeaderExtensions { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCSdpType.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC { 2 | public static class RTCSdpType { 3 | public const string Answer = "answer"; 4 | public const string Offer = "offer"; 5 | public const string PRAnswer = "pranswer"; 6 | public const string Rollback = "rollback"; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCErrorEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 4 | { 5 | public class RTCErrorEvent : Event 6 | { 7 | public RTCErrorEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 8 | public RTCError Error => JSRef!.Get("error"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/InputEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | // https://developer.mozilla.org/en-US/docs/Web/API/InputEvent 6 | // TODO - finish 7 | public class InputEvent : UIEvent 8 | { 9 | public InputEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/PromiseCatchException.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class PromiseCatchException : Exception 4 | { 5 | public TCatch CatchValue { get; init; } 6 | public PromiseCatchException(TCatch catchValue) 7 | { 8 | CatchValue = catchValue; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCAnswerOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 2 | { 3 | /// 4 | /// Options used for RTCPeerConnection.CreateSnwer() 5 | /// https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createAnswer#options 6 | /// 7 | public class RTCAnswerOptions 8 | { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MediaKeys.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys 7 | /// 8 | public class MediaKeys : JSObject 9 | { 10 | public MediaKeys(IJSInProcessObjectReference _ref) : base(_ref) { } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/IGPUTextureOrTextureView.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// The resource to bind, which may be a GPUTexture or GPUTextureView. 5 | /// https://www.w3.org/TR/webgpu/#dictdef-gpurenderpasscolorattachment 6 | /// 7 | public interface IGPUTextureOrTextureView 8 | { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCDataChannelEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 5 | { 6 | public class RTCDataChannelEvent : Event 7 | { 8 | public RTCDataChannelEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 9 | public RTCDataChannel Channel => JSRef!.Get("channel"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/EncryptParams.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Base class for parameter types used when calling SubtleCrypto.encrypt 5 | /// 6 | public class EncryptParams 7 | { 8 | /// 9 | /// A string. 10 | /// 11 | public virtual string Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/AesKwParams.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// AES-KW parameters 5 | /// 6 | public class AesKwParams : EncryptParams 7 | { 8 | /// 9 | /// A string. This should be set to AES-KW. 10 | /// 11 | public override string Name { get; set; } = "AES-KW"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/HashChangeEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class HashChangeEvent : Event 6 | { 7 | public HashChangeEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 8 | public string NewURL => JSRef!.Get("newURL"); 9 | public string OldURL => JSRef!.Get("oldURL"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUCommandEncoderDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Represents a descriptor used to configure a GPU command encoder. 5 | /// https://www.w3.org/TR/webgpu/#dictdef-gpucommandencoderdescriptor 6 | /// 7 | public class GPUCommandEncoderDescriptor : GPUObjectDescriptorBase 8 | { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCPeerConnectionEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 5 | { 6 | public class RTCPeerConnectionEvent : Event 7 | { 8 | public RTCPeerConnectionEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 9 | public RTCIceCandidate Candidate => JSRef!.Get("candidate"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MediaQueryListEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class MediaQueryListEvent : Event 6 | { 7 | public MediaQueryListEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 8 | public bool Matches => JSRef!.Get("matches"); 9 | public string Media => JSRef!.Get("media"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo9/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 | Counter 4 | 5 |

Counter

6 | 7 |

Current count: @currentCount

8 | 9 | 10 | 11 | @code { 12 | private int currentCount = 0; 13 | 14 | private void IncrementCount() 15 | { 16 | currentCount++; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPURenderBundle.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://www.w3.org/TR/webgpu/#gpurenderbundle 7 | /// 8 | public class GPURenderBundle : GPUObjectBase 9 | { 10 | /// 11 | public GPURenderBundle(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/IGPUBindingResource.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// The resource to bind, which may be a GPUSampler, GPUTexture, GPUTextureView, GPUBuffer, GPUBufferBinding, or GPUExternalTexture. 5 | /// https://www.w3.org/TR/webgpu/#typedefdef-gpubindingresource 6 | /// 7 | public interface IGPUBindingResource 8 | { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/RsaHash.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Used with RsaHashedKeyGenParams 5 | /// 6 | public class RsaHash 7 | { 8 | /// 9 | /// A string representing the name of the digest function to use. You can pass any of SHA-256, SHA-384, or SHA-512 here 10 | /// 11 | public string Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo/Layout/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 |
3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.Web.Virtualization 7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 8 | @using Microsoft.JSInterop 9 | @using SpawnDev.BlazorJS.Demo 10 | @using SpawnDev.BlazorJS.Demo.Layout 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 | 7 | 8 |
9 |
10 | About 11 |
12 | 13 |
14 | @Body 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo9/Layout/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 |
3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/KeyDeriveParams.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Base class for options used in SubtleCrypto.DeriveKey() 5 | /// 6 | public class KeyDeriveParams 7 | { 8 | /// 9 | /// A string indicating the derive key parameters the inheriting class holds 10 | /// 11 | public virtual string Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/Extensions/WEBGL_lose_context.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.WebGL.Extensions { 4 | public class WEBGL_lose_context : JSObject 5 | { 6 | public WEBGL_lose_context(IJSInProcessObjectReference _ref) : base(_ref) { } 7 | public void LoseContext() => JSRef!.CallVoid("loseContext"); 8 | public void RestoreContext() => JSRef!.CallVoid("restoreContext"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.Web.Virtualization 7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 8 | @using Microsoft.JSInterop 9 | @using SpawnDev.BlazorJS.Demo6 10 | @using SpawnDev.BlazorJS.Demo6.Shared 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo9/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.AspNetCore.Components.Web.Virtualization 7 | @using Microsoft.AspNetCore.Components.WebAssembly.Http 8 | @using Microsoft.JSInterop 9 | @using SpawnDev.BlazorJS.Demo9 10 | @using SpawnDev.BlazorJS.Demo9.Layout 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 | Counter 4 | 5 |

Counter

6 | 7 |

Current count: @currentCount

8 | 9 | 10 | 11 | @code { 12 | private int currentCount = 0; 13 | 14 | [Inject] 15 | BlazorJSRuntime JS { get; set; } = default!; 16 | 17 | private void RunTests() 18 | { 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/KeyGenParams.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Base class for parameter types used when calling SubtleCrypto.generateKey 7 | /// 8 | public class KeyGenParams 9 | { 10 | /// 11 | /// A string. 12 | /// 13 | [JsonPropertyName("name")] 14 | public virtual string Name { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CryptoSignParams.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Represents the object that should be passed as the algorithm parameter into SubtleCrypto.sign() or SubtleCrypto.verify() 5 | /// 6 | public class CryptoSignParams 7 | { 8 | /// 9 | /// A string that specifies the signature algorithm to use 10 | /// 11 | public virtual string Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CryptoKeyBase.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Base class for CryptoKeyPair and CryptoKey 7 | /// 8 | public class CryptoKeyBase : JSObject 9 | { 10 | /// 11 | /// Deserialization constructor 12 | /// 13 | /// 14 | public CryptoKeyBase(IJSInProcessObjectReference _ref) : base(_ref) { } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MIDIInputMap.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The MIDIInputMap read-only interface of the Web MIDI API provides the set of MIDI input ports that are currently available. 7 | /// 8 | public class MIDIInputMap : Map 9 | { 10 | #region Constructors 11 | public MIDIInputMap(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | #endregion 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUComputePipelineDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpucomputepipelinedescriptor 5 | /// 6 | public class GPUComputePipelineDescriptor : GPUPipelineDescriptorBase 7 | { 8 | /// 9 | /// Describes the compute shader entry point of the pipeline. 10 | /// 11 | public GPUProgrammableStage Compute { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MIDIOutputMap.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The MIDIOutputMap read-only interface of the Web MIDI API provides the set of MIDI output ports that are currently available. 7 | /// 8 | public class MIDIOutputMap : Map 9 | { 10 | #region Constructors 11 | public MIDIOutputMap(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | #endregion 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/RequestFullscreenOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Options for Element.RequestFullscreen() 7 | /// 8 | public class RequestFullscreenOptions { 9 | /// 10 | /// Options hide, show, auto (default) 11 | /// 12 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 13 | public string? NavigationUI { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Not found 8 | 9 |

Sorry, there's nothing at this address.

10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Not found 8 | 9 |

Sorry, there's nothing at this address.

10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo9/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Not found 8 | 9 |

Sorry, there's nothing at this address.

10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLObject.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLObject is part of the WebGL API and is the parent interface for all WebGL objects.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLObject 8 | ///
9 | public class WebGLObject : JSObject 10 | { 11 | /// 12 | public WebGLObject(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUSamplerBindingLayout.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpusamplerbindinglayout 5 | /// 6 | public class GPUSamplerBindingLayout 7 | { 8 | /// 9 | /// Indicates the required type of a sampler bound to this bindings. 10 | /// Options are "filtering", "non-filtering", "comparison" 11 | /// 12 | public string Type { get; init; } 13 | } 14 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/IScreen.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public interface IScreen 4 | { 5 | int AvailHeight { get; } 6 | int AvailLeft { get; } 7 | int AvailTop { get; } 8 | int AvailWidth { get; } 9 | int ColorDepth { get; } 10 | double DevicePixelRatio { get; } 11 | int Height { get; } 12 | bool IsExtended { get; } 13 | ScreenOrientation Orientation { get; } 14 | int PixelDepth { get; } 15 | int Width { get; } 16 | } 17 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUBindGroup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// A GPUBindGroup defines a set of resources to be bound together in a group and how the resources are used in shader stages. 7 | /// https://www.w3.org/TR/webgpu/#gpubindgroup 8 | /// 9 | public class GPUBindGroup : GPUObjectBase 10 | { 11 | /// 12 | public GPUBindGroup(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CountQueuingStrategyOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://developer.mozilla.org/en-US/docs/Web/API/CountQueuingStrategy/CountQueuingStrategy#options 5 | /// 6 | public class CountQueuingStrategyOptions 7 | { 8 | /// 9 | /// The total number of chunks that can be contained in the internal queue before backpressure is applied. 10 | /// 11 | public int HighWaterMark { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/DocumentTimelineOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | /// 3 | /// An object specifying options for the new timeline. 4 | /// 5 | public class DocumentTimelineOptions 6 | { 7 | /// 8 | /// A number that specifies the zero time for the DocumentTimeline as a number of milliseconds relative to Performance.timeOrigin. Defaults to 0. 9 | /// 10 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 11 | public float? OriginTime { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRLayer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The XRLayer interface of the WebXR Device API is the base class for WebXR layer types. It inherits methods from EventTarget.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRLayer 8 | ///
9 | public class XRLayer : EventTarget 10 | { 11 | /// 12 | public XRLayer(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/PasswordCredentialData.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class PasswordCredentialData 6 | { 7 | public string Id { get; set; } = ""; 8 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 9 | public string? IconURL { get; set; } 10 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 11 | public string? Name { get; set; } 12 | public string Password { get; set; } = ""; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/PeriodicSyncOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// PeriodicSync options 7 | /// 8 | public class PeriodicSyncOptions 9 | { 10 | /// 11 | /// The minimum interval time, in milliseconds, at which the periodic sync should occur. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public int? MinInterval { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLSync.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLSync interface is part of the WebGL 2 API and is used to synchronize activities between the GPU and the application.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLSync 8 | ///
9 | public class WebGLSync : WebGLObject 10 | { 11 | /// 12 | public WebGLSync(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRHand.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The XRHand interface is pair iterator (an ordered map) with the key being the hand joints and the value being an XRJointSpace.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRHand 8 | ///
9 | public class XRHand : Map 10 | { 11 | /// 12 | public XRHand(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUSampler.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// A GPUSampler encodes transformations and filtering information that can be used in a shader to interpret texture resource data. 7 | /// https://www.w3.org/TR/webgpu/#gpusampler 8 | /// 9 | public class GPUSampler : GPUObjectBase, IGPUBindingResource 10 | { 11 | /// 12 | public GPUSampler(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/IDBDatabaseInfo.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Returned as elements in an array from the Promise returned by IDBFactory.databases() 5 | /// 6 | public class IDBDatabaseInfo 7 | { 8 | /// 9 | /// The database name. 10 | /// 11 | public string Name { get; set; } = ""; 12 | /// 13 | /// The database version. 14 | /// 15 | public long Version { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLSampler.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLSampler interface is part of the WebGL 2 API and stores sampling parameters for WebGLTexture access inside of a shader.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLSampler 8 | ///
9 | public class WebGLSampler : WebGLObject 10 | { 11 | /// 12 | public WebGLSampler(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/RemoveEntryOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// FileSystemDirectory.RemoveEntry options 7 | /// 8 | public class RemoveEntryOptions 9 | { 10 | /// 11 | /// A boolean value, which defaults to false. When set to true entries will be removed recursively. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public bool? Recursive { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo/wwwroot/sample-data/weather.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "date": "2022-01-06", 4 | "temperatureC": 1, 5 | "summary": "Freezing" 6 | }, 7 | { 8 | "date": "2022-01-07", 9 | "temperatureC": 14, 10 | "summary": "Bracing" 11 | }, 12 | { 13 | "date": "2022-01-08", 14 | "temperatureC": -13, 15 | "summary": "Freezing" 16 | }, 17 | { 18 | "date": "2022-01-09", 19 | "temperatureC": -16, 20 | "summary": "Balmy" 21 | }, 22 | { 23 | "date": "2022-01-10", 24 | "temperatureC": -2, 25 | "summary": "Chilly" 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/wwwroot/sample-data/weather.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "date": "2018-05-06", 4 | "temperatureC": 1, 5 | "summary": "Freezing" 6 | }, 7 | { 8 | "date": "2018-05-07", 9 | "temperatureC": 14, 10 | "summary": "Bracing" 11 | }, 12 | { 13 | "date": "2018-05-08", 14 | "temperatureC": -13, 15 | "summary": "Freezing" 16 | }, 17 | { 18 | "date": "2018-05-09", 19 | "temperatureC": -16, 20 | "summary": "Balmy" 21 | }, 22 | { 23 | "date": "2018-05-10", 24 | "temperatureC": -2, 25 | "summary": "Chilly" 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo9/wwwroot/sample-data/weather.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "date": "2022-01-06", 4 | "temperatureC": 1, 5 | "summary": "Freezing" 6 | }, 7 | { 8 | "date": "2022-01-07", 9 | "temperatureC": 14, 10 | "summary": "Bracing" 11 | }, 12 | { 13 | "date": "2022-01-08", 14 | "temperatureC": -13, 15 | "summary": "Freezing" 16 | }, 17 | { 18 | "date": "2022-01-09", 19 | "temperatureC": -16, 20 | "summary": "Balmy" 21 | }, 22 | { 23 | "date": "2022-01-10", 24 | "temperatureC": -2, 25 | "summary": "Chilly" 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/SharedArrayBufferOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Can be used when creating a SharedArrayBuffer 7 | /// 8 | public class SharedArrayBufferOptions 9 | { 10 | /// 11 | /// The maximum size, in bytes, that the shared array buffer can be resized to. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public long? MaxByteLength { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ShowNotificationsOptionAction.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class ShowNotificationsOptionAction 6 | { 7 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 8 | public string? Action { get; set; } 9 | 10 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 11 | public string? Title { get; set; } 12 | 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public string? Icon { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WatchAdvertisementsOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://webbluetoothcg.github.io/web-bluetooth/#dictdef-watchadvertisementsoptions 7 | /// 8 | public class WatchAdvertisementsOptions 9 | { 10 | /// 11 | /// Optional. The signal to abort the request. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public AbortSignal? Signal { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUSupportedFeatures.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The GPUSupportedFeatures interface of the WebGPU API is a Set-like object that describes additional functionality supported by a GPUAdapter. 7 | /// https://www.w3.org/TR/webgpu/#gpusupportedfeatures 8 | /// 9 | public class GPUSupportedFeatures : Set 10 | { 11 | /// 12 | public GPUSupportedFeatures(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MediaKeyCapabilities.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class MediaKeyCapabilities 6 | { 7 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 8 | public string? ContentType { get; set; } 9 | 10 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 11 | public string? EncryptionScheme { get; set; } 12 | 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public string? Robustness { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/LockInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// LockManager lock info 7 | /// https://developer.mozilla.org/en-US/docs/Web/API/LockManager/query#name 8 | /// 9 | public class LockInfo 10 | { 11 | [JsonPropertyName("name")] 12 | public string Name { get; set; } 13 | [JsonPropertyName("mode")] 14 | public string Mode { get; set; } 15 | [JsonPropertyName("clientId")] 16 | public string ClientId { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |
2 | 3 | @Title 4 | 5 | 6 | Please take our 7 | brief survey 8 | 9 | and tell us what you think. 10 |
11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string? Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUAutoLayoutMode.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://www.w3.org/TR/webgpu/#enumdef-gpuautolayoutmode 7 | /// 8 | [JsonConverter(typeof(JsonConverters.EnumStringConverterFactory))] 9 | public enum GPUAutoLayoutMode 10 | { 11 | /// 12 | /// Note: If "auto" is used the pipeline cannot share GPUBindGroups with any other pipelines. 13 | /// 14 | [JsonPropertyName("auto")] 15 | Auto, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUPipelineLayout.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The GPUPipelineLayout interface of the WebGPU API defines the GPUBindGroupLayouts used by a pipeline. 7 | /// GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts. 8 | /// 9 | public class GPUPipelineLayout : GPUObjectBase 10 | { 11 | /// 12 | public GPUPipelineLayout(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ElementCreationOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement#options 7 | /// 8 | public class ElementCreationOptions 9 | { 10 | /// 11 | /// The tag name of a custom element previously defined via customElements.define(). 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public string? Is { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLQuery.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLQuery interface is part of the WebGL 2 API and provides ways to asynchronously query for information. By default, occlusion queries and primitive queries are available.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLQuery 8 | ///
9 | public class WebGLQuery : WebGLObject 10 | { 11 | /// 12 | public WebGLQuery(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRSessionEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRSessionEvent 7 | /// 8 | public class XRSessionEvent : Event 9 | { 10 | /// 11 | public XRSessionEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// The XRSession to which the event refers. 14 | /// 15 | public XRSession Session => JSRef!.Get("session"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/StorageEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class StorageEvent 6 | : Event 7 | { 8 | public StorageEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 9 | public string Key => JSRef!.Get("key"); 10 | public string OldValue => JSRef!.Get("oldValue"); 11 | public string NewValue => JSRef!.Get("newValue"); 12 | public string Url => JSRef!.Get("url"); 13 | public Storage StorageArea => JSRef!.Get("storageArea"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRAnchorSet.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRAnchorSet 7 | /// 8 | public class XRAnchorSet : Set 9 | { 10 | /// 11 | public XRAnchorSet(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// Creates a new instance 14 | /// 15 | public XRAnchorSet(IEnumerable iterable) : base(JS.New("Set", iterable)) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/SerialPortRequestOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class SerialPortRequestOptions 6 | { 7 | /// 8 | /// A list of objects containing vendor and product IDs used to search for attached devices. The USB Implementors Forum assigns IDs to specific companies. Each company assigns IDs to its products. 9 | /// 10 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 11 | public IEnumerable? Filters { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLActiveInfo.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// The WebGLActiveInfo interface is part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getActiveAttrib() and WebGLRenderingContext.getActiveUniform() methods.
5 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLActiveInfo 6 | ///
7 | public class WebGLActiveInfo 8 | { 9 | public string Name { get; set; } 10 | public int Size { get; set; } 11 | public int Type { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUShaderModuleDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Describes the parameters for creating a GPUShaderModule, which is used to compile and manage shader code in WebGPU.
5 | /// https://www.w3.org/TR/webgpu/#shader-module-creation 6 | ///
7 | public class GPUShaderModuleDescriptor : GPUObjectDescriptorBase 8 | { 9 | /// 10 | /// A string representing the WGSL source code for the shader module. 11 | /// 12 | public string Code { get; init; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialCreatePasswordOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// If used for CredentialsContainer.Create()
5 | /// a PasswordCredential will be returned 6 | ///
7 | public class CredentialCreatePasswordOptions : CredentialCreateOptions 8 | { 9 | /// 10 | /// An object containing requirements for creating a password credential. See the Credential Management API section below for more details. 11 | /// 12 | public CredentialCreatePassword Password { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/GetHandleOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// FileSystemDirectory.GetHandle options 7 | /// 8 | public class GetHandleOptions 9 | { 10 | /// 11 | /// A boolean value, which defaults to false. When set to true if the directory is not found, one with the specified name will be created and returned. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public bool? Create { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/Ink.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The Ink interface of the Ink API provides access to InkPresenter objects for the application to use to render ink strokes.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/Ink 8 | ///
9 | public class Ink : JSObject 10 | { 11 | public Ink(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | public Task RequestPresenter(InkPresenterParam param) => JSRef!.CallAsync("requestPresenter", param); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/SVGImageElement.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The SVGImageElement interface corresponds to the image element.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/SVGImageElement 8 | ///
9 | public class SVGImageElement : SVGGraphicsElement 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public SVGImageElement(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCTrackEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 5 | { 6 | public class RTCTrackEvent : Event 7 | { 8 | public RTCTrackEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 9 | public RTCRtpReceiver Receiver => JSRef!.Get("receiver"); 10 | public MediaStream[] Streams => JSRef!.Get("streams"); 11 | public MediaStreamTrack Track => JSRef!.Get("track"); 12 | public RTCRtpTransceiver Transceiver => JSRef!.Get("transceiver"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/RemoteJSRuntime/AsyncObjects/IDBObjectStoreAsync.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | using SpawnDev.BlazorJS.JsonConverters; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace SpawnDev.BlazorJS.RemoteJSRuntime.AsyncObjects 6 | { 7 | [JsonConverter(typeof(JSObjectAsyncConverterFactory))] 8 | public class IDBObjectStoreAsync : JSObjectAsync 9 | { 10 | /// 11 | /// Deserialization constructor 12 | /// 13 | /// 14 | public IDBObjectStoreAsync(IJSObjectReference jsRef) : base(jsRef) { } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/StructuredCloneOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/Window/structuredClone#options 7 | /// 8 | public class StructuredCloneOptions 9 | { 10 | /// 11 | /// An array of transferable objects that will be moved rather than cloned to the returned object. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public IEnumerable? Transfer { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/FileSystemSyncReadWriteOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read#options 7 | /// 8 | public class FileSystemSyncReadWriteOptions 9 | { 10 | /// 11 | /// A number representing the offset in bytes that the file should be read from, or written to. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public long? At { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRJointSpace.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRJointSpace 7 | /// 8 | public class XRJointSpace : XRSpace 9 | { 10 | /// 11 | public XRJointSpace(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// The name of the joint that is tracked. See XRHand for possible hand joint names. 14 | /// 15 | public string JointName => JSRef!.Get("jointName"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPULoadOp.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JsonConverters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// https://www.w3.org/TR/webgpu/#enumdef-gpuloadop 8 | /// 9 | [JsonConverter(typeof(EnumStringConverterFactory))] 10 | public enum GPULoadOp 11 | { 12 | /// 13 | /// Load 14 | /// 15 | [JsonPropertyName("load")] 16 | Load, 17 | /// 18 | /// Clear 19 | /// 20 | [JsonPropertyName("clear")] 21 | Clear, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCPeerConnectionIceErrorEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 5 | { 6 | public class RTCPeerConnectionIceErrorEvent : Event 7 | { 8 | public RTCPeerConnectionIceErrorEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 9 | public string? Address => JSRef!.Get("address"); 10 | public uint? Port => JSRef!.Get("port"); 11 | public uint ErrorCode => JSRef!.Get("errorCode"); 12 | public string ErrorText => JSRef!.Get("errorText"); 13 | public string Url => JSRef!.Get("url"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRJointPose.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRJointPose 7 | /// 8 | public class XRJointPose : XRPose 9 | { 10 | /// 11 | public XRJointPose(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// The read-only radius property of the XRJointPose interface indicates the radius (distance from skin) for a joint. 14 | /// 15 | public float Radius => JSRef!.Get("radius"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUBindGroupLayout.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The GPUBindGroupLayout interface of the WebGPU API defines the structure and purpose of related GPU resources 7 | /// such as buffers that will be used in a pipeline, and is used as a template when creating GPUBindGroups. 8 | /// https://www.w3.org/TR/webgpu/#gpubindgrouplayout 9 | /// 10 | public class GPUBindGroupLayout : GPUObjectBase 11 | { 12 | /// 13 | public GPUBindGroupLayout(IJSInProcessObjectReference _ref) : base(_ref) { } 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUComputePassDescriptor.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://www.w3.org/TR/webgpu/#dictdef-gpucomputepassdescriptor 7 | /// 8 | public class GPUComputePassDescriptor : GPUObjectDescriptorBase 9 | { 10 | /// 11 | /// Defines which timestamp values will be written for this pass, and where to write them to. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public GPUComputePassTimestampWrites? TimestampWrites { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUStoreOp.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JsonConverters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// https://www.w3.org/TR/webgpu/#enumdef-gpustoreop 8 | /// 9 | [JsonConverter(typeof(EnumStringConverterFactory))] 10 | public enum GPUStoreOp 11 | { 12 | /// 13 | /// Load 14 | /// 15 | [JsonPropertyName("store")] 16 | Store, 17 | /// 18 | /// Clear 19 | /// 20 | [JsonPropertyName("discard")] 21 | Discard, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLBuffer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLBuffer interface is part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer 8 | ///
9 | public class WebGLBuffer : WebGLObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public WebGLBuffer(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUBlendState.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpublendstate 5 | /// 6 | public class GPUBlendState 7 | { 8 | /// 9 | /// Defines the blending behavior of the corresponding render target for color channels. 10 | /// 11 | public GPUBlendComponent Color { get; set; } 12 | /// 13 | /// Defines the blending behavior of the corresponding render target for the alpha channel. 14 | /// 15 | public GPUBlendComponent Alpha { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUFragmentState.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Represents a fragment of data or a computational unit intended for processing on a GPU. 5 | /// https://www.w3.org/TR/webgpu/#dictdef-gpufragmentstate 6 | /// 7 | public class GPUFragmentState : GPUProgrammableStage 8 | { 9 | /// 10 | /// An array of objects representing color states that represent configuration details for the 11 | /// colors output by the fragment shader stage. 12 | /// 13 | public IEnumerable Targets { get; init; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUObjectDescriptorBase.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// An object descriptor holds the information needed to create an object, which is typically done via one of the create* methods of GPUDevice. 5 | /// https://www.w3.org/TR/webgpu/#dictdef-gpuobjectdescriptorbase 6 | /// 7 | public abstract class GPUObjectDescriptorBase 8 | { 9 | /// 10 | /// A string providing a label that can be used to identify the object, for example in GPUError messages or console warnings. 11 | /// 12 | public string Label { get; init; } = ""; 13 | } 14 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/RemoteJSRuntime/AsyncObjects/CryptoKeyBaseAsync.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | using SpawnDev.BlazorJS.JsonConverters; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace SpawnDev.BlazorJS.RemoteJSRuntime.AsyncObjects 6 | { 7 | /// 8 | /// Base class for CryptoKeyPairAsync and CryptoKeyAsync 9 | /// 10 | [JsonConverter(typeof(JSObjectAsyncConverterFactory))] 11 | public class CryptoKeyBaseAsync : JSObjectAsync 12 | { 13 | /// 14 | /// Deserialization constructor 15 | /// 16 | public CryptoKeyBaseAsync(IJSObjectReference jsRef) : base(jsRef) { } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLShader.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLShader is part of the WebGL API and can either be a vertex or a fragment shader. A WebGLProgram requires both types of shaders.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLShader 8 | ///
9 | public class WebGLShader : WebGLObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public WebGLShader(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUPipelineDescriptorBase.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpupipelinedescriptorbase 5 | /// 6 | public class GPUPipelineDescriptorBase : GPUObjectDescriptorBase 7 | { 8 | /// 9 | /// The GPUPipelineLayout for this pipeline, or "auto" to generate the pipeline layout automatically.
10 | /// Note: If "auto" is used the pipeline cannot share GPUBindGroups with any other pipelines. 11 | ///
12 | public Union Layout { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/RemoteJSRuntime/AsyncObjects/EcdhKeyDeriveParamsAsync.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JSObjects; 2 | 3 | namespace SpawnDev.BlazorJS.RemoteJSRuntime.AsyncObjects 4 | { 5 | /// 6 | /// 7 | /// 8 | public class EcdhKeyDeriveParamsAsync : KeyDeriveParams 9 | { 10 | /// 11 | /// A string. This should be set to ECDH. 12 | /// 13 | public override string Name { get; set; } = "ECDH"; 14 | /// 15 | /// A CryptoKey object representing the public key of the other entity. 16 | /// 17 | public CryptoKeyAsync Public { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ArrayBufferOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Options used when creating an ArrayBuffer
7 | /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/ArrayBuffer#options 8 | ///
9 | public class ArrayBufferOptions 10 | { 11 | /// 12 | /// The maximum size, in bytes, that the array buffer can be resized to. 13 | /// 14 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 15 | public long? MaxByteLength { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialGetPasswordOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// If used for CredentialsContainer.Get()
5 | /// a PasswordCredential will be returned 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get#options 7 | ///
8 | public class CredentialGetPasswordOptions : CredentialGetOptions 9 | { 10 | /// 11 | /// A boolean value indicating that a password credential is being requested. See the Credential Management API section below for more details. 12 | /// 13 | public bool Password { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/FileSystemCreateWritableOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Options for FileSystemFileHandle.createWritable 7 | /// 8 | public class FileSystemCreateWritableOptions 9 | { 10 | /// 11 | /// A Boolean. Default false. When set to true if the file exists, the existing file is first copied to the temporary file. Otherwise the temporary file starts out empty. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public bool? KeepExistingData { get;set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/PredefinedColorSpace.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://html.spec.whatwg.org/multipage/canvas.html#predefinedcolorspace 7 | /// 8 | [JsonConverter(typeof(JsonConverters.EnumStringConverterFactory))] 9 | public enum PredefinedColorSpace 10 | { 11 | /// 12 | /// srgb 13 | /// 14 | [JsonPropertyName("srgb")] 15 | Srgb, 16 | /// 17 | /// display-p3 18 | /// 19 | [JsonPropertyName("display-p3")] 20 | DisplayP3, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUIndexFormat.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JsonConverters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// https://www.w3.org/TR/webgpu/#enumdef-gpuindexformat 8 | /// 9 | [JsonConverter(typeof(EnumStringConverterFactory))] 10 | public enum GPUIndexFormat 11 | { 12 | /// 13 | /// Uint16 14 | /// 15 | [JsonPropertyName("uint16")] 16 | Uint16, 17 | /// 18 | /// Uint32 19 | /// 20 | [JsonPropertyName("uint32")] 21 | Uint32, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/AudioDestinationNode.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode 7 | /// 8 | public class AudioDestinationNode : AudioNode 9 | { 10 | /// 11 | public AudioDestinationNode(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// An unsigned long defining the maximum number of channels that the physical device can handle. 14 | /// 15 | public long MaxChannelCount => JSRef!.Get("maxChannelCount"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ErrorOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Options used when creating a new Error 7 | /// 8 | public class ErrorOptions 9 | { 10 | /// 11 | /// A value indicating the specific cause of the error, reflected in the cause property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public Error? Cause { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MediaStreamTrackGeneratorOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Options for the MediaStreamTrackProcessor constructor.
5 | /// https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackGenerator/MediaStreamTrackGenerator#options 6 | ///
7 | public class MediaStreamTrackGeneratorOptions 8 | { 9 | /// 10 | /// The kind of media frames that the MediaStreamTrackGenerator will produce.
11 | /// This can be:
12 | /// "audio"
13 | /// "video" 14 | ///
15 | public string Kind { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/SVGGraphicsElement.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The SVGGraphicsElement interface represents SVG elements whose primary purpose is to directly render graphics into a group.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement 8 | ///
9 | public class SVGGraphicsElement : SVGElement 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public SVGGraphicsElement(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLTexture.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | namespace SpawnDev.BlazorJS.JSObjects 3 | { 4 | /// 5 | /// The WebGLTexture interface is part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations.
6 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLTexture 7 | ///
8 | public class WebGLTexture : WebGLObject 9 | { 10 | /// 11 | /// Deserialization constructor 12 | /// 13 | /// 14 | public WebGLTexture(IJSInProcessObjectReference _ref) : base(_ref) { } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WGSLLanguageFeatures.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WGSLLanguageFeatures interface of the WebGPU API is a setlike object that reports the WGSL language extensions supported by the WebGPU implementation. 7 | /// 8 | public class WGSLLanguageFeatures : Set 9 | { 10 | #region Constructors 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public WGSLLanguageFeatures(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | #endregion 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLFramebuffer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLFramebuffer interface is part of the WebGL API and represents a collection of buffers that serve as a rendering destination.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLFramebuffer 8 | ///
9 | public class WebGLFramebuffer : WebGLObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public WebGLFramebuffer(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialGetOtpOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// If used for CredentialsContainer.Get()
5 | /// an OtpCredential will be returned 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get#options 7 | ///
8 | public class CredentialGetOtpOptions : CredentialGetOptions 9 | { 10 | /// 11 | /// An object containing transport type hints. Causes the get() call to initiate a request for the retrieval of an OTP. See the WebOTP API section below for more details. 12 | /// 13 | public CredentialGetOtp Otp { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/OscillatorType.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JsonConverters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// The shape of the wave produced by the node. 8 | /// 9 | [JsonConverter(typeof(EnumStringConverterFactory))] 10 | public enum OscillatorType 11 | { 12 | [JsonPropertyName("sine")] 13 | Sine, 14 | [JsonPropertyName("square")] 15 | Square, 16 | [JsonPropertyName("sawtooth")] 17 | Sawtooth, 18 | [JsonPropertyName("triangle")] 19 | Triangle, 20 | [JsonPropertyName("custom")] 21 | Custom, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRLightProbeInit.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRSession/requestLightProbe#options 7 | /// 8 | public class XRLightProbeInit 9 | { 10 | /// 11 | /// The internal reflection format indicating how the texture data is represented, either srgba8 (default value) or rgba16f. See also XRSession.preferredReflectionFormat. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public string? ReflectionFormat { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLUniformLocation.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLUniformLocation interface is part of the WebGL API and represents the location of a uniform variable in a shader program.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLUniformLocation 8 | ///
9 | public class WebGLUniformLocation : JSObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public WebGLUniformLocation(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUOrigin2DDict.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpuorigin2ddict 5 | /// 6 | public class GPUOrigin2DDict 7 | { 8 | /// 9 | /// origin.x refers to either GPUOrigin2DDict.x or the first item of the sequence (0 if not present). 10 | /// 11 | public GPUIntegerCoordinate X { get; set; } 12 | 13 | /// 14 | /// origin.y refers to either GPUOrigin2DDict.y or the second item of the sequence (0 if not present). 15 | /// 16 | public GPUIntegerCoordinate Y { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/GetRootNodeOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// An object that sets options for getting the root node. The available options are: 7 | /// 8 | public class GetRootNodeOptions 9 | { 10 | /// 11 | /// composed: A boolean value that indicates whether the shadow root should be returned (false, the default), or a root node beyond shadow root (true). 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | [JsonPropertyName("composed")] 15 | public bool? Composed { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/InkPresenterParam.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Used for Ink RequestPresenter call 7 | /// 8 | public class InkPresenterParam 9 | { 10 | /// 11 | /// An Element inside which rendering of ink strokes is confined (the element's border box, to be precise). If param is not included, or presentationArea is set to null, ink rendering is confined to the containing viewport by default. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public Element? PresentationArea { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/PasswordCredential.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public class PasswordCredential : Credential 6 | { 7 | public PasswordCredential(IJSInProcessObjectReference _ref) : base(_ref) { } 8 | public PasswordCredential(PasswordCredentialData data) : base(JS.New("PasswordCredential", data)) { } 9 | public PasswordCredential(HTMLFormElement data) : base(JS.New("PasswordCredential", data)) { } 10 | public string? IconURL => JSRef!.Get("iconURL"); 11 | public string? Name => JSRef!.Get("name"); 12 | public string? Password => JSRef!.Get("password"); 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLProgram.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL).
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLProgram 8 | ///
9 | public class WebGLProgram : WebGLObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public WebGLProgram(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/Touch.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The Touch interface represents a single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/Touch 8 | ///
9 | public class Touch : JSObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public Touch(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | 17 | // TODO 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/FlowControlType.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Serial port flow control options
7 | /// https://wicg.github.io/serial/#flowcontroltype-enum 8 | ///
9 | public enum FlowControlType 10 | { 11 | /// 12 | /// No flow control is used. This is the default value. 13 | /// 14 | [JsonPropertyName("none")] 15 | None, 16 | /// 17 | /// Hardware flow control using the RTS and CTS signals is enabled. 18 | /// 19 | [JsonPropertyName("hardware")] 20 | Hardware, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/PaymentCurrencyAmount.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestEvent/total#value 5 | /// 6 | public class PaymentCurrencyAmount 7 | { 8 | /// 9 | /// A string containing a three-letter ISO 4217 standard currency code representing the currency of the payment. Examples include USD, CAN, and GBP. 10 | /// 11 | public string Currency { get; set; } 12 | /// 13 | /// A string containing a decimal monetary value, e.g., 2.55. 14 | /// 15 | public string Value { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/XMLHttpRequestEventTarget.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// XMLHttpRequestEventTarget is the interface that describes the event handlers shared on XMLHttpRequest and XMLHttpRequestUpload.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequestEventTarget 8 | ///
9 | public class XMLHttpRequestEventTarget : EventTarget 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public XMLHttpRequestEventTarget(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo/SpawnDev.BlazorJS.Demo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net10.0 5 | enable 6 | enable 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/SpawnDev.BlazorJS.Demo6.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo9/SpawnDev.BlazorJS.Demo9.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUTextureView.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The GPUTextureView interface of the WebGPU API represents a view into 7 | /// a subset of the texture resources defined by a particular GPUTexture. 8 | /// A GPUTextureView object instance is created using the GPUTexture.createView() method. 9 | /// https://www.w3.org/TR/webgpu/#gputextureview 10 | /// 11 | public class GPUTextureView : GPUObjectBase, IGPUBindingResource, IGPUTextureOrTextureView 12 | { 13 | /// 14 | public GPUTextureView(IJSInProcessObjectReference _ref) : base(_ref) { } 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLRenderbuffer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLRenderbuffer interface is part of the WebGL API and represents a buffer that can contain an image, or that can be a source or target of a rendering operation.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderbuffer 8 | ///
9 | public class WebGLRenderbuffer : WebGLObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public WebGLRenderbuffer(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/GestureEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The GestureEvent is a proprietary interface specific to WebKit which gives information regarding multi-touch gestures. Events using this interface include gesturestart, gesturechange, and gestureend.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/GestureEvent 8 | ///
9 | public class GestureEvent : JSObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public GestureEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUQuerySetDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// A GPUQuerySetDescriptor specifies the options to use in creating a GPUQuerySet.
5 | /// https://www.w3.org/TR/webgpu/#dictdef-gpuquerysetdescriptor 6 | ///
7 | public class GPUQuerySetDescriptor : GPUObjectDescriptorBase 8 | { 9 | /// 10 | /// The type of queries managed by GPUQuerySet. 11 | /// 12 | public EnumString Type { get; set; } 13 | /// 14 | /// The number of queries managed by GPUQuerySet. 15 | /// 16 | public GPUSize32 Count { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRSubImage.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The XRSubImage interface of the WebXR Device API represents what viewport of the GPU texture to use for rendering.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRSubImage 8 | ///
9 | public class XRSubImage : JSObject 10 | { 11 | /// 12 | public XRSubImage(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | /// 14 | /// The XRViewport used when rendering the sub image. 15 | /// 16 | public XRViewport Viewport => JSRef!.Get("viewport"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialCreateFederatedOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// If used for CredentialsContainer.Create()
5 | /// a FederatedCredential will be returned 6 | ///
7 | public class CredentialCreateFederatedOptions : CredentialCreateOptions 8 | { 9 | /// 10 | /// An object containing requirements for creating a federated identify provider credential. Bear in mind that the Federated Credential Management API (FedCM) supersedes this credential type. See the Credential Management API section below for more details. 11 | /// 12 | public CredentialCreateFederated Federated { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MediaCapabilitiesInfo.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class MediaCapabilitiesInfo 4 | { 5 | /// 6 | /// true if the media content can be decoded at all. Otherwise, it is false. 7 | /// 8 | public bool Supported { get; set; } 9 | /// 10 | /// true if playback of the media will be smooth (of high quality). Otherwise it is false. 11 | /// 12 | public bool Smooth { get; set; } 13 | /// 14 | /// true if playback of the media will be power efficient. Otherwise, it is false. 15 | /// 16 | public bool PowerEfficient { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/GetNotificationsOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// An object containing options to filter the notifications returned.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/getNotifications#options 8 | ///
9 | public class GetNotificationsOptions 10 | { 11 | /// 12 | /// A string representing a notification tag. If specified, only notifications that have this tag will be returned. 13 | /// 14 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 15 | public string? Tag { get; set; } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUExternalTexture.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// A GPUExternalTexture is a sampleable 2D texture wrapping an external video frame. 7 | /// It is an immutable snapshot; its contents may not change over time, either from inside WebGPU 8 | /// (it is only sampleable) or from outside WebGPU (e.g. due to video frame advancement). 9 | /// https://www.w3.org/TR/webgpu/#gpuexternaltexture 10 | /// 11 | public class GPUExternalTexture : GPUObjectBase, IGPUBindingResource 12 | { 13 | /// 14 | public GPUExternalTexture(IJSInProcessObjectReference _ref) : base(_ref) { } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/HIDConnectionEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The HIDConnectionEvent interface of the WebHID API represents HID connection events, and is the event type passed to connect and disconnect event handlers when an input report is received. 7 | /// 8 | public class HIDConnectionEvent : Event 9 | { 10 | public HIDConnectionEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 11 | /// 12 | /// Returns the HIDDevice instance representing the device associated with the connection event. 13 | /// 14 | public HIDDevice Device => JSRef!.Get("device"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLTransformFeedback.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLTransformFeedback interface is part of the WebGL 2 API and enables transform feedback, which is the process of capturing primitives generated by vertex processing. It allows to preserve the post-transform rendering state of an object and resubmit this data multiple times.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLTransformFeedback 8 | ///
9 | public class WebGLTransformFeedback : WebGLObject 10 | { 11 | /// 12 | public WebGLTransformFeedback(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUBindGroupDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpubindgroupdescriptor 5 | /// 6 | public class GPUBindGroupDescriptor : GPUObjectDescriptorBase 7 | { 8 | /// 9 | /// The GPUBindGroupLayout the entries of this bind group will conform to. 10 | /// 11 | public GPUBindGroupLayout Layout { get; init; } 12 | 13 | /// 14 | /// A list of entries describing the resources to expose to the shader for each binding described by the layout. 15 | /// 16 | public IEnumerable Entries { get; init; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialGetOtp.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Options for CredentialsContainer.Get()
5 | /// CredentialsContainer.Get() will return a Promise that resolves with an OTPCredential object instance. 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get#otp_object_structure 7 | ///
8 | public class CredentialGetOtp 9 | { 10 | /// 11 | /// An array of strings representing transport hints for how the OTP should ideally be transmitted. This will always contain a single hint — "sms". Unknown values will be ignored. 12 | /// 13 | public IEnumerable Transport { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/XMLDocument.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The XMLDocument interface represents an XML document. It inherits from the generic Document and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/XMLDocument 8 | ///
9 | public class XMLDocument : Document 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public XMLDocument(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/BarcodeDetectorOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// An options object containing a series of BarcodeFormats to search for in the subsequent detect() calls.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/BarcodeDetector/BarcodeDetector#options 8 | ///
9 | public class BarcodeDetectorOptions 10 | { 11 | /// 12 | /// An Array of barcode formats as strings. To see a full list of supported formats see the Barcode Detection API. 13 | /// 14 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 15 | public List? Formats { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/EncodeIntoProgress.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Returned fro ma call to TextEncoder.EncodeInto 5 | /// 6 | public class EncodeIntoProgress 7 | { 8 | /// 9 | /// The number of UTF-16 units of code from the source that has been converted over to UTF-8. This may be less than string.length if uint8Array did not have enough space. 10 | /// 11 | public int Read { get; set; } 12 | /// 13 | /// The number of bytes modified in the destination Uint8Array. The bytes written are guaranteed to form complete UTF-8 byte sequences. 14 | /// 15 | public int Wrtitten { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/VideoFrameRect.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Used in VideoFrameOptions 5 | /// 6 | public class VideoFrameRect 7 | { 8 | /// 9 | /// The x-coordinate. 10 | /// 11 | public int X { get; set; } = 0; 12 | /// 13 | /// The y-coordinate. 14 | /// 15 | public int Y { get; set; } = 0; 16 | /// 17 | /// The width of the frame. 18 | /// 19 | public int Width { get; set; } = 0; 20 | /// 21 | /// The height of the frame. 22 | /// 23 | public int Height { get; set; } = 0; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLVertexArrayObject.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// TThe WebGLVertexArrayObject interface is part of the WebGL 2 API, represents vertex array objects (VAOs) pointing to vertex array data, and provides names for different sets of vertex data.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLVertexArrayObject 8 | ///
9 | public class WebGLVertexArrayObject : WebGLObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public WebGLVertexArrayObject(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUColorWriteFlags.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#typedefdef-gpucolorwriteflags 5 | /// 6 | [Flags] 7 | public enum GPUColorWriteFlags : uint 8 | { 9 | /// 10 | /// Red 11 | /// 12 | RED = 0x1, 13 | /// 14 | /// Green 15 | /// 16 | GREEN = 0x2, 17 | /// 18 | /// Blue 19 | /// 20 | BLUE = 0x4, 21 | /// 22 | /// Alpha 23 | /// 24 | ALPHA = 0x8, 25 | /// 26 | /// All 27 | /// 28 | ALL = 0xF, 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MediaStreamAudioSourceNode.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The MediaStreamAudioSourceNode interface is a type of AudioNode which operates as an audio source whose media is received from a MediaStream obtained using the WebRTC or Media Capture and Streams APIs.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamAudioSourceNode 8 | ///
9 | public class MediaStreamAudioSourceNode : AudioNode 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public MediaStreamAudioSourceNode(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/NavigationPreloadState.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/service-workers/#dictdef-navigationpreloadstate 5 | /// 6 | public class NavigationPreloadState 7 | { 8 | /// 9 | /// true if preloading is enabled, and false otherwise. 10 | /// 11 | public bool Enabled { get; set; } 12 | /// 13 | /// A string containing the value that will be sent in the Service-Worker-Navigation-Preload HTTP header following a preloading fetch(). This defaults to true unless the value was changed using NavigationPreloadManager.setHeaderValue(). 14 | /// 15 | public string? HeaderValue { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/PageTransitionEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The PageTransitionEvent event object is available inside handler functions for the pageshow and pagehide events, fired when a document is being loaded or unloaded.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/PageTransitionEvent 8 | ///
9 | public class PageTransitionEvent : Event 10 | { 11 | /// 12 | public PageTransitionEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | /// 14 | /// Indicates if the document is loading from a cache. 15 | /// 16 | public bool Persisted => JSRef!.Get("persisted"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRLayerEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The XRLayerEvent interface of the WebXR Device API is the event type for events related to a change of state of an XRLayer object. These events occur, for example, when the layer needs to be redrawn.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRLayerEvent 8 | ///
9 | public class XRLayerEvent : Event 10 | { 11 | /// 12 | public XRLayerEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | /// 14 | /// The XRLayer which generated the event. 15 | /// 16 | public XRLayer Layer => JSRef!.Get("layer"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialGetPublicKeyOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// If used for CredentialsContainer.Get()
5 | /// a PublicKeyCredential will be returned 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get#options 7 | ///
8 | public class CredentialGetPublicKeyOptions : CredentialGetOptions 9 | { 10 | /// 11 | /// An object containing requirements for returned public key credentials. Causes the get() call to use an existing set of public key credentials to authenticate to a relying party. See the Web Authentication API section below for more details. 12 | /// 13 | public CredentialGetPublicKey PublicKey { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/Toolbox/Async.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.Toolbox 2 | { 3 | /// 4 | /// Helper methods for running async lambda methods 5 | /// 6 | public static class Async 7 | { 8 | /// 9 | /// Shorthand wrapper for running async lambda functions 10 | /// 11 | public static void Run(Func func) => _ = func(); 12 | /// 13 | /// Shorthand wrapper for running async lambda functions 14 | /// 15 | public static Task RunAsync(Func func) => func(); 16 | /// 17 | /// Shorthand wrapper for running async lambda functions 18 | /// 19 | public static Task RunAsync(Func> func) => func(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/AudioSinkOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// An object representing different options for a sink ID. Currently this takes a single property, type, with a value of "none". Setting this parameter causes the audio to be processed without being played through any audio output device. This is a useful option to minimize power consumption when you don't need playback along with processing. 7 | /// 8 | public class AudioSinkOptions 9 | { 10 | /// 11 | /// Currently only supports being set to none 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public string? Type { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUColorDict.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpucolordict 5 | /// 6 | public class GPUColorDict 7 | { 8 | /// 9 | /// The red channel value. 10 | /// 11 | public double R { get; set; } = 0; 12 | /// 13 | /// The green channel value. 14 | /// 15 | public double G { get; set; } = 0; 16 | /// 17 | /// The blue channel value. 18 | /// 19 | public double B { get; set; } = 0; 20 | /// 21 | /// The alpha channel value. 22 | /// 23 | public double A { get; set; } = 0; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CookieChangeEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/CookieChangeEvent/changed 7 | /// 8 | public class CookieChangeEvent : Event 9 | { 10 | /// 11 | public CookieChangeEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// Returns an array containing the changed cookies. 14 | /// 15 | public Cookie[] Changed => JSRef!.Get("changed"); 16 | /// 17 | /// Returns an array containing the deleted cookies. 18 | /// 19 | public Cookie[] Deleted => JSRef!.Get("deleted"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/VideoResizeModeEnum.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public enum VideoResizeModeEnum 6 | { 7 | /// 8 | /// This resolution and frame rate is offered by the camera, its driver, or the OS. 9 | /// 10 | [JsonPropertyName("none")] 11 | None, 12 | /// 13 | /// This resolution is downscaled and/or cropped from a higher camera resolution by the User Agent, or its frame rate is decimated by the User Agent. The media MUST NOT be upscaled, stretched or have fake data created that did not occur in the input source, except as noted below. 14 | /// 15 | [JsonPropertyName("crop-and-scale")] 16 | CropAndScale, 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CookieSubscription.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/CookieStoreManager/unsubscribe#subscriptions 7 | /// 8 | public class CookieSubscription 9 | { 10 | /// 11 | /// A string with the name of a cookie. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public string Name { get; set; } 15 | /// 16 | /// A string with the url of the scope used to subscribe to this cookie. 17 | /// 18 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 19 | public string Url { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/RegExp.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp 7 | /// 8 | public class RegExp : JSObject 9 | { 10 | /// 11 | public RegExp(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// The RegExp() constructor creates RegExp objects. 14 | /// 15 | /// 16 | /// 17 | public RegExp(string pattern, string? flags = null) : base(flags == null ? JS.New(nameof(RegExp), pattern) : JS.New(nameof(RegExp), pattern, flags)) { } 18 | 19 | // TODO 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/VideoFrameLayout.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Describes a video plane layout for a VideoFrame
5 | /// https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/VideoFrame#layout 6 | ///
7 | public class VideoFrameLayout 8 | { 9 | /// 10 | /// An integer representing the offset in bytes where the given plane begins. 11 | /// 12 | public int Offset { get; set; } 13 | /// 14 | /// An integer representing the number of bytes, including padding, used by each row of the plane. Planes may not overlap. If no layout is specified, the planes will be tightly packed. 15 | /// 16 | public int Stride { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUFilterMode.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JsonConverters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// https://www.w3.org/TR/webgpu/#enumdef-gpufiltermode 8 | /// 9 | [JsonConverter(typeof(EnumStringConverterFactory))] 10 | public enum GPUFilterMode 11 | { 12 | /// 13 | /// Return the value of the texel nearest to the texture coordinates. 14 | /// 15 | [JsonPropertyName("nearest")] 16 | Nearest, 17 | /// 18 | /// Select two texels in each dimension and return a linear interpolation between their values. 19 | /// 20 | [JsonPropertyName("linear")] 21 | Linear, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUTexelCopyBufferInfo.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// "GPUTexelCopyBufferInfo" describes the "info" (GPUBuffer and GPUTexelCopyBufferLayout) about a "buffer" source or destination of a "texel copy" operation. Together with the copySize, it describes the footprint of a region of texels in a GPUBuffer.
5 | /// https://www.w3.org/TR/webgpu/#gputexelcopybufferinfo 6 | ///
7 | public class GPUTexelCopyBufferInfo : GPUTexelCopyBufferLayout 8 | { 9 | /// 10 | /// A buffer which either contains texel data to be copied or will store the texel data being copied, depending on the method it is being passed to. 11 | /// 12 | public GPUBuffer Buffer { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRSessionMode.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JsonConverters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// https://www.w3.org/TR/webxr/#enumdef-xrsessionmode 8 | /// 9 | [JsonConverter(typeof(EnumStringConverterFactory))] 10 | public enum XRSessionMode 11 | { 12 | /// 13 | /// 14 | /// 15 | [JsonPropertyName("inline")] 16 | Inline, 17 | /// 18 | /// 19 | /// 20 | [JsonPropertyName("immersive-vr")] 21 | ImmersiveVR, 22 | /// 23 | /// 24 | /// 25 | [JsonPropertyName("immersive-ar")] 26 | ImmersiveAR, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CryptoImportParams.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Represents the object that should be passed as the algorithm parameter into SubtleCrypto.importKey() or SubtleCrypto.unwrapKey() 7 | /// 8 | public class CryptoImportParams 9 | { 10 | /// 11 | /// For AES-CTR, AES-CBC, AES-GCM, or AES-KW: Pass the string identifying the algorithm or an object of the form { "name": ALGORITHM }, where ALGORITHM is the name of the algorithm.
12 | /// For PBKDF2: Pass the string PBKDF2.
13 | /// For HKDF: Pass the string HKDF. 14 | ///
15 | [JsonPropertyName("name")] 16 | public virtual string Name { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MediaStreamTrackAudioSourceNode.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The MediaStreamTrackAudioSourceNode interface is a type of AudioNode which represents a source of audio data taken from a specific MediaStreamTrack obtained through the WebRTC or Media Capture and Streams APIs.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackAudioSourceNode 8 | ///
9 | public class MediaStreamTrackAudioSourceNode : AudioNode 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public MediaStreamTrackAudioSourceNode(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUPipelineLayoutDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Describes the layout of a pipeline, which is used to create a GPUPipelineLayout object.
5 | /// https://www.w3.org/TR/webgpu/#dictdef-gpupipelinelayoutdescriptor 6 | ///
7 | public class GPUPipelineLayoutDescriptor : GPUObjectDescriptorBase 8 | { 9 | /// 10 | /// An array of GPUBindGroupLayout objects (which are in turn created via calls to GPUDevice.createBindGroupLayout()). 11 | /// Each one corresponds to a @group attribute in the shader code contained in the GPUShaderModule used in a related pipeline. 12 | /// 13 | public IEnumerable BindGroupLayouts { get; init; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialCreatePublicKeyOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// If used for CredentialsContainer.Create()
5 | /// a PublicKeyCredential will be returned 6 | ///
7 | public class CredentialCreatePublicKeyOptions : CredentialCreateOptions 8 | { 9 | /// 10 | /// An object containing requirements for creating a public key credential. Causes the create() call to request that the user agent creates new credentials via an authenticator — either for registering a new account or for associating a new asymmetric key pair with an existing account. See the Web Authentication API section below for more details. 11 | /// 12 | public CredentialCreatePublicKey PublicKey { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUExternalTextureDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpuexternaltexturedescriptor 5 | /// 6 | public class GPUExternalTextureDescriptor : GPUObjectDescriptorBase 7 | { 8 | /// 9 | /// The video source to import the external texture from. Source size is determined as described by the external source dimensions table. 10 | /// 11 | public Union Source { get; init; } 12 | 13 | /// 14 | /// The color space the image contents of source will be converted into when reading. 15 | /// 16 | public PredefinedColorSpace ColorSpace = PredefinedColorSpace.Srgb; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.Web; 2 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 3 | using SpawnDev.BlazorJS; 4 | using SpawnDev.BlazorJS.Demo6; 5 | 6 | 7 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 8 | builder.RootComponents.Add("#app"); 9 | builder.RootComponents.Add("head::after"); 10 | 11 | builder.Services.AddBlazorJSRuntime(out var JS); 12 | 13 | builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 14 | 15 | var host = await builder.Build().StartBackgroundServices(); 16 | 17 | JS.Set("testCallback", Callback.Create((string strArg) => 18 | { 19 | Console.WriteLine($"Javascript sent: {strArg}"); 20 | // this prints "Hello callback!" 21 | })); 22 | 23 | await host.BlazorJSRunAsync(); 24 | 25 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ReadableStreamBYOBRequest.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The ReadableStreamBYOBRequest interface of the Streams API represents a "pull request" for data from an underlying source that will made as a zero-copy transfer to a consumer (bypassing the stream's internal queues).
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBRequest 8 | ///
9 | public class ReadableStreamBYOBRequest : JSObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public ReadableStreamBYOBRequest(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | 17 | // TODO - finish 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUMipmapFilterMode.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JsonConverters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// https://www.w3.org/TR/webgpu/#enumdef-gpumipmapfiltermode 8 | /// 9 | [JsonConverter(typeof(EnumStringConverterFactory))] 10 | public enum GPUMipmapFilterMode 11 | { 12 | /// 13 | /// Return the value of the texel nearest to the texture coordinates. 14 | /// 15 | [JsonPropertyName("nearest")] 16 | Nearest, 17 | /// 18 | /// Select two texels in each dimension and return a linear interpolation between their values. 19 | /// 20 | [JsonPropertyName("linear")] 21 | Linear, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRAnchor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRAnchor 7 | /// 8 | public class XRAnchor : JSObject 9 | { 10 | /// 11 | public XRAnchor(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// Returns an XRSpace object to locate the anchor relative to other XRSpace objects. 14 | /// 15 | public XRSpace AnchorSpace => JSRef!.Get("anchorSpace"); 16 | /// 17 | /// Removes the anchor. 18 | /// 19 | /// 20 | public Task Delete() => JSRef!.CallAsync("delete"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialCreateOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Options used for CredentialsContainer.Create() 7 | /// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create#options 8 | /// 9 | public abstract class CredentialCreateOptions 10 | { 11 | /// 12 | /// An AbortSignal object instance that allows an ongoing create() operation to be aborted. An aborted operation may complete normally (generally if the abort was received after the operation finished) or reject with an "AbortError" DOMException. 13 | /// 14 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 15 | public AbortSignal? Signal { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/IDBDatabaseTransactionOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Options for IDBDatabase.Transaction 7 | /// 8 | public class IDBDatabaseTransactionOptions 9 | { 10 | /// 11 | /// "default", "strict", or "relaxed". The default is "default". Using "relaxed" provides better performance, but with fewer guarantees. Web applications are encouraged to use "relaxed" for ephemeral data such as caches or quickly changing records, and "strict" in cases where reducing the risk of data loss outweighs the impact to performance and power. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public string? Durability { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRWebGLDepthInformation.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The XRWebGLDepthInformation interface contains depth information from the GPU/WebGL (returned by XRWebGLBinding.getDepthInformation()).
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLDepthInformation 8 | ///
9 | public class XRWebGLDepthInformation : XRDepthInformation 10 | { 11 | /// 12 | public XRWebGLDepthInformation(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | /// 14 | /// A WebGLTexture containing depth buffer information as an opaque texture. 15 | /// 16 | public WebGLTexture Texture => JSRef!.Get("texture"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialGetFederatedOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// If used for CredentialsContainer.Get()
5 | /// a FederatedCredential will be returned 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get#options 7 | ///
8 | public class CredentialGetFederatedOptions : CredentialGetOptions 9 | { 10 | /// 11 | /// An object containing requirements for a requested credential from a federated identify provider. Bear in mind that the Federated Credential Management API (the identity credential type) supersedes this credential type. See the Credential Management API section below for more details. 12 | /// 13 | public CredentialGetFederated Federated { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/LockManagerState.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// An object containing a snapshot of the LockManager state. 8 | /// https://developer.mozilla.org/en-US/docs/Web/API/LockManager/query#return_value 9 | /// 10 | public class LockManagerState 11 | { 12 | /// 13 | /// An array of LockInfo objects for held locks. 14 | /// 15 | [JsonPropertyName("held")] 16 | public LockInfo[] Held { get; set; } 17 | /// 18 | /// An array of LockInfo objects for pending lock requests. 19 | /// 20 | [JsonPropertyName("pending")] 21 | public LockInfo[] Pending { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Demo6/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | SpawnDev.BlazorJS.Demo6 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Loading...
16 | 17 |
18 | An unhandled error has occurred. 19 | Reload 20 | 🗙 21 |
22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/InstallPromptResult.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class InstallPromptResult 4 | { 5 | /// 6 | /// A string indicating whether the user chose to install the app or not. It must be one of the following values:
7 | /// "accepted": The user installed the app.
8 | /// "dismissed": The user did not install the app.
9 | ///
10 | public string Outcome { get; set; } = ""; 11 | /// 12 | /// If the user chose to install the app, this is a string naming the selected platform, which is one of the values from the BeforeInstallPromptEvent.platforms property. If the user chose not to install the app, this is an empty string. 13 | /// 14 | public string? Platform { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/GamepadHand.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Gamepad hand enum
7 | /// https://w3c.github.io/gamepad/extensions.html#gamepadhand-enum
8 | /// https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/hand#value
9 | ///
10 | public enum GamepadHand 11 | { 12 | /// 13 | /// unknown, both hands, or not applicable 14 | /// 15 | [JsonPropertyName("")] 16 | Unknown, 17 | /// 18 | /// Left hand 19 | /// 20 | [JsonPropertyName("left")] 21 | Left, 22 | /// 23 | /// Right hand 24 | /// 25 | [JsonPropertyName("right")] 26 | Right, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/InkPresenterStyle.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Used in InkPresenter.requestPresenter 7 | /// 8 | public class InkPresenterStyle 9 | { 10 | /// 11 | /// A String containing a valid CSS color code, indicating the color the presenter will use when rendering the ink trail. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public string? Color { get; set; } 15 | /// 16 | /// A number representing the diameter the presenter will use when rendering the ink trail. 17 | /// 18 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 19 | public float? Diameter { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/UpdateUIOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchUpdateUIEvent/updateUI#options 7 | /// 8 | public class UpdateUIOptions 9 | { 10 | /// 11 | /// A list of one or more image resources, containing icons for use in the user interface. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public List? Icons { get; set; } 15 | /// 16 | /// A string containing the new title of the user interface. 17 | /// 18 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 19 | public string? Title { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/VideoFrameCopyOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// VideoFrame.CopyTo() options 7 | /// https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/copyTo#options 8 | /// 9 | public class VideoFrameCopyOptions 10 | { 11 | /// 12 | /// The rectangle of pixels to copy from the VideoFrame. 13 | /// 14 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 15 | public VideoFrameRect? Rect { get; set; } 16 | /// 17 | /// A list containing the layout for each plane 18 | /// 19 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 20 | public List? Layout { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ConstrainULongRange.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://www.w3.org/TR/mediacapture-streams/#dom-constrainulongrange 7 | /// 8 | public class ConstrainULongRange : ULongRange 9 | { 10 | /// 11 | /// The exact required value for this property. 12 | /// 13 | [JsonPropertyName("exact")] 14 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 15 | public uint? Exact { get; set; } 16 | /// 17 | /// The ideal (target) value for this property. 18 | /// 19 | [JsonPropertyName("ideal")] 20 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 21 | public uint? Ideal { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/InputDeviceCapabilities.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceCapabilities
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceCapabilities 8 | ///
9 | public class InputDeviceCapabilities : JSObject 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public InputDeviceCapabilities(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | /// 17 | /// A Boolean that indicates whether the device dispatches touch events. 18 | /// 19 | public bool FiresTouchEvents => JSRef!.Get("firesTouchEvents"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/SerialPortRequestFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The USB Implementors Forum assigns IDs to specific companies. Each company assigns IDs to its products. 7 | /// 8 | public class SerialPortRequestFilter 9 | { 10 | /// 11 | /// An unsigned short integer that identifies a USB device vendor. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public ushort? UsbVendorId { get; set; } 15 | /// 16 | /// An unsigned short integer that identifies a USB device. 17 | /// 18 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 19 | public ushort? UsbProductId { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/USBConnectionEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The USBConnectionEvent interface of the WebUSB API is the event type passed to USB connect and disconnect events when the user agent detects that a new USB device has been connected or disconnected. 7 | /// 8 | public class USBConnectionEvent : Event 9 | { 10 | /// 11 | /// Deserialization constructor 12 | /// 13 | /// 14 | public USBConnectionEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 15 | /// 16 | /// Returns a USBDevice object representing the current device. 17 | /// 18 | public USBDevice Device => JSRef!.Get("device"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MediaStreamTrackProcessorOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// MediaStreamTrackProcessor constructor options.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackProcessor/MediaStreamTrackProcessor#options 8 | ///
9 | public class MediaStreamTrackProcessorOptions 10 | { 11 | /// 12 | /// The MediaStreamTrack to be processed. 13 | /// 14 | public MediaStreamTrack Track { get; set; } 15 | /// 16 | /// An integer specifying the maximum number of media frames to be buffered. 17 | /// 18 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 19 | public int? MaxBufferSize { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/USBDeviceRequestOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// USB requestDevice options 7 | /// https://wicg.github.io/webusb/#dictdef-usbdevicerequestoptions 8 | /// 9 | public class USBDeviceRequestOptions 10 | { 11 | /// 12 | /// An array of filter objects for possible devices you would like to pair. 13 | /// 14 | public IEnumerable Filters { get; set; } 15 | /// 16 | /// An array of filter objects for possible devices you would like to exclude. 17 | /// 18 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 19 | public IEnumerable? ExclusionFilters { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUCullMode.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JsonConverters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// https://www.w3.org/TR/webgpu/#enumdef-gpucullmode 8 | /// 9 | [JsonConverter(typeof(EnumStringConverterFactory))] 10 | public enum GPUCullMode 11 | { 12 | /// 13 | /// No polygons are discarded. 14 | /// 15 | [JsonPropertyName("none")] 16 | None, 17 | /// 18 | /// Front-facing polygons are discarded. 19 | /// 20 | [JsonPropertyName("front")] 21 | Front, 22 | /// 23 | /// Back-facing polygons are discarded. 24 | /// 25 | [JsonPropertyName("back")] 26 | Back, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUDeviceLostInfo.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// The GPUDeviceLostInfo interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost.
5 | /// https://developer.mozilla.org/en-US/docs/Web/API/GPUDeviceLostInfo 6 | ///
7 | public class GPUDeviceLostInfo 8 | { 9 | /// 10 | /// A string providing a human-readable message that explains why the device was lost. 11 | /// 12 | public string Message { get; init; } 13 | /// 14 | /// An enumerated value that defines the reason the device was lost in a machine-readable way. 15 | /// 16 | public string Reason { get; init; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ContentIndexEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The contentdelete event of the ServiceWorkerGlobalScope interface is fired when an item is removed from the indexed content via the user agent.
7 | /// This event is not cancelable and does not bubble.
8 | /// https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/contentdelete_event 9 | ///
10 | public class ContentIndexEvent : ExtendableEvent 11 | { 12 | /// 13 | public ContentIndexEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 14 | /// 15 | /// A string which identifies the deleted content index via it's id. 16 | /// 17 | public string Id => JSRef!.Get("id"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/GamepadHapticActuatorType.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// An enumerated value representing the haptic hardware type.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/GamepadHapticActuator/type#value 8 | ///
9 | public enum GamepadHapticActuatorType 10 | { 11 | /// 12 | /// Simple vibration hardware, which creates a rumbling effect. 13 | /// 14 | [JsonPropertyName("vibration")] 15 | Vibration, 16 | /// 17 | /// A controller with a vibration motor in each handle. Each motor can be vibrated independently to create positional rumbling effects. 18 | /// 19 | [JsonPropertyName("dual-rumble")] 20 | DualRumble, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JsonConverters/UnionConverterFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JsonConverters 5 | { 6 | /// 7 | /// Union JsonConverter factory 8 | /// 9 | public class UnionConverterFactory : JsonConverterFactory 10 | { 11 | /// 12 | /// Returns true if the type can be converted 13 | /// 14 | public override bool CanConvert(Type type) 15 | { 16 | return typeof(Union).IsAssignableFrom(type); 17 | } 18 | /// 19 | /// Returns a new JsonConverter 20 | /// 21 | public override JsonConverter? CreateConverter(Type type, JsonSerializerOptions options) 22 | { 23 | return new UnionJSRuntimeConverter(type); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/RemoteJSRuntime/AsyncObjects/AesCbcParamsAsync.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JSObjects; 2 | 3 | namespace SpawnDev.BlazorJS.RemoteJSRuntime.AsyncObjects 4 | { 5 | /// 6 | /// 7 | /// 8 | public class AesCbcParamsAsync : EncryptParams 9 | { 10 | /// 11 | /// A string. This should be set to AES-CBC. 12 | /// 13 | public override string Name { get; set; } = "AES-CBC"; 14 | /// 15 | /// An ArrayBuffer, a TypedArray, or a DataView. The initialization vector. Must be 16 bytes, unpredictable, and preferably cryptographically random. However, it need not be secret (for example, it may be transmitted unencrypted along with the ciphertext). 16 | /// 17 | public Union Iv { get; set; } = default!; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/HIDRequestDeviceOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// HID Device request options 7 | /// https://wicg.github.io/webhid/#dom-hid-requestdevice 8 | /// 9 | public class HIDDeviceRequestOptions 10 | { 11 | /// 12 | /// An array of HIDDeviceFilter objects used to filter the requested devices. 13 | /// 14 | public IEnumerable Filters { get; set; } 15 | 16 | /// 17 | /// An optional array of HIDDeviceFilter objects used to exclude devices from the requested devices. 18 | /// 19 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 20 | public IEnumerable? ExclusionFilters { get; set; } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUComputePipeline.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://www.w3.org/TR/webgpu/#gpucomputepipeline 7 | /// 8 | public class GPUComputePipeline : GPUObjectBase 9 | { 10 | /// 11 | public GPUComputePipeline(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | 13 | /// 14 | /// Gets a GPUBindGroupLayout that is compatible with the GPUPipelineBase’s GPUBindGroupLayout at index. 15 | /// 16 | /// Index into the pipeline layout’s [[bindGroupLayouts]] sequence. 17 | /// GPUBindGroupLayout 18 | public GPUBindGroupLayout GetBindGroupLayout(int index) => JSRef!.Call("getBindGroupLayout", index); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCOfferOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 4 | { 5 | /// 6 | /// Options used for RTCPeerConnection.CreateOffer() 7 | /// https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createOffer#options 8 | /// 9 | public class RTCOfferOptions 10 | { 11 | /// 12 | /// To restart ICE on an active connection, set this to true. This will cause the returned offer to have different credentials than those already in place. If you then apply the returned offer, ICE will restart. Specify false to keep the same credentials and therefore not restart ICE. The default is false. 13 | /// 14 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 15 | public bool? IceRestart { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRViewerPose.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/XRViewerPose 7 | /// 8 | public class XRViewerPose : XRPose 9 | { 10 | /// 11 | public XRViewerPose(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// An array of XRView objects, one for each viewpoint on the scene which is needed to represent the scene to the user. A typical headset provides a viewer pose with two views whose eye property is either left or right, indicating which eye that view represents. Taken together, these views can reproduce the 3D effect when displayed on the XR device. 14 | /// 15 | public XRView[] Views => JSRef!.Get("views"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialGetIdentityOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// If used for CredentialsContainer.Get()
5 | /// an IdentityCredential will be returned 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get#options 7 | ///
8 | public class CredentialGetIdentityOptions : CredentialGetOptions 9 | { 10 | /// 11 | /// An object containing details of federated identity providers (IdPs) that a relying party (RP) website can use for purposes such as signing in or signing up on a website. It causes the get() call to initiate a request for a user to sign in to an RP with an IdP. See the Federated Credential Management API section below for more details. 12 | /// 13 | public CredentialRequestOptions? Identity { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ReadableStreamReaderReadResponse.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Returned by ReadableStreamDefaultReader.Read 7 | /// 8 | public class ReadableStreamReaderReadResponse : JSObject 9 | { 10 | /// 11 | /// Deserialization constructor 12 | /// 13 | /// 14 | public ReadableStreamReaderReadResponse(IJSInProcessObjectReference _ref) : base(_ref) { } 15 | /// 16 | /// True if there is no more data to read 17 | /// 18 | public bool Done => JSRef!.Get("done"); 19 | /// 20 | /// The current chunk if not done 21 | /// 22 | public Uint8Array? Value => JSRef!.Get("value"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUBindGroupEntry.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// A GPUBindGroupEntry describes a single resource to be bound in a GPUBindGroup 5 | /// https://www.w3.org/TR/webgpu/#dictdef-gpubindgroupentry 6 | /// 7 | public class GPUBindGroupEntry 8 | { 9 | /// 10 | /// A unique identifier for a resource binding within the GPUBindGroup, corresponding to a GPUBindGroupLayoutEntry.binding and a @binding attribute in the GPUShaderModule. 11 | /// 12 | public GPUIndex32 Binding { get; init; } 13 | 14 | /// 15 | /// The resource to bind, which may be a GPUSampler, GPUTexture, GPUTextureView, GPUBuffer, GPUBufferBinding, or GPUExternalTexture. 16 | /// 17 | public GPUBindingResource Resource { get; init; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUCommandBuffer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Command buffers are pre-recorded lists of GPU commands (blocks of queue timeline steps) that can be submitted to a GPUQueue for execution. 7 | /// Each GPU command represents a task to be performed on the queue timeline, such as setting state, drawing, copying resources, etc. 8 | /// A GPUCommandBuffer can only be submitted once, at which point it becomes invalidated. 9 | /// To reuse rendering commands across multiple submissions, use GPURenderBundle. 10 | /// https://www.w3.org/TR/webgpu/#gpucommandbuffer 11 | /// 12 | public class GPUCommandBuffer : GPUObjectBase 13 | { 14 | /// 15 | public GPUCommandBuffer(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/CredentialGetFederated.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Used with CredentialGetPublicKeyOptions 5 | /// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get#federated_object_structure 6 | /// 7 | public class CredentialGetFederated 8 | { 9 | /// 10 | /// An array of strings representing the protocols of the requested credentials' federated identity providers (for example, "openidconnect"). 11 | /// 12 | public IEnumerable Protocols { get; set; } 13 | /// 14 | /// An array of strings representing the credentials' federated identity providers (for example "https://www.facebook.com" or "https://accounts.google.com"). 15 | /// 16 | public IEnumerable Providers { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUVertexAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// Defines the layout of the vertex attributes within each structure. 5 | /// https://www.w3.org/TR/webgpu/#dictdef-gpuvertexattribute 6 | /// 7 | public class GPUVertexAttribute 8 | { 9 | /// 10 | /// The data format for this attribute. 11 | /// 12 | public EnumString Format { get; init; } 13 | 14 | /// 15 | /// The byte offset of this attribute within the vertex structure. 16 | /// 17 | 18 | public GPUSize64 Offset { get; init; } 19 | 20 | /// 21 | /// The shader location that this attribute will be bound to. 22 | /// 23 | public GPUIndex32 ShaderLocation { get; init; } 24 | } 25 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/QueueingStrategy.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// A generic queueing strategy 7 | /// 8 | public class QueueingStrategy : JSObject 9 | { 10 | /// 11 | public QueueingStrategy(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// A non-negative integer. This defines the total number of chunks that can be contained in the internal queue before backpressure is applied. 14 | /// 15 | public virtual int HighWaterMark => JSRef!.Get("highWaterMark"); 16 | /// 17 | /// 18 | /// 19 | /// 20 | /// 21 | public virtual int Size(object chunk) => JSRef!.Call("size", chunk); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [LostBeard] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MIDIAccessOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Otpions for RequestMIDIAccess 7 | /// 8 | public class MIDIAccessOptions 9 | { 10 | /// 11 | /// A Boolean value that, if set to true, allows the ability to send and receive system exclusive (sysex) messages. The default value is false. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public bool? Sysex { get; set; } 15 | /// 16 | /// A Boolean value that, if set to true, allows the system to utilize any installed software synthesizers. The default value is false 17 | /// 18 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 19 | public bool? Software { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/SelfCapturePreferenceEnum.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Describes the different hints an application can provide about whether the display surface the application is in, should be among the choices offered to the user.
7 | /// https://www.w3.org/TR/screen-capture/#dom-selfcapturepreferenceenum 8 | ///
9 | public enum SelfCapturePreferenceEnum 10 | { 11 | /// 12 | /// The application prefers the surface be included among the choices offered. 13 | /// 14 | [JsonPropertyName("include")] 15 | Include, 16 | /// 17 | /// The application prefers the surface be excluded from the choices offered. 18 | /// 19 | [JsonPropertyName("exclude")] 20 | Exclude, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPURenderBundleEncoderDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpurenderbundleencoderdescriptor 5 | /// 6 | public class GPURenderBundleEncoderDescriptor : GPUPipelineDescriptorBase 7 | { 8 | /// 9 | /// If true, indicates that the render bundle does not modify the depth component of the GPURenderPassDepthStencilAttachment of any render pass the render bundle is executed in. 10 | /// 11 | public bool DepthReadOnly { get; set; } 12 | /// 13 | /// If true, indicates that the render bundle does not modify the stencil component of the GPURenderPassDepthStencilAttachment of any render pass the render bundle is executed in. 14 | /// 15 | public bool StencilReadOnly { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUBindGroupLayoutDescriptor.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// An object describing the layout of a bind group, which is a collection of resources that can be bound to a pipeline.
5 | /// https://www.w3.org/TR/webgpu/#dictdef-gpubindgrouplayoutdescriptor 6 | ///
7 | public class GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase 8 | { 9 | /// 10 | /// An array of entry objects, each one of which describes a single shader resource binding to be included in the GPUBindGroupLayout. 11 | /// Each entry will correspond to an entry defined in a GPUBindGroup (created via a GPUDevice.createBindGroup() call) that uses 12 | /// this GPUBindGroupLayout object as a template. 13 | /// 14 | public IEnumerable Entries { get; init; } 15 | 16 | } 17 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ClipboardItemOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// ClipboardItem options 7 | /// 8 | public class ClipboardItemOptions 9 | { 10 | /// 11 | /// One of the three strings: unspecified, inline or attachment. The default is unspecified.
12 | /// 'inline' signifies to apps that receive the paste that the ClipboardItem should be inserted inline at the point of paste.
13 | /// 'attachment' signifies to apps that receive the paste that the ClipboardItem should be added as an attachment.
14 | /// 'unspecified' doesn't signify any information to apps that receive the paste. 15 | ///
16 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 17 | public string? PresentationStyle { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ParityType.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Serial port parity options
7 | /// https://wicg.github.io/serial/#paritytype-enum 8 | ///
9 | public enum ParityType 10 | { 11 | /// 12 | /// No parity bit is used. This is the default value. 13 | /// 14 | [JsonPropertyName("none")] 15 | None, 16 | /// 17 | /// An even parity bit is used. This means that the number of 1 bits in the data must be even. 18 | /// 19 | [JsonPropertyName("even")] 20 | Even, 21 | /// 22 | /// An odd parity bit is used. This means that the number of 1 bits in the data must be odd. 23 | /// 24 | [JsonPropertyName("odd")] 25 | Odd, 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/VideoFacingModeEnum.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | public enum VideoFacingModeEnum 6 | { 7 | /// 8 | /// The source is facing toward the user (a self-view camera). 9 | /// 10 | [JsonPropertyName("user")] 11 | User, 12 | /// 13 | /// The source is facing away from the user (viewing the environment). 14 | /// 15 | [JsonPropertyName("environment")] 16 | Environment, 17 | /// 18 | /// The source is facing to the left of the user. 19 | /// 20 | [JsonPropertyName("left")] 21 | Left, 22 | /// 23 | /// The source is facing to the right of the user. 24 | /// 25 | [JsonPropertyName("right")] 26 | Right, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUError.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The GPUError interface of the WebGPU API is the base interface for errors surfaced by GPUDevice.popErrorScope and the uncapturederror event. 7 | /// https://developer.mozilla.org/en-US/docs/Web/API/GPUError 8 | /// 9 | public class GPUError : JSObject 10 | { 11 | /// 12 | public GPUError(IJSInProcessObjectReference _ref) : base(_ref) { } 13 | /// 14 | /// A string providing a human-readable message that explains why the error occurred. 15 | /// 16 | public string Message => JSRef!.Get("message"); 17 | /// 18 | /// Returns the error type name 19 | /// 20 | public string ErrorType => JSRef!.ConstructorName()!; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUExtent3DDict.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://www.w3.org/TR/webgpu/#dictdef-gpuextent3ddict 7 | /// 8 | public class GPUExtent3DDict 9 | { 10 | /// 11 | /// Width of the extent. 12 | /// 13 | public GPUIntegerCoordinate Width { get; set; } 14 | /// 15 | /// Height of the extent. 16 | /// 17 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 18 | public GPUIntegerCoordinate? Height { get; set; } 19 | /// 20 | /// Depth or array layers of the extent. 21 | /// 22 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 23 | public GPUIntegerCoordinate? DepthOrArrayLayers { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUOrigin3DDict.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#dictdef-gpuorigin3ddict 5 | /// 6 | public class GPUOrigin3DDict 7 | { 8 | /// 9 | /// origin.x refers to either GPUOrigin3DDict.x or the first item of the sequence (0 if not present). 10 | /// 11 | public GPUIntegerCoordinate X { get; set; } = 0; 12 | /// 13 | /// origin.y refers to either GPUOrigin3DDict.y or the second item of the sequence (0 if not present). 14 | /// 15 | public GPUIntegerCoordinate Y { get; set; } = 0; 16 | /// 17 | /// origin.z refers to either GPUOrigin3DDict.z or the third item of the sequence (0 if not present). 18 | /// 19 | public GPUIntegerCoordinate Z { get; set; } = 0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ByteLengthQueuingStrategyOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://developer.mozilla.org/en-US/docs/Web/API/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy#options 5 | /// 6 | public class ByteLengthQueuingStrategyOptions 7 | { 8 | /// 9 | /// The total number of bytes that can be contained in the internal queue before backpressure is applied. 10 | /// Unlike CountQueuingStrategy() where highWaterMark specifies a simple count of the number of chunks, with ByteLengthQueuingStrategy(), highWaterMark specifies a number of bytes — specifically, given a stream of chunks, how many bytes worth of those chunks(rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied. 11 | /// 12 | public int HighWaterMark { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/HapticEffectParams.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | public class HapticEffectParams 4 | { 5 | /// 6 | /// The duration of the effect in milliseconds. 7 | /// 8 | public double Duration { get; set; } 9 | /// 10 | /// The delay in milliseconds before the effect is started. 11 | /// 12 | public double StartDelay { get; set; } 13 | /// 14 | /// Rumble intensity of the low-frequency (strong) rumble motors, normalized to the range between 0.0 and 1.0. 15 | /// 16 | public double StrongMagnitude { get; set; } 17 | /// 18 | /// Rumble intensity of the high-frequency (weak) rumble motors, normalized to the range between 0.0 and 1.0. 19 | /// 20 | public double WeakMagnitude { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MonitorTypeSurfacesEnum.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Describes whether the application would like the user agent to offer the user the option to choose display surfaces whose type is monitor.
7 | /// https://www.w3.org/TR/screen-capture/#monitortypesurfacesenum 8 | ///
9 | public enum MonitorTypeSurfacesEnum 10 | { 11 | /// 12 | /// The application prefers that the display surfaces presented to the user include those of type monitor. 13 | /// 14 | [JsonPropertyName("include")] 15 | Include, 16 | /// 17 | /// The application prefers that the display surfaces presented to the user exclude those of type monitor. 18 | /// 19 | [JsonPropertyName("exclude")] 20 | Exclude, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebXR/XRSessionInit.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// 7 | /// https://www.w3.org/TR/webxr/#dictdef-xrsessioninit 8 | /// 9 | public class XRSessionInit 10 | { 11 | /// 12 | /// 13 | /// 14 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 15 | public IEnumerable? RequiredFeatures { get; set; } 16 | /// 17 | /// 18 | /// 19 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 20 | public IEnumerable? OptionalFeatures { get; set; } 21 | /// 22 | /// 23 | /// 24 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 25 | public XRDOMOverlayInit? DomOverlay { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/DocumentPictureInPictureEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The DocumentPictureInPictureEvent interface of the Document Picture-in-Picture API is the event object for the enter event, which fires when the Picture-in-Picture window is opened. 7 | /// 8 | public class DocumentPictureInPictureEvent : JSObject 9 | { 10 | /// 11 | /// Deserialization constructor 12 | /// 13 | /// 14 | public DocumentPictureInPictureEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 15 | /// 16 | /// Returns a Window instance representing the browsing context inside the DocumentPictureInPicture window the event was fired on. 17 | /// 18 | public Window? Window => JSRef!.Get("window"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/FilePickerType.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://developer.mozilla.org/en-US/docs/Web/API/Window/showOpenFilePicker#description 7 | /// 8 | public class FilePickerType 9 | { 10 | /// 11 | /// An optional description of the category of files types allowed. Defaults to an empty string. 12 | /// 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public string? Description { get; set; } 15 | /// 16 | /// An Object with the keys set to the MIME type and the values an Array of file extensions (see below for an example). 17 | /// 18 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 19 | public Dictionary>? Accept { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLContextEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The WebGLContextEvent interface is part of the WebGL API and is an interface for an event that is generated in response to a status change to the WebGL rendering context.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/WebGLContextEvent 8 | ///
9 | public class WebGLContextEvent : Event 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public WebGLContextEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | /// 17 | /// A read-only property containing additional information about the event. 18 | /// 19 | public string StatusMessage => JSRef!.Get("statusMessage"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUShaderStageFlags.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// GPUShaderStage contains the following flags, which describe which shader stages a corresponding GPUBindGroupEntry 5 | /// for this GPUBindGroupLayoutEntry will be visible to. 6 | /// https://www.w3.org/TR/webgpu/#typedefdef-gpushaderstageflags 7 | /// 8 | [Flags] 9 | public enum GPUShaderStageFlags : uint 10 | { 11 | /// 12 | /// The bind group entry will be accessible to vertex shaders. 13 | /// 14 | VERTEX = 0x1, 15 | /// 16 | /// The bind group entry will be accessible to fragment shaders. 17 | /// 18 | FRAGMENT = 0x2, 19 | /// 20 | /// The bind group entry will be accessible to compute shaders. 21 | /// 22 | COMPUTE = 0x4, 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MIDIConnectionEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The MIDIConnectionEvent interface of the Web MIDI API is the event passed to the statechange event of the MIDIAccess interface and the statechange event of the MIDIPort interface. This occurs any time a new port becomes available, or when a previously available port becomes unavailable. For example, this event is fired whenever a MIDI device is either plugged in to or unplugged from a computer. 7 | /// 8 | public class MIDIConnectionEvent : Event 9 | { 10 | public MIDIConnectionEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 11 | /// 12 | /// Returns a reference to a MIDIPort instance for a port that has been connected or disconnected. 13 | /// 14 | public MIDIPort Port => JSRef!.Get("port"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/SystemAudioPreferenceEnum.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Describes whether an application invoking getDisplayMedia() would like the user agent to include system audio among the audio sources offered to the user.
7 | /// https://www.w3.org/TR/screen-capture/#systemaudiopreferenceenum 8 | ///
9 | public enum SystemAudioPreferenceEnum 10 | { 11 | /// 12 | /// The application prefers that options to share system audio be offered to the user for monitor display surfaces. 13 | /// 14 | [JsonPropertyName("include")] 15 | Include, 16 | /// 17 | /// The application prefers that options to share system audio not be offered to the user. 18 | /// 19 | [JsonPropertyName("exclude")] 20 | Exclude, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUDebugCommandsMixin.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://www.w3.org/TR/webgpu/#gpudebugcommandsmixin 5 | /// 6 | public interface GPUDebugCommandsMixin 7 | { 8 | /// 9 | /// Begins a labeled debug group containing subsequent commands. 10 | /// 11 | /// The label for the command group. 12 | void PushDebugGroup(string groupLabel); 13 | /// 14 | /// Ends the labeled debug group most recently started by pushDebugGroup(). 15 | /// 16 | void PopDebugGroup(); 17 | /// 18 | /// Marks a point in a stream of commands with a label. 19 | /// 20 | /// The label to insert. 21 | void InsertDebugMarker(string markerLabel); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUVertexStepMode.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JsonConverters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// The step mode configures how an address for vertex buffer data is computed, based on the current vertex or instance index:
8 | /// https://www.w3.org/TR/webgpu/#enumdef-gpuvertexstepmode 9 | ///
10 | [JsonConverter(typeof(EnumStringConverterFactory))] 11 | public enum GPUVertexStepMode 12 | { 13 | /// 14 | /// The address is advanced by arrayStride for each vertex, and reset between instances. 15 | /// 16 | [JsonPropertyName("vertex")] 17 | Vertex, 18 | /// 19 | /// The address is advanced by arrayStride for each instance. 20 | /// 21 | [JsonPropertyName("instance")] 22 | Instance, 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/HmacImportParams.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The HmacImportParams dictionary of the Web Crypto API represents the object that should be passed as the algorithm parameter into SubtleCrypto.importKey() or SubtleCrypto.unwrapKey(), when generating a key for the HMAC algorithm. 7 | /// 8 | public class HmacImportParams : CryptoImportParams 9 | { 10 | /// 11 | /// A string. This should be set to HMAC. 12 | /// 13 | [JsonPropertyName("name")] 14 | public override string Name { get; set; } 15 | /// 16 | /// A string representing the name of the digest function to use. The can take a value of SHA-256, SHA-384, or SHA-512 17 | /// 18 | [JsonPropertyName("hash")] 19 | public string Hash { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGL/WebGLTypeDefinitions.cs: -------------------------------------------------------------------------------- 1 | // https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Types#webgl_1 2 | // https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Types#webgl_2 3 | 4 | global using GLenum = System.UInt32; 5 | global using GLboolean = System.Boolean; 6 | global using GLsizei = System.Int32; 7 | global using GLint64 = System.Int64; 8 | global using GLuint64EXT = System.UInt64; 9 | global using GLint = System.Int32; 10 | global using GLuint = System.UInt32; 11 | global using GLbitfield = System.UInt32; 12 | global using GLbyte = System.SByte; 13 | global using GLshort = System.Int16; 14 | global using GLubyte = System.Byte; 15 | global using GLushort = System.UInt16; 16 | global using GLfloat = System.Single; 17 | global using GLclampf = System.Single; 18 | global using GLdouble = System.Double; 19 | global using GLclampd = System.Double; 20 | global using GLsizeiptr = System.Int64; 21 | global using GLintptr = System.Int64; 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/AllocationSizeOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// VideoFrame.AllocationSize() options
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/allocationSize#options 8 | ///
9 | public class AllocationSizeOptions 10 | { 11 | /// 12 | /// The rectangle of pixels to copy from the VideoFrame. If unspecified the visibleRect will be used. 13 | /// 14 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 15 | public VideoFrameRect? Rect { get; set; } 16 | /// 17 | /// A list containing the following values for each plane in the VideoFrame. 18 | /// 19 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 20 | public List? Layout { get; set; } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/FocusEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The FocusEvent interface represents focus-related events, including focus, blur, focusin, and focusout.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent 8 | ///
9 | public class FocusEvent : UIEvent 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public FocusEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | /// 17 | /// An EventTarget representing a secondary target for this event. In some cases (such as when tabbing in or out a page), this property may be set to null for security reasons. 18 | /// 19 | public EventTarget? RelatedTarget => JSRef!.Get("relatedTarget"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/GeolocationPositionError.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// The GeolocationPositionError interface represents the reason of an error occurring when using the geolocating device. 5 | /// 6 | public class GeolocationPositionError 7 | { 8 | /// 9 | /// Returns an unsigned short representing the error code. The following values are possible:
10 | /// 1 - PERMISSION_DENIED
11 | /// 2 - POSITION_UNAVAILABLE
12 | /// 3 - TIMEOUT
13 | ///
14 | public ushort Code { get; set; } 15 | /// 16 | /// Returns a human-readable string describing the details of the error. Specifications note that this is primarily intended for debugging use and not to be shown directly in a user interface. 17 | /// 18 | public string? Message { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MIDIInput.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The MIDIInput interface of the Web MIDI API receives messages from a MIDI input port.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/MIDIInput 8 | ///
9 | public class MIDIInput : MIDIPort 10 | { 11 | #region Constructors 12 | /// 13 | /// Deserialization constructor 14 | /// 15 | /// 16 | public MIDIInput(IJSInProcessObjectReference _ref) : base(_ref) { } 17 | #endregion 18 | 19 | /// 20 | /// Fired when the current port receives a MIDI message. 21 | /// 22 | public ActionEvent OnMIDIMessage { get => new ActionEvent("midimessage", AddEventListener, RemoveEventListener); set { } } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/GamepadEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The GamepadEvent interface of the Gamepad API contains references to gamepads connected to the system, which is what the gamepad events gamepadconnected and gamepaddisconnected are fired in response to.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/GamepadEvent 8 | ///
9 | public class GamepadEvent : Event 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public GamepadEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | /// 17 | /// Returns a Gamepad object, providing access to the associated gamepad data for the event fired. 18 | /// 19 | public Gamepad Gamepad => JSRef!.Get("gamepad"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUShaderModule.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The GPUShaderModule interface of the WebGPU API represents an internal shader module object, 7 | /// a container for WGSL shader code that can be submitted to the GPU for execution by a pipeline. 8 | /// A GPUShaderModule object instance is created using GPUDevice.createShaderModule(). 9 | /// https://developer.mozilla.org/en-US/docs/Web/API/GPUShaderModule 10 | /// 11 | public class GPUShaderModule : GPUObjectBase 12 | { 13 | /// 14 | public GPUShaderModule(IJSInProcessObjectReference _ref) : base(_ref) { } 15 | /// 16 | /// 17 | /// 18 | /// 19 | public Task GetCompilationInfo() => JSRef!.CallAsync("getCompilationInfo"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WhiteBalanceModeEnum.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// White balance options for media stream track capabilities 7 | /// 8 | public enum WhiteBalanceModeEnum 9 | { 10 | /// 11 | /// The source is using an automatic white balance mode. 12 | /// 13 | [JsonPropertyName("none")] 14 | None, 15 | /// 16 | /// The source is using a manual white balance mode. 17 | /// 18 | [JsonPropertyName("manual")] 19 | Manual, 20 | /// 21 | /// Single shot 22 | /// 23 | [JsonPropertyName("single-shot")] 24 | SingleShot, 25 | /// 26 | /// Continuous 27 | /// 28 | [JsonPropertyName("continuous")] 29 | Continuous, 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/BackgroundFetchEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The BackgroundFetchEvent interface of the Background Fetch API is the event type for background fetch events dispatched on the service worker global scope.
7 | /// It is the event type passed to backgroundfetchclick event and backgroundfetchabort event.
8 | /// https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchEvent 9 | ///
10 | public class BackgroundFetchEvent : ExtendableEvent 11 | { 12 | /// 13 | public BackgroundFetchEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 14 | /// 15 | /// Returns the BackgroundFetchRegistration that the event was initialized to. 16 | /// 17 | public BackgroundFetchRegistration Registration => JSRef!.Get("registration"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/PaymentItem.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequestEvent/modifiers#total 5 | /// 6 | public class PaymentItem 7 | { 8 | /// 9 | /// A string containing a human-readable description of the item, which may be displayed to the user. 10 | /// 11 | public string Label { get; set; } 12 | /// 13 | /// A PaymentCurrencyAmount object (see total > Value). 14 | /// 15 | public PaymentCurrencyAmount Amount { get; set; } 16 | /// 17 | /// A boolean. When set to true it means that the amount member is not final. This is commonly used to show items such as shipping or tax amounts that depend upon selection of shipping address or shipping option. 18 | /// 19 | public bool Pending { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebRTC/RTCDataChannelOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects.WebRTC 4 | { 5 | public class RTCDataChannelOptions 6 | { 7 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 8 | public bool? Ordered { get; set; } 9 | 10 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 11 | public ushort? MaxPacketLifeTime { get; set; } 12 | 13 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 14 | public ushort? MaxRetransmits { get; set; } 15 | 16 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 17 | public string? Protocol { get; set; } 18 | 19 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 20 | public bool? Negotiated { get; set; } 21 | 22 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 23 | public ushort? Id { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/InputDeviceInfo.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The InputDeviceInfo interface of the Media Capture and Streams API gives access to the capabilities of the input device that it represents.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceInfo 8 | ///
9 | public class InputDeviceInfo : MediaDeviceInfo 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public InputDeviceInfo(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | /// 17 | /// Returns a MediaTrackCapabilities object describing the primary audio or video track of a device's MediaStream. 18 | /// 19 | public MediaTrackCapabilities GetCapabilities() => JSRef!.Call("getCapabilities"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ImageDataSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// Settings used when creating an ImageData instance 7 | /// https://developer.mozilla.org/en-US/docs/Web/API/ImageData/ImageData#settings 8 | /// 9 | public class ImageDataSettings 10 | { 11 | /// 12 | /// colorSpace: Specifies the color space of the image data. Can be set to "srgb" for the sRGB color space or "display-p3" for the display-p3 color space. 13 | /// 14 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 15 | public string? ColorSpace { get; set; } 16 | /// 17 | /// 18 | /// "rgba-unorm8"
19 | /// "rgba-float16" 20 | ///
21 | [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] 22 | public string? PixelFormat { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MIDIMessageEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The MIDIMessageEvent interface of the Web MIDI API represents the event passed to the midimessage event of the MIDIInput interface. A midimessage event is fired every time a MIDI message is sent from a device represented by a MIDIInput, for example when a MIDI keyboard key is pressed, a knob is tweaked, or a slider is moved.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/MIDIMessageEvent 8 | ///
9 | public class MIDIMessageEvent : Event 10 | { 11 | public MIDIMessageEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | /// 13 | /// A Uint8Array containing the data bytes of a single MIDI message. See the MIDI specification for more information on its form. 14 | /// 15 | public Uint8Array Data => JSRef!.Get("data"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ClipboardEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The ClipboardEvent interface of the Clipboard API represents events providing information related to modification of the clipboard, that is cut, copy, and paste events.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent 8 | ///
9 | public class ClipboardEvent : Event 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public ClipboardEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | /// 17 | /// A DataTransfer object containing the data affected by the user-initiated cut, copy, or paste operation, along with its MIME type. 18 | /// 19 | public DataTransfer ClipboardData => JSRef!.Get("clipboardData"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/AnimationTimeline.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The AnimationTimeline interface of the Web Animations API represents the timeline of an animation.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/AnimationTimeline 8 | ///
9 | public class AnimationTimeline : JSObject 10 | { 11 | #region Constructors 12 | /// 13 | /// Deserialization constructor 14 | /// 15 | /// 16 | public AnimationTimeline(IJSInProcessObjectReference _ref) : base(_ref) { } 17 | #endregion 18 | 19 | #region Properties 20 | /// 21 | /// Returns the time value in milliseconds for this timeline or null if this timeline is inactive. 22 | /// 23 | public float? CurrentTime => JSRef!.Get("currentTime"); 24 | #endregion 25 | } 26 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/ChannelInterpretation.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// ChannelInterpretation 7 | /// https://www.w3.org/TR/webaudio/#enumdef-channelinterpretation 8 | /// 9 | [JsonConverter(typeof(JsonConverters.EnumStringConverterFactory))] 10 | public enum ChannelInterpretation 11 | { 12 | /// 13 | /// use up-mix equations or down-mix equations. In cases where the number of channels do not match any of these basic speaker layouts, revert to "discrete". 14 | /// 15 | [JsonPropertyName("speakers")] 16 | Speakers, 17 | /// 18 | /// Up-mix by filling channels until they run out then zero out remaining channels. Down-mix by filling as many channels as possible, then dropping remaining channels. 19 | /// 20 | [JsonPropertyName("discrete")] 21 | Discrete, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/GeolocationPosition.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.JSObjects 2 | { 3 | /// 4 | /// The GeolocationPosition interface represents the position of the concerned device at a given time. The position, represented by a GeolocationCoordinates object, comprehends the 2D position of the device, on a spheroid representing the Earth, but also its altitude and its speed.
5 | /// https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPosition 6 | ///
7 | public class GeolocationPosition 8 | { 9 | /// 10 | /// Returns a GeolocationCoordinates object defining the current location. 11 | /// 12 | public GeolocationCoordinates Coords { get; set; } 13 | /// 14 | /// Returns a timestamp, given as Unix time in milliseconds, representing the time at which the location was retrieved. 15 | /// 16 | public EpochDateTime Timestamp { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/PushEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The PushEvent interface of the Push API represents a push message that has been received. This event is sent to the global scope of a ServiceWorker. It contains the information sent from an application server to a PushSubscription.
7 | /// https://developer.mozilla.org/en-US/docs/Web/API/PushEvent 8 | ///
9 | public class PushEvent : ExtendableEvent 10 | { 11 | /// 12 | /// Deserialization constructor 13 | /// 14 | /// 15 | public PushEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 16 | /// 17 | /// Returns a reference to a PushMessageData object containing data sent to the PushSubscription. 18 | /// 19 | public PushMessageData Data => JSRef!.Get("data"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/SVGElement.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using Microsoft.JSInterop; 3 | 4 | namespace SpawnDev.BlazorJS.JSObjects 5 | { 6 | /// 7 | /// All of the SVG DOM interfaces that correspond directly to elements in the SVG language derive from the SVGElement interface.
8 | /// https://developer.mozilla.org/en-US/docs/Web/API/SVGElement 9 | ///
10 | public class SVGElement : Element 11 | { 12 | /// 13 | /// Deserialization constructor 14 | /// 15 | /// 16 | public SVGElement(IJSInProcessObjectReference _ref) : base(_ref) { } 17 | /// 18 | /// Creates a new SVGElement from an ElementReference 19 | /// 20 | /// 21 | public SVGElement(ElementReference elementReference) : base(JS.ReturnMe(elementReference)) { } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/WebGPU/GPUQuerySet.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// https://www.w3.org/TR/webgpu/#gpuqueryset 7 | /// 8 | public class GPUQuerySet : GPUObjectBase 9 | { 10 | /// 11 | public GPUQuerySet(IJSInProcessObjectReference _ref) : base(_ref) { } 12 | 13 | /// 14 | /// The type of the queries managed by this GPUQuerySet. 15 | /// 16 | public EnumString Type => JSRef!.Get>("type"); 17 | 18 | /// 19 | /// The number of queries managed by this GPUQuerySet. 20 | /// 21 | public GPUSize32Out Count => JSRef!.Get("count"); 22 | 23 | /// 24 | /// Destroys the GPUQuerySet. 25 | /// 26 | public void Destroy() => JSRef!.CallVoid("destroy"); 27 | } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS/JSObjects/MediaStreamTrackEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.JSInterop; 2 | 3 | namespace SpawnDev.BlazorJS.JSObjects 4 | { 5 | /// 6 | /// The MediaStreamTrackEvent interface of the Media Capture and Streams API represents events which indicate that a MediaStream has had tracks added to or removed from the stream through calls to Media Capture and Streams API methods. These events are sent to the stream when these changes occur. 7 | /// 8 | public class MediaStreamTrackEvent : Event 9 | { 10 | /// 11 | /// Deserialization constructor 12 | /// 13 | /// 14 | public MediaStreamTrackEvent(IJSInProcessObjectReference _ref) : base(_ref) { } 15 | /// 16 | /// Returns a MediaStreamTrack object representing the track associated with the event. 17 | /// 18 | public MediaStreamTrack Track => JSRef!.Get("track"); 19 | } 20 | } 21 | --------------------------------------------------------------------------------