@thewhatmatters/wmds 0.4.2 → 0.4.4
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 +48 -0
- package/CONSUMING.md +2 -2
- package/bin/wmds-check.mjs +108 -10
- package/dist/components/organisms/ChatDock/ChatDock.d.ts +21 -15
- package/dist/components/organisms/ChatDock/ChatDock.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/ChatDock.js +418 -423
- package/dist/components/organisms/ChatDock/ChatDockGate.d.ts +21 -10
- package/dist/components/organisms/ChatDock/ChatDockGate.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/ChatDockGate.js +124 -118
- package/dist/components/organisms/ChatDock/chatDockGateContext.d.ts +12 -0
- package/dist/components/organisms/ChatDock/chatDockGateContext.d.ts.map +1 -0
- package/dist/components/organisms/ChatDock/chatDockGateContext.js +9 -0
- package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts +21 -9
- package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/chatDockGateStyles.js +2 -3
- package/dist/components/organisms/ChatDock/chatDockStyles.d.ts +6 -6
- package/dist/components/organisms/ChatDock/chatDockStyles.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/chatDockStyles.js +2 -2
- package/dist/components/organisms/ChatDock/chatDockViewport.d.ts +6 -0
- package/dist/components/organisms/ChatDock/chatDockViewport.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/chatDockViewport.js +14 -1
- package/dist/components/organisms/Toast/Toast.d.ts.map +1 -1
- package/dist/components/organisms/Toast/Toast.js +11 -5
- package/dist/lib/dialogOverlay.d.ts.map +1 -1
- package/dist/lib/dialogOverlay.js +18 -15
- package/dist/styles.css +1 -1
- package/docs/component-contracts.md +4 -2
- package/docs/components.md +5 -5
- package/docs/exports.json +1 -1
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
- package/docs/patterns/components-badge--outline-tags.tsx +1 -1
- package/docs/patterns/components-badge--with-avatar.tsx +1 -1
- package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
- package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
- package/docs/patterns/components-button-button--copy-button.tsx +1 -1
- package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
- package/docs/patterns/components-button-button--external-link.tsx +1 -1
- package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
- package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
- package/docs/patterns/components-button-button--link-render.tsx +1 -1
- package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
- package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
- package/docs/patterns/components-button-button--primary-action.tsx +1 -1
- package/docs/patterns/components-button-button--row-hug.tsx +1 -1
- package/docs/patterns/components-button-button--row-layout.tsx +1 -1
- package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
- package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
- package/docs/patterns/components-button-button--with-count.tsx +1 -1
- package/docs/patterns/components-button-button--with-icon.tsx +1 -1
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
- package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
- package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
- package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
- package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
- package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
- package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +3 -2
- package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +54 -11
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
- package/docs/patterns/components-descriptionlist--details.tsx +1 -1
- package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-field--horizontal-input.tsx +1 -1
- package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
- package/docs/patterns/components-field--multi-control.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-indexlist--post-index.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
- package/docs/patterns/components-kbd--command-row.tsx +1 -1
- package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
- package/docs/patterns/components-kbd--shortcut.tsx +1 -1
- package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
- package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
- package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
- package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
- package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
- package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
- package/docs/patterns/components-prose--article-body.tsx +1 -1
- package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
- package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
- package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
- package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
- package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
- package/docs/patterns/components-sitenav--compact.tsx +1 -1
- package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
- package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
- package/docs/patterns/components-stat--insights-row.tsx +1 -1
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
- package/docs/patterns/components-switch--default.tsx +1 -1
- package/docs/patterns/components-switch--settings-row.tsx +1 -1
- package/docs/patterns/components-tab--settings-pages.tsx +1 -1
- package/docs/patterns/components-taskrows--action-details.tsx +1 -1
- package/docs/patterns/components-taskrows--capsules.tsx +1 -1
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
- package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
- package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
- package/docs/patterns/components-taskrows--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
- package/docs/patterns/components-textlink--external-destination.tsx +1 -1
- package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
- package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
- package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
- package/docs/patterns/components-textsequence--default.tsx +1 -1
- package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
- package/docs/patterns/components-textsequence--shapes.tsx +1 -1
- package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
- package/docs/patterns/components-tooltip--controlled.tsx +1 -1
- package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
- package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
- package/docs/patterns/components-tooltip--placement.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +41 -17
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +34 -4
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/index.json +1 -1
- package/package.json +1 -1
|
@@ -4,12 +4,14 @@ export interface ChatDockGateLabels {
|
|
|
4
4
|
previous: string;
|
|
5
5
|
/** Header control on one step. Default: "Next step". */
|
|
6
6
|
next: string;
|
|
7
|
-
/**
|
|
7
|
+
/** @deprecated The gate has no close of its own: Cancel leaves it, and the window's close folds the window. Unused. */
|
|
8
8
|
close: string;
|
|
9
|
-
/** Footer
|
|
9
|
+
/** Footer action that leaves the gate. Default: "Cancel". */
|
|
10
10
|
cancel: string;
|
|
11
11
|
/** Footer primary action. Default: "Next". */
|
|
12
12
|
continue: string;
|
|
13
|
+
/** Shown over the footer while `pending`. Default: "Sending…". */
|
|
14
|
+
pending: string;
|
|
13
15
|
/** Where the visitor is, between the header controls. Default: "2 of 4". */
|
|
14
16
|
progress: (step: number, stepCount: number) => string;
|
|
15
17
|
}
|
|
@@ -26,27 +28,36 @@ export interface ChatDockGateProps {
|
|
|
26
28
|
/** Back one step. The control is disabled on the first step. */
|
|
27
29
|
onPrevious: () => void;
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
+
* The footer's primary action — on one step, or on the last step an action such as "Send" or
|
|
32
|
+
* "Try again" (`continueLabel`). The header's next control moves on one step, so it is disabled on
|
|
33
|
+
* the last step. Leave it out on a step that ends another way (for example booking a call).
|
|
31
34
|
*/
|
|
32
35
|
onNext?: () => void;
|
|
33
36
|
/** Whether the visitor can move on from this step. Default: true. */
|
|
34
37
|
canContinue?: boolean;
|
|
35
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Leaves the gate — the footer's Cancel. The gate has no close of its own: inside **ChatDock** the
|
|
40
|
+
* window's close and Escape fold the window and keep the gate. On its own, Escape calls it too.
|
|
41
|
+
*/
|
|
36
42
|
onClose: () => void;
|
|
37
43
|
/** Footer start — for example **CalEmbed.Skip** on a booking step. */
|
|
38
44
|
footerStart?: ReactNode;
|
|
39
45
|
/** This step's primary label, for example "Send". Default: `labels.continue`. */
|
|
40
46
|
continueLabel?: string;
|
|
47
|
+
/** The step's action is running — for example sending the form. Shows `labels.pending` over the footer and disables the step controls. */
|
|
48
|
+
pending?: boolean;
|
|
49
|
+
/** The step's action failed — a line over the footer, announced. Keep the visitor's answers, and offer a retry through `onNext`. */
|
|
50
|
+
error?: ReactNode;
|
|
41
51
|
labels?: Partial<ChatDockGateLabels>;
|
|
42
|
-
/** The step's content. Change it with `step`; the
|
|
52
|
+
/** The step's content. Change it with `step`; the step slides in. */
|
|
43
53
|
children: ReactNode;
|
|
44
54
|
}
|
|
45
55
|
/**
|
|
46
|
-
* A multi-step form in the
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
56
|
+
* A multi-step form in the conversation — pass it as **ChatDock**'s `gate`. It sits under the latest
|
|
57
|
+
* message, flat on the window surface under a hairline: the step's title and subtitle with previous,
|
|
58
|
+
* progress, and next; the step; Cancel and the primary action under a second hairline. It has no close
|
|
59
|
+
* of its own and never scrolls on its own — the window grows to fit it, and past that the conversation
|
|
60
|
+
* scrolls.
|
|
50
61
|
*/
|
|
51
62
|
export declare const ChatDockGate: import("react").ForwardRefExoticComponent<ChatDockGateProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
52
63
|
//# sourceMappingURL=ChatDockGate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDockGate.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/ChatDockGate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatDockGate.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/ChatDockGate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAwBf,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,uHAAuH;IACvH,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CACvD;AAED,eAAO,MAAM,yBAAyB,EAAE,kBAQvC,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,qEAAqE;IACrE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,sEAAsE;IACtE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0IAA0I;IAC1I,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oIAAoI;IACpI,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrC,qEAAqE;IACrE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,8GAoKvB,CAAC"}
|
|
@@ -2,38 +2,34 @@
|
|
|
2
2
|
import { motionTransitionProp as e } from "../../../lib/motion.js";
|
|
3
3
|
import { Button as t } from "../../atoms/Button/Button.js";
|
|
4
4
|
import { IconButton as n } from "../../atoms/IconButton/IconButton.js";
|
|
5
|
-
import { cardSubtitleClasses as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { forwardRef as
|
|
10
|
-
import { ChevronLeft as
|
|
11
|
-
import {
|
|
12
|
-
import { AnimatePresence as
|
|
5
|
+
import { cardSubtitleClasses as ee, cardTitleClasses as r } from "../../molecules/Card/cardStyles.js";
|
|
6
|
+
import { useChatDockGateWindow as i } from "./chatDockGateContext.js";
|
|
7
|
+
import { useChatDockReducedMotion as a, useChatDockWide as o } from "./chatDockViewport.js";
|
|
8
|
+
import { chatDockGateClasses as s, chatDockGateControlsClasses as c, chatDockGateErrorClasses as l, chatDockGateFooterActionsClasses as u, chatDockGateFooterBlockClasses as te, chatDockGateFooterRowClasses as d, chatDockGateFooterRuleClasses as f, chatDockGateHeaderClasses as p, chatDockGateHeadingClasses as m, chatDockGatePendingClasses as ne, chatDockGateProgressClasses as re, chatDockGateStepClasses as h } from "./chatDockGateStyles.js";
|
|
9
|
+
import { forwardRef as g, useContext as _, useId as v, useLayoutEffect as y, useRef as b, useState as x } from "react";
|
|
10
|
+
import { ChevronLeft as ie, ChevronRight as ae } from "lucide-react";
|
|
11
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
12
|
+
import { AnimatePresence as w, MotionConfigContext as T, motion as E } from "motion/react";
|
|
13
13
|
//#region src/components/organisms/ChatDock/ChatDockGate.tsx
|
|
14
|
-
var
|
|
14
|
+
var D = {
|
|
15
15
|
previous: "Previous step",
|
|
16
16
|
next: "Next step",
|
|
17
17
|
close: "Close",
|
|
18
18
|
cancel: "Cancel",
|
|
19
19
|
continue: "Next",
|
|
20
|
+
pending: "Sending…",
|
|
20
21
|
progress: (e, t) => `${e} of ${t}`
|
|
21
|
-
},
|
|
22
|
-
let
|
|
23
|
-
...
|
|
24
|
-
...
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return t.observe(e), () => {
|
|
33
|
-
t.disconnect();
|
|
34
|
-
};
|
|
35
|
-
}, []);
|
|
36
|
-
let Z = e("fast"), ae = e("medium"), Q = W ? 0 : 16, oe = {
|
|
22
|
+
}, O = g(function({ title: g, subtitle: O, step: k, stepCount: A, onPrevious: j, onNext: M, canContinue: N = !0, onClose: P, footerStart: F, continueLabel: I, pending: L = !1, error: R, labels: oe, children: z }, B) {
|
|
23
|
+
let V = {
|
|
24
|
+
...D,
|
|
25
|
+
...oe
|
|
26
|
+
}, H = v(), U = v(), W = o(), G = i(), { reducedMotion: K } = _(T), q = a(K), [J, se] = x(k), [Y, ce] = x(1);
|
|
27
|
+
k !== J && (ce(k > J ? 1 : -1), se(k));
|
|
28
|
+
let X = b(null);
|
|
29
|
+
y(() => {
|
|
30
|
+
G?.revealGate();
|
|
31
|
+
}, [G, k]);
|
|
32
|
+
let Z = e("fast"), Q = q ? 0 : 16, le = {
|
|
37
33
|
enter: (e) => ({
|
|
38
34
|
opacity: 0,
|
|
39
35
|
x: e * Q
|
|
@@ -48,114 +44,124 @@ var E = {
|
|
|
48
44
|
x: -e * Q,
|
|
49
45
|
transition: Z
|
|
50
46
|
})
|
|
51
|
-
}, $ =
|
|
52
|
-
function
|
|
53
|
-
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(),
|
|
47
|
+
}, $ = W ? "sm" : "md", ue = M != null && N && k < A && !L;
|
|
48
|
+
function de(e) {
|
|
49
|
+
G != null || e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), P());
|
|
54
50
|
}
|
|
55
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ C("div", {
|
|
56
52
|
ref: (e) => {
|
|
57
|
-
|
|
53
|
+
X.current = e, typeof B == "function" ? B(e) : B != null && (B.current = e);
|
|
58
54
|
},
|
|
59
55
|
className: s,
|
|
60
56
|
role: "group",
|
|
61
|
-
"aria-labelledby":
|
|
62
|
-
"aria-describedby":
|
|
57
|
+
"aria-labelledby": H,
|
|
58
|
+
"aria-describedby": O == null ? void 0 : U,
|
|
59
|
+
"aria-busy": L || void 0,
|
|
63
60
|
tabIndex: -1,
|
|
64
61
|
"data-chat-dock-gate-focus": "",
|
|
65
|
-
"data-step":
|
|
66
|
-
onKeyDown:
|
|
67
|
-
children:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
/* @__PURE__ */ x(i.Header, {
|
|
75
|
-
start: /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("h2", {
|
|
76
|
-
id: B,
|
|
77
|
-
className: ee,
|
|
78
|
-
children: d
|
|
79
|
-
}), D == null ? null : /* @__PURE__ */ x("p", {
|
|
80
|
-
id: V,
|
|
62
|
+
"data-step": k,
|
|
63
|
+
onKeyDown: de,
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ C("div", {
|
|
66
|
+
className: p,
|
|
67
|
+
children: [/* @__PURE__ */ C("div", {
|
|
68
|
+
className: m,
|
|
69
|
+
children: [/* @__PURE__ */ S("h3", {
|
|
70
|
+
id: H,
|
|
81
71
|
className: r,
|
|
82
|
-
children:
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
|
|
72
|
+
children: g
|
|
73
|
+
}), O == null ? null : /* @__PURE__ */ S("p", {
|
|
74
|
+
id: U,
|
|
75
|
+
className: ee,
|
|
76
|
+
children: O
|
|
77
|
+
})]
|
|
78
|
+
}), /* @__PURE__ */ C("div", {
|
|
79
|
+
className: c,
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ S(n, {
|
|
86
82
|
size: $,
|
|
87
|
-
icon: /* @__PURE__ */
|
|
88
|
-
"aria-label":
|
|
89
|
-
disabled:
|
|
90
|
-
onClick:
|
|
83
|
+
icon: /* @__PURE__ */ S(ie, {}),
|
|
84
|
+
"aria-label": V.previous,
|
|
85
|
+
disabled: k <= 1 || L,
|
|
86
|
+
onClick: j
|
|
91
87
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
className:
|
|
88
|
+
/* @__PURE__ */ S("span", {
|
|
89
|
+
className: re,
|
|
94
90
|
"aria-live": "polite",
|
|
95
|
-
children:
|
|
96
|
-
}),
|
|
97
|
-
/* @__PURE__ */ x(n, {
|
|
98
|
-
size: $,
|
|
99
|
-
icon: /* @__PURE__ */ x(v, {}),
|
|
100
|
-
"aria-label": z.next,
|
|
101
|
-
disabled: !se,
|
|
102
|
-
onClick: j
|
|
91
|
+
children: V.progress(k, A)
|
|
103
92
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ S(n, {
|
|
105
94
|
size: $,
|
|
106
|
-
icon: /* @__PURE__ */
|
|
107
|
-
"aria-label":
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
] })
|
|
111
|
-
}),
|
|
112
|
-
/* @__PURE__ */ x(i.Body, { children: /* @__PURE__ */ x(T.div, {
|
|
113
|
-
className: te,
|
|
114
|
-
initial: !1,
|
|
115
|
-
animate: { height: re ?? "auto" },
|
|
116
|
-
transition: W ? { duration: 0 } : ae,
|
|
117
|
-
children: /* @__PURE__ */ x("div", {
|
|
118
|
-
ref: X,
|
|
119
|
-
children: /* @__PURE__ */ x(C, {
|
|
120
|
-
mode: "wait",
|
|
121
|
-
initial: !1,
|
|
122
|
-
custom: q,
|
|
123
|
-
onExitComplete: () => {
|
|
124
|
-
let e = Y.current;
|
|
125
|
-
e != null && !e.contains(document.activeElement) && e.focus({ preventScroll: !0 });
|
|
126
|
-
},
|
|
127
|
-
children: /* @__PURE__ */ x(T.div, {
|
|
128
|
-
className: l,
|
|
129
|
-
custom: q,
|
|
130
|
-
variants: oe,
|
|
131
|
-
initial: "enter",
|
|
132
|
-
animate: "center",
|
|
133
|
-
exit: "exit",
|
|
134
|
-
children: L
|
|
135
|
-
}, O)
|
|
95
|
+
icon: /* @__PURE__ */ S(ae, {}),
|
|
96
|
+
"aria-label": V.next,
|
|
97
|
+
disabled: !ue,
|
|
98
|
+
onClick: M
|
|
136
99
|
})
|
|
100
|
+
]
|
|
101
|
+
})]
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ S(w, {
|
|
104
|
+
mode: "wait",
|
|
105
|
+
initial: !1,
|
|
106
|
+
custom: Y,
|
|
107
|
+
onExitComplete: () => {
|
|
108
|
+
let e = X.current;
|
|
109
|
+
e != null && !e.contains(document.activeElement) && e.focus({ preventScroll: !0 });
|
|
110
|
+
},
|
|
111
|
+
children: /* @__PURE__ */ S(E.div, {
|
|
112
|
+
className: h,
|
|
113
|
+
custom: Y,
|
|
114
|
+
variants: le,
|
|
115
|
+
initial: "enter",
|
|
116
|
+
animate: "center",
|
|
117
|
+
exit: "exit",
|
|
118
|
+
children: z
|
|
119
|
+
}, k)
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ C("div", {
|
|
122
|
+
className: te,
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ S("hr", {
|
|
125
|
+
className: f,
|
|
126
|
+
"aria-hidden": "true"
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ S("div", {
|
|
129
|
+
role: "status",
|
|
130
|
+
children: L ? /* @__PURE__ */ S("p", {
|
|
131
|
+
className: ne,
|
|
132
|
+
children: V.pending
|
|
133
|
+
}) : null
|
|
134
|
+
}),
|
|
135
|
+
!L && R != null ? /* @__PURE__ */ S("p", {
|
|
136
|
+
className: l,
|
|
137
|
+
role: "alert",
|
|
138
|
+
children: R
|
|
139
|
+
}) : null,
|
|
140
|
+
/* @__PURE__ */ C("div", {
|
|
141
|
+
className: d,
|
|
142
|
+
children: [F, /* @__PURE__ */ C("div", {
|
|
143
|
+
className: u,
|
|
144
|
+
children: [/* @__PURE__ */ S(t, {
|
|
145
|
+
role: "secondary",
|
|
146
|
+
size: $,
|
|
147
|
+
type: "button",
|
|
148
|
+
disabled: L,
|
|
149
|
+
onClick: P,
|
|
150
|
+
children: V.cancel
|
|
151
|
+
}), M == null ? null : /* @__PURE__ */ S(t, {
|
|
152
|
+
role: "primary",
|
|
153
|
+
size: $,
|
|
154
|
+
type: "button",
|
|
155
|
+
disabled: !N || L,
|
|
156
|
+
onClick: M,
|
|
157
|
+
children: I ?? V.continue
|
|
158
|
+
})]
|
|
159
|
+
})]
|
|
137
160
|
})
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
children: [/* @__PURE__ */ x(t, {
|
|
142
|
-
role: "secondary",
|
|
143
|
-
size: $,
|
|
144
|
-
type: "button",
|
|
145
|
-
onClick: N,
|
|
146
|
-
children: z.cancel
|
|
147
|
-
}), j == null ? null : /* @__PURE__ */ x(t, {
|
|
148
|
-
role: "primary",
|
|
149
|
-
size: $,
|
|
150
|
-
type: "button",
|
|
151
|
-
disabled: !M,
|
|
152
|
-
onClick: j,
|
|
153
|
-
children: F ?? z.continue
|
|
154
|
-
})]
|
|
155
|
-
})] })
|
|
156
|
-
]
|
|
157
|
-
})
|
|
161
|
+
]
|
|
162
|
+
})
|
|
163
|
+
]
|
|
158
164
|
});
|
|
159
165
|
});
|
|
160
166
|
//#endregion
|
|
161
|
-
export {
|
|
167
|
+
export { O as ChatDockGate, D as chatDockGateDefaultLabels };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** What **ChatDock** hands the gate in its conversation. */
|
|
2
|
+
export interface ChatDockGateContextValue {
|
|
3
|
+
/**
|
|
4
|
+
* Brings the gate into view in the conversation — the whole form when it fits, otherwise its top.
|
|
5
|
+
* The gate asks on mount and on each step.
|
|
6
|
+
*/
|
|
7
|
+
revealGate: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ChatDockGateContext: import("react").Context<ChatDockGateContextValue | null>;
|
|
10
|
+
/** The conversation the gate sits in, or `null` outside **ChatDock**. */
|
|
11
|
+
export declare function useChatDockGateWindow(): ChatDockGateContextValue | null;
|
|
12
|
+
//# sourceMappingURL=chatDockGateContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatDockGateContext.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockGateContext.ts"],"names":[],"mappings":"AAEA,4DAA4D;AAC5D,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,0DAAuD,CAAC;AAExF,yEAAyE;AACzE,wBAAgB,qBAAqB,IAAI,wBAAwB,GAAG,IAAI,CAEvE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext as e, useContext as t } from "react";
|
|
3
|
+
//#region src/components/organisms/ChatDock/chatDockGateContext.ts
|
|
4
|
+
var n = e(null);
|
|
5
|
+
function r() {
|
|
6
|
+
return t(n);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as ChatDockGateContext, r as useChatDockGateWindow };
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The gate —
|
|
3
|
-
*
|
|
2
|
+
* The gate — flat on the window surface, set off from the message above by a hairline, and as wide as
|
|
3
|
+
* the conversation's turns. Focusable: ChatDock moves focus here.
|
|
4
4
|
*/
|
|
5
|
-
export declare const chatDockGateClasses = "flex
|
|
6
|
-
/** The
|
|
7
|
-
export declare const
|
|
8
|
-
/**
|
|
9
|
-
export declare const
|
|
10
|
-
/**
|
|
11
|
-
export declare const
|
|
5
|
+
export declare const chatDockGateClasses = "flex flex-col gap-3 border-t border-border pt-4 outline-none";
|
|
6
|
+
/** The step's title and subtitle, with previous, progress, and next at the end. */
|
|
7
|
+
export declare const chatDockGateHeaderClasses = "flex items-start justify-between gap-3";
|
|
8
|
+
/** Title and subtitle, one block. */
|
|
9
|
+
export declare const chatDockGateHeadingClasses = "flex min-w-0 flex-1 flex-col";
|
|
10
|
+
/** Previous, "2 of 4", next. */
|
|
11
|
+
export declare const chatDockGateControlsClasses = "-me-2 flex shrink-0 items-center gap-1";
|
|
12
|
+
/** One step. It never scrolls on its own: the conversation scrolls, and the window grows first. */
|
|
13
|
+
export declare const chatDockGateStepClasses = "flex flex-col gap-3";
|
|
12
14
|
/** "2 of 4" between the header controls. */
|
|
13
15
|
export declare const chatDockGateProgressClasses: string;
|
|
16
|
+
/** The footer block: the hairline, then the pending or error line, then the actions. */
|
|
17
|
+
export declare const chatDockGateFooterBlockClasses = "flex w-full flex-col";
|
|
18
|
+
/** Hairline over the footer. */
|
|
19
|
+
export declare const chatDockGateFooterRuleClasses = "m-0 w-full border-0 border-t border-border p-0";
|
|
20
|
+
/** The footer row — the start slot, then Cancel and the primary action at the end. */
|
|
21
|
+
export declare const chatDockGateFooterRowClasses = "flex items-center justify-between gap-3 pt-3";
|
|
14
22
|
/** Cancel and the primary action, at the end of the footer. */
|
|
15
23
|
export declare const chatDockGateFooterActionsClasses = "ml-auto flex items-center gap-2";
|
|
24
|
+
/** While the step's action runs — muted caption over the actions. */
|
|
25
|
+
export declare const chatDockGatePendingClasses: string;
|
|
26
|
+
/** The step's action failed — error caption over the actions. */
|
|
27
|
+
export declare const chatDockGateErrorClasses: string;
|
|
16
28
|
//# sourceMappingURL=chatDockGateStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatDockGateStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockGateStyles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chatDockGateStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockGateStyles.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,mBAAmB,iEAAiE,CAAC;AAElG,mFAAmF;AACnF,eAAO,MAAM,yBAAyB,2CAA2C,CAAC;AAElF,qCAAqC;AACrC,eAAO,MAAM,0BAA0B,iCAAiC,CAAC;AAEzE,gCAAgC;AAChC,eAAO,MAAM,2BAA2B,2CAA2C,CAAC;AAEpF,mGAAmG;AACnG,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAE7D,4CAA4C;AAC5C,eAAO,MAAM,2BAA2B,QAAiE,CAAC;AAE1G,wFAAwF;AACxF,eAAO,MAAM,8BAA8B,yBAAyB,CAAC;AAErE,gCAAgC;AAChC,eAAO,MAAM,6BAA6B,mDAAmD,CAAC;AAE9F,sFAAsF;AACtF,eAAO,MAAM,4BAA4B,iDAAiD,CAAC;AAE3F,+DAA+D;AAC/D,eAAO,MAAM,gCAAgC,oCAAoC,CAAC;AAElF,qEAAqE;AACrE,eAAO,MAAM,0BAA0B,QAAoD,CAAC;AAE5F,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,QAAoD,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { typographyClass as t } from "../../../lib/typography.js";
|
|
4
|
-
import { cardLayoutBodyOccupantInsetXClasses as n, cardLayoutBodyOccupantWellClasses as r } from "../../molecules/Card/cardStyles.js";
|
|
5
4
|
//#region src/components/organisms/ChatDock/chatDockGateStyles.ts
|
|
6
|
-
var
|
|
5
|
+
var n = "flex flex-col gap-3 border-t border-border pt-4 outline-none", r = "flex items-start justify-between gap-3", i = "flex min-w-0 flex-1 flex-col", a = "-me-2 flex shrink-0 items-center gap-1", o = "flex flex-col gap-3", s = e(t("caption"), "px-1 text-muted tabular-nums"), c = "flex w-full flex-col", l = "m-0 w-full border-0 border-t border-border p-0", u = "flex items-center justify-between gap-3 pt-3", d = "ml-auto flex items-center gap-2", f = e(t("caption"), "pt-3 text-muted"), p = e(t("caption"), "pt-3 text-error");
|
|
7
6
|
//#endregion
|
|
8
|
-
export { a as
|
|
7
|
+
export { n as chatDockGateClasses, a as chatDockGateControlsClasses, p as chatDockGateErrorClasses, d as chatDockGateFooterActionsClasses, c as chatDockGateFooterBlockClasses, u as chatDockGateFooterRowClasses, l as chatDockGateFooterRuleClasses, r as chatDockGateHeaderClasses, i as chatDockGateHeadingClasses, f as chatDockGatePendingClasses, s as chatDockGateProgressClasses, o as chatDockGateStepClasses };
|
|
@@ -43,10 +43,14 @@ export declare const chatDockWindowClasses: Record<ChatDockPlacement, string>;
|
|
|
43
43
|
*/
|
|
44
44
|
export declare const chatDockWindowContentClasses = "flex h-full flex-col gap-3 pt-4 pb-[calc(var(--chat-dock-composer,3.25rem)+0.75rem)]";
|
|
45
45
|
/**
|
|
46
|
-
* Scrolling conversation — greeting, turns,
|
|
47
|
-
* scroll it when nothing inside does; the ring sits inside its edge.
|
|
46
|
+
* Scrolling conversation — greeting, turns, the thinking row, and a gate. It takes focus so a
|
|
47
|
+
* keyboard can scroll it when nothing inside does; the ring sits inside its edge.
|
|
48
48
|
*/
|
|
49
49
|
export declare const chatDockThreadClasses: string;
|
|
50
|
+
/** The conversation's turns, one gap apart. Measured so the window can grow to fit a gate. */
|
|
51
|
+
export declare const chatDockThreadContentClasses = "flex flex-col gap-4";
|
|
52
|
+
/** A gate's place in the conversation — under the latest message, as wide as the turns. */
|
|
53
|
+
export declare const chatDockGateSlotClasses = "flex flex-col";
|
|
50
54
|
/** Assistant text — the greeting and replies. */
|
|
51
55
|
export declare const chatDockAssistantMessageClasses: string;
|
|
52
56
|
/** A reply with a row under it — the hover and focus group for that row. */
|
|
@@ -82,10 +86,6 @@ export declare const chatDockFollowUpRowClasses = "flex min-h-11 md:min-h-9";
|
|
|
82
86
|
export declare const chatDockFollowUpsComposerClasses: string;
|
|
83
87
|
/** The composer — on top of the window, in the same place whether the window is open or not. */
|
|
84
88
|
export declare const chatDockComposerClasses = "relative";
|
|
85
|
-
/** One cell for the composer and a gate, so they crossfade in place instead of stacking. */
|
|
86
|
-
export declare const chatDockComposerAreaClasses = "grid";
|
|
87
|
-
/** The composer or the gate, in the shared cell, both from the top. */
|
|
88
|
-
export declare const chatDockComposerLayerClasses = "col-start-1 row-start-1 self-start";
|
|
89
89
|
/**
|
|
90
90
|
* The brand mark at the start of the resting composer. It folds to nothing while the window is open
|
|
91
91
|
* (the header shows the mark), so the field starts where a composer without a mark starts.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatDockStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockStyles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,8BAA+B,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAIjE,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"chatDockStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockStyles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,8BAA+B,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAIjE,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AAGzD,wEAAwE;AACxE,eAAO,MAAM,mBAAmB,iCAAiC,CAAC;AAElE,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,+CAA+C,CAAC;AAEhF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAIhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAO/B,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAOnE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,yFAAyF,CAAC;AAEnI;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAIjC,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,4BAA4B,wBAAwB,CAAC;AAElE,2FAA2F;AAC3F,eAAO,MAAM,uBAAuB,kBAAkB,CAAC;AAEvD,iDAAiD;AACjD,eAAO,MAAM,+BAA+B,QAAyC,CAAC;AAEtF,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB,oCAAoC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,QAKvC,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,kCAAkC,wBAAwB,CAAC;AAExE,+IAA+I;AAC/I,eAAO,MAAM,2BAA2B,6CAA6C,CAAC;AAEtF,qDAAqD;AACrD,eAAO,MAAM,wBAAwB,QAA4D,CAAC;AAElG,+GAA+G;AAC/G,eAAO,MAAM,0BAA0B,QAGtC,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAGnC,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,QAGzC,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,mCAAmC,QAG/C,CAAC;AAEF,eAAO,MAAM,8BAA8B,qBAAqB,CAAC;AAEjE,6GAA6G;AAC7G,eAAO,MAAM,8BAA8B,wBAAwB,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAErE,4GAA4G;AAC5G,eAAO,MAAM,gCAAgC,QAAsE,CAAC;AAEpH,gGAAgG;AAChG,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAGlD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,0CAA0C,CAAC;AAE3E,+FAA+F;AAC/F,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAGvE,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAG/E,CAAC"}
|
|
@@ -10,7 +10,7 @@ var i = ["fixed", "inline"], a = {
|
|
|
10
10
|
}, o = "max-md:z-[60]", s = "grid-page [--grid-max:40rem]", c = "pointer-events-auto relative col-span-full", l = "group", u = e("absolute inset-x-0 bottom-full flex flex-wrap justify-center gap-2 pb-3", "invisible group-hover:visible transition-[visibility]", n("fast")), d = e("inline-flex translate-y-2 opacity-0", "group-hover:translate-y-0 group-hover:opacity-100", "group-hover:[transition-delay:calc(var(--motion-stagger)*var(--chat-dock-pill-index,0))]", "motion-reduce:translate-y-0", "transition-[opacity,transform]", n("fast")), f = "overflow-hidden bg-surface font-sans text-fg shadow-soft-card", p = {
|
|
11
11
|
fixed: e(f, "fixed inset-x-0 top-[var(--chat-dock-vv-top,0px)] bottom-[var(--chat-dock-vv-bottom,0px)] rounded-none", "md:absolute md:top-auto md:bottom-0"),
|
|
12
12
|
inline: e(f, "absolute inset-x-0 bottom-0")
|
|
13
|
-
}, m = "flex h-full flex-col gap-3 pt-4 pb-[calc(var(--chat-dock-composer,3.25rem)+0.75rem)]", h = e(r, "
|
|
13
|
+
}, m = "flex h-full flex-col gap-3 pt-4 pb-[calc(var(--chat-dock-composer,3.25rem)+0.75rem)]", h = e(r, "min-h-0 flex-1 overflow-y-auto overscroll-contain pb-2", "outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-ring"), g = "flex flex-col gap-4", _ = "flex flex-col", v = e(t("body"), "text-fg"), y = "group/reply flex flex-col gap-1", b = e("flex min-h-11 items-center gap-1 md:min-h-9", "[@media(hover:hover)]:group-[:not(:hover,:focus-within)]/reply:opacity-0", "transition-[opacity,visibility]", n("fast")), x = "invisible opacity-0", S = "-ms-3 flex items-center gap-1 md:-ms-2.5", C = e(t("caption"), "text-muted tabular-nums"), w = e(t("body"), "ml-auto max-w-[85%] rounded-[var(--radius-card-body)] bg-brand-tint px-3.5 py-2 text-fg"), T = e(t("caption"), "flex items-center gap-2 text-muted"), E = e(r, "flex shrink-0 flex-col gap-1 border-t border-border pt-3"), D = e(t("body"), "flex min-w-0 items-center gap-3 text-muted"), O = "min-w-0 truncate", k = "-mt-2 flex flex-col", A = "flex min-h-11 md:min-h-9", j = e(r, "flex shrink-0 flex-wrap gap-2"), M = "relative", N = "flex h-9 items-center overflow-hidden", P = {
|
|
14
14
|
fixed: e(t("caption"), "pt-2 text-center text-muted md:pb-3"),
|
|
15
15
|
inline: e(t("caption"), "pt-2 pb-3 text-center text-muted")
|
|
16
16
|
}, F = {
|
|
@@ -18,4 +18,4 @@ var i = ["fixed", "inline"], a = {
|
|
|
18
18
|
inline: "h-4"
|
|
19
19
|
};
|
|
20
20
|
//#endregion
|
|
21
|
-
export {
|
|
21
|
+
export { v as chatDockAssistantMessageClasses, M as chatDockComposerClasses, F as chatDockComposerFootSpacerClasses, P as chatDockDisclaimerClasses, c as chatDockDockClasses, l as chatDockDockHoverClasses, A as chatDockFollowUpRowClasses, j as chatDockFollowUpsComposerClasses, k as chatDockFollowUpsInlineClasses, _ as chatDockGateSlotClasses, s as chatDockGridClasses, N as chatDockMarkClasses, d as chatDockPillClasses, u as chatDockPillsClasses, i as chatDockPlacements, b as chatDockReplyActionsClasses, x as chatDockReplyActionsPendingClasses, S as chatDockReplyButtonsClasses, y as chatDockReplyClasses, C as chatDockReplyMetaClasses, a as chatDockRootClasses, o as chatDockRootRaisedClasses, O as chatDockSuggestionLabelClasses, E as chatDockSuggestionListClasses, D as chatDockSuggestionRowContentClasses, T as chatDockThinkingClasses, h as chatDockThreadClasses, g as chatDockThreadContentClasses, w as chatDockUserMessageClasses, p as chatDockWindowClasses, m as chatDockWindowContentClasses };
|
|
@@ -18,4 +18,10 @@ export declare function chatDockVisibleArea(layoutHeight: number, visual: {
|
|
|
18
18
|
} | null | undefined): ChatDockVisibleArea;
|
|
19
19
|
/** The visible area while `active` (the phone window is on screen); zero otherwise. */
|
|
20
20
|
export declare function useChatDockVisibleArea(active: boolean): ChatDockVisibleArea;
|
|
21
|
+
/**
|
|
22
|
+
* Reduced motion, from the reader's setting or `MotionConfig reducedMotion="always"`. The server and
|
|
23
|
+
* the hydration render read the setting as off, so the closed window's inline style matches the
|
|
24
|
+
* server's; it switches right after. Closed, the window is hidden, so the switch never shows.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useChatDockReducedMotion(config: string | undefined): boolean;
|
|
21
27
|
//# sourceMappingURL=chatDockViewport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatDockViewport.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockViewport.ts"],"names":[],"mappings":"AAEA,wGAAwG;AACxG,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD,2GAA2G;AAC3G,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAa1E;AAMD,2GAA2G;AAC3G,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,yFAAyF;AACzF,MAAM,WAAW,mBAAmB;IAClC,0FAA0F;IAC1F,GAAG,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAC/D,mBAAmB,CAKrB;AAOD,uFAAuF;AACvF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,mBAAmB,CAK3E"}
|
|
1
|
+
{"version":3,"file":"chatDockViewport.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockViewport.ts"],"names":[],"mappings":"AAEA,wGAAwG;AACxG,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD,2GAA2G;AAC3G,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAa1E;AAMD,2GAA2G;AAC3G,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,yFAAyF;AACzF,MAAM,WAAW,mBAAmB;IAClC,0FAA0F;IAC1F,GAAG,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAC/D,mBAAmB,CAKrB;AAOD,uFAAuF;AACvF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,mBAAmB,CAK3E;AAeD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAG5E"}
|
|
@@ -42,5 +42,18 @@ function s(t) {
|
|
|
42
42
|
bottom: a ?? 0
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
+
var c = "(prefers-reduced-motion: reduce)";
|
|
46
|
+
function l(e) {
|
|
47
|
+
if (typeof window.matchMedia != "function") return () => void 0;
|
|
48
|
+
let t = window.matchMedia(c);
|
|
49
|
+
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
50
|
+
}
|
|
51
|
+
function u() {
|
|
52
|
+
return typeof window.matchMedia == "function" && window.matchMedia(c).matches;
|
|
53
|
+
}
|
|
54
|
+
function d(t) {
|
|
55
|
+
let n = e(l, u, () => !1);
|
|
56
|
+
return t === "always" || t !== "never" && n;
|
|
57
|
+
}
|
|
45
58
|
//#endregion
|
|
46
|
-
export { a as chatDockVisibleArea, t as chatDockWideQuery, n as subscribeChatDockViewport, s as useChatDockVisibleArea, i as useChatDockWide };
|
|
59
|
+
export { a as chatDockVisibleArea, t as chatDockWideQuery, n as subscribeChatDockViewport, d as useChatDockReducedMotion, s as useChatDockVisibleArea, i as useChatDockWide };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,OAAO,CAAC;AAoBf,OAAO,EAIL,KAAK,EAGN,MAAM,cAAc,CAAC;AACtB,OAAO,EASL,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAC5D,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,OAAO,CAAC;AAoBf,OAAO,EAIL,KAAK,EAGN,MAAM,cAAc,CAAC;AACtB,OAAO,EASL,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAC5D,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA0JD,wBAAgB,OAAO,CAAC,EACtB,QAAyB,EACzB,UAAc,EACd,YAAY,EAAE,SAA2B,EACzC,SAAS,GACV,EAAE,YAAY,sCAkCd;AAED,8DAA8D;AAC9D,wBAAgB,KAAK,CAAC,KAAK,EAAE,YAAY,+BAExC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EACV,WAAW,EACX,OAAO,EACP,YAAY,EACZ,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -124,9 +124,15 @@ function N({ record: e, position: a, index: o, maxVisible: s }) {
|
|
|
124
124
|
})
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
-
function P(
|
|
127
|
+
function P() {
|
|
128
|
+
return () => void 0;
|
|
129
|
+
}
|
|
130
|
+
function F() {
|
|
131
|
+
return v(P, () => !0, () => !1);
|
|
132
|
+
}
|
|
133
|
+
function I({ position: t = "bottom-right", maxVisible: n = 5, "aria-label": r = "Notifications", className: i }) {
|
|
128
134
|
let c = v(s, o, a);
|
|
129
|
-
if (
|
|
135
|
+
if (!F()) return null;
|
|
130
136
|
let l = [...c.slice(-Math.max(1, n))].reverse();
|
|
131
137
|
return k(/* @__PURE__ */ w("ol", {
|
|
132
138
|
"aria-label": r,
|
|
@@ -143,8 +149,8 @@ function P({ position: t = "bottom-right", maxVisible: n = 5, "aria-label": r =
|
|
|
143
149
|
})
|
|
144
150
|
}), document.body);
|
|
145
151
|
}
|
|
146
|
-
function
|
|
147
|
-
return /* @__PURE__ */ w(
|
|
152
|
+
function L(e) {
|
|
153
|
+
return /* @__PURE__ */ w(I, { ...e });
|
|
148
154
|
}
|
|
149
155
|
//#endregion
|
|
150
|
-
export {
|
|
156
|
+
export { L as Toast, I as Toaster, c as toast, m as toastPositions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogOverlay.d.ts","sourceRoot":"","sources":["../../src/lib/dialogOverlay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialogOverlay.d.ts","sourceRoot":"","sources":["../../src/lib/dialogOverlay.ts"],"names":[],"mappings":"AAYA,0DAA0D;AAC1D,wBAAgB,SAAS,CAAC,SAAS,EAAE,WAAW,GAAG,MAAM,IAAI,CAqC5D;AAED,yEAAyE;AACzE,wBAAgB,cAAc,IAAI,MAAM,IAAI,CAY3C;AAED,+FAA+F;AAC/F,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,WAAW,EACtB,cAAc,CAAC,EAAE,MAAM,GACtB,IAAI,CAWN"}
|