UNPKG

49.1 kBMarkdownView Raw
1# Changelog
2
3## 2.0.0-alpha.229
4
5* Fixed regression with style values inside parenthesis
6
7* Made `bdx` and `bdy` aliases work as intended
8
9## 2.0.0-alpha.228
10
11* Fixed issue with certain scoped selectors compiling incorrectly
12
13* Fixed `@odd`, `@even`, `@not-first` and `@not-last` selectors
14
15* Changed behaviour of `@hotkey` with multiple handlers
16
17 If multiple elements bind to the same `@hotkey` combo Imba would
18 previously always trigger them in reverse order (ie, last dom element first). If some but not all of the handlers are bound to visible elements (ie has offsetParent) it will only trigger on those.
19
20 This is useful if you have multiple pages / sections that bind to the same
21 hotkeys, and you show / hide the elements using css instead of adding and removing them from the dom.
22
23## 2.0.0-alpha.227
24
25* Fix regression which caused `.!classname` and `@!hover` negated modifiers to break.
26
27* Fix issue where css selector could not start with `^` parent reference.
28
29## 2.0.0-alpha.226
30
31We've reworked a core part of how style selectors are compiled in terms of specificity++. If your existing styles break in any way, please let us know on discord!
32
33* Fixed reference to missing index.css.map when building projects.
34
35* Fixed issue with reactivity when error was thrown inside reactive function.
36
37* Fixed issue with routed elements inside slots.
38
39* Fixed tooling to make it work with latest vscode.
40
41* Add numerous 3-letter display values for all common flex layouts.
42
43* Include `min-width` and `min-height` in list of easing properties.
44
45* Add field descriptor syntax for declaring advanced get/set wrappers for properties on classes and tags.
46
47* Add new css aliases:
48
49 ```
50 tof: text-overflow
51 tuf: text-underline-offset
52 mih: min-height
53 mah: max-height
54 miw: min-width
55 maw: max-width
56 ```
57
58* Add experimental support for `.env` files (docs coming)
59
60* Changed how `..@hover` and `..outer-class` selectors work.
61
62 They now rely on browser-support for `:matches` and `:is` which is still at ~95% support globally.
63
64* Use literaly `@` in html classes for modifiers.
65
66 If you previously relied on the fact that `d@custom-modifier:block` compiled to `.mod-custom-modifier { display: block }` you need to follow new conventions.
67
68* Add support for `^` in style modifiers for advanced targeting.
69
70 ```imba
71 # color of span is blue when button is hovered
72 <button> <span[c^@hover:blue]>
73 # opacity of nested i is 1 only when button is foxused
74 <button> <span> <i[o:0 o^^@focus:1]>
75 ```
76
77## 2.0.0-alpha.225
78
79* Automatically prefix certaib css properties for better browser compatibility.
80
81* When errors are thrown inside event handlers - a subsequent `@error` event will be triggered from the element of the throwing handler.
82
83* All new `imba create` command (by @familyfriendlymikey)
84
85* Remove support for old `prop name @set ...` syntax for watching when property is changed. Implement using descriptors instead.
86
87## 2.0.0-alpha.224
88
89* Fixed parsing of nested template literal strings.
90
91* Enable sourcemapping by default when running scripts.
92
93* Added `imba.awaits`
94
95* Make sure automatic `import {...} from 'imba'` is inserted at the very top.
96
97* Make empty catch block return the error
98
99 Useful to be able to handle things like error handling for asynchronous promises in a more compact manner:
100
101 ```imba
102 # will just swallow potential errors like before
103 let res = try await some-function
104 # ending with catch will return the error instead of the result
105 let res = try await some-function catch
106 if res isa Error
107 ...
108 ```
109
110* Various fixes
111
112## 2.0.0-alpha.223
113
114* Include safari15 as a target when compiling for web.
115
116 We recently started using class static initialization blocks to simplify
117 some internals, and this is not yet supported in safari.
118
119* Allow two parameters in `ja`/`justify-align` property to set justify/align independently.
120
121## 2.0.0-alpha.222
122
123* Enable `x` and `y` shorthands for all border properties.
124
125* Add `s` shorthand for `size`.
126
127* Deprecate `j` and `a` shorthands.
128
129* Streamlined more css shorthands and added more tests for styling
130
131## 2.0.0-alpha.221
132
133* Add shorthands for `outline-*` css properties.
134
135* Unify `ease` and `transition` css properties.
136
137 This is a breaking change. Going forward it is recommended to use the `ease` properties for all transitioning. See [documentation](https://imba.io/docs/css/easing).
138
139* Add support for custom colors in predefined box-shadows.
140
141 See [documentation](https://imba.io/docs/css/properties/box-shadow) for details.
142
143* Improvements to the router.
144
145* Rely more on esbuild to generate simpler code (ie using static blocks in classes).
146
147* Add `inherited` hook for classes.
148
149 Whenever a class is extended, the `inherited` method on the parent class will be called, with the subclass as the only argument, if one is defined.
150
151 ```imba
152 class Model
153 static def inherited subclass
154 console.log subclass,'inherited from',self
155
156 class Item < Model
157 ```
158
159## 2.0.0-alpha.219
160
161* Add import handler for `?serviceworker` suffix.
162
163 These assets are built without hashes in filename and to the root of the public folder, as is required for serviceworkers.
164
165* Deprecate `shadow` shorthand for `box-shadow` - use `bxs` instead.
166
167* Deprecate `ts` shorthand for `text-shadow` - use `txs` instead.
168
169* Support two parameters in css property `gap`
170
171## 2.0.0-alpha.216
172
173Last version (with new features) before `beta.1`. This release contains breaking changes in the bundler that need to be tested thoroughly before beta.
174
175* Use the latest version of esbuild
176
177 We are finally using the latest version of esbuild. All of our custom logic
178 for hashing, resolving and chunking is now done by esbuild instead.
179
180* Support path aliases from `[js|ts]config.json`
181
182 Now that we are using the latest version of esbuild we finally support [path aliases](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping) declared in `[js|ts]config.json` files. This also works with assets, ie. declaring `"icons/*": ["assets/svg/*","assets/codicons/*]` in your tsconfig would allow `<svg src="icons/some-icon.svg">` to work anywhere in your project.
183
184* Remove support for path aliases in `imbaconfig.json`
185
186 If you had declared path aliases in an `imbaconfig.json` these should be moved into a `[js|ts]config.json` instead.
187
188* Remove backwards compatible transforms from compiler itself.
189
190 Previously we included a bunch of logic for transforming conditional assignments like `??=`,`&&=`, and `||=` to support older browsers and node versions. Now we compile these statements as is and rely on esbuild to transform when needed.
191
192* Remove support for `?=` operator - use `??=` instead.
193
194* Drop commonjs target from compiler
195
196 The imba compiler will now always compile import/export statements natively
197 to import/export in javascript, and instead rely on esbuild to convert the output to cjs when needed.
198
199* Simplify output from `imba build`
200
201 The output of imba build is now possible to run directly through node (and soon Bun). We
202
203* Allow running html file directly with `imba some-entry.html`
204
205 This will spawn a dev-server for this html file and its referenced scripts and stylesheets.
206
207* Allow testing client-side scripts with `imba --web some-entry.imba`
208
209 This will spawn a dev-server, a html entrypoint and all that is needed to run a script in the browser.
210
211* Copy static assets over from `public` when building
212
213 If you have a `public` directory in your project, files from this will be copied over to the public folder of your output dir (default `dist`) when building.
214
215* Allow prefixing asset paths via `--base` option
216
217 Ie, when building for github pages you would run `imba build --base /my-repo-name -o docs index.html` to build your files and assets with the correct prefix, into the `docs/` folder of your project to adhere to github pages convetions.
218
219* Support loading workers following vite conventions
220
221 ```
222 import MyWorker from './some/script?worker'
223 import MySharedWorker from './some/script?sharedworker'
224 import url from './some/script?worker&url'
225 ```
226
227* Set node14.13.0 as the default minimum target when building for node.
228
229 This can be overridden by supplying your version of node through the `--node.target` option. Ie `imba build --node.target node12 my/script.imba`
230
231* Fixed regression in router that caused routed elements inside the root component to fail.
232
233## 2.0.0-alpha.214
234
235* Treat routes ending with `/` as exact routes.
236
237 The `<div route='/'>` would previously match any path. You could define exact routes by including a `$` at the end of the route. This lead to a lot
238 of confusion. Now, any route that ends with a `/` will only match the exact path. Use `*` to bypass
239
240 ```imba
241 <div route='/'> # matches / _only_
242 <div route='/*'> # matches any path
243
244 <div route='/items'> # matches /items, /items/1 etc
245 <div route='/items/'> # matches /items only
246 ```
247
248* Only show first matching element if multiple siblings match a route.
249
250 ```imba
251 <div>
252 <div route='/items/new'>
253 <div route='/items/:id'> # if /items/new matched - this will not show
254 <div route='/'> # matches if url is exactly '/'
255 <div route='*'> # matches if none of the above matches
256 ```
257
258## 2.0.0-alpha.213
259
260* Make `@event.emit('...')` on `<global/teleport>` dispath event inside their literal parent (fixes #693)
261
262## 2.0.0-alpha.210
263
264* Add number units for `minutes`, `hours`, and `days`
265
266* Fixed issue where identical nested selectors were incorrectly optimized away
267
268* Support `silent: true` option for `imba.autorun` to not call imba.commit
269
270* Fixed issue where @autorun methods threw error when element was re-mounted (#684)
271
272## 2.0.0-alpha.209
273
274* Fixed bug with observables not unsubscribing correctly in certain cases
275
276* Expose `imba.reportObserved`, `imba.reportChanged` and `imba.createAtom` (still experimental)
277
278* Add `imba.hotkeys.addKeycodes(...)` (#677)
279
280* Made `@touch.hold(dur)=handler` trigger handler after duration without waiting for additioanl events (#664)
281
282## 2.0.0-alpha.207
283
284* Don't try to implicitly return debugger statement
285
286* Improve compilation of `extend` statements for tooling
287
288## 2.0.0-alpha.206
289
290* Disallow iterating over falsy values using `for in`
291
292* Compile literal bigints correctly
293
294* Minor improvements to type definitions
295
296## 2.0.0-alpha.205
297
298* Support `for await ... of` syntax
299
300* Support tagged templates
301
302 Works like in plain js, but `{}` is still used for interpolation instead of `${}`.
303
304 ```imba
305 import md from 'tag-markdown'
306 const html = md`## Welcome to {name}`
307 ```
308
309* Add internal `#__patch__(props)` method for class instances to update fields
310
311* Stop shimming top-level await (delegates responsibility to esbuild)
312
313## 2.0.0-alpha.204
314
315* Fixed operator precedence for ternary expressions
316
317* Revert automatic `calc` wrapping for css values introduced in alpha 200
318
319 Introduced a lot of bugs and challenges related to `/` being a valid part of css values. `calc` will still be automatically be added around top-level parenthesis in css values, so `width:(100vw - 20px)` will still compile as `calc(100vw - 20px)`, but properties like `grid-column: 1 / 3` will now compile without calc again.
320
321## 2.0.0-alpha.203
322
323* Fixed regression with negated breakpoint modifiers like `display@!600:none`
324
325## 2.0.0-alpha.202
326
327* Fixed performance regression for tag trees introduced in alpha 191
328
329* Fixed compilation of css properties wrapped in parenthesis
330
331* Make unresolved decorators resolve to `imba.@decorator`
332
333 ```imba
334 class Order
335 @lazy get lines
336 ...
337 ```
338
339 If `@lazy` is not found in the file above, the compiler will essentially include
340 `import {@lazy} from 'imba` when compiling.
341
342* Introduced experimental state management decorators
343
344 A minimal set of decorators heavily inspired by MobX that allows you to mark classes
345 and objects as observable, and run code upon changes. This feature will be kept under
346 wraps until it has been battle-tested.
347
348## 2.0.0-alpha.201
349
350* Fixed regression where css colors `rgb(0 0 0 / alpha)` would compile incorrectly
351
352## 2.0.0-alpha.200
353
354* Allow `@hotkey('*')` to listen to all hotkey events
355
356 This is perfect for disabling all other hotkeys in certain contexts.
357
358 ```imba
359 tag ConfirmDialog
360 # when this dialog is mounted - all hotkey handlers preceding
361 # it in the dom tree will be blocked by the `*` listener
362 <self @hotkey('*').global>
363 <button @hotkey('esc')> "Cancel"
364 <button @hotkey('enter')> "Ok"
365 ```
366
367* Automatically wrap style expressions in `calc()`
368
369 ```imba
370 css div width: calc(100vw - 40px)
371 # can now be written as
372 css div width: 100vw - 40px
373 ```
374
375* Make bind=data.property work for textarea when value is `undefined`
376
377* Allow nested parentheticals in css calc
378
379* Fixed issue where removing class names using `el.flags.remove` would not work
380
381* Made `@touch.flag` support selector in second argument to match `@event.flag`
382
383* Allow second argument to `el.flags.incr(flag, dur = 0)`
384
385 With this argument you can automatically decrement the flag after a certain duration.
386
387* Allow negated style modifiers
388
389 ```imba
390 css div
391 @!hover o:0.5 # div:not(:hover) { opacity: 0.5 }
392 @!md d:none # @media (max-width: 767px) { div { display:none } }
393 # also works for classes
394 css div
395 @.!disabled o:0.5 # div:not(.disabled){ opacity:0.5 }
396 ```
397
398## 2.0.0-alpha.199
399
400* Fix regression where content of `<teleport>` and `<global>` was not rendered (#643)
401
402## 2.0.0-alpha.198
403
404* Change how css specificity is forced in generated selectors
405
406 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.
407
408* Change css specificity for component rules
409
410 Selectors inside tag declarations are now compiled with a higher specificity than global selectors.
411
412 ```imba
413 tag App
414 # scoped selectors have higher precedence than global styles
415 css .selector d:block
416 ```
417
418* Fixed case where a generated class-name is added multiple times on elements
419
420## 2.0.0-alpha.197
421
422* Fixed issue with bracketless multiline object and certain operators
423
424 ```imba
425 let x = null
426 x ||=
427 one: 1
428 two: 2
429 # would previously compile incorrectly to x ||= {one: 1}
430 ```
431
432## 2.0.0-alpha.196
433
434* Introduced `@event.closest(sel)` modifier
435
436 Works like `@event.sel(selector)`, but checks for `target.closest(...)` instead of `target.matches(...)`.
437 In the cases where you want to just handle clicks that do _not_ match a selector you can negate the modifier using `.!closest(...)`.
438
439 ```imba
440 tag App
441 <self>
442 # all clicks outside of button tags
443 <div @click.!closest('button')>
444 <button> <span> "Click"
445 <p> "blabla"
446 ```
447
448## 2.0.0-alpha.195
449
450* Fixed compilation issue for functional tags without arguments
451
452* Throw error when trying to use bind on functional tags
453
454## 2.0.0-alpha.194
455
456* Improved syntax for functional tags
457
458 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.
459
460 ```imba
461 def List items
462 return if items.length == 0
463
464 <section>
465 <slot>
466 <ul> for item in items
467 <li> item.title
468
469 tag App
470 def head
471 <header> <slot> <h2> "Welcome"
472
473 <self>
474 <head()>
475 <List(data.newest)> <h2> "Newest posts"
476 <List(data.all).large> <h2> "All posts"
477 ```
478
479## 2.0.0-alpha.193
480
481* Fix issue where parts of runtime was incorrectly tree-shaked
482
483* Always resolve `node:*` imports as external
484
485* Include changelog.md in npm package
486
487## 2.0.0-alpha.191
488
489There 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;
490
491* Rename $key to key
492
493 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`.
494
495* Allow using any object as `<element key=...>` value
496
497 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.
498
499 ```imba
500 const items = [{title: "One"},{title: "Two"}]
501
502 tag App
503 <self> for item in items
504 # objects themselves can be used as keys now
505 <AppItem key=item data=item>
506 ```
507
508* New (improved) syntax for rendering functional components / tag trees
509
510 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)>`.
511
512 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.
513
514 ```imba
515 tag App
516 get body
517 <div> "This is body"
518
519 def list title, items
520 <section>
521 <h2> title
522 <ul> for item in items
523 <li> item.title
524
525 <self>
526 <( body )>
527 <( list 'Top', data.popular ).large [mt:2]>
528 <( list 'New', data.posts.slice(0,10) )>
529 ```
530
531* Log warnings to console when building/running without minification
532
533 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.
534
535* Allow instantiating elements w/o memoization using `new`
536
537 Imba will automagically allow any element (literal tag) in any method to be memoized.
538
539 ```imba
540 def wrap text
541 let div = <div.item> text
542 return div
543
544 imba.mount do <section>
545 <( wrap "One" )>
546 <( wrap "Two" )>
547 ```
548
549 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.
550
551 ```imba
552 def wrap text
553 let div = new <div.item> text
554 return div
555 ```
556
557* Allow non-global tag types in dynamic tag names
558
559 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.
560
561 ```imba
562 import {PostView,ArticleView} from './views'
563
564 const items = [
565 { type: Post, title: "My post"}
566 { type: Article, title: "My article"}
567 ]
568
569 tag App
570 <self>
571 for item in items
572 <{item.type} data=item>
573 ```
574
575* Only allow named elements inside `<self>`
576
577 Using named elements (`<div$myname>`) outside of self would previously introduce subtle bugs and conflicts. They are now only allowed inside of `<self>`.
578
579* Changed css specificity
580
581 Styles declared in tag declaration body now has lower specificity than class selectors.
582
583 ```imba
584 css .warn hue:red
585 css .large p:4 fs:lg
586
587 tag Button
588 css p:2 fs:sm hue:blue
589
590 # styles from classes take precedence
591 <Button.warn.large>
592 ```
593
594* Scoped selectors no longer applies to self
595
596 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.
597
598 ```imba
599 tag Button
600 css bg:blue2
601 css .warn bg:red2
602 css &.large fs:lg
603
604 <self.warn.large> "Still blue bg - but large"
605 ```
606
607* Add `declare` keyword for declaring fields (with type annotations) without generating any code for that field
608
609 ```imba
610 class Foo
611 declare a\number
612 ```
613
614* Allow multiline conditionals when lines start with `and`,`or`,`||`, or `&&`
615
616 This is a temporary solution for a larger challenge. It simply ignores new-lines whenever your line starts with these operators.
617
618 ```imba
619 if condition
620 and test
621 or force
622 return ...
623 ```
624
625* Allow third argument in `for in` loops referencing length
626
627 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`.
628
629 ```imba
630 for member,index,len in list
631 # len refers to the length of the iterable list
632 if index == len - 1
633 yes # this is the last element
634 ```
635
636* Exposed `imba.hotkeys.humanize` for converting hotkey combos to readable shortcuts
637
638* Exposed `imba.hotkeys.htmlify` for converting hotkey combos to readable shortcuts as html
639
640## 2.0.0-alpha.190
641
642* Fixed regression related to implicit parenthesis in tag trees
643
644* Renamed `@hotkey.capture` to `@hotkey.force`
645
646## 2.0.0-alpha.189
647
648* Introduced `@hotkey.repeat` modifier
649
650 When a user presses a key and then keeps holding it, keydown/keypress
651 events will be generated every n milliseconds. For hotkeys you usually
652 only want to trigger once when the user press the combination.
653
654 If you want the handler to keep firing while user holds down the keys
655 you can now use the `.repeat` modifier:
656
657 ```imba
658 # will only toggle when pressing space, no matter how long you
659 # keep it pressed.
660 <div @hotkey('space')=togglePlayback>
661 # holding the right arrow will call fastForward repeatedly
662 <div @hotkey('right').repeat=fastForward>
663 ```
664
665* Changed rules for implicit parenthes / calling in tag trees
666
667 Indented code under a tag-tree will no longer be compiled as an invocation.
668
669 ```imba
670 <div> data.name
671 "something"
672 if data.name
673 "something"
674 ```
675
676 The code above would previously compile to div `data.name("something")`. Now
677 indentation in tag trees will behave like they do in statements like if/for/while etc.
678 This fixes #630, so you can now add css blocks like this:
679
680 ```imba
681 <div> data.name
682 css d:block # style for the div
683 ```
684
685* Added `@first-child` and `@last-child` css modifiers
686
687 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.
688
689* Fixed issue with nested loops in tag trees
690
691 It is now possible to use nested loops without wrapping the inner loops in a fragment.
692
693 ```imba
694 <div>
695 for item in data.items
696 for label in item.labels
697 <div> label
698 ```
699
700* Allow declaring variables and global tags with the same name
701
702 Global web components should not be registered as regular variables.
703 Previously the compiler would throw an error if `tag app` and `let app = ...`
704 were declared in the same file.
705
706* Allow optional chaining with dynamic keys - #638
707
708 ```imba
709 user..[key]
710 ```
711
712* Mark imported SVGs as @__PURE__
713
714 This allows efficient tree-shaking so that one can include all icons from a collection
715 and only bundle the ones that are used.
716
717 ```imba
718 import * as icons from 'imba-codicons'
719
720 <svg src=icons.volume-up>
721 # you get completions and previews for all icons, but only volume-up
722 # will be bundled in your code now
723 ```
724
725* Don't round x,y in `@touch.reframe` and `@touch.fit` by default (#639)
726
727## 2.0.0-alpha.187
728
729* Call `dehydrate` on compononents when rendering components from the server.
730
731* Updated type declarations.
732
733## 2.0.0-alpha.186
734
735* Don't add html class name for named elements
736
737 Previously when naming an element like `<div$title> ...`, imba would automatically
738 add a `title` class name to the element. This can lead to confusing issues. If you
739 have used this undocumented behaviour previously you just need to add the class
740 yourself, like `<div$title.title>`.
741
742* Introduced `@mouse.mod` modifier
743
744 Since Mac and Windows/Linux use different keyboard modifiers for most standard actions
745 (ctrl+c,ctrl+s,ctrl+click) vs (⌘c,⌘s,⌘+click) etc, it makes sense to have an event
746 modifier that takes care of checking the platform. `@mouse.mod` will return true of
747 ⌘ is pressed on mac, and Ctrl is pressed on all other platforms.
748
749 ```imba
750 <div @click.mod.stop=openInNewWindow @click=openHere>
751 ```
752
753* Fixed bug in `@event.throttle` modifier
754
755## 2.0.0-alpha.183
756
757- Remove unneeded class names on tags when building
758
759## 2.0.0-alpha.182
760
761- Fixed issues with using event modifiers with external imba library
762
763## 2.0.0-alpha.177
764
765- Added type declarations into typings/
766
767## 2.0.0-alpha.176
768
769- Deprecated `@touch.moved-dir`
770
771 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.
772
773 ```imba
774 <div @touch.moved-left(4px)> # before
775 <div @touch.moved(4px,'left')> # after
776 ```
777
778- Renamed style property `tint` to `hue`
779
780 Hue is a better name for the newly introduced `tint` style property.
781
782 ```imba
783 # hue can be set to any named color from the imba color palette
784 <div[hue:orange]>
785 <h1[color:hue7]> # refer to a shade/tint of the aliased color
786 ```
787
788- Refactored event modifiers
789
790 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:
791
792 ```imba
793 extend class KeyboardEvent
794
795 def @f1
796 return keyCode == 112
797 ```
798
799- Changed behavior of `@event.throttle` modifier
800
801 `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.
802
803 ```imba
804 # handler will be called immediately upon scrolling and keep emitting
805 # every 100ms until there are no more scroll events.
806 <div @scroll.throttle(100ms)=handler>
807
808 # So, clicking this button twice will trigger once immediately,
809 # and then again after 1 second. Previously the second click would
810 # never trigger.
811 <div @click.throttle(1s)=handler>
812 ```
813
814- Introduced `@event.cooldown` modifier
815
816 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`.
817
818 ```imba
819 # So, clicking this button twice will trigger once immediately, and
820 # the next click will be ignored as long as it happens less than a second later
821 <div @click.cooldown(1s)=handler>
822 ```
823
824- Allow negated event modifiers
825
826 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.
827
828 Ie. `<div @click.!shift=...>` would only trigger if shiftKey is _not_ pressed.
829
830 ```imba
831 # Only call handler if shiftKey is NOT pressed
832 <div @click.!shift=handler>
833
834 # Only call handler if target does NOT match the selector
835 <div @click.!sel('.active')=handler>
836 ```
837
838- Introduced `@mouse.left`, `@mouse.middle`, and `@mouse.right` modifiers
839
840 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.
841
842 ```imba
843 # Only call handler if the middle mouse button was pressed
844 <div @click.middle=handler>
845
846 # Only start touch handling if the right mouse button was pressed
847 <div @touch.right=handler>
848 ```
849
850- Introduced `@intersect.flag` modifier
851
852 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.
853
854 ```imba
855 # the html class showing will be present on div
856 # whenever it is intersecting with the viewport
857 <div @intersect.flag('showing')>
858 ```
859
860- Introduced `@touch.end` modifier
861
862 The `end` guard breaks unless the touch is in its ending state.
863
864 ```imba
865 # handler is only called at the end of the touch
866 <div @touch.end=handler>
867 # handler is only called at the end of the touch if pointer moved
868 <div @touch.moved.end=handler>
869 ```
870
871- Introduced `@touch.hold(dur=1000ms)` modifier
872
873 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.
874
875 ```imba
876 # handler is only called once the touch has been held for 1000ms
877 <div @touch.hold=handler>
878 # handler only called if ctrl was pressed and touch held for 250ms
879 <div @touch.ctrl.hold(250ms)=handler>
880 ```
881
882- Introduced `@touch.apply(target,xprop='x',yprop='y')` modifier
883
884 Like `@touch.sync` but just setting the x,y values on an object directly instead of adding to the previous values.
885
886 ```imba
887 const obj = {}
888 # apply is essentially shorthand for setting properties:
889 <div @touch.apply(obj)>
890 <div @touch=(obj.x = e.x, obj.y = e.y)>
891 ```
892
893- Added `@event.key(keyOrCode)` modifier for keyboard events
894
895 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.
896
897 ```imba
898 # Only trigger if F1 is pressed (event.keyCode==112)
899 <div @keydown.key(112)=handler>
900 ```
901
902 If you supply a string it will compare it against KeyboardEvent.key.
903
904 ```imba
905 # Only trigger if PrintScreen is pressed (event.key=='PrintScreen')
906 <div @keydown.key('PrintScreen')=handler>
907 ```
908
909- Changed behavior of `@touch.moved` modifier
910
911 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.
912
913 ```imba
914 # If user moves more than 10px up/down before left/right
915 # the touch will not be handled
916 <div @touch.moved-x(10px)=draghandle>
917 ```
918
919- Improved behaviour of `@touch` and `@click` events
920
921 `@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.
922
923 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.
924
925 ```imba
926 # button click is triggered onless touch is held more than 500ms
927 <li @touch.hold(500ms)=draghandle> <button @click=handle>
928 ```
929
930- Improved behaviour of `@touch` and scrolling on touch devices
931 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.
932
933 Scrolling is disabled by the `prevent` modifier, an activated `moved` modifier or activated `hold` modifier.
934
935 ```imba
936 # Scrolling will now work fine when touching the div and flicking up/down.
937 # Only if the user holds still on the element for 500ms will scrolling and
938 # default behavior be prevented.
939 <div @touch.hold(500ms)=draghandler>
940 ```
941
942- Add support for additional file extensions in bundler (webm, weba, avi, mp3, mp4, m4a, mpeg, wav, ogg, ogv, oga, opus, bmp)
943
944## 2.0.0-alpha.175
945- Fix: `@in` transitions for nested elements works
946- Experimental support for tweening from/to implicit width/height in transitions
947- Experimental `@resize.css` modifier to automatically enable size units
948- Allow variables in color opacity like `color:blue4/$alpha`
949- Experimental support for `tint:colorname` and using `tint0-9` colors in styles
950
951## 2.0.0-alpha.174
952- Named elements (`<div$myname>`) exist immediately in components
953- Fix: Spread operator works for any expression in objects
954- Fix: Make sure ::before/after comes last in selectors with other pseudo-classes>
955- Fix: Allow symbol keys in `prop/attr #my-sym-key`
956
957## 2.0.0-alpha.173
958
959- Fix: Allow binding tag properties to symbol identifiers
960- Report correct location for "Cannot redeclare variable" error (#114)
961- Experimental support for `@hotkey` events
962- Fix: Don't run `imba.commit` on unhandled events>
963- Added `@trusted` event guard
964- Added `@trap` event modifier
965
966## 2.0.0-alpha.172
967
968- Fix: Rendering list inside conditional
969- Support css blocks inside conditionals in tag trees
970- Warn about interpolated style values outside of tag trees
971- Improved specificity for nested css rules
972
973## 2.0.0-alpha.171
974
975- Fix: Make `<global @resize>` work correctly
976- Fix: Variable resolution for `let item = do ... item()`
977- Fix: Allow ternary in tag trees
978- Fix: Allow `condition && <tag>` in tag trees
979- Fix: Ternary parsing `cond ? <div> "a" : "b"`
980
981## 2.0.0-alpha.170
982
983- Added `@in` style modifier for specifying in-only transitions
984- Renamed transition hooks to `transition-(in|out)-(end|cancel)`
985- Using `<button bind=prop>` without a value acts like `<button bind=prop value=yes>`
986
987## 2.0.0-alpha.169
988
989- Fix: Various dom regressions in SSR
990- Updated default ease duration to 300ms
991
992## 2.0.0-alpha.168
993
994- Use setAttribute('class') under the hood for svg elements
995- Added `#afterVisit`, `#beforeReconcile`, `#afterReconcile` hooks
996- Added experimental easing via `<my-element ease>`, with element hooks
997 `#ease-enter`, `#ease-entered`, `#ease-enter-cancel`, and
998 `#ease-exit`, `#ease-exited`, `#ease-exit-cancel`
999- Added `ease/e`,`ease-opacity/eo`,`ease-transform/et` and `ease-colors/ec`
1000 style properties for experimental easing feature
1001- Fix: Passing slots into child components (#607)
1002- Allow using setters on `#context`
1003
1004## 2.0.0-alpha.167
1005
1006- Add support for generic media selectors via `@media(some-media) ...`
1007- Fix: Interpolated numeric value for `rotate:{val}` works i FF
1008- Add @all and @speech style modifiers (for @media all/speech)
1009- Fix: Allow empty css selectors
1010- Fix: Rebuilt prebuilt imba.mjs for web
1011
1012## 2.0.0-alpha.166
1013
1014- Add experimental support for class decorators
1015- Fix: Apply display:block to global tags without dashed name
1016- Change: `inset:*` style shorthand sets `position:absolute`
1017- Added `<teleport to=(sel/element)>` component (#606) by @haikyuu
1018
1019## 2.0.0-alpha.165
1020
1021- Reorganize prebuilt files for jspm support
1022
1023## 2.0.0-alpha.157
1024
1025- Add jspm configuration in package.json
1026
1027## 2.0.0-alpha.156
1028
1029- Add #**inited** hook for class instance initialization
1030- All custom components defaults to display:block
1031- Fix: Don't inject hmr.js script into html assets when building
1032- Fix: Generate html files in public directory
1033
1034## 2.0.0-alpha.155
1035
1036- Allow `$envvar$` as first argument of implicit calls (#571)
1037- Allow `super` in `extend class/tag`
1038- Add experimental support for `extend someObject`
1039- Variable / parameter named `self` used for implicit self in scope
1040- Throw error for non-self tags in tag declaration body
1041- Allow accessing array elements from end with literal numbers like `array[-1]`
1042
1043## 2.0.0-alpha.154
1044
1045- Include precompiled browser-version of library to make it work with jspm
1046- Fix issue with html parser
1047- Fix issue with `<input value=...>` not working in certain cases
1048- Add optional static file serving for `imba serve`
1049
1050## 2.0.0-alpha.153
1051
1052- Fix issue with prop watchers not compiling correctly
1053
1054## 2.0.0-alpha.152
1055
1056- Correctly parse comments inside multi-line tag literals
1057- Readable names for generated (internal) variables
1058- Tag literals act as block scopes for variable declarations
1059
1060## 2.0.0-alpha.151
1061
1062- Fix interpolated style values in tag-tree selectors
1063
1064## 2.0.0-alpha.150
1065
1066- Remove charset:utf8 option from esbuild
1067
1068## 2.0.0-alpha.149
1069
1070- Fix regression with font-size presets (#569)
1071
1072## 2.0.0-alpha.148
1073
1074- Allow declaring return type via `def method\returntype arg1, ...`
1075- Fix crash when inlining sourcemaps on node 16+ (#567)
1076- Overhaul `extend class` code generation for better tooling support
1077- BREAKING: Compile predicate identifiers `name?` to unicode `nameΦ` and
1078 dashed identifiers `one-two-three` to `oneΞtwoΞthree` to avoid potential
1079 naming collisions and improve tooling support. If you previously relied on
1080 dashed identifiers converting to camelCase while interacting with an
1081 external library - this will no longer work. Ie `window.add-event-listener`
1082 will not work since `window` does not have an `addΞeventΞlistener` property.
1083 See [#568](https://github.com/imba/imba/pull/568) for more info.
1084
1085## 2.0.0-alpha.147
1086
1087- Fix regression resulting in nested assets being rebuilt in incorrect folder
1088
1089## 2.0.0-alpha.146
1090
1091- Added `--asset-names` and `--html-names` build options for controlling the generated paths
1092- Tweaked format of generated manifest
1093- Fixed issue with generated stylesheets being blank
1094- Automatically include Link preload headers when serving through imba
1095- Allow all valid RegExp flags in literal regexes
1096- Generate class augmentations (`extend class/tag`) in tsc mode
1097- Use setAttribute for non-idl element attributes
1098
1099## 2.0.0-alpha.145
1100
1101- Fix bundler crash when parsing html entrypoints with doctype
1102- Fix regression where imba `-w` would not detect changes in unhashed outputs
1103
1104## 2.0.0-alpha.144
1105
1106- Experimental `<global>` slot to add global listeners from inside tags
1107- `@event.outside` modifier that works in conjunction with `<global>` slot
1108
1109## 2.0.0-alpha.143
1110
1111- Remove use of String#replaceAll (unsupported before node 15.0.0)
1112
1113## 2.0.0-alpha.142
1114
1115- Don't crash when loading tags with `@intersect` listener on server
1116- Fix svg parsing issue for large svg files (#543)
1117- Fix incorrect dehydration when creating custom element on client directly via document.createElement
1118- Inject asset imports in correct order relative to regular imports
1119- Add support for `.eot` font file reference in stylesheets
1120- Auto-generate combined stylesheet for server and client accessible via `<style src='*'>`
1121- Stop auto-injecting styles for referenced assets when rendering `<html>` on server
1122
1123## 2.0.0-alpha.141
1124
1125- Support webp,avif,apng,gif images in bundler
1126- Fixed missing first character in non-minified css output
1127- Expose imba.commit++ on globalThis
1128- Fix compilation issue with `if false` inside tag tree
1129- Respect custom palettes in imbaconfig.json when building
1130- Allow aliasing palettes in imbaconfig.json
1131- Support inlined svg elements on server
1132
1133## 2.0.0-alpha.140
1134
1135- Improve output from `imba create`
1136
1137## 2.0.0-alpha.139
1138
1139- Stop bundler from crashing when generating worker
1140
1141## 2.0.0-alpha.138
1142
1143- Fix incorrect sourcemap paths with esbuild 0.9.7
1144- Let server fail gracefully when accessing invalid asset urls
1145
1146## 2.0.0-alpha.137
1147
1148- Fix relative path for mac/linux
1149
1150## 2.0.0-alpha.136
1151
1152- Raise default browser-target from `edge16` to `edge18` due to esbuild warning
1153- Make `imba create` executable on mac (#550)
1154- Set default esbuild target to es2019 to transpile optional chaining++
1155- Avoid using `-ad` in generated class-names due to adblockers (#531)
1156
1157## 2.0.0-alpha.135
1158
1159- Minor improvements to sourcemapping
1160- Fixed `import type default` compilation
1161
1162## 2.0.0-alpha.133
1163
1164- Improved sourcemapping
1165- Improved support for type annotations
1166- Fixed crash in bundler
1167
1168## 2.0.0-alpha.132
1169
1170- Improve windows compatibility for bundler and `imba create`
1171
1172## 2.0.0-alpha.131
1173
1174- Serve hashed (cacheable) assets with `Cache-Control: max-age=31536000`
1175- Remove `?v=xxxxxx` suffix from asset references generated with `--no-hashing`
1176- Allow `"external":["builtins",...]` to externalize builtin node modules for other platforms than `node`
1177- Add `-H` alias for the `--no-hashing` option
1178
1179## 2.0.0-alpha.130
1180
1181- Upgraded esbuild to v0.9.2
1182- Automatically polyfill built-in node modules like buffer,stream,crypto etc when compiling for browser. Still experimental.
1183
1184## 2.0.0-alpha.129
1185
1186- Prevent `touchstart` event on iPad Pro in `@touch.prevent`
1187- Fixed text in svg `<text>` elements (#482)
1188
1189## 2.0.0-alpha.128
1190
1191- Fixed image asset urls in SSR
1192- Make bundler work with client entrypoint without any styles
1193- Dispatch bubbling `resized` event from ResizeObserver
1194
1195## 2.0.0-alpha.127
1196
1197- Overhauled `@touch` to work be more consistent on touch devices
1198- Add `@touch.round` event modifier
1199
1200## 2.0.0-alpha.126
1201
1202- Prevent `touchstart` event on iOS in `@touch.prevent`
1203
1204## 2.0.0-alpha.125
1205
1206- Make custom events cancelable by default
1207- Make `@-webkit-scrollbar-*` style selectors work
1208- Make core event modifiers work for `@touch` event
1209- Fix issue where text selection did not work after `@touch`
1210- Make `@touch.prevent` prevent scrolling via `touch-action:none`
1211- Add `@important` style modifier
1212
1213## 2.0.0-alpha.124
1214
1215- Update built-in colors to follow Tailwind 2.0
1216- Allow interpolating colors in runtime `<div[c:{mycolor}]>`
1217- Fix deep selector `>>>` with multiple nested children
1218
1219## 2.0.0-alpha.123
1220
1221- Fix router crashing when event-related runtime code is tree-shaken
1222
1223## 2.0.0-alpha.122
1224
1225- Fix issue with type inferencing tags in certain cases
1226- Add `suspend`, `unsuspend` component lifecycle methods
1227- Improved router interface & internals
1228
1229## 2.0.0-alpha.121
1230
1231- Added `imba.serve` to `index.d.ts`
1232- Fix serious regression in router causing crash
1233
1234## 2.0.0-alpha.120
1235
1236- Parse `fn await something` correctly
1237- Improved router internals
1238- Add internal `Node#attachToParent` and `Node#detachFromParent` methods
1239- Preserve signed zero in output (Fixes #497)
1240- Make hmr reloading work with raw html assets
1241- Make `--no-hashing` cli option actually work
1242- Build html entrypoints in correct dist folder
1243- Add `imba create` command for creating project from template
1244
1245## 2.0.0-alpha.119
1246
1247- Add support for object spread syntax `{a:1, ...obj}`
1248- Fix regression causing crash when generating css
1249
1250## 2.0.0-alpha.118
1251
1252- Only call imba.commit when events are actually handled
1253
1254## 2.0.0-alpha.117
1255
1256- Alias `tabindex` to `tabIndex` in tag attributes.
1257- Fix scoping issue with css in tag trees
1258- Add experimental router aliases/redirects support
1259- Include preflight.css at root level of package
1260
1261## 2.0.0-alpha.116
1262
1263- Convert durations (`1s`, `150ms`, `60fps` etc) to ms-based numbers on compile-time
1264
1265## 2.0.0-alpha.115
1266
1267- Add `debounce` event modifier
1268
1269## 2.0.0-alpha.114
1270
1271- Add `no-minify` option to cli
1272- Always compile `html` namespaced attributes to raw `setAttribute`
1273
1274## 2.0.0-alpha.113
1275
1276- Add `__realname` as an unaltered alias for `__filename`
1277- Add support for selectors in tag tree - see [#490](https://github.com/imba/imba/issues/490)
1278
1279## 2.0.0-alpha.112
1280
1281- Show full version (including alpha number) in cli `imba --version`
1282
1283## 2.0.0-alpha.110
1284
1285- Add experimental `<tag autorender=interval>` inteface
1286- Add `?v=hash` to asset urls when filename hashing is turned off
1287- Add experimental support for `.html` entrypoints to `imba serve` and `imba build`
1288- Add `abs` and `rel` shorthands for `position` style property
1289- Fix memory leak when using `imba --watch`
1290
1291## 2.0.0-alpha.109
1292
1293- Support extending native tags `tag Purchase < form`
1294- Allow defining global tags without dash in name
1295
1296## 2.0.0-alpha.108
1297
1298- Fix issue with `@nth-of-type`, `@nth-child` selectors
1299- Improve internals of intersect event handling
1300
1301## 2.0.0-alpha.107
1302
1303- Add `asset.body` property for accessing raw content of assets
1304
1305## 2.0.0-alpha.106
1306
1307- Allow passing `rootMargin` options to intersect event
1308- Fix issue in router related to hash links
1309
1310## 2.0.0-alpha.105
1311
1312- Fix issue with css property order
1313
1314## 2.0.0-alpha.102
1315
1316- changelog and docs coming soon. see imba.io
1317
1318## 2.0.0-alpha.60
1319
1320- Add `route-to.exact` modifier to router
1321
1322## 2.0.0-alpha.59
1323
1324- Add support for numeric separator `100_000`
1325- Fix multiline regex parsing issues
1326
1327## 2.0.0-alpha.58
1328
1329- Allow setting innerHTML in SSR
1330
1331## 2.0.0-alpha.57
1332
1333- Update instantiation syntax in tests++
1334
1335## 2.0.0-alpha.56
1336
1337- Add `new Foo` instantiation syntax
1338- Deprecate `Foo.new` instantiation syntax
1339
1340## 2.0.0-alpha.55
1341
1342- Allow local/exportable tags (uppercased tag declarations)
1343- Allow interpolated tags inside strings in tag trees
1344
1345## 2.0.0-alpha.54
1346
1347- Allow getters and setters in object literals
1348
1349## 2.0.0-alpha.53
1350
1351- Allow media breakpoints in style selectors
1352- Added max-width breakpoints
1353
1354## 2.0.0-alpha.52
1355
1356- Fix issue with nested `$reference` selectors
1357- Allow router to work for regular links
1358- Add route-to.replace modifier
1359- Add route-to.sticky modifier
1360
1361## 2.0.0-alpha.51
1362
1363- No longer inheriting from CustomEvent as it is not supported in Safari
1364- Fix input data binding issue
1365- Added `before` and `after` style property modifiers
1366- Added `prefix` as alias for `before.content`
1367- Added `suffix` as alias for `after.content`
1368
1369## 2.0.0-alpha.50
1370
1371- Fix nested selector bug
1372- Fix focus-within modifier
1373- Add `:local` pseudo-class for only styling local children of component
1374- Support `$reference` in selectors for targeting local referenced elements
1375- Change `display` style property to accept multiple layout aliases
1376- Add 1-digit color aliases (blue900 -> blue9 etc)
1377
1378## 2.0.0-alpha.49
1379
1380- Allow border and border-(top|right|bottom|left) to accept a single color value
1381- Accept rgb/hsl/hex colors in text and border properties
1382
1383## 2.0.0-alpha.48
1384
1385- 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
1386- Added shorthand style aliases for border-_ and flex-_
1387
1388## 2.0.0-alpha.47
1389
1390- Added x, y, z, rotate, scale, scale-x, scale-y, skew-x, skew-y custom style properties
1391- Extended transition property to accept colors, styles, sizes as properties and custom easings
1392
1393## 2.0.0-alpha.46
1394
1395- Added experimental syntax for css/styling. See [#334](https://github.com/imba/imba/pull/362)
1396- Broke scoped css comment blocks until further notice
1397
1398## 2.0.0-alpha.45
1399
1400- Fix conditional rendering bug (#334)
1401- Changed event syntax from `<div :click.stop.{method()}>` to `<div @click.stop=method()>`
1402- Allow comments inside multiline tags
1403- Include left/right event key modifiers
1404- Improve resize and intersect events
1405- Always bind data when using `<tag[my-data]>` syntax
1406
1407## 2.0.0-alpha.44
1408
1409- Improved lifecycle methods for components
1410- Fix sourcemapping for env-flags
1411
1412## 2.0.0-alpha.43
1413
1414- Add syntax for element references `<div$reference>`
1415- Fix problem with missing ResizeObserver in safari
1416
1417## 2.0.0-alpha.42
1418
1419- Fixed webpack imba/loader issues with scoped css
1420- Add event wrapper for ResizeObserver
1421- Add experimental router code
1422- Add basic support for setting dom classes outside of templates
1423- Allow calling imba.mount with a function
1424- Rename #context api to $context
1425- Rename parentContext to $parent
1426
1427## 2.0.0-alpha.40
1428
1429- Introduce decorators with `@decorator` syntax. See [#334](https://github.com/imba/imba/pull/334)
1430- Allow declaring tag attributes. See [#335](https://github.com/imba/imba/pull/335)
1431- Shorthand `!` for invoking parenless methods (`object.mymethod!`)
1432- Implicit self is back (for good)
1433
1434## 2.0.0-alpha.0
1435
1436See [#263](https://github.com/imba/imba/issues/263) for an overview of changes