@atlaskit/editor-common 128.0.1 → 128.2.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 (49) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/cjs/extensions/buildMenuItem.js +1 -0
  3. package/dist/cjs/messages/syncBlock.js +5 -0
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +13 -4
  6. package/dist/cjs/quick-insert/ElementBrowserQuickInsertMenuItem.js +2 -1
  7. package/dist/cjs/quick-insert/QuickInsertHoverPreview.compiled.css +5 -0
  8. package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +73 -28
  9. package/dist/cjs/quick-insert/QuickInsertMenuItem.js +7 -0
  10. package/dist/cjs/quick-insert/SkillTag.compiled.css +9 -0
  11. package/dist/cjs/quick-insert/SkillTag.js +44 -0
  12. package/dist/cjs/styles/shared/table.js +3 -5
  13. package/dist/cjs/ui/DropList/index.js +1 -1
  14. package/dist/es2019/extensions/buildMenuItem.js +1 -0
  15. package/dist/es2019/messages/syncBlock.js +5 -0
  16. package/dist/es2019/monitoring/error.js +1 -1
  17. package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +13 -4
  18. package/dist/es2019/quick-insert/ElementBrowserQuickInsertMenuItem.js +2 -1
  19. package/dist/es2019/quick-insert/QuickInsertHoverPreview.compiled.css +5 -0
  20. package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +65 -20
  21. package/dist/es2019/quick-insert/QuickInsertMenuItem.js +7 -0
  22. package/dist/es2019/quick-insert/SkillTag.compiled.css +9 -0
  23. package/dist/es2019/quick-insert/SkillTag.js +35 -0
  24. package/dist/es2019/styles/shared/table.js +3 -5
  25. package/dist/es2019/ui/DropList/index.js +1 -1
  26. package/dist/esm/extensions/buildMenuItem.js +1 -0
  27. package/dist/esm/messages/syncBlock.js +5 -0
  28. package/dist/esm/monitoring/error.js +1 -1
  29. package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +13 -4
  30. package/dist/esm/quick-insert/ElementBrowserQuickInsertMenuItem.js +2 -1
  31. package/dist/esm/quick-insert/QuickInsertHoverPreview.compiled.css +5 -0
  32. package/dist/esm/quick-insert/QuickInsertHoverPreview.js +64 -20
  33. package/dist/esm/quick-insert/QuickInsertMenuItem.js +7 -0
  34. package/dist/esm/quick-insert/SkillTag.compiled.css +9 -0
  35. package/dist/esm/quick-insert/SkillTag.js +37 -0
  36. package/dist/esm/styles/shared/table.js +3 -5
  37. package/dist/esm/ui/DropList/index.js +1 -1
  38. package/dist/types/extensions/types/utils.d.ts +1 -0
  39. package/dist/types/messages/syncBlock.d.ts +5 -0
  40. package/dist/types/quick-insert/CompactQuickInsertMenuItem.d.ts +1 -1
  41. package/dist/types/quick-insert/ElementBrowserQuickInsertMenuItem.d.ts +1 -1
  42. package/dist/types/quick-insert/QuickInsertContext.d.ts +3 -0
  43. package/dist/types/quick-insert/QuickInsertHoverPreview.d.ts +10 -1
  44. package/dist/types/quick-insert/QuickInsertMenuItem.d.ts +7 -1
  45. package/dist/types/quick-insert/SkillTag.d.ts +6 -0
  46. package/dist/types/styles/shared/table.d.ts +3 -5
  47. package/dist/types/types/feature-flags.d.ts +10 -0
  48. package/package.json +10 -10
  49. package/quick-insert/skill-tag/package.json +10 -0
