@chrryai/chrry 1.4.72 → 1.4.73
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/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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.73";
|
|
1903
1903
|
getSlugFromPathname = (path) => {
|
|
1904
1904
|
return getAppAndStoreSlugs(path, {
|
|
1905
1905
|
defaultAppSlug: config.slug,
|
|
@@ -24126,7 +24126,7 @@ function DataProvider({ children, ...rest }) {
|
|
|
24126
24126
|
const [instructions, setInstructions] = (0, import_react21.useState)([]);
|
|
24127
24127
|
const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
|
|
24128
24128
|
const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
|
|
24129
|
-
const VERSION4 = "1.4.
|
|
24129
|
+
const VERSION4 = "1.4.73";
|
|
24130
24130
|
const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
|
|
24131
24131
|
const {
|
|
24132
24132
|
API_URL: API_URL2,
|
|
@@ -25473,6 +25473,9 @@ function AppProvider({ children }) {
|
|
|
25473
25473
|
(i) => !app?.highlights?.some((h) => h.id === i.id)
|
|
25474
25474
|
);
|
|
25475
25475
|
const [showingCustom, setShowingCustom] = (0, import_react28.useState)(hasCustomInstructions);
|
|
25476
|
+
(0, import_react28.useEffect)(() => {
|
|
25477
|
+
setShowingCustom(hasCustomInstructions);
|
|
25478
|
+
}, [hasCustomInstructions]);
|
|
25476
25479
|
const isAppInstructions = contextInstructions.every(
|
|
25477
25480
|
(i) => app?.highlights?.some((h) => h.id === i.id)
|
|
25478
25481
|
);
|
|
@@ -42536,6 +42539,7 @@ function SignIn({
|
|
|
42536
42539
|
), showRegister && /* @__PURE__ */ import_react66.default.createElement(
|
|
42537
42540
|
Button,
|
|
42538
42541
|
{
|
|
42542
|
+
"data-testid": "register-button",
|
|
42539
42543
|
onClick: () => {
|
|
42540
42544
|
const plan = (user || guest)?.subscription?.plan || "member";
|
|
42541
42545
|
if (isExtension2) {
|
|
@@ -43283,7 +43287,6 @@ function Subscribe({
|
|
|
43283
43287
|
setLoading(false);
|
|
43284
43288
|
}
|
|
43285
43289
|
};
|
|
43286
|
-
const [purchaseType, setPurchaseType] = (0, import_react67.useState)();
|
|
43287
43290
|
const verifyPayment = async (sessionId) => {
|
|
43288
43291
|
track({ name: "subscribe_verify_payment" });
|
|
43289
43292
|
const params = new URLSearchParams(window.location.search);
|
|
@@ -43311,12 +43314,8 @@ function Subscribe({
|
|
|
43311
43314
|
if (data.success) {
|
|
43312
43315
|
track({ name: "subscribe_payment_verified" });
|
|
43313
43316
|
if (isExtensionRedirect2) {
|
|
43314
|
-
setPurchaseType("subscribe");
|
|
43315
43317
|
import_react_hot_toast13.default.success(t6(`${t6("Subscribed")}. ${t6("Reload your extension")} \u{1F9E9}`));
|
|
43316
43318
|
} else {
|
|
43317
|
-
setPurchaseType(
|
|
43318
|
-
data.gift ? "gift" : data.credits ? "credits" : "subscribe"
|
|
43319
|
-
);
|
|
43320
43319
|
import_react_hot_toast13.default.success(
|
|
43321
43320
|
data.gift ? t6(`\u{1F970} ${t6("Thank you for your gift")}`) : data.credits ? t6(`${t6("Credits updated")}`) : t6(`${t6("Subscribed")}`)
|
|
43322
43321
|
);
|
|
@@ -43464,6 +43463,7 @@ function Subscribe({
|
|
|
43464
43463
|
/* @__PURE__ */ import_react67.default.createElement(
|
|
43465
43464
|
Button,
|
|
43466
43465
|
{
|
|
43466
|
+
"data-testid": "member-button",
|
|
43467
43467
|
onClick: () => {
|
|
43468
43468
|
addHapticFeedback();
|
|
43469
43469
|
setSelectedPlan("member");
|
|
@@ -43736,6 +43736,7 @@ function Subscribe({
|
|
|
43736
43736
|
) : hasCurrentPlan() && /* @__PURE__ */ import_react67.default.createElement(import_react67.default.Fragment, null, !user && guest?.subscription && /* @__PURE__ */ import_react67.default.createElement(
|
|
43737
43737
|
Button,
|
|
43738
43738
|
{
|
|
43739
|
+
"data-testid": "migrate-button",
|
|
43739
43740
|
className: "link",
|
|
43740
43741
|
onClick: () => {
|
|
43741
43742
|
addHapticFeedback();
|
|
@@ -43843,6 +43844,7 @@ function Subscribe({
|
|
|
43843
43844
|
), /* @__PURE__ */ import_react67.default.createElement(
|
|
43844
43845
|
Button,
|
|
43845
43846
|
{
|
|
43847
|
+
"data-testid": "login-button",
|
|
43846
43848
|
className: "link",
|
|
43847
43849
|
onClick: () => {
|
|
43848
43850
|
addHapticFeedback();
|
|
@@ -43937,7 +43939,7 @@ function Subscribe({
|
|
|
43937
43939
|
},
|
|
43938
43940
|
/* @__PURE__ */ import_react67.default.createElement(ImageComponent, { icon: "strawberry", showLoading: false, size: 18 }),
|
|
43939
43941
|
t6("Plus")
|
|
43940
|
-
),
|
|
43942
|
+
), /* @__PURE__ */ import_react67.default.createElement(Input, { "data-testid": "purchase-type", type: "hidden", value: part }));
|
|
43941
43943
|
}
|
|
43942
43944
|
var import_react67, import_clsx8, import_react_hot_toast13;
|
|
43943
43945
|
var init_Subscribe = __esm({
|