aotrautils 0.0.1139 → 0.0.1141
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.
- aotrautils/aotrautils.build.js +10 -12
- aotrautils/package.json +1 -1
aotrautils/aotrautils.build.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (19/03/2025-01:
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (19/03/2025-01:39:53)»*/
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
5
5
|
|
6
6
|
|
@@ -4879,16 +4879,15 @@ window.getAsFlatStructure=function(rawObject
|
|
4879
4879
|
};
|
4880
4880
|
|
4881
4881
|
function flattenGraph(root, UUID_ATTR_NAME, CLASSNAME_ATTR_NAME, POINTER_TO_ATTR_NAME) {
|
4882
|
-
const visitedObjects=
|
4882
|
+
const visitedObjects=new WeakMap(); // Prevent infinite loops
|
4883
4883
|
|
4884
4884
|
function process(obj, map, isRoot=false) { // Store objects by ID
|
4885
4885
|
|
4886
4886
|
if(obj === null || isPrimitive(obj)) return obj; // Primitives stay unchanged
|
4887
|
-
|
4888
|
-
if(foundId) return { [POINTER_TO_ATTR_NAME] : foundId }; // Return if already processed
|
4887
|
+
if(visitedObjects.has(obj)) return { [POINTER_TO_ATTR_NAME] : visitedObjects.get(obj) }; // Return if already processed
|
4889
4888
|
|
4890
4889
|
const id = (isRoot?ROOT_UUID:getUUID());
|
4891
|
-
visitedObjects
|
4890
|
+
visitedObjects.set(obj, id); // Mark object as processed
|
4892
4891
|
|
4893
4892
|
const serialized = {
|
4894
4893
|
[UUID_ATTR_NAME]: id,
|
@@ -4903,11 +4902,10 @@ function flattenGraph(root, UUID_ATTR_NAME, CLASSNAME_ATTR_NAME, POINTER_TO_ATTR
|
|
4903
4902
|
serialized[indexOrKey]=item; // Primitives stay unchanged
|
4904
4903
|
return "continue";
|
4905
4904
|
}
|
4906
|
-
|
4907
|
-
if(!foundItemId){
|
4905
|
+
if(!visitedObjects.has(item)){
|
4908
4906
|
process(item, map);
|
4909
4907
|
}
|
4910
|
-
serialized[indexOrKey] = { [POINTER_TO_ATTR_NAME] :
|
4908
|
+
serialized[indexOrKey] = { [POINTER_TO_ATTR_NAME] : visitedObjects.get(item) }; // Return if already processed;
|
4911
4909
|
},(item)=>!isFunction(item));
|
4912
4910
|
|
4913
4911
|
return serialized;
|
@@ -5248,7 +5246,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
5248
5246
|
|
5249
5247
|
|
5250
5248
|
|
5251
|
-
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (19/03/2025-01:
|
5249
|
+
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (19/03/2025-01:39:53)»*/
|
5252
5250
|
/*-----------------------------------------------------------------------------*/
|
5253
5251
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
5254
5252
|
*
|
@@ -13820,7 +13818,7 @@ getAORTACClient=function(clientId=getUUID(), serverNodeOrigin="ws://127.0.0.1:40
|
|
13820
13818
|
|
13821
13819
|
|
13822
13820
|
|
13823
|
-
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (19/03/2025-01:
|
13821
|
+
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (19/03/2025-01:39:53)»*/
|
13824
13822
|
/*-----------------------------------------------------------------------------*/
|
13825
13823
|
|
13826
13824
|
|
@@ -15059,7 +15057,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
15059
15057
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
15060
15058
|
|
15061
15059
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
15062
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (19/03/2025-01:
|
15060
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (19/03/2025-01:39:53)»*/
|
15063
15061
|
/*-----------------------------------------------------------------------------*/
|
15064
15062
|
|
15065
15063
|
|
@@ -15203,7 +15201,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
15203
15201
|
|
15204
15202
|
|
15205
15203
|
|
15206
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (19/03/2025-01:
|
15204
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (19/03/2025-01:39:53)»*/
|
15207
15205
|
/*-----------------------------------------------------------------------------*/
|
15208
15206
|
|
15209
15207
|
|
aotrautils/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "aotrautils",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.1141",
|
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)",
|