aotrautils 0.0.1144 → 0.0.1145

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- /*utils COMMONS library associated with aotra version : «1_29072022-2359 (19/03/2025-02:52:46)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (19/03/2025-03:00:14)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4939,26 +4939,24 @@ function restoreGraph(flatData, keepClassName=false, UUID_ATTR_NAME, CLASSNAME_A
4939
4939
 
4940
4940
  const objData = flatData[id];
4941
4941
  const className = objData[CLASSNAME_ATTR_NAME];
4942
- //const instance = Array.isArray(objData.value) ? [] : instanciate(className);
4943
- const instance = instanciate(className);
4942
+ const newInstance = instanciate(className);
4944
4943
 
4945
- restoredObjects[id]=instance; // Assign ID early to handle circular references
4944
+ restoredObjects[id]=newInstance; // Assign ID early to handle circular references
4946
4945
 
4947
4946
  foreach(objData,(item,indexOrKey)=>{
4948
4947
  if(typeof(item)==="undefined" || item==null){
4949
- instance[POINTER_TO_ATTR_NAME]=null;
4948
+ newInstance[indexOrKey]=null;
4950
4949
  }else{
4951
4950
  const isRef = (!isPrimitive(item) && (POINTER_TO_ATTR_NAME in item));
4952
4951
  const attrName=item[POINTER_TO_ATTR_NAME];
4953
- instance[indexOrKey] = isRef ? revive(attrName, keepClassName, restoredObjects) : item/*Case primitev or null*/;
4952
+ newInstance[indexOrKey] = isRef ? revive(attrName, keepClassName, restoredObjects) : item/*Case primitev or null*/;
4954
4953
  }
4955
4954
  },(item,indexOrKey)=> (
4956
4955
  !contains([UUID_ATTR_NAME,POINTER_TO_ATTR_NAME],indexOrKey)
4957
4956
  && (keepClassName && indexOrKey===CLASSNAME_ATTR_NAME) || indexOrKey!==CLASSNAME_ATTR_NAME)
4958
4957
  );
4959
4958
 
4960
- delete instance[UUID_ATTR_NAME];
4961
- return instance;
4959
+ return newInstance;
4962
4960
  }
4963
4961
 
4964
4962
  return revive(ROOT_UUID, keepClassName);
@@ -5246,7 +5244,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
5246
5244
 
5247
5245
 
5248
5246
 
5249
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (19/03/2025-02:52:46)»*/
5247
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (19/03/2025-03:00:14)»*/
5250
5248
  /*-----------------------------------------------------------------------------*/
5251
5249
  /* ## Utility global methods in a browser (htmljs) client environment.
5252
5250
  *
@@ -13818,7 +13816,7 @@ getAORTACClient=function(clientId=getUUID(), serverNodeOrigin="ws://127.0.0.1:40
13818
13816
 
13819
13817
 
13820
13818
 
13821
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (19/03/2025-02:52:46)»*/
13819
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (19/03/2025-03:00:14)»*/
13822
13820
  /*-----------------------------------------------------------------------------*/
13823
13821
 
13824
13822
 
@@ -15057,7 +15055,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
15057
15055
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
15058
15056
 
15059
15057
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
15060
- /*utils AI library associated with aotra version : «1_29072022-2359 (19/03/2025-02:52:46)»*/
15058
+ /*utils AI library associated with aotra version : «1_29072022-2359 (19/03/2025-03:00:14)»*/
15061
15059
  /*-----------------------------------------------------------------------------*/
15062
15060
 
15063
15061
 
@@ -15201,7 +15199,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
15201
15199
 
15202
15200
 
15203
15201
 
15204
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (19/03/2025-02:52:46)»*/
15202
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (19/03/2025-03:00:14)»*/
15205
15203
  /*-----------------------------------------------------------------------------*/
15206
15204
 
15207
15205
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.1144",
3
+ "version": "0.0.1145",
4
4
  "main": "aotrautils.build.js",
5
5
  "description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",