@wordpress/interactivity
Advanced tools
Comparing version 2.3.3 to 2.4.0
@@ -1,2 +0,2 @@ | ||
import { createElement, Fragment } from "@wordpress/element"; | ||
import { createElement, Fragment } from "react"; | ||
/** | ||
@@ -3,0 +3,0 @@ * External dependencies |
@@ -1,2 +0,2 @@ | ||
import { createElement } from "@wordpress/element"; | ||
import { createElement } from "react"; | ||
/** | ||
@@ -3,0 +3,0 @@ * External dependencies |
@@ -1,2 +0,2 @@ | ||
import { createElement } from "@wordpress/element"; | ||
import { createElement } from "react"; | ||
/** | ||
@@ -3,0 +3,0 @@ * External dependencies |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = void 0; | ||
var _element = require("@wordpress/element"); | ||
var _react = require("react"); | ||
var _hooks = require("preact/hooks"); | ||
@@ -57,3 +57,3 @@ var _deepsignal = require("deepsignal"); | ||
}, [newContext, inheritedValue]); | ||
return (0, _element.createElement)(Provider, { | ||
return (0, _react.createElement)(Provider, { | ||
value: currentValue.current | ||
@@ -289,3 +289,3 @@ }, children); | ||
const cached = (0, _hooks.useMemo)(() => innerHTML, []); | ||
return (0, _element.createElement)(Type, { | ||
return (0, _react.createElement)(Type, { | ||
dangerouslySetInnerHTML: { | ||
@@ -330,3 +330,3 @@ __html: cached | ||
if (position === 'before') { | ||
return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_slots.Slot, { | ||
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_slots.Slot, { | ||
name: name | ||
@@ -336,3 +336,3 @@ }), children); | ||
if (position === 'after') { | ||
return (0, _element.createElement)(_element.Fragment, null, children, (0, _element.createElement)(_slots.Slot, { | ||
return (0, _react.createElement)(_react.Fragment, null, children, (0, _react.createElement)(_slots.Slot, { | ||
name: name | ||
@@ -342,3 +342,3 @@ })); | ||
if (position === 'replace') { | ||
return (0, _element.createElement)(_slots.Slot, { | ||
return (0, _react.createElement)(_slots.Slot, { | ||
name: name | ||
@@ -348,3 +348,3 @@ }, children); | ||
if (position === 'children') { | ||
element.props.children = (0, _element.createElement)(_slots.Slot, { | ||
element.props.children = (0, _react.createElement)(_slots.Slot, { | ||
name: name | ||
@@ -374,3 +374,3 @@ }, element.props.children); | ||
}); | ||
return (0, _element.createElement)(_slots.Fill, { | ||
return (0, _react.createElement)(_slots.Fill, { | ||
slot: slot | ||
@@ -387,3 +387,3 @@ }, children); | ||
} | ||
}) => (0, _element.createElement)(_slots.SlotProvider, null, children), { | ||
}) => (0, _react.createElement)(_slots.SlotProvider, null, children), { | ||
priority: 4 | ||
@@ -390,0 +390,0 @@ }); |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.directive = void 0; | ||
var _element = require("@wordpress/element"); | ||
var _react = require("react"); | ||
var _preact = require("preact"); | ||
@@ -189,3 +189,3 @@ var _hooks = require("preact/hooks"); | ||
// Recursively render the wrapper for the next priority level. | ||
const children = nextPriorityLevels.length > 0 ? (0, _element.createElement)(Directives, { | ||
const children = nextPriorityLevels.length > 0 ? (0, _react.createElement)(Directives, { | ||
directives: directives, | ||
@@ -192,0 +192,0 @@ priorityLevels: nextPriorityLevels, |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.SlotProvider = exports.Slot = exports.Fill = void 0; | ||
var _element = require("@wordpress/element"); | ||
var _react = require("react"); | ||
var _preact = require("preact"); | ||
@@ -45,3 +45,3 @@ var _hooks = require("preact/hooks"); | ||
// https://github.com/luisherranz/deepsignal/pull/38 | ||
(0, _element.createElement)(slotsContext.Provider, { | ||
(0, _react.createElement)(slotsContext.Provider, { | ||
value: (0, _signals.signal)({}) | ||
@@ -48,0 +48,0 @@ }, children) |
@@ -5,2 +5,4 @@ <!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. --> | ||
## 2.4.0 (2023-10-05) | ||
## 2.3.0 (2023-09-20) | ||
@@ -7,0 +9,0 @@ |
{ | ||
"name": "@wordpress/interactivity", | ||
"version": "2.3.3", | ||
"version": "2.4.0", | ||
"description": "Package that provides a standard and simple way to handle the frontend interactivity of Gutenberg blocks.", | ||
@@ -35,3 +35,3 @@ "author": "The WordPress Contributors", | ||
}, | ||
"gitHead": "6256f93c37705d142f75a99f1fc808540ca7dca8" | ||
"gitHead": "9b8e598c5418d38fe72197c24ef1d3dd6c712151" | ||
} |
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
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
819529