Skip to content

Commit

Permalink
🌎
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Oct 29, 2024
1 parent 429e526 commit b690cb8
Show file tree
Hide file tree
Showing 29 changed files with 443 additions and 329 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/__tests__/__snapshots__/alpine.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ exports[`Alpine.js > jsx > Javascript Test > BasicRef 1`] = `
exports[`Alpine.js > jsx > Javascript Test > BasicRefAssignment 1`] = `
"<div x-data=\\"myBasicRefAssignmentComponent()\\">
<button x-on:click=\\"handlerClick(evt)\\">Click</button>
<button x-on:click=\\"await handlerClick(evt)\\">Click</button>
</div>
<script>
document.addEventListener(\\"alpine:init\\", () => {
Expand Down Expand Up @@ -1312,7 +1312,7 @@ exports[`Alpine.js > jsx > Javascript Test > Stamped.io 1`] = `
></textarea>
<button
class=\\"button\\"
x-on:click=\\"$event.preventDefault();
x-on:click=\\"ev.preventDefault();
showReviewPrompt = false\\"
>
Submit
Expand Down Expand Up @@ -3289,7 +3289,7 @@ exports[`Alpine.js > jsx > Typescript Test > BasicRef 1`] = `
exports[`Alpine.js > jsx > Typescript Test > BasicRefAssignment 1`] = `
"<div x-data=\\"myBasicRefAssignmentComponent()\\">
<button x-on:click=\\"handlerClick(evt)\\">Click</button>
<button x-on:click=\\"await handlerClick(evt)\\">Click</button>
</div>
<script>
document.addEventListener(\\"alpine:init\\", () => {
Expand Down Expand Up @@ -4197,7 +4197,7 @@ exports[`Alpine.js > jsx > Typescript Test > Stamped.io 1`] = `
></textarea>
<button
class=\\"button\\"
x-on:click=\\"$event.preventDefault();
x-on:click=\\"ev.preventDefault();
showReviewPrompt = false\\"
>
Submit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ import { Component } from \\"@angular/core\\";
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
styles: [
\`
Expand Down Expand Up @@ -7759,7 +7759,7 @@ export interface Props {
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
styles: [
\`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ import { Component } from \\"@angular/core\\";
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
styles: [
\`
Expand Down Expand Up @@ -7889,7 +7889,7 @@ export interface Props {
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
styles: [
\`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ import { Component } from \\"@angular/core\\";
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
styles: [
\`
Expand Down Expand Up @@ -2724,8 +2724,8 @@ export default class SmileReviews {
snakeCaseValue() {
return snakeCase(\\"testThis\\");
}
node_0_button = (event) => {
event.preventDefault();
node_0_button = (ev) => {
ev.preventDefault();
this.showReviewPrompt = false;
};
trackByReview0(index, review) {
Expand Down Expand Up @@ -8027,7 +8027,7 @@ export interface Props {
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
styles: [
\`
Expand Down Expand Up @@ -10229,8 +10229,8 @@ export default class SmileReviews {
snakeCaseValue() {
return snakeCase(\\"testThis\\");
}
node_0_button = (event) => {
event.preventDefault();
node_0_button = (ev) => {
ev.preventDefault();
this.showReviewPrompt = false;
};
trackByReview0(index, review) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ import { Component } from \\"@angular/core\\";
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
})
export default class MyBasicRefAssignmentComponent {
Expand Down Expand Up @@ -6933,7 +6933,7 @@ export interface Props {
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
})
export default class MyBasicRefAssignmentComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ import { Component } from \\"@angular/core\\";
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
styles: [
\`
Expand Down Expand Up @@ -1312,7 +1312,7 @@ import { CommonModule } from \\"@angular/common\\";
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
styles: [
\`
Expand Down Expand Up @@ -14559,7 +14559,7 @@ export interface Props {
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
styles: [
\`
Expand Down Expand Up @@ -14599,7 +14599,7 @@ export interface Props {
@Component({
selector: \\"my-basic-ref-assignment-component\\",
template: \`
<div><button (click)=\\"handlerClick($event)\\">Click</button></div>
<div><button (click)=\\"await handlerClick($event)\\">Click</button></div>
\`,
styles: [
\`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3545,9 +3545,7 @@ export default function MyComponent(props) {
return (
<div>
<button
onClick={(event) => (async () => await state.handlerClick(event))()}
>
<button onClick={async (event) => await state.handlerClick(event)}>
Click
</button>
</div>
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/__tests__/__snapshots__/html.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3155,8 +3155,8 @@ exports[`Html > jsx > Javascript Test > Stamped.io 1`] = `
}

// Event handler for 'click' event on button-2
function onButton2Click(event) {
event.preventDefault();
function onButton2Click(ev) {
ev.preventDefault();
state.showReviewPrompt = false;
update();
}
Expand Down Expand Up @@ -10399,8 +10399,8 @@ exports[`Html > jsx > Typescript Test > Stamped.io 1`] = `
}

// Event handler for 'click' event on button-2
function onButton2Click(event) {
event.preventDefault();
function onButton2Click(ev) {
ev.preventDefault();
state.showReviewPrompt = false;
update();
}
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/__tests__/__snapshots__/lit.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1824,8 +1824,8 @@ export default class SmileReviews extends LitElement {
? html\`<input placeholder=\\"Email\\" />
<input placeholder=\\"Title\\" />
<textarea placeholder=\\"How was your experience?\\" ></textarea>
<button @click=\${(event) => {
event.preventDefault();
<button @click=\${(ev) => {
ev.preventDefault();
this.showReviewPrompt = false;
}} >
Submit
Expand Down Expand Up @@ -6346,8 +6346,8 @@ export default class SmileReviews extends LitElement {
? html\`<input placeholder=\\"Email\\" />
<input placeholder=\\"Title\\" />
<textarea placeholder=\\"How was your experience?\\" ></textarea>
<button @click=\${(event) => {
event.preventDefault();
<button @click=\${(ev) => {
ev.preventDefault();
this.showReviewPrompt = false;
}} >
Submit
Expand Down
48 changes: 24 additions & 24 deletions packages/core/src/__tests__/__snapshots__/marko.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1237,16 +1237,16 @@ class {
}
style {
.input-c36324fe {
.input-2c2fdbe2 {
display: block;
}
.textarea-c36324fe {
.textarea-2c2fdbe2 {
display: block;
}
.button-c36324fe {
.button-2c2fdbe2 {
display: block;
}
.review-c36324fe {
.review-2c2fdbe2 {
margin: 10px;
padding: 10px;
background: white;
Expand All @@ -1255,7 +1255,7 @@ style {
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
-webkit-font-smoothing: antialiased;
}
.img-c36324fe {
.img-2c2fdbe2 {
height: 30px;
width: 30px;
margin-right: 10px;
Expand All @@ -1267,24 +1267,24 @@ style {
</button>
<if(state.showReviewPrompt || 'asdf')>
<input placeholder=\\"Email\\" />
<input placeholder=\\"Title\\" class=\\"input-c36324fe\\" />
<input placeholder=\\"Title\\" class=\\"input-2c2fdbe2\\" />
<textarea
placeholder=\\"How was your experience?\\"
class=\\"textarea-c36324fe\\"
class=\\"textarea-2c2fdbe2\\"
></textarea>
<button
class=\\"button-c36324fe\\"
on-click((event) => {
event.preventDefault();
class=\\"button-2c2fdbe2\\"
on-click((ev) => {
ev.preventDefault();
state.showReviewPrompt = false;
})
>
Submit
</button></if>
<for|review,index| of=(state.reviews)>
<div class=\\"review-c36324fe\\" key=(review.id)>
<img class=\\"img-c36324fe\\" src=(review.avatar) />
<div class=\\"review-2c2fdbe2\\" key=(review.id)>
<img class=\\"img-2c2fdbe2\\" src=(review.avatar) />
<div class=(state.showReviewPrompt ? 'bg-primary' : 'bg-secondary')>
<div>N: \${index}</div>
<div>\${review.author}</div>
Expand Down Expand Up @@ -3789,16 +3789,16 @@ class {
}
style {
.input-6d576eee {
.input-7b5e9e4a {
display: block;
}
.textarea-6d576eee {
.textarea-7b5e9e4a {
display: block;
}
.button-6d576eee {
.button-7b5e9e4a {
display: block;
}
.review-6d576eee {
.review-7b5e9e4a {
margin: 10px;
padding: 10px;
background: white;
Expand All @@ -3807,7 +3807,7 @@ style {
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
-webkit-font-smoothing: antialiased;
}
.img-6d576eee {
.img-7b5e9e4a {
height: 30px;
width: 30px;
margin-right: 10px;
Expand All @@ -3819,24 +3819,24 @@ style {
</button>
<if(state.showReviewPrompt || 'asdf')>
<input placeholder=\\"Email\\" />
<input placeholder=\\"Title\\" class=\\"input-6d576eee\\" />
<input placeholder=\\"Title\\" class=\\"input-7b5e9e4a\\" />
<textarea
placeholder=\\"How was your experience?\\"
class=\\"textarea-6d576eee\\"
class=\\"textarea-7b5e9e4a\\"
></textarea>
<button
class=\\"button-6d576eee\\"
on-click((event) => {
event.preventDefault();
class=\\"button-7b5e9e4a\\"
on-click((ev) => {
ev.preventDefault();
state.showReviewPrompt = false;
})
>
Submit
</button></if>
<for|review,index| of=(state.reviews)>
<div class=\\"review-6d576eee\\" key=(review.id)>
<img class=\\"img-6d576eee\\" src=(review.avatar) />
<div class=\\"review-7b5e9e4a\\" key=(review.id)>
<img class=\\"img-7b5e9e4a\\" src=(review.avatar) />
<div class=(state.showReviewPrompt ? 'bg-primary' : 'bg-secondary')>
<div>N: \${index}</div>
<div>\${review.author}</div>
Expand Down
Loading

0 comments on commit b690cb8

Please sign in to comment.