@anker-in/lib 1.1.0-beta.7 → 1.1.0-beta.8

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.
@@ -1,20 +1,20 @@
1
1
 
2
- > @anker-in/lib@1.1.0 build /Users/anker/Code/headless-ui/packages/lib
2
+ > @anker-in/lib@1.1.0-beta.7 build /Users/anker/Code/headless-ui/packages/lib
3
3
  > pnpm run build:js:esm & pnpm run build:js:cjs & pnpm run build:types:esm & pnpm run build:types:cjs
4
4
 
5
5
 
6
- > @anker-in/lib@1.1.0 build:js:cjs /Users/anker/Code/headless-ui/packages/lib
7
- > node esbuild-cjs.mjs
6
+ > @anker-in/lib@1.1.0-beta.7 build:js:esm /Users/anker/Code/headless-ui/packages/lib
7
+ > node esbuild-esm.mjs
8
8
 
9
9
 
10
- > @anker-in/lib@1.1.0 build:types:esm /Users/anker/Code/headless-ui/packages/lib
11
- > tsc --outdir dist/esm
10
+ > @anker-in/lib@1.1.0-beta.7 build:types:cjs /Users/anker/Code/headless-ui/packages/lib
11
+ > tsc --outdir dist/cjs
12
12
 
13
13
 
14
- > @anker-in/lib@1.1.0 build:js:esm /Users/anker/Code/headless-ui/packages/lib
15
- > node esbuild-esm.mjs
14
+ > @anker-in/lib@1.1.0-beta.7 build:types:esm /Users/anker/Code/headless-ui/packages/lib
15
+ > tsc --outdir dist/esm
16
16
 
17
17
 
18
- > @anker-in/lib@1.1.0 build:types:cjs /Users/anker/Code/headless-ui/packages/lib
19
- > tsc --outdir dist/cjs
18
+ > @anker-in/lib@1.1.0-beta.7 build:js:cjs /Users/anker/Code/headless-ui/packages/lib
19
+ > node esbuild-cjs.mjs
20
20
 
@@ -1,2 +1,2 @@
1
- "use strict";var d=Object.create;var r=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var f=(t,o)=>{for(var e in o)r(t,e,{get:o[e],enumerable:!0})},a=(t,o,e,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of m(o))!p.call(t,n)&&n!==e&&r(t,n,{get:()=>o[n],enumerable:!(i=l(o,n))||i.enumerable});return t};var y=(t,o,e)=>(e=t!=null?d(g(t)):{},a(o||!t||!t.__esModule?r(e,"default",{value:t,enumerable:!0}):e,t)),R=t=>a(r({},"__esModule",{value:!0}),t);var _={};f(_,{useEmailValidation:()=>S});module.exports=R(_);var s=y(require("swr/mutation")),c=require("../../context"),u=require("../../utils");const S=t=>{const{locale:o}=(0,c.useHeadlessContext)();return(0,s.default)("emailValidation",(e,{arg:{token:i,code:n}})=>(0,u.fetcher)({url:"/identity/users/email_validation",method:"POST",body:{activation_code:i,verify_code:n},action:"account",needRecaptcha:!0,locale:o}),t)};
1
+ "use strict";var d=Object.create;var i=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var f=(t,o)=>{for(var a in o)i(t,a,{get:o[a],enumerable:!0})},r=(t,o,a,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of m(o))!g.call(t,e)&&e!==a&&i(t,e,{get:()=>o[e],enumerable:!(n=l(o,e))||n.enumerable});return t};var y=(t,o,a)=>(a=t!=null?d(p(t)):{},r(o||!t||!t.__esModule?i(a,"default",{value:t,enumerable:!0}):a,t)),R=t=>r(i({},"__esModule",{value:!0}),t);var _={};f(_,{useEmailValidation:()=>S});module.exports=R(_);var s=y(require("swr/mutation")),c=require("../../context"),u=require("../../utils");const S=t=>{const{locale:o}=(0,c.useHeadlessContext)();return(0,s.default)("emailValidation",(a,{arg:{token:n,code:e}})=>(0,u.fetcher)({url:"/api/multipass/account/users/email_validation",method:"POST",body:{activation_code:n,verify_code:e},action:"account",needRecaptcha:!0,locale:o}),t)};
2
2
  //# sourceMappingURL=useEmailValidation.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/registration/hooks/useEmailValidation.ts"],
