@helpway/react 0.17.0 → 0.17.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/dist/index.d.ts +9 -1
- package/dist/index.js +646 -567
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/src/themed/styles.css +52 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helpway/react",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
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",
|
|
@@ -43,8 +43,9 @@
|
|
|
43
43
|
"test": "bun test",
|
|
44
44
|
"sync:icons": "bun scripts/sync-icons.ts",
|
|
45
45
|
"prepublishOnly": "bun run build",
|
|
46
|
-
"prepack": "bun run build && bun scripts/apply-publish-config.ts",
|
|
47
|
-
"postpack": "bun scripts/apply-publish-config.ts --restore"
|
|
46
|
+
"prepack": "bun scripts/sync-icons.ts --check && bun run build && bun scripts/apply-publish-config.ts",
|
|
47
|
+
"postpack": "bun scripts/apply-publish-config.ts --restore",
|
|
48
|
+
"check:icons": "bun scripts/sync-icons.ts --check"
|
|
48
49
|
},
|
|
49
50
|
"//": "publishConfig swaps main/types/exports to the built dist on publish. Workspace consumers get raw src (fast HMR, no build step); npm consumers get compiled dist with .d.ts. Standard monorepo pattern.",
|
|
50
51
|
"dependencies": {
|
package/src/themed/styles.css
CHANGED
|
@@ -370,6 +370,48 @@
|
|
|
370
370
|
height: min(800px, calc(100vh - 112px));
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
+
/* The mobile SDK's sheet (widget.js mobile mode, #268): the native sheet IS
|
|
374
|
+
the window, at every width. An iPad's page sheet is wider than the 480px
|
|
375
|
+
phone breakpoint, and without this the floating panel would sit in a
|
|
376
|
+
corner of it. No open animation either — the sheet already slid up, and
|
|
377
|
+
a second slide inside it reads as the app stuttering. :host only matches
|
|
378
|
+
inside the embed's shadow root, so @helpway/react consumers never see it. */
|
|
379
|
+
:host([data-hw-mode="mobile"]) .hw-window,
|
|
380
|
+
:host([data-hw-mode="mobile"]) .hw-window--reading {
|
|
381
|
+
position: fixed;
|
|
382
|
+
inset: 0;
|
|
383
|
+
width: 100%;
|
|
384
|
+
height: var(--hw-visible-height, 100%);
|
|
385
|
+
border-radius: 0;
|
|
386
|
+
box-shadow: none;
|
|
387
|
+
animation: none;
|
|
388
|
+
}
|
|
389
|
+
/* The bubble is the launcher, and the app's own Help row is the launcher
|
|
390
|
+
here. hideLauncher does not remove it (it only stops click-outside from
|
|
391
|
+
closing the panel), so without this a black × sat over the send button. */
|
|
392
|
+
/* The hero is a gradient (background-image), so its computed
|
|
393
|
+
background-color was transparent and the SDK could not tell the native
|
|
394
|
+
sheet what colour sits under iOS's grabber. The gradient's own top-left
|
|
395
|
+
stop, as a solid underneath it: invisible here, measurable there
|
|
396
|
+
(widget-embed mobile-chrome.ts). */
|
|
397
|
+
:host([data-hw-mode="mobile"]) .hw-hero {
|
|
398
|
+
background-color: color-mix(in srgb, var(--hw-primary) 60%, black);
|
|
399
|
+
}
|
|
400
|
+
:host([data-hw-mode="mobile"]) .hw-bubble {
|
|
401
|
+
display: none;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* Keyboard open (default-widget.tsx sets data-hw-keyboard from
|
|
405
|
+
visualViewport). The home-indicator inset is under the keyboard, so
|
|
406
|
+
padding for it leaves an empty band between composer and keys; and the
|
|
407
|
+
"Powered by" line costs a row the conversation needs more. */
|
|
408
|
+
.hw-window[data-hw-keyboard] .hw-composer {
|
|
409
|
+
padding-bottom: 8px;
|
|
410
|
+
}
|
|
411
|
+
.hw-window[data-hw-keyboard] .hw-powered {
|
|
412
|
+
display: none;
|
|
413
|
+
}
|
|
414
|
+
|
|
373
415
|
@keyframes hw-window-open {
|
|
374
416
|
from {
|
|
375
417
|
opacity: 0;
|
|
@@ -2687,6 +2729,16 @@
|
|
|
2687
2729
|
.hw-powered {
|
|
2688
2730
|
padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
|
|
2689
2731
|
}
|
|
2732
|
+
/* The inset belongs to whatever is LAST in the window. With "Powered by"
|
|
2733
|
+
under the composer (or the tabs), both were padding for the same home
|
|
2734
|
+
indicator — the empty band above "Powered by" in Ali's simulator run of
|
|
2735
|
+
the mobile SDK. The line carries it; what sits above it does not. */
|
|
2736
|
+
.hw-window:has(.hw-powered) .hw-composer {
|
|
2737
|
+
padding-bottom: 8px;
|
|
2738
|
+
}
|
|
2739
|
+
.hw-window:has(.hw-powered) .hw-tabs {
|
|
2740
|
+
padding-bottom: 0;
|
|
2741
|
+
}
|
|
2690
2742
|
|
|
2691
2743
|
/* Touch targets */
|
|
2692
2744
|
.hw-header-close,
|