@atlaskit/editor-common 71.0.2 → 72.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +77 -0
- package/dist/cjs/analytics/types/enums.js +20 -1
- package/dist/cjs/i18n/index.js +13 -5
- package/dist/cjs/i18n/languages.js +42 -0
- package/dist/cjs/keymaps/index.js +55 -3
- package/dist/cjs/styles/index.js +8 -2
- package/dist/cjs/styles/shared/annotation.js +4 -7
- package/dist/cjs/styles/shared/block-marks.js +1 -1
- package/dist/cjs/styles/shared/code-block.js +3 -4
- package/dist/cjs/styles/shared/lists.js +55 -4
- package/dist/cjs/styles/shared/panel.js +6 -12
- package/dist/cjs/styles/shared/shadow.js +3 -1
- package/dist/cjs/styles/shared/table.js +2 -2
- package/dist/cjs/types/next-editor-plugin.js +5 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Emoji/index.js +11 -2
- package/dist/cjs/ui/Popup/index.js +72 -2
- package/dist/cjs/ui/Popup/utils.js +13 -6
- package/dist/cjs/ui/UnsupportedBlock/index.js +2 -2
- package/dist/cjs/ui/UnsupportedInline/index.js +2 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +138 -0
- package/dist/cjs/ui-color/ColorPalette/index.js +19 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +2 -0
- package/dist/cjs/ui-menu/ToolbarButton/index.js +3 -1
- package/dist/cjs/utils/analytics.js +1 -38
- package/dist/cjs/utils/builder.js +44 -0
- package/dist/cjs/utils/compareNodes.js +86 -33
- package/dist/cjs/utils/index.js +47 -1
- package/dist/cjs/utils/list.js +47 -0
- package/dist/cjs/utils/plugin-state-factory.js +9 -9
- package/dist/cjs/utils/referentiality.js +281 -2
- package/dist/cjs/utils/track-unsupported-content.js +19 -20
- package/dist/cjs/utils/validate-using-spec.js +8 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/types/enums.js +20 -1
- package/dist/es2019/i18n/index.js +4 -3
- package/dist/es2019/i18n/languages.js +34 -0
- package/dist/es2019/keymaps/index.js +47 -0
- package/dist/es2019/styles/index.js +1 -1
- package/dist/es2019/styles/shared/annotation.js +4 -7
- package/dist/es2019/styles/shared/block-marks.js +8 -1
- package/dist/es2019/styles/shared/code-block.js +7 -6
- package/dist/es2019/styles/shared/lists.js +44 -2
- package/dist/es2019/styles/shared/panel.js +6 -11
- package/dist/es2019/styles/shared/shadow.js +21 -6
- package/dist/es2019/styles/shared/table.js +2 -3
- package/dist/es2019/types/next-editor-plugin.js +1 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Emoji/index.js +11 -2
- package/dist/es2019/ui/Popup/index.js +68 -2
- package/dist/es2019/ui/Popup/utils.js +13 -6
- package/dist/es2019/ui/UnsupportedBlock/index.js +1 -1
- package/dist/es2019/ui/UnsupportedInline/index.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +120 -0
- package/dist/es2019/ui-color/ColorPalette/index.js +28 -12
- package/dist/es2019/ui-menu/DropdownMenu/index.js +2 -0
- package/dist/es2019/ui-menu/ToolbarButton/index.js +3 -1
- package/dist/es2019/utils/analytics.js +0 -33
- package/dist/es2019/utils/builder.js +16 -0
- package/dist/es2019/utils/compareNodes.js +79 -28
- package/dist/es2019/utils/index.js +4 -2
- package/dist/es2019/utils/list.js +31 -0
- package/dist/es2019/utils/plugin-state-factory.js +9 -9
- package/dist/es2019/utils/referentiality.js +240 -0
- package/dist/es2019/utils/track-unsupported-content.js +20 -16
- package/dist/es2019/utils/validate-using-spec.js +8 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/types/enums.js +20 -1
- package/dist/esm/i18n/index.js +4 -3
- package/dist/esm/i18n/languages.js +34 -0
- package/dist/esm/keymaps/index.js +48 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/styles/shared/annotation.js +4 -7
- package/dist/esm/styles/shared/block-marks.js +1 -1
- package/dist/esm/styles/shared/code-block.js +3 -4
- package/dist/esm/styles/shared/lists.js +49 -2
- package/dist/esm/styles/shared/panel.js +6 -11
- package/dist/esm/styles/shared/shadow.js +2 -2
- package/dist/esm/styles/shared/table.js +2 -3
- package/dist/esm/types/next-editor-plugin.js +1 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Emoji/index.js +11 -2
- package/dist/esm/ui/Popup/index.js +73 -2
- package/dist/esm/ui/Popup/utils.js +13 -6
- package/dist/esm/ui/UnsupportedBlock/index.js +1 -1
- package/dist/esm/ui/UnsupportedInline/index.js +1 -1
- package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +124 -0
- package/dist/esm/ui-color/ColorPalette/index.js +18 -2
- package/dist/esm/ui-menu/DropdownMenu/index.js +2 -0
- package/dist/esm/ui-menu/ToolbarButton/index.js +3 -1
- package/dist/esm/utils/analytics.js +0 -33
- package/dist/esm/utils/builder.js +30 -0
- package/dist/esm/utils/compareNodes.js +83 -32
- package/dist/esm/utils/index.js +4 -2
- package/dist/esm/utils/list.js +31 -0
- package/dist/esm/utils/plugin-state-factory.js +9 -9
- package/dist/esm/utils/referentiality.js +269 -0
- package/dist/esm/utils/track-unsupported-content.js +19 -20
- package/dist/esm/utils/validate-using-spec.js +8 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/types/enums.d.ts +23 -4
- package/dist/types/collab/types.d.ts +1 -1
- package/dist/types/i18n/index.d.ts +4 -3
- package/dist/types/i18n/languages.d.ts +35 -0
- package/dist/types/keymaps/index.d.ts +1 -0
- package/dist/types/styles/index.d.ts +1 -1
- package/dist/types/styles/shared/lists.d.ts +3 -1
- package/dist/types/types/collab.d.ts +1 -1
- package/dist/types/types/copy-button.d.ts +4 -0
- package/dist/types/types/feature-flags.d.ts +30 -25
- package/dist/types/types/floating-toolbar.d.ts +26 -1
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/next-editor-plugin.d.ts +61 -0
- package/dist/types/ui/Emoji/index.d.ts +2 -0
- package/dist/types/ui/Popup/index.d.ts +19 -0
- package/dist/types/ui/Popup/utils.d.ts +3 -3
- package/dist/types/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.d.ts +214 -0
- package/dist/types/ui-color/ColorPalette/index.d.ts +7 -0
- package/dist/types/ui-menu/DropdownMenu/types.d.ts +1 -0
- package/dist/types/ui-menu/ToolbarButton/index.d.ts +3 -1
- package/dist/types/utils/analytics.d.ts +1 -21
- package/dist/types/utils/builder.d.ts +8 -0
- package/dist/types/utils/compareNodes.d.ts +16 -0
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/utils/list.d.ts +10 -0
- package/dist/types/utils/plugin-state-factory.d.ts +1 -1
- package/dist/types/utils/referentiality.d.ts +4 -0
- package/dist/types/utils/track-unsupported-content.d.ts +14 -2
- package/package.json +15 -12
- package/report.api.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 72.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`ac1c880cf4c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ac1c880cf4c) - [ux] ED-12395 - Remove the keyboard accessible date picker feature flag, which has been 100% rolled out
|
|
8
|
+
|
|
9
|
+
## **DEPRECATION WARNING:**
|
|
10
|
+
|
|
11
|
+
There's two deprecations in this change:
|
|
12
|
+
|
|
13
|
+
### 1. Remove `keyboardAccessibleDatepicker` and the `allowKeyboardAccessibleDatepicker` feature flag
|
|
14
|
+
|
|
15
|
+
Now that this has been fully rolled out, this feature flag is no longer required. The if-statement that depends on this feature flag was also removed in point 2 below:
|
|
16
|
+
|
|
17
|
+
### 2. Remove the `showTextField` prop on the DatePicker
|
|
18
|
+
|
|
19
|
+
This was exclusively used to conditionally render the `DatePickerInput`. Its usage was always set to `true` in code or through the feature flag that has now been rolled out. Thus, this deprecation simplifies the API.
|
|
20
|
+
|
|
21
|
+
Since no code related to this feature flag remains, there are no inline deprecation warnings.
|
|
22
|
+
|
|
23
|
+
- [`5d317ed8aa3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5d317ed8aa3) - [ux] ED-15882: Implement custom starting numbers for orderedList nodes in adf-schema, editor, renderer, transformers behind restartNumberedLists feature flag. Users will be able to set a custom starting number when typing to create a numbered list in the Editor and this will be persisted across Renderer and other format transformations.
|
|
24
|
+
|
|
25
|
+
Note: restartNumberedLists will be off by default. To enable it, consumers will need to set <Editor featureFlags={{ restartNumberedLists: true }}> or <Renderer featureFlags={{ restartNumberedLists: true }}>
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- [`fbe1cd7d043`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fbe1cd7d043) - Adds a new feature flag: preventPopupOverflow that can be used to force the popup placement when it overflows the screen
|
|
30
|
+
- [`a730df6e3ed`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a730df6e3ed) - ED-16163 Refactored analytics constants to be in editor-common
|
|
31
|
+
- [`5307b130e91`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5307b130e91) - Cleaned up placeholder lint feature as it was no longer being used
|
|
32
|
+
- [`195fa69b80a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/195fa69b80a) - Minor referentiality util housekeeping
|
|
33
|
+
- [`4ed695c539e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ed695c539e) - Renamed Popup prop preventTopOverflow to preventOverflow used for both vertical and horizontal placement now
|
|
34
|
+
- [`c42a0344d32`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c42a0344d32) - The linking view changing experiment toolbar style will be removed, including the feature flag. All variants will be removed except for toolbarIcons which will be the only view of the toolbar of the linking view switcher.
|
|
35
|
+
- [`8820442c2b2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8820442c2b2) - [ux] ED-15709: add feature for delete element if it is `isReferencedSource` is `true`
|
|
36
|
+
|
|
37
|
+
- add checkbox confirmation dialog when then config have `isReferentiality.`
|
|
38
|
+
- add referentiality helper functions.
|
|
39
|
+
- update confirmDialog config to a handler to reduce traverse times.
|
|
40
|
+
- user can now tick checkbox to delete descendent nodes or only selected node when user click the delete icon in floating toolbar.
|
|
41
|
+
|
|
42
|
+
- [`1d41bbc2965`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1d41bbc2965) - This changeset introduces non breaking changes to support ssr within the loader emoji component
|
|
43
|
+
- [`651dee737d2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/651dee737d2) - ED-15301 Added initial preset builder types
|
|
44
|
+
- [`d2c62b69a6a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d2c62b69a6a) - [ux] Adds support to floating toolbar configuration to enable trapping focus within the Popup.
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- [`2fd53283b55`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2fd53283b55) - Updated i18n language files
|
|
49
|
+
- [`a70436952a6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a70436952a6) - [ED-15980] Reinstate unsupportedContentEncountered event
|
|
50
|
+
- [`3a54fce9ade`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a54fce9ade) - DSP-4513 Updated tokens used to render annotations.
|
|
51
|
+
|
|
52
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in beta).
|
|
53
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
54
|
+
|
|
55
|
+
- [`9940267512c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9940267512c) - [ED-15979] Fix column sorting when comparing text with mixed alpha and numeric values
|
|
56
|
+
- [`a838c2e281e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a838c2e281e) - [ux] ED-15959 Migrate panel to use editor-palette package for background colours.
|
|
57
|
+
- [`60068f7fcbe`](https://bitbucket.org/atlassian/atlassian-frontend/commits/60068f7fcbe) - [ED-16007] Changes made to improve the floating toolbar's keyboard accessibility
|
|
58
|
+
- [`ed617ce197c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ed617ce197c) - [ux] DSP-4451 - Adds design tokens to table overflow shadows. Fixes visual bug with table overflow shadow size and placement.
|
|
59
|
+
- [`f608bc44cf2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f608bc44cf2) - [ux] ED-16177 Added new text color labels. These new labels are disabled by default and only present when useSomewhatSemanticTextColorNames feature flag is set to true.
|
|
60
|
+
- [`bb9a5f9d77d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bb9a5f9d77d) - [ux] ED-16176 Added useSomewhatSemanticTextColorNames feature flag. This is part of COMMIT-5058 work to unblock dark mode for Jira. The intention of the flag is to show semantic names in tooltips when hovering over colors in the text color palette in token light/dark mode. Note that the flag is 'somewhat semantic' due to white/dark-gray not being semantic names.
|
|
61
|
+
- [`233e03b2d92`](https://bitbucket.org/atlassian/atlassian-frontend/commits/233e03b2d92) - ED-16007 To highlight the table rows and columns when the 'Delete Row' and 'Delete Column' options are highlighted in the 'cell options' menu of floating toolbar
|
|
62
|
+
- [`7fd5785d37d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7fd5785d37d) - [ESS-2752] Fix clientId type derived from prosemirror-collab
|
|
63
|
+
- [`b2fa6d3e611`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b2fa6d3e611) - [ED-16106] Fix margin top when paragraph has alignment marks
|
|
64
|
+
- [`e4089f2c471`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e4089f2c471) - Modified toolbar buttons to read out keyboard shortcuts by screen readers.
|
|
65
|
+
- [`4fbaeb2a1fd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4fbaeb2a1fd) - DSP-4118 Updated tokens used to render overflow shadows in code blocks.
|
|
66
|
+
|
|
67
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in beta).
|
|
68
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
69
|
+
|
|
70
|
+
`overflowShadow` now optionally supports customizing the size of the "covers" that appear over shadows when at the edge of content, via `leftCoverWidth` and `rightCoverWidth`, and the shadow width via the `width` prop.
|
|
71
|
+
|
|
72
|
+
- Updated dependencies
|
|
73
|
+
|
|
74
|
+
## 71.0.3
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- Updated dependencies
|
|
79
|
+
|
|
3
80
|
## 71.0.2
|
|
4
81
|
|
|
5
82
|
### Patch Changes
|
|
@@ -107,7 +107,7 @@ exports.ACTION = ACTION;
|
|
|
107
107
|
ACTION["TYPING_FINISHED"] = "typingFinished";
|
|
108
108
|
ACTION["TYPING_STARTED"] = "typingStarted";
|
|
109
109
|
ACTION["UNLINK"] = "unlinked";
|
|
110
|
-
ACTION["UNSUPPORTED_CONTENT_ENCOUNTERED"] = "
|
|
110
|
+
ACTION["UNSUPPORTED_CONTENT_ENCOUNTERED"] = "unsupportedContentEncounteredV2";
|
|
111
111
|
ACTION["UPDATED"] = "updated";
|
|
112
112
|
ACTION["UPDATED_FRAGMENT_MARK_NAME"] = "updatedFragmentMarkName";
|
|
113
113
|
ACTION["UPDATED_SOURCE"] = "updatedSource";
|
|
@@ -124,6 +124,16 @@ exports.ACTION = ACTION;
|
|
|
124
124
|
ACTION["UFO_SESSION_COMPLETE"] = "ufoSessionComplete";
|
|
125
125
|
ACTION["INVALID_PROSEMIRROR_DOCUMENT"] = "invalidProsemirrorDocument";
|
|
126
126
|
ACTION["DOCUMENT_PROCESSING_ERROR"] = "documentProcessingError";
|
|
127
|
+
ACTION["RENDERER_TTI"] = "tti";
|
|
128
|
+
ACTION["CRASHED"] = "unhandledErrorCaught";
|
|
129
|
+
ACTION["SELECT_ALL_CAUGHT"] = "selectAllCaught";
|
|
130
|
+
ACTION["SELECT_ALL_ESCAPED"] = "selectAllEscaped";
|
|
131
|
+
ACTION["SORT_COLUMN"] = "sortedColumn";
|
|
132
|
+
ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
|
|
133
|
+
ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
|
|
134
|
+
ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
|
|
135
|
+
ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
|
|
136
|
+
ACTION["UNSUPPORTED_TOOLTIP_VIEWED"] = "viewed";
|
|
127
137
|
})(ACTION || (exports.ACTION = ACTION = {}));
|
|
128
138
|
|
|
129
139
|
var INPUT_METHOD;
|
|
@@ -213,6 +223,10 @@ exports.ACTION_SUBJECT = ACTION_SUBJECT;
|
|
|
213
223
|
ACTION_SUBJECT["CREATE_LINK_INLINE_DIALOG"] = "createLinkInlineDialog";
|
|
214
224
|
ACTION_SUBJECT["CODE_BLOCK"] = "codeBlock";
|
|
215
225
|
ACTION_SUBJECT["REACT_EDITOR_VIEW"] = "reactEditorView";
|
|
226
|
+
ACTION_SUBJECT["RENDERER"] = "renderer";
|
|
227
|
+
ACTION_SUBJECT["ANCHOR_LINK"] = "anchorLink";
|
|
228
|
+
ACTION_SUBJECT["LINK"] = "link";
|
|
229
|
+
ACTION_SUBJECT["TOOLTIP"] = "tooltip";
|
|
216
230
|
})(ACTION_SUBJECT || (exports.ACTION_SUBJECT = ACTION_SUBJECT = {}));
|
|
217
231
|
|
|
218
232
|
var ACTION_SUBJECT_ID;
|
|
@@ -331,9 +345,14 @@ exports.ACTION_SUBJECT_ID = ACTION_SUBJECT_ID;
|
|
|
331
345
|
ACTION_SUBJECT_ID["TYPEAHEAD_QUICK_INSERT"] = "quickInsertTypeAhead";
|
|
332
346
|
ACTION_SUBJECT_ID["UNKNOWN_NODE"] = "unknownNode";
|
|
333
347
|
ACTION_SUBJECT_ID["UNLINK"] = "unlink";
|
|
348
|
+
ACTION_SUBJECT_ID["HEADING_ANCHOR_LINK"] = "headingAnchorLink";
|
|
349
|
+
ACTION_SUBJECT_ID["UNSUPPORTED_ERROR"] = "unsupportedUnhandled";
|
|
350
|
+
ACTION_SUBJECT_ID["UNSUPPORTED_NODE_ATTRIBUTE"] = "unsupportedNodeAttribute";
|
|
334
351
|
ACTION_SUBJECT_ID["UNSUPPORTED_BLOCK"] = "unsupportedBlock";
|
|
335
352
|
ACTION_SUBJECT_ID["UNSUPPORTED_INLINE"] = "unsupportedInline";
|
|
336
353
|
ACTION_SUBJECT_ID["UNSUPPORTED_MARK"] = "unsupportedMark";
|
|
354
|
+
ACTION_SUBJECT_ID["ON_UNSUPPORTED_INLINE"] = "onUnsupportedInline";
|
|
355
|
+
ACTION_SUBJECT_ID["ON_UNSUPPORTED_BLOCK"] = "onUnsupportedBlock";
|
|
337
356
|
})(ACTION_SUBJECT_ID || (exports.ACTION_SUBJECT_ID = ACTION_SUBJECT_ID = {}));
|
|
338
357
|
|
|
339
358
|
var FLOATING_CONTROLS_TITLE;
|
package/dist/cjs/i18n/index.js
CHANGED
|
@@ -23,16 +23,22 @@ Object.defineProperty(exports, "de", {
|
|
|
23
23
|
return _de.default;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
-
Object.defineProperty(exports, "
|
|
26
|
+
Object.defineProperty(exports, "en", {
|
|
27
27
|
enumerable: true,
|
|
28
28
|
get: function get() {
|
|
29
|
-
return
|
|
29
|
+
return _en.default;
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
Object.defineProperty(exports, "
|
|
32
|
+
Object.defineProperty(exports, "en_GB", {
|
|
33
33
|
enumerable: true,
|
|
34
34
|
get: function get() {
|
|
35
|
-
return
|
|
35
|
+
return _en_GB.default;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "es", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _es.default;
|
|
36
42
|
}
|
|
37
43
|
});
|
|
38
44
|
Object.defineProperty(exports, "fi", {
|
|
@@ -166,7 +172,9 @@ var _da = _interopRequireDefault(require("./da"));
|
|
|
166
172
|
|
|
167
173
|
var _nl = _interopRequireDefault(require("./nl"));
|
|
168
174
|
|
|
169
|
-
var
|
|
175
|
+
var _en = _interopRequireDefault(require("./en"));
|
|
176
|
+
|
|
177
|
+
var _en_GB = _interopRequireDefault(require("./en_GB"));
|
|
170
178
|
|
|
171
179
|
var _fi = _interopRequireDefault(require("./fi"));
|
|
172
180
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* NOTE:
|
|
10
|
+
*
|
|
11
|
+
* ED-16073:
|
|
12
|
+
* This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
|
|
13
|
+
*/
|
|
14
|
+
var _default = {
|
|
15
|
+
zh: 'Chinese (Simplified)',
|
|
16
|
+
zh_TW: 'Chinese (Traditional)',
|
|
17
|
+
cs: 'Czech',
|
|
18
|
+
da: 'Danish',
|
|
19
|
+
nl: 'Dutch',
|
|
20
|
+
en: 'English',
|
|
21
|
+
en_GB: 'English (United Kingdom)',
|
|
22
|
+
fi: 'Finnish',
|
|
23
|
+
fr: 'French',
|
|
24
|
+
de: 'German',
|
|
25
|
+
hu: 'Hungarian',
|
|
26
|
+
it: 'Italian',
|
|
27
|
+
ja: 'Japanese',
|
|
28
|
+
ko: 'Korean',
|
|
29
|
+
nb: 'Norwegian Bokmål',
|
|
30
|
+
pl: 'Polish',
|
|
31
|
+
pt_BR: 'Portuguese (Brazil)',
|
|
32
|
+
pt_PT: 'Portuguese (Portugal)',
|
|
33
|
+
ru: 'Russian',
|
|
34
|
+
sk: 'Slovak',
|
|
35
|
+
es: 'Spanish',
|
|
36
|
+
sv: 'Swedish',
|
|
37
|
+
th: 'Thai',
|
|
38
|
+
tr: 'Turkish',
|
|
39
|
+
uk: 'Ukrainian',
|
|
40
|
+
vi: 'Vietnamese'
|
|
41
|
+
};
|
|
42
|
+
exports.default = _default;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
@@ -87,13 +87,17 @@ exports.findKeyMapForBrowser = findKeyMapForBrowser;
|
|
|
87
87
|
exports.findKeymapByDescription = findKeymapByDescription;
|
|
88
88
|
exports.findShortcutByDescription = findShortcutByDescription;
|
|
89
89
|
exports.findShortcutByKeymap = findShortcutByKeymap;
|
|
90
|
-
exports.
|
|
90
|
+
exports.forwardDelete = void 0;
|
|
91
|
+
exports.getAriaKeyshortcuts = getAriaKeyshortcuts;
|
|
92
|
+
exports.insertRule = exports.insertNewLine = exports.indentList = exports.indent = void 0;
|
|
91
93
|
exports.makeKeyMapWithCommon = makeKeyMapWithCommon;
|
|
92
94
|
exports.makeKeymap = makeKeymap;
|
|
93
95
|
exports.toggleUnderline = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleOrderedList = exports.toggleItalic = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCode = exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.splitListItem = exports.splitCodeBlock = exports.space = exports.shiftTab = exports.shiftEnter = exports.shiftBackspace = exports.setNormalText = exports.redo = exports.previousCell = exports.pastePlainText = exports.paste = exports.outdentList = exports.outdent = exports.openHelp = exports.nextCell = exports.moveUp = exports.moveRight = exports.moveLeft = exports.moveDown = void 0;
|
|
94
96
|
exports.tooltip = tooltip;
|
|
95
97
|
exports.undo = void 0;
|
|
96
98
|
|
|
99
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
100
|
+
|
|
97
101
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
98
102
|
|
|
99
103
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -112,7 +116,7 @@ var _templateObject;
|
|
|
112
116
|
|
|
113
117
|
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); }
|
|
114
118
|
|
|
115
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
119
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
116
120
|
|
|
117
121
|
var addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
|
|
118
122
|
exports.addAltText = addAltText;
|
|
@@ -316,6 +320,54 @@ function findShortcutByKeymap(keymap) {
|
|
|
316
320
|
return keymap.windows;
|
|
317
321
|
}
|
|
318
322
|
|
|
323
|
+
function getAriaKeyshortcuts(keymap) {
|
|
324
|
+
var keyShortcuts;
|
|
325
|
+
|
|
326
|
+
if (typeof keymap === 'string') {
|
|
327
|
+
keyShortcuts = keymap;
|
|
328
|
+
} else if ((0, _typeof2.default)(keymap) === 'object') {
|
|
329
|
+
keyShortcuts = keymap[_utils.browser.mac ? 'mac' : 'windows'];
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
if (keyShortcuts) {
|
|
333
|
+
return keyShortcuts.toLowerCase().split('-').map(function (modifier) {
|
|
334
|
+
switch (modifier) {
|
|
335
|
+
case 'cmd':
|
|
336
|
+
return 'Meta';
|
|
337
|
+
|
|
338
|
+
case 'ctrl':
|
|
339
|
+
return 'Control';
|
|
340
|
+
|
|
341
|
+
case 'alt':
|
|
342
|
+
return 'Alt';
|
|
343
|
+
|
|
344
|
+
case 'shift':
|
|
345
|
+
return 'Shift';
|
|
346
|
+
|
|
347
|
+
case 'enter':
|
|
348
|
+
return 'Enter';
|
|
349
|
+
|
|
350
|
+
case 'esc':
|
|
351
|
+
return 'Esc';
|
|
352
|
+
|
|
353
|
+
case 'tab':
|
|
354
|
+
return 'Tab';
|
|
355
|
+
|
|
356
|
+
case 'space':
|
|
357
|
+
return 'Space';
|
|
358
|
+
|
|
359
|
+
case 'backspace':
|
|
360
|
+
return 'Backspace';
|
|
361
|
+
|
|
362
|
+
default:
|
|
363
|
+
return modifier.split('').join(' ');
|
|
364
|
+
}
|
|
365
|
+
}).join('+');
|
|
366
|
+
} else {
|
|
367
|
+
return undefined;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
319
371
|
var ALL = [toggleOrderedList, toggleBulletList, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleBlockQuote, insertNewLine, insertRule, splitCodeBlock, splitListItem, redo, undo, find, escape, enter, shiftEnter];
|
|
320
372
|
|
|
321
373
|
function makeKeymap(description, windows, mac, common) {
|
package/dist/cjs/styles/index.js
CHANGED
|
@@ -129,6 +129,12 @@ Object.defineProperty(exports, "dateSharedStyle", {
|
|
|
129
129
|
return _date.dateSharedStyle;
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
+
Object.defineProperty(exports, "getOrderedListInlineStyles", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function get() {
|
|
135
|
+
return _lists.getOrderedListInlineStyles;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
132
138
|
Object.defineProperty(exports, "headingsSharedStyles", {
|
|
133
139
|
enumerable: true,
|
|
134
140
|
get: function get() {
|
|
@@ -147,10 +153,10 @@ Object.defineProperty(exports, "linkSharedStyle", {
|
|
|
147
153
|
return _link.linkSharedStyle;
|
|
148
154
|
}
|
|
149
155
|
});
|
|
150
|
-
Object.defineProperty(exports, "
|
|
156
|
+
Object.defineProperty(exports, "listItemCounterPadding", {
|
|
151
157
|
enumerable: true,
|
|
152
158
|
get: function get() {
|
|
153
|
-
return _lists.
|
|
159
|
+
return _lists.listItemCounterPadding;
|
|
154
160
|
}
|
|
155
161
|
});
|
|
156
162
|
Object.defineProperty(exports, "listsSharedStyles", {
|
|
@@ -36,23 +36,20 @@ var DY200 = '#82641c';
|
|
|
36
36
|
|
|
37
37
|
var AnnotationSharedCSSByState = function AnnotationSharedCSSByState(props) {
|
|
38
38
|
return {
|
|
39
|
-
/* eslint-disable */
|
|
40
39
|
focus: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n // Background is not coming through in confluence, suspecting to be caused by some specific combination of\n // emotion and token look up\n\n background: ", ";\n border-bottom: 2px solid\n ", ";\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4147\n box-shadow: ", ";\n cursor: pointer;\n "])), (0, _components.themed)({
|
|
41
|
-
light: _colors.Y75,
|
|
42
|
-
dark: DY75
|
|
40
|
+
light: (0, _tokens.token)('color.background.accent.yellow.subtler', _colors.Y75),
|
|
41
|
+
dark: (0, _tokens.token)('color.background.accent.yellow.subtler', DY75)
|
|
43
42
|
})(props), (0, _components.themed)({
|
|
44
43
|
light: (0, _tokens.token)('color.border.accent.yellow', _colors.Y300),
|
|
45
44
|
dark: (0, _tokens.token)('color.border.accent.yellow', DY300)
|
|
46
45
|
})(props), (0, _tokens.token)('elevation.shadow.overlay', "1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A))),
|
|
47
46
|
blur: (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-bottom: 2px solid\n ", ";\n cursor: pointer;\n "])), (0, _components.themed)({
|
|
48
|
-
light: Y75a,
|
|
49
|
-
dark: DY75a
|
|
47
|
+
light: (0, _tokens.token)('color.background.accent.yellow.subtlest', Y75a),
|
|
48
|
+
dark: (0, _tokens.token)('color.background.accent.yellow.subtlest', DY75a)
|
|
50
49
|
})(props), (0, _components.themed)({
|
|
51
50
|
light: (0, _tokens.token)('color.border.accent.yellow', Y200a),
|
|
52
51
|
dark: (0, _tokens.token)('color.border.accent.yellow', DY200)
|
|
53
52
|
})(props))
|
|
54
|
-
/* eslint-enable */
|
|
55
|
-
|
|
56
53
|
};
|
|
57
54
|
};
|
|
58
55
|
|
|
@@ -13,5 +13,5 @@ var _react = require("@emotion/react");
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var blockMarksSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks apart from those with indentation mark */\n *:not(.fabric-editor-block-mark)
|
|
16
|
+
var blockMarksSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks apart from those with indentation mark */\n *:not(.fabric-editor-block-mark) >\n div.fabric-editor-block-mark:first-of-type\n /* Do not remove the margin top for nodes inside indentation marks */\n :not(.fabric-editor-indentation-mark)\n /* Do not remove the margin top for nodes inside alignment marks */\n :not(.fabric-editor-alignment),\n // If first element inside a block node has alignment mark, then remove the margin-top\n .fabric-editor-alignment:first-of-type:first-child,\n // If first document element has indentation mark remove margin-top\n .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child {\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n .heading-wrapper {\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n }\n }\n"])));
|
|
17
17
|
exports.blockMarksSharedStyles = blockMarksSharedStyles;
|
|
@@ -35,17 +35,16 @@ var CodeBlockSharedCssClassName = {
|
|
|
35
35
|
exports.CodeBlockSharedCssClassName = CodeBlockSharedCssClassName;
|
|
36
36
|
|
|
37
37
|
var codeBlockSharedStyles = function codeBlockSharedStyles(props) {
|
|
38
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n font-family: ", ";\n min-width: ", "px;\n cursor: pointer;\n\n --ds--code--bg-color: transparent;\n\n /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n white-space: normal;\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n top: 0px;\n left: 0px;\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n bottom: 0px;\n right: 0px;\n }\n\n .", " {\n background-color: ", ";\n display: flex;\n border-radius: ", "px;\n width: 100%;\n counter-reset: line;\n overflow-x: auto;\n\n background-image: ", ";\n\n background-repeat: no-repeat;\n background-attachment: local, local, local, local, scroll, scroll;\n background-size:
|
|
38
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n font-family: ", ";\n min-width: ", "px;\n cursor: pointer;\n\n --ds--code--bg-color: transparent;\n\n /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n white-space: normal;\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n top: 0px;\n left: 0px;\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n bottom: 0px;\n right: 0px;\n }\n\n .", " {\n background-color: ", ";\n display: flex;\n border-radius: ", "px;\n width: 100%;\n counter-reset: line;\n overflow-x: auto;\n\n background-image: ", ";\n\n background-repeat: no-repeat;\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-size: ", "px 100%, ", "px 100%,\n ", "px 100%, ", "px 100%, ", "px 100%,\n 1px 100%, ", "px 100%, 1px 100%;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n\n /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n overflow-y: hidden;\n }\n\n .", " {\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n position: relative;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n ::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n color: ", ";\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, (0, _tokens.token)('elevation.surface.raised', 'transparent'), (0, _constants.borderRadius)(), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorCodeFontFamily, _editorSharedStyles.akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _components.themed)({
|
|
39
39
|
light: (0, _tokens.token)('color.background.neutral', _colors.N20),
|
|
40
40
|
dark: (0, _tokens.token)('color.background.neutral', _colors.DN50)
|
|
41
41
|
})(props), (0, _constants.borderRadius)(), (0, _editorSharedStyles.overflowShadow)({
|
|
42
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-4118
|
|
43
42
|
background: (0, _components.themed)({
|
|
44
43
|
light: (0, _tokens.token)('color.background.neutral', _colors.N20),
|
|
45
44
|
dark: (0, _tokens.token)('color.background.neutral', _colors.DN50)
|
|
46
45
|
})(props),
|
|
47
|
-
|
|
48
|
-
}), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, (0, _components.themed)({
|
|
46
|
+
leftCoverWidth: "".concat((0, _constants.gridSize)() * 3, "px")
|
|
47
|
+
}), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 3, (0, _constants.gridSize)(), (0, _constants.gridSize)(), (0, _constants.gridSize)(), (0, _constants.gridSize)(), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, (0, _components.themed)({
|
|
49
48
|
light: (0, _tokens.token)('color.background.neutral', _colors.N30),
|
|
50
49
|
dark: (0, _tokens.token)('color.background.neutral', _colors.DN20)
|
|
51
50
|
})(props), (0, _constants.gridSize)(), (0, _components.themed)({
|
|
@@ -5,10 +5,15 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.getOrderedListInlineStyles = getOrderedListInlineStyles;
|
|
9
|
+
exports.listsSharedStyles = exports.listItemCounterPadding = void 0;
|
|
9
10
|
|
|
10
11
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
12
|
|
|
13
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
+
|
|
15
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
|
+
|
|
12
17
|
var _react = require("@emotion/react");
|
|
13
18
|
|
|
14
19
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
@@ -17,7 +22,53 @@ var _browser = _interopRequireDefault(require("../../utils/browser"));
|
|
|
17
22
|
|
|
18
23
|
var _templateObject;
|
|
19
24
|
|
|
20
|
-
var
|
|
21
|
-
exports.
|
|
22
|
-
var
|
|
25
|
+
var listItemCounterPadding = 24;
|
|
26
|
+
exports.listItemCounterPadding = listItemCounterPadding;
|
|
27
|
+
var CSS_VAR_NAMES;
|
|
28
|
+
|
|
29
|
+
(function (CSS_VAR_NAMES) {
|
|
30
|
+
CSS_VAR_NAMES["ITEM_COUNTER_PADDING"] = "--ed--list--item-counter--padding";
|
|
31
|
+
})(CSS_VAR_NAMES || (CSS_VAR_NAMES = {}));
|
|
32
|
+
|
|
33
|
+
var getItemCounterLeftPadding = function getItemCounterLeftPadding(itemCounterDigitsSize) {
|
|
34
|
+
// Previous padding-left was approximately 24px. We approximate that
|
|
35
|
+
// same value using "ch" units (which represent the width of a "0" digit
|
|
36
|
+
// character). We use "ch" so that this computed padding can now grow if
|
|
37
|
+
// the font-size ever enlarges.
|
|
38
|
+
var paddingLeft = "2.385ch";
|
|
39
|
+
|
|
40
|
+
if (itemCounterDigitsSize >= 3) {
|
|
41
|
+
// When there are 3 or more digits, we use a combination of "ch" units and
|
|
42
|
+
// pixel values so that while the computed padding grows if font-size ever
|
|
43
|
+
// enlarges, it doesn't over-scale with each digit (because of the fixed pixel
|
|
44
|
+
// portion of the computed value). This way, very large item counters will not
|
|
45
|
+
// become overly left-padded.
|
|
46
|
+
var fixedBasePx = 2;
|
|
47
|
+
paddingLeft = "calc(".concat(itemCounterDigitsSize + 1, "ch - ").concat(fixedBasePx, "px)");
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return paddingLeft;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var stringifyStyle = function stringifyStyle(style) {
|
|
54
|
+
return Object.entries(style).reduce(function (str, _ref) {
|
|
55
|
+
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
56
|
+
key = _ref2[0],
|
|
57
|
+
value = _ref2[1];
|
|
58
|
+
|
|
59
|
+
return "".concat(str).concat(key, ":").concat(value, ";");
|
|
60
|
+
}, "");
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
function getOrderedListInlineStyles(itemCounterDigitsSize, styleFormat) {
|
|
64
|
+
var style = (0, _defineProperty2.default)({}, CSS_VAR_NAMES.ITEM_COUNTER_PADDING, getItemCounterLeftPadding(itemCounterDigitsSize));
|
|
65
|
+
|
|
66
|
+
if (styleFormat === 'string') {
|
|
67
|
+
return stringifyStyle(style);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return style;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
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: var(\n ", ",\n ", "px\n );\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"])), CSS_VAR_NAMES.ITEM_COUNTER_PADDING, listItemCounterPadding, _browser.default.gecko ? 'display: inline-block;' : '', _adfSchema.orderedListSelector, _adfSchema.bulletListSelector);
|
|
23
74
|
exports.listsSharedStyles = listsSharedStyles;
|
|
@@ -19,6 +19,8 @@ var _react = require("@emotion/react");
|
|
|
19
19
|
|
|
20
20
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
21
21
|
|
|
22
|
+
var _editorPalette = require("@atlaskit/editor-palette");
|
|
23
|
+
|
|
22
24
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
23
25
|
|
|
24
26
|
var _consts = require("@atlaskit/editor-shared-styles/consts");
|
|
@@ -48,9 +50,6 @@ var tokenPanelColor = {
|
|
|
48
50
|
error: 'color.background.danger'
|
|
49
51
|
};
|
|
50
52
|
var lightPanelColor = {
|
|
51
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-4066
|
|
52
|
-
|
|
53
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
54
53
|
info: colors.B50,
|
|
55
54
|
note: colors.P50,
|
|
56
55
|
tip: colors.G50,
|
|
@@ -120,8 +119,6 @@ var darkPanelColors = {
|
|
|
120
119
|
LightGray: '#5A6977',
|
|
121
120
|
TextColor: '#D9DDE3'
|
|
122
121
|
};
|
|
123
|
-
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
124
|
-
|
|
125
122
|
exports.darkPanelColors = darkPanelColors;
|
|
126
123
|
var lightIconColor = {
|
|
127
124
|
info: (0, _tokens.token)('color.icon.information', colors.B400),
|
|
@@ -144,16 +141,15 @@ var darkIconColor = {
|
|
|
144
141
|
var panelEmojiSpriteVerticalAlignment = -((0, _constants.gridSize)() * 3 - _consts.akEditorCustomIconSize) / 2;
|
|
145
142
|
var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1; // TODO: https://product-fabric.atlassian.net/browse/DSP-4066
|
|
146
143
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
var panelDarkModeColors = [[colors.B50, darkPanelColors.B1200S], [colors.B75, darkPanelColors.B900], [colors.B100, darkPanelColors.B800S], [colors.N0, darkPanelColors.LightGray], [colors.N20, darkPanelColors.Gray], [colors.N60, darkPanelColors.DarkGray], [colors.T50, darkPanelColors.T1200S], [colors.T75, darkPanelColors.T900], [colors.T100, darkPanelColors.T900S], [colors.G50, darkPanelColors.G1200S], [colors.G75, darkPanelColors.G900], [colors.G200, darkPanelColors.G900S], [colors.Y50, darkPanelColors.Y1200S], [colors.Y75, darkPanelColors.Y900], [colors.Y200, darkPanelColors.Y800S], [colors.R50, darkPanelColors.R1200S], [colors.R75, darkPanelColors.R900], [colors.R100, darkPanelColors.R800S], [colors.P50, darkPanelColors.P1200S], [colors.P75, darkPanelColors.P900], [colors.P100, darkPanelColors.P800S]];
|
|
144
|
+
var panelDarkModeColors = [[colors.B50, darkPanelColors.B1200S], [colors.B75, darkPanelColors.B900], [colors.B100, darkPanelColors.B800S], [colors.N0, darkPanelColors.LightGray], [colors.N20, darkPanelColors.Gray], [colors.N60, darkPanelColors.DarkGray], [colors.T50, darkPanelColors.T1200S], [colors.T75, darkPanelColors.T900], [colors.T100, darkPanelColors.T900S], [colors.G50, darkPanelColors.G1200S], [colors.G75, darkPanelColors.G900], [colors.G200, darkPanelColors.G900S], [colors.Y50, darkPanelColors.Y1200S], [colors.Y75, darkPanelColors.Y900], [colors.Y200, darkPanelColors.Y800S], [colors.R50, darkPanelColors.R1200S], [colors.R75, darkPanelColors.R900], [colors.R100, darkPanelColors.R800S], [colors.P50, darkPanelColors.P1200S], [colors.P75, darkPanelColors.P900], [colors.P100, darkPanelColors.P800S]]; // used for custom panels
|
|
150
145
|
|
|
151
146
|
var getPanelDarkColor = function getPanelDarkColor(panelColor) {
|
|
152
147
|
var colorObject = panelDarkModeColors.find(function (color) {
|
|
153
148
|
return color[0] === panelColor || color[1] === panelColor;
|
|
154
149
|
});
|
|
155
150
|
return colorObject ? colorObject[1] : darkPanelColors.B1200S;
|
|
156
|
-
};
|
|
151
|
+
}; // used for custom panels
|
|
152
|
+
|
|
157
153
|
|
|
158
154
|
exports.getPanelDarkColor = getPanelDarkColor;
|
|
159
155
|
var getPanelBackgroundDarkModeColors = panelDarkModeColors.map(function (_ref) {
|
|
@@ -232,10 +228,8 @@ var getPanelTypeBackground = function getPanelTypeBackground(panelType) {
|
|
|
232
228
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4066
|
|
233
229
|
|
|
234
230
|
/* eslint-disable @atlaskit/design-system/no-unsafe-design-token-usage */
|
|
235
|
-
var light = (0,
|
|
231
|
+
var light = (0, _editorPalette.hexToEditorBackgroundPaletteColor)(lightPanelColor[panelType]);
|
|
236
232
|
var dark = (0, _tokens.token)(tokenPanelColor[panelType], darkPanelColors[panelType]);
|
|
237
|
-
/* eslint-disable @atlaskit/design-system/no-unsafe-design-token-usage */
|
|
238
|
-
|
|
239
233
|
var background = (0, _components.themed)({
|
|
240
234
|
light: light,
|
|
241
235
|
dark: dark
|
|
@@ -15,6 +15,8 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
15
15
|
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
17
|
|
|
18
|
+
var _tokens = require("@atlaskit/tokens");
|
|
19
|
+
|
|
18
20
|
var _OverflowShadow = require("../../ui/OverflowShadow");
|
|
19
21
|
|
|
20
22
|
var _shadowObserver = require("../../ui/OverflowShadow/shadowObserver");
|
|
@@ -36,5 +38,5 @@ var shadowWidth = 8;
|
|
|
36
38
|
* background-attachment: local, local, scroll, scroll;
|
|
37
39
|
*/
|
|
38
40
|
|
|
39
|
-
var shadowSharedStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &\n .", "::before,\n .", "::after,\n .", "::before,\n .", "::after {\n display: none;\n position: absolute;\n pointer-events: none;\n z-index: ", ";\n width: ", "px;\n content: '';\n /* Scrollbar is outside the content in IE, inset in other browsers. */\n height: calc(100%);\n }\n\n & .", ", .", " {\n position: relative;\n }\n\n & .", "::before {\n background: linear-gradient(to left
|
|
41
|
+
var shadowSharedStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &\n .", "::before,\n .", "::after,\n .", "::before,\n .", "::after {\n display: none;\n position: absolute;\n pointer-events: none;\n z-index: ", ";\n width: ", "px;\n content: '';\n /* Scrollbar is outside the content in IE, inset in other browsers. */\n height: calc(100%);\n }\n\n & .", ", .", " {\n position: relative;\n }\n\n & .", "::before {\n background: linear-gradient(\n to left,\n transparent 0,\n ", " 100%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n top: 0px;\n left: 0;\n display: block;\n }\n\n & .", "::after {\n background: linear-gradient(\n to right,\n transparent 0,\n ", " 100%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: calc(100% - ", "px);\n top: 0px;\n display: block;\n }\n\n & .", " {\n height: 100%;\n width: 0px;\n min-width: 0px;\n }\n\n & .", " {\n height: 100%;\n width: 0px;\n min-width: 0px;\n }\n"])), _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _editorSharedStyles.akEditorShadowZIndex, shadowWidth, _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, (0, _tokens.token)('elevation.shadow.overflow.spread', _colors.N40A), (0, _tokens.token)('elevation.shadow.overflow.perimeter', 'transparent'), _OverflowShadow.shadowClassNames.RIGHT_SHADOW, (0, _tokens.token)('elevation.shadow.overflow.spread', _colors.N40A), (0, _tokens.token)('elevation.shadow.overflow.perimeter', 'transparent'), shadowWidth, _shadowObserver.shadowObserverClassNames.SENTINEL_LEFT, _shadowObserver.shadowObserverClassNames.SENTINEL_RIGHT);
|
|
40
42
|
exports.shadowSharedStyle = shadowSharedStyle;
|
|
@@ -82,7 +82,7 @@ var tableSharedStyle = function tableSharedStyle(props) {
|
|
|
82
82
|
light: (0, _tokens.token)('color.background.neutral', 'rgb(235, 237, 240)'),
|
|
83
83
|
dark: (0, _tokens.token)('color.background.neutral', 'rgb(36, 47, 66)')
|
|
84
84
|
})(props),
|
|
85
|
-
|
|
85
|
+
leftCoverWidth: "".concat((0, _constants.gridSize)() * 3, "px")
|
|
86
86
|
}), (0, _components.themed)({
|
|
87
87
|
light: (0, _tokens.token)('color.background.neutral', 'rgb(235, 237, 240)'),
|
|
88
88
|
dark: (0, _tokens.token)('color.background.neutral', 'rgb(36, 47, 66)')
|
|
@@ -94,7 +94,7 @@ var tableSharedStyle = function tableSharedStyle(props) {
|
|
|
94
94
|
light: (0, _tokens.token)('color.background.neutral', 'rgb(235, 237, 240)'),
|
|
95
95
|
dark: (0, _tokens.token)('color.background.neutral', 'rgb(36, 47, 66)')
|
|
96
96
|
})(props),
|
|
97
|
-
|
|
97
|
+
leftCoverWidth: "".concat((0, _constants.gridSize)() * 3, "px")
|
|
98
98
|
}), (0, _components.themed)({
|
|
99
99
|
light: (0, _tokens.token)('color.background.neutral', 'rgb(235, 237, 240)'),
|
|
100
100
|
dark: (0, _tokens.token)('color.background.neutral', 'rgb(36, 47, 66)')
|
|
@@ -46,7 +46,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
46
46
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
47
47
|
|
|
48
48
|
var packageName = "@atlaskit/editor-common";
|
|
49
|
-
var packageVersion = "
|
|
49
|
+
var packageVersion = "72.0.0";
|
|
50
50
|
var halfFocusRing = 1;
|
|
51
51
|
var dropOffset = "0, ".concat((0, _constants.gridSize)(), "px");
|
|
52
52
|
|