diff --git a/CHANGELOG.md b/CHANGELOG.md index 915f9a8..8b9b1b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +## [0.3.1](https://github.com/hphoeksma/theme.cssvariables/compare/0.3.0...0.3.1) - 2026-11-19 + +### Changed + +- Backend module JS rebuilt with React 19 (mounted with `createRoot`) and Babel 8. sass-loader 17 and auto-changelog 2 in the build. No change in behaviour. +- style-loader removed from the build: the stylesheet was already extracted to `main.css`. + ## [0.3.0](https://github.com/hphoeksma/theme.cssvariables/compare/0.2.3...0.3.0) - 2026-11-19 ### Added diff --git a/Resources/Private/Scripts/module.js b/Resources/Private/Scripts/module.js index 342ca37..3edafc5 100644 --- a/Resources/Private/Scripts/module.js +++ b/Resources/Private/Scripts/module.js @@ -1,4 +1,4 @@ -import ReactDOM from 'react-dom' +import { createRoot } from 'react-dom/client' import React, { useEffect, useState, useRef } from 'react' import {SketchPicker} from 'react-color' @@ -65,6 +65,6 @@ window.addEventListener('DOMContentLoaded', () => { document.querySelectorAll('.react__placeholder--color-picker').forEach(el => { const color = el.getAttribute('data-color') const targetId = el.getAttribute('data-target') - ReactDOM.render(, el) + createRoot(el).render() }) }) diff --git a/Resources/Public/main.js b/Resources/Public/main.js index cedcf5d..5326535 100644 --- a/Resources/Public/main.js +++ b/Resources/Public/main.js @@ -1,3 +1,3 @@ /*! For license information please see main.js.LICENSE.txt */ -(()=>{var e={529(e,t,n){"use strict";var r=n.cw((e,t)=>{var n,r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",r({viewBox:"0 0 24 24",style:r({fill:n,width:i,height:u},c)},f),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}}),o=n.cw((e,t)=>{var n,r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",r({viewBox:"0 0 24 24",style:r({fill:n,width:i,height:u},c)},f),o.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}}),a=()=>n(3215),i=n.cw(e=>{var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u{var n=c(),r=i(),o=y();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n