@intoss/shared 0.0.15 → 0.0.16

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 (2) hide show
  1. package/dist/index.js +965 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1 +1,965 @@
1
- "use strict";var k=Object.defineProperty,ve=Object.defineProperties,Me=Object.getOwnPropertyDescriptor,Fe=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertyNames,ee=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable;var te=(e,r,t)=>r in e?k(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,b=(e,r)=>{for(var t in r||(r={}))re.call(r,t)&&te(e,t,r[t]);if(ee)for(var t of ee(r))Se.call(r,t)&&te(e,t,r[t]);return e},oe=(e,r)=>ve(e,Fe(r));var Ie=(e,r)=>{for(var t in r)k(e,t,{get:r[t],enumerable:!0})},Re=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ve(r))!re.call(e,n)&&n!==t&&k(e,n,{get:()=>r[n],enumerable:!(o=Me(r,n))||o.enumerable});return e};var Oe=e=>Re(k({},"__esModule",{value:!0}),e);var y=(e,r,t)=>new Promise((o,n)=>{var s=a=>{try{p(t.next(a))}catch(d){n(d)}},i=a=>{try{p(t.throw(a))}catch(d){n(d)}},p=a=>a.done?o(a.value):Promise.resolve(a.value).then(s,i);p((t=t.apply(e,r)).next())});var Ne={};Ie(Ne,{AdGroupProvider:()=>L,AuthStateProvider:()=>G,ConfigProvider:()=>K,FetcherProvider:()=>A,QueryProvider:()=>q,bind:()=>S,calculateDay:()=>$,calculateDayOfWeek:()=>U,calculateHour:()=>D,calculateMinute:()=>J,calculateWeek:()=>j,useAdGroup:()=>z,useAdvertisement:()=>Y,useAuthState:()=>F,useConfig:()=>x,useFetcher:()=>C,useSignInWithToss:()=>H,useStorage:()=>Z});module.exports=Oe(Ne);var h=require("react");var N=require("@apps-in-toss/framework"),w=(0,N.getOperationalEnvironment)()==="sandbox"?"local":(0,N.getSchemeUri)().startsWith("intoss-private")?"preview":"production",ne={local:"http://localhost:3000",preview:"https://preview-api.intoss.app",production:"https://api.intoss.app"}[w];var se=require("react/jsx-runtime"),ie=(0,h.createContext)({appName:"",apiEndpoint:"http://localhost:3000",runningEnvironment:"local"}),K=({appName:e,children:r})=>{let t=(0,h.useMemo)(()=>({appName:e,apiEndpoint:ne,runningEnvironment:w}),[e]);return(0,se.jsx)(ie.Provider,{value:t,children:r})},x=()=>(0,h.useContext)(ie);var l=require("react"),pe=require("react/jsx-runtime"),ae=(0,l.createContext)({getInterstitialAdGroup:()=>({id:"ait-ad-test-interstitial-id",type:"interstitial"}),getRewardedAdGroup:()=>({id:"ait-ad-test-rewarded-id",type:"rewarded"})}),L=({initial:e,children:r})=>{let{appName:t,runningEnvironment:o}=x(),[n,s]=(0,l.useState)(o!=="production"),[i,p]=(0,l.useState)(e),a=(0,l.useCallback)(u=>{var m;return{id:(m=i[u])!=null?m:"ait-ad-test-interstitial-id",type:"interstitial"}},[i]),d=(0,l.useCallback)(u=>{var m;return{id:(m=i[u])!=null?m:"ait-ad-test-rewarded-id",type:"rewarded"}},[i]),f=(0,l.useMemo)(()=>({getInterstitialAdGroup:a,getRewardedAdGroup:d}),[a,d]);return(0,l.useEffect)(()=>{if(n)return;let u=new AbortController,m=setTimeout(()=>u.abort(),3e3);fetch(`https://static.intoss.app/${t}/assets/adGroupList.json`,{signal:u.signal}).then(I=>I.json()).then(p).finally(()=>{clearTimeout(m),s(!0)})},[t,n]),n?(0,pe.jsx)(ae.Provider,{value:f,children:r}):null},z=()=>(0,l.useContext)(ae);var M=require("@apps-in-toss/framework"),c=require("react");var Y=({primaryAdGroup:e,secondaryAdGroup:r,onShowAd:t,onDissmissAd:o})=>{let[n,s]=(0,c.useState)(!1),[i,p]=(0,c.useState)(!1),[a,d]=(0,c.useState)(),[f,u]=(0,c.useState)(null),m=(0,c.useCallback)(T=>new Promise(v=>{let R=M.GoogleAdMob.loadAppsInTossAdMob({options:{adGroupId:T},onEvent:O=>{switch(O.type){case"loaded":v([!0,R]);break}},onError:()=>v([!1,R])})}),[]),I=(0,c.useCallback)(()=>y(null,null,function*(){if(M.GoogleAdMob.loadAppsInTossAdMob.isSupported()!==!0){s(!0);return}if(i)return;let[T,v]=yield m(e.id);if(T){s(!0),p(!0),d(e.id),u(()=>v);return}if(v(),!r){s(!0);return}let[R,O]=yield m(r.id);if(R){s(!0),p(!0),d(r.id),u(()=>O);return}O(),s(!0)}),[e,r,i,m]),_=(0,c.useCallback)(()=>{f==null||f(),p(!1),d(void 0),u(null)},[f]),Te=(0,c.useCallback)(()=>{if(M.GoogleAdMob.loadAppsInTossAdMob.isSupported()!==!0){t==null||t(),o==null||o();return}if(!i||!a){t==null||t(),o==null||o();return}M.GoogleAdMob.showAppsInTossAdMob({options:{adGroupId:a},onEvent:T=>{switch(T.type){case"show":(a===e.id&&e.type==="interstitial"||a===(r==null?void 0:r.id)&&r.type==="interstitial")&&(t==null||t());break;case"failedToShow":t==null||t(),_();break;case"dismissed":o==null||o(),_();break;case"userEarnedReward":t==null||t();break}},onError:()=>{t==null||t(),_()}})},[i,a,e,r,t,o,_]);return(0,c.useEffect)(()=>{a||I()},[a,I]),(0,c.useEffect)(()=>()=>_(),[]),{initialized:n,adLoaded:i,showAd:Te}};var ue=require("@tanstack/react-query"),E=require("react"),ce=require("react/jsx-runtime"),le=(0,E.createContext)({isPreparing:!0,isLoggedIn:!1,retry:()=>Promise.resolve()}),G=({children:e})=>{let{data:r,isFetching:t,refetch:o}=(0,ue.useQuery)({queryKey:["/my/user"]}),n=(0,E.useMemo)(()=>{var s;return{isPreparing:t,isLoggedIn:!!((s=r==null?void 0:r.user)!=null&&s.id),retry:o}},[r,t,o]);return(0,ce.jsx)(le.Provider,{value:n,children:e})},F=()=>(0,E.useContext)(le);var W=require("@apps-in-toss/framework");var de=require("@apps-in-toss/framework");var fe=require("es-toolkit/string"),g=require("react");var ge=require("react/jsx-runtime"),ke="@auth/token",me=(0,g.createContext)({fetcher:fetch,setToken:()=>null}),Q=e=>Array.isArray(e)?e.map(Q):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([r,t])=>[(0,fe.camelCase)(r),Q(t)])):e,A=({baseUrl:e,children:r})=>{let{appName:t,apiEndpoint:o}=x(),[n,s]=(0,g.useState)(null),[i,p]=(0,g.useState)(!1),a=(0,g.useCallback)((d,f)=>fetch(`${e!=null?e:o}/${t}${d}`,oe(b({},f),{headers:b(b({"Content-Type":"application/json"},f==null?void 0:f.headers),n?{Authorization:`Bearer ${n}`}:{})})).then(u=>u.json()).then(u=>Q(u)),[t,o,n,e]);return(0,g.useEffect)(()=>{de.Storage.getItem(ke).then(s).finally(()=>p(!0))},[]),(0,ge.jsx)(me.Provider,{value:{fetcher:a,setToken:s},children:i?r:null})},C=()=>(0,g.useContext)(me);var V=require("react"),S=(e,r,t)=>{let{displayName:o}=t!=null?t:{},n=(0,V.memo)(r),s=(0,V.memo)(i=>(0,V.createElement)(n,e(i)));return s.ViewComponent=n,o&&(s.displayName=o,s.ViewComponent.displayName=`${o}View`),s};var ye=require("@tanstack/react-query");var xe=require("@tanstack/react-query"),Ce=require("react");var Pe=({children:e})=>{let{fetcher:r}=C();return{queryClient:(0,Ce.useMemo)(()=>new xe.QueryClient({defaultOptions:{queries:{queryFn:({queryKey:o})=>r(o[0])}}}),[r]),children:e}};var he=require("react/jsx-runtime"),q=S(Pe,({queryClient:e,children:r})=>(0,he.jsx)(ye.QueryClientProvider,{client:e,children:r}));var Ee=require("@tanstack/react-query"),_e=require("react");var be="@auth/token",H=({onSuccess:e})=>{let{retry:r}=F(),{fetcher:t,setToken:o}=C(),n=(0,Ee.useMutation)({mutationFn:i=>y(null,null,function*(){return t("/my/sessions",{method:"POST",body:JSON.stringify(i)})}),onSuccess:i=>y(null,null,function*(){o(i.token),yield W.Storage.setItem(be,i.token),yield r(),e==null||e()})});return{signInWithToss:(0,_e.useCallback)(()=>y(null,null,function*(){let{authorizationCode:i,referrer:p}=yield(0,W.appLogin)();n.mutate({authorizationCode:i,referrer:p})}),[n]),isLoading:n.isPending}};var $=e=>Math.floor((e+324e5)/864e5);var U=e=>(e+3)%7;var D=e=>Math.floor((e+324e5)%864e5/36e5);var J=e=>Math.floor((e+324e5)%36e5/6e4);var j=e=>Math.floor((e+3)/7);var B=require("@apps-in-toss/framework"),P=require("react"),X=require("react-native"),Z=e=>{let[r,t]=(0,P.useState)(),[o,n]=(0,P.useState)(!0),s=(0,P.useCallback)(i=>(t(i),X.DeviceEventEmitter.emit(e,i),B.Storage.setItem(e,JSON.stringify({value:i}))),[e]);return(0,P.useEffect)(()=>{n(!0),B.Storage.getItem(e).then(p=>{try{t(p===null?void 0:JSON.parse(p).value)}catch(a){t(void 0)}finally{n(!1)}});let i=X.DeviceEventEmitter.addListener(e,t);return()=>i.remove()},[e]),[r,s,o]};0&&(module.exports={AdGroupProvider,AuthStateProvider,ConfigProvider,FetcherProvider,QueryProvider,bind,calculateDay,calculateDayOfWeek,calculateHour,calculateMinute,calculateWeek,useAdGroup,useAdvertisement,useAuthState,useConfig,useFetcher,useSignInWithToss,useStorage});
1
+ "use strict";
2
+ function _array_like_to_array(arr, len) {
3
+ if (len == null || len > arr.length) len = arr.length;
4
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5
+ return arr2;
6
+ }
7
+ function _array_with_holes(arr) {
8
+ if (Array.isArray(arr)) return arr;
9
+ }
10
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
11
+ try {
12
+ var info = gen[key](arg);
13
+ var value = info.value;
14
+ } catch (error) {
15
+ reject(error);
16
+ return;
17
+ }
18
+ if (info.done) {
19
+ resolve(value);
20
+ } else {
21
+ Promise.resolve(value).then(_next, _throw);
22
+ }
23
+ }
24
+ function _async_to_generator(fn) {
25
+ return function() {
26
+ var self = this, args = arguments;
27
+ return new Promise(function(resolve, reject) {
28
+ var gen = fn.apply(self, args);
29
+ function _next(value) {
30
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
31
+ }
32
+ function _throw(err) {
33
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
34
+ }
35
+ _next(undefined);
36
+ });
37
+ };
38
+ }
39
+ function _define_property(obj, key, value) {
40
+ if (key in obj) {
41
+ Object.defineProperty(obj, key, {
42
+ value: value,
43
+ enumerable: true,
44
+ configurable: true,
45
+ writable: true
46
+ });
47
+ } else {
48
+ obj[key] = value;
49
+ }
50
+ return obj;
51
+ }
52
+ function _iterable_to_array_limit(arr, i) {
53
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
54
+ if (_i == null) return;
55
+ var _arr = [];
56
+ var _n = true;
57
+ var _d = false;
58
+ var _s, _e;
59
+ try {
60
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
61
+ _arr.push(_s.value);
62
+ if (i && _arr.length === i) break;
63
+ }
64
+ } catch (err) {
65
+ _d = true;
66
+ _e = err;
67
+ } finally{
68
+ try {
69
+ if (!_n && _i["return"] != null) _i["return"]();
70
+ } finally{
71
+ if (_d) throw _e;
72
+ }
73
+ }
74
+ return _arr;
75
+ }
76
+ function _non_iterable_rest() {
77
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
78
+ }
79
+ function _object_spread(target) {
80
+ for(var i = 1; i < arguments.length; i++){
81
+ var source = arguments[i] != null ? arguments[i] : {};
82
+ var ownKeys = Object.keys(source);
83
+ if (typeof Object.getOwnPropertySymbols === "function") {
84
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
85
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
86
+ }));
87
+ }
88
+ ownKeys.forEach(function(key) {
89
+ _define_property(target, key, source[key]);
90
+ });
91
+ }
92
+ return target;
93
+ }
94
+ function ownKeys(object, enumerableOnly) {
95
+ var keys = Object.keys(object);
96
+ if (Object.getOwnPropertySymbols) {
97
+ var symbols = Object.getOwnPropertySymbols(object);
98
+ if (enumerableOnly) {
99
+ symbols = symbols.filter(function(sym) {
100
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
101
+ });
102
+ }
103
+ keys.push.apply(keys, symbols);
104
+ }
105
+ return keys;
106
+ }
107
+ function _object_spread_props(target, source) {
108
+ source = source != null ? source : {};
109
+ if (Object.getOwnPropertyDescriptors) {
110
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
111
+ } else {
112
+ ownKeys(Object(source)).forEach(function(key) {
113
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
114
+ });
115
+ }
116
+ return target;
117
+ }
118
+ function _sliced_to_array(arr, i) {
119
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
120
+ }
121
+ function _type_of(obj) {
122
+ "@swc/helpers - typeof";
123
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
124
+ }
125
+ function _unsupported_iterable_to_array(o, minLen) {
126
+ if (!o) return;
127
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
128
+ var n = Object.prototype.toString.call(o).slice(8, -1);
129
+ if (n === "Object" && o.constructor) n = o.constructor.name;
130
+ if (n === "Map" || n === "Set") return Array.from(n);
131
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
132
+ }
133
+ function _ts_generator(thisArg, body) {
134
+ var f, y, t, g, _ = {
135
+ label: 0,
136
+ sent: function() {
137
+ if (t[0] & 1) throw t[1];
138
+ return t[1];
139
+ },
140
+ trys: [],
141
+ ops: []
142
+ };
143
+ return g = {
144
+ next: verb(0),
145
+ "throw": verb(1),
146
+ "return": verb(2)
147
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
148
+ return this;
149
+ }), g;
150
+ function verb(n) {
151
+ return function(v) {
152
+ return step([
153
+ n,
154
+ v
155
+ ]);
156
+ };
157
+ }
158
+ function step(op) {
159
+ if (f) throw new TypeError("Generator is already executing.");
160
+ while(_)try {
161
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
162
+ if (y = 0, t) op = [
163
+ op[0] & 2,
164
+ t.value
165
+ ];
166
+ switch(op[0]){
167
+ case 0:
168
+ case 1:
169
+ t = op;
170
+ break;
171
+ case 4:
172
+ _.label++;
173
+ return {
174
+ value: op[1],
175
+ done: false
176
+ };
177
+ case 5:
178
+ _.label++;
179
+ y = op[1];
180
+ op = [
181
+ 0
182
+ ];
183
+ continue;
184
+ case 7:
185
+ op = _.ops.pop();
186
+ _.trys.pop();
187
+ continue;
188
+ default:
189
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
190
+ _ = 0;
191
+ continue;
192
+ }
193
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
194
+ _.label = op[1];
195
+ break;
196
+ }
197
+ if (op[0] === 6 && _.label < t[1]) {
198
+ _.label = t[1];
199
+ t = op;
200
+ break;
201
+ }
202
+ if (t && _.label < t[2]) {
203
+ _.label = t[2];
204
+ _.ops.push(op);
205
+ break;
206
+ }
207
+ if (t[2]) _.ops.pop();
208
+ _.trys.pop();
209
+ continue;
210
+ }
211
+ op = body.call(thisArg, _);
212
+ } catch (e) {
213
+ op = [
214
+ 6,
215
+ e
216
+ ];
217
+ y = 0;
218
+ } finally{
219
+ f = t = 0;
220
+ }
221
+ if (op[0] & 5) throw op[1];
222
+ return {
223
+ value: op[0] ? op[1] : void 0,
224
+ done: true
225
+ };
226
+ }
227
+ }
228
+ var __defProp = Object.defineProperty;
229
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
230
+ var __getOwnPropNames = Object.getOwnPropertyNames;
231
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
232
+ var __export = function(target, all) {
233
+ for(var name in all)__defProp(target, name, {
234
+ get: all[name],
235
+ enumerable: true
236
+ });
237
+ };
238
+ var __copyProps = function(to, from, except, desc) {
239
+ if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
240
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
241
+ try {
242
+ var _loop = function() {
243
+ var key = _step.value;
244
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
245
+ get: function() {
246
+ return from[key];
247
+ },
248
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
249
+ });
250
+ };
251
+ for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
252
+ } catch (err) {
253
+ _didIteratorError = true;
254
+ _iteratorError = err;
255
+ } finally{
256
+ try {
257
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
258
+ _iterator.return();
259
+ }
260
+ } finally{
261
+ if (_didIteratorError) {
262
+ throw _iteratorError;
263
+ }
264
+ }
265
+ }
266
+ }
267
+ return to;
268
+ };
269
+ var __toCommonJS = function(mod) {
270
+ return __copyProps(__defProp({}, "__esModule", {
271
+ value: true
272
+ }), mod);
273
+ };
274
+ // src/index.ts
275
+ var index_exports = {};
276
+ __export(index_exports, {
277
+ AdGroupProvider: function() {
278
+ return AdGroupProvider;
279
+ },
280
+ AuthStateProvider: function() {
281
+ return AuthStateProvider;
282
+ },
283
+ ConfigProvider: function() {
284
+ return ConfigProvider;
285
+ },
286
+ FetcherProvider: function() {
287
+ return FetcherProvider;
288
+ },
289
+ QueryProvider: function() {
290
+ return QueryProvider;
291
+ },
292
+ bind: function() {
293
+ return bind;
294
+ },
295
+ calculateDay: function() {
296
+ return calculateDay;
297
+ },
298
+ calculateDayOfWeek: function() {
299
+ return calculateDayOfWeek;
300
+ },
301
+ calculateHour: function() {
302
+ return calculateHour;
303
+ },
304
+ calculateMinute: function() {
305
+ return calculateMinute;
306
+ },
307
+ calculateWeek: function() {
308
+ return calculateWeek;
309
+ },
310
+ useAdGroup: function() {
311
+ return useAdGroup;
312
+ },
313
+ useAdvertisement: function() {
314
+ return useAdvertisement;
315
+ },
316
+ useAuthState: function() {
317
+ return useAuthState;
318
+ },
319
+ useConfig: function() {
320
+ return useConfig;
321
+ },
322
+ useFetcher: function() {
323
+ return useFetcher;
324
+ },
325
+ useSignInWithToss: function() {
326
+ return useSignInWithToss;
327
+ },
328
+ useStorage: function() {
329
+ return useStorage;
330
+ }
331
+ });
332
+ module.exports = __toCommonJS(index_exports);
333
+ // src/config/ConfigContext/ConfigContext.tsx
334
+ var import_react = require("react");
335
+ // src/config/ConfigContext/constant.ts
336
+ var import_framework = require("@apps-in-toss/framework");
337
+ var RUNNING_ENVIRONMENT = (0, import_framework.getOperationalEnvironment)() === "sandbox" ? "local" : (0, import_framework.getSchemeUri)().startsWith("intoss-private") ? "preview" : "production";
338
+ var API_ENDPOINT = {
339
+ local: "http://localhost:3000",
340
+ preview: "https://preview-api.intoss.app",
341
+ production: "https://api.intoss.app"
342
+ }[RUNNING_ENVIRONMENT];
343
+ // src/config/ConfigContext/ConfigContext.tsx
344
+ var import_jsx_runtime = require("react/jsx-runtime");
345
+ var ConfigContext = (0, import_react.createContext)({
346
+ appName: "",
347
+ apiEndpoint: "http://localhost:3000",
348
+ runningEnvironment: "local"
349
+ });
350
+ var ConfigProvider = function(param) {
351
+ var appName = param.appName, children = param.children;
352
+ var contextValue = (0, import_react.useMemo)(function() {
353
+ return {
354
+ appName: appName,
355
+ apiEndpoint: API_ENDPOINT,
356
+ runningEnvironment: RUNNING_ENVIRONMENT
357
+ };
358
+ }, [
359
+ appName
360
+ ]);
361
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfigContext.Provider, {
362
+ value: contextValue,
363
+ children: children
364
+ });
365
+ };
366
+ var useConfig = function() {
367
+ return (0, import_react.useContext)(ConfigContext);
368
+ };
369
+ // src/advertisement/AdGroupContext/AdGroupContext.tsx
370
+ var import_react2 = require("react");
371
+ var import_jsx_runtime2 = require("react/jsx-runtime");
372
+ var AdGroupContext = (0, import_react2.createContext)({
373
+ getInterstitialAdGroup: function() {
374
+ return {
375
+ id: "ait-ad-test-interstitial-id",
376
+ type: "interstitial"
377
+ };
378
+ },
379
+ getRewardedAdGroup: function() {
380
+ return {
381
+ id: "ait-ad-test-rewarded-id",
382
+ type: "rewarded"
383
+ };
384
+ }
385
+ });
386
+ var AdGroupProvider = function(param) {
387
+ var initial = param.initial, children = param.children;
388
+ var _useConfig = useConfig(), appName = _useConfig.appName, runningEnvironment = _useConfig.runningEnvironment;
389
+ var _ref = _sliced_to_array((0, import_react2.useState)(runningEnvironment !== "production"), 2), initialized = _ref[0], setInitialized = _ref[1];
390
+ var _ref1 = _sliced_to_array((0, import_react2.useState)(initial), 2), adGroupList = _ref1[0], setAdGroupList = _ref1[1];
391
+ var getInterstitialAdGroup = (0, import_react2.useCallback)(function(key) {
392
+ var _adGroupList_key;
393
+ return {
394
+ id: (_adGroupList_key = adGroupList[key]) !== null && _adGroupList_key !== void 0 ? _adGroupList_key : "ait-ad-test-interstitial-id",
395
+ type: "interstitial"
396
+ };
397
+ }, [
398
+ adGroupList
399
+ ]);
400
+ var getRewardedAdGroup = (0, import_react2.useCallback)(function(key) {
401
+ var _adGroupList_key;
402
+ return {
403
+ id: (_adGroupList_key = adGroupList[key]) !== null && _adGroupList_key !== void 0 ? _adGroupList_key : "ait-ad-test-rewarded-id",
404
+ type: "rewarded"
405
+ };
406
+ }, [
407
+ adGroupList
408
+ ]);
409
+ var contextValue = (0, import_react2.useMemo)(function() {
410
+ return {
411
+ getInterstitialAdGroup: getInterstitialAdGroup,
412
+ getRewardedAdGroup: getRewardedAdGroup
413
+ };
414
+ }, [
415
+ getInterstitialAdGroup,
416
+ getRewardedAdGroup
417
+ ]);
418
+ (0, import_react2.useEffect)(function() {
419
+ if (initialized) {
420
+ return;
421
+ }
422
+ var controller = new AbortController();
423
+ var timeoutId = setTimeout(function() {
424
+ return controller.abort();
425
+ }, 3e3);
426
+ fetch("https://static.intoss.app/".concat(appName, "/assets/adGroupList.json"), {
427
+ signal: controller.signal
428
+ }).then(function(res) {
429
+ return res.json();
430
+ }).then(setAdGroupList).finally(function() {
431
+ clearTimeout(timeoutId);
432
+ setInitialized(true);
433
+ });
434
+ }, [
435
+ appName,
436
+ initialized
437
+ ]);
438
+ if (!initialized) {
439
+ return null;
440
+ }
441
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AdGroupContext.Provider, {
442
+ value: contextValue,
443
+ children: children
444
+ });
445
+ };
446
+ var useAdGroup = function() {
447
+ return (0, import_react2.useContext)(AdGroupContext);
448
+ };
449
+ // src/advertisement/useAdvertisement/useAdvertisement.ts
450
+ var import_framework2 = require("@apps-in-toss/framework");
451
+ var import_react3 = require("react");
452
+ var useAdvertisement = function(param) {
453
+ var primaryAdGroup = param.primaryAdGroup, secondaryAdGroup = param.secondaryAdGroup, onShowAd = param.onShowAd, onDissmissAd = param.onDissmissAd;
454
+ var _ref = _sliced_to_array((0, import_react3.useState)(false), 2), initialized = _ref[0], setInitialized = _ref[1];
455
+ var _ref1 = _sliced_to_array((0, import_react3.useState)(false), 2), adLoaded = _ref1[0], setAdLoaded = _ref1[1];
456
+ var _ref2 = _sliced_to_array((0, import_react3.useState)(), 2), adGroupId = _ref2[0], setAdGroupId = _ref2[1];
457
+ var _ref3 = _sliced_to_array((0, import_react3.useState)(null), 2), adCleanup = _ref3[0], setAdCleanup = _ref3[1];
458
+ var loadAd = (0, import_react3.useCallback)(function(adGroupId2) {
459
+ return new Promise(function(resolve) {
460
+ var cleanup = import_framework2.GoogleAdMob.loadAppsInTossAdMob({
461
+ options: {
462
+ adGroupId: adGroupId2
463
+ },
464
+ onEvent: function(event) {
465
+ switch(event.type){
466
+ case "loaded":
467
+ resolve([
468
+ true,
469
+ cleanup
470
+ ]);
471
+ break;
472
+ }
473
+ },
474
+ onError: function() {
475
+ return resolve([
476
+ false,
477
+ cleanup
478
+ ]);
479
+ }
480
+ });
481
+ });
482
+ }, []);
483
+ var loadWaterfall = (0, import_react3.useCallback)(/*#__PURE__*/ _async_to_generator(function() {
484
+ var _ref, primaryAdLoaded, primaryAdCleanup, _ref1, secondaryAdLoaded, secondaryAdCleanup;
485
+ return _ts_generator(this, function(_state) {
486
+ switch(_state.label){
487
+ case 0:
488
+ if (import_framework2.GoogleAdMob.loadAppsInTossAdMob.isSupported() !== true) {
489
+ setInitialized(true);
490
+ return [
491
+ 2
492
+ ];
493
+ }
494
+ if (adLoaded) {
495
+ return [
496
+ 2
497
+ ];
498
+ }
499
+ return [
500
+ 4,
501
+ loadAd(primaryAdGroup.id)
502
+ ];
503
+ case 1:
504
+ _ref = _sliced_to_array.apply(void 0, [
505
+ _state.sent(),
506
+ 2
507
+ ]), primaryAdLoaded = _ref[0], primaryAdCleanup = _ref[1];
508
+ if (primaryAdLoaded) {
509
+ setInitialized(true);
510
+ setAdLoaded(true);
511
+ setAdGroupId(primaryAdGroup.id);
512
+ setAdCleanup(function() {
513
+ return primaryAdCleanup;
514
+ });
515
+ return [
516
+ 2
517
+ ];
518
+ }
519
+ primaryAdCleanup();
520
+ if (!secondaryAdGroup) {
521
+ setInitialized(true);
522
+ return [
523
+ 2
524
+ ];
525
+ }
526
+ return [
527
+ 4,
528
+ loadAd(secondaryAdGroup.id)
529
+ ];
530
+ case 2:
531
+ _ref1 = _sliced_to_array.apply(void 0, [
532
+ _state.sent(),
533
+ 2
534
+ ]), secondaryAdLoaded = _ref1[0], secondaryAdCleanup = _ref1[1];
535
+ if (secondaryAdLoaded) {
536
+ setInitialized(true);
537
+ setAdLoaded(true);
538
+ setAdGroupId(secondaryAdGroup.id);
539
+ setAdCleanup(function() {
540
+ return secondaryAdCleanup;
541
+ });
542
+ return [
543
+ 2
544
+ ];
545
+ }
546
+ secondaryAdCleanup();
547
+ setInitialized(true);
548
+ return [
549
+ 2
550
+ ];
551
+ }
552
+ });
553
+ }), [
554
+ primaryAdGroup,
555
+ secondaryAdGroup,
556
+ adLoaded,
557
+ loadAd
558
+ ]);
559
+ var cleanupAd = (0, import_react3.useCallback)(function() {
560
+ adCleanup === null || adCleanup === void 0 ? void 0 : adCleanup();
561
+ setAdLoaded(false);
562
+ setAdGroupId(void 0);
563
+ setAdCleanup(null);
564
+ }, [
565
+ adCleanup
566
+ ]);
567
+ var showAd = (0, import_react3.useCallback)(function() {
568
+ if (import_framework2.GoogleAdMob.loadAppsInTossAdMob.isSupported() !== true) {
569
+ onShowAd === null || onShowAd === void 0 ? void 0 : onShowAd();
570
+ onDissmissAd === null || onDissmissAd === void 0 ? void 0 : onDissmissAd();
571
+ return;
572
+ }
573
+ if (!adLoaded || !adGroupId) {
574
+ onShowAd === null || onShowAd === void 0 ? void 0 : onShowAd();
575
+ onDissmissAd === null || onDissmissAd === void 0 ? void 0 : onDissmissAd();
576
+ return;
577
+ }
578
+ import_framework2.GoogleAdMob.showAppsInTossAdMob({
579
+ options: {
580
+ adGroupId: adGroupId
581
+ },
582
+ onEvent: function(event) {
583
+ switch(event.type){
584
+ case "show":
585
+ if (adGroupId === primaryAdGroup.id && primaryAdGroup.type === "interstitial" || adGroupId === (secondaryAdGroup === null || secondaryAdGroup === void 0 ? void 0 : secondaryAdGroup.id) && secondaryAdGroup.type === "interstitial") {
586
+ onShowAd === null || onShowAd === void 0 ? void 0 : onShowAd();
587
+ }
588
+ break;
589
+ case "failedToShow":
590
+ onShowAd === null || onShowAd === void 0 ? void 0 : onShowAd();
591
+ cleanupAd();
592
+ break;
593
+ case "dismissed":
594
+ onDissmissAd === null || onDissmissAd === void 0 ? void 0 : onDissmissAd();
595
+ cleanupAd();
596
+ break;
597
+ case "userEarnedReward":
598
+ onShowAd === null || onShowAd === void 0 ? void 0 : onShowAd();
599
+ break;
600
+ }
601
+ },
602
+ onError: function() {
603
+ onShowAd === null || onShowAd === void 0 ? void 0 : onShowAd();
604
+ cleanupAd();
605
+ }
606
+ });
607
+ }, [
608
+ adLoaded,
609
+ adGroupId,
610
+ primaryAdGroup,
611
+ secondaryAdGroup,
612
+ onShowAd,
613
+ onDissmissAd,
614
+ cleanupAd
615
+ ]);
616
+ (0, import_react3.useEffect)(function() {
617
+ if (!adGroupId) {
618
+ loadWaterfall();
619
+ }
620
+ }, [
621
+ adGroupId,
622
+ loadWaterfall
623
+ ]);
624
+ (0, import_react3.useEffect)(function() {
625
+ return function() {
626
+ return cleanupAd();
627
+ };
628
+ }, []);
629
+ return {
630
+ initialized: initialized,
631
+ adLoaded: adLoaded,
632
+ showAd: showAd
633
+ };
634
+ };
635
+ // src/auth-state/AuthStateContext/AuthStateContext.tsx
636
+ var import_react_query = require("@tanstack/react-query");
637
+ var import_react4 = require("react");
638
+ var import_jsx_runtime3 = require("react/jsx-runtime");
639
+ var AuthStateContext = (0, import_react4.createContext)({
640
+ isPreparing: true,
641
+ isLoggedIn: false,
642
+ retry: function() {
643
+ return Promise.resolve();
644
+ }
645
+ });
646
+ var AuthStateProvider = function(param) {
647
+ var children = param.children;
648
+ var _ref = (0, import_react_query.useQuery)({
649
+ queryKey: [
650
+ "/my/user"
651
+ ]
652
+ }), data = _ref.data, isFetching = _ref.isFetching, refetch = _ref.refetch;
653
+ var contextValue = (0, import_react4.useMemo)(function() {
654
+ var _data_user;
655
+ return {
656
+ isPreparing: isFetching,
657
+ isLoggedIn: Boolean(data === null || data === void 0 ? void 0 : (_data_user = data.user) === null || _data_user === void 0 ? void 0 : _data_user.id),
658
+ retry: refetch
659
+ };
660
+ }, [
661
+ data,
662
+ isFetching,
663
+ refetch
664
+ ]);
665
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AuthStateContext.Provider, {
666
+ value: contextValue,
667
+ children: children
668
+ });
669
+ };
670
+ var useAuthState = function() {
671
+ return (0, import_react4.useContext)(AuthStateContext);
672
+ };
673
+ // src/auth-state/useSignInWithToss/useSignInWithToss.ts
674
+ var import_framework4 = require("@apps-in-toss/framework");
675
+ // src/query/FetcherContext/FetcherContext.tsx
676
+ var import_framework3 = require("@apps-in-toss/framework");
677
+ var import_string = require("es-toolkit/string");
678
+ var import_react5 = require("react");
679
+ var import_jsx_runtime4 = require("react/jsx-runtime");
680
+ var KEY_TOKEN = "@auth/token";
681
+ var FetcherContext = (0, import_react5.createContext)({
682
+ fetcher: fetch,
683
+ setToken: function() {
684
+ return null;
685
+ }
686
+ });
687
+ var camelizeKeys = function(input) {
688
+ if (Array.isArray(input)) {
689
+ return input.map(camelizeKeys);
690
+ }
691
+ if (input !== null && (typeof input === "undefined" ? "undefined" : _type_of(input)) === "object") {
692
+ return Object.fromEntries(Object.entries(input).map(function(param) {
693
+ var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
694
+ return [
695
+ (0, import_string.camelCase)(key),
696
+ camelizeKeys(value)
697
+ ];
698
+ }));
699
+ }
700
+ return input;
701
+ };
702
+ var FetcherProvider = function(param) {
703
+ var baseUrl = param.baseUrl, children = param.children;
704
+ var _useConfig = useConfig(), appName = _useConfig.appName, apiEndpoint = _useConfig.apiEndpoint;
705
+ var _ref = _sliced_to_array((0, import_react5.useState)(null), 2), token = _ref[0], setToken = _ref[1];
706
+ var _ref1 = _sliced_to_array((0, import_react5.useState)(false), 2), initialized = _ref1[0], setInitialized = _ref1[1];
707
+ var fetcher = (0, import_react5.useCallback)(function(input, init) {
708
+ return fetch("".concat(baseUrl !== null && baseUrl !== void 0 ? baseUrl : apiEndpoint, "/").concat(appName).concat(input), _object_spread_props(_object_spread({}, init), {
709
+ headers: _object_spread({
710
+ "Content-Type": "application/json"
711
+ }, init === null || init === void 0 ? void 0 : init.headers, token ? {
712
+ Authorization: "Bearer ".concat(token)
713
+ } : {})
714
+ })).then(function(res) {
715
+ return res.json();
716
+ }).then(function(data) {
717
+ return camelizeKeys(data);
718
+ });
719
+ }, [
720
+ appName,
721
+ apiEndpoint,
722
+ token,
723
+ baseUrl
724
+ ]);
725
+ (0, import_react5.useEffect)(function() {
726
+ import_framework3.Storage.getItem(KEY_TOKEN).then(setToken).finally(function() {
727
+ return setInitialized(true);
728
+ });
729
+ }, []);
730
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FetcherContext.Provider, {
731
+ value: {
732
+ fetcher: fetcher,
733
+ setToken: setToken
734
+ },
735
+ children: initialized ? children : null
736
+ });
737
+ };
738
+ var useFetcher = function() {
739
+ return (0, import_react5.useContext)(FetcherContext);
740
+ };
741
+ // src/view-model/bind/bind.ts
742
+ var import_react6 = require("react");
743
+ var bind = function(useViewModel, ViewComponent, options) {
744
+ var displayName = (options !== null && options !== void 0 ? options : {}).displayName;
745
+ var MemoizedViewComponent = (0, import_react6.memo)(ViewComponent);
746
+ var Component = (0, import_react6.memo)(function(props) {
747
+ return (0, import_react6.createElement)(MemoizedViewComponent, useViewModel(props));
748
+ });
749
+ Component.ViewComponent = MemoizedViewComponent;
750
+ if (displayName) {
751
+ Component.displayName = displayName;
752
+ Component.ViewComponent.displayName = "".concat(displayName, "View");
753
+ }
754
+ return Component;
755
+ };
756
+ // src/query/QueryProvider/QueryProvider.tsx
757
+ var import_react_query3 = require("@tanstack/react-query");
758
+ // src/query/QueryProvider/useQueryProvider.ts
759
+ var import_react_query2 = require("@tanstack/react-query");
760
+ var import_react7 = require("react");
761
+ var useQueryProvider = function(param) {
762
+ var children = param.children;
763
+ var fetcher = useFetcher().fetcher;
764
+ var queryClient = (0, import_react7.useMemo)(function() {
765
+ return new import_react_query2.QueryClient({
766
+ defaultOptions: {
767
+ queries: {
768
+ queryFn: function(param) {
769
+ var queryKey = param.queryKey;
770
+ return fetcher(queryKey[0]);
771
+ }
772
+ }
773
+ }
774
+ });
775
+ }, [
776
+ fetcher
777
+ ]);
778
+ return {
779
+ queryClient: queryClient,
780
+ children: children
781
+ };
782
+ };
783
+ // src/query/QueryProvider/QueryProvider.tsx
784
+ var import_jsx_runtime5 = require("react/jsx-runtime");
785
+ var QueryProvider = bind(useQueryProvider, function(param) {
786
+ var queryClient = param.queryClient, children = param.children;
787
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_query3.QueryClientProvider, {
788
+ client: queryClient,
789
+ children: children
790
+ });
791
+ });
792
+ // src/auth-state/useSignInWithToss/useSignInWithToss.ts
793
+ var import_react_query4 = require("@tanstack/react-query");
794
+ var import_react8 = require("react");
795
+ var KEY_TOKEN2 = "@auth/token";
796
+ var useSignInWithToss = function(param) {
797
+ var onSuccess = param.onSuccess;
798
+ var retry = useAuthState().retry;
799
+ var _useFetcher = useFetcher(), fetcher = _useFetcher.fetcher, setToken = _useFetcher.setToken;
800
+ var signInWithTossMutation = (0, import_react_query4.useMutation)({
801
+ mutationFn: function() {
802
+ var _ref = _async_to_generator(function(body) {
803
+ return _ts_generator(this, function(_state) {
804
+ return [
805
+ 2,
806
+ fetcher("/my/sessions", {
807
+ method: "POST",
808
+ body: JSON.stringify(body)
809
+ })
810
+ ];
811
+ });
812
+ });
813
+ return function(body) {
814
+ return _ref.apply(this, arguments);
815
+ };
816
+ }(),
817
+ onSuccess: function() {
818
+ var _ref = _async_to_generator(function(data) {
819
+ return _ts_generator(this, function(_state) {
820
+ switch(_state.label){
821
+ case 0:
822
+ setToken(data.token);
823
+ return [
824
+ 4,
825
+ import_framework4.Storage.setItem(KEY_TOKEN2, data.token)
826
+ ];
827
+ case 1:
828
+ _state.sent();
829
+ return [
830
+ 4,
831
+ retry()
832
+ ];
833
+ case 2:
834
+ _state.sent();
835
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
836
+ return [
837
+ 2
838
+ ];
839
+ }
840
+ });
841
+ });
842
+ return function(data) {
843
+ return _ref.apply(this, arguments);
844
+ };
845
+ }()
846
+ });
847
+ var signInWithToss = (0, import_react8.useCallback)(/*#__PURE__*/ _async_to_generator(function() {
848
+ var _ref, authorizationCode, referrer;
849
+ return _ts_generator(this, function(_state) {
850
+ switch(_state.label){
851
+ case 0:
852
+ return [
853
+ 4,
854
+ (0, import_framework4.appLogin)()
855
+ ];
856
+ case 1:
857
+ _ref = _state.sent(), authorizationCode = _ref.authorizationCode, referrer = _ref.referrer;
858
+ signInWithTossMutation.mutate({
859
+ authorizationCode: authorizationCode,
860
+ referrer: referrer
861
+ });
862
+ return [
863
+ 2
864
+ ];
865
+ }
866
+ });
867
+ }), [
868
+ signInWithTossMutation
869
+ ]);
870
+ return {
871
+ signInWithToss: signInWithToss,
872
+ isLoading: signInWithTossMutation.isPending
873
+ };
874
+ };
875
+ // src/calendar/calculateDay/calculateDay.ts
876
+ var MS_PER_DAY = 864e5;
877
+ var KST_OFFSET_MS = 324e5;
878
+ var calculateDay = function(timestamp) {
879
+ return Math.floor((timestamp + KST_OFFSET_MS) / MS_PER_DAY);
880
+ };
881
+ // src/calendar/calculateDayOfWeek/calculateDayOfWeek.ts
882
+ var KST_OFFSET_WEEKDAY = 3;
883
+ var calculateDayOfWeek = function(day) {
884
+ return (day + KST_OFFSET_WEEKDAY) % 7;
885
+ };
886
+ // src/calendar/calculateHour/calculateHour.ts
887
+ var MS_PER_DAY2 = 864e5;
888
+ var MS_PER_HOUR = 36e5;
889
+ var KST_OFFSET_MS2 = 324e5;
890
+ var calculateHour = function(timestamp) {
891
+ return Math.floor((timestamp + KST_OFFSET_MS2) % MS_PER_DAY2 / MS_PER_HOUR);
892
+ };
893
+ // src/calendar/calculateMinute/calculateMinute.ts
894
+ var MS_PER_HOUR2 = 36e5;
895
+ var MS_PER_MINUTE = 6e4;
896
+ var KST_OFFSET_MS3 = 324e5;
897
+ var calculateMinute = function(timestamp) {
898
+ return Math.floor((timestamp + KST_OFFSET_MS3) % MS_PER_HOUR2 / MS_PER_MINUTE);
899
+ };
900
+ // src/calendar/calculateWeek/calculateWeek.ts
901
+ var KST_OFFSET_WEEKDAY2 = 3;
902
+ var calculateWeek = function(day) {
903
+ return Math.floor((day + KST_OFFSET_WEEKDAY2) / 7);
904
+ };
905
+ // src/storage/useStorage/useStorage.ts
906
+ var import_framework5 = require("@apps-in-toss/framework");
907
+ var import_react9 = require("react");
908
+ var import_react_native = require("react-native");
909
+ var useStorage = function(key) {
910
+ var _ref = _sliced_to_array((0, import_react9.useState)(), 2), stateValue = _ref[0], setStateValue = _ref[1];
911
+ var _ref1 = _sliced_to_array((0, import_react9.useState)(true), 2), isLoading = _ref1[0], setIsLoading = _ref1[1];
912
+ var updateValue = (0, import_react9.useCallback)(function(value) {
913
+ setStateValue(value);
914
+ import_react_native.DeviceEventEmitter.emit(key, value);
915
+ return import_framework5.Storage.setItem(key, JSON.stringify({
916
+ value: value
917
+ }));
918
+ }, [
919
+ key
920
+ ]);
921
+ (0, import_react9.useEffect)(function() {
922
+ setIsLoading(true);
923
+ import_framework5.Storage.getItem(key).then(function(item) {
924
+ try {
925
+ setStateValue(item === null ? void 0 : JSON.parse(item).value);
926
+ } catch (e) {
927
+ setStateValue(void 0);
928
+ } finally{
929
+ setIsLoading(false);
930
+ }
931
+ });
932
+ var updateValueListener = import_react_native.DeviceEventEmitter.addListener(key, setStateValue);
933
+ return function() {
934
+ return updateValueListener.remove();
935
+ };
936
+ }, [
937
+ key
938
+ ]);
939
+ return [
940
+ stateValue,
941
+ updateValue,
942
+ isLoading
943
+ ];
944
+ };
945
+ // Annotate the CommonJS export names for ESM import in node:
946
+ 0 && (module.exports = {
947
+ AdGroupProvider: AdGroupProvider,
948
+ AuthStateProvider: AuthStateProvider,
949
+ ConfigProvider: ConfigProvider,
950
+ FetcherProvider: FetcherProvider,
951
+ QueryProvider: QueryProvider,
952
+ bind: bind,
953
+ calculateDay: calculateDay,
954
+ calculateDayOfWeek: calculateDayOfWeek,
955
+ calculateHour: calculateHour,
956
+ calculateMinute: calculateMinute,
957
+ calculateWeek: calculateWeek,
958
+ useAdGroup: useAdGroup,
959
+ useAdvertisement: useAdvertisement,
960
+ useAuthState: useAuthState,
961
+ useConfig: useConfig,
962
+ useFetcher: useFetcher,
963
+ useSignInWithToss: useSignInWithToss,
964
+ useStorage: useStorage
965
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intoss/shared",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [