@calcom/atoms 1.0.3
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/README.md +5 -0
- package/dist/AddressInput-Ci02wr5C.js +33 -0
- package/dist/AlbyPriceComponent-NqN1MEov.js +967 -0
- package/dist/Card-6fRR5Hwj.js +185 -0
- package/dist/DatePicker-9pbCidOU.js +27 -0
- package/dist/PhoneInput-ysQbrvjy.js +1405 -0
- package/dist/PoweredBy-AY0Afi6V.js +31 -0
- package/dist/UnpublishedEntity-epeaNFkK.js +23 -0
- package/dist/availability/AvailabilitySettings.d.ts +58 -0
- package/dist/availability/AvailabilitySettings.d.ts.map +1 -0
- package/dist/availability/index.d.ts +4 -0
- package/dist/availability/index.d.ts.map +1 -0
- package/dist/availability/types.d.ts +22 -0
- package/dist/availability/types.d.ts.map +1 -0
- package/dist/availability/wrappers/PlatformAvailabilitySettingsWrapper.d.ts +18 -0
- package/dist/availability/wrappers/PlatformAvailabilitySettingsWrapper.d.ts.map +1 -0
- package/dist/availability/wrappers/WebAvailabilitySettingsWrapper.d.ts +2 -0
- package/dist/availability/wrappers/WebAvailabilitySettingsWrapper.d.ts.map +1 -0
- package/dist/booker/Booker.stories.d.ts +7 -0
- package/dist/booker/Booker.stories.d.ts.map +1 -0
- package/dist/booker/BookerPlatformWrapper.d.ts +24 -0
- package/dist/booker/BookerPlatformWrapper.d.ts.map +1 -0
- package/dist/booker/BookerWebWrapper.d.ts +5 -0
- package/dist/booker/BookerWebWrapper.d.ts.map +1 -0
- package/dist/booker/export.d.ts +4 -0
- package/dist/booker/export.d.ts.map +1 -0
- package/dist/booker/index.d.ts +3 -0
- package/dist/booker/index.d.ts.map +1 -0
- package/dist/cal-atoms.js +9 -0
- package/dist/cal-atoms.umd.cjs +577 -0
- package/dist/cal-provider/BaseCalProvider.d.ts +4 -0
- package/dist/cal-provider/BaseCalProvider.d.ts.map +1 -0
- package/dist/cal-provider/CalProvider.d.ts +14 -0
- package/dist/cal-provider/CalProvider.d.ts.map +1 -0
- package/dist/cal-provider/index.d.ts +2 -0
- package/dist/cal-provider/index.d.ts.map +1 -0
- package/dist/framer-features-Zr_i_7k0.js +443 -0
- package/dist/gcal-connect/GcalConnect.d.ts +9 -0
- package/dist/gcal-connect/GcalConnect.d.ts.map +1 -0
- package/dist/gcal-connect/index.d.ts +2 -0
- package/dist/gcal-connect/index.d.ts.map +1 -0
- package/dist/globals.min.css +1 -0
- package/dist/hooks/useApiKeys.d.ts +10 -0
- package/dist/hooks/useApiKeys.d.ts.map +1 -0
- package/dist/hooks/useAtomsContext.d.ts +31 -0
- package/dist/hooks/useAtomsContext.d.ts.map +1 -0
- package/dist/hooks/useAvailableSlots.d.ts +6 -0
- package/dist/hooks/useAvailableSlots.d.ts.map +1 -0
- package/dist/hooks/useBookings.d.ts +3 -0
- package/dist/hooks/useBookings.d.ts.map +1 -0
- package/dist/hooks/useCalendarsBusyTimes.d.ts +10 -0
- package/dist/hooks/useCalendarsBusyTimes.d.ts.map +1 -0
- package/dist/hooks/useClientSchedule.d.ts +8 -0
- package/dist/hooks/useClientSchedule.d.ts.map +1 -0
- package/dist/hooks/useConnectedCalendars.d.ts +3 -0
- package/dist/hooks/useConnectedCalendars.d.ts.map +1 -0
- package/dist/hooks/useCreateBooking.d.ts +169 -0
- package/dist/hooks/useCreateBooking.d.ts.map +1 -0
- package/dist/hooks/useCreateInstantBooking.d.ts +169 -0
- package/dist/hooks/useCreateInstantBooking.d.ts.map +1 -0
- package/dist/hooks/useCreateRecurringBooking.d.ts +154 -0
- package/dist/hooks/useCreateRecurringBooking.d.ts.map +1 -0
- package/dist/hooks/useDeleteSchedule.d.ts +11 -0
- package/dist/hooks/useDeleteSchedule.d.ts.map +1 -0
- package/dist/hooks/useDeleteSelectedSlot.d.ts +8 -0
- package/dist/hooks/useDeleteSelectedSlot.d.ts.map +1 -0
- package/dist/hooks/useGcal.d.ts +9 -0
- package/dist/hooks/useGcal.d.ts.map +1 -0
- package/dist/hooks/useGetCityTimezones.d.ts +6 -0
- package/dist/hooks/useGetCityTimezones.d.ts.map +1 -0
- package/dist/hooks/useHandleBookEvent.d.ts +15 -0
- package/dist/hooks/useHandleBookEvent.d.ts.map +1 -0
- package/dist/hooks/useIsPlatform.d.ts +2 -0
- package/dist/hooks/useIsPlatform.d.ts.map +1 -0
- package/dist/hooks/useMe.d.ts +12 -0
- package/dist/hooks/useMe.d.ts.map +1 -0
- package/dist/hooks/useOAuthClient.d.ts +11 -0
- package/dist/hooks/useOAuthClient.d.ts.map +1 -0
- package/dist/hooks/useOAuthFlow.d.ts +12 -0
- package/dist/hooks/useOAuthFlow.d.ts.map +1 -0
- package/dist/hooks/usePublicEvent.d.ts +958 -0
- package/dist/hooks/usePublicEvent.d.ts.map +1 -0
- package/dist/hooks/useReserveSlot.d.ts +8 -0
- package/dist/hooks/useReserveSlot.d.ts.map +1 -0
- package/dist/hooks/useSlots.d.ts +11 -0
- package/dist/hooks/useSlots.d.ts.map +1 -0
- package/dist/hooks/useTimezone.d.ts +2 -0
- package/dist/hooks/useTimezone.d.ts.map +1 -0
- package/dist/hooks/useUpdateSchedule.d.ts +9 -0
- package/dist/hooks/useUpdateSchedule.d.ts.map +1 -0
- package/dist/hooks/useUpdateUserTimezone.d.ts +15 -0
- package/dist/hooks/useUpdateUserTimezone.d.ts.map +1 -0
- package/dist/index--Pb54wx_.js +4 -0
- package/dist/index-3sgDY24S.js +5 -0
- package/dist/index-GttMIx74.js +65366 -0
- package/dist/index-RcPlEXh-.js +220 -0
- package/dist/index-rUbdQ7Zu.js +1256 -0
- package/dist/index-uuiJumv6.js +76 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/isSupportedCountry-WVb-DZDd.js +487 -0
- package/dist/lib/getQueryParam.d.ts +3 -0
- package/dist/lib/getQueryParam.d.ts.map +1 -0
- package/dist/lib/http.d.ts +18 -0
- package/dist/lib/http.d.ts.map +1 -0
- package/dist/lib/setQueryParam.d.ts +3 -0
- package/dist/lib/setQueryParam.d.ts.map +1 -0
- package/dist/monorepo.d.ts +9 -0
- package/dist/monorepo.d.ts.map +1 -0
- package/dist/server.browser-yA5s9iMO.js +9859 -0
- package/dist/src/components/ui/button.d.ts +12 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/confirmation-dialog-content.d.ts +4 -0
- package/dist/src/components/ui/confirmation-dialog-content.d.ts.map +1 -0
- package/dist/src/components/ui/dialog.d.ts +20 -0
- package/dist/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/components/ui/shell.d.ts +3 -0
- package/dist/src/components/ui/shell.d.ts.map +1 -0
- package/dist/src/components/ui/toast.d.ts +16 -0
- package/dist/src/components/ui/toast.d.ts.map +1 -0
- package/dist/src/components/ui/toaster.d.ts +3 -0
- package/dist/src/components/ui/toaster.d.ts.map +1 -0
- package/dist/src/components/ui/use-toast.d.ts +45 -0
- package/dist/src/components/ui/use-toast.d.ts.map +1 -0
- package/dist/src/lib/utils.d.ts +3 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/dist/timezone/index.d.ts +4 -0
- package/dist/timezone/index.d.ts.map +1 -0
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CalProviderProps } from "./CalProvider";
|
|
3
|
+
export declare function BaseCalProvider({ clientId, accessToken, options, children, autoUpdateTimezone, onTimezoneChange, }: CalProviderProps): JSX.Element;
|
|
4
|
+
//# sourceMappingURL=BaseCalProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseCalProvider.d.ts","sourceRoot":"","sources":["../../cal-provider/BaseCalProvider.tsx"],"names":[],"mappings":";AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAItD,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,GACjB,EAAE,gBAAgB,eAwFlB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type CalProviderProps = {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
clientId: string;
|
|
5
|
+
accessToken: string;
|
|
6
|
+
options: {
|
|
7
|
+
refreshUrl?: string;
|
|
8
|
+
apiUrl: string;
|
|
9
|
+
};
|
|
10
|
+
autoUpdateTimezone?: boolean;
|
|
11
|
+
onTimezoneChange?: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function CalProvider({ clientId, accessToken, options, children, autoUpdateTimezone, onTimezoneChange, }: CalProviderProps): JSX.Element;
|
|
14
|
+
//# sourceMappingURL=CalProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalProvider.d.ts","sourceRoot":"","sources":["../../cal-provider/CalProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAQ,EACR,kBAAyB,EACzB,gBAAgB,GACjB,EAAE,gBAAgB,eAalB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../cal-provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { aH as L, aI as V, aJ as H, aK as G, aL as Y, aM as j, aN as W, aO as q, aP as re, aQ as ie, aR as oe, aS as ae } from "./index-GttMIx74.js";
|
|
2
|
+
function b(t, e, n, s = { passive: !0 }) {
|
|
3
|
+
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
|
|
4
|
+
}
|
|
5
|
+
const ce = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1;
|
|
6
|
+
function Z(t, e = "page") {
|
|
7
|
+
return {
|
|
8
|
+
point: {
|
|
9
|
+
x: t[e + "X"],
|
|
10
|
+
y: t[e + "Y"]
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const ue = (t) => (e) => ce(e) && t(e, Z(e));
|
|
15
|
+
function O(t, e, n, s) {
|
|
16
|
+
return b(t, e, ue(n), s);
|
|
17
|
+
}
|
|
18
|
+
function $(t) {
|
|
19
|
+
let e = null;
|
|
20
|
+
return () => {
|
|
21
|
+
const n = () => {
|
|
22
|
+
e = null;
|
|
23
|
+
};
|
|
24
|
+
return e === null ? (e = t, n) : !1;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const _ = $("dragHorizontal"), Q = $("dragVertical");
|
|
28
|
+
function le(t) {
|
|
29
|
+
let e = !1;
|
|
30
|
+
if (t === "y")
|
|
31
|
+
e = Q();
|
|
32
|
+
else if (t === "x")
|
|
33
|
+
e = _();
|
|
34
|
+
else {
|
|
35
|
+
const n = _(), s = Q();
|
|
36
|
+
n && s ? e = () => {
|
|
37
|
+
n(), s();
|
|
38
|
+
} : (n && n(), s && s());
|
|
39
|
+
}
|
|
40
|
+
return e;
|
|
41
|
+
}
|
|
42
|
+
function ee() {
|
|
43
|
+
const t = le(!0);
|
|
44
|
+
return t ? (t(), !1) : !0;
|
|
45
|
+
}
|
|
46
|
+
class w {
|
|
47
|
+
constructor(e) {
|
|
48
|
+
this.isMounted = !1, this.node = e;
|
|
49
|
+
}
|
|
50
|
+
update() {
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function X(t, e) {
|
|
54
|
+
const n = "pointer" + (e ? "enter" : "leave"), s = "onHover" + (e ? "Start" : "End"), o = (a, l) => {
|
|
55
|
+
if (a.type === "touch" || ee())
|
|
56
|
+
return;
|
|
57
|
+
const c = t.getProps();
|
|
58
|
+
t.animationState && c.whileHover && t.animationState.setActive("whileHover", e), c[s] && V.update(() => c[s](a, l));
|
|
59
|
+
};
|
|
60
|
+
return O(t.current, n, o, {
|
|
61
|
+
passive: !t.getProps()[s]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
class he extends w {
|
|
65
|
+
mount() {
|
|
66
|
+
this.unmount = L(X(this.node, !0), X(this.node, !1));
|
|
67
|
+
}
|
|
68
|
+
unmount() {
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
class de extends w {
|
|
72
|
+
constructor() {
|
|
73
|
+
super(...arguments), this.isActive = !1;
|
|
74
|
+
}
|
|
75
|
+
onFocus() {
|
|
76
|
+
let e = !1;
|
|
77
|
+
try {
|
|
78
|
+
e = this.node.current.matches(":focus-visible");
|
|
79
|
+
} catch {
|
|
80
|
+
e = !0;
|
|
81
|
+
}
|
|
82
|
+
!e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
|
|
83
|
+
}
|
|
84
|
+
onBlur() {
|
|
85
|
+
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
86
|
+
}
|
|
87
|
+
mount() {
|
|
88
|
+
this.unmount = L(b(this.node.current, "focus", () => this.onFocus()), b(this.node.current, "blur", () => this.onBlur()));
|
|
89
|
+
}
|
|
90
|
+
unmount() {
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const te = (t, e) => e ? t === e ? !0 : te(t, e.parentElement) : !1;
|
|
94
|
+
function K(t, e) {
|
|
95
|
+
if (!e)
|
|
96
|
+
return;
|
|
97
|
+
const n = new PointerEvent("pointer" + t);
|
|
98
|
+
e(n, Z(n));
|
|
99
|
+
}
|
|
100
|
+
class fe extends w {
|
|
101
|
+
constructor() {
|
|
102
|
+
super(...arguments), this.removeStartListeners = H, this.removeEndListeners = H, this.removeAccessibleListeners = H, this.startPointerPress = (e, n) => {
|
|
103
|
+
if (this.removeEndListeners(), this.isPressing)
|
|
104
|
+
return;
|
|
105
|
+
const s = this.node.getProps(), a = O(window, "pointerup", (c, i) => {
|
|
106
|
+
if (!this.checkPressEnd())
|
|
107
|
+
return;
|
|
108
|
+
const { onTap: r, onTapCancel: u } = this.node.getProps();
|
|
109
|
+
V.update(() => {
|
|
110
|
+
te(this.node.current, c.target) ? r && r(c, i) : u && u(c, i);
|
|
111
|
+
});
|
|
112
|
+
}, { passive: !(s.onTap || s.onPointerUp) }), l = O(window, "pointercancel", (c, i) => this.cancelPress(c, i), { passive: !(s.onTapCancel || s.onPointerCancel) });
|
|
113
|
+
this.removeEndListeners = L(a, l), this.startPress(e, n);
|
|
114
|
+
}, this.startAccessiblePress = () => {
|
|
115
|
+
const e = (a) => {
|
|
116
|
+
if (a.key !== "Enter" || this.isPressing)
|
|
117
|
+
return;
|
|
118
|
+
const l = (c) => {
|
|
119
|
+
c.key !== "Enter" || !this.checkPressEnd() || K("up", (i, r) => {
|
|
120
|
+
const { onTap: u } = this.node.getProps();
|
|
121
|
+
u && V.update(() => u(i, r));
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
this.removeEndListeners(), this.removeEndListeners = b(this.node.current, "keyup", l), K("down", (c, i) => {
|
|
125
|
+
this.startPress(c, i);
|
|
126
|
+
});
|
|
127
|
+
}, n = b(this.node.current, "keydown", e), s = () => {
|
|
128
|
+
this.isPressing && K("cancel", (a, l) => this.cancelPress(a, l));
|
|
129
|
+
}, o = b(this.node.current, "blur", s);
|
|
130
|
+
this.removeAccessibleListeners = L(n, o);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
startPress(e, n) {
|
|
134
|
+
this.isPressing = !0;
|
|
135
|
+
const { onTapStart: s, whileTap: o } = this.node.getProps();
|
|
136
|
+
o && this.node.animationState && this.node.animationState.setActive("whileTap", !0), s && V.update(() => s(e, n));
|
|
137
|
+
}
|
|
138
|
+
checkPressEnd() {
|
|
139
|
+
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !ee();
|
|
140
|
+
}
|
|
141
|
+
cancelPress(e, n) {
|
|
142
|
+
if (!this.checkPressEnd())
|
|
143
|
+
return;
|
|
144
|
+
const { onTapCancel: s } = this.node.getProps();
|
|
145
|
+
s && V.update(() => s(e, n));
|
|
146
|
+
}
|
|
147
|
+
mount() {
|
|
148
|
+
const e = this.node.getProps(), n = O(this.node.current, "pointerdown", this.startPointerPress, { passive: !(e.onTapStart || e.onPointerStart) }), s = b(this.node.current, "focus", this.startAccessiblePress);
|
|
149
|
+
this.removeStartListeners = L(n, s);
|
|
150
|
+
}
|
|
151
|
+
unmount() {
|
|
152
|
+
this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const M = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), pe = (t) => {
|
|
156
|
+
const e = M.get(t.target);
|
|
157
|
+
e && e(t);
|
|
158
|
+
}, me = (t) => {
|
|
159
|
+
t.forEach(pe);
|
|
160
|
+
};
|
|
161
|
+
function ve({ root: t, ...e }) {
|
|
162
|
+
const n = t || document;
|
|
163
|
+
D.has(n) || D.set(n, {});
|
|
164
|
+
const s = D.get(n), o = JSON.stringify(e);
|
|
165
|
+
return s[o] || (s[o] = new IntersectionObserver(me, { root: t, ...e })), s[o];
|
|
166
|
+
}
|
|
167
|
+
function Pe(t, e, n) {
|
|
168
|
+
const s = ve(e);
|
|
169
|
+
return M.set(t, n), s.observe(t), () => {
|
|
170
|
+
M.delete(t), s.unobserve(t);
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
const ge = {
|
|
174
|
+
some: 0,
|
|
175
|
+
all: 1
|
|
176
|
+
};
|
|
177
|
+
class Ae extends w {
|
|
178
|
+
constructor() {
|
|
179
|
+
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
180
|
+
}
|
|
181
|
+
startObserver() {
|
|
182
|
+
this.unmount();
|
|
183
|
+
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: o = "some", once: a } = e, l = {
|
|
184
|
+
root: n ? n.current : void 0,
|
|
185
|
+
rootMargin: s,
|
|
186
|
+
threshold: typeof o == "number" ? o : ge[o]
|
|
187
|
+
}, c = (i) => {
|
|
188
|
+
const { isIntersecting: r } = i;
|
|
189
|
+
if (this.isInView === r || (this.isInView = r, a && !r && this.hasEnteredView))
|
|
190
|
+
return;
|
|
191
|
+
r && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", r);
|
|
192
|
+
const { onViewportEnter: u, onViewportLeave: p } = this.node.getProps(), m = r ? u : p;
|
|
193
|
+
m && m(i);
|
|
194
|
+
};
|
|
195
|
+
return Pe(this.node.current, l, c);
|
|
196
|
+
}
|
|
197
|
+
mount() {
|
|
198
|
+
this.startObserver();
|
|
199
|
+
}
|
|
200
|
+
update() {
|
|
201
|
+
if (typeof IntersectionObserver > "u")
|
|
202
|
+
return;
|
|
203
|
+
const { props: e, prevProps: n } = this.node;
|
|
204
|
+
["amount", "margin", "root"].some(ye(e, n)) && this.startObserver();
|
|
205
|
+
}
|
|
206
|
+
unmount() {
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function ye({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
210
|
+
return (n) => t[n] !== e[n];
|
|
211
|
+
}
|
|
212
|
+
const be = {
|
|
213
|
+
inView: {
|
|
214
|
+
Feature: Ae
|
|
215
|
+
},
|
|
216
|
+
tap: {
|
|
217
|
+
Feature: fe
|
|
218
|
+
},
|
|
219
|
+
focus: {
|
|
220
|
+
Feature: de
|
|
221
|
+
},
|
|
222
|
+
hover: {
|
|
223
|
+
Feature: he
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
function ne(t, e) {
|
|
227
|
+
if (!Array.isArray(e))
|
|
228
|
+
return !1;
|
|
229
|
+
const n = e.length;
|
|
230
|
+
if (n !== t.length)
|
|
231
|
+
return !1;
|
|
232
|
+
for (let s = 0; s < n; s++)
|
|
233
|
+
if (e[s] !== t[s])
|
|
234
|
+
return !1;
|
|
235
|
+
return !0;
|
|
236
|
+
}
|
|
237
|
+
function B(t, e, n = {}) {
|
|
238
|
+
const s = G(t, e, n.custom);
|
|
239
|
+
let { transition: o = t.getDefaultTransition() || {} } = s || {};
|
|
240
|
+
n.transitionOverride && (o = n.transitionOverride);
|
|
241
|
+
const a = s ? () => Promise.all(Y(t, s, n)) : () => Promise.resolve(), l = t.variantChildren && t.variantChildren.size ? (i = 0) => {
|
|
242
|
+
const { delayChildren: r = 0, staggerChildren: u, staggerDirection: p } = o;
|
|
243
|
+
return we(t, e, r + i, u, p, n);
|
|
244
|
+
} : () => Promise.resolve(), { when: c } = o;
|
|
245
|
+
if (c) {
|
|
246
|
+
const [i, r] = c === "beforeChildren" ? [a, l] : [l, a];
|
|
247
|
+
return i().then(() => r());
|
|
248
|
+
} else
|
|
249
|
+
return Promise.all([a(), l(n.delay)]);
|
|
250
|
+
}
|
|
251
|
+
function we(t, e, n = 0, s = 0, o = 1, a) {
|
|
252
|
+
const l = [], c = (t.variantChildren.size - 1) * s, i = o === 1 ? (r = 0) => r * s : (r = 0) => c - r * s;
|
|
253
|
+
return Array.from(t.variantChildren).sort(Se).forEach((r, u) => {
|
|
254
|
+
r.notify("AnimationStart", e), l.push(B(r, e, {
|
|
255
|
+
...a,
|
|
256
|
+
delay: n + i(u)
|
|
257
|
+
}).then(() => r.notify("AnimationComplete", e)));
|
|
258
|
+
}), Promise.all(l);
|
|
259
|
+
}
|
|
260
|
+
function Se(t, e) {
|
|
261
|
+
return t.sortNodePosition(e);
|
|
262
|
+
}
|
|
263
|
+
function Ce(t, e, n = {}) {
|
|
264
|
+
t.notify("AnimationStart", e);
|
|
265
|
+
let s;
|
|
266
|
+
if (Array.isArray(e)) {
|
|
267
|
+
const o = e.map((a) => B(t, a, n));
|
|
268
|
+
s = Promise.all(o);
|
|
269
|
+
} else if (typeof e == "string")
|
|
270
|
+
s = B(t, e, n);
|
|
271
|
+
else {
|
|
272
|
+
const o = typeof e == "function" ? G(t, e, n.custom) : e;
|
|
273
|
+
s = Promise.all(Y(t, o, n));
|
|
274
|
+
}
|
|
275
|
+
return s.then(() => t.notify("AnimationComplete", e));
|
|
276
|
+
}
|
|
277
|
+
const Ve = [...q].reverse(), Le = q.length;
|
|
278
|
+
function ke(t) {
|
|
279
|
+
return (e) => Promise.all(e.map(({ animation: n, options: s }) => Ce(t, n, s)));
|
|
280
|
+
}
|
|
281
|
+
function Oe(t) {
|
|
282
|
+
let e = ke(t);
|
|
283
|
+
const n = Ie();
|
|
284
|
+
let s = !0;
|
|
285
|
+
const o = (i, r) => {
|
|
286
|
+
const u = G(t, r);
|
|
287
|
+
if (u) {
|
|
288
|
+
const { transition: p, transitionEnd: m, ...v } = u;
|
|
289
|
+
i = { ...i, ...v, ...m };
|
|
290
|
+
}
|
|
291
|
+
return i;
|
|
292
|
+
};
|
|
293
|
+
function a(i) {
|
|
294
|
+
e = i(t);
|
|
295
|
+
}
|
|
296
|
+
function l(i, r) {
|
|
297
|
+
const u = t.getProps(), p = t.getVariantContext(!0) || {}, m = [], v = /* @__PURE__ */ new Set();
|
|
298
|
+
let g = {}, R = 1 / 0;
|
|
299
|
+
for (let A = 0; A < Le; A++) {
|
|
300
|
+
const f = Ve[A], h = n[f], P = u[f] !== void 0 ? u[f] : p[f], T = re(P), I = f === r ? h.isActive : null;
|
|
301
|
+
I === !1 && (R = A);
|
|
302
|
+
let k = P === p[f] && P !== u[f] && T;
|
|
303
|
+
if (k && s && t.manuallyAnimateOnMount && (k = !1), h.protectedKeys = { ...g }, // If it isn't active and hasn't *just* been set as inactive
|
|
304
|
+
!h.isActive && I === null || // If we didn't and don't have any defined prop for this animation type
|
|
305
|
+
!P && !h.prevProp || // Or if the prop doesn't define an animation
|
|
306
|
+
j(P) || typeof P == "boolean")
|
|
307
|
+
continue;
|
|
308
|
+
const N = Te(h.prevProp, P);
|
|
309
|
+
let x = N || // If we're making this variant active, we want to always make it active
|
|
310
|
+
f === r && h.isActive && !k && T || // If we removed a higher-priority variant (i is in reverse order)
|
|
311
|
+
A > R && T;
|
|
312
|
+
const U = Array.isArray(P) ? P : [P];
|
|
313
|
+
let S = U.reduce(o, {});
|
|
314
|
+
I === !1 && (S = {});
|
|
315
|
+
const { prevResolvedValues: J = {} } = h, se = {
|
|
316
|
+
...J,
|
|
317
|
+
...S
|
|
318
|
+
}, F = (d) => {
|
|
319
|
+
x = !0, v.delete(d), h.needsAnimating[d] = !0;
|
|
320
|
+
};
|
|
321
|
+
for (const d in se) {
|
|
322
|
+
const C = S[d], E = J[d];
|
|
323
|
+
g.hasOwnProperty(d) || (C !== E ? W(C) && W(E) ? !ne(C, E) || N ? F(d) : h.protectedKeys[d] = !0 : C !== void 0 ? F(d) : v.add(d) : C !== void 0 && v.has(d) ? F(d) : h.protectedKeys[d] = !0);
|
|
324
|
+
}
|
|
325
|
+
h.prevProp = P, h.prevResolvedValues = S, h.isActive && (g = { ...g, ...S }), s && t.blockInitialAnimation && (x = !1), x && !k && m.push(...U.map((d) => ({
|
|
326
|
+
animation: d,
|
|
327
|
+
options: { type: f, ...i }
|
|
328
|
+
})));
|
|
329
|
+
}
|
|
330
|
+
if (v.size) {
|
|
331
|
+
const A = {};
|
|
332
|
+
v.forEach((f) => {
|
|
333
|
+
const h = t.getBaseTarget(f);
|
|
334
|
+
h !== void 0 && (A[f] = h);
|
|
335
|
+
}), m.push({ animation: A });
|
|
336
|
+
}
|
|
337
|
+
let z = !!m.length;
|
|
338
|
+
return s && u.initial === !1 && !t.manuallyAnimateOnMount && (z = !1), s = !1, z ? e(m) : Promise.resolve();
|
|
339
|
+
}
|
|
340
|
+
function c(i, r, u) {
|
|
341
|
+
var p;
|
|
342
|
+
if (n[i].isActive === r)
|
|
343
|
+
return Promise.resolve();
|
|
344
|
+
(p = t.variantChildren) === null || p === void 0 || p.forEach((v) => {
|
|
345
|
+
var g;
|
|
346
|
+
return (g = v.animationState) === null || g === void 0 ? void 0 : g.setActive(i, r);
|
|
347
|
+
}), n[i].isActive = r;
|
|
348
|
+
const m = l(u, i);
|
|
349
|
+
for (const v in n)
|
|
350
|
+
n[v].protectedKeys = {};
|
|
351
|
+
return m;
|
|
352
|
+
}
|
|
353
|
+
return {
|
|
354
|
+
animateChanges: l,
|
|
355
|
+
setActive: c,
|
|
356
|
+
setAnimateFunction: a,
|
|
357
|
+
getState: () => n
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
function Te(t, e) {
|
|
361
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !ne(e, t) : !1;
|
|
362
|
+
}
|
|
363
|
+
function y(t = !1) {
|
|
364
|
+
return {
|
|
365
|
+
isActive: t,
|
|
366
|
+
protectedKeys: {},
|
|
367
|
+
needsAnimating: {},
|
|
368
|
+
prevResolvedValues: {}
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
function Ie() {
|
|
372
|
+
return {
|
|
373
|
+
animate: y(!0),
|
|
374
|
+
whileInView: y(),
|
|
375
|
+
whileHover: y(),
|
|
376
|
+
whileTap: y(),
|
|
377
|
+
whileDrag: y(),
|
|
378
|
+
whileFocus: y(),
|
|
379
|
+
exit: y()
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
class xe extends w {
|
|
383
|
+
/**
|
|
384
|
+
* We dynamically generate the AnimationState manager as it contains a reference
|
|
385
|
+
* to the underlying animation library. We only want to load that if we load this,
|
|
386
|
+
* so people can optionally code split it out using the `m` component.
|
|
387
|
+
*/
|
|
388
|
+
constructor(e) {
|
|
389
|
+
super(e), e.animationState || (e.animationState = Oe(e));
|
|
390
|
+
}
|
|
391
|
+
updateAnimationControlsSubscription() {
|
|
392
|
+
const { animate: e } = this.node.getProps();
|
|
393
|
+
this.unmount(), j(e) && (this.unmount = e.subscribe(this.node));
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
397
|
+
*/
|
|
398
|
+
mount() {
|
|
399
|
+
this.updateAnimationControlsSubscription();
|
|
400
|
+
}
|
|
401
|
+
update() {
|
|
402
|
+
const { animate: e } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
|
|
403
|
+
e !== n && this.updateAnimationControlsSubscription();
|
|
404
|
+
}
|
|
405
|
+
unmount() {
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
let Fe = 0;
|
|
409
|
+
class Ee extends w {
|
|
410
|
+
constructor() {
|
|
411
|
+
super(...arguments), this.id = Fe++;
|
|
412
|
+
}
|
|
413
|
+
update() {
|
|
414
|
+
if (!this.node.presenceContext)
|
|
415
|
+
return;
|
|
416
|
+
const { isPresent: e, onExitComplete: n, custom: s } = this.node.presenceContext, { isPresent: o } = this.node.prevPresenceContext || {};
|
|
417
|
+
if (!this.node.animationState || e === o)
|
|
418
|
+
return;
|
|
419
|
+
const a = this.node.animationState.setActive("exit", !e, { custom: s ?? this.node.getProps().custom });
|
|
420
|
+
n && !e && a.then(() => n(this.id));
|
|
421
|
+
}
|
|
422
|
+
mount() {
|
|
423
|
+
const { register: e } = this.node.presenceContext || {};
|
|
424
|
+
e && (this.unmount = e(this.id));
|
|
425
|
+
}
|
|
426
|
+
unmount() {
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
const He = {
|
|
430
|
+
animation: {
|
|
431
|
+
Feature: xe
|
|
432
|
+
},
|
|
433
|
+
exit: {
|
|
434
|
+
Feature: Ee
|
|
435
|
+
}
|
|
436
|
+
}, Ke = (t, e) => ie(t) ? new oe(e, { enableHardwareAcceleration: !1 }) : new ae(e, { enableHardwareAcceleration: !0 }), Me = {
|
|
437
|
+
renderer: Ke,
|
|
438
|
+
...He,
|
|
439
|
+
...be
|
|
440
|
+
};
|
|
441
|
+
export {
|
|
442
|
+
Me as default
|
|
443
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GcalConnect.d.ts","sourceRoot":"","sources":["../../gcal-connect/GcalConnect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAShC,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAqB5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../gcal-connect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|