@atlaskit/renderer 96.0.1 → 98.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 98.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 97.0.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 96.0.2
16
+
17
+ ### Patch Changes
18
+
19
+ - [`d5ebbd97b8c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d5ebbd97b8c) - ED-15264 add styled-components dependency
20
+
3
21
  ## 96.0.1
4
22
 
5
23
  ### Patch Changes
@@ -9,10 +9,10 @@ Object.defineProperty(exports, "__esModule", {
9
9
  });
10
10
  exports.default = exports.RenderMediaInline = void 0;
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
15
13
 
14
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
+
16
16
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
17
17
 
18
18
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "96.0.1",
3
+ "version": "98.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "96.0.1",
3
+ "version": "98.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -14,6 +13,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
14
13
  var _templateObject;
15
14
 
16
15
  var _excluded = ["children"];
16
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
17
17
 
18
18
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
19
19
 
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  import React, { useEffect, useState } from 'react';
6
6
  import { MediaInlineCard } from '@atlaskit/media-card';
7
7
  import { MediaInlineCardErroredView, MediaInlineCardLoadingView, messages } from '@atlaskit/media-ui';
@@ -1,6 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- import _regeneratorRuntime from "@babel/runtime/regenerator";
4
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
5
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
6
5
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -10,6 +9,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
10
9
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
11
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
12
11
  var _excluded = ["contextIdentifierProvider", "objectAri", "isRenderer"];
12
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
13
13
 
14
14
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
15
15
 
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -12,6 +11,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
12
11
 
13
12
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
14
13
 
14
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
15
+
15
16
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
16
17
 
17
18
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "96.0.1",
3
+ "version": "98.0.0",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "96.0.1",
3
+ "version": "98.0.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,10 +24,10 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@atlaskit/adf-schema": "^23.1.0",
28
- "@atlaskit/adf-utils": "^17.0.0",
29
- "@atlaskit/analytics-listeners": "^8.2.0",
30
- "@atlaskit/analytics-namespaced-context": "^6.4.0",
27
+ "@atlaskit/adf-schema": "^23.2.0",
28
+ "@atlaskit/adf-utils": "^17.1.0",
29
+ "@atlaskit/analytics-listeners": "^8.3.0",
30
+ "@atlaskit/analytics-namespaced-context": "^6.5.0",
31
31
  "@atlaskit/analytics-next": "^8.2.0",
32
32
  "@atlaskit/button": "^16.3.0",
33
33
  "@atlaskit/code": "^14.3.0",
@@ -59,16 +59,17 @@
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@atlaskit/media-core": "^33.0.0",
62
- "@atlaskit/smart-card": "^19.1.12",
62
+ "@atlaskit/smart-card": "^20.0.0",
63
63
  "react": "^16.8.0",
64
- "react-dom": "^16.8.0"
64
+ "react-dom": "^16.8.0",
65
+ "styled-components": "^3.2.6"
65
66
  },
66
67
  "devDependencies": {
67
68
  "@atlaskit/analytics-gas-types": "^5.0.5",
68
69
  "@atlaskit/avatar": "^21.0.0",
69
70
  "@atlaskit/css-reset": "^6.3.0",
70
71
  "@atlaskit/docs": "*",
71
- "@atlaskit/editor-core": "^167.0.0",
72
+ "@atlaskit/editor-core": "^169.0.0",
72
73
  "@atlaskit/editor-test-helpers": "^17.0.0",
73
74
  "@atlaskit/logo": "^13.7.0",
74
75
  "@atlaskit/media-core": "^33.0.0",
@@ -76,10 +77,10 @@
76
77
  "@atlaskit/media-test-helpers": "^30.0.0",
77
78
  "@atlaskit/mention": "^21.0.0",
78
79
  "@atlaskit/navigation-next": "^9.0.0",
79
- "@atlaskit/profilecard": "^16.5.0",
80
+ "@atlaskit/profilecard": "^16.9.0",
80
81
  "@atlaskit/radio": "^5.3.0",
81
82
  "@atlaskit/range": "^6.0.0",
82
- "@atlaskit/smart-card": "^19.1.0",
83
+ "@atlaskit/smart-card": "^20.0.0",
83
84
  "@atlaskit/ssr": "*",
84
85
  "@atlaskit/util-data-test": "^17.3.0",
85
86
  "@atlaskit/visual-regression": "*",
package/report.api.md ADDED
@@ -0,0 +1,225 @@
1
+ ## API Report File for "@atlaskit/renderer"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+ /// <reference types="react" />
7
+
8
+ import type { ADFStage } from '@atlaskit/editor-common/validator';
9
+ import type { AnnotationProviders } from '@atlaskit/editor-common/types';
10
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
11
+ import type { EventHandlers } from '@atlaskit/editor-common/ui';
12
+ import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
13
+ import { Fragment } from 'prosemirror-model';
14
+ import { jsx } from '@emotion/react';
15
+ import { Mark } from 'prosemirror-model';
16
+ import { MediaClientConfig } from '@atlaskit/media-core';
17
+ import { MediaFeatureFlags } from '@atlaskit/media-common';
18
+ import { Node as Node_2 } from 'prosemirror-model';
19
+ import { PropsDifference } from '@atlaskit/editor-common/utils';
20
+ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
21
+ import { Schema } from 'prosemirror-model';
22
+ import { SEVERITY } from '@atlaskit/editor-common/utils';
23
+ import { ShallowPropsDifference } from '@atlaskit/editor-common/utils';
24
+ import { SortOrder } from '@atlaskit/editor-common/types';
25
+ import { SSR } from '@atlaskit/media-common';
26
+ import type { Transformer as Transformer_2 } from '@atlaskit/editor-common/types';
27
+ import { UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
28
+ import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils';
29
+ import type { UnsupportedContentPayload } from '@atlaskit/editor-common/utils';
30
+ import { UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/src/utils/analytics';
31
+
32
+ // @public (undocumented)
33
+ export class ADFEncoder<T> {
34
+ constructor(createTransformerWithSchema: TransformerProvider<T>);
35
+ // (undocumented)
36
+ encode: (value: T) => any;
37
+ }
38
+
39
+ // @public (undocumented)
40
+ export type HeadingAnchorLinksProps = boolean | HeadingAnchorLinksConfig;
41
+
42
+ // @public (undocumented)
43
+ export type MediaSSR = {
44
+ mode: SSR;
45
+ config: MediaClientConfig;
46
+ };
47
+
48
+ // @public (undocumented)
49
+ export const ReactRenderer: (props: RendererProps) => jsx.JSX.Element;
50
+
51
+ // @public (undocumented)
52
+ export class ReactSerializer implements Serializer<JSX.Element> {
53
+ constructor(init: ReactSerializerInit);
54
+ // (undocumented)
55
+ static buildMarkStructure(content: Node_2[]): Mark<any>[];
56
+ // (undocumented)
57
+ static fromSchema(_: unknown, init: ReactSerializerInit): ReactSerializer;
58
+ // (undocumented)
59
+ static getChildNodes(fragment: Fragment): (Node_2 | TextWrapper)[];
60
+ // (undocumented)
61
+ static getMarks(node: Node_2): Mark[];
62
+ // (undocumented)
63
+ serializeFragment(
64
+ fragment: Fragment,
65
+ props?: any,
66
+ target?: any,
67
+ key?: string,
68
+ parentInfo?: ParentInfo,
69
+ ): JSX.Element | null;
70
+ }
71
+
72
+ // @public (undocumented)
73
+ export const renderDocument: <T>(
74
+ doc: any,
75
+ serializer: Serializer<T>,
76
+ schema?: Schema,
77
+ adfStage?: ADFStage,
78
+ useSpecBasedValidator?: boolean,
79
+ rendererId?: string,
80
+ dispatchAnalyticsEvent?: DispatchAnalyticsEvent | undefined,
81
+ unsupportedContentLevelsTracking?:
82
+ | UnsupportedContentLevelsTracking
83
+ | undefined,
84
+ appearance?: RendererAppearance,
85
+ ) => RenderOutput<T | null>;
86
+
87
+ // @public (undocumented)
88
+ export type RendererAppearance =
89
+ | 'comment'
90
+ | 'full-page'
91
+ | 'full-width'
92
+ | 'mobile'
93
+ | undefined;
94
+
95
+ // @public (undocumented)
96
+ export interface RendererContext {
97
+ // (undocumented)
98
+ adDoc?: any;
99
+ // (undocumented)
100
+ containerAri?: string;
101
+ // (undocumented)
102
+ objectAri?: string;
103
+ // (undocumented)
104
+ schema?: Schema;
105
+ }
106
+
107
+ // @public (undocumented)
108
+ export interface RendererProps {
109
+ // (undocumented)
110
+ adfStage?: ADFStage;
111
+ // (undocumented)
112
+ allowAltTextOnImages?: boolean;
113
+ // (undocumented)
114
+ allowAnnotations?: boolean;
115
+ // (undocumented)
116
+ allowColumnSorting?: boolean;
117
+ // (undocumented)
118
+ allowCopyToClipboard?: boolean;
119
+ // (undocumented)
120
+ allowCustomPanels?: boolean;
121
+ // @deprecated (undocumented)
122
+ allowDynamicTextSizing?: boolean;
123
+ // (undocumented)
124
+ allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
125
+ // (undocumented)
126
+ allowPlaceholderText?: boolean;
127
+ // (undocumented)
128
+ allowSelectAllTrap?: boolean;
129
+ // (undocumented)
130
+ allowUgcScrubber?: boolean;
131
+ // (undocumented)
132
+ analyticsEventSeverityTracking?: {
133
+ enabled: boolean;
134
+ severityNormalThreshold: number;
135
+ severityDegradedThreshold: number;
136
+ };
137
+ // (undocumented)
138
+ annotationProvider?: AnnotationProviders | null;
139
+ // (undocumented)
140
+ appearance?: RendererAppearance;
141
+ // (undocumented)
142
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
143
+ // (undocumented)
144
+ dataProviders?: ProviderFactory;
145
+ // (undocumented)
146
+ disableActions?: boolean;
147
+ // (undocumented)
148
+ disableHeadingIDs?: boolean;
149
+ // (undocumented)
150
+ document: any;
151
+ // (undocumented)
152
+ enableSsrInlineScripts?: boolean;
153
+ // (undocumented)
154
+ eventHandlers?: EventHandlers;
155
+ // (undocumented)
156
+ extensionHandlers?: ExtensionHandlers;
157
+ // (undocumented)
158
+ fadeOutHeight?: number;
159
+ featureFlags?:
160
+ | {
161
+ [featureFlag: string]: boolean;
162
+ }
163
+ | Partial<RawObjectFeatureFlags>;
164
+ // (undocumented)
165
+ innerRef?: React.RefObject<HTMLDivElement>;
166
+ // (undocumented)
167
+ maxHeight?: number;
168
+ // (undocumented)
169
+ media?: MediaOptions;
170
+ // (undocumented)
171
+ onComplete?: (stat: RenderOutputStat) => void;
172
+ // (undocumented)
173
+ onError?: (error: any) => void;
174
+ // (undocumented)
175
+ portal?: HTMLElement;
176
+ // (undocumented)
177
+ rendererContext?: RendererContext;
178
+ // (undocumented)
179
+ schema?: Schema;
180
+ // (undocumented)
181
+ shouldOpenMediaViewer?: boolean;
182
+ // (undocumented)
183
+ smartLinks?: SmartLinksOptions;
184
+ // (undocumented)
185
+ stickyHeaders?: StickyHeaderProps;
186
+ // (undocumented)
187
+ truncated?: boolean;
188
+ // (undocumented)
189
+ unsupportedContentLevelsTracking?: UnsupportedContentLevelsTracking;
190
+ // (undocumented)
191
+ useSpecBasedValidator?: boolean;
192
+ }
193
+
194
+ // @public (undocumented)
195
+ export interface RenderOutputStat {
196
+ // (undocumented)
197
+ buildTreeTime?: number;
198
+ // (undocumented)
199
+ sanitizeTime: number;
200
+ // (undocumented)
201
+ serializeTime?: number;
202
+ }
203
+
204
+ // @public (undocumented)
205
+ export interface Serializer<T> {
206
+ // (undocumented)
207
+ serializeFragment(
208
+ fragment: Fragment,
209
+ props?: any,
210
+ target?: any,
211
+ key?: string,
212
+ ): T | null;
213
+ }
214
+
215
+ // @public (undocumented)
216
+ export class TextSerializer implements Serializer<string> {
217
+ constructor(schema: Schema);
218
+ // (undocumented)
219
+ static fromSchema(schema?: Schema): TextSerializer;
220
+ // (undocumented)
221
+ serializeFragment(fragment: Fragment): string;
222
+ }
223
+
224
+ // (No @packageDocumentation comment for this package)
225
+ ```