@atlaskit/editor-common 65.0.0 → 66.0.2
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 +70 -0
- package/build/tsconfig.json +1 -2
- package/dist/cjs/i18n/en.js +27 -0
- package/dist/cjs/i18n/en_GB.js +27 -0
- package/dist/cjs/normalize-feature-flags.js +40 -4
- package/dist/cjs/panel.js +55 -0
- package/dist/cjs/styles/index.js +0 -44
- package/dist/cjs/styles/shared/link.js +2 -2
- package/dist/cjs/styles/shared/lists.js +1 -1
- package/dist/cjs/styles/shared/panel.js +15 -6
- package/dist/cjs/styles/shared/rule.js +5 -2
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/ui/BaseTheme/index.js +1 -5
- package/dist/cjs/ui/Expand/index.js +84 -46
- package/dist/cjs/ui/{IntlNextErrorBoundary → IntlErrorBoundary}/index.js +9 -9
- package/dist/cjs/ui/MediaSingle/index.js +13 -8
- package/dist/cjs/ui/MediaSingle/styled.js +23 -20
- package/dist/cjs/ui/Popup/index.js +15 -1
- package/dist/cjs/ui/UnsupportedBlock/index.js +1 -1
- package/dist/cjs/ui/index.js +12 -22
- package/dist/cjs/utils/compare-props.js +136 -0
- package/dist/cjs/utils/index.js +23 -1
- package/dist/cjs/utils/performance/hooks/use-component-render-tracking/index.js +47 -0
- package/dist/cjs/utils/validator.js +7 -5
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/i18n/en.js +19 -0
- package/dist/es2019/i18n/en_GB.js +19 -0
- package/dist/es2019/normalize-feature-flags.js +40 -4
- package/dist/es2019/panel.js +1 -0
- package/dist/es2019/styles/index.js +0 -1
- package/dist/es2019/styles/shared/link.js +1 -1
- package/dist/es2019/styles/shared/lists.js +2 -0
- package/dist/es2019/styles/shared/panel.js +79 -76
- package/dist/es2019/styles/shared/rule.js +3 -3
- package/dist/es2019/styles/shared/table.js +9 -1
- package/dist/es2019/ui/BaseTheme/index.js +1 -4
- package/dist/es2019/ui/Expand/index.js +97 -67
- package/dist/es2019/ui/{IntlNextErrorBoundary → IntlErrorBoundary}/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/index.js +13 -9
- package/dist/es2019/ui/MediaSingle/styled.js +13 -12
- package/dist/es2019/ui/Popup/index.js +16 -1
- package/dist/es2019/ui/UnsupportedBlock/index.js +0 -1
- package/dist/es2019/ui/index.js +2 -4
- package/dist/es2019/utils/compare-props.js +99 -0
- package/dist/es2019/utils/index.js +3 -1
- package/dist/es2019/utils/performance/hooks/use-component-render-tracking/index.js +36 -0
- package/dist/es2019/utils/validator.js +3 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/i18n/en.js +19 -0
- package/dist/esm/i18n/en_GB.js +19 -0
- package/dist/esm/normalize-feature-flags.js +39 -4
- package/dist/esm/panel.js +1 -0
- package/dist/esm/styles/index.js +0 -1
- package/dist/esm/styles/shared/link.js +1 -1
- package/dist/esm/styles/shared/lists.js +1 -1
- package/dist/esm/styles/shared/panel.js +10 -5
- package/dist/esm/styles/shared/rule.js +4 -2
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/ui/BaseTheme/index.js +1 -4
- package/dist/esm/ui/Expand/index.js +79 -42
- package/dist/esm/ui/{IntlNextErrorBoundary → IntlErrorBoundary}/index.js +7 -7
- package/dist/esm/ui/MediaSingle/index.js +14 -9
- package/dist/esm/ui/MediaSingle/styled.js +17 -10
- package/dist/esm/ui/Popup/index.js +16 -1
- package/dist/esm/ui/UnsupportedBlock/index.js +1 -1
- package/dist/esm/ui/index.js +2 -4
- package/dist/esm/utils/compare-props.js +115 -0
- package/dist/esm/utils/index.js +3 -1
- package/dist/esm/utils/performance/hooks/use-component-render-tracking/index.js +37 -0
- package/dist/esm/utils/validator.js +3 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/extensions/types/field-definitions.d.ts +1 -1
- package/dist/types/i18n/en.d.ts +19 -0
- package/dist/types/i18n/en_GB.d.ts +19 -0
- package/dist/types/normalize-feature-flags.d.ts +6 -3
- package/dist/types/panel.d.ts +1 -0
- package/dist/types/provider-factory/media-provider.d.ts +2 -2
- package/dist/types/provider-factory/types.d.ts +1 -1
- package/dist/types/styles/index.d.ts +0 -1
- package/dist/types/styles/shared/link.d.ts +1 -1
- package/dist/types/styles/shared/panel.d.ts +2 -1
- package/dist/types/styles/shared/rule.d.ts +2 -1
- package/dist/types/ui/EventHandlers/index.d.ts +2 -2
- package/dist/types/ui/Expand/index.d.ts +12 -10
- package/dist/types/ui/{IntlNextErrorBoundary → IntlErrorBoundary}/index.d.ts +1 -1
- package/dist/types/ui/MediaSingle/index.d.ts +4 -2
- package/dist/types/ui/MediaSingle/styled.d.ts +10 -5
- package/dist/types/ui/Popup/index.d.ts +3 -0
- package/dist/types/ui/index.d.ts +2 -4
- package/dist/types/utils/compare-props.d.ts +32 -0
- package/dist/types/utils/index.d.ts +4 -0
- package/dist/types/utils/performance/hooks/use-component-render-tracking/index.d.ts +19 -0
- package/package.json +18 -19
- package/panel/package.json +7 -0
- package/dist/cjs/ui/IntlLegacyFallbackProvider/index.js +0 -60
- package/dist/cjs/ui/LegacyToNextIntlProvider/index.js +0 -67
- package/dist/es2019/ui/IntlLegacyFallbackProvider/index.js +0 -21
- package/dist/es2019/ui/LegacyToNextIntlProvider/index.js +0 -24
- package/dist/esm/ui/IntlLegacyFallbackProvider/index.js +0 -45
- package/dist/esm/ui/LegacyToNextIntlProvider/index.js +0 -51
- package/dist/types/ui/IntlLegacyFallbackProvider/index.d.ts +0 -8
- package/dist/types/ui/LegacyToNextIntlProvider/index.d.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 66.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c827226316a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c827226316a) - ED-14291 removed deprecated themeProvider
|
|
8
|
+
- [`b29ce16dad8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b29ce16dad8) - [ED-14606] Move bitbucket schema, confluence schema, jira schema, and default schema from @atlaskit/adf-schema to their own entry points. These new entry points are as follows
|
|
9
|
+
|
|
10
|
+
@atlaskit/adf-schema/schema-bitbucket for:
|
|
11
|
+
|
|
12
|
+
- bitbucketSchema
|
|
13
|
+
|
|
14
|
+
@atlaskit/adf-schema/schema-confluence for:
|
|
15
|
+
|
|
16
|
+
- confluenceSchema
|
|
17
|
+
- confluenceSchemaWithMediaSingle
|
|
18
|
+
|
|
19
|
+
@atlaskit/adf-schema/schema-jira for:
|
|
20
|
+
|
|
21
|
+
- default as createJIRASchema
|
|
22
|
+
- isSchemaWithLists
|
|
23
|
+
- isSchemaWithMentions
|
|
24
|
+
- isSchemaWithEmojis
|
|
25
|
+
- isSchemaWithLinks
|
|
26
|
+
- isSchemaWithAdvancedTextFormattingMarks
|
|
27
|
+
- isSchemaWithCodeBlock
|
|
28
|
+
- isSchemaWithBlockQuotes
|
|
29
|
+
- isSchemaWithMedia
|
|
30
|
+
- isSchemaWithSubSupMark
|
|
31
|
+
- isSchemaWithTextColor
|
|
32
|
+
- isSchemaWithTables
|
|
33
|
+
|
|
34
|
+
@atlaskit/adf-schema/schema-default for:
|
|
35
|
+
|
|
36
|
+
- defaultSchema
|
|
37
|
+
- getSchemaBasedOnStage
|
|
38
|
+
- defaultSchemaConfig
|
|
39
|
+
|
|
40
|
+
This change also includes codemods in @atlaskit/adf-schema to update these entry points. It also introduces a new util function "changeImportEntryPoint" to @atlaskit/codemod-utils to handle this scenario.
|
|
41
|
+
|
|
42
|
+
- [`3ef794dc11f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3ef794dc11f) - Removed emoji and media packages dependencies from renderer initial load.
|
|
43
|
+
- Updated dependencies
|
|
44
|
+
|
|
45
|
+
## 66.0.1
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- [`209fdaab573`](https://bitbucket.org/atlassian/atlassian-frontend/commits/209fdaab573) - export in product tests
|
|
50
|
+
|
|
51
|
+
## 66.0.0
|
|
52
|
+
|
|
53
|
+
### Major Changes
|
|
54
|
+
|
|
55
|
+
- [`2ec99bf6f9f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2ec99bf6f9f) - [ux] ED-14651: removed react-intl v2 fallback helpers IntlLegacyFallbackProvider and IntlNextCompat
|
|
56
|
+
- [`2ec99bf6f9f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2ec99bf6f9f) - [ux] ED-14651: removed react-intl v2.
|
|
57
|
+
|
|
58
|
+
### Minor Changes
|
|
59
|
+
|
|
60
|
+
- [`bceab5fa97d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bceab5fa97d) - ED-14632: Add render count tracking reRendered event in Renderer
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- [`ced96eebe47`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ced96eebe47) - Minor changes in MarkWrapper and Expand styles.
|
|
65
|
+
- [`44c6c36d8d9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/44c6c36d8d9) - ED-14263 replaced styled usages
|
|
66
|
+
- [`de79d0babc9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/de79d0babc9) - ED-14663 Fixed horizontal scrollbar appearing in table in chrome version 99 issue.
|
|
67
|
+
- [`fd5028f6751`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd5028f6751) - EDM-2873: Promote MediaInline to full schema
|
|
68
|
+
- [`1e2086467f1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1e2086467f1) - [ED-13775] Added resize observer on scroll parent element to realign popup components when template context panel is opened/closed.
|
|
69
|
+
- [`78aec52dea0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/78aec52dea0) - use latest SmartUserPicker in Editor packages
|
|
70
|
+
- [`5c6607ee0e7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5c6607ee0e7) - Migrated link, rule, panel and expand styles in editor-common to emotion.
|
|
71
|
+
- Updated dependencies
|
|
72
|
+
|
|
3
73
|
## 65.0.0
|
|
4
74
|
|
|
5
75
|
### Major Changes
|
package/build/tsconfig.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* NOTE:
|
|
10
|
+
*
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
|
+
*/
|
|
14
|
+
//
|
|
15
|
+
var _default = {
|
|
16
|
+
'fabric.editor.captionPlaceholder': 'Add a caption',
|
|
17
|
+
'fabric.editor.codeBidiWarningLabel': 'Bidirectional characters change the order that text is rendered. This could be used to obscure malicious code.',
|
|
18
|
+
'fabric.editor.collapseNode': 'Collapse content',
|
|
19
|
+
'fabric.editor.expandDefaultTitle': 'Click here to expand...',
|
|
20
|
+
'fabric.editor.expandNode': 'Expand content',
|
|
21
|
+
'fabric.editor.expandPlaceholder': 'Give this expand a title...',
|
|
22
|
+
'fabric.editor.openLink': 'Open link in a new tab',
|
|
23
|
+
'fabric.editor.unsupportedBlockContent': 'This editor does not support displaying this content',
|
|
24
|
+
'fabric.editor.unsupportedContentTooltip': 'Content is not available in this editor, this will be preserved when you edit and save',
|
|
25
|
+
'fabric.editor.unsupportedInlineContent': 'Unsupported content'
|
|
26
|
+
};
|
|
27
|
+
exports.default = _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* NOTE:
|
|
10
|
+
*
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
|
+
*/
|
|
14
|
+
//English (United Kingdom)
|
|
15
|
+
var _default = {
|
|
16
|
+
'fabric.editor.captionPlaceholder': 'Add a caption',
|
|
17
|
+
'fabric.editor.codeBidiWarningLabel': 'Bidirectional characters change the order that text is rendered. This could be used to obscure malicious code.',
|
|
18
|
+
'fabric.editor.collapseNode': 'Collapse content',
|
|
19
|
+
'fabric.editor.expandDefaultTitle': 'Click here to expand...',
|
|
20
|
+
'fabric.editor.expandNode': 'Expand content',
|
|
21
|
+
'fabric.editor.expandPlaceholder': 'Give this expand a title...',
|
|
22
|
+
'fabric.editor.openLink': 'Open link in a new tab',
|
|
23
|
+
'fabric.editor.unsupportedBlockContent': 'This editor does not support displaying this content',
|
|
24
|
+
'fabric.editor.unsupportedContentTooltip': 'Content is not available in this editor, this will be preserved when you edit and save',
|
|
25
|
+
'fabric.editor.unsupportedInlineContent': 'Unsupported content'
|
|
26
|
+
};
|
|
27
|
+
exports.default = _default;
|
|
@@ -9,11 +9,31 @@ exports.normalizeFeatureFlags = normalizeFeatureFlags;
|
|
|
9
9
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
|
|
12
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
+
|
|
12
14
|
var _camelCase = _interopRequireDefault(require("lodash/camelCase"));
|
|
13
15
|
|
|
14
16
|
var _kebabCase = _interopRequireDefault(require("lodash/kebabCase"));
|
|
15
17
|
|
|
16
18
|
var EMPTY = {};
|
|
19
|
+
|
|
20
|
+
function isObjectFlagKey(key, value, objectFlagKeys) {
|
|
21
|
+
return Boolean(typeof value === 'string' && (objectFlagKeys === null || objectFlagKeys === void 0 ? void 0 : objectFlagKeys.includes(key)));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function isValidJSONObject(value) {
|
|
25
|
+
try {
|
|
26
|
+
var result = JSON.parse(value);
|
|
27
|
+
|
|
28
|
+
if ((0, _typeof2.default)(result) === 'object' && result !== null) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return false;
|
|
33
|
+
} catch (err) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
17
37
|
/**
|
|
18
38
|
* Normalise and filter a free Record<string, unknown> to match
|
|
19
39
|
* the rules for feature flags in editor and renderer
|
|
@@ -24,18 +44,27 @@ var EMPTY = {};
|
|
|
24
44
|
*
|
|
25
45
|
* Output matches
|
|
26
46
|
* 1. cased in camelCase (match [a-zA-Z])
|
|
27
|
-
* 2. has boolean value
|
|
47
|
+
* 2. has boolean value or object {} value
|
|
28
48
|
*
|
|
29
49
|
* @param rawFeatureFlags
|
|
30
50
|
*/
|
|
31
51
|
|
|
32
|
-
|
|
52
|
+
|
|
53
|
+
function normalizeFeatureFlags(rawFeatureFlags, options) {
|
|
33
54
|
if (!rawFeatureFlags) {
|
|
34
55
|
return EMPTY;
|
|
35
56
|
}
|
|
36
57
|
|
|
37
58
|
return Object.entries(rawFeatureFlags).filter(function (e) {
|
|
38
|
-
|
|
59
|
+
if (typeof e[1] === 'boolean') {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (isObjectFlagKey((0, _camelCase.default)(e[0]), e[1], options === null || options === void 0 ? void 0 : options.objectFlagKeys) && isValidJSONObject(e[1])) {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return false;
|
|
39
68
|
}).filter(function (_ref) {
|
|
40
69
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
|
|
41
70
|
key = _ref2[0];
|
|
@@ -52,7 +81,14 @@ function normalizeFeatureFlags(rawFeatureFlags) {
|
|
|
52
81
|
key = _ref6[0],
|
|
53
82
|
value = _ref6[1];
|
|
54
83
|
|
|
55
|
-
|
|
84
|
+
if (isObjectFlagKey(key, value, options === null || options === void 0 ? void 0 : options.objectFlagKeys)) {
|
|
85
|
+
flags[key] = JSON.parse(value);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (typeof value === 'boolean') {
|
|
89
|
+
flags[key] = value;
|
|
90
|
+
}
|
|
91
|
+
|
|
56
92
|
return flags;
|
|
57
93
|
}, {});
|
|
58
94
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "PanelSharedCssClassName", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _panel.PanelSharedCssClassName;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "PanelSharedSelectors", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _panel.PanelSharedSelectors;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "darkPanelColors", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _panel.darkPanelColors;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "getPanelBackgroundDarkModeColors", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _panel.getPanelBackgroundDarkModeColors;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "getPanelDarkColor", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _panel.getPanelDarkColor;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "getPanelTypeBackground", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _panel.getPanelTypeBackground;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "panelSharedStyles", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _panel.panelSharedStyles;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "panelSharedStylesWithoutPrefix", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _panel.panelSharedStylesWithoutPrefix;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
var _panel = require("./styles/shared/panel");
|
package/dist/cjs/styles/index.js
CHANGED
|
@@ -21,18 +21,6 @@ Object.defineProperty(exports, "DateSharedCssClassName", {
|
|
|
21
21
|
return _date.DateSharedCssClassName;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "PanelSharedCssClassName", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _panel.PanelSharedCssClassName;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "PanelSharedSelectors", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _panel.PanelSharedSelectors;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
24
|
Object.defineProperty(exports, "SmartCardSharedCssClassName", {
|
|
37
25
|
enumerable: true,
|
|
38
26
|
get: function get() {
|
|
@@ -93,36 +81,12 @@ Object.defineProperty(exports, "columnLayoutSharedStyle", {
|
|
|
93
81
|
return _columnLayout.columnLayoutSharedStyle;
|
|
94
82
|
}
|
|
95
83
|
});
|
|
96
|
-
Object.defineProperty(exports, "darkPanelColors", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function get() {
|
|
99
|
-
return _panel.darkPanelColors;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
84
|
Object.defineProperty(exports, "dateSharedStyle", {
|
|
103
85
|
enumerable: true,
|
|
104
86
|
get: function get() {
|
|
105
87
|
return _date.dateSharedStyle;
|
|
106
88
|
}
|
|
107
89
|
});
|
|
108
|
-
Object.defineProperty(exports, "getPanelBackgroundDarkModeColors", {
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function get() {
|
|
111
|
-
return _panel.getPanelBackgroundDarkModeColors;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
Object.defineProperty(exports, "getPanelDarkColor", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function get() {
|
|
117
|
-
return _panel.getPanelDarkColor;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
Object.defineProperty(exports, "getPanelTypeBackground", {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function get() {
|
|
123
|
-
return _panel.getPanelTypeBackground;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
90
|
Object.defineProperty(exports, "headingsSharedStyles", {
|
|
127
91
|
enumerable: true,
|
|
128
92
|
get: function get() {
|
|
@@ -153,12 +117,6 @@ Object.defineProperty(exports, "mediaSingleSharedStyle", {
|
|
|
153
117
|
return _mediaSingle.mediaSingleSharedStyle;
|
|
154
118
|
}
|
|
155
119
|
});
|
|
156
|
-
Object.defineProperty(exports, "panelSharedStyles", {
|
|
157
|
-
enumerable: true,
|
|
158
|
-
get: function get() {
|
|
159
|
-
return _panel.panelSharedStyles;
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
120
|
Object.defineProperty(exports, "paragraphSharedStyles", {
|
|
163
121
|
enumerable: true,
|
|
164
122
|
get: function get() {
|
|
@@ -276,8 +234,6 @@ var _blockquote = require("./shared/blockquote");
|
|
|
276
234
|
|
|
277
235
|
var _headings = require("./shared/headings");
|
|
278
236
|
|
|
279
|
-
var _panel = require("./shared/panel");
|
|
280
|
-
|
|
281
237
|
var _rule = require("./shared/rule");
|
|
282
238
|
|
|
283
239
|
var _whitespace = require("./shared/whitespace");
|
|
@@ -9,9 +9,9 @@ exports.linkSharedStyle = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var linkSharedStyle = (0,
|
|
16
|
+
var linkSharedStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n a.blockLink {\n display: block;\n }\n"])));
|
|
17
17
|
exports.linkSharedStyle = linkSharedStyle;
|
|
@@ -17,5 +17,5 @@ var _browser = _interopRequireDefault(require("../../utils/browser"));
|
|
|
17
17
|
|
|
18
18
|
var _templateObject;
|
|
19
19
|
|
|
20
|
-
var listsSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /* =============== INDENTATION SPACING ========= */\n\n ul,\n ol {\n box-sizing: border-box;\n padding-left: 24px;\n\n /*\n Firefox does not handle empty block element inside li tag.\n If there is not block element inside li tag,\n then firefox sets inherited height to li\n However, if there is any block element and if it's empty\n (or has empty inline element) then\n firefox sets li tag height to zero.\n More details at\n https://product-fabric.atlassian.net/wiki/spaces/~455502413/pages/3149365890/ED-14110+Investigation\n */\n li p:empty,\n li p > span:empty {\n ", "\n }\n }\n\n ", ", ", " {\n /*\n Ensures list item content adheres to the list's margin instead\n of filling the entire block row. This is important to allow\n clicking interactive elements which are floated next to a list.\n\n For some history and context on this block, see PRs related to tickets.:\n @see ED-6551 - original issue.\n @see ED-7015 - follow up issue.\n @see ED-7447 - flow-root change.\n\n We use 'display: table' (old clear fix / new block formatting context hack)\n for older browsers and 'flow-root' for modern browsers.\n\n @see https://css-tricks.com/display-flow-root/\n */\n // For older browsers the do not support flow-root.\n display: table;\n display: flow-root;\n }\n\n /* =============== INDENTATION AESTHETICS ========= */\n\n /**\n We support nested lists up to six levels deep.\n **/\n\n /* LEGACY LISTS */\n\n ul,\n ul ul ul ul {\n list-style-type: disc;\n }\n\n ul ul,\n ul ul ul ul ul {\n list-style-type: circle;\n }\n\n ul ul ul,\n ul ul ul ul ul ul {\n list-style-type: square;\n }\n\n ol,\n ol ol ol ol {\n list-style-type: decimal;\n }\n ol ol,\n ol ol ol ol ol {\n list-style-type: lower-alpha;\n }\n ol ol ol,\n ol ol ol ol ol ol {\n list-style-type: lower-roman;\n }\n\n /* PREDICTABLE LISTS */\n\n ol[data-indent-level='1'],\n ol[data-indent-level='4'] {\n list-style-type: decimal;\n }\n\n ol[data-indent-level='2'],\n ol[data-indent-level='5'] {\n list-style-type: lower-alpha;\n }\n\n ol[data-indent-level='3'],\n ol[data-indent-level='6'] {\n list-style-type: lower-roman;\n }\n\n ul[data-indent-level='1'],\n ul[data-indent-level='4'] {\n list-style-type: disc;\n }\n\n ul[data-indent-level='2'],\n ul[data-indent-level='5'] {\n list-style-type: circle;\n }\n\n ul[data-indent-level='3'],\n ul[data-indent-level='6'] {\n list-style-type: square;\n }\n"])), _browser.default.gecko ? 'display: inline-block;' : '', _adfSchema.orderedListSelector, _adfSchema.bulletListSelector);
|
|
20
|
+
var listsSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /* =============== INDENTATION SPACING ========= */\n\n ul,\n ol {\n box-sizing: border-box;\n padding-left: 24px;\n\n /*\n Firefox does not handle empty block element inside li tag.\n If there is not block element inside li tag,\n then firefox sets inherited height to li\n However, if there is any block element and if it's empty\n (or has empty inline element) then\n firefox sets li tag height to zero.\n More details at\n https://product-fabric.atlassian.net/wiki/spaces/~455502413/pages/3149365890/ED-14110+Investigation\n */\n li p:empty,\n li p > span:empty {\n ", "\n }\n }\n\n ", ", ", " {\n /*\n Ensures list item content adheres to the list's margin instead\n of filling the entire block row. This is important to allow\n clicking interactive elements which are floated next to a list.\n\n For some history and context on this block, see PRs related to tickets.:\n @see ED-6551 - original issue.\n @see ED-7015 - follow up issue.\n @see ED-7447 - flow-root change.\n\n We use 'display: table' (old clear fix / new block formatting context hack)\n for older browsers and 'flow-root' for modern browsers.\n\n @see https://css-tricks.com/display-flow-root/\n */\n // For older browsers the do not support flow-root.\n /* stylelint-disable declaration-block-no-duplicate-properties */\n display: table;\n display: flow-root;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n }\n\n /* =============== INDENTATION AESTHETICS ========= */\n\n /**\n We support nested lists up to six levels deep.\n **/\n\n /* LEGACY LISTS */\n\n ul,\n ul ul ul ul {\n list-style-type: disc;\n }\n\n ul ul,\n ul ul ul ul ul {\n list-style-type: circle;\n }\n\n ul ul ul,\n ul ul ul ul ul ul {\n list-style-type: square;\n }\n\n ol,\n ol ol ol ol {\n list-style-type: decimal;\n }\n ol ol,\n ol ol ol ol ol {\n list-style-type: lower-alpha;\n }\n ol ol ol,\n ol ol ol ol ol ol {\n list-style-type: lower-roman;\n }\n\n /* PREDICTABLE LISTS */\n\n ol[data-indent-level='1'],\n ol[data-indent-level='4'] {\n list-style-type: decimal;\n }\n\n ol[data-indent-level='2'],\n ol[data-indent-level='5'] {\n list-style-type: lower-alpha;\n }\n\n ol[data-indent-level='3'],\n ol[data-indent-level='6'] {\n list-style-type: lower-roman;\n }\n\n ul[data-indent-level='1'],\n ul[data-indent-level='4'] {\n list-style-type: disc;\n }\n\n ul[data-indent-level='2'],\n ul[data-indent-level='5'] {\n list-style-type: circle;\n }\n\n ul[data-indent-level='3'],\n ul[data-indent-level='6'] {\n list-style-type: square;\n }\n"])), _browser.default.gecko ? 'display: inline-block;' : '', _adfSchema.orderedListSelector, _adfSchema.bulletListSelector);
|
|
21
21
|
exports.listsSharedStyles = listsSharedStyles;
|
|
@@ -9,13 +9,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.getPanelDarkColor = exports.getPanelBackgroundDarkModeColors = exports.darkPanelColors = exports.PanelSharedSelectors = exports.PanelSharedCssClassName = void 0;
|
|
11
11
|
exports.getPanelDarkModeCSS = getPanelDarkModeCSS;
|
|
12
|
-
exports.panelSharedStyles = exports.getPanelTypeBackground = void 0;
|
|
12
|
+
exports.panelSharedStylesWithoutPrefix = exports.panelSharedStyles = exports.getPanelTypeBackground = void 0;
|
|
13
13
|
|
|
14
14
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
15
|
|
|
16
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _react = require("@emotion/react");
|
|
19
19
|
|
|
20
20
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
21
21
|
|
|
@@ -31,7 +31,7 @@ var _components = require("@atlaskit/theme/components");
|
|
|
31
31
|
|
|
32
32
|
var _constants = require("@atlaskit/theme/constants");
|
|
33
33
|
|
|
34
|
-
var _templateObject;
|
|
34
|
+
var _templateObject, _templateObject2;
|
|
35
35
|
|
|
36
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
37
|
|
|
@@ -218,7 +218,16 @@ var mainDynamicStyles = function mainDynamicStyles(panelType) {
|
|
|
218
218
|
};
|
|
219
219
|
};
|
|
220
220
|
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
var panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix(props) {
|
|
222
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", "px;\n margin: ", " 0 0;\n padding: ", "px;\n min-width: ", "px;\n display: flex;\n position: relative;\n align-items: baseline;\n word-break: break-word;\n\n ", "\n\n .", " {\n flex-shrink: 0;\n height: ", "px;\n width: ", "px;\n box-sizing: content-box;\n padding-right: ", "px;\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n ", "\n\n > span {\n vertical-align: middle;\n display: inline-flex;\n }\n\n .", " {\n vertical-align: ", "px;\n }\n\n .", " {\n vertical-align: ", "px;\n\n // Vertical align only works for inline-block elements in Firefox\n @-moz-document url-prefix() {\n img {\n display: inline-block;\n }\n }\n }\n }\n\n .ak-editor-panel__content {\n margin: 1px 0 1px;\n flex: 1 0 0;\n /*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n 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\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n min-width: 0;\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", ";\n }\n"])), (0, _constants.borderRadius)(), _editorSharedStyles.blockNodesVerticalMargin, (0, _constants.gridSize)(), _editorSharedStyles.akEditorTableCellMinWidth, mainDynamicStyles(_adfSchema.PanelType.INFO)(props), PanelSharedCssClassName.icon, (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 3, (0, _constants.gridSize)(), iconDynamicStyles(_adfSchema.PanelType.INFO)(props), _emoji.emojiSprite, panelEmojiSpriteVerticalAlignment, _emoji.emojiImage, panelEmojiImageVerticalAlignment, _adfSchema.PanelType.NOTE, mainDynamicStyles(_adfSchema.PanelType.NOTE)(props), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.NOTE)(props), _adfSchema.PanelType.TIP, mainDynamicStyles(_adfSchema.PanelType.TIP)(props), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.TIP)(props), _adfSchema.PanelType.WARNING, mainDynamicStyles(_adfSchema.PanelType.WARNING)(props), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.WARNING)(props), _adfSchema.PanelType.ERROR, mainDynamicStyles(_adfSchema.PanelType.ERROR)(props), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.ERROR)(props), _adfSchema.PanelType.SUCCESS, mainDynamicStyles(_adfSchema.PanelType.SUCCESS)(props), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.SUCCESS)(props), _adfSchema.PanelType.CUSTOM, (0, _components.themed)({
|
|
223
|
+
dark: getPanelBackgroundDarkModeColors
|
|
224
|
+
})(props));
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
exports.panelSharedStylesWithoutPrefix = panelSharedStylesWithoutPrefix;
|
|
228
|
+
|
|
229
|
+
var panelSharedStyles = function panelSharedStyles(props) {
|
|
230
|
+
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n ", "\n }\n"])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(props));
|
|
231
|
+
};
|
|
232
|
+
|
|
224
233
|
exports.panelSharedStyles = panelSharedStyles;
|
|
@@ -9,7 +9,7 @@ exports.ruleSharedStyles = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
13
|
|
|
14
14
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
15
|
|
|
@@ -24,5 +24,8 @@ var divider = (0, _components.themed)({
|
|
|
24
24
|
dark: _colors.DN50
|
|
25
25
|
}); // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
26
26
|
|
|
27
|
-
var ruleSharedStyles =
|
|
27
|
+
var ruleSharedStyles = function ruleSharedStyles(props) {
|
|
28
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & hr {\n border: none;\n background-color: ", ";\n margin: ", "em 0;\n height: 2px;\n border-radius: 1px;\n }\n"])), divider(props), _editorSharedStyles.akEditorLineHeight);
|
|
29
|
+
};
|
|
30
|
+
|
|
28
31
|
exports.ruleSharedStyles = ruleSharedStyles;
|
|
@@ -57,7 +57,7 @@ var TableSharedCssClassName = {
|
|
|
57
57
|
exports.TableSharedCssClassName = TableSharedCssClassName;
|
|
58
58
|
|
|
59
59
|
var tableSharedStyle = function tableSharedStyle(props) {
|
|
60
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-child > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n
|
|
60
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-child > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: white;\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]) {\n .code-block {\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n background-color: ", ";\n\n .line-number-gutter {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableMarginTop, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, (0, _components.themed)({
|
|
61
61
|
light: _editorSharedStyles.akEditorTableBorder,
|
|
62
62
|
dark: _editorSharedStyles.akEditorTableBorderDark
|
|
63
63
|
})(props), tableCellMinWidth, (0, _components.themed)({
|
|
@@ -17,8 +17,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
19
|
|
|
20
|
-
var _styledComponents = require("styled-components");
|
|
21
|
-
|
|
22
20
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
23
21
|
|
|
24
22
|
var _components = require("@atlaskit/theme/components");
|
|
@@ -76,9 +74,7 @@ function BaseThemeWrapper(_ref) {
|
|
|
76
74
|
}, [breakpoint, dynamicTextSizing, baseFontSize, mode]);
|
|
77
75
|
return /*#__PURE__*/_react.default.createElement(_react2.ThemeProvider, {
|
|
78
76
|
theme: memoizedTheme
|
|
79
|
-
},
|
|
80
|
-
theme: memoizedTheme
|
|
81
|
-
}, children));
|
|
77
|
+
}, children);
|
|
82
78
|
}
|
|
83
79
|
|
|
84
80
|
function BaseTheme(_ref3) {
|