@cossistant/react 0.0.7 → 0.0.9
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 +71 -0
- package/api.d.ts.map +1 -0
- package/checks.d.ts +189 -0
- package/checks.d.ts.map +1 -0
- package/clsx.d.ts +7 -0
- package/clsx.d.ts.map +1 -0
- package/coerce.d.ts +9 -0
- package/coerce.d.ts.map +1 -0
- package/conversation.d.ts +227 -223
- package/conversation.d.ts.map +1 -1
- package/core.d.ts +35 -0
- package/core.d.ts.map +1 -0
- package/errors.d.ts +121 -0
- package/errors.d.ts.map +1 -0
- package/errors2.d.ts +24 -0
- package/errors2.d.ts.map +1 -0
- package/hooks/private/use-grouped-messages.d.ts +1 -1
- package/hooks/use-conversation-seen.d.ts +1 -1
- package/hooks/use-create-conversation.d.ts +1 -1
- package/index2.d.ts +4 -0
- package/index3.d.ts +1 -0
- package/index4.d.ts +18 -0
- package/index4.d.ts.map +1 -0
- package/index5.d.ts +999 -0
- package/index5.d.ts.map +1 -0
- package/index6.d.ts +6 -0
- package/metadata.d.ts +1 -0
- package/openapi-generator.d.ts +1 -0
- package/openapi-generator2.d.ts +1 -0
- package/openapi-generator3.d.ts +1 -0
- package/openapi30.d.ts +125 -0
- package/openapi30.d.ts.map +1 -0
- package/openapi31.d.ts +131 -0
- package/openapi31.d.ts.map +1 -0
- package/package.json +16 -4
- package/parse.d.ts +17 -0
- package/parse.d.ts.map +1 -0
- package/primitives/avatar/image.d.ts +1 -1
- package/react.d.ts +4 -0
- package/realtime/seen-store.d.ts +1 -1
- package/realtime-events.d.ts +276 -274
- package/realtime-events.d.ts.map +1 -1
- package/registries.d.ts +32 -0
- package/registries.d.ts.map +1 -0
- package/schemas.d.ts +670 -93
- package/schemas.d.ts.map +1 -1
- package/schemas2.d.ts +320 -0
- package/schemas2.d.ts.map +1 -0
- package/schemas3.d.ts +98 -0
- package/schemas3.d.ts.map +1 -0
- package/specification-extension.d.ts +9 -0
- package/specification-extension.d.ts.map +1 -0
- package/standard-schema.d.ts +59 -0
- package/standard-schema.d.ts.map +1 -0
- package/support/components/button.d.ts +1 -1
- package/support/components/text-effect.d.ts +2 -1
- package/support/components/text-effect.d.ts.map +1 -1
- package/support/components/typing-indicator.d.ts.map +1 -1
- package/support/utils/index.d.ts +1 -1
- package/timeline-item.d.ts +97 -93
- package/timeline-item.d.ts.map +1 -1
- package/types.d-BJcRxCew.d.ts +39 -0
- package/types.d-BJcRxCew.d.ts.map +1 -0
- package/util.d.ts +41 -0
- package/util.d.ts.map +1 -0
- package/versions.d.ts +9 -0
- package/versions.d.ts.map +1 -0
- package/zod-extensions.d.ts +39 -0
- package/zod-extensions.d.ts.map +1 -0
package/timeline-item.d.ts
CHANGED
|
@@ -1,28 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $strip } from "./schemas.js";
|
|
2
|
+
import { output } from "./core.js";
|
|
3
|
+
import { ZodArray, ZodBoolean, ZodDefault, ZodEnum, ZodLiteral, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodString, ZodUnion } from "./schemas2.js";
|
|
4
|
+
import { ZodCoercedNumber } from "./coerce.js";
|
|
5
|
+
import "./index3.js";
|
|
2
6
|
|
|
3
7
|
//#region ../types/src/api/timeline-item.d.ts
|
|
4
8
|
|
|
5
|
-
declare const timelineItemSchema:
|
|
6
|
-
id:
|
|
7
|
-
conversationId:
|
|
8
|
-
organizationId:
|
|
9
|
-
visibility:
|
|
9
|
+
declare const timelineItemSchema: ZodObject<{
|
|
10
|
+
id: ZodOptional<ZodString>;
|
|
11
|
+
conversationId: ZodString;
|
|
12
|
+
organizationId: ZodString;
|
|
13
|
+
visibility: ZodEnum<{
|
|
10
14
|
public: "public";
|
|
11
15
|
private: "private";
|
|
12
16
|
}>;
|
|
13
|
-
type:
|
|
17
|
+
type: ZodEnum<{
|
|
14
18
|
message: "message";
|
|
15
19
|
event: "event";
|
|
16
20
|
identification: "identification";
|
|
17
21
|
}>;
|
|
18
|
-
text:
|
|
19
|
-
tool:
|
|
20
|
-
parts:
|
|
21
|
-
type:
|
|
22
|
-
text:
|
|
23
|
-
},
|
|
24
|
-
type:
|
|
25
|
-
eventType:
|
|
22
|
+
text: ZodNullable<ZodString>;
|
|
23
|
+
tool: ZodOptional<ZodNullable<ZodString>>;
|
|
24
|
+
parts: ZodArray<ZodUnion<readonly [ZodObject<{
|
|
25
|
+
type: ZodLiteral<"text">;
|
|
26
|
+
text: ZodString;
|
|
27
|
+
}, $strip>, ZodObject<{
|
|
28
|
+
type: ZodLiteral<"event">;
|
|
29
|
+
eventType: ZodEnum<{
|
|
26
30
|
assigned: "assigned";
|
|
27
31
|
unassigned: "unassigned";
|
|
28
32
|
participant_requested: "participant_requested";
|
|
@@ -38,61 +42,61 @@ declare const timelineItemSchema: z.ZodObject<{
|
|
|
38
42
|
visitor_unblocked: "visitor_unblocked";
|
|
39
43
|
visitor_identified: "visitor_identified";
|
|
40
44
|
}>;
|
|
41
|
-
actorUserId:
|
|
42
|
-
actorAiAgentId:
|
|
43
|
-
targetUserId:
|
|
44
|
-
targetAiAgentId:
|
|
45
|
-
message:
|
|
46
|
-
},
|
|
47
|
-
type:
|
|
48
|
-
url:
|
|
49
|
-
mediaType:
|
|
50
|
-
fileName:
|
|
51
|
-
size:
|
|
52
|
-
width:
|
|
53
|
-
height:
|
|
54
|
-
},
|
|
55
|
-
type:
|
|
56
|
-
url:
|
|
57
|
-
mediaType:
|
|
58
|
-
fileName:
|
|
59
|
-
size:
|
|
60
|
-
},
|
|
61
|
-
userId:
|
|
62
|
-
aiAgentId:
|
|
63
|
-
visitorId:
|
|
64
|
-
createdAt:
|
|
65
|
-
deletedAt:
|
|
66
|
-
},
|
|
67
|
-
type timelineItemSchema =
|
|
68
|
-
type TimelineItem =
|
|
69
|
-
declare const getConversationTimelineItemsRequestSchema:
|
|
70
|
-
limit:
|
|
71
|
-
cursor:
|
|
72
|
-
},
|
|
73
|
-
type GetConversationTimelineItemsRequest =
|
|
74
|
-
declare const getConversationTimelineItemsResponseSchema:
|
|
75
|
-
items:
|
|
76
|
-
id:
|
|
77
|
-
conversationId:
|
|
78
|
-
organizationId:
|
|
79
|
-
visibility:
|
|
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>]>>;
|
|
65
|
+
userId: ZodNullable<ZodString>;
|
|
66
|
+
aiAgentId: ZodNullable<ZodString>;
|
|
67
|
+
visitorId: ZodNullable<ZodString>;
|
|
68
|
+
createdAt: ZodString;
|
|
69
|
+
deletedAt: ZodOptional<ZodNullable<ZodString>>;
|
|
70
|
+
}, $strip>;
|
|
71
|
+
type timelineItemSchema = output<typeof timelineItemSchema>;
|
|
72
|
+
type TimelineItem = output<typeof timelineItemSchema>;
|
|
73
|
+
declare const getConversationTimelineItemsRequestSchema: ZodObject<{
|
|
74
|
+
limit: ZodDefault<ZodCoercedNumber<unknown>>;
|
|
75
|
+
cursor: ZodOptional<ZodNullable<ZodString>>;
|
|
76
|
+
}, $strip>;
|
|
77
|
+
type GetConversationTimelineItemsRequest = output<typeof getConversationTimelineItemsRequestSchema>;
|
|
78
|
+
declare const getConversationTimelineItemsResponseSchema: ZodObject<{
|
|
79
|
+
items: ZodArray<ZodObject<{
|
|
80
|
+
id: ZodOptional<ZodString>;
|
|
81
|
+
conversationId: ZodString;
|
|
82
|
+
organizationId: ZodString;
|
|
83
|
+
visibility: ZodEnum<{
|
|
80
84
|
public: "public";
|
|
81
85
|
private: "private";
|
|
82
86
|
}>;
|
|
83
|
-
type:
|
|
87
|
+
type: ZodEnum<{
|
|
84
88
|
message: "message";
|
|
85
89
|
event: "event";
|
|
86
90
|
identification: "identification";
|
|
87
91
|
}>;
|
|
88
|
-
text:
|
|
89
|
-
tool:
|
|
90
|
-
parts:
|
|
91
|
-
type:
|
|
92
|
-
text:
|
|
93
|
-
},
|
|
94
|
-
type:
|
|
95
|
-
eventType:
|
|
92
|
+
text: ZodNullable<ZodString>;
|
|
93
|
+
tool: ZodOptional<ZodNullable<ZodString>>;
|
|
94
|
+
parts: ZodArray<ZodUnion<readonly [ZodObject<{
|
|
95
|
+
type: ZodLiteral<"text">;
|
|
96
|
+
text: ZodString;
|
|
97
|
+
}, $strip>, ZodObject<{
|
|
98
|
+
type: ZodLiteral<"event">;
|
|
99
|
+
eventType: ZodEnum<{
|
|
96
100
|
assigned: "assigned";
|
|
97
101
|
unassigned: "unassigned";
|
|
98
102
|
participant_requested: "participant_requested";
|
|
@@ -108,36 +112,36 @@ declare const getConversationTimelineItemsResponseSchema: z.ZodObject<{
|
|
|
108
112
|
visitor_unblocked: "visitor_unblocked";
|
|
109
113
|
visitor_identified: "visitor_identified";
|
|
110
114
|
}>;
|
|
111
|
-
actorUserId:
|
|
112
|
-
actorAiAgentId:
|
|
113
|
-
targetUserId:
|
|
114
|
-
targetAiAgentId:
|
|
115
|
-
message:
|
|
116
|
-
},
|
|
117
|
-
type:
|
|
118
|
-
url:
|
|
119
|
-
mediaType:
|
|
120
|
-
fileName:
|
|
121
|
-
size:
|
|
122
|
-
width:
|
|
123
|
-
height:
|
|
124
|
-
},
|
|
125
|
-
type:
|
|
126
|
-
url:
|
|
127
|
-
mediaType:
|
|
128
|
-
fileName:
|
|
129
|
-
size:
|
|
130
|
-
},
|
|
131
|
-
userId:
|
|
132
|
-
aiAgentId:
|
|
133
|
-
visitorId:
|
|
134
|
-
createdAt:
|
|
135
|
-
deletedAt:
|
|
136
|
-
},
|
|
137
|
-
nextCursor:
|
|
138
|
-
hasNextPage:
|
|
139
|
-
},
|
|
140
|
-
type GetConversationTimelineItemsResponse =
|
|
115
|
+
actorUserId: ZodNullable<ZodString>;
|
|
116
|
+
actorAiAgentId: ZodNullable<ZodString>;
|
|
117
|
+
targetUserId: ZodNullable<ZodString>;
|
|
118
|
+
targetAiAgentId: ZodNullable<ZodString>;
|
|
119
|
+
message: ZodOptional<ZodNullable<ZodString>>;
|
|
120
|
+
}, $strip>, ZodObject<{
|
|
121
|
+
type: ZodLiteral<"image">;
|
|
122
|
+
url: ZodString;
|
|
123
|
+
mediaType: ZodString;
|
|
124
|
+
fileName: ZodOptional<ZodString>;
|
|
125
|
+
size: ZodOptional<ZodNumber>;
|
|
126
|
+
width: ZodOptional<ZodNumber>;
|
|
127
|
+
height: ZodOptional<ZodNumber>;
|
|
128
|
+
}, $strip>, ZodObject<{
|
|
129
|
+
type: ZodLiteral<"file">;
|
|
130
|
+
url: ZodString;
|
|
131
|
+
mediaType: ZodString;
|
|
132
|
+
fileName: ZodOptional<ZodString>;
|
|
133
|
+
size: ZodOptional<ZodNumber>;
|
|
134
|
+
}, $strip>]>>;
|
|
135
|
+
userId: ZodNullable<ZodString>;
|
|
136
|
+
aiAgentId: ZodNullable<ZodString>;
|
|
137
|
+
visitorId: ZodNullable<ZodString>;
|
|
138
|
+
createdAt: ZodString;
|
|
139
|
+
deletedAt: ZodOptional<ZodNullable<ZodString>>;
|
|
140
|
+
}, $strip>>;
|
|
141
|
+
nextCursor: ZodNullable<ZodString>;
|
|
142
|
+
hasNextPage: ZodBoolean;
|
|
143
|
+
}, $strip>;
|
|
144
|
+
type GetConversationTimelineItemsResponse = output<typeof getConversationTimelineItemsResponseSchema>;
|
|
141
145
|
//#endregion
|
|
142
146
|
export { GetConversationTimelineItemsRequest, GetConversationTimelineItemsResponse, TimelineItem };
|
|
143
147
|
//# 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":";;;;;;;;AAgMY,cA9EC,kBA8ED,EA9EmB,SA8EgB,CAAA;EAIlC,EAAA,aAAA,UAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA9BD,kBAAA,GAAqB,cAAe;KAEpC,YAAA,GAAe,cAAe;cAS7B,2CAAyC;;;;AAmBC,KAJ3C,mCAAA,GAAsC,MAIK,CAAA,OAH/C,yCAG+C,CAAA;AAAA,cAA1C,0CAA0C,EAAA,SAAA,CAAA;EAiB3C,KAAA,UAAA,UAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAA,oCAAA,GAAuC,cAC3C"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Batcher, MotionValue } from "./index5.js";
|
|
3
|
+
import { JSX } from "react";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.bun/framer-motion@12.23.24+2b5434204782a989/node_modules/framer-motion/dist/types.d-BJcRxCew.d.ts
|
|
6
|
+
|
|
7
|
+
declare const optimizedAppearDataAttribute: "data-framer-appear-id";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Expose only the needed part of the VisualElement interface to
|
|
11
|
+
* ensure React types don't end up in the generic DOM bundle.
|
|
12
|
+
*/
|
|
13
|
+
interface WithAppearProps {
|
|
14
|
+
props: {
|
|
15
|
+
[optimizedAppearDataAttribute]?: string;
|
|
16
|
+
values?: {
|
|
17
|
+
[key: string]: MotionValue<number> | MotionValue<string>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
type HandoffFunction = (storeId: string, valueName: string, frame: Batcher) => number | null;
|
|
22
|
+
/**
|
|
23
|
+
* The window global object acts as a bridge between our inline script
|
|
24
|
+
* triggering the optimized appear animations, and Motion.
|
|
25
|
+
*/
|
|
26
|
+
declare global {
|
|
27
|
+
interface Window {
|
|
28
|
+
MotionHandoffAnimation?: HandoffFunction;
|
|
29
|
+
MotionHandoffMarkAsComplete?: (elementId: string) => void;
|
|
30
|
+
MotionHandoffIsComplete?: (elementId: string) => boolean;
|
|
31
|
+
MotionHasOptimisedAnimation?: (elementId?: string, valueName?: string) => boolean;
|
|
32
|
+
MotionCancelOptimisedAnimation?: (elementId?: string, valueName?: string, frame?: Batcher, canResume?: boolean) => void;
|
|
33
|
+
MotionCheckAppearSync?: (visualElement: WithAppearProps, valueName: string, value: MotionValue) => VoidFunction | void;
|
|
34
|
+
MotionIsMounted?: boolean;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { optimizedAppearDataAttribute };
|
|
39
|
+
//# sourceMappingURL=types.d-BJcRxCew.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d-BJcRxCew.d.ts","names":["motion_dom","TransformProperties","MotionNodeOptions","MotionValue","SVGPathProperties","Transition","JSAnimation","ValueTransition","TargetAndTransition","AnyResolvedKeyframe","KeyframeResolver","AnimationDefinition","Batcher","TransformPoint","Box","Delta","Point","Axis","React$1","CSSProperties","PropsWithoutRef","RefAttributes","JSX","SVGAttributes","VariantLabels","MotionValueString","MotionValueNumber","MotionValueAny","AnyMotionValue","MotionValueHelper","T","MakeMotionHelper","K","MakeCustomValueTypeHelper","MakeMotion","MotionCSS","Omit","MotionTransform","MotionSVGProps","MotionStyle","MotionProps","React","ReactNode","ReducedMotionConfig","MotionConfigContext","Context","PresenceContextProps","PresenceContext","VisualState","Instance","RenderState","ResolvedValues","UseVisualState","UseVisualStateConfig","ScrapeMotionValuesFromProps","makeUseVisualState","I","RS","HTMLElements","HTMLAnchorElement","HTMLElement","HTMLAreaElement","HTMLAudioElement","HTMLBaseElement","HTMLQuoteElement","HTMLBodyElement","HTMLBRElement","HTMLButtonElement","HTMLCanvasElement","HTMLTableColElement","HTMLDataElement","HTMLDataListElement","HTMLModElement","HTMLDetailsElement","HTMLDialogElement","HTMLDivElement","HTMLDListElement","HTMLEmbedElement","HTMLFieldSetElement","HTMLFormElement","HTMLHeadingElement","HTMLHeadElement","HTMLHRElement","HTMLHtmlElement","HTMLIFrameElement","HTMLImageElement","HTMLInputElement","HTMLLabelElement","HTMLLegendElement","HTMLLIElement","HTMLLinkElement","HTMLMapElement","HTMLMetaElement","HTMLMeterElement","HTMLObjectElement","HTMLOListElement","HTMLOptGroupElement","HTMLOptionElement","HTMLOutputElement","HTMLParagraphElement","HTMLParamElement","HTMLPreElement","HTMLProgressElement","HTMLSlotElement","HTMLScriptElement","HTMLSelectElement","HTMLSourceElement","HTMLSpanElement","HTMLStyleElement","HTMLTableElement","HTMLTemplateElement","HTMLTableSectionElement","HTMLTableDataCellElement","HTMLTextAreaElement","HTMLTableHeaderCellElement","HTMLTimeElement","HTMLTitleElement","HTMLTableRowElement","HTMLTrackElement","HTMLUListElement","HTMLVideoElement","HTMLWebViewElement","TransformOrigin","HTMLRenderState","ForwardRefComponent","P","Element","AttributesWithoutMotionProps","Attributes","Exclude","HTMLMotionProps","Tag","IntrinsicElements","HTMLMotionComponents","UnionStringArray","Readonly","svgElements","SVGElements","SVGAttributesWithoutMotionProps","Pick","SVGAttributesAsMotionValues","UnwrapSVGFactoryElement","F","SVGProps","SVGMotionProps","SVGMotionComponents","DOMMotionComponents","SwitchLayoutGroup","IProjectionNode","InitialPromotionConfig","SwitchLayoutGroupContext","WithDepth","FlatTree","NodeStack","Measurements","Phase","ScrollMeasurements","LayoutEvents","Set","ProjectionNodeOptions","Map","CSSStyleDeclaration","VoidFunction","VisualElement","AnimationType","VisualElementAnimationOptions","AnimationState","Promise","AnimationTypeState","EventName","Options","Partial","parent","props","presenceContext","reducedMotionConfig","blockInitialAnimation","visualState","VisualElementOptions","Variant","VisualElementEventCallbacks","CreateVisualElement","Props","TagName","ComponentType","SVGElement","optimizedAppearDataAttribute","WithAppearProps","HandoffFunction","_0","sideEffect","A","C","D","H","M","R","S","V","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p"],"sources":["../../../node_modules/.bun/framer-motion@12.23.24+2b5434204782a989/node_modules/framer-motion/dist/types.d-BJcRxCew.d.ts"],"sourcesContent":["/// <reference types=\"react\" />\nimport * as motion_dom from 'motion-dom';\nimport { TransformProperties, MotionNodeOptions, MotionValue, SVGPathProperties, Transition, JSAnimation, ValueTransition, TargetAndTransition, AnyResolvedKeyframe, KeyframeResolver, AnimationDefinition, Batcher } from 'motion-dom';\nimport { TransformPoint, Box, Delta, Point, Axis } from 'motion-utils';\nimport * as React$1 from 'react';\nimport { CSSProperties, PropsWithoutRef, RefAttributes, JSX, SVGAttributes } from 'react';\n\n/**\n * Either a string, or array of strings, that reference variants defined via the `variants` prop.\n * @public\n */\ntype VariantLabels = string | string[];\n\ntype MotionValueString = MotionValue<string>;\ntype MotionValueNumber = MotionValue<number>;\ntype MotionValueAny = MotionValue<any>;\ntype AnyMotionValue = MotionValueNumber | MotionValueString | MotionValueAny;\ntype MotionValueHelper<T> = T | AnyMotionValue;\ntype MakeMotionHelper<T> = {\n [K in keyof T]: MotionValueHelper<T[K]>;\n};\ntype MakeCustomValueTypeHelper<T> = MakeMotionHelper<T>;\ntype MakeMotion<T> = MakeCustomValueTypeHelper<T>;\ntype MotionCSS = MakeMotion<Omit<CSSProperties, \"rotate\" | \"scale\" | \"perspective\">>;\n/**\n * @public\n */\ntype MotionTransform = MakeMotion<TransformProperties>;\ntype MotionSVGProps = MakeMotion<SVGPathProperties>;\n/**\n * @public\n */\ninterface MotionStyle extends MotionCSS, MotionTransform, MotionSVGProps {\n}\n/**\n * Props for `motion` components.\n *\n * @public\n */\ninterface MotionProps extends MotionNodeOptions {\n /**\n *\n * The React DOM `style` prop, enhanced with support for `MotionValue`s and separate `transform` values.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n *\n * return <motion.div style={{ x, opacity: 1, scale: 0.5 }} />\n * }\n * ```\n */\n style?: MotionStyle;\n children?: React.ReactNode | MotionValueNumber | MotionValueString;\n}\n\ntype ReducedMotionConfig = \"always\" | \"never\" | \"user\";\n/**\n * @public\n */\ninterface MotionConfigContext {\n /**\n * Internal, exported only for usage in Framer\n */\n transformPagePoint: TransformPoint;\n /**\n * Internal. Determines whether this is a static context ie the Framer canvas. If so,\n * it'll disable all dynamic functionality.\n */\n isStatic: boolean;\n /**\n * Defines a new default transition for the entire tree.\n *\n * @public\n */\n transition?: Transition;\n /**\n * If true, will respect the device prefersReducedMotion setting by switching\n * transform animations off.\n *\n * @public\n */\n reducedMotion?: ReducedMotionConfig;\n /**\n * A custom `nonce` attribute used when wanting to enforce a Content Security Policy (CSP).\n * For more details see:\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles\n *\n * @public\n */\n nonce?: string;\n}\n/**\n * @public\n */\ndeclare const MotionConfigContext: React$1.Context<MotionConfigContext>;\n\n/**\n * @public\n */\ninterface PresenceContextProps {\n id: string;\n isPresent: boolean;\n register: (id: string | number) => () => void;\n onExitComplete?: (id: string | number) => void;\n initial?: false | VariantLabels;\n custom?: any;\n}\n/**\n * @public\n */\ndeclare const PresenceContext: React$1.Context<PresenceContextProps | null>;\n\ninterface VisualState<Instance, RenderState> {\n renderState: RenderState;\n latestValues: ResolvedValues;\n onMount?: (instance: Instance) => void;\n}\ntype UseVisualState<Instance, RenderState> = (props: MotionProps, isStatic: boolean) => VisualState<Instance, RenderState>;\ninterface UseVisualStateConfig<RenderState> {\n scrapeMotionValuesFromProps: ScrapeMotionValuesFromProps;\n createRenderState: () => RenderState;\n}\ndeclare const makeUseVisualState: <I, RS>(config: UseVisualStateConfig<RS>) => UseVisualState<I, RS>;\n\ninterface HTMLElements {\n a: HTMLAnchorElement;\n abbr: HTMLElement;\n address: HTMLElement;\n area: HTMLAreaElement;\n article: HTMLElement;\n aside: HTMLElement;\n audio: HTMLAudioElement;\n b: HTMLElement;\n base: HTMLBaseElement;\n bdi: HTMLElement;\n bdo: HTMLElement;\n big: HTMLElement;\n blockquote: HTMLQuoteElement;\n body: HTMLBodyElement;\n br: HTMLBRElement;\n button: HTMLButtonElement;\n canvas: HTMLCanvasElement;\n caption: HTMLElement;\n center: HTMLElement;\n cite: HTMLElement;\n code: HTMLElement;\n col: HTMLTableColElement;\n colgroup: HTMLTableColElement;\n data: HTMLDataElement;\n datalist: HTMLDataListElement;\n dd: HTMLElement;\n del: HTMLModElement;\n details: HTMLDetailsElement;\n dfn: HTMLElement;\n dialog: HTMLDialogElement;\n div: HTMLDivElement;\n dl: HTMLDListElement;\n dt: HTMLElement;\n em: HTMLElement;\n embed: HTMLEmbedElement;\n fieldset: HTMLFieldSetElement;\n figcaption: HTMLElement;\n figure: HTMLElement;\n footer: HTMLElement;\n form: HTMLFormElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n head: HTMLHeadElement;\n header: HTMLElement;\n hgroup: HTMLElement;\n hr: HTMLHRElement;\n html: HTMLHtmlElement;\n i: HTMLElement;\n iframe: HTMLIFrameElement;\n img: HTMLImageElement;\n input: HTMLInputElement;\n ins: HTMLModElement;\n kbd: HTMLElement;\n keygen: HTMLElement;\n label: HTMLLabelElement;\n legend: HTMLLegendElement;\n li: HTMLLIElement;\n link: HTMLLinkElement;\n main: HTMLElement;\n map: HTMLMapElement;\n mark: HTMLElement;\n menu: HTMLElement;\n menuitem: HTMLElement;\n meta: HTMLMetaElement;\n meter: HTMLMeterElement;\n nav: HTMLElement;\n noindex: HTMLElement;\n noscript: HTMLElement;\n object: HTMLObjectElement;\n ol: HTMLOListElement;\n optgroup: HTMLOptGroupElement;\n option: HTMLOptionElement;\n output: HTMLOutputElement;\n p: HTMLParagraphElement;\n param: HTMLParamElement;\n picture: HTMLElement;\n pre: HTMLPreElement;\n progress: HTMLProgressElement;\n q: HTMLQuoteElement;\n rp: HTMLElement;\n rt: HTMLElement;\n ruby: HTMLElement;\n s: HTMLElement;\n samp: HTMLElement;\n search: HTMLElement;\n slot: HTMLSlotElement;\n script: HTMLScriptElement;\n section: HTMLElement;\n select: HTMLSelectElement;\n small: HTMLElement;\n source: HTMLSourceElement;\n span: HTMLSpanElement;\n strong: HTMLElement;\n style: HTMLStyleElement;\n sub: HTMLElement;\n summary: HTMLElement;\n sup: HTMLElement;\n table: HTMLTableElement;\n template: HTMLTemplateElement;\n tbody: HTMLTableSectionElement;\n td: HTMLTableDataCellElement;\n textarea: HTMLTextAreaElement;\n tfoot: HTMLTableSectionElement;\n th: HTMLTableHeaderCellElement;\n thead: HTMLTableSectionElement;\n time: HTMLTimeElement;\n title: HTMLTitleElement;\n tr: HTMLTableRowElement;\n track: HTMLTrackElement;\n u: HTMLElement;\n ul: HTMLUListElement;\n var: HTMLElement;\n video: HTMLVideoElement;\n wbr: HTMLElement;\n webview: HTMLWebViewElement;\n}\n\ninterface TransformOrigin {\n originX?: number | string;\n originY?: number | string;\n originZ?: number | string;\n}\ninterface HTMLRenderState {\n /**\n * A mutable record of transforms we want to apply directly to the rendered Element\n * every frame. We use a mutable data structure to reduce GC during animations.\n */\n transform: ResolvedValues;\n /**\n * A mutable record of transform origins we want to apply directly to the rendered Element\n * every frame. We use a mutable data structure to reduce GC during animations.\n */\n transformOrigin: TransformOrigin;\n /**\n * A mutable record of styles we want to apply directly to the rendered Element\n * every frame. We use a mutable data structure to reduce GC during animations.\n */\n style: ResolvedValues;\n /**\n * A mutable record of CSS variables we want to apply directly to the rendered Element\n * every frame. We use a mutable data structure to reduce GC during animations.\n */\n vars: ResolvedValues;\n}\n/**\n * @public\n */\ntype ForwardRefComponent<T, P> = {\n readonly $$typeof: symbol;\n} & ((props: PropsWithoutRef<P> & RefAttributes<T>) => JSX.Element);\ntype AttributesWithoutMotionProps<Attributes> = {\n [K in Exclude<keyof Attributes, keyof MotionProps>]?: Attributes[K];\n};\n/**\n * @public\n */\ntype HTMLMotionProps<Tag extends keyof HTMLElements> = AttributesWithoutMotionProps<JSX.IntrinsicElements[Tag]> & MotionProps;\n/**\n * Motion-optimised versions of React's HTML components.\n *\n * @public\n */\ntype HTMLMotionComponents = {\n [K in keyof HTMLElements]: ForwardRefComponent<HTMLElements[K], HTMLMotionProps<K>>;\n};\n\ntype UnionStringArray<T extends Readonly<string[]>> = T[number];\ndeclare const svgElements: readonly [\"animate\", \"circle\", \"defs\", \"desc\", \"ellipse\", \"g\", \"image\", \"line\", \"filter\", \"marker\", \"mask\", \"metadata\", \"path\", \"pattern\", \"polygon\", \"polyline\", \"rect\", \"stop\", \"svg\", \"switch\", \"symbol\", \"text\", \"tspan\", \"use\", \"view\", \"clipPath\", \"feBlend\", \"feColorMatrix\", \"feComponentTransfer\", \"feComposite\", \"feConvolveMatrix\", \"feDiffuseLighting\", \"feDisplacementMap\", \"feDistantLight\", \"feDropShadow\", \"feFlood\", \"feFuncA\", \"feFuncB\", \"feFuncG\", \"feFuncR\", \"feGaussianBlur\", \"feImage\", \"feMerge\", \"feMergeNode\", \"feMorphology\", \"feOffset\", \"fePointLight\", \"feSpecularLighting\", \"feSpotLight\", \"feTile\", \"feTurbulence\", \"foreignObject\", \"linearGradient\", \"radialGradient\", \"textPath\"];\ntype SVGElements = UnionStringArray<typeof svgElements>;\n\ninterface SVGAttributesWithoutMotionProps<T> extends Pick<SVGAttributes<T>, Exclude<keyof SVGAttributes<T>, keyof MotionProps>> {\n}\n/**\n * Blanket-accept any SVG attribute as a `MotionValue`\n * @public\n */\ntype SVGAttributesAsMotionValues<T> = MakeMotion<SVGAttributesWithoutMotionProps<T>>;\ntype UnwrapSVGFactoryElement<F> = F extends React.SVGProps<infer P> ? P : never;\n/**\n * @public\n */\ninterface SVGMotionProps<T> extends SVGAttributesAsMotionValues<T>, MotionProps {\n}\n/**\n * Motion-optimised versions of React's SVG components.\n *\n * @public\n */\ntype SVGMotionComponents = {\n [K in SVGElements]: ForwardRefComponent<UnwrapSVGFactoryElement<JSX.IntrinsicElements[K]>, SVGMotionProps<UnwrapSVGFactoryElement<JSX.IntrinsicElements[K]>>>;\n};\n\ntype DOMMotionComponents = HTMLMotionComponents & SVGMotionComponents;\n\ninterface SwitchLayoutGroup {\n register?: (member: IProjectionNode) => void;\n deregister?: (member: IProjectionNode) => void;\n}\ntype InitialPromotionConfig = {\n /**\n * The initial transition to use when the elements in this group mount (and automatically promoted).\n * Subsequent updates should provide a transition in the promote method.\n */\n transition?: Transition;\n /**\n * If the follow tree should preserve its opacity when the lead is promoted on mount\n */\n shouldPreserveFollowOpacity?: (member: IProjectionNode) => boolean;\n};\ntype SwitchLayoutGroupContext = SwitchLayoutGroup & InitialPromotionConfig;\n/**\n * Internal, exported only for usage in Framer\n */\ndeclare const SwitchLayoutGroupContext: React$1.Context<SwitchLayoutGroupContext>;\n\ninterface WithDepth {\n depth: number;\n}\n\ndeclare class FlatTree {\n private children;\n private isDirty;\n add(child: WithDepth): void;\n remove(child: WithDepth): void;\n forEach(callback: (child: WithDepth) => void): void;\n}\n\ndeclare class NodeStack {\n lead?: IProjectionNode;\n prevLead?: IProjectionNode;\n members: IProjectionNode[];\n add(node: IProjectionNode): void;\n remove(node: IProjectionNode): void;\n relegate(node: IProjectionNode): boolean;\n promote(node: IProjectionNode, preserveFollowOpacity?: boolean): void;\n exitAnimationComplete(): void;\n scheduleRender(): void;\n /**\n * Clear any leads that have been removed this render to prevent them from being\n * used in future animations and to prevent memory leaks\n */\n removeLeadSnapshot(): void;\n}\n\ninterface Measurements {\n animationId: number;\n measuredBox: Box;\n layoutBox: Box;\n latestValues: ResolvedValues;\n source: number;\n}\ntype Phase = \"snapshot\" | \"measure\";\ninterface ScrollMeasurements {\n animationId: number;\n phase: Phase;\n offset: Point;\n isRoot: boolean;\n wasRoot: boolean;\n}\ntype LayoutEvents = \"willUpdate\" | \"didUpdate\" | \"beforeMeasure\" | \"measure\" | \"projectionUpdate\" | \"animationStart\" | \"animationComplete\";\ninterface IProjectionNode<I = unknown> {\n id: number;\n animationId: number;\n animationCommitId: number;\n parent?: IProjectionNode;\n relativeParent?: IProjectionNode;\n root?: IProjectionNode;\n children: Set<IProjectionNode>;\n path: IProjectionNode[];\n nodes?: FlatTree;\n depth: number;\n instance: I | undefined;\n mount: (node: I, isLayoutDirty?: boolean) => void;\n unmount: () => void;\n options: ProjectionNodeOptions;\n setOptions(options: ProjectionNodeOptions): void;\n layout?: Measurements;\n snapshot?: Measurements;\n target?: Box;\n relativeTarget?: Box;\n relativeTargetOrigin?: Box;\n targetDelta?: Delta;\n targetWithTransforms?: Box;\n scroll?: ScrollMeasurements;\n treeScale?: Point;\n projectionDelta?: Delta;\n projectionDeltaWithTransform?: Delta;\n latestValues: ResolvedValues;\n isLayoutDirty: boolean;\n isProjectionDirty: boolean;\n isSharedProjectionDirty: boolean;\n isTransformDirty: boolean;\n resolvedRelativeTargetAt?: number;\n shouldResetTransform: boolean;\n prevTransformTemplateValue: string | undefined;\n isUpdateBlocked(): boolean;\n updateManuallyBlocked: boolean;\n updateBlockedByResize: boolean;\n blockUpdate(): void;\n unblockUpdate(): void;\n isUpdating: boolean;\n needsReset: boolean;\n startUpdate(): void;\n willUpdate(notifyListeners?: boolean): void;\n didUpdate(): void;\n measure(removeTransform?: boolean): Measurements;\n measurePageBox(): Box;\n updateLayout(): void;\n updateSnapshot(): void;\n clearSnapshot(): void;\n updateScroll(phase?: Phase): void;\n scheduleUpdateProjection(): void;\n scheduleCheckAfterUnmount(): void;\n checkUpdateFailed(): void;\n sharedNodes: Map<string, NodeStack>;\n registerSharedNode(id: string, node: IProjectionNode): void;\n getStack(): NodeStack | undefined;\n isVisible: boolean;\n hide(): void;\n show(): void;\n scheduleRender(notifyAll?: boolean): void;\n getClosestProjectingParent(): IProjectionNode | undefined;\n setTargetDelta(delta: Delta): void;\n resetTransform(): void;\n resetSkewAndRotation(): void;\n applyTransform(box: Box, transformOnly?: boolean): Box;\n resolveTargetDelta(force?: boolean): void;\n calcProjection(): void;\n applyProjectionStyles(targetStyle: CSSStyleDeclaration, styleProp?: MotionStyle): void;\n clearMeasurements(): void;\n resetTree(): void;\n isProjecting(): boolean;\n animationValues?: ResolvedValues;\n currentAnimation?: JSAnimation<number>;\n isTreeAnimating?: boolean;\n isAnimationBlocked?: boolean;\n isTreeAnimationBlocked: () => boolean;\n setAnimationOrigin(delta: Delta): void;\n startAnimation(transition: ValueTransition): void;\n finishAnimation(): void;\n hasCheckedOptimisedAppear: boolean;\n isLead(): boolean;\n promote(options?: {\n needsReset?: boolean;\n transition?: Transition;\n preserveFollowOpacity?: boolean;\n }): void;\n relegate(): boolean;\n resumeFrom?: IProjectionNode;\n resumingFrom?: IProjectionNode;\n isPresent?: boolean;\n addEventListener(name: LayoutEvents, handler: any): VoidFunction;\n notifyListeners(name: LayoutEvents, ...args: any): void;\n hasListeners(name: LayoutEvents): boolean;\n hasTreeAnimated: boolean;\n preserveOpacity?: boolean;\n}\ninterface ProjectionNodeOptions {\n animate?: boolean;\n layoutScroll?: boolean;\n layoutRoot?: boolean;\n alwaysMeasureLayout?: boolean;\n onExitComplete?: VoidFunction;\n animationType?: \"size\" | \"position\" | \"both\" | \"preserve-aspect\";\n layoutId?: string;\n layout?: boolean | string;\n visualElement?: VisualElement;\n crossfade?: boolean;\n transition?: Transition;\n initialPromotionConfig?: InitialPromotionConfig;\n}\n\ntype AnimationType = \"animate\" | \"whileHover\" | \"whileTap\" | \"whileDrag\" | \"whileFocus\" | \"whileInView\" | \"exit\";\n\ntype VisualElementAnimationOptions = {\n delay?: number;\n transitionOverride?: Transition;\n custom?: any;\n type?: AnimationType;\n};\n\ninterface AnimationState {\n animateChanges: (type?: AnimationType) => Promise<any>;\n setActive: (type: AnimationType, isActive: boolean, options?: VisualElementAnimationOptions) => Promise<any>;\n setAnimateFunction: (fn: any) => void;\n getState: () => {\n [key: string]: AnimationTypeState;\n };\n reset: () => void;\n}\ninterface AnimationTypeState {\n isActive: boolean;\n protectedKeys: {\n [key: string]: true;\n };\n needsAnimating: {\n [key: string]: boolean;\n };\n prevResolvedValues: {\n [key: string]: any;\n };\n prevProp?: VariantLabels | TargetAndTransition;\n}\n\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\ndeclare abstract class VisualElement<Instance = unknown, RenderState = unknown, Options extends {} = {}> {\n /**\n * VisualElements are arranged in trees mirroring that of the React tree.\n * Each type of VisualElement has a unique name, to detect when we're crossing\n * type boundaries within that tree.\n */\n abstract type: string;\n /**\n * An `Array.sort` compatible function that will compare two Instances and\n * compare their respective positions within the tree.\n */\n abstract sortInstanceNodePosition(a: Instance, b: Instance): number;\n /**\n * Measure the viewport-relative bounding box of the Instance.\n */\n abstract measureInstanceViewportBox(instance: Instance, props: MotionProps & Partial<MotionConfigContext>): Box;\n /**\n * When a value has been removed from all animation props we need to\n * pick a target to animate back to. For instance, for HTMLElements\n * we can look in the style prop.\n */\n abstract getBaseTargetFromProps(props: MotionProps, key: string): AnyResolvedKeyframe | undefined | MotionValue;\n /**\n * When we first animate to a value we need to animate it *from* a value.\n * Often this have been specified via the initial prop but it might be\n * that the value needs to be read from the Instance.\n */\n abstract readValueFromInstance(instance: Instance, key: string, options: Options): AnyResolvedKeyframe | null | undefined;\n /**\n * When a value has been removed from the VisualElement we use this to remove\n * it from the inherting class' unique render state.\n */\n abstract removeValueFromRenderState(key: string, renderState: RenderState): void;\n /**\n * Run before a React or VisualElement render, builds the latest motion\n * values into an Instance-specific format. For example, HTMLVisualElement\n * will use this step to build `style` and `var` values.\n */\n abstract build(renderState: RenderState, latestValues: ResolvedValues, props: MotionProps): void;\n /**\n * Apply the built values to the Instance. For example, HTMLElements will have\n * styles applied via `setProperty` and the style attribute, whereas SVGElements\n * will have values applied to attributes.\n */\n abstract renderInstance(instance: Instance, renderState: RenderState, styleProp?: MotionStyle, projection?: IProjectionNode): void;\n /**\n * This method is called when a transform property is bound to a motion value.\n * It's currently used to measure SVG elements when a new transform property is bound.\n */\n onBindTransform?(): void;\n /**\n * If the component child is provided as a motion value, handle subscriptions\n * with the renderer-specific VisualElement.\n */\n handleChildMotionValue?(): void;\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props: MotionProps, _prevProps: MotionProps, _visualElement: VisualElement): {\n [key: string]: MotionValue | AnyResolvedKeyframe;\n };\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n current: Instance | null;\n /**\n * A reference to the parent VisualElement (if exists).\n */\n parent: VisualElement | undefined;\n /**\n * A set containing references to this VisualElement's children.\n */\n children: Set<VisualElement<unknown, unknown, {}>>;\n /**\n * A set containing the latest children of this VisualElement. This is flushed\n * at the start of every commit. We use it to calculate the stagger delay\n * for newly-added children.\n */\n enteringChildren?: Set<VisualElement>;\n /**\n * The depth of this VisualElement within the overall VisualElement tree.\n */\n depth: number;\n /**\n * The current render state of this VisualElement. Defined by inherting VisualElements.\n */\n renderState: RenderState;\n /**\n * An object containing the latest static values for each of this VisualElement's\n * MotionValues.\n */\n latestValues: ResolvedValues;\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n isVariantNode: boolean;\n isControllingVariants: boolean;\n /**\n * If this component is part of the variant tree, it should track\n * any children that are also part of the tree. This is essentially\n * a shadow tree to simplify logic around how to stagger over children.\n */\n variantChildren?: Set<VisualElement>;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n shouldReduceMotion: boolean | null;\n /**\n * Normally, if a component is controlled by a parent's variants, it can\n * rely on that ancestor to trigger animations further down the tree.\n * However, if a component is created after its parent is mounted, the parent\n * won't trigger that mount animation so the child needs to.\n *\n * TODO: This might be better replaced with a method isParentMounted\n */\n manuallyAnimateOnMount: boolean;\n /**\n * This can be set by AnimatePresence to force components that mount\n * at the same time as it to mount as if they have initial={false} set.\n */\n blockInitialAnimation: boolean;\n /**\n * A reference to this VisualElement's projection node, used in layout animations.\n */\n projection?: IProjectionNode;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n values: Map<string, MotionValue<any>>;\n /**\n * The AnimationState, this is hydrated by the animation Feature.\n */\n animationState?: AnimationState;\n KeyframeResolver: typeof KeyframeResolver;\n /**\n * The options used to create this VisualElement. The Options type is defined\n * by the inheriting VisualElement and is passed straight through to the render functions.\n */\n readonly options: Options;\n /**\n * A reference to the latest props provided to the VisualElement's host React component.\n */\n props: MotionProps;\n prevProps?: MotionProps;\n presenceContext: PresenceContextProps | null;\n prevPresenceContext?: PresenceContextProps | null;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n private features;\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n private valueSubscriptions;\n /**\n * A reference to the ReducedMotionConfig passed to the VisualElement's host React component.\n */\n private reducedMotionConfig;\n /**\n * On mount, this will be hydrated with a callback to disconnect\n * this visual element from its parent on unmount.\n */\n private removeFromVariantTree;\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n private prevMotionValues;\n /**\n * When values are removed from all animation props we need to search\n * for a fallback value to animate to. These values are tracked in baseTarget.\n */\n private baseTarget;\n /**\n * Create an object of the values we initially animated from (if initial prop present).\n */\n private initialValues;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n private events;\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n private propEventSubscriptions;\n constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState, }: VisualElementOptions<Instance, RenderState>, options?: Options);\n mount(instance: Instance): void;\n unmount(): void;\n addChild(child: VisualElement): void;\n removeChild(child: VisualElement): void;\n private bindToMotionValue;\n sortNodePosition(other: VisualElement<Instance>): number;\n updateFeatures(): void;\n notifyUpdate: () => void;\n triggerBuild(): void;\n render: () => void;\n private renderScheduledAt;\n scheduleRender: () => void;\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox(): Box;\n getStaticValue(key: string): AnyResolvedKeyframe;\n setStaticValue(key: string, value: AnyResolvedKeyframe): void;\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props: MotionProps, presenceContext: PresenceContextProps | null): void;\n getProps(): MotionProps;\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name: string): motion_dom.Variant | undefined;\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition(): motion_dom.Transition<any> | undefined;\n getTransformPagePoint(): any;\n getClosestVariantNode(): VisualElement | undefined;\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child: VisualElement): (() => boolean) | undefined;\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key: string, value: MotionValue): void;\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key: string): void;\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key: string): boolean;\n /**\n * Get a motion value for this key. If called with a default\n * value, we'll create one if none exists.\n */\n getValue(key: string): MotionValue | undefined;\n getValue(key: string, defaultValue: AnyResolvedKeyframe | null): MotionValue;\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key: string, target?: AnyResolvedKeyframe | null): any;\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key: string, value: AnyResolvedKeyframe): void;\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key: string): ResolvedValues[string] | undefined | null;\n on<EventName extends keyof VisualElementEventCallbacks>(eventName: EventName, callback: VisualElementEventCallbacks[EventName]): VoidFunction;\n notify<EventName extends keyof VisualElementEventCallbacks>(eventName: EventName, ...args: any): void;\n scheduleRenderMicrotask(): void;\n}\n\ntype ScrapeMotionValuesFromProps = (props: MotionProps, prevProps: MotionProps, visualElement?: VisualElement) => {\n [key: string]: MotionValue | AnyResolvedKeyframe;\n};\ninterface VisualElementOptions<Instance, RenderState = any> {\n visualState: VisualState<Instance, RenderState>;\n parent?: VisualElement<unknown>;\n variantParent?: VisualElement<unknown>;\n presenceContext: PresenceContextProps | null;\n props: MotionProps;\n blockInitialAnimation?: boolean;\n reducedMotionConfig?: ReducedMotionConfig;\n}\n/**\n * A generic set of string/number values\n */\ninterface ResolvedValues {\n [key: string]: AnyResolvedKeyframe;\n}\ninterface VisualElementEventCallbacks {\n BeforeLayoutMeasure: () => void;\n LayoutMeasure: (layout: Box, prevLayout?: Box) => void;\n LayoutUpdate: (layout: Axis, prevLayout: Axis) => void;\n Update: (latest: ResolvedValues) => void;\n AnimationStart: (definition: AnimationDefinition) => void;\n AnimationComplete: (definition: AnimationDefinition) => void;\n LayoutAnimationStart: () => void;\n LayoutAnimationComplete: () => void;\n SetAxisTarget: () => void;\n Unmount: () => void;\n}\ntype CreateVisualElement<Props = {}, TagName extends keyof DOMMotionComponents | string = \"div\"> = (Component: TagName | string | React.ComponentType<Props>, options: VisualElementOptions<HTMLElement | SVGElement>) => VisualElement<HTMLElement | SVGElement>;\n\ndeclare const optimizedAppearDataAttribute: \"data-framer-appear-id\";\n\n/**\n * Expose only the needed part of the VisualElement interface to\n * ensure React types don't end up in the generic DOM bundle.\n */\ninterface WithAppearProps {\n props: {\n [optimizedAppearDataAttribute]?: string;\n values?: {\n [key: string]: MotionValue<number> | MotionValue<string>;\n };\n };\n}\ntype HandoffFunction = (storeId: string, valueName: string, frame: Batcher) => number | null;\n/**\n * The window global object acts as a bridge between our inline script\n * triggering the optimized appear animations, and Motion.\n */\ndeclare global {\n interface Window {\n MotionHandoffAnimation?: HandoffFunction;\n MotionHandoffMarkAsComplete?: (elementId: string) => void;\n MotionHandoffIsComplete?: (elementId: string) => boolean;\n MotionHasOptimisedAnimation?: (elementId?: string, valueName?: string) => boolean;\n MotionCancelOptimisedAnimation?: (elementId?: string, valueName?: string, frame?: Batcher, canResume?: boolean) => void;\n MotionCheckAppearSync?: (visualElement: WithAppearProps, valueName: string, value: MotionValue) => VoidFunction | void;\n MotionIsMounted?: boolean;\n }\n}\n\nexport { type AnimationType as A, type CreateVisualElement as C, type DOMMotionComponents as D, type ForwardRefComponent as F, type HTMLElements as H, type IProjectionNode as I, type MotionProps as M, PresenceContext as P, type ResolvedValues as R, type SVGMotionComponents as S, type VariantLabels as V, VisualElement as a, MotionConfigContext as b, type HTMLMotionProps as c, type HTMLMotionComponents as d, type VisualElementAnimationOptions as e, type HTMLRenderState as f, type ScrapeMotionValuesFromProps as g, type VisualState as h, SwitchLayoutGroupContext as i, type MotionStyle as j, type MotionTransform as k, type SVGAttributesAsMotionValues as l, makeUseVisualState as m, type SVGMotionProps as n, optimizedAppearDataAttribute as o, FlatTree as p };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;cAk1Bc0L;;;;;;UAMJC,eAAAA;;KAEDD,4BAAAA;;qBAEkBvL,sBAAsBA;;;;KAI5CyL,eAAAA,+CAA8DhL;;;;;;;6BAOlCgL;;;;sFAIyDhL;4CAC1C+K,2CAA2CxL,gBAAgB+J"}
|
package/util.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region ../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/util.d.cts
|
|
2
|
+
|
|
3
|
+
type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
|
|
4
|
+
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
5
|
+
type Omit<T, K$1 extends keyof T> = Pick<T, Exclude<keyof T, K$1>>;
|
|
6
|
+
type MakePartial<T, K$1 extends keyof T> = Omit<T, K$1> & InexactPartial<Pick<T, K$1>>;
|
|
7
|
+
type NoUndefined<T> = T extends undefined ? never : T;
|
|
8
|
+
type LoosePartial<T extends object> = InexactPartial<T> & {
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
type Mask<Keys extends PropertyKey> = { [K in Keys]?: true };
|
|
12
|
+
type InexactPartial<T> = { [P in keyof T]?: T[P] | undefined };
|
|
13
|
+
type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
14
|
+
readonly [Symbol.toStringTag]: string;
|
|
15
|
+
} | Date | Error | Generator | Promise<unknown> | RegExp;
|
|
16
|
+
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>;
|
|
17
|
+
type SomeObject = Record<PropertyKey, any>;
|
|
18
|
+
type Identity<T> = T;
|
|
19
|
+
type Flatten<T> = Identity<{ [k in keyof T]: T[k] }>;
|
|
20
|
+
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
21
|
+
type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : { [K in keyof A as K extends keyof B ? never : K]: A[K] } & { [K in keyof B]: B[K] }>;
|
|
22
|
+
type AnyFunc = (...args: any[]) => any;
|
|
23
|
+
type MaybeAsync<T> = T | Promise<T>;
|
|
24
|
+
type EnumValue = string | number;
|
|
25
|
+
type EnumLike = Readonly<Record<string, EnumValue>>;
|
|
26
|
+
type ToEnum<T extends EnumValue> = Flatten<{ [k in T]: k }>;
|
|
27
|
+
type Literal = string | number | bigint | boolean | null | undefined;
|
|
28
|
+
type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
29
|
+
type HasLength = {
|
|
30
|
+
length: number;
|
|
31
|
+
};
|
|
32
|
+
type Numeric = number | bigint | Date;
|
|
33
|
+
type PropValues = Record<string, Set<Primitive>>;
|
|
34
|
+
type PrimitiveSet = Set<Primitive>;
|
|
35
|
+
type EmptyToNever<T> = keyof T extends never ? never : T;
|
|
36
|
+
declare abstract class Class {
|
|
37
|
+
constructor(..._args: any[]);
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { AnyFunc, Class, EmptyToNever, EnumLike, Extend, Flatten, HasLength, IsAny, JWTAlgorithm, Literal, LoosePartial, MakePartial, MakeReadonly, Mask, MaybeAsync, NoUndefined, Numeric, Prettify, Primitive, PrimitiveSet, PropValues, ToEnum };
|
|
41
|
+
//# sourceMappingURL=util.d.ts.map
|
package/util.d.ts.map
ADDED
|
@@ -0,0 +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(..._args: any[]);\n}\n"],"x_google_ignoreList":[0],"mappings":"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"}
|
package/versions.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.d.ts","names":["version"],"sources":["../../../node_modules/.bun/zod@4.1.12/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"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ParameterObject, SchemaObject } from "./openapi30.js";
|
|
2
|
+
import { ParameterObject as ParameterObject$1, SchemaObject as SchemaObject$1 } from "./openapi31.js";
|
|
3
|
+
import { $ZodType, $ZodTypeInternals } from "./schemas.js";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.bun/@asteasolutions+zod-to-openapi@8.1.0+5954958163efbb2a/node_modules/@asteasolutions/zod-to-openapi/dist/zod-extensions.d.ts
|
|
6
|
+
type ExampleValue<T> = T extends Date ? string : T;
|
|
7
|
+
type ParameterObject$2 = ParameterObject | ParameterObject$1;
|
|
8
|
+
type SchemaObject$2 = SchemaObject | SchemaObject$1;
|
|
9
|
+
type UnionPreferredType = 'oneOf' | 'anyOf';
|
|
10
|
+
type ZodOpenAPIMetadata<T = any, E = ExampleValue<T>> = Omit<SchemaObject$2, 'example' | 'examples' | 'default'> & {
|
|
11
|
+
param?: Partial<ParameterObject$2> & {
|
|
12
|
+
example?: E;
|
|
13
|
+
};
|
|
14
|
+
example?: E;
|
|
15
|
+
examples?: E[];
|
|
16
|
+
default?: T;
|
|
17
|
+
_internal?: never;
|
|
18
|
+
};
|
|
19
|
+
interface OpenApiOptions {
|
|
20
|
+
unionPreferredType?: UnionPreferredType;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* Since this commit https://github.com/colinhacks/zod/commit/6707ebb14c885b1c577ce64a240475e26e3ff182
|
|
25
|
+
* zod started preserving metadata from functions. Since the ZodObject type contains some function types
|
|
26
|
+
* that also have generics this leads to a too deep type instantiation. We only use this type internally
|
|
27
|
+
* so I've opted to type the _internal metadata in the registry as any. However the Metadata.getInternalMetadata
|
|
28
|
+
* method has an explicit return type of ZodOpenAPIInternalMetadata.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
declare module 'zod' {
|
|
32
|
+
interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
|
|
33
|
+
openapi(metadata: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;
|
|
34
|
+
openapi(refId: string, metadata?: Partial<ZodOpenAPIMetadata<Input>>, options?: OpenApiOptions): this;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { ZodOpenAPIMetadata };
|
|
39
|
+
//# sourceMappingURL=zod-extensions.d.ts.map
|
|
@@ -0,0 +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","_1","Output","Input","Internals","$ZodTypeInternals","$ZodType","sideEffect","extendZodWithOpenApi"],"sources":["../../../node_modules/.bun/@asteasolutions+zod-to-openapi@8.1.0+5954958163efbb2a/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"}
|