@atlaskit/native-embeds-common 1.1.1 → 1.3.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 (34) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/constants/package.json +17 -0
  3. package/dist/cjs/entry-points/constants.js +36 -0
  4. package/dist/cjs/entry-points/embed-depth-constants.js +24 -0
  5. package/dist/cjs/entry-points/plugin-actions-types.js +1 -0
  6. package/dist/cjs/entry-points/types.js +1 -0
  7. package/dist/cjs/entry-points/utils.js +36 -0
  8. package/dist/es2019/entry-points/constants.js +1 -0
  9. package/dist/es2019/entry-points/embed-depth-constants.js +1 -0
  10. package/dist/es2019/entry-points/plugin-actions-types.js +0 -0
  11. package/dist/es2019/entry-points/types.js +0 -0
  12. package/dist/es2019/entry-points/utils.js +1 -0
  13. package/dist/esm/entry-points/constants.js +1 -0
  14. package/dist/esm/entry-points/embed-depth-constants.js +1 -0
  15. package/dist/esm/entry-points/plugin-actions-types.js +0 -0
  16. package/dist/esm/entry-points/types.js +0 -0
  17. package/dist/esm/entry-points/utils.js +1 -0
  18. package/dist/types/entry-points/constants.d.ts +1 -0
  19. package/dist/types/entry-points/embed-depth-constants.d.ts +1 -0
  20. package/dist/types/entry-points/plugin-actions-types.d.ts +1 -0
  21. package/dist/types/entry-points/types.d.ts +1 -0
  22. package/dist/types/entry-points/utils.d.ts +1 -0
  23. package/dist/types/utils/types.d.ts +5 -0
  24. package/dist/types-ts4.5/entry-points/constants.d.ts +1 -0
  25. package/dist/types-ts4.5/entry-points/embed-depth-constants.d.ts +1 -0
  26. package/dist/types-ts4.5/entry-points/plugin-actions-types.d.ts +1 -0
  27. package/dist/types-ts4.5/entry-points/types.d.ts +1 -0
  28. package/dist/types-ts4.5/entry-points/utils.d.ts +1 -0
  29. package/dist/types-ts4.5/utils/types.d.ts +5 -0
  30. package/embed-depth/constants/package.json +17 -0
  31. package/package.json +5 -4
  32. package/plugin-actions/types/package.json +17 -0
  33. package/types/package.json +17 -0
  34. package/utils/package.json +17 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # @atlaskit/native-embeds-common
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`c56f27a582fec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c56f27a582fec) -
8
+ Autofix: add explicit package exports (barrel removal)
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 1.2.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`6909e71070730`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6909e71070730) -
19
+ Show an AI generating overlay (rainbow loading bar) on the targeted native embed while Rovo is
20
+ processing an inline-edit prompt. Behind the `cc-maui-phase-2-loading` feature gate.
21
+
22
+ Two-stage commit pattern so the overlay only appears once the user has actually submitted a prompt
23
+ — not when the AI modal first opens:
24
+ - The toolbar handler for "Ask Rovo" (`maui:onAskRovoClick`) **stages** the embed `localId` via
25
+ the new `stageInlineRovoStreaming` action. The toolbar handler factory now propagates the
26
+ selected node's `localId` to manifest handlers via
27
+ `EditorToolbarHandlerContext.selectedNodeLocalId` so MAUI can stage the correct target before
28
+ opening the AI modal.
29
+ - `RovoPromptScreenWithLogic.onSubmit` **commits** the staged id via `commitInlineRovoStreaming`.
30
+ This is what triggers the consumer-visible loading overlay.
31
+ - `RovoPromptScreenWithLogic.onComplete` / `handleAbort` dispatches `endInlineRovoStreaming` to
32
+ clear it.
33
+
34
+ The native-embeds extension subscribes to the AI plugin's new `inlineRovoStreamingTargetId`
35
+ shared-state field and renders the overlay when its own `localId` matches.
36
+
37
+ The overlay component (`AIGeneratingOverlay`) is colocated inside `native-embeds-core` rather than
38
+ extracted to a shared package. Hosting it in `@atlaskit/editor-common` (the natural shared spot)
39
+ would create a TS6202 circular project reference because `editor-common` already depends on
40
+ `@atlaskit/media-card`. A new leaf-level package would force workspace registrations across every
41
+ product `package.json`, plus tsconfig project-reference updates and lockfile churn — large
42
+ unrelated review surface for a 130-line component. When the parallel media inline-edit branch
43
+ lands (PR #357140), the two implementations should be consolidated into a shared package below
44
+ both consumers in the dependency graph.
45
+
46
+ Includes reducer + consumer unit tests covering both gate-on and gate-off paths.
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies
51
+
3
52
  ## 1.1.1
4
53
 
5
54
  ### Patch Changes
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/native-embeds-common/constants",
3
+ "main": "../dist/cjs/entry-points/constants.js",
4
+ "module": "../dist/esm/entry-points/constants.js",
5
+ "module:es2019": "../dist/es2019/entry-points/constants.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/entry-points/constants.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../dist/types-ts4.5/entry-points/constants.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ALIGNMENT_VALUES", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _constants.ALIGNMENT_VALUES;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "BUILTIN_TOOLBAR_KEYS", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _constants.BUILTIN_TOOLBAR_KEYS;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "DEFAULT_ALIGNMENT", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _constants.DEFAULT_ALIGNMENT;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "EDITOR_TOOLBAR_HANDLER_KEYS", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _constants.EDITOR_TOOLBAR_HANDLER_KEYS;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "NATIVE_EMBED_PARAMETER_DEFAULTS", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _constants.NATIVE_EMBED_PARAMETER_DEFAULTS;
34
+ }
35
+ });
36
+ var _constants = require("../utils/constants");
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "EMBED_DEPTH_QUERY_PARAM", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _constants.EMBED_DEPTH_QUERY_PARAM;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "MAX_EMBED_DEPTH", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _constants.MAX_EMBED_DEPTH;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "getCurrentEmbedDepth", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _constants.getCurrentEmbedDepth;
22
+ }
23
+ });
24
+ var _constants = require("../utils/constants");
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "createEditorToolbarActions", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _utils.createEditorToolbarActions;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "getParameter", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _utils.getParameter;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "getParameters", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _utils.getParameters;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "setParameter", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _utils.setParameter;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "setParameters", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _utils.setParameters;
34
+ }
35
+ });
36
+ var _utils = require("../utils/utils");
@@ -0,0 +1 @@
1
+ export { ALIGNMENT_VALUES, DEFAULT_ALIGNMENT, BUILTIN_TOOLBAR_KEYS, EDITOR_TOOLBAR_HANDLER_KEYS, NATIVE_EMBED_PARAMETER_DEFAULTS } from '../utils/constants';
@@ -0,0 +1 @@
1
+ export { EMBED_DEPTH_QUERY_PARAM, getCurrentEmbedDepth, MAX_EMBED_DEPTH } from '../utils/constants';
File without changes
@@ -0,0 +1 @@
1
+ export { createEditorToolbarActions, getParameter, getParameters, setParameter, setParameters } from '../utils/utils';
@@ -0,0 +1 @@
1
+ export { ALIGNMENT_VALUES, DEFAULT_ALIGNMENT, BUILTIN_TOOLBAR_KEYS, EDITOR_TOOLBAR_HANDLER_KEYS, NATIVE_EMBED_PARAMETER_DEFAULTS } from '../utils/constants';
@@ -0,0 +1 @@
1
+ export { EMBED_DEPTH_QUERY_PARAM, getCurrentEmbedDepth, MAX_EMBED_DEPTH } from '../utils/constants';
File without changes
File without changes
@@ -0,0 +1 @@
1
+ export { createEditorToolbarActions, getParameter, getParameters, setParameter, setParameters } from '../utils/utils';
@@ -0,0 +1 @@
1
+ export { ALIGNMENT_VALUES, DEFAULT_ALIGNMENT, BUILTIN_TOOLBAR_KEYS, EDITOR_TOOLBAR_HANDLER_KEYS, NATIVE_EMBED_PARAMETER_DEFAULTS, } from '../utils/constants';
@@ -0,0 +1 @@
1
+ export { EMBED_DEPTH_QUERY_PARAM, getCurrentEmbedDepth, MAX_EMBED_DEPTH } from '../utils/constants';
@@ -0,0 +1 @@
1
+ export type { CardToNativeEmbedNode, CardToNativeEmbedTransformOptions, CreateCardToNativeEmbedTransform, EditorPluginNativeEmbedsPlugin, NativeEmbedLayout, NativeEmbedTransformAttrs, } from '../utils/plugin-actions/types';
@@ -0,0 +1 @@
1
+ export type { AlignmentValue, EditorToolbarButtonAction, EditorToolbarAction, EditorToolbarHandler, EditorToolbarHandlerContext, EditorToolbarHandlerKey, EditorToolbarHandlers, NativeEmbedAppearance, NativeEmbedParameterKey, NativeEmbedParameterValues, NativeEmbedParameterValue, NativeEmbedParameters, BuiltinToolbarKey, ManifestEditorToolbarActions, } from '../utils/types';
@@ -0,0 +1 @@
1
+ export { createEditorToolbarActions, getParameter, getParameters, setParameter, setParameters, } from '../utils/utils';
@@ -30,6 +30,11 @@ export type NativeEmbedParameters = {
30
30
  export type NativeEmbedParameterKey = keyof NonNullable<NativeEmbedParameters['macroParams']>;
31
31
  export type EditorToolbarHandlerContext = {
32
32
  editorApi?: PublicPluginAPI<[]>;
33
+ /**
34
+ * `localId` of the selected native-embed at toolbar click time. Set by
35
+ * the toolbar handler factory; manifest handlers use it to wire per-embed state.
36
+ */
37
+ selectedNodeLocalId?: string;
33
38
  };
34
39
  /**
35
40
  * A button action rendered in the editor floating toolbar.
@@ -0,0 +1 @@
1
+ export { ALIGNMENT_VALUES, DEFAULT_ALIGNMENT, BUILTIN_TOOLBAR_KEYS, EDITOR_TOOLBAR_HANDLER_KEYS, NATIVE_EMBED_PARAMETER_DEFAULTS, } from '../utils/constants';
@@ -0,0 +1 @@
1
+ export { EMBED_DEPTH_QUERY_PARAM, getCurrentEmbedDepth, MAX_EMBED_DEPTH } from '../utils/constants';
@@ -0,0 +1 @@
1
+ export type { CardToNativeEmbedNode, CardToNativeEmbedTransformOptions, CreateCardToNativeEmbedTransform, EditorPluginNativeEmbedsPlugin, NativeEmbedLayout, NativeEmbedTransformAttrs, } from '../utils/plugin-actions/types';
@@ -0,0 +1 @@
1
+ export type { AlignmentValue, EditorToolbarButtonAction, EditorToolbarAction, EditorToolbarHandler, EditorToolbarHandlerContext, EditorToolbarHandlerKey, EditorToolbarHandlers, NativeEmbedAppearance, NativeEmbedParameterKey, NativeEmbedParameterValues, NativeEmbedParameterValue, NativeEmbedParameters, BuiltinToolbarKey, ManifestEditorToolbarActions, } from '../utils/types';
@@ -0,0 +1 @@
1
+ export { createEditorToolbarActions, getParameter, getParameters, setParameter, setParameters, } from '../utils/utils';
@@ -31,6 +31,11 @@ export type NativeEmbedParameterKey = keyof NonNullable<NativeEmbedParameters['m
31
31
  export type EditorToolbarHandlerContext = {
32
32
  editorApi?: PublicPluginAPI<[
33
33
  ]>;
34
+ /**
35
+ * `localId` of the selected native-embed at toolbar click time. Set by
36
+ * the toolbar handler factory; manifest handlers use it to wire per-embed state.
37
+ */
38
+ selectedNodeLocalId?: string;
34
39
  };
35
40
  /**
36
41
  * A button action rendered in the editor floating toolbar.
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/native-embeds-common/embed-depth/constants",
3
+ "main": "../../dist/cjs/entry-points/embed-depth-constants.js",
4
+ "module": "../../dist/esm/entry-points/embed-depth-constants.js",
5
+ "module:es2019": "../../dist/es2019/entry-points/embed-depth-constants.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/entry-points/embed-depth-constants.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../../dist/types-ts4.5/entry-points/embed-depth-constants.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
package/package.json CHANGED
@@ -25,11 +25,11 @@
25
25
  "atlaskit:src": "src/index.ts",
26
26
  "dependencies": {
27
27
  "@atlaskit/button": "^23.11.0",
28
- "@atlaskit/editor-common": "^114.13.0",
29
- "@atlaskit/editor-plugin-local-id": "^8.0.0",
28
+ "@atlaskit/editor-common": "^114.30.0",
29
+ "@atlaskit/editor-plugin-local-id": "^8.1.0",
30
30
  "@atlaskit/editor-prosemirror": "^7.3.0",
31
31
  "@atlaskit/heading": "^5.4.0",
32
- "@atlaskit/icon": "^34.3.0",
32
+ "@atlaskit/icon": "^34.5.0",
33
33
  "@atlaskit/primitives": "^19.0.0",
34
34
  "@atlaskit/tokens": "^13.0.0",
35
35
  "@babel/runtime": "^7.0.0",
@@ -86,10 +86,11 @@
86
86
  }
87
87
  },
88
88
  "name": "@atlaskit/native-embeds-common",
89
- "version": "1.1.1",
89
+ "version": "1.3.0",
90
90
  "description": "A shared package for native embeds to be used across experiences and plugin",
91
91
  "author": "Atlassian Pty Ltd",
92
92
  "license": "Apache-2.0",
93
+ "i18n": true,
93
94
  "publishConfig": {
94
95
  "registry": "https://registry.npmjs.org/"
95
96
  }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/native-embeds-common/plugin-actions/types",
3
+ "main": "../../dist/cjs/entry-points/plugin-actions-types.js",
4
+ "module": "../../dist/esm/entry-points/plugin-actions-types.js",
5
+ "module:es2019": "../../dist/es2019/entry-points/plugin-actions-types.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/entry-points/plugin-actions-types.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../../dist/types-ts4.5/entry-points/plugin-actions-types.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/native-embeds-common/types",
3
+ "main": "../dist/cjs/entry-points/types.js",
4
+ "module": "../dist/esm/entry-points/types.js",
5
+ "module:es2019": "../dist/es2019/entry-points/types.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/entry-points/types.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../dist/types-ts4.5/entry-points/types.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/native-embeds-common/utils",
3
+ "main": "../dist/cjs/entry-points/utils.js",
4
+ "module": "../dist/esm/entry-points/utils.js",
5
+ "module:es2019": "../dist/es2019/entry-points/utils.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/entry-points/utils.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../dist/types-ts4.5/entry-points/utils.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }