@wtfalch/chat 0.1.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 (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +293 -0
  3. package/dist/chat/admin/admin.css +78 -0
  4. package/dist/chat/admin/index.d.ts +92 -0
  5. package/dist/chat/admin/index.js +124 -0
  6. package/dist/chat/admin/react.d.ts +40 -0
  7. package/dist/chat/admin/react.js +169 -0
  8. package/dist/chat/chat.css +1003 -0
  9. package/dist/chat/client.d.ts +30 -0
  10. package/dist/chat/client.js +1300 -0
  11. package/dist/chat/exchange.d.ts +9 -0
  12. package/dist/chat/exchange.js +31 -0
  13. package/dist/chat/fake/index.d.ts +27 -0
  14. package/dist/chat/fake/index.js +48 -0
  15. package/dist/chat/fake/intercept.d.ts +21 -0
  16. package/dist/chat/fake/intercept.js +57 -0
  17. package/dist/chat/fake/sample.d.ts +4 -0
  18. package/dist/chat/fake/sample.js +6 -0
  19. package/dist/chat/fake/server.d.ts +168 -0
  20. package/dist/chat/fake/server.js +811 -0
  21. package/dist/chat/fake/xhr.d.ts +3 -0
  22. package/dist/chat/fake/xhr.js +104 -0
  23. package/dist/chat/index.d.ts +10 -0
  24. package/dist/chat/index.js +9 -0
  25. package/dist/chat/markdown.d.ts +29 -0
  26. package/dist/chat/markdown.js +161 -0
  27. package/dist/chat/react/Attachment.d.ts +39 -0
  28. package/dist/chat/react/Attachment.js +113 -0
  29. package/dist/chat/react/Chat.d.ts +48 -0
  30. package/dist/chat/react/Chat.js +139 -0
  31. package/dist/chat/react/Composer.d.ts +25 -0
  32. package/dist/chat/react/Composer.js +157 -0
  33. package/dist/chat/react/MessageRow.d.ts +21 -0
  34. package/dist/chat/react/MessageRow.js +114 -0
  35. package/dist/chat/react/NewDirectMessage.d.ts +23 -0
  36. package/dist/chat/react/NewDirectMessage.js +47 -0
  37. package/dist/chat/react/ThreadPanel.d.ts +25 -0
  38. package/dist/chat/react/ThreadPanel.js +17 -0
  39. package/dist/chat/react/Timeline.d.ts +27 -0
  40. package/dist/chat/react/Timeline.js +120 -0
  41. package/dist/chat/react/index.d.ts +7 -0
  42. package/dist/chat/react/index.js +6 -0
  43. package/dist/chat/react/mentions.d.ts +34 -0
  44. package/dist/chat/react/mentions.js +70 -0
  45. package/dist/chat/react/scroll.d.ts +26 -0
  46. package/dist/chat/react/scroll.js +27 -0
  47. package/dist/chat/react/timelineLayout.d.ts +26 -0
  48. package/dist/chat/react/timelineLayout.js +47 -0
  49. package/dist/chat/sanitize.d.ts +49 -0
  50. package/dist/chat/sanitize.js +264 -0
  51. package/dist/chat/store.d.ts +16 -0
  52. package/dist/chat/store.js +25 -0
  53. package/dist/chat/types.d.ts +340 -0
  54. package/dist/chat/types.js +1 -0
  55. package/package.json +88 -0
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@wtfalch/chat",
3
+ "version": "0.1.0",
4
+ "description": "A Matrix chat client behind the agora's token exchange.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/wtfalch/chat.git",
10
+ "directory": "packages/chat"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/chat/index.d.ts",
18
+ "default": "./dist/chat/index.js"
19
+ },
20
+ "./react": {
21
+ "types": "./dist/chat/react/index.d.ts",
22
+ "default": "./dist/chat/react/index.js"
23
+ },
24
+ "./fake": {
25
+ "types": "./dist/chat/fake/index.d.ts",
26
+ "default": "./dist/chat/fake/index.js"
27
+ },
28
+ "./chat.css": "./dist/chat/chat.css",
29
+ "./package.json": "./package.json",
30
+ "./admin": {
31
+ "types": "./dist/chat/admin/index.d.ts",
32
+ "default": "./dist/chat/admin/index.js"
33
+ },
34
+ "./admin/react": {
35
+ "types": "./dist/chat/admin/react.d.ts",
36
+ "default": "./dist/chat/admin/react.js"
37
+ },
38
+ "./admin/admin.css": "./dist/chat/admin/admin.css"
39
+ },
40
+ "files": ["dist", "LICENSE", "README.md"],
41
+ "scripts": {
42
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/chat/react/chat.css dist/chat/chat.css && cp src/chat/admin/admin.css dist/chat/admin/admin.css && cp ../../LICENSE .",
43
+ "prepack": "pnpm build",
44
+ "lint": "biome check .",
45
+ "typecheck": "tsc --noEmit",
46
+ "test": "vitest run",
47
+ "test:integration": "vitest run --config vitest.integration.config.ts",
48
+ "test:acceptance": "vitest run --config vitest.acceptance.config.ts"
49
+ },
50
+ "peerDependencies": {
51
+ "@wtfalch/design": ">=0.16.0",
52
+ "react": "^19.0.0",
53
+ "react-dom": "^19.0.0"
54
+ },
55
+ "peerDependenciesMeta": {
56
+ "@wtfalch/design": {
57
+ "optional": true
58
+ },
59
+ "react": {
60
+ "optional": true
61
+ },
62
+ "react-dom": {
63
+ "optional": true
64
+ }
65
+ },
66
+ "devDependencies": {
67
+ "@biomejs/biome": "1.9.4",
68
+ "@playwright/test": "1.59.1",
69
+ "@types/node": "22.20.2",
70
+ "@types/react": "19.3.0",
71
+ "@types/react-dom": "19.3.0",
72
+ "@wtfalch/design": "0.16.0",
73
+ "fake-indexeddb": "6.2.5",
74
+ "jsdom": "30.0.1",
75
+ "react": "19.2.4",
76
+ "react-dom": "19.2.4",
77
+ "typescript": "5.9.3",
78
+ "vite": "6.4.3",
79
+ "vitest": "4.1.11"
80
+ },
81
+ "sideEffects": ["**/*.css"],
82
+ "engines": {
83
+ "node": ">=22.0.0"
84
+ },
85
+ "dependencies": {
86
+ "matrix-js-sdk": "42.4.0"
87
+ }
88
+ }