@atlaskit/editor-core 214.2.3 → 215.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cjs/index.js +0 -7
  3. package/dist/cjs/ui/Addon/click-area-helper.js +1 -2
  4. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +38 -2
  5. package/dist/cjs/ui/EditorContentContainer/styles/tableStyles.js +10 -2
  6. package/dist/cjs/version-wrapper.js +1 -1
  7. package/dist/es2019/index.js +0 -8
  8. package/dist/es2019/ui/Addon/click-area-helper.js +1 -2
  9. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +40 -3
  10. package/dist/es2019/ui/EditorContentContainer/styles/tableStyles.js +9 -1
  11. package/dist/es2019/version-wrapper.js +1 -1
  12. package/dist/esm/index.js +0 -8
  13. package/dist/esm/ui/Addon/click-area-helper.js +1 -2
  14. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +39 -3
  15. package/dist/esm/ui/EditorContentContainer/styles/tableStyles.js +9 -1
  16. package/dist/esm/version-wrapper.js +1 -1
  17. package/dist/types/index.d.ts +0 -7
  18. package/dist/types/ui/EditorContentContainer/styles/tableStyles.d.ts +1 -0
  19. package/dist/types-ts4.5/index.d.ts +0 -7
  20. package/dist/types-ts4.5/ui/EditorContentContainer/styles/tableStyles.d.ts +1 -0
  21. package/package.json +11 -8
  22. package/create-editor-content-style/package.json +0 -17
  23. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +0 -43
  24. package/dist/cjs/ui/ContentStyles/ai-panels.js +0 -91
  25. package/dist/cjs/ui/ContentStyles/code-bidi-warning.js +0 -75
  26. package/dist/cjs/ui/ContentStyles/code-block.js +0 -28
  27. package/dist/cjs/ui/ContentStyles/date.js +0 -43
  28. package/dist/cjs/ui/ContentStyles/expand.js +0 -37
  29. package/dist/cjs/ui/ContentStyles/extension.js +0 -21
  30. package/dist/cjs/ui/ContentStyles/index.js +0 -220
  31. package/dist/cjs/ui/ContentStyles/layout.js +0 -80
  32. package/dist/cjs/ui/ContentStyles/media.js +0 -27
  33. package/dist/cjs/ui/ContentStyles/panel.js +0 -17
  34. package/dist/cjs/ui/ContentStyles/status.js +0 -158
  35. package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +0 -556
  36. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +0 -47
  37. package/dist/es2019/ui/ContentStyles/ai-panels.js +0 -168
  38. package/dist/es2019/ui/ContentStyles/code-bidi-warning.js +0 -68
  39. package/dist/es2019/ui/ContentStyles/code-block.js +0 -90
  40. package/dist/es2019/ui/ContentStyles/date.js +0 -57
  41. package/dist/es2019/ui/ContentStyles/expand.js +0 -142
  42. package/dist/es2019/ui/ContentStyles/extension.js +0 -236
  43. package/dist/es2019/ui/ContentStyles/index.js +0 -580
  44. package/dist/es2019/ui/ContentStyles/layout.js +0 -388
  45. package/dist/es2019/ui/ContentStyles/media.js +0 -207
  46. package/dist/es2019/ui/ContentStyles/panel.js +0 -66
  47. package/dist/es2019/ui/ContentStyles/status.js +0 -197
  48. package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +0 -551
  49. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +0 -36
  50. package/dist/esm/ui/ContentStyles/ai-panels.js +0 -87
  51. package/dist/esm/ui/ContentStyles/code-bidi-warning.js +0 -68
  52. package/dist/esm/ui/ContentStyles/code-block.js +0 -21
  53. package/dist/esm/ui/ContentStyles/date.js +0 -37
  54. package/dist/esm/ui/ContentStyles/expand.js +0 -31
  55. package/dist/esm/ui/ContentStyles/extension.js +0 -15
  56. package/dist/esm/ui/ContentStyles/index.js +0 -214
  57. package/dist/esm/ui/ContentStyles/layout.js +0 -74
  58. package/dist/esm/ui/ContentStyles/media.js +0 -21
  59. package/dist/esm/ui/ContentStyles/panel.js +0 -11
  60. package/dist/esm/ui/ContentStyles/status.js +0 -152
  61. package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +0 -548
  62. package/dist/types/nodeviews/getInlineNodeViewProducer.styles.d.ts +0 -2
  63. package/dist/types/ui/ContentStyles/ai-panels.d.ts +0 -8
  64. package/dist/types/ui/ContentStyles/code-bidi-warning.d.ts +0 -2
  65. package/dist/types/ui/ContentStyles/code-block.d.ts +0 -2
  66. package/dist/types/ui/ContentStyles/date.d.ts +0 -3
  67. package/dist/types/ui/ContentStyles/expand.d.ts +0 -2
  68. package/dist/types/ui/ContentStyles/extension.d.ts +0 -2
  69. package/dist/types/ui/ContentStyles/index.d.ts +0 -23
  70. package/dist/types/ui/ContentStyles/layout.d.ts +0 -8
  71. package/dist/types/ui/ContentStyles/media.d.ts +0 -2
  72. package/dist/types/ui/ContentStyles/panel.d.ts +0 -2
  73. package/dist/types/ui/ContentStyles/status.d.ts +0 -3
  74. package/dist/types/ui/ContentStyles/tasks-and-decisions.d.ts +0 -6
  75. package/dist/types-ts4.5/nodeviews/getInlineNodeViewProducer.styles.d.ts +0 -2
  76. package/dist/types-ts4.5/ui/ContentStyles/ai-panels.d.ts +0 -8
  77. package/dist/types-ts4.5/ui/ContentStyles/code-bidi-warning.d.ts +0 -2
  78. package/dist/types-ts4.5/ui/ContentStyles/code-block.d.ts +0 -2
  79. package/dist/types-ts4.5/ui/ContentStyles/date.d.ts +0 -3
  80. package/dist/types-ts4.5/ui/ContentStyles/expand.d.ts +0 -2
  81. package/dist/types-ts4.5/ui/ContentStyles/extension.d.ts +0 -2
  82. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +0 -23
  83. package/dist/types-ts4.5/ui/ContentStyles/layout.d.ts +0 -8
  84. package/dist/types-ts4.5/ui/ContentStyles/media.d.ts +0 -2
  85. package/dist/types-ts4.5/ui/ContentStyles/panel.d.ts +0 -2
  86. package/dist/types-ts4.5/ui/ContentStyles/status.d.ts +0 -3
  87. package/dist/types-ts4.5/ui/ContentStyles/tasks-and-decisions.d.ts +0 -6
