diff --git a/.editorconfig b/.editorconfig index 473207c5..477a603e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,12 +3,22 @@ root = true # All files [*] indent_style = space -dotnet_diagnostic.CA1047.severity = error # Xml files [*.xml] indent_size = 2 +# Xml project files +[*.{csproj,fsproj,vbproj,proj,slnx}] +indent_size = 2 + +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 + +[*.json] +indent_size = 2 + # C# files [*.cs] @@ -19,7 +29,6 @@ indent_size = 4 tab_width = 4 # New line preferences -end_of_line = crlf insert_final_newline = false #### .NET Coding Conventions #### @@ -53,13 +62,16 @@ dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent dotnet_style_coalesce_expression = true:suggestion dotnet_style_collection_initializer = true:suggestion dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_namespace_match_folder = true:suggestion dotnet_style_null_propagation = true:suggestion dotnet_style_object_initializer = true:suggestion dotnet_style_operator_placement_when_wrapping = beginning_of_line dotnet_style_prefer_auto_properties = true:suggestion +dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion dotnet_style_prefer_compound_assignment = true:suggestion dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion -dotnet_style_prefer_conditional_expression_over_return = false:suggestion +dotnet_style_prefer_conditional_expression_over_return = true:suggestion +dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed:suggestion dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion dotnet_style_prefer_inferred_tuple_names = true:suggestion dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion @@ -79,15 +91,15 @@ dotnet_remove_unnecessary_suppression_exclusions = none [*.cs] # var preferences -csharp_style_var_elsewhere = false:silent +csharp_style_var_elsewhere = false:suggestion csharp_style_var_for_built_in_types = false:silent -csharp_style_var_when_type_is_apparent = false:silent +csharp_style_var_when_type_is_apparent = true:suggestion # Expression-bodied members csharp_style_expression_bodied_accessors = true:silent csharp_style_expression_bodied_constructors = false:silent csharp_style_expression_bodied_indexers = true:silent -csharp_style_expression_bodied_lambdas = when_on_single_line:error +csharp_style_expression_bodied_lambdas = true:suggestion csharp_style_expression_bodied_local_functions = false:silent csharp_style_expression_bodied_methods = false:silent csharp_style_expression_bodied_operators = false:silent @@ -96,6 +108,7 @@ csharp_style_expression_bodied_properties = true:silent # Pattern matching preferences csharp_style_pattern_matching_over_as_with_null_check = true:suggestion csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_prefer_extended_property_pattern = true:suggestion csharp_style_prefer_not_pattern = true:suggestion csharp_style_prefer_pattern_matching = true:silent csharp_style_prefer_switch_expression = true:suggestion @@ -104,20 +117,31 @@ csharp_style_prefer_switch_expression = true:suggestion csharp_style_conditional_delegate_call = true:suggestion # Modifier preferences +csharp_prefer_static_anonymous_function = true:suggestion csharp_prefer_static_local_function = true:warning -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent +csharp_preferred_modifier_order = public,private,protected,internal,file,const,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion +csharp_style_prefer_readonly_struct = true:suggestion +csharp_style_prefer_readonly_struct_member = true:suggestion # Code-block preferences csharp_prefer_braces = true:silent csharp_prefer_simple_using_statement = true:suggestion +csharp_style_namespace_declarations = file_scoped:suggestion +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_prefer_top_level_statements = true:silent # Expression-level preferences csharp_prefer_simple_default_expression = true:suggestion csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion csharp_style_inlined_variable_declaration = true:suggestion -csharp_style_pattern_local_over_anonymous_function = true:suggestion csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true:suggestion +csharp_style_prefer_null_check_over_type_check = true:suggestion csharp_style_prefer_range_operator = true:suggestion +csharp_style_prefer_tuple_swap = true:suggestion +csharp_style_prefer_utf8_string_literals = true:suggestion csharp_style_throw_expression = true:suggestion csharp_style_unused_value_assignment_preference = discard_variable:suggestion csharp_style_unused_value_expression_statement_preference = discard_variable:silent @@ -171,32 +195,21 @@ csharp_space_between_square_brackets = false # Wrapping preferences csharp_preserve_single_line_blocks = true csharp_preserve_single_line_statements = true -csharp_style_namespace_declarations = file_scoped:error -csharp_style_prefer_method_group_conversion = true:silent -csharp_style_prefer_top_level_statements = true:silent -csharp_style_prefer_primary_constructors = false:suggestion -csharp_style_prefer_null_check_over_type_check = true:suggestion -csharp_style_prefer_local_over_anonymous_function = true:suggestion -csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion -csharp_style_prefer_tuple_swap = true:suggestion -csharp_style_prefer_utf8_string_literals = true:suggestion -csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent -csharp_style_prefer_readonly_struct = true:suggestion -csharp_style_prefer_readonly_struct_member = true:suggestion -dotnet_diagnostic.CA1070.severity = error -dotnet_diagnostic.CA1032.severity = error -dotnet_diagnostic.CA1865.severity = error -dotnet_diagnostic.CA1866.severity = error -dotnet_diagnostic.CA1867.severity = error -dotnet_diagnostic.CA2014.severity = error csharp_prefer_system_threading_lock = true:suggestion -csharp_style_prefer_unbound_generic_type_in_nameof = true:suggestion -csharp_style_prefer_implicitly_typed_lambda_expression = true:suggestion csharp_style_prefer_simple_property_accessors = true:suggestion +csharp_style_prefer_implicitly_typed_lambda_expression = true:suggestion +csharp_style_prefer_unbound_generic_type_in_nameof = true:suggestion csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent +csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent +dotnet_diagnostic.CA1003.severity = error +dotnet_diagnostic.CA1008.severity = error +dotnet_diagnostic.CA1032.severity = error +dotnet_diagnostic.CA1034.severity = silent +dotnet_diagnostic.CA1036.severity = error +dotnet_diagnostic.CA1044.severity = error #### Naming styles #### [*.{cs,vb}] @@ -388,32 +401,17 @@ dotnet_naming_style.s_camelcase.required_prefix = s_ dotnet_naming_style.s_camelcase.required_suffix = dotnet_naming_style.s_camelcase.word_separator = dotnet_naming_style.s_camelcase.capitalization = camel_case -dotnet_style_prefer_collection_expression = when_types_exactly_match:suggestion -dotnet_style_namespace_match_folder = true:error tab_width = 4 indent_size = 4 end_of_line = crlf -dotnet_diagnostic.CA1000.severity = silent -dotnet_diagnostic.CA1001.severity = warning -dotnet_diagnostic.CA1002.severity = suggestion -dotnet_diagnostic.CA1008.severity = error -dotnet_diagnostic.CA1061.severity = error -dotnet_diagnostic.CA1063.severity = error -dotnet_diagnostic.CA2000.severity = error -dotnet_diagnostic.CA1816.severity = error -dotnet_diagnostic.CA2213.severity = error -dotnet_diagnostic.CA2215.severity = error -dotnet_diagnostic.CA1064.severity = error -dotnet_diagnostic.CA1069.severity = error -dotnet_diagnostic.CA1401.severity = error -dotnet_diagnostic.CA1501.severity = error -dotnet_diagnostic.CA1700.severity = error -dotnet_diagnostic.CA1821.severity = error -dotnet_diagnostic.CA1836.severity = error -dotnet_diagnostic.CA1843.severity = error -dotnet_diagnostic.CA1842.severity = error -dotnet_diagnostic.CA2011.severity = error dotnet_style_allow_multiple_blank_lines_experimental = true:silent dotnet_style_allow_statement_immediately_after_block_experimental = true:silent insert_final_newline = true +dotnet_diagnostic.CA1001.severity = error +dotnet_diagnostic.CA1002.severity = silent +dotnet_diagnostic.CA1005.severity = error +dotnet_diagnostic.CA1010.severity = error +dotnet_diagnostic.CA1041.severity = error +dotnet_diagnostic.CA2025.severity = error +dotnet_diagnostic.CA2213.severity = error diff --git a/Assets/BundledAssets.Source/bookgen.css b/Assets/BundledAssets.Source/bookgen.css index 05f47d9e..83284059 100644 --- a/Assets/BundledAssets.Source/bookgen.css +++ b/Assets/BundledAssets.Source/bookgen.css @@ -1,6 +1,6 @@ /* BookGen Css Not minified -Version: 2025-05-17 +Version: 2026-03-04 */ @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono&family=Nunito:wght@700&family=Open+Sans&display=swap'); @@ -12,6 +12,10 @@ Version: 2025-05-17 --blue: #003e8a; --brightBlue: #2e6cba; --selection: #CACACA; + --box-info: #d1e7dd; + --box-waring: #fff3cd; + --box-error: #f8d7da; + --box-foreground: #3e3e3e; --max-width: 1200px; } @@ -22,6 +26,10 @@ body.dark-mode { --blue: #82aaff; --brightBlue: #d6acff; --selection: #5D5D5D; + --box-info: #B9E5D1; + --box-waring: #FFECB5; + --box-error: #F7BEC4; + --box-foreground: #212121; } h1, @@ -228,6 +236,48 @@ dialog #container #dialogBase { color: var(--foreground); } +/* Boxes */ + +.info { + background-color: var(--box-info); + color: var(--box-foreground); + margin: 1rem; + padding: 1rem; + border-radius: 0.5rem; +} + +.info::before { + content: "ℹ️"; + display: block; +} + +.warning { + background-color: var(--box-waring); + color: var(--box-foreground); + margin: 1rem; + padding: 1rem; + border-radius: 0.5rem; +} + +.warning::before { + content: "⚠️"; + display: block; +} + + +.error { + background-color: var(--box-error); + color: var(--box-foreground); + margin: 1rem; + padding: 1rem; + border-radius: 0.5rem; +} + +.error::before { + content: "🛑"; + display: block; +} + @media print { body { diff --git a/Assets/BundledAssets.Source/bookgen.epub.css b/Assets/BundledAssets.Source/bookgen.epub.css index 87a42d9c..124841fa 100644 --- a/Assets/BundledAssets.Source/bookgen.epub.css +++ b/Assets/BundledAssets.Source/bookgen.epub.css @@ -1,6 +1,6 @@ /* BookGen Css for epub files Not minified -Version: 2025-07-15 +Version: 2026-03-04 */ :root { @@ -193,6 +193,48 @@ figcaption { font-style: italic; } +/* Boxes */ + +.info { + background-color: var(--box-info); + color: var(--box-foreground); + margin: 1rem; + padding: 1rem; + border-radius: 0.5rem; +} + +.info::before { + content: "ℹ️"; + display: block; +} + +.warning { + background-color: var(--box-waring); + color: var(--box-foreground); + margin: 1rem; + padding: 1rem; + border-radius: 0.5rem; +} + +.warning::before { + content: "⚠️"; + display: block; +} + + +.error { + background-color: var(--box-error); + color: var(--box-foreground); + margin: 1rem; + padding: 1rem; + border-radius: 0.5rem; +} + +.error::before { + content: "🛑"; + display: block; +} + /* PrismJS 1.30.0 https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+abap+abnf+actionscript+ada+agda+al+antlr4+apacheconf+apex+apl+applescript+aql+arduino+arff+armasm+arturo+asciidoc+aspnet+asm6502+asmatmel+autohotkey+autoit+avisynth+avro-idl+awk+bash+basic+batch+bbcode+bbj+bicep+birb+bison+bnf+bqn+brainfuck+brightscript+bro+bsl+c+csharp+cpp+cfscript+chaiscript+cil+cilkc+cilkcpp+clojure+cmake+cobol+coffeescript+concurnas+csp+cooklang+coq+crystal+css-extras+csv+cue+cypher+d+dart+dataweave+dax+dhall+diff+django+dns-zone-file+docker+dot+ebnf+editorconfig+eiffel+ejs+elixir+elm+etlua+erb+erlang+excel-formula+fsharp+factor+false+firestore-security-rules+flow+fortran+ftl+gml+gap+gcode+gdscript+gedcom+gettext+gherkin+git+glsl+gn+linker-script+go+go-module+gradle+graphql+groovy+haml+handlebars+haskell+haxe+hcl+hlsl+hoon+http+hpkp+hsts+ichigojam+icon+icu-message-format+idris+ignore+inform7+ini+io+j+java+javadoc+javadoclike+javastacktrace+jexl+jolie+jq+jsdoc+js-extras+json+json5+jsonp+jsstacktrace+js-templates+julia+keepalived+keyman+kotlin+kumir+kusto+latex+latte+less+lilypond+liquid+lisp+livescript+llvm+log+lolcode+lua+magma+makefile+markdown+markup-templating+mata+matlab+maxscript+mel+mermaid+metafont+mizar+mongodb+monkey+moonscript+n1ql+n4js+nand2tetris-hdl+naniscript+nasm+neon+nevod+nginx+nim+nix+nsis+objectivec+ocaml+odin+opencl+openqasm+oz+parigp+parser+pascal+pascaligo+psl+pcaxis+peoplecode+perl+php+phpdoc+php-extras+plant-uml+plsql+powerquery+powershell+processing+prolog+promql+properties+protobuf+pug+puppet+pure+purebasic+purescript+python+qsharp+q+qml+qore+r+racket+cshtml+jsx+tsx+reason+regex+rego+renpy+rescript+rest+rip+roboconf+robotframework+ruby+rust+sas+sass+scss+scala+scheme+shell-session+smali+smalltalk+smarty+sml+solidity+solution-file+soy+sparql+splunk-spl+sqf+sql+squirrel+stan+stata+iecst+stylus+supercollider+swift+systemd+t4-templating+t4-cs+t4-vb+tap+tcl+tt2+textile+toml+tremor+turtle+twig+typescript+typoscript+unrealscript+uorazor+uri+v+vala+vbnet+velocity+verilog+vhdl+vim+visual-basic+warpscript+wasm+web-idl+wgsl+wiki+wolfram+wren+xeora+xml-doc+xojo+xquery+yaml+yang+zig */ code[class*=language-], diff --git a/Assets/BundledAssets.Source/test.html b/Assets/BundledAssets.Source/test.html index d621e548..c018ad35 100644 --- a/Assets/BundledAssets.Source/test.html +++ b/Assets/BundledAssets.Source/test.html @@ -122,6 +122,10 @@