Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stylable-components

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylable-components - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

6

dist/hooks/use-element-rect.js

@@ -132,3 +132,4 @@ "use strict";

const cache = (0, react_1.useRef)(new Map());
const [sizes, updateSizes] = (0, react_1.useState)(() => getSizes(ref, data, precomputed, getId, false, cache.current));
const calculatedSize = (0, react_1.useMemo)(() => getSizes(ref, data, precomputed, getId, false, cache.current), [data, getId, precomputed, ref]);
const [sizes, updateSizes] = (0, react_1.useState)(() => calculatedSize);
const delayedUpdateSizes = (0, use_delayed_update_1.useDelayedUpdateState)(updateSizes);

@@ -180,2 +181,5 @@ const { observer, listen } = (0, react_1.useMemo)(createSetableObserver, []);

}, [data, precomputed, getId, shouldMeasure, size, ref, shouldWatchSize, observer]);
if (!shouldMeasure) {
return calculatedSize;
}
return sizes;

@@ -182,0 +186,0 @@ }

9

dist/scroll-list/scroll-list.js

@@ -168,2 +168,7 @@ "use strict";

}
const overlayStyle = {
...innerStyle,
width: '100%',
height: '100%',
};
const listRootWithStyle = (0, exports.forwardListRoot)(listRoot || use_element_slot_1.defaultRoot, {

@@ -177,2 +182,3 @@ style: innerStyle,

} },
react_1.default.createElement(list_1.List, { getId: getId, ItemRenderer: ItemRenderer, listRoot: listRootWithStyle, items: rendereredItems, focusControl: [focused, setFocused], selectionControl: [selected, setSelected], transmitKeyPress: transmitKeyPress }),
overlay ? (react_1.default.createElement(exports.ListOverlaySlot, { slot: overlay, props: {

@@ -182,5 +188,4 @@ itemSizes,

avgSize,
style: innerStyle,
style: overlayStyle,
} })) : null,
react_1.default.createElement(list_1.List, { getId: getId, ItemRenderer: ItemRenderer, listRoot: listRootWithStyle, items: rendereredItems, focusControl: [focused, setFocused], selectionControl: [selected, setSelected], transmitKeyPress: transmitKeyPress }),
react_1.default.createElement("div", { style: {

@@ -187,0 +192,0 @@ height: maxScrollSize + 'px',

{
"name": "stylable-components",
"version": "1.0.5",
"version": "1.0.6",
"description": "React components that use Stylable.",

@@ -27,3 +27,4 @@ "main": "dist/index.js",

"access": "public"
}
},
"gitHead": "20118a38135fd111c6d680c08db656c06f25adda"
}

@@ -150,3 +150,7 @@ import type React from 'react';

const cache = useRef(new Map<string, WatchedSize>());
const [sizes, updateSizes] = useState(() => getSizes(ref, data, precomputed, getId, false, cache.current));
const calculatedSize = useMemo(
() => getSizes(ref, data, precomputed, getId, false, cache.current),
[data, getId, precomputed, ref]
);
const [sizes, updateSizes] = useState(() => calculatedSize);
const delayedUpdateSizes = useDelayedUpdateState(updateSizes);

@@ -199,2 +203,5 @@ const { observer, listen } = useMemo(createSetableObserver, []);

}, [data, precomputed, getId, shouldMeasure, size, ref, shouldWatchSize, observer]);
if (!shouldMeasure) {
return calculatedSize;
}
return sizes;

@@ -201,0 +208,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc