@atlaskit/editor-core 221.5.12 → 221.6.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.
Files changed (22) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +54 -0
  3. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +13 -1
  4. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +16 -2
  5. package/dist/cjs/ui/EditorContentContainer/styles/blockSpacingStyles.js +113 -0
  6. package/dist/cjs/ui/EditorContentContainer/styles/tableStyles.js +47 -1
  7. package/dist/cjs/version-wrapper.js +1 -1
  8. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +54 -0
  9. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +13 -1
  10. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +17 -3
  11. package/dist/es2019/ui/EditorContentContainer/styles/blockSpacingStyles.js +114 -0
  12. package/dist/es2019/ui/EditorContentContainer/styles/tableStyles.js +46 -0
  13. package/dist/es2019/version-wrapper.js +1 -1
  14. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +54 -0
  15. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +13 -1
  16. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +17 -3
  17. package/dist/esm/ui/EditorContentContainer/styles/blockSpacingStyles.js +106 -0
  18. package/dist/esm/ui/EditorContentContainer/styles/tableStyles.js +46 -0
  19. package/dist/esm/version-wrapper.js +1 -1
  20. package/dist/types/ui/EditorContentContainer/styles/blockSpacingStyles.d.ts +18 -0
  21. package/dist/types/ui/EditorContentContainer/styles/tableStyles.d.ts +7 -0
  22. package/package.json +12 -9
@@ -0,0 +1,106 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled,
3
+ @atlaskit/ui-styling-standard/no-exported-styles,
4
+ @atlaskit/ui-styling-standard/no-nested-selectors,
5
+ @atlaskit/ui-styling-standard/no-unsafe-values,
6
+ @atlaskit/ui-styling-standard/no-unsafe-selectors,
7
+ @atlaskit/ui-styling-standard/no-imported-style-values */
8
+ import { css } from '@emotion/react';
9
+ import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
10
+
11
+ /**
12
+ * Emotion mirror of the block-spacing styles in EditorContentContainer-compiled.tsx.
13
+ *
14
+ * Re-declares the block-element vertical margins so they read from the
15
+ * --ak-editor-extension-block-spacing CSS custom property (falling back to the original
16
+ * 0.75rem). This is applied LAST in the Emotion container's css array, and only when
17
+ * the platform_editor_extension_block_spacing experiment is enabled, so it overrides
18
+ * the base block margins by source order without affecting the experiment-off behaviour.
19
+ *
20
+ * Keep this in sync with the block-spacing styles in EditorContentContainer-compiled.tsx.
21
+ */
22
+ export var blockSpacingVarStyles = css({
23
+ '.ProseMirror': _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
24
+ // paragraphs
25
+ p: {
26
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
27
+ },
28
+ // SSR reset rule (mirrors listsStyles `& > style:first-child + p`) so the first
29
+ // paragraph after an SSR style tag also honours the spacing var.
30
+ '& > style:first-child + p': {
31
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
32
+ },
33
+ // blockquotes — base also zeroes the first blockquote's top margin.
34
+ '& blockquote': {
35
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)',
36
+ '&:first-child': {
37
+ marginTop: 0
38
+ }
39
+ }
40
+ }, ".".concat(CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER), {
41
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
42
+ }), "li", {
43
+ '> .code-block': {
44
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
45
+ },
46
+ '> .code-block:first-child, > .ProseMirror-gapcursor:first-child + .code-block': {
47
+ marginTop: 0
48
+ },
49
+ '> div:last-of-type.code-block, > pre:last-of-type.code-block': {
50
+ marginBottom: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
51
+ }
52
+ }), '.blockCardView-content-wrap', {
53
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
54
+ }), '.extensionView-content-wrap, .multiBodiedExtensionView-content-wrap, .bodiedExtensionView-content-wrap', {
55
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)',
56
+ marginBottom: 'var(--ak-editor-extension-block-spacing, 0.75rem)',
57
+ '&:first-of-type': {
58
+ marginTop: 0
59
+ },
60
+ '&:last-of-type': {
61
+ marginBottom: 0
62
+ }
63
+ }), "[data-mark-type='fragment']", {
64
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
65
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)',
66
+ marginBottom: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
67
+ },
68
+ "& > [data-mark-type='dataConsumer']": {
69
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
70
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)',
71
+ marginBottom: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
72
+ }
73
+ },
74
+ '&:first-child': {
75
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
76
+ marginTop: 0
77
+ },
78
+ "& > [data-mark-type='dataConsumer']": {
79
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
80
+ marginTop: 0
81
+ }
82
+ }
83
+ },
84
+ '&:nth-last-of-type(-n + 2):not(:first-of-type)': {
85
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
86
+ marginBottom: 0
87
+ },
88
+ "& > [data-mark-type='dataConsumer']": {
89
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
90
+ marginBottom: 0
91
+ }
92
+ }
93
+ }
94
+ })
95
+ });
96
+
97
+ /**
98
+ * Scaled (em-based) variant of the block-spacing styles for dense/scaled paragraph contexts.
99
+ * Keep this in sync with the scaled block-spacing styles in EditorContentContainer-compiled.tsx.
100
+ */
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/volt-strict-mode/no-multiple-exports
102
+ export var blockSpacingVarScaledStyles = css({
103
+ '.ProseMirror p': {
104
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75em)'
105
+ }
106
+ });
@@ -152,6 +152,52 @@ export var tableContentModeStyles = css({
152
152
  width: 'unset !important'
153
153
  }
154
154
  });
