@cossistant/react 0.0.25 → 0.0.28
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/api.d.ts +1 -1
- package/api.d.ts.map +1 -1
- package/checks.d.ts +1 -1
- package/checks.d.ts.map +1 -1
- package/clsx.d.ts +1 -1
- package/clsx.d.ts.map +1 -1
- package/coerce.d.ts +1 -1
- package/coerce.d.ts.map +1 -1
- package/conversation.d.ts +3 -0
- package/conversation.d.ts.map +1 -1
- package/core.d.ts +1 -1
- package/core.d.ts.map +1 -1
- package/errors.d.ts +1 -1
- package/errors.d.ts.map +1 -1
- package/errors2.d.ts +1 -1
- package/errors2.d.ts.map +1 -1
- package/hooks/index.d.ts +2 -1
- package/hooks/index.js +6 -5
- package/hooks/private/store/use-website-store.js +2 -1
- package/hooks/private/store/use-website-store.js.map +1 -1
- package/hooks/private/use-client-query.d.ts +6 -0
- package/hooks/private/use-client-query.d.ts.map +1 -1
- package/hooks/private/use-client-query.js +26 -3
- package/hooks/private/use-client-query.js.map +1 -1
- package/hooks/private/use-multimodal-input.d.ts.map +1 -1
- package/hooks/private/use-multimodal-input.js +7 -5
- package/hooks/private/use-multimodal-input.js.map +1 -1
- package/hooks/private/use-visitor-typing-reporter.d.ts +18 -1
- package/hooks/private/use-visitor-typing-reporter.d.ts.map +1 -1
- package/hooks/private/use-visitor-typing-reporter.js +34 -4
- package/hooks/private/use-visitor-typing-reporter.js.map +1 -1
- package/hooks/use-conversation-page.d.ts +1 -0
- package/hooks/use-conversation-page.d.ts.map +1 -1
- package/hooks/use-conversation-page.js +6 -1
- package/hooks/use-conversation-page.js.map +1 -1
- package/hooks/use-conversation-preview.d.ts +2 -1
- package/hooks/use-conversation-preview.d.ts.map +1 -1
- package/hooks/use-conversation-preview.js +1 -1
- package/hooks/use-conversation-preview.js.map +1 -1
- package/hooks/use-conversation-timeline-items.js +2 -1
- package/hooks/use-conversation-timeline-items.js.map +1 -1
- package/hooks/use-conversation.js +2 -1
- package/hooks/use-conversation.js.map +1 -1
- package/hooks/use-conversations.js +1 -0
- package/hooks/use-conversations.js.map +1 -1
- package/hooks/use-file-upload.d.ts +55 -0
- package/hooks/use-file-upload.d.ts.map +1 -0
- package/hooks/use-file-upload.js +100 -0
- package/hooks/use-file-upload.js.map +1 -0
- package/hooks/use-message-composer.d.ts +11 -0
- package/hooks/use-message-composer.d.ts.map +1 -1
- package/hooks/use-message-composer.js +7 -3
- package/hooks/use-message-composer.js.map +1 -1
- package/hooks/use-realtime-support.d.ts.map +1 -1
- package/hooks/use-send-message.d.ts +1 -0
- package/hooks/use-send-message.d.ts.map +1 -1
- package/hooks/use-send-message.js +63 -11
- package/hooks/use-send-message.js.map +1 -1
- package/index.d.ts +6 -3
- package/index.js +13 -10
- package/openapi30.d.ts +1 -1
- package/openapi30.d.ts.map +1 -1
- package/openapi31.d.ts +1 -1
- package/openapi31.d.ts.map +1 -1
- package/package.json +4 -3
- package/parse.d.ts +1 -1
- package/parse.d.ts.map +1 -1
- package/primitives/conversation-timeline.d.ts.map +1 -1
- package/primitives/conversation-timeline.js +10 -5
- package/primitives/conversation-timeline.js.map +1 -1
- package/primitives/index.d.ts +4 -3
- package/primitives/index.js +12 -5
- package/primitives/index.parts.d.ts +3 -2
- package/primitives/index.parts.js +4 -3
- package/primitives/timeline-item-attachments.d.ts +100 -0
- package/primitives/timeline-item-attachments.d.ts.map +1 -0
- package/primitives/timeline-item-attachments.js +151 -0
- package/primitives/timeline-item-attachments.js.map +1 -0
- package/primitives/trigger.d.ts +91 -0
- package/primitives/trigger.d.ts.map +1 -0
- package/primitives/trigger.js +74 -0
- package/primitives/trigger.js.map +1 -0
- package/primitives/window.d.ts +22 -1
- package/primitives/window.d.ts.map +1 -1
- package/primitives/window.js +91 -5
- package/primitives/window.js.map +1 -1
- package/provider.d.ts.map +1 -1
- package/provider.js +8 -3
- package/provider.js.map +1 -1
- package/realtime/index.js +1 -1
- package/realtime/provider.js +1 -1
- package/realtime/support-provider.js +1 -1
- package/realtime/support-provider.js.map +1 -1
- package/realtime-events.d.ts +39 -0
- package/realtime-events.d.ts.map +1 -1
- package/registries.d.ts +1 -1
- package/registries.d.ts.map +1 -1
- package/schemas.d.ts +1 -1
- package/schemas.d.ts.map +1 -1
- package/schemas2.d.ts +1 -1
- package/schemas2.d.ts.map +1 -1
- package/schemas3.d.ts +1 -0
- package/schemas3.d.ts.map +1 -1
- package/specification-extension.d.ts +1 -1
- package/specification-extension.d.ts.map +1 -1
- package/standard-schema.d.ts +1 -1
- package/standard-schema.d.ts.map +1 -1
- package/support/components/button.d.ts +1 -1
- package/support/components/content.d.ts +30 -0
- package/support/components/content.d.ts.map +1 -0
- package/support/components/content.js +282 -0
- package/support/components/content.js.map +1 -0
- package/support/components/conversation-button-link.js +1 -1
- package/support/components/conversation-timeline.js +3 -3
- package/support/components/conversation-timeline.js.map +1 -1
- package/support/components/header.js +1 -1
- package/support/components/image-lightbox.d.ts +49 -0
- package/support/components/image-lightbox.d.ts.map +1 -0
- package/support/components/image-lightbox.js +142 -0
- package/support/components/image-lightbox.js.map +1 -0
- package/support/components/index.d.ts +5 -4
- package/support/components/index.js +4 -4
- package/support/components/multimodal-input.d.ts +4 -1
- package/support/components/multimodal-input.d.ts.map +1 -1
- package/support/components/multimodal-input.js +71 -45
- package/support/components/multimodal-input.js.map +1 -1
- package/support/components/navigation-tab.js +1 -1
- package/support/components/root.d.ts +23 -0
- package/support/components/root.d.ts.map +1 -0
- package/support/components/root.js +36 -0
- package/support/components/root.js.map +1 -0
- package/support/components/timeline-message-item.d.ts.map +1 -1
- package/support/components/timeline-message-item.js +82 -18
- package/support/components/timeline-message-item.js.map +1 -1
- package/support/components/trigger.d.ts +14 -0
- package/support/components/trigger.d.ts.map +1 -0
- package/support/components/{bubble.js → trigger.js} +16 -12
- package/support/components/trigger.js.map +1 -0
- package/support/components/typing-indicator.d.ts.map +1 -1
- package/support/components/typing-indicator.js +1 -0
- package/support/components/typing-indicator.js.map +1 -1
- package/support/context/controlled-state.d.ts +46 -0
- package/support/context/controlled-state.d.ts.map +1 -0
- package/support/context/controlled-state.js +34 -0
- package/support/context/controlled-state.js.map +1 -0
- package/support/context/events.d.ts +103 -0
- package/support/context/events.d.ts.map +1 -0
- package/support/context/events.js +139 -0
- package/support/context/events.js.map +1 -0
- package/support/context/handle.d.ts +90 -0
- package/support/context/handle.d.ts.map +1 -0
- package/support/context/handle.js +79 -0
- package/support/context/handle.js.map +1 -0
- package/support/context/positioning.d.ts +17 -0
- package/support/context/positioning.d.ts.map +1 -0
- package/support/context/positioning.js +26 -0
- package/support/context/positioning.js.map +1 -0
- package/support/context/slots.d.ts +85 -0
- package/support/context/slots.d.ts.map +1 -0
- package/support/context/slots.js +115 -0
- package/support/context/slots.js.map +1 -0
- package/support/context/websocket.d.ts +8 -1
- package/support/context/websocket.d.ts.map +1 -1
- package/support/context/websocket.js +8 -1
- package/support/context/websocket.js.map +1 -1
- package/support/index.d.ts +239 -54
- package/support/index.d.ts.map +1 -1
- package/support/index.js +254 -33
- package/support/index.js.map +1 -1
- package/support/pages/articles.d.ts.map +1 -1
- package/support/pages/articles.js +3 -4
- package/support/pages/articles.js.map +1 -1
- package/support/pages/conversation-history.js +2 -2
- package/support/pages/conversation.js +6 -5
- package/support/pages/conversation.js.map +1 -1
- package/support/pages/home.js +2 -2
- package/support/router.d.ts +52 -12
- package/support/router.d.ts.map +1 -1
- package/support/router.js +78 -30
- package/support/router.js.map +1 -1
- package/support/store/index.d.ts +2 -2
- package/support/store/support-store.d.ts +26 -20
- package/support/store/support-store.d.ts.map +1 -1
- package/support/store/support-store.js +47 -6
- package/support/store/support-store.js.map +1 -1
- package/support/{support-D2EgfIts.css → support-C7Xaw-N6.css} +1 -2
- package/support/support-C7Xaw-N6.css.map +1 -0
- package/support/text/index.js.map +1 -1
- package/support/types.d.ts +75 -12
- package/support/types.d.ts.map +1 -1
- package/support.css +2 -2
- package/tailwind.css +0 -1
- package/timeline-item.d.ts +68 -2
- package/timeline-item.d.ts.map +1 -1
- package/util.d.ts +1 -1
- package/util.d.ts.map +1 -1
- package/utils/index.d.ts +2 -1
- package/utils/index.js +2 -1
- package/utils/merge-refs.d.ts +30 -0
- package/utils/merge-refs.d.ts.map +1 -0
- package/utils/merge-refs.js +46 -0
- package/utils/merge-refs.js.map +1 -0
- package/utils/use-render-element.d.ts.map +1 -1
- package/utils/use-render-element.js +20 -7
- package/utils/use-render-element.js.map +1 -1
- package/versions.d.ts +1 -1
- package/versions.d.ts.map +1 -1
- package/zod-extensions.d.ts +1 -1
- package/zod-extensions.d.ts.map +1 -1
- package/primitives/bubble.d.ts +0 -38
- package/primitives/bubble.d.ts.map +0 -1
- package/primitives/bubble.js +0 -57
- package/primitives/bubble.js.map +0 -1
- package/support/components/bubble.d.ts +0 -10
- package/support/components/bubble.d.ts.map +0 -1
- package/support/components/bubble.js.map +0 -1
- package/support/components/container.d.ts +0 -13
- package/support/components/container.d.ts.map +0 -1
- package/support/components/container.js +0 -109
- package/support/components/container.js.map +0 -1
- package/support/components/support-content.d.ts +0 -22
- package/support/components/support-content.d.ts.map +0 -1
- package/support/components/support-content.js +0 -48
- package/support/components/support-content.js.map +0 -1
- package/support/support-D2EgfIts.css.map +0 -1
package/timeline-item.d.ts
CHANGED
|
@@ -5,7 +5,70 @@ import { ZodCoercedNumber } from "./coerce.js";
|
|
|
5
5
|
import "./index3.js";
|
|
6
6
|
|
|
7
7
|
//#region ../types/src/api/timeline-item.d.ts
|
|
8
|
-
|
|
8
|
+
declare const timelinePartImageSchema: ZodObject<{
|
|
9
|
+
type: ZodLiteral<"image">;
|
|
10
|
+
url: ZodString;
|
|
11
|
+
mediaType: ZodString;
|
|
12
|
+
fileName: ZodOptional<ZodString>;
|
|
13
|
+
size: ZodOptional<ZodNumber>;
|
|
14
|
+
width: ZodOptional<ZodNumber>;
|
|
15
|
+
height: ZodOptional<ZodNumber>;
|
|
16
|
+
}, $strip>;
|
|
17
|
+
declare const timelineFileSchema: ZodObject<{
|
|
18
|
+
type: ZodLiteral<"file">;
|
|
19
|
+
url: ZodString;
|
|
20
|
+
mediaType: ZodString;
|
|
21
|
+
fileName: ZodOptional<ZodString>;
|
|
22
|
+
size: ZodOptional<ZodNumber>;
|
|
23
|
+
}, $strip>;
|
|
24
|
+
declare const timelineItemPartsSchema: ZodArray<ZodUnion<readonly [ZodObject<{
|
|
25
|
+
type: ZodLiteral<"text">;
|
|
26
|
+
text: ZodString;
|
|
27
|
+
}, $strip>, ZodObject<{
|
|
28
|
+
type: ZodLiteral<"event">;
|
|
29
|
+
eventType: ZodEnum<{
|
|
30
|
+
assigned: "assigned";
|
|
31
|
+
unassigned: "unassigned";
|
|
32
|
+
participant_requested: "participant_requested";
|
|
33
|
+
participant_joined: "participant_joined";
|
|
34
|
+
participant_left: "participant_left";
|
|
35
|
+
status_changed: "status_changed";
|
|
36
|
+
priority_changed: "priority_changed";
|
|
37
|
+
tag_added: "tag_added";
|
|
38
|
+
tag_removed: "tag_removed";
|
|
39
|
+
resolved: "resolved";
|
|
40
|
+
reopened: "reopened";
|
|
41
|
+
visitor_blocked: "visitor_blocked";
|
|
42
|
+
visitor_unblocked: "visitor_unblocked";
|
|
43
|
+
visitor_identified: "visitor_identified";
|
|
44
|
+
}>;
|
|
45
|
+
actorUserId: ZodNullable<ZodString>;
|
|
46
|
+
actorAiAgentId: ZodNullable<ZodString>;
|
|
47
|
+
targetUserId: ZodNullable<ZodString>;
|
|
48
|
+
targetAiAgentId: ZodNullable<ZodString>;
|
|
49
|
+
message: ZodOptional<ZodNullable<ZodString>>;
|
|
50
|
+
}, $strip>, ZodObject<{
|
|
51
|
+
type: ZodLiteral<"image">;
|
|
52
|
+
url: ZodString;
|
|
53
|
+
mediaType: ZodString;
|
|
54
|
+
fileName: ZodOptional<ZodString>;
|
|
55
|
+
size: ZodOptional<ZodNumber>;
|
|
56
|
+
width: ZodOptional<ZodNumber>;
|
|
57
|
+
height: ZodOptional<ZodNumber>;
|
|
58
|
+
}, $strip>, ZodObject<{
|
|
59
|
+
type: ZodLiteral<"file">;
|
|
60
|
+
url: ZodString;
|
|
61
|
+
mediaType: ZodString;
|
|
62
|
+
fileName: ZodOptional<ZodString>;
|
|
63
|
+
size: ZodOptional<ZodNumber>;
|
|
64
|
+
}, $strip>, ZodObject<{
|
|
65
|
+
type: ZodLiteral<"metadata">;
|
|
66
|
+
source: ZodEnum<{
|
|
67
|
+
email: "email";
|
|
68
|
+
widget: "widget";
|
|
69
|
+
api: "api";
|
|
70
|
+
}>;
|
|
71
|
+
}, $strip>]>>;
|
|
9
72
|
declare const timelineItemSchema: ZodObject<{
|
|
10
73
|
id: ZodOptional<ZodString>;
|
|
11
74
|
conversationId: ZodString;
|
|
@@ -77,6 +140,9 @@ declare const timelineItemSchema: ZodObject<{
|
|
|
77
140
|
}, $strip>;
|
|
78
141
|
type timelineItemSchema = output<typeof timelineItemSchema>;
|
|
79
142
|
type TimelineItem = output<typeof timelineItemSchema>;
|
|
143
|
+
type TimelineItemParts = output<typeof timelineItemPartsSchema>;
|
|
144
|
+
type TimelinePartImage = output<typeof timelinePartImageSchema>;
|
|
145
|
+
type TimelinePartFile = output<typeof timelineFileSchema>;
|
|
80
146
|
declare const getConversationTimelineItemsRequestSchema: ZodObject<{
|
|
81
147
|
limit: ZodDefault<ZodCoercedNumber<unknown>>;
|
|
82
148
|
cursor: ZodOptional<ZodNullable<ZodString>>;
|
|
@@ -157,5 +223,5 @@ declare const getConversationTimelineItemsResponseSchema: ZodObject<{
|
|
|
157
223
|
}, $strip>;
|
|
158
224
|
type GetConversationTimelineItemsResponse = output<typeof getConversationTimelineItemsResponseSchema>;
|
|
159
225
|
//#endregion
|
|
160
|
-
export { GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, TimelineItem };
|
|
226
|
+
export { GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, TimelineItem, TimelineItemParts, TimelinePartFile, TimelinePartImage };
|
|
161
227
|
//# sourceMappingURL=timeline-item.d.ts.map
|
package/timeline-item.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-item.d.ts","names":[],"sources":["../../types/src/api/timeline-item.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timeline-item.d.ts","names":[],"sources":["../../types/src/api/timeline-item.ts"],"sourcesContent":[],"mappings":";;;;;;;cAQM,yBAAuB;;;;;;EAAvB,KAAA,aAAA,UAsBJ,CAAA;;;cAWI,oBAAkB;;;;;;CAjCK,QAAA,CAAA;cAqGhB,yBAAuB,SAAA,mBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA,QAAA,CAAA,WAAA,CAAA;EAAA,IAAA,YAAA,CAAA,OAAA,CAAA;EAAA,GAAA,WAAA;EAevB,SAAA,WAkDX;;;;;;;;;;;;;;;;;;;cAlDW,oBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,GAAA,WAAA;IAAA,SAAA,WAAA;IAoDnB,QAAA,aAAkB,UAAkB,CAAA;IAEpC,IAAA,aAAY,UAAkB,CAAA;EAC9B,CAAA,QAAA,CAAA,WAAiB,CAAA;IAGjB,IAAA,YAAiB,CAAA,UAAkB,CAAA;IACnC,MAAA,SAAgB,CAAA;MAKf,KAAA,EAAA,OAAA;;;;;;;EAAyC,SAAA,aAAA,UAAA,CAAA;EAAA,SAAA,WAAA;EAe1C,SAAA,aAAA,YAAmC,UAAA,CACvC,CAAA;AAGR,CAAA,QAAa,CAAA;KA/BD,kBAAA,GAAqB,cAAe;KAEpC,YAAA,GAAe,cAAe;KAC9B,iBAAA,GAAoB,cAAe;KAGnC,iBAAA,GAAoB,cAAe;KACnC,gBAAA,GAAmB,cAAe;cAKjC,2CAAyC;;;;KAe1C,mCAAA,GAAsC,cAC1C;cAGK,4CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAA,CAAA,CAAA;IAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA;IAiB3C,MAAA,aAAA,UAAA,CAAA;;;;;;;;;KAAA,oCAAA,GAAuC,cAC3C"}
|
package/util.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules
|
|
1
|
+
//#region ../../node_modules/zod/v4/core/util.d.cts
|
|
2
2
|
|
|
3
3
|
type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
|
|
4
4
|
type IsAny<T> = 0 extends 1 & T ? true : false;
|
package/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","names":["checks","$ZodConfig","errors","schemas","JSONType","JWTAlgorithm","HashAlgorithm","HashEncoding","HashFormat","IPVersion","MimeTypes","ParsedTypes","AssertEqual","V","T","U","AssertNotEqual","AssertExtends","IsAny","Omit","K","Exclude","Pick","OmitKeys","MakePartial","InexactPartial","MakeRequired","Required","Exactly","X","Record","NoUndefined","Whatever","LoosePartial","Mask","Keys","PropertyKey","Writeable","P","EmptyObject","BuiltIn","Symbol","toStringTag","Date","Error","Generator","Promise","RegExp","MakeReadonly","Map","ReadonlyMap","Set","ReadonlySet","Head","Tail","Array","ReadonlyArray","Readonly","SomeObject","Identity","Flatten","k","Mapped","Prettify","NoNeverKeys","NoNever","Extend","A","B","TupleItems","SomeType","AnyFunc","IsProp","MaybeAsync","KeyOf","OmitIndexSignature","ExtractIndexSignature","SchemaClass","EnumValue","EnumLike","ToEnum","KeysEnum","KeysArray","Literal","LiteralArray","Primitive","PrimitiveArray","HasSize","HasLength","Numeric","SafeParseResult","SafeParseSuccess","SafeParseError","$ZodError","PropValues","PrimitiveSet","assertEqual","assertNotEqual","assertIs","assertNever","assert","getEnumValues","joinValues","jsonStringifyReplacer","cached","nullish","cleanRegex","floatSafeRemainder","defineLazy","objectClone","assignProp","mergeDefs","cloneDef","$ZodType","getElementAtPath","promiseAllObject","Awaited","randomString","esc","captureStackTrace","Function","isObject","allowsEval","isPlainObject","shallowClone","numKeys","getParsedType","propertyKeyTypes","primitiveTypes","escapeRegex","clone","EmptyToNever","Normalize","normalizeParams","createTransparentProxy","stringifyPrimitive","optionalKeys","$ZodShape","CleanKey","ToCleanMap","$ZodLooseShape","FromCleanMap","NUMBER_FORMAT_RANGES","$ZodNumberFormats","BIGINT_FORMAT_RANGES","$ZodBigIntFormats","pick","$ZodObject","omit","extend","safeExtend","merge","partial","$ZodOptional","required","$ZodNonOptional","Constructor","Def","aborted","ParsePayload","prefixIssues","$ZodRawIssue","unwrapMessage","finalizeIssue","ParseContextInternal","$ZodIssue","getSizableOrigin","getLengthableOrigin","issue","cleanEnum","base64ToUint8Array","Uint8Array","InstanceType","uint8ArrayToBase64","base64urlToUint8Array","uint8ArrayToBase64url","hexToUint8Array","uint8ArrayToHex","Class"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/util.d.cts"],"sourcesContent":["import type * as checks from \"./checks.cjs\";\nimport type { $ZodConfig } from \"./core.cjs\";\nimport type * as errors from \"./errors.cjs\";\nimport type * as schemas from \"./schemas.cjs\";\nexport type JSONType = string | number | boolean | null | JSONType[] | {\n [key: string]: JSONType;\n};\nexport type JWTAlgorithm = \"HS256\" | \"HS384\" | \"HS512\" | \"RS256\" | \"RS384\" | \"RS512\" | \"ES256\" | \"ES384\" | \"ES512\" | \"PS256\" | \"PS384\" | \"PS512\" | \"EdDSA\" | (string & {});\nexport type HashAlgorithm = \"md5\" | \"sha1\" | \"sha256\" | \"sha384\" | \"sha512\";\nexport type HashEncoding = \"hex\" | \"base64\" | \"base64url\";\nexport type HashFormat = `${HashAlgorithm}_${HashEncoding}`;\nexport type IPVersion = \"v4\" | \"v6\";\nexport type MimeTypes = \"application/json\" | \"application/xml\" | \"application/x-www-form-urlencoded\" | \"application/javascript\" | \"application/pdf\" | \"application/zip\" | \"application/vnd.ms-excel\" | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" | \"application/msword\" | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" | \"application/vnd.ms-powerpoint\" | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\" | \"application/octet-stream\" | \"application/graphql\" | \"text/html\" | \"text/plain\" | \"text/css\" | \"text/javascript\" | \"text/csv\" | \"image/png\" | \"image/jpeg\" | \"image/gif\" | \"image/svg+xml\" | \"image/webp\" | \"audio/mpeg\" | \"audio/ogg\" | \"audio/wav\" | \"audio/webm\" | \"video/mp4\" | \"video/webm\" | \"video/ogg\" | \"font/woff\" | \"font/woff2\" | \"font/ttf\" | \"font/otf\" | \"multipart/form-data\" | (string & {});\nexport type ParsedTypes = \"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"file\" | \"date\" | \"array\" | \"map\" | \"set\" | \"nan\" | \"null\" | \"promise\";\nexport type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;\nexport type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;\nexport type AssertExtends<T, U> = T extends U ? T : never;\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\nexport type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;\nexport type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;\nexport type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;\nexport type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;\nexport type NoUndefined<T> = T extends undefined ? never : T;\nexport type Whatever = {} | undefined | null;\nexport type LoosePartial<T extends object> = InexactPartial<T> & {\n [k: string]: unknown;\n};\nexport type Mask<Keys extends PropertyKey> = {\n [K in Keys]?: true;\n};\nexport type Writeable<T> = {\n -readonly [P in keyof T]: T[P];\n} & {};\nexport type InexactPartial<T> = {\n [P in keyof T]?: T[P] | undefined;\n};\nexport type EmptyObject = Record<string, never>;\nexport type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {\n readonly [Symbol.toStringTag]: string;\n} | Date | Error | Generator | Promise<unknown> | RegExp;\nexport type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;\nexport type SomeObject = Record<PropertyKey, any>;\nexport type Identity<T> = T;\nexport type Flatten<T> = Identity<{\n [k in keyof T]: T[k];\n}>;\nexport type Mapped<T> = {\n [k in keyof T]: T[k];\n};\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\nexport type NoNeverKeys<T> = {\n [k in keyof T]: [T[k]] extends [never] ? never : k;\n}[keyof T];\nexport type NoNever<T> = Identity<{\n [k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;\n}>;\nexport type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : {\n [K in keyof A as K extends keyof B ? never : K]: A[K];\n} & {\n [K in keyof B]: B[K];\n}>;\nexport type TupleItems = ReadonlyArray<schemas.SomeType>;\nexport type AnyFunc = (...args: any[]) => any;\nexport type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;\nexport type MaybeAsync<T> = T | Promise<T>;\nexport type KeyOf<T> = keyof OmitIndexSignature<T>;\nexport type OmitIndexSignature<T> = {\n [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];\n};\nexport type ExtractIndexSignature<T> = {\n [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];\n};\nexport type Keys<T extends object> = keyof OmitIndexSignature<T>;\nexport type SchemaClass<T extends schemas.SomeType> = {\n new (def: T[\"_zod\"][\"def\"]): T;\n};\nexport type EnumValue = string | number;\nexport type EnumLike = Readonly<Record<string, EnumValue>>;\nexport type ToEnum<T extends EnumValue> = Flatten<{\n [k in T]: k;\n}>;\nexport type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;\nexport type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;\nexport type Literal = string | number | bigint | boolean | null | undefined;\nexport type LiteralArray = Array<Literal>;\nexport type Primitive = string | number | symbol | bigint | boolean | null | undefined;\nexport type PrimitiveArray = Array<Primitive>;\nexport type HasSize = {\n size: number;\n};\nexport type HasLength = {\n length: number;\n};\nexport type Numeric = number | bigint | Date;\nexport type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;\nexport type SafeParseSuccess<T> = {\n success: true;\n data: T;\n error?: never;\n};\nexport type SafeParseError<T> = {\n success: false;\n data?: never;\n error: errors.$ZodError<T>;\n};\nexport type PropValues = Record<string, Set<Primitive>>;\nexport type PrimitiveSet = Set<Primitive>;\nexport declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;\nexport declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;\nexport declare function assertIs<T>(_arg: T): void;\nexport declare function assertNever(_x: never): never;\nexport declare function assert<T>(_: any): asserts _ is T;\nexport declare function getEnumValues(entries: EnumLike): EnumValue[];\nexport declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;\nexport declare function jsonStringifyReplacer(_: string, value: any): any;\nexport declare function cached<T>(getter: () => T): {\n value: T;\n};\nexport declare function nullish(input: any): boolean;\nexport declare function cleanRegex(source: string): string;\nexport declare function floatSafeRemainder(val: number, step: number): number;\nexport declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;\nexport declare function objectClone(obj: object): any;\nexport declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;\nexport declare function mergeDefs(...defs: Record<string, any>[]): any;\nexport declare function cloneDef(schema: schemas.$ZodType): any;\nexport declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;\nexport declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{\n [k in keyof T]: Awaited<T[k]>;\n}>;\nexport declare function randomString(length?: number): string;\nexport declare function esc(str: string): string;\nexport declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;\nexport declare function isObject(data: any): data is Record<PropertyKey, unknown>;\nexport declare const allowsEval: {\n value: boolean;\n};\nexport declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;\nexport declare function shallowClone(o: any): any;\nexport declare function numKeys(data: any): number;\nexport declare const getParsedType: (data: any) => ParsedTypes;\nexport declare const propertyKeyTypes: Set<string>;\nexport declare const primitiveTypes: Set<string>;\nexport declare function escapeRegex(str: string): string;\nexport declare function clone<T extends schemas.$ZodType>(inst: T, def?: T[\"_zod\"][\"def\"], params?: {\n parent: boolean;\n}): T;\nexport type EmptyToNever<T> = keyof T extends never ? never : T;\nexport type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{\n [k in keyof Omit<T, \"error\" | \"message\">]: T[k];\n} & (\"error\" extends keyof T ? {\n error?: Exclude<T[\"error\"], string>;\n} : unknown)> : never;\nexport declare function normalizeParams<T>(_params: T): Normalize<T>;\nexport declare function createTransparentProxy<T extends object>(getter: () => T): T;\nexport declare function stringifyPrimitive(value: any): string;\nexport declare function optionalKeys(shape: schemas.$ZodShape): string[];\nexport type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;\nexport type ToCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;\n};\nexport type FromCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;\n};\nexport declare const NUMBER_FORMAT_RANGES: Record<checks.$ZodNumberFormats, [number, number]>;\nexport declare const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, bigint]>;\nexport declare function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any;\nexport declare function omit(schema: schemas.$ZodObject, mask: object): any;\nexport declare function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function safeExtend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any;\nexport declare function partial(Class: SchemaClass<schemas.$ZodOptional> | null, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport declare function required(Class: SchemaClass<schemas.$ZodNonOptional>, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;\nexport declare function aborted(x: schemas.ParsePayload, startIndex?: number): boolean;\nexport declare function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIssue[]): errors.$ZodRawIssue[];\nexport declare function unwrapMessage(message: string | {\n message: string;\n} | undefined | null): string | undefined;\nexport declare function finalizeIssue(iss: errors.$ZodRawIssue, ctx: schemas.ParseContextInternal | undefined, config: $ZodConfig): errors.$ZodIssue;\nexport declare function getSizableOrigin(input: any): \"set\" | \"map\" | \"file\" | \"unknown\";\nexport declare function getLengthableOrigin(input: any): \"array\" | \"string\" | \"unknown\";\nexport declare function issue(_iss: string, input: any, inst: any): errors.$ZodRawIssue;\nexport declare function issue(_iss: errors.$ZodRawIssue): errors.$ZodRawIssue;\nexport declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];\nexport declare function base64ToUint8Array(base64: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64(bytes: Uint8Array): string;\nexport declare function base64urlToUint8Array(base64url: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64url(bytes: Uint8Array): string;\nexport declare function hexToUint8Array(hex: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToHex(bytes: Uint8Array): string;\nexport declare abstract class Class {\n constructor(..._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,CAtBuBO,EAAYhD,CAAAA;AAEjCgD,KAwBJe,OAAAA,GAxBIf,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,OAAAA,GAAAA,IAAAA,GAAAA,SAAAA;AAAMhD,KA0BViE,SAAAA,GA1BUjE,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,OAAAA,GAAAA,IAAAA,GAAAA,SAAAA;AAKMN,KA0BhB0E,SAAAA,GA1BgB1E;EAAYA,MAAAA,EAAAA,MAAAA;CAARgC;AAAO,KA6B3B2C,OAAAA,GA7B2B,MAAA,GAAA,MAAA,GA6BC9C,IA7BD;AAcU,KA2BrCmD,UAAAA,GAAahE,MA3BwB,CAAA,MAAA,EA2BTqB,GA3BS,CA2BLkC,SA3BK,CAAA,CAAA;AAKrCF,KAuBAY,YAAAA,GAAe5C,GAvBR,CAuBYkC,SAvBZ,CAAA;KAgEP8C,wBAAwBrH,0BAA0BA;uBA4ChCoK,KAAAA"}
|
|
1
|
+
{"version":3,"file":"util.d.ts","names":["checks","$ZodConfig","errors","schemas","JSONType","JWTAlgorithm","HashAlgorithm","HashEncoding","HashFormat","IPVersion","MimeTypes","ParsedTypes","AssertEqual","V","T","U","AssertNotEqual","AssertExtends","IsAny","Omit","K","Exclude","Pick","OmitKeys","MakePartial","InexactPartial","MakeRequired","Required","Exactly","X","Record","NoUndefined","Whatever","LoosePartial","Mask","Keys","PropertyKey","Writeable","P","EmptyObject","BuiltIn","Symbol","toStringTag","Date","Error","Generator","Promise","RegExp","MakeReadonly","Map","ReadonlyMap","Set","ReadonlySet","Head","Tail","Array","ReadonlyArray","Readonly","SomeObject","Identity","Flatten","k","Mapped","Prettify","NoNeverKeys","NoNever","Extend","A","B","TupleItems","SomeType","AnyFunc","IsProp","MaybeAsync","KeyOf","OmitIndexSignature","ExtractIndexSignature","SchemaClass","EnumValue","EnumLike","ToEnum","KeysEnum","KeysArray","Literal","LiteralArray","Primitive","PrimitiveArray","HasSize","HasLength","Numeric","SafeParseResult","SafeParseSuccess","SafeParseError","$ZodError","PropValues","PrimitiveSet","assertEqual","assertNotEqual","assertIs","assertNever","assert","getEnumValues","joinValues","jsonStringifyReplacer","cached","nullish","cleanRegex","floatSafeRemainder","defineLazy","objectClone","assignProp","mergeDefs","cloneDef","$ZodType","getElementAtPath","promiseAllObject","Awaited","randomString","esc","captureStackTrace","Function","isObject","allowsEval","isPlainObject","shallowClone","numKeys","getParsedType","propertyKeyTypes","primitiveTypes","escapeRegex","clone","EmptyToNever","Normalize","normalizeParams","createTransparentProxy","stringifyPrimitive","optionalKeys","$ZodShape","CleanKey","ToCleanMap","$ZodLooseShape","FromCleanMap","NUMBER_FORMAT_RANGES","$ZodNumberFormats","BIGINT_FORMAT_RANGES","$ZodBigIntFormats","pick","$ZodObject","omit","extend","safeExtend","merge","partial","$ZodOptional","required","$ZodNonOptional","Constructor","Def","aborted","ParsePayload","prefixIssues","$ZodRawIssue","unwrapMessage","finalizeIssue","ParseContextInternal","$ZodIssue","getSizableOrigin","getLengthableOrigin","issue","cleanEnum","base64ToUint8Array","Uint8Array","InstanceType","uint8ArrayToBase64","base64urlToUint8Array","uint8ArrayToBase64url","hexToUint8Array","uint8ArrayToHex","Class"],"sources":["../../../node_modules/zod/v4/core/util.d.cts"],"sourcesContent":["import type * as checks from \"./checks.cjs\";\nimport type { $ZodConfig } from \"./core.cjs\";\nimport type * as errors from \"./errors.cjs\";\nimport type * as schemas from \"./schemas.cjs\";\nexport type JSONType = string | number | boolean | null | JSONType[] | {\n [key: string]: JSONType;\n};\nexport type JWTAlgorithm = \"HS256\" | \"HS384\" | \"HS512\" | \"RS256\" | \"RS384\" | \"RS512\" | \"ES256\" | \"ES384\" | \"ES512\" | \"PS256\" | \"PS384\" | \"PS512\" | \"EdDSA\" | (string & {});\nexport type HashAlgorithm = \"md5\" | \"sha1\" | \"sha256\" | \"sha384\" | \"sha512\";\nexport type HashEncoding = \"hex\" | \"base64\" | \"base64url\";\nexport type HashFormat = `${HashAlgorithm}_${HashEncoding}`;\nexport type IPVersion = \"v4\" | \"v6\";\nexport type MimeTypes = \"application/json\" | \"application/xml\" | \"application/x-www-form-urlencoded\" | \"application/javascript\" | \"application/pdf\" | \"application/zip\" | \"application/vnd.ms-excel\" | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" | \"application/msword\" | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" | \"application/vnd.ms-powerpoint\" | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\" | \"application/octet-stream\" | \"application/graphql\" | \"text/html\" | \"text/plain\" | \"text/css\" | \"text/javascript\" | \"text/csv\" | \"image/png\" | \"image/jpeg\" | \"image/gif\" | \"image/svg+xml\" | \"image/webp\" | \"audio/mpeg\" | \"audio/ogg\" | \"audio/wav\" | \"audio/webm\" | \"video/mp4\" | \"video/webm\" | \"video/ogg\" | \"font/woff\" | \"font/woff2\" | \"font/ttf\" | \"font/otf\" | \"multipart/form-data\" | (string & {});\nexport type ParsedTypes = \"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"file\" | \"date\" | \"array\" | \"map\" | \"set\" | \"nan\" | \"null\" | \"promise\";\nexport type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;\nexport type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;\nexport type AssertExtends<T, U> = T extends U ? T : never;\nexport type IsAny<T> = 0 extends 1 & T ? true : false;\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\nexport type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;\nexport type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;\nexport type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;\nexport type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;\nexport type NoUndefined<T> = T extends undefined ? never : T;\nexport type Whatever = {} | undefined | null;\nexport type LoosePartial<T extends object> = InexactPartial<T> & {\n [k: string]: unknown;\n};\nexport type Mask<Keys extends PropertyKey> = {\n [K in Keys]?: true;\n};\nexport type Writeable<T> = {\n -readonly [P in keyof T]: T[P];\n} & {};\nexport type InexactPartial<T> = {\n [P in keyof T]?: T[P] | undefined;\n};\nexport type EmptyObject = Record<string, never>;\nexport type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {\n readonly [Symbol.toStringTag]: string;\n} | Date | Error | Generator | Promise<unknown> | RegExp;\nexport type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;\nexport type SomeObject = Record<PropertyKey, any>;\nexport type Identity<T> = T;\nexport type Flatten<T> = Identity<{\n [k in keyof T]: T[k];\n}>;\nexport type Mapped<T> = {\n [k in keyof T]: T[k];\n};\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\nexport type NoNeverKeys<T> = {\n [k in keyof T]: [T[k]] extends [never] ? never : k;\n}[keyof T];\nexport type NoNever<T> = Identity<{\n [k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;\n}>;\nexport type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : {\n [K in keyof A as K extends keyof B ? never : K]: A[K];\n} & {\n [K in keyof B]: B[K];\n}>;\nexport type TupleItems = ReadonlyArray<schemas.SomeType>;\nexport type AnyFunc = (...args: any[]) => any;\nexport type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;\nexport type MaybeAsync<T> = T | Promise<T>;\nexport type KeyOf<T> = keyof OmitIndexSignature<T>;\nexport type OmitIndexSignature<T> = {\n [K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];\n};\nexport type ExtractIndexSignature<T> = {\n [K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];\n};\nexport type Keys<T extends object> = keyof OmitIndexSignature<T>;\nexport type SchemaClass<T extends schemas.SomeType> = {\n new (def: T[\"_zod\"][\"def\"]): T;\n};\nexport type EnumValue = string | number;\nexport type EnumLike = Readonly<Record<string, EnumValue>>;\nexport type ToEnum<T extends EnumValue> = Flatten<{\n [k in T]: k;\n}>;\nexport type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;\nexport type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;\nexport type Literal = string | number | bigint | boolean | null | undefined;\nexport type LiteralArray = Array<Literal>;\nexport type Primitive = string | number | symbol | bigint | boolean | null | undefined;\nexport type PrimitiveArray = Array<Primitive>;\nexport type HasSize = {\n size: number;\n};\nexport type HasLength = {\n length: number;\n};\nexport type Numeric = number | bigint | Date;\nexport type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;\nexport type SafeParseSuccess<T> = {\n success: true;\n data: T;\n error?: never;\n};\nexport type SafeParseError<T> = {\n success: false;\n data?: never;\n error: errors.$ZodError<T>;\n};\nexport type PropValues = Record<string, Set<Primitive>>;\nexport type PrimitiveSet = Set<Primitive>;\nexport declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;\nexport declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;\nexport declare function assertIs<T>(_arg: T): void;\nexport declare function assertNever(_x: never): never;\nexport declare function assert<T>(_: any): asserts _ is T;\nexport declare function getEnumValues(entries: EnumLike): EnumValue[];\nexport declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;\nexport declare function jsonStringifyReplacer(_: string, value: any): any;\nexport declare function cached<T>(getter: () => T): {\n value: T;\n};\nexport declare function nullish(input: any): boolean;\nexport declare function cleanRegex(source: string): string;\nexport declare function floatSafeRemainder(val: number, step: number): number;\nexport declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;\nexport declare function objectClone(obj: object): any;\nexport declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;\nexport declare function mergeDefs(...defs: Record<string, any>[]): any;\nexport declare function cloneDef(schema: schemas.$ZodType): any;\nexport declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;\nexport declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{\n [k in keyof T]: Awaited<T[k]>;\n}>;\nexport declare function randomString(length?: number): string;\nexport declare function esc(str: string): string;\nexport declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;\nexport declare function isObject(data: any): data is Record<PropertyKey, unknown>;\nexport declare const allowsEval: {\n value: boolean;\n};\nexport declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;\nexport declare function shallowClone(o: any): any;\nexport declare function numKeys(data: any): number;\nexport declare const getParsedType: (data: any) => ParsedTypes;\nexport declare const propertyKeyTypes: Set<string>;\nexport declare const primitiveTypes: Set<string>;\nexport declare function escapeRegex(str: string): string;\nexport declare function clone<T extends schemas.$ZodType>(inst: T, def?: T[\"_zod\"][\"def\"], params?: {\n parent: boolean;\n}): T;\nexport type EmptyToNever<T> = keyof T extends never ? never : T;\nexport type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{\n [k in keyof Omit<T, \"error\" | \"message\">]: T[k];\n} & (\"error\" extends keyof T ? {\n error?: Exclude<T[\"error\"], string>;\n} : unknown)> : never;\nexport declare function normalizeParams<T>(_params: T): Normalize<T>;\nexport declare function createTransparentProxy<T extends object>(getter: () => T): T;\nexport declare function stringifyPrimitive(value: any): string;\nexport declare function optionalKeys(shape: schemas.$ZodShape): string[];\nexport type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;\nexport type ToCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;\n};\nexport type FromCleanMap<T extends schemas.$ZodLooseShape> = {\n [k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;\n};\nexport declare const NUMBER_FORMAT_RANGES: Record<checks.$ZodNumberFormats, [number, number]>;\nexport declare const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, bigint]>;\nexport declare function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any;\nexport declare function omit(schema: schemas.$ZodObject, mask: object): any;\nexport declare function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function safeExtend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;\nexport declare function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any;\nexport declare function partial(Class: SchemaClass<schemas.$ZodOptional> | null, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport declare function required(Class: SchemaClass<schemas.$ZodNonOptional>, schema: schemas.$ZodObject, mask: object | undefined): any;\nexport type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;\nexport declare function aborted(x: schemas.ParsePayload, startIndex?: number): boolean;\nexport declare function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIssue[]): errors.$ZodRawIssue[];\nexport declare function unwrapMessage(message: string | {\n message: string;\n} | undefined | null): string | undefined;\nexport declare function finalizeIssue(iss: errors.$ZodRawIssue, ctx: schemas.ParseContextInternal | undefined, config: $ZodConfig): errors.$ZodIssue;\nexport declare function getSizableOrigin(input: any): \"set\" | \"map\" | \"file\" | \"unknown\";\nexport declare function getLengthableOrigin(input: any): \"array\" | \"string\" | \"unknown\";\nexport declare function issue(_iss: string, input: any, inst: any): errors.$ZodRawIssue;\nexport declare function issue(_iss: errors.$ZodRawIssue): errors.$ZodRawIssue;\nexport declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];\nexport declare function base64ToUint8Array(base64: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64(bytes: Uint8Array): string;\nexport declare function base64urlToUint8Array(base64url: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToBase64url(bytes: Uint8Array): string;\nexport declare function hexToUint8Array(hex: string): InstanceType<typeof Uint8Array>;\nexport declare function uint8ArrayToHex(bytes: Uint8Array): string;\nexport declare abstract class Class {\n constructor(..._args: any[]);\n}\n"],"x_google_ignoreList":[0],"mappings":";;AAkBkEoB,KAXtDf,YAAAA,GAWsDe,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,OAAAA,GAAAA,CAAAA,MAAAA,GAAAA,CAAAA,CAAAA,CAAAA;AAEkBA,KAHxEF,KAGwEE,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,SAAAA,CAAAA,GAH/CN,CAG+CM,GAAAA,IAAAA,GAAAA,KAAAA;AAARE,KAFhEH,IAEgEG,CAAAA,CAAAA,EAAAA,YAAAA,MAFxCR,CAEwCQ,CAAAA,GAFnCA,IAEmCA,CAF9BR,CAE8BQ,EAF3BD,OAE2BC,CAAAA,MAFbR,CAEaQ,EAFVF,GAEUE,CAAAA,CAAAA;AAAD,KAA/DE,WAA+D,CAAA,CAAA,EAAA,YAAA,MAAhCV,CAAgC,CAAA,GAA3BK,IAA2B,CAAtBL,CAAsB,EAAnBM,GAAmB,CAAA,GAAdK,cAAc,CAACH,IAAD,CAAMR,CAAN,EAASM,GAAT,CAAA,CAAA;AAQ/Dc,KALAH,WAKII,CAAAA,CAAAA,CAAAA,GALarB,CAKCsB,SAAAA,SAChB,GAAA,KAAA,GAN6CtB,CAM7C;AAMEA,KAVJmB,YAUInB,CAAAA,UAAAA,MAAAA,CAAAA,GAV6BW,cAU7BX,CAV4CA,CAU5CA,CAAAA,GAAAA;EAAKA,CAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EAAAA,OAAAA;CAAEwB;AAAC,KAPZJ,IAOY,CAAA,aAP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+BW,SApB/BX,CAAAA,CAAAA;AAAK/C,KAqBT4D,MArBS5D,CAAAA,UAqBQ0D,SArBR1D,CAAAA,GAqBqBwC,OArBrBxC,CAAAA,QAsBXN,CAtB2BsD,GAsBvBP,CAtBuBO,EAAYhD,CAAAA;AAEjCgD,KAwBJe,OAAAA,GAxBIf,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,OAAAA,GAAAA,IAAAA,GAAAA,SAAAA;AAAMhD,KA0BViE,SAAAA,GA1BUjE,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,OAAAA,GAAAA,IAAAA,GAAAA,SAAAA;AAKMN,KA0BhB0E,SAAAA,GA1BgB1E;EAAYA,MAAAA,EAAAA,MAAAA;CAARgC;AAAO,KA6B3B2C,OAAAA,GA7B2B,MAAA,GAAA,MAAA,GA6BC9C,IA7BD;AAcU,KA2BrCmD,UAAAA,GAAahE,MA3BwB,CAAA,MAAA,EA2BTqB,GA3BS,CA2BLkC,SA3BK,CAAA,CAAA;AAKrCF,KAuBAY,YAAAA,GAAe5C,GAvBR,CAuBYkC,SAvBZ,CAAA;KAgEP8C,wBAAwBrH,0BAA0BA;uBA4ChCoK,KAAAA"}
|
package/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shouldDisplayConversation } from "./conversation.js";
|
|
2
2
|
import { PENDING_CONVERSATION_ID, generateShortPrimaryId } from "./id.js";
|
|
3
|
+
import { mergeRefs, useMergeRefs } from "./merge-refs.js";
|
|
3
4
|
import { useRenderElement } from "./use-render-element.js";
|
|
4
|
-
export { PENDING_CONVERSATION_ID, generateShortPrimaryId, shouldDisplayConversation, useRenderElement };
|
|
5
|
+
export { PENDING_CONVERSATION_ID, generateShortPrimaryId, mergeRefs, shouldDisplayConversation, useMergeRefs, useRenderElement };
|
package/utils/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { mergeRefs, useMergeRefs } from "./merge-refs.js";
|
|
1
2
|
import { useRenderElement } from "./use-render-element.js";
|
|
2
3
|
import { PENDING_CONVERSATION_ID, generateShortPrimaryId } from "./id.js";
|
|
3
4
|
import { shouldDisplayConversation } from "./conversation.js";
|
|
4
5
|
|
|
5
|
-
export { PENDING_CONVERSATION_ID, generateShortPrimaryId, shouldDisplayConversation, useRenderElement };
|
|
6
|
+
export { PENDING_CONVERSATION_ID, generateShortPrimaryId, mergeRefs, shouldDisplayConversation, useMergeRefs, useRenderElement };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/merge-refs.d.ts
|
|
4
|
+
type PossibleRef<T> = React$1.Ref<T> | React$1.RefCallback<T> | undefined | null;
|
|
5
|
+
/**
|
|
6
|
+
* Merges multiple refs into a single callback ref.
|
|
7
|
+
* Useful for forwarding refs to a component while also using a local ref.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const Component = forwardRef((props, forwardedRef) => {
|
|
11
|
+
* const localRef = useRef(null);
|
|
12
|
+
* const mergedRef = mergeRefs([forwardedRef, localRef]);
|
|
13
|
+
* return <div ref={mergedRef} />;
|
|
14
|
+
* });
|
|
15
|
+
*/
|
|
16
|
+
declare function mergeRefs<T>(refs: PossibleRef<T>[]): React$1.RefCallback<T> | null;
|
|
17
|
+
/**
|
|
18
|
+
* Hook version of mergeRefs that memoizes the result.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const Component = forwardRef((props, forwardedRef) => {
|
|
22
|
+
* const localRef = useRef(null);
|
|
23
|
+
* const mergedRef = useMergeRefs([forwardedRef, localRef]);
|
|
24
|
+
* return <div ref={mergedRef} />;
|
|
25
|
+
* });
|
|
26
|
+
*/
|
|
27
|
+
declare function useMergeRefs<T>(refs: PossibleRef<T>[]): React$1.RefCallback<T> | null;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { mergeRefs, useMergeRefs };
|
|
30
|
+
//# sourceMappingURL=merge-refs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-refs.d.ts","names":[],"sources":["../../src/utils/merge-refs.ts"],"sourcesContent":[],"mappings":";;;KAEK,iBAAiB,OAAA,CAAM,IAAI,KAAK,OAAA,CAAM,YAAY;;AAFxB;;;;;;AAe/B;;;;AAEG,iBAFa,SAEP,CAAA,CAAA,CAAA,CAAA,IAAA,EADF,WACE,CADU,CACV,CAAA,EAAA,CAAA,EAAN,OAAA,CAAM,WAAA,CAAY,CAAZ,CAAA,GAAA,IAAA;;AA2CT;;;;;;;;;iBAAgB,sBACT,YAAY,OAChB,OAAA,CAAM,YAAY"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/merge-refs.ts
|
|
4
|
+
/**
|
|
5
|
+
* Merges multiple refs into a single callback ref.
|
|
6
|
+
* Useful for forwarding refs to a component while also using a local ref.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const Component = forwardRef((props, forwardedRef) => {
|
|
10
|
+
* const localRef = useRef(null);
|
|
11
|
+
* const mergedRef = mergeRefs([forwardedRef, localRef]);
|
|
12
|
+
* return <div ref={mergedRef} />;
|
|
13
|
+
* });
|
|
14
|
+
*/
|
|
15
|
+
function mergeRefs(refs) {
|
|
16
|
+
const filteredRefs = refs.filter((ref) => ref != null);
|
|
17
|
+
if (filteredRefs.length === 0) return null;
|
|
18
|
+
if (filteredRefs.length === 1) {
|
|
19
|
+
const ref = filteredRefs[0];
|
|
20
|
+
if (typeof ref === "function") return ref;
|
|
21
|
+
return (instance) => {
|
|
22
|
+
ref.current = instance;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return (instance) => {
|
|
26
|
+
for (const ref of filteredRefs) if (typeof ref === "function") ref(instance);
|
|
27
|
+
else if (ref != null) ref.current = instance;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Hook version of mergeRefs that memoizes the result.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* const Component = forwardRef((props, forwardedRef) => {
|
|
35
|
+
* const localRef = useRef(null);
|
|
36
|
+
* const mergedRef = useMergeRefs([forwardedRef, localRef]);
|
|
37
|
+
* return <div ref={mergedRef} />;
|
|
38
|
+
* });
|
|
39
|
+
*/
|
|
40
|
+
function useMergeRefs(refs) {
|
|
41
|
+
return React$1.useMemo(() => mergeRefs(refs), refs);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { mergeRefs, useMergeRefs };
|
|
46
|
+
//# sourceMappingURL=merge-refs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-refs.js","names":["React"],"sources":["../../src/utils/merge-refs.ts"],"sourcesContent":["import * as React from \"react\";\n\ntype PossibleRef<T> = React.Ref<T> | React.RefCallback<T> | undefined | null;\n\n/**\n * Merges multiple refs into a single callback ref.\n * Useful for forwarding refs to a component while also using a local ref.\n *\n * @example\n * const Component = forwardRef((props, forwardedRef) => {\n * const localRef = useRef(null);\n * const mergedRef = mergeRefs([forwardedRef, localRef]);\n * return <div ref={mergedRef} />;\n * });\n */\nexport function mergeRefs<T>(\n\trefs: PossibleRef<T>[]\n): React.RefCallback<T> | null {\n\t// Filter out null/undefined refs\n\tconst filteredRefs = refs.filter(\n\t\t(ref): ref is NonNullable<PossibleRef<T>> => ref != null\n\t);\n\n\tif (filteredRefs.length === 0) {\n\t\treturn null;\n\t}\n\n\tif (filteredRefs.length === 1) {\n\t\tconst ref = filteredRefs[0];\n\t\t// If it's already a callback, return it directly\n\t\tif (typeof ref === \"function\") {\n\t\t\treturn ref;\n\t\t}\n\t\t// If it's a RefObject, wrap it in a callback\n\t\treturn (instance) => {\n\t\t\t(ref as React.MutableRefObject<T | null>).current = instance;\n\t\t};\n\t}\n\n\treturn (instance) => {\n\t\tfor (const ref of filteredRefs) {\n\t\t\tif (typeof ref === \"function\") {\n\t\t\t\tref(instance);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as React.MutableRefObject<T | null>).current = instance;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Hook version of mergeRefs that memoizes the result.\n *\n * @example\n * const Component = forwardRef((props, forwardedRef) => {\n * const localRef = useRef(null);\n * const mergedRef = useMergeRefs([forwardedRef, localRef]);\n * return <div ref={mergedRef} />;\n * });\n */\nexport function useMergeRefs<T>(\n\trefs: PossibleRef<T>[]\n): React.RefCallback<T> | null {\n\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\treturn React.useMemo(() => mergeRefs(refs), refs);\n}\n"],"mappings":";;;;;;;;;;;;;;AAeA,SAAgB,UACf,MAC8B;CAE9B,MAAM,eAAe,KAAK,QACxB,QAA4C,OAAO,KACpD;AAED,KAAI,aAAa,WAAW,EAC3B,QAAO;AAGR,KAAI,aAAa,WAAW,GAAG;EAC9B,MAAM,MAAM,aAAa;AAEzB,MAAI,OAAO,QAAQ,WAClB,QAAO;AAGR,UAAQ,aAAa;AACpB,GAAC,IAAyC,UAAU;;;AAItD,SAAQ,aAAa;AACpB,OAAK,MAAM,OAAO,aACjB,KAAI,OAAO,QAAQ,WAClB,KAAI,SAAS;WACH,OAAO,KACjB,CAAC,IAAyC,UAAU;;;;;;;;;;;;;AAgBxD,SAAgB,aACf,MAC8B;AAE9B,QAAOA,QAAM,cAAc,UAAU,KAAK,EAAE,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-render-element.d.ts","names":[],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":[],"mappings":";;;;AAI+B,
|
|
1
|
+
{"version":3,"file":"use-render-element.d.ts","names":[],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":[],"mappings":";;;;AAI+B,KAG1B,YAAA,GAAY,MAAS,GAAA,CAAI,iBAAA;AAAiB,KAE1C,SAAA,CAAA,KAAS,CAAA,GAAA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
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Slot component that properly forwards refs when using asChild pattern.
|
|
8
|
+
* Uses forwardRef to receive the ref and merges it with any existing ref on the child.
|
|
9
|
+
*/
|
|
10
|
+
const Slot = React$1.forwardRef(({ children,...props }, forwardedRef) => {
|
|
11
|
+
const childRef = children.ref;
|
|
12
|
+
const mergedRef = mergeRefs([forwardedRef, childRef]);
|
|
6
13
|
return React$1.cloneElement(children, {
|
|
7
14
|
...props,
|
|
15
|
+
ref: mergedRef,
|
|
8
16
|
className: [children.props.className, props.className].filter(Boolean).join(" ")
|
|
9
17
|
});
|
|
10
|
-
}
|
|
18
|
+
});
|
|
11
19
|
/**
|
|
12
20
|
* Utility hook to support slot-style component overrides.
|
|
13
21
|
*/
|
|
@@ -16,9 +24,10 @@ function useRenderElement(tag, componentProps, params) {
|
|
|
16
24
|
const { state = {}, ref, props = {}, enabled = true } = params || {};
|
|
17
25
|
if (!enabled) return null;
|
|
18
26
|
const computedClassName = typeof classNameProp === "function" ? classNameProp(state) : classNameProp;
|
|
27
|
+
const propsWithClassName = props;
|
|
19
28
|
const mergedProps = {
|
|
20
29
|
...props,
|
|
21
|
-
className: [
|
|
30
|
+
className: [propsWithClassName.className, computedClassName].filter(Boolean).join(" "),
|
|
22
31
|
ref
|
|
23
32
|
};
|
|
24
33
|
if (typeof render === "function") return render(mergedProps, state);
|
|
@@ -26,10 +35,14 @@ function useRenderElement(tag, componentProps, params) {
|
|
|
26
35
|
...mergedProps,
|
|
27
36
|
ref: render.ref || ref
|
|
28
37
|
});
|
|
29
|
-
if (asChild && React$1.isValidElement(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
if (asChild && React$1.isValidElement(propsWithClassName.children)) {
|
|
39
|
+
const { ref: slotRef,...restMergedProps } = mergedProps;
|
|
40
|
+
return /* @__PURE__ */ jsx(Slot, {
|
|
41
|
+
ref: slotRef,
|
|
42
|
+
...restMergedProps,
|
|
43
|
+
children: propsWithClassName.children
|
|
44
|
+
});
|
|
45
|
+
}
|
|
33
46
|
return React$1.createElement(tag, mergedProps);
|
|
34
47
|
}
|
|
35
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-render-element.js","names":["React"],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: works well here */\n/** biome-ignore-all lint/nursery/noUnnecessaryConditions: ok */\n\nimport type { JSX } from \"react\";\nimport * as React from \"react\";\n\ntype IntrinsicTag = keyof JSX.IntrinsicElements;\n\ntype ClassName<State> = string | ((state: State) => string);\n\ntype RenderFn<Props, State> = (\n\tprops: Props,\n\tstate: State\n) => React.ReactElement;\n\ntype RenderProps<State, Tag extends IntrinsicTag> = {\n\trender?: React.ReactElement | RenderFn<JSX.IntrinsicElements[Tag], State>;\n\tclassName?: ClassName<State>;\n\tasChild?: boolean;\n};\n\ntype RenderParams<State, Tag extends IntrinsicTag> = {\n\tstate?: State;\n\tref?: React.Ref<any>;\n\tprops?: Partial<JSX.IntrinsicElements[Tag]>;\n\tenabled?: boolean;\n};\n\
|
|
1
|
+
{"version":3,"file":"use-render-element.js","names":["React"],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: works well here */\n/** biome-ignore-all lint/nursery/noUnnecessaryConditions: ok */\n\nimport type { JSX } from \"react\";\nimport * as React from \"react\";\nimport { mergeRefs } from \"./merge-refs\";\n\ntype IntrinsicTag = keyof JSX.IntrinsicElements;\n\ntype ClassName<State> = string | ((state: State) => string);\n\ntype RenderFn<Props, State> = (\n\tprops: Props,\n\tstate: State\n) => React.ReactElement;\n\ntype RenderProps<State, Tag extends IntrinsicTag> = {\n\trender?: React.ReactElement | RenderFn<JSX.IntrinsicElements[Tag], State>;\n\tclassName?: ClassName<State>;\n\tasChild?: boolean;\n};\n\ntype RenderParams<State, Tag extends IntrinsicTag> = {\n\tstate?: State;\n\tref?: React.Ref<any>;\n\tprops?: Partial<JSX.IntrinsicElements[Tag]>;\n\tenabled?: boolean;\n};\n\ntype SlotProps = {\n\tchildren: React.ReactElement;\n\t[key: string]: any;\n};\n\n/**\n * Slot component that properly forwards refs when using asChild pattern.\n * Uses forwardRef to receive the ref and merges it with any existing ref on the child.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>(\n\t({ children, ...props }, forwardedRef) => {\n\t\t// Get the child's existing ref (if any)\n\t\tconst childRef = (children as any).ref;\n\n\t\t// Merge the forwarded ref with the child's ref\n\t\tconst mergedRef = mergeRefs([forwardedRef, childRef]);\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...props,\n\t\t\tref: mergedRef,\n\t\t\tclassName: [(children.props as any).className, props.className]\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(\" \"),\n\t\t} as any);\n\t}\n);\n\n/**\n * Utility hook to support slot-style component overrides.\n */\nexport function useRenderElement<\n\tState extends Record<string, any>,\n\tTag extends IntrinsicTag,\n>(\n\ttag: Tag,\n\tcomponentProps: RenderProps<State, Tag>,\n\tparams?: RenderParams<State, Tag>\n): React.ReactElement | null {\n\tconst { render, className: classNameProp, asChild = false } = componentProps;\n\n\tconst {\n\t\tstate = {} as State,\n\t\tref,\n\t\tprops = {} as Partial<JSX.IntrinsicElements[Tag]>,\n\t\tenabled = true,\n\t} = params || {};\n\n\tif (!enabled) {\n\t\treturn null;\n\t}\n\n\tconst computedClassName =\n\t\ttypeof classNameProp === \"function\" ? classNameProp(state) : classNameProp;\n\n\tconst propsWithClassName = props as {\n\t\tclassName?: string;\n\t\tchildren?: React.ReactNode;\n\t};\n\tconst mergedProps = {\n\t\t...props,\n\t\tclassName: [propsWithClassName.className, computedClassName]\n\t\t\t.filter(Boolean)\n\t\t\t.join(\" \"),\n\t\tref,\n\t};\n\n\tif (typeof render === \"function\") {\n\t\treturn render(mergedProps as JSX.IntrinsicElements[Tag], state);\n\t}\n\n\tif (React.isValidElement(render)) {\n\t\treturn React.cloneElement(render, {\n\t\t\t...mergedProps,\n\t\t\tref: (render as any).ref || ref,\n\t\t});\n\t}\n\n\tif (asChild && React.isValidElement(propsWithClassName.children)) {\n\t\t// Extract ref to pass explicitly to the forwardRef Slot component\n\t\t// React extracts ref from spread props, so we must pass it separately\n\t\tconst { ref: slotRef, ...restMergedProps } = mergedProps;\n\t\treturn (\n\t\t\t<Slot ref={slotRef} {...restMergedProps}>\n\t\t\t\t{propsWithClassName.children}\n\t\t\t</Slot>\n\t\t);\n\t}\n\n\treturn React.createElement(tag, mergedProps as any);\n}\n"],"mappings":";;;;;;;;;AAsCA,MAAM,OAAOA,QAAM,YACjB,EAAE,SAAU,GAAG,SAAS,iBAAiB;CAEzC,MAAM,WAAY,SAAiB;CAGnC,MAAM,YAAY,UAAU,CAAC,cAAc,SAAS,CAAC;AAErD,QAAOA,QAAM,aAAa,UAAU;EACnC,GAAG;EACH,KAAK;EACL,WAAW,CAAE,SAAS,MAAc,WAAW,MAAM,UAAU,CAC7D,OAAO,QAAQ,CACf,KAAK,IAAI;EACX,CAAQ;EAEV;;;;AAKD,SAAgB,iBAIf,KACA,gBACA,QAC4B;CAC5B,MAAM,EAAE,QAAQ,WAAW,eAAe,UAAU,UAAU;CAE9D,MAAM,EACL,QAAQ,EAAE,EACV,KACA,QAAQ,EAAE,EACV,UAAU,SACP,UAAU,EAAE;AAEhB,KAAI,CAAC,QACJ,QAAO;CAGR,MAAM,oBACL,OAAO,kBAAkB,aAAa,cAAc,MAAM,GAAG;CAE9D,MAAM,qBAAqB;CAI3B,MAAM,cAAc;EACnB,GAAG;EACH,WAAW,CAAC,mBAAmB,WAAW,kBAAkB,CAC1D,OAAO,QAAQ,CACf,KAAK,IAAI;EACX;EACA;AAED,KAAI,OAAO,WAAW,WACrB,QAAO,OAAO,aAA2C,MAAM;AAGhE,KAAIA,QAAM,eAAe,OAAO,CAC/B,QAAOA,QAAM,aAAa,QAAQ;EACjC,GAAG;EACH,KAAM,OAAe,OAAO;EAC5B,CAAC;AAGH,KAAI,WAAWA,QAAM,eAAe,mBAAmB,SAAS,EAAE;EAGjE,MAAM,EAAE,KAAK,QAAS,GAAG,oBAAoB;AAC7C,SACC,oBAAC;GAAK,KAAK;GAAS,GAAI;aACtB,mBAAmB;IACd;;AAIT,QAAOA,QAAM,cAAc,KAAK,YAAmB"}
|
package/versions.d.ts
CHANGED
package/versions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","names":["version"],"sources":["../../../node_modules
|
|
1
|
+
{"version":3,"file":"versions.d.ts","names":["version"],"sources":["../../../node_modules/zod/v4/core/versions.d.cts"],"sourcesContent":["export declare const version: {\n readonly major: 4;\n readonly minor: 1;\n readonly patch: number;\n};\n"],"x_google_ignoreList":[0],"mappings":";cAAqBA;EAAAA,SAAAA,KAIpB,EAAA,CAAA"}
|
package/zod-extensions.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ParameterObject, SchemaObject } from "./openapi30.js";
|
|
|
2
2
|
import { ParameterObject as ParameterObject$1, SchemaObject as SchemaObject$1 } from "./openapi31.js";
|
|
3
3
|
import { $ZodType, $ZodTypeInternals } from "./schemas.js";
|
|
4
4
|
|
|
5
|
-
//#region ../../node_modules
|
|
5
|
+
//#region ../../node_modules/@asteasolutions/zod-to-openapi/dist/zod-extensions.d.ts
|
|
6
6
|
type ExampleValue<T> = T extends Date ? string : T;
|
|
7
7
|
type ParameterObject$2 = ParameterObject | ParameterObject$1;
|
|
8
8
|
type SchemaObject$2 = SchemaObject | SchemaObject$1;
|
package/zod-extensions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-extensions.d.ts","names":["ParameterObject","ParameterObject30","SchemaObject","SchemaObject30","ParameterObject31","SchemaObject31","ZodObject","z","core","ExampleValue","T","Date","UnionPreferredType","ZodOpenAPIMetadata","E","Omit","Partial","OpenApiOptions","InternalUserOnlyZodOpenAPIInternalMetadata","ZodOpenApiFullMetadataForRegistry","ZodOpenAPIInternalMetadata","ZodOpenApiFullMetadata","_0","Output","Input","Internals","$ZodTypeInternals","$ZodType","sideEffect","extendZodWithOpenApi"],"sources":["../../../node_modules
|
|
1
|
+
{"version":3,"file":"zod-extensions.d.ts","names":["ParameterObject","ParameterObject30","SchemaObject","SchemaObject30","ParameterObject31","SchemaObject31","ZodObject","z","core","ExampleValue","T","Date","UnionPreferredType","ZodOpenAPIMetadata","E","Omit","Partial","OpenApiOptions","InternalUserOnlyZodOpenAPIInternalMetadata","ZodOpenApiFullMetadataForRegistry","ZodOpenAPIInternalMetadata","ZodOpenApiFullMetadata","_0","Output","Input","Internals","$ZodTypeInternals","$ZodType","sideEffect","extendZodWithOpenApi"],"sources":["../../../node_modules/@asteasolutions/zod-to-openapi/dist/zod-extensions.d.ts"],"sourcesContent":["import { ParameterObject as ParameterObject30, SchemaObject as SchemaObject30 } from 'openapi3-ts/oas30';\nimport { ParameterObject as ParameterObject31, SchemaObject as SchemaObject31 } from 'openapi3-ts/oas31';\nimport type { ZodObject } from 'zod';\nimport { z } from 'zod';\nimport type { core } from 'zod';\ntype ExampleValue<T> = T extends Date ? string : T;\ntype ParameterObject = ParameterObject30 | ParameterObject31;\ntype SchemaObject = SchemaObject30 | SchemaObject31;\nexport type UnionPreferredType = 'oneOf' | 'anyOf';\nexport type ZodOpenAPIMetadata<T = any, E = ExampleValue<T>> = Omit<SchemaObject, 'example' | 'examples' | 'default'> & {\n param?: Partial<ParameterObject> & {\n example?: E;\n };\n example?: E;\n examples?: E[];\n default?: T;\n _internal?: never;\n};\ninterface OpenApiOptions {\n unionPreferredType?: UnionPreferredType;\n}\n/**\n *\n * Since this commit https://github.com/colinhacks/zod/commit/6707ebb14c885b1c577ce64a240475e26e3ff182\n * zod started preserving metadata from functions. Since the ZodObject type contains some function types\n * that also have generics this leads to a too deep type instantiation. We only use this type internally\n * so I've opted to type the _internal metadata in the registry as any. However the Metadata.getInternalMetadata\n * method has an explicit return type of ZodOpenAPIInternalMetadata.\n */\ninterface InternalUserOnlyZodOpenAPIInternalMetadata extends OpenApiOptions {\n refId?: string;\n extendedFrom?: {\n refId: string;\n schema: any;\n };\n}\n/**\n *\n * The metadata that is received from the registry should be obtained using the Metadata methods that have an\n * explicit return type of ZodOpenApiFullMetadata or ZodOpenAPIInternalMetadata.\n *\n * @deprecated Do not use for anything other than the registry. See the comment above for more details.\n */\nexport interface ZodOpenApiFullMetadataForRegistry<T = any> extends Omit<ZodOpenAPIMetadata<T>, '_internal'> {\n _internal?: InternalUserOnlyZodOpenAPIInternalMetadata;\n [k: string]: unknown;\n}\nexport interface ZodOpenAPIInternalMetadata extends InternalUserOnlyZodOpenAPIInternalMetadata {\n extendedFrom?: {\n refId: string;\n schema: ZodObject;\n };\n}\nexport interface ZodOpenApiFullMetadata<T = any> extends ZodOpenApiFullMetadataForRegistry<T> {\n _internal?: ZodOpenAPIInternalMetadata;\n}\ndeclare module 'zod' {\n interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {\n openapi(metadata: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;\n openapi(refId: string, metadata?: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;\n }\n}\nexport declare function extendZodWithOpenApi(zod: typeof z): void;\nexport {};\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAIgC,KAC3BS,YAAAA,CAAAA,CAAY,CAAA,GAAMC,CAAN,SAAgBC,IAAhB,GAAA,MAAA,GAAgCD,CAAhC;KACZV,iBAAAA,GAAkBC,eADAS,GACoBN,iBADpBM;KAElBR,cAAAA,GAAeC,YAFaQ,GAEIN,cAFJM;AAAgBD,KAGrCE,kBAAAA,GAHqCF,OAAAA,GAAAA,OAAAA;AAAC,KAItCG,kBAJsC,CAAA,IAAA,GAAA,EAAA,IAINJ,YAJM,CAIOC,CAJP,CAAA,CAAA,GAIaK,IAJb,CAIkBb,cAJlB,EAAA,SAAA,GAAA,UAAA,GAAA,SAAA,CAAA,GAAA;EAC7CF,KAAAA,CAAAA,EAIOgB,OAJPhB,CAIeA,iBAJA,CAAA,GAAGC;IAClBC,OAAAA,CAAAA,EAIaY,CAJbZ;EACOU,CAAAA;EACAC,OAAAA,CAAAA,EAIEC,CAJFD;EAA6CH,QAAAA,CAAAA,EAK1CI,CAL0CJ,EAAAA;EAAbD,OAAAA,CAAAA,EAM9BC,CAN8BD;EAAwBP,SAAAA,CAAAA,EAAAA,KAAAA;CAALa;UASrDE,cAAAA,CARUjB;EAARgB,kBAAAA,CAAAA,EASaJ,kBATbI;;;;;;AAOV;AAsCD;;;;;qFAEsFR,kBAAuBe,QAAQC,SAAShB,kBAAuBe,QAAQC,gBAAgBhB,SAAce,QAAQC,OAAOC;sBACjLT,QAAQH,mBAAmBW,mBAAmBP;sCAC9BD,QAAQH,mBAAmBW,mBAAmBP"}
|
package/primitives/bubble.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as React$1 from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/primitives/bubble.d.ts
|
|
4
|
-
type SupportBubbleProps = Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
|
|
5
|
-
children?: React$1.ReactNode | ((props: {
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
unreadCount: number;
|
|
8
|
-
isTyping: boolean;
|
|
9
|
-
toggle: () => void;
|
|
10
|
-
}) => React$1.ReactNode);
|
|
11
|
-
asChild?: boolean;
|
|
12
|
-
className?: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Floating action button that toggles the support window.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* <Bubble>
|
|
19
|
-
* {({ isOpen, unreadCount, toggle }) => (
|
|
20
|
-
* <button onClick={toggle}>
|
|
21
|
-
* {isOpen ? "×" : "💬"} {unreadCount > 0 && `(${unreadCount})`}
|
|
22
|
-
* </button>
|
|
23
|
-
* )}
|
|
24
|
-
* </Bubble>
|
|
25
|
-
*/
|
|
26
|
-
declare const SupportBubble: React$1.ForwardRefExoticComponent<Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
|
|
27
|
-
children?: React$1.ReactNode | ((props: {
|
|
28
|
-
isOpen: boolean;
|
|
29
|
-
unreadCount: number;
|
|
30
|
-
isTyping: boolean;
|
|
31
|
-
toggle: () => void;
|
|
32
|
-
}) => React$1.ReactNode);
|
|
33
|
-
asChild?: boolean;
|
|
34
|
-
className?: string;
|
|
35
|
-
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
36
|
-
//#endregion
|
|
37
|
-
export { SupportBubble, SupportBubbleProps };
|
|
38
|
-
//# sourceMappingURL=bubble.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bubble.d.ts","names":[],"sources":["../../src/primitives/bubble.tsx"],"sourcesContent":[],"mappings":";;;KAMY,kBAAA,GAAqB,KAChC,OAAA,CAAM,qBAAqB;aAIxB,OAAA,CAAM;IALE,MAAA,EAAA,OAAA;IACgB,WAAA,EAAA,MAAA;IAA3B,QAAM,EAAA,OAAA;IAD0B,MAAA,EAAA,GAAA,GAAA,IAAA;EAK7B,CAAA,EAAA,GAMM,OAAA,CAAM,SANN,CAAA;EAMA,OAAM,CAAA,EAAA,OAAA;EAAS,SAAA,CAAA,EAAA,MAAA;AAiBzB,CAAA;;;;;;;;;;;;;cAAa,eAAa,OAAA,CAAA,0BAAA,KAAA,OAAA,CAAA,qBAAA;aAvBtB,OAAA,CAAM;;;;;QAMA,OAAA,CAAM"}
|
package/primitives/bubble.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { useTypingStore } from "../realtime/typing-store.js";
|
|
2
|
-
import { useRenderElement } from "../utils/use-render-element.js";
|
|
3
|
-
import { useSupportConfig } from "../support/store/support-store.js";
|
|
4
|
-
import { useSupport } from "../provider.js";
|
|
5
|
-
import * as React$1 from "react";
|
|
6
|
-
|
|
7
|
-
//#region src/primitives/bubble.tsx
|
|
8
|
-
/**
|
|
9
|
-
* Floating action button that toggles the support window.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* <Bubble>
|
|
13
|
-
* {({ isOpen, unreadCount, toggle }) => (
|
|
14
|
-
* <button onClick={toggle}>
|
|
15
|
-
* {isOpen ? "×" : "💬"} {unreadCount > 0 && `(${unreadCount})`}
|
|
16
|
-
* </button>
|
|
17
|
-
* )}
|
|
18
|
-
* </Bubble>
|
|
19
|
-
*/
|
|
20
|
-
const SupportBubble = (() => {
|
|
21
|
-
const Component = React$1.forwardRef(({ children, className, asChild = false,...props }, ref) => {
|
|
22
|
-
const { isOpen, toggle } = useSupportConfig();
|
|
23
|
-
const { unreadCount, visitor } = useSupport();
|
|
24
|
-
const visitorId = visitor?.id ?? null;
|
|
25
|
-
const renderProps = {
|
|
26
|
-
isOpen,
|
|
27
|
-
unreadCount,
|
|
28
|
-
isTyping: useTypingStore(React$1.useCallback((state) => Object.values(state.conversations).some((entries) => Object.values(entries).some((entry) => {
|
|
29
|
-
if (visitorId && entry.actorType === "visitor" && entry.actorId === visitorId) return false;
|
|
30
|
-
return true;
|
|
31
|
-
})), [visitorId])),
|
|
32
|
-
toggle
|
|
33
|
-
};
|
|
34
|
-
const content = typeof children === "function" ? children(renderProps) : children;
|
|
35
|
-
return useRenderElement("button", {
|
|
36
|
-
asChild,
|
|
37
|
-
className
|
|
38
|
-
}, {
|
|
39
|
-
ref,
|
|
40
|
-
state: renderProps,
|
|
41
|
-
props: {
|
|
42
|
-
type: "button",
|
|
43
|
-
"aria-haspopup": "dialog",
|
|
44
|
-
"aria-expanded": isOpen,
|
|
45
|
-
onClick: toggle,
|
|
46
|
-
...props,
|
|
47
|
-
children: content
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
Component.displayName = "SupportBubble";
|
|
52
|
-
return Component;
|
|
53
|
-
})();
|
|
54
|
-
|
|
55
|
-
//#endregion
|
|
56
|
-
export { SupportBubble };
|
|
57
|
-
//# sourceMappingURL=bubble.js.map
|
package/primitives/bubble.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bubble.js","names":["React"],"sources":["../../src/primitives/bubble.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { useSupport } from \"../provider\";\nimport { useTypingStore } from \"../realtime/typing-store\";\nimport { useSupportConfig } from \"../support\";\nimport { useRenderElement } from \"../utils/use-render-element\";\n\nexport type SupportBubbleProps = Omit<\n\tReact.ButtonHTMLAttributes<HTMLButtonElement>,\n\t\"children\"\n> & {\n\tchildren?:\n\t\t| React.ReactNode\n\t\t| ((props: {\n\t\t\t\tisOpen: boolean;\n\t\t\t\tunreadCount: number;\n\t\t\t\tisTyping: boolean;\n\t\t\t\ttoggle: () => void;\n\t\t }) => React.ReactNode);\n\tasChild?: boolean;\n\tclassName?: string;\n};\n\n/**\n * Floating action button that toggles the support window.\n *\n * @example\n * <Bubble>\n * {({ isOpen, unreadCount, toggle }) => (\n * <button onClick={toggle}>\n * {isOpen ? \"×\" : \"💬\"} {unreadCount > 0 && `(${unreadCount})`}\n * </button>\n * )}\n * </Bubble>\n */\nexport const SupportBubble = (() => {\n\tconst Component = React.forwardRef<HTMLButtonElement, SupportBubbleProps>(\n\t\t({ children, className, asChild = false, ...props }, ref) => {\n\t\t\tconst { isOpen, toggle } = useSupportConfig();\n\t\t\tconst { unreadCount, visitor } = useSupport();\n\t\t\tconst visitorId = visitor?.id ?? null;\n\n\t\t\tconst hasTyping = useTypingStore(\n\t\t\t\tReact.useCallback(\n\t\t\t\t\t(state) =>\n\t\t\t\t\t\tObject.values(state.conversations).some((entries) =>\n\t\t\t\t\t\t\tObject.values(entries).some((entry) => {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tvisitorId &&\n\t\t\t\t\t\t\t\t\tentry.actorType === \"visitor\" &&\n\t\t\t\t\t\t\t\t\tentry.actorId === visitorId\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t),\n\t\t\t\t\t[visitorId]\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tconst renderProps = {\n\t\t\t\tisOpen,\n\t\t\t\tunreadCount,\n\t\t\t\tisTyping: hasTyping,\n\t\t\t\ttoggle,\n\t\t\t};\n\n\t\t\tconst content =\n\t\t\t\ttypeof children === \"function\" ? children(renderProps) : children;\n\n\t\t\treturn useRenderElement(\n\t\t\t\t\"button\",\n\t\t\t\t{\n\t\t\t\t\tasChild,\n\t\t\t\t\tclassName,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tref,\n\t\t\t\t\tstate: renderProps,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\"aria-haspopup\": \"dialog\",\n\t\t\t\t\t\t\"aria-expanded\": isOpen,\n\t\t\t\t\t\tonClick: toggle,\n\t\t\t\t\t\t...props,\n\t\t\t\t\t\tchildren: content,\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t);\n\n\tComponent.displayName = \"SupportBubble\";\n\treturn Component;\n})();\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkCA,MAAa,uBAAuB;CACnC,MAAM,YAAYA,QAAM,YACtB,EAAE,UAAU,WAAW,UAAU,MAAO,GAAG,SAAS,QAAQ;EAC5D,MAAM,EAAE,QAAQ,WAAW,kBAAkB;EAC7C,MAAM,EAAE,aAAa,YAAY,YAAY;EAC7C,MAAM,YAAY,SAAS,MAAM;EAsBjC,MAAM,cAAc;GACnB;GACA;GACA,UAvBiB,eACjBA,QAAM,aACJ,UACA,OAAO,OAAO,MAAM,cAAc,CAAC,MAAM,YACxC,OAAO,OAAO,QAAQ,CAAC,MAAM,UAAU;AACtC,QACC,aACA,MAAM,cAAc,aACpB,MAAM,YAAY,UAElB,QAAO;AAGR,WAAO;KACN,CACF,EACF,CAAC,UAAU,CACX,CACD;GAMA;GACA;EAED,MAAM,UACL,OAAO,aAAa,aAAa,SAAS,YAAY,GAAG;AAE1D,SAAO,iBACN,UACA;GACC;GACA;GACA,EACD;GACC;GACA,OAAO;GACP,OAAO;IACN,MAAM;IACN,iBAAiB;IACjB,iBAAiB;IACjB,SAAS;IACT,GAAG;IACH,UAAU;IACV;GACD,CACD;GAEF;AAED,WAAU,cAAc;AACxB,QAAO;IACJ"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/support/components/bubble.d.ts
|
|
4
|
-
type BubbleProps = {
|
|
5
|
-
className?: string;
|
|
6
|
-
};
|
|
7
|
-
declare const Bubble: React.FC<BubbleProps>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { Bubble, BubbleProps };
|
|
10
|
-
//# sourceMappingURL=bubble.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bubble.d.ts","names":[],"sources":["../../../src/support/components/bubble.tsx"],"sourcesContent":[],"mappings":";;;KAgIY,WAAA;;AAAZ,CAAA;AAIa,cAAA,MAAiB,EAAT,KAAA,CAAM,EAAG,CAAA,WAAD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bubble.js","names":["BubbleContent: React.FC<BubbleContentProps>","Icon","Bubble: React.FC<BubbleProps>","Primitive.Bubble"],"sources":["../../../src/support/components/bubble.tsx"],"sourcesContent":["\"use client\";\n\nimport { AnimatePresence, motion } from \"motion/react\";\nimport type React from \"react\";\nimport { useEffect, useRef } from \"react\";\nimport { useNewMessageSound } from \"../../hooks/use-new-message-sound\";\nimport { useTypingSound } from \"../../hooks/use-typing-sound\";\nimport * as Primitive from \"../../primitives\";\nimport { cn } from \"../utils\";\nimport Icon from \"./icons\";\nimport { BouncingDots } from \"./typing-indicator\";\n\ntype BubbleContentProps = {\n\tisOpen: boolean;\n\tunreadCount: number;\n\tisTyping: boolean;\n};\n\nconst BubbleContent: React.FC<BubbleContentProps> = ({\n\tisOpen,\n\tunreadCount,\n\tisTyping,\n}) => {\n\t// Customize playback settings here:\n\t// - volume: 0.0 to 1.0+ (default varies by sound)\n\t// - playbackRate: 0.5 to 2.0 (1.0 is normal speed, higher = faster)\n\tconst playNewMessageSound = useNewMessageSound({\n\t\tvolume: 0.7,\n\t\tplaybackRate: 1.0,\n\t});\n\tconst previousUnreadCountRef = useRef(0);\n\n\t// Play typing sound when widget is closed and someone is typing\n\tuseTypingSound(!isOpen && isTyping, {\n\t\tvolume: 1,\n\t\tplaybackRate: 1.3,\n\t});\n\n\t// Play new message sound when unread count increases\n\tuseEffect(() => {\n\t\tif (unreadCount > previousUnreadCountRef.current) {\n\t\t\tplayNewMessageSound();\n\t\t}\n\t\tpreviousUnreadCountRef.current = unreadCount;\n\t}, [unreadCount, playNewMessageSound]);\n\n\treturn (\n\t\t<>\n\t\t\t<AnimatePresence mode=\"wait\">\n\t\t\t\t{isOpen ? (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tanimate={{\n\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\trotate: 0,\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransition: { duration: 0.2, ease: \"easeOut\" },\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName=\"flex items-center justify-center\"\n\t\t\t\t\t\texit={{\n\t\t\t\t\t\t\tscale: 0.9,\n\t\t\t\t\t\t\trotate: -45,\n\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\ttransition: { duration: 0.1, ease: \"easeIn\" },\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tinitial={{ scale: 0.9, rotate: 45, opacity: 0 }}\n\t\t\t\t\t\tkey=\"chevron\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon className=\"size-5\" name=\"chevron-down\" />\n\t\t\t\t\t</motion.div>\n\t\t\t\t) : isTyping ? (\n\t\t\t\t\t<motion.span\n\t\t\t\t\t\tanimate={{\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\tduration: 0.2,\n\t\t\t\t\t\t\t\tease: \"easeOut\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName=\"pointer-events-none flex items-center rounded-full text-co-primary\"\n\t\t\t\t\t\texit={{\n\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\tscale: 0.9,\n\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\tduration: 0.1,\n\t\t\t\t\t\t\t\tease: \"easeIn\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tinitial={{ opacity: 0, scale: 0.9 }}\n\t\t\t\t\t\tkey=\"typing-indicator\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<BouncingDots className=\"bg-co-primary-foreground\" />\n\t\t\t\t\t</motion.span>\n\t\t\t\t) : (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tanimate={{\n\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\trotate: 0,\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransition: { duration: 0.2, ease: \"easeOut\" },\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName=\"flex items-center justify-center\"\n\t\t\t\t\t\texit={{\n\t\t\t\t\t\t\tscale: 0.9,\n\t\t\t\t\t\t\trotate: 45,\n\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\ttransition: { duration: 0.1, ease: \"easeIn\" },\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tinitial={{ scale: 0.9, rotate: -45, opacity: 0 }}\n\t\t\t\t\t\tkey=\"chat\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon className=\"size-6.5\" name=\"chat\" variant=\"filled\" />\n\t\t\t\t\t</motion.div>\n\t\t\t\t)}\n\t\t\t</AnimatePresence>\n\n\t\t\t{unreadCount > 0 && (\n\t\t\t\t<motion.div\n\t\t\t\t\tanimate={{ scale: 1, opacity: 1 }}\n\t\t\t\t\tclassName=\"absolute top-0.5 right-0.5 flex size-2 items-center justify-center rounded-full bg-co-destructive font-medium text-[10px] text-co-destructive-foreground text-white text-xs\"\n\t\t\t\t\texit={{ scale: 0, opacity: 0 }}\n\t\t\t\t\tinitial={{ scale: 0, opacity: 0 }}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport type BubbleProps = {\n\tclassName?: string;\n};\n\nexport const Bubble: React.FC<BubbleProps> = ({ className }) => (\n\t<Primitive.Bubble asChild>\n\t\t{({ isOpen, unreadCount, isTyping }) => (\n\t\t\t<motion.button\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"relative flex size-14 cursor-pointer items-center justify-center rounded-full bg-co-primary text-co-primary-foreground transition-colors hover:bg-co-primary/90 data-[open=true]:bg-co-primary/90\",\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tdata-open={isOpen}\n\t\t\t\ttransition={{\n\t\t\t\t\ttype: \"spring\",\n\t\t\t\t\tstiffness: 800,\n\t\t\t\t\tdamping: 17,\n\t\t\t\t}}\n\t\t\t\ttype=\"button\"\n\t\t\t\twhileTap={{ scale: 0.95 }}\n\t\t\t>\n\t\t\t\t<BubbleContent\n\t\t\t\t\tisOpen={isOpen}\n\t\t\t\t\tisTyping={isTyping}\n\t\t\t\t\tunreadCount={unreadCount}\n\t\t\t\t/>\n\t\t\t</motion.button>\n\t\t)}\n\t</Primitive.Bubble>\n);\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAMA,iBAA+C,EACpD,QACA,aACA,eACK;CAIL,MAAM,sBAAsB,mBAAmB;EAC9C,QAAQ;EACR,cAAc;EACd,CAAC;CACF,MAAM,yBAAy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E,OAAO;GAAG,SAAS;GAAG;EACjC,WAAU;EACV,MAAM;GAAE,OAAO;GAAG,SAAS;GAAG;EAC9B,SAAS;GAAE,OAAO;GAAG,SAAS;GAAG;GAChC,IAED;;AAQL,MAAaC,UAAiC,EAAE,gBAC/C,oBAACC;CAAiB;YACf,EAAE,QAAQ,aAAa,eACxB,oBAAC,OAAO;EACP,WAAW,GACV,qMACA,UACA;EACD,aAAW;EACX,YAAY;GACX,MAAM;GACN,WAAW;GACX,SAAS;GACT;EACD,MAAK;EACL,UAAU,EAAE,OAAO,KAAM;YAEzB,oBAAC;GACQ;GACE;GACG;IACZ;GACa;EAEC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/support/components/container.d.ts
|
|
4
|
-
type ContainerProps = {
|
|
5
|
-
className?: string;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
position?: "top" | "bottom";
|
|
8
|
-
align?: "right" | "left";
|
|
9
|
-
};
|
|
10
|
-
declare const Container: React.FC<ContainerProps>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { Container, ContainerProps };
|
|
13
|
-
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","names":[],"sources":["../../../src/support/components/container.tsx"],"sourcesContent":[],"mappings":";;;KAQY,cAAA;;EAAA,QAAA,EAED,KAAA,CAAM,SAFS;EAOb,QAAA,CAAA,EAAA,KA6HZ,GAAA,QA7HgC;;;cAApB,WAAW,KAAA,CAAM,GAAG"}
|