@stylix/core 3.1.2 → 4.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/README.md +1 -1
- package/dist/index.js +853 -28
- package/dist/index.js.map +1 -1
- package/dist/module.mjs +828 -0
- package/dist/module.mjs.map +1 -0
- package/dist/types.d.ts +161 -28
- package/dist/types.d.ts.map +1 -0
- package/package.json +25 -28
- package/dist/Stylix.d.ts +0 -3
- package/dist/Stylix.js +0 -66
- package/dist/Stylix.js.map +0 -1
- package/dist/StylixProvider.d.ts +0 -52
- package/dist/StylixProvider.js +0 -139
- package/dist/StylixProvider.js.map +0 -1
- package/dist/applyRules.d.ts +0 -5
- package/dist/applyRules.js +0 -31
- package/dist/applyRules.js.map +0 -1
- package/dist/classifyProps.d.ts +0 -7
- package/dist/classifyProps.js +0 -35
- package/dist/classifyProps.js.map +0 -1
- package/dist/css-props.json +0 -413
- package/dist/html-tags.json +0 -119
- package/dist/index.d.ts +0 -8
- package/dist/plugins/cleanStyles.d.ts +0 -5
- package/dist/plugins/cleanStyles.js +0 -28
- package/dist/plugins/cleanStyles.js.map +0 -1
- package/dist/plugins/customProps.d.ts +0 -2
- package/dist/plugins/customProps.js +0 -61
- package/dist/plugins/customProps.js.map +0 -1
- package/dist/plugins/defaultUnits.d.ts +0 -7
- package/dist/plugins/defaultUnits.js +0 -41
- package/dist/plugins/defaultUnits.js.map +0 -1
- package/dist/plugins/flattenNestedStyles.d.ts +0 -5
- package/dist/plugins/flattenNestedStyles.js +0 -47
- package/dist/plugins/flattenNestedStyles.js.map +0 -1
- package/dist/plugins/index.d.ts +0 -30
- package/dist/plugins/index.js +0 -44
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/mediaArrays.d.ts +0 -5
- package/dist/plugins/mediaArrays.js +0 -56
- package/dist/plugins/mediaArrays.js.map +0 -1
- package/dist/plugins/merge$css.d.ts +0 -6
- package/dist/plugins/merge$css.js +0 -45
- package/dist/plugins/merge$css.js.map +0 -1
- package/dist/plugins/propCasing.d.ts +0 -5
- package/dist/plugins/propCasing.js +0 -21
- package/dist/plugins/propCasing.js.map +0 -1
- package/dist/plugins/replace$$class.d.ts +0 -5
- package/dist/plugins/replace$$class.js +0 -20
- package/dist/plugins/replace$$class.js.map +0 -1
- package/dist/plugins/themeFunctions.d.ts +0 -5
- package/dist/plugins/themeFunctions.js +0 -20
- package/dist/plugins/themeFunctions.js.map +0 -1
- package/dist/styleCollector.d.ts +0 -8
- package/dist/styleCollector.js +0 -36
- package/dist/styleCollector.js.map +0 -1
- package/dist/stylesToRuleArray.d.ts +0 -5
- package/dist/stylesToRuleArray.js +0 -41
- package/dist/stylesToRuleArray.js.map +0 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/dist/useStyles.d.ts +0 -16
- package/dist/useStyles.js +0 -115
- package/dist/useStyles.js.map +0 -1
- package/dist/util/cloneDeep.d.ts +0 -4
- package/dist/util/cloneDeep.js +0 -28
- package/dist/util/cloneDeep.js.map +0 -1
- package/dist/util/flatten.d.ts +0 -4
- package/dist/util/flatten.js +0 -19
- package/dist/util/flatten.js.map +0 -1
- package/dist/util/hashString.d.ts +0 -4
- package/dist/util/hashString.js +0 -15
- package/dist/util/hashString.js.map +0 -1
- package/dist/util/isPlainObject.d.ts +0 -4
- package/dist/util/isPlainObject.js +0 -11
- package/dist/util/isPlainObject.js.map +0 -1
- package/dist/util/mapObjectRecursive.d.ts +0 -8
- package/dist/util/mapObjectRecursive.js +0 -37
- package/dist/util/mapObjectRecursive.js.map +0 -1
- package/dist/util/merge.d.ts +0 -5
- package/dist/util/merge.js +0 -31
- package/dist/util/merge.js.map +0 -1
- package/dist/util/useIsoLayoutEffect.d.ts +0 -2
- package/dist/util/useIsoLayoutEffect.js +0 -8
- package/dist/util/useIsoLayoutEffect.js.map +0 -1
- package/dist/util/walkRecursive.d.ts +0 -8
- package/dist/util/walkRecursive.js +0 -26
- package/dist/util/walkRecursive.js.map +0 -1
package/dist/util/cloneDeep.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cloneDeep = void 0;
|
|
4
|
-
const isPlainObject_1 = require("./isPlainObject");
|
|
5
|
-
/**
|
|
6
|
-
* Deeply clones a value.
|
|
7
|
-
*/
|
|
8
|
-
function cloneDeep(value) {
|
|
9
|
-
if (!value || typeof value !== 'object')
|
|
10
|
-
return value;
|
|
11
|
-
if (Array.isArray(value)) {
|
|
12
|
-
const clone = [];
|
|
13
|
-
for (let index = 0; index < value.length; ++index) {
|
|
14
|
-
clone.push(cloneDeep(value[index]));
|
|
15
|
-
}
|
|
16
|
-
return clone;
|
|
17
|
-
}
|
|
18
|
-
if (isPlainObject_1.isPlainObject(value)) {
|
|
19
|
-
const clone = {};
|
|
20
|
-
for (const key in value) {
|
|
21
|
-
clone[key] = cloneDeep(value[key]);
|
|
22
|
-
}
|
|
23
|
-
return clone;
|
|
24
|
-
}
|
|
25
|
-
return value;
|
|
26
|
-
}
|
|
27
|
-
exports.cloneDeep = cloneDeep;
|
|
28
|
-
//# sourceMappingURL=cloneDeep.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloneDeep.js","sourceRoot":"","sources":["../../src/util/cloneDeep.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAEhD;;GAEG;AACH,SAAgB,SAAS,CAAI,KAAQ;IACnC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE;YACjD,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SACrC;QACD,OAAO,KAAK,CAAC;KACd;IACD,IAAI,6BAAa,CAAC,KAAK,CAAC,EAAE;QACxB,MAAM,KAAK,GAAQ,EAAE,CAAC;QACtB,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;YACvB,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;SACpC;QACD,OAAO,KAAK,CAAC;KACd;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAjBD,8BAiBC"}
|
package/dist/util/flatten.d.ts
DELETED
package/dist/util/flatten.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flatten = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Flatten an array recursively.
|
|
6
|
-
*/
|
|
7
|
-
function flatten(array) {
|
|
8
|
-
const result = [];
|
|
9
|
-
_flatten(array, result);
|
|
10
|
-
return result;
|
|
11
|
-
}
|
|
12
|
-
exports.flatten = flatten;
|
|
13
|
-
function _flatten(array, result) {
|
|
14
|
-
for (let i = 0; i < array.length; i++) {
|
|
15
|
-
const value = array[i];
|
|
16
|
-
Array.isArray(value) ? _flatten(value, result) : result.push(value);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=flatten.js.map
|
package/dist/util/flatten.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flatten.js","sourceRoot":"","sources":["../../src/util/flatten.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,SAAgB,OAAO,CAAa,KAAgB;IAClD,MAAM,MAAM,GAAc,EAAE,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACxB,OAAO,MAAsB,CAAC;AAChC,CAAC;AAJD,0BAIC;AAED,SAAS,QAAQ,CAAC,KAAgB,EAAE,MAAiB;IACnD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACvB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAY,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC5E;AACH,CAAC"}
|
package/dist/util/hashString.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hashString = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Cheap string hashing, suitable for generating css class names
|
|
6
|
-
*/
|
|
7
|
-
function hashString(str) {
|
|
8
|
-
let hash = 5381;
|
|
9
|
-
let i = str.length;
|
|
10
|
-
while (i)
|
|
11
|
-
hash = (hash * 33) ^ str.charCodeAt(--i);
|
|
12
|
-
return 'stylix-' + (hash >>> 0).toString(36);
|
|
13
|
-
}
|
|
14
|
-
exports.hashString = hashString;
|
|
15
|
-
//# sourceMappingURL=hashString.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hashString.js","sourceRoot":"","sources":["../../src/util/hashString.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,SAAgB,UAAU,CAAC,GAAG;IAC5B,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;IACnB,OAAO,CAAC;QAAE,IAAI,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IACnD,OAAO,SAAS,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC/C,CAAC;AALD,gCAKC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPlainObject = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Indicates that an object is most likely just an object literal.
|
|
6
|
-
*/
|
|
7
|
-
function isPlainObject(obj) {
|
|
8
|
-
return typeof obj === 'object' && (obj === null || obj === void 0 ? void 0 : obj.__proto__) === Object.prototype;
|
|
9
|
-
}
|
|
10
|
-
exports.isPlainObject = isPlainObject;
|
|
11
|
-
//# sourceMappingURL=isPlainObject.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isPlainObject.js","sourceRoot":"","sources":["../../src/util/isPlainObject.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,SAAgB,aAAa,CAAC,GAAQ;IACpC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,MAAK,MAAM,CAAC,SAAS,CAAC;AACxE,CAAC;AAFD,sCAEC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Invokes `map` on each key/value pair in `object`. The key/value pair is deleted from the object and replaced by
|
|
3
|
-
* merging in the object returned from `map`. Recursively descends into all object and array values.
|
|
4
|
-
* The `map` function will receive the key, the value, the current object being mapped, and a context object.
|
|
5
|
-
* The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to
|
|
6
|
-
* `map` on child properties of `value`.
|
|
7
|
-
*/
|
|
8
|
-
export declare function mapObjectRecursive(object: any, map: (key: string | number, value: any, object: any, context: any) => Record<string | number, any>, context?: any): {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapObjectRecursive = void 0;
|
|
4
|
-
const isPlainObject_1 = require("./isPlainObject");
|
|
5
|
-
/**
|
|
6
|
-
* Invokes `map` on each key/value pair in `object`. The key/value pair is deleted from the object and replaced by
|
|
7
|
-
* merging in the object returned from `map`. Recursively descends into all object and array values.
|
|
8
|
-
* The `map` function will receive the key, the value, the current object being mapped, and a context object.
|
|
9
|
-
* The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to
|
|
10
|
-
* `map` on child properties of `value`.
|
|
11
|
-
*/
|
|
12
|
-
function mapObjectRecursive(object, map, context = {}) {
|
|
13
|
-
const clone = Array.isArray(object) ? [] : {};
|
|
14
|
-
for (const k of Object.keys(object)) {
|
|
15
|
-
let key = k;
|
|
16
|
-
const value = object[key];
|
|
17
|
-
if (Array.isArray(object))
|
|
18
|
-
key = +key;
|
|
19
|
-
const contextClone = Object.assign({}, context);
|
|
20
|
-
let result = map(key, value, object, contextClone);
|
|
21
|
-
if (typeof result !== 'undefined' && typeof result !== 'object' && !Array.isArray(result))
|
|
22
|
-
throw new Error('mapObjectRecursive: return value of map function must be undefined, object, or array!');
|
|
23
|
-
if (typeof result === 'undefined') {
|
|
24
|
-
result = { [key]: value };
|
|
25
|
-
}
|
|
26
|
-
for (const kk in result) {
|
|
27
|
-
let value = result[kk];
|
|
28
|
-
if (isPlainObject_1.isPlainObject(value) || Array.isArray(value))
|
|
29
|
-
value = mapObjectRecursive(value, map, contextClone);
|
|
30
|
-
if (typeof value !== 'undefined')
|
|
31
|
-
clone[kk] = value;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return clone;
|
|
35
|
-
}
|
|
36
|
-
exports.mapObjectRecursive = mapObjectRecursive;
|
|
37
|
-
//# sourceMappingURL=mapObjectRecursive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mapObjectRecursive.js","sourceRoot":"","sources":["../../src/util/mapObjectRecursive.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAEhD;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAChC,MAAW,EACX,GAKiC,EACjC,UAAe,EAAE;IAEjB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAE9C,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QACnC,IAAI,GAAG,GAAoB,CAAC,CAAC;QAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAE1B,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,GAAG,GAAG,CAAC,GAAG,CAAC;QACtC,MAAM,YAAY,qBAAQ,OAAO,CAAE,CAAC;QACpC,IAAI,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QACnD,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YACvF,MAAM,IAAI,KAAK,CACb,uFAAuF,CACxF,CAAC;QACJ,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC;SAC3B;QACD,KAAK,MAAM,EAAE,IAAI,MAAM,EAAE;YACvB,IAAI,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;YACvB,IAAI,6BAAa,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC9C,KAAK,GAAG,kBAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;YACvD,IAAI,OAAO,KAAK,KAAK,WAAW;gBAAE,KAAK,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;SACrD;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAnCD,gDAmCC"}
|
package/dist/util/merge.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function merge<A>(a?: A): A;
|
|
2
|
-
export declare function merge<A, B>(a: A, b: B): A & B;
|
|
3
|
-
export declare function merge<A, B, C>(a: A, b: B, c: C): A & B & C;
|
|
4
|
-
export declare function merge<A, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;
|
|
5
|
-
export declare function merge<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E;
|
package/dist/util/merge.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.merge = void 0;
|
|
4
|
-
const isPlainObject_1 = require("./isPlainObject");
|
|
5
|
-
function merge(...items) {
|
|
6
|
-
items = items.filter((item) => typeof item !== 'undefined' && item !== null);
|
|
7
|
-
if (!(items === null || items === void 0 ? void 0 : items.length))
|
|
8
|
-
return undefined;
|
|
9
|
-
if (items.length === 1)
|
|
10
|
-
return items[0];
|
|
11
|
-
// If items are not all objects/arrays, return the last object/array if possible, otherwise last non-undefined value
|
|
12
|
-
if (!items.every((item) => Array.isArray(item) || isPlainObject_1.isPlainObject(item))) {
|
|
13
|
-
items.reverse();
|
|
14
|
-
return (items.find((item) => Array.isArray(item) || isPlainObject_1.isPlainObject(item)) ||
|
|
15
|
-
items.find((item) => typeof item !== 'undefined'));
|
|
16
|
-
}
|
|
17
|
-
const merged = Array.isArray(items[0]) ? [] : {};
|
|
18
|
-
for (const item of items) {
|
|
19
|
-
if (!Array.isArray(item) && !isPlainObject_1.isPlainObject(item))
|
|
20
|
-
return merged;
|
|
21
|
-
const keys = [...Object.keys(item), ...Object.getOwnPropertySymbols(item)];
|
|
22
|
-
for (const key of keys) {
|
|
23
|
-
const result = merge(merged[key], item[key]);
|
|
24
|
-
if (typeof result !== 'undefined')
|
|
25
|
-
merged[key] = result;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return merged;
|
|
29
|
-
}
|
|
30
|
-
exports.merge = merge;
|
|
31
|
-
//# sourceMappingURL=merge.js.map
|
package/dist/util/merge.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/util/merge.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAQhD,SAAgB,KAAK,CAAC,GAAG,KAAwB;IAC/C,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,IAAI,CAAC,CAAC;IAC7E,IAAI,EAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,CAAA;QAAE,OAAO,SAAS,CAAC;IAErC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IAExC,oHAAoH;IACpH,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,6BAAa,CAAC,IAAI,CAAC,CAAC,EAAE;QACtE,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,OAAO,CACL,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,6BAAa,CAAC,IAAI,CAAC,CAAC;YAChE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,WAAW,CAAC,CAClD,CAAC;KACH;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,6BAAa,CAAC,IAAI,CAAC;YAAE,OAAO,MAAM,CAAC;QAEhE,MAAM,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3E,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7C,IAAI,OAAO,MAAM,KAAK,WAAW;gBAAE,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;SACzD;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AA1BD,sBA0BC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const react_1 = require("react");
|
|
4
|
-
const useIsoLayoutEffect = typeof window !== 'undefined'
|
|
5
|
-
? (fn, deps, runOnSsr) => react_1.useLayoutEffect(fn, deps)
|
|
6
|
-
: (fn, deps, runOnSsr) => (runOnSsr ? fn() : null);
|
|
7
|
-
exports.default = useIsoLayoutEffect;
|
|
8
|
-
//# sourceMappingURL=useIsoLayoutEffect.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsoLayoutEffect.js","sourceRoot":"","sources":["../../src/util/useIsoLayoutEffect.ts"],"names":[],"mappings":";;AAAA,iCAAwC;AAExC,MAAM,kBAAkB,GACtB,OAAO,MAAM,KAAK,WAAW;IAC3B,CAAC,CAAC,CAAC,EAA6B,EAAE,IAAW,EAAE,QAAiB,EAAE,EAAE,CAAC,uBAAe,CAAC,EAAE,EAAE,IAAI,CAAC;IAC9F,CAAC,CAAC,CAAC,EAAoB,EAAE,IAAW,EAAE,QAAiB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAEzF,kBAAe,kBAAkB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Invokes a callback for each key/value pair in `object`, and continues recursively on each value that is an array or a
|
|
3
|
-
* plain object. Returns `object`.
|
|
4
|
-
* The `cb` function will receive the key, the value, the current object being mapped, and a context object.
|
|
5
|
-
* The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to
|
|
6
|
-
* `map` on child properties of `value`.
|
|
7
|
-
*/
|
|
8
|
-
export declare function walkRecursive<T = any>(object: T, cb: (key: string, value: any, currentObject: any, context: any) => void, context?: any): T;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.walkRecursive = void 0;
|
|
4
|
-
const cloneDeep_1 = require("./cloneDeep");
|
|
5
|
-
const isPlainObject_1 = require("./isPlainObject");
|
|
6
|
-
/**
|
|
7
|
-
* Invokes a callback for each key/value pair in `object`, and continues recursively on each value that is an array or a
|
|
8
|
-
* plain object. Returns `object`.
|
|
9
|
-
* The `cb` function will receive the key, the value, the current object being mapped, and a context object.
|
|
10
|
-
* The context object is a plain object that you can modify as needed. The value will persist to subsequent calls to
|
|
11
|
-
* `map` on child properties of `value`.
|
|
12
|
-
*/
|
|
13
|
-
function walkRecursive(object, cb, context) {
|
|
14
|
-
const keys = Object.keys(object);
|
|
15
|
-
for (const key of keys) {
|
|
16
|
-
const value = object[key];
|
|
17
|
-
cb(key, value, object, context);
|
|
18
|
-
if (Array.isArray(value) || isPlainObject_1.isPlainObject(value)) {
|
|
19
|
-
const contextClone = cloneDeep_1.cloneDeep(context);
|
|
20
|
-
walkRecursive(value, cb, contextClone);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return object;
|
|
24
|
-
}
|
|
25
|
-
exports.walkRecursive = walkRecursive;
|
|
26
|
-
//# sourceMappingURL=walkRecursive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"walkRecursive.js","sourceRoot":"","sources":["../../src/util/walkRecursive.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,mDAAgD;AAEhD;;;;;;GAMG;AACH,SAAgB,aAAa,CAC3B,MAAS,EACT,EAAuE,EACvE,OAAa;IAEb,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAChC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,6BAAa,CAAC,KAAK,CAAC,EAAE;YAChD,MAAM,YAAY,GAAG,qBAAS,CAAC,OAAO,CAAC,CAAC;YACxC,aAAa,CAAC,KAAK,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC;SACxC;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAfD,sCAeC"}
|