@atlaskit/renderer 108.13.1 → 108.14.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,11 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 108.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`fd3a855ab5a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd3a855ab5a) - [ED-19844] Add trailing telepointer logic to renderer behind feature flag
8
+
3
9
  ## 108.13.1
4
10
 
5
11
  ### Patch Changes
@@ -55,7 +55,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
55
55
  var DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "108.13.1";
58
+ var packageVersion = "108.14.0";
59
59
  var Renderer = /*#__PURE__*/function (_PureComponent) {
60
60
  (0, _inherits2.default)(Renderer, _PureComponent);
61
61
  var _super = _createSuper(Renderer);
@@ -379,6 +379,7 @@ var Renderer = /*#__PURE__*/function (_PureComponent) {
379
379
  allowCustomPanels: allowCustomPanels,
380
380
  allowPlaceholderText: allowPlaceholderText,
381
381
  useBlockRenderForCodeBlock: (_featureFlags$feature = featureFlags.featureFlags.useBlockRenderForCodeBlock) !== null && _featureFlags$feature !== void 0 ? _featureFlags$feature : true,
382
+ addTelepointer: this.props.addTelepointer,
382
383
  innerRef: this.editorRef,
383
384
  onClick: handleWrapperOnClick,
384
385
  onMouseDown: this.onMouseDownEditView
@@ -413,6 +414,7 @@ var Renderer = /*#__PURE__*/function (_PureComponent) {
413
414
  allowColumnSorting: allowColumnSorting,
414
415
  allowNestedHeaderLinks: allowNestedHeaderLinks,
415
416
  useBlockRenderForCodeBlock: (_featureFlags$feature2 = featureFlags.featureFlags.useBlockRenderForCodeBlock) !== null && _featureFlags$feature2 !== void 0 ? _featureFlags$feature2 : true,
417
+ addTelepointer: this.props.addTelepointer,
416
418
  onClick: handleWrapperOnClick
417
419
  }, (0, _react2.jsx)(_ui.UnsupportedBlock, null));
418
420
  }
@@ -466,7 +468,60 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
466
468
  children = props.children,
467
469
  onClick = props.onClick,
468
470
  onMouseDown = props.onMouseDown,
469
- useBlockRenderForCodeBlock = props.useBlockRenderForCodeBlock;
471
+ useBlockRenderForCodeBlock = props.useBlockRenderForCodeBlock,
472
+ addTelepointer = props.addTelepointer;
473
+ var createTelepointer = function createTelepointer() {
474
+ var telepointer = document.createElement('span');
475
+ telepointer.textContent = "\u200B";
476
+ telepointer.id = _style.TELEPOINTER_ID;
477
+ return telepointer;
478
+ };
479
+ var initialUpdate = _react.default.useRef(true);
480
+ _react.default.useEffect(function () {
481
+ if (!addTelepointer || !(innerRef !== null && innerRef !== void 0 && innerRef.current)) {
482
+ return;
483
+ }
484
+ var renderer = innerRef.current.querySelector('.ak-renderer-document');
485
+ if (initialUpdate.current) {
486
+ var lastChild = renderer.lastChild;
487
+ lastChild && lastChild.appendChild(createTelepointer());
488
+ }
489
+ var mutateTelepointer = function mutateTelepointer(mutations) {
490
+ mutations.forEach(function (mutation) {
491
+ if (initialUpdate.current) {
492
+ var oldTelepointer = renderer.querySelector("#".concat(_style.TELEPOINTER_ID));
493
+ if (oldTelepointer) {
494
+ oldTelepointer.remove();
495
+ }
496
+ var _lastChild = renderer.lastChild;
497
+ _lastChild && _lastChild.appendChild(createTelepointer());
498
+ initialUpdate.current = false;
499
+ }
500
+ if (mutation.type === 'characterData') {
501
+ var parentNode = mutation.target.parentElement;
502
+ if (parentNode) {
503
+ var _oldTelepointer = renderer.querySelector("#".concat(_style.TELEPOINTER_ID));
504
+ if (_oldTelepointer) {
505
+ _oldTelepointer.remove();
506
+ }
507
+ // initialUpdate.current = true;
508
+ // Add a new telepointer
509
+ parentNode.appendChild(createTelepointer());
510
+ }
511
+ }
512
+ });
513
+ };
514
+ var observer = new MutationObserver(mutateTelepointer);
515
+ observer.observe(innerRef.current, {
516
+ characterData: true,
517
+ attributes: false,
518
+ childList: true,
519
+ subtree: true
520
+ });
521
+ return function () {
522
+ return observer.disconnect();
523
+ };
524
+ }, [innerRef, children, addTelepointer]);
470
525
  return (0, _react2.jsx)(_ui.WidthProvider, {
471
526
  className: "ak-renderer-wrapper is-".concat(appearance),
472
527
  "data-appearance": appearance
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.rendererStyles = exports.headingSizes = exports.FullPagePadding = void 0;
8
+ exports.rendererStyles = exports.headingSizes = exports.TELEPOINTER_ID = exports.FullPagePadding = void 0;
9
9
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
10
  var _react = require("@emotion/react");
11
11
  var _components = require("@atlaskit/theme/components");
@@ -20,11 +20,31 @@ var _consts = require("../../consts");
20
20
  var _headingAnchor = require("../../react/nodes/heading-anchor");
21
21
  var _lightWeightCodeBlock = require("../../react/nodes/codeBlock/components/lightWeightCodeBlock");
22
22
  var _table = require("../../react/nodes/table");
23
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
23
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
24
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
25
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
26
26
  var FullPagePadding = 32;
27
27
  exports.FullPagePadding = FullPagePadding;
28
+ var TELEPOINTER_ID = 'ai-streaming-telepointer';
29
+ exports.TELEPOINTER_ID = TELEPOINTER_ID;
30
+ var telepointerStyles = function telepointerStyles(themeProps) {
31
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n #", " {\n display: inline-block;\n position: relative;\n width: 1.5px;\n height: 25px;\n background: linear-gradient(\n 45deg,\n ", " -12.02%,\n ", "\n 19.18%,\n ", "\n 71.87%\n );\n margin-left: ", ";\n\n &::after {\n content: 'AI';\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n font-size: 10px;\n font-weight: 700;\n width: 12.5px;\n height: 13px;\n padding-top: 1px;\n padding-left: 1.5px;\n line-height: initial;\n border-radius: 0px 2px 2px 0px;\n color: ", ";\n background: linear-gradient(\n 45deg,\n ", " -57%,\n ", "\n 71.87%\n );\n }\n }\n "])), TELEPOINTER_ID, (0, _components.themed)({
32
+ light: '#F8E6A0',
33
+ dark: '#F5CD47'
34
+ })(themeProps), (0, _components.themed)({
35
+ light: '#8BDBE5',
36
+ dark: '#60C6D2'
37
+ })(themeProps), (0, _components.themed)({
38
+ light: '#0C66E4',
39
+ dark: '#388BFF'
40
+ })(themeProps), "var(--ds-space-025, 2px)", "var(--ds-text-inverse, white)", (0, _components.themed)({
41
+ light: '#8BDBE5',
42
+ dark: '#60C6D2'
43
+ })(themeProps), (0, _components.themed)({
44
+ light: '#0C66E4',
45
+ dark: '#388BFF'
46
+ })(themeProps));
47
+ };
28
48
  var getLineHeight = function getLineHeight(fontCode) {
29
49
  return _typography.headingSizes[fontCode].lineHeight / _typography.headingSizes[fontCode].size;
30
50
  };
@@ -51,7 +71,7 @@ var headingSizes = {
51
71
  exports.headingSizes = headingSizes;
52
72
  var headingAnchorStyle = function headingAnchorStyle(headingTag) {
53
73
  return (// TODO Delete this comment after verifying space token -> previous value `margin-left: 6px`
54
- (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /**\n * The copy link button doesn't reserve space in the DOM so that\n * the text alignment isn't impacted by the button/icon's space.\n */\n .", " {\n position: absolute;\n height: ", "em;\n\n margin-left: ", ";\n\n button {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n /**\n * Applies hover effects to the heading anchor link button\n * to fade in when the user rolls over the heading.\n *\n * The link is persistent on mobile, so we use feature detection\n * to enable hover effects for systems that support it (desktop).\n *\n * @see https://caniuse.com/mdn-css_at-rules_media_hover\n */\n @media (hover: hover) and (pointer: fine) {\n .", " {\n > button {\n opacity: 0;\n transform: translate(-8px, 0px);\n transition: opacity 0.2s ease 0s, transform 0.2s ease 0s;\n }\n }\n\n &:hover {\n .", " > button {\n opacity: 1;\n transform: none !important;\n }\n }\n }\n "])), _headingAnchor.HeadingAnchorWrapperClassName, headingSizes[headingTag].lineHeight, "var(--ds-space-075, 6px)", _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName)
74
+ (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n /**\n * The copy link button doesn't reserve space in the DOM so that\n * the text alignment isn't impacted by the button/icon's space.\n */\n .", " {\n position: absolute;\n height: ", "em;\n\n margin-left: ", ";\n\n button {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n /**\n * Applies hover effects to the heading anchor link button\n * to fade in when the user rolls over the heading.\n *\n * The link is persistent on mobile, so we use feature detection\n * to enable hover effects for systems that support it (desktop).\n *\n * @see https://caniuse.com/mdn-css_at-rules_media_hover\n */\n @media (hover: hover) and (pointer: fine) {\n .", " {\n > button {\n opacity: 0;\n transform: translate(-8px, 0px);\n transition: opacity 0.2s ease 0s, transform 0.2s ease 0s;\n }\n }\n\n &:hover {\n .", " > button {\n opacity: 1;\n transform: none !important;\n }\n }\n }\n "])), _headingAnchor.HeadingAnchorWrapperClassName, headingSizes[headingTag].lineHeight, "var(--ds-space-075, 6px)", _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName)
55
75
  );
56
76
  };
57
77
  var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
@@ -60,7 +80,7 @@ var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
60
80
  return '';
61
81
  }
62
82
  // TODO Delete this comment after verifying space token -> previous value `margin: 6px`
63
- return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 ", " 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "], ["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 ", " 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "])), _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName, "var(--ds-space-075, 6px)", _headingAnchor.HeadingAnchorWrapperClassName);
83
+ return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 ", " 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "], ["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 ", " 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "])), _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName, "var(--ds-space-075, 6px)", _headingAnchor.HeadingAnchorWrapperClassName);
64
84
  };
65
85
  var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
66
86
  var allowColumnSorting = _ref2.allowColumnSorting,
@@ -72,7 +92,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
72
92
  if (allowNestedHeaderLinks) {
73
93
  headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(_headingAnchor.HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
74
94
  }
75
- return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n .", " {\n margin: 0;\n .", " {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n }\n\n .", " {\n .", " {\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n }\n }\n\n &:hover {\n .", " {\n .", " {\n opacity: 1;\n }\n }\n }\n }\n "])), _consts.RendererCssClassName.SORTABLE_COLUMN_WRAPPER, _consts.RendererCssClassName.SORTABLE_COLUMN, _styles.tableCellPadding, "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON);
95
+ return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n .", " {\n margin: 0;\n .", " {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n }\n\n .", " {\n .", " {\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n }\n }\n\n &:hover {\n .", " {\n .", " {\n opacity: 1;\n }\n }\n }\n }\n "])), _consts.RendererCssClassName.SORTABLE_COLUMN_WRAPPER, _consts.RendererCssClassName.SORTABLE_COLUMN, _styles.tableCellPadding, "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON);
76
96
  };
77
97
  var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
78
98
  var appearance = _ref3.appearance;
@@ -80,17 +100,17 @@ var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
80
100
  if (appearance !== 'full-page' && appearance !== 'mobile') {
81
101
  return '';
82
102
  }
83
- return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n max-width: ", ";\n margin: 0 auto;\n padding: 0 ", "px;\n "])), theme && theme.layoutMaxWidth ? "".concat(theme.layoutMaxWidth, "px") : 'none', appearance === 'full-page' ? FullPagePadding : 0);
103
+ return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-width: ", ";\n margin: 0 auto;\n padding: 0 ", "px;\n "])), theme && theme.layoutMaxWidth ? "".concat(theme.layoutMaxWidth, "px") : 'none', appearance === 'full-page' ? FullPagePadding : 0);
84
104
  };
85
105
  var fullWidthStyles = function fullWidthStyles(_ref5) {
86
106
  var appearance = _ref5.appearance;
87
107
  if (appearance !== 'full-width') {
88
108
  return '';
89
109
  }
90
- return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-width: ", "px;\n margin: 0 auto;\n\n .fabric-editor-breakout-mark,\n .ak-renderer-extension {\n width: 100% !important;\n }\n\n ", "\n "])), _editorSharedStyles.akEditorFullWidthLayoutWidth, (0, _table.isTableResizingEnabled)(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
110
+ return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n max-width: ", "px;\n margin: 0 auto;\n\n .fabric-editor-breakout-mark,\n .ak-renderer-extension {\n width: 100% !important;\n }\n\n ", "\n "])), _editorSharedStyles.akEditorFullWidthLayoutWidth, (0, _table.isTableResizingEnabled)(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
91
111
  };
92
112
  var breakoutWidthStyle = function breakoutWidthStyle() {
93
- return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n *:not([data-mark-type='fragment'])\n .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n [data-mark-type='fragment'] * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n "])), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
113
+ return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n *:not([data-mark-type='fragment'])\n .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n [data-mark-type='fragment'] * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n "])), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
94
114
  };
95
115
  var rendererStyles = function rendererStyles(wrapperProps) {
96
116
  return function (theme) {
@@ -99,19 +119,19 @@ var rendererStyles = function rendererStyles(wrapperProps) {
99
119
  theme: theme
100
120
  };
101
121
  var useBlockRenderForCodeBlock = wrapperProps.useBlockRenderForCodeBlock;
102
- return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", ";\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", " 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n ", "\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: block;\n /* stylelint-enable */\n\n position: relative;\n border-radius: ", ";\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n\n ", "\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", ";\n & > div + div {\n margin-left: ", ";\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n "])), (0, _editorSharedStyles.editorFontSize)(themeProps), (0, _components.themed)({
122
+ return (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", "\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", ";\n color: ", ";\n padding: ", " ", ";\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", " 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: ", ";\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n ", "\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: block;\n /* stylelint-enable */\n\n position: relative;\n border-radius: ", ";\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n\n ", "\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", ";\n & > div + div {\n margin-left: ", ";\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n "])), (0, _editorSharedStyles.editorFontSize)(themeProps), (0, _components.themed)({
103
123
  light: "var(--ds-text, ".concat(colors.N800, ")"),
104
124
  dark: "var(--ds-text, #B8C7E0)"
105
125
  })(themeProps), _consts.RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), (0, _components.themed)({
106
126
  light: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
107
127
  dark: "var(--ds-text-subtlest, ".concat(colors.DN200, ")")
108
- })(themeProps), _styles.whitespaceSharedStyles, _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(themeProps), (0, _styles.ruleSharedStyles)(themeProps), _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.blockMarksSharedStyles, (0, _styles.codeMarkSharedStyles)(themeProps), _styles.shadowSharedStyle, _styles.dateSharedStyle, _styles.textColorStyles, _styles.tasksAndDecisionsStyles, _styles.smartCardSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
128
+ })(themeProps), telepointerStyles(themeProps), _styles.whitespaceSharedStyles, _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(themeProps), (0, _styles.ruleSharedStyles)(themeProps), _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.blockMarksSharedStyles, (0, _styles.codeMarkSharedStyles)(themeProps), _styles.shadowSharedStyle, _styles.dateSharedStyle, _styles.textColorStyles, _styles.tasksAndDecisionsStyles, _styles.smartCardSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
109
129
  light: "var(--ds-background-neutral, ".concat(colors.N30A, ")"),
110
130
  dark: "var(--ds-background-neutral, ".concat(colors.DN70, ")")
111
131
  })(themeProps), "var(--ds-border-radius-100, 3px)", (0, _components.themed)({
112
132
  light: "var(--ds-text, ".concat(colors.N800, ")"),
113
133
  dark: "var(--ds-text, ".concat(colors.DN600, ")")
114
- })(themeProps), "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), "var(--ds-space-300, 24px)", _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, alignedHeadingAnchorStyle(wrapperProps), _styles.mediaSingleSharedStyle, _consts.RendererCssClassName.DOCUMENT, breakoutWidthStyle(), _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, _consts.RendererCssClassName.EXTENSION, _consts.RendererCssClassName.DOCUMENT, _consts.RendererCssClassName.EXTENSION, _editorSharedStyles.blockNodesVerticalMargin, _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, _ui.shadowObserverClassNames.SHADOW_CONTAINER, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, (0, _styles.tableSharedStyle)(themeProps), _consts.RendererCssClassName.DOCUMENT, _styles.TableSharedCssClassName.TABLE_CONTAINER, _ui.shadowClassNames.RIGHT_SHADOW, _ui.shadowClassNames.LEFT_SHADOW, _styles.tableMarginTop - 1, _styles.tableMarginTop, _editorSharedStyles.akEditorStickyHeaderZIndex, _ui.shadowObserverClassNames.SENTINEL_LEFT, _ui.shadowObserverClassNames.SENTINEL_RIGHT, _styles.tableMarginTop, tableSortableColumnStyle(wrapperProps), _consts.RendererCssClassName.NUMBER_COLUMN, (0, _components.themed)({
134
+ })(themeProps), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), "var(--ds-space-300, 24px)", _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-space-100, 8px)", alignedHeadingAnchorStyle(wrapperProps), _styles.mediaSingleSharedStyle, _consts.RendererCssClassName.DOCUMENT, breakoutWidthStyle(), _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, _consts.RendererCssClassName.EXTENSION, _consts.RendererCssClassName.DOCUMENT, _consts.RendererCssClassName.EXTENSION, _editorSharedStyles.blockNodesVerticalMargin, _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, _ui.shadowObserverClassNames.SHADOW_CONTAINER, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, (0, _styles.tableSharedStyle)(themeProps), _consts.RendererCssClassName.DOCUMENT, _styles.TableSharedCssClassName.TABLE_CONTAINER, _ui.shadowClassNames.RIGHT_SHADOW, _ui.shadowClassNames.LEFT_SHADOW, _styles.tableMarginTop - 1, _styles.tableMarginTop, _editorSharedStyles.akEditorStickyHeaderZIndex, _ui.shadowObserverClassNames.SENTINEL_LEFT, _ui.shadowObserverClassNames.SENTINEL_RIGHT, _styles.tableMarginTop, tableSortableColumnStyle(wrapperProps), _consts.RendererCssClassName.NUMBER_COLUMN, (0, _components.themed)({
115
135
  light: "var(--ds-background-neutral, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"),
116
136
  dark: "var(--ds-background-neutral, ".concat(_editorSharedStyles.akEditorTableToolbarDark, ")")
117
137
  })(themeProps), (0, _components.themed)({
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _analytics = require("@atlaskit/editor-common/analytics");
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -15,7 +15,7 @@ import { FabricChannel } from '@atlaskit/analytics-listeners';
15
15
  import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
16
16
  import uuid from 'uuid/v4';
17
17
  import { ReactSerializer, renderDocument } from '../../';
18
- import { rendererStyles } from './style';
18
+ import { TELEPOINTER_ID, rendererStyles } from './style';
19
19
  import { TruncatedWrapper } from './truncated-wrapper';
20
20
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
21
21
  import { PLATFORM, MODE } from '../../analytics/events';
@@ -35,7 +35,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
35
35
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
36
36
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
37
37
  const packageName = "@atlaskit/renderer";
38
- const packageVersion = "108.13.1";
38
+ const packageVersion = "108.14.0";
39
39
  export class Renderer extends PureComponent {
40
40
  constructor(props) {
41
41
  super(props);
@@ -354,6 +354,7 @@ export class Renderer extends PureComponent {
354
354
  allowCustomPanels: allowCustomPanels,
355
355
  allowPlaceholderText: allowPlaceholderText,
356
356
  useBlockRenderForCodeBlock: (_featureFlags$feature = featureFlags.featureFlags.useBlockRenderForCodeBlock) !== null && _featureFlags$feature !== void 0 ? _featureFlags$feature : true,
357
+ addTelepointer: this.props.addTelepointer,
357
358
  innerRef: this.editorRef,
358
359
  onClick: handleWrapperOnClick,
359
360
  onMouseDown: this.onMouseDownEditView
@@ -388,6 +389,7 @@ export class Renderer extends PureComponent {
388
389
  allowColumnSorting: allowColumnSorting,
389
390
  allowNestedHeaderLinks: allowNestedHeaderLinks,
390
391
  useBlockRenderForCodeBlock: (_featureFlags$feature2 = featureFlags.featureFlags.useBlockRenderForCodeBlock) !== null && _featureFlags$feature2 !== void 0 ? _featureFlags$feature2 : true,
392
+ addTelepointer: this.props.addTelepointer,
391
393
  onClick: handleWrapperOnClick
392
394
  }, jsx(UnsupportedBlock, null));
393
395
  }
@@ -437,8 +439,59 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
437
439
  children,
438
440
  onClick,
439
441
  onMouseDown,
440
- useBlockRenderForCodeBlock
442
+ useBlockRenderForCodeBlock,
443
+ addTelepointer
441
444
  } = props;
445
+ const createTelepointer = () => {
446
+ const telepointer = document.createElement('span');
447
+ telepointer.textContent = '\u200b';
448
+ telepointer.id = TELEPOINTER_ID;
449
+ return telepointer;
450
+ };
451
+ const initialUpdate = React.useRef(true);
452
+ React.useEffect(() => {
453
+ if (!addTelepointer || !(innerRef !== null && innerRef !== void 0 && innerRef.current)) {
454
+ return;
455
+ }
456
+ const renderer = innerRef.current.querySelector('.ak-renderer-document');
457
+ if (initialUpdate.current) {
458
+ const lastChild = renderer.lastChild;
459
+ lastChild && lastChild.appendChild(createTelepointer());
460
+ }
461
+ const mutateTelepointer = mutations => {
462
+ mutations.forEach(mutation => {
463
+ if (initialUpdate.current) {
464
+ const oldTelepointer = renderer.querySelector(`#${TELEPOINTER_ID}`);
465
+ if (oldTelepointer) {
466
+ oldTelepointer.remove();
467
+ }
468
+ const lastChild = renderer.lastChild;
469
+ lastChild && lastChild.appendChild(createTelepointer());
470
+ initialUpdate.current = false;
471
+ }
472
+ if (mutation.type === 'characterData') {
473
+ const parentNode = mutation.target.parentElement;
474
+ if (parentNode) {
475
+ const oldTelepointer = renderer.querySelector(`#${TELEPOINTER_ID}`);
476
+ if (oldTelepointer) {
477
+ oldTelepointer.remove();
478
+ }
479
+ // initialUpdate.current = true;
480
+ // Add a new telepointer
481
+ parentNode.appendChild(createTelepointer());
482
+ }
483
+ }
484
+ });
485
+ };
486
+ const observer = new MutationObserver(mutateTelepointer);
487
+ observer.observe(innerRef.current, {
488
+ characterData: true,
489
+ attributes: false,
490
+ childList: true,
491
+ subtree: true
492
+ });
493
+ return () => observer.disconnect();
494
+ }, [innerRef, children, addTelepointer]);
442
495
  return jsx(WidthProvider, {
443
496
  className: `ak-renderer-wrapper is-${appearance}`,
444
497
  "data-appearance": appearance
@@ -13,6 +13,64 @@ import { shadowObserverClassNames } from '@atlaskit/editor-common/ui';
13
13
  import { getLightWeightCodeBlockStylesForRootRendererStyleSheet } from '../../react/nodes/codeBlock/components/lightWeightCodeBlock';
14
14
  import { isTableResizingEnabled } from '../../react/nodes/table';
15
15
  export const FullPagePadding = 32;
16
+ export const TELEPOINTER_ID = 'ai-streaming-telepointer';
17
+ const telepointerStyles = themeProps => {
18
+ return css`
19
+ #${TELEPOINTER_ID} {
20
+ display: inline-block;
21
+ position: relative;
22
+ width: 1.5px;
23
+ height: 25px;
24
+ background: linear-gradient(
25
+ 45deg,
26
+ ${themed({
27
+ light: '#F8E6A0',
28
+ dark: '#F5CD47'
29
+ })(themeProps)} -12.02%,
30
+ ${themed({
31
+ light: '#8BDBE5',
32
+ dark: '#60C6D2'
33
+ })(themeProps)}
34
+ 19.18%,
35
+ ${themed({
36
+ light: '#0C66E4',
37
+ dark: '#388BFF'
38
+ })(themeProps)}
39
+ 71.87%
40
+ );
41
+ margin-left: ${"var(--ds-space-025, 2px)"};
42
+
43
+ &::after {
44
+ content: 'AI';
45
+ position: absolute;
46
+ display: block;
47
+ top: 0;
48
+ left: 0;
49
+ font-size: 10px;
50
+ font-weight: 700;
51
+ width: 12.5px;
52
+ height: 13px;
53
+ padding-top: 1px;
54
+ padding-left: 1.5px;
55
+ line-height: initial;
56
+ border-radius: 0px 2px 2px 0px;
57
+ color: ${"var(--ds-text-inverse, white)"};
58
+ background: linear-gradient(
59
+ 45deg,
60
+ ${themed({
61
+ light: '#8BDBE5',
62
+ dark: '#60C6D2'
63
+ })(themeProps)} -57%,
64
+ ${themed({
65
+ light: '#0C66E4',
66
+ dark: '#388BFF'
67
+ })(themeProps)}
68
+ 71.87%
69
+ );
70
+ }
71
+ }
72
+ `;
73
+ };
16
74
  const getLineHeight = fontCode => headingSizesImport[fontCode].lineHeight / headingSizesImport[fontCode].size;
17
75
  export const headingSizes = {
18
76
  h1: {
@@ -375,6 +433,7 @@ export const rendererStyles = wrapperProps => theme => {
375
433
  })(themeProps)};
376
434
  }
377
435
 
436
+ ${telepointerStyles(themeProps)}
378
437
  ${whitespaceSharedStyles};
379
438
  ${blockquoteSharedStyles};
380
439
  ${headingsSharedStyles(themeProps)};
@@ -408,7 +467,7 @@ export const rendererStyles = wrapperProps => theme => {
408
467
  light: `var(--ds-text, ${colors.N800})`,
409
468
  dark: `var(--ds-text, ${colors.DN600})`
410
469
  })(themeProps)};
