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

Decouple Doc data structure from Ansi console #16

Merged
merged 1 commit into from Dec 19, 2017

Conversation

Projects
None yet
1 participant
@pwentz
Owner

pwentz commented Dec 19, 2017

  • Remove use of Formatter type alias from Color, Underline, and Bold constructors in favor of applying the formatting to the content during the rendering process (display). This allows the Doc and ` data structure itself to remain uncoupled from the ANSI console.
  • Color type constructors now have a ColorBrightness sum type (Standard | Dark).
  • RestoreFormat and best now take isBold and isUnderline bool types over Maybe Formatter types.
  • WithFormat and WithBold (TextFormat) no longer take Formatter arg.
  • Fn's from Console moved to consoleFormatting and toAnsiColor, and ansiBrightness functions.
  • ConsoleLayer -> DocLayer
  • Remove Formatter type alias
- move Formatter type from Color, Bold, Underline, and TextFormat con…
…structors in favor of applying the formatting to the doc content during the rendering process. This allows the Doc data structure itself to remain uncoupled from any particular rendering medium (ie. console).

@pwentz pwentz merged commit 44f7bba into master Dec 19, 2017

@pwentz pwentz deleted the move-ansi-to-rendering branch Dec 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment