@draftbit/core 43.4.17-ab8b1a.0 → 43.4.17
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/lib/commonjs/components/Card.js.map +1 -1
- package/lib/commonjs/components/CardContainerShortImage.js +18 -5
- package/lib/commonjs/components/CardContainerShortImage.js.map +1 -1
- package/lib/module/components/Elevation.js +3 -5
- package/lib/module/components/Elevation.js.map +1 -1
- package/lib/module/components/Portal/PortalHost.js.map +1 -1
- package/lib/module/components/Touchable.web.js.map +1 -1
- package/lib/module/hooks.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Card.
|
|
1
|
+
{"version":3,"sources":["Card.js"],"names":["ICON_SIZE","Config","cardIconSize","ICON_CONTAINER_SIZE","ICON_CONTAINER_PADDING","ICON_ELEVATION","cardIconElevation","TopRightCircleIcon","Icon","icon","theme","onPress","React","createElement","Surface","style","justifyContent","alignItems","elevation","position","top","right","width","height","padding","borderRadius","backgroundColor","Pressable","disabled","pressed","opacity","name","size","color","colors","surface","Card","image","cardImageUrl","title","subtitle","description","textCentered","aspectRatio","onPressIcon","titleStyle","subtitleStyle","descriptionStyle","children","bgColor","styles","StyleSheet","flatten","innerPadding","Image","source","uri","resizeMode","View","Title","text","Subtitle","marginTop","Caption"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,SAAS,GAAGC,gBAAOC,YAAzB;AACA,MAAMC,mBAAmB,GAAGF,gBAAOC,YAAP,GAAsB,CAAlD;AACA,MAAME,sBAAsB,GAAGH,gBAAOC,YAAP,GAAsB,CAAtB,GAA0B,CAAzD;AACA,MAAMG,cAAc,GAAGJ,gBAAOK,iBAA9B;AACO,MAAMC,kBAAkB,GAAG,wBAAU,QAAqC;AAAA,MAApC;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,KAAd;AAAqBC,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R;AAAcC,IAAAA,IAAI,EAAEA,IAApB;AAA0BE,IAAAA,OAAO,EAAEiC;AAAnC,GAAxC,CAAJ,GAAiG,IAfzG,CADI,CAAR;AAiBH,CArBD;;eAsBe,wBAAUR,IAAV,C","sourcesContent":["import React from \"react\";\nimport { StyleSheet, View, Pressable, } from \"react-native\";\nimport Image from \"./Image\";\nimport Surface from \"./Surface\";\nimport { Title, Subtitle, Caption } from \"./Typography\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst ICON_SIZE = Config.cardIconSize;\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\nconst ICON_ELEVATION = Config.cardIconElevation;\nexport const TopRightCircleIcon = withTheme(({ Icon, icon, theme, onPress, }) => {\n return (React.createElement(Surface, { style: {\n justifyContent: \"center\",\n alignItems: \"center\",\n elevation: ICON_ELEVATION,\n position: \"absolute\",\n top: 12,\n right: 12,\n width: ICON_CONTAINER_SIZE,\n height: ICON_CONTAINER_SIZE,\n padding: ICON_CONTAINER_PADDING,\n borderRadius: ICON_CONTAINER_SIZE,\n backgroundColor: \"rgba(0, 0, 0, 0.1)\",\n } },\n React.createElement(Pressable, { disabled: !onPress, onPress: onPress, style: ({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n } },\n React.createElement(Icon, { name: icon, size: ICON_SIZE, color: theme.colors.surface }))));\n});\nconst Card = ({ Icon, image = Config.cardImageUrl, title, subtitle, description, textCentered, icon, aspectRatio = 1.5, elevation = 2, style, onPress, onPressIcon, titleStyle, subtitleStyle, descriptionStyle, theme, children, }) => {\n const { backgroundColor: bgColor, padding, ...styles } = StyleSheet.flatten(style || {});\n const backgroundColor = bgColor ? bgColor : theme.colors.surface;\n const innerPadding = padding ? padding : 12;\n return (React.createElement(Surface, { style: [{ elevation, backgroundColor }, styles] },\n React.createElement(Pressable, { disabled: !onPress, onPress: onPress, style: ({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n } },\n React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }),\n React.createElement(View, { style: { padding: innerPadding } },\n React.createElement(View, { style: { alignItems: textCentered ? \"center\" : \"flex-start\" } },\n title || (title && title !== \"\") ? (React.createElement(Title, { text: title, style: titleStyle })) : null,\n subtitle || (subtitle && subtitle !== \"\") ? (React.createElement(Subtitle, { text: subtitle, style: subtitleStyle })) : null,\n description || (description && description !== \"\") ? (React.createElement(View, { style: { marginTop: 4 } },\n React.createElement(Caption, { text: description, style: descriptionStyle }))) : null,\n children)),\n icon ? (React.createElement(TopRightCircleIcon, { Icon: Icon, icon: icon, onPress: onPressIcon })) : null)));\n};\nexport default withTheme(Card);\n"]}
|
|
@@ -21,8 +21,6 @@ var _Config = _interopRequireDefault(require("./Config"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
|
|
26
24
|
const CardContainerShortImage = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
image = _Config.default.squareImageUrl,
|
|
@@ -40,10 +38,11 @@ const CardContainerShortImage = _ref => {
|
|
|
40
38
|
onPress,
|
|
41
39
|
...rest
|
|
42
40
|
} = _ref;
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default,
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
44
42
|
style: style,
|
|
45
|
-
onPress: onPress
|
|
46
|
-
|
|
43
|
+
onPress: onPress,
|
|
44
|
+
...rest
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
47
46
|
style: {
|
|
48
47
|
elevation,
|
|
49
48
|
borderRadius: roundness
|
|
@@ -93,5 +92,19 @@ const CardContainerShortImage = _ref => {
|
|
|
93
92
|
|
|
94
93
|
var _default = (0, _theming.withTheme)(CardContainerShortImage);
|
|
95
94
|
|
|
95
|
+
exports.default = _default;
|
|
96
|
+
//# sourceMappingURL=CardContainerShortImage.js.mapteElement(_Image.default, {
|
|
97
|
+
style: {
|
|
98
|
+
aspectRatio
|
|
99
|
+
},
|
|
100
|
+
source: typeof image === "string" ? {
|
|
101
|
+
uri: image
|
|
102
|
+
} : image,
|
|
103
|
+
resizeMode: "cover"
|
|
104
|
+
}))));
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
var _default = (0, _theming.withTheme)(CardContainerShortImage);
|
|
108
|
+
|
|
96
109
|
exports.default = _default;
|
|
97
110
|
//# sourceMappingURL=CardContainerShortImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CardContainerShortImage.
|
|
1
|
+
{"version":3,"sources":["CardContainerShortImage.js"],"names":["CardContainerShortImage","image","Config","squareImageUrl","title","subtitle","mode","aspectRatio","elevation","theme","colors","roundness","typography","style","onPress","rest","React","createElement","Card","Elevation","borderRadius","View","overflow","flexDirection","justifyContent","Image","source","uri","resizeMode","padding","backgroundColor","surface","flex","Text","numberOfLines","headline5","color","strong","body2","medium","marginTop"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,uBAAuB,GAAG,QAA0K;AAAA,MAAzK;AAAEC,IAAAA,KAAK,GAAGC,gBAAOC,cAAjB;AAAiCC,IAAAA,KAAjC;AAAwCC,IAAAA,QAAxC;AAAkDC,IAAAA,IAAI,GAAG,MAAzD;AAAiEC,IAAAA,WAAW,GAAG,CAA/E;AAAkFC,IAAAA,SAAS,GAAG,CAA9F;AAAiGC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;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aAAa,EAAE,CAAjB;AAAoBrB,IAAAA,KAAK,EAAE,CAACD,UAAU,CAACuB,SAAZ,EAAuB;AAAEC,MAAAA,KAAK,EAAE1B,MAAM,CAAC2B;AAAhB,KAAvB;AAA3B,GAA1B,EAAyGjC,KAAzG,CALJ,EAMIC,QAAQ,gBAAIW,eAAMC,aAAN,CAAoBgB,iBAApB,EAA0B;AAAEC,IAAAA,aAAa,EAAE,CAAjB;AAAoBrB,IAAAA,KAAK,EAAE,CACzDD,UAAU,CAAC0B,KAD8C,EAEzD;AAAEF,MAAAA,KAAK,EAAE1B,MAAM,CAAC6B,MAAhB;AAAwBC,MAAAA,SAAS,EAAE;AAAnC,KAFyD;AAA3B,GAA1B,EAGHnC,QAHG,CAAJ,GAGc,IAT1B,CAPJ,EAiBIC,IAAI,KAAK,OAAT,iBAAqBU,eAAMC,aAAN,CAAoBQ,cAApB,EAA2B;AAAEZ,IAAAA,KAAK,EAAE;AAAEN,MAAAA;AAAF,KAAT;AAA0BmB,IAAAA,MAAM,EAAE,OAAOzB,KAAP,KAAiB,QAAjB,GAA4B;AAAE0B,MAAAA,GAAG,EAAE1B;AAAP,KAA5B,GAA6CA,KAA/E;AAAsF2B,IAAAA,UAAU,EAAE;AAAlG,GAA3B,CAjBzB,CAJJ,CADI,CAAR;AAuBH,CAxBD;;eAyBe,wBAAU5B,uBAAV,C","sourcesContent":["import React from \"react\";\nimport { View, Text, } from \"react-native\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst CardContainerShortImage = ({ image = Config.squareImageUrl, title, subtitle, mode = \"left\", aspectRatio = 1, elevation = 2, theme: { colors, roundness, typography }, style, onPress, ...rest }) => {\n return (React.createElement(Card, { style: style, onPress: onPress, ...rest },\n React.createElement(Elevation, { style: {\n elevation,\n borderRadius: roundness,\n } },\n React.createElement(View, { style: {\n overflow: \"hidden\",\n flexDirection: \"row\",\n justifyContent: mode === \"right\" ? \"space-between\" : \"flex-start\",\n borderRadius: roundness,\n } },\n mode === \"left\" && (React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" })),\n React.createElement(View, { style: {\n padding: 16,\n backgroundColor: colors.surface,\n flex: 1,\n } },\n React.createElement(Text, { numberOfLines: 1, style: [typography.headline5, { color: colors.strong }] }, title),\n subtitle ? (React.createElement(Text, { numberOfLines: 1, style: [\n typography.body2,\n { color: colors.medium, marginTop: 4 },\n ] }, subtitle)) : null),\n mode === \"right\" && (React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }))))));\n};\nexport default withTheme(CardContainerShortImage);\n"]}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { Animated, StyleSheet, View } from "react-native";
|
|
5
3
|
import shadow from "../styles/shadow";
|
|
6
4
|
import { withTheme } from "../theming";
|
|
7
|
-
|
|
8
5
|
/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
|
|
6
|
+
|
|
9
7
|
const Elevation = _ref => {
|
|
10
8
|
let {
|
|
11
9
|
style,
|
|
@@ -21,12 +19,12 @@ const Elevation = _ref => {
|
|
|
21
19
|
colors
|
|
22
20
|
} = theme;
|
|
23
21
|
const borderRadius = radius;
|
|
24
|
-
return /*#__PURE__*/React.createElement(Animated.View,
|
|
22
|
+
return /*#__PURE__*/React.createElement(Animated.View, { ...rest,
|
|
25
23
|
style: [{
|
|
26
24
|
borderRadius,
|
|
27
25
|
backgroundColor: colors.surface
|
|
28
26
|
}, elevation ? shadow(elevation) : null, style]
|
|
29
|
-
}
|
|
27
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
30
28
|
style: {
|
|
31
29
|
overflow: "hidden",
|
|
32
30
|
borderRadius
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Elevation.
|
|
1
|
+
{"version":3,"sources":["Elevation.js"],"names":["React","Animated","StyleSheet","View","shadow","withTheme","Elevation","style","theme","children","rest","elevation","borderRadius","radius","flatten","colors","createElement","backgroundColor","surface","overflow"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,QAAT,EAAmBC,UAAnB,EAA+BC,IAA/B,QAA4C,cAA5C;AACA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA;;AACA,MAAMC,SAAS,GAAG,QAAyC;AAAA,MAAxC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,QAAhB;AAA0B,OAAGC;AAA7B,GAAwC;AACvD,QAAM;AAAEC,IAAAA,SAAS,GAAG,CAAd;AAAiBC,IAAAA,YAAY,EAAEC;AAA/B,MAA0CX,UAAU,CAACY,OAAX,CAAmBP,KAAnB,KAA6B,EAA7E;AACA,QAAM;AAAEQ,IAAAA;AAAF,MAAaP,KAAnB;AACA,QAAMI,YAAY,GAAGC,MAArB;AACA,sBAAQb,KAAK,CAACgB,aAAN,CAAoBf,QAAQ,CAACE,IAA7B,EAAmC,EAAE,GAAGO,IAAL;AAAWH,IAAAA,KAAK,EAAE,CACrD;AACIK,MAAAA,YADJ;AAEIK,MAAAA,eAAe,EAAEF,MAAM,CAACG;AAF5B,KADqD,EAKrDP,SAAS,GAAGP,MAAM,CAACO,SAAD,CAAT,GAAuB,IALqB,EAMrDJ,KANqD;AAAlB,GAAnC,eAQJP,KAAK,CAACgB,aAAN,CAAoBb,IAApB,EAA0B;AAAEI,IAAAA,KAAK,EAAE;AAAEY,MAAAA,QAAQ,EAAE,QAAZ;AAAsBP,MAAAA;AAAtB;AAAT,GAA1B,EAA2EH,QAA3E,CARI,CAAR;AASH,CAbD;;AAcA,eAAeJ,SAAS,CAACC,SAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { Animated, StyleSheet, View, } from \"react-native\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\n/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */\nconst Elevation = ({ style, theme, children, ...rest }) => {\n const { elevation = 4, borderRadius: radius } = StyleSheet.flatten(style) || {};\n const { colors } = theme;\n const borderRadius = radius;\n return (React.createElement(Animated.View, { ...rest, style: [\n {\n borderRadius,\n backgroundColor: colors.surface,\n },\n elevation ? shadow(elevation) : null,\n style,\n ] },\n React.createElement(View, { style: { overflow: \"hidden\", borderRadius } }, children)));\n};\nexport default withTheme(Elevation);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PortalHost.
|
|
1
|
+
{"version":3,"sources":["PortalHost.tsx"],"names":["React","View","StyleSheet","PortalManager","PortalContext","createContext","PortalHost","Component","manager","children","key","nextKey","mount","queue","push","type","update","op","index","findIndex","o","unmount","componentDidMount","length","action","pop","render","styles","container","props","setManager","create","flex"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,UAAf,QAAiC,cAAjC;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AAiBA,OAAO,MAAMC,aAAa,gBAAGJ,KAAK,CAACK,aAAN,CAAmC,IAAnC,CAAtB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,MAAMC,UAAN,SAAyBN,KAAK,CAACO,SAA/B,CAAgD;AAAA;AAAA;;AAAA,wCAyBvCC,OAAD,IAA+C;AAClE,WAAKA,OAAL,GAAeA,OAAf;AACD,KA3B4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AAE;AACTI,IAAAA,IAAI,EAAE;AADG;AADoB,CAAlB,CAAf","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport PortalManager from \"./PortalManager\";\n\ntype Props = {\n children: React.ReactNode;\n};\n\ntype Operation =\n | { type: \"mount\"; key: number; children: React.ReactNode }\n | { type: \"update\"; key: number; children: React.ReactNode }\n | { type: \"unmount\"; key: number };\n\nexport type PortalMethods = {\n mount: (children: React.ReactNode) => number;\n update: (key: number, children: React.ReactNode) => void;\n unmount: (key: number) => void;\n};\n\nexport const PortalContext = React.createContext<PortalMethods>(null as any);\n\n/**\n * Portal host renders all of its children `Portal` elements.\n * For example, you can wrap a screen in `Portal.Host` to render items above the screen.\n * If you're using the `Provider` component, it already includes `Portal.Host`.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Text } from 'react-native';\n * import { Portal } from 'react-native-paper';\n *\n * export default class MyComponent extends React.Component {\n * render() {\n * return (\n * <Portal.Host>\n * <Text>Content of the app</Text>\n * </Portal.Host>\n * );\n * }\n * }\n * ```\n *\n * Here any `Portal` elements under `<App />` are rendered alongside `<App />` and will appear above `<App />` like a `Modal`.\n */\nexport default class PortalHost extends React.Component<Props> {\n static displayName = \"Portal.Host\";\n\n componentDidMount() {\n const manager = this.manager;\n const queue = this.queue;\n\n while (queue.length && manager) {\n const action = queue.pop();\n if (action) {\n switch (action.type) {\n case \"mount\":\n manager.mount(action.key, action.children);\n break;\n case \"update\":\n manager.update(action.key, action.children);\n break;\n case \"unmount\":\n manager.unmount(action.key);\n break;\n }\n }\n }\n }\n\n private setManager = (manager: PortalManager | undefined | null) => {\n this.manager = manager;\n };\n\n private mount = (children: React.ReactNode) => {\n const key = this.nextKey++;\n\n if (this.manager) {\n this.manager.mount(key, children);\n } else {\n this.queue.push({ type: \"mount\", key, children });\n }\n\n return key;\n };\n\n private update = (key: number, children: React.ReactNode) => {\n if (this.manager) {\n this.manager.update(key, children);\n } else {\n const op = { type: \"mount\", key, children };\n const index = this.queue.findIndex(\n (o) => o.type === \"mount\" || (o.type === \"update\" && o.key === key)\n );\n\n if (index > -1) {\n // @ts-ignore\n this.queue[index] = op;\n } else {\n this.queue.push(op as Operation);\n }\n }\n };\n\n private unmount = (key: number) => {\n if (this.manager) {\n this.manager.unmount(key);\n } else {\n this.queue.push({ type: \"unmount\", key });\n }\n };\n\n private nextKey = 0;\n private queue: Operation[] = [];\n private manager: PortalManager | null | undefined;\n\n render() {\n return (\n <PortalContext.Provider\n value={{\n mount: this.mount,\n update: this.update,\n unmount: this.unmount,\n }}\n >\n {/* Need collapsable=false here to clip the elevations, otherwise they appear above Portal components */}\n <View\n style={styles.container}\n collapsable={false}\n pointerEvents=\"box-none\"\n >\n {this.props.children}\n </View>\n <PortalManager ref={this.setManager} />\n </PortalContext.Provider>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Touchable.web.
|
|
1
|
+
{"version":3,"sources":["Touchable.web.js"],"names":["TouchableOpacity"],"mappings":"AAAA,SAASA,gBAAT,QAAiC,cAAjC;AACA,eAAeA,gBAAf","sourcesContent":["import { TouchableOpacity } from \"react-native\";\nexport default TouchableOpacity;\n"]}
|
package/lib/module/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["hooks.
|
|
1
|
+
{"version":3,"sources":["hooks.js"],"names":["React","usePrevious","value","ref","useRef","useEffect","current"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAO,SAASC,WAAT,CAAqBC,KAArB,EAA4B;AAC/B;AACA;AACA,QAAMC,GAAG,GAAGH,KAAK,CAACI,MAAN,EAAZ,CAH+B,CAI/B;;AACAJ,EAAAA,KAAK,CAACK,SAAN,CAAgB,MAAM;AAClBF,IAAAA,GAAG,CAACG,OAAJ,GAAcJ,KAAd;AACH,GAFD,EAEG,CAACA,KAAD,CAFH,EAL+B,CAQ/B;;AACA,SAAOC,GAAG,CAACG,OAAX;AACH","sourcesContent":["import React from \"react\";\nexport function usePrevious(value) {\n // The ref object is a generic container whose current property is mutable\n // and can hold any value, similar to an instance property on a class\n const ref = React.useRef();\n // Store current value in ref\n React.useEffect(() => {\n ref.current = value;\n }, [value]);\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.4.17
|
|
3
|
+
"version": "43.4.17",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "bb5a474e9ca7c610a01542540c43e4691ebe2bea"
|
|
84
84
|
}
|