diff --git a/packages/core/src/__tests__/__snapshots__/builder.test.ts.snap b/packages/core/src/__tests__/__snapshots__/builder.test.ts.snap index 100a1f41b5..2c9a83cafb 100644 --- a/packages/core/src/__tests__/__snapshots__/builder.test.ts.snap +++ b/packages/core/src/__tests__/__snapshots__/builder.test.ts.snap @@ -903,9 +903,11 @@ exports[`Builder > Regenerate custom Hero 1`] = ` boxSizing: \\"border-box\\", marginTop: \\"200px\\" }", + "type": "single", }, "height": { "code": "400", + "type": "single", }, }, "children": [], diff --git a/packages/core/src/__tests__/__snapshots__/context.test.ts.snap b/packages/core/src/__tests__/__snapshots__/context.test.ts.snap index 5c97bb8503..e129652576 100644 --- a/packages/core/src/__tests__/__snapshots__/context.test.ts.snap +++ b/packages/core/src/__tests__/__snapshots__/context.test.ts.snap @@ -104,10 +104,12 @@ exports[`Context > Use and set context in complex components 1`] = ` "bindings": { "state.properties": { "code": "state.properties", + "spreadType": "normal", "type": "spread", }, "style": { "code": "state.css", + "type": "single", }, }, "children": [ @@ -128,6 +130,7 @@ exports[`Context > Use and set context in complex components 1`] = ` "bindings": { "block": { "code": "state.useBlock", + "type": "single", }, }, "children": [], @@ -153,6 +156,7 @@ exports[`Context > Use and set context in complex components 1`] = ` "bindings": { "when": { "code": "state.componentRef", + "type": "single", }, }, "children": [ @@ -161,9 +165,11 @@ exports[`Context > Use and set context in complex components 1`] = ` "bindings": { "children": { "code": "state.useBlock.children", + "type": "single", }, "state.componentOptions": { "code": "state.componentOptions", + "spreadType": "normal", "type": "spread", }, }, @@ -196,6 +202,7 @@ exports[`Context > Use and set context in complex components 1`] = ` "bindings": { "when": { "code": "!state.componentRef && state.useBlock.children && state.useBlock.children.length", + "type": "single", }, }, "children": [ @@ -216,6 +223,7 @@ exports[`Context > Use and set context in complex components 1`] = ` "bindings": { "each": { "code": "state.useBlock.children", + "type": "single", }, }, "children": [ @@ -224,9 +232,11 @@ exports[`Context > Use and set context in complex components 1`] = ` "bindings": { "block": { "code": "child", + "type": "single", }, "index": { "code": "index", + "type": "single", }, }, "children": [], @@ -607,6 +617,7 @@ exports[`Context > Use and set context in components 1`] = ` "bindings": { "_text": { "code": "foo.value", + "type": "single", }, }, "children": [], diff --git a/packages/core/src/__tests__/__snapshots__/marko.test.ts.snap b/packages/core/src/__tests__/__snapshots__/marko.test.ts.snap index 08dd29ddb0..f02bce07f0 100644 --- a/packages/core/src/__tests__/__snapshots__/marko.test.ts.snap +++ b/packages/core/src/__tests__/__snapshots__/marko.test.ts.snap @@ -85,14 +85,14 @@ exports[`Marko > jsx > Javascript Test > AdvancedRef 1`] = ` } style { - .input-4a4b9003 { + .input-790d468a { color: red; } }
+\${JSON.stringify(state.responseData, null, 2)} @@ -977,7 +977,7 @@ exports[`Marko > jsx > Javascript Test > Image 1`] = ` } style { - .img-a94ec16e { + .img-45432c52 { opacity: 1; transition: opacity 0.2s ease-in-out; object-fit: cover; @@ -990,7 +990,7 @@ style { component.setLoaded()) srcset=(input.srcset) @@ -1185,16 +1185,16 @@ class { } style { - .input-017045de { + .input-c3470f28 { display: block; } - .textarea-017045de { + .textarea-c3470f28 { display: block; } - .button-017045de { + .button-c3470f28 { display: block; } - .review-017045de { + .review-c3470f28 { margin: 10px; padding: 10px; background: white; @@ -1202,7 +1202,7 @@ style { border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } - .img-017045de { + .img-c3470f28 { height: 30px; width: 30px; margin-right: 10px; @@ -1215,13 +1215,13 @@ style {- + - - ++N: \${index}@@ -1339,13 +1339,13 @@ exports[`Marko > jsx > Javascript Test > basicForwardRef 1`] = ` } style { - .input-110b8dfc { + .input-014e706f { color: red; } }state.name = event.target.value) @@ -1365,13 +1365,13 @@ exports[`Marko > jsx > Javascript Test > basicForwardRefMetadata 1`] = ` } style { - .input-565a1be8 { + .input-53a59b24 { color: red; } }state.name = event.target.value) @@ -1410,11 +1410,11 @@ exports[`Marko > jsx > Javascript Test > class + ClassName + css 1`] = ` "class {} style { - .div-45c59d97 { + .div-240d4a4d { padding: 10px; } } -+Hello! I can run in React, Vue, Solid, or Liquid!" `; @@ -1423,11 +1423,11 @@ exports[`Marko > jsx > Javascript Test > class + css 1`] = ` "class {} style { - .div-74a0302e { + .div-210be817 { padding: 10px; } } -+Hello! I can run in React, Vue, Solid, or Liquid!" `; @@ -1436,11 +1436,11 @@ exports[`Marko > jsx > Javascript Test > className + css 1`] = ` "class {} style { - .div-74a0302e { + .div-210be817 { padding: 10px; } } -+Hello! I can run in React, Vue, Solid, or Liquid!" `; @@ -1472,11 +1472,11 @@ exports[`Marko > jsx > Javascript Test > classState 1`] = ` } style { - .div-25715889 { + .div-52624371 { padding: 10px; } } -+Hello! I can run in React, Vue, Solid, or Liquid!" `; @@ -1662,23 +1662,23 @@ exports[`Marko > jsx > Javascript Test > nestedStyles 1`] = ` "class {} style { - .div-92502f5c { + .div-04b41bf9 { display: flex; foo: var(--bar); } @media (max-width: env(--mobile)) { - .div-92502f5c { + .div-04b41bf9 { display: block; } } - .div-92502f5c:hover { + .div-04b41bf9:hover { display: flex; } - .div-92502f5c .nested-selector { + .div-04b41bf9 .nested-selector { display: grid; } } -Hello world" +Hello world" `; exports[`Marko > jsx > Javascript Test > onInit & onMount 1`] = ` @@ -2064,12 +2064,12 @@ class { } style { - .div-6d1158e4 { + .div-c8eb54c0 { display: flex; flex-direction: columns; } } -trackClick(input.content.id))> +trackClick(input.content.id))>" `; @@ -2209,7 +2209,7 @@ exports[`Marko > jsx > Javascript Test > use-style-and-css 1`] = ` "class {} style { - .button-625c33fa { + .button-0b7811fa { background: blue; color: white; } @@ -2219,7 +2219,7 @@ style { outline: 1px solid black; } } -" +" `; exports[`Marko > jsx > Javascript Test > use-style-outside-component 1`] = ` @@ -2275,14 +2275,14 @@ exports[`Marko > jsx > Typescript Test > AdvancedRef 1`] = ` } style { - .input-4a4b9003 { + .input-790d468a { color: red; } }component.onBlur()) @@ -2319,11 +2319,11 @@ class { } style { - .div-6f8bbe5f { + .div-48c79144 { padding: 10px; } } - +state.name = myEvent.target.value) @@ -2521,14 +2521,14 @@ exports[`Marko > jsx > Typescript Test > BasicRef 1`] = ` } style { - .input-37a1283e { + .input-cbb647ea { color: red; } }component.onBlur()) @@ -2633,29 +2633,29 @@ exports[`Marko > jsx > Typescript Test > Columns 1`] = ` } style { - .div-8dfe73ba { + .div-f5d75200 { display: flex; flex-direction: column; align-items: stretch; line-height: normal; } @media (max-width: 999px) { - .div-8dfe73ba { + .div-f5d75200 { flex-direction: row; } } @media (max-width: 639px) { - .div-8dfe73ba { + .div-f5d75200 { flex-direction: row-reverse; } } - .div-8dfe73ba-2 { + .div-f5d75200-2 { flex-grow: 1; } } - +" `; @@ -3062,7 +3062,7 @@ class { } style { - .pre-2a3c5c5a { + .pre-37eea1bf { padding: 10px; color: red; text-align: center; @@ -3097,7 +3097,7 @@ style { >- \${column.content} \${index}+\${column.content} \${index}- +\${JSON.stringify(state.responseData, null, 2)} @@ -3167,7 +3167,7 @@ exports[`Marko > jsx > Typescript Test > Image 1`] = ` } style { - .img-a94ec16e { + .img-45432c52 { opacity: 1; transition: opacity 0.2s ease-in-out; object-fit: cover; @@ -3180,7 +3180,7 @@ style { component.setLoaded()) srcset=(input.srcset) @@ -3375,16 +3375,16 @@ class { } style { - .input-017045de { + .input-c3470f28 { display: block; } - .textarea-017045de { + .textarea-c3470f28 { display: block; } - .button-017045de { + .button-c3470f28 { display: block; } - .review-017045de { + .review-c3470f28 { margin: 10px; padding: 10px; background: white; @@ -3392,7 +3392,7 @@ style { border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } - .img-017045de { + .img-c3470f28 { height: 30px; width: 30px; margin-right: 10px; @@ -3405,13 +3405,13 @@ style {- + - - ++N: \${index}@@ -3529,13 +3529,13 @@ exports[`Marko > jsx > Typescript Test > basicForwardRef 1`] = ` } style { - .input-110b8dfc { + .input-014e706f { color: red; } }state.name = event.target.value) @@ -3555,13 +3555,13 @@ exports[`Marko > jsx > Typescript Test > basicForwardRefMetadata 1`] = ` } style { - .input-565a1be8 { + .input-53a59b24 { color: red; } }state.name = event.target.value) @@ -3600,11 +3600,11 @@ exports[`Marko > jsx > Typescript Test > class + ClassName + css 1`] = ` "class {} style { - .div-45c59d97 { + .div-240d4a4d { padding: 10px; } } -+Hello! I can run in React, Vue, Solid, or Liquid!" `; @@ -3613,11 +3613,11 @@ exports[`Marko > jsx > Typescript Test > class + css 1`] = ` "class {} style { - .div-74a0302e { + .div-210be817 { padding: 10px; } } -+Hello! I can run in React, Vue, Solid, or Liquid!" `; @@ -3626,11 +3626,11 @@ exports[`Marko > jsx > Typescript Test > className + css 1`] = ` "class {} style { - .div-74a0302e { + .div-210be817 { padding: 10px; } } -+Hello! I can run in React, Vue, Solid, or Liquid!" `; @@ -3662,11 +3662,11 @@ exports[`Marko > jsx > Typescript Test > classState 1`] = ` } style { - .div-25715889 { + .div-52624371 { padding: 10px; } } -+Hello! I can run in React, Vue, Solid, or Liquid!" `; @@ -3852,23 +3852,23 @@ exports[`Marko > jsx > Typescript Test > nestedStyles 1`] = ` "class {} style { - .div-92502f5c { + .div-04b41bf9 { display: flex; foo: var(--bar); } @media (max-width: env(--mobile)) { - .div-92502f5c { + .div-04b41bf9 { display: block; } } - .div-92502f5c:hover { + .div-04b41bf9:hover { display: flex; } - .div-92502f5c .nested-selector { + .div-04b41bf9 .nested-selector { display: grid; } } -Hello world" +Hello world" `; exports[`Marko > jsx > Typescript Test > onInit & onMount 1`] = ` @@ -4254,12 +4254,12 @@ class { } style { - .div-6d1158e4 { + .div-c8eb54c0 { display: flex; flex-direction: columns; } } -trackClick(input.content.id))> +trackClick(input.content.id))>" `; @@ -4399,7 +4399,7 @@ exports[`Marko > jsx > Typescript Test > use-style-and-css 1`] = ` "class {} style { - .button-625c33fa { + .button-0b7811fa { background: blue; color: white; } @@ -4409,7 +4409,7 @@ style { outline: 1px solid black; } } -" +" `; exports[`Marko > jsx > Typescript Test > use-style-outside-component 1`] = ` diff --git a/packages/core/src/__tests__/__snapshots__/parse-jsx.test.ts.snap b/packages/core/src/__tests__/__snapshots__/parse-jsx.test.ts.snap index 16654db23b..3fe99b9b42 100644 --- a/packages/core/src/__tests__/__snapshots__/parse-jsx.test.ts.snap +++ b/packages/core/src/__tests__/__snapshots__/parse-jsx.test.ts.snap @@ -25,6 +25,7 @@ exports[`Parse JSX > AdvancedRef 1`] = ` "bindings": { "when": { "code": "props.showInput", + "type": "single", }, }, "children": [ @@ -51,24 +52,29 @@ exports[`Parse JSX > AdvancedRef 1`] = ` "code": "{ color: 'red' }", + "type": "single", }, "onBlur": { "arguments": [ "event", ], "code": "state.onBlur()", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.name = event.target.value", + "type": "single", }, "ref": { "code": "inputRef", + "type": "single", }, "value": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -95,6 +101,7 @@ exports[`Parse JSX > AdvancedRef 1`] = ` "bindings": { "ref": { "code": "inputNoArgRef", + "type": "single", }, }, "children": [ @@ -269,6 +276,7 @@ exports[`Parse JSX > AdvancedRef 1`] = ` "bindings": { "_text": { "code": "state.lowerCaseName()", + "type": "single", }, }, "children": [], @@ -363,6 +371,7 @@ exports[`Parse JSX > Basic 1`] = ` "code": "{ padding: '10px' }", + "type": "single", }, }, "children": [ @@ -386,9 +395,11 @@ exports[`Parse JSX > Basic 1`] = ` "myEvent", ], "code": "state.name = myEvent.target.value", + "type": "single", }, "value": { "code": "DEFAULT_VALUES.name || state.name", + "type": "single", }, }, "children": [], @@ -495,6 +506,7 @@ exports[`Parse JSX > Basic 2`] = ` "bindings": { "each": { "code": "state.names", + "type": "single", }, }, "children": [ @@ -503,6 +515,7 @@ exports[`Parse JSX > Basic 2`] = ` "bindings": { "when": { "code": "person === state.name", + "type": "single", }, }, "children": [ @@ -528,9 +541,11 @@ exports[`Parse JSX > Basic 2`] = ` "code": "{ state.name = event.target.value + ' and ' + person; }", + "type": "single", }, "value": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -556,6 +571,7 @@ exports[`Parse JSX > Basic 2`] = ` "bindings": { "_text": { "code": "person", + "type": "single", }, }, "children": [], @@ -659,6 +675,7 @@ exports[`Parse JSX > Basic Context 1`] = ` "bindings": { "_text": { "code": "myService.method('hello') + state.name", + "type": "single", }, }, "children": [], @@ -685,6 +702,7 @@ exports[`Parse JSX > Basic Context 1`] = ` "bindings": { "onChange": { "code": "state.onChange", + "type": "single", }, }, "children": [], @@ -792,6 +810,7 @@ exports[`Parse JSX > Basic OnMount Update 1`] = ` "bindings": { "_text": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -945,6 +964,7 @@ exports[`Parse JSX > BasicAttribute 1`] = ` "bindings": { "spellcheck": { "code": "true", + "type": "single", }, }, "children": [], @@ -998,6 +1018,7 @@ exports[`Parse JSX > BasicBooleanAttribute 1`] = ` "bindings": { "_text": { "code": "props.children", + "type": "single", }, }, "children": [], @@ -1022,6 +1043,7 @@ exports[`Parse JSX > BasicBooleanAttribute 1`] = ` "bindings": { "_text": { "code": "props.type", + "type": "single", }, }, "children": [], @@ -1047,6 +1069,7 @@ exports[`Parse JSX > BasicBooleanAttribute 1`] = ` "bindings": { "toggle": { "code": "true", + "type": "single", }, }, "children": [], @@ -1072,6 +1095,7 @@ exports[`Parse JSX > BasicBooleanAttribute 1`] = ` "bindings": { "toggle": { "code": "true", + "type": "single", }, }, "children": [], @@ -1097,6 +1121,7 @@ exports[`Parse JSX > BasicBooleanAttribute 1`] = ` "bindings": { "list": { "code": "null", + "type": "single", }, }, "children": [], @@ -1179,6 +1204,7 @@ exports[`Parse JSX > BasicChildComponent 1`] = ` "bindings": { "id": { "code": "state.dev", + "type": "single", }, }, "children": [], @@ -1220,9 +1246,11 @@ exports[`Parse JSX > BasicChildComponent 1`] = ` "bindings": { "bye": { "code": "state.dev", + "type": "single", }, "hi": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -1331,6 +1359,7 @@ exports[`Parse JSX > BasicFor 1`] = ` "bindings": { "each": { "code": "state.names", + "type": "single", }, }, "children": [ @@ -1360,9 +1389,11 @@ exports[`Parse JSX > BasicFor 1`] = ` "code": "{ state.name = event.target.value + ' and ' + person; }", + "type": "single", }, "value": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -1388,6 +1419,7 @@ exports[`Parse JSX > BasicFor 1`] = ` "bindings": { "_text": { "code": "person", + "type": "single", }, }, "children": [], @@ -1495,6 +1527,7 @@ exports[`Parse JSX > BasicRef 1`] = ` "bindings": { "when": { "code": "props.showInput", + "type": "single", }, }, "children": [ @@ -1521,24 +1554,29 @@ exports[`Parse JSX > BasicRef 1`] = ` "code": "{ color: 'red' }", + "type": "single", }, "onBlur": { "arguments": [ "event", ], "code": "state.onBlur()", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.name = event.target.value", + "type": "single", }, "ref": { "code": "inputRef", + "type": "single", }, "value": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -1565,6 +1603,7 @@ exports[`Parse JSX > BasicRef 1`] = ` "bindings": { "ref": { "code": "inputNoArgRef", + "type": "single", }, }, "children": [ @@ -1739,6 +1778,7 @@ exports[`Parse JSX > BasicRef 1`] = ` "bindings": { "_text": { "code": "state.lowerCaseName()", + "type": "single", }, }, "children": [], @@ -1843,6 +1883,7 @@ exports[`Parse JSX > BasicRefAssignment 1`] = ` "evt", ], "code": "state.handlerClick(evt)", + "type": "single", }, }, "children": [ @@ -1958,6 +1999,7 @@ exports[`Parse JSX > BasicRefPrevious 1`] = ` "bindings": { "_text": { "code": "state.count", + "type": "single", }, }, "children": [], @@ -1982,6 +2024,7 @@ exports[`Parse JSX > BasicRefPrevious 1`] = ` "bindings": { "_text": { "code": "prevCount", + "type": "single", }, }, "children": [], @@ -2025,6 +2068,7 @@ exports[`Parse JSX > BasicRefPrevious 1`] = ` "bindings": { "onClick": { "code": "state.count += 1", + "type": "single", }, }, "children": [ @@ -2144,6 +2188,7 @@ exports[`Parse JSX > Button 1`] = ` "bindings": { "when": { "code": "props.link", + "type": "single", }, }, "children": [ @@ -2164,13 +2209,16 @@ exports[`Parse JSX > Button 1`] = ` "bindings": { "href": { "code": "props.link", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "target": { "code": "props.openLinkInNewTab ? '_blank' : undefined", + "type": "single", }, }, "children": [ @@ -2191,6 +2239,7 @@ exports[`Parse JSX > Button 1`] = ` "bindings": { "_text": { "code": "props.text", + "type": "single", }, }, "children": [], @@ -2252,6 +2301,7 @@ exports[`Parse JSX > Button 1`] = ` "bindings": { "when": { "code": "!props.link", + "type": "single", }, }, "children": [ @@ -2272,6 +2322,7 @@ exports[`Parse JSX > Button 1`] = ` "bindings": { "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, }, @@ -2293,6 +2344,7 @@ exports[`Parse JSX > Button 1`] = ` "bindings": { "_text": { "code": "props.text", + "type": "single", }, }, "children": [], @@ -2403,6 +2455,7 @@ exports[`Parse JSX > Columns 1`] = ` flexDirection: 'row-reverse' } }", + "type": "single", }, }, "children": [ @@ -2423,6 +2476,7 @@ exports[`Parse JSX > Columns 1`] = ` "bindings": { "each": { "code": "props.columns", + "type": "single", }, }, "children": [ @@ -2433,6 +2487,7 @@ exports[`Parse JSX > Columns 1`] = ` "code": "{ flexGrow: '1' }", + "type": "single", }, }, "children": [ @@ -2453,6 +2508,7 @@ exports[`Parse JSX > Columns 1`] = ` "bindings": { "_text": { "code": "column.content", + "type": "single", }, }, "children": [], @@ -2477,6 +2533,7 @@ exports[`Parse JSX > Columns 1`] = ` "bindings": { "_text": { "code": "index", + "type": "single", }, }, "children": [], @@ -2622,6 +2679,7 @@ exports[`Parse JSX > ContentSlotHtml 1`] = ` "bindings": { "name": { "code": "props.slotTesting", + "type": "single", }, }, "children": [], @@ -2807,6 +2865,7 @@ exports[`Parse JSX > ContentSlotJSX 1`] = ` "bindings": { "when": { "code": "props.slotTesting", + "type": "single", }, }, "children": [ @@ -2831,6 +2890,7 @@ exports[`Parse JSX > ContentSlotJSX 1`] = ` "bindings": { "_text": { "code": "props.slotTesting", + "type": "single", }, }, "children": [], @@ -2939,6 +2999,7 @@ exports[`Parse JSX > ContentSlotJSX 1`] = ` "bindings": { "_text": { "code": "props.children", + "type": "single", }, }, "children": [], @@ -3003,12 +3064,15 @@ exports[`Parse JSX > CustomCode 1`] = ` "bindings": { "class": { "code": "'builder-custom-code' + (props.replaceNodes ? ' replace-nodes' : '')", + "type": "single", }, "innerHTML": { "code": "props.code", + "type": "single", }, "ref": { "code": "elem", + "type": "single", }, }, "children": [], @@ -3105,12 +3169,15 @@ exports[`Parse JSX > Embed 1`] = ` "bindings": { "class": { "code": "'builder-custom-code' + (props.replaceNodes ? ' replace-nodes' : '')", + "type": "single", }, "innerHTML": { "code": "props.code", + "type": "single", }, "ref": { "code": "elem", + "type": "single", }, }, "children": [], @@ -3207,28 +3274,35 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "action": { "code": "!props.sendWithJs && props.action", + "type": "single", }, "method": { "code": "props.method", + "type": "single", }, "name": { "code": "props.name", + "type": "single", }, "onSubmit": { "arguments": [ "event", ], "code": "state.onSubmit(event)", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "ref": { "code": "formRef", + "type": "single", }, "validate": { "code": "props.validate", + "type": "single", }, }, "children": [ @@ -3249,6 +3323,7 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "when": { "code": "props.builderBlock && props.builderBlock.children", + "type": "single", }, }, "children": [ @@ -3269,6 +3344,7 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "each": { "code": "props.builderBlock?.children", + "type": "single", }, }, "children": [ @@ -3277,12 +3353,15 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "block": { "code": "block", + "type": "single", }, "index": { "code": "index", + "type": "single", }, "key": { "code": "block.id", + "type": "single", }, }, "children": [], @@ -3336,6 +3415,7 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "when": { "code": "state.submissionState === 'error'", + "type": "single", }, }, "children": [ @@ -3356,6 +3436,7 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "blocks": { "code": "props.errorMessage", + "type": "single", }, }, "children": [], @@ -3402,6 +3483,7 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "when": { "code": "state.submissionState === 'sending'", + "type": "single", }, }, "children": [ @@ -3422,6 +3504,7 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "blocks": { "code": "props.sendingMessage", + "type": "single", }, }, "children": [], @@ -3468,6 +3551,7 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "when": { "code": "state.submissionState === 'error' && state.responseData", + "type": "single", }, }, "children": [ @@ -3492,6 +3576,7 @@ exports[`Parse JSX > Form 1`] = ` color: 'red', textAlign: 'center' }", + "type": "single", }, }, "children": [ @@ -3512,6 +3597,7 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "_text": { "code": "JSON.stringify(state.responseData, null, 2)", + "type": "single", }, }, "children": [], @@ -3576,6 +3662,7 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "when": { "code": "state.submissionState === 'success'", + "type": "single", }, }, "children": [ @@ -3596,6 +3683,7 @@ exports[`Parse JSX > Form 1`] = ` "bindings": { "blocks": { "code": "props.successMessage", + "type": "single", }, }, "children": [], @@ -3976,6 +4064,7 @@ exports[`Parse JSX > Image 1`] = ` "bindings": { "ref": { "code": "pictureRef", + "type": "single", }, }, "children": [ @@ -3996,6 +4085,7 @@ exports[`Parse JSX > Image 1`] = ` "bindings": { "when": { "code": "!state.useLazyLoading() || state.load", + "type": "single", }, }, "children": [ @@ -4016,12 +4106,15 @@ exports[`Parse JSX > Image 1`] = ` "bindings": { "alt": { "code": "props.altText", + "type": "single", }, "aria-role": { "code": "props.altText ? 'presentation' : undefined", + "type": "single", }, "class": { "code": "'builder-image' + (props._class ? ' ' + props._class : '')", + "type": "single", }, "css": { "code": "{ @@ -4030,18 +4123,23 @@ exports[`Parse JSX > Image 1`] = ` objectFit: 'cover', objectPosition: 'center' }", + "type": "single", }, "onLoad": { "code": "state.setLoaded()", + "type": "single", }, "sizes": { "code": "props.sizes", + "type": "single", }, "src": { "code": "props.image", + "type": "single", }, "srcset": { "code": "props.srcset", + "type": "single", }, }, "children": [], @@ -4085,6 +4183,7 @@ exports[`Parse JSX > Image 1`] = ` "bindings": { "srcset": { "code": "props.srcset", + "type": "single", }, }, "children": [], @@ -4128,6 +4227,7 @@ exports[`Parse JSX > Image 1`] = ` "bindings": { "_text": { "code": "props.children", + "type": "single", }, }, "children": [], @@ -4284,6 +4384,7 @@ exports[`Parse JSX > Image State 1`] = ` "bindings": { "each": { "code": "state.images", + "type": "single", }, }, "children": [ @@ -4308,9 +4409,11 @@ exports[`Parse JSX > Image State 1`] = ` "bindings": { "key": { "code": "itemIndex", + "type": "single", }, "src": { "code": "item", + "type": "single", }, }, "children": [], @@ -4401,22 +4504,27 @@ exports[`Parse JSX > Img 1`] = ` "bindings": { "alt": { "code": "props.altText", + "type": "single", }, "key": { "code": "Builder.isEditing && props.imgSrc || 'default-key'", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "src": { "code": "props.imgSrc", + "type": "single", }, "style": { "code": "{ objectFit: props.backgroundSize || 'cover', objectPosition: props.backgroundPosition || 'center' }", + "type": "single", }, }, "children": [], @@ -4468,28 +4576,36 @@ exports[`Parse JSX > Input 1`] = ` "bindings": { "defaultValue": { "code": "props.defaultValue", + "type": "single", }, "key": { "code": "Builder.isEditing && props.defaultValue ? props.defaultValue : 'default-key'", + "type": "single", }, "name": { "code": "props.name", + "type": "single", }, "placeholder": { "code": "props.placeholder", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "required": { "code": "props.required", + "type": "single", }, "type": { "code": "props.type", + "type": "single", }, "value": { "code": "props.value", + "type": "single", }, }, "children": [], @@ -4543,9 +4659,11 @@ exports[`Parse JSX > RawText 1`] = ` "bindings": { "class": { "code": "props.attributes?.class || props.attributes?.className", + "type": "single", }, "innerHTML": { "code": "props.text || ''", + "type": "single", }, }, "children": [], @@ -4603,6 +4721,7 @@ exports[`Parse JSX > Remove Internal mitosis package 1`] = ` "bindings": { "_text": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -4659,12 +4778,14 @@ exports[`Parse JSX > Section 1`] = ` "bindings": { "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "style": { "code": "props.maxWidth && typeof props.maxWidth === 'number' ? { maxWidth: props.maxWidth } : undefined", + "type": "single", }, }, "children": [ @@ -4685,6 +4806,7 @@ exports[`Parse JSX > Section 1`] = ` "bindings": { "_text": { "code": "props.children", + "type": "single", }, }, "children": [], @@ -4745,6 +4867,7 @@ exports[`Parse JSX > Section 2`] = ` "bindings": { "when": { "code": "state.max", + "type": "single", }, }, "children": [ @@ -4765,6 +4888,7 @@ exports[`Parse JSX > Section 2`] = ` "bindings": { "each": { "code": "state.items", + "type": "single", }, }, "children": [ @@ -4773,12 +4897,14 @@ exports[`Parse JSX > Section 2`] = ` "bindings": { "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "style": { "code": "{ maxWidth: item + state.max }", + "type": "single", }, }, "children": [ @@ -4799,6 +4925,7 @@ exports[`Parse JSX > Section 2`] = ` "bindings": { "_text": { "code": "props.children", + "type": "single", }, }, "children": [], @@ -4894,19 +5021,24 @@ exports[`Parse JSX > Select 1`] = ` "bindings": { "defaultValue": { "code": "props.defaultValue", + "type": "single", }, "key": { "code": "Builder.isEditing && props.defaultValue ? props.defaultValue : 'default-key'", + "type": "single", }, "name": { "code": "props.name", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "value": { "code": "props.value", + "type": "single", }, }, "children": [ @@ -4927,6 +5059,7 @@ exports[`Parse JSX > Select 1`] = ` "bindings": { "each": { "code": "props.options", + "type": "single", }, }, "children": [ @@ -4935,9 +5068,11 @@ exports[`Parse JSX > Select 1`] = ` "bindings": { "data-index": { "code": "index", + "type": "single", }, "value": { "code": "option.value", + "type": "single", }, }, "children": [ @@ -4958,6 +5093,7 @@ exports[`Parse JSX > Select 1`] = ` "bindings": { "_text": { "code": "option.name || option.value", + "type": "single", }, }, "children": [], @@ -5207,6 +5343,7 @@ exports[`Parse JSX > SlotHtml 1`] = ` "bindings": { "testing": { "code": " Hello", + "type": "single", }, }, "children": [], @@ -5306,6 +5443,7 @@ exports[`Parse JSX > SlotJsx 1`] = ` "bindings": { "slotTesting": { "code": "Hello", + "type": "single", }, }, "children": [], @@ -5511,6 +5649,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "bindings": { "data-user": { "code": "state.name", + "type": "single", }, }, "children": [ @@ -5531,6 +5670,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "bindings": { "onClick": { "code": "state.showReviewPrompt = true", + "type": "single", }, }, "children": [ @@ -5568,6 +5708,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "bindings": { "when": { "code": "state.showReviewPrompt || 'asdf'", + "type": "single", }, }, "children": [ @@ -5614,6 +5755,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "code": "{ display: 'block' }", + "type": "single", }, }, "children": [], @@ -5644,6 +5786,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "code": "{ display: 'block' }", + "type": "single", }, }, "children": [], @@ -5673,6 +5816,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "code": "{ display: 'block' }", + "type": "single", }, "onClick": { "arguments": [ @@ -5682,6 +5826,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` event.preventDefault(); state.showReviewPrompt = false; }", + "type": "single", }, }, "children": [ @@ -5739,6 +5884,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "bindings": { "each": { "code": "state.reviews", + "type": "single", }, }, "children": [ @@ -5754,9 +5900,11 @@ exports[`Parse JSX > Stamped.io 1`] = ` borderRadius: '5px', boxShadow: '0 2px 5px rgba(0, 0, 0, 0.1)' }", + "type": "single", }, "key": { "code": "review.id", + "type": "single", }, }, "children": [ @@ -5781,9 +5929,11 @@ exports[`Parse JSX > Stamped.io 1`] = ` width: '30px', marginRight: '10px' }", + "type": "single", }, "src": { "code": "review.avatar", + "type": "single", }, }, "children": [], @@ -5809,6 +5959,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "bindings": { "class": { "code": "state.showReviewPrompt ? 'bg-primary' : 'bg-secondary'", + "type": "single", }, }, "children": [ @@ -5844,6 +5995,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "bindings": { "_text": { "code": "index", + "type": "single", }, }, "children": [], @@ -5879,6 +6031,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "bindings": { "_text": { "code": "review.author", + "type": "single", }, }, "children": [], @@ -5914,6 +6067,7 @@ exports[`Parse JSX > Stamped.io 1`] = ` "bindings": { "_text": { "code": "review.reviewMessage", + "type": "single", }, }, "children": [], @@ -6070,6 +6224,7 @@ exports[`Parse JSX > Submit 1`] = ` "bindings": { "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, }, @@ -6091,6 +6246,7 @@ exports[`Parse JSX > Submit 1`] = ` "bindings": { "_text": { "code": "props.text", + "type": "single", }, }, "children": [], @@ -6152,14 +6308,17 @@ exports[`Parse JSX > Text 1`] = ` "bindings": { "contentEditable": { "code": "allowEditingText || undefined", + "type": "single", }, "data-name": { "code": "{ test: state.name || 'any name' }", + "type": "single", }, "innerHTML": { "code": "props.text || props.content || state.name || 'my name
'", + "type": "single", }, }, "children": [], @@ -6216,19 +6375,24 @@ exports[`Parse JSX > Textarea 1`] = ` "bindings": { "defaultValue": { "code": "props.defaultValue", + "type": "single", }, "name": { "code": "props.name", + "type": "single", }, "placeholder": { "code": "props.placeholder", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "value": { "code": "props.value", + "type": "single", }, }, "children": [], @@ -6273,24 +6437,31 @@ exports[`Parse JSX > Video 1`] = ` "bindings": { "autoplay": { "code": "props.autoPlay", + "type": "single", }, "controls": { "code": "props.controls", + "type": "single", }, "key": { "code": "props.video || 'no-src'", + "type": "single", }, "loop": { "code": "props.loop", + "type": "single", }, "muted": { "code": "props.muted", + "type": "single", }, "poster": { "code": "props.posterImage", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "style": { @@ -6304,6 +6475,7 @@ exports[`Parse JSX > Video 1`] = ` // not have the video overflow borderRadius: 1 }", + "type": "single", }, }, "children": [], @@ -6374,6 +6546,7 @@ exports[`Parse JSX > arrowFunctionInUseStore 1`] = ` "bindings": { "_text": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -6449,18 +6622,22 @@ exports[`Parse JSX > basicForwardRef 1`] = ` "code": "{ color: 'red' }", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.name = event.target.value", + "type": "single", }, "ref": { "code": "props.inputRef", + "type": "single", }, "value": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -6543,18 +6720,22 @@ exports[`Parse JSX > basicForwardRefMetadata 1`] = ` "code": "{ color: 'red' }", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.name = event.target.value", + "type": "single", }, "ref": { "code": "props.inputRef", + "type": "single", }, "value": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -6638,6 +6819,7 @@ exports[`Parse JSX > basicOnUpdateReturn 1`] = ` "bindings": { "_text": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -6717,6 +6899,7 @@ exports[`Parse JSX > boolean attribute 1`] = ` "bindings": { "_text": { "code": "props.children", + "type": "single", }, }, "children": [], @@ -6741,6 +6924,7 @@ exports[`Parse JSX > boolean attribute 1`] = ` "bindings": { "_text": { "code": "props.type", + "type": "single", }, }, "children": [], @@ -6766,6 +6950,7 @@ exports[`Parse JSX > boolean attribute 1`] = ` "bindings": { "toggle": { "code": "true", + "type": "single", }, }, "children": [], @@ -6791,6 +6976,7 @@ exports[`Parse JSX > boolean attribute 1`] = ` "bindings": { "toggle": { "code": "true", + "type": "single", }, }, "children": [], @@ -6816,6 +7002,7 @@ exports[`Parse JSX > boolean attribute 1`] = ` "bindings": { "list": { "code": "null", + "type": "single", }, }, "children": [], @@ -6884,6 +7071,7 @@ exports[`Parse JSX > class + ClassName + css 1`] = ` "code": "{ padding: '10px' }", + "type": "single", }, }, "children": [ @@ -6936,6 +7124,7 @@ exports[`Parse JSX > class + css 1`] = ` "code": "{ padding: '10px' }", + "type": "single", }, }, "children": [ @@ -6988,6 +7177,7 @@ exports[`Parse JSX > className + css 1`] = ` "code": "{ padding: '10px' }", + "type": "single", }, }, "children": [ @@ -7113,6 +7303,7 @@ exports[`Parse JSX > className 1`] = ` "bindings": { "class": { "code": "state.bindings", + "type": "single", }, }, "children": [ @@ -7189,14 +7380,17 @@ exports[`Parse JSX > classState 1`] = ` "bindings": { "class": { "code": "state.classState", + "type": "single", }, "css": { "code": "{ padding: '10px' }", + "type": "single", }, "style": { "code": "state.styleState", + "type": "single", }, }, "children": [ @@ -7276,6 +7470,7 @@ exports[`Parse JSX > componentWithContext 1`] = ` "bindings": { "_text": { "code": "foo.value", + "type": "single", }, }, "children": [], @@ -7403,6 +7598,7 @@ exports[`Parse JSX > componentWithContextMultiRoot 1`] = ` "bindings": { "_text": { "code": "foo.value", + "type": "single", }, }, "children": [], @@ -7622,6 +7818,7 @@ exports[`Parse JSX > defaultProps 1`] = ` "bindings": { "when": { "code": "props.link", + "type": "single", }, }, "children": [ @@ -7642,13 +7839,16 @@ exports[`Parse JSX > defaultProps 1`] = ` "bindings": { "href": { "code": "props.link", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "target": { "code": "props.openLinkInNewTab ? '_blank' : undefined", + "type": "single", }, }, "children": [ @@ -7669,6 +7869,7 @@ exports[`Parse JSX > defaultProps 1`] = ` "bindings": { "_text": { "code": "props.text", + "type": "single", }, }, "children": [], @@ -7730,6 +7931,7 @@ exports[`Parse JSX > defaultProps 1`] = ` "bindings": { "when": { "code": "!props.link", + "type": "single", }, }, "children": [ @@ -7753,9 +7955,11 @@ exports[`Parse JSX > defaultProps 1`] = ` "event", ], "code": "props.onClick(event)", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, }, @@ -7777,6 +7981,7 @@ exports[`Parse JSX > defaultProps 1`] = ` "bindings": { "_text": { "code": "props.buttonText", + "type": "single", }, }, "children": [], @@ -7915,6 +8120,7 @@ exports[`Parse JSX > defaultPropsOutsideComponent 1`] = ` "bindings": { "when": { "code": "props.link", + "type": "single", }, }, "children": [ @@ -7935,13 +8141,16 @@ exports[`Parse JSX > defaultPropsOutsideComponent 1`] = ` "bindings": { "href": { "code": "props.link", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "target": { "code": "props.openLinkInNewTab ? '_blank' : undefined", + "type": "single", }, }, "children": [ @@ -7962,6 +8171,7 @@ exports[`Parse JSX > defaultPropsOutsideComponent 1`] = ` "bindings": { "_text": { "code": "props.text", + "type": "single", }, }, "children": [], @@ -8023,6 +8233,7 @@ exports[`Parse JSX > defaultPropsOutsideComponent 1`] = ` "bindings": { "when": { "code": "!props.link", + "type": "single", }, }, "children": [ @@ -8046,9 +8257,11 @@ exports[`Parse JSX > defaultPropsOutsideComponent 1`] = ` "event", ], "code": "props.onClick(event)", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, }, @@ -8070,6 +8283,7 @@ exports[`Parse JSX > defaultPropsOutsideComponent 1`] = ` "bindings": { "_text": { "code": "props.text", + "type": "single", }, }, "children": [], @@ -8203,6 +8417,7 @@ exports[`Parse JSX > defaultValsWithTypes 1`] = ` "bindings": { "_text": { "code": "props.name || DEFAULT_VALUES.name", + "type": "single", }, }, "children": [], @@ -8261,6 +8476,7 @@ exports[`Parse JSX > expressionState 1`] = ` "bindings": { "_text": { "code": "state.refToUse", + "type": "single", }, }, "children": [], @@ -8306,6 +8522,7 @@ exports[`Parse JSX > import types 1`] = ` "bindings": { "state.getRenderContentProps(props.renderContentProps.block, 0)": { "code": "state.getRenderContentProps(props.renderContentProps.block, 0)", + "spreadType": "normal", "type": "spread", }, }, @@ -8382,6 +8599,7 @@ exports[`Parse JSX > metadata 1`] = ` "bindings": { "when": { "code": "props.link", + "type": "single", }, }, "children": [ @@ -8402,13 +8620,16 @@ exports[`Parse JSX > metadata 1`] = ` "bindings": { "href": { "code": "props.link", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "target": { "code": "props.openLinkInNewTab ? '_blank' : undefined", + "type": "single", }, }, "children": [ @@ -8429,6 +8650,7 @@ exports[`Parse JSX > metadata 1`] = ` "bindings": { "_text": { "code": "props.text", + "type": "single", }, }, "children": [], @@ -8490,6 +8712,7 @@ exports[`Parse JSX > metadata 1`] = ` "bindings": { "when": { "code": "!props.link", + "type": "single", }, }, "children": [ @@ -8510,6 +8733,7 @@ exports[`Parse JSX > metadata 1`] = ` "bindings": { "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, }, @@ -8531,6 +8755,7 @@ exports[`Parse JSX > metadata 1`] = ` "bindings": { "_text": { "code": "props.text", + "type": "single", }, }, "children": [], @@ -8744,10 +8969,12 @@ exports[`Parse JSX > multipleSpreads 1`] = ` "bindings": { "attrs": { "code": "state.attrs", + "spreadType": "normal", "type": "spread", }, "props": { "code": "props", + "spreadType": "normal", "type": "spread", }, }, @@ -8791,6 +9018,7 @@ exports[`Parse JSX > nestedShow 1`] = ` "bindings": { "when": { "code": "props.conditionA", + "type": "single", }, }, "children": [ @@ -8811,6 +9039,7 @@ exports[`Parse JSX > nestedShow 1`] = ` "bindings": { "when": { "code": "!props.conditionB", + "type": "single", }, }, "children": [ @@ -8972,6 +9201,7 @@ exports[`Parse JSX > nestedStyles 1`] = ` display: 'grid' } }", + "type": "single", }, }, "children": [ @@ -9072,6 +9302,7 @@ exports[`Parse JSX > onInit 1`] = ` "bindings": { "_text": { "code": "state.name", + "type": "single", }, }, "children": [], @@ -9548,6 +9779,7 @@ exports[`Parse JSX > preserveTyping 1`] = ` "bindings": { "_text": { "code": "props.name", + "type": "single", }, }, "children": [], @@ -9619,6 +9851,7 @@ exports[`Parse JSX > propsDestructure 1`] = ` "bindings": { "_text": { "code": "props.children", + "type": "single", }, }, "children": [], @@ -9643,6 +9876,7 @@ exports[`Parse JSX > propsDestructure 1`] = ` "bindings": { "_text": { "code": "props.type", + "type": "single", }, }, "children": [], @@ -9723,6 +9957,7 @@ exports[`Parse JSX > propsInterface 1`] = ` "bindings": { "_text": { "code": "props.name", + "type": "single", }, }, "children": [], @@ -9785,6 +10020,7 @@ exports[`Parse JSX > propsType 1`] = ` "bindings": { "_text": { "code": "props.name", + "type": "single", }, }, "children": [], @@ -9888,6 +10124,7 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "when": { "code": "state.shouldWrap", + "type": "single", }, }, "children": [ @@ -9920,6 +10157,7 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "when": { "code": "isEmptyHtmlElement(state.tag)", + "type": "single", }, }, "children": [ @@ -9940,10 +10178,12 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "state.actions": { "code": "state.actions", + "spreadType": "normal", "type": "spread", }, "state.attributes": { "code": "state.attributes", + "spreadType": "normal", "type": "spread", }, }, @@ -9988,6 +10228,7 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "when": { "code": "!isEmptyHtmlElement(state.tag) && state.repeatItemData", + "type": "single", }, }, "children": [ @@ -10008,6 +10249,7 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "each": { "code": "state.repeatItemData", + "type": "single", }, }, "children": [ @@ -10016,12 +10258,15 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "block": { "code": "data.block", + "type": "single", }, "key": { "code": "index", + "type": "single", }, "repeatContext": { "code": "data.context", + "type": "single", }, }, "children": [], @@ -10074,6 +10319,7 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "when": { "code": "!isEmptyHtmlElement(state.tag) && !state.repeatItemData", + "type": "single", }, }, "children": [ @@ -10094,10 +10340,12 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "state.actions": { "code": "state.actions", + "spreadType": "normal", "type": "spread", }, "state.attributes": { "code": "state.attributes", + "spreadType": "normal", "type": "spread", }, }, @@ -10119,6 +10367,7 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "state.renderComponentProps": { "code": "state.renderComponentProps", + "spreadType": "normal", "type": "spread", }, }, @@ -10157,6 +10406,7 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "each": { "code": "state.childrenWithoutParentComponent", + "type": "single", }, }, "children": [ @@ -10165,12 +10415,15 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "block": { "code": "child", + "type": "single", }, "context": { "code": "state.childrenContext", + "type": "single", }, "key": { "code": "'render-block-' + child.id", + "type": "single", }, }, "children": [], @@ -10204,6 +10457,7 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "each": { "code": "state.childrenWithoutParentComponent", + "type": "single", }, }, "children": [ @@ -10212,12 +10466,15 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "block": { "code": "child", + "type": "single", }, "context": { "code": "state.childrenContext", + "type": "single", }, "key": { "code": "'block-style-' + child.id", + "type": "single", }, }, "children": [], @@ -10289,6 +10546,7 @@ exports[`Parse JSX > renderBlock 1`] = ` "bindings": { "state.renderComponentProps": { "code": "state.renderComponentProps", + "spreadType": "normal", "type": "spread", }, }, @@ -10634,9 +10892,11 @@ exports[`Parse JSX > renderContentExample 1`] = ` display: 'flex', flexDirection: 'columns' }", + "type": "single", }, "onClick": { "code": "trackClick(props.content.id)", + "type": "single", }, }, "children": [ @@ -10657,6 +10917,7 @@ exports[`Parse JSX > renderContentExample 1`] = ` "bindings": { "blocks": { "code": "props.content.blocks", + "type": "single", }, }, "children": [], @@ -10784,6 +11045,7 @@ exports[`Parse JSX > rootFragmentMultiNode 1`] = ` "bindings": { "when": { "code": "props.link", + "type": "single", }, }, "children": [ @@ -10804,13 +11066,16 @@ exports[`Parse JSX > rootFragmentMultiNode 1`] = ` "bindings": { "href": { "code": "props.link", + "type": "single", }, "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, "target": { "code": "props.openLinkInNewTab ? '_blank' : undefined", + "type": "single", }, }, "children": [ @@ -10831,6 +11096,7 @@ exports[`Parse JSX > rootFragmentMultiNode 1`] = ` "bindings": { "_text": { "code": "props.text", + "type": "single", }, }, "children": [], @@ -10892,6 +11158,7 @@ exports[`Parse JSX > rootFragmentMultiNode 1`] = ` "bindings": { "when": { "code": "!props.link", + "type": "single", }, }, "children": [ @@ -10912,6 +11179,7 @@ exports[`Parse JSX > rootFragmentMultiNode 1`] = ` "bindings": { "props.attributes": { "code": "props.attributes", + "spreadType": "normal", "type": "spread", }, }, @@ -10933,6 +11201,7 @@ exports[`Parse JSX > rootFragmentMultiNode 1`] = ` "bindings": { "_text": { "code": "props.text", + "type": "single", }, }, "children": [], @@ -11032,6 +11301,7 @@ exports[`Parse JSX > rootShow 1`] = ` "bindings": { "when": { "code": "props.foo === 'bar'", + "type": "single", }, }, "children": [ @@ -11156,6 +11426,7 @@ exports[`Parse JSX > self-referencing component 1`] = ` "bindings": { "_text": { "code": "props.name", + "type": "single", }, }, "children": [], @@ -11181,6 +11452,7 @@ exports[`Parse JSX > self-referencing component 1`] = ` "bindings": { "when": { "code": "props.name === 'Batman'", + "type": "single", }, }, "children": [ @@ -11286,6 +11558,7 @@ exports[`Parse JSX > self-referencing component with children 1`] = ` "bindings": { "_text": { "code": "props.name", + "type": "single", }, }, "children": [], @@ -11311,6 +11584,7 @@ exports[`Parse JSX > self-referencing component with children 1`] = ` "bindings": { "_text": { "code": "props.children", + "type": "single", }, }, "children": [], @@ -11336,6 +11610,7 @@ exports[`Parse JSX > self-referencing component with children 1`] = ` "bindings": { "when": { "code": "props.name === 'Batman'", + "type": "single", }, }, "children": [ @@ -11471,6 +11746,7 @@ exports[`Parse JSX > showWithFor 1`] = ` "bindings": { "when": { "code": "props.conditionA", + "type": "single", }, }, "children": [ @@ -11491,6 +11767,7 @@ exports[`Parse JSX > showWithFor 1`] = ` "bindings": { "each": { "code": "props.items", + "type": "single", }, }, "children": [ @@ -11499,6 +11776,7 @@ exports[`Parse JSX > showWithFor 1`] = ` "bindings": { "key": { "code": "idx", + "type": "single", }, }, "children": [ @@ -11507,6 +11785,7 @@ exports[`Parse JSX > showWithFor 1`] = ` "bindings": { "_text": { "code": "item", + "type": "single", }, }, "children": [], @@ -11603,6 +11882,7 @@ exports[`Parse JSX > spreadAttrs 1`] = ` "bindings": { "attrs": { "code": "attrs", + "spreadType": "normal", "type": "spread", }, }, @@ -11638,6 +11918,7 @@ exports[`Parse JSX > spreadNestedProps 1`] = ` "bindings": { "props.nested": { "code": "props.nested", + "spreadType": "normal", "type": "spread", }, }, @@ -11673,6 +11954,7 @@ exports[`Parse JSX > spreadProps 1`] = ` "bindings": { "props": { "code": "props", + "spreadType": "normal", "type": "spread", }, }, @@ -11745,12 +12027,15 @@ exports[`Parse JSX > svgComponent 1`] = ` "bindings": { "height": { "code": "42", + "type": "single", }, "viewBox": { "code": "'0 0 ' + 42 + ' ' + 42", + "type": "single", }, "width": { "code": "42", + "type": "single", }, }, "children": [ @@ -11851,6 +12136,7 @@ exports[`Parse JSX > svgComponent 1`] = ` "bindings": { "stdDeviation": { "code": "7", + "type": "single", }, }, "children": [], @@ -11951,6 +12237,7 @@ exports[`Parse JSX > typeDependency 1`] = ` "bindings": { "_text": { "code": "props.foo", + "type": "single", }, }, "children": [], @@ -12055,6 +12342,7 @@ exports[`Parse JSX > use-style-and-css 1`] = ` background: 'blue', color: 'white' }", + "type": "single", }, }, "children": [ diff --git a/packages/core/src/__tests__/__snapshots__/parse-svelte.test.ts.snap b/packages/core/src/__tests__/__snapshots__/parse-svelte.test.ts.snap index 78cae92833..6eff8f42e7 100644 --- a/packages/core/src/__tests__/__snapshots__/parse-svelte.test.ts.snap +++ b/packages/core/src/__tests__/__snapshots__/parse-svelte.test.ts.snap @@ -16,12 +16,11 @@ exports[`Parse JSX > basic 1`] = ` "event", ], "code": "state.name = event.target.value", - "type": undefined, + "type": "single", }, "value": { - "arguments": undefined, "code": "state.name", - "type": undefined, + "type": "single", }, }, "children": [], @@ -84,12 +83,14 @@ exports[`Parse JSX > bindGroup 1`] = ` "bindings": { "checked": { "code": "state.tortilla === 'Plain'", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.tortilla = event.target.value", + "type": "single", }, }, "children": [], @@ -106,12 +107,14 @@ exports[`Parse JSX > bindGroup 1`] = ` "bindings": { "checked": { "code": "state.tortilla === 'Whole wheat'", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.tortilla = event.target.value", + "type": "single", }, }, "children": [], @@ -128,12 +131,14 @@ exports[`Parse JSX > bindGroup 1`] = ` "bindings": { "checked": { "code": "state.tortilla === 'Spinach'", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.tortilla = event.target.value", + "type": "single", }, }, "children": [], @@ -168,12 +173,14 @@ exports[`Parse JSX > bindGroup 1`] = ` "bindings": { "checked": { "code": "state.fillings === 'Rice'", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.fillings = event.target.value", + "type": "single", }, }, "children": [], @@ -190,12 +197,14 @@ exports[`Parse JSX > bindGroup 1`] = ` "bindings": { "checked": { "code": "state.fillings === 'Beans'", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.fillings = event.target.value", + "type": "single", }, }, "children": [], @@ -212,12 +221,14 @@ exports[`Parse JSX > bindGroup 1`] = ` "bindings": { "checked": { "code": "state.fillings === 'Cheese'", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.fillings = event.target.value", + "type": "single", }, }, "children": [], @@ -234,12 +245,14 @@ exports[`Parse JSX > bindGroup 1`] = ` "bindings": { "checked": { "code": "state.fillings === 'Guac (extra)'", + "type": "single", }, "onChange": { "arguments": [ "event", ], "code": "state.fillings = event.target.value", + "type": "single", }, }, "children": [], @@ -270,9 +283,8 @@ exports[`Parse JSX > bindGroup 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "_text": { - "arguments": undefined, "code": "state.tortilla", - "type": undefined, + "type": "single", }, }, "children": [], @@ -306,9 +318,8 @@ exports[`Parse JSX > bindGroup 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "_text": { - "arguments": undefined, "code": "state.fillings", - "type": undefined, + "type": "single", }, }, "children": [], @@ -363,9 +374,8 @@ exports[`Parse JSX > bindProperty 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "value": { - "arguments": undefined, "code": "state.value", - "type": undefined, + "type": "single", }, }, "children": [], @@ -404,9 +414,8 @@ exports[`Parse JSX > classDirective 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "class": { - "arguments": undefined, "code": "\`form-input \${props.disabled ? 'disabled' : ''} \${state.focus ? 'focus' : ''}\`", - "type": undefined, + "type": "single", }, }, "children": [], @@ -450,9 +459,8 @@ exports[`Parse JSX > context 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "_text": { - "arguments": undefined, "code": "state.activeTab", - "type": undefined, + "type": "single", }, }, "children": [], @@ -511,9 +519,8 @@ exports[`Parse JSX > each 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "each": { - "arguments": undefined, "code": "state.numbers", - "type": undefined, + "type": "single", }, }, "children": [ @@ -525,9 +532,8 @@ exports[`Parse JSX > each 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "_text": { - "arguments": undefined, "code": "num", - "type": undefined, + "type": "single", }, }, "children": [], @@ -594,7 +600,7 @@ exports[`Parse JSX > eventHandlers 1`] = ` "a", ], "code": "state.log('hi')", - "type": undefined, + "type": "single", }, }, "children": [ @@ -621,7 +627,7 @@ exports[`Parse JSX > eventHandlers 1`] = ` "onClick": { "arguments": undefined, "code": "state.log(event)", - "type": undefined, + "type": "single", }, }, "children": [ @@ -648,7 +654,7 @@ exports[`Parse JSX > eventHandlers 1`] = ` "onClick": { "arguments": undefined, "code": "state.log(event)", - "type": undefined, + "type": "single", }, }, "children": [ @@ -710,9 +716,8 @@ exports[`Parse JSX > html 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "innerHTML": { - "arguments": undefined, "code": "state.html", - "type": undefined, + "type": "single", }, }, "children": [], @@ -751,9 +756,8 @@ exports[`Parse JSX > ifElse 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "when": { - "arguments": undefined, "code": "state.show", - "type": undefined, + "type": "single", }, }, "children": [ @@ -763,7 +767,7 @@ exports[`Parse JSX > ifElse 1`] = ` "onClick": { "arguments": undefined, "code": "state.toggle(event)", - "type": undefined, + "type": "single", }, }, "children": [ @@ -792,7 +796,7 @@ exports[`Parse JSX > ifElse 1`] = ` "onClick": { "arguments": undefined, "code": "state.toggle(event)", - "type": undefined, + "type": "single", }, }, "children": [ @@ -858,9 +862,8 @@ exports[`Parse JSX > imports 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "disabled": { - "arguments": undefined, "code": "state.disabled", - "type": undefined, + "type": "single", }, }, "children": [ @@ -979,9 +982,8 @@ exports[`Parse JSX > reactive 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "value": { - "arguments": undefined, "code": "state.name", - "type": undefined, + "type": "single", }, }, "children": [], @@ -1006,9 +1008,8 @@ exports[`Parse JSX > reactive 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "_text": { - "arguments": undefined, "code": "state.lowercaseName", - "type": undefined, + "type": "single", }, }, "children": [], @@ -1066,12 +1067,11 @@ exports[`Parse JSX > reactiveWithFn 1`] = ` "event", ], "code": "state.a = event.target.value", - "type": undefined, + "type": "single", }, "value": { - "arguments": undefined, "code": "state.a", - "type": undefined, + "type": "single", }, }, "children": [], @@ -1090,12 +1090,11 @@ exports[`Parse JSX > reactiveWithFn 1`] = ` "event", ], "code": "state.b = event.target.value", - "type": undefined, + "type": "single", }, "value": { - "arguments": undefined, "code": "state.b", - "type": undefined, + "type": "single", }, }, "children": [], @@ -1122,9 +1121,8 @@ exports[`Parse JSX > reactiveWithFn 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "_text": { - "arguments": undefined, "code": "state.result", - "type": undefined, + "type": "single", }, }, "children": [], @@ -1337,9 +1335,8 @@ exports[`Parse JSX > textExpressions 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "_text": { - "arguments": undefined, "code": "state.a + state.b", - "type": undefined, + "type": "single", }, }, "children": [], @@ -1374,9 +1371,8 @@ exports[`Parse JSX > textExpressions 1`] = ` "@type": "@builder.io/mitosis/node", "bindings": { "_text": { - "arguments": undefined, "code": "state.a > 2 ? 'hello' : 'bye'", - "type": undefined, + "type": "single", }, }, "children": [], diff --git a/packages/core/src/__tests__/__snapshots__/react.test.ts.snap b/packages/core/src/__tests__/__snapshots__/react.test.ts.snap index 713d4d6367..fccc2b97a1 100644 --- a/packages/core/src/__tests__/__snapshots__/react.test.ts.snap +++ b/packages/core/src/__tests__/__snapshots__/react.test.ts.snap @@ -5984,13 +5984,13 @@ function SmileReviews(props) { {state.showReviewPrompt || \\"asdf\\" ? ( <> - +