@atlaskit/renderer 81.1.1 → 83.0.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/dist/cjs/react/index.js +40 -12
  3. package/dist/cjs/react/marks/code.js +26 -4
  4. package/dist/cjs/react/marks/fragment.js +21 -0
  5. package/dist/cjs/react/marks/index.js +10 -1
  6. package/dist/cjs/react/nodes/codeBlock.js +17 -3
  7. package/dist/cjs/react/nodes/heading-anchor.js +1 -2
  8. package/dist/cjs/react/nodes/heading.js +5 -9
  9. package/dist/cjs/react/nodes/index.js +15 -1
  10. package/dist/cjs/react/nodes/media.js +4 -2
  11. package/dist/cjs/react/nodes/mediaInline.js +104 -0
  12. package/dist/cjs/react/nodes/panel.js +5 -7
  13. package/dist/cjs/react/nodes/text-wrapper.js +5 -6
  14. package/dist/cjs/ui/MediaCard.js +11 -5
  15. package/dist/cjs/ui/Renderer/index.js +4 -4
  16. package/dist/cjs/ui/Renderer/style.js +5 -5
  17. package/dist/cjs/ui/SortingIcon.js +1 -1
  18. package/dist/cjs/ui/annotations/draft/component.js +6 -6
  19. package/dist/cjs/ui/annotations/hooks/use-events.js +3 -1
  20. package/dist/cjs/version.json +1 -1
  21. package/dist/es2019/react/index.js +37 -8
  22. package/dist/es2019/react/marks/code.js +15 -3
  23. package/dist/es2019/react/marks/fragment.js +10 -0
  24. package/dist/es2019/react/marks/index.js +4 -2
  25. package/dist/es2019/react/nodes/codeBlock.js +13 -3
  26. package/dist/es2019/react/nodes/heading-anchor.js +1 -2
  27. package/dist/es2019/react/nodes/heading.js +5 -8
  28. package/dist/es2019/react/nodes/index.js +8 -1
  29. package/dist/es2019/react/nodes/media.js +4 -2
  30. package/dist/es2019/react/nodes/mediaInline.js +53 -0
  31. package/dist/es2019/react/nodes/panel.js +6 -7
  32. package/dist/es2019/react/nodes/text-wrapper.js +7 -6
  33. package/dist/es2019/ui/MediaCard.js +11 -5
  34. package/dist/es2019/ui/Renderer/index.js +4 -4
  35. package/dist/es2019/ui/Renderer/style.js +48 -82
  36. package/dist/es2019/ui/SortingIcon.js +1 -1
  37. package/dist/es2019/ui/annotations/draft/component.js +6 -6
  38. package/dist/es2019/ui/annotations/hooks/use-events.js +3 -1
  39. package/dist/es2019/version.json +1 -1
  40. package/dist/esm/react/index.js +39 -12
  41. package/dist/esm/react/marks/code.js +15 -3
  42. package/dist/esm/react/marks/fragment.js +10 -0
  43. package/dist/esm/react/marks/index.js +4 -2
  44. package/dist/esm/react/nodes/codeBlock.js +13 -3
  45. package/dist/esm/react/nodes/heading-anchor.js +1 -2
  46. package/dist/esm/react/nodes/heading.js +5 -8
  47. package/dist/esm/react/nodes/index.js +14 -1
  48. package/dist/esm/react/nodes/media.js +4 -2
  49. package/dist/esm/react/nodes/mediaInline.js +80 -0
  50. package/dist/esm/react/nodes/panel.js +6 -7
  51. package/dist/esm/react/nodes/text-wrapper.js +7 -6
  52. package/dist/esm/ui/MediaCard.js +11 -5
  53. package/dist/esm/ui/Renderer/index.js +4 -4
  54. package/dist/esm/ui/Renderer/style.js +5 -6
  55. package/dist/esm/ui/SortingIcon.js +1 -1
  56. package/dist/esm/ui/annotations/draft/component.js +6 -6
  57. package/dist/esm/ui/annotations/hooks/use-events.js +3 -1
  58. package/dist/esm/version.json +1 -1
  59. package/dist/types/index.d.ts +1 -0
  60. package/dist/types/react/index.d.ts +1 -0
  61. package/dist/types/react/marks/code.d.ts +15 -1
  62. package/dist/types/react/marks/fragment.d.ts +3 -0
  63. package/dist/types/react/marks/index.d.ts +2 -1
  64. package/dist/types/react/nodes/codeBlock.d.ts +4 -3
  65. package/dist/types/react/nodes/index.d.ts +8 -7
  66. package/dist/types/react/nodes/mediaInline.d.ts +17 -0
  67. package/dist/types/react/nodes/text-wrapper.d.ts +2 -3
  68. package/dist/types/renderer-context.d.ts +3 -1
  69. package/dist/types/types/mediaOptions.d.ts +7 -1
  70. package/dist/types/ui/MediaCard.d.ts +2 -0
  71. package/dist/types/ui/annotations/draft/component.d.ts +1 -1
  72. package/dist/types/ui/renderer-props.d.ts +1 -1
  73. package/package.json +22 -23
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { ProviderFactory } from '@atlaskit/editor-common';
3
+ import { FileIdentifier } from '@atlaskit/media-client';
4
+ import { MediaProvider } from '../../ui/MediaCard';
5
+ export declare type RenderMediaInlineProps = {
6
+ identifier: FileIdentifier;
7
+ mediaProvider?: Promise<MediaProvider>;
8
+ children?: React.ReactNode;
9
+ };
10
+ export declare type MediaInlineProps = {
11
+ id: string;
12
+ collection?: string;
13
+ providers: ProviderFactory;
14
+ };
15
+ export declare const RenderMediaInline: React.FC<RenderMediaInlineProps>;
16
+ declare const MediaInline: React.FC<MediaInlineProps>;
17
+ export default MediaInline;
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  declare type Props = {
3
2
  startPos: number;
4
3
  endPos: number;
5
- text?: string | null;
4
+ children?: string | null;
6
5
  };
