-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SpeechSynthesis package, testing new Clipboard package, some cleanup ... #55
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
bb0d294
Multi-targeting with .NET 8.
IEvangelist 805cfef
Fix test path...
IEvangelist f240ad3
Gen AI triple slash...
IEvangelist b55a9c8
Fix the publish bits.
IEvangelist da91a52
Remove legacy switch
IEvangelist 407d40e
Upgrade to .NET 8.0, and use Central Package Management.
IEvangelist 3c8fc17
Fix merge issues.
IEvangelist b41b494
Upgrade a few versions...
IEvangelist 8075e5a
Merge branch 'main' into 'new-parser'
Denny09310 e3e29ed
chore: remove globals.json
Denny09310 bdd211c
fix: merge issues
Denny09310 f11467c
feat: start using Typescript AST
c950ac0
chore: remove regex parsing for source, use new AST. For now use old …
Denny09310 7007138
chore: deep cleanup, apply sonar lint performance suggestions. Tests …
Denny09310 24cc118
fix: source generator not finding reference assembly
Denny09310 f5438d0
chore: code formatting
Denny09310 090bd49
feat: implmented AST into the parser and source writer
Denny09310 1d7e801
chore: updated some test to match the output
Denny09310 530e4b4
chore: split main into method, code readability
Denny09310 360ca0d
Merge branch 'feature/csharp-ast-parser' into develop
Denny09310 c91b1f6
fix: generic type not analyzed both for parses and builder, missing n…
Denny09310 e763e42
feat: remove all regexes
Denny09310 85b72e5
fix: url double encoded
Denny09310 bc34712
chore: split GetNodeText into function, add types examples of to handle
Denny09310 4b9cc7d
chore: create singleton for primitive mapping
Denny09310 58814fb
feat: add comment to classes, enhanched linq dependencies query (to c…
Denny09310 72ac9e5
feat: handled dependencies with custom record type and custom hashset…
Denny09310 5a45a56
chore: remove redundant interfaces inheritance
Denny09310 f167a2f
chore: add comments to explain future plans
Denny09310 caad2d2
Merge branch 'feature/syntax-improvements' into develop
Denny09310 0da636b
feat: fix code generation stop workin, split code generation in metho…
Denny09310 a46b6dc
chore: for now removed speech synthesis causing error. Looking for fix
Denny09310 486a387
fix: nullable types not entirely recognized, speech syntheis works, a…
b8a1428
feat: handle promises on webassembly, fix indentation for non pure ca…
Denny09310 3808f6f
feat: add initial clipboard api for webassembly
Denny09310 bcf284f
feat: add initial clipboard api for blazor server
Denny09310 f176a10
feat: add sample pages to show the basic clipboard
Denny09310 870afa2
Merge branch 'feature/clipboard-api' into develop
Denny09310 a7a45a0
chore: bump up dependencies, update localstorage test
Denny09310 e25706c
feat: add some sort of caching to avoid dependency loop
Denny09310 22b7097
chore: fix double culture info in range
Denny09310 8d95fd1
Merge 'IEvangelist/blazorators:new-parser' into 'Denny09310/blazorato…
Denny09310 429815e
fix: merge reverted dependencies
Denny09310 4cf63b7
fix: remove global invariant culture in favor of scoped one
Denny09310 2205cc1
fix: wrong package descriptions
Denny09310 7ce0d60
Add "WebAssembly" to the package name
Denny09310 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 19 additions & 18 deletions
37
samples/Blazor.ExampleConsumer/Blazor.ExampleConsumer.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Humanizer.Core" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Humanizer.Core" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Blazor.Geolocation.WebAssembly\Blazor.Geolocation.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.LocalStorage.WebAssembly\Blazor.LocalStorage.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SessionStorage.WebAssembly\Blazor.SessionStorage.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition.WebAssembly\Blazor.SpeechRecognition.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis.WebAssembly\Blazor.SpeechSynthesis.WebAssembly.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Blazor.Clipboard.WebAssembly\Blazor.Clipboard.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.Geolocation.WebAssembly\Blazor.Geolocation.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.LocalStorage.WebAssembly\Blazor.LocalStorage.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SessionStorage.WebAssembly\Blazor.SessionStorage.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition.WebAssembly\Blazor.SpeechRecognition.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis.WebAssembly\Blazor.SpeechSynthesis.WebAssembly.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
samples/Blazor.ExampleConsumer/Components/Pages/CopyAndPaste.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@page "/copyandpaste" | ||
|
||
@inject IClipboardService Clipboard | ||
|
||
<div class="mb-3"> | ||
<label for="clipboard-content" class="form-label">Your clipboard</label> | ||
<textarea @bind=_content class="form-control" id="clipboard-content" rows="3"></textarea> | ||
</div> | ||
|
||
<div class="btn-group btn-group-lg"> | ||
<button type="button" class="btn btn-lg btn-primary" @onclick=@ReadAsync> | ||
Read | ||
</button> | ||
<button type="button" class="btn btn-lg btn-danger" title="Stop" @onclick=@WriteAsync> | ||
Write | ||
</button> | ||
</div> |
19 changes: 19 additions & 0 deletions
19
samples/Blazor.ExampleConsumer/Components/Pages/CopyAndPaste.razor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) David Pine. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace Blazor.ExampleConsumer.Components.Pages; | ||
|
||
public partial class CopyAndPaste | ||
{ | ||
private string? _content; | ||
|
||
private async Task ReadAsync() | ||
{ | ||
_content = await Clipboard.ReadTextAsync(); | ||
} | ||
|
||
private async Task WriteAsync() | ||
{ | ||
await Clipboard.WriteTextAsync(_content ?? ""); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,29 +6,29 @@ | |
|
||
<div class="input-group w-75 mb-3"> | ||
<select class="form-select" aria-label="Voice selection" | ||
@bind="_selectedVoice" disabled=@(_voices?.Any() is false)> | ||
@bind="_selectedVoice" disabled=@(_voices?.Any() is false)> | ||
@foreach (var voice in _voices ?? Array.Empty<SpeechSynthesisVoice>()) | ||
{ | ||
<option value="@voice.Name">@voice.Name</option> | ||
} | ||
</select> | ||
<button class="btn btn-primary" type="button" | ||
title="Refresh voices?" @onclick=@(async () => await GetVoicesAsync())> | ||
<button class="btn btn-primary" type="button" | ||
title="Refresh voices?" @onclick=@(async () => await GetVoicesAsync())> | ||
<span class="oi oi-reload"></span> | ||
</button> | ||
</div> | ||
|
||
<div class="input-group mb-3 w-75"> | ||
<label for="range" class="form-label">Voice speed: @_voiceSpeed</label> | ||
<input type="range" min="@_voiceSpeeds.Min()" max="@_voiceSpeeds.Max()" | ||
step=".25" class="form-range" id="range" list="speeds" | ||
value="@_voiceSpeed" | ||
@onchange=@OnVoiceSpeedChange> | ||
step=".25" class="form-range" id="range" list="speeds" | ||
@bind="@_voiceSpeed" | ||
@bind:culture="System.Globalization.CultureInfo.InvariantCulture"> | ||
<datalist id="speeds"> | ||
@foreach (var speed in _voiceSpeeds) | ||
{ | ||
<option value="@speed">speed</option> | ||
} | ||
@foreach (var speed in _voiceSpeeds) | ||
{ | ||
<option value="@speed">speed</option> | ||
} | ||
</datalist> | ||
</div> | ||
|
||
|
@@ -37,7 +37,7 @@ | |
Text-to-speech @(_elapsedTimeMessage is { Length: > 0 } ? $"({_elapsedTimeMessage})" : "") | ||
</label> | ||
<textarea class="form-control" id="text" | ||
@oninput=@OnTextChanged rows="3" value=@_text> | ||
@oninput=@OnTextChanged rows="3" value=@_text> | ||
</textarea> | ||
</div> | ||
|
||
|
@@ -49,7 +49,7 @@ | |
<button type="button" class="btn btn-lg btn-warning" title="Pause" @[email protected]> | ||
<span class="oi oi-media-pause"></span> | ||
</button> | ||
<button type="button" class="btn btn-lg btn-info"title="Play" @[email protected]> | ||
<button type="button" class="btn btn-lg btn-info" title="Play" @[email protected]> | ||
<span class="oi oi-media-play"></span> | ||
</button> | ||
<button type="button" class="btn btn-lg btn-danger" title="Stop" @[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 23 additions & 16 deletions
39
samples/BlazorServer.ExampleConsumer/BlazorServer.ExampleConsumer.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Humanizer.Core" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Humanizer.Core" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Blazor.Geolocation\Blazor.Geolocation.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.LocalStorage\Blazor.LocalStorage.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SessionStorage\Blazor.SessionStorage.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition\Blazor.SpeechRecognition.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis\Blazor.SpeechSynthesis.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Blazor.Clipboard\Blazor.Clipboard.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.Geolocation\Blazor.Geolocation.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.LocalStorage\Blazor.LocalStorage.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SessionStorage\Blazor.SessionStorage.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition\Blazor.SpeechRecognition.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis\Blazor.SpeechSynthesis.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Update="Pages\CopyAndPaste.razor"> | ||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile> | ||
</Content> | ||
</ItemGroup> | ||
|
||
</Project> |
17 changes: 17 additions & 0 deletions
17
samples/BlazorServer.ExampleConsumer/Pages/CopyAndPaste.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@page "/copyandpaste" | ||
|
||
@inject IClipboardService Clipboard | ||
|
||
<div class="mb-3"> | ||
<label for="clipboard-content" class="form-label">Your clipboard</label> | ||
<textarea @bind=_content class="form-control" id="clipboard-content" rows="3"></textarea> | ||
</div> | ||
|
||
<div class="btn-group btn-group-lg"> | ||
<button type="button" class="btn btn-lg btn-primary" @onclick=@ReadAsync> | ||
Read | ||
</button> | ||
<button type="button" class="btn btn-lg btn-danger" title="Stop" @onclick=@WriteAsync> | ||
Write | ||
</button> | ||
</div> |
19 changes: 19 additions & 0 deletions
19
samples/BlazorServer.ExampleConsumer/Pages/CopyAndPaste.razor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) David Pine. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace BlazorServer.ExampleConsumer.Pages; | ||
|
||
public partial class CopyAndPaste | ||
{ | ||
private string? _content; | ||
|
||
private async Task ReadAsync() | ||
{ | ||
_content = await Clipboard.ReadTextAsync(); | ||
} | ||
|
||
private async Task WriteAsync() | ||
{ | ||
await Clipboard.WriteTextAsync(_content ?? ""); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a sample I've added the "InvariantGlobalization" tag to the csproj, this permit to use the "@Bind" directive in the range slider without the need to parse the double from a string, because at least in italian the decimal separator was causing issues parsing 0.75 into 75