@team-chatt/window-manager
Advanced tools
Comparing version 0.14.1 to 0.14.2
@@ -1165,2 +1165,4 @@ require("./main.css"); | ||
const [state1, dispatch] = $h2LML$react.useReducer($b90f838243d23e43$var$reducer, initialState, $b90f838243d23e43$var$initialize); | ||
const stateRef = $h2LML$react.useRef(state1); | ||
stateRef.current = state1; | ||
// Window actions | ||
@@ -1228,3 +1230,4 @@ const windowActions = (id)=>({ | ||
const createWindow = (id, window)=>{ | ||
if (state1[id] === undefined) dispatch({ | ||
const state = stateRef.current; | ||
if (state[id] === undefined) dispatch({ | ||
type: 'top.create', | ||
@@ -1236,3 +1239,4 @@ id: id, | ||
const destroyWindow = (id)=>{ | ||
if (state1[id] !== undefined) { | ||
const state = stateRef.current; | ||
if (state[id] !== undefined) { | ||
dispatch({ | ||
@@ -1248,3 +1252,4 @@ type: 'top.destroy', | ||
const openWindow = async (id, window)=>{ | ||
if (state1[id] === undefined) { | ||
const state = stateRef.current; | ||
if (state[id] === undefined) { | ||
createWindow(id, window); | ||
@@ -1257,3 +1262,4 @@ setTimeout(()=>{ | ||
const closeWindow = (id)=>{ | ||
if (state1[id] !== undefined) windowActions(id).close(); | ||
const state = stateRef.current; | ||
if (state[id] !== undefined) windowActions(id).close(); | ||
}; | ||
@@ -1260,0 +1266,0 @@ const reset = (state)=>{ |
@@ -1153,2 +1153,4 @@ import "./main.css"; | ||
const [state1, dispatch] = $gjDoi$useReducer($42390536ee9b4627$var$reducer, initialState, $42390536ee9b4627$var$initialize); | ||
const stateRef = $gjDoi$useRef(state1); | ||
stateRef.current = state1; | ||
// Window actions | ||
@@ -1216,3 +1218,4 @@ const windowActions = (id)=>({ | ||
const createWindow = (id, window)=>{ | ||
if (state1[id] === undefined) dispatch({ | ||
const state = stateRef.current; | ||
if (state[id] === undefined) dispatch({ | ||
type: 'top.create', | ||
@@ -1224,3 +1227,4 @@ id: id, | ||
const destroyWindow = (id)=>{ | ||
if (state1[id] !== undefined) { | ||
const state = stateRef.current; | ||
if (state[id] !== undefined) { | ||
dispatch({ | ||
@@ -1236,3 +1240,4 @@ type: 'top.destroy', | ||
const openWindow = async (id, window)=>{ | ||
if (state1[id] === undefined) { | ||
const state = stateRef.current; | ||
if (state[id] === undefined) { | ||
createWindow(id, window); | ||
@@ -1245,3 +1250,4 @@ setTimeout(()=>{ | ||
const closeWindow = (id)=>{ | ||
if (state1[id] !== undefined) windowActions(id).close(); | ||
const state = stateRef.current; | ||
if (state[id] !== undefined) windowActions(id).close(); | ||
}; | ||
@@ -1248,0 +1254,0 @@ const reset = (state)=>{ |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.14.1", | ||
"version": "0.14.2", | ||
"description": "Throwback Windows-XP style react components", | ||
@@ -10,0 +10,0 @@ "source": "src/index.ts", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
289269
2662
0