@atlaskit/editor-common 59.1.0 → 60.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 +69 -0
- package/dist/cjs/i18n/cs.js +1 -0
- package/dist/cjs/i18n/da.js +1 -0
- package/dist/cjs/i18n/de.js +1 -0
- package/dist/cjs/i18n/es.js +1 -0
- package/dist/cjs/i18n/fi.js +1 -0
- package/dist/cjs/i18n/fr.js +1 -0
- package/dist/cjs/i18n/hu.js +1 -0
- package/dist/cjs/i18n/it.js +1 -0
- package/dist/cjs/i18n/ja.js +1 -0
- package/dist/cjs/i18n/ko.js +1 -0
- package/dist/cjs/i18n/nb.js +1 -0
- package/dist/cjs/i18n/nl.js +1 -0
- package/dist/cjs/i18n/pl.js +1 -0
- package/dist/cjs/i18n/pt_BR.js +1 -0
- package/dist/cjs/i18n/ru.js +1 -0
- package/dist/cjs/i18n/sv.js +1 -0
- package/dist/cjs/i18n/th.js +1 -0
- package/dist/cjs/i18n/tr.js +1 -0
- package/dist/cjs/i18n/uk.js +1 -0
- package/dist/cjs/i18n/vi.js +1 -0
- package/dist/cjs/i18n/zh.js +1 -1
- package/dist/cjs/i18n/zh_TW.js +1 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/messages/codeBidiWarning.js +21 -0
- package/dist/cjs/messages/index.js +8 -0
- package/dist/cjs/styles/shared/panel.js +12 -2
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/type-ahead/index.js +25 -0
- package/dist/cjs/types/{typeAhead.js → type-ahead.js} +0 -0
- package/dist/cjs/ufo/experience-store.js +159 -0
- package/dist/cjs/ufo/index.js +25 -0
- package/dist/cjs/ui/Messages/index.js +1 -3
- package/dist/cjs/utils/browser.js +7 -1
- package/dist/cjs/utils/index.js +9 -1
- package/dist/cjs/utils/profiler/render-count.js +135 -0
- package/dist/cjs/utils/validator.js +34 -11
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/i18n/cs.js +1 -0
- package/dist/es2019/i18n/da.js +1 -0
- package/dist/es2019/i18n/de.js +1 -0
- package/dist/es2019/i18n/es.js +1 -0
- package/dist/es2019/i18n/fi.js +1 -0
- package/dist/es2019/i18n/fr.js +1 -0
- package/dist/es2019/i18n/hu.js +1 -0
- package/dist/es2019/i18n/it.js +1 -0
- package/dist/es2019/i18n/ja.js +1 -0
- package/dist/es2019/i18n/ko.js +1 -0
- package/dist/es2019/i18n/nb.js +1 -0
- package/dist/es2019/i18n/nl.js +1 -0
- package/dist/es2019/i18n/pl.js +1 -0
- package/dist/es2019/i18n/pt_BR.js +1 -0
- package/dist/es2019/i18n/ru.js +1 -0
- package/dist/es2019/i18n/sv.js +1 -0
- package/dist/es2019/i18n/th.js +1 -0
- package/dist/es2019/i18n/tr.js +1 -0
- package/dist/es2019/i18n/uk.js +1 -0
- package/dist/es2019/i18n/vi.js +1 -0
- package/dist/es2019/i18n/zh.js +1 -1
- package/dist/es2019/i18n/zh_TW.js +1 -0
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/messages/codeBidiWarning.js +12 -0
- package/dist/es2019/messages/index.js +1 -0
- package/dist/es2019/styles/shared/panel.js +19 -2
- package/dist/es2019/styles/shared/table.js +1 -1
- package/dist/es2019/type-ahead/index.js +17 -0
- package/dist/es2019/types/{typeAhead.js → type-ahead.js} +0 -0
- package/dist/es2019/ufo/experience-store.js +115 -0
- package/dist/es2019/ufo/index.js +1 -0
- package/dist/es2019/ui/Messages/index.js +1 -2
- package/dist/es2019/utils/browser.js +7 -1
- package/dist/es2019/utils/index.js +2 -1
- package/dist/es2019/utils/profiler/render-count.js +107 -0
- package/dist/es2019/utils/validator.js +25 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/i18n/cs.js +1 -0
- package/dist/esm/i18n/da.js +1 -0
- package/dist/esm/i18n/de.js +1 -0
- package/dist/esm/i18n/es.js +1 -0
- package/dist/esm/i18n/fi.js +1 -0
- package/dist/esm/i18n/fr.js +1 -0
- package/dist/esm/i18n/hu.js +1 -0
- package/dist/esm/i18n/it.js +1 -0
- package/dist/esm/i18n/ja.js +1 -0
- package/dist/esm/i18n/ko.js +1 -0
- package/dist/esm/i18n/nb.js +1 -0
- package/dist/esm/i18n/nl.js +1 -0
- package/dist/esm/i18n/pl.js +1 -0
- package/dist/esm/i18n/pt_BR.js +1 -0
- package/dist/esm/i18n/ru.js +1 -0
- package/dist/esm/i18n/sv.js +1 -0
- package/dist/esm/i18n/th.js +1 -0
- package/dist/esm/i18n/tr.js +1 -0
- package/dist/esm/i18n/uk.js +1 -0
- package/dist/esm/i18n/vi.js +1 -0
- package/dist/esm/i18n/zh.js +1 -1
- package/dist/esm/i18n/zh_TW.js +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/messages/codeBidiWarning.js +12 -0
- package/dist/esm/messages/index.js +1 -0
- package/dist/esm/styles/shared/panel.js +10 -2
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/type-ahead/index.js +17 -0
- package/dist/esm/types/{typeAhead.js → type-ahead.js} +0 -0
- package/dist/esm/ufo/experience-store.js +143 -0
- package/dist/esm/ufo/index.js +1 -0
- package/dist/esm/ui/Messages/index.js +1 -2
- package/dist/esm/utils/browser.js +7 -1
- package/dist/esm/utils/index.js +2 -1
- package/dist/esm/utils/profiler/render-count.js +123 -0
- package/dist/esm/utils/validator.js +34 -11
- package/dist/esm/version.json +1 -1
- package/dist/types/collab/types.d.ts +6 -0
- package/dist/types/extensions/extension-handlers.d.ts +3 -3
- package/dist/types/extensions/index.d.ts +1 -1
- package/dist/types/extensions/types/extension-handler.d.ts +2 -0
- package/dist/types/extensions/types/index.d.ts +1 -1
- package/dist/types/extensions.d.ts +1 -1
- package/dist/types/i18n/cs.d.ts +1 -0
- package/dist/types/i18n/da.d.ts +1 -0
- package/dist/types/i18n/de.d.ts +1 -0
- package/dist/types/i18n/es.d.ts +1 -0
- package/dist/types/i18n/fi.d.ts +1 -0
- package/dist/types/i18n/fr.d.ts +1 -0
- package/dist/types/i18n/hu.d.ts +1 -0
- package/dist/types/i18n/it.d.ts +1 -0
- package/dist/types/i18n/ja.d.ts +1 -0
- package/dist/types/i18n/ko.d.ts +1 -0
- package/dist/types/i18n/nb.d.ts +1 -0
- package/dist/types/i18n/nl.d.ts +1 -0
- package/dist/types/i18n/pl.d.ts +1 -0
- package/dist/types/i18n/pt_BR.d.ts +1 -0
- package/dist/types/i18n/ru.d.ts +1 -0
- package/dist/types/i18n/sv.d.ts +1 -0
- package/dist/types/i18n/th.d.ts +1 -0
- package/dist/types/i18n/tr.d.ts +1 -0
- package/dist/types/i18n/uk.d.ts +1 -0
- package/dist/types/i18n/vi.d.ts +1 -0
- package/dist/types/i18n/zh.d.ts +1 -0
- package/dist/types/i18n/zh_TW.d.ts +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/messages/codeBidiWarning.d.ts +11 -0
- package/dist/types/messages/index.d.ts +1 -0
- package/dist/types/provider-factory/quick-insert-provider.d.ts +2 -2
- package/dist/types/provider-factory.d.ts +1 -1
- package/dist/types/styles/shared/panel.d.ts +5 -0
- package/dist/types/type-ahead/index.d.ts +12 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/{typeAhead.d.ts → type-ahead.d.ts} +0 -0
- package/dist/types/ufo/experience-store.d.ts +32 -0
- package/dist/types/ufo/index.d.ts +1 -0
- package/dist/types/utils/browser.d.ts +3 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/profiler/render-count.d.ts +50 -0
- package/package.json +20 -17
- package/type-ahead/package.json +7 -0
- package/ufo/package.json +7 -0
- package/dist/cjs/ui/Caption/index.test.js +0 -82
- package/dist/cjs/utils/performance/measure-tti.test.js +0 -183
- package/dist/es2019/ui/Caption/index.test.js +0 -73
- package/dist/es2019/utils/performance/measure-tti.test.js +0 -124
- package/dist/esm/ui/Caption/index.test.js +0 -73
- package/dist/esm/utils/performance/measure-tti.test.js +0 -174
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { ExperiencePerformanceTypes, ExperienceTypes, UFOExperience } from '@atlaskit/ufo';
|
|
3
|
+
export const experienceConfig = {
|
|
4
|
+
type: ExperienceTypes.Operation,
|
|
5
|
+
performanceType: ExperiencePerformanceTypes.Custom,
|
|
6
|
+
platform: {
|
|
7
|
+
component: 'editor'
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export let EditorExperience;
|
|
11
|
+
|
|
12
|
+
(function (EditorExperience) {
|
|
13
|
+
EditorExperience["loadEditor"] = "load";
|
|
14
|
+
EditorExperience["typing"] = "type";
|
|
15
|
+
EditorExperience["interaction"] = "interact";
|
|
16
|
+
})(EditorExperience || (EditorExperience = {}));
|
|
17
|
+
|
|
18
|
+
export const RELIABILITY_INTERVAL = 30000;
|
|
19
|
+
export class ExperienceStore {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.experiences = new Map();
|
|
22
|
+
|
|
23
|
+
for (const experienceId of Object.values(EditorExperience)) {
|
|
24
|
+
const experience = new UFOExperience(experienceId, experienceConfig);
|
|
25
|
+
this.experiences.set(experienceId, experience);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static getInstance(view, options = {}) {
|
|
30
|
+
if (!this.stores.get(view) || options !== null && options !== void 0 && options.forceNewInstance) {
|
|
31
|
+
const store = new ExperienceStore();
|
|
32
|
+
this.stores.set(view, store);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return this.stores.get(view);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
get(experienceId) {
|
|
39
|
+
return this.experiences.get(experienceId);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
getActive(experienceId) {
|
|
43
|
+
const experience = this.experiences.get(experienceId);
|
|
44
|
+
|
|
45
|
+
if (!(experience !== null && experience !== void 0 && experience.state.final)) {
|
|
46
|
+
return experience;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
getAll() {
|
|
51
|
+
return Array.from(this.experiences.values());
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
start(experienceId, startTime) {
|
|
55
|
+
var _this$get;
|
|
56
|
+
|
|
57
|
+
(_this$get = this.get(experienceId)) === null || _this$get === void 0 ? void 0 : _this$get.start(startTime);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
addMetadata(experienceId, metadata) {
|
|
61
|
+
var _this$get2;
|
|
62
|
+
|
|
63
|
+
(_this$get2 = this.get(experienceId)) === null || _this$get2 === void 0 ? void 0 : _this$get2.addMetadata(metadata);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
mark(experienceId, mark, value) {
|
|
67
|
+
var _this$get3;
|
|
68
|
+
|
|
69
|
+
(_this$get3 = this.get(experienceId)) === null || _this$get3 === void 0 ? void 0 : _this$get3.mark(mark, value);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
success(experienceId, metadata) {
|
|
73
|
+
var _this$getActive;
|
|
74
|
+
|
|
75
|
+
(_this$getActive = this.getActive(experienceId)) === null || _this$getActive === void 0 ? void 0 : _this$getActive.success({
|
|
76
|
+
metadata
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
fail(experienceId, metadata) {
|
|
81
|
+
var _this$getActive2;
|
|
82
|
+
|
|
83
|
+
(_this$getActive2 = this.getActive(experienceId)) === null || _this$getActive2 === void 0 ? void 0 : _this$getActive2.failure({
|
|
84
|
+
metadata
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
abort(experienceId, metadata) {
|
|
89
|
+
// We add this wait in here because when React catches an error it unmounts the component
|
|
90
|
+
// before the error boundary's componentDidCatch is called
|
|
91
|
+
// In this case we want to fail the experience, but without this wait, abort is called first
|
|
92
|
+
setTimeout(() => {
|
|
93
|
+
var _this$getActive3;
|
|
94
|
+
|
|
95
|
+
(_this$getActive3 = this.getActive(experienceId)) === null || _this$getActive3 === void 0 ? void 0 : _this$getActive3.abort({
|
|
96
|
+
metadata
|
|
97
|
+
});
|
|
98
|
+
}, 0);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
abortAll(metadata) {
|
|
102
|
+
this.experiences.forEach(experience => {
|
|
103
|
+
this.abort(experience.id, metadata);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
failAll(metadata) {
|
|
108
|
+
this.experiences.forEach(experience => {
|
|
109
|
+
this.fail(experience.id, metadata);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
_defineProperty(ExperienceStore, "stores", new WeakMap());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from './experience-store';
|
|
@@ -4,7 +4,6 @@ import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
|
|
|
4
4
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
5
5
|
import { G400, N200, R400 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
7
|
-
import { multiply } from '@atlaskit/theme/math';
|
|
8
7
|
import { h200 } from '@atlaskit/theme/typography';
|
|
9
8
|
const Message = styled.div`
|
|
10
9
|
${h200} font-weight: normal;
|
|
@@ -19,7 +18,7 @@ const Message = styled.div`
|
|
|
19
18
|
|
|
20
19
|
return N200;
|
|
21
20
|
}};
|
|
22
|
-
margin-top: ${
|
|
21
|
+
margin-top: ${gridSize() / 2}px;
|
|
23
22
|
display: flex;
|
|
24
23
|
justify-content: baseline;
|
|
25
24
|
`;
|
|
@@ -7,7 +7,10 @@ const result = {
|
|
|
7
7
|
chrome_version: 0,
|
|
8
8
|
android: false,
|
|
9
9
|
ios: false,
|
|
10
|
-
webkit: false
|
|
10
|
+
webkit: false,
|
|
11
|
+
safari: false,
|
|
12
|
+
supportsIntersectionObserver: false,
|
|
13
|
+
supportsResizeObserver: false
|
|
11
14
|
};
|
|
12
15
|
|
|
13
16
|
if (typeof navigator !== 'undefined') {
|
|
@@ -23,6 +26,9 @@ if (typeof navigator !== 'undefined') {
|
|
|
23
26
|
result.android = /Android \d/.test(navigator.userAgent);
|
|
24
27
|
result.ios = !ie && /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
|
|
25
28
|
result.webkit = !ie && !!document.documentElement && 'WebkitAppearance' in document.documentElement.style;
|
|
29
|
+
result.safari = Boolean(navigator.vendor && navigator.vendor.indexOf('Apple') > -1 && navigator.userAgent && navigator.userAgent.indexOf('CriOS') === -1 && navigator.userAgent.indexOf('FxiOS') === -1);
|
|
30
|
+
result.supportsIntersectionObserver = typeof window !== 'undefined' && 'IntersectionObserver' in window && 'IntersectionObserverEntry' in window && 'intersectionRatio' in window.IntersectionObserverEntry.prototype;
|
|
31
|
+
result.supportsResizeObserver = typeof window !== 'undefined' && 'ResizeObserver' in window && 'ResizeObserverEntry' in window;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
export default result;
|
|
@@ -21,4 +21,5 @@ export { compose } from './compose';
|
|
|
21
21
|
export { ZERO_WIDTH_SPACE } from './whitespace';
|
|
22
22
|
export { shouldForceTracking } from './should-force-tracking';
|
|
23
23
|
export { getModeFromTheme } from './getModeFromTheme';
|
|
24
|
-
export { sniffUserBrowserExtensions } from './browser-extensions';
|
|
24
|
+
export { sniffUserBrowserExtensions } from './browser-extensions';
|
|
25
|
+
export { RenderCountProfiler } from './profiler/render-count';
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export const PROFILER_KEY = '__editorRenderCountProfiler';
|
|
2
|
+
export class RenderCountProfiler {
|
|
3
|
+
/**
|
|
4
|
+
* The singleton/cached instance of RenderCountProfiler that will be shared
|
|
5
|
+
* betweenRenderCountProfiler.getInstance() calls
|
|
6
|
+
*/
|
|
7
|
+
constructor({
|
|
8
|
+
store
|
|
9
|
+
}) {
|
|
10
|
+
this.store = store;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Returns the singleton/cached instance of RenderCountProfiler that
|
|
14
|
+
* currently exists. If it hasn't been instantiated yet, the singleton
|
|
15
|
+
* instance will be created using the given params. Returns the latest
|
|
16
|
+
* singleton/instance.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
static getInstance(params) {
|
|
21
|
+
if (!RenderCountProfiler.instance) {
|
|
22
|
+
RenderCountProfiler.instance = new RenderCountProfiler({
|
|
23
|
+
store: params.store
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return RenderCountProfiler.instance;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
getData(profilerKey) {
|
|
31
|
+
var _this$store;
|
|
32
|
+
|
|
33
|
+
return (_this$store = this.store) === null || _this$store === void 0 ? void 0 : _this$store[profilerKey];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
enable() {
|
|
37
|
+
this.store[PROFILER_KEY] = { ...this.store[PROFILER_KEY],
|
|
38
|
+
enabled: true
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
remove() {
|
|
43
|
+
delete this.store[PROFILER_KEY];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
isEnabled() {
|
|
47
|
+
var _this$store2, _this$store2$PROFILER;
|
|
48
|
+
|
|
49
|
+
return Boolean((_this$store2 = this.store) === null || _this$store2 === void 0 ? void 0 : (_this$store2$PROFILER = _this$store2[PROFILER_KEY]) === null || _this$store2$PROFILER === void 0 ? void 0 : _this$store2$PROFILER.enabled);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
setRenderCount({
|
|
53
|
+
componentId,
|
|
54
|
+
renderCount,
|
|
55
|
+
instanceId
|
|
56
|
+
}) {
|
|
57
|
+
const profilerData = this.store[PROFILER_KEY];
|
|
58
|
+
const instance = {
|
|
59
|
+
count: renderCount
|
|
60
|
+
};
|
|
61
|
+
const existingComponents = profilerData === null || profilerData === void 0 ? void 0 : profilerData.components;
|
|
62
|
+
const existingInstances = existingComponents === null || existingComponents === void 0 ? void 0 : existingComponents[componentId];
|
|
63
|
+
const updatedComponent = { ...existingInstances,
|
|
64
|
+
[instanceId]: instance
|
|
65
|
+
};
|
|
66
|
+
this.store[PROFILER_KEY] = { ...profilerData,
|
|
67
|
+
components: { ...existingComponents,
|
|
68
|
+
[componentId]: updatedComponent
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
getInstanceRenderCounters({
|
|
74
|
+
componentId
|
|
75
|
+
}) {
|
|
76
|
+
var _this$store$PROFILER_, _this$store3, _this$store3$PROFILER, _this$store3$PROFILER2;
|
|
77
|
+
|
|
78
|
+
const component = (_this$store$PROFILER_ = (_this$store3 = this.store) === null || _this$store3 === void 0 ? void 0 : (_this$store3$PROFILER = _this$store3[PROFILER_KEY]) === null || _this$store3$PROFILER === void 0 ? void 0 : (_this$store3$PROFILER2 = _this$store3$PROFILER.components) === null || _this$store3$PROFILER2 === void 0 ? void 0 : _this$store3$PROFILER2[componentId]) !== null && _this$store$PROFILER_ !== void 0 ? _this$store$PROFILER_ : {};
|
|
79
|
+
const counters = [];
|
|
80
|
+
|
|
81
|
+
for (let instanceId in component) {
|
|
82
|
+
const counter = {
|
|
83
|
+
instanceId,
|
|
84
|
+
count: component[instanceId].count
|
|
85
|
+
};
|
|
86
|
+
counters.push(counter);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return counters;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
getRenderCount({
|
|
93
|
+
componentId
|
|
94
|
+
}) {
|
|
95
|
+
var _this$store$PROFILER_2, _this$store4, _this$store4$PROFILER, _this$store4$PROFILER2;
|
|
96
|
+
|
|
97
|
+
const component = (_this$store$PROFILER_2 = (_this$store4 = this.store) === null || _this$store4 === void 0 ? void 0 : (_this$store4$PROFILER = _this$store4[PROFILER_KEY]) === null || _this$store4$PROFILER === void 0 ? void 0 : (_this$store4$PROFILER2 = _this$store4$PROFILER.components) === null || _this$store4$PROFILER2 === void 0 ? void 0 : _this$store4$PROFILER2[componentId]) !== null && _this$store$PROFILER_2 !== void 0 ? _this$store$PROFILER_2 : {};
|
|
98
|
+
let total = 0;
|
|
99
|
+
|
|
100
|
+
for (let instanceId in component) {
|
|
101
|
+
total += component[instanceId].count;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return total;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
}
|
|
@@ -342,6 +342,31 @@ export const getValidNode = (originalNode, schema = defaultSchema, adfStage = 'f
|
|
|
342
342
|
break;
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
+
case 'mediaInline':
|
|
346
|
+
{
|
|
347
|
+
let mediaId = '';
|
|
348
|
+
let mediaCollection = [];
|
|
349
|
+
|
|
350
|
+
if (attrs) {
|
|
351
|
+
const {
|
|
352
|
+
id,
|
|
353
|
+
collection
|
|
354
|
+
} = attrs;
|
|
355
|
+
mediaId = id;
|
|
356
|
+
mediaCollection = collection;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (mediaId && mediaCollection && adfStage === 'stage0') {
|
|
360
|
+
return {
|
|
361
|
+
type,
|
|
362
|
+
attrs,
|
|
363
|
+
marks
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
|
|
345
370
|
case 'media':
|
|
346
371
|
{
|
|
347
372
|
let mediaId = '';
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/i18n/cs.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Czech
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Obousměrné znaky mění pořadí vykreslování textu. Může to být použito k zakrytí škodlivého kódu.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Přidejte popisek',
|
|
10
11
|
'fabric.editor.collapseNode': 'Sbalit obsah',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klikněte sem pro rozbalení...',
|
package/dist/esm/i18n/da.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Danish
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Tegn med tovejsfunktionalitet ændrer rækkefølgen, som teksten er gengivet i. Dette kan udnyttes til at skjule skadelig kode.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Tilføj en billedtekst',
|
|
10
11
|
'fabric.editor.collapseNode': 'skjul indhold',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klik her for at udvide...',
|
package/dist/esm/i18n/de.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// German
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Bidirektionale Zeichen ändern die Reihenfolge, in der Text gerendert wird. Dies könnte verwendet werden, um bösartigen Code zu verbergen.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Eine Bildunterschrift hinzufügen',
|
|
10
11
|
'fabric.editor.collapseNode': 'Inhaltsanzeige reduzieren',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klicken Sie hier, um zu erweitern …',
|
package/dist/esm/i18n/es.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Spanish
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Los caracteres bidireccionales cambian el orden de renderización del texto. Esto podría utilizarse para ocultar código malicioso.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Añadir un subtítulo',
|
|
10
11
|
'fabric.editor.collapseNode': 'contraer contenido',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Haz clic aquí para ampliar...',
|
package/dist/esm/i18n/fi.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Finnish
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Kaksisuuntaiset merkit muuttavat tekstin renderöintijärjestystä. Tätä voidaan hyödyntää haitallisen koodin peittämisessä.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Lisää kuvateksti',
|
|
10
11
|
'fabric.editor.collapseNode': 'piilota sisältö',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klikkaa tähän laajentaaksesi...',
|
package/dist/esm/i18n/fr.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// French
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': "Les caractères bidirectionnels changent l'ordre de rendu du texte. Ils peuvent être utilisés pour masquer du code malveillant.",
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Ajouter une légende',
|
|
10
11
|
'fabric.editor.collapseNode': 'Réduire le contenu',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Cliquez ici pour développer...',
|
package/dist/esm/i18n/hu.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Hungarian
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'A kétirányú karakterek megváltoztatják a szöveg renderelési sorrendjét. Ez felhasználható rosszindulatú kód elfedésére.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Képaláírás hozzáadása',
|
|
10
11
|
'fabric.editor.collapseNode': 'tartalom összecsukása',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Kattints ide a kibontáshoz…',
|
package/dist/esm/i18n/it.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Italian
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': "I caratteri bidirezionali modificano l'ordine in cui è visualizzato il testo. Possono essere utilizzati per nascondere un codice dannoso.",
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Aggiungi didascalia',
|
|
10
11
|
'fabric.editor.collapseNode': 'Comprimi contenuto',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Clicca qui per espandere...',
|
package/dist/esm/i18n/ja.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Japanese
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': '双方向文字はテキストのレンダリング順序を変更します。このため、悪意あるコードを隠すために使用される場合があります。',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'キャプションを追加',
|
|
10
11
|
'fabric.editor.collapseNode': 'コンテンツを折りたたむ',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'こちらをクリックして展開…',
|
package/dist/esm/i18n/ko.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Korean
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': '양방향 문자가 텍스트가 렌더링되는 순서를 변경합니다. 악성 코드를 가리는 데 사용할 수 있습니다.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': '캡션 추가',
|
|
10
11
|
'fabric.editor.collapseNode': '콘텐츠 접기',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': '여기를 클릭하여 펼치기...',
|
package/dist/esm/i18n/nb.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Norwegian Bokmål
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Toveistegn endrer rekkefølgen som tekst vises i. Dette kan brukes til å skjule skadelig kode.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Legg til bildetekst',
|
|
10
11
|
'fabric.editor.collapseNode': 'Minimer innhold',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klikk her for å utvide …',
|
package/dist/esm/i18n/nl.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Dutch
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Bidirectionele tekens wijzigen de volgorde waarin de tekst wordt weergegeven. Dit kan worden gebruikt om schadelijke code te verdoezelen.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Bijschrift toevoegen',
|
|
10
11
|
'fabric.editor.collapseNode': 'Content inklappen',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klik hier om uit te breiden...',
|
package/dist/esm/i18n/pl.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Polish
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Znaki dwukierunkowe zmieniają kolejność, w jakiej tekst jest renderowany. Może to zostać wykorzystane do ukrycia złośliwego kodu.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Dodaj podpis',
|
|
10
11
|
'fabric.editor.collapseNode': 'Zwiń zawartość',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Kliknij tutaj, aby rozwinąć...',
|
package/dist/esm/i18n/pt_BR.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Portuguese (Brazil)
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Caracteres bidirecionais alteram a ordem em que o texto é renderizado. Eles podem ser usados para ocultar códigos mal-intencionados.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Adicionar legenda',
|
|
10
11
|
'fabric.editor.collapseNode': 'Recolher conteúdo',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Clique aqui para expandir...',
|
package/dist/esm/i18n/ru.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Russian
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Двунаправленные символы изменяют порядок отображения текста. Они могут использоваться для маскировки вредоносного кода.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Добавьте подпись',
|
|
10
11
|
'fabric.editor.collapseNode': 'Свернуть содержимое',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Нажмите здесь, чтобы развернуть…',
|
package/dist/esm/i18n/sv.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Swedish
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Dubbelriktade tecken ändrar återgivningsordningen för text. Detta kan användas för att dölja skadlig kod.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Lägg till en bildtext',
|
|
10
11
|
'fabric.editor.collapseNode': 'komprimera innehåll',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klicka här för att expandera ...',
|
package/dist/esm/i18n/th.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Thai
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'ตัวอักษรแบบสองทิศทางเปลี่ยนลำดับการแสดงข้อความ ซึ่งอาจนำไปใช้เพื่อปิดบังรหัสที่มีวัตถุประสงค์ในทางที่ไม่ดีได้',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'เพิ่มคำอธิบาย',
|
|
10
11
|
'fabric.editor.collapseNode': 'ย่อเนื้อหา',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'คลิกที่นี่เพื่อขยาย...',
|
package/dist/esm/i18n/tr.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Turkish
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Çift yönlü karakterler metnin oluşturulduğu sırayı değiştirir. Bu, kötü amaçlı kodu gizlemek için kullanılabilir.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Açıklama yazısı ekleyin',
|
|
10
11
|
'fabric.editor.collapseNode': 'içeriği daraltın',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Genişletmek için buraya tıklayın...',
|
package/dist/esm/i18n/uk.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Ukrainian
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Двонаправлені символи змінюють порядок відображення тексту. Такий спосіб може використовуватися, щоб приховати зловмисний код.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Додати підпис',
|
|
10
11
|
'fabric.editor.collapseNode': 'Згорніть вміст',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Натисніть, щоб розгорнути…',
|
package/dist/esm/i18n/vi.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Vietnamese
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Ký tự hai chiều thay đổi thứ tự kết xuất văn bản. Điều này có thể được dùng để che giấu mã độc hại.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Thêm chú thích',
|
|
10
11
|
'fabric.editor.collapseNode': 'thu gọn nội dung',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Nhấp vào đây để mở rộng...',
|
package/dist/esm/i18n/zh.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This file is automatically generated by i18n-tools.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
// Chinese
|
|
8
7
|
export default {
|
|
8
|
+
'fabric.editor.codeBidiWarningLabel': '双向字符会更改文本的呈现顺序。这可能被用于掩盖恶意代码。',
|
|
9
9
|
'fabric.editor.captionPlaceholder': '添加标题',
|
|
10
10
|
'fabric.editor.collapseNode': '收起内容',
|
|
11
11
|
'fabric.editor.expandDefaultTitle': '点击此处展开...',
|
package/dist/esm/i18n/zh_TW.js
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ADFTraversor, ErrorReporter, ZERO_WIDTH_SPACE, absoluteBreakoutWidth, browser, calcBreakoutWidth, breakoutConsts, calcTableColumnWidths, calcWideWidth, clearMeasure, compose, convertProsemirrorTableNodeToArrayOfRows, createCompareNodes, findAndTrackUnsupportedContentNodes, getAnalyticsAppearance, analyticsEventKey, getAnalyticsEventSeverity, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS, getExtensionLozengeData, getExtensionRenderer, getMarksByOrder, getModeFromTheme, getResponseEndTime, getValidContent, getValidDocument, getValidMark, getValidNode, getValidUnknownNode, hasMergedCell, isPastDate, isPerformanceAPIAvailable, isPerformanceObserverAvailable, isSameMark, isSubSupType, markOrder, measureRender, startMeasure, stopMeasure, measureTTI, getTTISeverity, TTI_SEVERITY_THRESHOLD_DEFAULTS, TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC, withImageLoader, canApplyAnnotationOnRange, getAnnotationIdsFromRange, SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, shouldForceTracking, sniffUserBrowserExtensions } from './utils';
|
|
1
|
+
export { ADFTraversor, ErrorReporter, ZERO_WIDTH_SPACE, absoluteBreakoutWidth, browser, calcBreakoutWidth, breakoutConsts, calcTableColumnWidths, calcWideWidth, clearMeasure, compose, convertProsemirrorTableNodeToArrayOfRows, createCompareNodes, findAndTrackUnsupportedContentNodes, getAnalyticsAppearance, analyticsEventKey, getAnalyticsEventSeverity, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS, getExtensionLozengeData, getExtensionRenderer, getMarksByOrder, getModeFromTheme, getResponseEndTime, getValidContent, getValidDocument, getValidMark, getValidNode, getValidUnknownNode, hasMergedCell, isPastDate, isPerformanceAPIAvailable, isPerformanceObserverAvailable, isSameMark, isSubSupType, markOrder, measureRender, startMeasure, stopMeasure, measureTTI, getTTISeverity, TTI_SEVERITY_THRESHOLD_DEFAULTS, TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC, withImageLoader, canApplyAnnotationOnRange, getAnnotationIdsFromRange, SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, shouldForceTracking, sniffUserBrowserExtensions, RenderCountProfiler } from './utils';
|
|
2
2
|
export { SortOrder, AnnotationUpdateEmitter, AnnotationUpdateEvent } from './types';
|
|
3
3
|
export { DefaultExtensionProvider, combineExtensionProviders, getExtensionKeyAndNodeKey, getExtensionModuleNode, getExtensionModuleNodePrivateProps, getQuickInsertItemsFromModule, getNodeRenderer, getContextualToolbarItemsFromModule, buildMenuItem, resolveImport } from './extensions';
|
|
4
4
|
export { ProviderFactory, WithProviders } from './provider-factory';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
export var codeBidiWarningMessages = defineMessages({
|
|
3
|
+
/**
|
|
4
|
+
* Message taken from
|
|
5
|
+
* https://hello.atlassian.net/wiki/spaces/~tswan/pages/1366555782/PSHELP-2943+Investigate+Trojan+Source+Attack+Vulnerability+design
|
|
6
|
+
*/
|
|
7
|
+
label: {
|
|
8
|
+
id: 'fabric.editor.codeBidiWarningLabel',
|
|
9
|
+
defaultMessage: 'Bidirectional characters change the order that text is rendered. This could be used to obscure malicious code.',
|
|
10
|
+
description: 'Tooltip message to present to users when a bidirectional character is encountered in code.'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -5,6 +5,8 @@ var _templateObject;
|
|
|
5
5
|
import { css } from 'styled-components';
|
|
6
6
|
import { hexToRgba, PanelType } from '@atlaskit/adf-schema';
|
|
7
7
|
import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
9
|
+
import { emojiImage, emojiSprite } from '@atlaskit/emoji';
|
|
8
10
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
11
|
import { themed } from '@atlaskit/theme/components';
|
|
10
12
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
@@ -57,6 +59,7 @@ var darkTextColor = {
|
|
|
57
59
|
warning: colors.Y75,
|
|
58
60
|
error: colors.R75
|
|
59
61
|
};
|
|
62
|
+
var verticalAlignment = -((gridSize() * 3 - akEditorCustomIconSize) / 2);
|
|
60
63
|
var prefix = 'ak-editor-panel';
|
|
61
64
|
export var PanelSharedCssClassName = {
|
|
62
65
|
prefix: prefix,
|
|
@@ -71,7 +74,12 @@ export var PanelSharedSelectors = {
|
|
|
71
74
|
successPanel: ".".concat(prefix, "[data-panel-type=").concat(PanelType.SUCCESS, "]"),
|
|
72
75
|
noteButton: "button[aria-label=\"Note\"]",
|
|
73
76
|
removeButton: "button[aria-label=\"Remove\"]",
|
|
74
|
-
|
|
77
|
+
colorPalette: "[aria-label=\"Background color\"]",
|
|
78
|
+
selectedColor: "[aria-label=\"The smell\"]",
|
|
79
|
+
removeEmojiIcon: "[aria-label=\"Remove emoji\"]",
|
|
80
|
+
emojiIcon: "[aria-label=\"editor-add-emoji\"]",
|
|
81
|
+
selectedEmoji: "[aria-label=\":grinning:\"]",
|
|
82
|
+
title: "#editor-title"
|
|
75
83
|
};
|
|
76
84
|
|
|
77
85
|
var iconDynamicStyles = function iconDynamicStyles(panelType) {
|
|
@@ -114,4 +122,4 @@ var mainDynamicStyles = function mainDynamicStyles(panelType) {
|
|
|
114
122
|
};
|
|
115
123
|
};
|
|
116
124
|
|
|
117
|
-
export var panelSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n border-radius: ", "px;\n margin: ", " 0 0;\n padding: ", "px;\n min-width: ", "px;\n display: flex;\n align-items: baseline;\n word-break: break-word;\n\n ", "\n\n .", " {\n
|
|
125
|
+
export var panelSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\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;\n }\n\n .", ", .", " {\n vertical-align: ", "px;\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"])), PanelSharedCssClassName.prefix, borderRadius(), blockNodesVerticalMargin, gridSize(), akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO), PanelSharedCssClassName.icon, gridSize() * 3, gridSize() * 3, gridSize(), iconDynamicStyles(PanelType.INFO), emojiSprite, emojiImage, verticalAlignment, PanelType.NOTE, mainDynamicStyles(PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.NOTE), PanelType.TIP, mainDynamicStyles(PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.TIP), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.WARNING), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.ERROR), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.SUCCESS));
|
|
@@ -35,7 +35,7 @@ var tableSharedStyle = css(_templateObject || (_templateObject = _taggedTemplate
|
|
|
35
35
|
}), tableCellMinWidth, themed({
|
|
36
36
|
light: akEditorTableBorder,
|
|
37
37
|
dark: akEditorTableBorderDark
|
|
38
|
-
}), tableCellPadding, browser.gecko || browser.ie ? 'background-clip: padding-box;' : '', themed({
|
|
38
|
+
}), tableCellPadding, browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', themed({
|
|
39
39
|
dark: getTableCellBackgroundDarkModeColors
|
|
40
40
|
}), themed({
|
|
41
41
|
light: akEditorTableToolbar,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export var TypeAheadAvailableNodes;
|
|
2
|
+
|
|
3
|
+
(function (TypeAheadAvailableNodes) {
|
|
4
|
+
TypeAheadAvailableNodes["EMOJI"] = "emojiTypeAhead";
|
|
5
|
+
TypeAheadAvailableNodes["MENTION"] = "mentionTypeAhead";
|
|
6
|
+
TypeAheadAvailableNodes["QUICK_INSERT"] = "quickInsertTypeAhead";
|
|
7
|
+
})(TypeAheadAvailableNodes || (TypeAheadAvailableNodes = {}));
|
|
8
|
+
|
|
9
|
+
export var SelectItemMode;
|
|
10
|
+
|
|
11
|
+
(function (SelectItemMode) {
|
|
12
|
+
SelectItemMode["SHIFT_ENTER"] = "shift-enter";
|
|
13
|
+
SelectItemMode["ENTER"] = "enter";
|
|
14
|
+
SelectItemMode["SPACE"] = "space";
|
|
15
|
+
SelectItemMode["SELECTED"] = "selected";
|
|
16
|
+
SelectItemMode["TAB"] = "tab";
|
|
17
|
+
})(SelectItemMode || (SelectItemMode = {}));
|
|
File without changes
|