@atlaskit/editor-synced-block-renderer 5.4.0 → 5.4.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-synced-block-renderer
2
2
 
3
+ ## 5.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 5.4.0
4
10
 
5
11
  ### Minor Changes
@@ -11,11 +11,11 @@ var _SyncedBlockRenderer = require("./ui/SyncedBlockRenderer");
11
11
  var getSyncedBlockRenderer = exports.getSyncedBlockRenderer = function getSyncedBlockRenderer(_ref) {
12
12
  var syncBlockRendererOptions = _ref.syncBlockRendererOptions;
13
13
  return function (_ref2) {
14
- var useFetchSyncBlockData = _ref2.useFetchSyncBlockData,
14
+ var syncBlockFetchResult = _ref2.syncBlockFetchResult,
15
15
  api = _ref2.api;
16
16
  return /*#__PURE__*/_react.default.createElement(_SyncedBlockRenderer.SyncedBlockRenderer, {
17
17
  syncBlockRendererOptions: syncBlockRendererOptions,
18
- useFetchSyncBlockData: useFetchSyncBlockData,
18
+ syncBlockFetchResult: syncBlockFetchResult,
19
19
  api: api
20
20
  });
21
21
  };
@@ -19,15 +19,14 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
19
19
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
20
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21
21
  var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
22
- var useFetchSyncBlockData = _ref.useFetchSyncBlockData,
23
- syncBlockRendererOptions = _ref.syncBlockRendererOptions,
22
+ var syncBlockRendererOptions = _ref.syncBlockRendererOptions,
23
+ syncBlockFetchResult = _ref.syncBlockFetchResult,
24
24
  api = _ref.api;
25
- var _useFetchSyncBlockDat = useFetchSyncBlockData(),
26
- syncBlockInstance = _useFetchSyncBlockDat.syncBlockInstance,
27
- providerFactory = _useFetchSyncBlockDat.providerFactory,
28
- isLoading = _useFetchSyncBlockDat.isLoading,
29
- reloadData = _useFetchSyncBlockDat.reloadData,
30
- ssrProviders = _useFetchSyncBlockDat.ssrProviders;
25
+ var isLoading = syncBlockFetchResult.isLoading,
26
+ providerFactory = syncBlockFetchResult.providerFactory,
27
+ reloadData = syncBlockFetchResult.reloadData,
28
+ ssrProviders = syncBlockFetchResult.ssrProviders,
29
+ syncBlockInstance = syncBlockFetchResult.syncBlockInstance;
31
30
  var rendererOptions = (0, _react.useMemo)(function () {
32
31
  var _syncBlockRendererOpt, _ssrProviders$media;
33
32
  if (!(0, _coreUtils.isSSR)() || syncBlockRendererOptions !== null && syncBlockRendererOptions !== void 0 && (_syncBlockRendererOpt = syncBlockRendererOptions.media) !== null && _syncBlockRendererOpt !== void 0 && _syncBlockRendererOpt.ssr ||
@@ -4,12 +4,12 @@ import { SyncedBlockRenderer } from './ui/SyncedBlockRenderer';
4
4
  export const getSyncedBlockRenderer = ({
5
5
  syncBlockRendererOptions
6
6
  }) => ({
7
- useFetchSyncBlockData,
7
+ syncBlockFetchResult,
8
8
  api
9
9
  }) => {
10
10
  return /*#__PURE__*/React.createElement(SyncedBlockRenderer, {
11
11
  syncBlockRendererOptions: syncBlockRendererOptions,
12
- useFetchSyncBlockData: useFetchSyncBlockData,
12
+ syncBlockFetchResult: syncBlockFetchResult,
13
13
  api: api
14
14
  });
15
15
  };
@@ -7,17 +7,17 @@ import { AKRendererWrapper } from './AKRendererWrapper';
7
7
  import { SyncedBlockErrorComponent } from './SyncedBlockErrorComponent';
8
8
  import { SyncedBlockLoadingState } from './SyncedBlockLoadingState';
9
9
  const SyncedBlockRendererComponent = ({
10
- useFetchSyncBlockData,
11
10
  syncBlockRendererOptions,
11
+ syncBlockFetchResult,
12
12
  api
13
13
  }) => {
14
14
  const {
15
- syncBlockInstance,
16
- providerFactory,
17
15
  isLoading,
16
+ providerFactory,
18
17
  reloadData,
19
- ssrProviders
20
- } = useFetchSyncBlockData();
18
+ ssrProviders,
19
+ syncBlockInstance
20
+ } = syncBlockFetchResult;
21
21
  const rendererOptions = useMemo(() => {
22
22
  var _syncBlockRendererOpt, _ssrProviders$media;
23
23
  if (!isSSR() || syncBlockRendererOptions !== null && syncBlockRendererOptions !== void 0 && (_syncBlockRendererOpt = syncBlockRendererOptions.media) !== null && _syncBlockRendererOpt !== void 0 && _syncBlockRendererOpt.ssr ||
@@ -4,11 +4,11 @@ import { SyncedBlockRenderer } from './ui/SyncedBlockRenderer';
4
4
  export var getSyncedBlockRenderer = function getSyncedBlockRenderer(_ref) {
5
5
  var syncBlockRendererOptions = _ref.syncBlockRendererOptions;
6
6
  return function (_ref2) {
7
- var useFetchSyncBlockData = _ref2.useFetchSyncBlockData,
7
+ var syncBlockFetchResult = _ref2.syncBlockFetchResult,
8
8
  api = _ref2.api;
9
9
  return /*#__PURE__*/React.createElement(SyncedBlockRenderer, {
10
10
  syncBlockRendererOptions: syncBlockRendererOptions,
11
- useFetchSyncBlockData: useFetchSyncBlockData,
11
+ syncBlockFetchResult: syncBlockFetchResult,
12
12
  api: api
13
13
  });
14
14
  };
@@ -10,15 +10,14 @@ import { AKRendererWrapper } from './AKRendererWrapper';
10
10
  import { SyncedBlockErrorComponent } from './SyncedBlockErrorComponent';
11
11
  import { SyncedBlockLoadingState } from './SyncedBlockLoadingState';
12
12
  var SyncedBlockRendererComponent = function SyncedBlockRendererComponent(_ref) {
13
- var useFetchSyncBlockData = _ref.useFetchSyncBlockData,
14
- syncBlockRendererOptions = _ref.syncBlockRendererOptions,
13
+ var syncBlockRendererOptions = _ref.syncBlockRendererOptions,
14
+ syncBlockFetchResult = _ref.syncBlockFetchResult,
15
15
  api = _ref.api;
16
- var _useFetchSyncBlockDat = useFetchSyncBlockData(),
17
- syncBlockInstance = _useFetchSyncBlockDat.syncBlockInstance,
18
- providerFactory = _useFetchSyncBlockDat.providerFactory,
19
- isLoading = _useFetchSyncBlockDat.isLoading,
20
- reloadData = _useFetchSyncBlockDat.reloadData,
21
- ssrProviders = _useFetchSyncBlockDat.ssrProviders;
16
+ var isLoading = syncBlockFetchResult.isLoading,
17
+ providerFactory = syncBlockFetchResult.providerFactory,
18
+ reloadData = syncBlockFetchResult.reloadData,
19
+ ssrProviders = syncBlockFetchResult.ssrProviders,
20
+ syncBlockInstance = syncBlockFetchResult.syncBlockInstance;
22
21
  var rendererOptions = useMemo(function () {
23
22
  var _syncBlockRendererOpt, _ssrProviders$media;
24
23
  if (!isSSR() || syncBlockRendererOptions !== null && syncBlockRendererOptions !== void 0 && (_syncBlockRendererOpt = syncBlockRendererOptions.media) !== null && _syncBlockRendererOpt !== void 0 && _syncBlockRendererOpt.ssr ||
@@ -4,5 +4,5 @@ import type { SyncedBlockRendererOptions } from './types';
4
4
  type GetSyncedBlockRendererProps = {
5
5
  syncBlockRendererOptions: SyncedBlockRendererOptions | undefined;
6
6
  };
7
- export declare const getSyncedBlockRenderer: ({ syncBlockRendererOptions }: GetSyncedBlockRendererProps) => ({ useFetchSyncBlockData, api }: SyncedBlockRendererProps) => React.JSX.Element;
7
+ export declare const getSyncedBlockRenderer: ({ syncBlockRendererOptions }: GetSyncedBlockRendererProps) => ({ syncBlockFetchResult, api }: SyncedBlockRendererProps) => React.JSX.Element;
8
8
  export {};
@@ -5,7 +5,7 @@ import { type UseFetchSyncBlockDataResult } from '@atlaskit/editor-synced-block-
5
5
  import type { SyncedBlockRendererOptions } from '../types';
6
6
  export type SyncedBlockRendererProps = {
7
7
  api?: ExtractInjectionAPI<SyncedBlockPlugin>;
8
- syncBlockRendererOptions: SyncedBlockRendererOptions | undefined;
9
- useFetchSyncBlockData: () => UseFetchSyncBlockDataResult;
8
+ syncBlockFetchResult: UseFetchSyncBlockDataResult;
9
+ syncBlockRendererOptions?: SyncedBlockRendererOptions;
10
10
  };
11
- export declare const SyncedBlockRenderer: React.MemoExoticComponent<({ useFetchSyncBlockData, syncBlockRendererOptions, api, }: SyncedBlockRendererProps) => React.JSX.Element>;
11
+ export declare const SyncedBlockRenderer: React.MemoExoticComponent<({ syncBlockRendererOptions, syncBlockFetchResult, api, }: SyncedBlockRendererProps) => React.JSX.Element>;
@@ -4,5 +4,5 @@ import type { SyncedBlockRendererOptions } from './types';
4
4
  type GetSyncedBlockRendererProps = {
5
5
  syncBlockRendererOptions: SyncedBlockRendererOptions | undefined;
6
6
  };
7
- export declare const getSyncedBlockRenderer: ({ syncBlockRendererOptions }: GetSyncedBlockRendererProps) => ({ useFetchSyncBlockData, api }: SyncedBlockRendererProps) => React.JSX.Element;
7
+ export declare const getSyncedBlockRenderer: ({ syncBlockRendererOptions }: GetSyncedBlockRendererProps) => ({ syncBlockFetchResult, api }: SyncedBlockRendererProps) => React.JSX.Element;
8
8
  export {};
@@ -5,7 +5,7 @@ import { type UseFetchSyncBlockDataResult } from '@atlaskit/editor-synced-block-
5
5
  import type { SyncedBlockRendererOptions } from '../types';
6
6
  export type SyncedBlockRendererProps = {
7
7
  api?: ExtractInjectionAPI<SyncedBlockPlugin>;
8
- syncBlockRendererOptions: SyncedBlockRendererOptions | undefined;
9
- useFetchSyncBlockData: () => UseFetchSyncBlockDataResult;
8
+ syncBlockFetchResult: UseFetchSyncBlockDataResult;
9
+ syncBlockRendererOptions?: SyncedBlockRendererOptions;
10
10
  };
11
- export declare const SyncedBlockRenderer: React.MemoExoticComponent<({ useFetchSyncBlockData, syncBlockRendererOptions, api, }: SyncedBlockRendererProps) => React.JSX.Element>;
11
+ export declare const SyncedBlockRenderer: React.MemoExoticComponent<({ syncBlockRendererOptions, syncBlockFetchResult, api, }: SyncedBlockRendererProps) => React.JSX.Element>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-synced-block-renderer",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "description": "SyncedBlockRenderer for @atlaskit/editor-plugin-synced-block",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "@atlaskit/editor-plugin-synced-block": "^5.3.0",
34
34
  "@atlaskit/editor-synced-block-provider": "^3.13.0",
35
35
  "@atlaskit/heading": "^5.2.0",
36
- "@atlaskit/icon": "^29.4.0",
36
+ "@atlaskit/icon": "^30.0.0",
37
37
  "@atlaskit/icon-lab": "^5.14.0",
38
38
  "@atlaskit/image": "^3.0.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",