411
- padding: 2px 4px;
470
+ padding: ${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"};
412
471
  margin: 0 1px;
413
472
  transition: background 0.3s;
414
473
  }
@@ -450,7 +509,7 @@ export const rendererStyles = wrapperProps => theme => {
450
509
  & + h4,
451
510
  & + h5,
452
511
  & + h6 {
453
- margin-top: 8px;
512
+ margin-top: ${"var(--ds-space-100, 8px)"};
454
513
  }
455
514
  }
456
515
 
@@ -1 +1 @@
1
- import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
1
+ export {};
@@ -25,7 +25,7 @@ import { FabricChannel } from '@atlaskit/analytics-listeners';
25
25
  import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
26
26
  import uuid from 'uuid/v4';
27
27
  import { ReactSerializer, renderDocument } from '../../';
28
- import { rendererStyles } from './style';
28
+ import { TELEPOINTER_ID, rendererStyles } from './style';
29
29
  import { TruncatedWrapper } from './truncated-wrapper';
30
30
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
31
31
  import { PLATFORM, MODE } from '../../analytics/events';
@@ -45,7 +45,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
45
45
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
46
46
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
47
47
  var packageName = "@atlaskit/renderer";
48
- var packageVersion = "108.13.1";
48
+ var packageVersion = "108.14.0";
49
49
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
50
50
  _inherits(Renderer, _PureComponent);
