UNPKG

37.9 kBMarkdownView Raw
1# Changelog
2
3## 2.0.0-alpha.203
4
5* Fixed regression with negated breakpoint modifiers like `display@!600:none`
6
7## 2.0.0-alpha.202
8
9* Fixed performance regression for tag trees introduced in alpha 191
10
11* Fixed compilation of css properties wrapped in parenthesis
12
13* Make unresolved decorators resolve to `imba.@decorator`
14
15 ```imba
16 class Order
17 @lazy get lines
18 ...
19 ```
20
21 If `@lazy` is not found in the file above, the compiler will essentially include
22 `import {@lazy} from 'imba` when compiling.
23
24* Introduced experimental state management decorators
25
26 A minimal set of decorators heavily inspired by MobX that allows you to mark classes
27 and objects as observable, and run code upon changes. This feature will be kept under
28 wraps until it has been battle-tested.
29
30## 2.0.0-alpha.201
31
32* Fixed regression where css colors `rgb(0 0 0 / alpha)` would compile incorrectly
33
34## 2.0.0-alpha.200
35
36* Allow `@hotkey('*')` to listen to all hotkey events
37
38 This is perfect for disabling all other hotkeys in certain contexts.
39
40 ```imba
41 tag ConfirmDialog
42 # when this dialog is mounted - all hotkey handlers preceding
43 # it in the dom tree will be blocked by the `*` listener
44 <self @hotkey('*').global>
45 <button @hotkey('esc')> "Cancel"
46 <button @hotkey('enter')> "Ok"
47 ```
48
49* Automatically wrap style expressions in `calc()`
50
51 ```imba
52 css div width: calc(100vw - 40px)
53 # can now be written as
54 css div width: 100vw - 40px
55 ```
56
57* Make bind=data.property work for textarea when value is `undefined`
58
59* Allow nested parentheticals in css calc
60
61* Fixed issue where removing class names using `el.flags.remove` would not work
62
63* Made `@touch.flag` support selector in second argument to match `@event.flag`
64
65* Allow second argument to `el.flags.incr(flag, dur = 0)`
66
67 With this argument you can automatically decrement the flag after a certain duration.
68
69* Allow negated style modifiers
70
71 ```imba
72 css div
73 @!hover o:0.5 # div:not(:hover) { opacity: 0.5 }
74 @!md d:none # @media (max-width: 767px) { div { display:none } }
75 # also works for classes
76 css div
77 @.!disabled o:0.5 # div:not(.disabled){ opacity:0.5 }
78 ```
79
80## 2.0.0-alpha.199
81
82* Fix regression where content of `<teleport>` and `<global>` was not rendered (#643)
83
84## 2.0.0-alpha.198
85
86* Change how css specificity is forced in generated selectors
87
88 Older browsers do not support complex selectors within `:not()`, so the style `:not(#_#_#_)` which is used for "inline" styles would not work in these browsers. We have now reverted to using multiple not selectors like `:not(#_):not(#_):not(#_)`. This is more verbose but the size is negligible, especially with compression. Debugging styles in the browser is a bit more clumsy.
89
90* Change css specificity for component rules
91
92 Selectors inside tag declarations are now compiled with a higher specificity than global selectors.
93
94 ```imba
95 tag App
96 # scoped selectors have higher precedence than global styles
97 css .selector d:block
98 ```
99
100* Fixed case where a generated class-name is added multiple times on elements
101
102## 2.0.0-alpha.197
103
104* Fixed issue with bracketless multiline object and certain operators
105
106 ```imba
107 let x = null
108 x ||=
109 one: 1
110 two: 2
111 # would previously compile incorrectly to x ||= {one: 1}
112 ```
113
114## 2.0.0-alpha.196
115
116* Introduced `@event.closest(sel)` modifier
117
118 Works like `@event.sel(selector)`, but checks for `target.closest(...)` instead of `target.matches(...)`.
119 In the cases where you want to just handle clicks that do _not_ match a selector you can negate the modifier using `.!closest(...)`.
120
121 ```imba
122 tag App
123 <self>
124 # all clicks outside of button tags
125 <div @click.!closest('button')>
126 <button> <span> "Click"
127 <p> "blabla"
128 ```
129
130## 2.0.0-alpha.195
131
132* Fixed compilation issue for functional tags without arguments
133
134* Throw error when trying to use bind on functional tags
135
136## 2.0.0-alpha.194
137
138* Improved syntax for functional tags
139
140 If you supply `()` after a tag name, Imba will now treat it as a functional tag. Ie, `<some-name(1,2)>` is equal to `<( some-name(1,2) )>`. The old syntax may be phased out before final release.
141
142 ```imba
143 def List items
144 return if items.length == 0
145
146 <section>
147 <slot>
148 <ul> for item in items
149 <li> item.title
150
151 tag App
152 def head
153 <header> <slot> <h2> "Welcome"
154
155 <self>
156 <head()>
157 <List(data.newest)> <h2> "Newest posts"
158 <List(data.all).large> <h2> "All posts"
159 ```
160
161## 2.0.0-alpha.193
162
163* Fix issue where parts of runtime was incorrectly tree-shaked
164
165* Always resolve `node:*` imports as external
166
167* Include changelog.md in npm package
168
169## 2.0.0-alpha.191
170
171There will likely be a few more alpha releases fixing regressions and issues related to the new features in alpha 191, but after these potential issues have been resolved we're moving to beta 🥳! This release does contain a few breaking changes, both in relation to styles and memoization. We'll update the docs at imba.io and publish a screencast going over the changes to make it easier to transition to this new version. Changes;
172
173* Rename $key to key
174
175 To give elements a stable identity (usually inside lists) you should now use `<el key=value>` instead of `<el $key=value>`. `$key` is deprecated and will be removed in `beta.1`.
176
177* Allow using any object as `<element key=...>` value
178
179 Keyed elements now use a `Map` instead of a plain object to keep track of unique elements. This means that any value (both objects and primitive values) may be used as keys.
180
181 ```imba
182 const items = [{title: "One"},{title: "Two"}]
183
184 tag App
185 <self> for item in items
186 # objects themselves can be used as keys now
187 <AppItem key=item data=item>
188 ```
189
190* New (improved) syntax for rendering functional components / tag trees
191
192 This was the main change holding us back from reaching beta, as it is a breaking change for most users. When you want to include external live dom elements from getters or methods outside of the render-tree, wrap the expression in `<(expression)>`.
193
194 Besides simplifying the way memoization works it also allows you to add classes and styles to these external fragments, making it vastly more flexible than before.
195
196 ```imba
197 tag App
198 get body
199 <div> "This is body"
200
201 def list title, items
202 <section>
203 <h2> title
204 <ul> for item in items
205 <li> item.title
206
207 <self>
208 <( body )>
209 <( list 'Top', data.popular ).large [mt:2]>
210 <( list 'New', data.posts.slice(0,10) )>
211 ```
212
213* Log warnings to console when building/running without minification
214
215 Added runtime checks that notify about erroneous behaviour when building/running w/o minification. Initially it will only warn about non-memoized elements being created during rendering. Eventually we'll use these conventions to add much more elobrate checks and readable error messages for the most common issues users can run into.
216
217* Allow instantiating elements w/o memoization using `new`
218
219 Imba will automagically allow any element (literal tag) in any method to be memoized.
220
221 ```imba
222 def wrap text
223 let div = <div.item> text
224 return div
225
226 imba.mount do <section>
227 <( wrap "One" )>
228 <( wrap "Two" )>
229 ```
230
231 If you call a method or access a getter that returns an element (like `def wrap`) it will look up a memoization context and just reuse/update the div for that particular context. If you call it directly without being in a context, Imba will warn you. There are however some situations where you actually just want to create new elements. In this case, use `new` in front of the element. If the root is not memoized, the children won't either, so you only need to add `new` in front of the top element.
232
233 ```imba
234 def wrap text
235 let div = new <div.item> text
236 return div
237 ```
238
239* Allow non-global tag types in dynamic tag names
240
241 Local tag types are now allowed in `<{tag-type} ...>` syntax. Previously it would only work when `tag-type` evaluated to a string, and there was a globally defined web component or native tag with that name. Now it works with classes as well.
242
243 ```imba
244 import {PostView,ArticleView} from './views'
245
246 const items = [
247 { type: Post, title: "My post"}
248 { type: Article, title: "My article"}
249 ]
250
251 tag App
252 <self>
253 for item in items
254 <{item.type} data=item>
255 ```
256
257* Only allow named elements inside `<self>`
258
259 Using named elements (`<div$myname>`) outside of self would previously introduce subtle bugs and conflicts. They are now only allowed inside of `<self>`.
260
261* Changed css specificity
262
263 Styles declared in tag declaration body now has lower specificity than class selectors.
264
265 ```imba
266 css .warn hue:red
267 css .large p:4 fs:lg
268
269 tag Button
270 css p:2 fs:sm hue:blue
271
272 # styles from classes take precedence
273 <Button.warn.large>
274 ```
275
276* Scoped selectors no longer applies to self
277
278 Now, selectors like `.warn` declared in tag declaration body only applies to elements _inside_ `Button`, not the button itself. To target the button itself, use `&` in the selector.
279
280 ```imba
281 tag Button
282 css bg:blue2
283 css .warn bg:red2
284 css &.large fs:lg
285
286 <self.warn.large> "Still blue bg - but large"
287 ```
288
289* Add `declare` keyword for declaring fields (with type annotations) without generating any code for that field
290
291 ```imba
292 class Foo
293 declare a\number
294 ```
295
296* Allow multiline conditionals when lines start with `and`,`or`,`||`, or `&&`
297
298 This is a temporary solution for a larger challenge. It simply ignores new-lines whenever your line starts with these operators.
299
300 ```imba
301 if condition
302 and test
303 or force
304 return ...
305 ```
306
307* Allow third argument in `for in` loops referencing length
308
309 If you need to know the length of a collection you are iterating over, you can now access the total length of the collection by supplying a third argument. This is not available in `for of`, only `for in`.
310
311 ```imba
312 for member,index,len in list
313 # len refers to the length of the iterable list
314 if index == len - 1
315 yes # this is the last element
316 ```
317
318* Exposed `imba.hotkeys.humanize` for converting hotkey combos to readable shortcuts
319
320* Exposed `imba.hotkeys.htmlify` for converting hotkey combos to readable shortcuts as html
321
322
323## 2.0.0-alpha.190
324
325* Fixed regression related to implicit parenthesis in tag trees
326
327* Renamed `@hotkey.capture` to `@hotkey.force`
328
329## 2.0.0-alpha.189
330
331* Introduced `@hotkey.repeat` modifier
332
333 When a user presses a key and then keeps holding it, keydown/keypress
334 events will be generated every n milliseconds. For hotkeys you usually
335 only want to trigger once when the user press the combination.
336
337 If you want the handler to keep firing while user holds down the keys
338 you can now use the `.repeat` modifier:
339
340 ```imba
341 # will only toggle when pressing space, no matter how long you
342 # keep it pressed.
343 <div @hotkey('space')=togglePlayback>
344 # holding the right arrow will call fastForward repeatedly
345 <div @hotkey('right').repeat=fastForward>
346 ```
347
348* Changed rules for implicit parenthes / calling in tag trees
349
350 Indented code under a tag-tree will no longer be compiled as an invocation.
351
352 ```imba
353 <div> data.name
354 "something"
355 if data.name
356 "something"
357 ```
358
359 The code above would previously compile to div `data.name("something")`. Now
360 indentation in tag trees will behave like they do in statements like if/for/while etc.
361 This fixes #630, so you can now add css blocks like this:
362
363 ```imba
364 <div> data.name
365 css d:block # style for the div
366 ```
367
368* Added `@first-child` and `@last-child` css modifiers
369
370 We already have `@first` and `@last` as shorter aliases, but since all other standard pseudo-selectors exist it makes sense to include the longer versions of these as well.
371
372* Fixed issue with nested loops in tag trees
373
374 It is now possible to use nested loops without wrapping the inner loops in a fragment.
375
376 ```imba
377 <div>
378 for item in data.items
379 for label in item.labels
380 <div> label
381 ```
382
383* Allow declaring variables and global tags with the same name
384
385 Global web components should not be registered as regular variables.
386 Previously the compiler would throw an error if `tag app` and `let app = ...`
387 were declared in the same file.
388
389* Allow optional chaining with dynamic keys - #638
390
391 ```imba
392 user..[key]
393 ```
394
395* Mark imported SVGs as @__PURE__
396
397 This allows efficient tree-shaking so that one can include all icons from a collection
398 and only bundle the ones that are used.
399
400 ```imba
401 import * as icons from 'imba-codicons'
402
403 <svg src=icons.volume-up>
404 # you get completions and previews for all icons, but only volume-up
405 # will be bundled in your code now
406 ```
407
408* Don't round x,y in `@touch.reframe` and `@touch.fit` by default (#639)
409
410## 2.0.0-alpha.187
411
412* Call `dehydrate` on compononents when rendering components from the server.
413
414* Updated type declarations.
415
416## 2.0.0-alpha.186
417
418* Don't add html class name for named elements
419
420 Previously when naming an element like `<div$title> ...`, imba would automatically
421 add a `title` class name to the element. This can lead to confusing issues. If you
422 have used this undocumented behaviour previously you just need to add the class
423 yourself, like `<div$title.title>`.
424
425* Introduced `@mouse.mod` modifier
426
427 Since Mac and Windows/Linux use different keyboard modifiers for most standard actions
428 (ctrl+c,ctrl+s,ctrl+click) vs (⌘c,⌘s,⌘+click) etc, it makes sense to have an event
429 modifier that takes care of checking the platform. `@mouse.mod` will return true of
430 ⌘ is pressed on mac, and Ctrl is pressed on all other platforms.
431
432 ```imba
433 <div @click.mod.stop=openInNewWindow @click=openHere>
434 ```
435
436* Fixed bug in `@event.throttle` modifier
437
438## 2.0.0-alpha.183
439
440- Remove unneeded class names on tags when building
441
442## 2.0.0-alpha.182
443
444- Fixed issues with using event modifiers with external imba library
445
446## 2.0.0-alpha.177
447
448- Added type declarations into typings/
449
450## 2.0.0-alpha.176
451
452- Deprecated `@touch.moved-dir`
453
454 The direction of the `@touch.moved` modifier can now be specified in the second argument of `@touch.moved` instead of as 6 separate modifiers. These are not used that often and it seems natural to keep inside a single modifier instead.
455
456 ```imba
457 <div @touch.moved-left(4px)> # before
458 <div @touch.moved(4px,'left')> # after
459 ```
460
461- Renamed style property `tint` to `hue`
462
463 Hue is a better name for the newly introduced `tint` style property.
464
465 ```imba
466 # hue can be set to any named color from the imba color palette
467 <div[hue:orange]>
468 <h1[color:hue7]> # refer to a shade/tint of the aliased color
469 ```
470
471- Refactored event modifiers
472
473 Foundations to allow defining custom event modifiers down the road. Complex modifiers have access to the context in which it was called, including a state-object that is persisted across events etc. Documentation fo this will be in place before 2.0 final. As an example, a tiny `@keydown.f1` modifier for only passing through F1 can be defined like this:
474
475 ```imba
476 extend class KeyboardEvent
477
478 def @f1
479 return keyCode == 112
480 ```
481
482- Changed behavior of `@event.throttle` modifier
483
484 `throttle` would previously fire once and suppress subsequent events for a certain duration (default 250ms). Now it will re-fire at the end of the throttling if there were any suppressed events during the initial throttle. For events like `@resize` and `@scroll` where you just want to limit how often they fire, the new behavior is much more useful.
485
486 ```imba
487 # handler will be called immediately upon scrolling and keep emitting
488 # every 100ms until there are no more scroll events.
489 <div @scroll.throttle(100ms)=handler>
490
491 # So, clicking this button twice will trigger once immediately,
492 # and then again after 1 second. Previously the second click would
493 # never trigger.
494 <div @click.throttle(1s)=handler>
495 ```
496
497- Introduced `@event.cooldown` modifier
498
499 The old `throttle` was renamed to `cooldown`. Ie, if you want subsequent button clicks to be suppressed for `n` time (250ms default) you should now use `cooldown` instead of `throttle`.
500
501 ```imba
502 # So, clicking this button twice will trigger once immediately, and
503 # the next click will be ignored as long as it happens less than a second later
504 <div @click.cooldown(1s)=handler>
505 ```
506
507- Allow negated event modifiers
508
509 Certain event modifiers are called guards, like `@keydown.enter`, `@click.self` etc. These are modifiers that essentially evaluate to true/false and decides whether to continue handling an event or not. `@click.self` would only trigger if the target of the event is the same as the element to which the `@click` is bound. Now you can include a `!` in front of any such event handler to only continue if the guard is false.
510
511 Ie. `<div @click.!shift=...>` would only trigger if shiftKey is _not_ pressed.
512
513 ```imba
514 # Only call handler if shiftKey is NOT pressed
515 <div @click.!shift=handler>
516
517 # Only call handler if target does NOT match the selector
518 <div @click.!sel('.active')=handler>
519 ```
520
521- Introduced `@mouse.left`, `@mouse.middle`, and `@mouse.right` modifiers
522
523 Only trigger if the left,middle, or right mouse button is pressed. Works for all mouse and pointer events, as well as the custom `@touch` event.
524
525 ```imba
526 # Only call handler if the middle mouse button was pressed
527 <div @click.middle=handler>
528
529 # Only start touch handling if the right mouse button was pressed
530 <div @touch.right=handler>
531 ```
532
533- Introduced `@intersect.flag` modifier
534
535 The `flag` modifier now works differently for `@intersect` event. It will add a css class to the element when it is intersecting and remove it whenever it is not intersecting.
536
537 ```imba
538 # the html class showing will be present on div
539 # whenever it is intersecting with the viewport
540 <div @intersect.flag('showing')>
541 ```
542
543- Introduced `@touch.end` modifier
544
545 The `end` guard breaks unless the touch is in its ending state.
546
547 ```imba
548 # handler is only called at the end of the touch
549 <div @touch.end=handler>
550 # handler is only called at the end of the touch if pointer moved
551 <div @touch.moved.end=handler>
552 ```
553
554- Introduced `@touch.hold(dur=1000ms)` modifier
555
556 The `hold` modifier allows you to require an element to be pressed for some time (default 1000ms) until it starts allow events to come through.
557
558 ```imba
559 # handler is only called once the touch has been held for 1000ms
560 <div @touch.hold=handler>
561 # handler only called if ctrl was pressed and touch held for 250ms
562 <div @touch.ctrl.hold(250ms)=handler>
563 ```
564
565
566- Introduced `@touch.apply(target,xprop='x',yprop='y')` modifier
567
568 Like `@touch.sync` but just setting the x,y values on an object directly instead of adding to the previous values.
569
570 ```imba
571 const obj = {}
572 # apply is essentially shorthand for setting properties:
573 <div @touch.apply(obj)>
574 <div @touch=(obj.x = e.x, obj.y = e.y)>
575 ```
576
577
578- Added `@event.key(keyOrCode)` modifier for keyboard events
579
580 KeyboardEvent.keyCode is deprecated but still useful in many cases. If you supply a number to the modifier it will stop handling if `keyCode` does not match this number.
581
582 ```imba
583 # Only trigger if F1 is pressed (event.keyCode==112)
584 <div @keydown.key(112)=handler>
585 ```
586
587 If you supply a string it will compare it against KeyboardEvent.key.
588
589 ```imba
590 # Only trigger if PrintScreen is pressed (event.key=='PrintScreen')
591 <div @keydown.key('PrintScreen')=handler>
592 ```
593
594- Changed behavior of `@touch.moved` modifier
595
596 Now, if you add a `moved-left(threshold = 4px)` modifier, the event handling will be cancelled if the touch has moved more in any other direction (in this case up,down, or right) _before_ moving 4px left.
597
598 ```imba
599 # If user moves more than 10px up/down before left/right
600 # the touch will not be handled
601 <div @touch.moved-x(10px)=draghandle>
602 ```
603
604- Improved behaviour of `@touch` and `@click` events
605
606 `@click` events on nested children of an element with a `@touch` handler would previously be prevented. This made `@touch` pretty challenging to use for things like dragging elements with buttons etc.
607
608 Now `@click` events will be triggered unless the `@touch` handler has a `prevent` modifier, a `moved(-x|y|up|down)` modifier that has activated, or a `hold` modifier that has activated.
609
610 ```imba
611 # button click is triggered onless touch is held more than 500ms
612 <li @touch.hold(500ms)=draghandle> <button @click=handle>
613 ```
614
615- Improved behaviour of `@touch` and scrolling on touch devices
616 Previously, scrolling (and clicking) would be disabled for any element with a `@touch` handler on iOS. Ie. if you added `@touch` to a custom slider, scrolling would not work if the user happened to touch down on the slider while flicking down the page.
617
618 Scrolling is disabled by the `prevent` modifier, an activated `moved` modifier or activated `hold` modifier.
619
620 ```imba
621 # Scrolling will now work fine when touching the div and flicking up/down.
622 # Only if the user holds still on the element for 500ms will scrolling and
623 # default behavior be prevented.
624 <div @touch.hold(500ms)=draghandler>
625 ```
626
627- Add support for additional file extensions in bundler (webm, weba, avi, mp3, mp4, m4a, mpeg, wav, ogg, ogv, oga, opus, bmp)
628
629## 2.0.0-alpha.175
630- Fix: `@in` transitions for nested elements works
631- Experimental support for tweening from/to implicit width/height in transitions
632- Experimental `@resize.css` modifier to automatically enable size units
633- Allow variables in color opacity like `color:blue4/$alpha`
634- Experimental support for `tint:colorname` and using `tint0-9` colors in styles
635
636## 2.0.0-alpha.174
637- Named elements (`<div$myname>`) exist immediately in components
638- Fix: Spread operator works for any expression in objects
639- Fix: Make sure ::before/after comes last in selectors with other pseudo-classes>
640- Fix: Allow symbol keys in `prop/attr #my-sym-key`
641
642## 2.0.0-alpha.173
643
644- Fix: Allow binding tag properties to symbol identifiers
645- Report correct location for "Cannot redeclare variable" error (#114)
646- Experimental support for `@hotkey` events
647- Fix: Don't run `imba.commit` on unhandled events>
648- Added `@trusted` event guard
649- Added `@trap` event modifier
650
651## 2.0.0-alpha.172
652
653- Fix: Rendering list inside conditional
654- Support css blocks inside conditionals in tag trees
655- Warn about interpolated style values outside of tag trees
656- Improved specificity for nested css rules
657
658## 2.0.0-alpha.171
659
660- Fix: Make `<global @resize>` work correctly
661- Fix: Variable resolution for `let item = do ... item()`
662- Fix: Allow ternary in tag trees
663- Fix: Allow `condition && <tag>` in tag trees
664- Fix: Ternary parsing `cond ? <div> "a" : "b"`
665
666## 2.0.0-alpha.170
667
668- Added `@in` style modifier for specifying in-only transitions
669- Renamed transition hooks to `transition-(in|out)-(end|cancel)`
670- Using `<button bind=prop>` without a value acts like `<button bind=prop value=yes>`
671
672## 2.0.0-alpha.169
673
674- Fix: Various dom regressions in SSR
675- Updated default ease duration to 300ms
676
677## 2.0.0-alpha.168
678
679- Use setAttribute('class') under the hood for svg elements
680- Added `#afterVisit`, `#beforeReconcile`, `#afterReconcile` hooks
681- Added experimental easing via `<my-element ease>`, with element hooks
682 `#ease-enter`, `#ease-entered`, `#ease-enter-cancel`, and
683 `#ease-exit`, `#ease-exited`, `#ease-exit-cancel`
684- Added `ease/e`,`ease-opacity/eo`,`ease-transform/et` and `ease-colors/ec`
685 style properties for experimental easing feature
686- Fix: Passing slots into child components (#607)
687- Allow using setters on `#context`
688
689## 2.0.0-alpha.167
690
691- Add support for generic media selectors via `@media(some-media) ...`
692- Fix: Interpolated numeric value for `rotate:{val}` works i FF
693- Add @all and @speech style modifiers (for @media all/speech)
694- Fix: Allow empty css selectors
695- Fix: Rebuilt prebuilt imba.mjs for web
696
697## 2.0.0-alpha.166
698
699- Add experimental support for class decorators
700- Fix: Apply display:block to global tags without dashed name
701- Change: `inset:*` style shorthand sets `position:absolute`
702- Added `<teleport to=(sel/element)>` component (#606) by @haikyuu
703
704## 2.0.0-alpha.165
705
706- Reorganize prebuilt files for jspm support
707
708## 2.0.0-alpha.157
709
710- Add jspm configuration in package.json
711
712## 2.0.0-alpha.156
713
714- Add #**inited** hook for class instance initialization
715- All custom components defaults to display:block
716- Fix: Don't inject hmr.js script into html assets when building
717- Fix: Generate html files in public directory
718
719## 2.0.0-alpha.155
720
721- Allow `$envvar$` as first argument of implicit calls (#571)
722- Allow `super` in `extend class/tag`
723- Add experimental support for `extend someObject`
724- Variable / parameter named `self` used for implicit self in scope
725- Throw error for non-self tags in tag declaration body
726- Allow accessing array elements from end with literal numbers like `array[-1]`
727
728## 2.0.0-alpha.154
729
730- Include precompiled browser-version of library to make it work with jspm
731- Fix issue with html parser
732- Fix issue with `<input value=...>` not working in certain cases
733- Add optional static file serving for `imba serve`
734
735## 2.0.0-alpha.153
736
737- Fix issue with prop watchers not compiling correctly
738
739## 2.0.0-alpha.152
740
741- Correctly parse comments inside multi-line tag literals
742- Readable names for generated (internal) variables
743- Tag literals act as block scopes for variable declarations
744
745## 2.0.0-alpha.151
746
747- Fix interpolated style values in tag-tree selectors
748
749## 2.0.0-alpha.150
750
751- Remove charset:utf8 option from esbuild
752
753## 2.0.0-alpha.149
754
755- Fix regression with font-size presets (#569)
756
757## 2.0.0-alpha.148
758
759- Allow declaring return type via `def method\returntype arg1, ...`
760- Fix crash when inlining sourcemaps on node 16+ (#567)
761- Overhaul `extend class` code generation for better tooling support
762- BREAKING: Compile predicate identifiers `name?` to unicode `nameΦ` and
763 dashed identifiers `one-two-three` to `oneΞtwoΞthree` to avoid potential
764 naming collisions and improve tooling support. If you previously relied on
765 dashed identifiers converting to camelCase while interacting with an
766 external library - this will no longer work. Ie `window.add-event-listener`
767 will not work since `window` does not have an `addΞeventΞlistener` property.
768 See [#568](https://github.com/imba/imba/pull/568) for more info.
769
770## 2.0.0-alpha.147
771
772- Fix regression resulting in nested assets being rebuilt in incorrect folder
773
774## 2.0.0-alpha.146
775
776- Added `--asset-names` and `--html-names` build options for controlling the generated paths
777- Tweaked format of generated manifest
778- Fixed issue with generated stylesheets being blank
779- Automatically include Link preload headers when serving through imba
780- Allow all valid RegExp flags in literal regexes
781- Generate class augmentations (`extend class/tag`) in tsc mode
782- Use setAttribute for non-idl element attributes
783
784## 2.0.0-alpha.145
785
786- Fix bundler crash when parsing html entrypoints with doctype
787- Fix regression where imba `-w` would not detect changes in unhashed outputs
788
789## 2.0.0-alpha.144
790
791- Experimental `<global>` slot to add global listeners from inside tags
792- `@event.outside` modifier that works in conjunction with `<global>` slot
793
794## 2.0.0-alpha.143
795
796- Remove use of String#replaceAll (unsupported before node 15.0.0)
797
798## 2.0.0-alpha.142
799
800- Don't crash when loading tags with `@intersect` listener on server
801- Fix svg parsing issue for large svg files (#543)
802- Fix incorrect dehydration when creating custom element on client directly via document.createElement
803- Inject asset imports in correct order relative to regular imports
804- Add support for `.eot` font file reference in stylesheets
805- Auto-generate combined stylesheet for server and client accessible via `<style src='*'>`
806- Stop auto-injecting styles for referenced assets when rendering `<html>` on server
807
808## 2.0.0-alpha.141
809
810- Support webp,avif,apng,gif images in bundler
811- Fixed missing first character in non-minified css output
812- Expose imba.commit++ on globalThis
813- Fix compilation issue with `if false` inside tag tree
814- Respect custom palettes in imbaconfig.json when building
815- Allow aliasing palettes in imbaconfig.json
816- Support inlined svg elements on server
817
818## 2.0.0-alpha.140
819
820- Improve output from `imba create`
821
822## 2.0.0-alpha.139
823
824- Stop bundler from crashing when generating worker
825
826## 2.0.0-alpha.138
827
828- Fix incorrect sourcemap paths with esbuild 0.9.7
829- Let server fail gracefully when accessing invalid asset urls
830
831## 2.0.0-alpha.137
832
833- Fix relative path for mac/linux
834
835## 2.0.0-alpha.136
836
837- Raise default browser-target from `edge16` to `edge18` due to esbuild warning
838- Make `imba create` executable on mac (#550)
839- Set default esbuild target to es2019 to transpile optional chaining++
840- Avoid using `-ad` in generated class-names due to adblockers (#531)
841
842## 2.0.0-alpha.135
843
844- Minor improvements to sourcemapping
845- Fixed `import type default` compilation
846
847## 2.0.0-alpha.133
848
849- Improved sourcemapping
850- Improved support for type annotations
851- Fixed crash in bundler
852
853## 2.0.0-alpha.132
854
855- Improve windows compatibility for bundler and `imba create`
856
857## 2.0.0-alpha.131
858
859- Serve hashed (cacheable) assets with `Cache-Control: max-age=31536000`
860- Remove `?v=xxxxxx` suffix from asset references generated with `--no-hashing`
861- Allow `"external":["builtins",...]` to externalize builtin node modules for other platforms than `node`
862- Add `-H` alias for the `--no-hashing` option
863
864## 2.0.0-alpha.130
865
866- Upgraded esbuild to v0.9.2
867- Automatically polyfill built-in node modules like buffer,stream,crypto etc when compiling for browser. Still experimental.
868
869## 2.0.0-alpha.129
870
871- Prevent `touchstart` event on iPad Pro in `@touch.prevent`
872- Fixed text in svg `<text>` elements (#482)
873
874## 2.0.0-alpha.128
875
876- Fixed image asset urls in SSR
877- Make bundler work with client entrypoint without any styles
878- Dispatch bubbling `resized` event from ResizeObserver
879
880## 2.0.0-alpha.127
881
882- Overhauled `@touch` to work be more consistent on touch devices
883- Add `@touch.round` event modifier
884
885## 2.0.0-alpha.126
886
887- Prevent `touchstart` event on iOS in `@touch.prevent`
888
889## 2.0.0-alpha.125
890
891- Make custom events cancelable by default
892- Make `@-webkit-scrollbar-*` style selectors work
893- Make core event modifiers work for `@touch` event
894- Fix issue where text selection did not work after `@touch`
895- Make `@touch.prevent` prevent scrolling via `touch-action:none`
896- Add `@important` style modifier
897
898## 2.0.0-alpha.124
899
900- Update built-in colors to follow Tailwind 2.0
901- Allow interpolating colors in runtime `<div[c:{mycolor}]>`
902- Fix deep selector `>>>` with multiple nested children
903
904## 2.0.0-alpha.123
905
906- Fix router crashing when event-related runtime code is tree-shaken
907
908## 2.0.0-alpha.122
909
910- Fix issue with type inferencing tags in certain cases
911- Add `suspend`, `unsuspend` component lifecycle methods
912- Improved router interface & internals
913
914## 2.0.0-alpha.121
915
916- Added `imba.serve` to `index.d.ts`
917- Fix serious regression in router causing crash
918
919## 2.0.0-alpha.120
920
921- Parse `fn await something` correctly
922- Improved router internals
923- Add internal `Node#attachToParent` and `Node#detachFromParent` methods
924- Preserve signed zero in output (Fixes #497)
925- Make hmr reloading work with raw html assets
926- Make `--no-hashing` cli option actually work
927- Build html entrypoints in correct dist folder
928- Add `imba create` command for creating project from template
929
930## 2.0.0-alpha.119
931
932- Add support for object spread syntax `{a:1, ...obj}`
933- Fix regression causing crash when generating css
934
935## 2.0.0-alpha.118
936
937- Only call imba.commit when events are actually handled
938
939## 2.0.0-alpha.117
940
941- Alias `tabindex` to `tabIndex` in tag attributes.
942- Fix scoping issue with css in tag trees
943- Add experimental router aliases/redirects support
944- Include preflight.css at root level of package
945
946## 2.0.0-alpha.116
947
948- Convert durations (`1s`, `150ms`, `60fps` etc) to ms-based numbers on compile-time
949
950## 2.0.0-alpha.115
951
952- Add `debounce` event modifier
953
954## 2.0.0-alpha.114
955
956- Add `no-minify` option to cli
957- Always compile `html` namespaced attributes to raw `setAttribute`
958
959## 2.0.0-alpha.113
960
961- Add `__realname` as an unaltered alias for `__filename`
962- Add support for selectors in tag tree - see [#490](https://github.com/imba/imba/issues/490)
963
964## 2.0.0-alpha.112
965
966- Show full version (including alpha number) in cli `imba --version`
967
968## 2.0.0-alpha.110
969
970- Add experimental `<tag autorender=interval>` inteface
971- Add `?v=hash` to asset urls when filename hashing is turned off
972- Add experimental support for `.html` entrypoints to `imba serve` and `imba build`
973- Add `abs` and `rel` shorthands for `position` style property
974- Fix memory leak when using `imba --watch`
975
976## 2.0.0-alpha.109
977
978- Support extending native tags `tag Purchase < form`
979- Allow defining global tags without dash in name
980
981## 2.0.0-alpha.108
982
983- Fix issue with `@nth-of-type`, `@nth-child` selectors
984- Improve internals of intersect event handling
985
986## 2.0.0-alpha.107
987
988- Add `asset.body` property for accessing raw content of assets
989
990## 2.0.0-alpha.106
991
992- Allow passing `rootMargin` options to intersect event
993- Fix issue in router related to hash links
994
995## 2.0.0-alpha.105
996
997- Fix issue with css property order
998
999## 2.0.0-alpha.102
1000
1001- changelog and docs coming soon. see imba.io
1002
1003## 2.0.0-alpha.60
1004
1005- Add `route-to.exact` modifier to router
1006
1007## 2.0.0-alpha.59
1008
1009- Add support for numeric separator `100_000`
1010- Fix multiline regex parsing issues
1011
1012## 2.0.0-alpha.58
1013
1014- Allow setting innerHTML in SSR
1015
1016## 2.0.0-alpha.57
1017
1018- Update instantiation syntax in tests++
1019
1020## 2.0.0-alpha.56
1021
1022- Add `new Foo` instantiation syntax
1023- Deprecate `Foo.new` instantiation syntax
1024
1025## 2.0.0-alpha.55
1026
1027- Allow local/exportable tags (uppercased tag declarations)
1028- Allow interpolated tags inside strings in tag trees
1029
1030## 2.0.0-alpha.54
1031
1032- Allow getters and setters in object literals
1033
1034## 2.0.0-alpha.53
1035
1036- Allow media breakpoints in style selectors
1037- Added max-width breakpoints
1038
1039## 2.0.0-alpha.52
1040
1041- Fix issue with nested `$reference` selectors
1042- Allow router to work for regular links
1043- Add route-to.replace modifier
1044- Add route-to.sticky modifier
1045
1046## 2.0.0-alpha.51
1047
1048- No longer inheriting from CustomEvent as it is not supported in Safari
1049- Fix input data binding issue
1050- Added `before` and `after` style property modifiers
1051- Added `prefix` as alias for `before.content`
1052- Added `suffix` as alias for `after.content`
1053
1054## 2.0.0-alpha.50
1055
1056- Fix nested selector bug
1057- Fix focus-within modifier
1058- Add `:local` pseudo-class for only styling local children of component
1059- Support `$reference` in selectors for targeting local referenced elements
1060- Change `display` style property to accept multiple layout aliases
1061- Add 1-digit color aliases (blue900 -> blue9 etc)
1062
1063## 2.0.0-alpha.49
1064
1065- Allow border and border-(top|right|bottom|left) to accept a single color value
1066- Accept rgb/hsl/hex colors in text and border properties
1067
1068## 2.0.0-alpha.48
1069
1070- Added multi-purpose `text` style property for describing font-family, font-size, font-style, font-weight, text-decoration, text-transform, line-height, letter-spacing and color in a single property
1071- Added shorthand style aliases for border-_ and flex-_
1072
1073## 2.0.0-alpha.47
1074
1075- Added x, y, z, rotate, scale, scale-x, scale-y, skew-x, skew-y custom style properties
1076- Extended transition property to accept colors, styles, sizes as properties and custom easings
1077
1078## 2.0.0-alpha.46
1079
1080- Added experimental syntax for css/styling. See [#334](https://github.com/imba/imba/pull/362)
1081- Broke scoped css comment blocks until further notice
1082
1083## 2.0.0-alpha.45
1084
1085- Fix conditional rendering bug (#334)
1086- Changed event syntax from `<div :click.stop.{method()}>` to `<div @click.stop=method()>`
1087- Allow comments inside multiline tags
1088- Include left/right event key modifiers
1089- Improve resize and intersect events
1090- Always bind data when using `<tag[my-data]>` syntax
1091
1092## 2.0.0-alpha.44
1093
1094- Improved lifecycle methods for components
1095- Fix sourcemapping for env-flags
1096
1097## 2.0.0-alpha.43
1098
1099- Add syntax for element references `<div$reference>`
1100- Fix problem with missing ResizeObserver in safari
1101
1102## 2.0.0-alpha.42
1103
1104- Fixed webpack imba/loader issues with scoped css
1105- Add event wrapper for ResizeObserver
1106- Add experimental router code
1107- Add basic support for setting dom classes outside of templates
1108- Allow calling imba.mount with a function
1109- Rename #context api to $context
1110- Rename parentContext to $parent
1111
1112## 2.0.0-alpha.40
1113
1114- Introduce decorators with `@decorator` syntax. See [#334](https://github.com/imba/imba/pull/334)
1115- Allow declaring tag attributes. See [#335](https://github.com/imba/imba/pull/335)
1116- Shorthand `!` for invoking parenless methods (`object.mymethod!`)
1117- Implicit self is back (for good)
1118
1119## 2.0.0-alpha.0
1120
1121See [#263](https://github.com/imba/imba/issues/263) for an overview of changes