Skip to content

Commit

Permalink
1.0.0-preview9-01
Browse files Browse the repository at this point in the history
  • Loading branch information
chanan committed Sep 5, 2019
1 parent 162fc4f commit 8c25c63
Show file tree
Hide file tree
Showing 49 changed files with 207 additions and 204 deletions.
Binary file modified docs/_framework/_bin/BlazorPrettyCode.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/BlazorPrettyCode.pdb
Binary file not shown.
Binary file modified docs/_framework/_bin/BlazorStyled.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/BlazorTypography.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/ClientSideSample.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/ClientSideSample.pdb
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.AspNetCore.Authorization.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.AspNetCore.Blazor.HttpClient.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.AspNetCore.Blazor.dll
Binary file not shown.
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.AspNetCore.Components.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.AspNetCore.Metadata.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.Bcl.AsyncInterfaces.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.Extensions.Options.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.Extensions.Primitives.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.JSInterop.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Mono.Security.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Mono.WebAssembly.Interop.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/SamplePages.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/SamplePages.pdb
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Core.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Net.Http.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Text.Encodings.Web.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Text.Json.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/mscorlib.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_framework/blazor.boot.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"main":"ClientSideSample.dll","entryPoint":"Sample.Program::Main","assemblyReferences":["BlazorPrettyCode.dll","BlazorStyled.dll","BlazorTypography.dll","CSHTMLTokenizer.dll","Microsoft.AspNetCore.Authorization.dll","Microsoft.AspNetCore.Blazor.dll","Microsoft.AspNetCore.Blazor.HttpClient.dll","Microsoft.AspNetCore.Components.dll","Microsoft.AspNetCore.Components.Web.dll","Microsoft.AspNetCore.Metadata.dll","Microsoft.Bcl.AsyncInterfaces.dll","Microsoft.Extensions.DependencyInjection.Abstractions.dll","Microsoft.Extensions.DependencyInjection.dll","Microsoft.Extensions.Logging.Abstractions.dll","Microsoft.Extensions.Options.dll","Microsoft.Extensions.Primitives.dll","Microsoft.JSInterop.dll","Mono.Security.dll","Mono.WebAssembly.Interop.dll","mscorlib.dll","Polished.net.dll","SamplePages.dll","Stateless.dll","System.Buffers.dll","System.ComponentModel.Annotations.dll","System.Core.dll","System.dll","System.Memory.dll","System.Net.Http.dll","System.Numerics.Vectors.dll","System.Runtime.CompilerServices.Unsafe.dll","System.Text.Encodings.Web.dll","System.Text.Json.dll","System.Threading.Tasks.Extensions.dll","BlazorPrettyCode.pdb","ClientSideSample.pdb","SamplePages.pdb"],"cssReferences":[],"jsReferences":[],"linkerEnabled":true}
{"main":"ClientSideSample.dll","entryPoint":"Sample.Program::Main","assemblyReferences":["BlazorPrettyCode.dll","BlazorStyled.dll","BlazorTypography.dll","CSHTMLTokenizer.dll","Microsoft.AspNetCore.Authorization.dll","Microsoft.AspNetCore.Blazor.dll","Microsoft.AspNetCore.Blazor.HttpClient.dll","Microsoft.AspNetCore.Components.dll","Microsoft.AspNetCore.Components.Forms.dll","Microsoft.AspNetCore.Components.Web.dll","Microsoft.AspNetCore.Metadata.dll","Microsoft.Bcl.AsyncInterfaces.dll","Microsoft.Extensions.DependencyInjection.Abstractions.dll","Microsoft.Extensions.DependencyInjection.dll","Microsoft.Extensions.Logging.Abstractions.dll","Microsoft.Extensions.Options.dll","Microsoft.Extensions.Primitives.dll","Microsoft.JSInterop.dll","Mono.Security.dll","Mono.WebAssembly.Interop.dll","mscorlib.dll","Polished.net.dll","SamplePages.dll","Stateless.dll","System.Buffers.dll","System.ComponentModel.Annotations.dll","System.Core.dll","System.dll","System.Memory.dll","System.Net.Http.dll","System.Numerics.Vectors.dll","System.Runtime.CompilerServices.Unsafe.dll","System.Text.Encodings.Web.dll","System.Text.Json.dll","System.Threading.Tasks.Extensions.dll","BlazorPrettyCode.pdb","ClientSideSample.pdb","SamplePages.pdb"],"cssReferences":[],"jsReferences":[],"linkerEnabled":true}
6 changes: 3 additions & 3 deletions docs/_framework/blazor.server.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_framework/blazor.webassembly.js

Large diffs are not rendered by default.

325 changes: 159 additions & 166 deletions docs/_framework/wasm/mono.js

Large diffs are not rendered by default.

Binary file modified docs/_framework/wasm/mono.wasm
Binary file not shown.
10 changes: 6 additions & 4 deletions src/BlazorPrettyCode/BlazorPrettyCode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<LangVersion>7.3</LangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<PackageId>BlazorPrettyCode</PackageId>
<Version>1.0.0-preview8-08</Version>
<Version>1.0.0-preview9-01</Version>
<Authors>Chanan Braunstein</Authors>
<Title>Blazor PrettyCode</Title>
<Description>Razor Code Display Component</Description>
Expand All @@ -15,9 +15,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BlazorStyled" Version="1.0.0-preview8-04" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.0.0-preview8.19405.7" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.0.0-preview8.19405.7" />

<PackageReference Include="BlazorStyled" Version="1.0.0-preview9-01" />