@@ -0,0 +1,37 @@
1
+ /* SkillTag.tsx generated by @compiled/babel-plugin v3.0.2 */
2
+ import "./SkillTag.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { cx } from '@atlaskit/css';
6
+ import { Box } from '@atlaskit/primitives/compiled/box';
7
+ import { Text } from '@atlaskit/primitives/compiled/text';
8
+ var styles = {
9
+ highlight: "_bfhki8nm _16d9qvcn _1e0c1nu9",
10
+ start: "_bozg1b66 _y4ti1b66 _mkrz1f6o",
11
+ end: "_y4ti1b66 _mkrz1gdk",
12
+ wrapping: "_1i4qfg65 _o5724jg8",
13
+ text: "_1i4qfg65"
14
+ };
15
+ export var SkillTag = function SkillTag(_ref) {
16
+ var slug = _ref.slug,
17
+ _ref$isDisabled = _ref.isDisabled,
18
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
19
+ return /*#__PURE__*/React.createElement(Box, {
20
+ as: "span",
21
+ xcss: styles.wrapping
22
+ }, /*#__PURE__*/React.createElement(Text, {
23
+ color: isDisabled ? 'color.text.disabled' : 'color.text',
24
+ xcss: styles.text
25
+ }, /*#__PURE__*/React.createElement(Box, {
26
+ as: "span",
27
+ xcss: cx(styles.highlight, styles.start)
28
+ }, /*#__PURE__*/React.createElement(Text, {
29
+ color: isDisabled ? 'color.text.disabled' : 'color.text.subtle'
30
+ }, "/")), /*#__PURE__*/React.createElement(Box, {
31
+ as: "span",
32
+ xcss: styles.highlight
33
+ }, slug.slice(0, -1)), slug && /*#__PURE__*/React.createElement(Box, {
34
+ as: "span",
35
+ xcss: cx(styles.highlight, styles.end)
36
+ }, slug.slice(-1))));
37
+ };
@@ -39,12 +39,10 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
39
39
  *
40
40
  * If you are updating this, please also update the above files.
41
41
  *
42
- * @deprecated This Emotion-based style function is being phased out as part of the
43
- * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
44
- * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
42
+ * @deprecated This Emotion-based style function is being phased out in favor of Compiled CSS.
43
+ * Any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
45
44
  * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
46
- * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
47
- * compiled version is active.
45
+ * in the `editorContentStyles` cssMap) to keep the shared styles consistent.
48
46
  */
