@atlaskit/editor-core 193.24.0 → 193.24.15

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 (116) hide show
  1. package/.eslintrc.js +37 -37
  2. package/CHANGELOG.md +17424 -17539
  3. package/architecture/0001-record-architecture-decisions.md +6 -3
  4. package/architecture/0002-deep-equality-check-for-getsharedstate.md +9 -8
  5. package/architecture/0003-explicit-plugin-dependencies.md +47 -18
  6. package/codemods/140.0.0-rc-kraken-fix-type-errors.ts +1 -3
  7. package/codemods/145.0.0-deprecate-props.ts +1 -3
  8. package/codemods/172.0.0-transform-smartlinks-prop.ts +1 -3
  9. package/codemods/175.0.0-rename-unsafe-allowUndoRedoButton-prop.ts +1 -1
  10. package/codemods/180.1.0-update-to-editor-migration-component.ts +1 -3
  11. package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +29 -31
  12. package/codemods/__tests__/remove-config-panel-width-prop.ts +29 -31
  13. package/codemods/__tests__/rename-editor-to-editor-migration-component.ts +43 -45
  14. package/codemods/__tests__/rename-smartlinks-prop.ts +57 -59
  15. package/codemods/__tests__/rename-unsafe-allowUndoRedoButtons-prop.ts +43 -43
  16. package/codemods/__tests__/rename-unsafe-cards-prop.ts +43 -45
  17. package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +41 -45
  18. package/codemods/migrates/remove-config-panel-width-prop.ts +20 -29
  19. package/codemods/migrates/rename-editor-to-editor-migration-component.ts +20 -24
  20. package/codemods/migrates/rename-smartlinks-prop.ts +30 -38
  21. package/codemods/migrates/rename-unsafe-allowUndoRedoButtons-prop.ts +4 -5
  22. package/codemods/migrates/rename-unsafe-cards-prop.ts +1 -4
  23. package/codemods/utils.ts +62 -72
  24. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +3 -3
  25. package/dist/cjs/ui/AppearanceComponents/Mobile.js +5 -5
  26. package/dist/cjs/ui/ContentStyles/ai-panels.js +1 -1
  27. package/dist/cjs/ui/ContentStyles/code-block.js +2 -2
  28. package/dist/cjs/ui/ContentStyles/date.js +1 -1
  29. package/dist/cjs/ui/ContentStyles/expand.js +1 -1
  30. package/dist/cjs/ui/ContentStyles/extension.js +2 -2
  31. package/dist/cjs/ui/ContentStyles/index.js +6 -6
  32. package/dist/cjs/ui/ContentStyles/layout.js +1 -1
  33. package/dist/cjs/ui/ContentStyles/media.js +1 -1
  34. package/dist/cjs/ui/ContentStyles/panel.js +1 -1
  35. package/dist/cjs/ui/ContentStyles/status.js +1 -1
  36. package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +1 -1
  37. package/dist/cjs/utils/extensions.js +5 -5
  38. package/dist/cjs/version-wrapper.js +1 -1
  39. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -40
  40. package/dist/es2019/ui/AppearanceComponents/Mobile.js +5 -5
  41. package/dist/es2019/ui/ContentStyles/ai-panels.js +80 -80
  42. package/dist/es2019/ui/ContentStyles/code-block.js +58 -58
  43. package/dist/es2019/ui/ContentStyles/date.js +19 -19
  44. package/dist/es2019/ui/ContentStyles/expand.js +98 -98
  45. package/dist/es2019/ui/ContentStyles/extension.js +154 -159
  46. package/dist/es2019/ui/ContentStyles/index.js +139 -144
  47. package/dist/es2019/ui/ContentStyles/layout.js +125 -125
  48. package/dist/es2019/ui/ContentStyles/media.js +179 -178
  49. package/dist/es2019/ui/ContentStyles/panel.js +29 -30
  50. package/dist/es2019/ui/ContentStyles/status.js +30 -32
  51. package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +18 -19
  52. package/dist/es2019/utils/extensions.js +5 -5
  53. package/dist/es2019/version-wrapper.js +1 -1
  54. package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -3
  55. package/dist/esm/ui/AppearanceComponents/Mobile.js +5 -5
  56. package/dist/esm/ui/ContentStyles/ai-panels.js +1 -1
  57. package/dist/esm/ui/ContentStyles/code-block.js +2 -2
  58. package/dist/esm/ui/ContentStyles/date.js +1 -1
  59. package/dist/esm/ui/ContentStyles/expand.js +1 -1
  60. package/dist/esm/ui/ContentStyles/extension.js +2 -2
  61. package/dist/esm/ui/ContentStyles/index.js +6 -6
  62. package/dist/esm/ui/ContentStyles/layout.js +1 -1
  63. package/dist/esm/ui/ContentStyles/media.js +1 -1
  64. package/dist/esm/ui/ContentStyles/panel.js +1 -1
  65. package/dist/esm/ui/ContentStyles/status.js +1 -1
  66. package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +1 -1
  67. package/dist/esm/utils/extensions.js +5 -5
  68. package/dist/esm/version-wrapper.js +1 -1
  69. package/dist/types/composable-editor/editor.d.ts +1 -1
  70. package/dist/types/composable-editor/hooks/useProviders.d.ts +1 -1
  71. package/dist/types/create-editor/create-preset.d.ts +137 -11
  72. package/dist/types/create-editor/sort-by-order.d.ts +1 -1
  73. package/dist/types/event-dispatcher/index.d.ts +2 -2
  74. package/dist/types/index.d.ts +2 -2
  75. package/dist/types/presets/default.d.ts +122 -10
  76. package/dist/types/presets/universal.d.ts +137 -11
  77. package/dist/types/presets/useUniversalPreset.d.ts +137 -11
  78. package/dist/types/test-utils.d.ts +1 -1
  79. package/dist/types/types/browser.d.ts +1 -1
  80. package/dist/types/types/editor-plugin.d.ts +1 -1
  81. package/dist/types/types/empty-state-handler.d.ts +1 -1
  82. package/dist/types/types/feature-flags.d.ts +1 -1
  83. package/dist/types/types/index.d.ts +3 -3
  84. package/dist/types/types/pm-config.d.ts +1 -1
  85. package/dist/types/types/ui-components.d.ts +1 -1
  86. package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
  87. package/dist/types/ui/Toolbar/types.d.ts +1 -1
  88. package/dist/types/utils/action.d.ts +1 -4
  89. package/dist/types/utils/performance/plugin-performance-report.d.ts +1 -1
  90. package/dist/types/utils/slice.d.ts +1 -1
  91. package/dist/types-ts4.5/composable-editor/editor.d.ts +1 -1
  92. package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +1 -1
  93. package/dist/types-ts4.5/create-editor/create-preset.d.ts +155 -11
  94. package/dist/types-ts4.5/create-editor/sort-by-order.d.ts +1 -1
  95. package/dist/types-ts4.5/event-dispatcher/index.d.ts +2 -2
  96. package/dist/types-ts4.5/index.d.ts +2 -2
  97. package/dist/types-ts4.5/presets/default.d.ts +138 -10
  98. package/dist/types-ts4.5/presets/universal.d.ts +155 -11
  99. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +155 -11
  100. package/dist/types-ts4.5/test-utils.d.ts +1 -1
  101. package/dist/types-ts4.5/types/browser.d.ts +1 -1
  102. package/dist/types-ts4.5/types/editor-plugin.d.ts +1 -1
  103. package/dist/types-ts4.5/types/empty-state-handler.d.ts +1 -1
  104. package/dist/types-ts4.5/types/feature-flags.d.ts +1 -1
  105. package/dist/types-ts4.5/types/index.d.ts +3 -3
  106. package/dist/types-ts4.5/types/pm-config.d.ts +1 -1
  107. package/dist/types-ts4.5/types/ui-components.d.ts +1 -1
  108. package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
  109. package/dist/types-ts4.5/ui/Toolbar/types.d.ts +1 -1
  110. package/dist/types-ts4.5/utils/performance/plugin-performance-report.d.ts +1 -1
  111. package/dist/types-ts4.5/utils/slice.d.ts +1 -1
  112. package/docs/0-intro.tsx +13 -19
  113. package/docs/1-legacy-editor.tsx +13 -19
  114. package/docs/4-annotations.tsx +222 -223
  115. package/package.json +28 -20
  116. package/report.api.md +448 -473
