@atlaskit/editor-common 122.3.3 → 122.5.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 (55) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/cjs/ai-messages/ai-suggestions.js +5 -0
  3. package/dist/cjs/compiled-migration/withCompiledMigration.js +18 -20
  4. package/dist/cjs/extensibility/ExtensionNodeWrapper.js +13 -0
  5. package/dist/cjs/extensibility/GeneratedContentReveal.compiled.css +53 -0
  6. package/dist/cjs/extensibility/GeneratedContentReveal.js +146 -0
  7. package/dist/cjs/extensibility/extensionNodeView.js +6 -2
  8. package/dist/cjs/extensibility/nativeEmbedExtension.js +19 -0
  9. package/dist/cjs/extensibility/useNativeEmbedSettled.js +56 -0
  10. package/dist/cjs/monitoring/error.js +1 -1
  11. package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +10 -12
  12. package/dist/cjs/ui/DropList/index.js +1 -1
  13. package/dist/cjs/ui/Emoji/index.js +5 -1
  14. package/dist/cjs/utils/isSingleEmoji.js +21 -0
  15. package/dist/cjs/utils/validator.js +6 -2
  16. package/dist/es2019/ai-messages/ai-suggestions.js +5 -0
  17. package/dist/es2019/compiled-migration/withCompiledMigration.js +17 -17
  18. package/dist/es2019/extensibility/ExtensionNodeWrapper.js +12 -0
  19. package/dist/es2019/extensibility/GeneratedContentReveal.compiled.css +53 -0
  20. package/dist/es2019/extensibility/GeneratedContentReveal.js +121 -0
  21. package/dist/es2019/extensibility/extensionNodeView.js +6 -2
  22. package/dist/es2019/extensibility/nativeEmbedExtension.js +14 -0
  23. package/dist/es2019/extensibility/useNativeEmbedSettled.js +49 -0
  24. package/dist/es2019/monitoring/error.js +1 -1
  25. package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +9 -14
  26. package/dist/es2019/ui/DropList/index.js +1 -1
  27. package/dist/es2019/ui/Emoji/index.js +5 -1
  28. package/dist/es2019/utils/isSingleEmoji.js +15 -0
  29. package/dist/es2019/utils/validator.js +6 -1
  30. package/dist/esm/ai-messages/ai-suggestions.js +5 -0
  31. package/dist/esm/compiled-migration/withCompiledMigration.js +18 -16
  32. package/dist/esm/extensibility/ExtensionNodeWrapper.js +13 -0
  33. package/dist/esm/extensibility/GeneratedContentReveal.compiled.css +53 -0
  34. package/dist/esm/extensibility/GeneratedContentReveal.js +138 -0
  35. package/dist/esm/extensibility/extensionNodeView.js +6 -2
  36. package/dist/esm/extensibility/nativeEmbedExtension.js +14 -0
  37. package/dist/esm/extensibility/useNativeEmbedSettled.js +51 -0
  38. package/dist/esm/monitoring/error.js +1 -1
  39. package/dist/esm/react-node-view/getInlineNodeViewProducer.js +9 -14
  40. package/dist/esm/ui/DropList/index.js +1 -1
  41. package/dist/esm/ui/Emoji/index.js +5 -1
  42. package/dist/esm/utils/isSingleEmoji.js +15 -0
  43. package/dist/esm/utils/validator.js +6 -2
  44. package/dist/types/ai-messages/ai-suggestions.d.ts +5 -0
  45. package/dist/types/compiled-migration/withCompiledMigration.d.ts +8 -6
  46. package/dist/types/extensibility/ExtensionNodeWrapper.d.ts +7 -1
  47. package/dist/types/extensibility/GeneratedContentReveal.d.ts +13 -0
  48. package/dist/types/extensibility/extensionNodeView.d.ts +2 -0
  49. package/dist/types/extensibility/nativeEmbedExtension.d.ts +10 -0
  50. package/dist/types/extensibility/useNativeEmbedSettled.d.ts +12 -0
  51. package/dist/types/react-node-view/getInlineNodeViewProducer.d.ts +0 -4
  52. package/dist/types/utils/isSingleEmoji.d.ts +9 -0
  53. package/extensibility/native-embed/package.json +10 -0
  54. package/package.json +8 -5
  55. package/utils/isSingleEmoji/package.json +10 -0
@@ -12,6 +12,8 @@ import ReactNodeView from '../react-node-view';
12
12
  import type { EditorAppearance } from '../types';
13
13
  import type { ExtensionsPluginInjectionAPI, MacroInteractionDesignFeatureFlags, GetPMNodeHeight } from './types';
14
14
  interface ExtensionNodeViewOptions {
15
+ /** See `allowAIGeneratedContentMotion` on the extension plugin's options. */
16
+ allowAIGeneratedContentMotion?: boolean;
15
17
  appearance?: EditorAppearance;
16
18
  getExtensionHeight?: GetPMNodeHeight;
17
19
  }
