Commit Graph

85 Commits

Author SHA1 Message Date
Laurenz a7b403fd74 Rename `Node` to `Template` 2022-02-02 16:02:23 +01:00
Laurenz 20b1a38414 Switch from `Rc` to `Arc` 2022-01-31 16:47:00 +01:00
Laurenz e74ae6ce70 Make all nodes into classes 2022-01-08 00:20:48 +01:00
Laurenz f7e8624b4c Refactor 2022-01-05 15:06:42 +01:00
Laurenz f174134aa2 Style chains 2021-12-30 12:12:19 +01:00
Laurenz f5dcb84e36 Make clippy a bit happier 2021-12-30 12:00:12 +01:00
Laurenz bd304b99e5 Tidying 2021-12-28 13:41:26 +01:00
Laurenz ae38be9097 Set Rules Episode IV: A New Fold 2021-12-15 11:11:57 +01:00
Laurenz fe21c4d399 Set Rules Episode III: Revenge of the packer 2021-12-09 13:42:52 +01:00
Laurenz 40b87d4066 Set Rules Episode II: Attack of the properties 2021-12-07 16:36:39 +01:00
Laurenz 26bdc1f0f6 Set Rules Episode I: The Phantom Style 2021-12-05 12:54:03 +01:00
Laurenz e36b8ed374 Layout bugfixes 2021-11-29 12:06:38 +01:00
Laurenz 50bd863471 More independent placed node 2021-11-26 23:51:18 +01:00
Laurenz 3a15922d2f X/Y abstractions 2021-11-26 16:32:06 +01:00
Laurenz 393d74f9bb Layout improvements 2021-11-25 20:51:16 +01:00
Laurenz 304d9dd110 Small style changes 2021-11-24 17:00:10 +01:00
Laurenz c77c5a0f0a Simpler alignment resolving 2021-11-23 14:25:50 +01:00
Laurenz 4f9e5819bb 2d alignments with plus operator 2021-11-23 12:45:20 +01:00
Laurenz d3f6040ced Horizon alignment 2021-11-23 11:58:16 +01:00
Laurenz b2e6a29789 Refactoring 2021-11-18 00:58:32 +01:00
Laurenz 095fa52be5 Placed node 2021-11-17 23:09:23 +01:00
Laurenz 89f2e71852 Align node 2021-11-17 17:09:19 +01:00
Laurenz 5b344b663a Reorganize modules
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-31 15:52:35 +01:00
Laurenz 285c2f617b Cleanse library
- Remove doc-comments for Typst functions from library
- Reduce number of library source files
2021-06-26 13:06:37 +02:00
Laurenz 63cf361496 Make font take everything as keyword arguments 2021-06-25 18:14:19 +02:00
Laurenz 8b6391040e Remove eat_ prefix 2021-06-18 11:58:43 +02:00
Laurenz 118fc1014b Leaner argument parsing 2021-05-18 21:32:40 +02:00
Laurenz 7025590405 Rename _new to new and typify to value 2021-05-18 16:53:11 +02:00
Laurenz 57ca9628c1 Better space coalescing logic 🌧
This creates a smaller state machine helper type for softness coalescing, which does not own the resulting nodes. While this creates a bit more duplication in stack and par builder, it makes it a lot easier to integrate additional logic into the paragraph builder.

Furthermore:
- Line breaks are now "hard", that is, not coalesced with each other.
- Text nodes with equal style are now merged allowing for example `f{}i` to form a ligature.
2021-03-27 21:52:39 +01:00
Laurenz 76fc4cca62 Refactor alignments & directions 📐
- Adds lang function
- Refactors execution context
- Adds StackChild and ParChild enums
2021-03-25 21:32:33 +01:00
Laurenz 5e08028fb3 Syntax functions 🚀
This adds overridable functions that markup desugars into. Specifically:
- \ desugars into linebreak
- Two newlines desugar into parbreak
- * desugars into strong
- _ desugars into emph
- = .. desugars into heading
- `..` desugars into raw
2021-03-21 17:50:56 +01:00
Laurenz 264a7dedd4 Scheduled maintenance 🔨
- New naming scheme
  - TextNode instead of NodeText
  - CallExpr instead of ExprCall
  - ...
- Less glob imports
- Removes Value::Args variant
- Removes prelude
- Renames Layouted to Fragment
- Moves font into env
- Moves shaping into layout
- Moves frame into separate module
2021-03-19 17:57:31 +01:00
Laurenz 6bd1a494e0 Formatting and documentation 2021-03-17 23:29:58 +01:00
Laurenz ceb00a2e77 Factor out alignment deduplication into separate function ♻ 2021-03-13 16:57:15 +01:00
Laurenz c3acb491e3 Refactor execution context 🏗
- The execution context is a lot more structured: Instead of a magic stack of arbitrary objects there are static objects for pages, stacks and paragraphs
- Page softness/keeping mechanic is now a lot simpler than before
2021-03-12 14:16:59 +01:00
Laurenz 584a43277d Rename ChildAlign to LayoutAligns ✏ 2021-03-12 14:12:30 +01:00
Laurenz b0446cbdd1 Move around library types 🚚 2021-03-10 17:22:44 +01:00
Laurenz 11e44516fa Merge some modules 🥞 2020-11-25 16:56:29 +01:00
Laurenz ee38c6aa9a Allow configuration of directions in page and box ↗ 2020-10-19 13:05:54 +02:00
Laurenz 91e5120693 BoxAlign and Flow aliases ✏ 2020-10-13 13:51:58 +02:00
Laurenz f29207d999 Strongly typed groups 👔 2020-10-12 22:06:28 +02:00
Laurenz 92c01da360 Switch back to custom geometry types, unified with layout primitives 🏞 2020-10-10 22:19:36 +02:00
Laurenz 537545e7f8 Evaluation and node-based layouting 🚀 2020-10-07 17:07:44 +02:00
Laurenz 4252f959f7 Typesafe conversions in stack & line layouters 🍮 2020-10-06 18:27:00 +02:00
Laurenz c6a6870978 Rename secondary/primary to main/cross ✏ 2020-10-06 13:13:18 +02:00
Laurenz 93eaafb236 Tidy up align function 🧺 2020-10-05 16:06:25 +02:00
Laurenz fa3e2920c0 Remove @ syntax in diagnostics macros 🗑 2020-10-05 15:45:45 +02:00
Laurenz 335fa2d118 Small improvements 🍪 2020-10-04 23:31:35 +02:00
Laurenz 605ab104c5 Better argument parsing 🥙 2020-10-04 22:36:20 +02:00
Laurenz f4460f8abd Style nits 🎈 2020-10-04 19:21:35 +02:00