@jupyter/chat 0.16.0 → 0.17.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.
package/lib/model.d.ts CHANGED
@@ -419,6 +419,10 @@ export interface IChatContext {
419
419
  * A list of all users who have connected to this chat.
420
420
  */
421
421
  readonly users: IUser[];
422
+ /**
423
+ * Current user connected with the chat panel
424
+ */
425
+ readonly user: IUser | undefined;
422
426
  }
423
427
  /**
424
428
  * An abstract base class implementing `IChatContext`. This can be extended into
@@ -430,6 +434,7 @@ export declare abstract class AbstractChatContext implements IChatContext {
430
434
  });
431
435
  get name(): string;
432
436
  get messages(): IChatMessage[];
437
+ get user(): IUser | undefined;
433
438
  /**
434
439
  * ABSTRACT: Should return a list of users who have connected to this chat.
435
440
  */
package/lib/model.js CHANGED
@@ -435,4 +435,8 @@ export class AbstractChatContext {
435
435
  get messages() {
436
436
  return [...this._model.messages];
437
437
  }
438
+ get user() {
439
+ var _a;
440
+ return (_a = this._model) === null || _a === void 0 ? void 0 : _a.user;
441
+ }
438
442
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyter/chat",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "A package that provides UI components that can be used to create a chat in a Jupyterlab extension.",
5
5
  "keywords": [
6
6
  "jupyter",
package/src/model.ts CHANGED
@@ -784,6 +784,10 @@ export interface IChatContext {
784
784
  * A list of all users who have connected to this chat.
785
785
  */
786
786
  readonly users: IUser[];
787
+ /**
788
+ * Current user connected with the chat panel
789
+ */
790
+ readonly user: IUser | undefined;
787
791
  }
788
792
 
789
793
  /**
@@ -803,6 +807,10 @@ export abstract class AbstractChatContext implements IChatContext {
803
807
  return [...this._model.messages];
804
808
  }
805
809
 
810
+ get user(): IUser | undefined {
811
+ return this._model?.user;
812
+ }
813
+
806
814
  /**
807
815
  * ABSTRACT: Should return a list of users who have connected to this chat.
808
816
  */
package/style/chat.css CHANGED
@@ -19,7 +19,6 @@
19
19
  }
20
20
 
21
21
  /*
22
- *
23
22
  * Selectors must be nested in `.jp-ThemedContainer` to have a higher
24
23
  * specificity than selectors in rules provided by JupyterLab.
25
24
  *
@@ -147,7 +146,6 @@
147
146
  }
148
147
 
149
148
  /* Keyframe animations */
150
-
151
149
  @keyframes jp-chat-typing-bounce {
152
150
  0%,
153
151
  80%,
package/style/input.css CHANGED
@@ -41,6 +41,7 @@
41
41
  padding: 8px 0;
42
42
  }
43
43
 
44
+ /* stylelint-disable-next-line selector-class-pattern */
44
45
  .jp-chat-input-container .MuiTextField-root {
45
46
  padding-bottom: 8px;
46
47
  }
@@ -48,10 +49,7 @@
48
49
  .jp-chat-input-container.jp-chat-drag-hover::after {
49
50
  content: '';
50
51
  position: absolute;
51
- top: 0;
52
- left: 0;
53
- right: 0;
54
- bottom: 0;
52
+ inset: 0;
55
53
  background: rgb(33 150 243 / 10%);
56
54
  border: 2px dashed var(--jp-brand-color1);
57
55
  border-radius: 4px;