49
47
  var tableSharedStyle = function tableSharedStyle() {
50
48
  var browser = getBrowserInfo();
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "128.0.0";
24
+ var packageVersion = "128.1.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -15,6 +15,7 @@ export type MenuItem = {
15
15
  key: string;
16
16
  keywords: string[];
17
17
  lozenge?: ReactNode;
18
+ moduleKey?: string;
18
19
  node: ADFEntity | ExtensionModuleActionHandler;
19
20
  preview?: QuickInsertPreview;
20
21
  priority?: number;
@@ -434,6 +434,11 @@ export declare const syncBlockMessages: {
434
434
  description: string;
435
435
  id: string;
436
436
  };
437
+ syncedLocationDropdownRestrictedContent: {
438
+ defaultMessage: string;
439
+ description: string;
440
+ id: string;
441
+ };
437
442
  syncedLocationDropdownSamePage: {
438
443
  defaultMessage: string;
439
444
  description: string;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import type { QuickInsertMenuItemProps } from './QuickInsertMenuItem';
3
- export declare const CompactQuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, preview, previewImageUrls, shortcut, shouldShowPreview, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
3
+ export declare const CompactQuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, preview, previewIcon, previewImageUrls, shortcut, titleContent, shouldShowPreview, shouldClampPreview, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
@@ -4,4 +4,4 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import type { QuickInsertMenuItemProps } from './QuickInsertMenuItem';
7
- export declare const ElementBrowserQuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, shortcut, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
7
+ export declare const ElementBrowserQuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, shortcut, titleContent, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
@@ -9,14 +9,17 @@ export type QuickInsertSelectionHandler = (context: {
9
9
  source: INPUT_METHOD.ELEMENT_BROWSER | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
10
10
  }) => Transaction | false | void;
11
11
  export type QuickInsertContextValue = {
12
+ activePreviewItemKey?: string;
12
13
  editorView: EditorView;
13
14
  isOffline: boolean;
14
15
  item?: {
15
16
  description?: string;
16
17
  id: string;
18
+ isPreviewActive?: boolean;
17
19
  isSelected: boolean;
18
20
  };
19
21
  menuOpenId?: symbol;
22
+ popupsMountPoint?: HTMLElement;
20
23
  select: (selectionHandler: QuickInsertSelectionHandler) => void;
21
24
  surface: 'typeahead' | 'toolbar' | 'element-browser';
22
25
  surfaceContext?: SurfaceContext;
@@ -1,9 +1,18 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ * @jsxFrag React.Fragment
5
+ */
6
+ import React, { type ReactNode } from 'react';
1
7
  import type { QuickInsertPreview } from './preview';
2
8
  /** The selected item's description and attribution are announced through its aria-describedby. */
3
- export declare const QuickInsertHoverPreview: ({ description, id, preview, referenceElement, title, }: {
9
+ export declare const QuickInsertHoverPreview: ({ description, icon, id, preview, popupsMountPoint, referenceElement, shouldClampText, title, }: {
4
10
  description?: string;
11
+ icon?: ReactNode;
5
12
  id: string;
6
13
  preview: QuickInsertPreview;
14
+ popupsMountPoint?: HTMLElement;
7
15
  referenceElement: HTMLElement;
16
+ shouldClampText?: boolean;
8
17
  title: string;
9
18
  }) => React.JSX.Element;
@@ -17,15 +17,21 @@ export type QuickInsertMenuItemProps = {
17
17
  onSelect: (context: OnSelectContext) => Transaction | false | void;
18
18
  /** Structured preview content for the selected item. */
19
19
  preview?: QuickInsertPreview;
20
+ /** Icon displayed beside the preview title. */
21
+ previewIcon?: React.ReactNode;
20
22
  /** Retained for existing callers; new callers should pass `preview.image`. */
21
23
  previewImageUrls?: {
22
24
  dark?: string;
23
25
  light: string;
24
26
  } | null;
25
27
  shortcut?: string;
28
+ /** Whether preview title and description are clamped to a fixed number of lines. */
29
+ shouldClampPreview?: boolean;
26
30
  /** Disable previews for navigation actions rather than insertable items. */
27
31
  shouldShowPreview?: boolean;
28
32
  shouldWrapIcon?: boolean;
29
33
  title: string;
34
+ /** Rich title content rendered in place of the menu item title. */
35
+ titleContent?: React.ReactNode;
30
36
  };
31
- export declare const QuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, preview, previewImageUrls, shortcut, shouldShowPreview, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
37
+ export declare const QuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, preview, previewIcon, previewImageUrls, shortcut, titleContent, shouldShowPreview, shouldClampPreview, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export type SkillTagProps = {
3
+ isDisabled?: boolean;
4
+ slug: string;
5
+ };
6
+ export declare const SkillTag: ({ slug, isDisabled }: SkillTagProps) => React.JSX.Element;
@@ -17,12 +17,10 @@ export declare const tableControlsSpacing: number;
17
17
  *
18
18
  * If you are updating this, please also update the above files.
19
19
  *
20
- * @deprecated This Emotion-based style function is being phased out as part of the
21
- * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
22
- * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
20
+ * @deprecated This Emotion-based style function is being phased out in favor of Compiled CSS.
21
+ * Any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
23
22
  * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
24
- * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
25
- * compiled version is active.
23
+ * in the `editorContentStyles` cssMap) to keep the shared styles consistent.
26
24
  */
27
25
  declare const tableSharedStyle: () => SerializedStyles;
28
26
  export { tableSharedStyle };
@@ -125,6 +125,16 @@ export type FeatureFlags = {
125
125
  * @default false
126
126
  */
127
127
  extensionLocalIdGeneration?: boolean;
128
+ /**
129
+ * @description
130
+ * Used by the legacy content macro to disable render tracking due to excessive logs.
131
+ * Will be removed once re-rendering issue is resolved.
132
+ * Note: This is hardcoded into the LCM code, it does not exist in Switcheroo.
133
+ *
134
+ * @see https://product-fabric.atlassian.net/browse/ED-26650
135
+ * @default false
136
+ */
137
+ lcmPreventRenderTracking?: boolean;
128
138
  /**
129
139
  * @description
130
140
  * Use the linking platform link picker for link insertion and edit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "128.0.1",
3
+ "version": "128.2.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/activity-provider": "^3.1.0",
32
32
  "@atlaskit/adf-schema": "^57.6.0",
33
33
  "@atlaskit/adf-utils": "^20.9.0",
34
- "@atlaskit/afm-i18n-platform-editor-editor-common": "2.249.0",
34
+ "@atlaskit/afm-i18n-platform-editor-editor-common": "2.270.0",
35
35
  "@atlaskit/analytics-listeners": "^11.4.0",
36
36
  "@atlaskit/analytics-namespaced-context": "^8.2.0",
37
37
  "@atlaskit/analytics-next": "^12.5.0",
@@ -50,7 +50,7 @@
50
50
  "@atlaskit/editor-toolbar": "^2.8.0",
51
51
  "@atlaskit/editor-toolbar-model": "^1.2.0",
52
52
  "@atlaskit/editor-ui-control-model": "^2.10.0",
53
- "@atlaskit/emoji": "^72.4.0",
53
+ "@atlaskit/emoji": "^72.5.0",
54
54
  "@atlaskit/feature-gate-js-client": "^7.0.0",
55
55
  "@atlaskit/icon": "^38.0.0",
56
56
  "@atlaskit/link": "^5.1.0",
@@ -58,14 +58,14 @@
58
58
  "@atlaskit/link-picker": "^6.11.0",
59
59
  "@atlaskit/logo": "^23.3.0",
60
60
  "@atlaskit/media-card": "^82.1.0",
61
- "@atlaskit/media-client": "^39.0.0",
61
+ "@atlaskit/media-client": "^39.1.0",
62
62
  "@atlaskit/media-client-react": "^7.0.0",
63
63
  "@atlaskit/media-common": "^14.6.0",
64
64
  "@atlaskit/media-file-preview": "^2.0.0",
65
65
  "@atlaskit/media-picker": "^73.0.0",
66
- "@atlaskit/media-ui": "^31.0.0",
67
- "@atlaskit/media-viewer": "^54.10.0",
68
- "@atlaskit/mention": "^30.0.0",
66
+ "@atlaskit/media-ui": "^31.2.0",
67
+ "@atlaskit/media-viewer": "^54.11.0",
68
+ "@atlaskit/mention": "^30.1.0",
69
69
  "@atlaskit/menu": "^11.0.0",
70
70
  "@atlaskit/object": "^2.3.0",
71
71
  "@atlaskit/onboarding": "^15.4.0",
@@ -82,11 +82,11 @@
82
82
  "@atlaskit/smart-card": "^46.4.0",
83
83
  "@atlaskit/smart-user-picker": "^12.2.0",
84
84
  "@atlaskit/spinner": "^20.4.0",
85
- "@atlaskit/task-decision": "^21.11.0",
85
+ "@atlaskit/task-decision": "^21.12.0",
86
86
  "@atlaskit/teams-app-config": "^3.1.0",
87
87
  "@atlaskit/textfield": "^10.2.0",
88
- "@atlaskit/tmp-editor-statsig": "^220.0.0",
89
- "@atlaskit/tokens": "^20.1.0",
88
+ "@atlaskit/tmp-editor-statsig": "^221.0.0",
89
+ "@atlaskit/tokens": "^20.2.0",
90
90
  "@atlaskit/tooltip": "^24.4.0",
91
91
  "@atlaskit/width-detector": "^7.2.0",
92
92
  "@babel/runtime": "^7.0.0",
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/quick-insert/skill-tag",
3
+ "main": "../../dist/cjs/quick-insert/SkillTag.js",
4
+ "module": "../../dist/esm/quick-insert/SkillTag.js",
5
+ "module:es2019": "../../dist/es2019/quick-insert/SkillTag.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/quick-insert/SkillTag.d.ts"
10
+ }