@@ -1,220 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.placeholderStyles = exports.linkStyles = exports.default = exports.createEditorContentStyle = void 0;
9
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
- var _react = _interopRequireWildcard(require("react"));
11
- var _react2 = require("@emotion/react");
12
- var _browser = require("@atlaskit/editor-common/browser");
13
- var _collab = require("@atlaskit/editor-common/collab");
14
- var _emoji = require("@atlaskit/editor-common/emoji");
15
- var _mention = require("@atlaskit/editor-common/mention");
16
- var _panel = require("@atlaskit/editor-common/panel");
17
- var _selection = require("@atlaskit/editor-common/selection");
18
- var _styles = require("@atlaskit/editor-common/styles");
19
- var _styles2 = require("@atlaskit/editor-plugins/block-type/styles");
20
- var _styles3 = require("@atlaskit/editor-plugins/find-replace/styles");
21
- var _styles4 = require("@atlaskit/editor-plugins/paste-options-toolbar/styles");
22
- var _styles5 = require("@atlaskit/editor-plugins/placeholder-text/styles");
23
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
24
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
25
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
26
- var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
27
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
28
- var _tokens = require("@atlaskit/tokens");
29
- var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
30
- var _backgroundColorStyles = require("../EditorContentContainer/styles/backgroundColorStyles");
31
- var _aiPanels = require("./ai-panels");
32
- var _codeBidiWarning = require("./code-bidi-warning");
33
- var _codeBlock = require("./code-block");
34
- var _date = require("./date");
35
- var _expand = require("./expand");
36
- var _extension = require("./extension");
37
- var _layout = require("./layout");
38
- var _media = require("./media");
39
- var _panel2 = require("./panel");
40
- var _status = require("./status");
41
- var _tasksAndDecisions = require("./tasks-and-decisions");
42
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1;
43
- /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
44
- /* eslint-disable react-hooks/rules-of-hooks */
45
- /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Requires manual remediation over time due to use of unsafe nested mixins */
46
- /**
47
- * @jsxRuntime classic
48
- * @jsx jsx
49
- */
50
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
51
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
52
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
53
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
54
- var linkStyles = exports.linkStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n"])), _styles.linkSharedStyle);
55
- var ruleStyles = function ruleStyles() {
56
- return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", ";\n\n\t\thr {\n\t\t\tcursor: pointer;\n\t\t\tpadding: ", " 0;\n\t\t\tmargin: ", " 0;\n\t\t\tbackground-clip: content-box;\n\n\t\t\t&.", " {\n\t\t\t\toutline: none;\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), (0, _styles.ruleSharedStyles)(), "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(_editorSharedStyles.akEditorSelectedBorderColor, ")"));
57
- };
58
- var mentionNodeStyles = (0, _react2.css)({
59
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
60
- '.editor-mention-primitive': {
61
- display: 'inline',
62
- borderRadius: "var(--ds-radius-full, 9999px)",
63
- cursor: 'pointer',
64
- padding: '0 0.3em 2px 0.23em',
65
- // To match `packages/elements/mention/src/components/Mention/PrimitiveMention.tsx` implementation
66
- // we match the line height exactly
67
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
68
- lineHeight: '1.714',
69
- fontWeight: "var(--ds-font-weight-regular, 400)",
70
- wordBreak: 'break-word',
71
- background: "var(--ds-background-neutral, #091E420F)",
72
- border: "var(--ds-border-width, 1px)".concat(" solid transparent"),
73
- color: "var(--ds-text-subtle, #44546F)",
74
- '&:hover': {
75
- background: "var(--ds-background-neutral-hovered, #091E4224)"
76
- },
77
- '&:active': {
78
- background: "var(--ds-background-neutral-pressed, #091E424F)"
79
- }
80
- },
81
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
82
- '.editor-mention-primitive.mention-restricted': {
83
- background: 'transparent',
84
- border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-bold, #758195)"),
85
- color: "var(--ds-text, #172B4D)",
86
- '&:hover': {
87
- background: 'transparent'
88
- },
89
- '&:active': {
90
- background: 'transparent'
91
- }
92
- },
93
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
94
- '.editor-mention-primitive.mention-self': {
95
- background: "var(--ds-background-brand-bold, #0C66E4)",
96
- border: "var(--ds-border-width, 1px)".concat(" solid transparent"),
97
- color: "var(--ds-text-inverse, #FFFFFF)",
98
- '&:hover': {
99
- background: "var(--ds-background-brand-bold-hovered, #0055CC)"
100
- },
101
- '&:active': {
102
- background: "var(--ds-background-brand-bold-pressed, #09326C)"
103
- }
104
- }
105
- });
106
-
107
- // The feature-gate for this is dependent on the use of refreshed typography - bear this in mind when cleaning up
108
- // This is currently enforced through statsig prerequisite gates, as per #help-afm recommendation.
109
- // So it will need to be considered if the typography gates are still in use when this is cleaned up.
110
- var mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding = (0, _react2.css)({
111
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
112
- '.editor-mention-primitive': {
113
- padding: '1px 0.3em 1px 0.23em'
114
- }
115
- });
116
- var mentionSelectionStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t.danger {\n\t\t.editor-mention-primitive {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t.", " > .editor-mention-primitive,\n\t.", " > .editor-mention-primitive.mention-self,\n\t.", " > .editor-mention-primitive.mention-restricted {\n\t\t", "\n\t\t/* need to specify dark text colour because personal mentions\n\t (in dark blue) have white text by default */\n\t\tcolor: ", "\n\t}\n"])), _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)");
117
- var mentionsSelectionStylesWithSearchMatch = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.danger {\n\t\t.editor-mention-primitive {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t.", ":not(.search-match-block) > .editor-mention-primitive,\n\t.", ":not(.search-match-block)\n\t\t> .editor-mention-primitive.mention-self,\n\t.", ":not(.search-match-block)\n\t\t> .editor-mention-primitive.mention-restricted {\n\t\t", "\n\t\t/* need to specify dark text colour because personal mentions\n\t (in dark blue) have white text by default */\n\t\tcolor: ", "\n\t}\n\n\t.", ".search-match-block > .editor-mention-primitive,\n\t.", ".search-match-block > .editor-mention-primitive.mention-self,\n\t.", ".search-match-block\n\t\t> .editor-mention-primitive.mention-restricted {\n\t\t", "\n\t\t/* need to specify dark text colour because personal mentions\n\t (in dark blue) have white text by default */\n\t\tcolor: ", "\n\t}\n"])), _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)");
118
- var mentionsStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\t&.", " [data-mention-id] > span {\n\t\t\t", "\n\n\t\t\t/* need to specify dark text colour because personal mentions\n\t\t\t(in dark blue) have white text by default */\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n\n\t.danger {\n\t\t.", ".", "\n\t\t\t> span\n\t\t\t> span\n\t\t\t> span {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t\t.", " > span > span > span {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)", _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, #091E420F)", "var(--ds-text-subtle, #44546F)");
119
- var listsStyles = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\tli {\n\t\t\tposition: relative;\n\n\t\t\t> p:not(:first-child) {\n\t\t\t\tmargin: ", " 0 0 0;\n\t\t\t}\n\n\t\t\t/* In SSR the above rule will apply to all p tags because first-child would be a style tag.\n\t\t\tThe following rule resets the first p tag back to its original margin\n\t\t\tdefined in packages/editor/editor-common/src/styles/shared/paragraph.ts */\n\t\t\t> style:first-child + p {\n\t\t\t\tmargin-top: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:not([data-node-type='decisionList']) > li,\n /* This prevents https://product-fabric.atlassian.net/browse/ED-20924 */\n &:not(.", ") > li {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-space-050, 4px)", _editorSharedStyles.blockNodesVerticalMargin, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _browser.browser.safari ? _styles.codeBlockInListSafariFix : '');
120
- var emojiStyles = (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror .", " {\n\t\tdisplay: inline-block;\n\t}\n\n\t.ProseMirror\n\t\t:is(.", ", .", ") {\n\t\tbackground: no-repeat transparent;\n\t\tdisplay: inline-block;\n\t\theight: ", "px;\n\t\tmax-height: ", "px;\n\t\tcursor: pointer;\n\t\tvertical-align: middle;\n\t\tuser-select: all;\n\t}\n\n\t.ProseMirror .", " {\n\t\t.", ", .", " {\n\t\t\tborder-radius: ", ";\n\t\t\t", "\n\t\t}\n\t}\n"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _emoji.defaultEmojiHeight, _emoji.defaultEmojiHeight, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, "var(--ds-radius-xsmall, 2px)", (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
121
-
122
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
123
- var placeholderStyles = exports.placeholderStyles = (0, _react2.css)({
124
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
125
- '.ProseMirror .placeholder-decoration': {
126
- color: "var(--ds-text-subtlest, #626F86)",
127
- width: '100%',
128
- pointerEvents: 'none',
129
- userSelect: 'none',
130
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
131
- '.placeholder-android': {
132
- pointerEvents: 'none',
133
- outline: 'none',
134
- userSelect: 'none',
135
- position: 'absolute'
136
- }
137
- }
138
- });
139
- var placeholderOverflowStyles = (0, _react2.css)({
140
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
141
- '.ProseMirror p:has(.placeholder-decoration-hide-overflow)': {
142
- overflow: 'hidden',
143
- whiteSpace: 'nowrap',
144
- textOverflow: 'ellipsis'
145
- }
146
- });
147
- var placeholderWrapStyles = (0, _react2.css)({
148
- // As part of controls work, we add placeholder `Search` to quick insert command
149
- // This style is to prevent `/Search` being wrapped if it's triggered at the end of the line
150
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
151
- '.ProseMirror mark[data-type-ahead-query="true"]:has(.placeholder-decoration-wrap)': {
152
- whiteSpace: 'nowrap'
153
- }
154
- });
155
- var firstBlockNodeStylesNew = (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> div[data-task-list-local-id],\n\t\t> div[data-layout-section],\n\t\t> .", " {\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t> hr:first-child,\n\t\t> .ProseMirror-widget:first-child + hr {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n"])), _panel.PanelSharedCssClassName.prefix, _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _styles.expandClassNames.prefix);
156
-
157
- // Make sure the first floating toolbar button has focus ring when focused via .focus()
158
- var firstFloatingToolbarButtonStyles = (0, _react2.css)({
159
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
160
- 'button.first-floating-toolbar-button:focus': {
161
- outline: "var(--ds-border-width-focused, 2px)".concat(" solid ", "var(--ds-border-focused, #2684FF)")
162
- }
163
- });
164
-
165
- // The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
166
- var akEditorBreakpointForSmallDevice = "1266px";
167
-
168
- // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
169
- /**
170
- * @deprecated
171
- * DO NOT USE THIS WILL BE REMOVED SOON.
172
- * use this instead: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
173
- */
174
- var legacyContentStyles = function legacyContentStyles(props) {
175
- return (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--resizer-handle-spacing: 12px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t--ak-editor--breakout-fallback-width: calc(\n\t\t100cqw - var(--ak-editor--breakout-full-page-guttering-padding)\n\t);\n\t--ak-editor--breakout-min-width: 100%;\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\n\t\t/* in full width appearances it's not possible to rely on cqw because it doesn't account for the page scrollbar, which depends on users system settings */\n\t\t--ak-editor--breakout-fallback-width: 100%;\n\t\t--ak-editor--breakout-min-width: 0px;\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t", "\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t */\n\t.ProseMirror-hideselection {\n\t\tcaret-color: transparent;\n\t}\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: ", " solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n /* Switch between the two icons based on the visual refresh feature gate */\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t/* For FullPage only when inside a table\n\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn the \"editorContentAreaContainerStyle\" function */\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) ? (0, _react2.css)(_templateObject0 || (_templateObject0 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t\t\t\t@container editor-area (max-width: ", "px) {\n\t\t\t\t\t--ak-editor--large-gutter-padding: ", "px;\n\t\t\t\t}\n\t\t\t"])), _editorSharedStyles.akEditorFullPageNarrowBreakout, _editorSharedStyles.akEditorGutterPaddingReduced) : null, (0, _editorSharedStyles.editorFontSize)({
176
- theme: props.theme
177
- }), _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(props.typographyTheme), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-width-focused, 2px)", "var(--ds-border-focused, #8cf)", firstFloatingToolbarButtonStyles, _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(props.typographyTheme), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), (0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true) && _backgroundColorStyles.textHighlightPaddingStyles, listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _layout.layoutStyles)(props.viewMode), _collab.telepointerStyle, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, mentionNodeStyles, (0, _platformFeatureFlags.fg)('platform_editor_centre_mention_padding') && mentionNodeStylesMixin_fg_platform_editor_centre_mention_padding, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? mentionsSelectionStylesWithSearchMatch : mentionSelectionStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? _styles3.findReplaceStylesNew : _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? _tasksAndDecisions.taskItemStylesWithBlockTaskItem : _tasksAndDecisions.taskItemStyles, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.taskDecisionIconWithVisualRefresh, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.taskDecisionIconWithoutVisualRefresh, (0, _status.statusStyles)(), (0, _status.statusNodeStyles)(), (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), (0, _styles.getSmartCardSharedStyles)(), _date.dateStyles, _date.dateNodeStyles, (0, _styles.embedCardStyles)(), _styles.unsupportedStyles, _styles.resizerStyles, (0, _styles.pragmaticResizerStyles)(), (0, _styles.pragmaticStylesLayoutFirstNodeResizeHandleFix)(), (0, _styles.pragmaticResizerStylesForTooltip)(), (0, _styles.pragmaticResizerStylesWithReducedEditorGutter)(), (0, _aiPanels.aiPanelStyles)(props.colorMode), firstBlockNodeStylesNew, (0, _platformFeatureFlags.fg)('platform_editor_vanilla_codebidi_warning') && _codeBidiWarning.codeBidiWarningStyles, _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
178
- };
179
- var createEditorContentStyle = exports.createEditorContentStyle = function createEditorContentStyle(styles) {
180
- return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
181
- var className = props.className,
182
- children = props.children,
183
- featureFlags = props.featureFlags;
184
- var theme = (0, _react2.useTheme)();
185
- var _useThemeObserver = (0, _tokens.useThemeObserver)(),
186
- colorMode = _useThemeObserver.colorMode,
187
- typography = _useThemeObserver.typography;
188
- var memoizedStyle = (0, _react.useMemo)(function () {
189
- return legacyContentStyles({
190
- theme: theme,
191
- colorMode: colorMode,
192
- featureFlags: featureFlags,
193
- viewMode: props.viewMode,
194
- typographyTheme: typography
195
- });
196
- }, [theme, colorMode, featureFlags, props.viewMode, typography]);
197
- if (props.isScrollable) {
198
- return (0, _react2.jsx)("div", {
199
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
200
- className: className,
201
- ref: ref,
202
- css: [memoizedStyle, styles],
203
- "data-editor-scroll-container": "true",
204
- "data-testid": "editor-content-container"
205
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex -- Adding tabIndex here because this is a scrollable container and it needs to be focusable so keyboard users can scroll it.
206
- ,
207
- tabIndex: 0,
208
- role: "region"
209
- }, children);
210
- }
211
- return (0, _react2.jsx)("div", {
212
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
213
- className: className,
214
- ref: ref,
215
- css: [memoizedStyle, styles],
216
- "data-testid": "editor-content-container"
217
- }, children);
218
- });
219
- };
220
- var _default = exports.default = createEditorContentStyle();
@@ -1,80 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.layoutStyles = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
- var _react = require("@emotion/react");
10
- var _styles = require("@atlaskit/editor-common/styles");
11
- var _types = require("@atlaskit/editor-plugins/table/types");
12
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11;
16
- /**
17
- * TODO ED-26957 - remove legacy styles when static emotion refactor is complete
18
- * We are moving this to new location under FF: platform_editor_core_static_emotion
19
- * New location: packages/editor/editor-core/src/ui/EditorContentContainer.tsx
20
- * If you are making updates to this file, please updates in new location as well.
21
- */
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
23
- var AK_NESTED_DND_GUTTER_OFFSET = 8;
24
- var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
25
- return (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
26
- (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
27
- (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :not(style):first-child,\n\t\t\t\t> style:first-child + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"])));
28
- };
29
- // Ignored via go/ees007
30
- // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
31
- // TODO handle responsive
32
- var layoutColumnStyles = function layoutColumnStyles() {
33
- return (0, _experiments.editorExperiment)('advanced_layouts', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
34
- (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> [data-layout-column] {\n\t\t\t\t\tmargin: 0 ", "px;\n\t\t\t\t}\n\n\t\t\t\t> [data-layout-column]:first-of-type {\n\t\t\t\t\tmargin-left: 0;\n\t\t\t\t}\n\n\t\t\t\t> [data-layout-column]:last-of-type {\n\t\t\t\t\tmargin-right: 0;\n\t\t\t\t}\n\n\t\t\t\t@media screen and (max-width: ", "px) {\n\t\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t> [data-layout-column].", ":not(.danger) {\n\t\t\t\t\t", ";\n\t\t\t\t\t/* layout column selection shorter after layout border has been removed */\n\t\t\t\t\t::before {\n\t\t\t\t\t\twidth: calc(100% - 8px);\n\t\t\t\t\t\tleft: 4px;\n\t\t\t\t\t\tborder-radius: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), _styles.LAYOUT_SECTION_MARGIN / 2, _editorSharedStyles.gridMediumMaxWidth, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket]), "var(--ds-radius-small, 3px)") : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
35
- (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\tmargin-left: ", "px;\n\t\t\t\t}\n\n\t\t\t\t@media screen and (max-width: ", "px) {\n\t\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), _styles.LAYOUT_SECTION_MARGIN, _editorSharedStyles.gridMediumMaxWidth);
36
- };
37
- var layoutSectionStyles = function layoutSectionStyles() {
38
- return (0, _experiments.editorExperiment)('advanced_layouts', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
39
- (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t", ";\n\t\t\t\t.layout-section-container [data-layout-section] {\n\t\t\t\t\t> .ProseMirror-widget {\n\t\t\t\t\t\tflex: none;\n\t\t\t\t\t\tdisplay: contents !important;\n\n\t\t\t\t\t\t&[data-blocks-drag-handle-container] div {\n\t\t\t\t\t\t\tdisplay: contents !important;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&[data-blocks-drop-target-container] {\n\t\t\t\t\t\t\tdisplay: block !important;\n\t\t\t\t\t\t\tmargin: ", ";\n\n\t\t\t\t\t\t\t[data-drop-target-for-element] {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t& + [data-layout-column] {\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t> [data-layout-column] {\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), _styles.columnLayoutResponsiveSharedStyle, "var(--ds-space-negative-050, -4px)") : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
40
- (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t", "\n\t\t\t"])), _styles.columnLayoutSharedStyle);
41
- };
42
-
43
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
44
- var layoutBorderStyles = function layoutBorderStyles(viewMode) {
45
- return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t/* TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n\tThis is because the default state already uses the same token and, as such, the hover style won't change anything.\n\thttps://product-fabric.atlassian.net/browse/DSP-4441 */\n\t/* Shows the border when cursor is inside a layout */\n\t&.selected [data-layout-column],\n\t&:hover [data-layout-column] {\n\t\tborder: ", "px solid ", ";\n\t}\n\n\t&.selected.danger [data-layout-column] {\n\t\tbackground-color: ", ";\n\t\tborder-color: ", ";\n\t}\n\n\t&.", ":not(.danger) {\n\t\t[data-layout-column] {\n\t\t\t", "\n\t\t\t::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t}\n\t}\n"])), viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Border, _editorSharedStyles.SelectionStyle.Blanket]));
46
- };
47
-
48
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
49
- var columnSeparatorStyles = function columnSeparatorStyles(viewMode) {
50
- return (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tcontent: '';\n\t\tborder-left: ", "px solid\n\t\t\t", ";\n\t\tposition: absolute;\n\t\theight: calc(100% - 24px);\n\t\tmargin-left: -25px;\n\t}\n"])), viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)");
51
- };
52
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
53
- var rowSeparatorStyles = function rowSeparatorStyles(viewMode) {
54
- return (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tcontent: '';\n\t\tborder-top: ", "px solid\n\t\t\t", ";\n\t\tposition: absolute;\n\t\twidth: calc(100% - 32px);\n\t\tmargin-top: -13px;\n\n\t\t/* clear styles for column separator */\n\t\tborder-left: unset;\n\t\tmargin-left: unset;\n\t\theight: unset;\n\t}\n"])), viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)");
55
- };
56
-
57
- // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
58
- var layoutWithSeparatorBorderResponsiveStyles = function layoutWithSeparatorBorderResponsiveStyles(breakpoint, viewMode
59
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
60
- ) {
61
- return (0, _react.css)(_templateObject0 || (_templateObject0 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected,\n\t&:hover,\n\t&.selected.danger,\n\t&.", ":not(.danger) {\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t@container editor-area (max-width:", "px) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, breakpoint, rowSeparatorStyles(viewMode));
62
- };
63
-
64
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
65
- var layoutWithSeparatorBorderStyles = function layoutWithSeparatorBorderStyles(viewMode) {
66
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
67
- return (0, _react.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\n\t\t&.selected [data-layout-column]:not(:first-of-type),\n\t\t[data-empty-layout='true'] [data-layout-column]:not(:first-of-type),\n\t\t&:hover [data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\n\t\t&.selected.danger [data-layout-section] {\n\t\t\tbackground-color: ", ";\n\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tborder-radius: 4px;\n\t\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.", ":not(.danger) [data-layout-section] {\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: ", ";\n\t\t\t[data-layout-column] {\n\t\t\t\t", "\n\t\t\t\tborder: 0px;\n\t\t\t\t::before {\n\t\t\t\t\tbackground-color: transparent;\n\t\t\t\t}\n\t\t\t}\n\t\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t"])), columnSeparatorStyles(viewMode), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, columnSeparatorStyles(viewMode), _editorSharedStyles.akEditorSelectedNodeClassName, viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", "var(--ds-background-selected, #E9F2FF)", (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket]), columnSeparatorStyles(viewMode));
68
- };
69
-
70
- // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
71
- var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
72
- return (// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
73
- (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n\t\t/* chosen breakpoints in container queries are to make sure layout responsiveness in editor aligns with renderer */\n\t\t/* not resized layout in full-width editor */\n\t\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t\t> .layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:724px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* not resized layout in fixed-width editor */\n\t\t.ak-editor-content-area:not(.fabric-editor--full-width-mode) .ProseMirror {\n\t\t\t> .layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:788px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* resized layout in full/fixed-width editor */\n\t\t.ProseMirror .fabric-editor-breakout-mark {\n\t\t\t.layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:820px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t"])), layoutWithSeparatorBorderResponsiveStyles(724, viewMode), layoutWithSeparatorBorderResponsiveStyles(788, viewMode), layoutWithSeparatorBorderResponsiveStyles(820, viewMode))
74
- );
75
- };
76
-
77
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
78
- var layoutStyles = exports.layoutStyles = function layoutStyles(viewMode) {
79
- return (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px\n\t\t\t\t0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t/* styles to support borders for layout */\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t/* hide separator when element is dragging on top of a layout column */\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0), _editorSharedStyles.akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || (0, _experiments.editorExperiment)('advanced_layouts', true) ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveStyles(viewMode), _types.TableCssClassName.TABLE_CONTAINER, "var(--ds-space-025, 2px)", (0, _experiments.editorExperiment)('advanced_layouts', false) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", _editorSharedStyles.akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
80
- };
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.mediaStyles = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
- var _react = require("@emotion/react");
10
- var _mediaInline = require("@atlaskit/editor-common/media-inline");
11
- var _styles = require("@atlaskit/editor-common/styles");
12
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _mediaCard = require("@atlaskit/media-card");
14
- var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
15
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
16
- var mediaStyles = exports.mediaStyles = function mediaStyles() {
17
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n\t\t\tmargin-left: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t.media-extended-resize-experience[layout^='wrap-'] {\n\t\t\t/* override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n\t\t\tto prevent scroll bar */\n\t\t\toverflow: visible !important;\n\t\t}\n\n\t\t& [layout^='wrap-'] + [layout^='wrap-'] {\n\t\t\tclear: none;\n\t\t\t& + p,\n\t\t\t& + div[class^='fabric-editor-align'],\n\t\t\t& + ul,\n\t\t\t& + ol,\n\t\t\t& + h1,\n\t\t\t& + h2,\n\t\t\t& + h3,\n\t\t\t& + h4,\n\t\t\t& + h5,\n\t\t\t& + h6 {\n\t\t\t\tclear: both !important;\n\t\t\t}\n\t\t\t& .", " {\n\t\t\t\tmargin-left: 0;\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t.mediaSingleView-content-wrap[layout^='wrap-'] {\n\t\t\tmax-width: 100%;\n\t\t\t/* overwrite default Prosemirror setting making it clear: both */\n\t\t\tclear: inherit;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tfloat: left;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right'] {\n\t\t\tfloat: right;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right']\n\t\t\t+ .mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tclear: both;\n\t\t}\n\n\t\t/* Larger margins for resize handlers when at depth 0 of the document */\n\t\t& > .mediaSingleView-content-wrap {\n\t\t\t.richMedia-resize-handle-right {\n\t\t\t\tmargin-right: -", "px;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-left {\n\t\t\t\tmargin-left: -", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.richMedia-resize-handle-right,\n\t.richMedia-resize-handle-left {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t/* vertical align */\n\t\tjustify-content: center;\n\t}\n\n\t.richMedia-resize-handle-right {\n\t\talign-items: flex-end;\n\t\tpadding-right: ", ";\n\t\tmargin-right: -", "px;\n\t}\n\n\t.richMedia-resize-handle-left {\n\t\talign-items: flex-start;\n\t\tpadding-left: ", ";\n\t\tmargin-left: -", "px;\n\t}\n\n\t.richMedia-resize-handle-right::after,\n\t.richMedia-resize-handle-left::after {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\theight: 64px;\n\n\t\tborder-radius: 6px;\n\t}\n\n\t.", ":hover .richMedia-resize-handle-left::after,\n\t.", ":hover .richMedia-resize-handle-right::after {\n\t\tbackground: ", ";\n\t}\n\n\t.", " .richMedia-resize-handle-right::after,\n\t.", " .richMedia-resize-handle-left::after,\n\t.", " .richMedia-resize-handle-right:hover::after,\n\t.", " .richMedia-resize-handle-left:hover::after,\n\t.", ".is-resizing .richMedia-resize-handle-right::after,\n\t.", ".is-resizing .richMedia-resize-handle-left::after {\n\t\tbackground: ", ";\n\t}\n\n\t.__resizable_base__ {\n\t\tleft: unset !important;\n\t\twidth: auto !important;\n\t\theight: auto !important;\n\t}\n\n\t/* Danger when top level node for smart cards / inline links */\n\t.danger > div > div > .media-card-frame,\n\t.danger > span > a {\n\t\tbackground-color: ", ";\n\t\tbox-shadow: 0px 0px 0px ", "px\n\t\t\t", ";\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tbox-shadow 0s;\n\t}\n\t/* Danger when nested node or common */\n\t.danger {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* Media single video player */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* New file experience */\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\t\t/* Media resize legacy handlers */\n\t\t.richMedia-resize-handle-right::after,\n\t\t.richMedia-resize-handle-left::after {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t\t/* Media resize new handlers */\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\n\t\t/* Smart cards */\n\t\tdiv div .media-card-frame,\n\t\t.inlineCardView-content-wrap > span > a {\n\t\t\tbackground-color: ", "; /* R75 with 50% opactiy */\n\t\t\ttransition: background-color 0s;\n\t\t}\n\n\t\tdiv div .media-card-frame::after {\n\t\t\tbox-shadow: none;\n\t\t}\n\t}\n\n\t.warning {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t}\n\n\t.media-filmstrip-list-item {\n\t\tcursor: pointer;\n\t}\n\n\t/* When clicking drag handle, mediaGroup node will be selected. Hence we need to apply selected style to each media node */\n\t.mediaGroupView-content-wrap.", " #newFileExperienceWrapper {\n\t\tbox-shadow: ", ";\n\t}\n"])), _styles.mediaSingleSharedStyleNew, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _mediaInline.mediaInlineImageStyles, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border, #091E4224)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border-focused, #388BFF)", "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))", _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, "var(--ds-border-warning, #E56910)", _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, "var(--ds-border-warning, #E56910)", _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, "var(--ds-border-warning, #E56910)", "var(--ds-icon-warning, #E56910)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBoxShadow);
18
- };
19
-
20
- /* `left: unset` above is to work around Chrome bug where rendering a div with
21
- * that style applied inside a container that has a scroll, causes any svgs on
22
- * the page, without a border, that are inside a flexbox, to no longer align to
23
- * the center of their viewbox.
24
- *
25
- * for us, this means that all the toolbar icons start jumping around if
26
- * you make the viewport small
27
- */
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.panelStyles = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
- var _react = require("@emotion/react");
10
- var _panel = require("@atlaskit/editor-common/panel");
11
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
- var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation due to mixin usage
15
- var panelStyles = exports.panelStyles = function panelStyles() {
16
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t.", " {\n\t\t\tcursor: pointer;\n\n\t\t\t/* Danger when top level node */\n\t\t\t&.danger {\n\t\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\t\tbackground-color: ", " !important;\n\n\t\t\t\t.", " {\n\t\t\t\t\tcolor: ", " !important;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t/* Danger when nested node */\n\t\t.danger .", " {\n\t\t\t&[data-panel-type] {\n\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t.", " {\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t", ";\n\t}\n\n\t.", ".", ":not(.danger) {\n\t\t", "\n\t}\n\n\t", ";\n\n\t/* Don't want extra padding for inline editor (nested) */\n\t", ";\n"])), _panel.PanelSharedCssClassName.prefix, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _panel.PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _panel.PanelSharedCssClassName.content, _panel.PanelSharedCssClassName.prefix, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _panel.PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), (0, _panel.panelSharedStyles)(), _panel.PanelSharedCssClassName.prefix, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && ".ak-editor-content-area.appearance-full-page .ProseMirror {\n\t\t.ak-editor-panel .".concat(_panel.PanelSharedCssClassName.icon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t}\n\n\t\t.ak-editor-panel.").concat(_panel.PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-left: ", "var(--ds-space-250, 20px)", ";\n\t\t\tpadding-right: ", "var(--ds-space-250, 20px)", ";\n\t\t}\n\t}"), (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && ".ak-editor-content-area .ak-editor-content-area .ProseMirror {\n\t\t.ak-editor-panel .".concat(_panel.PanelSharedCssClassName.icon, " {\n\t\t\tpadding-right: ", "var(--ds-space-100, 8px)", ";\n\t\t}\n\t\t.ak-editor-panel.").concat(_panel.PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\t\t}\n\t}"));
17
- };
@@ -1,158 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.statusStyles = exports.statusNodeStyles = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _react = require("@emotion/react");
11
- var _styles = require("@atlaskit/editor-common/styles");
12
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
- var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
15
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
16
- var getVisualRefreshStatusStyles = function getVisualRefreshStatusStyles() {
17
- return (
18
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
19
- (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _react.css)((0, _defineProperty2.default)({}, "&.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, ":not('.search-match-block') .").concat(_styles.StatusSharedCssClassName.STATUS_LOZENGE, " > span"), {
20
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
21
- boxShadow: _editorSharedStyles.akEditorSelectedBoldBoxShadow
22
- })) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
23
- (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t\t&.", " .", " > span {\n\t\t\t\t\t\tbox-shadow: ", ";\n\t\t\t\t\t}\n\t\t\t\t"])), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.StatusSharedCssClassName.STATUS_LOZENGE, _editorSharedStyles.akEditorSelectedBoldBoxShadow) : (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
24
- (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t\t&.", ":not('.search-match-block')\n\t\t\t\t\t\t.", "\n\t\t\t\t\t\t> span {\n\t\t\t\t\t\t", "\n\t\t\t\t\t}\n\t\t\t\t"])), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.StatusSharedCssClassName.STATUS_LOZENGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow])) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
25
- (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t\t&.", " .", " > span {\n\t\t\t\t\t\t", "\n\t\t\t\t\t}\n\t\t\t\t"])), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.StatusSharedCssClassName.STATUS_LOZENGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]))
26
- );
27
- };
28
- var getStatusColors = function getStatusColors() {
29
- return (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? (0, _react.css)({
30
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
31
- '[data-prosemirror-node-name="status"] .lozenge-text': {
32
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
33
- color: '#292A2E'
34
- },
35
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
36
- '[data-prosemirror-node-name="status"] > [data-color=neutral] > .lozenge-wrapper': {
37
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
38
- backgroundColor: '#DDDEE1'
39
- },
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
41
- '[data-prosemirror-node-name="status"] > [data-color=purple] > .lozenge-wrapper': {
42
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
43
- backgroundColor: '#D8A0F7'
44
- },
45
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
46
- '[data-prosemirror-node-name="status"] > [data-color=blue] > .lozenge-wrapper': {
47
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
48
- backgroundColor: '#8FB8F6'
49
- },
50
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
51
- '[data-prosemirror-node-name="status"] > [data-color=yellow] > .lozenge-wrapper': {
52
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
53
- backgroundColor: '#F9C84E'
54
- },
55
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
56
- '[data-prosemirror-node-name="status"] > [data-color=red] > .lozenge-wrapper': {
57
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
58
- backgroundColor: '#FD9891'
59
- },
60
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
61
- '[data-prosemirror-node-name="status"] > [data-color=green] > .lozenge-wrapper': {
62
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
63
- backgroundColor: '#B3DF72'
64
- }
65
- }) : (0, _react.css)({
66
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
67
- '[data-prosemirror-node-name="status"] > [data-color=neutral] .lozenge-wrapper': {
68
- backgroundColor: "var(--ds-background-neutral, #091E420F)"
69
- },
70
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
71
- '[data-prosemirror-node-name="status"] > [data-color=neutral] .lozenge-text': {
72
- color: "var(--ds-text-subtle, #44546F)"
73
- },
74
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
75
- '[data-prosemirror-node-name="status"] > [data-color=purple] .lozenge-wrapper': {
76
- backgroundColor: "var(--ds-background-discovery, #F3F0FF)"
77
- },
78
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
79
- '[data-prosemirror-node-name="status"] > [data-color=purple] .lozenge-text': {
80
- color: "var(--ds-text-discovery, #5E4DB2)"
81
- },
82
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
83
- '[data-prosemirror-node-name="status"] > [data-color=blue] .lozenge-wrapper': {
84
- backgroundColor: "var(--ds-background-information, #E9F2FF)"
85
- },
86
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
87
- '[data-prosemirror-node-name="status"] > [data-color=blue] .lozenge-text': {
88
- color: "var(--ds-text-information, #0055CC)"
89
- },
90
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
91
- '[data-prosemirror-node-name="status"] > [data-color=yellow] .lozenge-wrapper': {
92
- backgroundColor: "var(--ds-background-warning, #FFF7D6)"
93
- },
94
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
95
- '[data-prosemirror-node-name="status"] > [data-color=yellow] .lozenge-text': {
96
- color: "var(--ds-text-warning, #A54800)"
97
- },
98
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
99
- '[data-prosemirror-node-name="status"] > [data-color=red] .lozenge-wrapper': {
100
- backgroundColor: "var(--ds-background-danger, #FFECEB)"
101
- },
102
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
103
- '[data-prosemirror-node-name="status"] > [data-color=red] .lozenge-text': {
104
- color: "var(--ds-text-danger, #AE2E24)"
105
- },
106
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
107
- '[data-prosemirror-node-name="status"] > [data-color=green] .lozenge-wrapper': {
108
- backgroundColor: "var(--ds-background-success, #DCFFF1)"
109
- },
110
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
111
- '[data-prosemirror-node-name="status"] > [data-color=green] .lozenge-text': {
112
- color: "var(--ds-text-success, #216E4E)"
113
- }
114
- });
115
- };
116
- var baseStatusStyles = (0, _react.css)({
117
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
118
- '[data-prosemirror-node-name="status"] .lozenge-wrapper': {
119
- backgroundColor: "var(--ds-background-neutral, #091E420F)",
120
- maxWidth: '100%',
121
- paddingInline: "var(--ds-space-050, 4px)",
122
- display: 'inline-flex',
123
- // eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
124
- borderRadius: "var(--ds-radius-small, 3px)",
125
- blockSize: 'min-content',
126
- position: 'static',
127
- overflow: 'hidden',
128
- boxSizing: 'border-box',
129
- appearance: 'none',
130
- border: 'none'
131
- },
132
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
133
- '[data-prosemirror-node-name="status"] .lozenge-text': {
134
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
135
- fontSize: '11px',
136
- fontStyle: 'normal',
137
- fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
138
- fontWeight: "var(--ds-font-weight-bold, 700)",
139
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
140
- lineHeight: '16px',
141
- overflow: 'hidden',
142
- textOverflow: 'ellipsis',
143
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
144
- textTransform: 'uppercase',
145
- whiteSpace: 'nowrap',
146
- maxWidth: "calc(200px - ".concat("var(--ds-space-100, 8px)", ")")
147
- }
148
- });
149
-
150
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
151
- var statusNodeStyles = exports.statusNodeStyles = function statusNodeStyles() {
152
- return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t", "\n"])), baseStatusStyles, getStatusColors());
153
- };
154
-
155
- // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
156
- var statusStyles = exports.statusStyles = function statusStyles() {
157
- return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t.", ",\n\t\t.", ",\n\t\t[data-layout-section] {\n\t\t.", " {\n\t\t\tmax-width: 100%;\n\t\t\tline-height: 0;\n\n\t\t\t> span {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t> span {\n\t\t\tcursor: pointer;\n\t\t\tline-height: 0; /* Prevent responsive layouts increasing height of container. */\n\t\t}\n\n\t\t", "\n\t}\n\n\t.danger {\n\t\t.", " > span {\n\t\t\tbackground-color: ", ";\n\t\t}\n\n\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> span {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t}\n\t}\n"])), _styles.TableSharedCssClassName.TABLE_CELL_WRAPPER, _styles.TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER, _styles.StatusSharedCssClassName.STATUS_CONTAINER, _styles.StatusSharedCssClassName.STATUS_CONTAINER, getVisualRefreshStatusStyles(), _styles.StatusSharedCssClassName.STATUS_LOZENGE, _editorSharedStyles.akEditorDeleteBackgroundWithOpacity, _styles.StatusSharedCssClassName.STATUS_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.StatusSharedCssClassName.STATUS_LOZENGE, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder);
158
- };