├── README.md ├── SpawnDev.BlazorJS.Test ├── wwwroot │ ├── appsettings.json │ ├── test-lib.js │ ├── appsettings.Development.json │ ├── SpawnDev.ico │ ├── favicon.png │ ├── icon-128.png │ ├── icon-192.png │ ├── icon-64.png │ ├── media │ │ ├── github-mark.png │ │ ├── github-mark-white.png │ │ ├── honeycomb-tile-dark.gif │ │ ├── honeycomb-tile-light.gif │ │ ├── honeycomb-tile-dark-red.gif │ │ ├── honeycomb-tile-dark-red2.gif │ │ ├── honeycomb-tile-dark-red3.gif │ │ ├── honeycomb-tile-dark-red4.gif │ │ ├── github-mark-white.svg │ │ └── github-mark.svg │ ├── weights │ │ ├── mtcnn_model-shard1 │ │ ├── age_gender_model-shard1 │ │ ├── face_expression_model-shard1 │ │ ├── face_landmark_68_model-shard1 │ │ ├── face_recognition_model-shard1 │ │ ├── face_recognition_model-shard2 │ │ ├── ssd_mobilenetv1_model-shard1 │ │ ├── ssd_mobilenetv1_model-shard2 │ │ ├── tiny_face_detector_model-shard1 │ │ ├── face_landmark_68_tiny_model-shard1 │ │ ├── tiny_face_detector_model-weights_manifest.json │ │ ├── mtcnn_model-weights_manifest.json │ │ └── face_landmark_68_tiny_model-weights_manifest.json │ ├── css │ │ └── open-iconic │ │ │ ├── font │ │ │ └── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ ├── ICON-LICENSE │ │ │ ├── README.md │ │ │ └── FONT-LICENSE │ ├── libs │ │ └── google-code-prettify │ │ │ ├── prettify.css │ │ │ ├── skins │ │ │ ├── sons-of-obsidian.css │ │ │ ├── desert.css │ │ │ ├── sunburst.css │ │ │ └── doxy.css │ │ │ ├── lang-rd.js │ │ │ ├── lang-tex.js │ │ │ ├── lang-latex.js │ │ │ ├── lang-go.js │ │ │ ├── lang-proto.js │ │ │ ├── lang-ll.js │ │ │ ├── lang-llvm.js │ │ │ ├── lang-yaml.js │ │ │ ├── lang-yml.js │ │ │ ├── lang-basic.js │ │ │ ├── lang-cbm.js │ │ │ ├── lang-lua.js │ │ │ ├── lang-wiki.js │ │ │ ├── lang-erl.js │ │ │ ├── lang-erlang.js │ │ │ ├── lang-hs.js │ │ │ ├── lang-tcl.js │ │ │ ├── lang-pascal.js │ │ │ ├── lang-r.js │ │ │ ├── lang-s.js │ │ │ ├── lang-Splus.js │ │ │ ├── lang-cl.js │ │ │ ├── lang-el.js │ │ │ ├── lang-lisp.js │ │ │ ├── lang-lsp.js │ │ │ ├── lang-rkt.js │ │ │ ├── lang-scm.js │ │ │ ├── lang-ss.js │ │ │ ├── lang-kotlin.js │ │ │ ├── lang-lgt.js │ │ │ ├── lang-logtalk.js │ │ │ ├── lang-clj.js │ │ │ ├── lang-mumps.js │ │ │ ├── lang-css.js │ │ │ ├── lang-scala.js │ │ │ ├── lang-aea.js │ │ │ ├── lang-agc.js │ │ │ ├── lang-apollo.js │ │ │ ├── lang-dart.js │ │ │ ├── lang-fs.js │ │ │ ├── lang-ml.js │ │ │ ├── lang-ex.js │ │ │ ├── lang-exs.js │ │ │ ├── lang-vhd.js │ │ │ ├── lang-vhdl.js │ │ │ ├── lang-n.js │ │ │ ├── lang-nemerle.js │ │ │ ├── lang-swift.js │ │ │ ├── lang-rust.js │ │ │ ├── lang-sql.js │ │ │ ├── lang-vb.js │ │ │ ├── lang-vbs.js │ │ │ ├── lang-ls.js │ │ │ ├── lang-lasso.js │ │ │ └── lang-lassoscript.js │ └── wasm-feature-detect.1.5.1.js ├── Pages │ ├── JSObjectTypeInfo.razor.css │ ├── Blank.razor │ ├── Callbacks.razor │ ├── JSEventCallbacks.razor │ ├── ServiceWorkerInfo.razor │ ├── IJSObjectsInfo.razor │ ├── AnalysisReview.razor.css │ ├── DragDrop.razor.css │ ├── GameOfLifeDemo.razor │ ├── WebAPI │ │ ├── GamepadView.razor │ │ ├── GamepadExample.razor │ │ ├── GeolocationExample.razor │ │ └── HTMLVideoElementExample.razor │ ├── DragDrop.razor │ ├── JSObjectTypeInfo.razor.cs │ ├── AnalysisReview.razor │ ├── SystemInfo.razor │ ├── SharedWebWorkerCalculatePiDemo.razor │ ├── WebWorkerCalculatePiDemo.razor │ └── DragDrop.razor.cs ├── Shared │ ├── MainLayout.razor │ ├── IConwayGameOfLifeRenderer.cs │ ├── NavMenu.razor.css │ ├── MainLayout.razor.css │ ├── ConwayGameOfLife.razor │ ├── NavMenu.razor │ └── MarkdownBlock.razor ├── App.razor ├── _Imports.razor ├── Services │ ├── TestService2.cs │ └── FaceAPIService.cs ├── GameOfLife │ ├── BoardTileState.cs │ └── GenerationStat.cs ├── Properties │ └── launchSettings.json ├── UnitTests │ └── FileSystemAPIService.cs ├── SpawnDev.BlazorJS.Test.csproj ├── _publish.bat ├── Diagnostics │ └── JSPropertyInfo.cs ├── Program.cs ├── ExceptionSerializer.cs └── DTO │ └── ReflectionMapper.cs ├── LICENSE.txt ├── SpawnDev.BlazorJS.Test.sln └── .gitattributes /README.md: -------------------------------------------------------------------------------- 1 | # SpawnDev.BlazorJS.Test -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Message": "Hello from appsettings.json" 3 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/test-lib.js: -------------------------------------------------------------------------------- 1 | console.log('---------- Test Lib Loaded ----------'); 2 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Message": "Hello from appsettings.Development.json" 3 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/JSObjectTypeInfo.razor.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | table td:first-child { 4 | text-align: right; 5 | } 6 | 7 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/SpawnDev.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/SpawnDev.ico -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/favicon.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/icon-128.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/icon-192.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/icon-64.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/Blank.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/media/github-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/media/github-mark.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/media/github-mark-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/media/github-mark-white.png -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/mtcnn_model-shard1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/weights/mtcnn_model-shard1 -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-dark.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-dark.gif -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-light.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-light.gif -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-dark-red.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-dark-red.gif -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/age_gender_model-shard1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/weights/age_gender_model-shard1 -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-dark-red2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-dark-red2.gif -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-dark-red3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-dark-red3.gif -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-dark-red4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/media/honeycomb-tile-dark-red4.gif -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/face_expression_model-shard1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/weights/face_expression_model-shard1 -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/face_landmark_68_model-shard1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/weights/face_landmark_68_model-shard1 -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/face_recognition_model-shard1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/weights/face_recognition_model-shard1 -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/face_recognition_model-shard2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/weights/face_recognition_model-shard2 -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/ssd_mobilenetv1_model-shard1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/weights/ssd_mobilenetv1_model-shard1 -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/ssd_mobilenetv1_model-shard2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/weights/ssd_mobilenetv1_model-shard2 -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/tiny_face_detector_model-shard1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/weights/tiny_face_detector_model-shard1 -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/Callbacks.razor: -------------------------------------------------------------------------------- 1 | @page "/Callbacks" 2 | 3 | 4 | 5 | @code { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/face_landmark_68_tiny_model-shard1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LostBeard/SpawnDev.BlazorJS.Test/master/SpawnDev.BlazorJS.Test/wwwroot/weights/face_landmark_68_tiny_model-shard1 -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/JSEventCallbacks.razor: -------------------------------------------------------------------------------- 1 | @page "/ActionEvent" 2 | 3 | 4 | 5 | @code { 6 | 7 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/ServiceWorkerInfo.razor: -------------------------------------------------------------------------------- 1 | @page "/ServiceWorker" 2 | 3 | 4 | 5 | @code { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/IJSObjectsInfo.razor: -------------------------------------------------------------------------------- 1 | @page "/IJSObjectsInfo" 2 | 3 | IJSObject Interface Converter 4 | 5 | 6 | 7 | @code { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/AnalysisReview.razor.css: -------------------------------------------------------------------------------- 1 | .page-main 2 | { 3 | display: flex; 4 | flex-direction: row; 5 | } 6 | 7 | .page-left { 8 | flex-grow: 0; 9 | flex-shrink: 0; 10 | padding: 16px; 11 | } 12 | 13 | .page-right { 14 | flex-grow: 1; 15 | flex-shrink: 1; 16 | padding: 16px; 17 | } 18 | 19 | .page-right ::deep pre { 20 | background-color: #ffffff !important; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 12 | 13 |
14 |
15 | @Body 16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/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.Test/Pages/DragDrop.razor.css: -------------------------------------------------------------------------------- 1 | .dragdropdemo { 2 | /* Prevent the user selecting text in the example */ 3 | user-select: none; 4 | } 5 | 6 | .draggable { 7 | text-align: center; 8 | border: 1px solid orange; 9 | } 10 | 11 | .dragging { 12 | opacity: 0.5; 13 | background: green; 14 | border: 2px dashed yellow; 15 | } 16 | 17 | .dropzone { 18 | width: 200px; 19 | height: 200px; 20 | background: green; 21 | padding: 10px; 22 | margin: 10px; 23 | display: inline-block; 24 | vertical-align: middle; 25 | } 26 | 27 | .dropzone-a { 28 | background: blueviolet; 29 | } 30 | .dropzone-b { 31 | background: green; 32 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/_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 10 | @using SpawnDev.BlazorJS.JSObjects 11 | @using SpawnDev.BlazorJS.WebWorkers 12 | @using SpawnDev.BlazorJS.Test 13 | @using SpawnDev.BlazorJS.Test.Services 14 | @using SpawnDev.BlazorJS.Test.Shared 15 | @using Radzen 16 | @using Radzen.Blazor 17 | @using Radzen.Blazor.Rendering 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.clo,.opn,.pun{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.kwd,.tag,.typ{font-weight:700}.str{color:#060}.kwd{color:#006}.com{color:#600;font-style:italic}.typ{color:#404}.lit{color:#044}.clo,.opn,.pun{color:#440}.tag{color:#006}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/skins/sons-of-obsidian.css: -------------------------------------------------------------------------------- 1 | .str{color:#EC7600}.kwd{color:#93C763}.com{color:#66747B}.typ{color:#678CB1}.lit{color:#FACD22}.pln,.pun{color:#F1F2F3}.tag{color:#8AC763}.atn{color:#E0E2E4}.atv{color:#EC7600}.dec{color:purple}pre.prettyprint{border:0 solid #888}ol.linenums{margin-top:0;margin-bottom:0}.prettyprint{background:#000}li.L0,li.L1,li.L2,li.L3,li.L4,li.L5,li.L6,li.L7,li.L8,li.L9{color:#555;list-style-type:decimal}li.L1,li.L3,li.L5,li.L7,li.L9{background:#111}@media print{.kwd,.tag,.typ{font-weight:700}.str{color:#060}.kwd{color:#006}.com{color:#600;font-style:italic}.typ{color:#404}.lit{color:#044}.pun{color:#440}.pln{color:#000}.tag{color:#006}.atn{color:#404}.atv{color:#060}} -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/GameOfLifeDemo.razor: -------------------------------------------------------------------------------- 1 | @page "/ConwayGameOfLife" 2 | 3 |

Game Of Life

4 |

5 | Conway's Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.[1] It is a zero-player game,[2][3] meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves. It is Turing complete and can simulate a universal constructor or any other Turing machine. 6 |

7 | 8 | @code { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Services/TestService2.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.Test.Services 2 | { 3 | public interface ITestService2 4 | { 5 | Task GetId(); 6 | } 7 | public class TestService2 : ITestService2 8 | { 9 | public string Id { get; set; } 10 | public TestService2(string id) 11 | { 12 | Id = id; 13 | } 14 | public Task GetId() => Task.FromResult(Id); 15 | } 16 | public class TestService3 : ITestService2 17 | { 18 | public T Value { get; set; } 19 | public string Id { get; set; } 20 | public TestService3(string id) 21 | { 22 | Id = id; 23 | } 24 | public Task GetId() => Task.FromResult(Id); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/WebAPI/GamepadView.razor: -------------------------------------------------------------------------------- 1 |
2 | @if (Gamepad != null) 3 | { 4 |
5 | Gamepad: @Gamepad.Index @Gamepad.Connected @Gamepad.Id 6 |
7 | @for (var i = 0; i < Gamepad.Axes!.Length; i++) 8 | { 9 | var axis = Gamepad.Axes[i]; 10 |
11 | Axis: @i @axis 12 |
13 | } 14 | @for (var i = 0; i < Gamepad.Buttons!.Length; i++) 15 | { 16 | var button = Gamepad.Buttons[i]; 17 |
18 | Button: @i @button.Pressed @button.Touched @button.Value 19 |
20 | } 21 | } 22 |
23 | 24 | @code { 25 | [Parameter] 26 | public Gamepad? Gamepad { get; set; } 27 | } 28 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/DragDrop.razor: -------------------------------------------------------------------------------- 1 | @page "/DragDropDemo" 2 | 3 |

Drag and Drop

4 |

5 | This demonstrates using Callbacks to handle drag and drop events. 6 |

7 |
8 |
9 | Drop Zone A 10 | @foreach (var item in _someItems) 11 | { 12 | if (!item.GroupA) continue; 13 | // well use item-id attribute to store a reference to our item 14 |
@item.Value
15 | } 16 |
17 |
18 | Drop Zone B 19 | @foreach (var item in _someItems) 20 | { 21 | if (item.GroupA) continue; 22 |
@item.Value
23 | } 24 |
25 |
26 | 27 | @code { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/skins/desert.css: -------------------------------------------------------------------------------- 1 | pre .atn,pre .kwd,pre .tag{font-weight:700}pre.prettyprint{display:block;background-color:#333}pre .nocode{background-color:none;color:#000}pre .str{color:#ffa0a0}pre .kwd{color:khaki}pre .com{color:#87ceeb}pre .typ{color:#98fb98}pre .lit{color:#cd5c5c}pre .pln,pre .pun{color:#fff}pre .tag{color:khaki}pre .atn{color:#bdb76b}pre .atv{color:#ffa0a0}pre .dec{color:#98fb98}ol.linenums{margin-top:0;margin-bottom:0;color:#AEAEAE}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}@media print{pre.prettyprint{background-color:none}code .str,pre .str{color:#060}code .kwd,pre .kwd{color:#006;font-weight:700}code .com,pre .com{color:#600;font-style:italic}code .typ,pre .typ{color:#404;font-weight:700}code .lit,pre .lit{color:#044}code .pun,pre .pun{color:#440}code .pln,pre .pln{color:#000}code .tag,pre .tag{color:#006;font-weight:700}code .atn,pre .atn{color:#404}code .atv,pre .atv{color:#060}} -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-rd.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2012 Jeffrey Arnold 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\r\n]*/,null,"%"]],[["lit",/^\\(?:cr|l?dots|R|tab)\b/],["kwd",/^\\[a-zA-Z@]+/],["kwd",/^#(?:ifn?def|endif)/],["pln",/^\\[{}]/],["pun",/^[{}()\[\]]+/]]),["Rd","rd"]); 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-tex.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2011 Martin S. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\r\n]*/,null,"%"]],[["kwd",/^\\[a-zA-Z@]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[{}()\[\]=]+/]]),["latex","tex"]); 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-latex.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2011 Martin S. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\r\n]*/,null,"%"]],[["kwd",/^\\[a-zA-Z@]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[{}()\[\]=]+/]]),["latex","tex"]); 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/media/github-mark-white.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/media/github-mark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-go.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2010 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["pln",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])+(?:\'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\/\*[\s\S]*?\*\/)/],["pln",/^(?:[^\/\"\'`]|\/(?![\/\*]))+/i]]),["go"]); 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-proto.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2006 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/skins/sunburst.css: -------------------------------------------------------------------------------- 1 | code .str,pre .str{color:#65B042}code .kwd,pre .kwd{color:#E28964}code .com,pre .com{color:#AEAEAE;font-style:italic}code .typ,pre .typ{color:#89bdff}code .lit,pre .lit{color:#3387CC}code .pln,code .pun,pre .pln,pre .pun{color:#fff}code .tag,pre .tag{color:#89bdff}code .atn,pre .atn{color:#bdb76b}code .atv,pre .atv{color:#65B042}code .dec,pre .dec{color:#3387CC}code.prettyprint,pre.prettyprint{background-color:#000;border-radius:8px}pre.prettyprint{width:95%;margin:1em auto;padding:1em;white-space:pre-wrap}ol.linenums{margin-top:0;margin-bottom:0;color:#AEAEAE}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}@media print{code .str,pre .str{color:#060}code .kwd,pre .kwd{color:#006;font-weight:700}code .com,pre .com{color:#600;font-style:italic}code .typ,pre .typ{color:#404;font-weight:700}code .lit,pre .lit{color:#044}code .pun,pre .pun{color:#440}code .pln,pre .pln{color:#000}code .tag,pre .tag{color:#006;font-weight:700}code .atn,pre .atn{color:#404}code .atv,pre .atv{color:#060}} -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-ll.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Nikhil Dabas 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^!?\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["com",/^;[^\r\n]*/,null,";"]],[["pln",/^[%@!](?:[-a-zA-Z$._][-a-zA-Z$._0-9]*|\d+)/],["kwd",/^[A-Za-z_][0-9A-Za-z_]*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[xX][a-fA-F0-9]+)/],["pun",/^[()\[\]{},=*<>:]|\.\.\.$/]]),["llvm","ll"]); 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-llvm.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Nikhil Dabas 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^!?\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["com",/^;[^\r\n]*/,null,";"]],[["pln",/^[%@!](?:[-a-zA-Z$._][-a-zA-Z$._0-9]*|\d+)/],["kwd",/^[A-Za-z_][0-9A-Za-z_]*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[xX][a-fA-F0-9]+)/],["pun",/^[()\[\]{},=*<>:]|\.\.\.$/]]),["llvm","ll"]); 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-yaml.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015 ribrdb @ code.google.com 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:|>?]+/,null,":|>?"],["dec",/^%(?:YAML|TAG)[^#\r\n]+/,null,"%"],["typ",/^[&]\S+/,null,"&"],["typ",/^!\S*/,null,"!"],["str",/^"(?:[^\\"]|\\.)*(?:"|$)/,null,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,null,"'"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^\s+/,null," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\r\n]|$)/],["pun",/^-/],["kwd",/^[\w-]+:[ \r\n]/],["pln", 18 | /^\w+/]]),["yaml","yml"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-yml.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015 ribrdb @ code.google.com 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:|>?]+/,null,":|>?"],["dec",/^%(?:YAML|TAG)[^#\r\n]+/,null,"%"],["typ",/^[&]\S+/,null,"&"],["typ",/^!\S*/,null,"!"],["str",/^"(?:[^\\"]|\\.)*(?:"|$)/,null,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,null,"'"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^\s+/,null," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\r\n]|$)/],["pun",/^-/],["kwd",/^[\w-]+:[ \r\n]/],["pln", 18 | /^\w+/]]),["yaml","yml"]); 19 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/GameOfLife/BoardTileState.cs: -------------------------------------------------------------------------------- 1 | namespace SpawnDev.BlazorJS.Test.GameOfLife 2 | { 3 | [Flags] 4 | public enum BoardTileState : byte 5 | { 6 | /// 7 | /// Void of life now and has never been alive 8 | /// 9 | Void = 0, 10 | /// 11 | /// Any cell that was once alive, but is currently dead 12 | /// 13 | Dead = 1, 14 | /// 15 | /// Any live cell with fewer than two live neighbors dies, as if by underpopulation. 16 | /// 17 | DeathUnderPopulation = 2 | Dead, 18 | /// 19 | /// Any live cell with more than three live neighbors dies, as if by overpopulation. 20 | /// 21 | DeathOverPopulation = 4 | Dead, 22 | /// 23 | /// Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction. 24 | /// 25 | Alive = 8, 26 | Birth = 16 | Alive, 27 | Youngling = 32 | Alive, 28 | Adult = 64 | Alive, 29 | Elder = 128 | Alive, 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-basic.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Peter Kofler 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:"(?:[^\\"\r\n]|\\.)*(?:"|$))/,null,'"'],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["com",/^REM[^\r\n]*/,null],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,null],["pln",/^[A-Z][A-Z0-9]?(?:\$|%)?/i,null],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i, 18 | null,"0123456789"],["pun",/^.[^\s\w\.$%"]*/,null]]),["basic","cbm"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-cbm.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Peter Kofler 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:"(?:[^\\"\r\n]|\\.)*(?:"|$))/,null,'"'],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["com",/^REM[^\r\n]*/,null],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,null],["pln",/^[A-Z][A-Z0-9]?(?:\$|%)?/i,null],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i, 18 | null,"0123456789"],["pun",/^.[^\s\w\.$%"]*/,null]]),["basic","cbm"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.11.35201.85 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpawnDev.BlazorJS.Test", "SpawnDev.BlazorJS.Test\SpawnDev.BlazorJS.Test.csproj", "{722CB8F4-2285-4D53-9421-CFE6056BA0E1}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {722CB8F4-2285-4D53-9421-CFE6056BA0E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {722CB8F4-2285-4D53-9421-CFE6056BA0E1}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {722CB8F4-2285-4D53-9421-CFE6056BA0E1}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {722CB8F4-2285-4D53-9421-CFE6056BA0E1}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {B5CF8C4E-8809-46DC-BF23-1AB4E7C2F90B} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-lua.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],["str",/^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i], 18 | ["pln",/^[a-z_]\w*/i],["pun",/^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]]),["lua"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-wiki.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t \xA0a-gi-z0-9]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/],["lang-",/^\{\{\{([\s\S]+?)\}\}\}/],["lang-",/^`([^\r\n`]+)`/],["str",/^https?:\/\/[^\/?#\s]*(?:\/[^?#\s]*)?(?:\?[^#\s]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]]),["wiki"]); 18 | PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Shared/IConwayGameOfLifeRenderer.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JSObjects; 2 | using SpawnDev.BlazorJS.Test.GameOfLife; 3 | 4 | namespace SpawnDev.BlazorJS.Test.Shared 5 | { 6 | public interface IConwayGameOfLifeRenderer : IAsyncDisposable 7 | { 8 | Board Board { get; } 9 | int BoardRowHeight { get; } 10 | int BoardRowWidth { get; } 11 | int CanvasHeight { get; } 12 | int CanvasWidth { get; } 13 | TimeSpan drawTime { get; set; } 14 | int LegendColorSize { get; } 15 | bool Paused { get; set; } 16 | int TileSize { get; set; } 17 | 18 | Task GetStats(); 19 | Task Init(HTMLCanvasElement canvas, int width, int height, double startingPopulation); 20 | Task Init(OffscreenCanvas offscreenCanvas, int width, int height, double startingPopulation); 21 | Task Pause(); 22 | Task Reset(); 23 | Task ResetBoard(); 24 | Task ResetBoard(double startingPopulation); 25 | Task ResizeBoard(int width, int height); 26 | Task ResizeBoard(int width, int height, double startingPopulation); 27 | Task Snapshot(); 28 | Task Tick(); 29 | Task TogglePaused(); 30 | Task Unpause(); 31 | } 32 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-erl.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Andrew Allen 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\x0B\f\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^\?[^ \t\n({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/], 18 | ["kwd",/^-[a-z_]+/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;]/]]),["erlang","erl"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-erlang.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Andrew Allen 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\x0B\f\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^\?[^ \t\n({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/], 18 | ["kwd",/^-[a-z_]+/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;]/]]),["erlang","erl"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-hs.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\x0B\f\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/, 18 | null],["pln",/^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],["pun",/^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]]),["hs"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/GameOfLife/GenerationStat.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace SpawnDev.BlazorJS.Test.GameOfLife 4 | { 5 | public class ChangedCell 6 | { 7 | public int X { get; set; } 8 | public int Y { get; set; } 9 | [JsonPropertyName("V")] 10 | public BoardTileState Value { get; set; } 11 | } 12 | public class GenerationStat 13 | { 14 | public TimeSpan Elapsed { get; set; } 15 | public long BoardWidth { get; set; } = 0; 16 | public long BoardHeight { get; set; } = 0; 17 | public long Population { get; set; } = 0; 18 | public long Deaths { get; set; } = 0; 19 | public long Babies { get; set; } = 0; 20 | public long Younglings { get; set; } = 0; 21 | public long Adults { get; set; } = 0; 22 | public long Elders { get; set; } = 0; 23 | public long Generation { get; set; } 24 | [JsonIgnore] 25 | public List Changed { get; set; } = new List(); 26 | public GenerationStat() { } 27 | public GenerationStat(long generation, int boardWidth, int boardHeight) 28 | { 29 | Generation = generation; 30 | BoardWidth = boardWidth; 31 | BoardHeight = boardHeight; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-tcl.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2012 Pyrios 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\{+/,null,"{"],["clo",/^\}+/,null,"}"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/,null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i], 18 | ["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["tcl"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-pascal.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Peter Kofler 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$))/,null,"'"],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["com",/^\(\*[\s\S]*?(?:\*\)|$)|^\{[\s\S]*?(?:\}|$)/,null],["kwd",/^(?:ABSOLUTE|AND|ARRAY|ASM|ASSEMBLER|BEGIN|CASE|CONST|CONSTRUCTOR|DESTRUCTOR|DIV|DO|DOWNTO|ELSE|END|EXTERNAL|FOR|FORWARD|FUNCTION|GOTO|IF|IMPLEMENTATION|IN|INLINE|INTERFACE|INTERRUPT|LABEL|MOD|NOT|OBJECT|OF|OR|PACKED|PROCEDURE|PROGRAM|RECORD|REPEAT|SET|SHL|SHR|THEN|TO|TYPE|UNIT|UNTIL|USES|VAR|VIRTUAL|WHILE|WITH|XOR)\b/i, 18 | null],["lit",/^(?:true|false|self|nil)/i,null],["pln",/^[a-z][a-z0-9]*/i,null],["lit",/^(?:\$[a-f0-9]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?)/i,null,"0123456789"],["pun",/^.[^\s\w\.$@\'\/]*/,null]]),["pascal"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-r.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2012 Jeffrey B. Arnold 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],["lit",/^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],["lit",/^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/], 18 | ["pun",/^(?:<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],["pln",/^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-s.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2012 Jeffrey B. Arnold 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],["lit",/^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],["lit",/^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/], 18 | ["pun",/^(?:<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],["pln",/^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-Splus.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2012 Jeffrey B. Arnold 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],["lit",/^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],["lit",/^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/], 18 | ["pun",/^(?:<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],["pln",/^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-cl.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-el.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-lisp.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-lsp.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-rkt.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-scm.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-ss.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, 18 | null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "http": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "dotnetRunMessages": true, 10 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 11 | "applicationUrl": "http://localhost:5192" 12 | }, 13 | "https": { 14 | "commandName": "Project", 15 | "launchBrowser": true, 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | }, 19 | "dotnetRunMessages": true, 20 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 21 | "applicationUrl": "https://localhost:7191;http://localhost:5192", 22 | "hotReloadEnabled": false 23 | }, 24 | "IIS Express": { 25 | "commandName": "IISExpress", 26 | "launchBrowser": true, 27 | "environmentVariables": { 28 | "ASPNETCORE_ENVIRONMENT": "Development" 29 | }, 30 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" 31 | } 32 | }, 33 | "iisSettings": { 34 | "windowsAuthentication": false, 35 | "anonymousAuthentication": true, 36 | "iisExpress": { 37 | "applicationUrl": "http://localhost:10418", 38 | "sslPort": 44385 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-kotlin.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2017 Micha?? B??czkowski 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["pun",/^[.!%&()*+,\-;<=>?\[\\\]^{|}:]+/,null,".!%&()*+,-;<=>?[\\]^{|}:"]],[["kwd",/^\b(package|public|protected|private|open|abstract|constructor|final|override|import|for|while|as|typealias|get|set|((data|enum|annotation|sealed) )?class|this|super|val|var|fun|is|in|throw|return|break|continue|(companion )?object|if|try|else|do|when|init|interface|typeof)\b/],["lit",/^(?:true|false|null)\b/], 18 | ["lit",/^(0[xX][0-9a-fA-F_]+L?|0[bB][0-1]+L?|[0-9_.]+([eE]-?[0-9]+)?[fFL]?)/],["typ",/^(\b[A-Z]+[a-z][a-zA-Z0-9_$@]*|`.*`)/,null],["com",/^\/\/.*/],["com",/^\/\*[\s\S]*?(?:\*\/|$)/],["str",/'.'/],["str",/^"([^"\\]|\\[\s\S])*"/],["str",/^"{3}[\s\S]*?[^\\]"{3}/],["lit",/^@([a-zA-Z0-9_$@]*|`.*`)/],["lit",/^[a-zA-Z0-9_]+@/]]),["kotlin"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Shared/NavMenu.razor.css: -------------------------------------------------------------------------------- 1 | .navbar-toggler { 2 | background-color: rgba(255, 255, 255, 0.1); 3 | } 4 | 5 | .top-row { 6 | height: 3.5rem; 7 | background-color: rgba(0,0,0,0.4); 8 | } 9 | 10 | .navbar-brand { 11 | font-size: 1.1rem; 12 | } 13 | 14 | .oi { 15 | width: 2rem; 16 | font-size: 1.1rem; 17 | vertical-align: text-top; 18 | top: -2px; 19 | } 20 | 21 | .nav-item { 22 | font-size: 0.9rem; 23 | padding-bottom: 0.5rem; 24 | } 25 | 26 | .nav-item:first-of-type { 27 | padding-top: 1rem; 28 | } 29 | 30 | .nav-item:last-of-type { 31 | padding-bottom: 1rem; 32 | } 33 | 34 | .nav-item ::deep a { 35 | color: #d7d7d7; 36 | border-radius: 4px; 37 | height: 3rem; 38 | display: flex; 39 | align-items: center; 40 | line-height: 3rem; 41 | } 42 | 43 | .nav-item ::deep a.active { 44 | background-color: rgba(255,255,255,0.25); 45 | color: white; 46 | } 47 | 48 | .nav-item ::deep a:hover { 49 | background-color: rgba(255,255,255,0.1); 50 | color: white; 51 | } 52 | 53 | @media (min-width: 641px) { 54 | .navbar-toggler { 55 | display: none; 56 | } 57 | 58 | .collapse { 59 | /* Never collapse the sidebar for wide screens */ 60 | display: block; 61 | } 62 | 63 | .nav-scrollable { 64 | /* Allow sidebar to scroll for tall menus */ 65 | height: calc(100vh - 3.5rem); 66 | overflow-y: auto; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-lgt.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2014 Paulo Moura 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^(?:0'.|0b[0-1]+|0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\r\n]*/,null,"%"],["com",/^\/\*[\s\S]*?\*\//],["kwd",/^\s*:-\s(c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(clude|itialization|fo))|alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))/], 18 | ["kwd",/^\s*:-\s(e(lse|nd(if|_(category|object|protocol)))|built_in|dynamic|synchronized|threaded)/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;{}:^<>=\\/+*?#!-]/]]),["logtalk","lgt"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-logtalk.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2014 Paulo Moura 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^(?:0'.|0b[0-1]+|0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\r\n]*/,null,"%"],["com",/^\/\*[\s\S]*?\*\//],["kwd",/^\s*:-\s(c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(clude|itialization|fo))|alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))/], 18 | ["kwd",/^\s*:-\s(e(lse|nd(if|_(category|object|protocol)))|built_in|dynamic|synchronized|threaded)/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;{}:^<>=\\/+*?#!-]/]]),["logtalk","lgt"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/skins/doxy.css: -------------------------------------------------------------------------------- 1 | a,code.prettyprint a,pre.prettyprint a{text-decoration:none}code .str,pre .str{color:#fec243}code .kwd,pre .kwd{color:#8470FF}code .com,pre .com{color:#32cd32;font-style:italic}code .typ,pre .typ{color:#6ecbcc}code .lit,pre .lit{color:#d06}code .pun,pre .pun{color:#8B8970}code .pln,pre .pln{color:#f0f0f0}code .tag,pre .tag{color:#9c9cff}code .htm,pre .htm{color:plum}code .xsl,pre .xsl{color:#d0a0d0}code .atn,pre .atn{color:#46eeee;font-weight:400}code .atv,pre .atv{color:#EEB4B4}code .dec,pre .dec{color:#3387CC}code.prettyprint,pre.prettyprint{font-family:'Droid Sans Mono','CPMono_v07 Bold','Droid Sans';font-weight:700;font-size:9pt;background-color:#0f0f0f;-moz-border-radius:8px;-webkit-border-radius:8px;-o-border-radius:8px;-ms-border-radius:8px;-khtml-border-radius:8px;border-radius:8px}pre.prettyprint{width:95%;margin:1em auto;padding:1em;white-space:pre-wrap}ol.linenums{margin-top:0;margin-bottom:0;color:#8B8970}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}@media print{code.prettyprint,pre.prettyprint{background-color:#fff}code .str,pre .str{color:#088}code .kwd,pre .kwd{color:#006;font-weight:700}code .com,pre .com{color:#oc3;font-style:italic}code .typ,pre .typ{color:#404;font-weight:700}code .lit,pre .lit{color:#044}code .pun,pre .pun{color:#440}code .pln,pre .pln{color:#000}code .tag,pre .tag{color:#b66ff7;font-weight:700}code .htm,code .xsl,pre .htm,pre .xsl{color:#606;font-weight:700}code .atn,pre .atn{color:#c71585;font-weight:400}code .atv,pre .atv{color:#088;font-weight:400}} -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-clj.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 Google Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[\(\{\[]+/,null,"([{"],["clo",/^[\)\}\]]+/,null,")]}"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/, 17 | null],["typ",/^:[0-9a-zA-Z\-]+/]]),["clj"]); 18 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-mumps.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2011 Kitware Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"]|\\.)*")/,null,'"']],[["com",/^;[^\r\n]*/,null,";"],["dec",/^(?:\$(?:D|DEVICE|EC|ECODE|ES|ESTACK|ET|ETRAP|H|HOROLOG|I|IO|J|JOB|K|KEY|P|PRINCIPAL|Q|QUIT|ST|STACK|S|STORAGE|SY|SYSTEM|T|TEST|TL|TLEVEL|TR|TRESTART|X|Y|Z[A-Z]*|A|ASCII|C|CHAR|D|DATA|E|EXTRACT|F|FIND|FN|FNUMBER|G|GET|J|JUSTIFY|L|LENGTH|NA|NAME|O|ORDER|P|PIECE|QL|QLENGTH|QS|QSUBSCRIPT|Q|QUERY|R|RANDOM|RE|REVERSE|S|SELECT|ST|STACK|T|TEXT|TR|TRANSLATE|NaN))\b/i, 18 | null],["kwd",/^(?:[^\$]B|BREAK|C|CLOSE|D|DO|E|ELSE|F|FOR|G|GOTO|H|HALT|H|HANG|I|IF|J|JOB|K|KILL|L|LOCK|M|MERGE|N|NEW|O|OPEN|Q|QUIT|R|READ|S|SET|TC|TCOMMIT|TRE|TRESTART|TRO|TROLLBACK|TS|TSTART|U|USE|V|VIEW|W|WRITE|X|XECUTE)\b/i,null],["lit",/^[+-]?(?:(?:\.\d+|\d+(?:\.\d*)?)(?:E[+\-]?\d+)?)/i],["pln",/^[a-z][a-zA-Z0-9]*/i],["pun",/^[^\w\t\n\r\xA0\"\$;%\^]|_/]]),["mumps"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[["str",/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],["str",/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']+)\)/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], 18 | ["com",/^(?:\x3c!--|--\x3e)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#(?:[0-9a-f]{3}){1,2}\b/i],["pln",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],["pun",/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^\)\"\']+/]]),["css-str"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-scala.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2010 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:(?:""(?:""?(?!")|[^\\"]|\\.)*"{0,3})|(?:[^"\r\n\\]|\\.)*"?))/,null,'"'],["lit",/^`(?:[^\r\n\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&()*+,\-:;<=>?@\[\\\]^{|}~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\r\n\\']|\\(?:'|[^\r\n']+))'/],["lit",/^'[a-zA-Z_$][\w$]*(?!['$\w])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/], 18 | ["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:(?:0(?:[0-7]+|X[0-9A-F]+))L?|(?:(?:0|[1-9][0-9]*)(?:(?:\.[0-9]+)?(?:E[+\-]?[0-9]+)?F?|L?))|\\.[0-9]+(?:E[+\-]?[0-9]+)?F?)/i],["typ",/^[$_]*[A-Z][_$A-Z0-9]*[a-z][\w$]*/],["pln",/^[$a-zA-Z_][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-aea.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Onno Hommes. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, 18 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-agc.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Onno Hommes. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, 18 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-apollo.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Onno Hommes. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, 18 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-dart.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["com",/^#!(?:.*)/],["kwd",/^\b(?:import|library|part of|part|as|show|hide)\b/i],["com",/^\/\/(?:.*)/],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],["kwd",/^\b(?:class|interface)\b/i],["kwd",/^\b(?:assert|async|await|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|sync|this|throw|try|while)\b/i],["kwd",/^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i], 18 | ["typ",/^\b(?:bool|double|Dynamic|int|num|Object|String|void)\b/i],["kwd",/^\b(?:false|null|true)\b/i],["str",/^r?[\']{3}[\s|\S]*?[^\\][\']{3}/],["str",/^r?[\"]{3}[\s|\S]*?[^\\][\"]{3}/],["str",/^r?\'(\'|(?:[^\n\r\f])*?[^\\]\')/],["str",/^r?\"(\"|(?:[^\n\r\f])*?[^\\]\")/],["typ",/^[A-Z]\w*/],["pln",/^[a-z_$][a-z0-9_]*/i],["pun",/^[~!%^&*+=|?:<>/-]/],["lit",/^\b0x[0-9a-f]+/i],["lit",/^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],["lit", 19 | /^\b\.\d+(?:e[+-]?\d+)?/i],["pun",/^[(){}\[\],.;]/]]),["dart"]); 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-fs.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], 18 | ["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_][\w']*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-ml.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], 18 | ["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_][\w']*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Shared/MainLayout.razor.css: -------------------------------------------------------------------------------- 1 | .page { 2 | position: relative; 3 | display: flex; 4 | flex-direction: column; 5 | } 6 | 7 | main { 8 | flex: 1; 9 | } 10 | 11 | .sidebar { 12 | background-image: linear-gradient(180deg, rgb(23,15,15) 0%, rgb(10,8,8) 70%); 13 | } 14 | 15 | .top-row { 16 | background-color: #f7f7f7; 17 | border-bottom: 1px solid #d6d5d5; 18 | justify-content: flex-end; 19 | height: 3.5rem; 20 | display: flex; 21 | align-items: center; 22 | } 23 | 24 | .top-row ::deep a, .top-row ::deep .btn-link { 25 | white-space: nowrap; 26 | margin-left: 1.5rem; 27 | text-decoration: none; 28 | } 29 | 30 | .top-row ::deep a:hover, .top-row ::deep .btn-link:hover { 31 | text-decoration: underline; 32 | } 33 | 34 | .top-row ::deep a:first-child { 35 | overflow: hidden; 36 | text-overflow: ellipsis; 37 | } 38 | 39 | @media (max-width: 640.98px) { 40 | .top-row:not(.auth) { 41 | display: none; 42 | } 43 | 44 | .top-row.auth { 45 | justify-content: space-between; 46 | } 47 | 48 | .top-row ::deep a, .top-row ::deep .btn-link { 49 | margin-left: 0; 50 | } 51 | } 52 | 53 | @media (min-width: 641px) { 54 | .page { 55 | flex-direction: row; 56 | } 57 | 58 | .sidebar { 59 | width: 250px; 60 | height: 100vh; 61 | position: sticky; 62 | top: 0; 63 | } 64 | 65 | .top-row { 66 | position: sticky; 67 | top: 0; 68 | z-index: 1; 69 | } 70 | 71 | .top-row.auth ::deep a:first-child { 72 | flex: 1; 73 | text-align: right; 74 | width: 0; 75 | } 76 | 77 | .top-row, article { 78 | padding-left: 2rem !important; 79 | padding-right: 1.5rem !important; 80 | } 81 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-ex.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2017 Jacek Kr??likowski 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#.*/,null,"#"],["lit",/^'(?:[^'\\]|\\(?:.|\n|\r))*'?/,null,"'"],["atn",/^@\w+/,null,"@"],["pun",/^[!%&()*+,\-;<=>?\[\\\]^{|}]+/,null,"!%&()*+,-;<=>?[\\]^{|}"],["lit",/^(?:0o[0-7](?:[0-7]|_[0-7])*|0x[\da-fA-F](?:[\da-fA-F]|_[\da-fA-F])*|\d(?:\d|_\d)*(?:\.\d(?:\d|_\d)*)?(?:[eE][+\-]?\d(?:\d|_\d)*)?)/,null,"0123456789"]],[["atn",/^iex(?:\(\d+\))?> /], 18 | ["pun",/^::/],["lit",/^:(?:\w+[\!\?\@]?|"(?:[^"\\]|\\.)*"?)/],["atn",/^(?:__(?:CALLER|ENV|MODULE|DIR)__)/],["kwd",/^(?:alias|case|catch|def(?:delegate|exception|impl|macrop?|module|overridable|p?|protocol|struct)|do|else|end|fn|for|if|in|import|quote|raise|require|rescue|super|throw|try|unless|unquote(?:_splicing)?|use|when|with|yield)\b/],["lit",/^(?:true|false|nil)\b/],["lit",/^(?:\w+[\!\?\@]?|"(?:[^"\\]|\\.)*"):(?!:)/],["str",/^"""\s*(\r|\n)+(?:""?(?!")|[^\\"]|\\(?:.|\n|\r))*"{0,3}/], 19 | ["str",/^"(?:[^"\\]|\\(?:.|\n|\r))*"?(?!")/],["typ",/^[A-Z]\w*/],["com",/^_\w*/],["pln",/^[$a-z]\w*[\!\?]?/],["atv",/^~[A-Z](?:\/(?:[^\/\r\n\\]|\\.)+\/|\|(?:[^\|\r\n\\]|\\.)+\||"(?:[^"\r\n\\]|\\.)+"|'(?:[^'\r\n\\]|\\.)+')[A-Z]*/i],["atv",/^~[A-Z](?:\((?:[^\)\r\n\\]|\\.)+\)|\[(?:[^\]\r\n\\]|\\.)+\]|\{(?:[^\}\r\n\\]|\\.)+\}|\<(?:[^\>\r\n\\]|\\.)+\>)[A-Z]*/i],["pun",/^(?:\.+|\/|[:~])/]]),["ex","exs"]); 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-exs.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2017 Jacek Kr??likowski 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#.*/,null,"#"],["lit",/^'(?:[^'\\]|\\(?:.|\n|\r))*'?/,null,"'"],["atn",/^@\w+/,null,"@"],["pun",/^[!%&()*+,\-;<=>?\[\\\]^{|}]+/,null,"!%&()*+,-;<=>?[\\]^{|}"],["lit",/^(?:0o[0-7](?:[0-7]|_[0-7])*|0x[\da-fA-F](?:[\da-fA-F]|_[\da-fA-F])*|\d(?:\d|_\d)*(?:\.\d(?:\d|_\d)*)?(?:[eE][+\-]?\d(?:\d|_\d)*)?)/,null,"0123456789"]],[["atn",/^iex(?:\(\d+\))?> /], 18 | ["pun",/^::/],["lit",/^:(?:\w+[\!\?\@]?|"(?:[^"\\]|\\.)*"?)/],["atn",/^(?:__(?:CALLER|ENV|MODULE|DIR)__)/],["kwd",/^(?:alias|case|catch|def(?:delegate|exception|impl|macrop?|module|overridable|p?|protocol|struct)|do|else|end|fn|for|if|in|import|quote|raise|require|rescue|super|throw|try|unless|unquote(?:_splicing)?|use|when|with|yield)\b/],["lit",/^(?:true|false|nil)\b/],["lit",/^(?:\w+[\!\?\@]?|"(?:[^"\\]|\\.)*"):(?!:)/],["str",/^"""\s*(\r|\n)+(?:""?(?!")|[^\\"]|\\(?:.|\n|\r))*"{0,3}/], 19 | ["str",/^"(?:[^"\\]|\\(?:.|\n|\r))*"?(?!")/],["typ",/^[A-Z]\w*/],["com",/^_\w*/],["pln",/^[$a-z]\w*[\!\?]?/],["atv",/^~[A-Z](?:\/(?:[^\/\r\n\\]|\\.)+\/|\|(?:[^\|\r\n\\]|\\.)+\||"(?:[^"\r\n\\]|\\.)+"|'(?:[^'\r\n\\]|\\.)+')[A-Z]*/i],["atv",/^~[A-Z](?:\((?:[^\)\r\n\\]|\\.)+\)|\[(?:[^\]\r\n\\]|\\.)+\]|\{(?:[^\}\r\n\\]|\\.)+\}|\<(?:[^\>\r\n\\]|\\.)+\>)[A-Z]*/i],["pun",/^(?:\.+|\/|[:~])/]]),["ex","exs"]); 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-vhd.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2010 benoit@ryder.fr 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],["com",/^--[^\r\n]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, 18 | null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i], 19 | ["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]]),["vhdl","vhd"]); 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-vhdl.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2010 benoit@ryder.fr 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],["com",/^--[^\r\n]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, 18 | null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i], 19 | ["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]]),["vhdl","vhd"]); 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-n.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2011 Zimin A.V. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*\'|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null],["str",/^<#(?:[^#>])*(?:#>|$)/,null],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null],["com",/^\/\/[^\r\n]*/, 18 | null],["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 19 | null],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,null],["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^@[A-Z]+[a-z][A-Za-z_$@0-9]*/,null],["pln",/^'?[A-Za-z_$][a-z_$@0-9]*/i,null],["lit",/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],["pun",/^.[^\s\w\.$@\'\"\`\/\#]*/,null]]),["n","nemerle"]); 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-nemerle.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2011 Zimin A.V. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*\'|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null],["str",/^<#(?:[^#>])*(?:#>|$)/,null],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null],["com",/^\/\/[^\r\n]*/, 18 | null],["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 19 | null],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,null],["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^@[A-Z]+[a-z][A-Za-z_$@0-9]*/,null],["pln",/^'?[A-Za-z_$][a-z_$@0-9]*/i,null],["lit",/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],["pun",/^.[^\s\w\.$@\'\"\`\/\#]*/,null]]),["n","nemerle"]); 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/JSObjectTypeInfo.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using System.Reflection; 3 | 4 | namespace SpawnDev.BlazorJS.Test.Pages 5 | { 6 | public partial class JSObjectTypeInfo 7 | { 8 | [Parameter] 9 | public string? Name { get; set; } = null; 10 | public string TypeName => Type == null ? "" : Type.Name; 11 | public Type? Type { get; set; } 12 | public bool ShowTypeList => Type == null; 13 | 14 | public List JSObjectTypes { get; set; } = new List(); 15 | 16 | string JSObjectsTypeNamePrefix = "SpawnDev.BlazorJS.JSObjects."; 17 | 18 | string ParameterInfoToString(ParameterInfo o) 19 | { 20 | var ret = $"{o.ParameterType.GetFormattedName()} {o.Name}"; 21 | if (o.HasDefaultValue) 22 | { 23 | ret += $" = {o.DefaultValue}"; 24 | } 25 | return ret; 26 | } 27 | //string ReturnTypeToString(Type o) 28 | //{ 29 | // return o.GetFormattedName(); 30 | //} 31 | protected override void OnInitialized() 32 | { 33 | JSObjectTypes = typeof(JSObject).Assembly.GetTypes().Where(o => o.FullName != null && o.FullName.StartsWith(JSObjectsTypeNamePrefix) && typeof(JSObject).IsAssignableFrom(o)).ToList(); 34 | base.OnInitialized(); 35 | } 36 | 37 | protected override void OnParametersSet() 38 | { 39 | Type = JSObjectTypes.Where(o => o.FullName != null && o.FullName.Equals($"{JSObjectsTypeNamePrefix}{Name}", StringComparison.OrdinalIgnoreCase)).FirstOrDefault(); 40 | base.OnParametersSet(); 41 | } 42 | 43 | string JSObjectInfoHref(Type type) 44 | { 45 | var name = JSObjectShortName(type); 46 | return $"JSObjectTypeInfo/{name}"; 47 | } 48 | string JSObjectShortName(Type type) 49 | { 50 | return type == null || type.FullName == null || !type.FullName.StartsWith(JSObjectsTypeNamePrefix) ? "" : type.FullName.Substring(JSObjectsTypeNamePrefix.Length); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/WebAPI/GamepadExample.razor: -------------------------------------------------------------------------------- 1 | @page "/GamepadExample" 2 | @implements IDisposable 3 | @using System.Timers 4 | @using Timer = System.Timers.Timer 5 | 6 |

Gamepad API

7 |
8 | Connect a Gamepad 9 |
10 |
11 | @if (gamepads != null) 12 | { 13 | foreach (var gamepad in gamepads) 14 | { 15 | if (gamepad == null) continue; 16 | 17 | } 18 | } 19 |
20 | 21 | @code { 22 | [Inject] 23 | BlazorJSRuntime JS { get; set; } 24 | Window? window = null; 25 | Navigator? navigator = null; 26 | Timer? pollTimer = null; 27 | Gamepad[]? gamepads = null; 28 | 29 | protected override void OnInitialized() 30 | { 31 | if (navigator == null) 32 | { 33 | navigator = JS.Get("navigator"); 34 | window = JS.Get("window"); 35 | window.OnGamepadConnected += Window_OnGamepadConnected; 36 | window.OnGamepadDisconnected += Window_OnGamepadDisconnected; 37 | pollTimer = new Timer(); 38 | pollTimer.Elapsed += PollTimer_Elapsed; 39 | pollTimer.Interval = 100; 40 | pollTimer.Enabled = true; 41 | UpdateGamepadData(); 42 | } 43 | } 44 | void UpdateGamepadData() 45 | { 46 | gamepads = navigator!.GetGamepads(); 47 | StateHasChanged(); 48 | } 49 | void PollTimer_Elapsed(object? sender, ElapsedEventArgs e) 50 | { 51 | UpdateGamepadData(); 52 | } 53 | void Window_OnGamepadConnected(GamepadEvent gamepadEvent) 54 | { 55 | UpdateGamepadData(); 56 | } 57 | void Window_OnGamepadDisconnected(GamepadEvent gamepadEvent) 58 | { 59 | UpdateGamepadData(); 60 | } 61 | public void Dispose() 62 | { 63 | pollTimer?.Dispose(); 64 | if (window != null) 65 | { 66 | window.OnGamepadConnected -= Window_OnGamepadConnected; 67 | window.OnGamepadDisconnected -= Window_OnGamepadDisconnected; 68 | window.Dispose(); 69 | } 70 | navigator?.Dispose(); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/UnitTests/FileSystemAPIService.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.Blazor.UnitTesting; 2 | using SpawnDev.BlazorJS.JSObjects; 3 | 4 | namespace SpawnDev.BlazorJS.Test.UnitTests 5 | { 6 | public class FileSystemAPIService 7 | { 8 | BlazorJSRuntime JS; 9 | public FileSystemAPIService(BlazorJSRuntime js) 10 | { 11 | JS = js; 12 | } 13 | [TestMethod] 14 | public async Task StorageManagerExample() 15 | { 16 | if (!StorageManager.Supported) 17 | { 18 | throw new Exception("StorageManager not supported by browser. Expected failure."); 19 | } 20 | // storage 21 | using var storage = JS.Get("navigator.storage"); 22 | using var storageDir = await storage.GetDirectory(); 23 | // fruitFile 24 | using var fruitFile = await storageDir.GetFileHandle("fruit.txt", true); 25 | // some browsers (like Safari 18) support StorageManager and FileSystemFileHandle but only partially 26 | if (fruitFile.JSRef!.IsUndefined("createWritable")) 27 | { 28 | throw new Exception("FileSystemFileHandle.createWritable not supported by browser. Expected failure."); 29 | } 30 | //if (!fruitFile.JSRef!.In("createWritable")) 31 | //{ 32 | // throw new Exception("FileSystemFileHandle.createWritable not supported by browser. Expected failure."); 33 | //} 34 | using var fruitFileStream = await fruitFile.CreateWritable(); 35 | await fruitFileStream.Truncate(0); 36 | await fruitFileStream.Write("Hello apples!"); 37 | fruitFileStream.Close(); 38 | // vegFile 39 | using var vegFile = await storageDir.GetFileHandle("vegetable.txt", true); 40 | using var vegFileStream = await vegFile.CreateWritable(); 41 | await vegFileStream.Truncate(0); 42 | await vegFileStream.Write("Hello carrots!"); 43 | vegFileStream.Close(); 44 | // list dir contents 45 | JS.Set("_storageDir", storageDir); 46 | var entries = await storageDir.ValuesList(); 47 | 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-swift.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \n\r\t\v\f\0]+/,null," \n\r\t\v\f\x00"],["str",/^"(?:[^"\\]|(?:\\.)|(?:\\\((?:[^"\\)]|\\.)*\)))*"/,null,'"']],[["lit",/^(?:(?:0x[\da-fA-F][\da-fA-F_]*\.[\da-fA-F][\da-fA-F_]*[pP]?)|(?:\d[\d_]*\.\d[\d_]*[eE]?))[+-]?\d[\d_]*/,null],["lit",/^-?(?:(?:0(?:(?:b[01][01_]*)|(?:o[0-7][0-7_]*)|(?:x[\da-fA-F][\da-fA-F_]*)))|(?:\d[\d_]*))/,null],["lit",/^(?:_|Any|true|false|nil)\b/,null],["kwd",/^\b(?:__COLUMN__|__FILE__|__FUNCTION__|__LINE__|#available|#colorLiteral|#column|#else|#elseif|#endif|#file|#fileLiteral|#function|#if|#imageLiteral|#line|#selector|#sourceLocation|arch|arm|arm64|associatedtype|associativity|as|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|dynamicType|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|import|indirect|infix|init|inout|internal|i386|if|in|iOS|iOSApplicationExtension|is|lazy|left|let|mutating|none|nonmutating|open|operator|optional|OSX|OSXApplicationExtension|override|postfix|precedence|prefix|private|protocol|Protocol|public|repeat|required|rethrows|return|right|safe|Self|self|set|static|struct|subscript|super|switch|throw|throws|try|Type|typealias|unowned|unsafe|var|weak|watchOS|where|while|willSet|x86_64)\b/, 18 | null],["com",/^\/\/.*?[\n\r]/,null],["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null],["pun",/^<<=|<=|<<|>>=|>=|>>|===|==|\.\.\.|&&=|\.\.<|!==|!=|&=|~=|~|\(|\)|\[|\]|{|}|@|#|;|\.|,|:|\|\|=|\?\?|\|\||&&|&\*|&\+|&-|&=|\+=|-=|\/=|\*=|\^=|%=|\|=|->|`|==|\+\+|--|\/|\+|!|\*|%|<|>|&|\||\^|\?|=|-|_/,null],["typ",/^\b(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null]]),["swift"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-rust.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2015 Chris Morgan 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([],[["pln",/^[\t\n\r \xA0]+/],["com",/^\/\/.*/],["com",/^\/\*[\s\S]*?(?:\*\/|$)/],["str",/^b"(?:[^\\]|\\(?:.|x[\da-fA-F]{2}))*?"/],["str",/^"(?:[^\\]|\\(?:.|x[\da-fA-F]{2}|u\{\[\da-fA-F]{1,6}\}))*?"/],["str",/^b?r(#*)\"[\s\S]*?\"\1/],["str",/^b'([^\\]|\\(.|x[\da-fA-F]{2}))'/],["str",/^'([^\\]|\\(.|x[\da-fA-F]{2}|u\{[\da-fA-F]{1,6}\}))'/],["tag",/^'\w+?\b/],["kwd",/^(?:match|if|else|as|break|box|continue|extern|fn|for|in|if|impl|let|loop|pub|return|super|unsafe|where|while|use|mod|trait|struct|enum|type|move|mut|ref|static|const|crate)\b/], 18 | ["kwd",/^(?:alignof|become|do|offsetof|priv|pure|sizeof|typeof|unsized|yield|abstract|virtual|final|override|macro)\b/],["typ",/^(?:[iu](8|16|32|64|128|size)|char|bool|f32|f64|str|Self)\b/],["typ",/^(?:Copy|Send|Sized|Sync|Drop|Fn|FnMut|FnOnce|Box|ToOwned|Clone|PartialEq|PartialOrd|Eq|Ord|AsRef|AsMut|Into|From|Default|Iterator|Extend|IntoIterator|DoubleEndedIterator|ExactSizeIterator|Option|Some|None|Result|Ok|Err|SliceConcatExt|String|ToString|Vec)\b/],["lit",/^(self|true|false|null)\b/], 19 | ["lit",/^\d[0-9_]*(?:[iu](?:size|8|16|32|64|128))?/],["lit",/^0x[a-fA-F0-9_]+(?:[iu](?:size|8|16|32|64|128))?/],["lit",/^0o[0-7_]+(?:[iu](?:size|8|16|32|64|128))?/],["lit",/^0b[01_]+(?:[iu](?:size|8|16|32|64|128))?/],["lit",/^\d[0-9_]*\.(?![^\s\d.])/],["lit",/^\d[0-9_]*(?:\.\d[0-9_]*)(?:[eE][+-]?[0-9_]+)?(?:f32|f64)?/],["lit",/^\d[0-9_]*(?:\.\d[0-9_]*)?(?:[eE][+-]?[0-9_]+)(?:f32|f64)?/],["lit",/^\d[0-9_]*(?:\.\d[0-9_]*)?(?:[eE][+-]?[0-9_]+)?(?:f32|f64)/], 20 | ["atn",/^[a-z_]\w*!/i],["pln",/^[a-z_]\w*/i],["atv",/^#!?\[[\s\S]*?\]/],["pun",/^[+\-/*=^&|!<>%[\](){}?:.,;]/],["pln",/./]]),["rust"]); 21 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/SpawnDev.BlazorJS.Test.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | false 8 | 9 | 10 | 11 | partial 12 | false 13 | false 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 48 | true 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/_publish.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | @echo Tutorial on setting up an https static host on AWS with custom domain name 3 | @echo https://www.stormit.cloud/blog/setup-an-amazon-cloudfront-distribution-with-ssl-custom-domain-and-s3/ 4 | echo All paths used are relative the project folder 5 | set projectPath=%~dp0 6 | set projectCSProjFileName=%projectPath%\SpawnDev.BlazorJS.Test.csproj 7 | set publishFolder=%~dp0bin\Publish 8 | set publishFolderRoot=%publishFolder%\wwwroot 9 | set publishFrameworkFolder=%publishFolderRoot%\_framework 10 | set publishFrameworkFolderCompat=%publishFolderRoot%\_frameworkCompat 11 | set publishCompatFolder=%~dp0bin\PublishCompat 12 | set publishCompatFolderRoot=%publishCompatFolder%\wwwroot 13 | set publishCompatFrameworkFolder=%publishCompatFolderRoot%\_framework 14 | set awsBucket=blazorjs.spawndev.com 15 | set distroId=EMBSO45DEQI30 16 | @echo on 17 | 18 | @echo Make sure javascript files are marked as application/javascript files and not text/plain 19 | @echo Fix registry setting everytime because Window's update may overwrite it. 20 | @REG ADD HKCU\Software\Classes\.js /v "Content Type" /t REG_SZ /d "application/javascript" /f 21 | @echo Must be ran in cmd instance for rmdir to work (PowerShell rmdir is different) 22 | 23 | REM https://github.com/dotnet/runtime/issues/78872 24 | 25 | REM SIMD enabled build 26 | rmdir /Q /S "%publishFolder%" 27 | dotnet publish --nologo --configuration Release "%projectCSProjFileName%" -p:WasmEnableSIMD=true -p:BlazorWebAssemblyJiterpreter=true --output "%publishFolder%" 28 | 29 | REM SIMD disabled build 30 | REM Compat build could also use -p:WasmEnableExceptionHandling=false but WasmException handling is more common than SIMD 31 | rmdir /Q /S "%publishCompatFolder%" 32 | dotnet publish --nologo --no-restore --configuration Release "%projectCSProjFileName%" -p:WasmEnableExceptionHandling=false -p:WasmEnableSIMD=false -p:BlazorWebAssemblyJiterpreter=false --output "%publishCompatFolder%" 33 | 34 | @echo Copying compat build 35 | xcopy /I /E /Y "%publishCompatFrameworkFolder%" "%publishFrameworkFolderCompat%" 36 | 37 | echo Ready to upload (press any key to continue or Ctrl-C to cancel) 38 | pause 39 | @IF NOT [%awsBucket%] == [] ( 40 | aws s3 rm s3://%awsBucket% --recursive 41 | aws s3 sync "%publishFolderRoot%\." s3://%awsBucket% 42 | @IF NOT [%distroId%] == [] ( 43 | aws cloudfront create-invalidation --distribution-id %distroId% --paths "/*" 44 | ) 45 | ) 46 | @pause 47 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-sql.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2008 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],["kwd",/^(?:ADD|ALL|ALTER|AND|ANY|APPLY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONNECT|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOLLOWING|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|MATCH|MATCHED|MERGE|NATURAL|NATIONAL|NOCHECK|NONCLUSTERED|NOCYCLE|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PARTITION|PERCENT|PIVOT|PLAN|PRECEDING|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|ROWS?|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|START|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNBOUNDED|UNION|UNIQUE|UNPIVOT|UPDATE|UPDATETEXT|USE|USER|USING|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WITHIN|WRITETEXT|XML)(?=[^\w-]|$)/i, 18 | null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_][\w-]*/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]]),["sql"]); 19 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-vb.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\r\n_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, 18 | null],["com",/^REM\b[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb", 19 | "vbs"]); 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-vbs.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2009 Google Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\r\n_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, 18 | null],["com",/^REM\b[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb", 19 | "vbs"]); 20 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/AnalysisReview.razor: -------------------------------------------------------------------------------- 1 | @* @page "/analysis/{TypeName?}" 2 | 3 | @using SpawnDev.BlazorJS.Diagnostics; 4 | @using SpawnDev.BlazorJS; 5 | @using SpawnDev.BlazorJS.JSObjects; 6 | @using System.Reflection; 7 | @implements IDisposable 8 | 9 |

Analysis Review

10 |
11 |
12 | @if (isInitializing) 13 | { 14 |
15 | Analyzing all Javascript global object types to determine API coverage. Please wait. 16 |
17 | } 18 | else 19 | { 20 | var total = JSObjectAnalyzer.Analyzed.Values.Count(); 21 | var jsobjectsExistCount = JSObjectAnalyzer.Analyzed.Values.Where(o => GetJSObjectTypeByName(o.InstanceOf!) != null).Count(); 22 | var percent = total == 0 ? 0 : (float)jsobjectsExistCount / (float)total; 23 | var percentStr = $"{Math.Round(percent * 100f)}%"; 24 |
25 | Coverage: @jsobjectsExistCount of @total (@percentStr)
Javascript types found. 26 |
27 |
28 | * Indicates the type exists
in SpawnDev.BlazorJS.JSObjects 29 |
30 | @foreach (var jsoi in JSObjectAnalyzer.Analyzed.Values.OrderBy(o => o.InstanceOf)) 31 | { 32 | var jsObjectType = GetJSObjectTypeByName(jsoi.InstanceOf!); 33 | var navLink = $"analysis/{jsoi.InstanceOf}"; 34 |
35 | @jsoi.InstanceOf @(jsObjectType == null ? "" : "*") 36 |
37 | } } 38 |
39 |
40 | @if (isInitializing) 41 | { 42 | 43 | } 44 | else if (TypeName == null) 45 | { 46 |
47 | Select a type to analyze. 48 |
49 | } 50 | else 51 | { 52 |
53 |

@TypeName

54 |
55 | JSObject properties, methods, and events will be detected with as much accuracy as possible based on current values. Many types will need to be set manually due to the dynamic typing of Javascript. 56 |
57 |
58 | @((MarkupString)_markup) 59 |
60 |
61 | } 62 |
63 |
64 | 65 | *@ -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/wasm-feature-detect.1.5.1.js: -------------------------------------------------------------------------------- 1 | !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):(e="undefined"!=typeof globalThis?globalThis:e||self).wasmFeatureDetect=a()}(this,(function(){"use strict";return{bigInt:()=>(async e=>{try{return(await WebAssembly.instantiate(e)).instance.exports.b(BigInt(0))===BigInt(0)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,126,1,126,3,2,1,0,7,5,1,1,98,0,0,10,6,1,4,0,32,0,11])),bulkMemory:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),exceptions:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),extendedConst:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,5,3,1,0,1,11,9,1,0,65,1,65,2,106,11,0])),gc:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,10,2,95,1,125,0,96,0,1,107,0,3,2,1,1,10,12,1,10,0,67,0,0,0,0,251,7,0,11])),memory64:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,5,3,1,4,1])),multiValue:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11])),mutableGlobals:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),referenceTypes:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),relaxedSimd:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,15,1,13,0,65,1,253,15,65,2,253,15,253,128,2,11])),saturatedFloatToInt:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),signExtensions:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),simd:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),streamingCompilation:()=>(async()=>"compileStreaming"in WebAssembly)(),tailCall:async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11])),threads:()=>(async e=>{try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}})); 2 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Diagnostics/JSPropertyInfo.cs: -------------------------------------------------------------------------------- 1 | using SpawnDev.BlazorJS.JSObjects; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Text.Json.Serialization; 7 | using System.Threading.Tasks; 8 | 9 | namespace SpawnDev.BlazorJS.Diagnostics 10 | { 11 | public class JSPropertyInfo 12 | { 13 | public Dictionary JSProperties { get; set; } 14 | public Dictionary> Inheritance { get; set; } = new Dictionary>(); 15 | //public string JSPropNamesHash { get; set; } 16 | public string? InstanceOf { get; set; } //=> Inheritance.Count == 0 ? null : Inheritance.Keys.FirstOrDefault(); 17 | public string? InheritsFrom { get; set; } // => Inheritance.Count < 2 ? null : Inheritance.Keys.ElementAt(1); 18 | public int FunctionLength { get; set; } 19 | public bool FullAnalysis { get; set; } 20 | /// 21 | /// Property name 22 | /// 23 | public string Name { get; set; } = ""; 24 | /// 25 | /// typeof property 26 | /// 27 | public string TypeOf { get; set; } 28 | public bool IsFunction => TypeOf == "function"; 29 | //public PropertyDescriptor? Descriptor { get; set; } 30 | 31 | } 32 | //public class JSPropertyInfo 33 | //{ 34 | // /// 35 | // /// Property name 36 | // /// 37 | // public string Name { get; set; } = ""; 38 | // /// 39 | // /// typeof property 40 | // /// 41 | // public string TypeOf { get; set; } 42 | // /// 43 | // /// property.constructor.name 44 | // /// 45 | // public string? InstanceOf { get; set; } 46 | // ///// 47 | // ///// Handle to object if an object 48 | // ///// 49 | // //public JSObject? JSObject { get; set; } 50 | // /// 51 | // /// The PropertyDescriptor of the property (if one) 52 | // /// 53 | // public PropertyDescriptor? Descriptor { get; set; } 54 | // /// 55 | // /// If this property is a function, this is the number of arguments it takes (may not be accurate) 56 | // /// 57 | // public int FunctionLength { get; set; } 58 | 59 | // public JSObjectAnalysisResult? ObjectAnalysisResult { get; set; } 60 | //} 61 | } 62 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/WebAPI/GeolocationExample.razor: -------------------------------------------------------------------------------- 1 | @page "/GeolocationExample" 2 | @implements IDisposable 3 | 4 |

GeoLocation

5 | 6 |
7 | Status: @status 8 |
9 |
10 | Location: @location 11 |
12 |
13 | 14 |
15 |
16 | 17 | 18 |
19 | 20 | @code { 21 | [Inject] 22 | BlazorJSRuntime JS { get; set; } = default!; 23 | 24 | bool watching => watchHandle?.Watching ?? false; 25 | string status = ""; 26 | string location = ""; 27 | bool supported = false; 28 | Geolocation? geolocation = null; 29 | GeolocationPosition? position = null; 30 | GeolocationWatchHandle? watchHandle = null; 31 | // optional config 32 | GeolocationOptions geolocationOptions = new GeolocationOptions 33 | { 34 | //EnableHighAccuracy = true, 35 | }; 36 | void StartWatching() 37 | { 38 | if (geolocation == null || watchHandle != null) return; 39 | watchHandle = geolocation.WatchPosition(OnPositionUpdate, OnPositionError, geolocationOptions); 40 | } 41 | void StopWatching() 42 | { 43 | watchHandle?.Dispose(); 44 | watchHandle = null; 45 | } 46 | protected override void OnAfterRender(bool firstRender) 47 | { 48 | if (firstRender) 49 | { 50 | using var navigator = JS.Get("navigator"); 51 | geolocation = navigator.Geolocation; 52 | supported = geolocation != null; 53 | status = supported ? "Geolocation API is supported" : "Geolocation API is not supported"; 54 | StateHasChanged(); 55 | } 56 | } 57 | void OnPositionUpdate(GeolocationPosition pos) 58 | { 59 | position = pos; 60 | status = "Location updated: " + DateTime.Now; 61 | location = $"Latitude: {position?.Coords?.Latitude} Longitude: {position?.Coords?.Longitude}"; 62 | StateHasChanged(); 63 | } 64 | void OnPositionError(GeolocationPositionError error) 65 | { 66 | status = "Location update failed: " + DateTime.Now + " " + error.Message; 67 | StateHasChanged(); 68 | } 69 | void GetCurrentPosition() 70 | { 71 | if (geolocation == null) return; 72 | geolocation.GetCurrentPosition(OnPositionUpdate, OnPositionError, geolocationOptions); 73 | } 74 | public void Dispose() 75 | { 76 | watchHandle?.Dispose(); 77 | geolocation?.Dispose(); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.Web; 2 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 3 | using Radzen; 4 | using SpawnDev.BlazorJS; 5 | using SpawnDev.BlazorJS.JSObjects; 6 | using SpawnDev.BlazorJS.JsonConverters; 7 | using SpawnDev.BlazorJS.Test; 8 | using SpawnDev.BlazorJS.Test.Services; 9 | using SpawnDev.BlazorJS.Test.UnitTests; 10 | using SpawnDev.BlazorJS.Toolbox; 11 | using SpawnDev.BlazorJS.WebWorkers; 12 | 13 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 14 | 15 | HybridObjectConverterFactory.Verbose = false; 16 | // Add SpawnDev.BlazorJS.BlazorJSRuntime 17 | builder.Services.AddBlazorJSRuntime(out var JS); 18 | // Add SpawnDev.BlazorJS.WebWorkers.WebWorkerService 19 | builder.Services.AddWebWorkerService(WebWorkerService => 20 | { 21 | WebWorkerService.TaskPool.MaxPoolSize = WebWorkerService.MaxWorkerCount; 22 | //WebWorkerService.TaskPool.PoolSize = WebWorkerService.MaxWorkerCount; 23 | }); 24 | 25 | // Add services 26 | builder.Services.AddScoped((sp) => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 27 | 28 | builder.Services.AddKeyedSingleton("apples", (_, key) => new TestService2((string)key!)); 29 | builder.Services.AddKeyedSingleton("bananas", (_, key) => new TestService2((string)key!)); 30 | 31 | // The below service is used to test CallDispatcher used with WebWorkers (Used in UnitTests) 32 | builder.Services.AddSingleton(); 33 | // More app specific services 34 | builder.Services.AddSingleton(builder.Configuration); // used to demo appsettings reading in workers 35 | builder.Services.AddSingleton(); 36 | builder.Services.AddSingleton(); 37 | // Add app services that will be called on the main thread and/or worker threads 38 | builder.Services.AddSingleton(); 39 | builder.Services.AddSingleton(); 40 | 41 | // Radzen UI services 42 | builder.Services.AddSingleton(); 43 | builder.Services.AddSingleton(); 44 | builder.Services.AddSingleton(); 45 | builder.Services.AddSingleton(); 46 | 47 | //builder.Services.AddSingleton(); 48 | 49 | builder.Services.AddSingleton(); 50 | 51 | builder.Services.AddSingleton(); 52 | // 53 | builder.RootComponents.Add("#app"); 54 | builder.RootComponents.Add("head::after"); 55 | 56 | #if DEBUG && true 57 | var host = builder.Build(); 58 | await host.StartBackgroundServices(); 59 | 60 | 61 | 62 | await host.BlazorJSRunAsync(); 63 | #else 64 | // build and Init using BlazorJSRunAsync (instead of RunAsync) 65 | await builder.Build().BlazorJSRunAsync(); 66 | #endif 67 | 68 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-ls.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Eric Knibbe 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\'[^\'\\]*(?:\\[\s\S][^\'\\]*)*(?:\'|$)/,null,"'"],["str",/^\"[^\"\\]*(?:\\[\s\S][^\"\\]*)*(?:\"|$)/,null,'"'],["str",/^\`[^\`]*(?:\`|$)/,null,"`"],["lit",/^0x[\da-f]+|\d+/i,null,"0123456789"],["atn",/^[#$][a-z_][\w.]*|#\d+\b|#![ \S]+lasso9\b/i,null,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|(no_square_brackets|noprocess)\b/i],["com", 18 | /^\/\/[^\r\n]*|\/\*[\s\S]*?\*\//],["atn",/^-(?!infinity)[a-z_][\w.]*|\.\s*'[a-z_][\w.]*'|\.{3}/i],["lit",/^\d*\.\d+(?:e[-+]?\d+)?|(infinity|NaN)\b/i],["atv",/^::\s*[a-z_][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i], 19 | ["kwd",/^(?:cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|fail_if|fail_ifnot|fail|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i], 20 | ["pln",/^[a-z_][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[-+*\/%=<>&|!?\\]+/]]),["lasso","ls","lassoscript"]); 21 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-lasso.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Eric Knibbe 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\'[^\'\\]*(?:\\[\s\S][^\'\\]*)*(?:\'|$)/,null,"'"],["str",/^\"[^\"\\]*(?:\\[\s\S][^\"\\]*)*(?:\"|$)/,null,'"'],["str",/^\`[^\`]*(?:\`|$)/,null,"`"],["lit",/^0x[\da-f]+|\d+/i,null,"0123456789"],["atn",/^[#$][a-z_][\w.]*|#\d+\b|#![ \S]+lasso9\b/i,null,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|(no_square_brackets|noprocess)\b/i],["com", 18 | /^\/\/[^\r\n]*|\/\*[\s\S]*?\*\//],["atn",/^-(?!infinity)[a-z_][\w.]*|\.\s*'[a-z_][\w.]*'|\.{3}/i],["lit",/^\d*\.\d+(?:e[-+]?\d+)?|(infinity|NaN)\b/i],["atv",/^::\s*[a-z_][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i], 19 | ["kwd",/^(?:cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|fail_if|fail_ifnot|fail|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i], 20 | ["pln",/^[a-z_][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[-+*\/%=<>&|!?\\]+/]]),["lasso","ls","lassoscript"]); 21 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/libs/google-code-prettify/lang-lassoscript.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright (C) 2013 Eric Knibbe 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | */ 17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\'[^\'\\]*(?:\\[\s\S][^\'\\]*)*(?:\'|$)/,null,"'"],["str",/^\"[^\"\\]*(?:\\[\s\S][^\"\\]*)*(?:\"|$)/,null,'"'],["str",/^\`[^\`]*(?:\`|$)/,null,"`"],["lit",/^0x[\da-f]+|\d+/i,null,"0123456789"],["atn",/^[#$][a-z_][\w.]*|#\d+\b|#![ \S]+lasso9\b/i,null,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|(no_square_brackets|noprocess)\b/i],["com", 18 | /^\/\/[^\r\n]*|\/\*[\s\S]*?\*\//],["atn",/^-(?!infinity)[a-z_][\w.]*|\.\s*'[a-z_][\w.]*'|\.{3}/i],["lit",/^\d*\.\d+(?:e[-+]?\d+)?|(infinity|NaN)\b/i],["atv",/^::\s*[a-z_][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i], 19 | ["kwd",/^(?:cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|fail_if|fail_ifnot|fail|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i], 20 | ["pln",/^[a-z_][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[-+*\/%=<>&|!?\\]+/]]),["lasso","ls","lassoscript"]); 21 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/tiny_face_detector_model-weights_manifest.json: -------------------------------------------------------------------------------- 1 | [{"weights":[{"name":"conv0/filters","shape":[3,3,3,16],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.009007044399485869,"min":-1.2069439495311063}},{"name":"conv0/bias","shape":[16],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.005263455241334205,"min":-0.9211046672334858}},{"name":"conv1/depthwise_filter","shape":[3,3,16,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.004001977630690033,"min":-0.5042491814669441}},{"name":"conv1/pointwise_filter","shape":[1,1,16,32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.013836609615999109,"min":-1.411334180831909}},{"name":"conv1/bias","shape":[32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0015159862590771096,"min":-0.30926119685173037}},{"name":"conv2/depthwise_filter","shape":[3,3,32,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.002666276225856706,"min":-0.317286870876948}},{"name":"conv2/pointwise_filter","shape":[1,1,32,64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.015265831292844286,"min":-1.6792414422128714}},{"name":"conv2/bias","shape":[64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0020280554598453,"min":-0.37113414915168985}},{"name":"conv3/depthwise_filter","shape":[3,3,64,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006100742489683862,"min":-0.8907084034938438}},{"name":"conv3/pointwise_filter","shape":[1,1,64,128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.016276211832083907,"min":-2.0508026908425725}},{"name":"conv3/bias","shape":[128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.003394414279975143,"min":-0.7637432129944072}},{"name":"conv4/depthwise_filter","shape":[3,3,128,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006716050119961009,"min":-0.8059260143953211}},{"name":"conv4/pointwise_filter","shape":[1,1,128,256],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.021875603993733724,"min":-2.8875797271728514}},{"name":"conv4/bias","shape":[256],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0041141652009066415,"min":-0.8187188749804216}},{"name":"conv5/depthwise_filter","shape":[3,3,256,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.008423839597141042,"min":-0.9013508368940915}},{"name":"conv5/pointwise_filter","shape":[1,1,256,512],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.030007277283014035,"min":-3.8709387695088107}},{"name":"conv5/bias","shape":[512],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.008402082966823203,"min":-1.4871686851277068}},{"name":"conv8/filters","shape":[1,1,512,25],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.028336129469030042,"min":-4.675461362389957}},{"name":"conv8/bias","shape":[25],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.002268134028303857,"min":-0.41053225912299807}}],"paths":["tiny_face_detector_model-shard1"]}] -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/ExceptionSerializer.cs: -------------------------------------------------------------------------------- 1 | //namespace SpawnDev.BlazorJS.WebWorkers 2 | //{ 3 | // /// 4 | // /// A simple serializer for exceptions that can be used to pass exceptions between window, service worker, dedicated worker, and shared worker contexts.
5 | // ///
6 | // public static class ExceptionSerializer1 7 | // { 8 | // /// 9 | // /// Contains types of exceptions that cannot be created via Activator.CreateInstance.
10 | // /// Helps to speed up deserialization by avoiding repeated attempts to create these types. 11 | // ///
12 | // static List UncreatableExceptionTypes = new List(); 13 | // /// 14 | // /// Serializes an exception to a string. 15 | // /// 16 | // /// 17 | // /// 18 | // public static string? Serialize(Exception? exception) 19 | // { 20 | // if (exception == null) return null; 21 | // // most of the time, Exceptions prefix the Exception type FullName to the ToString() return value but it is not required 22 | // // we add it here, but only if it is not already there 23 | // var exceptionString = exception.ToString(); 24 | // var typeNamePart = $"{exception.GetType().FullName}: "; 25 | // return exceptionString.StartsWith(typeNamePart) ? exceptionString : $"{typeNamePart}{exceptionString}"; 26 | // } 27 | // /// 28 | // /// Deserializes an exception from a serialized string. 29 | // /// 30 | // /// 31 | // /// 32 | // public static Exception? Deserialize(string? serializedException) 33 | // { 34 | // if (string.IsNullOrEmpty(serializedException)) return null; 35 | // var parts = serializedException.Split(new[] { ": " }, 2, StringSplitOptions.None); 36 | // if (parts.Length < 2) 37 | // { 38 | // return new Exception(serializedException); 39 | // } 40 | // var typeName = parts[0]; 41 | // var message = parts[1]; 42 | // if (UncreatableExceptionTypes.Contains(typeName)) 43 | // { 44 | // return new Exception(serializedException); 45 | // } 46 | // var exType = Type.GetType(typeName); 47 | // if (exType == null) 48 | // { 49 | // UncreatableExceptionTypes.Add(typeName); 50 | // return new Exception(serializedException); 51 | // } 52 | // try 53 | // { 54 | // return (Exception)Activator.CreateInstance(exType, message)!; 55 | // } 56 | // catch 57 | // { 58 | // UncreatableExceptionTypes.Add(typeName); 59 | // return new Exception(serializedException); 60 | // } 61 | // } 62 | // } 63 | //} 64 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/mtcnn_model-weights_manifest.json: -------------------------------------------------------------------------------- 1 | [{"paths":["mtcnn_model-shard1"],"weights":[{"dtype":"float32","name":"pnet/conv1/weights","shape":[3,3,3,10]},{"dtype":"float32","name":"pnet/conv1/bias","shape":[10]},{"dtype":"float32","name":"pnet/prelu1_alpha","shape":[10]},{"dtype":"float32","name":"pnet/conv2/weights","shape":[3,3,10,16]},{"dtype":"float32","name":"pnet/conv2/bias","shape":[16]},{"dtype":"float32","name":"pnet/prelu2_alpha","shape":[16]},{"dtype":"float32","name":"pnet/conv3/weights","shape":[3,3,16,32]},{"dtype":"float32","name":"pnet/conv3/bias","shape":[32]},{"dtype":"float32","name":"pnet/prelu3_alpha","shape":[32]},{"dtype":"float32","name":"pnet/conv4_1/weights","shape":[1,1,32,2]},{"dtype":"float32","name":"pnet/conv4_1/bias","shape":[2]},{"dtype":"float32","name":"pnet/conv4_2/weights","shape":[1,1,32,4]},{"dtype":"float32","name":"pnet/conv4_2/bias","shape":[4]},{"dtype":"float32","name":"rnet/conv1/weights","shape":[3,3,3,28]},{"dtype":"float32","name":"rnet/conv1/bias","shape":[28]},{"dtype":"float32","name":"rnet/prelu1_alpha","shape":[28]},{"dtype":"float32","name":"rnet/conv2/weights","shape":[3,3,28,48]},{"dtype":"float32","name":"rnet/conv2/bias","shape":[48]},{"dtype":"float32","name":"rnet/prelu2_alpha","shape":[48]},{"dtype":"float32","name":"rnet/conv3/weights","shape":[2,2,48,64]},{"dtype":"float32","name":"rnet/conv3/bias","shape":[64]},{"dtype":"float32","name":"rnet/prelu3_alpha","shape":[64]},{"dtype":"float32","name":"rnet/fc1/weights","shape":[576,128]},{"dtype":"float32","name":"rnet/fc1/bias","shape":[128]},{"dtype":"float32","name":"rnet/prelu4_alpha","shape":[128]},{"dtype":"float32","name":"rnet/fc2_1/weights","shape":[128,2]},{"dtype":"float32","name":"rnet/fc2_1/bias","shape":[2]},{"dtype":"float32","name":"rnet/fc2_2/weights","shape":[128,4]},{"dtype":"float32","name":"rnet/fc2_2/bias","shape":[4]},{"dtype":"float32","name":"onet/conv1/weights","shape":[3,3,3,32]},{"dtype":"float32","name":"onet/conv1/bias","shape":[32]},{"dtype":"float32","name":"onet/prelu1_alpha","shape":[32]},{"dtype":"float32","name":"onet/conv2/weights","shape":[3,3,32,64]},{"dtype":"float32","name":"onet/conv2/bias","shape":[64]},{"dtype":"float32","name":"onet/prelu2_alpha","shape":[64]},{"dtype":"float32","name":"onet/conv3/weights","shape":[3,3,64,64]},{"dtype":"float32","name":"onet/conv3/bias","shape":[64]},{"dtype":"float32","name":"onet/prelu3_alpha","shape":[64]},{"dtype":"float32","name":"onet/conv4/weights","shape":[2,2,64,128]},{"dtype":"float32","name":"onet/conv4/bias","shape":[128]},{"dtype":"float32","name":"onet/prelu4_alpha","shape":[128]},{"dtype":"float32","name":"onet/fc1/weights","shape":[1152,256]},{"dtype":"float32","name":"onet/fc1/bias","shape":[256]},{"dtype":"float32","name":"onet/prelu5_alpha","shape":[256]},{"dtype":"float32","name":"onet/fc2_1/weights","shape":[256,2]},{"dtype":"float32","name":"onet/fc2_1/bias","shape":[2]},{"dtype":"float32","name":"onet/fc2_2/weights","shape":[256,4]},{"dtype":"float32","name":"onet/fc2_2/bias","shape":[4]},{"dtype":"float32","name":"onet/fc2_3/weights","shape":[256,10]},{"dtype":"float32","name":"onet/fc2_3/bias","shape":[10]}]}] -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/SystemInfo.razor: -------------------------------------------------------------------------------- 1 | @page "/SystemInfo" 2 | @using SpawnDev.BlazorJS.Toolbox 3 | 4 |
5 |

System Info

6 |
7 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | @* *@ 25 | @* 26 | 27 | 28 | *@ 29 | 30 | 31 | 32 | 33 |
@JS.FrameworkVersion.Net
@JS.InformationalVersionSpawnDev.BlazorJS
@(Math.Round(TimeSpan.FromMilliseconds(JS.ReadyTime).TotalSeconds, 1))sStartup time
@(JS.Get("navigator").HardwareConcurrency?.ToString() ?? "?")HardwareConcurrency
@(JS.CrossOriginIsolated == null ? "?" : (JS.CrossOriginIsolated == true ? "✔" : "❌"))CrossOriginIsolated
@(SIMDSupported ? "✔" : "❌")Browser Simd
@(System.Runtime.Intrinsics.Wasm.PackedSimd.IsSupported ? "✔" : "❌")PackedSimd
@(System.Runtime.Intrinsics.Vector64.IsHardwareAccelerated ? "✔" : "❌")Vector64
@(System.Runtime.Intrinsics.Vector128.IsHardwareAccelerated ? "✔" : "❌")Vector128
@(System.Runtime.Intrinsics.Vector256.IsHardwareAccelerated ? "✔" : "❌")Vector256
@(System.Runtime.Intrinsics.Vector512.IsHardwareAccelerated ? "✔" : "❌")Vector512
@(!JS.IsUndefined(nameof(Worker)) ? "✔" : "❌")Worker
@(!JS.IsUndefined(nameof(SharedWorker)) ? "✔" : "❌")SharedWorker
@(!JS.IsUndefined(nameof(SharedArrayBuffer)) ? "✔" : "❌")SharedArrayBuffer
34 |
35 |
36 | @code { 37 | [Inject] 38 | BlazorJSRuntime JS { get; set; } 39 | 40 | bool SIMDSupported = false; 41 | 42 | protected override async Task OnInitializedAsync() 43 | { 44 | SIMDSupported = await JS.CallAsync("wasmFeatureDetect.simd"); 45 | await base.OnInitializedAsync(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/SharedWebWorkerCalculatePiDemo.razor: -------------------------------------------------------------------------------- 1 | @page "/SharedWebWorker" 2 | @inject WebWorkerService webWorkerService 3 | @inject IMathsService mathsService 4 | 5 | SharedWebWorker 6 | 7 | 8 | 9 |
10 |
11 |

Demo

12 |

13 | Calculate Pi to N decimal places
14 |
15 |

16 |
While processing PI without a worker the main thread will be unresponsive
17 |

18 |
While processing PI with a worker the main thread will stay responsive
19 |

20 |
21 | Output: 22 |
23 |
24 |             @output
25 |         
26 |
27 |
28 | @code { 29 | int piDecimalPlaces = 3000; 30 | int piProgress = 0; 31 | string output = ""; 32 | SharedWebWorker? webWorker; 33 | string? canDisposeWorker => webWorker != null ? null : "disabled"; 34 | string? RunDisabled => Running ? "disabled" : null; 35 | string? WorkerDisabled => Running || !supported ? "disabled" : null; 36 | bool supported => webWorkerService != null && webWorkerService.SharedWebWorkerSupported; 37 | bool Running = false; 38 | 39 | string rn = Environment.NewLine; 40 | 41 | async Task OnWithoutThreadClicked() { 42 | Running = true; 43 | StateHasChanged(); 44 | var result = await mathsService.CalculatePi(piDecimalPlaces); 45 | output += $"{rn}{LogDate()} EstimatePI({piDecimalPlaces}) = {result}"; 46 | Running = false; 47 | StateHasChanged(); 48 | } 49 | 50 | async Task OnWithThreadClicked() { 51 | Running = true; 52 | StateHasChanged(); 53 | if (webWorker == null) webWorker = await webWorkerService.GetSharedWebWorker(); 54 | var mathsServiceWorker = webWorker.GetService(); 55 | var result = await mathsServiceWorker.CalculatePiWithActionProgress(piDecimalPlaces, new Action((i) => { 56 | piProgress = i; 57 | StateHasChanged(); 58 | })); 59 | output += $"{rn}{LogDate()} EstimatePI({piDecimalPlaces}) = {result}"; 60 | Running = false; 61 | StateHasChanged(); 62 | } 63 | 64 | public void OnDisposeWorker() { 65 | webWorker?.Dispose(); 66 | webWorker = null; 67 | Running = false; 68 | } 69 | 70 | private string LogDate() { 71 | return DateTime.Now.ToString("HH:mm:ss:fff"); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/WebWorkerCalculatePiDemo.razor: -------------------------------------------------------------------------------- 1 | @page "/WebWorker" 2 | @inject WebWorkerService webWorkerService 3 | @inject IMathsService mathsService 4 | 5 | WebWorker 6 | 7 | 8 | 9 |
10 |
11 |

Demo

12 |

13 | Calculate Pi to N decimal places
14 |
15 |

16 |
While processing PI without a worker the main thread will be unresponsive
17 |

18 |
While processing PI with a worker the main thread will stay responsive
19 |

20 |
21 | Output: 22 |
23 |
24 |             @output
25 |         
26 |
27 |
28 | @code { 29 | int piDecimalPlaces = 3000; 30 | int piProgress = 0; 31 | string output = ""; 32 | WebWorker? webWorker; 33 | string? canDisposeWorker => webWorker != null ? null : "disabled"; 34 | string? RunDisabled => Running ? "disabled" : null; 35 | string? WorkerDisabled => Running || !supported ? "disabled" : null; 36 | bool supported => webWorkerService != null && webWorkerService.SharedWebWorkerSupported; 37 | bool Running = false; 38 | 39 | string rn = Environment.NewLine; 40 | 41 | async Task OnWithoutThreadClicked() 42 | { 43 | Running = true; 44 | StateHasChanged(); 45 | var result = await mathsService.CalculatePi(piDecimalPlaces); 46 | output += $"{rn}{LogDate()} EstimatePI({piDecimalPlaces}) = {result}"; 47 | Running = false; 48 | StateHasChanged(); 49 | } 50 | 51 | async Task OnWithThreadClicked() 52 | { 53 | Running = true; 54 | StateHasChanged(); 55 | if (webWorker == null) webWorker = await webWorkerService.GetWebWorker(); 56 | var mathsServiceWorker = webWorker.GetService(); 57 | var result = await mathsServiceWorker.CalculatePiWithActionProgress(piDecimalPlaces, new Action((i) => 58 | { 59 | piProgress = i; 60 | StateHasChanged(); 61 | })); 62 | output += $"{rn}{LogDate()} EstimatePI({piDecimalPlaces}) = {result}"; 63 | Running = false; 64 | StateHasChanged(); 65 | } 66 | 67 | public void OnDisposeWorker() 68 | { 69 | webWorker?.Dispose(); 70 | webWorker = null; 71 | Running = false; 72 | } 73 | 74 | private string LogDate() 75 | { 76 | return DateTime.Now.ToString("HH:mm:ss:fff"); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/WebAPI/HTMLVideoElementExample.razor: -------------------------------------------------------------------------------- 1 | @page "/HTMLVideoElementExample" 2 | @implements IDisposable 3 | 4 |
5 | 6 |
7 |
8 | Source: @videoName 9 |
10 |
11 | Duration: @duration.ToString() 12 |
13 |
14 | Metadata: @metadata 15 |
16 |
17 | @foreach (var video in videos) 18 | { 19 | 20 | } 21 |
22 |
23 |     @((MarkupString)log)
24 | 
25 | 26 | @code { 27 | [Inject] 28 | BlazorJSRuntime JS { get; set; } 29 | ElementReference? videoElRef; 30 | HTMLVideoElement? videoEl = null; 31 | TimeSpan duration = TimeSpan.Zero; 32 | string videoName = ""; 33 | string metadata = ""; 34 | string log = ""; 35 | Dictionary videos = new Dictionary 36 | { 37 | { "Elephants Dream", "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" }, 38 | { "Big Buck Bunny", "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" }, 39 | { "Tears Of Steel", "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4" }, 40 | { "Sintel", "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4" }, 41 | { "None", "" }, 42 | }; 43 | protected override void OnAfterRender(bool firstRender) 44 | { 45 | if (firstRender) 46 | { 47 | videoEl = (HTMLVideoElement)videoElRef!; 48 | videoEl.OnLoadedMetadata += VideoEl_OnLoadedMetadata; 49 | videoEl.OnAbort += VideoEl_OnAbort; 50 | videoEl.OnError += VideoEl_OnError; 51 | videoEl.OnEmptied += VideoEl_OnEmptied; 52 | } 53 | } 54 | void SetSource(string name, string source) 55 | { 56 | if (videoEl == null) return; 57 | Log($"SetSource: {name}"); 58 | videoName = name; 59 | videoEl.Src = source; 60 | StateHasChanged(); 61 | } 62 | void VideoEl_OnLoadedMetadata() 63 | { 64 | Log("VideoEl_OnLoadedMetadata"); 65 | metadata = $"{videoEl!.VideoWidth}x{videoEl!.VideoHeight}"; 66 | duration = TimeSpan.FromSeconds(videoEl!.Duration ?? 0); 67 | StateHasChanged(); 68 | } 69 | void VideoEl_OnError() 70 | { 71 | Log("VideoEl_OnError"); 72 | } 73 | void VideoEl_OnEmptied() 74 | { 75 | Log("VideoEl_OnEmptied"); 76 | } 77 | void VideoEl_OnAbort() 78 | { 79 | Log("VideoEl_OnAbort"); 80 | metadata = $"{videoEl!.VideoWidth}x{videoEl!.VideoHeight}"; 81 | duration = TimeSpan.FromSeconds(videoEl!.Duration ?? 0); 82 | StateHasChanged(); 83 | } 84 | public void Dispose() 85 | { 86 | if (videoEl != null) 87 | { 88 | videoEl.OnLoadedMetadata -= VideoEl_OnLoadedMetadata; 89 | videoEl.OnAbort -= VideoEl_OnAbort; 90 | videoEl.OnError -= VideoEl_OnError; 91 | videoEl.Dispose(); 92 | videoEl = null; 93 | } 94 | } 95 | void Log(string message) 96 | { 97 | log += $"{message}
"; 98 | } 99 | } -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Shared/ConwayGameOfLife.razor: -------------------------------------------------------------------------------- 1 | @using SpawnDev.BlazorJS.Test.GameOfLife 2 |
3 |
4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 |
Population@GenerationStat.Population
Deaths@GenerationStat.Deaths
Babies@GenerationStat.Babies
Younglings@GenerationStat.Younglings
Adults@GenerationStat.Adults
Elders@GenerationStat.Elders
Generation@GenerationStat.Generation
Tick Cost@(Math.Round(GenerationStat.Elapsed.TotalMilliseconds)) ms
Draw Cost@(Math.Round(drawTime.TotalMilliseconds)) ms
Legend
Void
Baby
Youngling
Adult
Elder
Dead Under Population
Dead Over Population
77 | 78 | 79 | 80 | 81 |
82 |
83 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](https://github.com/iconic/open-iconic) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](https://github.com/iconic/open-iconic). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](https://github.com/iconic/open-iconic) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](https://github.com/iconic/open-iconic) and [Reference](https://github.com/iconic/open-iconic) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/wwwroot/weights/face_landmark_68_tiny_model-weights_manifest.json: -------------------------------------------------------------------------------- 1 | [{"weights":[{"name":"dense0/conv0/filters","shape":[3,3,3,32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.008194216092427571,"min":-0.9423348506291708}},{"name":"dense0/conv0/bias","shape":[32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006839508168837603,"min":-0.8412595047670252}},{"name":"dense0/conv1/depthwise_filter","shape":[3,3,32,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.009194007106855804,"min":-1.2779669878529567}},{"name":"dense0/conv1/pointwise_filter","shape":[1,1,32,32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0036026100317637128,"min":-0.3170296827952067}},{"name":"dense0/conv1/bias","shape":[32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.000740380117706224,"min":-0.06367269012273527}},{"name":"dense0/conv2/depthwise_filter","shape":[3,3,32,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":1,"min":0}},{"name":"dense0/conv2/pointwise_filter","shape":[1,1,32,32],"dtype":"float32","quantization":{"dtype":"uint8","scale":1,"min":0}},{"name":"dense0/conv2/bias","shape":[32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0037702228508743585,"min":-0.6220867703942692}},{"name":"dense1/conv0/depthwise_filter","shape":[3,3,32,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0033707996209462483,"min":-0.421349952618281}},{"name":"dense1/conv0/pointwise_filter","shape":[1,1,32,64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.014611541991140328,"min":-1.8556658328748217}},{"name":"dense1/conv0/bias","shape":[64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.002832523046755323,"min":-0.30307996600281956}},{"name":"dense1/conv1/depthwise_filter","shape":[3,3,64,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006593170586754294,"min":-0.6329443763284123}},{"name":"dense1/conv1/pointwise_filter","shape":[1,1,64,64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.012215249211180444,"min":-1.6001976466646382}},{"name":"dense1/conv1/bias","shape":[64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.002384825547536214,"min":-0.3028728445370992}},{"name":"dense1/conv2/depthwise_filter","shape":[3,3,64,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.005859645441466687,"min":-0.7617539073906693}},{"name":"dense1/conv2/pointwise_filter","shape":[1,1,64,64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.013121426806730382,"min":-1.7845140457153321}},{"name":"dense1/conv2/bias","shape":[64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0032247188044529336,"min":-0.46435950784122243}},{"name":"dense2/conv0/depthwise_filter","shape":[3,3,64,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.002659512618008782,"min":-0.32977956463308894}},{"name":"dense2/conv0/pointwise_filter","shape":[1,1,64,128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.015499923743453681,"min":-1.9839902391620712}},{"name":"dense2/conv0/bias","shape":[128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0032450980999890497,"min":-0.522460794098237}},{"name":"dense2/conv1/depthwise_filter","shape":[3,3,128,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.005911862382701799,"min":-0.792189559282041}},{"name":"dense2/conv1/pointwise_filter","shape":[1,1,128,128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.021025861478319356,"min":-2.2077154552235325}},{"name":"dense2/conv1/bias","shape":[128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.00349616945958605,"min":-0.46149436866535865}},{"name":"dense2/conv2/depthwise_filter","shape":[3,3,128,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.008104994250278847,"min":-1.013124281284856}},{"name":"dense2/conv2/pointwise_filter","shape":[1,1,128,128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.029337059282789044,"min":-3.5791212325002633}},{"name":"dense2/conv2/bias","shape":[128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0038808938334969913,"min":-0.4230174278511721}},{"name":"fc/weights","shape":[128,136],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.014016061670639936,"min":-1.8921683255363912}},{"name":"fc/bias","shape":[136],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0029505149698724935,"min":0.088760145008564}}],"paths":["face_landmark_68_tiny_model-shard1"]}] -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Pages/DragDrop.razor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using SpawnDev.BlazorJS.JSObjects; 3 | 4 | namespace SpawnDev.BlazorJS.Test.Pages 5 | { 6 | class SomeItemType 7 | { 8 | public int Id { get; set; } 9 | public string Value { get; set; } 10 | public bool GroupA { get; set; } = true; 11 | public SomeItemType(int id, string value) 12 | { 13 | Id = id; 14 | Value = value; 15 | } 16 | } 17 | 18 | public partial class DragDrop : IDisposable 19 | { 20 | 21 | [Inject] 22 | BlazorJSRuntime JS { get; set; } 23 | 24 | ElementReference _dragDropContainer { get; set; } 25 | HTMLElement? _dragDropContainerEl = null; 26 | List _someItems = new List(); 27 | HTMLElement? _dragging = null; 28 | SomeItemType? _draggingItem = null; 29 | bool beenInit = false; 30 | 31 | protected override void OnAfterRender(bool firstRender) 32 | { 33 | if (!beenInit) 34 | { 35 | beenInit = true; 36 | // create some fake data 37 | Enumerable.Range(0, 5).ToList().ForEach(i => _someItems.Add(new SomeItemType(i, $"Draggable Item {i}"))); 38 | // create and set callbacks 39 | _dragDropContainerEl = new HTMLElement(_dragDropContainer); 40 | _dragDropContainerEl.OnDragEnd += OnDragEnd; 41 | _dragDropContainerEl.OnDragOver += OnDragOver; 42 | _dragDropContainerEl.OnDragStart += OnDragStart; 43 | _dragDropContainerEl.OnDrop += OnDrop; 44 | StateHasChanged(); 45 | } 46 | } 47 | 48 | void OnDragStart(DragEvent e) 49 | { 50 | JS.Log("OnDragStart", e); 51 | _dragging = e.Target.JSRefMove(); 52 | var itemKey = int.Parse(_dragging.GetAttribute("item-id")!); 53 | _draggingItem = _someItems.Where(o => o.Id == itemKey).FirstOrDefault(); 54 | using var classList = _dragging.ClassList; 55 | classList.Add("dragging"); 56 | e.Dispose(); 57 | } 58 | void OnDragOver(DragEvent e) 59 | { 60 | JS.Log("OnDragOver", e); 61 | using var el = e.Target.JSRefMove(); 62 | if (el.ClassList.Contains("dropzone")) 63 | { 64 | // call preventDefault to allow the UI to show that dropping here is allowed 65 | e.PreventDefault(); 66 | JS.Log("OnDragOver in dropzone"); 67 | } 68 | else 69 | { 70 | // the UI will show that dropping here is blocked 71 | JS.Log("OnDragOver outside of dropzone"); 72 | } 73 | e.Dispose(); 74 | } 75 | void OnDrop(DragEvent e) 76 | { 77 | JS.Log("OnDrop", e); 78 | e.PreventDefault(); 79 | using var dropTarget = e.Target.JSRefMove(); 80 | if (dropTarget.ClassList.Contains("dropzone")) 81 | { 82 | _draggingItem.GroupA = dropTarget.ClassList.Contains("dropzone-a"); 83 | JS.Log("Dropped in dropzone"); 84 | StateHasChanged(); 85 | } 86 | else 87 | { 88 | JS.Log("Dropped outside of dropzone"); 89 | } 90 | e.Dispose(); 91 | } 92 | void OnDragEnd(DragEvent e) 93 | { 94 | JS.Log("OnDragEnd", e); 95 | using var el = e.Target.JSRefMove(); 96 | using var classList = el.ClassList; 97 | classList.Remove("dragging"); 98 | _dragging?.Dispose(); 99 | _dragging = null; 100 | _draggingItem = null; 101 | e.Dispose(); 102 | } 103 | 104 | public void Dispose() 105 | { 106 | if (beenInit) 107 | { 108 | beenInit = false; 109 | _dragDropContainerEl.OnDragEnd -= OnDragEnd; 110 | _dragDropContainerEl.OnDragOver -= OnDragOver; 111 | _dragDropContainerEl.OnDragStart -= OnDragStart; 112 | _dragDropContainerEl.OnDrop -= OnDrop; 113 | _dragDropContainerEl.Dispose(); 114 | } 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 9 | 10 | 104 | 105 | @code { 106 | private bool collapseNavMenu = true; 107 | 108 | private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; 109 | 110 | private void ToggleNavMenu() 111 | { 112 | collapseNavMenu = !collapseNavMenu; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Shared/MarkdownBlock.razor: -------------------------------------------------------------------------------- 1 | @using Markdig 2 | @using Microsoft.AspNetCore.Components 3 | @using System.Text; 4 | @using System.Text.RegularExpressions; 5 | 6 |
7 | @((MarkupString)_markup) 8 |
9 | 10 | @code { 11 | [Inject] 12 | HttpClient httpClient { get; set; } 13 | 14 | [Parameter] 15 | public string URL { get; set; } = ""; 16 | 17 | MarkdownPipeline pipeline = new MarkdownPipelineBuilder().Build(); 18 | 19 | string _markup = ""; 20 | bool _shouldRender = true; 21 | string _markDown = ""; 22 | string _markDownSection = ""; 23 | Uri? _markDownUri { get; set; } 24 | 25 | protected override async Task OnParametersSetAsync() 26 | { 27 | _markDownUri = string.IsNullOrEmpty(URL) ? null : new Uri(URL); 28 | await LoadMarkdown(); 29 | _shouldRender = true; 30 | await base.OnParametersSetAsync(); 31 | } 32 | 33 | public class MarkdownSection 34 | { 35 | public MarkdownSection? Parent { get; set; } 36 | public List Children { get; set; } = new List(); 37 | public string SectionNameFull { get; set; } = ""; 38 | public string SectionName { get; set; } = ""; 39 | public int SectionDepth { get; set; } 40 | public StringBuilder sb = new StringBuilder(); 41 | public string MarkDown => sb.ToString(); 42 | public string MarkDownFull => GetFullSection(); 43 | 44 | public string GetFullSection() 45 | { 46 | var sections = new List{ this }; 47 | sections.AddRange(Children.SelectMany(o => o.Children).ToList()); 48 | var sb = new StringBuilder(); 49 | sections.ForEach(o => sb.AppendLine(o.MarkDown)); 50 | return sb.ToString(); 51 | } 52 | 53 | public static List Parse(string markDown) 54 | { 55 | markDown = markDown.Trim(); 56 | //var stringLineEnding = "\n"; 57 | //if (markDown.Contains("\r\n")) stringLineEnding = "\r\n"; 58 | //if (markDown.Contains("\r")) stringLineEnding = "\r"; 59 | var lines = markDown.Replace("\r\n", "\n").Replace("\r", "\n").Split("\n"); 60 | var sections = new List(); 61 | MarkdownSection? section = null; 62 | foreach (var line in lines) 63 | { 64 | var tmp = Regex.Replace(line, "[^a-zA-Z-#]", "").ToLowerInvariant(); 65 | var m = Regex.Match(tmp, @"^(#+)([^\s]+)$"); 66 | if (m.Success) 67 | { 68 | // new section 69 | section = new MarkdownSection(); 70 | section.SectionName = m.Groups[2].Value; 71 | section.SectionDepth = m.Groups[1].Value.Length; 72 | m = Regex.Match(line.Trim(), @"^(#+)(.+)$"); 73 | section.SectionNameFull = m.Success ? m.Groups[2].Value.Trim() : ""; 74 | section.Parent = sections.Where(o => o.SectionDepth < section.SectionDepth).LastOrDefault(); 75 | if (section.Parent != null) 76 | { 77 | section.Parent.Children.Add(section); 78 | } 79 | sections.Add(section); 80 | } 81 | if (section == null) 82 | { 83 | section = new MarkdownSection(); 84 | sections.Add(section); 85 | } 86 | section.sb.AppendLine(line); 87 | } 88 | return sections; 89 | } 90 | } 91 | 92 | async Task LoadMarkdown() 93 | { 94 | var markDown = ""; 95 | if (_markDownUri != null) 96 | { 97 | try 98 | { 99 | markDown = await httpClient.GetStringAsync(_markDownUri); 100 | } 101 | catch (Exception ex) 102 | { 103 | BlazorJSRuntime.JS.Log($"Exception: {ex.Message}"); 104 | } 105 | if (!string.IsNullOrEmpty(_markDownUri.Fragment)) 106 | { 107 | var frag = _markDownUri.Fragment.ToLowerInvariant().Trim('#'); 108 | var sections = MarkdownSection.Parse(markDown); 109 | var section = sections.Where(o => o.SectionName.Equals(frag, StringComparison.OrdinalIgnoreCase)).FirstOrDefault(); 110 | markDown = section == null ? "" : section.MarkDownFull; 111 | } 112 | _markup = Markdown.ToHtml(markDown, pipeline); 113 | } 114 | if (!string.IsNullOrEmpty(markDown)) _markDown = markDown; 115 | 116 | } 117 | 118 | protected override async Task OnAfterRenderAsync(bool firstRender) 119 | { 120 | await base.OnAfterRenderAsync(firstRender); 121 | if (_shouldRender) 122 | { 123 | // render complete. disable further rerenders until params change 124 | _shouldRender = false; 125 | } 126 | } 127 | 128 | protected override bool ShouldRender() 129 | { 130 | return _shouldRender; 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/DTO/ReflectionMapper.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics.CodeAnalysis; 2 | using System.Reflection; 3 | 4 | namespace SpawnDev.BlazorJS.DTO; 5 | public static class ReflectionMapper 6 | { 7 | static Dictionary> _typeProperties = new Dictionary>(); 8 | 9 | static Dictionary GetTypeProperties(Type type) 10 | { 11 | lock (_typeProperties) 12 | { 13 | if (_typeProperties.TryGetValue(type, out Dictionary? fnd)) return fnd; 14 | var ret = new Dictionary(); 15 | var props = type.GetProperties(BindingFlags.Public | BindingFlags.Instance); 16 | foreach (var p in props) ret.Add(p.Name, p); 17 | _typeProperties.Add(type, ret); 18 | return ret; 19 | } 20 | } 21 | 22 | public static void Map(TSource source, TResult target, Func? shouldCopyCallback = null) where TResult : class 23 | { 24 | if (source == null) throw new ArgumentNullException(nameof(source)); 25 | if (target == null) throw new ArgumentNullException(nameof(target)); 26 | var typeSource = typeof(TSource); 27 | var typeResult = typeof(TResult); 28 | var propsSource = GetTypeProperties(typeSource); 29 | var propsResult = GetTypeProperties(typeResult); 30 | foreach (var prop in propsSource.Values) 31 | { 32 | if (!propsResult.TryGetValue(prop.Name, out PropertyInfo? propSource)) continue; 33 | var shouldCopy = shouldCopyCallback == null || shouldCopyCallback(prop); 34 | if (!shouldCopy) continue; 35 | prop.SetValue(target, propSource.GetValue(source)); 36 | } 37 | } 38 | 39 | public static TResult Map(TSource source, Func? shouldCopyCallback = null) where TResult : class 40 | { 41 | var typeResult = typeof(TResult); 42 | var targetItem = (TResult)Activator.CreateInstance(typeResult)!; 43 | Map(source, targetItem, shouldCopyCallback); 44 | return targetItem; 45 | } 46 | 47 | public static List Map(IEnumerable sourceList, Func? shouldCopyCallback = null) where TResult : class 48 | { 49 | var typeSource = typeof(TSource); 50 | var typeResult = typeof(TResult); 51 | var propsSource = GetTypeProperties(typeSource); 52 | var propsResult = GetTypeProperties(typeResult); 53 | var ret = new List(); 54 | foreach(var sourceItem in sourceList) 55 | { 56 | var targetItem = (TResult)Activator.CreateInstance(typeResult)!; 57 | Map(sourceItem, targetItem, shouldCopyCallback); 58 | ret.Add(targetItem); 59 | } 60 | return ret; 61 | } 62 | 63 | public static void MapFromBaseClass(TSource source, TResult target, Func? shouldCopyCallback = null) where TResult : TSource 64 | { 65 | if (source == null) throw new ArgumentNullException(nameof(source)); 66 | if (target == null) throw new ArgumentNullException(nameof(target)); 67 | var typeSource = typeof(TSource); 68 | var typeResult = typeof(TResult); 69 | var propsSource = GetTypeProperties(typeSource); 70 | var propsResult = GetTypeProperties(typeResult); 71 | foreach (var prop in propsSource.Values) 72 | { 73 | if (!propsResult.TryGetValue(prop.Name, out PropertyInfo? propSource)) continue; 74 | var shouldCopy = shouldCopyCallback == null || shouldCopyCallback(prop); 75 | if (!shouldCopy) continue; 76 | prop.SetValue(target, propSource.GetValue(source)); 77 | } 78 | } 79 | 80 | public static TResult MapFromBaseClass(TSource source, Func? shouldCopyCallback = null) where TResult : TSource 81 | { 82 | var typeResult = typeof(TResult); 83 | var targetItem = (TResult)Activator.CreateInstance(typeResult)!; 84 | MapFromBaseClass(source, targetItem, shouldCopyCallback); 85 | return targetItem; 86 | } 87 | 88 | public static List MapFromBaseClass(IEnumerable sourceList, Func? shouldCopyCallback = null) where TResult : TSource 89 | { 90 | var typeSource = typeof(TSource); 91 | var typeResult = typeof(TResult); 92 | var propsSource = GetTypeProperties(typeSource); 93 | var propsResult = GetTypeProperties(typeResult); 94 | var ret = new List(); 95 | foreach (var sourceItem in sourceList) 96 | { 97 | var targetItem = (TResult)Activator.CreateInstance(typeResult)!; 98 | MapFromBaseClass(sourceItem, targetItem, shouldCopyCallback); 99 | ret.Add(targetItem); 100 | } 101 | return ret; 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /SpawnDev.BlazorJS.Test/Services/FaceAPIService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components; 2 | using Microsoft.JSInterop; 3 | using SpawnDev.BlazorJS.JSObjects; 4 | 5 | namespace SpawnDev.BlazorJS.Test.Services 6 | { 7 | public class ProcessFrameResult : IDisposable 8 | { 9 | public ArrayBuffer? ArrayBuffer { get; set; } 10 | public int FacesFound { get; set; } 11 | public JSObject? Detections { get; set; } 12 | public void Dispose() 13 | { 14 | ArrayBuffer?.Dispose(); 15 | Detections?.Dispose(); 16 | } 17 | } 18 | 19 | public interface IFaceAPIService 20 | { 21 | void Dispose(); 22 | Task FaceDetection(ArrayBuffer? frameBuffer, int width, int height, bool withLandmarks); 23 | } 24 | 25 | public class FaceAPIService : IDisposable, IFaceAPIService //, IBackgroundService 26 | { 27 | string _appBaseUri; 28 | string _modelPath = "weights"; 29 | IJSInProcessObjectReference? _faceapi = null; 30 | BlazorJSRuntime JS; 31 | Task? _initTask = null; 32 | public FaceAPIService(BlazorJSRuntime js, NavigationManager navigator) 33 | { 34 | JS = js; 35 | _appBaseUri = navigator.BaseUri; 36 | _modelPath = $"{_appBaseUri}{_modelPath}"; 37 | _initTask = InitAsync(); 38 | } 39 | 40 | async Task InitAsync() 41 | { 42 | // load lib 43 | await JS.LoadScript("libs/face-api.min.js", "faceapi"); 44 | // get lib handle 45 | _faceapi = JS.Get("faceapi"); 46 | // load models 47 | await _faceapi.CallVoidAsync("loadSsdMobilenetv1Model", _modelPath); 48 | await _faceapi.CallVoidAsync("loadFaceRecognitionModel", _modelPath); //model to recognize Face 49 | await _faceapi.CallVoidAsync("loadFaceLandmarkModel", _modelPath); // model to detect face landmark 50 | //await _faceapi.CallVoidAsync("loadFaceExpressionModel", _modelPath); //model to detect face expression 51 | } 52 | 53 | // The first time this is called it loads the weights which can take few seconds 54 | public async Task FaceDetection(ArrayBuffer? frameBuffer, int width, int height, bool withLandmarks) 55 | { 56 | var ret = new ProcessFrameResult(); 57 | if (frameBuffer == null || width == 0 || height == 0) return null; 58 | await _initTask!; 59 | if (_faceapi == null) return null; 60 | using var uint8 = new Uint8Array(frameBuffer); 61 | // face-api.js wants an HTMLCanvasElement as input 62 | // the below works in web workers because the faux environment will create an OffscreenCanvas instead of an HTMLCanvasElement if in a worker 63 | using var canvas = new HTMLCanvasElement(width, height); 64 | using var ctx = canvas.Get2DContext(new CanvasRenderingContext2DSettings { WillReadFrequently = true }); 65 | using var imageData = ImageData.FromUint8Array(uint8, width, height); 66 | ctx.PutImageData(imageData, 0, 0); 67 | JSObject? detections = null; 68 | try 69 | { 70 | if (withLandmarks) 71 | { 72 | using var detectAllFacesTask = _faceapi.Call("detectAllFaces", canvas); 73 | detections = await detectAllFacesTask.JSRef!.CallAsync("withFaceLandmarks"); 74 | } 75 | else 76 | { 77 | detections = await _faceapi.CallAsync("detectAllFaces", canvas); 78 | } 79 | //using var detectAllFacesTask = _faceapi.Call("detectAllFaces", canvas); 80 | //if (withLandmarks) { 81 | // using var detectAllFacesWithLandmarksTask = detectAllFacesTask.JSRef.Call("withFaceLandmarks"); 82 | // detections = await detectAllFacesWithLandmarksTask.ThenAsync(); 83 | //} 84 | //else { 85 | // detections = await detectAllFacesTask.ThenAsync(); 86 | //} 87 | } 88 | catch 89 | { 90 | // continue 91 | } 92 | if (detections != null) 93 | { 94 | // https://github.com/justadudewhohacks/face-api.js/#getting-started-displaying-detection-results 95 | _faceapi.CallVoid("draw.drawDetections", canvas, detections); 96 | if (withLandmarks) 97 | { 98 | _faceapi.CallVoid("draw.drawFaceLandmarks", canvas, detections); 99 | } 100 | ret.FacesFound = detections.JSRef.Get("length"); 101 | ret.Detections = detections; 102 | detections.Dispose(); 103 | } 104 | using var outImageData = ctx.GetImageData(); 105 | using var uint8Clapmed = outImageData.Data; 106 | ret.ArrayBuffer = uint8Clapmed.Buffer; 107 | frameBuffer.Dispose(); 108 | return ret; 109 | } 110 | 111 | public bool IsDisposed { get; private set; } 112 | public void Dispose() 113 | { 114 | if (IsDisposed) return; 115 | IsDisposed = true; 116 | _faceapi?.Dispose(); 117 | _faceapi = null; 118 | } 119 | } 120 | } 121 | --------------------------------------------------------------------------------