@wix/editor-react-components 1.2392.0 → 1.2394.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.
|
@@ -1365,18 +1365,18 @@ function composeContextScopes(...scopes) {
|
|
|
1365
1365
|
createScope.scopeName = baseScope.scopeName;
|
|
1366
1366
|
return createScope;
|
|
1367
1367
|
}
|
|
1368
|
-
function setRef
|
|
1368
|
+
function setRef(ref, value) {
|
|
1369
1369
|
if (typeof ref === "function") {
|
|
1370
1370
|
return ref(value);
|
|
1371
1371
|
} else if (ref !== null && ref !== void 0) {
|
|
1372
1372
|
ref.current = value;
|
|
1373
1373
|
}
|
|
1374
1374
|
}
|
|
1375
|
-
function composeRefs
|
|
1375
|
+
function composeRefs(...refs) {
|
|
1376
1376
|
return (node) => {
|
|
1377
1377
|
let hasCleanup = false;
|
|
1378
1378
|
const cleanups = refs.map((ref) => {
|
|
1379
|
-
const cleanup = setRef
|
|
1379
|
+
const cleanup = setRef(ref, node);
|
|
1380
1380
|
if (!hasCleanup && typeof cleanup == "function") {
|
|
1381
1381
|
hasCleanup = true;
|
|
1382
1382
|
}
|
|
@@ -1389,15 +1389,15 @@ function composeRefs$2(...refs) {
|
|
|
1389
1389
|
if (typeof cleanup == "function") {
|
|
1390
1390
|
cleanup();
|
|
1391
1391
|
} else {
|
|
1392
|
-
setRef
|
|
1392
|
+
setRef(refs[i], null);
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
1395
|
};
|
|
1396
1396
|
}
|
|
1397
1397
|
};
|
|
1398
1398
|
}
|
|
1399
|
-
function useComposedRefs
|
|
1400
|
-
return React.useCallback(composeRefs
|
|
1399
|
+
function useComposedRefs(...refs) {
|
|
1400
|
+
return React.useCallback(composeRefs(...refs), refs);
|
|
1401
1401
|
}
|
|
1402
1402
|
// @__NO_SIDE_EFFECTS__
|
|
1403
1403
|
function createSlot$2(ownerName) {
|
|
@@ -1431,7 +1431,7 @@ function createSlotClone$2(ownerName) {
|
|
|
1431
1431
|
const childrenRef = getElementRef$3(children);
|
|
1432
1432
|
const props2 = mergeProps$2(slotProps, children.props);
|
|
1433
1433
|
if (children.type !== React.Fragment) {
|
|
1434
|
-
props2.ref = forwardedRef ? composeRefs
|
|
1434
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
1435
1435
|
}
|
|
1436
1436
|
return React.cloneElement(children, props2);
|
|
1437
1437
|
}
|
|
@@ -1502,7 +1502,7 @@ function createCollection(name) {
|
|
|
1502
1502
|
(props, forwardedRef) => {
|
|
1503
1503
|
const { scope, children } = props;
|
|
1504
1504
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
1505
|
-
const composedRefs = useComposedRefs
|
|
1505
|
+
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
1506
1506
|
return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });
|
|
1507
1507
|
}
|
|
1508
1508
|
);
|
|
@@ -1514,7 +1514,7 @@ function createCollection(name) {
|
|
|
1514
1514
|
(props, forwardedRef) => {
|
|
1515
1515
|
const { scope, children, ...itemData } = props;
|
|
1516
1516
|
const ref = React__default.useRef(null);
|
|
1517
|
-
const composedRefs = useComposedRefs
|
|
1517
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
1518
1518
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
1519
1519
|
React__default.useEffect(() => {
|
|
1520
1520
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
@@ -1544,40 +1544,6 @@ function createCollection(name) {
|
|
|
1544
1544
|
createCollectionScope2
|
|
1545
1545
|
];
|
|
1546
1546
|
}
|
|
1547
|
-
function setRef$1(ref, value) {
|
|
1548
|
-
if (typeof ref === "function") {
|
|
1549
|
-
return ref(value);
|
|
1550
|
-
} else if (ref !== null && ref !== void 0) {
|
|
1551
|
-
ref.current = value;
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
function composeRefs$1(...refs) {
|
|
1555
|
-
return (node) => {
|
|
1556
|
-
let hasCleanup = false;
|
|
1557
|
-
const cleanups = refs.map((ref) => {
|
|
1558
|
-
const cleanup = setRef$1(ref, node);
|
|
1559
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
1560
|
-
hasCleanup = true;
|
|
1561
|
-
}
|
|
1562
|
-
return cleanup;
|
|
1563
|
-
});
|
|
1564
|
-
if (hasCleanup) {
|
|
1565
|
-
return () => {
|
|
1566
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
1567
|
-
const cleanup = cleanups[i];
|
|
1568
|
-
if (typeof cleanup == "function") {
|
|
1569
|
-
cleanup();
|
|
1570
|
-
} else {
|
|
1571
|
-
setRef$1(refs[i], null);
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
};
|
|
1575
|
-
}
|
|
1576
|
-
};
|
|
1577
|
-
}
|
|
1578
|
-
function useComposedRefs$1(...refs) {
|
|
1579
|
-
return React.useCallback(composeRefs$1(...refs), refs);
|
|
1580
|
-
}
|
|
1581
1547
|
function composeEventHandlers$1(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
1582
1548
|
return function handleEvent(event) {
|
|
1583
1549
|
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
|
@@ -1686,7 +1652,7 @@ function createSlotClone$1(ownerName) {
|
|
|
1686
1652
|
const childrenRef = getElementRef$2(children);
|
|
1687
1653
|
const props2 = mergeProps$1(slotProps, children.props);
|
|
1688
1654
|
if (children.type !== React.Fragment) {
|
|
1689
|
-
props2.ref = forwardedRef ? composeRefs
|
|
1655
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
1690
1656
|
}
|
|
1691
1657
|
return React.cloneElement(children, props2);
|
|
1692
1658
|
}
|
|
@@ -1779,40 +1745,6 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
1779
1745
|
}
|
|
1780
1746
|
var useLayoutEffect2$1 = (globalThis == null ? void 0 : globalThis.document) ? React.useLayoutEffect : () => {
|
|
1781
1747
|
};
|
|
1782
|
-
function setRef(ref, value) {
|
|
1783
|
-
if (typeof ref === "function") {
|
|
1784
|
-
return ref(value);
|
|
1785
|
-
} else if (ref !== null && ref !== void 0) {
|
|
1786
|
-
ref.current = value;
|
|
1787
|
-
}
|
|
1788
|
-
}
|
|
1789
|
-
function composeRefs(...refs) {
|
|
1790
|
-
return (node) => {
|
|
1791
|
-
let hasCleanup = false;
|
|
1792
|
-
const cleanups = refs.map((ref) => {
|
|
1793
|
-
const cleanup = setRef(ref, node);
|
|
1794
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
1795
|
-
hasCleanup = true;
|
|
1796
|
-
}
|
|
1797
|
-
return cleanup;
|
|
1798
|
-
});
|
|
1799
|
-
if (hasCleanup) {
|
|
1800
|
-
return () => {
|
|
1801
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
1802
|
-
const cleanup = cleanups[i];
|
|
1803
|
-
if (typeof cleanup == "function") {
|
|
1804
|
-
cleanup();
|
|
1805
|
-
} else {
|
|
1806
|
-
setRef(refs[i], null);
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
};
|
|
1810
|
-
}
|
|
1811
|
-
};
|
|
1812
|
-
}
|
|
1813
|
-
function useComposedRefs(...refs) {
|
|
1814
|
-
return React.useCallback(composeRefs(...refs), refs);
|
|
1815
|
-
}
|
|
1816
1748
|
// @__NO_SIDE_EFFECTS__
|
|
1817
1749
|
function createSlot(ownerName) {
|
|
1818
1750
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -2287,7 +2219,7 @@ var AccordionImpl = React__default.forwardRef(
|
|
|
2287
2219
|
(props, forwardedRef) => {
|
|
2288
2220
|
const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props;
|
|
2289
2221
|
const accordionRef = React__default.useRef(null);
|
|
2290
|
-
const composedRefs = useComposedRefs
|
|
2222
|
+
const composedRefs = useComposedRefs(accordionRef, forwardedRef);
|
|
2291
2223
|
const getItems = useCollection(__scopeAccordion);
|
|
2292
2224
|
const direction = useDirection(dir);
|
|
2293
2225
|
const isDirectionLTR = direction === "ltr";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2394.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@wix/design-system-illustrations": "^2.19.0",
|
|
82
82
|
"@wix/sdk": "^1.21.13",
|
|
83
83
|
"@wix/services-manager-react": "^0.1.27",
|
|
84
|
-
"@wix/site-ui": "1.
|
|
84
|
+
"@wix/site-ui": "1.175.0",
|
|
85
85
|
"@wix/video": "^1.85.0",
|
|
86
86
|
"@wix/viewer-service-consent-policy": "^1.0.100",
|
|
87
87
|
"@wix/web-bi-logger": "^2.1.26",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"@wix/astro": "^2.63.0",
|
|
116
116
|
"@wix/business-tools": "^1.0.225",
|
|
117
117
|
"@wix/cli": "^1.1.230",
|
|
118
|
-
"@wix/cli-app": "1.1.
|
|
118
|
+
"@wix/cli-app": "^1.1.227",
|
|
119
119
|
"@wix/component-protocol": "^1.245.0",
|
|
120
120
|
"@wix/components-infra": "^1.0.0",
|
|
121
121
|
"@wix/design-system": "^1.297.0",
|
|
@@ -195,5 +195,5 @@
|
|
|
195
195
|
"registry": "https://registry.npmjs.org/",
|
|
196
196
|
"access": "public"
|
|
197
197
|
},
|
|
198
|
-
"falconPackageHash": "
|
|
198
|
+
"falconPackageHash": "f41146c8d73767a66b462e6baa0c76c7a9b0526f1e4cb0223c4824c2"
|
|
199
199
|
}
|