@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.
Files changed (67) hide show
  1. package/dist/builder-react-lite.cjs.js +1 -1
  2. package/dist/builder-react-lite.cjs.js.map +1 -1
  3. package/dist/builder-react-lite.esm.js +1 -1
  4. package/dist/builder-react-lite.esm.js.map +1 -1
  5. package/dist/builder-react.browser.js +6 -1
  6. package/dist/builder-react.browser.js.map +1 -1
  7. package/dist/builder-react.cjs.js +1 -1
  8. package/dist/builder-react.cjs.js.map +1 -1
  9. package/dist/builder-react.es5.js +1 -1
  10. package/dist/builder-react.es5.js.map +1 -1
  11. package/dist/builder-react.unpkg.js +6 -1
  12. package/dist/builder-react.unpkg.js.map +1 -1
  13. package/dist/lib/package.json +3 -3
  14. package/dist/lib/rollup.config.js +2 -0
  15. package/dist/lib/rollup.config.js.map +1 -1
  16. package/dist/lib/src/blocks/Columns.js +8 -8
  17. package/dist/lib/src/blocks/Columns.js.map +1 -1
  18. package/dist/lib/src/blocks/Image.js +12 -12
  19. package/dist/lib/src/blocks/Image.js.map +1 -1
  20. package/dist/lib/src/blocks/Mutation.js +6 -6
  21. package/dist/lib/src/blocks/Mutation.js.map +1 -1
  22. package/dist/lib/src/blocks/Router.js +9 -9
  23. package/dist/lib/src/blocks/Router.js.map +1 -1
  24. package/dist/lib/src/blocks/Section.js +6 -6
  25. package/dist/lib/src/blocks/Section.js.map +1 -1
  26. package/dist/lib/src/blocks/Slot.js +5 -5
  27. package/dist/lib/src/blocks/Slot.js.map +1 -1
  28. package/dist/lib/src/blocks/Symbol.js +8 -8
  29. package/dist/lib/src/blocks/Symbol.js.map +1 -1
  30. package/dist/lib/src/blocks/Text.js +6 -6
  31. package/dist/lib/src/blocks/Text.js.map +1 -1
  32. package/dist/lib/src/blocks/Video.js +8 -8
  33. package/dist/lib/src/blocks/Video.js.map +1 -1
  34. package/dist/lib/src/blocks/forms/Form.js +10 -10
  35. package/dist/lib/src/blocks/forms/Form.js.map +1 -1
  36. package/dist/lib/src/components/builder-block.component.js +15 -15
  37. package/dist/lib/src/components/builder-block.component.js.map +1 -1
  38. package/dist/lib/src/components/builder-blocks.component.js +7 -7
  39. package/dist/lib/src/components/builder-blocks.component.js.map +1 -1
  40. package/dist/lib/src/components/builder-component.component.js +75 -72
  41. package/dist/lib/src/components/builder-component.component.js.map +1 -1
  42. package/dist/lib/src/components/insert-spacer.component.js +7 -7
  43. package/dist/lib/src/components/insert-spacer.component.js.map +1 -1
  44. package/dist/lib/src/functions/safe-dynamic-require.js +1 -1
  45. package/dist/lib/src/functions/safe-dynamic-require.js.map +1 -1
  46. package/dist/types/src/blocks/Mutation.d.ts +3 -2
  47. package/dist/types/src/blocks/Slot.d.ts +3 -2
  48. package/dist/types/src/components/builder-block.component.d.ts +2 -1
  49. package/dist/types/src/components/builder-blocks.component.d.ts +3 -1
  50. package/dist/types/src/components/insert-spacer.component.d.ts +3 -1
  51. package/package.json +3 -3
  52. package/rollup.config.ts +2 -0
  53. package/src/blocks/Columns.tsx +1 -1
  54. package/src/blocks/Image.tsx +1 -1
  55. package/src/blocks/Mutation.tsx +1 -1
  56. package/src/blocks/Router.tsx +1 -1
  57. package/src/blocks/Section.tsx +1 -1
  58. package/src/blocks/Slot.tsx +1 -1
  59. package/src/blocks/Symbol.tsx +1 -1
  60. package/src/blocks/Text.tsx +2 -2
  61. package/src/blocks/Video.tsx +1 -1
  62. package/src/blocks/forms/Form.tsx +1 -1
  63. package/src/components/builder-block.component.tsx +1 -1
  64. package/src/components/builder-blocks.component.tsx +1 -1
  65. package/src/components/builder-component.component.tsx +5 -1
  66. package/src/components/insert-spacer.component.tsx +1 -1
  67. 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/core';
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,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx } from '@emotion/core';
2
+ import { jsx } from '@emotion/react';
3
3
  import React from 'react';
4
4
  import { Builder } from '@builder.io/sdk';
5
5
  import { BuilderBlock } from './builder-block.component';
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import ReactDOM from 'react-dom';
3
- import { jsx, css } from '@emotion/core';
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
  }
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx } from '@emotion/core';
2
+ import { jsx } from '@emotion/react';
3
3
 
4
4
  import React from 'react';
5
5
  import { Builder } from '@builder.io/sdk';
@@ -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 = globalThis.require;
9
+ if (typeof globalThis.require === 'function') safeDynamicRequire = eval('require');
10
10
  safeDynamicRequire ??= noop as any;