File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 3535 "prepublishOnly" : " pnpm build"
3636 },
3737 "dependencies" : {
38- "fireworks-js" : " workspace:2.2.0 "
38+ "fireworks-js" : " workspace:2.2.1 "
3939 }
4040}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { Fireworks as FireworksJs } from 'fireworks-js'
22import type { FireworksOptions } from 'fireworks-js'
33
44class Fireworks extends HTMLElement {
5- private fireworks ! : FireworksJs
5+ public fireworks : FireworksJs
66 private options : FireworksOptions = { }
77
88 static get observedAttributes ( ) {
@@ -38,21 +38,17 @@ class Fireworks extends HTMLElement {
3838 const options = this . getAttribute ( 'options' )
3939 if ( options ) {
4040 try {
41- this . options = JSON . parse ( options ) as FireworksOptions
42-
43- if ( this . fireworks ) {
44- this . fireworks . updateOptions ( this . options )
45- }
41+ this . options = JSON . parse ( options )
42+ this . fireworks ?. updateOptions ( this . options )
4643 } catch ( err ) {
4744 console . error ( 'Attribute `options` failed parsed:' , err )
4845 }
4946 }
5047
5148 const style = this . getAttribute ( 'style' )
5249 if ( style ) {
53- this . shadowRoot ! . querySelector ( 'style' ) ! . textContent = `
54- div { ${ style } }
55- `
50+ this . shadowRoot ! . querySelector ( 'style' ) !
51+ . textContent = `div { ${ style } }`
5652 }
5753 }
5854}
You can’t perform that action at this time.
0 commit comments