7
- declare const TextWrapper: React.MemoExoticComponent<(props: Props) => JSX.Element | null>;
6
+ declare const TextWrapper: (props: Props) => JSX.Element | null;
8
7
  export default TextWrapper;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- export declare type FeatureFlags = {};
2
+ export declare type FeatureFlags = {
3
+ codeBidiWarnings?: boolean;
4
+ };
3
5
  export declare type RendererContextProps = {
4
6
  featureFlags?: FeatureFlags;
5
7
  };
@@ -1,6 +1,12 @@
1
- import { MediaFeatureFlags } from '@atlaskit/media-common';
1
+ import { MediaClientConfig } from '@atlaskit/media-core';
2
+ import { MediaFeatureFlags, SSR } from '@atlaskit/media-common';
3
+ export declare type MediaSSR = {
4
+ mode: SSR;
5
+ config: MediaClientConfig;
6
+ };
2
7
  export interface MediaOptions {
3
8
  allowLinking?: boolean;
4
9
  enableDownloadButton?: boolean;
5
10
  featureFlags?: MediaFeatureFlags;
11
+ ssr?: MediaSSR;
6
12
  }
@@ -9,6 +9,7 @@ import { ImageStatus, ContextIdentifierProvider } from '@atlaskit/editor-common'
9
9
  import { MediaFeatureFlags } from '@atlaskit/media-common';
10
10
  import { RendererAppearance } from './Renderer/types';
11
11
  import { RendererContext } from '../react/types';
12
+ import { MediaSSR } from '../types/mediaOptions';
12
13
  export declare type MediaProvider = {
13
14
  viewMediaClientConfig: MediaClientConfig;
14
15
  };
@@ -38,6 +39,7 @@ export interface MediaCardProps {
38
39
  alt?: string;
39
40
  featureFlags?: MediaFeatureFlags;
40
41
  shouldEnableDownloadButton?: boolean;
42
+ ssr?: MediaSSR;
41
43
  }
