-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add DocBox printer for 2D layout. #8
Conversation
@srghma Do you want to give this branch a try before I merge? |
There's currently a bug when resuming from horizontal contexts (printing halts). |
Alright this is fixed up. Would love to get some feedback! |
tnx, I can try to replace purescript-boxes lib with this new implementation in the https://github.com/srghma/purescript-envparse lib, but I see already that it should work without problems TODO: check what will happen IF e.g. root is 100, c1 and c2 are 40
but what will happen if I change root to 60? will it render to?
P.S. ideally I would like to get width for root from like https://github.com/vadimdemedes/ink#box does |
This PR does not implement a higher-level reflowing API for boxes, but that should be possible to implement on top of the existing APIs (using things like withPosition). If you have thoughts on what that API might look like I could give a more detailed answer. |
Some things that might help when writing higher-level layout APIs would be adding the full print configuration to |
I've added
I think this can already be inferred by checking the indent, column, and nextIndent in withPosition. |
tnx @natefaubion , sorry that I couldn't try the branch, I just see that it should work just fine) |
Fixes #7