@kungal/ui-core 2.51.1 → 2.52.1
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 +12 -0
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @kungal/ui-core
|
|
2
2
|
|
|
3
|
+
## 2.52.1
|
|
4
|
+
|
|
5
|
+
## 2.52.0
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- a56cbbf: Chat photos show the URL the server sends. NextMoe chat spec 1.1.0 (nextmoe-infra #337) gives every photo a `url`, which the spec describes as "where the image is served; never build it from image_hash". It is present on history, updates, pins, last messages, pushes and the upload response. `KunChatPhoto` gains `url?: string | null`. It is optional so payloads and fixtures from before 1.1.0 still type-check.
|
|
10
|
+
|
|
11
|
+
`KunChatBubble`, `KunChatMessageList` (its lightbox included) and `KunChatPinnedBar` now show `media.url` when you pass no `resolve-media-url`, so a site on spec 1.1.0 can drop its hash-to-URL resolver. A resolver you do pass still takes precedence: keep it if you serve the bubble a smaller preview than the lightbox, because `url` is a single address for both. A photo with neither a `url` nor a resolver renders as before, with an empty `src`.
|
|
12
|
+
|
|
13
|
+
A conversation's `photo_url` needs nothing new from KunUI. Pass it to `KunChatConversationItem`'s `avatar`, which already takes a URL.
|
|
14
|
+
|
|
3
15
|
## 2.51.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.cts
CHANGED
|
@@ -186,11 +186,15 @@ interface KunChatEntity {
|
|
|
186
186
|
}
|
|
187
187
|
interface KunChatPhoto {
|
|
188
188
|
type: 'photo';
|
|
189
|
-
/** Image-service hash.
|
|
189
|
+
/** Image-service hash. KunUI never builds a URL from it. */
|
|
190
190
|
image_hash: string;
|
|
191
191
|
width: number;
|
|
192
192
|
height: number;
|
|
193
193
|
thumbhash?: string | null;
|
|
194
|
+
/** Where the image is served, as the server sends it (chat spec 1.1.0).
|
|
195
|
+
* Shown when no `resolveMediaUrl` is passed. Optional so payloads from
|
|
196
|
+
* before 1.1.0 still type-check. */
|
|
197
|
+
url?: string | null;
|
|
194
198
|
}
|
|
195
199
|
/** Media attached to a message. Only `photo` exists today; sticker and file
|
|
196
200
|
* arrive later, and every consumer switches on `type`. */
|
package/dist/index.d.ts
CHANGED
|
@@ -186,11 +186,15 @@ interface KunChatEntity {
|
|
|
186
186
|
}
|
|
187
187
|
interface KunChatPhoto {
|
|
188
188
|
type: 'photo';
|
|
189
|
-
/** Image-service hash.
|
|
189
|
+
/** Image-service hash. KunUI never builds a URL from it. */
|
|
190
190
|
image_hash: string;
|
|
191
191
|
width: number;
|
|
192
192
|
height: number;
|
|
193
193
|
thumbhash?: string | null;
|
|
194
|
+
/** Where the image is served, as the server sends it (chat spec 1.1.0).
|
|
195
|
+
* Shown when no `resolveMediaUrl` is passed. Optional so payloads from
|
|
196
|
+
* before 1.1.0 still type-check. */
|
|
197
|
+
url?: string | null;
|
|
194
198
|
}
|
|
195
199
|
/** Media attached to a message. Only `photo` exists today; sticker and file
|
|
196
200
|
* arrive later, and every consumer switches on `type`. */
|