react-native-unistyles 3.0.0-nightly-20250329 → 3.0.0-rc.1
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/README.md +1 -1
- package/cxx/core/UnistylesCommitHook.cpp +2 -2
- package/cxx/core/UnistylesRegistry.cpp +24 -20
- package/cxx/hybridObjects/HybridStyleSheet.cpp +15 -11
- package/cxx/parser/Parser.cpp +11 -8
- package/cxx/shadowTree/ShadowTrafficController.h +7 -9
- package/lib/commonjs/components/native/Image.js +26 -1
- package/lib/commonjs/components/native/Image.js.map +1 -1
- package/lib/commonjs/components/native/Image.native.js +10 -0
- package/lib/commonjs/components/native/Image.native.js.map +1 -0
- package/lib/commonjs/components/native/ImageBackground.js +16 -28
- package/lib/commonjs/components/native/ImageBackground.js.map +1 -1
- package/lib/commonjs/components/native/Pressable.native.js +7 -4
- package/lib/commonjs/components/native/Pressable.native.js.map +1 -1
- package/lib/commonjs/core/createUnistylesElement.js +3 -19
- package/lib/commonjs/core/createUnistylesElement.js.map +1 -1
- package/lib/commonjs/core/createUnistylesElement.native.js +6 -4
- package/lib/commonjs/core/createUnistylesElement.native.js.map +1 -1
- package/lib/commonjs/core/createUnistylesImageBackground.js +7 -5
- package/lib/commonjs/core/createUnistylesImageBackground.js.map +1 -1
- package/lib/commonjs/core/passForwardRef.js +3 -5
- package/lib/commonjs/core/passForwardRef.js.map +1 -1
- package/lib/commonjs/server/serialize.js +1 -1
- package/lib/commonjs/server/serialize.js.map +1 -1
- package/lib/commonjs/specs/ShadowRegistry/index.js +2 -2
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/web/utils/createUnistylesRef.js +28 -0
- package/lib/commonjs/web/utils/createUnistylesRef.js.map +1 -0
- package/lib/commonjs/web/utils/index.js +11 -0
- package/lib/commonjs/web/utils/index.js.map +1 -1
- package/lib/module/components/native/Image.js +25 -2
- package/lib/module/components/native/Image.js.map +1 -1
- package/lib/module/components/native/Image.native.js +6 -0
- package/lib/module/components/native/Image.native.js.map +1 -0
- package/lib/module/components/native/ImageBackground.js +17 -29
- package/lib/module/components/native/ImageBackground.js.map +1 -1
- package/lib/module/components/native/Pressable.native.js +7 -4
- package/lib/module/components/native/Pressable.native.js.map +1 -1
- package/lib/module/core/createUnistylesElement.js +4 -20
- package/lib/module/core/createUnistylesElement.js.map +1 -1
- package/lib/module/core/createUnistylesElement.native.js +6 -4
- package/lib/module/core/createUnistylesElement.native.js.map +1 -1
- package/lib/module/core/createUnistylesImageBackground.js +7 -5
- package/lib/module/core/createUnistylesImageBackground.js.map +1 -1
- package/lib/module/core/passForwardRef.js +3 -5
- package/lib/module/core/passForwardRef.js.map +1 -1
- package/lib/module/server/serialize.js +1 -1
- package/lib/module/server/serialize.js.map +1 -1
- package/lib/module/specs/ShadowRegistry/index.js +2 -2
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/web/utils/createUnistylesRef.js +23 -0
- package/lib/module/web/utils/createUnistylesRef.js.map +1 -0
- package/lib/module/web/utils/index.js +1 -0
- package/lib/module/web/utils/index.js.map +1 -1
- package/lib/typescript/src/components/native/Image.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Image.native.d.ts +2 -0
- package/lib/typescript/src/components/native/Image.native.d.ts.map +1 -0
- package/lib/typescript/src/components/native/ImageBackground.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Pressable.native.d.ts.map +1 -1
- package/lib/typescript/src/core/createUnistylesElement.d.ts.map +1 -1
- package/lib/typescript/src/core/createUnistylesElement.native.d.ts.map +1 -1
- package/lib/typescript/src/core/createUnistylesImageBackground.d.ts.map +1 -1
- package/lib/typescript/src/core/passForwardRef.d.ts +1 -1
- package/lib/typescript/src/core/passForwardRef.d.ts.map +1 -1
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/createUnistylesRef.d.ts +8 -0
- package/lib/typescript/src/web/utils/createUnistylesRef.d.ts.map +1 -0
- package/lib/typescript/src/web/utils/index.d.ts +1 -0
- package/lib/typescript/src/web/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/native/Image.native.tsx +4 -0
- package/src/components/native/Image.tsx +35 -3
- package/src/components/native/ImageBackground.tsx +17 -33
- package/src/components/native/Pressable.native.tsx +12 -4
- package/src/core/createUnistylesElement.native.tsx +12 -6
- package/src/core/createUnistylesElement.tsx +6 -24
- package/src/core/createUnistylesImageBackground.tsx +16 -10
- package/src/core/passForwardRef.ts +5 -5
- package/src/server/serialize.ts +1 -1
- package/src/specs/ShadowRegistry/index.ts +1 -2
- package/src/web/utils/createUnistylesRef.ts +29 -0
- package/src/web/utils/index.ts +1 -0
@@ -15,7 +15,7 @@ const serialize = value => {
|
|
15
15
|
if (value === null) {
|
16
16
|
return 'null';
|
17
17
|
}
|
18
|
-
return `{${Object.entries(value).map(([key, value]) =>
|
18
|
+
return `{${Object.entries(value).map(([key, value]) => `'${key}':${serialize(value)}`).join(',')}}`;
|
19
19
|
default:
|
20
20
|
return JSON.stringify(value);
|
21
21
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["serialize","value","toString","Array","isArray","map","join","Object","entries","key","JSON","stringify","exports"],"sourceRoot":"../../../src","sources":["server/serialize.ts"],"mappings":";;;;;;AAAO,MAAMA,SAAS,GAAIC,KAAU,IAAa;EAC7C,QAAQ,OAAOA,KAAK;IAChB,KAAK,UAAU;MACX,OAAOA,KAAK,CAACC,QAAQ,CAAC,CAAC;IAC3B,KAAK,QAAQ;MACT,IAAIC,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,EAAE;QACtB,OAAO,IAAIA,KAAK,CAACI,GAAG,CAACL,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAAC,GAAG;MAChD;MAEA,IAAIL,KAAK,KAAK,IAAI,EAAE;QAChB,OAAO,MAAM;MACjB;MAEA,OAAO,IAAIM,MAAM,CAACC,OAAO,CAACP,KAAK,CAAC,CAC3BI,GAAG,CAAC,CAAC,CAACI,GAAG,EAAER,KAAK,CAAC,KAAK,
|
1
|
+
{"version":3,"names":["serialize","value","toString","Array","isArray","map","join","Object","entries","key","JSON","stringify","exports"],"sourceRoot":"../../../src","sources":["server/serialize.ts"],"mappings":";;;;;;AAAO,MAAMA,SAAS,GAAIC,KAAU,IAAa;EAC7C,QAAQ,OAAOA,KAAK;IAChB,KAAK,UAAU;MACX,OAAOA,KAAK,CAACC,QAAQ,CAAC,CAAC;IAC3B,KAAK,QAAQ;MACT,IAAIC,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,EAAE;QACtB,OAAO,IAAIA,KAAK,CAACI,GAAG,CAACL,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAAC,GAAG;MAChD;MAEA,IAAIL,KAAK,KAAK,IAAI,EAAE;QAChB,OAAO,MAAM;MACjB;MAEA,OAAO,IAAIM,MAAM,CAACC,OAAO,CAACP,KAAK,CAAC,CAC3BI,GAAG,CAAC,CAAC,CAACI,GAAG,EAAER,KAAK,CAAC,KAAK,IAAIQ,GAAG,KAAKT,SAAS,CAACC,KAAK,CAAC,EAAE,CAAC,CACrDK,IAAI,CAAC,GAAG,CAAC,GAAG;IACrB;MACI,OAAOI,IAAI,CAACC,SAAS,CAACV,KAAK,CAAC;EACpC;AACJ,CAAC;AAAAW,OAAA,CAAAZ,SAAA,GAAAA,SAAA","ignoreList":[]}
|
@@ -20,8 +20,8 @@ HybridShadowRegistry.add = (handle, styles) => {
|
|
20
20
|
}
|
21
21
|
const stylesArray = Array.isArray(styles) ? styles.flat() : [styles];
|
22
22
|
|
23
|
-
// filter
|
24
|
-
const filteredStyles = stylesArray.filter(style =>
|
23
|
+
// filter styles that are undefined or with no keys
|
24
|
+
const filteredStyles = stylesArray.filter(style => style && Object.keys(style).length > 0).flat().filter(Boolean);
|
25
25
|
if (filteredStyles.length > 0) {
|
26
26
|
HybridShadowRegistry.link(findShadowNodeForHandle(handle), filteredStyles);
|
27
27
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNativeNitroModules","require","HybridShadowRegistry","NitroModules","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","_viewRef","viewRef","current","_nativeRef","Error","elementType","add","styles","stylesArray","Array","isArray","flat","filteredStyles","filter","style","
|
1
|
+
{"version":3,"names":["_reactNativeNitroModules","require","HybridShadowRegistry","NitroModules","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","_viewRef","viewRef","current","_nativeRef","Error","elementType","add","styles","stylesArray","Array","isArray","flat","filteredStyles","filter","style","Object","keys","length","Boolean","link","remove","unlink","UnistylesShadowRegistry","exports"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AAeA,MAAMC,oBAAoB,GAAGC,qCAAY,CAACC,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACzED,MAAM,EAAEM,QAAQ,EAAEJ,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IAC3DD,MAAM,EAAEO,OAAO,EAAEC,OAAO,EAAEN,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACnED,MAAM,EAAES,UAAU,EAAEP,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEpE,IAAI,CAACA,IAAI,EAAE;IACP,MAAM,IAAIS,KAAK,CAAC,4EAA4EV,MAAM,EAAEE,wBAAwB,EAAES,WAAW,IAAI,SAAS,EAAE,CAAC;EAC7J;EAEA,OAAOV,IAAI;AACf,CAAC;AAEDL,oBAAoB,CAACgB,GAAG,GAAG,CAACZ,MAAM,EAAEa,MAAM,KAAK;EAC3C;EACA,IAAI,CAACb,MAAM,IAAI,CAACa,MAAM,EAAE;IACpB;EACJ;EAEA,MAAMC,WAAW,GAAGC,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,GACnCA,MAAM,CAACI,IAAI,CAAC,CAAC,GACb,CAACJ,MAAM,CAAC;;EAEd;EACA,MAAMK,cAAc,GAAGJ,WAAW,CAC7BK,MAAM,CAACC,KAAK,IAAIA,KAAK,IAAIC,MAAM,CAACC,IAAI,CAACF,KAAK,CAAC,CAACG,MAAM,GAAG,CAAC,CAAC,CACvDN,IAAI,CAAC,CAAC,CACNE,MAAM,CAACK,OAAO,CAAC;EAEpB,IAAIN,cAAc,CAACK,MAAM,GAAG,CAAC,EAAE;IAC3B3B,oBAAoB,CAAC6B,IAAI,CAAC1B,uBAAuB,CAACC,MAAM,CAAC,EAAEkB,cAAc,CAAC;EAC9E;AACJ,CAAC;AAEDtB,oBAAoB,CAAC8B,MAAM,GAAG1B,MAAM,IAAI;EACpC,IAAI,CAACA,MAAM,EAAE;IACT;EACJ;EAEAJ,oBAAoB,CAAC+B,MAAM,CAAC5B,uBAAuB,CAACC,MAAM,CAAC,CAAC;AAChE,CAAC;AAQM,MAAM4B,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGhC,oBAA4D","ignoreList":[]}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createUnistylesRef = void 0;
|
7
|
+
var _index = require("../index");
|
8
|
+
var _common = require("./common");
|
9
|
+
const createUnistylesRef = (classNames, forwardedRef) => {
|
10
|
+
const storedRef = {
|
11
|
+
current: null
|
12
|
+
};
|
13
|
+
return (0, _common.isServer)() ? undefined : ref => {
|
14
|
+
if (!ref) {
|
15
|
+
_index.UnistylesWeb.shadowRegistry.remove(storedRef, classNames?.hash);
|
16
|
+
}
|
17
|
+
storedRef.current = ref;
|
18
|
+
_index.UnistylesWeb.shadowRegistry.add(ref, classNames?.hash);
|
19
|
+
if (typeof forwardedRef === 'function') {
|
20
|
+
return forwardedRef(ref);
|
21
|
+
}
|
22
|
+
if (forwardedRef) {
|
23
|
+
forwardedRef.current = ref;
|
24
|
+
}
|
25
|
+
};
|
26
|
+
};
|
27
|
+
exports.createUnistylesRef = createUnistylesRef;
|
28
|
+
//# sourceMappingURL=createUnistylesRef.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_index","require","_common","createUnistylesRef","classNames","forwardedRef","storedRef","current","isServer","undefined","ref","UnistylesWeb","shadowRegistry","remove","hash","add","exports"],"sourceRoot":"../../../../src","sources":["web/utils/createUnistylesRef.ts"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAMO,MAAME,kBAAkB,GAAGA,CAAIC,UAAuB,EAAEC,YAAoC,KAAK;EACpG,MAAMC,SAAS,GAAG;IAAEC,OAAO,EAAE;EAAoB,CAAC;EAElD,OAAO,IAAAC,gBAAQ,EAAC,CAAC,GAAGC,SAAS,GAAIC,GAAgB,IAAK;IAClD,IAAI,CAACA,GAAG,EAAE;MACNC,mBAAY,CAACC,cAAc,CAACC,MAAM,CAACP,SAAS,EAAEF,UAAU,EAAEU,IAAI,CAAC;IACnE;IAEAR,SAAS,CAACC,OAAO,GAAGG,GAAG;IACvBC,mBAAY,CAACC,cAAc,CAACG,GAAG,CAACL,GAAG,EAAEN,UAAU,EAAEU,IAAI,CAAC;IAEtD,IAAI,OAAOT,YAAY,KAAK,UAAU,EAAE;MACpC,OAAOA,YAAY,CAACK,GAAG,CAAC;IAC5B;IAEA,IAAIL,YAAY,EAAE;MACdA,YAAY,CAACE,OAAO,GAAGG,GAAG;IAC9B;EACJ,CAAC;AACL,CAAC;AAAAM,OAAA,CAAAb,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
@@ -25,4 +25,15 @@ Object.keys(_unistyle).forEach(function (key) {
|
|
25
25
|
}
|
26
26
|
});
|
27
27
|
});
|
28
|
+
var _createUnistylesRef = require("./createUnistylesRef");
|
29
|
+
Object.keys(_createUnistylesRef).forEach(function (key) {
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
31
|
+
if (key in exports && exports[key] === _createUnistylesRef[key]) return;
|
32
|
+
Object.defineProperty(exports, key, {
|
33
|
+
enumerable: true,
|
34
|
+
get: function () {
|
35
|
+
return _createUnistylesRef[key];
|
36
|
+
}
|
37
|
+
});
|
38
|
+
});
|
28
39
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_common","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_unistyle"],"sourceRoot":"../../../../src","sources":["web/utils/index.ts"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,SAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,SAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,SAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,SAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_common","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_unistyle","_createUnistylesRef"],"sourceRoot":"../../../../src","sources":["web/utils/index.ts"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,SAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,SAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,SAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,SAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,mBAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,mBAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,mBAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,mBAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
@@ -1,6 +1,29 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
import React, { forwardRef } from 'react';
|
3
4
|
import { Image as NativeImage } from 'react-native';
|
4
|
-
import {
|
5
|
-
|
5
|
+
import { getClassName } from '../../core';
|
6
|
+
import { maybeWarnAboutMultipleUnistyles } from '../../core/warn';
|
7
|
+
import { copyComponentProperties } from '../../utils';
|
8
|
+
import { createUnistylesRef, keyInObject } from '../../web/utils';
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
10
|
+
const UnistylesImage = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
11
|
+
const classNames = getClassName(props.style);
|
12
|
+
const ref = createUnistylesRef(classNames, forwardedRef);
|
13
|
+
const hasWidthStyle = typeof props.style === 'object' && keyInObject(props.style, 'width');
|
14
|
+
const hasHeightStyle = typeof props.style === 'object' && keyInObject(props.style, 'height');
|
15
|
+
maybeWarnAboutMultipleUnistyles(props.style, 'Image');
|
16
|
+
return /*#__PURE__*/_jsx(NativeImage, {
|
17
|
+
...props,
|
18
|
+
style: [classNames,
|
19
|
+
// Clear inline width and height extracted from source
|
20
|
+
hasWidthStyle && {
|
21
|
+
width: ''
|
22
|
+
}, hasHeightStyle && {
|
23
|
+
height: ''
|
24
|
+
}],
|
25
|
+
ref: ref
|
26
|
+
});
|
27
|
+
});
|
28
|
+
export const Image = copyComponentProperties(NativeImage, UnistylesImage);
|
6
29
|
//# sourceMappingURL=Image.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Image","NativeImage","
|
1
|
+
{"version":3,"names":["React","forwardRef","Image","NativeImage","getClassName","maybeWarnAboutMultipleUnistyles","copyComponentProperties","createUnistylesRef","keyInObject","jsx","_jsx","UnistylesImage","props","forwardedRef","classNames","style","ref","hasWidthStyle","hasHeightStyle","width","height"],"sourceRoot":"../../../../src","sources":["components/native/Image.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAyBC,UAAU,QAAQ,OAAO;AAC9D,SAA0BC,KAAK,IAAIC,WAAW,QAAwC,cAAc;AACpG,SAASC,YAAY,QAAQ,YAAY;AACzC,SAASC,+BAA+B,QAAQ,iBAAiB;AAEjE,SAASC,uBAAuB,QAAQ,aAAa;AACrD,SAASC,kBAAkB,EAAEC,WAAW,QAAQ,iBAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOjE,MAAMC,cAAc,gBAAGV,UAAU,CAAiB,CAACW,KAAK,EAAEC,YAAY,KAAK;EACvE,MAAMC,UAAU,GAAGV,YAAY,CAACQ,KAAK,CAACG,KAAK,CAAC;EAC5C,MAAMC,GAAG,GAAGT,kBAAkB,CAACO,UAAU,EAAED,YAAY,CAAC;EACxD,MAAMI,aAAa,GAAG,OAAOL,KAAK,CAACG,KAAK,KAAK,QAAQ,IAAIP,WAAW,CAACI,KAAK,CAACG,KAAK,EAAE,OAAO,CAAC;EAC1F,MAAMG,cAAc,GAAG,OAAON,KAAK,CAACG,KAAK,KAAK,QAAQ,IAAIP,WAAW,CAACI,KAAK,CAACG,KAAK,EAAE,QAAQ,CAAC;EAE5FV,+BAA+B,CAACO,KAAK,CAACG,KAAK,EAAe,OAAO,CAAC;EAElE,oBACIL,IAAA,CAACP,WAAW;IAAA,GACJS,KAAK;IACTG,KAAK,EAAE,CACHD,UAAU;IACV;IACAG,aAAa,IAAI;MAAEE,KAAK,EAAE;IAAG,CAAC,EAC9BD,cAAc,IAAI;MAAEE,MAAM,EAAE;IAAG,CAAC,CACT;IAC3BJ,GAAG,EAAEA;EAAI,CACZ,CAAC;AAEV,CAAC,CAAC;AAEF,OAAO,MAAMd,KAAK,GAAGI,uBAAuB,CAACH,WAAW,EAAEQ,cAAc,CAAC","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["Image","NativeImage","createUnistylesElement"],"sourceRoot":"../../../../src","sources":["components/native/Image.native.tsx"],"mappings":";;AAAA,SAASA,KAAK,IAAIC,WAAW,QAAQ,cAAc;AACnD,SAASC,sBAAsB,QAAQ,YAAY;AAEnD,OAAO,MAAMF,KAAK,GAAGE,sBAAsB,CAACD,WAAW,CAAC","ignoreList":[]}
|
@@ -4,43 +4,31 @@ import React from 'react';
|
|
4
4
|
import { forwardRef } from 'react';
|
5
5
|
import { ImageBackground as NativeImageBackground } from 'react-native';
|
6
6
|
import { getClassName } from '../../core';
|
7
|
+
import { maybeWarnAboutMultipleUnistyles } from '../../core/warn';
|
7
8
|
import { copyComponentProperties } from '../../utils';
|
8
|
-
import {
|
9
|
-
import { isServer } from '../../web/utils';
|
9
|
+
import { createUnistylesRef, keyInObject } from '../../web/utils';
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
11
11
|
const UnistylesImageBackground = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
12
|
-
let storedRef = null;
|
13
|
-
let storedImageRef = null;
|
14
12
|
const styleClassNames = getClassName(props.style);
|
15
13
|
const imageClassNames = getClassName(props.imageStyle);
|
14
|
+
const ref = createUnistylesRef(styleClassNames, forwardedRef);
|
15
|
+
const imageRef = createUnistylesRef(imageClassNames);
|
16
|
+
const hasWidthStyle = typeof props.imageStyle === 'object' && keyInObject(props.imageStyle, 'width');
|
17
|
+
const hasHeightStyle = typeof props.imageStyle === 'object' && keyInObject(props.imageStyle, 'height');
|
18
|
+
maybeWarnAboutMultipleUnistyles(props.style, 'ImageBackground');
|
19
|
+
maybeWarnAboutMultipleUnistyles(props.imageStyle, 'ImageBackground');
|
16
20
|
return /*#__PURE__*/_jsx(NativeImageBackground, {
|
17
21
|
...props,
|
18
22
|
style: styleClassNames,
|
19
|
-
imageStyle: imageClassNames,
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
if (typeof forwardedRef === 'function') {
|
29
|
-
return forwardedRef(ref);
|
30
|
-
}
|
31
|
-
if (forwardedRef) {
|
32
|
-
forwardedRef.current = ref;
|
33
|
-
}
|
34
|
-
},
|
35
|
-
imageRef: isServer() ? undefined : ref => {
|
36
|
-
if (!ref) {
|
37
|
-
// @ts-expect-error hidden from TS
|
38
|
-
UnistylesShadowRegistry.remove(storedImageRef, imageClassNames?.hash);
|
39
|
-
}
|
40
|
-
storedImageRef = ref;
|
41
|
-
// @ts-expect-error hidden from TS
|
42
|
-
UnistylesShadowRegistry.add(ref, imageClassNames?.hash);
|
43
|
-
}
|
23
|
+
imageStyle: [imageClassNames,
|
24
|
+
// Clear inline width and height extracted from source
|
25
|
+
hasWidthStyle && {
|
26
|
+
width: ''
|
27
|
+
}, hasHeightStyle && {
|
28
|
+
height: ''
|
29
|
+
}],
|
30
|
+
ref: ref,
|
31
|
+
imageRef: imageRef
|
44
32
|
});
|
45
33
|
});
|
46
34
|
export const ImageBackground = copyComponentProperties(NativeImageBackground, UnistylesImageBackground);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","forwardRef","ImageBackground","NativeImageBackground","getClassName","copyComponentProperties","
|
1
|
+
{"version":3,"names":["React","forwardRef","ImageBackground","NativeImageBackground","getClassName","maybeWarnAboutMultipleUnistyles","copyComponentProperties","createUnistylesRef","keyInObject","jsx","_jsx","UnistylesImageBackground","props","forwardedRef","styleClassNames","style","imageClassNames","imageStyle","ref","imageRef","hasWidthStyle","hasHeightStyle","width","height"],"sourceRoot":"../../../../src","sources":["components/native/ImageBackground.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,OAAO;AAClC,SAA0BC,eAAe,IAAIC,qBAAqB,QAAwC,cAAc;AACxH,SAASC,YAAY,QAAQ,YAAY;AACzC,SAASC,+BAA+B,QAAQ,iBAAiB;AAEjE,SAASC,uBAAuB,QAAQ,aAAa;AACrD,SAASC,kBAAkB,EAAEC,WAAW,QAAQ,iBAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOjE,MAAMC,wBAAwB,gBAAGV,UAAU,CAAiB,CAACW,KAAK,EAAEC,YAAY,KAAK;EACjF,MAAMC,eAAe,GAAGV,YAAY,CAACQ,KAAK,CAACG,KAAK,CAAC;EACjD,MAAMC,eAAe,GAAGZ,YAAY,CAACQ,KAAK,CAACK,UAAU,CAAC;EACtD,MAAMC,GAAG,GAAGX,kBAAkB,CAACO,eAAe,EAAED,YAAY,CAAC;EAC7D,MAAMM,QAAQ,GAAGZ,kBAAkB,CAACS,eAAe,CAAC;EACpD,MAAMI,aAAa,GAAG,OAAOR,KAAK,CAACK,UAAU,KAAK,QAAQ,IAAIT,WAAW,CAACI,KAAK,CAACK,UAAU,EAAE,OAAO,CAAC;EACpG,MAAMI,cAAc,GAAG,OAAOT,KAAK,CAACK,UAAU,KAAK,QAAQ,IAAIT,WAAW,CAACI,KAAK,CAACK,UAAU,EAAE,QAAQ,CAAC;EAEtGZ,+BAA+B,CAACO,KAAK,CAACG,KAAK,EAAe,iBAAiB,CAAC;EAC5EV,+BAA+B,CAACO,KAAK,CAACK,UAAU,EAAe,iBAAiB,CAAC;EAEjF,oBACIP,IAAA,CAACP,qBAAqB;IAAA,GACdS,KAAK;IACTG,KAAK,EAAED,eAAwC;IAC/CG,UAAU,EAAE,CACRD,eAAe;IACf;IACAI,aAAa,IAAI;MAAEE,KAAK,EAAE;IAAG,CAAC,EAC9BD,cAAc,IAAI;MAAEE,MAAM,EAAE;IAAG,CAAC,CACT;IAC3BL,GAAG,EAAEA,GAAI;IACTC,QAAQ,EAAEA;EAAS,CACtB,CAAC;AAEV,CAAC,CAAC;AAEF,OAAO,MAAMjB,eAAe,GAAGI,uBAAuB,CAACH,qBAAqB,EAAEQ,wBAAwB,CAAC","ignoreList":[]}
|
@@ -41,10 +41,13 @@ export const Pressable = /*#__PURE__*/forwardRef(({
|
|
41
41
|
if (ref) {
|
42
42
|
storedRef.current = ref;
|
43
43
|
}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
return passForwardedRef(ref, forwardedRef, () => {
|
45
|
+
// @ts-expect-error - this is hidden from TS
|
46
|
+
UnistylesShadowRegistry.add(ref, unistyles);
|
47
|
+
}, () => {
|
48
|
+
// @ts-expect-error - this is hidden from TS
|
49
|
+
UnistylesShadowRegistry.remove(ref);
|
50
|
+
});
|
48
51
|
},
|
49
52
|
style: state => {
|
50
53
|
const isPropStyleAFunction = typeof style === 'function';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","forwardRef","useLayoutEffect","useRef","Pressable","NativePressableReactNative","passForwardedRef","UnistylesShadowRegistry","jsx","_jsx","getStyles","styleProps","unistyleKey","Object","keys","find","key","startsWith","uni__getStyles","variants","style","props","forwardedRef","storedRef","scopedTheme","getScopedTheme","current","remove","ref","isPropStyleAFunction","unistyles","call","pressed","add","state","previousScopedTheme","setScopedTheme"],"sourceRoot":"../../../../src","sources":["components/native/Pressable.native.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AAClE,SAASC,SAAS,IAAIC,0BAA0B,QAAQ,cAAc;AAEtE,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,uBAAuB,QAAQ,aAAa;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMrD,MAAMC,SAAS,GAAGA,CAACC,UAA+B,GAAG,CAAC,CAAC,KAAK;EACxD,MAAMC,WAAW,GAAGC,MAAM,CACrBC,IAAI,CAACH,UAAU,CAAC,CAChBI,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACC,UAAU,CAAC,YAAY,CAAC,CAAC;EAE9C,IAAI,CAACL,WAAW,EAAE;IACd,OAAOD,UAAU;EACrB;EAEA,OAAO;IACH;IACA,GAAGA,UAAU,CAACC,WAAW,CAAC,CAACM,cAAc,CAAC,CAAC;IAC3C,CAACN,WAAW,GAAGD,UAAU,CAACC,WAAW;EACzC,CAAC;AACL,CAAC;AAED,OAAO,MAAMR,SAAS,gBAAGH,UAAU,CAAuB,CAAC;EAAEkB,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,YAAY,KAAK;EACvG,MAAMC,SAAS,GAAGpB,MAAM,CAAc,IAAI,CAAC;EAC3C,MAAMqB,WAAW,GAAGjB,uBAAuB,CAACkB,cAAc,CAAC,CAAC;EAE5DvB,eAAe,CAAC,MAAM;IAClB,OAAO,MAAM;MACT,IAAIqB,SAAS,CAACG,OAAO,EAAE;QACnB;QACAnB,uBAAuB,CAACoB,MAAM,CAACJ,SAAS,CAACG,OAAO,CAAC;MACrD;IACJ,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,oBACIjB,IAAA,CAACJ,0BAA0B;IAAA,GACnBgB,KAAK;IACTO,GAAG,EAAEA,GAAG,IAAI;MACR,MAAMC,oBAAoB,GAAG,OAAOT,KAAK,KAAK,UAAU;MACxD,MAAMU,SAAS,GAAGD,oBAAoB,GAChCT,KAAK,CAACW,IAAI,CAACX,KAAK,EAAE;QAAEY,OAAO,EAAE;MAAM,CAAC,CAAC,GACrCtB,SAAS,CAACU,KAAuC,CAAC;MAExD,IAAIQ,GAAG,EAAE;QACLL,SAAS,CAACG,OAAO,GAAGE,GAAG;MAC3B
|
1
|
+
{"version":3,"names":["React","forwardRef","useLayoutEffect","useRef","Pressable","NativePressableReactNative","passForwardedRef","UnistylesShadowRegistry","jsx","_jsx","getStyles","styleProps","unistyleKey","Object","keys","find","key","startsWith","uni__getStyles","variants","style","props","forwardedRef","storedRef","scopedTheme","getScopedTheme","current","remove","ref","isPropStyleAFunction","unistyles","call","pressed","add","state","previousScopedTheme","setScopedTheme"],"sourceRoot":"../../../../src","sources":["components/native/Pressable.native.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AAClE,SAASC,SAAS,IAAIC,0BAA0B,QAAQ,cAAc;AAEtE,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,uBAAuB,QAAQ,aAAa;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMrD,MAAMC,SAAS,GAAGA,CAACC,UAA+B,GAAG,CAAC,CAAC,KAAK;EACxD,MAAMC,WAAW,GAAGC,MAAM,CACrBC,IAAI,CAACH,UAAU,CAAC,CAChBI,IAAI,CAACC,GAAG,IAAIA,GAAG,CAACC,UAAU,CAAC,YAAY,CAAC,CAAC;EAE9C,IAAI,CAACL,WAAW,EAAE;IACd,OAAOD,UAAU;EACrB;EAEA,OAAO;IACH;IACA,GAAGA,UAAU,CAACC,WAAW,CAAC,CAACM,cAAc,CAAC,CAAC;IAC3C,CAACN,WAAW,GAAGD,UAAU,CAACC,WAAW;EACzC,CAAC;AACL,CAAC;AAED,OAAO,MAAMR,SAAS,gBAAGH,UAAU,CAAuB,CAAC;EAAEkB,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,YAAY,KAAK;EACvG,MAAMC,SAAS,GAAGpB,MAAM,CAAc,IAAI,CAAC;EAC3C,MAAMqB,WAAW,GAAGjB,uBAAuB,CAACkB,cAAc,CAAC,CAAC;EAE5DvB,eAAe,CAAC,MAAM;IAClB,OAAO,MAAM;MACT,IAAIqB,SAAS,CAACG,OAAO,EAAE;QACnB;QACAnB,uBAAuB,CAACoB,MAAM,CAACJ,SAAS,CAACG,OAAO,CAAC;MACrD;IACJ,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,oBACIjB,IAAA,CAACJ,0BAA0B;IAAA,GACnBgB,KAAK;IACTO,GAAG,EAAEA,GAAG,IAAI;MACR,MAAMC,oBAAoB,GAAG,OAAOT,KAAK,KAAK,UAAU;MACxD,MAAMU,SAAS,GAAGD,oBAAoB,GAChCT,KAAK,CAACW,IAAI,CAACX,KAAK,EAAE;QAAEY,OAAO,EAAE;MAAM,CAAC,CAAC,GACrCtB,SAAS,CAACU,KAAuC,CAAC;MAExD,IAAIQ,GAAG,EAAE;QACLL,SAAS,CAACG,OAAO,GAAGE,GAAG;MAC3B;MAEA,OAAOtB,gBAAgB,CACnBsB,GAAG,EACHN,YAAY,EACZ,MAAM;QACF;QACAf,uBAAuB,CAAC0B,GAAG,CAACL,GAAG,EAAEE,SAAS,CAAC;MAC/C,CAAC,EACD,MAAM;QACF;QACAvB,uBAAuB,CAACoB,MAAM,CAACC,GAAG,CAAC;MACvC,CACJ,CAAC;IACL,CAAE;IACFR,KAAK,EAAEc,KAAK,IAAI;MACZ,MAAML,oBAAoB,GAAG,OAAOT,KAAK,KAAK,UAAU;MACxD,MAAMe,mBAAmB,GAAG5B,uBAAuB,CAACkB,cAAc,CAAC,CAAC;MAEpElB,uBAAuB,CAAC6B,cAAc,CAACZ,WAAW,CAAC;MAEnD,MAAMM,SAAS,GAAGD,oBAAoB,GAChCT,KAAK,CAACW,IAAI,CAACX,KAAK,EAAEc,KAAK,CAAC,GACxBxB,SAAS,CAACU,KAAuC,CAAC;MAExD,IAAI,CAACG,SAAS,CAACG,OAAO,EAAE;QACpB,OAAOI,SAAS;MACpB;;MAEA;MACAvB,uBAAuB,CAACoB,MAAM,CAACJ,SAAS,CAACG,OAAO,CAAC;;MAEjD;MACAnB,uBAAuB,CAAC0B,GAAG,CAACV,SAAS,CAACG,OAAO,EAAEI,SAAS,CAAC;MAEzDvB,uBAAuB,CAAC6B,cAAc,CAACD,mBAAmB,CAAC;MAE3D,OAAOL,SAAS;IACpB;EAAE,CACL,CAAC;AAEV,CAAC,CAAC","ignoreList":[]}
|
@@ -2,35 +2,19 @@
|
|
2
2
|
|
3
3
|
import React from 'react';
|
4
4
|
import { copyComponentProperties } from '../utils';
|
5
|
-
import {
|
6
|
-
import { isServer } from '../web/utils';
|
5
|
+
import { createUnistylesRef } from '../web/utils';
|
7
6
|
import { getClassName } from './getClassname';
|
8
7
|
import { maybeWarnAboutMultipleUnistyles } from './warn';
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
10
9
|
export const createUnistylesElement = Component => {
|
11
10
|
const UnistylesComponent = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
12
|
-
let storedRef = null;
|
13
11
|
const classNames = getClassName(props.style);
|
12
|
+
const ref = createUnistylesRef(classNames, forwardedRef);
|
13
|
+
maybeWarnAboutMultipleUnistyles(props.style, Component.displayName);
|
14
14
|
return /*#__PURE__*/_jsx(Component, {
|
15
15
|
...props,
|
16
16
|
style: classNames,
|
17
|
-
ref:
|
18
|
-
// @ts-ignore we don't know the type of the component
|
19
|
-
maybeWarnAboutMultipleUnistyles(props.style, Component.displayName);
|
20
|
-
if (!ref) {
|
21
|
-
// @ts-expect-error hidden from TS
|
22
|
-
UnistylesShadowRegistry.remove(storedRef, classNames?.hash);
|
23
|
-
}
|
24
|
-
storedRef = ref;
|
25
|
-
// @ts-expect-error hidden from TS
|
26
|
-
UnistylesShadowRegistry.add(ref, classNames?.hash);
|
27
|
-
if (typeof forwardedRef === 'function') {
|
28
|
-
return forwardedRef(ref);
|
29
|
-
}
|
30
|
-
if (forwardedRef) {
|
31
|
-
forwardedRef.current = ref;
|
32
|
-
}
|
33
|
-
}
|
17
|
+
ref: ref
|
34
18
|
});
|
35
19
|
});
|
36
20
|
return copyComponentProperties(Component, UnistylesComponent);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","copyComponentProperties","
|
1
|
+
{"version":3,"names":["React","copyComponentProperties","createUnistylesRef","getClassName","maybeWarnAboutMultipleUnistyles","jsx","_jsx","createUnistylesElement","Component","UnistylesComponent","forwardRef","props","forwardedRef","classNames","style","ref","displayName"],"sourceRoot":"../../../src","sources":["core/createUnistylesElement.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,SAASC,uBAAuB,QAAQ,UAAU;AAClD,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,+BAA+B,QAAQ,QAAQ;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMxD,OAAO,MAAMC,sBAAsB,GAAIC,SAAc,IAAK;EACtD,MAAMC,kBAAkB,gBAAGT,KAAK,CAACU,UAAU,CAA0B,CAACC,KAAK,EAAEC,YAAY,KAAK;IAC1F,MAAMC,UAAU,GAAGV,YAAY,CAACQ,KAAK,CAACG,KAAK,CAAC;IAC5C,MAAMC,GAAG,GAAGb,kBAAkB,CAACW,UAAU,EAAED,YAAY,CAAC;IAExDR,+BAA+B,CAACO,KAAK,CAACG,KAAK,EAAeN,SAAS,CAACQ,WAAW,CAAC;IAEhF,oBACIV,IAAA,CAACE,SAAS;MAAA,GACFG,KAAK;MACTG,KAAK,EAAED,UAAW;MAClBE,GAAG,EAAEA;IAAI,CACZ,CAAC;EAEV,CAAC,CAAC;EAEF,OAAOd,uBAAuB,CAACO,SAAS,EAAEC,kBAAkB,CAAC;AACjE,CAAC","ignoreList":[]}
|
@@ -35,14 +35,16 @@ export const createUnistylesElement = Component => {
|
|
35
35
|
if (ref) {
|
36
36
|
storedRef.current = getNativeRef(Component, ref);
|
37
37
|
}
|
38
|
-
passForwardedRef(props, ref, forwardedRef);
|
39
38
|
|
40
39
|
// @ts-ignore we don't know the type of the component
|
41
40
|
maybeWarnAboutMultipleUnistyles(props.style, Component.displayName);
|
42
|
-
return () => {
|
43
|
-
// @ts-ignore
|
41
|
+
return passForwardedRef(ref, forwardedRef, () => {
|
42
|
+
// @ts-ignore this is hidden from TS
|
43
|
+
UnistylesShadowRegistry.add(ref, props.style);
|
44
|
+
}, () => {
|
45
|
+
// @ts-ignore this is hidden from TS
|
44
46
|
UnistylesShadowRegistry.remove(ref);
|
45
|
-
};
|
47
|
+
});
|
46
48
|
}
|
47
49
|
});
|
48
50
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","useLayoutEffect","useRef","UnistylesShadowRegistry","copyComponentProperties","passForwardedRef","maybeWarnAboutMultipleUnistyles","jsx","_jsx","getNativeRef","Component","ref","name","viewRef","current","getNativeScrollRef","getScrollRef","createUnistylesElement","UnistylesComponent","forwardRef","props","forwardedRef","storedRef","remove","style","displayName"],"sourceRoot":"../../../src","sources":["core/createUnistylesElement.native.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AACtD,SAASC,uBAAuB,QAAQ,UAAU;AAClD,SAASC,uBAAuB,QAAQ,UAAU;AAClD,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SAASC,+BAA+B,QAAQ,QAAQ;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAExD,MAAMC,YAAY,GAAGA,CAACC,SAAc,EAAEC,GAAQ,KAAK;EAC/C,QAAQD,SAAS,CAACE,IAAI;IAClB,KAAK,sBAAsB;MACvB,OAAOD,GAAG,CAACE,OAAO,EAAEC,OAAO;IAC/B,KAAK,UAAU;MACX,OAAOH,GAAG,CAACI,kBAAkB,GAAG,CAAC;IACrC,KAAK,iBAAiB;MAClB,OAAOJ,GAAG,CAACK,YAAY,GAAG,CAAC;IAC/B;MACI,OAAOL,GAAG;EAClB;AACJ,CAAC;AAED,OAAO,MAAMM,sBAAsB,GAAIP,SAAc,IAAK;EACtD,MAAMQ,kBAAkB,gBAAGlB,KAAK,CAACmB,UAAU,CAAC,CAACC,KAAK,EAAEC,YAAY,KAAK;IACjE,MAAMC,SAAS,GAAGpB,MAAM,CAAU,IAAI,CAAC;IAEvCD,eAAe,CAAC,MAAM;MAClB,OAAO,MAAM;QACT,IAAIqB,SAAS,CAACR,OAAO,EAAE;UACnB;UACAX,uBAAuB,CAACoB,MAAM,CAACD,SAAS,CAACR,OAAO,CAAC;QACrD;MACJ,CAAC;IACL,CAAC,EAAE,EAAE,CAAC;IAEN,oBACIN,IAAA,CAACE,SAAS;MAAA,GACFU,KAAK;MACTT,GAAG,EAAGA,GAAY,IAAK;QACnB,IAAIA,GAAG,EAAE;UACLW,SAAS,CAACR,OAAO,GAAGL,YAAY,CAACC,SAAS,EAAEC,GAAG,CAAC;QACpD
|
1
|
+
{"version":3,"names":["React","useLayoutEffect","useRef","UnistylesShadowRegistry","copyComponentProperties","passForwardedRef","maybeWarnAboutMultipleUnistyles","jsx","_jsx","getNativeRef","Component","ref","name","viewRef","current","getNativeScrollRef","getScrollRef","createUnistylesElement","UnistylesComponent","forwardRef","props","forwardedRef","storedRef","remove","style","displayName","add"],"sourceRoot":"../../../src","sources":["core/createUnistylesElement.native.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AACtD,SAASC,uBAAuB,QAAQ,UAAU;AAClD,SAASC,uBAAuB,QAAQ,UAAU;AAClD,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SAASC,+BAA+B,QAAQ,QAAQ;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAExD,MAAMC,YAAY,GAAGA,CAACC,SAAc,EAAEC,GAAQ,KAAK;EAC/C,QAAQD,SAAS,CAACE,IAAI;IAClB,KAAK,sBAAsB;MACvB,OAAOD,GAAG,CAACE,OAAO,EAAEC,OAAO;IAC/B,KAAK,UAAU;MACX,OAAOH,GAAG,CAACI,kBAAkB,GAAG,CAAC;IACrC,KAAK,iBAAiB;MAClB,OAAOJ,GAAG,CAACK,YAAY,GAAG,CAAC;IAC/B;MACI,OAAOL,GAAG;EAClB;AACJ,CAAC;AAED,OAAO,MAAMM,sBAAsB,GAAIP,SAAc,IAAK;EACtD,MAAMQ,kBAAkB,gBAAGlB,KAAK,CAACmB,UAAU,CAAC,CAACC,KAAK,EAAEC,YAAY,KAAK;IACjE,MAAMC,SAAS,GAAGpB,MAAM,CAAU,IAAI,CAAC;IAEvCD,eAAe,CAAC,MAAM;MAClB,OAAO,MAAM;QACT,IAAIqB,SAAS,CAACR,OAAO,EAAE;UACnB;UACAX,uBAAuB,CAACoB,MAAM,CAACD,SAAS,CAACR,OAAO,CAAC;QACrD;MACJ,CAAC;IACL,CAAC,EAAE,EAAE,CAAC;IAEN,oBACIN,IAAA,CAACE,SAAS;MAAA,GACFU,KAAK;MACTT,GAAG,EAAGA,GAAY,IAAK;QACnB,IAAIA,GAAG,EAAE;UACLW,SAAS,CAACR,OAAO,GAAGL,YAAY,CAACC,SAAS,EAAEC,GAAG,CAAC;QACpD;;QAEA;QACAL,+BAA+B,CAACc,KAAK,CAACI,KAAK,EAAEd,SAAS,CAACe,WAAW,CAAC;QAEnE,OAAOpB,gBAAgB,CACnBM,GAAG,EACHU,YAAY,EACZ,MAAM;UACF;UACAlB,uBAAuB,CAACuB,GAAG,CAACf,GAAG,EAAES,KAAK,CAACI,KAAK,CAAC;QACjD,CAAC,EACD,MAAM;UACF;UACArB,uBAAuB,CAACoB,MAAM,CAACZ,GAAG,CAAC;QACvC,CACJ,CAAC;MACL;IAAE,CACL,CAAC;EAEV,CAAC,CAAC;EAEF,OAAOP,uBAAuB,CAACM,SAAS,EAAEQ,kBAAkB,CAAC;AACjE,CAAC","ignoreList":[]}
|
@@ -25,15 +25,17 @@ export const createUnistylesImageBackground = Component => {
|
|
25
25
|
return /*#__PURE__*/_jsx(Component, {
|
26
26
|
...props,
|
27
27
|
ref: ref => {
|
28
|
-
passForwardedRef(
|
29
|
-
|
30
|
-
|
28
|
+
return passForwardedRef(ref, forwardedRef, () => {
|
29
|
+
// @ts-expect-error - this is hidden from TS
|
30
|
+
UnistylesShadowRegistry.add(ref, props.style);
|
31
|
+
}, () => {
|
32
|
+
// @ts-expect-error - this is hidden from TS
|
31
33
|
UnistylesShadowRegistry.remove(ref);
|
32
34
|
if (storedImageRef.current) {
|
33
|
-
// @ts-
|
35
|
+
// @ts-expect-error - this is hidden from TS
|
34
36
|
UnistylesShadowRegistry.remove(storedImageRef.current);
|
35
37
|
}
|
36
|
-
};
|
38
|
+
});
|
37
39
|
},
|
38
40
|
imageRef: ref => {
|
39
41
|
if (ref) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","useLayoutEffect","useRef","UnistylesShadowRegistry","copyComponentProperties","passForwardedRef","maybeWarnAboutMultipleUnistyles","jsx","_jsx","createUnistylesImageBackground","Component","UnistylesImageBackground","forwardRef","props","forwardedRef","storedImageRef","current","remove","style","imageStyle","ref","
|
1
|
+
{"version":3,"names":["React","useLayoutEffect","useRef","UnistylesShadowRegistry","copyComponentProperties","passForwardedRef","maybeWarnAboutMultipleUnistyles","jsx","_jsx","createUnistylesImageBackground","Component","UnistylesImageBackground","forwardRef","props","forwardedRef","storedImageRef","current","remove","style","imageStyle","ref","add","imageRef"],"sourceRoot":"../../../src","sources":["core/createUnistylesImageBackground.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AAEtD,SAASC,uBAAuB,QAAQ,UAAU;AAClD,SAASC,uBAAuB,QAAQ,UAAU;AAClD,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SAASC,+BAA+B,QAAQ,QAAQ;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAExD,OAAO,MAAMC,8BAA8B,GAAIC,SAAiC,IAAK;EACjF,MAAMC,wBAAwB,gBAAGX,KAAK,CAACY,UAAU,CAAwC,CAACC,KAAK,EAAEC,YAAY,KAAK;IAC9G,MAAMC,cAAc,GAAGb,MAAM,CAAe,IAAI,CAAC;IAEjDD,eAAe,CAAC,MAAM;MAClB,OAAO,MAAM;QACT,IAAIc,cAAc,CAACC,OAAO,EAAE;UACxB;UACAb,uBAAuB,CAACc,MAAM,CAACF,cAAc,CAACC,OAAO,CAAC;QAC1D;MACJ,CAAC;IACL,CAAC,EAAE,EAAE,CAAC;;IAEN;IACAV,+BAA+B,CAACO,KAAK,CAACK,KAAK,EAAE,iBAAiB,CAAC;IAC/D;IACAZ,+BAA+B,CAACO,KAAK,CAACM,UAAU,EAAE,iBAAiB,CAAC;IAEpE,oBACIX,IAAA,CAACE,SAAS;MAAA,GACFG,KAAK;MACTO,GAAG,EAAEA,GAAG,IAAI;QACR,OAAOf,gBAAgB,CACnBe,GAAG,EACHN,YAAY,EACZ,MAAM;UACF;UACAX,uBAAuB,CAACkB,GAAG,CAACD,GAAG,EAAEP,KAAK,CAACK,KAAK,CAAC;QACjD,CAAC,EACD,MAAM;UACF;UACAf,uBAAuB,CAACc,MAAM,CAACG,GAAG,CAAC;UAEnC,IAAIL,cAAc,CAACC,OAAO,EAAE;YACxB;YACAb,uBAAuB,CAACc,MAAM,CAACF,cAAc,CAACC,OAAO,CAAC;UAC1D;QACJ,CACJ,CAAC;MACL,CAAE;MACFM,QAAQ,EAAEF,GAAG,IAAI;QACb,IAAIA,GAAG,EAAE;UACLL,cAAc,CAACC,OAAO,GAAGI,GAAG;QAChC;;QAEA;QACAjB,uBAAuB,CAACkB,GAAG,CAACD,GAAG,EAAEP,KAAK,CAACM,UAAU,CAAC;MACtD;IAAE,CACL,CAAC;EAEV,CAAC,CAAC;EAEF,OAAOf,uBAAuB,CAACM,SAAS,EAAEC,wBAAwB,CAAC;AACvE,CAAC","ignoreList":[]}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
|
4
|
-
export const passForwardedRef = (props, ref, forwardedRef) => {
|
3
|
+
export const passForwardedRef = (ref, forwardedRef, onMount, onUnmount) => {
|
5
4
|
const passForwardedRef = () => {
|
6
5
|
if (typeof forwardedRef === 'function') {
|
7
6
|
return forwardedRef(ref);
|
@@ -12,11 +11,10 @@ export const passForwardedRef = (props, ref, forwardedRef) => {
|
|
12
11
|
return () => {};
|
13
12
|
};
|
14
13
|
const forwardedRefReturnFn = passForwardedRef();
|
15
|
-
|
16
|
-
// @ts-expect-error hidden from TS
|
17
|
-
UnistylesShadowRegistry.add(ref, props.style);
|
14
|
+
onMount?.();
|
18
15
|
return () => {
|
19
16
|
forwardedRefReturnFn?.();
|
17
|
+
onUnmount?.();
|
20
18
|
};
|
21
19
|
};
|
22
20
|
//# sourceMappingURL=passForwardRef.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["passForwardedRef","ref","forwardedRef","onMount","onUnmount","current","forwardedRefReturnFn"],"sourceRoot":"../../../src","sources":["core/passForwardRef.ts"],"mappings":";;AAEA,OAAO,MAAMA,gBAAgB,GAAGA,CAC5BC,GAAM,EACNC,YAAmC,EACnCC,OAAoB,EACpBC,SAAsB,KACrB;EACD,MAAMJ,gBAAgB,GAAGA,CAAA,KAAM;IAC3B,IAAI,OAAOE,YAAY,KAAK,UAAU,EAAE;MACpC,OAAOA,YAAY,CAACD,GAAG,CAAC;IAC5B;IAEA,IAAIC,YAAY,EAAE;MACdA,YAAY,CAACG,OAAO,GAAGJ,GAAG;IAC9B;IAEA,OAAO,MAAM,CAAC,CAAC;EACnB,CAAC;EACD,MAAMK,oBAAoB,GAAGN,gBAAgB,CAAC,CAAC;EAE/CG,OAAO,GAAG,CAAC;EAEX,OAAO,MAAM;IACTG,oBAAoB,GAAG,CAAC;IACxBF,SAAS,GAAG,CAAC;EACjB,CAAC;AACL,CAAC","ignoreList":[]}
|
@@ -11,7 +11,7 @@ export const serialize = value => {
|
|
11
11
|
if (value === null) {
|
12
12
|
return 'null';
|
13
13
|
}
|
14
|
-
return `{${Object.entries(value).map(([key, value]) =>
|
14
|
+
return `{${Object.entries(value).map(([key, value]) => `'${key}':${serialize(value)}`).join(',')}}`;
|
15
15
|
default:
|
16
16
|
return JSON.stringify(value);
|
17
17
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["serialize","value","toString","Array","isArray","map","join","Object","entries","key","JSON","stringify"],"sourceRoot":"../../../src","sources":["server/serialize.ts"],"mappings":";;AAAA,OAAO,MAAMA,SAAS,GAAIC,KAAU,IAAa;EAC7C,QAAQ,OAAOA,KAAK;IAChB,KAAK,UAAU;MACX,OAAOA,KAAK,CAACC,QAAQ,CAAC,CAAC;IAC3B,KAAK,QAAQ;MACT,IAAIC,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,EAAE;QACtB,OAAO,IAAIA,KAAK,CAACI,GAAG,CAACL,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAAC,GAAG;MAChD;MAEA,IAAIL,KAAK,KAAK,IAAI,EAAE;QAChB,OAAO,MAAM;MACjB;MAEA,OAAO,IAAIM,MAAM,CAACC,OAAO,CAACP,KAAK,CAAC,CAC3BI,GAAG,CAAC,CAAC,CAACI,GAAG,EAAER,KAAK,CAAC,KAAK,
|
1
|
+
{"version":3,"names":["serialize","value","toString","Array","isArray","map","join","Object","entries","key","JSON","stringify"],"sourceRoot":"../../../src","sources":["server/serialize.ts"],"mappings":";;AAAA,OAAO,MAAMA,SAAS,GAAIC,KAAU,IAAa;EAC7C,QAAQ,OAAOA,KAAK;IAChB,KAAK,UAAU;MACX,OAAOA,KAAK,CAACC,QAAQ,CAAC,CAAC;IAC3B,KAAK,QAAQ;MACT,IAAIC,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,EAAE;QACtB,OAAO,IAAIA,KAAK,CAACI,GAAG,CAACL,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAAC,GAAG;MAChD;MAEA,IAAIL,KAAK,KAAK,IAAI,EAAE;QAChB,OAAO,MAAM;MACjB;MAEA,OAAO,IAAIM,MAAM,CAACC,OAAO,CAACP,KAAK,CAAC,CAC3BI,GAAG,CAAC,CAAC,CAACI,GAAG,EAAER,KAAK,CAAC,KAAK,IAAIQ,GAAG,KAAKT,SAAS,CAACC,KAAK,CAAC,EAAE,CAAC,CACrDK,IAAI,CAAC,GAAG,CAAC,GAAG;IACrB;MACI,OAAOI,IAAI,CAACC,SAAS,CAACV,KAAK,CAAC;EACpC;AACJ,CAAC","ignoreList":[]}
|
@@ -16,8 +16,8 @@ HybridShadowRegistry.add = (handle, styles) => {
|
|
16
16
|
}
|
17
17
|
const stylesArray = Array.isArray(styles) ? styles.flat() : [styles];
|
18
18
|
|
19
|
-
// filter
|
20
|
-
const filteredStyles = stylesArray.filter(style =>
|
19
|
+
// filter styles that are undefined or with no keys
|
20
|
+
const filteredStyles = stylesArray.filter(style => style && Object.keys(style).length > 0).flat().filter(Boolean);
|
21
21
|
if (filteredStyles.length > 0) {
|
22
22
|
HybridShadowRegistry.link(findShadowNodeForHandle(handle), filteredStyles);
|
23
23
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["NitroModules","HybridShadowRegistry","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","_viewRef","viewRef","current","_nativeRef","Error","elementType","add","styles","stylesArray","Array","isArray","flat","filteredStyles","filter","style","
|
1
|
+
{"version":3,"names":["NitroModules","HybridShadowRegistry","createHybridObject","findShadowNodeForHandle","handle","node","__internalInstanceHandle","stateNode","getScrollResponder","getNativeScrollRef","_viewRef","viewRef","current","_nativeRef","Error","elementType","add","styles","stylesArray","Array","isArray","flat","filteredStyles","filter","style","Object","keys","length","Boolean","link","remove","unlink","UnistylesShadowRegistry"],"sourceRoot":"../../../../src","sources":["specs/ShadowRegistry/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AAezD,MAAMC,oBAAoB,GAAGD,YAAY,CAACE,kBAAkB,CAAiB,yBAAyB,CAAC;AAEvG,MAAMC,uBAAuB,GAAIC,MAAkB,IAAK;EACpD,MAAMC,IAAI,GAAGD,MAAM,EAAEE,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACvDD,MAAM,EAAEI,kBAAkB,GAAG,CAAC,EAAEC,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACjGD,MAAM,EAAEK,kBAAkB,GAAG,CAAC,EAAEH,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACzED,MAAM,EAAEM,QAAQ,EAAEJ,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IAC3DD,MAAM,EAAEO,OAAO,EAAEC,OAAO,EAAEN,wBAAwB,EAAEC,SAAS,EAAEF,IAAI,IACnED,MAAM,EAAES,UAAU,EAAEP,wBAAwB,EAAEC,SAAS,EAAEF,IAAI;EAEpE,IAAI,CAACA,IAAI,EAAE;IACP,MAAM,IAAIS,KAAK,CAAC,4EAA4EV,MAAM,EAAEE,wBAAwB,EAAES,WAAW,IAAI,SAAS,EAAE,CAAC;EAC7J;EAEA,OAAOV,IAAI;AACf,CAAC;AAEDJ,oBAAoB,CAACe,GAAG,GAAG,CAACZ,MAAM,EAAEa,MAAM,KAAK;EAC3C;EACA,IAAI,CAACb,MAAM,IAAI,CAACa,MAAM,EAAE;IACpB;EACJ;EAEA,MAAMC,WAAW,GAAGC,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,GACnCA,MAAM,CAACI,IAAI,CAAC,CAAC,GACb,CAACJ,MAAM,CAAC;;EAEd;EACA,MAAMK,cAAc,GAAGJ,WAAW,CAC7BK,MAAM,CAACC,KAAK,IAAIA,KAAK,IAAIC,MAAM,CAACC,IAAI,CAACF,KAAK,CAAC,CAACG,MAAM,GAAG,CAAC,CAAC,CACvDN,IAAI,CAAC,CAAC,CACNE,MAAM,CAACK,OAAO,CAAC;EAEpB,IAAIN,cAAc,CAACK,MAAM,GAAG,CAAC,EAAE;IAC3B1B,oBAAoB,CAAC4B,IAAI,CAAC1B,uBAAuB,CAACC,MAAM,CAAC,EAAEkB,cAAc,CAAC;EAC9E;AACJ,CAAC;AAEDrB,oBAAoB,CAAC6B,MAAM,GAAG1B,MAAM,IAAI;EACpC,IAAI,CAACA,MAAM,EAAE;IACT;EACJ;EAEAH,oBAAoB,CAAC8B,MAAM,CAAC5B,uBAAuB,CAACC,MAAM,CAAC,CAAC;AAChE,CAAC;AAQD,OAAO,MAAM4B,uBAAuB,GAAG/B,oBAA4D","ignoreList":[]}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { UnistylesWeb } from '../index';
|
4
|
+
import { isServer } from './common';
|
5
|
+
export const createUnistylesRef = (classNames, forwardedRef) => {
|
6
|
+
const storedRef = {
|
7
|
+
current: null
|
8
|
+
};
|
9
|
+
return isServer() ? undefined : ref => {
|
10
|
+
if (!ref) {
|
11
|
+
UnistylesWeb.shadowRegistry.remove(storedRef, classNames?.hash);
|
12
|
+
}
|
13
|
+
storedRef.current = ref;
|
14
|
+
UnistylesWeb.shadowRegistry.add(ref, classNames?.hash);
|
15
|
+
if (typeof forwardedRef === 'function') {
|
16
|
+
return forwardedRef(ref);
|
17
|
+
}
|
18
|
+
if (forwardedRef) {
|
19
|
+
forwardedRef.current = ref;
|
20
|
+
}
|
21
|
+
};
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=createUnistylesRef.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["UnistylesWeb","isServer","createUnistylesRef","classNames","forwardedRef","storedRef","current","undefined","ref","shadowRegistry","remove","hash","add"],"sourceRoot":"../../../../src","sources":["web/utils/createUnistylesRef.ts"],"mappings":";;AAEA,SAASA,YAAY,QAAQ,UAAU;AACvC,SAASC,QAAQ,QAAQ,UAAU;AAMnC,OAAO,MAAMC,kBAAkB,GAAGA,CAAIC,UAAuB,EAAEC,YAAoC,KAAK;EACpG,MAAMC,SAAS,GAAG;IAAEC,OAAO,EAAE;EAAoB,CAAC;EAElD,OAAOL,QAAQ,CAAC,CAAC,GAAGM,SAAS,GAAIC,GAAgB,IAAK;IAClD,IAAI,CAACA,GAAG,EAAE;MACNR,YAAY,CAACS,cAAc,CAACC,MAAM,CAACL,SAAS,EAAEF,UAAU,EAAEQ,IAAI,CAAC;IACnE;IAEAN,SAAS,CAACC,OAAO,GAAGE,GAAG;IACvBR,YAAY,CAACS,cAAc,CAACG,GAAG,CAACJ,GAAG,EAAEL,UAAU,EAAEQ,IAAI,CAAC;IAEtD,IAAI,OAAOP,YAAY,KAAK,UAAU,EAAE;MACpC,OAAOA,YAAY,CAACI,GAAG,CAAC;IAC5B;IAEA,IAAIJ,YAAY,EAAE;MACdA,YAAY,CAACE,OAAO,GAAGE,GAAG;IAC9B;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["web/utils/index.ts"],"mappings":";;AAAA,cAAc,UAAU;AACxB,cAAc,YAAY","ignoreList":[]}
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["web/utils/index.ts"],"mappings":";;AAAA,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,sBAAsB","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../../src/components/native/Image.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../../src/components/native/Image.tsx"],"names":[],"mappings":"AAmCA,eAAO,MAAM,KAAK,KAAuD,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Image.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/native/Image.native.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,KAAsC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ImageBackground.d.ts","sourceRoot":"","sources":["../../../../../src/components/native/ImageBackground.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"ImageBackground.d.ts","sourceRoot":"","sources":["../../../../../src/components/native/ImageBackground.tsx"],"names":[],"mappings":"AAyCA,eAAO,MAAM,eAAe,KAA2E,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Pressable.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/native/Pressable.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAA;AAElE,OAAO,KAAK,EAAE,cAAc,IAAI,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAwBjE,eAAO,MAAM,SAAS;eAnBP,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"Pressable.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/native/Pressable.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAA;AAElE,OAAO,KAAK,EAAE,cAAc,IAAI,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAwBjE,eAAO,MAAM,SAAS;eAnBP,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;8BAoF7C,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createUnistylesElement.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesElement.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,sBAAsB,cAAe,GAAG,
|
1
|
+
{"version":3,"file":"createUnistylesElement.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesElement.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,sBAAsB,cAAe,GAAG,QAiBpD,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createUnistylesElement.native.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesElement.native.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,sBAAsB,cAAe,GAAG,
|
1
|
+
{"version":3,"file":"createUnistylesElement.native.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesElement.native.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,sBAAsB,cAAe,GAAG,QA0CpD,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createUnistylesImageBackground.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesImageBackground.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAS,eAAe,EAAwB,MAAM,cAAc,CAAA;AAMhF,eAAO,MAAM,8BAA8B,cAAe,OAAO,eAAe,
|
1
|
+
{"version":3,"file":"createUnistylesImageBackground.d.ts","sourceRoot":"","sources":["../../../../src/core/createUnistylesImageBackground.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAS,eAAe,EAAwB,MAAM,cAAc,CAAA;AAMhF,eAAO,MAAM,8BAA8B,cAAe,OAAO,eAAe,QAqD/E,CAAA"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare const passForwardedRef: <T>(
|
2
|
+
export declare const passForwardedRef: <T>(ref: T, forwardedRef: React.ForwardedRef<T>, onMount?: () => void, onUnmount?: () => void) => () => void;
|
3
3
|
//# sourceMappingURL=passForwardRef.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"passForwardRef.d.ts","sourceRoot":"","sources":["../../../../src/core/passForwardRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"passForwardRef.d.ts","sourceRoot":"","sources":["../../../../src/core/passForwardRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,gBAAgB,GAAI,CAAC,OACzB,CAAC,gBACQ,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,YACzB,MAAM,IAAI,cACR,MAAM,IAAI,eAqBzB,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE/D,UAAU,cAAe,SAAQ,2BAA2B;IAExD,GAAG,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IACzD,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAElC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IACvD,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAC/B,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,cAAc,IAAI,MAAM,GAAG,SAAS,CAAA;CACvC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/specs/ShadowRegistry/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE/D,UAAU,cAAe,SAAQ,2BAA2B;IAExD,GAAG,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IACzD,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAElC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IACvD,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAC/B,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,cAAc,IAAI,MAAM,GAAG,SAAS,CAAA;CACvC;AAgDD,KAAK,cAAc,GACb,KAAK,GACL,QAAQ,GACR,MAAM,GACN,QAAQ,CAAA;AAEd,eAAO,MAAM,uBAAuB,EAA2B,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type React from 'react';
|
2
|
+
import type { Nullable } from '../../types';
|
3
|
+
type ClassNames = {
|
4
|
+
hash: string;
|
5
|
+
};
|
6
|
+
export declare const createUnistylesRef: <T>(classNames?: ClassNames, forwardedRef?: React.ForwardedRef<T>) => ((ref: Nullable<T>) => void) | undefined;
|
7
|
+
export {};
|
8
|
+
//# sourceMappingURL=createUnistylesRef.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createUnistylesRef.d.ts","sourceRoot":"","sources":["../../../../../src/web/utils/createUnistylesRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAI3C,KAAK,UAAU,GAAG;IACd,IAAI,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,CAAC,eAAe,UAAU,iBAAiB,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,YAGzD,QAAQ,CAAC,CAAC,CAAC,sBAgBpD,CAAA"}
|