51
51
  var _super = _createSuper(Renderer);
@@ -369,6 +369,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
369
369
  allowCustomPanels: allowCustomPanels,
370
370
  allowPlaceholderText: allowPlaceholderText,
371
371
  useBlockRenderForCodeBlock: (_featureFlags$feature = featureFlags.featureFlags.useBlockRenderForCodeBlock) !== null && _featureFlags$feature !== void 0 ? _featureFlags$feature : true,
372
+ addTelepointer: this.props.addTelepointer,
372
373
  innerRef: this.editorRef,
373
374
  onClick: handleWrapperOnClick,
374
375
  onMouseDown: this.onMouseDownEditView
@@ -403,6 +404,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
403
404
  allowColumnSorting: allowColumnSorting,
404
405
  allowNestedHeaderLinks: allowNestedHeaderLinks,
405
406
  useBlockRenderForCodeBlock: (_featureFlags$feature2 = featureFlags.featureFlags.useBlockRenderForCodeBlock) !== null && _featureFlags$feature2 !== void 0 ? _featureFlags$feature2 : true,
407
+ addTelepointer: this.props.addTelepointer,
406
408
  onClick: handleWrapperOnClick
407
409
  }, jsx(UnsupportedBlock, null));
408
410
  }
@@ -455,7 +457,60 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
455
457
  children = props.children,