4
- "sourcesContent": ["import useSWRMutation, { SWRMutationConfiguration } from 'swr/mutation'\nimport { useHeadlessContext } from '../../context'\nimport { fetcher } from '../../utils'\n\nexport const useEmailValidation = (\n config?: SWRMutationConfiguration<\n any,\n { type: 'responseError'; data: any; response: any },\n string,\n { token: string; code: string }\n >\n) => {\n const { locale } = useHeadlessContext()\n return useSWRMutation(\n 'emailValidation',\n (_, { arg: { token, code } }: { arg: { token: string; code: string } }) => {\n return fetcher({\n url: `/identity/users/email_validation`,\n method: 'POST',\n body: { activation_code: token, verify_code: code },\n action: 'account',\n needRecaptcha: true,\n locale,\n })\n },\n config\n )\n}\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAyD,2BACzDC,EAAmC,yBACnCC,EAAwB,uBAEjB,MAAMJ,EACXK,GAMG,CACH,KAAM,CAAE,OAAAC,CAAO,KAAI,sBAAmB,EACtC,SAAO,EAAAC,SACL,kBACA,CAACC,EAAG,CAAE,IAAK,CAAE,MAAAC,EAAO,KAAAC,CAAK,CAAE,OAClB,WAAQ,CACb,IAAK,mCACL,OAAQ,OACR,KAAM,CAAE,gBAAiBD,EAAO,YAAaC,CAAK,EAClD,OAAQ,UACR,cAAe,GACf,OAAAJ,CACF,CAAC,EAEHD,CACF,CACF",
4
+ "sourcesContent": ["import useSWRMutation, { SWRMutationConfiguration } from 'swr/mutation'\nimport { useHeadlessContext } from '../../context'\nimport { fetcher } from '../../utils'\n\nexport const useEmailValidation = (\n config?: SWRMutationConfiguration<\n any,\n { type: 'responseError'; data: any; response: any },\n string,\n { token: string; code: string }\n >\n) => {\n const { locale } = useHeadlessContext()\n return useSWRMutation(\n 'emailValidation',\n (_, { arg: { token, code } }: { arg: { token: string; code: string } }) => {\n return fetcher({\n url: `/api/multipass/account/users/email_validation`,\n method: 'POST',\n body: { activation_code: token, verify_code: code },\n action: 'account',\n needRecaptcha: true,\n locale,\n })\n },\n config\n )\n}\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAyD,2BACzDC,EAAmC,yBACnCC,EAAwB,uBAEjB,MAAMJ,EACXK,GAMG,CACH,KAAM,CAAE,OAAAC,CAAO,KAAI,sBAAmB,EACtC,SAAO,EAAAC,SACL,kBACA,CAACC,EAAG,CAAE,IAAK,CAAE,MAAAC,EAAO,KAAAC,CAAK,CAAE,OAClB,WAAQ,CACb,IAAK,gDACL,OAAQ,OACR,KAAM,CAAE,gBAAiBD,EAAO,YAAaC,CAAK,EAClD,OAAQ,UACR,cAAe,GACf,OAAAJ,CACF,CAAC,EAEHD,CACF,CACF",
6
6
  "names": ["useEmailValidation_exports", "__export", "useEmailValidation", "__toCommonJS", "import_mutation", "import_context", "import_utils", "config", "locale", "useSWRMutation", "_", "token", "code"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import i from"swr/mutation";import{useHeadlessContext as r}from"../../context";import{fetcher as a}from"../../utils";const m=t=>{const{locale:o}=r();return i("emailValidation",(s,{arg:{token:e,code:n}})=>a({url:"/identity/users/email_validation",method:"POST",body:{activation_code:e,verify_code:n},action:"account",needRecaptcha:!0,locale:o}),t)};export{m as useEmailValidation};
1
+ import n from"swr/mutation";import{useHeadlessContext as i}from"../../context";import{fetcher as r}from"../../utils";const m=t=>{const{locale:o}=i();return n("emailValidation",(s,{arg:{token:a,code:e}})=>r({url:"/api/multipass/account/users/email_validation",method:"POST",body:{activation_code:a,verify_code:e},action:"account",needRecaptcha:!0,locale:o}),t)};export{m as useEmailValidation};
2
2
  //# sourceMappingURL=useEmailValidation.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/registration/hooks/useEmailValidation.ts"],
4
- "sourcesContent": ["import useSWRMutation, { SWRMutationConfiguration } from 'swr/mutation'\nimport { useHeadlessContext } from '../../context'\nimport { fetcher } from '../../utils'\n\nexport const useEmailValidation = (\n config?: SWRMutationConfiguration<\n any,\n { type: 'responseError'; data: any; response: any },\n string,\n { token: string; code: string }\n >\n) => {\n const { locale } = useHeadlessContext()\n return useSWRMutation(\n 'emailValidation',\n (_, { arg: { token, code } }: { arg: { token: string; code: string } }) => {\n return fetcher({\n url: `/identity/users/email_validation`,\n method: 'POST',\n body: { activation_code: token, verify_code: code },\n action: 'account',\n needRecaptcha: true,\n locale,\n })\n },\n config\n )\n}\n"],
5
- "mappings": "AAAA,OAAOA,MAAkD,eACzD,OAAS,sBAAAC,MAA0B,gBACnC,OAAS,WAAAC,MAAe,cAEjB,MAAMC,EACXC,GAMG,CACH,KAAM,CAAE,OAAAC,CAAO,EAAIJ,EAAmB,EACtC,OAAOD,EACL,kBACA,CAACM,EAAG,CAAE,IAAK,CAAE,MAAAC,EAAO,KAAAC,CAAK,CAAE,IAClBN,EAAQ,CACb,IAAK,mCACL,OAAQ,OACR,KAAM,CAAE,gBAAiBK,EAAO,YAAaC,CAAK,EAClD,OAAQ,UACR,cAAe,GACf,OAAAH,CACF,CAAC,EAEHD,CACF,CACF",
4
+ "sourcesContent": ["import useSWRMutation, { SWRMutationConfiguration } from 'swr/mutation'\nimport { useHeadlessContext } from '../../context'\nimport { fetcher } from '../../utils'\n\nexport const useEmailValidation = (\n config?: SWRMutationConfiguration<\n any,\n { type: 'responseError'; data: any; response: any },\n string,\n { token: string; code: string }\n >\n) => {\n const { locale } = useHeadlessContext()\n return useSWRMutation(\n 'emailValidation',\n (_, { arg: { token, code } }: { arg: { token: string; code: string } }) => {\n return fetcher({\n url: `/api/multipass/account/users/email_validation`,\n method: 'POST',\n body: { activation_code: token, verify_code: code },\n action: 'account',\n needRecaptcha: true,\n locale,\n })\n },\n config\n )\n}\n"],
5
+ "mappings": "AAAA,OAAOA,MAAkD,eACzD,OAAS,sBAAAC,MAA0B,gBACnC,OAAS,WAAAC,MAAe,cAEjB,MAAMC,EACXC,GAMG,CACH,KAAM,CAAE,OAAAC,CAAO,EAAIJ,EAAmB,EACtC,OAAOD,EACL,kBACA,CAACM,EAAG,CAAE,IAAK,CAAE,MAAAC,EAAO,KAAAC,CAAK,CAAE,IAClBN,EAAQ,CACb,IAAK,gDACL,OAAQ,OACR,KAAM,CAAE,gBAAiBK,EAAO,YAAaC,CAAK,EAClD,OAAQ,UACR,cAAe,GACf,OAAAH,CACF,CAAC,EAEHD,CACF,CACF",
6
6
  "names": ["useSWRMutation", "useHeadlessContext", "fetcher", "useEmailValidation", "config", "locale", "_", "token", "code"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anker-in/lib",
3
- "version": "1.1.0-beta.7",
3
+ "version": "1.1.0-beta.8",
4
4
  "description": "Unified Anker headless library with shared context, Shopify integration, and cart utilities",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -15,7 +15,7 @@ export const useEmailValidation = (
15
15
  'emailValidation',
16
16
  (_, { arg: { token, code } }: { arg: { token: string; code: string } }) => {
17
17
  return fetcher({
18
- url: `/identity/users/email_validation`,
18
+ url: `/api/multipass/account/users/email_validation`,
19
19
  method: 'POST',
20
20
  body: { activation_code: token, verify_code: code },
21
21
  action: 'account',