@atlaskit/renderer 130.2.17 → 130.3.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 +19 -0
- package/dist/cjs/react/marks/link-compiled.compiled.css +6 -0
- package/dist/cjs/react/marks/link-compiled.js +27 -0
- package/dist/cjs/react/marks/link-emotion.js +42 -0
- package/dist/cjs/react/marks/link.js +13 -23
- package/dist/cjs/react/nodes/bodiedExtension.js +6 -3
- package/dist/cjs/react/nodes/extension.js +41 -11
- package/dist/cjs/react/nodes/layoutColumn-compiled.compiled.css +10 -0
- package/dist/cjs/react/nodes/layoutColumn-compiled.js +37 -0
- package/dist/cjs/react/nodes/layoutColumn-emotion.js +59 -0
- package/dist/cjs/react/nodes/layoutColumn.js +11 -41
- package/dist/cjs/react/nodes/panel-compiled.compiled.css +54 -0
- package/dist/cjs/react/nodes/panel-compiled.js +60 -0
- package/dist/cjs/react/nodes/panel-emotion.js +185 -0
- package/dist/cjs/react/nodes/panel.js +14 -181
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/marks/link-compiled.compiled.css +6 -0
- package/dist/es2019/react/marks/link-compiled.js +17 -0
- package/dist/es2019/react/marks/link-emotion.js +31 -0
- package/dist/es2019/react/marks/link.js +13 -23
- package/dist/es2019/react/nodes/bodiedExtension.js +6 -3
- package/dist/es2019/react/nodes/extension.js +33 -4
- package/dist/es2019/react/nodes/layoutColumn-compiled.compiled.css +10 -0
- package/dist/es2019/react/nodes/layoutColumn-compiled.js +31 -0
- package/dist/es2019/react/nodes/layoutColumn-emotion.js +61 -0
- package/dist/es2019/react/nodes/layoutColumn.js +10 -50
- package/dist/es2019/react/nodes/panel-compiled.compiled.css +57 -0
- package/dist/es2019/react/nodes/panel-compiled.js +44 -0
- package/dist/es2019/react/nodes/panel-emotion.js +178 -0
- package/dist/es2019/react/nodes/panel.js +12 -180
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/marks/link-compiled.compiled.css +6 -0
- package/dist/esm/react/marks/link-compiled.js +19 -0
- package/dist/esm/react/marks/link-emotion.js +34 -0
- package/dist/esm/react/marks/link.js +15 -23
- package/dist/esm/react/nodes/bodiedExtension.js +6 -3
- package/dist/esm/react/nodes/extension.js +39 -11
- package/dist/esm/react/nodes/layoutColumn-compiled.compiled.css +10 -0
- package/dist/esm/react/nodes/layoutColumn-compiled.js +31 -0
- package/dist/esm/react/nodes/layoutColumn-emotion.js +52 -0
- package/dist/esm/react/nodes/layoutColumn.js +12 -41
- package/dist/esm/react/nodes/panel-compiled.compiled.css +54 -0
- package/dist/esm/react/nodes/panel-compiled.js +53 -0
- package/dist/esm/react/nodes/panel-emotion.js +179 -0
- package/dist/esm/react/nodes/panel.js +14 -181
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/analytics/events.d.ts +6 -2
- package/dist/types/react/marks/link-compiled.d.ts +13 -0
- package/dist/types/react/marks/link-emotion.d.ts +14 -0
- package/dist/types/react/marks/link.d.ts +5 -2
- package/dist/types/react/nodes/bodiedExtension.d.ts +2 -0
- package/dist/types/react/nodes/extension.d.ts +2 -0
- package/dist/types/react/nodes/layoutColumn-compiled.d.ts +14 -0
- package/dist/types/react/nodes/layoutColumn-emotion.d.ts +14 -0
- package/dist/types/react/nodes/layoutColumn.d.ts +3 -5
- package/dist/types/react/nodes/panel-compiled.d.ts +22 -0
- package/dist/types/react/nodes/panel-emotion.d.ts +23 -0
- package/dist/types/react/nodes/panel.d.ts +1 -6
- package/dist/types-ts4.5/analytics/events.d.ts +6 -2
- package/dist/types-ts4.5/react/marks/link-compiled.d.ts +13 -0
- package/dist/types-ts4.5/react/marks/link-emotion.d.ts +14 -0
- package/dist/types-ts4.5/react/marks/link.d.ts +5 -2
- package/dist/types-ts4.5/react/nodes/bodiedExtension.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/extension.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/layoutColumn-compiled.d.ts +14 -0
- package/dist/types-ts4.5/react/nodes/layoutColumn-emotion.d.ts +14 -0
- package/dist/types-ts4.5/react/nodes/layoutColumn.d.ts +3 -5
- package/dist/types-ts4.5/react/nodes/panel-compiled.d.ts +22 -0
- package/dist/types-ts4.5/react/nodes/panel-emotion.d.ts +23 -0
- package/dist/types-ts4.5/react/nodes/panel.d.ts +1 -6
- package/package.json +14 -9
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.PanelStyledEmotion = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _react2 = require("@emotion/react");
|
|
12
|
+
var _adfSchema = require("@atlaskit/adf-schema");
|
|
13
|
+
var _consts = require("@atlaskit/editor-shared-styles/consts");
|
|
14
|
+
var _editorPalette = require("@atlaskit/editor-palette");
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
+
var _excluded = ["backgroundColor", "hasIcon"];
|
|
17
|
+
/**
|
|
18
|
+
* @jsxRuntime classic
|
|
19
|
+
* @jsx jsx
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Emotion branch of the `platform_editor_static_css` experiment.
|
|
23
|
+
* Used via `componentWithCondition` in `panel.tsx`.
|
|
24
|
+
*
|
|
25
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
26
|
+
*/
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
|
|
28
|
+
// New custom icons are a little smaller than predefined icons.
|
|
29
|
+
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
30
|
+
var panelEmojiSpriteVerticalAlignment = -(8 * 3 - _consts.akEditorCustomIconSize) / 2;
|
|
31
|
+
var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
32
|
+
var blockNodesVerticalMargin = '0.75rem';
|
|
33
|
+
var akEditorTableCellMinWidth = 48;
|
|
34
|
+
var panelBaseStyles = (0, _react2.css)({
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
36
|
+
'&.ak-editor-panel': {
|
|
37
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
38
|
+
margin: "".concat(blockNodesVerticalMargin, " 0 0"),
|
|
39
|
+
paddingTop: "var(--ds-space-100, 8px)",
|
|
40
|
+
paddingRight: "var(--ds-space-200, 16px)",
|
|
41
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
42
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
43
|
+
minWidth: "".concat(akEditorTableCellMinWidth, "px"),
|
|
44
|
+
display: 'flex',
|
|
45
|
+
position: 'relative',
|
|
46
|
+
alignItems: 'normal',
|
|
47
|
+
wordBreak: 'break-word',
|
|
48
|
+
backgroundColor: "var(--ds-background-accent-blue-subtlest, #E9F2FE)",
|
|
49
|
+
color: 'inherit',
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
51
|
+
'.ak-editor-panel__icon': {
|
|
52
|
+
flexShrink: 0,
|
|
53
|
+
height: "var(--ds-space-300, 24px)",
|
|
54
|
+
width: "var(--ds-space-300, 24px)",
|
|
55
|
+
boxSizing: 'content-box',
|
|
56
|
+
paddingRight: "var(--ds-space-100, 8px)",
|
|
57
|
+
textAlign: 'center',
|
|
58
|
+
userSelect: 'none',
|
|
59
|
+
MozUserSelect: 'none',
|
|
60
|
+
WebkitUserSelect: 'none',
|
|
61
|
+
MsUserSelect: 'none',
|
|
62
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
63
|
+
marginTop: '0.1em',
|
|
64
|
+
color: "var(--ds-icon-information, #357DE8)",
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
66
|
+
'> span': {
|
|
67
|
+
verticalAlign: 'middle',
|
|
68
|
+
display: 'inline-flex'
|
|
69
|
+
},
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
71
|
+
'.emoji-common-emoji-sprite': {
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
73
|
+
verticalAlign: "".concat(panelEmojiSpriteVerticalAlignment, "px")
|
|
74
|
+
},
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
76
|
+
'.emoji-common-emoji-image': {
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
78
|
+
verticalAlign: "".concat(panelEmojiImageVerticalAlignment, "px"),
|
|
79
|
+
// Vertical align only works for inline-block elements in Firefox
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
81
|
+
'@-moz-document url-prefix()': {
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
83
|
+
img: {
|
|
84
|
+
display: 'inline-block'
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
90
|
+
'.ak-editor-panel__content': {
|
|
91
|
+
margin: "var(--ds-space-025, 2px)".concat(" 0 ", "var(--ds-space-025, 2px)"),
|
|
92
|
+
flex: '1 0 0',
|
|
93
|
+
minWidth: 0
|
|
94
|
+
},
|
|
95
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
96
|
+
'&[data-panel-type="note"]': {
|
|
97
|
+
backgroundColor: "var(--ds-background-accent-purple-subtlest, #F8EEFE)",
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
99
|
+
'.ak-editor-panel__icon': {
|
|
100
|
+
color: "var(--ds-icon-discovery, #AF59E1)"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
104
|
+
'&[data-panel-type="tip"]': {
|
|
105
|
+
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
107
|
+
'.ak-editor-panel__icon': {
|
|
108
|
+
color: "var(--ds-icon-success, #6A9A23)"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
112
|
+
'&[data-panel-type="warning"]': {
|
|
113
|
+
backgroundColor: "var(--ds-background-accent-yellow-subtlest, #FEF7C8)",
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
115
|
+
'.ak-editor-panel__icon': {
|
|
116
|
+
color: "var(--ds-icon-warning, #E06C00)"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
120
|
+
'&[data-panel-type="error"]': {
|
|
121
|
+
backgroundColor: "var(--ds-background-accent-red-subtlest, #FFECEB)",
|
|
122
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
123
|
+
'.ak-editor-panel__icon': {
|
|
124
|
+
color: "var(--ds-icon-danger, #C9372C)"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
128
|
+
'&[data-panel-type="success"]': {
|
|
129
|
+
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
131
|
+
'.ak-editor-panel__icon': {
|
|
132
|
+
color: "var(--ds-icon-success, #6A9A23)"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
var panelHasNoIconStyles = (0, _react2.css)({
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
139
|
+
'&.ak-editor-panel': {
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
141
|
+
'&[data-panel-type="custom"]': {
|
|
142
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
143
|
+
paddingRight: "var(--ds-space-150, 12px)"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
var panelNestedIconStyles = (0, _react2.css)({
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
149
|
+
'&.ak-editor-panel__no-icon': {
|
|
150
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
151
|
+
paddingRight: "var(--ds-space-150, 12px)"
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
var nestedPanelStyles = (0, _react2.css)({
|
|
155
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
156
|
+
'.ak-editor-panel__content .ak-editor-panel': {
|
|
157
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)")
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
var panelCustomBackground = (0, _react2.css)({
|
|
161
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
162
|
+
'&.ak-editor-panel': {
|
|
163
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
164
|
+
'&[data-panel-type="custom"]': {
|
|
165
|
+
backgroundColor: 'var(--ak-renderer-panel-custom-bg-color)'
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
var PanelStyledEmotion = exports.PanelStyledEmotion = function PanelStyledEmotion(_ref) {
|
|
170
|
+
var backgroundColor = _ref.backgroundColor,
|
|
171
|
+
hasIcon = _ref.hasIcon,
|
|
172
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
173
|
+
var customBackgroundColor = backgroundColor ? (0, _editorPalette.hexToEditorBackgroundPaletteColor)(backgroundColor) || backgroundColor : undefined;
|
|
174
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
175
|
+
style:
|
|
176
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
177
|
+
{
|
|
178
|
+
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
179
|
+
},
|
|
180
|
+
css: [panelBaseStyles, !hasIcon && panelHasNoIconStyles, props['data-panel-type'] === _adfSchema.PanelType.CUSTOM && backgroundColor && panelCustomBackground, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && panelNestedIconStyles, nestedPanelStyles]
|
|
181
|
+
// Ignored via go/ees005
|
|
182
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
183
|
+
}, props), props.children);
|
|
184
|
+
};
|
|
185
|
+
PanelStyledEmotion.displayName = 'PanelStyledEmotion';
|
|
@@ -5,187 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
|
-
var _lightbulb = _interopRequireDefault(require("@atlaskit/icon/core/lightbulb"));
|
|
13
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
|
+
var _icons = require("@atlaskit/editor-common/icons");
|
|
14
11
|
var _panel = require("@atlaskit/editor-common/panel");
|
|
15
|
-
var _editorPalette = require("@atlaskit/editor-palette");
|
|
16
12
|
var _emoji = _interopRequireDefault(require("@atlaskit/icon/core/emoji"));
|
|
13
|
+
var _lightbulb = _interopRequireDefault(require("@atlaskit/icon/core/lightbulb"));
|
|
14
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
16
|
var _emoji2 = _interopRequireDefault(require("./emoji"));
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
|
-
var _excluded = ["backgroundColor", "hasIcon"];
|
|
22
|
-
/**
|
|
23
|
-
* @jsxRuntime classic
|
|
24
|
-
* @jsx jsx
|
|
25
|
-
*/
|
|
26
|
-
/* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
|
|
27
|
-
// New custom icons are a little smaller than predefined icons.
|
|
28
|
-
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
29
|
-
var panelEmojiSpriteVerticalAlignment = -(8 * 3 - _consts.akEditorCustomIconSize) / 2;
|
|
30
|
-
var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
31
|
-
var blockNodesVerticalMargin = '0.75rem';
|
|
32
|
-
var akEditorTableCellMinWidth = 48;
|
|
33
|
-
var panelBaseStyles = (0, _react2.css)({
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
35
|
-
'&.ak-editor-panel': {
|
|
36
|
-
borderRadius: "var(--ds-radius-small, 3px)",
|
|
37
|
-
margin: "".concat(blockNodesVerticalMargin, " 0 0"),
|
|
38
|
-
paddingTop: "var(--ds-space-100, 8px)",
|
|
39
|
-
paddingRight: "var(--ds-space-200, 16px)",
|
|
40
|
-
paddingBottom: "var(--ds-space-100, 8px)",
|
|
41
|
-
paddingLeft: "var(--ds-space-100, 8px)",
|
|
42
|
-
minWidth: "".concat(akEditorTableCellMinWidth, "px"),
|
|
43
|
-
display: 'flex',
|
|
44
|
-
position: 'relative',
|
|
45
|
-
alignItems: 'normal',
|
|
46
|
-
wordBreak: 'break-word',
|
|
47
|
-
backgroundColor: "var(--ds-background-accent-blue-subtlest, #E9F2FE)",
|
|
48
|
-
color: 'inherit',
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
50
|
-
'.ak-editor-panel__icon': {
|
|
51
|
-
flexShrink: 0,
|
|
52
|
-
height: "var(--ds-space-300, 24px)",
|
|
53
|
-
width: "var(--ds-space-300, 24px)",
|
|
54
|
-
boxSizing: 'content-box',
|
|
55
|
-
paddingRight: "var(--ds-space-100, 8px)",
|
|
56
|
-
textAlign: 'center',
|
|
57
|
-
userSelect: 'none',
|
|
58
|
-
MozUserSelect: 'none',
|
|
59
|
-
WebkitUserSelect: 'none',
|
|
60
|
-
MsUserSelect: 'none',
|
|
61
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
62
|
-
marginTop: '0.1em',
|
|
63
|
-
color: "var(--ds-icon-information, #357DE8)",
|
|
64
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
65
|
-
'> span': {
|
|
66
|
-
verticalAlign: 'middle',
|
|
67
|
-
display: 'inline-flex'
|
|
68
|
-
},
|
|
69
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
70
|
-
'.emoji-common-emoji-sprite': {
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
72
|
-
verticalAlign: "".concat(panelEmojiSpriteVerticalAlignment, "px")
|
|
73
|
-
},
|
|
74
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
75
|
-
'.emoji-common-emoji-image': {
|
|
76
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
77
|
-
verticalAlign: "".concat(panelEmojiImageVerticalAlignment, "px"),
|
|
78
|
-
// Vertical align only works for inline-block elements in Firefox
|
|
79
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
80
|
-
'@-moz-document url-prefix()': {
|
|
81
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
82
|
-
img: {
|
|
83
|
-
display: 'inline-block'
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
89
|
-
'.ak-editor-panel__content': {
|
|
90
|
-
margin: "var(--ds-space-025, 2px)".concat(" 0 ", "var(--ds-space-025, 2px)"),
|
|
91
|
-
flex: '1 0 0',
|
|
92
|
-
/*
|
|
93
|
-
https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox
|
|
94
|
-
The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn’t compute to zero. The minimum size of a flex item is equal to the size of its contents.
|
|
95
|
-
*/
|
|
96
|
-
minWidth: 0
|
|
97
|
-
},
|
|
98
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
99
|
-
'&[data-panel-type="note"]': {
|
|
100
|
-
backgroundColor: "var(--ds-background-accent-purple-subtlest, #F8EEFE)",
|
|
101
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
102
|
-
'.ak-editor-panel__icon': {
|
|
103
|
-
color: "var(--ds-icon-discovery, #AF59E1)"
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
107
|
-
'&[data-panel-type="tip"]': {
|
|
108
|
-
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
109
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
110
|
-
'.ak-editor-panel__icon': {
|
|
111
|
-
color: "var(--ds-icon-success, #6A9A23)"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
115
|
-
'&[data-panel-type="warning"]': {
|
|
116
|
-
backgroundColor: "var(--ds-background-accent-yellow-subtlest, #FEF7C8)",
|
|
117
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
118
|
-
'.ak-editor-panel__icon': {
|
|
119
|
-
color: "var(--ds-icon-warning, #E06C00)"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
123
|
-
'&[data-panel-type="error"]': {
|
|
124
|
-
backgroundColor: "var(--ds-background-accent-red-subtlest, #FFECEB)",
|
|
125
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
126
|
-
'.ak-editor-panel__icon': {
|
|
127
|
-
color: "var(--ds-icon-danger, #C9372C)"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
131
|
-
'&[data-panel-type="success"]': {
|
|
132
|
-
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
133
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
134
|
-
'.ak-editor-panel__icon': {
|
|
135
|
-
color: "var(--ds-icon-success, #6A9A23)"
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
var panelHasNoIconStyles = (0, _react2.css)({
|
|
141
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
142
|
-
'&.ak-editor-panel': {
|
|
143
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
144
|
-
'&[data-panel-type="custom"]': {
|
|
145
|
-
paddingLeft: "var(--ds-space-150, 12px)",
|
|
146
|
-
paddingRight: "var(--ds-space-150, 12px)"
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
var panelNestedIconStyles = (0, _react2.css)({
|
|
151
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
152
|
-
'&.ak-editor-panel__no-icon': {
|
|
153
|
-
paddingLeft: "var(--ds-space-150, 12px)",
|
|
154
|
-
paddingRight: "var(--ds-space-150, 12px)"
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
var nestedPanelStyles = (0, _react2.css)({
|
|
158
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
159
|
-
'.ak-editor-panel__content .ak-editor-panel': {
|
|
160
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)")
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
var panelCustomBackground = (0, _react2.css)({
|
|
164
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
165
|
-
'&.ak-editor-panel': {
|
|
166
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
167
|
-
'&[data-panel-type="custom"]': {
|
|
168
|
-
backgroundColor: 'var(--ak-renderer-panel-custom-bg-color)'
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
var PanelStyled = function PanelStyled(_ref) {
|
|
173
|
-
var backgroundColor = _ref.backgroundColor,
|
|
174
|
-
hasIcon = _ref.hasIcon,
|
|
175
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
176
|
-
var customBackgroundColor = backgroundColor ? (0, _editorPalette.hexToEditorBackgroundPaletteColor)(backgroundColor) || backgroundColor : undefined;
|
|
177
|
-
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
178
|
-
style:
|
|
179
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
180
|
-
{
|
|
181
|
-
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
182
|
-
},
|
|
183
|
-
css: [panelBaseStyles, !hasIcon && panelHasNoIconStyles, props['data-panel-type'] === _adfSchema.PanelType.CUSTOM && backgroundColor && panelCustomBackground, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && panelNestedIconStyles, nestedPanelStyles]
|
|
184
|
-
// Ignored via go/ees005
|
|
185
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
186
|
-
}, props), props.children);
|
|
187
|
-
};
|
|
188
|
-
PanelStyled.displayName = 'PanelStyled';
|
|
17
|
+
var _panelCompiled = require("./panel-compiled");
|
|
18
|
+
var _panelEmotion = require("./panel-emotion");
|
|
189
19
|
var panelIcons = {
|
|
190
20
|
info: _icons.PanelInfoIcon,
|
|
191
21
|
success: _icons.PanelSuccessIcon,
|
|
@@ -195,6 +25,9 @@ var panelIcons = {
|
|
|
195
25
|
error: _icons.PanelErrorIcon,
|
|
196
26
|
custom: _emoji.default
|
|
197
27
|
};
|
|
28
|
+
var PanelStyledMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
29
|
+
return (0, _expValEquals.expValEquals)('platform_editor_renderer_static_css', 'isEnabled', true);
|
|
30
|
+
}, _panelCompiled.PanelStyledCompiled, _panelEmotion.PanelStyledEmotion);
|
|
198
31
|
var Panel = function Panel(props) {
|
|
199
32
|
var allowCustomPanels = props.allowCustomPanels,
|
|
200
33
|
type = props.panelType,
|
|
@@ -211,7 +44,7 @@ var Panel = function Panel(props) {
|
|
|
211
44
|
var getIcon = function getIcon() {
|
|
212
45
|
if (panelType === _adfSchema.PanelType.CUSTOM) {
|
|
213
46
|
if (panelIcon && providers) {
|
|
214
|
-
return
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_emoji2.default, {
|
|
215
48
|
id: panelIconId,
|
|
216
49
|
text: panelIconText,
|
|
217
50
|
shortName: panelIcon,
|
|
@@ -221,7 +54,7 @@ var Panel = function Panel(props) {
|
|
|
221
54
|
return null;
|
|
222
55
|
}
|
|
223
56
|
var Icon = panelIcons[panelType];
|
|
224
|
-
return
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(Icon, {
|
|
225
58
|
label: "".concat(panelType, " panel")
|
|
226
59
|
});
|
|
227
60
|
};
|
|
@@ -229,12 +62,12 @@ var Panel = function Panel(props) {
|
|
|
229
62
|
var renderIcon = function renderIcon() {
|
|
230
63
|
if (icon) {
|
|
231
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
232
|
-
return
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
233
66
|
className: _panel.PanelSharedCssClassName.icon
|
|
234
67
|
}, icon);
|
|
235
68
|
}
|
|
236
69
|
};
|
|
237
|
-
return
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(PanelStyledMigration
|
|
238
71
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
239
72
|
, {
|
|
240
73
|
className: _panel.PanelSharedCssClassName.prefix,
|
|
@@ -246,7 +79,7 @@ var Panel = function Panel(props) {
|
|
|
246
79
|
"data-panel-icon-text": panelIconText,
|
|
247
80
|
backgroundColor: panelColor,
|
|
248
81
|
hasIcon: Boolean(icon)
|
|
249
|
-
}, renderIcon(),
|
|
82
|
+
}, renderIcon(), /*#__PURE__*/_react.default.createElement("div", {
|
|
250
83
|
className: _panel.PanelSharedCssClassName.content
|
|
251
84
|
}, children));
|
|
252
85
|
};
|
|
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
71
71
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
72
72
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
73
73
|
var packageName = "@atlaskit/renderer";
|
|
74
|
-
var packageVersion = "
|
|
74
|
+
var packageVersion = "130.2.18";
|
|
75
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
76
76
|
containerName: 'ak-renderer-wrapper',
|
|
77
77
|
containerType: 'inline-size'
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
|
|
2
|
+
._syaz13af{color:var(--ds-link,#1868db)}._1bnx8stv:hover{text-decoration-line:underline}
|
|
3
|
+
._30l313af:hover{color:var(--ds-link,#1868db)}
|
|
4
|
+
._9oik1r31:hover{text-decoration-color:currentColor}
|
|
5
|
+
._jf4cnqa1:hover{text-decoration-style:solid}
|
|
6
|
+
._9h8h12zz:active{color:var(--ds-link-pressed,#1558bc)}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* link-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./link-compiled.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
/**
|
|
7
|
+
* Compiled branch of the `platform_editor_static_css` experiment.
|
|
8
|
+
* Used via `componentWithCondition` in `link.tsx`.
|
|
9
|
+
*
|
|
10
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
14
|
+
const anchorStyles = null;
|
|
15
|
+
export const LinkUrlCompiled = props => /*#__PURE__*/React.createElement(LinkUrl, _extends({}, props, {
|
|
16
|
+
className: ax(["_syaz13af _9oik1r31 _1bnx8stv _jf4cnqa1 _30l313af _9h8h12zz"])
|
|
17
|
+
}));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Emotion branch of the `platform_editor_static_css` experiment.
|
|
8
|
+
* Used via `componentWithCondition` in `link.tsx`.
|
|
9
|
+
*
|
|
10
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
15
|
+
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
16
|
+
const anchorStyles = css({
|
|
17
|
+
color: "var(--ds-link, #1868DB)",
|
|
18
|
+
'&:hover': {
|
|
19
|
+
color: "var(--ds-link, #1868DB)",
|
|
20
|
+
textDecoration: 'underline'
|
|
21
|
+
},
|
|
22
|
+
'&:active': {
|
|
23
|
+
color: "var(--ds-link-pressed, #1558BC)"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export const LinkUrlEmotion = props =>
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
29
|
+
jsx(LinkUrl, _extends({
|
|
30
|
+
css: anchorStyles
|
|
31
|
+
}, props));
|
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
2
|
import React, { Fragment } from 'react';
|
|
7
|
-
|
|
8
|
-
import { jsx, css } from '@emotion/react';
|
|
3
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
9
4
|
import { getEventHandler } from '../../utils';
|
|
10
5
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
11
6
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
12
|
-
import
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
8
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
'&:active': {
|
|
21
|
-
color: "var(--ds-link-pressed, #1558BC)"
|
|
22
|
-
}
|
|
23
|
-
});
|
|
9
|
+
import { LinkUrlCompiled } from './link-compiled';
|
|
10
|
+
import { LinkUrlEmotion } from './link-emotion';
|
|
11
|
+
const LinkUrlMigration = componentWithCondition(() => expValEquals('platform_editor_renderer_static_css', 'isEnabled', true), LinkUrlCompiled, LinkUrlEmotion);
|
|
12
|
+
/**
|
|
13
|
+
* Render an ADF link mark in renderer.
|
|
14
|
+
*/
|
|
24
15
|
export default function Link(props) {
|
|
25
16
|
const {
|
|
26
17
|
href,
|
|
@@ -51,7 +42,7 @@ export default function Link(props) {
|
|
|
51
42
|
}
|
|
52
43
|
const handler = getEventHandler(eventHandlers, 'link');
|
|
53
44
|
if (isMediaLink) {
|
|
54
|
-
return
|
|
45
|
+
return /*#__PURE__*/React.createElement(Fragment, null, props.children);
|
|
55
46
|
}
|
|
56
47
|
const analyticsData = {
|
|
57
48
|
attributes: {
|
|
@@ -60,12 +51,11 @@ export default function Link(props) {
|
|
|
60
51
|
// Below is added for the future implementation of Linking Platform namespaced analytic context
|
|
61
52
|
location: 'renderer'
|
|
62
53
|
};
|
|
63
|
-
return
|
|
54
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
64
55
|
data: analyticsData
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
,
|
|
56
|
+
}, /*#__PURE__*/React.createElement(LinkUrlMigration
|
|
57
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
58
|
+
, _extends({
|
|
69
59
|
onClick: e => {
|
|
70
60
|
if (fireAnalyticsEvent) {
|
|
71
61
|
fireAnalyticsEvent({
|
|
@@ -18,7 +18,8 @@ const BodiedExtension = props => {
|
|
|
18
18
|
parameters,
|
|
19
19
|
extensionViewportSizes,
|
|
20
20
|
localId,
|
|
21
|
-
shouldDisplayExtensionAsInline
|
|
21
|
+
shouldDisplayExtensionAsInline,
|
|
22
|
+
fireAnalyticsEvent
|
|
22
23
|
} = props;
|
|
23
24
|
const {
|
|
24
25
|
createAnalyticsEvent
|
|
@@ -55,7 +56,8 @@ const BodiedExtension = props => {
|
|
|
55
56
|
// Return the content directly if it's a valid JSX.Element
|
|
56
57
|
return renderExtension(result, layout, {
|
|
57
58
|
isTopLevel: path.length < 1,
|
|
58
|
-
rendererAppearance: props.rendererAppearance
|
|
59
|
+
rendererAppearance: props.rendererAppearance,
|
|
60
|
+
fireAnalyticsEvent
|
|
59
61
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
60
62
|
}
|
|
61
63
|
} catch {
|
|
@@ -66,7 +68,8 @@ const BodiedExtension = props => {
|
|
|
66
68
|
// Always return default content if anything goes wrong
|
|
67
69
|
return renderExtension(children, layout, {
|
|
68
70
|
isTopLevel: path.length < 1,
|
|
69
|
-
rendererAppearance: props.rendererAppearance
|
|
71
|
+
rendererAppearance: props.rendererAppearance,
|
|
72
|
+
fireAnalyticsEvent
|
|
70
73
|
}, removeOverflow, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, undefined, localId, shouldDisplayExtensionAsInline, node);
|
|
71
74
|
}))));
|
|
72
75
|
};
|