456
458
  onClick = props.onClick,
457
459
  onMouseDown = props.onMouseDown,
458
- useBlockRenderForCodeBlock = props.useBlockRenderForCodeBlock;
460
+ useBlockRenderForCodeBlock = props.useBlockRenderForCodeBlock,
461
+ addTelepointer = props.addTelepointer;
462
+ var createTelepointer = function createTelepointer() {
463
+ var telepointer = document.createElement('span');
464
+ telepointer.textContent = "\u200B";
465
+ telepointer.id = TELEPOINTER_ID;
466
+ return telepointer;
467
+ };
468
+ var initialUpdate = React.useRef(true);
469
+ React.useEffect(function () {
470
+ if (!addTelepointer || !(innerRef !== null && innerRef !== void 0 && innerRef.current)) {
471
+ return;
472
+ }
473
+ var renderer = innerRef.current.querySelector('.ak-renderer-document');
474
+ if (initialUpdate.current) {
475
+ var lastChild = renderer.lastChild;
476
+ lastChild && lastChild.appendChild(createTelepointer());
477
+ }
478
+ var mutateTelepointer = function mutateTelepointer(mutations) {
479
+ mutations.forEach(function (mutation) {
480
+ if (initialUpdate.current) {
481
+ var oldTelepointer = renderer.querySelector("#".concat(TELEPOINTER_ID));
482
+ if (oldTelepointer) {
483
+ oldTelepointer.remove();
484
+ }
485
+ var _lastChild = renderer.lastChild;
486
+ _lastChild && _lastChild.appendChild(createTelepointer());
487
+ initialUpdate.current = false;
488
+ }
489
+ if (mutation.type === 'characterData') {
490
+ var parentNode = mutation.target.parentElement;
491
+ if (parentNode) {
492
+ var _oldTelepointer = renderer.querySelector("#".concat(TELEPOINTER_ID));
493
+ if (_oldTelepointer) {
494
+ _oldTelepointer.remove();
495
+ }
496
+ // initialUpdate.current = true;
497
+ // Add a new telepointer
498
+ parentNode.appendChild(createTelepointer());
499
+ }
500
+ }
501
+ });
502
+ };
503
+ var observer = new MutationObserver(mutateTelepointer);
504
+ observer.observe(innerRef.current, {
505
+ characterData: true,
506
+ attributes: false,
507
+ childList: true,
508
+ subtree: true
509
+ });
510
+ return function () {
511
+ return observer.disconnect();
512
+ };
513
+ }, [innerRef, children, addTelepointer]);
459
514
  return jsx(WidthProvider, {
460
515
  className: "ak-renderer-wrapper is-".concat(appearance),
461
516
  "data-appearance": appearance
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
3
3
  import { css } from '@emotion/react';
4
4
  import { themed } from '@atlaskit/theme/components';
5
5
  import { fontFamily, fontSize } from '@atlaskit/theme/constants';
@@ -15,6 +15,25 @@ import { shadowObserverClassNames } from '@atlaskit/editor-common/ui';
15
15
  import { getLightWeightCodeBlockStylesForRootRendererStyleSheet } from '../../react/nodes/codeBlock/components/lightWeightCodeBlock';
16
16
  import { isTableResizingEnabled } from '../../react/nodes/table';
17
17
  export var FullPagePadding = 32;
18
+ export var TELEPOINTER_ID = 'ai-streaming-telepointer';
19
+ var telepointerStyles = function telepointerStyles(themeProps) {
20
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n #", " {\n display: inline-block;\n position: relative;\n width: 1.5px;\n height: 25px;\n background: linear-gradient(\n 45deg,\n ", " -12.02%,\n ", "\n 19.18%,\n ", "\n 71.87%\n );\n margin-left: ", ";\n\n &::after {\n content: 'AI';\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n font-size: 10px;\n font-weight: 700;\n width: 12.5px;\n height: 13px;\n padding-top: 1px;\n padding-left: 1.5px;\n line-height: initial;\n border-radius: 0px 2px 2px 0px;\n color: ", ";\n background: linear-gradient(\n 45deg,\n ", " -57%,\n ", "\n 71.87%\n );\n }\n }\n "])), TELEPOINTER_ID, themed({
21
+ light: '#F8E6A0',
22
+ dark: '#F5CD47'
23
+ })(themeProps), themed({
24
+ light: '#8BDBE5',
25
+ dark: '#60C6D2'
26
+ })(themeProps), themed({
27
+ light: '#0C66E4',
28
+ dark: '#388BFF'
29
+ })(themeProps), "var(--ds-space-025, 2px)", "var(--ds-text-inverse, white)", themed({
30
+ light: '#8BDBE5',
31
+ dark: '#60C6D2'
32
+ })(themeProps), themed({
33
+ light: '#0C66E4',
34
+ dark: '#388BFF'
35
+ })(themeProps));
36
+ };
18
37
  var getLineHeight = function getLineHeight(fontCode) {
19
38
  return headingSizesImport[fontCode].lineHeight / headingSizesImport[fontCode].size;
20
39
  };
