@atlaskit/editor-common 71.0.3 → 72.0.1
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 +78 -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 +56 -6
- package/dist/cjs/styles/index.js +8 -2
- package/dist/cjs/styles/shared/annotation.js +9 -14
- package/dist/cjs/styles/shared/block-marks.js +1 -1
- package/dist/cjs/styles/shared/blockquote.js +1 -3
- package/dist/cjs/styles/shared/code-block.js +13 -16
- package/dist/cjs/styles/shared/code-mark.js +2 -4
- package/dist/cjs/styles/shared/lists.js +55 -4
- package/dist/cjs/styles/shared/panel.js +29 -39
- package/dist/cjs/styles/shared/rule.js +2 -4
- package/dist/cjs/styles/shared/shadow.js +1 -1
- package/dist/cjs/styles/shared/table.js +24 -26
- package/dist/cjs/types/next-editor-plugin.js +5 -0
- package/dist/cjs/ui/Caption/index.js +2 -4
- package/dist/cjs/ui/DropList/index.js +5 -7
- package/dist/cjs/ui/Emoji/index.js +11 -2
- package/dist/cjs/ui/Expand/index.js +17 -19
- package/dist/cjs/ui/Messages/index.js +3 -5
- 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 +3 -5
- package/dist/cjs/ui/UnsupportedInline/index.js +3 -5
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +138 -0
- package/dist/cjs/ui-color/ColorPalette/index.js +20 -2
- package/dist/cjs/ui-menu/DropdownMenu/index.js +12 -12
- 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 +48 -2
- package/dist/es2019/styles/index.js +1 -1
- package/dist/es2019/styles/shared/annotation.js +9 -13
- package/dist/es2019/styles/shared/block-marks.js +8 -1
- package/dist/es2019/styles/shared/blockquote.js +1 -2
- package/dist/es2019/styles/shared/code-block.js +18 -18
- package/dist/es2019/styles/shared/code-mark.js +2 -3
- package/dist/es2019/styles/shared/lists.js +44 -2
- package/dist/es2019/styles/shared/panel.js +29 -37
- package/dist/es2019/styles/shared/rule.js +2 -3
- package/dist/es2019/styles/shared/shadow.js +20 -6
- package/dist/es2019/styles/shared/table.js +24 -26
- package/dist/es2019/types/next-editor-plugin.js +1 -0
- package/dist/es2019/ui/Caption/index.js +2 -3
- package/dist/es2019/ui/DropList/index.js +5 -6
- package/dist/es2019/ui/Emoji/index.js +11 -2
- package/dist/es2019/ui/Expand/index.js +17 -18
- package/dist/es2019/ui/Messages/index.js +3 -4
- 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 +3 -4
- package/dist/es2019/ui/UnsupportedInline/index.js +3 -4
- package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +120 -0
- package/dist/es2019/ui-color/ColorPalette/index.js +29 -13
- package/dist/es2019/ui-menu/DropdownMenu/index.js +13 -12
- 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 +49 -2
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/styles/shared/annotation.js +9 -13
- package/dist/esm/styles/shared/block-marks.js +1 -1
- package/dist/esm/styles/shared/blockquote.js +1 -2
- package/dist/esm/styles/shared/code-block.js +13 -15
- package/dist/esm/styles/shared/code-mark.js +2 -3
- package/dist/esm/styles/shared/lists.js +49 -2
- package/dist/esm/styles/shared/panel.js +29 -37
- package/dist/esm/styles/shared/rule.js +2 -3
- package/dist/esm/styles/shared/shadow.js +1 -2
- package/dist/esm/styles/shared/table.js +24 -26
- package/dist/esm/types/next-editor-plugin.js +1 -0
- package/dist/esm/ui/Caption/index.js +2 -3
- package/dist/esm/ui/DropList/index.js +5 -6
- package/dist/esm/ui/Emoji/index.js +11 -2
- package/dist/esm/ui/Expand/index.js +17 -18
- package/dist/esm/ui/Messages/index.js +3 -4
- 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 +2 -3
- package/dist/esm/ui/UnsupportedInline/index.js +2 -3
- package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +124 -0
- package/dist/esm/ui-color/ColorPalette/index.js +19 -3
- package/dist/esm/ui-menu/DropdownMenu/index.js +12 -11
- 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,83 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 72.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4a2a04ee176`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4a2a04ee176) - Internal refactor of panel color logic to support design token babel plugin
|
|
8
|
+
- [`6455cf006b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6455cf006b3) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving performance.
|
|
9
|
+
|
|
10
|
+
## 72.0.0
|
|
11
|
+
|
|
12
|
+
### Major Changes
|
|
13
|
+
|
|
14
|
+
- [`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
|
|
15
|
+
|
|
16
|
+
## **DEPRECATION WARNING:**
|
|
17
|
+
|
|
18
|
+
There's two deprecations in this change:
|
|
19
|
+
|
|
20
|
+
### 1. Remove `keyboardAccessibleDatepicker` and the `allowKeyboardAccessibleDatepicker` feature flag
|
|
21
|
+
|
|
22
|
+
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:
|
|
23
|
+
|
|
24
|
+
### 2. Remove the `showTextField` prop on the DatePicker
|
|
25
|
+
|
|
26
|
+
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.
|
|
27
|
+
|
|
28
|
+
Since no code related to this feature flag remains, there are no inline deprecation warnings.
|
|
29
|
+
|
|
30
|
+
- [`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.
|
|
31
|
+
|
|
32
|
+
Note: restartNumberedLists will be off by default. To enable it, consumers will need to set <Editor featureFlags={{ restartNumberedLists: true }}> or <Renderer featureFlags={{ restartNumberedLists: true }}>
|
|
33
|
+
|
|
34
|
+
### Minor Changes
|
|
35
|
+
|
|
36
|
+
- [`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
|
|
37
|
+
- [`a730df6e3ed`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a730df6e3ed) - ED-16163 Refactored analytics constants to be in editor-common
|
|
38
|
+
- [`5307b130e91`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5307b130e91) - Cleaned up placeholder lint feature as it was no longer being used
|
|
39
|
+
- [`195fa69b80a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/195fa69b80a) - Minor referentiality util housekeeping
|
|
40
|
+
- [`4ed695c539e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ed695c539e) - Renamed Popup prop preventTopOverflow to preventOverflow used for both vertical and horizontal placement now
|
|
41
|
+
- [`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.
|
|
42
|
+
- [`8820442c2b2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8820442c2b2) - [ux] ED-15709: add feature for delete element if it is `isReferencedSource` is `true`
|
|
43
|
+
|
|
44
|
+
- add checkbox confirmation dialog when then config have `isReferentiality.`
|
|
45
|
+
- add referentiality helper functions.
|
|
46
|
+
- update confirmDialog config to a handler to reduce traverse times.
|
|
47
|
+
- user can now tick checkbox to delete descendent nodes or only selected node when user click the delete icon in floating toolbar.
|
|
48
|
+
|
|
49
|
+
- [`1d41bbc2965`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1d41bbc2965) - This changeset introduces non breaking changes to support ssr within the loader emoji component
|
|
50
|
+
- [`651dee737d2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/651dee737d2) - ED-15301 Added initial preset builder types
|
|
51
|
+
- [`d2c62b69a6a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d2c62b69a6a) - [ux] Adds support to floating toolbar configuration to enable trapping focus within the Popup.
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- [`2fd53283b55`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2fd53283b55) - Updated i18n language files
|
|
56
|
+
- [`a70436952a6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a70436952a6) - [ED-15980] Reinstate unsupportedContentEncountered event
|
|
57
|
+
- [`3a54fce9ade`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a54fce9ade) - DSP-4513 Updated tokens used to render annotations.
|
|
58
|
+
|
|
59
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in beta).
|
|
60
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
61
|
+
|
|
62
|
+
- [`9940267512c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9940267512c) - [ED-15979] Fix column sorting when comparing text with mixed alpha and numeric values
|
|
63
|
+
- [`a838c2e281e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a838c2e281e) - [ux] ED-15959 Migrate panel to use editor-palette package for background colours.
|
|
64
|
+
- [`60068f7fcbe`](https://bitbucket.org/atlassian/atlassian-frontend/commits/60068f7fcbe) - [ED-16007] Changes made to improve the floating toolbar's keyboard accessibility
|
|
65
|
+
- [`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.
|
|
66
|
+
- [`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.
|
|
67
|
+
- [`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.
|
|
68
|
+
- [`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
|
|
69
|
+
- [`7fd5785d37d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7fd5785d37d) - [ESS-2752] Fix clientId type derived from prosemirror-collab
|
|
70
|
+
- [`b2fa6d3e611`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b2fa6d3e611) - [ED-16106] Fix margin top when paragraph has alignment marks
|
|
71
|
+
- [`e4089f2c471`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e4089f2c471) - Modified toolbar buttons to read out keyboard shortcuts by screen readers.
|
|
72
|
+
- [`4fbaeb2a1fd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4fbaeb2a1fd) - DSP-4118 Updated tokens used to render overflow shadows in code blocks.
|
|
73
|
+
|
|
74
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in beta).
|
|
75
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
76
|
+
|
|
77
|
+
`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.
|
|
78
|
+
|
|
79
|
+
- Updated dependencies
|
|
80
|
+
|
|
3
81
|
## 71.0.3
|
|
4
82
|
|
|
5
83
|
### 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"));
|
|
@@ -102,8 +106,6 @@ var _react2 = require("@emotion/react");
|
|
|
102
106
|
|
|
103
107
|
var _colors = require("@atlaskit/theme/colors");
|
|
104
108
|
|
|
105
|
-
var _tokens = require("@atlaskit/tokens");
|
|
106
|
-
|
|
107
109
|
var _utils = require("../utils");
|
|
108
110
|
|
|
109
111
|
var _consts = require("./consts");
|
|
@@ -112,7 +114,7 @@ var _templateObject;
|
|
|
112
114
|
|
|
113
115
|
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
116
|
|
|
115
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
117
|
+
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
118
|
|
|
117
119
|
var addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
|
|
118
120
|
exports.addAltText = addAltText;
|
|
@@ -245,7 +247,7 @@ var arrowKeysMap = {
|
|
|
245
247
|
ARROWUP: "\u2191",
|
|
246
248
|
ARROWDOWN: "\u2193"
|
|
247
249
|
};
|
|
248
|
-
var tooltipShortcutStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 2px;\n background-color: ", ";\n padding: 0 2px;\n\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: tooltip-shortcut;\n"])), (
|
|
250
|
+
var tooltipShortcutStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 2px;\n background-color: ", ";\n padding: 0 2px;\n\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: tooltip-shortcut;\n"])), "var(--ds-background-inverse-subtle, ".concat(_colors.N400, ")"));
|
|
249
251
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
250
252
|
|
|
251
253
|
function formatShortcut(keymap) {
|
|
@@ -316,6 +318,54 @@ function findShortcutByKeymap(keymap) {
|
|
|
316
318
|
return keymap.windows;
|
|
317
319
|
}
|
|
318
320
|
|
|
321
|
+
function getAriaKeyshortcuts(keymap) {
|
|
322
|
+
var keyShortcuts;
|
|
323
|
+
|
|
324
|
+
if (typeof keymap === 'string') {
|
|
325
|
+
keyShortcuts = keymap;
|
|
326
|
+
} else if ((0, _typeof2.default)(keymap) === 'object') {
|
|
327
|
+
keyShortcuts = keymap[_utils.browser.mac ? 'mac' : 'windows'];
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (keyShortcuts) {
|
|
331
|
+
return keyShortcuts.toLowerCase().split('-').map(function (modifier) {
|
|
332
|
+
switch (modifier) {
|
|
333
|
+
case 'cmd':
|
|
334
|
+
return 'Meta';
|
|
335
|
+
|
|
336
|
+
case 'ctrl':
|
|
337
|
+
return 'Control';
|
|
338
|
+
|
|
339
|
+
case 'alt':
|
|
340
|
+
return 'Alt';
|
|
341
|
+
|
|
342
|
+
case 'shift':
|
|
343
|
+
return 'Shift';
|
|
344
|
+
|
|
345
|
+
case 'enter':
|
|
346
|
+
return 'Enter';
|
|
347
|
+
|
|
348
|
+
case 'esc':
|
|
349
|
+
return 'Esc';
|
|
350
|
+
|
|
351
|
+
case 'tab':
|
|
352
|
+
return 'Tab';
|
|
353
|
+
|
|
354
|
+
case 'space':
|
|
355
|
+
return 'Space';
|
|
356
|
+
|
|
357
|
+
case 'backspace':
|
|
358
|
+
return 'Backspace';
|
|
359
|
+
|
|
360
|
+
default:
|
|
361
|
+
return modifier.split('').join(' ');
|
|
362
|
+
}
|
|
363
|
+
}).join('+');
|
|
364
|
+
} else {
|
|
365
|
+
return undefined;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
319
369
|
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
370
|
|
|
321
371
|
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", {
|
|
@@ -15,8 +15,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
15
15
|
|
|
16
16
|
var _components = require("@atlaskit/theme/components");
|
|
17
17
|
|
|
18
|
-
var _tokens = require("@atlaskit/tokens");
|
|
19
|
-
|
|
20
18
|
var _templateObject, _templateObject2, _templateObject3;
|
|
21
19
|
|
|
22
20
|
var annotationPrefix = 'ak-editor-annotation';
|
|
@@ -36,23 +34,20 @@ var DY200 = '#82641c';
|
|
|
36
34
|
|
|
37
35
|
var AnnotationSharedCSSByState = function AnnotationSharedCSSByState(props) {
|
|
38
36
|
return {
|
|
39
|
-
/* eslint-disable */
|
|
40
37
|
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
|
|
38
|
+
light: "var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"),
|
|
39
|
+
dark: "var(--ds-background-accent-yellow-subtler, ".concat(DY75, ")")
|
|
43
40
|
})(props), (0, _components.themed)({
|
|
44
|
-
light: (
|
|
45
|
-
dark: (
|
|
46
|
-
})(props), (
|
|
41
|
+
light: "var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")"),
|
|
42
|
+
dark: "var(--ds-border-accent-yellow, ".concat(DY300, ")")
|
|
43
|
+
})(props), "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A), ")")),
|
|
47
44
|
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
|
|
45
|
+
light: "var(--ds-background-accent-yellow-subtlest, ".concat(Y75a, ")"),
|
|
46
|
+
dark: "var(--ds-background-accent-yellow-subtlest, ".concat(DY75a, ")")
|
|
50
47
|
})(props), (0, _components.themed)({
|
|
51
|
-
light: (
|
|
52
|
-
dark: (
|
|
48
|
+
light: "var(--ds-border-accent-yellow, ".concat(Y200a, ")"),
|
|
49
|
+
dark: "var(--ds-border-accent-yellow, ".concat(DY200, ")")
|
|
53
50
|
})(props))
|
|
54
|
-
/* eslint-enable */
|
|
55
|
-
|
|
56
51
|
};
|
|
57
52
|
};
|
|
58
53
|
|
|
@@ -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;
|
|
@@ -15,9 +15,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
15
15
|
|
|
16
16
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
17
|
|
|
18
|
-
var _tokens = require("@atlaskit/tokens");
|
|
19
|
-
|
|
20
18
|
var _templateObject;
|
|
21
19
|
|
|
22
|
-
var blockquoteSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & blockquote {\n box-sizing: border-box;\n padding-left: ", "px;\n border-left: 2px solid\n ", ";\n margin: ", " 0 0 0;\n margin-right: 0;\n\n [dir='rtl'] & {\n padding-left: 0;\n padding-right: ", "px;\n }\n\n &:first-child {\n margin-top: 0;\n }\n\n &::before {\n content: '';\n }\n\n &::after {\n content: none;\n }\n\n & p {\n display: block;\n }\n\n & table,\n & table:last-child {\n display: inline-table;\n }\n }\n"])), (0, _constants.gridSize)() * 2, (
|
|
20
|
+
var blockquoteSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & blockquote {\n box-sizing: border-box;\n padding-left: ", "px;\n border-left: 2px solid\n ", ";\n margin: ", " 0 0 0;\n margin-right: 0;\n\n [dir='rtl'] & {\n padding-left: 0;\n padding-right: ", "px;\n }\n\n &:first-child {\n margin-top: 0;\n }\n\n &::before {\n content: '';\n }\n\n &::after {\n content: none;\n }\n\n & p {\n display: block;\n }\n\n & table,\n & table:last-child {\n display: inline-table;\n }\n }\n"])), (0, _constants.gridSize)() * 2, "var(--ds-border, ".concat(_editorSharedStyles.akEditorBlockquoteBorderColor, ")"), _editorSharedStyles.blockNodesVerticalMargin, (0, _constants.gridSize)() * 2);
|
|
23
21
|
exports.blockquoteSharedStyles = blockquoteSharedStyles;
|
|
@@ -19,8 +19,6 @@ var _components = require("@atlaskit/theme/components");
|
|
|
19
19
|
|
|
20
20
|
var _constants = require("@atlaskit/theme/constants");
|
|
21
21
|
|
|
22
|
-
var _tokens = require("@atlaskit/tokens");
|
|
23
|
-
|
|
24
22
|
var _templateObject, _templateObject2;
|
|
25
23
|
|
|
26
24
|
var CodeBlockSharedCssClassName = {
|
|
@@ -35,25 +33,24 @@ var CodeBlockSharedCssClassName = {
|
|
|
35
33
|
exports.CodeBlockSharedCssClassName = CodeBlockSharedCssClassName;
|
|
36
34
|
|
|
37
35
|
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:
|
|
39
|
-
light: (
|
|
40
|
-
dark: (
|
|
36
|
+
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, "var(--ds-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)({
|
|
37
|
+
light: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
|
|
38
|
+
dark: "var(--ds-background-neutral, ".concat(_colors.DN50, ")")
|
|
41
39
|
})(props), (0, _constants.borderRadius)(), (0, _editorSharedStyles.overflowShadow)({
|
|
42
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-4118
|
|
43
40
|
background: (0, _components.themed)({
|
|
44
|
-
light: (
|
|
45
|
-
dark: (
|
|
41
|
+
light: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
|
|
42
|
+
dark: "var(--ds-background-neutral, ".concat(_colors.DN50, ")")
|
|
46
43
|
})(props),
|
|
47
|
-
|
|
48
|
-
}), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, (0, _components.themed)({
|
|
49
|
-
light: (
|
|
50
|
-
dark: (
|
|
44
|
+
leftCoverWidth: "".concat((0, _constants.gridSize)() * 3, "px")
|
|
45
|
+
}), (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)({
|
|
46
|
+
light: "var(--ds-background-neutral, ".concat(_colors.N30, ")"),
|
|
47
|
+
dark: "var(--ds-background-neutral, ".concat(_colors.DN20, ")")
|
|
51
48
|
})(props), (0, _constants.gridSize)(), (0, _components.themed)({
|
|
52
|
-
light: (
|
|
53
|
-
dark: (
|
|
49
|
+
light: "var(--ds-text-subtlest, ".concat(_colors.N400, ")"),
|
|
50
|
+
dark: "var(--ds-text-subtlest, ".concat(_colors.DN400, ")")
|
|
54
51
|
})(props), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, (0, _components.themed)({
|
|
55
|
-
light: (
|
|
56
|
-
dark: (
|
|
52
|
+
light: "var(--ds-text, ".concat(_colors.N800, ")"),
|
|
53
|
+
dark: "var(--ds-text, ".concat(_colors.DN800, ")")
|
|
57
54
|
})(props), (0, _constants.borderRadius)(), (0, _constants.gridSize)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
|
|
58
55
|
};
|
|
59
56
|
|
|
@@ -17,15 +17,13 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
|
|
18
18
|
var _components = require("@atlaskit/theme/components");
|
|
19
19
|
|
|
20
|
-
var _tokens = require("@atlaskit/tokens");
|
|
21
|
-
|
|
22
20
|
var _templateObject;
|
|
23
21
|
|
|
24
22
|
var codeMarkSharedStyles = function codeMarkSharedStyles(props) {
|
|
25
23
|
var theme = (0, _components.getTheme)(props);
|
|
26
24
|
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .code {\n --ds--code--bg-color: ", ";\n ", "\n }\n "])), (0, _components.themed)({
|
|
27
|
-
light: (
|
|
28
|
-
dark: (
|
|
25
|
+
light: "var(--ds-background-neutral, ".concat(_colors.N30A, ")"),
|
|
26
|
+
dark: "var(--ds-background-neutral, ".concat(_colors.DN70, ")")
|
|
29
27
|
})(props), (0, _inline.getCodeStyles)(theme));
|
|
30
28
|
};
|
|
31
29
|
|
|
@@ -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;
|