Laurenz
d1ecb7e52e
Add move
function
2021-10-28 16:51:57 +02:00
Laurenz
5c534fb428
Simplify node construction
2021-10-26 17:14:11 +02:00
Laurenz
fb0cd3df6e
Fr in stack and par
2021-10-26 14:56:10 +02:00
Laurenz
3968181622
Replace ..
syntax with range
function
2021-10-25 13:38:32 +02:00
Laurenz
5becb32ba4
Introduce page / block / inline levels
2021-10-23 20:23:47 +02:00
Laurenz
c627847cb3
Remove directions from grid
2021-10-23 20:22:47 +02:00
Laurenz
6690bc2354
Revise block node contract
...
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-23 20:22:47 +02:00
Laurenz
1e74f7c407
New ShapeNode
...
Replaces `BackgroundNode` and `FixedNode`
2021-10-23 20:22:47 +02:00
Laurenz
5f4dde0a6b
Remove inline alignment from stack
...
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-23 20:22:47 +02:00
Laurenz
9ac125dea8
Rename State
to Style
and move it into its own module
2021-10-10 21:04:10 +02:00
Laurenz
58d1cc68d9
Let h
, v
and pagebreak
return template
2021-10-05 19:30:12 +02:00
Laurenz
155673c15e
Paper longhand for page function
2021-10-05 19:23:45 +02:00
Laurenz
c25c6a35b2
Simpler and more versatile row and column gutter arguments
2021-10-02 19:35:02 +02:00
Laurenz
ed0c804017
Add spacing capabilities to stack function
...
- Named argument `spacing` controls spacing between any two template arguments
- Arbitrary linears in the list can produce arbitrary spacing
2021-09-27 22:23:26 +02:00
Laurenz
e10b3d838a
Fix panic due to bad alignments in stack function
2021-09-27 13:45:18 +02:00
Laurenz
f592662aa0
Rename Arguments
to Args
2021-09-10 12:27:33 +02:00
Laurenz
e4e79990da
Allow body for font function once again
2021-08-29 15:09:54 +02:00
Laurenz
c0377de653
Shorter/clearer field name for geometry types
...
Size { width, height } => Size { w, h }
Spec { horizontal, vertical } => Spec { x, y }
Gen { cross, main } => Gen { inline, block }
2021-08-21 19:08:47 +02:00
Laurenz
a6f260ca39
Refactor layouting a bit
...
Notably:
- Handle aspect ratio in fixed node
- Inline constraint inflation into pad node
2021-08-19 15:52:15 +02:00
Laurenz
594809e35b
Library functions behave more imperatively
...
- 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-17 22:20:37 +02:00
Laurenz
c53d98a22f
More logical ordering and naming
2021-08-17 12:49:48 +02:00
Laurenz
9a798ce6f6
Make percentages for h and v relative to area instead of font size
2021-08-17 00:17:28 +02:00
Laurenz
9462fb17b3
Convert single-field structs to tuple structs
2021-08-16 19:15:03 +02:00
Laurenz
6ae6d86b9c
Separate type for string values
2021-08-14 15:55:39 +02:00
Laurenz
144f208821
Add file information to spans
2021-08-13 14:33:58 +02:00
Laurenz
3932bb2cb9
New source loading architecture
2021-08-09 11:26:41 +02:00
Laurenz
1ee1d078e2
Fatal errors
...
- 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-30 18:49:19 +02:00
Laurenz
2c6127dea6
Refactor state
2021-07-29 13:28:19 +02:00
Laurenz
7d15dc634b
Move font family and refactor alignment
2021-07-29 12:28:54 +02:00
Laurenz
c97b3078eb
Merge font and par state into text state
2021-07-25 12:10:44 +02:00
Laurenz
9fe9b95b7f
Simpler casting
2021-07-11 13:20:53 +02:00
Laurenz
891e0c5fa6
Remove warnings from parsing and casting
2021-07-10 23:14:46 +02:00
Laurenz
6a4823461f
Reference-count complex values
...
Rename some nodes types
2021-07-10 23:10:17 +02:00
Laurenz
36b3067c19
Eco string 🌱
2021-07-10 13:07:39 +02:00
Laurenz
32a6b673bc
Make use of wide calls
2021-06-29 13:49:50 +02:00
Laurenz
f64c772b6d
Fix capturing bug
2021-06-27 12:05:36 +02:00
Laurenz
d53c933e4d
Add box and block functions
2021-06-26 15:47:37 +02:00
Laurenz
784018124d
Remove unused template name field
2021-06-26 15:35:37 +02: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
b0446cbdd1
Move around library types 🚚
2021-03-10 17:22:44 +01:00
Laurenz
790dc9e667
Cleaning 🧹
2021-02-12 22:55:26 +01:00
Laurenz
f9197dcfef
Add arguments value 🏓
2021-02-09 22:56:44 +01:00
Laurenz
06ca740d01
Split evaluation and execution 🔪
2021-02-09 19:46:57 +01:00
Laurenz
c80e13579f
Dry-clean visitor with a macro 🏜
2021-02-07 13:14:28 +01:00
Martin Haug
a6cae89b47
Generalize child of NodeBackground 🍼
2021-02-06 12:54:44 +01:00
Martin Haug
80e076814d
Merge rect
and box
🦚
2021-02-06 12:30:44 +01:00
Laurenz
272a4c2289
Unbounded pages 🌌
2021-01-13 23:19:44 +01:00
Laurenz
105cda0e69
Braced content -> Bracketed templates ✏
2021-01-10 21:38:58 +01:00
Laurenz
2e77b1c836
Better value representations, type function 🌐
2021-01-04 21:29:15 +01:00
Laurenz
aae67bd572
Move and rename many things 🚛
2021-01-03 00:12:09 +01:00