@wix/members 1.0.542 → 1.0.544

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.
Files changed (28) hide show
  1. package/build/cjs/context-account-details.d.ts +9 -6
  2. package/build/cjs/context-account-details.js +94 -89
  3. package/build/cjs/context-account-details.js.map +1 -1
  4. package/build/cjs/context-addresses.js +2 -2
  5. package/build/cjs/context-addresses.js.map +1 -1
  6. package/build/es/context-account-details.d.mts +9 -6
  7. package/build/es/context-account-details.mjs +94 -89
  8. package/build/es/context-account-details.mjs.map +1 -1
  9. package/build/es/context-addresses.mjs +2 -2
  10. package/build/es/context-addresses.mjs.map +1 -1
  11. package/build/internal/cjs/context-account-details.d.ts +9 -6
  12. package/build/internal/es/context-account-details.d.mts +9 -6
  13. package/context-runtime/context-account-details/runtime.d.ts +9 -6
  14. package/context-runtime/context-account-details/runtime.js +3 -3
  15. package/context-runtime/context-addresses/runtime.js +3 -3
  16. package/package.json +2 -14
  17. package/account-home-context-provider/package.json +0 -3
  18. package/build/cjs/context-account-home.d.ts +0 -54
  19. package/build/cjs/context-account-home.js +0 -719
  20. package/build/cjs/context-account-home.js.map +0 -1
  21. package/build/es/context-account-home.d.mts +0 -54
  22. package/build/es/context-account-home.mjs +0 -690
  23. package/build/es/context-account-home.mjs.map +0 -1
  24. package/build/internal/cjs/context-account-home.d.ts +0 -54
  25. package/build/internal/es/context-account-home.d.mts +0 -54
  26. package/context/account-home/package.json +0 -3
  27. package/context-runtime/context-account-home/runtime.d.ts +0 -54
  28. package/context-runtime/context-account-home/runtime.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/members",
3
- "version": "1.0.542",
3
+ "version": "1.0.544",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -38,16 +38,6 @@
38
38
  "require": "./build/cjs/context-addresses.js",
39
39
  "types": "./build/es/context-addresses.d.mts"
40
40
  },
41
- "./context/account-home": {
42
- "import": "./build/es/context-account-home.mjs",
43
- "require": "./build/cjs/context-account-home.js",
44
- "types": "./build/es/context-account-home.d.mts"
45
- },
46
- "./account-home-context-provider": {
47
- "import": "./build/es/context-account-home.mjs",
48
- "require": "./build/cjs/context-account-home.js",
49
- "types": "./build/es/context-account-home.d.mts"
50
- },
51
41
  "./context/address": {
52
42
  "import": "./build/es/context-address.mjs",
53
43
  "require": "./build/cjs/context-address.js",
@@ -81,8 +71,6 @@
81
71
  "context-runtime",
82
72
  "context/addresses",
83
73
  "addresses-context-provider",
84
- "context/account-home",
85
- "account-home-context-provider",
86
74
  "context/address",
87
75
  "address-context-provider",
88
76
  "context/account-details",
@@ -144,5 +132,5 @@
144
132
  "optional": true
145
133
  }
146
134
  },
147
- "falconPackageHash": "049c0914589c1095be3d7c8d9a911a22e450f7a0d861d7cf8153e4a3"
135
+ "falconPackageHash": "54ba88a66a10c624ac91059e8de9e36e41eb8f1cd4ba4d329628e6ec"
148
136
  }
@@ -1,3 +0,0 @@
1
- {
2
- "main": "../build/cjs/context-account-home.js"
3
- }
@@ -1,54 +0,0 @@
1
- import { FC, PropsWithChildren, ReactNode } from 'react';
2
-
3
- //#region src/extensions/account-home/context-providers/member-details.d.ts
4
- /** The logged-in member, named after `@wix/members` `Member`; `null` when nobody is logged in. */
5
- interface AccountHomeMember {
6
- contact: {
7
- firstName: string | null;
8
- };
9
- profile: {
10
- nickname: string | null;
11
- };
12
- }
13
- //#endregion
14
- //#region src/extensions/account-home/context-providers/account-home-context-provider.d.ts
15
- /** The Account Home page's state, for its greeting and Member Activity. */
16
- interface AccountHomeContextValue {
17
- /** @internal */
18
- member: AccountHomeMember | null;
19
- /** Whether Member Activity holds any card whose app is installed; `undefined` until known. */
20
- hasInstalledPromoCards: boolean | undefined;
21
- /** Whether any card in Member Activity shows something once read; `undefined` until known. */
22
- hasPromoCardContent: boolean | undefined;
23
- }
24
- type PromoScopeProps = PropsWithChildren<{
25
- onOccupancyChange?: (occupied: boolean) => void; /** Shown while the scope's content suspends; the scope has not reported until it commits. */
26
- fallback?: ReactNode;
27
- }>;
28
- interface PromoCardOptions {
29
- promoCard: true;
30
- }
31
- interface PromoCardRegistration {
32
- /** False while any card on the page is still loading; a card holds its skeleton until then. */
33
- revealed: boolean;
34
- /** Reports the card's read as settled, whatever it resolved to. */
35
- settle: () => void;
36
- /** Reports that the card shows something, until the returned callback is called. */
37
- showContent: () => () => void;
38
- }
39
- interface PromoScopeOptions {
40
- promoScope: true;
41
- }
42
- type AccountHomeHookOptions = PromoCardOptions | PromoScopeOptions;
43
- /**
44
- * Reads the Account Home context. With no options it returns the context value and suspends until
45
- * the logged-in member is read; `promoCard` registers the calling card and `promoScope` returns the
46
- * Member Activity scope, and neither waits on the member read or requires an attached provider.
47
- */
48
- declare function useAccountHome(): AccountHomeContextValue;
49
- declare function useAccountHome(options: PromoCardOptions): PromoCardRegistration;
50
- declare function useAccountHome(options: PromoScopeOptions): FC<PromoScopeProps>;
51
- /** Provides the logged-in member and whether Member Activity holds an installed card to its children. */
52
- declare const AccountHomeContextProvider: FC<PropsWithChildren>;
53
-
54
- export { AccountHomeContextProvider, type AccountHomeContextValue, type AccountHomeHookOptions, type AccountHomeMember, type PromoCardOptions, type PromoCardRegistration, type PromoScopeOptions, type PromoScopeProps, AccountHomeContextProvider as default, useAccountHome };