Skip to content

Commit

Permalink
try removing dependency on builder react sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
teleaziz committed Nov 28, 2023
1 parent 67af5ff commit 8269d25
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 358 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@babel/plugin-syntax-typescript": "^7.20.0",
"@babel/plugin-transform-react-jsx": "^7.13.12",
"@babel/preset-typescript": "^7.13.0",
"@builder.io/react": "^3.1.1",
"@builder.io/sdk": "^2.1.1",
"astring": "^1.8.3",
"csstype": "^3.0.4",
"fp-ts": "^2.11.10",
Expand Down
10 changes: 5 additions & 5 deletions packages/core/src/__tests__/builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { builderContentToMitosisComponent, extractStateHook } from '../parsers/b
import { parseJsx } from '../parsers/jsx';
import { compileAwayBuilderComponents } from '../plugins/compile-away-builder-components';

import { BuilderComponent } from '@builder.io/react';
import { BuilderContent } from '@builder.io/sdk';
import columns from './data/blocks/columns.raw.tsx?raw';
import customCode from './data/blocks/custom-code.raw.tsx?raw';
import embed from './data/blocks/embed.raw.tsx?raw';
Expand Down Expand Up @@ -196,7 +196,7 @@ describe('Builder', () => {
});

test('Regenerate loop with Text node when using CSS', () => {
const builderJson: BuilderComponent = {
const builderJson: BuilderContent = {
data: {
blocks: [
{
Expand All @@ -221,7 +221,7 @@ describe('Builder', () => {
},
],
},
} as BuilderComponent;
} as BuilderContent;
const backToMitosis = builderContentToMitosisComponent(builderJson);
const mitosis = componentToMitosis(mitosisOptions)({
component: backToMitosis,
Expand All @@ -230,7 +230,7 @@ describe('Builder', () => {
});

test('No srcset for SVG', async () => {
const builderJson: BuilderComponent = {
const builderJson: BuilderContent = {
data: {
blocks: [
{
Expand All @@ -245,7 +245,7 @@ describe('Builder', () => {
},
],
},
} as BuilderComponent;
} as BuilderContent;
const component = builderContentToMitosisComponent(builderJson);
const html = await componentToHtml({
plugins: [compileAwayBuilderComponents()],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type Plugin } from '@builder.io/mitosis';
import { Builder, BuilderElement } from '@builder.io/react';
import { Builder, BuilderElement } from '@builder.io/sdk';
import json5 from 'json5';
import { omit, pick, round } from 'lodash';
import traverse, { TraverseContext } from 'traverse';
Expand Down
Loading

0 comments on commit 8269d25

Please sign in to comment.