@chrryai/chrry 1.4.73 → 1.4.75
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 +10 -0
- package/dist/index.js +15 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -243,6 +243,16 @@ See [LICENSE](LICENSE) for details.
|
|
|
243
243
|
|
|
244
244
|
- **Website:** [chrry.dev](https://chrry.dev)
|
|
245
245
|
- **Documentation:** [chrry.dev/docs](https://chrry.dev/docs)
|
|
246
|
+
- **Component Documentation**:
|
|
247
|
+
- [Chat](./Chat.README.md)
|
|
248
|
+
- [Message](./Message.README.md)
|
|
249
|
+
- [Agent](./Agent.README.md)
|
|
250
|
+
- [Instructions](./Instructions.README.md)
|
|
251
|
+
- [MemoryConsent](./MemoryConsent.README.md)
|
|
252
|
+
- [CharacterProfiles](./CharacterProfiles.README.md)
|
|
253
|
+
- [EmptyStateTips](./EmptyStateTips.README.md)
|
|
254
|
+
- [Modal](./Modal.README.md)
|
|
255
|
+
- [Sidebar](./Sidebar.README.md)
|
|
246
256
|
- **GitHub:** [@chrryai/chrry](https://github.com/chrryai/chrry)
|
|
247
257
|
- **npm:** [@chrryai/chrry](https://www.npmjs.com/package/@chrryai/chrry)
|
|
248
258
|
- **Chrry:** [chrry.ai](https://chrry.ai)
|
package/dist/index.js
CHANGED
|
@@ -1899,7 +1899,7 @@ var init_utils = __esm({
|
|
|
1899
1899
|
};
|
|
1900
1900
|
isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes("Firefox");
|
|
1901
1901
|
config = getSiteConfig(getClientHostname());
|
|
1902
|
-
VERSION = config.version || "1.4.
|
|
1902
|
+
VERSION = config.version || "1.4.75";
|
|
1903
1903
|
getSlugFromPathname = (path) => {
|
|
1904
1904
|
return getAppAndStoreSlugs(path, {
|
|
1905
1905
|
defaultAppSlug: config.slug,
|
|
@@ -23012,6 +23012,7 @@ function AuthProvider({
|
|
|
23012
23012
|
}) {
|
|
23013
23013
|
const [wasGifted, setWasGifted] = (0, import_react19.useState)(false);
|
|
23014
23014
|
const [session2, setSession] = (0, import_react19.useState)(props.session);
|
|
23015
|
+
const { searchParams, removeParams, pathname, addParams, ...router } = useNavigation();
|
|
23015
23016
|
(0, import_react19.useEffect)(() => {
|
|
23016
23017
|
if (error) {
|
|
23017
23018
|
import_react_hot_toast.default.error(error);
|
|
@@ -23036,6 +23037,7 @@ function AuthProvider({
|
|
|
23036
23037
|
session2?.deviceId
|
|
23037
23038
|
);
|
|
23038
23039
|
const { isStorageReady } = usePlatform();
|
|
23040
|
+
const fingerprintParam = searchParams.get("fp") || "";
|
|
23039
23041
|
(0, import_react19.useEffect)(() => {
|
|
23040
23042
|
if (!deviceId && isStorageReady) {
|
|
23041
23043
|
console.log("\u{1F4DD} Updating deviceId from session:", session2?.deviceId);
|
|
@@ -23046,7 +23048,7 @@ function AuthProvider({
|
|
|
23046
23048
|
const [shouldFetchSession, setShouldFetchSession] = (0, import_react19.useState)(!session2);
|
|
23047
23049
|
const [fingerprint, setFingerprint] = useCookieOrLocalStorage(
|
|
23048
23050
|
"fingerprint",
|
|
23049
|
-
session2?.guest?.fingerprint || session2?.user?.fingerprint ||
|
|
23051
|
+
session2?.guest?.fingerprint || session2?.user?.fingerprint || fingerprintParam
|
|
23050
23052
|
);
|
|
23051
23053
|
const [token, setTokenInternal] = useCookieOrLocalStorage(
|
|
23052
23054
|
"token",
|
|
@@ -23096,15 +23098,17 @@ function AuthProvider({
|
|
|
23096
23098
|
);
|
|
23097
23099
|
const TEST_MEMBER_FINGERPRINTS = session2?.TEST_MEMBER_FINGERPRINTS || [];
|
|
23098
23100
|
const TEST_GUEST_FINGERPRINTS = session2?.TEST_GUEST_FINGERPRINTS || [];
|
|
23101
|
+
console.log(
|
|
23102
|
+
`\u{1F680} ~ AuthProvider ~ TEST_GUEST_FINGERPRINTS:`,
|
|
23103
|
+
TEST_GUEST_FINGERPRINTS
|
|
23104
|
+
);
|
|
23099
23105
|
const TEST_MEMBER_EMAILS = session2?.TEST_MEMBER_EMAILS || [];
|
|
23100
|
-
const { searchParams, removeParams, pathname, addParams, ...router } = useNavigation();
|
|
23101
23106
|
const [taskId, setTaskId] = (0, import_react19.useState)(
|
|
23102
23107
|
searchParams.get("taskId") || void 0
|
|
23103
23108
|
);
|
|
23104
23109
|
(0, import_react19.useEffect)(() => {
|
|
23105
23110
|
setTaskId(searchParams.get("taskId") || void 0);
|
|
23106
23111
|
}, [searchParams]);
|
|
23107
|
-
const fingerprintParam = searchParams.get("fp") || "";
|
|
23108
23112
|
const [isGuestTest, setIsLiveGuestTest] = useLocalStorage2(
|
|
23109
23113
|
"isGuestTest",
|
|
23110
23114
|
fingerprintParam ? TEST_GUEST_FINGERPRINTS.includes(fingerprintParam) : false
|
|
@@ -23113,9 +23117,10 @@ function AuthProvider({
|
|
|
23113
23117
|
"isMemberTest",
|
|
23114
23118
|
fingerprintParam ? TEST_MEMBER_FINGERPRINTS.includes(fingerprintParam) : false
|
|
23115
23119
|
);
|
|
23120
|
+
const isLiveTest = isGuestTest || isMemberTest;
|
|
23116
23121
|
const [signInPart, setSignInPartInternal] = import_react19.default.useState(void 0);
|
|
23117
23122
|
const setSignInPart = (part) => {
|
|
23118
|
-
const newPart = !!user ? void 0 : part;
|
|
23123
|
+
const newPart = part && isLiveTest ? "credentials" : !!user ? void 0 : part;
|
|
23119
23124
|
setSignInPartInternal(newPart);
|
|
23120
23125
|
if (newPart) {
|
|
23121
23126
|
addParams({ signIn: newPart });
|
|
@@ -23174,7 +23179,6 @@ function AuthProvider({
|
|
|
23174
23179
|
isPWA
|
|
23175
23180
|
});
|
|
23176
23181
|
};
|
|
23177
|
-
const isLiveTest = isGuestTest || isMemberTest;
|
|
23178
23182
|
const getAppSlug = (targetApp, defaultSlug = "/") => {
|
|
23179
23183
|
const localeMatch = locales.find(
|
|
23180
23184
|
(loc) => pathname === `/${loc}` || pathname.startsWith(`/${loc}/`)
|
|
@@ -24126,7 +24130,7 @@ function DataProvider({ children, ...rest }) {
|
|
|
24126
24130
|
const [instructions, setInstructions] = (0, import_react21.useState)([]);
|
|
24127
24131
|
const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
|
|
24128
24132
|
const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
|
|
24129
|
-
const VERSION4 = "1.4.
|
|
24133
|
+
const VERSION4 = "1.4.75";
|
|
24130
24134
|
const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
|
|
24131
24135
|
const {
|
|
24132
24136
|
API_URL: API_URL2,
|
|
@@ -40420,10 +40424,10 @@ function EmptyStateTips({
|
|
|
40420
40424
|
}
|
|
40421
40425
|
];
|
|
40422
40426
|
return /* @__PURE__ */ import_react61.default.createElement(Section, { style: { ...styles4.emptyStateTips, ...style2 } }, /* @__PURE__ */ import_react61.default.createElement(H3, { style: { marginBottom: 10, marginTop: 0 } }, getTitle()), /* @__PURE__ */ import_react61.default.createElement(Div, { style: { ...styles4.ul.style } }, builderTips.map((item, i) => {
|
|
40423
|
-
if (viewPortHeight < 600 && i >=
|
|
40424
|
-
if (viewPortHeight < 700 && i >=
|
|
40425
|
-
if (viewPortHeight < 800 && i >=
|
|
40426
|
-
if (viewPortHeight < 900 && i >=
|
|
40427
|
+
if (viewPortHeight < 600 && i >= 2) return null;
|
|
40428
|
+
if (viewPortHeight < 700 && i >= 3) return null;
|
|
40429
|
+
if (viewPortHeight < 800 && i >= 4) return null;
|
|
40430
|
+
if (viewPortHeight < 900 && i >= 5) return null;
|
|
40427
40431
|
return /* @__PURE__ */ import_react61.default.createElement(Div, { key: i, style: styles4.tip.style }, /* @__PURE__ */ import_react61.default.createElement(Span, { style: styles4.tipText.style }, item.tip), /* @__PURE__ */ import_react61.default.createElement(Span, null, " ", item.emoji));
|
|
40428
40432
|
})));
|
|
40429
40433
|
}
|