Commit Graph

171 Commits

Author SHA1 Message Date
Laurenz b3615ccd49
A few CI and crate config changes (#3852) 2024-04-02 14:16:44 +00:00
Malo c4001662b6
Improve `repr` for `SequenceElem` (#3584) 2024-04-02 12:47:56 +00:00
Leedehai 1e645b3964
Fix `str.trim(regex,at:end)` when the whole string is matched (#3730) 2024-04-01 21:01:26 +00:00
frozolotl 82717b2869
Implement `to-dict` method on arrays (#3575) 2024-04-01 17:21:19 +00:00
Leedehai d1568a5583
Let `Repr` for `Relative<T>` print both abs + ratio (#3721) 2024-03-23 11:51:43 +00:00
frozolotl 2bc3c96bc9
Remove floating point rounding from colors (and more) (#3557) 2024-03-09 11:58:22 +00:00
frozolotl 879bd1a1ce
Add `chunks` method to array (#3539)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-03-04 09:03:35 +00:00
Myriad-Dreamin 030041466b
Provide more fine-grained spans in raw blocks (#3257)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-03-01 09:17:41 +00:00
frozolotl 9d8df00ffb
Implement alpha modification methods for colors (#3516)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-02-28 14:09:13 +00:00
Laurenz e16d3f5a67
Externalize assets (#3515) 2024-02-28 10:06:54 +00:00
frozolotl 79615a01bd
Improve color negation (#3500) 2024-02-27 11:15:17 +00:00
Laurenz 145723b1ef
New context system (#3497) 2024-02-27 10:05:16 +00:00
Laurenz ca5d682edb
Fix cast order for `ToInt` (#3485) 2024-02-25 11:50:11 +00:00
Laurenz 56ecd6c806
Wider callsite span (#3466) 2024-02-21 14:11:35 +00:00
Laurenz be49935753
Destructuring improvements (#3463) 2024-02-21 08:38:47 +00:00
f3rn0s f1495de8bb
Add module -> dictionary conversion (#3428)
Co-authored-by: f3rn0s <finn@volkis.com.au>
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Co-authored-by: Ilia <43654815+istudyatuni@users.noreply.github.com>
2024-02-20 13:55:06 +00:00
frozolotl d8aba7c4ff
Add alpha component to luma (#3438) 2024-02-20 13:01:11 +00:00
Laurenz 8ed1eff7b5
Fix text show-set regression (#3410) 2024-02-14 08:45:25 +00:00
Martin Haug 9f1e0390c1
Add color-managed CMYK to RGB conversion (#3288) 2024-02-12 13:03:36 +00:00
Leedehai 17d687b6a2
Better errors for array/dictionary method calls that return mutable (#3370) 2024-02-11 13:08:43 +00:00
Laurenz 302b870321
Delay errors for all show rules (#3323) 2024-02-05 09:56:09 +00:00
Leedehai 6a9866dc80
Update dictionary.insert() doc and tests (#3343) 2024-02-05 09:42:47 +00:00
Laurenz 92aba81a91
Support text show rules that match their own output (#3327) 2024-02-05 09:42:14 +00:00
Laurenz 2594b36701
Support for and/or selectors in show rules (#3326) 2024-02-02 14:25:19 +00:00
Laurenz 7d33436e55
Fix show-set semantics (#3311) 2024-02-01 13:30:17 +00:00
Laurenz b744b87818
Respect set rules in where selectors (#3290) 2024-01-30 14:24:41 +00:00
Heinenen ad901c2cdb
Syntax error if function name is parenthesized (#3058)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-01-16 08:52:56 +00:00
emilylime 4a65c2115b
Fix typos (#3126) 2024-01-05 14:12:27 +00:00
Sébastien d'Herbais de Thun 3aeb150c95
Added `to-absolute` method to length. (#3117)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-01-03 09:43:08 +00:00
Leedehai 39e53fcdc9
Clarify the way to access functions from dictionaries (#3064)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2024-01-02 09:13:45 +00:00
Heinenen c27b9e2b0f
Don't allow nested line comment inside block comment (#3048) 2023-12-30 13:01:05 +00:00
voidiz 4e5afa672f
Suggest accessing field if method doesn't exist (#2977) 2023-12-28 14:28:04 +00:00
Leedehai 99f32a45e5
Add a test to verify .with() applies to sinks (#3071) 2023-12-28 13:32:51 +00:00
PgBiel eb9dd539aa
Fix unnamed sinks not capturing named args (#2984) 2023-12-18 12:30:03 +01:00
Malo 7adeb49652
Improve number display (#2936) 2023-12-14 14:21:25 +01:00
Malo ce9d420472
Mention `str(<label>)` feature in documentation for `label` (#2906) 2023-12-11 17:03:26 +01:00
PgBiel 0ebce56b36
Implement lexicographic array comparison (#2827) 2023-12-05 19:15:03 +01:00
Laurenz aa23198ad9 A little less route nesting 2023-11-29 13:09:00 +01:00
Laurenz 2007f30b11 Better error message for named instead of positional argument 2023-11-28 18:55:03 +01:00
Leedehai c354f00f79
Add test cases to verify lexer's identifier validation (#2773) 2023-11-27 11:50:15 +01:00
Laurenz 85b1d1d4dd Rework `Vt` into `Engine`
- Moves as much data out of the `Vm`
- Removes duplication with call_vm and call_vt flavours
- Uses tracked chain instead of fixed int for determining max nesting depth
- This means that nesting checks now generalizes to layout and realization, to detect crashing show rules and overly nested layouts
2023-11-26 19:03:21 +01:00
frozolotl e5470401f4
Fix `has` on non-inherent fields (#2745) 2023-11-24 11:41:38 +01:00
frozolotl 55799f7395
Make `color.components`' alpha parameter named (#2734) 2023-11-21 18:05:12 +01:00
frozolotl b0e81d4b3f
Remove restrictions to chroma and improve clamping (#2690)
This PR does a few small things:
- Oklab's a*/b* and Oklch's chroma components can be as large as desired.
- In PDF, when encoding Oklab, the range is widened from [-0.4,0.4] to [-0.5,0.5].
- In PDF, clamping is now performed on Oklch's chroma instead of a* and b*.
  This causes hue not to be distorted when clamping.

SVG and PNG export remain unchanged:
- SVG itself never had any restrictions on chroma.
  We directly use the `oklab` and `oklch` CSS colors, which should work fine for the most part.
  In the future, embedded ICC profiles might be nice. Further research is likely necessary.
- While PNG does not support color spaces like Oklab or Oklch, certain useful features exist.
  One can define gamma (gAMA) and chromacities&whitepoint (cHRM) chunks and even embed ICC profiles.
  While `image` crate does not support these features for encoding, its backend crate `png` does support gAMA and cHRM.
  It does not allow embedding ICC profiles yet, though.

As it stands, to fully support wide gamuts and more accurate colors, more work is necessary.
This PR should help a bit though.
2023-11-17 10:41:45 +01:00
frozolotl d16ab29068
Make Oklab and Oklch chroma ratios relative to 0.4 (#2642) 2023-11-13 15:48:54 +01:00
TheJosefOlsson d25e6726e2
Add tests for shorthand (#2660) 2023-11-13 11:54:48 +01:00
frozolotl d93ed1b3d8
Implement Oklch support (#2611) 2023-11-10 10:31:06 +01:00
tingerrr 5f922abfd8
Add hints for invalid identifier errors (#2583) 2023-11-07 12:14:20 +01:00
Samuel Tardieu e550f0a8f7
Prevent silent swallowing of return expressions trailing arguments (#2545)
Fixes #2104
2023-11-06 21:42:38 +01:00
Matt Fellenz 8fd546760c
Implement dict key interpolation (#2559) 2023-11-02 17:08:08 +01:00