@jupyter/chat 0.1.0 → 0.2.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/components/chat-input.d.ts +9 -0
- package/lib/components/chat-input.js +110 -9
- package/lib/components/chat-messages.d.ts +45 -15
- package/lib/components/chat-messages.js +237 -54
- package/lib/components/chat.d.ts +21 -6
- package/lib/components/chat.js +15 -44
- package/lib/components/scroll-container.js +1 -19
- package/lib/icons.d.ts +1 -0
- package/lib/icons.js +5 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/model.d.ts +78 -14
- package/lib/model.js +183 -5
- package/lib/registry.d.ts +78 -0
- package/lib/registry.js +83 -0
- package/lib/types.d.ts +56 -4
- package/lib/widgets/chat-sidebar.d.ts +3 -4
- package/lib/widgets/chat-sidebar.js +2 -2
- package/lib/widgets/chat-widget.d.ts +2 -8
- package/lib/widgets/chat-widget.js +6 -6
- package/package.json +202 -200
- package/src/components/chat-input.tsx +182 -45
- package/src/components/chat-messages.tsx +355 -94
- package/src/components/chat.tsx +42 -68
- package/src/components/scroll-container.tsx +1 -25
- package/src/icons.ts +6 -0
- package/src/index.ts +1 -0
- package/src/model.ts +242 -21
- package/src/registry.ts +129 -0
- package/src/types.ts +58 -4
- package/src/widgets/chat-sidebar.tsx +3 -15
- package/src/widgets/chat-widget.tsx +8 -21
- package/style/chat.css +40 -0
- package/style/icons/read.svg +11 -0
package/package.json
CHANGED
|
@@ -1,209 +1,211 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
2
|
+
"name": "@jupyter/chat",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "A package that provides UI components that can be used to create a chat in a Jupyterlab extension.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jupyter",
|
|
7
|
+
"jupyterlab",
|
|
8
|
+
"jupyterlab-extension"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/jupyterlab/jupyter-chat",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/jupyterlab/jupyter-chat/issues"
|
|
13
|
+
},
|
|
14
|
+
"license": "BSD-3-Clause",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Jupyter Development Team",
|
|
17
|
+
"email": "jupyter@googlegroups.com"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
|
|
21
|
+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
22
|
+
"src/**/*.{ts,tsx}",
|
|
23
|
+
"schema/*.json"
|
|
24
|
+
],
|
|
25
|
+
"main": "lib/index.js",
|
|
26
|
+
"types": "lib/index.d.ts",
|
|
27
|
+
"style": "style/index.css",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/jupyterlab/jupyter-chat.git"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "jlpm build:lib",
|
|
34
|
+
"build:prod": "jlpm clean && jlpm build:lib:prod",
|
|
35
|
+
"build:lib": "tsc --sourceMap",
|
|
36
|
+
"build:lib:prod": "tsc",
|
|
37
|
+
"clean": "jlpm clean:lib",
|
|
38
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
39
|
+
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
|
|
40
|
+
"clean:all": "jlpm clean:lib && jlpm clean:lintcache",
|
|
41
|
+
"eslint": "jlpm eslint:check --fix",
|
|
42
|
+
"eslint:check": "eslint . --cache --ext .ts,.tsx",
|
|
43
|
+
"install:extension": "jlpm build",
|
|
44
|
+
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
|
|
45
|
+
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
|
|
46
|
+
"prettier": "jlpm prettier:base --write --list-different",
|
|
47
|
+
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
|
|
48
|
+
"prettier:check": "jlpm prettier:base --check",
|
|
49
|
+
"stylelint": "jlpm stylelint:check --fix",
|
|
50
|
+
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
|
|
51
|
+
"test": "jest --coverage",
|
|
52
|
+
"watch:src": "tsc -w --sourceMap"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@emotion/react": "^11.10.5",
|
|
56
|
+
"@emotion/styled": "^11.10.5",
|
|
57
|
+
"@jupyter/react-components": "^0.15.2",
|
|
58
|
+
"@jupyterlab/apputils": "^4.0.0",
|
|
59
|
+
"@jupyterlab/rendermime": "^4.0.0",
|
|
60
|
+
"@jupyterlab/ui-components": "^4.0.0",
|
|
61
|
+
"@lumino/commands": "^2.0.0",
|
|
62
|
+
"@lumino/disposable": "^2.0.0",
|
|
63
|
+
"@lumino/signaling": "^2.0.0",
|
|
64
|
+
"@mui/icons-material": "^5.11.0",
|
|
65
|
+
"@mui/material": "^5.11.0",
|
|
66
|
+
"clsx": "^2.1.0",
|
|
67
|
+
"react": "^18.2.0",
|
|
68
|
+
"react-dom": "^18.2.0"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@types/jest": "^29.2.0",
|
|
72
|
+
"@types/json-schema": "^7.0.11",
|
|
73
|
+
"@types/react": "^18.2.0",
|
|
74
|
+
"@types/react-addons-linked-state-mixin": "^0.14.22",
|
|
75
|
+
"@types/react-dom": "^18.2.0",
|
|
76
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
77
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
78
|
+
"css-loader": "^6.7.1",
|
|
79
|
+
"eslint": "^8.36.0",
|
|
80
|
+
"eslint-config-prettier": "^8.8.0",
|
|
81
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
82
|
+
"jest": "^29.2.0",
|
|
83
|
+
"npm-run-all": "^4.1.5",
|
|
84
|
+
"prettier": "^3.0.0",
|
|
85
|
+
"rimraf": "^5.0.1",
|
|
86
|
+
"source-map-loader": "^1.0.2",
|
|
87
|
+
"style-loader": "^3.3.1",
|
|
88
|
+
"stylelint": "^15.10.1",
|
|
89
|
+
"stylelint-config-recommended": "^13.0.0",
|
|
90
|
+
"stylelint-config-standard": "^34.0.0",
|
|
91
|
+
"stylelint-csstree-validator": "^3.0.0",
|
|
92
|
+
"stylelint-prettier": "^4.0.0",
|
|
93
|
+
"typescript": "~5.0.2"
|
|
94
|
+
},
|
|
95
|
+
"sideEffects": [
|
|
96
|
+
"style/*.css",
|
|
97
|
+
"style/index.js"
|
|
98
|
+
],
|
|
99
|
+
"styleModule": "style/index.js",
|
|
100
|
+
"publishConfig": {
|
|
101
|
+
"access": "public"
|
|
102
|
+
},
|
|
103
|
+
"jupyterlab": {
|
|
104
|
+
"discovery": {
|
|
105
|
+
"server": {
|
|
106
|
+
"managers": [
|
|
107
|
+
"pip"
|
|
108
|
+
],
|
|
109
|
+
"base": {
|
|
110
|
+
"name": "jupyter_chat"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
92
113
|
},
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
114
|
+
"extension": false,
|
|
115
|
+
"schemaDir": "schema"
|
|
116
|
+
},
|
|
117
|
+
"eslintIgnore": [
|
|
118
|
+
"node_modules",
|
|
119
|
+
"dist",
|
|
120
|
+
"coverage",
|
|
121
|
+
"**/*.d.ts",
|
|
122
|
+
"tests",
|
|
123
|
+
"**/__tests__",
|
|
124
|
+
"ui-tests"
|
|
125
|
+
],
|
|
126
|
+
"eslintConfig": {
|
|
127
|
+
"extends": [
|
|
128
|
+
"eslint:recommended",
|
|
129
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
130
|
+
"plugin:@typescript-eslint/recommended",
|
|
131
|
+
"plugin:prettier/recommended"
|
|
96
132
|
],
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
|
|
133
|
+
"parser": "@typescript-eslint/parser",
|
|
134
|
+
"parserOptions": {
|
|
135
|
+
"project": "tsconfig.json",
|
|
136
|
+
"sourceType": "module"
|
|
100
137
|
},
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
"server": {
|
|
104
|
-
"managers": [
|
|
105
|
-
"pip"
|
|
106
|
-
],
|
|
107
|
-
"base": {
|
|
108
|
-
"name": "jupyter_chat"
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
"extension": false,
|
|
113
|
-
"schemaDir": "schema"
|
|
114
|
-
},
|
|
115
|
-
"eslintIgnore": [
|
|
116
|
-
"node_modules",
|
|
117
|
-
"dist",
|
|
118
|
-
"coverage",
|
|
119
|
-
"**/*.d.ts",
|
|
120
|
-
"tests",
|
|
121
|
-
"**/__tests__",
|
|
122
|
-
"ui-tests"
|
|
138
|
+
"plugins": [
|
|
139
|
+
"@typescript-eslint"
|
|
123
140
|
],
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
"plugins": [
|
|
137
|
-
"@typescript-eslint"
|
|
138
|
-
],
|
|
139
|
-
"rules": {
|
|
140
|
-
"@typescript-eslint/naming-convention": [
|
|
141
|
-
"error",
|
|
142
|
-
{
|
|
143
|
-
"selector": "interface",
|
|
144
|
-
"format": [
|
|
145
|
-
"PascalCase"
|
|
146
|
-
],
|
|
147
|
-
"custom": {
|
|
148
|
-
"regex": "^I[A-Z]",
|
|
149
|
-
"match": true
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
|
-
"@typescript-eslint/no-unused-vars": [
|
|
154
|
-
"warn",
|
|
155
|
-
{
|
|
156
|
-
"args": "none"
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
160
|
-
"@typescript-eslint/no-namespace": "off",
|
|
161
|
-
"@typescript-eslint/no-use-before-define": "off",
|
|
162
|
-
"@typescript-eslint/quotes": [
|
|
163
|
-
"error",
|
|
164
|
-
"single",
|
|
165
|
-
{
|
|
166
|
-
"avoidEscape": true,
|
|
167
|
-
"allowTemplateLiterals": false
|
|
168
|
-
}
|
|
169
|
-
],
|
|
170
|
-
"curly": [
|
|
171
|
-
"error",
|
|
172
|
-
"all"
|
|
173
|
-
],
|
|
174
|
-
"eqeqeq": "error",
|
|
175
|
-
"prefer-arrow-callback": "error"
|
|
141
|
+
"rules": {
|
|
142
|
+
"@typescript-eslint/naming-convention": [
|
|
143
|
+
"error",
|
|
144
|
+
{
|
|
145
|
+
"selector": "interface",
|
|
146
|
+
"format": [
|
|
147
|
+
"PascalCase"
|
|
148
|
+
],
|
|
149
|
+
"custom": {
|
|
150
|
+
"regex": "^I[A-Z]",
|
|
151
|
+
"match": true
|
|
152
|
+
}
|
|
176
153
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"endOfLine": "auto",
|
|
183
|
-
"overrides": [
|
|
184
|
-
{
|
|
185
|
-
"files": "package.json",
|
|
186
|
-
"options": {
|
|
187
|
-
"tabWidth": 4
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
]
|
|
191
|
-
},
|
|
192
|
-
"stylelint": {
|
|
193
|
-
"extends": [
|
|
194
|
-
"stylelint-config-recommended",
|
|
195
|
-
"stylelint-config-standard",
|
|
196
|
-
"stylelint-prettier/recommended"
|
|
197
|
-
],
|
|
198
|
-
"plugins": [
|
|
199
|
-
"stylelint-csstree-validator"
|
|
200
|
-
],
|
|
201
|
-
"rules": {
|
|
202
|
-
"csstree/validator": true,
|
|
203
|
-
"property-no-vendor-prefix": null,
|
|
204
|
-
"selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
|
|
205
|
-
"selector-no-vendor-prefix": null,
|
|
206
|
-
"value-no-vendor-prefix": null
|
|
154
|
+
],
|
|
155
|
+
"@typescript-eslint/no-unused-vars": [
|
|
156
|
+
"warn",
|
|
157
|
+
{
|
|
158
|
+
"args": "none"
|
|
207
159
|
}
|
|
160
|
+
],
|
|
161
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
162
|
+
"@typescript-eslint/no-namespace": "off",
|
|
163
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
164
|
+
"@typescript-eslint/quotes": [
|
|
165
|
+
"error",
|
|
166
|
+
"single",
|
|
167
|
+
{
|
|
168
|
+
"avoidEscape": true,
|
|
169
|
+
"allowTemplateLiterals": false
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"curly": [
|
|
173
|
+
"error",
|
|
174
|
+
"all"
|
|
175
|
+
],
|
|
176
|
+
"eqeqeq": "error",
|
|
177
|
+
"prefer-arrow-callback": "error"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"prettier": {
|
|
181
|
+
"singleQuote": true,
|
|
182
|
+
"trailingComma": "none",
|
|
183
|
+
"arrowParens": "avoid",
|
|
184
|
+
"endOfLine": "auto",
|
|
185
|
+
"overrides": [
|
|
186
|
+
{
|
|
187
|
+
"files": "package.json",
|
|
188
|
+
"options": {
|
|
189
|
+
"tabWidth": 2
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"stylelint": {
|
|
195
|
+
"extends": [
|
|
196
|
+
"stylelint-config-recommended",
|
|
197
|
+
"stylelint-config-standard",
|
|
198
|
+
"stylelint-prettier/recommended"
|
|
199
|
+
],
|
|
200
|
+
"plugins": [
|
|
201
|
+
"stylelint-csstree-validator"
|
|
202
|
+
],
|
|
203
|
+
"rules": {
|
|
204
|
+
"csstree/validator": true,
|
|
205
|
+
"property-no-vendor-prefix": null,
|
|
206
|
+
"selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
|
|
207
|
+
"selector-no-vendor-prefix": null,
|
|
208
|
+
"value-no-vendor-prefix": null
|
|
208
209
|
}
|
|
210
|
+
}
|
|
209
211
|
}
|