react-wrap-balancer
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -32,3 +32,4 @@ var __create = Object.create; | ||
var import_react = __toESM(require("react")); | ||
var DO_BALANCE = Symbol.for("__wrap_balancer__"); | ||
var SYMBOL_KEY = "__wrap_balancer__"; | ||
var DO_BALANCE = Symbol.for(SYMBOL_KEY); | ||
var IS_SERVER = typeof window === "undefined"; | ||
@@ -69,3 +70,3 @@ var useIsomorphicLayoutEffect = IS_SERVER ? import_react.default.useEffect : import_react.default.useLayoutEffect; | ||
useIsomorphicLayoutEffect(() => { | ||
window[Symbol.for("react-balanced")](id); | ||
window[DO_BALANCE](id); | ||
}, [children]); | ||
@@ -75,3 +76,3 @@ import_react.default.useEffect(() => { | ||
const resizeObserver = new ResizeObserver(() => { | ||
window[Symbol.for("react-balanced")](id); | ||
window[DO_BALANCE](id); | ||
}); | ||
@@ -93,3 +94,3 @@ resizeObserver.observe(containerRef.current); | ||
dangerouslySetInnerHTML: { | ||
__html: `window[Symbol.for("__wrap_balancer__")]("${id}")` | ||
__html: `window[Symbol.for("${SYMBOL_KEY}")]("${id}")` | ||
} | ||
@@ -96,0 +97,0 @@ })); |
{ | ||
"name": "react-wrap-balancer", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Better text wrapping.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171
6146