@enact/core 5.0.0-alpha.4 → 5.0.0-beta.1

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  The following is a curated list of changes in the Enact core module, newest changes on the top.
4
4
 
5
+ ## [5.0.0-alpha.5] - 2025-04-04
6
+
7
+ No significant changes.
8
+
9
+ ## [4.9.6] - 2025-03-27
10
+
11
+ No significant changes.
12
+
5
13
  ## [5.0.0-alpha.4] - 2025-01-21
6
14
 
7
15
  ### Changed
@@ -54,7 +54,7 @@ describe('Registry', function () {
54
54
  }, {
55
55
  key: "render",
56
56
  value: function render() {
57
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SomeContext.Provider, {
57
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SomeContext, {
58
58
  value: this.registry.register,
59
59
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("button", _objectSpread(_objectSpread({}, this.props), {}, {
60
60
  onClick: this.handleClick,
@@ -6,18 +6,20 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = exports.WithRef = void 0;
7
7
  var _react = require("react");
8
8
  var _jsxRuntime = require("react/jsx-runtime");
9
- var _excluded = ["data-withref-id", "outermostRef", "referrerName"];
9
+ var _excluded = ["data-withref-id", "outermostRef", "ref", "referrerName"];
10
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
12
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
16
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
15
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
16
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
17
17
  var WithRef = exports.WithRef = function WithRef(WrappedComponent) {
18
- var HoC = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
18
+ var HoC = function HoC(props) {
19
19
  var givenId = props['data-withref-id'],
20
20
  outermostRef = props.outermostRef,
21
+ _props$ref = props.ref,
22
+ ref = _props$ref === void 0 ? null : _props$ref,
21
23
  referrerName = props.referrerName,
22
24
  rest = _objectWithoutProperties(props, _excluded);
23
25
  var divRef = (0, _react.useRef)();
@@ -53,7 +55,7 @@ var WithRef = exports.WithRef = function WithRef(WrappedComponent) {
53
55
  }
54
56
  })]
55
57
  });
56
- });
58
+ };
57
59
  HoC.displayName = 'WithRef';
58
60
  return HoC;
59
61
  };
package/kind/kind.js CHANGED
@@ -168,7 +168,7 @@ var kind = exports.kind = function kind(config) {
168
168
  // removed.
169
169
  if (functional) {
170
170
  Component = function Component(props) {
171
- var ctx = (0, _react.useContext)(contextType);
171
+ var ctx = (0, _react.use)(contextType);
172
172
  var boundHandlers = (0, _useHandlers["default"])(handlers, props, ctx);
173
173
  var merged = _objectSpread(_objectSpread({}, props), boundHandlers);
174
174
  return renderKind(merged, ctx);
@@ -22,8 +22,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
22
22
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
23
23
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
24
24
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
25
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
26
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
25
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
26
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
27
27
  describe('kind', function () {
28
28
  var TestContext = /*#__PURE__*/(0, _react2.createContext)({
29
29
  value: 'initial'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enact/core",
3
- "version": "5.0.0-alpha.4",
3
+ "version": "5.0.0-beta.1",
4
4
  "description": "Enact is an open source JavaScript framework containing everything you need to create a fast, scalable mobile or web application.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.platform = exports.parseUserAgent = exports.detect = exports["default"] = void 0;
7
7
  var _deprecate = _interopRequireDefault(require("../internal/deprecate"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
- /* global globalThis */
10
9
  /**
11
10
  * Utilities for detecting basic platform capabilities.
12
11
  *
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _platform = require("../platform");
4
- /* global globalThis */
5
-
6
4
  describe('platform', function () {
7
5
  describe('parseUserAgent for User-Agent Reduction', function () {
8
6
  var testVersion = '113';