@atlaskit/editor-core 236.0.2 → 236.0.5

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 (30) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cjs/presets/default.js +4 -3
  3. package/dist/cjs/presets/universal.js +6 -5
  4. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +2 -1
  5. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +3 -14
  6. package/dist/cjs/version-wrapper.js +1 -1
  7. package/dist/es2019/presets/default.js +4 -3
  8. package/dist/es2019/presets/universal.js +6 -5
  9. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +2 -1
  10. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +3 -14
  11. package/dist/es2019/version-wrapper.js +1 -1
  12. package/dist/esm/presets/default.js +4 -3
  13. package/dist/esm/presets/universal.js +6 -5
  14. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +2 -1
  15. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +3 -14
  16. package/dist/esm/version-wrapper.js +1 -1
  17. package/dist/types/presets/universal.d.ts +1 -0
  18. package/package.json +6 -9
  19. package/dist/cjs/ui/EditorContentContainer/styles/contributorTagStyles.js +0 -80
  20. package/dist/cjs/ui/EditorContentContainer/styles/extensionBreakoutStyles.js +0 -29
  21. package/dist/cjs/ui/EditorContentContainer/styles/ruleWithAttrs.js +0 -92
  22. package/dist/es2019/ui/EditorContentContainer/styles/contributorTagStyles.js +0 -74
  23. package/dist/es2019/ui/EditorContentContainer/styles/extensionBreakoutStyles.js +0 -23
  24. package/dist/es2019/ui/EditorContentContainer/styles/ruleWithAttrs.js +0 -86
  25. package/dist/esm/ui/EditorContentContainer/styles/contributorTagStyles.js +0 -74
  26. package/dist/esm/ui/EditorContentContainer/styles/extensionBreakoutStyles.js +0 -23
  27. package/dist/esm/ui/EditorContentContainer/styles/ruleWithAttrs.js +0 -86
  28. package/dist/types/ui/EditorContentContainer/styles/contributorTagStyles.d.ts +0 -12
  29. package/dist/types/ui/EditorContentContainer/styles/extensionBreakoutStyles.d.ts +0 -8
  30. package/dist/types/ui/EditorContentContainer/styles/ruleWithAttrs.d.ts +0 -2
