@envive-ai/react-hooks 0.1.0 → 0.1.1
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/{GridInsertionService-CS_bnPh0.cjs → GridInsertionService-C00upKLB.js} +18 -6
- package/dist/{GridInsertionService-CEYo9pGj.js → GridInsertionService-CMJVhD6q.cjs} +31 -1
- package/dist/{bandolier-Bm2xAt_j.cjs → bandolier-3rHPPhkF.cjs} +27 -28
- package/dist/{bandolier-Ble8jEa8.js → bandolier-DpF-HUG_.js} +7 -8
- package/dist/{carpe-Da7b-LCW.cjs → carpe-BG7Q_KCG.cjs} +14 -15
- package/dist/{carpe-W13mhRRP.js → carpe-DLuc07V7.js} +7 -8
- package/dist/contexts/index.cjs +9 -4
- package/dist/contexts/index.d.cts +8 -22
- package/dist/contexts/index.d.ts +11 -26
- package/dist/contexts/index.js +5 -5
- package/dist/contexts-C4Iz162H.cjs +11631 -0
- package/dist/contexts-Dq7tO_0y.js +11459 -0
- package/dist/{coterie-3y0D9ko4.cjs → coterie-DUdvJvAs.cjs} +10 -10
- package/dist/{coterie-DOWcJAYv.js → coterie-FybYN_xE.js} +7 -7
- package/dist/{default-D_KPZdPJ.cjs → default-CKyjzyLc.cjs} +1 -1
- package/dist/{default-C2fEZKXk.js → default-CL94oJfj.js} +1 -1
- package/dist/default-DMtAjA62.cjs +4 -0
- package/dist/default-zcmT2032.js +4 -0
- package/dist/{divIds-DnZNd7rA.cjs → divIds-BOqjn3bE.cjs} +0 -20
- package/dist/{divIds-Bss-btao.js → divIds-Cfp3v_rG.js} +1 -15
- package/dist/{models-DHdb7QWn.js → domInsertionService-BtzuH2Sc.js} +15 -1
- package/dist/{models-ixxUsGL_.cjs → domInsertionService-Cb9814oM.cjs} +20 -0
- package/dist/{dreamlandBaby-DCIsuU9R.cjs → dreamlandBaby-C8yzW4Nl.cjs} +11 -12
- package/dist/{dreamlandBaby-DvSaZGrz.js → dreamlandBaby-WXcbsTXO.js} +7 -8
- package/dist/{fiveCbd-CkOlVby_.cjs → fiveCbd-CZYzZPl3.cjs} +10 -11
- package/dist/{fiveCbd-B1SESMCO.js → fiveCbd-kl6CoxoF.js} +7 -8
- package/dist/{forLoveAndLemons-DmwYZIk0.js → forLoveAndLemons-BD2qh-6B.js} +5 -5
- package/dist/{forLoveAndLemons-CfYPMnKS.cjs → forLoveAndLemons-BNu-PfFB.cjs} +7 -7
- package/dist/{greenpan-Bsl3ir59.cjs → greenpan-D6fDmjU8.cjs} +11 -12
- package/dist/{greenpan-BtOi45lf.js → greenpan-LDDXZTsh.js} +7 -8
- package/dist/{grooveLife-Cmm1PSCL.cjs → grooveLife-CcylXabB.cjs} +12 -13
- package/dist/{grooveLife-6_dtYsRk.js → grooveLife-D-1qfxwj.js} +8 -9
- package/dist/{homegrownCannabis-CO0uY_mp.cjs → homegrownCannabis-BEZzwFlm.cjs} +10 -10
- package/dist/{homegrownCannabis-C-kw-74X.js → homegrownCannabis-BScZhy9v.js} +6 -6
- package/dist/hooks/index.cjs +16 -4
- package/dist/hooks/index.d.cts +256 -45
- package/dist/hooks/index.d.ts +257 -45
- package/dist/hooks/index.js +5 -5
- package/dist/{jackArcher-DdYTIzAV.cjs → jackArcher-BwMClqMP.cjs} +11 -12
- package/dist/{jackArcher-CLVmwwpI.js → jackArcher-cJJVulZ9.js} +7 -8
- package/dist/{jordanCraig-_u3-w4Hp.cjs → jordanCraig-DGsCO2o1.cjs} +19 -20
- package/dist/{jordanCraig-Am-Oor-O.js → jordanCraig-DNDMT0hn.js} +7 -8
- package/dist/{kindredBravely-eWp-ud_E.js → kindredBravely-ROyesnVk.js} +6 -7
- package/dist/{kindredBravely-CWovIDSc.cjs → kindredBravely-wV2XT1r_.cjs} +10 -11
- package/dist/{kutFromTheKloth-Q589bAOC.cjs → kutFromTheKloth-B6GR8tO9.cjs} +11 -12
- package/dist/{kutFromTheKloth-BMV4BuGQ.js → kutFromTheKloth-BCUOHegv.js} +7 -8
- package/dist/{larryAndSerges-CEau764j.cjs → larryAndSerges-CIqB9tKz.cjs} +8 -8
- package/dist/{larryAndSerges-BMUlTgI-.js → larryAndSerges-CqS02fnX.js} +5 -5
- package/dist/{leapsAndRebounds-DHAtRTJD.cjs → leapsAndRebounds-CFj9F_z1.cjs} +12 -13
- package/dist/{leapsAndRebounds-DGMzPO7T.js → leapsAndRebounds-j4YqSvNb.js} +7 -8
- package/dist/{longevityrx-jH2JLhNH.js → longevityrx-9sUQZCVZ.js} +7 -8
- package/dist/{longevityrx-CZW8Hxzi.cjs → longevityrx-C-Yc5LPR.cjs} +10 -11
- package/dist/{lookOptic-BGXP5P_V.js → lookOptic-CQryypdM.js} +7 -8
- package/dist/{lookOptic-CA6RwLbG.cjs → lookOptic-dbaaorhR.cjs} +10 -11
- package/dist/{mantraBrand-Cm9_PBCT.js → mantraBrand-CifBQtHp.js} +8 -9
- package/dist/{mantraBrand-DByNqpnL.cjs → mantraBrand-D5MTZ6Mj.cjs} +23 -24
- package/dist/{medterra-DnPN2ksU.cjs → medterra-BCrXdmFE.cjs} +12 -13
- package/dist/{medterra-B0wxj_PV.js → medterra-DhENCf-m.js} +7 -8
- package/dist/{modells-CoYgkLSp.cjs → modells-C_P_894S.cjs} +10 -11
- package/dist/{modells-Bmz8Ag5M.js → modells-aQrV10D7.js} +7 -8
- package/dist/{pressedFloral-DSKs_oVG.js → pressedFloral-D-amnTQK.js} +7 -8
- package/dist/{pressedFloral-DjBiSoUl.cjs → pressedFloral-DErfwwl0.cjs} +13 -14
- package/dist/{skinPerfection-B_3xzVNS.cjs → skinPerfection-DF6nQXjh.cjs} +10 -11
- package/dist/{skinPerfection-IDrBuAPt.js → skinPerfection-DRVPJp3h.js} +7 -8
- package/dist/{snapSupplements-BStTsdOZ.cjs → snapSupplements-CLZjItJi.cjs} +10 -11
- package/dist/{snapSupplements-BJk5T5ba.js → snapSupplements-Yxs4jgC-.js} +7 -8
- package/dist/{spanx-LwU1zSzq.cjs → spanx-Cpbot5J5.cjs} +14 -15
- package/dist/{spanx-BYg0LE7R.js → spanx-DVDyAyFC.js} +9 -10
- package/dist/{spanxStaging-CfSmuKYB.js → spanxStaging-DAiFEMRU.js} +9 -10
- package/dist/{spanxStaging-OZLV9qix.cjs → spanxStaging-DbaVonN6.cjs} +20 -21
- package/dist/{supergoop-BqPXDnKk.cjs → supergoop-B5VQlsoe.cjs} +11 -12
- package/dist/{supergoop-CIlrHND_.js → supergoop-C4McrZPT.js} +7 -8
- package/dist/types-D4vlfTd0.d.ts +1026 -0
- package/dist/types-DGoFEos_.d.cts +1026 -0
- package/dist/{types-CYNvLeSA.js → types-DZzSQ5a6.js} +33 -33
- package/dist/{types-C4T5UOIW.cjs → types-QJObznro.cjs} +33 -33
- package/dist/{uniqueVintage-B30mOqbH.cjs → uniqueVintage-BLp_UtBR.cjs} +22 -23
- package/dist/{uniqueVintage-CFueJOhO.js → uniqueVintage-CS4TgOJW.js} +7 -8
- package/dist/{venaCbd-DHGZy49P.cjs → venaCbd-BxmadOeJ.cjs} +11 -12
- package/dist/{venaCbd-T0CqVD4k.js → venaCbd-DfnFV7Qp.js} +7 -8
- package/dist/{westonJonBoucher-BdMzs_Yg.cjs → westonJonBoucher-BZdusJgo.cjs} +12 -13
- package/dist/{westonJonBoucher-b4TCQ4ev.js → westonJonBoucher-C0FE4Wup.js} +7 -8
- package/dist/{wineEnthusiast-BqR0i_54.js → wineEnthusiast-CmhNg47M.js} +7 -8
- package/dist/{wineEnthusiast-BLGlOjgr.cjs → wineEnthusiast-DQxdV8Yg.cjs} +12 -13
- package/dist/{wolfMattress-DNGZOivg.cjs → wolfMattress-CqyOUgPB.cjs} +11 -11
- package/dist/{wolfMattress-CyyO-LoC.js → wolfMattress-vMvqmwgI.js} +6 -6
- package/dist/{wolfTactical-3Mm2fvVF.js → wolfTactical-DvqxZtoA.js} +7 -8
- package/dist/{wolfTactical-BmXYlFjr.cjs → wolfTactical-q3TVDP85.cjs} +11 -12
- package/package.json +1 -1
- package/src/atoms/org/org.ts +2 -2
- package/src/hooks/useSearch.tsx +1 -4
- package/src/initialize.ts +1 -1
- package/src/main.tsx +10 -25
- package/dist/chatElementDisplayLocation-CX8fuNao.d.cts +0 -239
- package/dist/chatElementDisplayLocation-CwptS9tx.d.ts +0 -239
- package/dist/contexts-BRjfVq_k.js +0 -5064
- package/dist/contexts-BYArqZtK.cjs +0 -5164
- package/dist/default-CBUq6Q6G.cjs +0 -4
- package/dist/default-CGIFZK6m.js +0 -4
- package/dist/logger-Dln20ans.cjs +0 -25
- package/dist/logger-pdEEY8T2.js +0 -19
- package/src/main.ts +0 -85
- /package/dist/{cdnService-zQfKk3Eb.js → cdnService-CAyO3axV.js} +0 -0
- /package/dist/{cdnService-CZ-aXcY6.cjs → cdnService-DIF1i7VC.cjs} +0 -0
- /package/dist/{custservice-types-CkfxZiHY.cjs → custservice-types-BgjGHCtD.cjs} +0 -0
- /package/dist/{custservice-types-CFIFwZ-r.js → custservice-types-V6FWABp4.js} +0 -0
- /package/dist/{entrypoints-D_JUvkgy.cjs → entrypoints-C8JwiMYA.cjs} +0 -0
- /package/dist/{entrypoints-YLQsbBRD.js → entrypoints-RmIbdYxh.js} +0 -0
- /package/dist/{socialProofClasses-CrQBWdSA.cjs → socialProofClasses-CaA83vI4.cjs} +0 -0
- /package/dist/{socialProofClasses-Bhv2Vulz.js → socialProofClasses-KB7zOMmg.js} +0 -0
- /package/dist/{suggestionBarV2-types-CaovchMP.cjs → suggestionBarV2-types-XHYD3j8E.cjs} +0 -0
- /package/dist/{suggestionBarV2-types-BllzwsBD.js → suggestionBarV2-types-aiQmVx5m.js} +0 -0
package/dist/default-CGIFZK6m.js
DELETED
package/dist/logger-Dln20ans.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/application/logging/logger.ts
|
|
3
|
-
var Logger = class {
|
|
4
|
-
static logInfo(message, ...args) {
|
|
5
|
-
console.info(`INFO: ${message}`, ...args);
|
|
6
|
-
}
|
|
7
|
-
static logDebug(message, ...args) {
|
|
8
|
-
console.debug(`DEBUG: ${message}`, ...args);
|
|
9
|
-
}
|
|
10
|
-
static logError(message, error, ...args) {
|
|
11
|
-
console.error(`ERROR: ${message} error=${error}`, args);
|
|
12
|
-
}
|
|
13
|
-
static logWarn(message, error, ...args) {
|
|
14
|
-
console.warn(`WARN: ${message} error=${error}`, args);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
var logger_default = Logger;
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
Object.defineProperty(exports, 'logger_default', {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () {
|
|
23
|
-
return logger_default;
|
|
24
|
-
}
|
|
25
|
-
});
|
package/dist/logger-pdEEY8T2.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//#region src/application/logging/logger.ts
|
|
2
|
-
var Logger = class {
|
|
3
|
-
static logInfo(message, ...args) {
|
|
4
|
-
console.info(`INFO: ${message}`, ...args);
|
|
5
|
-
}
|
|
6
|
-
static logDebug(message, ...args) {
|
|
7
|
-
console.debug(`DEBUG: ${message}`, ...args);
|
|
8
|
-
}
|
|
9
|
-
static logError(message, error, ...args) {
|
|
10
|
-
console.error(`ERROR: ${message} error=${error}`, args);
|
|
11
|
-
}
|
|
12
|
-
static logWarn(message, error, ...args) {
|
|
13
|
-
console.warn(`WARN: ${message} error=${error}`, args);
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
var logger_default = Logger;
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { logger_default };
|
package/src/main.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import Logger from "./application/logging/logger";
|
|
2
|
-
import { EventsDispatcher, SpiffyEvent } from "./events";
|
|
3
|
-
import { PerfMetricsEvents, logPerfMetricAtom } from "./atoms/chat";
|
|
4
|
-
import { getAtomStore } from "./atoms/atomStore";
|
|
5
|
-
import { getAsyncOrgConfig } from "./atoms/org";
|
|
6
|
-
import {
|
|
7
|
-
getOrgInfo as getOrgInfoFromSupportedOrgs,
|
|
8
|
-
VariantInfo,
|
|
9
|
-
} from "./application/models";
|
|
10
|
-
import { EnvironmentService } from "./application/service/environmentService";
|
|
11
|
-
import { OrgInfo } from "./types";
|
|
12
|
-
import { prepareMerchantPage } from "./application/utils/merchantUtils";
|
|
13
|
-
import { hasParsedVariantInfoAtom } from "./atoms/app/variant";
|
|
14
|
-
|
|
15
|
-
declare global {
|
|
16
|
-
interface Window {
|
|
17
|
-
dataLayer: any;
|
|
18
|
-
gtag: (...args: any[]) => void;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const getOrgInfo = async (): Promise<OrgInfo> => {
|
|
23
|
-
const orgConfig = await getAsyncOrgConfig();
|
|
24
|
-
|
|
25
|
-
if (!orgConfig.org) {
|
|
26
|
-
throw new Error("orgConfig.org is required but is undefined");
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const orgShortName = orgConfig.org.org.shortName;
|
|
30
|
-
|
|
31
|
-
if (!orgShortName) {
|
|
32
|
-
throw new Error("orgShortName is required but is undefined");
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const orgInfo = await getOrgInfoFromSupportedOrgs(orgShortName);
|
|
36
|
-
|
|
37
|
-
if (!orgInfo) {
|
|
38
|
-
throw new Error(
|
|
39
|
-
`no matching OrgInfo found for orgShortName=${orgShortName}`
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return {
|
|
44
|
-
name: orgInfo.name,
|
|
45
|
-
domain: orgInfo.domain,
|
|
46
|
-
defaultProductId: orgInfo.defaultProductId,
|
|
47
|
-
alwaysEnabledMerchants: orgInfo.alwaysEnabledMerchants,
|
|
48
|
-
orgPageConfig: orgInfo.orgPageConfig,
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const initApp = async () => {
|
|
53
|
-
const atomStore = getAtomStore();
|
|
54
|
-
atomStore.set(logPerfMetricAtom, PerfMetricsEvents.MainBundleLoaded);
|
|
55
|
-
EventsDispatcher.dispatch(SpiffyEvent.APP_INITIALIZED);
|
|
56
|
-
EventsDispatcher.dispatch(SpiffyEvent.CALL_MERCHANT_APP);
|
|
57
|
-
prepareMerchantPage();
|
|
58
|
-
await getAsyncOrgConfig();
|
|
59
|
-
|
|
60
|
-
// container to render the chat
|
|
61
|
-
// const reactContainerRoot = createReactRoot();
|
|
62
|
-
|
|
63
|
-
const existing = window[EnvironmentService.getIdentifyingPrefix()] || {};
|
|
64
|
-
window[EnvironmentService.getIdentifyingPrefix()] = {
|
|
65
|
-
...existing,
|
|
66
|
-
getOrgInfo,
|
|
67
|
-
isInitialized: true,
|
|
68
|
-
refresh: async () => {
|
|
69
|
-
Logger.logDebug("[spiffy-ai] window._spiffy.refresh called");
|
|
70
|
-
},
|
|
71
|
-
setVariantInfoOverride: (variantInfo: VariantInfo) => {
|
|
72
|
-
window._spiffy.variantInfoOverride = variantInfo;
|
|
73
|
-
// Reset the variant info to force a re-parse
|
|
74
|
-
atomStore.set(hasParsedVariantInfoAtom, false);
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
// #if (VITE_SPLIT_BUILD=="true")
|
|
80
|
-
export {
|
|
81
|
-
tellExtensionAboutInjectionError,
|
|
82
|
-
tellExtensionInjectionIsLoading,
|
|
83
|
-
tellExtensionAboutSuccessfullInjection,
|
|
84
|
-
} from "src/extension";
|
|
85
|
-
// #endif
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|