@helpway/react 0.15.0 → 0.15.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helpway/react",
3
- "version": "0.15.0",
3
+ "version": "0.15.2",
4
4
  "description": "Official React SDK for Helpway — drop-in AI chat support widget with headless hooks for custom UIs.",
5
5
  "keywords": [
6
6
  "helpway",
@@ -1576,8 +1576,12 @@
1576
1576
  (Slack, iMessage, Linear all land here); the picture becomes a hint that a
1577
1577
  destination exists rather than the destination's billboard. */
1578
1578
  .hw-link-preview {
1579
+ /* Column, not row. A 64px square crop of a documentation page is a square of
1580
+ white with two grey lines in it — it showed nothing and read as unrelated to
1581
+ the answer above it. A short wide strip anchored to the TOP of the capture
1582
+ shows the part that identifies the page: its heading. */
1579
1583
  display: flex;
1580
- align-items: stretch;
1584
+ flex-direction: column;
1581
1585
  gap: 0;
1582
1586
  border: 1px solid var(--hw-border, rgba(0, 0, 0, 0.08));
1583
1587
  border-radius: 10px;
@@ -1593,13 +1597,13 @@
1593
1597
  }
1594
1598
 
1595
1599
  .hw-link-preview-img {
1596
- width: 64px;
1597
- /* Square and self-stretching: a fixed height would letterbox a 1200x630 OG
1598
- image, and `stretch` keeps the thumbnail flush with however tall the text
1599
- beside it turns out to be. */
1600
- min-height: 100%;
1601
- flex: 0 0 64px;
1600
+ width: 100%;
1601
+ /* Wide and short. `object-position: top` is the load-bearing half: centred,
1602
+ a tall page capture crops to its blank middle. */
1603
+ height: 56px;
1604
+ flex: 0 0 56px;
1602
1605
  object-fit: cover;
1606
+ object-position: top;
1603
1607
  /* The border-radius lives on the card; without this the image's own corner
1604
1608
  pokes through the rounded edge on Safari. */
1605
1609
  border-radius: 0;
@@ -1660,7 +1664,9 @@
1660
1664
  display: flex;
1661
1665
  flex-direction: column;
1662
1666
  gap: 6px;
1663
- max-width: 280px;
1667
+ /* Narrower than the bubble on purpose: the card is a pointer to somewhere
1668
+ else, not a second paragraph, and at 280px it competed with the answer. */
1669
+ max-width: 240px;
1664
1670
  }
1665
1671
 
1666
1672
  /* ════════════════════════════════════════════════
@@ -2886,31 +2892,15 @@
2886
2892
  color: var(--hw-text-1);
2887
2893
  }
2888
2894
 
2895
+ /* Layout only. The buttons themselves are .hw-quick-reply-btn — the same control
2896
+ the message list renders — so this class contributes the card's padding and
2897
+ nothing else. It used to carry a full second copy of the button styling, which
2898
+ is how the two versions ended up disagreeing about ground, ink and hover. */
2889
2899
  .hw-preview-quick-replies {
2890
- display: flex;
2891
- flex-wrap: wrap;
2892
- gap: 6px;
2893
2900
  padding: 0 14px 14px;
2894
- }
2895
-
2896
- .hw-preview-qr-btn {
2897
- display: inline-flex;
2898
- align-items: center;
2899
- padding: 6px 14px;
2900
- font-size: 13px;
2901
- font-weight: 500;
2902
- line-height: 1.3;
2903
- color: var(--hw-brand, #000);
2904
- background: transparent;
2905
- border: 1px solid var(--hw-border, rgba(0, 0, 0, 0.1));
2906
- border-radius: 18px;
2907
- cursor: pointer;
2908
- transition: background 0.15s, border-color 0.15s;
2909
- }
2910
-
2911
- .hw-preview-qr-btn:hover {
2912
- background: var(--hw-hover, rgba(0, 0, 0, 0.04));
2913
- border-color: var(--hw-brand, #000);
2901
+ /* .hw-quick-replies brings display/flex-wrap/gap and a top margin meant for
2902
+ sitting under a bubble; inside the card the padding above is the spacing. */
2903
+ margin-top: 0;
2914
2904
  }
2915
2905
 
2916
2906
  /* ── Preview closing animation ──────────────────────────── */
@@ -4181,10 +4171,20 @@
4181
4171
  font-style: italic;
4182
4172
  }
4183
4173
  .hw-msg-bubble a {
4184
- color: var(--hw-primary);
4174
+ /* --hw-primary is #171717 and the docked glass block never redefines it, so a
4175
+ link in an answer rendered near-black on a dark translucent panel. Links
4176
+ take the surrounding ink instead and earn their affordance from the
4177
+ underline, which works on every ground this panel can sit on. */
4178
+ color: inherit;
4185
4179
  text-decoration: underline;
4180
+ text-decoration-thickness: 1px;
4186
4181
  text-underline-offset: 2px;
4187
- word-break: break-all;
4182
+ text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
4183
+ /* `break-all` cut URLs mid-word — "framew | orks". `anywhere` breaks only
4184
+ when a line genuinely cannot fit, and prefers the slashes and dots a URL
4185
+ already offers. */
4186
+ word-break: normal;
4187
+ overflow-wrap: anywhere;
4188
4188
  }
4189
4189
  .hw-msg-bubble a:hover {
4190
4190
  opacity: 0.8;