chalkdart 3.0.4
chalkdart: ^3.0.4 copied to clipboard
Console/Logging text coloring and styling library for Dart. 'Terminal string styling done right' The default mode uses ANSI codes to style the text for Console/Terminal display. HTML mode can be activ [...]
ChalkDart Change Log #
3.0.4 #
- Add TLDR summary to readme
3.0.3 #
- Remove error from README about makeRGBChalk()
3.0.2 #
- Remove html_character_entities dependency and add that code locally
3.0.1 #
- Fix minor error of old ChalkWhitespaceStyle instead of ChalkWhitespaceTreatment
- Added note about being about to use any valid
white-space
CSS value for [whiteSpaceTreatment]
3.0.0 #
- add support for HTML output mode with new supporting methods for Chalk and Chalk string support The intention of this is to allow the use of Chalk for loggers which may be sending output to a server/database for viewing in a browser or other html capable viewer. The viewed HTML will appear as it does in the VSCode debug console.
New HTML Output Features:
-
Output Mode Control:
Chalk.setDefaultOutputMode = ChalkOutputMode.html
to set default mode to html for future constructed Chalk objectschalk.setOutputMode = ChalkOutputMode.html
to set the output mode on an existing Chalk object- Use [ChalkOutputMode.ansi] to change back to ANSI mode (default unless explicitly set to html)
-
Color Scheme Support:
Chalk.defaultHtmlBasicANSIColorSet
property for setting default color schemeChalk.setDefaultHtmlBasicANSIColorSet
method for changing color scheme- Available schemes: [ChalkAnsiColorSet.lightBackground], [ChalkAnsiColorSet.darkBackground], [ChalkAnsiColorSet.highContrast]
-
HTML Safety Methods:
chalk.stripHtmlTags()
- Removes HTML tags from textChalk.htmlSafeSpaces()
- Preserves spaces in HTML outputChalk.htmlSafeGtLt()
- Converts < and > to HTML entitiesChalk.htmlSafeEntities()
- Converts all HTML special characters to entities
-
Stylesheet Generation:
chalk.stylesheet()
- Generates CSS styles for HTML outputchalk.inlineStylesheet()
- Generates CSS wrapped in