@jupyter/chat 0.12.0 → 0.14.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 (90) hide show
  1. package/lib/active-cell-manager.d.ts +2 -0
  2. package/lib/active-cell-manager.js +7 -2
  3. package/lib/components/avatar.d.ts +20 -0
  4. package/lib/components/avatar.js +29 -0
  5. package/lib/components/chat.d.ts +1 -3
  6. package/lib/components/chat.js +2 -3
  7. package/lib/components/index.d.ts +2 -3
  8. package/lib/components/index.js +2 -3
  9. package/lib/components/input/buttons/send-button.js +15 -5
  10. package/lib/components/{chat-input.d.ts → input/chat-input.d.ts} +3 -3
  11. package/lib/components/{chat-input.js → input/chat-input.js} +7 -4
  12. package/lib/components/input/index.d.ts +1 -0
  13. package/lib/components/input/index.js +1 -0
  14. package/lib/components/input/toolbar-registry.d.ts +6 -0
  15. package/lib/components/input/use-chat-commands.d.ts +1 -1
  16. package/lib/components/input/use-chat-commands.js +23 -12
  17. package/lib/components/messages/footer.d.ts +2 -2
  18. package/lib/components/messages/footer.js +1 -1
  19. package/lib/components/messages/header.d.ts +16 -0
  20. package/lib/components/messages/header.js +85 -0
  21. package/lib/components/messages/index.d.ts +9 -0
  22. package/lib/components/messages/index.js +13 -0
  23. package/lib/components/messages/message-renderer.js +1 -1
  24. package/lib/components/messages/message.d.ts +21 -0
  25. package/lib/components/messages/message.js +102 -0
  26. package/lib/components/messages/messages.d.ts +38 -0
  27. package/lib/components/messages/messages.js +139 -0
  28. package/lib/components/messages/navigation.d.ts +20 -0
  29. package/lib/components/messages/navigation.js +98 -0
  30. package/lib/components/messages/writers.d.ts +16 -0
  31. package/lib/components/messages/writers.js +39 -0
  32. package/lib/context.d.ts +1 -1
  33. package/lib/index.d.ts +2 -6
  34. package/lib/index.js +2 -6
  35. package/lib/{registry.d.ts → registers/attachment-openers.d.ts} +1 -1
  36. package/lib/registers/chat-commands.d.ts +108 -0
  37. package/lib/{chat-commands/registry.js → registers/chat-commands.js} +8 -8
  38. package/lib/{footers/registry.d.ts → registers/footers.d.ts} +30 -5
  39. package/lib/registers/index.d.ts +3 -0
  40. package/lib/{footers → registers}/index.js +3 -2
  41. package/lib/selection-watcher.d.ts +11 -1
  42. package/lib/selection-watcher.js +10 -4
  43. package/lib/widgets/index.d.ts +3 -0
  44. package/lib/{chat-commands → widgets}/index.js +3 -2
  45. package/package.json +3 -1
  46. package/src/active-cell-manager.ts +10 -1
  47. package/src/components/avatar.tsx +68 -0
  48. package/src/components/chat.tsx +11 -6
  49. package/src/components/index.ts +2 -3
  50. package/src/components/input/buttons/send-button.tsx +17 -5
  51. package/src/components/{chat-input.tsx → input/chat-input.tsx} +12 -7
  52. package/src/components/input/index.ts +1 -0
  53. package/src/components/input/toolbar-registry.tsx +6 -0
  54. package/src/components/input/use-chat-commands.tsx +30 -15
  55. package/src/components/messages/footer.tsx +5 -2
  56. package/src/components/messages/header.tsx +133 -0
  57. package/src/components/messages/index.ts +14 -0
  58. package/src/components/messages/message-renderer.tsx +1 -1
  59. package/src/components/messages/message.tsx +156 -0
  60. package/src/components/messages/messages.tsx +218 -0
  61. package/src/components/messages/navigation.tsx +167 -0
  62. package/src/components/messages/welcome.tsx +1 -0
  63. package/src/components/messages/writers.tsx +81 -0
  64. package/src/context.ts +1 -1
  65. package/src/index.ts +2 -6
  66. package/src/{registry.ts → registers/attachment-openers.ts} +2 -1
  67. package/src/registers/chat-commands.ts +142 -0
  68. package/src/{footers/registry.ts → registers/footers.ts} +35 -8
  69. package/src/{footers → registers}/index.ts +3 -2
  70. package/src/selection-watcher.ts +28 -5
  71. package/src/{chat-commands → widgets}/index.ts +3 -2
  72. package/style/chat.css +82 -0
  73. package/lib/chat-commands/index.d.ts +0 -2
  74. package/lib/chat-commands/registry.d.ts +0 -28
  75. package/lib/chat-commands/types.d.ts +0 -52
  76. package/lib/chat-commands/types.js +0 -5
  77. package/lib/components/chat-messages.d.ts +0 -119
  78. package/lib/components/chat-messages.js +0 -446
  79. package/lib/footers/index.d.ts +0 -2
  80. package/lib/footers/types.d.ts +0 -26
  81. package/lib/footers/types.js +0 -5
  82. package/src/chat-commands/registry.ts +0 -60
  83. package/src/chat-commands/types.ts +0 -67
  84. package/src/components/chat-messages.tsx +0 -739
  85. package/src/footers/types.ts +0 -33
  86. package/lib/components/{toolbar.d.ts → messages/toolbar.d.ts} +0 -0
  87. package/lib/components/{toolbar.js → messages/toolbar.js} +0 -0
  88. package/lib/{registry.js → registers/attachment-openers.js} +0 -0
  89. package/lib/{footers/registry.js → registers/footers.js} +4 -4
  90. /package/src/components/{toolbar.tsx → messages/toolbar.tsx} +0 -0
@@ -1,33 +0,0 @@
1
- /*
2
- * Copyright (c) Jupyter Development Team.
3
- * Distributed under the terms of the Modified BSD License.
4
- */
5
-
6
- import { IChatModel } from '../model';
7
- import { IChatMessage } from '../types';
8
-
9
- /**
10
- * The props sent passed to each `MessageFooterSection` React component.
11
- */
12
- export type MessageFooterSectionProps = {
13
- model: IChatModel;
14
- message: IChatMessage;
15
- };
16
-
17
- /**
18
- * A message footer section which can be added to the footer registry.
19
- */
20
- export type MessageFooterSection = {
21
- component: React.FC<MessageFooterSectionProps>;
22
- position: 'left' | 'center' | 'right';
23
- };
24
-
25
- /**
26
- * The message footer returned by the registry, composed of 'left', 'center',
27
- * and 'right' sections.
28
- */
29
- export type MessageFooter = {
30
- left?: MessageFooterSection;
31
- center?: MessageFooterSection;
32
- right?: MessageFooterSection;
33
- };
@@ -3,6 +3,10 @@
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
5
  import { Token } from '@lumino/coreutils';
6
+ /**
7
+ * The token providing the chat footer registry.
8
+ */
9
+ export const IMessageFooterRegistry = new Token('@jupyter/chat:ChatFooterRegistry');
6
10
  /**
7
11
  * The default implementation of the message footer registry.
8
12
  */
@@ -24,7 +28,3 @@ export class MessageFooterRegistry {
24
28
  this._footers[footer.position] = footer;
25
29
  }
26
30
  }
27
- /**
28
- * The token providing the chat footer registry.
29
- */
30
- export const IMessageFooterRegistry = new Token('@jupyter/chat:ChatFooterRegistry');