@iyulab/chat-components 0.11.8 → 0.12.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 (69) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/decorate.js +1 -1
  3. package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/decorateMetadata.js +1 -1
  4. package/dist/components/blocks/UCodeBlock.js +2 -2
  5. package/dist/components/blocks/UElementBlock.js +2 -2
  6. package/dist/components/blocks/UFileBlock.js +2 -2
  7. package/dist/components/blocks/UMarkedBlock.d.ts +7 -2
  8. package/dist/components/blocks/UMarkedBlock.js +12 -7
  9. package/dist/components/blocks/URefBlock.js +2 -2
  10. package/dist/components/blocks/UTableBlock.js +2 -2
  11. package/dist/components/blocks/UTableBlock.styles.js +10 -1
  12. package/dist/components/blocks/UTextBlock.js +2 -2
  13. package/dist/components/message/UMessage.js +2 -2
  14. package/dist/components/prompt/UPrompt.js +2 -2
  15. package/dist/components/references/URefCard.js +2 -2
  16. package/dist/components/references/URefCardGroup.js +2 -2
  17. package/dist/components/references/URefCardGroup.styles.js +5 -0
  18. package/dist/components/references/URefTag.js +2 -2
  19. package/dist/components-extra/UChartBlock.js +2 -2
  20. package/dist/components-extra/UChartBlock.styles.js +15 -1
  21. package/dist/components-extra/UImagesBlock.js +2 -2
  22. package/dist/components-extra/UMapBlock.js +2 -2
  23. package/dist/components-extra/UMapBlock.styles.js +11 -1
  24. package/dist/components-extra/UVideoBlock.js +2 -2
  25. package/dist/node_modules/katex/dist/katex.js +26367 -0
  26. package/dist/react/UCodeBlock.d.ts +1 -1
  27. package/dist/react/UCodeBlock.js +1 -1
  28. package/dist/react/UElementBlock.d.ts +1 -1
  29. package/dist/react/UElementBlock.js +1 -1
  30. package/dist/react/UFileBlock.d.ts +1 -1
  31. package/dist/react/UFileBlock.js +1 -1
  32. package/dist/react/UImagesBlock.d.ts +1 -1
  33. package/dist/react/UImagesBlock.js +1 -1
  34. package/dist/react/UMapBlock.d.ts +1 -1
  35. package/dist/react/UMapBlock.js +1 -1
  36. package/dist/react/UMarkedBlock.d.ts +1 -1
  37. package/dist/react/UMarkedBlock.js +1 -1
  38. package/dist/react/UMessage.d.ts +1 -1
  39. package/dist/react/UMessage.js +1 -1
  40. package/dist/react/UPrompt.d.ts +3 -3
  41. package/dist/react/UPrompt.js +1 -1
  42. package/dist/react/URefBlock.d.ts +1 -1
  43. package/dist/react/URefBlock.js +1 -1
  44. package/dist/react/URefCard.d.ts +1 -1
  45. package/dist/react/URefCard.js +1 -1
  46. package/dist/react/URefCardGroup.d.ts +1 -1
  47. package/dist/react/URefCardGroup.js +1 -1
  48. package/dist/react/URefTag.d.ts +1 -1
  49. package/dist/react/URefTag.js +1 -1
  50. package/dist/react/UTableBlock.d.ts +1 -1
  51. package/dist/react/UTableBlock.js +1 -1
  52. package/dist/react/UTextBlock.d.ts +1 -1
  53. package/dist/react/UTextBlock.js +1 -1
  54. package/dist/react/UVideoBlock.d.ts +1 -1
  55. package/dist/react/UVideoBlock.js +1 -1
  56. package/dist/utilities/HtmlPlaceholder.d.ts +18 -1
  57. package/dist/utilities/HtmlPlaceholder.js +59 -4
  58. package/dist/utilities/markedKatex.d.ts +10 -0
  59. package/dist/utilities/markedKatex.js +106 -0
  60. package/package.json +7 -8
  61. package/skills/iyulab-chat-components/references/components/chart-block.md +17 -0
  62. package/skills/iyulab-chat-components/references/components/code-block.md +12 -0
  63. package/skills/iyulab-chat-components/references/components/images-block.md +10 -0
  64. package/skills/iyulab-chat-components/references/components/map-block.md +15 -0
  65. package/skills/iyulab-chat-components/references/components/marked-block.md +8 -0
  66. package/skills/iyulab-chat-components/references/components/message.md +8 -0
  67. package/skills/iyulab-chat-components/references/components/prompt.md +11 -0
  68. package/skills/iyulab-chat-components/references/components/table-block.md +15 -0
  69. package/skills/iyulab-chat-components/references/components/video-block.md +10 -0