@@ -7,49 +7,45 @@ import { findImportFromPackage } from '../utils';
7
7
  * from `allowTextColor` Editor prop.
8
8
  * Ref: ED-15849
9
9
  */
10
- const createRemoveAllowMoreTextColorsPropTransform = (
11
- pkg: string,
12
- component: string,
13
- ) => {
14
- return (j: core.JSCodeshift, source: Collection<any>) => {
15
- // Find regular or renamed imports
16
- // of <Editor/> component from '@atlaskit/editor-core' package
17
- const importedNames: string[] = findImportFromPackage(
18
- j,
19
- source,
20
- '@atlaskit/editor-core',
21
- 'Editor',
22
- );
23
- // Make the change on all instances of named imports found
24
- importedNames.forEach((importedComponentName) => {
25
- // Find `allowTextColor` prop
26
- const allowTextColorCollection = source.find(j.JSXAttribute, {
27
- name: {
28
- type: 'JSXIdentifier',
29
- name: 'allowTextColor',
30
- },
31
- });
32
- allowTextColorCollection
33
- .find(j.ObjectProperty, { key: { name: 'allowMoreTextColors' } })
34
- .forEach((x) => j(x).remove());
35
- // If the remaining `allowTextColor` prop is an empty object, set `allowTextColor` to `true`.
36
- allowTextColorCollection.forEach((allowTextColorPath) => {
37
- j(allowTextColorPath).find(j.ObjectExpression, (objectExpression) => {
38
- if (objectExpression.properties.length === 0) {
39
- j(allowTextColorPath).replaceWith(
40
- j.jsxAttribute(
41
- j.jsxIdentifier('allowTextColor'),
42
- j.jsxExpressionContainer(j.booleanLiteral(true)),
43
- ),
44
- );
45
- }
46
- });
47
- });
48
- });
49
- };
10
+ const createRemoveAllowMoreTextColorsPropTransform = (pkg: string, component: string) => {
11
+ return (j: core.JSCodeshift, source: Collection<any>) => {
12
+ // Find regular or renamed imports
13
+ // of <Editor/> component from '@atlaskit/editor-core' package
14
+ const importedNames: string[] = findImportFromPackage(
15
+ j,
16
+ source,
17
+ '@atlaskit/editor-core',
18
+ 'Editor',
19
+ );
20
+ // Make the change on all instances of named imports found
21
+ importedNames.forEach((importedComponentName) => {
22
+ // Find `allowTextColor` prop
23
+ const allowTextColorCollection = source.find(j.JSXAttribute, {
24
+ name: {
25
+ type: 'JSXIdentifier',
26
+ name: 'allowTextColor',
27
+ },
28
+ });
29
+ allowTextColorCollection
30
+ .find(j.ObjectProperty, { key: { name: 'allowMoreTextColors' } })
31
+ .forEach((x) => j(x).remove());
32
+ // If the remaining `allowTextColor` prop is an empty object, set `allowTextColor` to `true`.
33
+ allowTextColorCollection.forEach((allowTextColorPath) => {
34
+ j(allowTextColorPath).find(j.ObjectExpression, (objectExpression) => {
35
+ if (objectExpression.properties.length === 0) {
36
+ j(allowTextColorPath).replaceWith(
37
+ j.jsxAttribute(
38
+ j.jsxIdentifier('allowTextColor'),
39
+ j.jsxExpressionContainer(j.booleanLiteral(true)),
40
+ ),
41
+ );
42
+ }
43
+ });
44
+ });
45
+ });
46
+ };
50
47
  };
51
- export const removeAllowMoreColorsProp =
52
- createRemoveAllowMoreTextColorsPropTransform(
53
- '@atlaskit/editor-core',
54
- 'Editor',
55
- );
48
+ export const removeAllowMoreColorsProp = createRemoveAllowMoreTextColorsPropTransform(
49
+ '@atlaskit/editor-core',
50
+ 'Editor',
51
+ );
@@ -3,37 +3,28 @@ import type { Collection } from 'jscodeshift/src/Collection';
3
3
 
4
4
  import { findImportFromPackage } from '../utils';
5
5
 
6
- const createRemoveComponentPropTransform = (
7
- pkg: string,
8
- component: string,
9
- propName: string,
10
- ) => {
11
- return (j: core.JSCodeshift, source: Collection<any>) => {
12
- // Find regular or renamed imports
13
- const importedNames: string[] = findImportFromPackage(
14
- j,
15
- source,
16
- pkg,
17
- component,
18
- );
6
+ const createRemoveComponentPropTransform = (pkg: string, component: string, propName: string) => {
7
+ return (j: core.JSCodeshift, source: Collection<any>) => {
8
+ // Find regular or renamed imports
9
+ const importedNames: string[] = findImportFromPackage(j, source, pkg, component);
19
10
 
20
- // Make the change on all instances of named imports found
21
- importedNames.forEach((importedComponentName) => {
22
- source
23
- .findJSXElements(importedComponentName)
24
- .find(j.JSXAttribute, {
25
- name: {
26
- type: 'JSXIdentifier',
27
- name: propName,
28
- },
29
- })
30
- .forEach((x) => j(x).remove());
31
- });
32
- };
11
+ // Make the change on all instances of named imports found
12
+ importedNames.forEach((importedComponentName) => {
13
+ source
14
+ .findJSXElements(importedComponentName)
15
+ .find(j.JSXAttribute, {
16
+ name: {
17
+ type: 'JSXIdentifier',
18
+ name: propName,
19
+ },
20
+ })
21
+ .forEach((x) => j(x).remove());
22
+ });
23
+ };
33
24
  };
34
25
 
35
26
  export const removeConfigPanelWidthProp = createRemoveComponentPropTransform(
36
- '@atlaskit/editor-core',
37
- 'ContextPanel',
38
- 'width',
27
+ '@atlaskit/editor-core',
28
+ 'ContextPanel',
29
+ 'width',
39
30
  );
@@ -6,29 +6,25 @@ import type { Collection } from 'jscodeshift/src/Collection';
6
6
  * EditorMigrationComponent
7
7
  * Ref: ED-16826
8
8
  */
9
- export const createUpdateEditorToMigrationComponent = (
10
- pkg: string,
11
- component: string,
12
- ) => {
13
- return (j: core.JSCodeshift, source: Collection<any>) => {
14
- source
15
- .find(j.ImportDeclaration, { source: { value: pkg } })
16
- .filter(
17
- (path) =>
18
- j(path).find(j.ImportSpecifier, {
19
- imported: { type: 'Identifier', name: component },
20
- }).length > 0,
21
- )
22
- .find(j.ImportSpecifier)
23
- .filter((path) => path.node.imported.name === component)
24
- .replaceWith((currentImport) =>
25
- j.importSpecifier(
26
- j.identifier('EditorMigrationComponent'),
27
- currentImport.node.local,
28
- ),
29
- );
30
- };
9
+ export const createUpdateEditorToMigrationComponent = (pkg: string, component: string) => {
10
+ return (j: core.JSCodeshift, source: Collection<any>) => {
11
+ source
12
+ .find(j.ImportDeclaration, { source: { value: pkg } })
13
+ .filter(
14
+ (path) =>
15
+ j(path).find(j.ImportSpecifier, {
16
+ imported: { type: 'Identifier', name: component },
17
+ }).length > 0,
18
+ )
19
+ .find(j.ImportSpecifier)
20
+ .filter((path) => path.node.imported.name === component)
21
+ .replaceWith((currentImport) =>
22
+ j.importSpecifier(j.identifier('EditorMigrationComponent'), currentImport.node.local),
23
+ );
24
+ };
31
25
  };
32
26
 
33
- export const renameEditorToMigrationComponent =
34
- createUpdateEditorToMigrationComponent('@atlaskit/editor-core', 'Editor');
27
+ export const renameEditorToMigrationComponent = createUpdateEditorToMigrationComponent(
28
+ '@atlaskit/editor-core',
29
+ 'Editor',
30
+ );
@@ -10,47 +10,39 @@ import type { Collection } from 'jscodeshift/src/Collection';
10
10
  * @param toObjectKey String
11
11
  */
12
12
  export const createJSXRenameVariableToNestedKeyTransform = (
13
- from: string,
14
- toObjectName: string,
15
- toObjectKey: string,
13
+ from: string,
14
+ toObjectName: string,
15
+ toObjectKey: string,
16
16
  ) => {
17
- return (j: core.JSCodeshift, source: Collection<any>) => {
18
- source
19
- .find(j.JSXAttribute, { name: { type: 'JSXIdentifier', name: from } })
20
- .forEach((fromAttribute) => {
21
- // is there an existing destination prop
22
- const isExistingAttribute =
23
- source.find(j.JSXAttribute, {
24
- name: { type: 'JSXIdentifier', name: toObjectName },
25
- }).length !== 0;
17
+ return (j: core.JSCodeshift, source: Collection<any>) => {
18
+ source
19
+ .find(j.JSXAttribute, { name: { type: 'JSXIdentifier', name: from } })
20
+ .forEach((fromAttribute) => {
21
+ // is there an existing destination prop
22
+ const isExistingAttribute =
23
+ source.find(j.JSXAttribute, {
24
+ name: { type: 'JSXIdentifier', name: toObjectName },
25
+ }).length !== 0;
26
26
 
27
- if (
28
- !isExistingAttribute &&
29
- fromAttribute.node.value?.type === 'JSXExpressionContainer' &&
30
- fromAttribute.node.value.expression.type === 'ObjectExpression'
31
- ) {
32
- const existingProperties =
33
- fromAttribute.node.value.expression.properties;
34
- const newObject = j.objectExpression([
35
- j.property(
36
- 'init',
37
- j.identifier(toObjectKey),
38
- j.objectExpression(existingProperties),
39
- ),
40
- ]);
41
- fromAttribute.replace(
42
- j.jsxAttribute(
43
- j.jsxIdentifier(toObjectName),
44
- j.jsxExpressionContainer(newObject),
45
- ),
46
- );
47
- }
48
- });
49
- };
27
+ if (
28
+ !isExistingAttribute &&
29
+ fromAttribute.node.value?.type === 'JSXExpressionContainer' &&
30
+ fromAttribute.node.value.expression.type === 'ObjectExpression'
31
+ ) {
32
+ const existingProperties = fromAttribute.node.value.expression.properties;
33
+ const newObject = j.objectExpression([
34
+ j.property('init', j.identifier(toObjectKey), j.objectExpression(existingProperties)),
35
+ ]);
36
+ fromAttribute.replace(
37
+ j.jsxAttribute(j.jsxIdentifier(toObjectName), j.jsxExpressionContainer(newObject)),
38
+ );
39
+ }
40
+ });
41
+ };
50
42
  };
51
43
 
52
44
  export const renameSmartLinksProp = createJSXRenameVariableToNestedKeyTransform(
53
- 'smartLinks',
54
- 'linking',
55
- 'smartLinks',
45
+ 'smartLinks',
46
+ 'linking',
47
+ 'smartLinks',
56
48
  );
@@ -1,7 +1,6 @@
1
1
  import { createRenameVariableTransform } from '../utils';
2
2
 
3
- export const renameUnsafeAllowUndoRedoButtonsProp =
4
- createRenameVariableTransform(
5
- 'UNSAFE_allowUndoRedoButtons',
6
- 'allowUndoRedoButtons',
7
- );
3
+ export const renameUnsafeAllowUndoRedoButtonsProp = createRenameVariableTransform(
4
+ 'UNSAFE_allowUndoRedoButtons',
5
+ 'allowUndoRedoButtons',
6
+ );
@@ -1,6 +1,3 @@
1
1
  import { createRenameVariableTransform } from '../utils';
2
2
 
3
- export const renameUnsafeCardProp = createRenameVariableTransform(
4
- 'UNSAFE_cards',
5
- 'smartLinks',
6
- );
3
+ export const renameUnsafeCardProp = createRenameVariableTransform('UNSAFE_cards', 'smartLinks');
package/codemods/utils.ts CHANGED
@@ -1,44 +1,34 @@
1
1
  import type {
2
- API,
3
- ASTPath,
4
- default as core,
5
- FileInfo,
6
- ImportDeclaration,
7
- Options,
2
+ API,
3
+ ASTPath,
4
+ default as core,
5
+ FileInfo,
6
+ ImportDeclaration,
7
+ Options,
8
8
  } from 'jscodeshift';
9
9
  import type { Collection } from 'jscodeshift/src/Collection';
10
10
 
11
- function hasImportDeclaration(
12
- j: core.JSCodeshift,
13
- source: Collection<any>,
14
- importPath: string,
15
- ) {
16
- const imports = source
17
- .find(j.ImportDeclaration)
18
- .filter(
19
- (path: ASTPath<ImportDeclaration>) =>
20
- path.node.source.value === importPath,
21
- );
11
+ function hasImportDeclaration(j: core.JSCodeshift, source: Collection<any>, importPath: string) {
12
+ const imports = source
13
+ .find(j.ImportDeclaration)
14
+ .filter((path: ASTPath<ImportDeclaration>) => path.node.source.value === importPath);
22
15
 
23
- return Boolean(imports.length);
16
+ return Boolean(imports.length);
24
17
  }
25
18
 
26
19
  export const createTransformer =
27
- (
28
- packageName: string,
29
- migrations: { (j: core.JSCodeshift, source: Collection<any>): void }[],
30
- ) =>
31
- (fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) => {
32
- const source = j(fileInfo.source);
20
+ (packageName: string, migrations: { (j: core.JSCodeshift, source: Collection<any>): void }[]) =>
21
+ (fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) => {
22
+ const source = j(fileInfo.source);
33
23
 
34
- if (!hasImportDeclaration(j, source, packageName)) {
35
- return fileInfo.source;
36
- }
24
+ if (!hasImportDeclaration(j, source, packageName)) {
25
+ return fileInfo.source;
26
+ }
37
27
 
38
- migrations.forEach((transform) => transform(j, source));
28
+ migrations.forEach((transform) => transform(j, source));
39
29
 
40
- return source.toSource(options.printOptions || { quote: 'single' });
41
- };
30
+ return source.toSource(options.printOptions || { quote: 'single' });
31
+ };
42
32
 
43
33
  /**
44
34
  * Finds import from a particular path/package matching a particular name.
@@ -51,45 +41,45 @@ export const createTransformer =
51
41
  * @returns String[] Array of result names which match the specified importName
52
42
  */
53
43
  export const findImportFromPackage = (
54
- j: core.JSCodeshift,
55
- source: Collection<any>,
56
- pkg: string,
57
- importName: string,
44
+ j: core.JSCodeshift,
45
+ source: Collection<any>,
46
+ pkg: string,
47
+ importName: string,
58
48
  ): string[] => {
59
- // Find regular or renamed imports
60
- return (
61
- source
62
- // find all import statements which import from the given package
63
- .find(j.ImportDeclaration, {
64
- source: {
65
- value: pkg,
66
- },
67
- })
68
- // narrow down to imports related to 'component'
69
- .filter(
70
- (importDeclaration) =>
71
- j(importDeclaration).find(j.ImportSpecifier, {
72
- imported: {
73
- type: 'Identifier',
74
- name: importName,
75
- },
76
- }).length > 0,
77
- )
78
- .nodes()
79
- .map((importDeclaration): string => {
80
- const importSpecifier = j(importDeclaration)
81
- .find(j.ImportSpecifier, {
82
- imported: {
83
- type: 'Identifier',
84
- name: importName,
85
- },
86
- })
87
- .nodes()[0];
49
+ // Find regular or renamed imports
50
+ return (
51
+ source
52
+ // find all import statements which import from the given package
53
+ .find(j.ImportDeclaration, {
54
+ source: {
55
+ value: pkg,
56
+ },
57
+ })
58
+ // narrow down to imports related to 'component'
59
+ .filter(
60
+ (importDeclaration) =>
61
+ j(importDeclaration).find(j.ImportSpecifier, {
62
+ imported: {
63
+ type: 'Identifier',
64
+ name: importName,
65
+ },
66
+ }).length > 0,
67
+ )
68
+ .nodes()
69
+ .map((importDeclaration): string => {
70
+ const importSpecifier = j(importDeclaration)
71
+ .find(j.ImportSpecifier, {
72
+ imported: {
73
+ type: 'Identifier',
74
+ name: importName,
75
+ },
76
+ })
77
+ .nodes()[0];
88
78
 
89
- return importSpecifier.local?.name || '';
90
- })
91
- .filter((name) => Boolean(name))
92
- );
79
+ return importSpecifier.local?.name || '';
80
+ })
81
+ .filter((name) => Boolean(name))
82
+ );
93
83
  };
94
84
 
95
85
  /**
@@ -99,9 +89,9 @@ export const findImportFromPackage = (
99
89
  * @param toName String
100
90
  */
101
91
  export const createRenameVariableTransform = (from: string, toName: string) => {
102
- return (j: core.JSCodeshift, source: Collection<any>) => {
103
- source.find(j.Identifier, { name: from }).forEach((x) => {
104
- x.replace(j.identifier(toName));
105
- });
106
- };
92
+ return (j: core.JSCodeshift, source: Collection<any>) => {
93
+ source.find(j.Identifier, { name: from }).forEach((x) => {
94
+ x.replace(j.identifier(toName));
95
+ });
96
+ };
107
97
  };
@@ -22,11 +22,11 @@ var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
22
22
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
23
23
  var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
24
24
  var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
25
- return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n padding: ", " ", " 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", ";\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n ", "\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "));
25
+ return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tposition: relative;\n\talign-items: center;\n\tpadding: ", " ", " 0;\n\tdisplay: flex;\n\theight: auto;\n\tbackground-color: ", ";\n\tbox-shadow: none;\n\tpadding-left: ", ";\n\n\t& > div {\n\t\t> :first-child:not(style),\n\t\t> style:first-child + * {\n\t\t\tmargin-left: 0;\n\t\t}\n\t\t", "\n\t}\n\n\t.block-type-btn {\n\t\tpadding-left: 0;\n\t}\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "));
26
26
  };
27
27
 
28
28
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
29
- var stickyToolbarWrapperStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", ";\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorMenuZIndex, _editorSharedStyles.akEditorToolbarKeylineHeight, "var(--ds-background-accent-gray-subtlest, #F1F2F4)");
29
+ var stickyToolbarWrapperStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t/* stylelint-disable declaration-block-no-duplicate-properties */\n\tposition: relative;\n\tposition: sticky;\n\t/* stylelint-enable declaration-block-no-duplicate-properties */\n\tpadding-bottom: ", ";\n\tz-index: ", ";\n\ttransition: box-shadow ease-in-out 0.2s;\n\t&.show-keyline {\n\t\tbox-shadow: 0 ", "px 0 0\n\t\t\t", ";\n\t}\n"])), "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorMenuZIndex, _editorSharedStyles.akEditorToolbarKeylineHeight, "var(--ds-background-accent-gray-subtlest, #F1F2F4)");
30
30
  var StickyToolbar = function StickyToolbar(props) {
31
31
  var _useState = (0, _react.useState)(0),
32
32
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -113,6 +113,6 @@ var MainToolbar = exports.MainToolbar = function MainToolbar(_ref) {
113
113
  var mainToolbarCustomComponentsSlotStyle = exports.mainToolbarCustomComponentsSlotStyle = function mainToolbarCustomComponentsSlotStyle() {
114
114
  var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
115
115
  return (// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
116
- (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", ";\n > div {\n display: flex;\n flex-shrink: 0;\n }\n ", "\n "])), "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n {\n padding-right: 0;\n }\n }\n "))
116
+ (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\n\t\talign-items: center;\n\t\tflex-grow: 1;\n\t\tpadding-right: ", ";\n\t\t> div {\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t", "\n\t"])), "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n {\n padding-right: 0;\n }\n }\n "))
117
117
  );
118
118
  };
@@ -63,11 +63,11 @@ var MobileAppearance = exports.MobileAppearance = /*#__PURE__*/(0, _react.forwar
63
63
  var keyboardHeight = (_basePluginState$keyb = basePluginState === null || basePluginState === void 0 ? void 0 : basePluginState.keyboardHeight) !== null && _basePluginState$keyb !== void 0 ? _basePluginState$keyb : -1;
64
64
 
65
65
  /*
66
- We calculate the min-height based on the windowHeight - keyboardHeight - paddingTop.
67
- This is needed due to scrolling issues when there is no content to scroll (like, only having 1 paragraph),
68
- but if the clickable area is bigger than the windowHeight - keyboard (including toolbar) then the view
69
- is scrolled nevertheless, and it gives the sensation that the content was lost.
70
- */
66
+ We calculate the min-height based on the windowHeight - keyboardHeight - paddingTop.
67
+ This is needed due to scrolling issues when there is no content to scroll (like, only having 1 paragraph),
68
+ but if the clickable area is bigger than the windowHeight - keyboard (including toolbar) then the view
69
+ is scrolled nevertheless, and it gives the sensation that the content was lost.
70
+ */
71
71
 
72
72
  if (!persistScrollGutter) {
73
73
  // in iOS Hybrid Editor windowHeight doesn't exclude keyboardHeight
@@ -55,5 +55,5 @@ var prismBorderStyles = function prismBorderStyles(colorMode, sizeOffset, positi
55
55
  });
56
56
  };
57
57
  var aiPanelStyles = exports.aiPanelStyles = function aiPanelStyles(colorMode) {
58
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n @property --panel-gradient-angle {\n syntax: '<angle>';\n initial-value: 180deg;\n inherits: false;\n }\n\n // The .with-border style is only present when the new macro styles are applied\n // TODO: Remove this once new macro styles have been adopted\n div[extensiontype='com.atlassian.ai-blocks'] {\n &.", ":has(.streaming) {\n & .extension-container {\n box-shadow: none !important;\n ", "\n }\n }\n\n .danger > .extension-container {\n background-color: ", ";\n }\n\n .extension-container {\n overflow: visible;\n background-color: ", ";\n position: relative;\n border-radius: 4px;\n &::before,\n &::after {\n ", "\n }\n .extension-overflow-wrapper {\n border-radius: inherit;\n box-shadow: inherit;\n background-color: inherit;\n }\n &.with-border {\n border: 1px solid ", ";\n }\n &.with-hover-border {\n border: 1px solid ", ";\n }\n }\n }\n\n div[extensiontype='com.atlassian.ai-blocks']:has(.with-border) {\n .extension-container {\n background-color: ", ";\n .extension-overflow-wrapper {\n box-shadow: none !important;\n }\n }\n\n .extension-title {\n display: none !important;\n }\n\n &:not(.", "),\n &:not(.danger) {\n .extension-container {\n &::before,\n &::after {\n ", "\n }\n &.wider-layout {\n &::after,\n &::before {\n ", "\n }\n }\n }\n }\n\n &.", ", &.danger {\n .extension-container {\n &.wider-layout {\n &::after,\n &::before {\n content: none;\n }\n }\n }\n }\n }\n\n div[extensiontype='com.atlassian.ai-blocks'][extensionkey='ai-action-items-block:aiActionItemsBodiedExtension'] {\n div[data-node-type='actionList'] {\n margin: 0 !important;\n }\n }\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, prismBorderAnimationStyles, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-background-accent-gray-subtlest, ".concat(_colors.N20, ")"), prismBorderStyles(colorMode, 2, -1), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, prismBorderStyles(colorMode, 4, -2), prismBorderStyles(colorMode, 2, -1), _editorSharedStyles.akEditorSelectedNodeClassName);
58
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t@property --panel-gradient-angle {\n\t\tsyntax: '<angle>';\n\t\tinitial-value: 180deg;\n\t\tinherits: false;\n\t}\n\n\t// The .with-border style is only present when the new macro styles are applied\n\t// TODO: Remove this once new macro styles have been adopted\n\tdiv[extensiontype='com.atlassian.ai-blocks'] {\n\t\t&.", ":has(.streaming) {\n\t\t\t& .extension-container {\n\t\t\t\tbox-shadow: none !important;\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t.danger > .extension-container {\n\t\t\tbackground-color: ", ";\n\t\t}\n\n\t\t.extension-container {\n\t\t\toverflow: visible;\n\t\t\tbackground-color: ", ";\n\t\t\tposition: relative;\n\t\t\tborder-radius: 4px;\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t\t.extension-overflow-wrapper {\n\t\t\t\tborder-radius: inherit;\n\t\t\t\tbox-shadow: inherit;\n\t\t\t\tbackground-color: inherit;\n\t\t\t}\n\t\t\t&.with-border {\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t}\n\t\t\t&.with-hover-border {\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\tdiv[extensiontype='com.atlassian.ai-blocks']:has(.with-border) {\n\t\t.extension-container {\n\t\t\tbackground-color: ", ";\n\t\t\t.extension-overflow-wrapper {\n\t\t\t\tbox-shadow: none !important;\n\t\t\t}\n\t\t}\n\n\t\t.extension-title {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t&:not(.", "),\n\t\t&:not(.danger) {\n\t\t\t.extension-container {\n\t\t\t\t&::before,\n\t\t\t\t&::after {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t\t&.wider-layout {\n\t\t\t\t\t&::after,\n\t\t\t\t\t&::before {\n\t\t\t\t\t\t", "\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.", ", &.danger {\n\t\t\t.extension-container {\n\t\t\t\t&.wider-layout {\n\t\t\t\t\t&::after,\n\t\t\t\t\t&::before {\n\t\t\t\t\t\tcontent: none;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tdiv[extensiontype='com.atlassian.ai-blocks'][extensionkey='ai-action-items-block:aiActionItemsBodiedExtension'] {\n\t\tdiv[data-node-type='actionList'] {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, prismBorderAnimationStyles, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-background-accent-gray-subtlest, ".concat(_colors.N20, ")"), prismBorderStyles(colorMode, 2, -1), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, prismBorderStyles(colorMode, 4, -2), prismBorderStyles(colorMode, 2, -1), _editorSharedStyles.akEditorSelectedNodeClassName);
59
59
  };
@@ -13,8 +13,8 @@ var _colors = require("@atlaskit/theme/colors");
13
13
  var _templateObject, _templateObject2;
14
14
  /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
15
15
  var GutterDangerOverlay = function GutterDangerOverlay() {
16
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &::after {\n height: 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, none)");
16
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t&::after {\n\t\theight: 100%;\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 24px;\n\t\tbackground-color: ", ";\n\t}\n"])), "var(--ds-blanket-danger, none)");
17
17
  };
18
18
  var codeBlockStyles = exports.codeBlockStyles = function codeBlockStyles() {
19
- return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", "\n }\n\n .ProseMirror li {\n /* if same list item has multiple code blocks we need top margin for all but first */\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* When code-block is inside the panel */\n .ak-editor-panel__content {\n > .code-block:first-child {\n margin: 0 0 0 0 !important;\n }\n }\n"])), (0, _styles.codeBlockSharedStyles)(), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, ".concat(_colors.R75, ")"), "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))");
19
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror li {\n\t\t/* if same list item has multiple code blocks we need top margin for all but first */\n\t\t> .code-block {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\t\t> .code-block:first-child,\n\t\t> .ProseMirror-gapcursor:first-child + .code-block {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t> div:last-of-type.code-block {\n\t\t\tmargin-bottom: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror .code-block.", ":not(.danger) {\n\t\t", "\n\t}\n\n\t/* Danger when top level node */\n\t.ProseMirror .danger.code-block {\n\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t", ";\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t/* Danger when nested node */\n\t.ProseMirror .danger .code-block {\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t/* When code-block is inside the panel */\n\t.ak-editor-panel__content {\n\t\t> .code-block:first-child {\n\t\t\tmargin: 0 0 0 0 !important;\n\t\t}\n\t}\n"])), (0, _styles.codeBlockSharedStyles)(), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, ".concat(_colors.R75, ")"), "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))");
20
20
  };
@@ -11,4 +11,4 @@ var _styles = require("@atlaskit/editor-common/styles");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
12
  var _templateObject;
13
13
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
14
- var dateStyles = exports.dateStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n .", " {\n line-height: initial;\n cursor: pointer;\n }\n\n &.", " {\n .", " > span {\n ", "\n }\n }\n }\n\n .danger {\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px\n ", ";\n }\n }\n"])), _styles.DateSharedCssClassName.DATE_CONTAINER, _styles.DateSharedCssClassName.DATE_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.DateSharedCssClassName.DATE_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.DateSharedCssClassName.DATE_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.DateSharedCssClassName.DATE_WRAPPER, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"));
14
+ var dateStyles = exports.dateStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\t.", " {\n\t\t\tline-height: initial;\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", " > span {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n\n\t.danger {\n\t\t.", ".", "\n\t\t\t.", "\n\t\t\t> span {\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t}\n\t}\n"])), _styles.DateSharedCssClassName.DATE_CONTAINER, _styles.DateSharedCssClassName.DATE_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.DateSharedCssClassName.DATE_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.DateSharedCssClassName.DATE_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.DateSharedCssClassName.DATE_WRAPPER, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"));
@@ -24,7 +24,7 @@ var DANGER_STATE_BORDER_COLOR = "var(--ds-border-danger, ".concat(_colors.R300,
24
24
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
25
25
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
26
26
  var expandStyles = exports.expandStyles = function expandStyles() {
27
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " > div {\n display: flex;\n }\n\n .", " {\n ", "\n overflow: hidden;\n cursor: pointer;\n box-sizing: border-box;\n\n td > & {\n margin-top: 0;\n }\n\n .", " svg {\n ", ";\n transform: rotate(90deg);\n }\n\n &.", ":not(.danger) {\n ", "\n }\n\n &.danger {\n background: ", ";\n border-color: ", ";\n }\n }\n\n .ProseMirror\n > .", ",\n .", "\n > .", " {\n margin-left: -", "px;\n margin-right: -", "px;\n }\n\n .", " {\n ", "\n cursor: text;\n padding-top: 0px;\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", ";\n align-items: center;\n overflow: visible;\n }\n\n .", " {\n background: ", ";\n border-color: ", ";\n\n .", " {\n padding-top: ", ";\n }\n }\n\n .", " {\n width: 100%;\n }\n\n /* stylelint-disable property-no-unknown, value-keyword-case */\n .", ":(.", ") {\n .expand-content-wrapper {\n height: auto;\n }\n }\n /* stylelint-enable property-no-unknown, value-keyword-case */\n\n .", ":not(.", ") {\n .ak-editor-expand__content {\n position: absolute;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n white-space: nowrap;\n }\n\n .", " svg {\n ", ";\n transform: rotate(0deg);\n }\n\n &:not(.", "):not(.danger) {\n background: transparent;\n border-color: transparent;\n\n &:hover {\n border-color: ", ";\n background: ", ";\n }\n }\n }\n"])), _styles.expandClassNames.icon, _styles.expandClassNames.prefix, _ui.sharedExpandStyles.containerStyles({
27
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " > div {\n\t\tdisplay: flex;\n\t}\n\n\t.", " {\n\t\t", "\n\t\toverflow: hidden;\n\t\tcursor: pointer;\n\t\tbox-sizing: border-box;\n\n\t\ttd > & {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t.", " svg {\n\t\t\t", ";\n\t\t\ttransform: rotate(90deg);\n\t\t}\n\n\t\t&.", ":not(.danger) {\n\t\t\t", "\n\t\t}\n\n\t\t&.danger {\n\t\t\tbackground: ", ";\n\t\t\tborder-color: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror\n\t\t> .", ",\n\t\t.", "\n\t\t> .", " {\n\t\tmargin-left: -", "px;\n\t\tmargin-right: -", "px;\n\t}\n\n\t.", " {\n\t\t", "\n\t\tcursor: text;\n\t\tpadding-top: 0px;\n\t}\n\n\t.", " {\n\t\t", "\n\t}\n\n\t.", " {\n\t\t", ";\n\t\talign-items: center;\n\t\toverflow: visible;\n\t}\n\n\t.", " {\n\t\tbackground: ", ";\n\t\tborder-color: ", ";\n\n\t\t.", " {\n\t\t\tpadding-top: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\twidth: 100%;\n\t}\n\n\t/* stylelint-disable property-no-unknown, value-keyword-case */\n\t.", ":(.", ") {\n\t\t.expand-content-wrapper {\n\t\t\theight: auto;\n\t\t}\n\t}\n\t/* stylelint-enable property-no-unknown, value-keyword-case */\n\n\t.", ":not(.", ") {\n\t\t.ak-editor-expand__content {\n\t\t\tposition: absolute;\n\t\t\theight: 1px;\n\t\t\twidth: 1px;\n\t\t\toverflow: hidden;\n\t\t\tclip: rect(1px, 1px, 1px, 1px);\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t.", " svg {\n\t\t\t", ";\n\t\t\ttransform: rotate(0deg);\n\t\t}\n\n\t\t&:not(.", "):not(.danger) {\n\t\t\tbackground: transparent;\n\t\t\tborder-color: transparent;\n\n\t\t\t&:hover {\n\t\t\t\tborder-color: ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), _styles.expandClassNames.icon, _styles.expandClassNames.prefix, _ui.sharedExpandStyles.containerStyles({
28
28
  expanded: false,
29
29
  focused: false
30
30
  })(), _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), DANGER_STATE_BACKGROUND_COLOR, DANGER_STATE_BORDER_COLOR, _styles.expandClassNames.type('expand'), _styles.BreakoutCssClassName.BREAKOUT_MARK_DOM, _styles.expandClassNames.type('expand'), _editorSharedStyles.akLayoutGutterOffset, _editorSharedStyles.akLayoutGutterOffset, _styles.expandClassNames.content, _ui.sharedExpandStyles.contentStyles({