@@ -0,0 +1,10 @@
1
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
+ /**
3
+ * Whether a node is a native embed: the block `extension` that `editor-plugin-native-embeds` renders
4
+ * as an iframe. Bodied, multi-bodied and inline extensions do not qualify.
5
+ *
6
+ * The key can carry leading segments (`…:native-embed:database`), so it is matched with `includes`.
7
+ * `editor-plugin-native-embeds` and `editor-plugin-card` hold equivalent predicates; neither can be
8
+ * imported here, as both depend on this package.
9
+ */
10
+ export declare const isNativeEmbedExtension: (node: PMNode) => boolean;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Calls `onSettled` once the native embed inside `container` has finished loading, successfully or
3
+ * not. The extension handler mounts the embed asynchronously, so the subtree is observed rather
4
+ * than a known element.
5
+ *
6
+ * Two signals, because neither alone catches every embed: the attribute having been seen and gone,
7
+ * which covers a failure that renders no frame; or a frame with no attribute, which covers an embed
8
+ * that never advertises loading. The frame is present either way, so the attribute comes first.
9
+ *
10
+ * `onSettled` must be stable, and runs at most once per container.
11
+ */
12
+ export declare const useNativeEmbedSettled: (container: HTMLElement | null, onSettled: () => void) => void;
@@ -1,7 +1,3 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
2
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
7
3
  import type { Decoration, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Check if we can nicely fallback to the nodes text
3
+ *
4
+ * @param fallbackText string of the nodes fallback text
5
+ *
6
+ * @example
7
+ * isSingleEmoji('😀') // true
8
+ */
9
+ export declare function isSingleEmoji(fallbackText: string | undefined): boolean;
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/extensibility/native-embed",
3
+ "main": "../../dist/cjs/extensibility/nativeEmbedExtension.js",
4
+ "module": "../../dist/esm/extensibility/nativeEmbedExtension.js",
5
+ "module:es2019": "../../dist/es2019/extensibility/nativeEmbedExtension.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/extensibility/nativeEmbedExtension.d.ts"
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "122.3.3",
3
+ "version": "122.5.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/"
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/analytics-listeners": "^11.3.0",
36
36
  "@atlaskit/analytics-namespaced-context": "^8.2.0",
37
37
  "@atlaskit/analytics-next": "^12.5.0",
38
- "@atlaskit/atlassian-context": "^1.1.0",
38
+ "@atlaskit/atlassian-context": "^1.2.0",
39
39
  "@atlaskit/browser-apis": "^1.2.0",
40
40
  "@atlaskit/button": "^25.3.0",
41
41
  "@atlaskit/codemod-utils": "^5.1.0",
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/editor-ui-control-model": "^2.9.0",
53
53
  "@atlaskit/emoji": "^72.4.0",
54
54
  "@atlaskit/feature-gate-js-client": "^6.0.0",
55
- "@atlaskit/icon": "^37.6.0",
55
+ "@atlaskit/icon": "^37.7.0",
56
56
  "@atlaskit/link": "^5.1.0",
57
57
  "@atlaskit/link-datasource": "^6.13.0",
58
58
  "@atlaskit/link-picker": "^6.8.0",
@@ -73,12 +73,12 @@
73
73
  "@atlaskit/platform-feature-flags-react": "^1.2.0",
74
74
  "@atlaskit/popper": "^9.4.0",
75
75
  "@atlaskit/primitives": "^22.5.0",
76
- "@atlaskit/profilecard": "^26.23.0",
76
+ "@atlaskit/profilecard": "^26.24.0",
77
77
  "@atlaskit/prosemirror-history": "^1.2.0",
78
78
  "@atlaskit/react-compiler-gating": "^0.2.0",
79
79
  "@atlaskit/react-ufo": "^7.10.0",
80
80
  "@atlaskit/section-message": "^10.2.0",
81
- "@atlaskit/smart-card": "^45.22.0",
81
+ "@atlaskit/smart-card": "^45.23.0",
82
82
  "@atlaskit/smart-user-picker": "^11.8.0",
83
83
  "@atlaskit/spinner": "^20.4.0",
84
84
  "@atlaskit/task-decision": "^21.10.0",
@@ -244,6 +244,9 @@
244
244
  },
245
245
  "platform_editor_embed_height_only_fallback": {
246
246
  "type": "boolean"
247
+ },
248
+ "platform_editor_custom_emoji_unicode_fallback": {
249
+ "type": "boolean"
247
250
  }
248
251
  },
249
252
  "platform-experiments": {
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/utils/isSingleEmoji",
3
+ "main": "../../dist/cjs/utils/isSingleEmoji.js",
4
+ "module": "../../dist/esm/utils/isSingleEmoji.js",
5
+ "module:es2019": "../../dist/es2019/utils/isSingleEmoji.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/utils/isSingleEmoji.d.ts"
10
+ }