@@ -35,6 +35,14 @@ Tracks a `streaming` state internally (resets a 1500ms idle timer on every `valu
35
35
 
36
36
  ---
37
37
 
38
+ ## Sizing
39
+
40
+ The block grows with its content — there is no cap, and the conversation around it does the
41
+ scrolling.
42
+
43
+ **Fenced code becomes a nested [`u-code-block`](code-block.md)**, not a plain `<pre>`, so fenced
44
+ code follows that component's contract (no vertical cap; long lines scroll horizontally).
45
+
38
46
  ## Properties
39
47
 
40
48
  | Property | Type | Default | Description |
@@ -36,6 +36,14 @@ Chat message wrapper component. Arranges content blocks via slots, shows a loadi
36
36
 
37
37
  ---
38
38
 
39
+ ## Sizing
40
+
41
+ Content-sized: the bubble is as tall as what you put in it.
42
+
43
+ ⚠**A `max-height` on the host does *not* fold the content, and that is deliberate.** A message that
44
+ hides part of itself cannot be read, and the conversation stream around it already scrolls. The
45
+ block overflows **visibly** rather than clipping. Constrain the stream, not the message.
46
+
39
47
  ## Slots
40
48
 
41
49
  | Name | Description |
@@ -47,6 +47,17 @@ prompt.submit();
47
47
 
48
48
  ---
49
49
 
50
+ ## Sizing
51
+
52
+ The prompt does not grow with its value. `minRows`/`maxRows` bound the inner `u-text-block`, and the
53
+ text scrolls **inside** that box — so the component stays short no matter how long the value is.
54
+ Measured at 600px wide with a 40-line value and `maxRows: 40`, the whole block is 72px tall.
55
+
56
+ ⚠**Its behaviour under a host `max-height` is therefore untested.** A 200px or 120px constraint never
57
+ engages, because the natural height is already below both. That is not the same as "it behaves
58
+ correctly under a constraint" — it means the question has not been answered. Use `minRows`/`maxRows`
59
+ to size this component.
60
+
50
61
  ## Slots
51
62
 
52
63
  | Name | Description |
@@ -37,6 +37,21 @@ Extends `UDataElement`, so data can also be injected via a `<script type="applic
37
37
 
38
38
  ---
39
39
 
40
+ ## Sizing
41
+
42
+ The table area caps at **480px** and scrolls inside that cap; below it the block is content-sized.
43
+ Measured at 600px wide: 40 rows give a 480px table area with ~1,000px to scroll, 2 rows give ~108px
44
+ and no scrollbar. That default keeps a long table from swallowing the conversation.
45
+
46
+ **A `max-height` (or `height`) on the host wins.** The table area shrinks to fit it and still
47
+ scrolls, so no rows become unreachable:
48
+
49
+ ```css
50
+ u-table-block { max-height: 200px; }
51
+ ```
52
+
53
+ There is no size property or custom property for this — the host is the lever.
54
+
40
55
  ## Properties
41
56
 
42
57
  | Property | Type | Default | Description |
@@ -38,6 +38,16 @@ LLM output example (`block-json` code fence, rendered via `u-element-block`):
38
38
 
39
39
  ---
40
40
 
41
+ ## Sizing
42
+
43
+ Height comes from width through `ratio` (`16:9` by default), capped at `max-width: 800px`. Measured
44
+ at 600px wide, a 16:9 video is ~342px tall. This holds for both branches — the embed iframe
45
+ (YouTube/Vimeo) and the native `<video>` element.
46
+
47
+ ⚠**A `max-height` on the host does *not* shrink the video, and that is deliberate** — the same
48
+ reason as the image block: vertical squeezing would break the aspect ratio. The block overflows
49
+ **visibly** rather than clipping. Use `ratio`, or a narrower column, to change its height.
50
+
41
51
  ## Properties
42
52
 
43
53
  | Property | Type | Default | Description |