create-coralite 0.33.0 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/css/package.json +1 -1
- package/templates/css/src/components/coralite-counter.html +14 -21
- package/templates/css/src/components/coralite-footer.html +1 -1
- package/templates/scss/package.json +1 -1
- package/templates/scss/src/components/coralite-counter.html +14 -21
- package/templates/scss/src/components/coralite-footer.html +1 -1
package/package.json
CHANGED
|
@@ -27,29 +27,22 @@
|
|
|
27
27
|
import { defineComponent } from 'coralite'
|
|
28
28
|
|
|
29
29
|
export default defineComponent({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
script ({ values, helpers, imports }) {
|
|
38
|
-
const button = helpers.refs('count-button')
|
|
39
|
-
const step = values.step ? parseInt(values.step) : 1
|
|
40
|
-
let count = 0
|
|
41
|
-
|
|
42
|
-
button.addEventListener('click', () => {
|
|
43
|
-
// increment the counter by the specified step value
|
|
44
|
-
count += step
|
|
30
|
+
async script ({ properties, refs }) {
|
|
31
|
+
const { default: confetti } = await import('https://esm.sh/canvas-confetti@latest')
|
|
32
|
+
const button = refs('count-button')
|
|
33
|
+
const step = properties.step ? parseInt(properties.step) : 1
|
|
34
|
+
let count = 0
|
|
45
35
|
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
button.addEventListener('click', () => {
|
|
37
|
+
// increment the counter by the specified step value
|
|
38
|
+
count += step
|
|
48
39
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
// update the button's text content to reflect the new count value
|
|
41
|
+
button.textContent = `Count is ${count}`
|
|
42
|
+
|
|
43
|
+
// Explode confetti :)
|
|
44
|
+
confetti()
|
|
45
|
+
})
|
|
53
46
|
}
|
|
54
47
|
})
|
|
55
48
|
</script>
|
|
@@ -27,29 +27,22 @@
|
|
|
27
27
|
import { defineComponent } from 'coralite'
|
|
28
28
|
|
|
29
29
|
export default defineComponent({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
script ({ values, helpers, imports }) {
|
|
38
|
-
const button = helpers.refs('count-button')
|
|
39
|
-
const step = values.step ? parseInt(values.step) : 1
|
|
40
|
-
let count = 0
|
|
41
|
-
|
|
42
|
-
button.addEventListener('click', () => {
|
|
43
|
-
// increment the counter by the specified step value
|
|
44
|
-
count += step
|
|
30
|
+
async script ({ properties, refs }) {
|
|
31
|
+
const { default: confetti } = await import('https://esm.sh/canvas-confetti@latest')
|
|
32
|
+
const button = refs('count-button')
|
|
33
|
+
const step = properties.step ? parseInt(properties.step) : 1
|
|
34
|
+
let count = 0
|
|
45
35
|
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
button.addEventListener('click', () => {
|
|
37
|
+
// increment the counter by the specified step value
|
|
38
|
+
count += step
|
|
48
39
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
// update the button's text content to reflect the new count value
|
|
41
|
+
button.textContent = `Count is ${count}`
|
|
42
|
+
|
|
43
|
+
// Explode confetti :)
|
|
44
|
+
confetti()
|
|
45
|
+
})
|
|
53
46
|
}
|
|
54
47
|
})
|
|
55
48
|
</script>
|