Skip to content

Syntax highlighter#5

Merged
LittleLittleCloud merged 12 commits intomainfrom
u/xiaoyun/syntaxHighlighter
Oct 11, 2025
Merged

Syntax highlighter#5
LittleLittleCloud merged 12 commits intomainfrom
u/xiaoyun/syntaxHighlighter

Conversation

@LittleLittleCloud
Copy link
Member

No description provided.

- Introduced a new `<SyntaxHighlighter>` Razor component for rendering code snippets with syntax highlighting.
- Integrated ColorCode for language parsing and token classification.
- Implemented a `SyntaxHighlightingService` to manage highlighting requests and payload encoding/decoding.
- Created `SyntaxTheme` and `SyntaxOptions` to customize highlighting styles and behaviors.
- Added `ColorCodeLanguageRegistry` and `SyntaxThemeRegistry` for managing supported languages and themes.
- Developed a gallery page to demonstrate the usage of the new component.
- Added unit tests for `SyntaxHighlightingService` and integration tests for the VDOM translator.
- Updated project files to include necessary dependencies and configurations.
- Removed SpinnerRenderableConverter and TextRenderableConverter classes as they are no longer needed.
- Introduced ConsoleViewResult class to encapsulate the result of rendering Razor components for the console.
- Removed HtmlToSpectreRenderableConverter and replaced it with a more modular approach for rendering.
- Added ColorCodeLanguageRegistry and PlainTextLanguage classes to manage syntax highlighting languages.
- Implemented SpectreMarkupFormatter for formatting code with syntax highlighting.
- Created SyntaxHighlightingService to handle syntax highlighting requests and responses.
- Added SyntaxOptions and SyntaxTheme classes to configure syntax highlighting behavior and styles.
- Introduced SyntaxThemeRegistry for managing available syntax themes.
- Updated ButtonRenderableBuilder to support new button rendering logic.
- Modified VdomSpectreTranslatorTests to reflect changes in attribute handling for syntax highlighting.
refactor: Modify Newline component to render a space instead of a newline
refactor: Simplify MarkupGallery component and enhance code example display
- Updated MarkupGallery.razor to remove unnecessary padding and use Rows for layout.
- Simplified NewlineGallery.razor by consolidating padding and using a single Rows structure.
- Refactored PadderGallery.razor to utilize Rows and Panels for better organization.
- Enhanced PanelGallery.razor by replacing padding with Rows and Panels for clarity.
- Streamlined RowsGallery.razor to use Rows for vertical stacking and simplified code examples.
- Modified SelectGallery.razor to adopt Rows and Panels for a cleaner structure.
- Reorganized SpinnerGallery.razor to use a loop for spinner examples and improved layout.
- Updated SyntaxHighlighterGallery.razor to simplify usage examples and improve readability.
- Refined TextButtonGallery.razor to use Rows and Panels for a more structured layout.
- Enhanced TextInputGallery.razor by replacing padding with Rows for better organization.
@LittleLittleCloud LittleLittleCloud force-pushed the u/xiaoyun/syntaxHighlighter branch from d629f5c to 82ea197 Compare October 11, 2025 08:10
@LittleLittleCloud LittleLittleCloud merged commit 4657e69 into main Oct 11, 2025
3 checks passed
LittleLittleCloud added a commit that referenced this pull request Oct 11, 2025
* Remove obsolete design documents for built-in components, console app, and MVC adaptation

* feat: Add Syntax Highlighter component with ColorCode integration

- Introduced a new `<SyntaxHighlighter>` Razor component for rendering code snippets with syntax highlighting.
- Integrated ColorCode for language parsing and token classification.
- Implemented a `SyntaxHighlightingService` to manage highlighting requests and payload encoding/decoding.
- Created `SyntaxTheme` and `SyntaxOptions` to customize highlighting styles and behaviors.
- Added `ColorCodeLanguageRegistry` and `SyntaxThemeRegistry` for managing supported languages and themes.
- Developed a gallery page to demonstrate the usage of the new component.
- Added unit tests for `SyntaxHighlightingService` and integration tests for the VDOM translator.
- Updated project files to include necessary dependencies and configurations.

* refactor: Remove obsolete SyntaxHighlighter data attribute and improve rendering logic

* Refactor rendering components and syntax highlighting

- Removed SpinnerRenderableConverter and TextRenderableConverter classes as they are no longer needed.
- Introduced ConsoleViewResult class to encapsulate the result of rendering Razor components for the console.
- Removed HtmlToSpectreRenderableConverter and replaced it with a more modular approach for rendering.
- Added ColorCodeLanguageRegistry and PlainTextLanguage classes to manage syntax highlighting languages.
- Implemented SpectreMarkupFormatter for formatting code with syntax highlighting.
- Created SyntaxHighlightingService to handle syntax highlighting requests and responses.
- Added SyntaxOptions and SyntaxTheme classes to configure syntax highlighting behavior and styles.
- Introduced SyntaxThemeRegistry for managing available syntax themes.
- Updated ButtonRenderableBuilder to support new button rendering logic.
- Modified VdomSpectreTranslatorTests to reflect changes in attribute handling for syntax highlighting.

* refactor: Improve code formatting and indentation in syntax highlighting classes

* docs: Update README and add built-in components documentation
refactor: Modify Newline component to render a space instead of a newline
refactor: Simplify MarkupGallery component and enhance code example display

* Refactor gallery components to use Rows and Panels for improved layout

- Updated MarkupGallery.razor to remove unnecessary padding and use Rows for layout.
- Simplified NewlineGallery.razor by consolidating padding and using a single Rows structure.
- Refactored PadderGallery.razor to utilize Rows and Panels for better organization.
- Enhanced PanelGallery.razor by replacing padding with Rows and Panels for clarity.
- Streamlined RowsGallery.razor to use Rows for vertical stacking and simplified code examples.
- Modified SelectGallery.razor to adopt Rows and Panels for a cleaner structure.
- Reorganized SpinnerGallery.razor to use a loop for spinner examples and improved layout.
- Updated SyntaxHighlighterGallery.razor to simplify usage examples and improve readability.
- Refined TextButtonGallery.razor to use Rows and Panels for a more structured layout.
- Enhanced TextInputGallery.razor by replacing padding with Rows for better organization.

* feat: Add NuGet upgrade checker service and integrate into application

* chore: Update version prefix to 0.0.3 and reorder using directives in Program.cs

* docs: Enhance built-in components section with detailed descriptions

* docs: Add HotReload section to README and update MarkupGallery layout

* chore: Update gallery image asset

---------

Co-authored-by: BigMiao <g2260578356@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants