custom-elements-everywhere
custom-elements-everywhere copied to clipboard
Update dependency omi to v7
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
omi (source) | 6.25.23 -> 7.7.5 |
Release Notes
Tencent/omi (omi)
v7.7.5
v7.7.4
v7.7.3
v7.7.2
v7.7.1
v7.7.0
v7.6.18
v7.6.17
v7.6.16
v7.6.15
v7.6.14
v7.6.13
v7.6.12
v7.6.11
v7.6.10
v7.6.9
v7.6.8
v7.6.7
v7.6.6
v7.6.5
v7.6.4
v7.6.3
v7.6.2
v7.6.1
: Using v1.0.2 of reactive-signal
https://github.com/Tencent/omi/commit/e3d8ad78ac3fbb5d4147c1789999caee138585ce
v7.6.0
v7.5.10
v7.5.9
v7.5.8
v7.5.7
v7.5.6
v7.5.5
v7.5.4
v7.5.3
v7.5.2
v7.5.1
v7.5.0
: Function component is supported! 🎉
function ChildComponent(props) {
return (
<span>{props.msg}</span>
)
}
class ParentComponent extends Component {
render() {
return (
<div>
<ChildComponent msg="omi" />
</div>
)
}
}
v7.4.6
v7.4.5
: More concise static props definitions for cross framework use🎉
import { tag, Component, h, bind } from 'omi'
@​tag('my-counter')
class MyCounter extends Component {
static props = {
count: {
type: Number,
default: 0,
changed(newValue, oldValue) {
this.state.count = newValue
this.update()
}
}
}
state = {
count: null
}
install() {
this.state.count = this.props.count
}
@​bind
sub() {
this.state.count--
this.update()
this.fire('change', this.state.count)
}
@​bind
add() {
this.state.count++
this.update()
this.fire('change', this.state.count)
}
render() {
return (
<>
<button onClick={this.sub}>-</button>
<span>{this.state.count}</span>
<button onClick={this.add}>+</button>
</>
)
}
}
v7.4.4
v7.4.3
v7.4.2
v7.4.1
: Using constructor as tag name
import { Button } from './button'
class MyApp extends Component {
render() {
return (
<Button>test</Button>
)
}
}
v7.4.0
v7.3.10
v7.3.9
: Lazy definition
If we are writing a component library and need to use tree shaking capabilities,
import { WeButton } from 'ui-lib'
It could lead to definition failure if Button is not used, as it would be tree-shaken away. Therefore, we need to use Button, for example,
WeButton.define('we-button')
v7.3.8
v7.3.7
v7.3.6
v7.3.5
v7.3.4
v7.3.3
v7.3.2
v7.3.1
v7.3.0
: Support for injecting lifecycle into props🎉
<my-el onInstalled={e => console.log('installed')}><my-el>
v7.2.1
: Directive 🎉
For Example:
Register AutoAnimate Directive:
import { registerDirective } from 'omi'
import autoAnimate from '@​formkit/auto-animate'
registerDirective('auto-animate', autoAnimate)
Using Directive:
import { render, signal, tag, Component, h } from 'omi'
const show = signal(false)
@​tag('my-app')
export class MyApp extends Component {
render() {
return (
<>
<buttton onClick={() => show.value = !show.value}>Toggle show</buttton>
<div o-auto-animate >
{show.value && <h2>Hello o-auto-animate!</h2>}
</div>
</>
)
}
}
render(<my-app />, document.body)
v7.2.0
: Preventing tree shaking
import { Button } from './button' // tree shaking
import './button' // will not tree shaking
class MyApp extends Component {
render() {
return (
<o-button>test</o-buttom>
)
}
}
import { Button } from './button'
class MyApp extends Component {
render() {
return (
{/* will not tree shaking*/ }
<Button.tagName>test</Button.tagName>
)
}
}
v7.1.14
v7.1.13
v7.1.12
v7.1.11
v7.1.10
v7.1.9
v7.1.8
v7.1.7
v7.1.6
v7.1.5
v7.1.4
: CSS Prop Supported 🎉 !
Usage
@​tag('counter-demo')
class CounterDemo extends Component {
static css = 'span { color: red; }'
render() {
return (
<>
<button onClick={sub}>-</button>
<span>{count.value}</span>
<button onClick={add}>+</button>
</>
)
}
}
@​tag('my-app')
class MyApp extends Component {
cssProp: string = ''
installed(): void {
setInterval(() => {
this.cssProp = `span{ font-size: ${Math.floor(Math.random() * 120)}px }`
this.update()
}, 500)
}
render() {
return (
<counter-demo css={this.cssProp || 'span{ color: green !important}'} />
)
}
}
v7.1.3
v7.1.2
: OMI 7.1.2 🎉
v7.1.1
v7.1.0
: OMI 7.1 🎉
- Support bind decorator to automatically bind this
- Support CSS tag function to generate shared styles
v7.0.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.