Skip to content

Commit

Permalink
moar
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkoreye committed Jan 16, 2025
1 parent 73ca2ec commit 628d529
Showing 1 changed file with 0 additions and 363 deletions.
363 changes: 0 additions & 363 deletions packages/core/src/__tests__/__snapshots__/builder.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4338,369 +4338,6 @@ exports[`Builder > localization 3`] = `
}
`;
exports[`Builder > localization preserve text blocks 1`] = `
{
"@type": "@builder.io/mitosis/component",
"children": [
{
"@type": "@builder.io/mitosis/node",
"bindings": {},
"children": [
{
"@type": "@builder.io/mitosis/node",
"bindings": {},
"children": [],
"meta": {},
"name": "div",
"properties": {
"class": "builder-text",
"innerHTML": "<p>Time left: {state.timeLeft} seconds</p>",
},
"scope": {},
},
],
"meta": {},
"name": "div",
"properties": {},
"scope": {},
},
{
"@type": "@builder.io/mitosis/node",
"bindings": {},
"children": [
{
"@type": "@builder.io/mitosis/node",
"bindings": {},
"children": [],
"localizedValues": {
"component.options.text": {
"@type": "@builder.io/core:LocalizedValue",
"Default": "<p>hello default</p>",
"es-AR": "<p>hello argentina</p>",
"fr-CA": "<p>hello france</p><p><br></p>",
},
},
"meta": {},
"name": "div",
"properties": {
"class": "builder-text",
"innerHTML": "<p>hello default</p>",
},
"scope": {},
},
],
"localizedValues": {
"component.options.text": {
"@type": "@builder.io/core:LocalizedValue",
"Default": "<p>hello default</p>",
"es-AR": "<p>hello argentina</p>",
"fr-CA": "<p>hello france</p><p><br></p>",
},
},
"meta": {},
"name": "div",
"properties": {},
"scope": {},
},
{
"@type": "@builder.io/mitosis/node",
"bindings": {},
"children": [],
"localizedValues": {
"component.options.image": {
"@type": "@builder.io/core:LocalizedValue",
"Default": "https://cdn.builder.io/api/v1/image/placeholder?default",
"es-AR": "https://cdn.builder.io/api/v1/image/placeholder?es-ar",
"fr-CA": "https://cdn.builder.io/api/v1/image/placeholder?fr-ca",
},
},
"meta": {},
"name": "Image",
"properties": {
"$tagName": undefined,
"image": "https://cdn.builder.io/api/v1/image/placeholder?default",
},
"scope": {},
"slots": {},
},
{
"@type": "@builder.io/mitosis/node",
"bindings": {},
"children": [],
"localizedValues": {
"component.options.title": {
"@type": "@builder.io/core:LocalizedValue",
"Default": "<p>hello default</p>",
"es-AR": "<p>hello argentina</p>",
"fr-CA": "<p>hello france</p><p><br></p>",
},
},
"meta": {},
"name": "CustomComponent",
"properties": {
"$tagName": undefined,
"title": "<p>hello default</p>",
},
"scope": {},
"slots": {},
},
{
"@type": "@builder.io/mitosis/node",
"bindings": {
"css": {
"bindingType": "expression",
"code": "{\\"display\\":\\"flex\\",\\"flexDirection\\":\\"column\\",\\"position\\":\\"relative\\",\\"flexShrink\\":\\"0\\",\\"boxSizing\\":\\"border-box\\",\\"marginTop\\":\\"20px\\",\\"cursor\\":\\"pointer\\",\\"pointerEvents\\":\\"auto\\"}",
"type": "single",
},
"scriptsClientOnly": {
"bindingType": "expression",
"code": "false",
"type": "single",
},
},
"children": [],
"localizedValues": {
"linkUrl": {
"@type": "@builder.io/core:LocalizedValue",
"Default": "http://builder.io",
},
"properties.href": {
"@type": "@builder.io/core:LocalizedValue",
"Default": "http://builder.io",
},
},
"meta": {},
"name": "CustomCode",
"properties": {
"$tagName": "a",
"builderTag": "a",
"code": "<a>Link</a>
",
"href": "http://builder.io",
},
"scope": {},
"slots": {},
},
],
"context": {
"get": {},
"set": {},
},
"exports": {},
"hooks": {
"onEvent": [],
"onMount": [],
},
"imports": [],
"inputs": undefined,
"meta": {
"useMetadata": {
"httpRequests": undefined,
},
},
"name": "MyComponent",
"refs": {},
"state": {},
"subComponents": [],
}
`;
exports[`Builder > localization preserve text blocks 2`] = `
"import { Image, CustomComponent, CustomCode } from \\"@components\\";
export default function MyComponent(props) {
return (
<>
<div>
<div
innerHTML=\\"<p>Time left: {state.timeLeft} seconds</p>\\"
class=\\"builder-text\\"
/>
</div>
<div>
<div innerHTML=\\"<p>hello default</p>\\" class=\\"builder-text\\" />
</div>
<Image image=\\"https://cdn.builder.io/api/v1/image/placeholder?default\\" />
<CustomComponent title=\\"<p>hello default</p>\\" />
<CustomCode
$tagName=\\"a\\"
href=\\"http://builder.io\\"
code=\\"<a>Link</a>
\\"
builderTag=\\"a\\"
scriptsClientOnly={false}
css={{
display: \\"flex\\",
flexDirection: \\"column\\",
position: \\"relative\\",
flexShrink: \\"0\\",
boxSizing: \\"border-box\\",
marginTop: \\"20px\\",
cursor: \\"pointer\\",
pointerEvents: \\"auto\\",
}}
/>
</>
);
}
"
`;
exports[`Builder > localization preserve text blocks 3`] = `
{
"data": {
"blocks": [
{
"@type": "@builder.io/sdk:Element",
"actions": {},
"bindings": {},
"children": [
{
"@type": "@builder.io/sdk:Element",
"actions": {},
"bindings": {},
"children": [],
"code": {
"actions": {},
"bindings": {},
},
"properties": {
"class": "builder-text",
"innerHTML": "<p>Time left: {state.timeLeft} seconds</p>",
},
"tagName": "div",
},
],
"code": {
"actions": {},
"bindings": {},
},
"properties": {},
"tagName": "div",
},
{
"@type": "@builder.io/sdk:Element",
"actions": {},
"bindings": {},
"children": [
{
"@type": "@builder.io/sdk:Element",
"actions": {},
"bindings": {},
"children": [],
"code": {
"actions": {},
"bindings": {},
},
"properties": {
"class": "builder-text",
"innerHTML": "<p>hello default</p>",
},
"tagName": "div",
},
],
"code": {
"actions": {},
"bindings": {},
},
"properties": {},
"tagName": "div",
},
{
"@type": "@builder.io/sdk:Element",
"actions": {},
"bindings": {},
"children": [],
"code": {
"actions": {},
"bindings": {},
},
"component": {
"name": "Image",
"options": {
"image": {
"@type": "@builder.io/core:LocalizedValue",
"Default": "https://cdn.builder.io/api/v1/image/placeholder?default",
"es-AR": "https://cdn.builder.io/api/v1/image/placeholder?es-ar",
"fr-CA": "https://cdn.builder.io/api/v1/image/placeholder?fr-ca",
},
},
},
},
{
"@type": "@builder.io/sdk:Element",
"actions": {},
"bindings": {},
"children": [],
"code": {
"actions": {},
"bindings": {},
},
"component": {
"name": "CustomComponent",
"options": {
"title": {
"@type": "@builder.io/core:LocalizedValue",
"Default": "<p>hello default</p>",
"es-AR": "<p>hello argentina</p>",
"fr-CA": "<p>hello france</p><p><br></p>",
},
},
},
},
{
"@type": "@builder.io/sdk:Element",
"actions": {},
"bindings": {
"component.options.scriptsClientOnly": "false",
},
"children": [],
"code": {
"actions": {},
"bindings": {
"component.options.scriptsClientOnly": "false",
},
},
"component": {
"name": "Custom Code",
"options": {
"builderTag": "a",
"code": "<a>Link</a>
",
"href": "http://builder.io",
"scriptsClientOnly": false,
},
},
"linkUrl": {
"@type": "@builder.io/core:LocalizedValue",
"Default": "http://builder.io",
},
"properties": {
"href": {
"@type": "@builder.io/core:LocalizedValue",
"Default": "http://builder.io",
},
},
"responsiveStyles": {
"large": {
"boxSizing": "border-box",
"cursor": "pointer",
"display": "flex",
"flexDirection": "column",
"flexShrink": "0",
"marginTop": "20px",
"pointerEvents": "auto",
"position": "relative",
},
},
},
],
"jsCode": "",
"tsCode": "",
},
}
`;
exports[`Builder > nodes as props 1`] = `
{
"@type": "@builder.io/mitosis/component",
Expand Down

0 comments on commit 628d529

Please sign in to comment.