chalkdart 3.0.4 copy "chalkdart: ^3.0.4" to clipboard
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 objects
    • chalk.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 scheme
    • Chalk.setDefaultHtmlBasicANSIColorSet method for changing color scheme
    • Available schemes: [ChalkAnsiColorSet.lightBackground], [ChalkAnsiColorSet.darkBackground], [ChalkAnsiColorSet.highContrast]
  • HTML Safety Methods:

    • chalk.stripHtmlTags() - Removes HTML tags from text
    • Chalk.htmlSafeSpaces() - Preserves spaces in HTML output
    • Chalk.htmlSafeGtLt() - Converts < and > to HTML entities
    • Chalk.htmlSafeEntities() - Converts all HTML special characters to entities
  • Stylesheet Generation:

    • chalk.stylesheet() - Generates CSS styles for HTML output
    • chalk.inlineStylesheet() - Generates CSS wrapped in
47
likes
140
points
107k
downloads
screenshot

Publisher

verified publisherhiveright.tech

Weekly Downloads

2024.09.08 - 2025.03.23

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 activated so that all text is colored and styled using HTML so ChalkDart can be use for sending colored/styled logs to the Server for viewing from a browser as well.

Repository (GitHub)
View/report issues

Topics

#cli #color #coloring #ansi #html

Documentation

API reference

License

MIT (license)

Dependencies

args

More

Packages that depend on chalkdart