@wordpress/interactivity
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -1,5 +0,7 @@ | ||
import { createElement } from "react"; | ||
/* @jsx createElement */ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { h as createElement } from 'preact'; | ||
import { useContext, useMemo, useRef } from 'preact/hooks'; | ||
@@ -6,0 +8,0 @@ import { deepSignal, peek } from 'deepsignal'; |
@@ -1,6 +0,7 @@ | ||
import { createElement } from "react"; | ||
/* @jsx createElement */ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { h, options, createContext, cloneElement } from 'preact'; | ||
import { h as createElement, options, createContext, cloneElement } from 'preact'; | ||
import { useRef, useCallback, useContext } from 'preact/hooks'; | ||
@@ -281,3 +282,3 @@ /** | ||
type: vnode.type, | ||
element: h(vnode.type, props), | ||
element: createElement(vnode.type, props), | ||
top: true | ||
@@ -284,0 +285,0 @@ }; |
/** | ||
* External dependencies | ||
*/ | ||
import { h } from 'preact'; | ||
import { h as createElement } from 'preact'; | ||
import type { VNode, Context, RefObject } from 'preact'; | ||
@@ -51,3 +51,3 @@ interface DirectiveEntry { | ||
ref: RefObject<HTMLElement>; | ||
attributes: h.JSX.HTMLAttributes; | ||
attributes: createElement.JSX.HTMLAttributes; | ||
} | ||
@@ -81,3 +81,3 @@ interface Evaluate { | ||
ref: HTMLElement; | ||
attributes: h.JSX.HTMLAttributes<EventTarget>; | ||
attributes: createElement.JSX.HTMLAttributes<EventTarget>; | ||
}>; | ||
@@ -84,0 +84,0 @@ export declare const getScope: () => Scope; |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = require("react"); | ||
var _preact = require("preact"); | ||
var _hooks = require("preact/hooks"); | ||
@@ -14,2 +14,4 @@ var _deepsignal = require("deepsignal"); | ||
var _hooks2 = require("./hooks"); | ||
/* @jsx createElement */ | ||
/** | ||
@@ -112,3 +114,3 @@ * External dependencies | ||
}, [inheritedValue, ...passedValues]); | ||
return (0, _react.createElement)(Provider, { | ||
return (0, _preact.h)(Provider, { | ||
value: currentValue.current | ||
@@ -315,3 +317,3 @@ }, children); | ||
const cached = (0, _hooks.useMemo)(() => innerHTML, []); | ||
return (0, _react.createElement)(Type, { | ||
return (0, _preact.h)(Type, { | ||
dangerouslySetInnerHTML: { | ||
@@ -391,3 +393,3 @@ __html: cached | ||
})(eachKey[0]) : item; | ||
return (0, _react.createElement)(Provider, { | ||
return (0, _preact.h)(Provider, { | ||
value: mergedContext, | ||
@@ -394,0 +396,0 @@ key: key |
@@ -7,6 +7,7 @@ "use strict"; | ||
exports.setScope = exports.setNamespace = exports.resetScope = exports.resetNamespace = exports.getScope = exports.getNamespace = exports.getEvaluate = exports.getElement = exports.getContext = exports.directive = void 0; | ||
var _react = require("react"); | ||
var _preact = require("preact"); | ||
var _hooks = require("preact/hooks"); | ||
var _store = require("./store"); | ||
/* @jsx createElement */ | ||
/** | ||
@@ -256,3 +257,3 @@ * External dependencies | ||
// Recursively render the wrapper for the next priority level. | ||
const children = nextPriorityLevels.length > 0 ? (0, _react.createElement)(Directives, { | ||
const children = nextPriorityLevels.length > 0 ? (0, _preact.h)(Directives, { | ||
directives: directives, | ||
@@ -259,0 +260,0 @@ priorityLevels: nextPriorityLevels, |
@@ -5,2 +5,8 @@ <!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. --> | ||
## 4.0.1 (2024-01-31) | ||
### Bug Fixes | ||
- Ensure Preact is used in published packages ([58258](https://github.com/WordPress/gutenberg/pull/58258). | ||
## 4.0.0 (2024-01-24) | ||
@@ -7,0 +13,0 @@ |
{ | ||
"name": "@wordpress/interactivity", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Package that provides a standard and simple way to handle the frontend interactivity of Gutenberg blocks.", | ||
@@ -36,3 +36,3 @@ "author": "The WordPress Contributors", | ||
}, | ||
"gitHead": "45de2cb4212fed7f2763e95f10300d1ff9d0ec08" | ||
"gitHead": "fefb6f718fbfd5df9390f366d5733369f613084a" | ||
} |
@@ -0,4 +1,7 @@ | ||
/* @jsx createElement */ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { h as createElement } from 'preact'; | ||
import { useContext, useMemo, useRef } from 'preact/hooks'; | ||
@@ -5,0 +8,0 @@ import { deepSignal, peek } from 'deepsignal'; |
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
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
928451
4742