@@ -1,86 +0,0 @@
1
- /* eslint-disable @atlaskit/design-system/use-tokens-shape,
2
- @repo/internal/deprecations/deprecation-ticket-required,
3
- @atlaskit/ui-styling-standard/no-exported-styles */
4
- /* eslint-disable @atlaskit/ui-styling-standard/use-compiled */
5
-
6
- import { css } from '@emotion/react';
7
- const dashedStrokeMask = 'linear-gradient(to right, black 0, black 4px, transparent 4px, transparent 10px)';
8
- const fadeStrokeMask = 'linear-gradient(to right, transparent 0%, black 27.4%, black 74%, transparent 100%)';
9
-
10
- // dotted strokes
11
- const dottedStrokeMaskSmall = 'radial-gradient(circle at center, black 0.5px, transparent 0.6px)';
12
- const dottedStrokeMaskMedium = 'radial-gradient(circle at center, black 1px, transparent 1.1px)';
13
- const dottedStrokeMaskLarge = 'radial-gradient(circle at center, black 1.5px, transparent 1.6px)';
14
-
15
- // sketch strokes
16
- const sketchStrokePath = 'M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107';
17
- const sketchStrokeMaskSmall = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' d='${sketchStrokePath}'/%3E%3C/svg%3E")`;
18
- const sketchStrokeMaskMedium = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='${sketchStrokePath}'/%3E%3C/svg%3E")`;
19
- const sketchStrokeMaskLarge = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -1 233 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' d='${sketchStrokePath}'/%3E%3C/svg%3E")`;
20
-
21
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
22
- export const ruleWithAttrsStyles = css({
23
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
24
- '.ProseMirror hr[data-color]': {
25
- backgroundColor: 'var(--custom-palette-color)'
26
- },
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
28
- '.ProseMirror hr[data-style="dashed"]': {
29
- maskImage: dashedStrokeMask,
30
- maskRepeat: 'repeat-x',
31
- maskSize: '10px 100%'
32
- },
33
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
34
- '.ProseMirror hr[data-style="dotted"]': {
35
- maskImage: dottedStrokeMaskMedium,
36
- maskPosition: 'center',
37
- maskRepeat: 'repeat-x',
38
- maskSize: '6px 2px'
39
- },
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
41
- '.ProseMirror hr[data-style="sketch"]': {
42
- height: `calc(2px + ${"var(--ds-space-050, 4px)"} + ${"var(--ds-space-050, 4px)"})`,
43
- maskImage: sketchStrokeMaskMedium,
44
- maskPosition: 'center',
45
- maskRepeat: 'repeat-x',
46
- maskSize: '233px 7px',
47
- paddingTop: 0,
48
- paddingBottom: 0
49
- },
50
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
51
- '.ProseMirror hr[data-style="fade"]': {
52
- maskImage: fadeStrokeMask,
53
- maskRepeat: 'no-repeat',
54
- maskSize: '100% 100%'
55
- },
56
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
57
- '.ProseMirror hr[data-weight="1"]': {
58
- height: '1px'
59
- },
60
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
61
- '.ProseMirror hr[data-weight="3"]': {
62
- height: '3px'
63
- },
64
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
65
- '.ProseMirror hr[data-style="dotted"][data-weight="1"]': {
66
- maskImage: dottedStrokeMaskSmall,
67
- maskSize: '6px 1px'
68
- },
69
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
70
- '.ProseMirror hr[data-style="dotted"][data-weight="3"]': {
71
- maskImage: dottedStrokeMaskLarge,
72
- maskSize: '6px 3px'
73
- },
74
- // Sketch needs a mask per weight because CSS cannot change the SVG stroke width.
75
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
76
- '.ProseMirror hr[data-style="sketch"][data-weight="1"]': {
77
- height: `calc(1px + ${"var(--ds-space-050, 4px)"} + ${"var(--ds-space-050, 4px)"})`,
78
- maskImage: sketchStrokeMaskSmall
79
- },
80
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
81
- '.ProseMirror hr[data-style="sketch"][data-weight="3"]': {
82
- height: `calc(3px + ${"var(--ds-space-050, 4px)"} + ${"var(--ds-space-050, 4px)"})`,
83
- maskImage: sketchStrokeMaskLarge,
84
- maskSize: '233px 8px'
85
- }
86
- });
@@ -1,74 +0,0 @@
1
- /* eslint-disable @atlaskit/ui-styling-standard/use-compiled,
2
- @repo/internal/deprecations/deprecation-ticket-required,
3
- @atlaskit/ui-styling-standard/no-exported-styles */
4
-
5
- import { css } from '@emotion/react';
6
- /**
7
- * Fade-and-rise for the contributor tags `editor-plugin-show-diff` draws above a change, plus the
8
- * hidden state it starts from — an inline `opacity` would outrank this rule, so both ends live here.
9
- *
10
- * Keyed on the literals the plugin writes (`CONTRIBUTOR_TAG_CLASS`,
11
- * `CONTRIBUTOR_TAG_REVEALED_ATTRIBUTE`), so rename in step. Keep in sync with the
12
- * `contributorTagStyles` entry in `EditorContentContainer-compiled.tsx`.
13
- *
14
- * Gated behind `confluence_ncs_step_diffing_version_history`, where the tags render.
15
- */
16
- export var contributorTagStyles = css({
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
18
- '.ProseMirror': {
19
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
20
- '.ak-editor-diff-contributor-tag': {
21
- opacity: 0,
22
- // Deliberately not transitioned: a tag mid-fade must not be a hit target.
23
- pointerEvents: 'none',
24
- // Starts low, so the tag reads as unfurling out of the change: the part that hangs over the
25
- // highlight is clipped by the tag's root, so what is seen is its bottom edge held on the
26
- // change while the rest rises out of it. A transform, so nothing around it reflows.
27
- transform: 'translateY(4px)',
28
- transitionProperty: 'opacity, transform',
29
- transitionDuration: "var(--ds-duration-xxlong, 600ms)",
30
- // The exit curve; the revealed state below swaps in the entrance curve. The fallback is
31
- // required — motion custom properties only exist under `html[data-theme~="motion:motion"]`,
32
- // and one unresolved `var()` drops the whole declaration.
33
- transitionTimingFunction: "var(--ds-easing-in-practical, cubic-bezier(0.6, 0, 0.8, 0.6))",
34
- // Covers both directions, because the revealed state declares no duration of its own — one
35
- // there would outrank this by specificity.
36
- '@media (prefers-reduced-motion: reduce)': {
37
- transitionDuration: '0s'
38
- }
39
- },
40
- /**
41
- * Drawn *inward*: the root's `overflow: clip`, which the reveal's `translateY` spill relies on,
42
- * removes exactly the band an outline paints in. A negative offset of the ring's own width
43
- * lays it just inside, where nothing can cut it.
44
- *
45
- * `color.border.inverse`, not `color.border.focused`: against the accent `bolder` fills the
46
- * focused blue measures 1.0–1.5:1, under the 3:1 WCAG 1.4.11 asks of a focus indicator.
47
- * Inverse clears 4.5:1 on all ten, which is why the label is `color.text.inverse` too.
48
- */
49
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
50
- '.ak-editor-diff-contributor-tag:focus-visible': {
51
- outline: "var(--ds-border-width-focused, 2px)".concat(" solid ", "var(--ds-border-inverse, #FFFFFF)"),
52
- outlineOffset: "calc(-1 * ".concat("var(--ds-border-width-focused, 2px)", ")")
53
- },
54
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
55
- '.ak-editor-diff-contributor-tag[data-revealed]': {
56
- opacity: 1,
57
- pointerEvents: 'auto',
58
- transform: 'translateY(0)',
59
- // The entrance curve, and deliberately nothing else: a duration here would outrank the
60
- // reduced-motion opt-out above.
61
- transitionTimingFunction: "var(--ds-easing-out-practical, cubic-bezier(0.4, 1, 0.6, 1))",
62
- /**
63
- * Start values for the first reveal, which would otherwise snap: ProseMirror attaches a
64
- * widget's host only after `toDOM` returns. Both properties, or the first reveal rises
65
- * without fading. Progressive enhancement — browsers without it snap that first reveal and
66
- * fade every one after.
67
- */
68
- '@starting-style': {
69
- opacity: 0,
70
- transform: 'translateY(4px)'
71
- }
72
- }
73
- }
74
- });
@@ -1,23 +0,0 @@
1
- /* eslint-disable @atlaskit/ui-styling-standard/use-compiled,
2
- @repo/internal/deprecations/deprecation-ticket-required,
3
- @atlaskit/ui-styling-standard/no-exported-styles */
4
-
5
- import { css } from '@emotion/react';
6
- // copied from packages/editor/editor-shared-styles/src/consts/consts.ts
7
- var blockNodesVerticalMargin = '0.75rem';
8
-
9
- /**
10
- * @deprecated This style has been migrated to Compiled CSS.
11
- * If you need to make changes here, also update the corresponding style in
12
- * packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
13
- * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
14
- */
15
- export var extensionWithBreakoutStyles = css({
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
17
- '.fabric-editor-breakout-mark': {
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
19
- '&:has([data-prosemirror-node-name="extension"]), &:has([data-prosemirror-node-name="bodiedExtension"]), &:has([data-prosemirror-node-name="multiBodiedExtension"])': {
20
- margin: "".concat(blockNodesVerticalMargin, " 0")
21
- }
22
- }
23
- });
@@ -1,86 +0,0 @@
1
- /* eslint-disable @atlaskit/design-system/use-tokens-shape,
2
- @repo/internal/deprecations/deprecation-ticket-required,
3
- @atlaskit/ui-styling-standard/no-exported-styles */
4
- /* eslint-disable @atlaskit/ui-styling-standard/use-compiled */
5
-
6
- import { css } from '@emotion/react';
7
- var dashedStrokeMask = 'linear-gradient(to right, black 0, black 4px, transparent 4px, transparent 10px)';
8
- var fadeStrokeMask = 'linear-gradient(to right, transparent 0%, black 27.4%, black 74%, transparent 100%)';
9
-
10
- // dotted strokes
11
- var dottedStrokeMaskSmall = 'radial-gradient(circle at center, black 0.5px, transparent 0.6px)';
12
- var dottedStrokeMaskMedium = 'radial-gradient(circle at center, black 1px, transparent 1.1px)';
13
- var dottedStrokeMaskLarge = 'radial-gradient(circle at center, black 1.5px, transparent 1.6px)';
14
-
15
- // sketch strokes
16
- var sketchStrokePath = 'M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107';
17
- var sketchStrokeMaskSmall = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' d='".concat(sketchStrokePath, "'/%3E%3C/svg%3E\")");
18
- var sketchStrokeMaskMedium = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='".concat(sketchStrokePath, "'/%3E%3C/svg%3E\")");
19
- var sketchStrokeMaskLarge = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -1 233 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' d='".concat(sketchStrokePath, "'/%3E%3C/svg%3E\")");
20
-
21
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
22
- export var ruleWithAttrsStyles = css({
23
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
24
- '.ProseMirror hr[data-color]': {
25
- backgroundColor: 'var(--custom-palette-color)'
26
- },
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
28
- '.ProseMirror hr[data-style="dashed"]': {
29
- maskImage: dashedStrokeMask,
30
- maskRepeat: 'repeat-x',
31
- maskSize: '10px 100%'
32
- },
33
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
34
- '.ProseMirror hr[data-style="dotted"]': {
35
- maskImage: dottedStrokeMaskMedium,
36
- maskPosition: 'center',
37
- maskRepeat: 'repeat-x',
38
- maskSize: '6px 2px'
39
- },
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
41
- '.ProseMirror hr[data-style="sketch"]': {
42
- height: "calc(2px + ".concat("var(--ds-space-050, 4px)", " + ", "var(--ds-space-050, 4px)", ")"),
43
- maskImage: sketchStrokeMaskMedium,
44
- maskPosition: 'center',
45
- maskRepeat: 'repeat-x',
46
- maskSize: '233px 7px',
47
- paddingTop: 0,
48
- paddingBottom: 0
49
- },
50
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
51
- '.ProseMirror hr[data-style="fade"]': {
52
- maskImage: fadeStrokeMask,
53
- maskRepeat: 'no-repeat',
54
- maskSize: '100% 100%'
55
- },
56
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
57
- '.ProseMirror hr[data-weight="1"]': {
58
- height: '1px'
59
- },
60
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
61
- '.ProseMirror hr[data-weight="3"]': {
62
- height: '3px'
63
- },
64
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
65
- '.ProseMirror hr[data-style="dotted"][data-weight="1"]': {
66
- maskImage: dottedStrokeMaskSmall,
67
- maskSize: '6px 1px'
68
- },
69
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
70
- '.ProseMirror hr[data-style="dotted"][data-weight="3"]': {
71
- maskImage: dottedStrokeMaskLarge,
72
- maskSize: '6px 3px'
73
- },
74
- // Sketch needs a mask per weight because CSS cannot change the SVG stroke width.
75
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
76
- '.ProseMirror hr[data-style="sketch"][data-weight="1"]': {
77
- height: "calc(1px + ".concat("var(--ds-space-050, 4px)", " + ", "var(--ds-space-050, 4px)", ")"),
78
- maskImage: sketchStrokeMaskSmall
79
- },
80
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
81
- '.ProseMirror hr[data-style="sketch"][data-weight="3"]': {
82
- height: "calc(3px + ".concat("var(--ds-space-050, 4px)", " + ", "var(--ds-space-050, 4px)", ")"),
83
- maskImage: sketchStrokeMaskLarge,
84
- maskSize: '233px 8px'
85
- }
86
- });
@@ -1,12 +0,0 @@
1
- import type { SerializedStyles } from '@emotion/react';
2
- /**
3
- * Fade-and-rise for the contributor tags `editor-plugin-show-diff` draws above a change, plus the
4
- * hidden state it starts from — an inline `opacity` would outrank this rule, so both ends live here.
5
- *
6
- * Keyed on the literals the plugin writes (`CONTRIBUTOR_TAG_CLASS`,
7
- * `CONTRIBUTOR_TAG_REVEALED_ATTRIBUTE`), so rename in step. Keep in sync with the
8
- * `contributorTagStyles` entry in `EditorContentContainer-compiled.tsx`.
9
- *
10
- * Gated behind `confluence_ncs_step_diffing_version_history`, where the tags render.
11
- */
12
- export declare const contributorTagStyles: SerializedStyles;
@@ -1,8 +0,0 @@
1
- import type { SerializedStyles } from '@emotion/react';
2
- /**
3
- * @deprecated This style has been migrated to Compiled CSS.
4
- * If you need to make changes here, also update the corresponding style in
5
- * packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
6
- * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
7
- */
8
- export declare const extensionWithBreakoutStyles: SerializedStyles;
@@ -1,2 +0,0 @@
1
- import type { SerializedStyles } from '@emotion/react';
2
- export declare const ruleWithAttrsStyles: SerializedStyles;