@@ -40,7 +59,7 @@ export var headingSizes = {
40
59
  };
41
60
  var headingAnchorStyle = function headingAnchorStyle(headingTag) {
42
61
  return (// TODO Delete this comment after verifying space token -> previous value `margin-left: 6px`
43
- css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /**\n * The copy link button doesn't reserve space in the DOM so that\n * the text alignment isn't impacted by the button/icon's space.\n */\n .", " {\n position: absolute;\n height: ", "em;\n\n margin-left: ", ";\n\n button {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n /**\n * Applies hover effects to the heading anchor link button\n * to fade in when the user rolls over the heading.\n *\n * The link is persistent on mobile, so we use feature detection\n * to enable hover effects for systems that support it (desktop).\n *\n * @see https://caniuse.com/mdn-css_at-rules_media_hover\n */\n @media (hover: hover) and (pointer: fine) {\n .", " {\n > button {\n opacity: 0;\n transform: translate(-8px, 0px);\n transition: opacity 0.2s ease 0s, transform 0.2s ease 0s;\n }\n }\n\n &:hover {\n .", " > button {\n opacity: 1;\n transform: none !important;\n }\n }\n }\n "])), HeadingAnchorWrapperClassName, headingSizes[headingTag].lineHeight, "var(--ds-space-075, 6px)", HeadingAnchorWrapperClassName, HeadingAnchorWrapperClassName)
62
+ css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /**\n * The copy link button doesn't reserve space in the DOM so that\n * the text alignment isn't impacted by the button/icon's space.\n */\n .", " {\n position: absolute;\n height: ", "em;\n\n margin-left: ", ";\n\n button {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n /**\n * Applies hover effects to the heading anchor link button\n * to fade in when the user rolls over the heading.\n *\n * The link is persistent on mobile, so we use feature detection\n * to enable hover effects for systems that support it (desktop).\n *\n * @see https://caniuse.com/mdn-css_at-rules_media_hover\n */\n @media (hover: hover) and (pointer: fine) {\n .", " {\n > button {\n opacity: 0;\n transform: translate(-8px, 0px);\n transition: opacity 0.2s ease 0s, transform 0.2s ease 0s;\n }\n }\n\n &:hover {\n .", " > button {\n opacity: 1;\n transform: none !important;\n }\n }\n }\n "])), HeadingAnchorWrapperClassName, headingSizes[headingTag].lineHeight, "var(--ds-space-075, 6px)", HeadingAnchorWrapperClassName, HeadingAnchorWrapperClassName)
44
63
  );
45
64
  };
46
65
  var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
@@ -49,7 +68,7 @@ var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
49
68
  return '';
50
69
  }
51
70
  // TODO Delete this comment after verifying space token -> previous value `margin: 6px`
52
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 ", " 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "], ["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 ", " 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "])), HeadingAnchorWrapperClassName, HeadingAnchorWrapperClassName, "var(--ds-space-075, 6px)", HeadingAnchorWrapperClassName);
71
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 ", " 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "], ["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.", "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\\u202C';\n }\n }\n }\n }\n .", " {\n margin: 0 ", " 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "])), HeadingAnchorWrapperClassName, HeadingAnchorWrapperClassName, "var(--ds-space-075, 6px)", HeadingAnchorWrapperClassName);
53
72
  };
54
73
  var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
55
74
  var allowColumnSorting = _ref2.allowColumnSorting,
@@ -61,7 +80,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
61
80
  if (allowNestedHeaderLinks) {
62
81
  headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
63
82
  }
64
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n .", " {\n margin: 0;\n .", " {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n }\n\n .", " {\n .", " {\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n }\n }\n\n &:hover {\n .", " {\n .", " {\n opacity: 1;\n }\n }\n }\n }\n "])), RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN, tableCellPadding, "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_ICON);
83
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n .", " {\n margin: 0;\n .", " {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n }\n\n .", " {\n .", " {\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n }\n }\n\n &:hover {\n .", " {\n .", " {\n opacity: 1;\n }\n }\n }\n }\n "])), RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN, tableCellPadding, "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_ICON);
65
84
  };
