@builder.io/react 2.0.4-3 → 2.0.4-6
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/dist/builder-react-lite.cjs.js +1 -1
- package/dist/builder-react-lite.cjs.js.map +1 -1
- package/dist/builder-react-lite.esm.js +1 -1
- package/dist/builder-react-lite.esm.js.map +1 -1
- package/dist/builder-react.browser.js +6 -1
- package/dist/builder-react.browser.js.map +1 -1
- package/dist/builder-react.cjs.js +1 -1
- package/dist/builder-react.cjs.js.map +1 -1
- package/dist/builder-react.es5.js +1 -1
- package/dist/builder-react.es5.js.map +1 -1
- package/dist/builder-react.unpkg.js +6 -1
- package/dist/builder-react.unpkg.js.map +1 -1
- package/dist/lib/package.json +3 -3
- package/dist/lib/rollup.config.js +2 -0
- package/dist/lib/rollup.config.js.map +1 -1
- package/dist/lib/src/blocks/Columns.js +8 -8
- package/dist/lib/src/blocks/Columns.js.map +1 -1
- package/dist/lib/src/blocks/Image.js +12 -12
- package/dist/lib/src/blocks/Image.js.map +1 -1
- package/dist/lib/src/blocks/Mutation.js +6 -6
- package/dist/lib/src/blocks/Mutation.js.map +1 -1
- package/dist/lib/src/blocks/Router.js +9 -9
- package/dist/lib/src/blocks/Router.js.map +1 -1
- package/dist/lib/src/blocks/Section.js +6 -6
- package/dist/lib/src/blocks/Section.js.map +1 -1
- package/dist/lib/src/blocks/Slot.js +5 -5
- package/dist/lib/src/blocks/Slot.js.map +1 -1
- package/dist/lib/src/blocks/Symbol.js +8 -8
- package/dist/lib/src/blocks/Symbol.js.map +1 -1
- package/dist/lib/src/blocks/Text.js +6 -6
- package/dist/lib/src/blocks/Text.js.map +1 -1
- package/dist/lib/src/blocks/Video.js +8 -8
- package/dist/lib/src/blocks/Video.js.map +1 -1
- package/dist/lib/src/blocks/forms/Form.js +10 -10
- package/dist/lib/src/blocks/forms/Form.js.map +1 -1
- package/dist/lib/src/components/builder-block.component.js +15 -15
- package/dist/lib/src/components/builder-block.component.js.map +1 -1
- package/dist/lib/src/components/builder-blocks.component.js +7 -7
- package/dist/lib/src/components/builder-blocks.component.js.map +1 -1
- package/dist/lib/src/components/builder-component.component.js +75 -72
- package/dist/lib/src/components/builder-component.component.js.map +1 -1
- package/dist/lib/src/components/insert-spacer.component.js +7 -7
- package/dist/lib/src/components/insert-spacer.component.js.map +1 -1
- package/dist/lib/src/functions/safe-dynamic-require.js +1 -1
- package/dist/lib/src/functions/safe-dynamic-require.js.map +1 -1
- package/dist/types/src/blocks/Mutation.d.ts +3 -2
- package/dist/types/src/blocks/Slot.d.ts +3 -2
- package/dist/types/src/components/builder-block.component.d.ts +2 -1
- package/dist/types/src/components/builder-blocks.component.d.ts +3 -1
- package/dist/types/src/components/insert-spacer.component.d.ts +3 -1
- package/package.json +3 -3
- package/rollup.config.ts +2 -0
- package/src/blocks/Columns.tsx +1 -1
- package/src/blocks/Image.tsx +1 -1
- package/src/blocks/Mutation.tsx +1 -1
- package/src/blocks/Router.tsx +1 -1
- package/src/blocks/Section.tsx +1 -1
- package/src/blocks/Slot.tsx +1 -1
- package/src/blocks/Symbol.tsx +1 -1
- package/src/blocks/Text.tsx +2 -2
- package/src/blocks/Video.tsx +1 -1
- package/src/blocks/forms/Form.tsx +1 -1
- package/src/components/builder-block.component.tsx +1 -1
- package/src/components/builder-blocks.component.tsx +1 -1
- package/src/components/builder-component.component.tsx +5 -1
- package/src/components/insert-spacer.component.tsx +1 -1
- package/src/functions/safe-dynamic-require.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { Builder, builder, BuilderElement, Component } from '@builder.io/sdk';
|
|
4
|
-
import { ClassNames, jsx } from '@emotion/
|
|
4
|
+
import { ClassNames, jsx } from '@emotion/react';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { Size, sizeNames, sizes } from '../constants/device-sizes.constant';
|
|
7
7
|
import { set } from '../functions/set';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
|
-
import { jsx, css } from '@emotion/
|
|
3
|
+
import { jsx, css, CacheProvider } from '@emotion/react';
|
|
4
|
+
import createCache from '@emotion/cache';
|
|
4
5
|
import { BuilderContent, getContentWithInfo } from './builder-content.component';
|
|
5
6
|
import { BuilderBlocks } from './builder-blocks.component';
|
|
6
7
|
import {
|
|
@@ -100,6 +101,7 @@ const sizeMap = {
|
|
|
100
101
|
|
|
101
102
|
const fetchCache: { [key: string]: any } = {};
|
|
102
103
|
|
|
104
|
+
const cache = createCache({ key: 'builder'});
|
|
103
105
|
export interface BuilderComponentProps {
|
|
104
106
|
/**
|
|
105
107
|
* @package
|
|
@@ -942,6 +944,7 @@ export class BuilderComponent extends React.Component<
|
|
|
942
944
|
key={this.state.key}
|
|
943
945
|
ref={ref => (this.ref = ref)}
|
|
944
946
|
>
|
|
947
|
+
<CacheProvider value={cache}>
|
|
945
948
|
<BuilderMetaContext.Consumer>
|
|
946
949
|
{value => (
|
|
947
950
|
<BuilderMetaContext.Provider
|
|
@@ -1113,6 +1116,7 @@ export class BuilderComponent extends React.Component<
|
|
|
1113
1116
|
</BuilderMetaContext.Provider>
|
|
1114
1117
|
)}
|
|
1115
1118
|
</BuilderMetaContext.Consumer>
|
|
1119
|
+
</CacheProvider>
|
|
1116
1120
|
</WrapComponent>
|
|
1117
1121
|
);
|
|
1118
1122
|
}
|
|
@@ -6,5 +6,5 @@ const noop = () => null;
|
|
|
6
6
|
// Allow us to require things dynamically safe from webpack bundling
|
|
7
7
|
|
|
8
8
|
export let safeDynamicRequire: typeof require;
|
|
9
|
-
if (typeof globalThis.require === 'function') safeDynamicRequire =
|
|
9
|
+
if (typeof globalThis.require === 'function') safeDynamicRequire = eval('require');
|
|
10
10
|
safeDynamicRequire ??= noop as any;
|