42
44
  export interface State {
43
45
  mediaClientConfig?: MediaClientConfig;
@@ -13,7 +13,7 @@ export declare const applyAnnotationOnText: ({ texts, shouldApplyAnnotationAt, d
13
13
  declare type Props = {
14
14
  startPos: number;
15
15
  endPos: number;
16
- text: string;
16
+ children: string;
17
17
  };
18
18
  export declare const TextWithAnnotationDraft: React.FC<Props>;
19
19
  export {};
@@ -38,7 +38,7 @@ export interface RendererProps {
38
38
  innerRef?: React.RefObject<HTMLDivElement>;
39
39
  useSpecBasedValidator?: boolean;
40
40
  allowCopyToClipboard?: boolean;
41
- UNSAFE_allowCustomPanels?: boolean;
41
+ allowCustomPanels?: boolean;
42
42
  analyticsEventSeverityTracking?: {
43
43
  enabled: boolean;
44
44
  severityNormalThreshold: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "81.1.1",
3
+ "version": "83.0.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,23 +24,23 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@atlaskit/adf-schema": "^19.2.0",
28
- "@atlaskit/adf-utils": "^14.3.0",
27
+ "@atlaskit/adf-schema": "^20.0.0",
28
+ "@atlaskit/adf-utils": "^14.4.0",
29
29
  "@atlaskit/analytics-listeners": "^8.0.0",
30
30
  "@atlaskit/analytics-namespaced-context": "^6.3.0",
31
31
  "@atlaskit/analytics-next": "^8.2.0",
32
32
  "@atlaskit/button": "^16.1.0",
33
- "@atlaskit/code": "^14.1.0",
34
- "@atlaskit/editor-common": "^60.1.0",
35
- "@atlaskit/editor-json-transformer": "^8.6.0",
33
+ "@atlaskit/code": "^14.3.0",
34
+ "@atlaskit/editor-common": "^61.0.0",
35
+ "@atlaskit/editor-json-transformer": "^8.7.0",
36
36
  "@atlaskit/editor-shared-styles": "^1.6.0",
37
37
  "@atlaskit/icon": "^21.9.0",
38
- "@atlaskit/media-card": "^71.0.0",
39
- "@atlaskit/media-client": "^14.2.0",
40
- "@atlaskit/media-common": "^2.9.0",
38
+ "@atlaskit/media-card": "^72.1.0",
39
+ "@atlaskit/media-client": "^14.3.0",
40
+ "@atlaskit/media-common": "^2.10.0",
41
41
  "@atlaskit/media-filmstrip": "^42.1.0",
42
42
  "@atlaskit/media-viewer": "^45.8.0",
43
- "@atlaskit/status": "^0.11.0",
43
+ "@atlaskit/status": "^0.12.0",
44
44
  "@atlaskit/task-decision": "^17.2.0",
45
45
  "@atlaskit/theme": "^12.0.0",
46
46
  "@atlaskit/tooltip": "^17.5.0",
@@ -48,17 +48,16 @@
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "lodash": "^4.17.15",
50
50
  "memoize-one": "^6.0.0",
51
- "prosemirror-model": "1.11.0",
52
- "prosemirror-transform": "1.2.8",
51
+ "prosemirror-model": "1.14.3",
52
+ "prosemirror-transform": "1.3.2",
53
53
  "prosemirror-utils": "^1.0.0-0",
54
54
  "react-intl": "^2.6.0",
55
55
  "react-loadable": "^5.1.0",
56
- "url-parse": "^1.4.5",
57
56
  "uuid": "^3.1.0"
58
57
  },
59
58
  "peerDependencies": {
60
59
  "@atlaskit/media-core": "^32.2.0",
61
- "@atlaskit/smart-card": "^16.1.1",
60
+ "@atlaskit/smart-card": "^16.3.0",
62
61
  "react": "^16.8.0",
63
62
  "react-dom": "^16.8.0",
64
63
  "styled-components": "^3.2.6"
@@ -67,22 +66,22 @@
67
66
  "@atlaskit/analytics-gas-types": "^5.0.5",
68
67
  "@atlaskit/avatar": "^20.5.0",
69
68
  "@atlaskit/build-utils": "^2.6.2",
70
- "@atlaskit/css-reset": "^6.1.0",
69
+ "@atlaskit/css-reset": "^6.3.0",
71
70
  "@atlaskit/docs": "*",
72
- "@atlaskit/editor-core": "^150.0.0",
73
- "@atlaskit/editor-test-helpers": "^15.4.0",
74
- "@atlaskit/field-range": "^9.0.0",
71
+ "@atlaskit/editor-core": "^152.0.0",
72
+ "@atlaskit/editor-test-helpers": "^15.6.0",
75
73
  "@atlaskit/logo": "^13.5.0",
76
74
  "@atlaskit/media-core": "^32.2.0",
77
75
  "@atlaskit/media-integration-test-helpers": "^2.5.0",
78
- "@atlaskit/media-test-helpers": "^28.8.0",
76
+ "@atlaskit/media-test-helpers": "^28.9.0",
79
77
  "@atlaskit/mention": "^19.7.0",
80
78
  "@atlaskit/navigation-next": "^9.0.0",
81
- "@atlaskit/profilecard": "^15.0.0",
79
+ "@atlaskit/profilecard": "^15.8.0",
82
80
  "@atlaskit/radio": "^5.3.0",
83
- "@atlaskit/smart-card": "^16.1.0",
84
- "@atlaskit/ssr": "^0.2.0",
85
- "@atlaskit/util-data-test": "^16.0.0",
81
+ "@atlaskit/range": "^5.0.11",
82
+ "@atlaskit/smart-card": "^16.3.0",
83
+ "@atlaskit/ssr": "*",
84
+ "@atlaskit/util-data-test": "^17.0.0",
86
85
  "@atlaskit/visual-regression": "*",
87
86
  "@atlaskit/webdriver-runner": "*",
88
87
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",