66
85
  var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
67
86
  var appearance = _ref3.appearance;
@@ -69,17 +88,17 @@ var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
69
88
  if (appearance !== 'full-page' && appearance !== 'mobile') {
70
89
  return '';
71
90
  }
72
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n max-width: ", ";\n margin: 0 auto;\n padding: 0 ", "px;\n "])), theme && theme.layoutMaxWidth ? "".concat(theme.layoutMaxWidth, "px") : 'none', appearance === 'full-page' ? FullPagePadding : 0);
91
+ return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-width: ", ";\n margin: 0 auto;\n padding: 0 ", "px;\n "])), theme && theme.layoutMaxWidth ? "".concat(theme.layoutMaxWidth, "px") : 'none', appearance === 'full-page' ? FullPagePadding : 0);
73
92
  };
74
93
  var fullWidthStyles = function fullWidthStyles(_ref5) {
75
94
  var appearance = _ref5.appearance;
76
95
  if (appearance !== 'full-width') {
77
96
  return '';
78
97
  }
79
- return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-width: ", "px;\n margin: 0 auto;\n\n .fabric-editor-breakout-mark,\n .ak-renderer-extension {\n width: 100% !important;\n }\n\n ", "\n "])), akEditorFullWidthLayoutWidth, isTableResizingEnabled(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
98
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n max-width: ", "px;\n margin: 0 auto;\n\n .fabric-editor-breakout-mark,\n .ak-renderer-extension {\n width: 100% !important;\n }\n\n ", "\n "])), akEditorFullWidthLayoutWidth, isTableResizingEnabled(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
80
99
  };
81
100
  var breakoutWidthStyle = function breakoutWidthStyle() {
82
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n *:not([data-mark-type='fragment'])\n .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n [data-mark-type='fragment'] * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n "])), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
101
+ return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n *:not([data-mark-type='fragment'])\n .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n [data-mark-type='fragment'] * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n "])), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
83
102
  };
