@mediacubeco/react-native-base 0.1.6 → 2.0.0
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/helpers/index.cjs +1 -2
- package/dist/helpers/index.d.ts +5 -78
- package/dist/helpers/index.mjs +1 -2
- package/dist/hooks/index.cjs +1 -2
- package/dist/hooks/index.d.ts +2 -4
- package/dist/hooks/index.mjs +1 -2
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +9 -81
- package/dist/index.mjs +1 -2
- package/dist/services/index.cjs +1 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.mjs +1 -0
- package/dist/types/index.cjs +1 -2
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.mjs +1 -2
- package/dist/utils/index.cjs +1 -2
- package/dist/utils/index.d.ts +2 -3
- package/dist/utils/index.mjs +1 -2
- package/package.json +21 -10
- package/dist/helpers/index.cjs.map +0 -1
- package/dist/helpers/index.d.ts.map +0 -1
- package/dist/helpers/index.mjs.map +0 -1
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.mjs.map +0 -1
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.mjs.map +0 -1
package/dist/helpers/index.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";var t=require("
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
"use strict";var t=require("@mediacubeco/react-base/helpers"),e=require("@react-native-clipboard/clipboard"),r=require("react-native");function i(t){return t&&t.__esModule?t:{default:t}}var o=i(e);class s{static get windowWidth(){return r.Dimensions.get("window").width}static get windowHeight(){return r.Dimensions.get("window").height}static get statusBarWidth(){return s.windowWidth}static get statusBarHeight(){return r.StatusBar.currentHeight??0}static get ratio(){const t=s.windowWidth/375,e=s.windowHeight/812;return Math.min(t,e)}static byWindowWidth(t){return s.windowWidth*t}static byWindowHeight(t){return s.windowHeight*t}static byRatio(t){return s.ratio*t}}var a;exports.PlatformOS=void 0,(a=exports.PlatformOS||(exports.PlatformOS={})).Ios="ios",a.Android="android";class n{static get OS(){return r.Platform.OS}static get version(){return r.Platform.Version}static get isIos(){return"ios"===n.OS}static get isAndroid(){return"android"===n.OS}static get hasLiquidGlass(){const[t]=n.version.toString().split(".");return n.isIos&&Number(t)>=26}static by(t,e=exports.PlatformOS.Ios){return r.Platform.select({...t,default:t[e]})}}exports.Clipboard=class{static copy(e){return t.Log.formatted.info("copy",e),o.default.setString(e.toString())}static async paste(){const e=await o.default.getString();return t.Log.formatted.info("paste",e),e}},exports.Dimensions=s,exports.Platform=n,Object.keys(t).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from '@mediacubeco/
|
|
2
|
-
import {
|
|
1
|
+
export * from '@mediacubeco/react-base/helpers';
|
|
2
|
+
import { Include, BaseRecord } from '@mediacubeco/react-base/types';
|
|
3
3
|
|
|
4
4
|
type ClipboardValue = string;
|
|
5
5
|
|
|
@@ -24,79 +24,6 @@ declare class Dimensions {
|
|
|
24
24
|
static byRatio(value: number): number;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
declare class Event {
|
|
28
|
-
isDefaultPrevented: boolean;
|
|
29
|
-
constructor();
|
|
30
|
-
preventDefault(): void;
|
|
31
|
-
overrideDefault(): void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
type EventEmitterDefaultAction = Noop;
|
|
35
|
-
type EventEmitterListener<Params> = Callback<[Event & Params]>;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* ### Create instance
|
|
39
|
-
* **Returns ```EventEmitter```**
|
|
40
|
-
* ```
|
|
41
|
-
* const emitter = new EventEmitter()
|
|
42
|
-
* const testEmitter = new EventEmitter<'test'>()
|
|
43
|
-
* const testEmitterWithParam = new EventEmitter<'test', { param: 'param' }>()
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* ---
|
|
47
|
-
*
|
|
48
|
-
* ### EventEmitter.emit
|
|
49
|
-
* **Returns ```void```**
|
|
50
|
-
* ```
|
|
51
|
-
* emitter.emit('test')
|
|
52
|
-
* emitter.emit('test', { param: 'param' })
|
|
53
|
-
* emitter.emit('test', undefined, () => 'default')
|
|
54
|
-
* emitter.emit('test', { param: 'param' }, () => 'default')
|
|
55
|
-
* ```
|
|
56
|
-
*
|
|
57
|
-
* ---
|
|
58
|
-
*
|
|
59
|
-
* ### EventEmitter.on
|
|
60
|
-
* **Returns ```Noop```**
|
|
61
|
-
* ```
|
|
62
|
-
* const listener = () => null
|
|
63
|
-
* emitter.on('test', listener)
|
|
64
|
-
*
|
|
65
|
-
* emitter.on('test', () => null)
|
|
66
|
-
* emitter.on('test', (event) => null)
|
|
67
|
-
* emitter.on('test', ({ param }) => null)
|
|
68
|
-
* ```
|
|
69
|
-
*
|
|
70
|
-
* ---
|
|
71
|
-
*
|
|
72
|
-
* ### EventEmitter.off
|
|
73
|
-
* **Returns ```void```**
|
|
74
|
-
* ```
|
|
75
|
-
* const listener = () => 'event'
|
|
76
|
-
* emitter.off(listener)
|
|
77
|
-
*
|
|
78
|
-
* const unsubscribe = emitter.on('test', () => 'event')
|
|
79
|
-
* unsubscribe()
|
|
80
|
-
* ```
|
|
81
|
-
*
|
|
82
|
-
* ---
|
|
83
|
-
*
|
|
84
|
-
* ### EventEmitter.clear
|
|
85
|
-
* **Returns ```void```**
|
|
86
|
-
* ```
|
|
87
|
-
* EventEmitter.clear('clear')
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
declare class EventEmitter<EventName extends string = string, EventParam extends Nullable<object> = undefined> {
|
|
91
|
-
#private;
|
|
92
|
-
constructor();
|
|
93
|
-
get eventNameList(): EventName[];
|
|
94
|
-
emit(name: EventName, param?: EventParam, defaultAction?: EventEmitterDefaultAction): void;
|
|
95
|
-
on(name: EventName, listener: EventEmitterListener<EventParam>): () => void;
|
|
96
|
-
off(name: EventName, listener: EventEmitterListener<EventParam>): void;
|
|
97
|
-
clear(name: EventName): void;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
27
|
declare enum PlatformOS {
|
|
101
28
|
Ios = "ios",
|
|
102
29
|
Android = "android"
|
|
@@ -110,8 +37,8 @@ declare class Platform {
|
|
|
110
37
|
static get version(): string | number;
|
|
111
38
|
static get isIos(): boolean;
|
|
112
39
|
static get isAndroid(): boolean;
|
|
113
|
-
static
|
|
40
|
+
static get hasLiquidGlass(): boolean;
|
|
41
|
+
static by<Value>(data: PlatformByData<Value>, defaultOS?: PlatformRequiredOS): unknown;
|
|
114
42
|
}
|
|
115
43
|
|
|
116
|
-
export { Clipboard, Dimensions,
|
|
117
|
-
//# sourceMappingURL=index.d.ts.map
|
|
44
|
+
export { Clipboard, Dimensions, Platform, PlatformOS };
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import{Log as t}from"@mediacubeco/react-base/helpers";export*from"@mediacubeco/react-base/helpers";import i from"@react-native-clipboard/clipboard";import{Dimensions as r,StatusBar as e,Platform as s}from"react-native";class a{static copy(r){return t.formatted.info("copy",r),i.setString(r.toString())}static async paste(){const r=await i.getString();return t.formatted.info("paste",r),r}}class o{static get windowWidth(){return r.get("window").width}static get windowHeight(){return r.get("window").height}static get statusBarWidth(){return o.windowWidth}static get statusBarHeight(){return e.currentHeight??0}static get ratio(){const t=o.windowWidth/375,i=o.windowHeight/812;return Math.min(t,i)}static byWindowWidth(t){return o.windowWidth*t}static byWindowHeight(t){return o.windowHeight*t}static byRatio(t){return o.ratio*t}}var n;!function(t){t.Ios="ios",t.Android="android"}(n||(n={}));class c{static get OS(){return s.OS}static get version(){return s.Version}static get isIos(){return"ios"===c.OS}static get isAndroid(){return"android"===c.OS}static get hasLiquidGlass(){const[t]=c.version.toString().split(".");return c.isIos&&Number(t)>=26}static by(t,i=n.Ios){return s.select({...t,default:t[i]})}}export{a as Clipboard,o as Dimensions,c as Platform,n as PlatformOS};
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
"use strict";var e,t,n=require("react"),r=require("react-native"),a=require("@mediacubeco/react-base/utils");require("@mediacubeco/react-base/helpers"),require("@react-native-clipboard/clipboard"),function(e){e.Ios="ios",e.Android="android"}(e||(e={}));class o{static get OS(){return r.Platform.OS}static get version(){return r.Platform.Version}static get isIos(){return"ios"===o.OS}static get isAndroid(){return"android"===o.OS}static get hasLiquidGlass(){const[e]=o.version.toString().split(".");return o.isIos&&Number(e)>=26}static by(t,n=e.Ios){return r.Platform.select({...t,default:t[n]})}}!function(e){e.Active="active",e.Inactive="inactive",e.Background="background",e.Extension="extension",e.Unknown="unknown"}(t||(t={}));const s=({onFocus:e,onBlur:n,...s})=>{const i=[];return o.isAndroid&&i.push(r.AppState.addEventListener("focus",t=>a.runCallback(e,t)),r.AppState.addEventListener("blur",e=>a.runCallback(n,e))),i.push(r.AppState.addEventListener("change",e=>(({state:e,handlers:n})=>{const{onActive:r,onInactive:o,onBackground:s,onExtension:i,onUnknown:u,onChange:l}=n??{},c={[t.Active]:r,[t.Inactive]:o,[t.Background]:s,[t.Extension]:i,[t.Unknown]:u}[e];a.runCallback(l,e),a.runCallback(c,e)})({state:e,handlers:s}))),{remove(){i.forEach(e=>e.remove())}}};var i;!function(e){e.onWillShow="keyboardWillShow",e.onDidShow="keyboardDidShow",e.onWillHide="keyboardWillHide",e.onDidHide="keyboardDidHide",e.onWillChangeFrame="keyboardWillChangeFrame",e.onDidChangeFrame="keyboardDidChangeFrame"}(i||(i={}));const u={top:0,left:0,width:0,height:0},l={top:null,left:null,width:null,height:null};const c={x:0,y:0,width:0,height:0,pageX:0,pageY:0},d={left:0,top:0,width:0,height:0},h={x:0,y:0,width:0,height:0};exports.DEFAULT_LAYOUT=u,exports.DEFAULT_NULLABLE_LAYOUT=l,exports.getResponder=e=>{const t=e.current?.getScrollResponder()??null,n=t?.getInnerViewRef?.()??null,r=t?.getNativeScrollRef?.()??null;return{responder:t,inner:n,outer:r}},exports.useAppState=e=>{n.useEffect(()=>{const t=s(e);return()=>t.remove()},[e])},exports.useKeyboard=e=>{n.useEffect(()=>{const t=(e=>{const t=a.mapRecord(e,(e,t)=>{if(!a.isNullable(t))return r.Keyboard.addListener(i[e],t)});return{remove:()=>a.filterNullableValues(Object.values(t)).map(e=>e.remove())}})(e);return()=>t.remove()},[e])},exports.useLayout=function({onLayout:e,isNullable:t}={isNullable:!1}){const[r,o]=n.useState(t?l:u),s=n.useCallback(t=>{a.runCallback(e,t);const{layout:n}=t.nativeEvent,{y:r,x:s,width:i,height:u}=n;o({top:r,left:s,width:i,height:u})},[e]);return[r,s]},exports.useMeasures=()=>{const e=n.useRef(c),t=n.useRef(d),r=n.useRef(h),o=n.useCallback(async(e,t,n)=>new Promise(r=>{a.isNullable(e)?r(t):n(e,r)}),[]),s=n.useCallback(t=>o(t,c,(t,n)=>{t.measure((t=0,r=0,a=0,o=0,s=0,i=0)=>{e.current={x:t,y:r,width:a,height:o,pageX:s,pageY:i},n(e.current)})}),[]),i=n.useCallback((e,n)=>o(e,d,(e,r)=>{e.measureLayout(n,(e=0,n=0,a=0,o=0)=>{t.current={left:e,top:n,width:a,height:o},r(t.current)})}),[]),u=n.useCallback(e=>o(e,h,(e,t)=>{e.measureInWindow((e=0,n=0,a=0,o=0)=>{r.current={x:e,y:n,width:a,height:o},t(r.current)})}),[]);return{measuresRef:e,measuresInContainerRef:t,measuresInWindowRef:r,calculateMeasures:s,calculateMeasuresInContainer:i,calculateMeasuresInWindow:u}};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as react_native from 'react-native';
|
|
2
1
|
import { AppStateStatus, KeyboardEventListener, LayoutChangeEvent, NativeMethods, View, ScrollView, FlatList, SectionList } from 'react-native';
|
|
3
|
-
import { BaseRecord, Callback, KeyOf, Nullable } from '@mediacubeco/
|
|
2
|
+
import { BaseRecord, Callback, KeyOf, Nullable } from '@mediacubeco/react-base/types';
|
|
4
3
|
import * as react from 'react';
|
|
5
4
|
import { RefObject } from 'react';
|
|
6
5
|
|
|
@@ -95,11 +94,10 @@ declare const useMeasures: () => {
|
|
|
95
94
|
};
|
|
96
95
|
|
|
97
96
|
declare const getResponder: <ScrolledCurrent extends Nullable<ScrollView | FlatList | SectionList>, Current extends Nullable<View>>(scrolledRef: RefObject<ScrolledCurrent>) => {
|
|
98
|
-
responder:
|
|
97
|
+
responder: any;
|
|
99
98
|
inner: Current;
|
|
100
99
|
outer: Current;
|
|
101
100
|
};
|
|
102
101
|
|
|
103
102
|
export { DEFAULT_LAYOUT, DEFAULT_NULLABLE_LAYOUT, getResponder, useAppState, useKeyboard, useLayout, useMeasures };
|
|
104
103
|
export type { Layout, Measures, MeasuresInContainer, MeasuresInWindow, NullableLayout };
|
|
105
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{useEffect as e,useState as
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import{useEffect as e,useState as t,useCallback as n,useRef as r}from"react";import{Platform as o,AppState as i,Keyboard as a}from"react-native";import{runCallback as s,mapRecord as c,isNullable as u,filterNullableValues as l}from"@mediacubeco/react-base/utils";import"@mediacubeco/react-base/helpers";import"@react-native-clipboard/clipboard";var d,h;!function(e){e.Ios="ios",e.Android="android"}(d||(d={}));class g{static get OS(){return o.OS}static get version(){return o.Version}static get isIos(){return"ios"===g.OS}static get isAndroid(){return"android"===g.OS}static get hasLiquidGlass(){const[e]=g.version.toString().split(".");return g.isIos&&Number(e)>=26}static by(e,t=d.Ios){return o.select({...e,default:e[t]})}}!function(e){e.Active="active",e.Inactive="inactive",e.Background="background",e.Extension="extension",e.Unknown="unknown"}(h||(h={}));const m=({onFocus:e,onBlur:t,...n})=>{const r=[];return g.isAndroid&&r.push(i.addEventListener("focus",t=>s(e,t)),i.addEventListener("blur",e=>s(t,e))),r.push(i.addEventListener("change",e=>(({state:e,handlers:t})=>{const{onActive:n,onInactive:r,onBackground:o,onExtension:i,onUnknown:a,onChange:c}=t??{},u={[h.Active]:n,[h.Inactive]:r,[h.Background]:o,[h.Extension]:i,[h.Unknown]:a}[e];s(c,e),s(u,e)})({state:e,handlers:n}))),{remove(){r.forEach(e=>e.remove())}}};var v;!function(e){e.onWillShow="keyboardWillShow",e.onDidShow="keyboardDidShow",e.onWillHide="keyboardWillHide",e.onDidHide="keyboardDidHide",e.onWillChangeFrame="keyboardWillChangeFrame",e.onDidChangeFrame="keyboardDidChangeFrame"}(v||(v={}));const p=t=>{e(()=>{const e=m(t);return()=>e.remove()},[t])},w=t=>{e(()=>{const e=(e=>{const t=c(e,(e,t)=>{if(!u(t))return a.addListener(v[e],t)});return{remove:()=>l(Object.values(t)).map(e=>e.remove())}})(t);return()=>e.remove()},[t])},f={top:0,left:0,width:0,height:0},b={top:null,left:null,width:null,height:null};function y({onLayout:e,isNullable:r}={isNullable:!1}){const[o,i]=t(r?b:f),a=n(t=>{s(e,t);const{layout:n}=t.nativeEvent,{y:r,x:o,width:a,height:c}=n;i({top:r,left:o,width:a,height:c})},[e]);return[o,a]}const k={x:0,y:0,width:0,height:0,pageX:0,pageY:0},I={left:0,top:0,width:0,height:0},S={x:0,y:0,width:0,height:0},x=()=>{const e=r(k),t=r(I),o=r(S),i=n(async(e,t,n)=>new Promise(r=>{u(e)?r(t):n(e,r)}),[]),a=n(t=>i(t,k,(t,n)=>{t.measure((t=0,r=0,o=0,i=0,a=0,s=0)=>{e.current={x:t,y:r,width:o,height:i,pageX:a,pageY:s},n(e.current)})}),[]),s=n((e,n)=>i(e,I,(e,r)=>{e.measureLayout(n,(e=0,n=0,o=0,i=0)=>{t.current={left:e,top:n,width:o,height:i},r(t.current)})}),[]),c=n(e=>i(e,S,(e,t)=>{e.measureInWindow((e=0,n=0,r=0,i=0)=>{o.current={x:e,y:n,width:r,height:i},t(o.current)})}),[]);return{measuresRef:e,measuresInContainerRef:t,measuresInWindowRef:o,calculateMeasures:a,calculateMeasuresInContainer:s,calculateMeasuresInWindow:c}},W=e=>{const t=e.current?.getScrollResponder()??null,n=t?.getInnerViewRef?.()??null,r=t?.getNativeScrollRef?.()??null;return{responder:t,inner:n,outer:r}};export{f as DEFAULT_LAYOUT,b as DEFAULT_NULLABLE_LAYOUT,W as getResponder,p as useAppState,w as useKeyboard,y as useLayout,x as useMeasures};
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
"use strict";var e=require("@mediacubeco/react-base/helpers"),t=require("@react-native-clipboard/clipboard"),r=require("react-native"),n=require("react"),o=require("@mediacubeco/react-base/utils"),a=require("@mediacubeco/react-base/services"),i=require("@mediacubeco/react-base/types");function s(e){return e&&e.__esModule?e:{default:e}}var u=s(t);class c{static get windowWidth(){return r.Dimensions.get("window").width}static get windowHeight(){return r.Dimensions.get("window").height}static get statusBarWidth(){return c.windowWidth}static get statusBarHeight(){return r.StatusBar.currentHeight??0}static get ratio(){const e=c.windowWidth/375,t=c.windowHeight/812;return Math.min(e,t)}static byWindowWidth(e){return c.windowWidth*e}static byWindowHeight(e){return c.windowHeight*e}static byRatio(e){return c.ratio*e}}var l,d;exports.PlatformOS=void 0,(l=exports.PlatformOS||(exports.PlatformOS={})).Ios="ios",l.Android="android";class p{static get OS(){return r.Platform.OS}static get version(){return r.Platform.Version}static get isIos(){return"ios"===p.OS}static get isAndroid(){return"android"===p.OS}static get hasLiquidGlass(){const[e]=p.version.toString().split(".");return p.isIos&&Number(e)>=26}static by(e,t=exports.PlatformOS.Ios){return r.Platform.select({...e,default:e[t]})}}!function(e){e.Active="active",e.Inactive="inactive",e.Background="background",e.Extension="extension",e.Unknown="unknown"}(d||(d={}));const h=({onFocus:e,onBlur:t,...n})=>{const a=[];return p.isAndroid&&a.push(r.AppState.addEventListener("focus",t=>o.runCallback(e,t)),r.AppState.addEventListener("blur",e=>o.runCallback(t,e))),a.push(r.AppState.addEventListener("change",e=>(({state:e,handlers:t})=>{const{onActive:r,onInactive:n,onBackground:a,onExtension:i,onUnknown:s,onChange:u}=t??{},c={[d.Active]:r,[d.Inactive]:n,[d.Background]:a,[d.Extension]:i,[d.Unknown]:s}[e];o.runCallback(u,e),o.runCallback(c,e)})({state:e,handlers:n}))),{remove(){a.forEach(e=>e.remove())}}};var f;!function(e){e.onWillShow="keyboardWillShow",e.onDidShow="keyboardDidShow",e.onWillHide="keyboardWillHide",e.onDidHide="keyboardDidHide",e.onWillChangeFrame="keyboardWillChangeFrame",e.onDidChangeFrame="keyboardDidChangeFrame"}(f||(f={}));const b=e=>{const t=o.mapRecord(e,(e,t)=>{if(!o.isNullable(t))return r.Keyboard.addListener(f[e],t)});return{remove:()=>o.filterNullableValues(Object.values(t)).map(e=>e.remove())}},g={top:0,left:0,width:0,height:0},w={top:null,left:null,width:null,height:null};const y={x:0,y:0,width:0,height:0,pageX:0,pageY:0},m={left:0,top:0,width:0,height:0},x={x:0,y:0,width:0,height:0};exports.Clipboard=class{static copy(t){return e.Log.formatted.info("copy",t),u.default.setString(t.toString())}static async paste(){const t=await u.default.getString();return e.Log.formatted.info("paste",t),t}},exports.DEFAULT_LAYOUT=g,exports.DEFAULT_NULLABLE_LAYOUT=w,exports.Dimensions=c,exports.Platform=p,exports.getResponder=e=>{const t=e.current?.getScrollResponder()??null,r=t?.getInnerViewRef?.()??null,n=t?.getNativeScrollRef?.()??null;return{responder:t,inner:r,outer:n}},exports.listenAppState=h,exports.listenKeyboard=b,exports.useAppState=e=>{n.useEffect(()=>{const t=h(e);return()=>t.remove()},[e])},exports.useKeyboard=e=>{n.useEffect(()=>{const t=b(e);return()=>t.remove()},[e])},exports.useLayout=function({onLayout:e,isNullable:t}={isNullable:!1}){const[r,a]=n.useState(t?w:g),i=n.useCallback(t=>{o.runCallback(e,t);const{layout:r}=t.nativeEvent,{y:n,x:i,width:s,height:u}=r;a({top:n,left:i,width:s,height:u})},[e]);return[r,i]},exports.useMeasures=()=>{const e=n.useRef(y),t=n.useRef(m),r=n.useRef(x),a=n.useCallback(async(e,t,r)=>new Promise(n=>{o.isNullable(e)?n(t):r(e,n)}),[]),i=n.useCallback(t=>a(t,y,(t,r)=>{t.measure((t=0,n=0,o=0,a=0,i=0,s=0)=>{e.current={x:t,y:n,width:o,height:a,pageX:i,pageY:s},r(e.current)})}),[]),s=n.useCallback((e,r)=>a(e,m,(e,n)=>{e.measureLayout(r,(e=0,r=0,o=0,a=0)=>{t.current={left:e,top:r,width:o,height:a},n(t.current)})}),[]),u=n.useCallback(e=>a(e,x,(e,t)=>{e.measureInWindow((e=0,n=0,o=0,a=0)=>{r.current={x:e,y:n,width:o,height:a},t(r.current)})}),[]);return{measuresRef:e,measuresInContainerRef:t,measuresInWindowRef:r,calculateMeasures:i,calculateMeasuresInContainer:s,calculateMeasuresInWindow:u}},Object.keys(e).forEach(function(t){"default"===t||Object.prototype.hasOwnProperty.call(exports,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})}),Object.keys(o).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return o[e]}})}),Object.keys(a).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return a[e]}})}),Object.keys(i).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return i[e]}})});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export * from '@mediacubeco/
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
export * from '@mediacubeco/react-base/helpers';
|
|
2
|
+
import { Include, BaseRecord, Callback, KeyOf, Nullable } from '@mediacubeco/react-base/types';
|
|
3
|
+
export * from '@mediacubeco/react-base/types';
|
|
4
4
|
import { AppStateStatus, NativeEventSubscription, KeyboardEventListener, LayoutChangeEvent, NativeMethods, View, ScrollView, FlatList, SectionList } from 'react-native';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import { RefObject } from 'react';
|
|
7
|
-
export * from '@mediacubeco/
|
|
7
|
+
export * from '@mediacubeco/react-base/services';
|
|
8
|
+
export * from '@mediacubeco/react-base/utils';
|
|
8
9
|
|
|
9
10
|
type ClipboardValue = string;
|
|
10
11
|
|
|
@@ -29,79 +30,6 @@ declare class Dimensions {
|
|
|
29
30
|
static byRatio(value: number): number;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
declare class Event {
|
|
33
|
-
isDefaultPrevented: boolean;
|
|
34
|
-
constructor();
|
|
35
|
-
preventDefault(): void;
|
|
36
|
-
overrideDefault(): void;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
type EventEmitterDefaultAction = Noop;
|
|
40
|
-
type EventEmitterListener<Params> = Callback<[Event & Params]>;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* ### Create instance
|
|
44
|
-
* **Returns ```EventEmitter```**
|
|
45
|
-
* ```
|
|
46
|
-
* const emitter = new EventEmitter()
|
|
47
|
-
* const testEmitter = new EventEmitter<'test'>()
|
|
48
|
-
* const testEmitterWithParam = new EventEmitter<'test', { param: 'param' }>()
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* ---
|
|
52
|
-
*
|
|
53
|
-
* ### EventEmitter.emit
|
|
54
|
-
* **Returns ```void```**
|
|
55
|
-
* ```
|
|
56
|
-
* emitter.emit('test')
|
|
57
|
-
* emitter.emit('test', { param: 'param' })
|
|
58
|
-
* emitter.emit('test', undefined, () => 'default')
|
|
59
|
-
* emitter.emit('test', { param: 'param' }, () => 'default')
|
|
60
|
-
* ```
|
|
61
|
-
*
|
|
62
|
-
* ---
|
|
63
|
-
*
|
|
64
|
-
* ### EventEmitter.on
|
|
65
|
-
* **Returns ```Noop```**
|
|
66
|
-
* ```
|
|
67
|
-
* const listener = () => null
|
|
68
|
-
* emitter.on('test', listener)
|
|
69
|
-
*
|
|
70
|
-
* emitter.on('test', () => null)
|
|
71
|
-
* emitter.on('test', (event) => null)
|
|
72
|
-
* emitter.on('test', ({ param }) => null)
|
|
73
|
-
* ```
|
|
74
|
-
*
|
|
75
|
-
* ---
|
|
76
|
-
*
|
|
77
|
-
* ### EventEmitter.off
|
|
78
|
-
* **Returns ```void```**
|
|
79
|
-
* ```
|
|
80
|
-
* const listener = () => 'event'
|
|
81
|
-
* emitter.off(listener)
|
|
82
|
-
*
|
|
83
|
-
* const unsubscribe = emitter.on('test', () => 'event')
|
|
84
|
-
* unsubscribe()
|
|
85
|
-
* ```
|
|
86
|
-
*
|
|
87
|
-
* ---
|
|
88
|
-
*
|
|
89
|
-
* ### EventEmitter.clear
|
|
90
|
-
* **Returns ```void```**
|
|
91
|
-
* ```
|
|
92
|
-
* EventEmitter.clear('clear')
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
declare class EventEmitter<EventName extends string = string, EventParam extends Nullable<object> = undefined> {
|
|
96
|
-
#private;
|
|
97
|
-
constructor();
|
|
98
|
-
get eventNameList(): EventName[];
|
|
99
|
-
emit(name: EventName, param?: EventParam, defaultAction?: EventEmitterDefaultAction): void;
|
|
100
|
-
on(name: EventName, listener: EventEmitterListener<EventParam>): () => void;
|
|
101
|
-
off(name: EventName, listener: EventEmitterListener<EventParam>): void;
|
|
102
|
-
clear(name: EventName): void;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
33
|
declare enum PlatformOS {
|
|
106
34
|
Ios = "ios",
|
|
107
35
|
Android = "android"
|
|
@@ -115,7 +43,8 @@ declare class Platform {
|
|
|
115
43
|
static get version(): string | number;
|
|
116
44
|
static get isIos(): boolean;
|
|
117
45
|
static get isAndroid(): boolean;
|
|
118
|
-
static
|
|
46
|
+
static get hasLiquidGlass(): boolean;
|
|
47
|
+
static by<Value>(data: PlatformByData<Value>, defaultOS?: PlatformRequiredOS): unknown;
|
|
119
48
|
}
|
|
120
49
|
|
|
121
50
|
type AppStateAdditionalHandlerName = 'onFocus' | 'onBlur';
|
|
@@ -213,11 +142,10 @@ declare const useMeasures: () => {
|
|
|
213
142
|
};
|
|
214
143
|
|
|
215
144
|
declare const getResponder: <ScrolledCurrent extends Nullable<ScrollView | FlatList | SectionList>, Current extends Nullable<View>>(scrolledRef: RefObject<ScrolledCurrent>) => {
|
|
216
|
-
responder:
|
|
145
|
+
responder: any;
|
|
217
146
|
inner: Current;
|
|
218
147
|
outer: Current;
|
|
219
148
|
};
|
|
220
149
|
|
|
221
|
-
export { Clipboard, DEFAULT_LAYOUT, DEFAULT_NULLABLE_LAYOUT, Dimensions,
|
|
150
|
+
export { Clipboard, DEFAULT_LAYOUT, DEFAULT_NULLABLE_LAYOUT, Dimensions, Platform, PlatformOS, getResponder, listenAppState, listenKeyboard, useAppState, useKeyboard, useLayout, useMeasures };
|
|
222
151
|
export type { AppStateHandlers, KeyboardHandlers, Layout, Measures, MeasuresInContainer, MeasuresInWindow, NullableLayout };
|
|
223
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import{Log as e}from"@mediacubeco/react-base/helpers";export*from"@mediacubeco/react-base/helpers";import t from"@react-native-clipboard/clipboard";import{Dimensions as n,StatusBar as r,Platform as i,AppState as o,Keyboard as a}from"react-native";import{useEffect as s,useState as c,useCallback as u,useRef as d}from"react";import{runCallback as l,mapRecord as h,isNullable as g,filterNullableValues as w}from"@mediacubeco/react-base/utils";export*from"@mediacubeco/react-base/utils";export*from"@mediacubeco/react-base/services";export*from"@mediacubeco/react-base/types";class m{static copy(n){return e.formatted.info("copy",n),t.setString(n.toString())}static async paste(){const n=await t.getString();return e.formatted.info("paste",n),n}}class p{static get windowWidth(){return n.get("window").width}static get windowHeight(){return n.get("window").height}static get statusBarWidth(){return p.windowWidth}static get statusBarHeight(){return r.currentHeight??0}static get ratio(){const e=p.windowWidth/375,t=p.windowHeight/812;return Math.min(e,t)}static byWindowWidth(e){return p.windowWidth*e}static byWindowHeight(e){return p.windowHeight*e}static byRatio(e){return p.ratio*e}}var f,b;!function(e){e.Ios="ios",e.Android="android"}(f||(f={}));class v{static get OS(){return i.OS}static get version(){return i.Version}static get isIos(){return"ios"===v.OS}static get isAndroid(){return"android"===v.OS}static get hasLiquidGlass(){const[e]=v.version.toString().split(".");return v.isIos&&Number(e)>=26}static by(e,t=f.Ios){return i.select({...e,default:e[t]})}}!function(e){e.Active="active",e.Inactive="inactive",e.Background="background",e.Extension="extension",e.Unknown="unknown"}(b||(b={}));const y=({onFocus:e,onBlur:t,...n})=>{const r=[];return v.isAndroid&&r.push(o.addEventListener("focus",t=>l(e,t)),o.addEventListener("blur",e=>l(t,e))),r.push(o.addEventListener("change",e=>(({state:e,handlers:t})=>{const{onActive:n,onInactive:r,onBackground:i,onExtension:o,onUnknown:a,onChange:s}=t??{},c={[b.Active]:n,[b.Inactive]:r,[b.Background]:i,[b.Extension]:o,[b.Unknown]:a}[e];l(s,e),l(c,e)})({state:e,handlers:n}))),{remove(){r.forEach(e=>e.remove())}}};var W;!function(e){e.onWillShow="keyboardWillShow",e.onDidShow="keyboardDidShow",e.onWillHide="keyboardWillHide",e.onDidHide="keyboardDidHide",e.onWillChangeFrame="keyboardWillChangeFrame",e.onDidChangeFrame="keyboardDidChangeFrame"}(W||(W={}));const k=e=>{const t=h(e,(e,t)=>{if(!g(t))return a.addListener(W[e],t)});return{remove:()=>w(Object.values(t)).map(e=>e.remove())}},x=e=>{s(()=>{const t=y(e);return()=>t.remove()},[e])},S=e=>{s(()=>{const t=k(e);return()=>t.remove()},[e])},I={top:0,left:0,width:0,height:0},H={top:null,left:null,width:null,height:null};function E({onLayout:e,isNullable:t}={isNullable:!1}){const[n,r]=c(t?H:I),i=u(t=>{l(e,t);const{layout:n}=t.nativeEvent,{y:i,x:o,width:a,height:s}=n;r({top:i,left:o,width:a,height:s})},[e]);return[n,i]}const C={x:0,y:0,width:0,height:0,pageX:0,pageY:0},D={left:0,top:0,width:0,height:0},L={x:0,y:0,width:0,height:0},R=()=>{const e=d(C),t=d(D),n=d(L),r=u(async(e,t,n)=>new Promise(r=>{g(e)?r(t):n(e,r)}),[]),i=u(t=>r(t,C,(t,n)=>{t.measure((t=0,r=0,i=0,o=0,a=0,s=0)=>{e.current={x:t,y:r,width:i,height:o,pageX:a,pageY:s},n(e.current)})}),[]),o=u((e,n)=>r(e,D,(e,r)=>{e.measureLayout(n,(e=0,n=0,i=0,o=0)=>{t.current={left:e,top:n,width:i,height:o},r(t.current)})}),[]),a=u(e=>r(e,L,(e,t)=>{e.measureInWindow((e=0,r=0,i=0,o=0)=>{n.current={x:e,y:r,width:i,height:o},t(n.current)})}),[]);return{measuresRef:e,measuresInContainerRef:t,measuresInWindowRef:n,calculateMeasures:i,calculateMeasuresInContainer:o,calculateMeasuresInWindow:a}},A=e=>{const t=e.current?.getScrollResponder()??null,n=t?.getInnerViewRef?.()??null,r=t?.getNativeScrollRef?.()??null;return{responder:t,inner:n,outer:r}};export{m as Clipboard,I as DEFAULT_LAYOUT,H as DEFAULT_NULLABLE_LAYOUT,p as Dimensions,v as Platform,f as PlatformOS,A as getResponder,y as listenAppState,k as listenKeyboard,x as useAppState,S as useKeyboard,E as useLayout,R as useMeasures};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@mediacubeco/react-base/services");Object.keys(e).forEach(function(r){"default"===r||Object.prototype.hasOwnProperty.call(exports,r)||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@mediacubeco/react-base/services';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@mediacubeco/react-base/services";
|
package/dist/types/index.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
"use strict";var e=require("@mediacubeco/react-base/types");Object.keys(e).forEach(function(t){"default"===t||Object.prototype.hasOwnProperty.call(exports,t)||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return e[t]}})});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from '@mediacubeco/
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from '@mediacubeco/react-base/types';
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
export*from"@mediacubeco/react-base/types";
|
package/dist/utils/index.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react-native");require("
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
"use strict";var e,n,t=require("@mediacubeco/react-base/utils"),r=require("react-native");require("@mediacubeco/react-base/helpers"),require("@react-native-clipboard/clipboard"),function(e){e.Ios="ios",e.Android="android"}(e||(e={}));class a{static get OS(){return r.Platform.OS}static get version(){return r.Platform.Version}static get isIos(){return"ios"===a.OS}static get isAndroid(){return"android"===a.OS}static get hasLiquidGlass(){const[e]=a.version.toString().split(".");return a.isIos&&Number(e)>=26}static by(n,t=e.Ios){return r.Platform.select({...n,default:n[t]})}}!function(e){e.Active="active",e.Inactive="inactive",e.Background="background",e.Extension="extension",e.Unknown="unknown"}(n||(n={}));var o;!function(e){e.onWillShow="keyboardWillShow",e.onDidShow="keyboardDidShow",e.onWillHide="keyboardWillHide",e.onDidHide="keyboardDidHide",e.onWillChangeFrame="keyboardWillChangeFrame",e.onDidChangeFrame="keyboardDidChangeFrame"}(o||(o={}));exports.listenAppState=({onFocus:e,onBlur:o,...i})=>{const s=[];return a.isAndroid&&s.push(r.AppState.addEventListener("focus",n=>t.runCallback(e,n)),r.AppState.addEventListener("blur",e=>t.runCallback(o,e))),s.push(r.AppState.addEventListener("change",e=>(({state:e,handlers:r})=>{const{onActive:a,onInactive:o,onBackground:i,onExtension:s,onUnknown:c,onChange:d}=r??{},l={[n.Active]:a,[n.Inactive]:o,[n.Background]:i,[n.Extension]:s,[n.Unknown]:c}[e];t.runCallback(d,e),t.runCallback(l,e)})({state:e,handlers:i}))),{remove(){s.forEach(e=>e.remove())}}},exports.listenKeyboard=e=>{const n=t.mapRecord(e,(e,n)=>{if(!t.isNullable(n))return r.Keyboard.addListener(o[e],n)});return{remove:()=>t.filterNullableValues(Object.values(n)).map(e=>e.remove())}},Object.keys(t).forEach(function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from '@mediacubeco/
|
|
1
|
+
export * from '@mediacubeco/react-base/utils';
|
|
2
2
|
import { AppStateStatus, NativeEventSubscription, KeyboardEventListener } from 'react-native';
|
|
3
|
-
import { BaseRecord, Callback, KeyOf } from '@mediacubeco/
|
|
3
|
+
import { BaseRecord, Callback, KeyOf } from '@mediacubeco/react-base/types';
|
|
4
4
|
|
|
5
5
|
type AppStateAdditionalHandlerName = 'onFocus' | 'onBlur';
|
|
6
6
|
type AppStateHandlerName = AppStateAdditionalHandlerName | 'onActive' | 'onInactive' | 'onBackground' | 'onExtension' | 'onUnknown' | 'onChange';
|
|
@@ -23,4 +23,3 @@ declare const listenKeyboard: ListenKeyboard;
|
|
|
23
23
|
|
|
24
24
|
export { listenAppState, listenKeyboard };
|
|
25
25
|
export type { AppStateHandlers, KeyboardHandlers };
|
|
26
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import{runCallback as e,mapRecord as n,isNullable as o,filterNullableValues as t}from"@mediacubeco/react-base/utils";export*from"@mediacubeco/react-base/utils";import{Platform as r,AppState as i,Keyboard as a}from"react-native";import"@mediacubeco/react-base/helpers";import"@react-native-clipboard/clipboard";var s,c;!function(e){e.Ios="ios",e.Android="android"}(s||(s={}));class d{static get OS(){return r.OS}static get version(){return r.Version}static get isIos(){return"ios"===d.OS}static get isAndroid(){return"android"===d.OS}static get hasLiquidGlass(){const[e]=d.version.toString().split(".");return d.isIos&&Number(e)>=26}static by(e,n=s.Ios){return r.select({...e,default:e[n]})}}!function(e){e.Active="active",e.Inactive="inactive",e.Background="background",e.Extension="extension",e.Unknown="unknown"}(c||(c={}));const u=({onFocus:n,onBlur:o,...t})=>{const r=[];return d.isAndroid&&r.push(i.addEventListener("focus",o=>e(n,o)),i.addEventListener("blur",n=>e(o,n))),r.push(i.addEventListener("change",n=>(({state:n,handlers:o})=>{const{onActive:t,onInactive:r,onBackground:i,onExtension:a,onUnknown:s,onChange:d}=o??{},u={[c.Active]:t,[c.Inactive]:r,[c.Background]:i,[c.Extension]:a,[c.Unknown]:s}[n];e(d,n),e(u,n)})({state:n,handlers:t}))),{remove(){r.forEach(e=>e.remove())}}};var l;!function(e){e.onWillShow="keyboardWillShow",e.onDidShow="keyboardDidShow",e.onWillHide="keyboardWillHide",e.onDidHide="keyboardDidHide",e.onWillChangeFrame="keyboardWillChangeFrame",e.onDidChangeFrame="keyboardDidChangeFrame"}(l||(l={}));const v=e=>{const r=n(e,(e,n)=>{if(!o(n))return a.addListener(l[e],n)});return{remove:()=>t(Object.values(r)).map(e=>e.remove())}};export{u as listenAppState,v as listenKeyboard};
|
package/package.json
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
|
+
"version": "2.0.0",
|
|
3
4
|
"name": "@mediacubeco/react-native-base",
|
|
4
|
-
"
|
|
5
|
+
"description": "React Native base by Mediacube developers",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"files": [
|
|
8
9
|
"dist"
|
|
9
10
|
],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"mediacube",
|
|
13
|
+
"mediacubeco",
|
|
14
|
+
"react-native",
|
|
15
|
+
"base",
|
|
16
|
+
"react-native-base"
|
|
17
|
+
],
|
|
10
18
|
"dependencies": {
|
|
11
|
-
"@mediacubeco/
|
|
19
|
+
"@mediacubeco/react-base": "^2.0.0"
|
|
12
20
|
},
|
|
13
21
|
"devDependencies": {
|
|
14
|
-
"@mediacubeco/react-native-config": "
|
|
22
|
+
"@mediacubeco/react-native-config": "workspace:*",
|
|
15
23
|
"@react-native-clipboard/clipboard": "^1.16.3",
|
|
16
24
|
"@types/react": "^19.1.9",
|
|
17
|
-
"
|
|
25
|
+
"eslint": "^10.0.3",
|
|
26
|
+
"prettier": "^3.8.1",
|
|
18
27
|
"react": "19.0.0",
|
|
19
|
-
"react-native": "0.78.0"
|
|
28
|
+
"react-native": "0.78.0",
|
|
29
|
+
"typescript": "^5.9.3"
|
|
20
30
|
},
|
|
21
31
|
"peerDependencies": {
|
|
22
32
|
"@react-native-clipboard/clipboard": "^1.16.3",
|
|
23
|
-
"axios": "^1.12.2",
|
|
24
33
|
"react": "19.0.0",
|
|
25
34
|
"react-native": "0.78.0"
|
|
26
35
|
},
|
|
27
|
-
"main": "./dist/index.cjs",
|
|
28
|
-
"module": "./dist/index.mjs",
|
|
29
|
-
"types": "./dist/index.d.ts",
|
|
30
36
|
"exports": {
|
|
31
37
|
".": {
|
|
32
38
|
"require": "./dist/index.cjs",
|
|
@@ -52,6 +58,11 @@
|
|
|
52
58
|
"import": "./dist/types/index.mjs",
|
|
53
59
|
"require": "./dist/types/index.cjs",
|
|
54
60
|
"types": "./dist/types/index.d.ts"
|
|
61
|
+
},
|
|
62
|
+
"./services": {
|
|
63
|
+
"import": "./dist/services/index.mjs",
|
|
64
|
+
"require": "./dist/services/index.cjs",
|
|
65
|
+
"types": "./dist/services/index.d.ts"
|
|
55
66
|
}
|
|
56
67
|
}
|
|
57
|
-
}
|
|
68
|
+
}
|