155
+
156
+ /**
157
+ * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
158
+ * If you need to make changes here, also update the corresponding style in
159
+ * packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
160
+ * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
161
+ */
162
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/volt-strict-mode/no-multiple-exports
163
+ export var tableContentModeNestedTableStyles = css({
164
+ // Reset the base `margin-right: -1px` (ED-16212) that clips content-mode tables by 1px.
165
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
166
+ '.ProseMirror .pm-table-wrapper table[data-initial-width-mode="content"]': {
167
+ maxWidth: 'none',
168
+ marginRight: 0
169
+ },
170
+ // Let the resizer/wrapper chain grow to content width before the max-width cap.
171
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
172
+ '.resizer-item:has(table[data-initial-width-mode="content"]), .pm-table-container:has(> .pm-table-wrapper > table[data-initial-width-mode="content"]), .pm-table-wrapper:has(> table[data-initial-width-mode="content"])': {
173
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
174
+ width: 'max-content !important',
175
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
176
+ maxWidth: 'var(--ak-editor-table-max-width) !important'
177
+ },
178
+ // Nested content-mode table: size to content, reset base max-width and margin.
179
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
180
+ '.ProseMirror table[data-initial-width-mode="content"] > tbody > tr > :is(th, td) .pm-table-container > .pm-table-wrapper > table': {
181
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
182
+ width: 'max-content !important',
183
+ maxWidth: 'none',
184
+ marginRight: 0
185
+ },
186
+ // Stop nested table col widths from constraining parent table measurement.
187
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
188
+ '.ProseMirror table[data-initial-width-mode="content"] > tbody > tr > :is(th, td) .pm-table-container > .pm-table-wrapper > table > colgroup > col': {
189
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
190
+ width: 'unset !important'
191
+ },
192
+ // Let the nested table container/wrapper grow to content width before the cap.
193
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
194
+ '.ProseMirror table[data-initial-width-mode="content"] > tbody > tr > :is(th, td) .pm-table-container, .ProseMirror table[data-initial-width-mode="content"] > tbody > tr > :is(th, td) .pm-table-container > .pm-table-wrapper': {
195
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
196
+ width: 'max-content !important',
197
+ maxWidth: 'none',
198
+ overflowX: 'visible'
199
+ }
200
+ });
155
201
  /**
156
202
  * SSR-safe rounded corners for the outermost table cells.
157
203
  *
@@ -1,3 +1,3 @@
1
1
  export var name = "@atlaskit/editor-core";
2
2
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
3
- export var version = "221.5.11";
3
+ export var version = "221.5.13";
@@ -0,0 +1,18 @@
1
+ import type { SerializedStyles } from '@emotion/react';
2
+ /**
3
+ * Emotion mirror of the block-spacing styles in EditorContentContainer-compiled.tsx.
4
+ *
5
+ * Re-declares the block-element vertical margins so they read from the
6
+ * --ak-editor-extension-block-spacing CSS custom property (falling back to the original
7
+ * 0.75rem). This is applied LAST in the Emotion container's css array, and only when
8
+ * the platform_editor_extension_block_spacing experiment is enabled, so it overrides
9
+ * the base block margins by source order without affecting the experiment-off behaviour.
10
+ *
11
+ * Keep this in sync with the block-spacing styles in EditorContentContainer-compiled.tsx.
12
+ */
13
+ export declare const blockSpacingVarStyles: SerializedStyles;
14
+ /**
15
+ * Scaled (em-based) variant of the block-spacing styles for dense/scaled paragraph contexts.
16
+ * Keep this in sync with the scaled block-spacing styles in EditorContentContainer-compiled.tsx.
17
+ */
18
+ export declare const blockSpacingVarScaledStyles: SerializedStyles;
@@ -48,6 +48,13 @@ export declare const tableEmptyRowStyles: SerializedStyles;
48
48
  * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
49
49
  */
50
50
  export declare const tableContentModeStyles: SerializedStyles;
51
+ /**
52
+ * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
53
+ * If you need to make changes here, also update the corresponding style in
54
+ * packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
55
+ * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
56
+ */
57
+ export declare const tableContentModeNestedTableStyles: SerializedStyles;
51
58
  /**
52
59
  * SSR-safe rounded corners for the outermost table cells.
53
60
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "221.5.12",
3
+ "version": "221.6.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/adf-schema": "^56.0.0",
42
42
  "@atlaskit/afm-i18n-platform-editor-editor-core": "2.168.0",
43
43
  "@atlaskit/analytics-namespaced-context": "^8.1.0",
44
- "@atlaskit/analytics-next": "^12.1.0",
44
+ "@atlaskit/analytics-next": "^12.2.0",
45
45
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
46
46
  "@atlaskit/button": "^24.3.0",
47
47
  "@atlaskit/css": "^1.0.0",
@@ -60,15 +60,15 @@
60
60
  "@atlaskit/feature-gate-js-client": "^6.0.0",
61
61
  "@atlaskit/icon": "^36.1.0",
62
62
  "@atlaskit/link": "^4.1.0",
63
- "@atlaskit/media-card": "^81.2.0",
63
+ "@atlaskit/media-card": "^81.3.0",
64
64
  "@atlaskit/mention": "^27.5.0",
65
65
  "@atlaskit/platform-feature-flags": "^2.0.0",
66
66
  "@atlaskit/platform-feature-flags-react": "^1.1.0",
67
67
  "@atlaskit/react-compiler-gating": "^0.2.0",
68
68
  "@atlaskit/react-ufo": "^7.3.0",
69
69
  "@atlaskit/task-decision": "^21.4.0",
70
- "@atlaskit/tmp-editor-statsig": "^120.1.0",
71
- "@atlaskit/tokens": "^15.3.0",
70
+ "@atlaskit/tmp-editor-statsig": "^120.2.0",
71
+ "@atlaskit/tokens": "^15.4.0",
72
72
  "@atlaskit/tooltip": "^23.1.0",
73
73
  "@atlaskit/width-detector": "^6.1.0",
74
74
  "@babel/runtime": "^7.0.0",
@@ -85,8 +85,8 @@
85
85
  "uuid": "^3.1.0"
86
86
  },
87
87
  "peerDependencies": {
88
- "@atlaskit/editor-common": "^116.21.0",
89
- "@atlaskit/link-provider": "^5.1.0",
88
+ "@atlaskit/editor-common": "^116.22.0",
89
+ "@atlaskit/link-provider": "^5.2.0",
90
90
  "@atlaskit/media-core": "^38.0.0",
91
91
  "react": "^18.2.0",
92
92
  "react-dom": "^18.2.0",
@@ -105,7 +105,7 @@
105
105
  "@atlaskit/editor-plugin-list": "^14.1.0",
106
106
  "@atlaskit/editor-plugin-paste": "^13.3.0",
107
107
  "@atlaskit/editor-test-helpers": "workspace:^",
108
- "@atlaskit/link-provider": "^5.1.0",
108
+ "@atlaskit/link-provider": "^5.2.0",
109
109
  "@atlaskit/linking-common": "^11.0.0",
110
110
  "@atlaskit/logo": "^21.3.0",
111
111
  "@atlaskit/media-core": "^38.0.0",
@@ -124,7 +124,7 @@
124
124
  "@atlassian/adf-schema-json": "^1.33.0",
125
125
  "@atlassian/editor-rovo-bridge": "^10.2.0",
126
126
  "@atlassian/feature-flags-test-utils": "^1.1.0",
127
- "@atlassian/search-client": "^1.24.0",
127
+ "@atlassian/search-client": "^1.25.0",
128
128
  "@atlassian/search-provider": "^13.0.0",
129
129
  "@atlassian/structured-docs-types": "workspace:^",
130
130
  "@atlassian/user-profile-card": "^1.17.0",
@@ -188,6 +188,9 @@
188
188
  "platform_editor_table_auto_convert_fix": {
189
189
  "type": "boolean"
190
190
  },
191
+ "platform_editor_table_nested_renderer_fix": {
192
+ "type": "boolean"
193
+ },
191
194
  "platform_editor_toolbar_mode_override": {
192
195
  "type": "boolean"
193
196
  },