84
103
  export var rendererStyles = function rendererStyles(wrapperProps) {
85
104
  return function (theme) {
@@ -88,19 +107,19 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
88
107
  theme: theme
89
108
  };
90
109
  var useBlockRenderForCodeBlock = wrapperProps.useBlockRenderForCodeBlock;
91
- return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", ";\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", " 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n ", "\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: block;\n /* stylelint-enable */\n\n position: relative;\n border-radius: ", ";\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n\n ", "\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", ";\n & > div + div {\n margin-left: ", ";\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n "])), editorFontSize(themeProps), themed({
110
+ return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", "\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", ";\n color: ", ";\n padding: ", " ", ";\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", " 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: ", ";\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n ", "\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: block;\n /* stylelint-enable */\n\n position: relative;\n border-radius: ", ";\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n\n ", "\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", ";\n & > div + div {\n margin-left: ", ";\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n & :not([data-node-type='decisionList']) > li {\n ", "\n }\n "])), editorFontSize(themeProps), themed({
92
111
  light: "var(--ds-text, ".concat(colors.N800, ")"),
93
112
  dark: "var(--ds-text, #B8C7E0)"
94
113
  })(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), themed({
95
114
  light: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
96
115
  dark: "var(--ds-text-subtlest, ".concat(colors.DN200, ")")
97
- })(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(themeProps), ruleSharedStyles(themeProps), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(themeProps), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
116
+ })(themeProps), telepointerStyles(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(themeProps), ruleSharedStyles(themeProps), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(themeProps), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
98
117
  light: "var(--ds-background-neutral, ".concat(colors.N30A, ")"),
99
118
  dark: "var(--ds-background-neutral, ".concat(colors.DN70, ")")
100
119
  })(themeProps), "var(--ds-border-radius-100, 3px)", themed({
101
120
  light: "var(--ds-text, ".concat(colors.N800, ")"),
102
121
  dark: "var(--ds-text, ".concat(colors.DN600, ")")
103
- })(themeProps), "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), "var(--ds-space-300, 24px)", richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, breakoutWidthStyle(), RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, shadowObserverClassNames.SHADOW_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(themeProps), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT, tableMarginTop, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, themed({
122
+ })(themeProps), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), "var(--ds-space-300, 24px)", richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-space-100, 8px)", alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, breakoutWidthStyle(), RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, shadowObserverClassNames.SHADOW_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(themeProps), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT, tableMarginTop, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, themed({
104
123
  light: "var(--ds-background-neutral, ".concat(akEditorTableToolbar, ")"),
105
124
  dark: "var(--ds-background-neutral, ".concat(akEditorTableToolbarDark, ")")
