@atlaskit/rovo-triggers 6.0.0 → 6.0.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 6.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7c271eb122a53`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7c271eb122a53) -
8
+ Pass isViewMode property through for slides and database contexts. Previously isViewMode was only
9
+ passed through for editor and whiteboard contexts. Now it flows end-to-end from the read content
10
+ command result through fetchContent, payload data types, and service API types to the backend.
11
+ Also updates getPageContext to return slides-view/slides-edit and database-view/database-edit
12
+ based on isViewMode.
13
+
14
+ ## 6.0.1
15
+
16
+ ### Patch Changes
17
+
18
+ - [`736a48a613fb6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/736a48a613fb6) -
19
+ Allow Rovo postMessage events from Jira's atlassian.cloud host.
20
+
3
21
  ## 6.0.0
4
22
 
5
23
  ### Major Changes
@@ -13,7 +13,7 @@ var _main = require("../../../main");
13
13
  var ROVO_POST_MESSAGE_EVENT_TYPE = exports.ROVO_POST_MESSAGE_EVENT_TYPE = 'rovo-post-message';
14
14
  var ROVO_POST_MESSAGE_ACK_EVENT_TYPE = exports.ROVO_POST_MESSAGE_ACK_EVENT_TYPE = 'rovo-post-message-ack';
15
15
  // allow subdomains of these domains
16
- var allowedSubdomains = ['.jira-dev.com', '.atlassian.com', '.atlassian.net', '.atl-paas.net'];
16
+ var allowedSubdomains = ['.jira-dev.com', '.jira.atlassian.cloud', '.atlassian.com', '.atlassian.net', '.atl-paas.net'];
17
17
  var allowedOrigins = ['bitbucket.org', 'trello.com'];
18
18
  var isAllowedOrigin = exports.isAllowedOrigin = function isAllowedOrigin(origin) {
19
19
  if (!origin) {
@@ -5,7 +5,7 @@ import { usePublish } from '../../../main';
5
5
  export const ROVO_POST_MESSAGE_EVENT_TYPE = 'rovo-post-message';
6
6
  export const ROVO_POST_MESSAGE_ACK_EVENT_TYPE = 'rovo-post-message-ack';
7
7
  // allow subdomains of these domains
8
- const allowedSubdomains = ['.jira-dev.com', '.atlassian.com', '.atlassian.net', '.atl-paas.net'];
8
+ const allowedSubdomains = ['.jira-dev.com', '.jira.atlassian.cloud', '.atlassian.com', '.atlassian.net', '.atl-paas.net'];
9
9
  const allowedOrigins = ['bitbucket.org', 'trello.com'];
10
10
  export const isAllowedOrigin = origin => {
11
11
  if (!origin) {
@@ -6,7 +6,7 @@ import { usePublish } from '../../../main';
6
6
  export var ROVO_POST_MESSAGE_EVENT_TYPE = 'rovo-post-message';
7
7
  export var ROVO_POST_MESSAGE_ACK_EVENT_TYPE = 'rovo-post-message-ack';
8
8
  // allow subdomains of these domains
9
- var allowedSubdomains = ['.jira-dev.com', '.atlassian.com', '.atlassian.net', '.atl-paas.net'];
9
+ var allowedSubdomains = ['.jira-dev.com', '.jira.atlassian.cloud', '.atlassian.com', '.atlassian.net', '.atl-paas.net'];
10
10
  var allowedOrigins = ['bitbucket.org', 'trello.com'];
11
11
  export var isAllowedOrigin = function isAllowedOrigin(origin) {
12
12
  if (!origin) {
@@ -127,6 +127,7 @@ export type SlidesContextPayloadData = {
127
127
  url: string;
128
128
  selectedSlideIndex: number;
129
129
  selectedElementIds: string[];
130
+ isViewMode?: boolean;
130
131
  } | undefined;
131
132
  export type DatabaseContextPayloadData = {
132
133
  contentId: string;
@@ -134,6 +135,7 @@ export type DatabaseContextPayloadData = {
134
135
  title: string;
135
136
  url: string;
136
137
  selectedElementIds?: string[];
138
+ isViewMode?: boolean;
137
139
  } | undefined;
138
140
  /** Partial database context for iframe updates (e.g. selection-only). */
139
141
  export type DatabaseContextUpdatePayloadData = Partial<NonNullable<DatabaseContextPayloadData>>;
@@ -228,6 +230,11 @@ export type InsertPromptPayload = PayloadCore<'insert-prompt', {
228
230
  agentName?: string;
229
231
  agentIdentityAccountId?: string;
230
232
  avatarUrl?: string;
233
+ /**
234
+ * Optional files to attach to the chat input alongside the prompt.
235
+ * Gated by the enable_rovo_static_prompt_file_uploads experiment.
236
+ */
237
+ files?: UploadedFile[];
231
238
  } & PlaceholderParam>;
232
239
  /** Inserts URLs as inline nodes into the chat input
233
240
  * - URLs are deduplicated against existing content
@@ -127,6 +127,7 @@ export type SlidesContextPayloadData = {
127
127
  url: string;
128
128
  selectedSlideIndex: number;
129
129
  selectedElementIds: string[];
130
+ isViewMode?: boolean;
130
131
  } | undefined;
131
132
  export type DatabaseContextPayloadData = {
132
133
  contentId: string;
@@ -134,6 +135,7 @@ export type DatabaseContextPayloadData = {
134
135
  title: string;
135
136
  url: string;
136
137
  selectedElementIds?: string[];
138
+ isViewMode?: boolean;
137
139
  } | undefined;
138
140
  /** Partial database context for iframe updates (e.g. selection-only). */
139
141
  export type DatabaseContextUpdatePayloadData = Partial<NonNullable<DatabaseContextPayloadData>>;
@@ -228,6 +230,11 @@ export type InsertPromptPayload = PayloadCore<'insert-prompt', {
228
230
  agentName?: string;
229
231
  agentIdentityAccountId?: string;
230
232
  avatarUrl?: string;
233
+ /**
234
+ * Optional files to attach to the chat input alongside the prompt.
235
+ * Gated by the enable_rovo_static_prompt_file_uploads experiment.
236
+ */
237
+ files?: UploadedFile[];
231
238
  } & PlaceholderParam>;
232
239
  /** Inserts URLs as inline nodes into the chat input
233
240
  * - URLs are deduplicated against existing content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "Provides various trigger events to drive Rovo Chat functionality, such as a publish-subscribe and URL parameter hooks",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -36,7 +36,7 @@
36
36
  ],
37
37
  "atlaskit:src": "src/index.ts",
38
38
  "dependencies": {
39
- "@atlaskit/adf-schema": "^52.7.0",
39
+ "@atlaskit/adf-schema": "^52.9.0",
40
40
  "@atlaskit/platform-feature-flags": "^1.1.0",
41
41
  "@babel/runtime": "^7.0.0",
42
42
  "bind-event-listener": "^3.0.0"