@atlaskit/editor-ssr-renderer 1.1.0 → 1.2.0
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 +11 -0
- package/example-helpers/createExample.tsx +21 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-ssr-renderer
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`92ad90cd1d2e8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/92ad90cd1d2e8) -
|
|
8
|
+
[https://hello.jira.atlassian.cloud/browse/EDITOR-3332] - created EditorSSRRenderer component
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 1.1.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
|
|
3
|
+
import { CardClient, SmartCardProvider } from '@atlaskit/link-provider';
|
|
4
|
+
import { getExamplesProviders } from '@af/editor-examples-helpers/utils';
|
|
5
|
+
import { useConfluenceFullPagePreset } from '@af/editor-examples-helpers/example-presets';
|
|
3
6
|
import { IntlProvider } from 'react-intl-next';
|
|
4
7
|
import type { DocNode } from '@atlaskit/adf-schema';
|
|
8
|
+
import { EditorSSRRenderer } from '../src';
|
|
9
|
+
import EditorContentContainer from '@atlaskit/editor-core/editor-styles-container';
|
|
5
10
|
|
|
6
11
|
export function createExample(adf: DocNode) {
|
|
7
12
|
return () => {
|
|
13
|
+
const smartCardClient = useMemo(() => new CardClient('staging'), []);
|
|
14
|
+
const providers = useMemo(() => getExamplesProviders({ sanitizePrivateContent: true }), []);
|
|
15
|
+
|
|
16
|
+
const { preset } = useConfluenceFullPagePreset({
|
|
17
|
+
editorAppearance: 'full-page',
|
|
18
|
+
overridedFullPagePresetProps: {
|
|
19
|
+
providers,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
8
23
|
return (
|
|
9
24
|
<IntlProvider locale={'en'}>
|
|
10
|
-
<
|
|
25
|
+
<EditorContentContainer>
|
|
26
|
+
<SmartCardProvider client={smartCardClient}>
|
|
27
|
+
<EditorSSRRenderer adf={adf} preset={preset} />;
|
|
28
|
+
</SmartCardProvider>
|
|
29
|
+
</EditorContentContainer>
|
|
11
30
|
</IntlProvider>
|
|
12
31
|
);
|
|
13
32
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-ssr-renderer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "SSR Renderer based on Editor",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"atlassian": {
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"atlaskit:src": "src/index.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
+
"@atlaskit/adf-schema": "^51.5.1",
|
|
31
|
+
"@atlaskit/editor-core": "^215.16.0",
|
|
30
32
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
31
|
-
"@babel/runtime": "^7.0.0"
|
|
32
|
-
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@atlaskit/adf-schema": "^51.4.0",
|
|
35
|
-
"@emotion/react": "^11.7.1"
|
|
33
|
+
"@babel/runtime": "^7.0.0",
|
|
34
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
36
35
|
},
|
|
37
36
|
"peerDependencies": {
|
|
37
|
+
"@atlaskit/editor-common": "^110.38.0",
|
|
38
38
|
"react": "^18.2.0"
|
|
39
39
|
}
|
|
40
40
|
}
|