106
125
  })(themeProps), themed({
@@ -1 +1 @@
1
- import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
1
+ export {};
@@ -12,8 +12,8 @@ export type { RendererProps as Props };
12
12
  export declare class Renderer extends PureComponent<RendererProps> {
13
13
  private providerFactory;
14
14
  private serializer;
15
- private rafID?;
16
15
  private editorRef;
16
+ private rafID?;
17
17
  private mouseDownSelection?;
18
18
  private id?;
19
19
  /**
@@ -1,5 +1,5 @@
1
- import { Theme } from '@emotion/react';
2
- import { RendererAppearance } from './types';
1
+ import type { Theme } from '@emotion/react';
2
+ import type { RendererAppearance } from './types';
3
3
  export declare const FullPagePadding = 32;
4
4
  export type RendererWrapperProps = {
5
5
  appearance?: RendererAppearance;
@@ -7,6 +7,7 @@ export type RendererWrapperProps = {
7
7
  allowColumnSorting: boolean;
8
8
  useBlockRenderForCodeBlock: boolean;
9
9
  };
10
+ export declare const TELEPOINTER_ID = "ai-streaming-telepointer";
10
11
  export declare const headingSizes: {
11
12
  [key: string]: {
12
13
  [key: string]: number;
@@ -1,20 +1,20 @@
1
1
  /// <reference types="react" />
2
- import { Schema } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Schema } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
4
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
+ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
5
  import type { ADFStage } from '@atlaskit/editor-common/validator';
6
6
  import type { AnnotationProviders } from '@atlaskit/editor-common/types';
7
7
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
8
8
  import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils';
9
- import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
10
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
11
- import { RendererContext } from '../';
12
- import { RenderOutputStat } from '../render-document';
13
- import { RendererAppearance, StickyHeaderProps, HeadingAnchorLinksProps, NodeComponentsProps } from './Renderer/types';
14
- import { MediaOptions } from '../types/mediaOptions';
15
- import { SmartLinksOptions } from '../types/smartLinksOptions';
16
- import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
17
- import { DocNode } from '@atlaskit/adf-schema';
9
+ import type { EmojiResourceConfig } from '@atlaskit/emoji/resource';
10
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
11
+ import type { RendererContext } from '../';
12
+ import type { RenderOutputStat } from '../render-document';
13
+ import type { RendererAppearance, StickyHeaderProps, HeadingAnchorLinksProps, NodeComponentsProps } from './Renderer/types';
14
+ import type { MediaOptions } from '../types/mediaOptions';
15
+ import type { SmartLinksOptions } from '../types/smartLinksOptions';
16
+ import type { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
17
+ import type { DocNode } from '@atlaskit/adf-schema';
18
18
  export interface RawObjectFeatureFlags {
19
19
  ['renderer-render-tracking']: string;
20
20
  }
@@ -71,6 +71,16 @@ export interface RendererProps {
71
71
  allowSelectAllTrap?: boolean;
72
72
  unsupportedContentLevelsTracking?: UnsupportedContentLevelsTracking;
73
73
  nodeComponents?: NodeComponentsProps;
74
+ /**
75
+ * When enabled a trailing telepointer will be added to the rendered document
76
+ * following content updates.
77
+ *
78
+ * Content is updated by passing a new value prop to the renderer.
79
+ *
80
+ * The trailing pointer is updated by dom injection to the last text node which
81
+ * is updated as a result of a content update.
82
+ */
83
+ addTelepointer?: boolean;
74
84
  /**
75
85
  * @default undefined
76
86
  * @description
@@ -12,8 +12,8 @@ export type { RendererProps as Props };
12
12
  export declare class Renderer extends PureComponent<RendererProps> {
13
13
  private providerFactory;
14
14
  private serializer;
15
- private rafID?;
16
15
  private editorRef;
16
+ private rafID?;
17
17
  private mouseDownSelection?;
18
18
  private id?;
19
19
  /**
@@ -1,5 +1,5 @@
1
- import { Theme } from '@emotion/react';
2
- import { RendererAppearance } from './types';
1
+ import type { Theme } from '@emotion/react';
2
+ import type { RendererAppearance } from './types';
3
3
  export declare const FullPagePadding = 32;
4
4
  export type RendererWrapperProps = {
5
5
  appearance?: RendererAppearance;
@@ -7,6 +7,7 @@ export type RendererWrapperProps = {
7
7
  allowColumnSorting: boolean;
8
8
  useBlockRenderForCodeBlock: boolean;
9
9
  };
10
+ export declare const TELEPOINTER_ID = "ai-streaming-telepointer";
10
11
  export declare const headingSizes: {
11
12
  [key: string]: {
12
13
  [key: string]: number;
@@ -1,20 +1,20 @@
1
1
  /// <reference types="react" />
2
- import { Schema } from '@atlaskit/editor-prosemirror/model';
2
+ import type { Schema } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
4
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
+ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
5
  import type { ADFStage } from '@atlaskit/editor-common/validator';
6
6
  import type { AnnotationProviders } from '@atlaskit/editor-common/types';
7
7
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
8
8
  import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils';
9
- import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
10
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
11
- import { RendererContext } from '../';
12
- import { RenderOutputStat } from '../render-document';
13
- import { RendererAppearance, StickyHeaderProps, HeadingAnchorLinksProps, NodeComponentsProps } from './Renderer/types';
14
- import { MediaOptions } from '../types/mediaOptions';
15
- import { SmartLinksOptions } from '../types/smartLinksOptions';
16
- import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
17
- import { DocNode } from '@atlaskit/adf-schema';
9
+ import type { EmojiResourceConfig } from '@atlaskit/emoji/resource';
10
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
11
+ import type { RendererContext } from '../';
12
+ import type { RenderOutputStat } from '../render-document';
13
+ import type { RendererAppearance, StickyHeaderProps, HeadingAnchorLinksProps, NodeComponentsProps } from './Renderer/types';
14
+ import type { MediaOptions } from '../types/mediaOptions';
15
+ import type { SmartLinksOptions } from '../types/smartLinksOptions';
16
+ import type { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
17
+ import type { DocNode } from '@atlaskit/adf-schema';
18
18
  export interface RawObjectFeatureFlags {
19
19
  ['renderer-render-tracking']: string;
20
20
  }
@@ -71,6 +71,16 @@ export interface RendererProps {
71
71
  allowSelectAllTrap?: boolean;
72
72
  unsupportedContentLevelsTracking?: UnsupportedContentLevelsTracking;
73
73
  nodeComponents?: NodeComponentsProps;
74
+ /**
75
+ * When enabled a trailing telepointer will be added to the rendered document
76
+ * following content updates.
77
+ *
78
+ * Content is updated by passing a new value prop to the renderer.
79
+ *
80
+ * The trailing pointer is updated by dom injection to the last text node which
81
+ * is updated as a result of a content update.
82
+ */
83
+ addTelepointer?: boolean;
74
84
  /**
75
85
  * @default undefined
76
86
  * @description
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.13.1",
3
+ "version": "108.14.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/analytics-next": "^9.1.0",
32
32
  "@atlaskit/button": "^16.10.0",
33
33
  "@atlaskit/code": "^14.6.0",
34
- "@atlaskit/editor-common": "^75.1.0",
34
+ "@atlaskit/editor-common": "^75.5.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.10.0",
36
36
  "@atlaskit/editor-palette": "1.5.1",
37
37
  "@atlaskit/editor-prosemirror": "1.1.0",
@@ -44,13 +44,13 @@
44
44
  "@atlaskit/media-common": "^9.0.0",
45
45
  "@atlaskit/media-filmstrip": "^47.0.0",
46
46
  "@atlaskit/media-ui": "^25.0.0",
47
- "@atlaskit/media-viewer": "^48.0.0",
47
+ "@atlaskit/media-viewer": "^48.1.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.2.0",
49
- "@atlaskit/smart-card": "^26.26.0",
50
- "@atlaskit/status": "^1.3.0",
49
+ "@atlaskit/smart-card": "^26.27.0",
50
+ "@atlaskit/status": "^1.4.0",
51
51
  "@atlaskit/task-decision": "^17.9.0",
52
52
  "@atlaskit/theme": "^12.6.0",
53
- "@atlaskit/tokens": "^1.22.0",
53
+ "@atlaskit/tokens": "^1.25.0",
54
54
  "@atlaskit/tooltip": "^17.8.0",
55
55
  "@babel/runtime": "^7.0.0",
56
56
  "@emotion/react": "^11.7.1",
package/report.api.md CHANGED
@@ -23,9 +23,9 @@ import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
23
23
  import type { ADFStage } from '@atlaskit/editor-common/validator';
24
24
  import type { AnnotationProviders } from '@atlaskit/editor-common/types';
25
25
  import type { CardProps } from '@atlaskit/smart-card';
26
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
27
- import { DocNode } from '@atlaskit/adf-schema';
28
- import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
26
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
27
+ import type { DocNode } from '@atlaskit/adf-schema';
28
+ import type { EmojiResourceConfig } from '@atlaskit/emoji/resource';
29
29
  import { EVENT_TYPE } from '@atlaskit/editor-common/analytics';
30
30
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
31
31
  import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
@@ -37,7 +37,7 @@ import type { MediaFeatureFlags } from '@atlaskit/media-common';
37
37
  import { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
38
38
  import { OperationalAEP } from '@atlaskit/editor-common/analytics';
39
39
  import { PropsDifference } from '@atlaskit/editor-common/utils';
40
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
40
+ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
41
41
  import { Schema } from '@atlaskit/editor-prosemirror/model';
42
42
  import { SEVERITY } from '@atlaskit/editor-common/utils';
43
43
  import { ShallowPropsDifference } from '@atlaskit/editor-common/utils';
@@ -411,6 +411,7 @@ export interface RendererContext {
411
411
 
412
412
  // @public (undocumented)
413
413
  export interface RendererProps {
414
+ addTelepointer?: boolean;
414
415
  // (undocumented)
415
416
  adfStage?: ADFStage;
416
417
  // (undocumented)
@@ -12,9 +12,9 @@ import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
12
12
  import type { ADFStage } from '@atlaskit/editor-common/validator';
13
13
  import type { AnnotationProviders } from '@atlaskit/editor-common/types';
14
14
  import type { CardProps } from '@atlaskit/smart-card';
15
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
16
- import { DocNode } from '@atlaskit/adf-schema';
17
- import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
15
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
16
+ import type { DocNode } from '@atlaskit/adf-schema';
17
+ import type { EmojiResourceConfig } from '@atlaskit/emoji/resource';
18
18
  import { EVENT_TYPE } from '@atlaskit/editor-common/analytics';
19
19
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
20
20
  import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
@@ -26,7 +26,7 @@ import type { MediaFeatureFlags } from '@atlaskit/media-common';
26
26
  import { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
27
27
  import { OperationalAEP } from '@atlaskit/editor-common/analytics';
28
28
  import { PropsDifference } from '@atlaskit/editor-common/utils';
29
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
29
+ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
30
30
  import { Schema } from '@atlaskit/editor-prosemirror/model';
31
31
  import { SEVERITY } from '@atlaskit/editor-common/utils';
32
32
  import { ShallowPropsDifference } from '@atlaskit/editor-common/utils';
@@ -293,6 +293,7 @@ export interface RendererContext {
293
293
 
294
294
  // @public (undocumented)
295
295
  export interface RendererProps {
296
+ addTelepointer?: boolean;
296
297
  // (undocumented)
297
298
  adfStage?: ADFStage;
298
299
  // (undocumented)