<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.0.0-preview9.19424.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.0.0-preview9.19424.4" />
</ItemGroup>

<ItemGroup>
Expand Down
23 changes: 12 additions & 11 deletions src/BlazorPrettyCode/CodeThemeSwitcher.razor
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
@inject IDefaultSettings DefaultSettings
@using Microsoft.AspNetCore.Components.Web
@inject IDefaultSettings DefaultSettings

<select value="@theme" @onchange="@OnChangeTheme">
<option value="PrettyCodeDefault">Default</option>
<option value="GithubPlus">Github Plus</option>
<option value="Material">Material</option>
<option value="SolarizedDark">Solarized Dark</option>
<option value="SolarizedLight">Solarized Light</option>
<option value="WinterIsComingDark">Winter is Coming Dark</option>
<option value="WinterIsComingLight">Winter is Coming Light</option>
</select>
<select value="@theme" @onchange="OnChangeTheme">
<option value="PrettyCodeDefault">Default</option>
<option value="GithubPlus">Github Plus</option>
<option value="Material">Material</option>
<option value="SolarizedDark">Solarized Dark</option>
<option value="SolarizedLight">Solarized Light</option>
<option value="WinterIsComingDark">Winter is Coming Dark</option>
<option value="WinterIsComingLight">Winter is Coming Light</option>
</select>

@code {
//TODO: Change this to use reflection instead of hard coding classes
Expand All @@ -19,7 +20,7 @@
theme = DefaultSettings.DefaultTheme;
}

protected void OnChangeTheme(UIChangeEventArgs e)
protected void OnChangeTheme(ChangeEventArgs e)
{
theme = (string)e.Value;
DefaultSettings.DefaultTheme = theme;
Expand Down
5 changes: 3 additions & 2 deletions src/BlazorPrettyCode/PrettyCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
using CSHTMLTokenizer;
using CSHTMLTokenizer.Tokens;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.RenderTree;
using Microsoft.AspNetCore.Components.Rendering;
using Microsoft.AspNetCore.Components.Web;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -628,7 +629,7 @@ private void BuildRenderTitle(RenderTreeBuilder builderTitle)
{
builderTitle.OpenElement(Next(), "span");
builderTitle.AddAttribute(Next(), "class", _baseCollapse);
builderTitle.AddAttribute(3, "onclick", EventCallback.Factory.Create<UIMouseEventArgs>(this, OnClick));
builderTitle.AddAttribute(3, "onclick", EventCallback.Factory.Create<MouseEventArgs>(this, OnClick));
builderTitle.AddContent(Next(), _isCollapsed ? "Expand source" : "Collapse source");
builderTitle.CloseElement();
}
Expand Down
1 change: 0 additions & 1 deletion src/BlazorPrettyCode/Themes/ThemeCache.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using BlazorPrettyCode.Internal;
using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;

namespace BlazorPrettyCode.Themes
Expand Down
8 changes: 4 additions & 4 deletions src/Sample/ClientSideSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.0.0-preview8.19405.7" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.0.0-preview8.19405.7" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.0.0-preview8.19405.7" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.0.0-preview8.19405.7" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.0.0-preview9.19424.4" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.0.0-preview9.19424.4" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.0.0-preview9.19424.4" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.0.0-preview9.19424.4" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Sample/_Imports.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using BlazorPrettyCode
@using BlazorStyled
@using Polished
11 changes: 8 additions & 3 deletions src/SamplePages/App.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<Router AppAssembly="typeof(App).Assembly">
<NotFoundContent>
<p>Sorry, there's nothing at this address.</p>
</NotFoundContent>
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
1 change: 0 additions & 1 deletion src/SamplePages/Pages/_Imports.razor

This file was deleted.

6 changes: 3 additions & 3 deletions src/SamplePages/SamplePages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BlazorTypography" Version="1.0.0-preview8-04" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.0.0-preview8.19405.7" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.0.0-preview8.19405.7" />
<PackageReference Include="BlazorTypography" Version="1.0.0-preview9-01" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.0.0-preview9.19424.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.0.0-preview9.19424.4" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/SamplePages/_Imports.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.JSInterop
@using SamplePages
@using SamplePages.Shared
Expand Down
4 changes: 2 additions & 2 deletions src/ServerSideSample/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Blazor Pretty Code Server Side Sample</title>
<base href="~/" />
@(await Html.RenderComponentAsync<BlazorStyled.ServerSideStyled>())
@(await Html.RenderComponentAsync<BlazorStyled.ServerSideStyled>(RenderMode.Server))
</head>
<body>
<app>@(await Html.RenderComponentAsync<SamplePages.App>())</app>
<app>@(await Html.RenderComponentAsync<SamplePages.App>(RenderMode.Server))</app>

<script src="_framework/blazor.server.js"></script>
</body>
Expand Down
4 changes: 2 additions & 2 deletions src/ServerSideSample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public void ConfigureServices(IServiceCollection services)
services.AddScoped<HttpClient>(s =>
{
// Creating the URI helper needs to wait until the JS Runtime is initialized, so defer it.
IUriHelper uriHelper = s.GetRequiredService<IUriHelper>();
NavigationManager navigationManager = s.GetRequiredService<NavigationManager>();
return new HttpClient
{
BaseAddress = new Uri(uriHelper.GetBaseUri())
BaseAddress = new Uri(navigationManager.BaseUri)
};
});
}
Expand Down
1 change: 1 addition & 0 deletions src/ServerSideSample/_Imports.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.JSInterop
@using ServerSideSample
@using BlazorPrettyCode

0 comments on commit 8c25c63

Please sign in to comment.