summaryrefslogtreecommitdiff
path: root/src/library/layout.rs
AgeCommit message (Collapse)Author
2021-10-31Reorganize modulesLaurenz
Instead of separating functionality into layout and library, everything lives in the library now. This way, related things live side by side and there are no duplicate file names in the two directories.
2021-10-28Add `move` functionLaurenz
2021-10-26Simplify node constructionLaurenz
2021-10-26Fr in stack and parLaurenz
2021-10-25Replace `..` syntax with `range` functionLaurenz
2021-10-23Introduce page / block / inline levelsLaurenz
2021-10-23Remove directions from gridLaurenz
2021-10-23Revise block node contractLaurenz
Frames produced by block nodes are now always treated as exactly one per given region and a frame must not be larger than its respective region. Any overflow must be handled internally. This means that stack and grid don't need to search for fitting regions anymore, since the child has already does that for them. This commit further moves stack spacing into a new `SpacingNode`.
2021-10-23New `ShapeNode`Laurenz
Replaces `BackgroundNode` and `FixedNode`
2021-10-23Remove inline alignment from stackLaurenz
The current inline alignment is very broken and leads to lots of subtle weirdness. Getting rid of it simplifies the stack's interface a lot. At a later point either: - inline alignment will be added back in a better way, or - all nodes will be able to expand or align themselves, meaning that the stack's children take care of their alignment
2021-10-10Rename `State` to `Style` and move it into its own moduleLaurenz
2021-10-05Let `h`, `v` and `pagebreak` return templateLaurenz
2021-10-05Paper longhand for page functionLaurenz
2021-10-02Simpler and more versatile row and column gutter argumentsLaurenz
2021-09-27Add spacing capabilities to stack functionLaurenz
- Named argument `spacing` controls spacing between any two template arguments - Arbitrary linears in the list can produce arbitrary spacing
2021-09-27Fix panic due to bad alignments in stack functionLaurenz
2021-09-10Rename `Arguments` to `Args`Laurenz
2021-08-29Allow body for font function once againLaurenz
2021-08-21Shorter/clearer field name for geometry typesLaurenz
Size { width, height } => Size { w, h } Spec { horizontal, vertical } => Spec { x, y } Gen { cross, main } => Gen { inline, block }
2021-08-19Refactor layouting a bitLaurenz
Notably: - Handle aspect ratio in fixed node - Inline constraint inflation into pad node
2021-08-17Library functions behave more imperativelyLaurenz
- Templates scope state changes - State-modifying function operate in place instead of returning a template - Internal template representation contains actual owned nodes instead of a pointer to a syntax tree + an expression map - No more wide calls
2021-08-17More logical ordering and namingLaurenz
2021-08-17Make percentages for h and v relative to area instead of font sizeLaurenz
2021-08-16Convert single-field structs to tuple structsLaurenz
2021-08-14Separate type for string valuesLaurenz
2021-08-13Add file information to spansLaurenz
2021-08-09New source loading architectureLaurenz
2021-07-30Fatal errorsLaurenz
- Makes errors fatal, so that a phase is only reached when all previous phases were error-free - Parsing still recovers and can produce multiple errors - Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import) - The single error that could occur during execution is removed for now - Removes Value::Error variant
2021-07-29Refactor stateLaurenz
2021-07-29Move font family and refactor alignmentLaurenz
2021-07-25Merge font and par state into text stateLaurenz
2021-07-11Simpler castingLaurenz
2021-07-10Remove warnings from parsing and castingLaurenz
2021-07-10Reference-count complex valuesLaurenz
Rename some nodes types
2021-07-10Eco string ๐ŸŒฑLaurenz
2021-06-29Make use of wide callsLaurenz
2021-06-27Fix capturing bugLaurenz
2021-06-26Add box and block functionsLaurenz
2021-06-26Remove unused template name fieldLaurenz
2021-06-26Cleanse libraryLaurenz
- Remove doc-comments for Typst functions from library - Reduce number of library source files
2021-03-10Move around library types ๐ŸššLaurenz
2021-02-12Cleaning ๐ŸงนLaurenz
2021-02-09Add arguments value ๐Ÿ“Laurenz
2021-02-09Split evaluation and execution ๐Ÿ”ชLaurenz
2021-02-07Dry-clean visitor with a macro ๐ŸœLaurenz
2021-02-06Generalize child of NodeBackground ๐ŸผMartin Haug
2021-02-06Merge `rect` and `box` ๐ŸฆšMartin Haug
2021-01-13Unbounded pages ๐ŸŒŒLaurenz
2021-01-10Braced content -> Bracketed templates โœLaurenz
2021-01-04Better value representations, type function ๐ŸŒLaurenz