@@ -2,7 +2,7 @@ class AssetBrowserV2 {
22 constructor ( ) {
33 console . log ( "[AssetBrowserV2]" ) ;
44 this . sessionPayloadBytesLimit = 1024 * 1024 ;
5- document . title = "Asset Browser V2" ;
5+ document . title = "Asset Manager V2" ;
66 document . body . dataset . toolId = "asset-browser-v2" ;
77 this . urlState = this . readUrlState ( ) ;
88 this . goBack = this . goBack . bind ( this ) ;
@@ -24,7 +24,7 @@ class AssetBrowserV2 {
2424
2525 openSvgAssetStudioV2 ( ) {
2626 if ( ! this . urlState . hostContextId ) {
27- this . renderMissing ( "No hostContextId is available for launch. Re-open Asset Browser V2 from a valid Tool V2 session link." ) ;
27+ this . renderMissing ( "No hostContextId is available for launch. Re-open Asset Manager V2 from a valid Tool V2 session link." ) ;
2828 return ;
2929 }
3030 const targetUrl = this . buildToolUrl ( "svg-asset-studio-v2" ) ;
@@ -51,7 +51,7 @@ class AssetBrowserV2 {
5151 }
5252
5353 toolLabel ( toolId ) {
54- if ( toolId === "asset-browser-v2" ) return "Asset Browser V2" ;
54+ if ( toolId === "asset-browser-v2" ) return "Asset Manager V2" ;
5555 if ( toolId === "palette-manager-v2" ) return "Palette Manager V2" ;
5656 if ( toolId === "svg-asset-studio-v2" ) return "SVG Asset Studio V2" ;
5757 if ( toolId === "tilemap-studio-v2" ) return "Tilemap Studio V2" ;
@@ -62,7 +62,7 @@ class AssetBrowserV2 {
6262
6363 renderNavigation ( ) {
6464 const sourceLabel = this . toolLabel ( this . urlState . fromTool ) || "Workspace V2" ;
65- document . getElementById ( "assetBrowserV2Breadcrumb" ) . textContent = `Workspace V2 -> ${ sourceLabel } -> Asset Browser V2` ;
65+ document . getElementById ( "assetBrowserV2Breadcrumb" ) . textContent = `Workspace V2 -> ${ sourceLabel } -> Asset Manager V2` ;
6666 document . getElementById ( "assetBrowserV2BackButton" ) . textContent = `Back to ${ sourceLabel } ` ;
6767 }
6868
@@ -129,7 +129,7 @@ class AssetBrowserV2 {
129129 console . log ( "[SESSION_CONTEXT_READ]" ) ;
130130 try {
131131 if ( ! this . urlState . hostContextId ) {
132- this . renderMissing ( "No hostContextId was provided. Re-open Asset Browser V2 from a valid Tool V2 session link." ) ;
132+ this . renderMissing ( "No hostContextId was provided. Re-open Asset Manager V2 from a valid Tool V2 session link." ) ;
133133 return ;
134134 }
135135 const serializedSession = window . sessionStorage . getItem (
@@ -138,7 +138,7 @@ class AssetBrowserV2 {
138138 if (
139139 ! serializedSession
140140 ) {
141- this . renderMissing ( "No session data was found for the provided hostContextId. Re-open Asset Browser V2 from the tools index or a host flow that creates the session context first." ) ;
141+ this . renderMissing ( "No session data was found for the provided hostContextId. Re-open Asset Manager V2 from the tools index or a host flow that creates the session context first." ) ;
142142 return ;
143143 }
144144 if ( serializedSession . length > this . sessionPayloadBytesLimit ) {
@@ -149,7 +149,7 @@ class AssetBrowserV2 {
149149 JSON . parse ( serializedSession )
150150 ) ;
151151 } catch ( error ) {
152- const runtimeMessage = `Unable to read Asset Browser V2 session context: ${ error instanceof Error ? error . message : "unknown error" } ` ;
152+ const runtimeMessage = `Unable to read Asset Manager V2 session context: ${ error instanceof Error ? error . message : "unknown error" } ` ;
153153 this . logStructuredError ( "RUNTIME" , runtimeMessage , { hostContextId : this . urlState . hostContextId || "" } ) ;
154154 this . renderError ( runtimeMessage ) ;
155155 }
@@ -167,31 +167,31 @@ class AssetBrowserV2 {
167167 return ;
168168 }
169169 if ( typeof versionCheck . payload . toolId !== "string" || versionCheck . payload . toolId . trim ( ) !== "asset-browser-v2" ) {
170- this . renderError ( "Asset Browser V2 session data is invalid. Expected toolId 'asset-browser-v2'." ) ;
170+ this . renderError ( "Asset Manager V2 session data is invalid. Expected toolId 'asset-browser-v2'." ) ;
171171 return ;
172172 }
173173 if ( ! versionCheck . payload . payloadJson || typeof versionCheck . payload . payloadJson !== "object" || Array . isArray ( versionCheck . payload . payloadJson ) ) {
174- this . renderError ( "Asset Browser V2 session data is invalid. Expected payloadJson only." ) ;
174+ this . renderError ( "Asset Manager V2 session data is invalid. Expected payloadJson only." ) ;
175175 return ;
176176 }
177177 if ( ! versionCheck . payload . payloadJson . assetCatalog || typeof versionCheck . payload . payloadJson . assetCatalog !== "object" || Array . isArray ( versionCheck . payload . payloadJson . assetCatalog ) ) {
178- this . renderError ( "Asset Browser V2 session data is invalid. Expected payloadJson.assetCatalog." ) ;
178+ this . renderError ( "Asset Manager V2 session data is invalid. Expected payloadJson.assetCatalog." ) ;
179179 return ;
180180 }
181181 if ( typeof versionCheck . payload . payloadJson . importName === "string" || typeof versionCheck . payload . payloadJson . importDestination === "string" ) {
182- this . renderError ( "Asset Browser V2 session data is invalid. Remove payloadJson.importName/importDestination. Load assets from payloadJson.assetCatalog only." ) ;
182+ this . renderError ( "Asset Manager V2 session data is invalid. Remove payloadJson.importName/importDestination. Load assets from payloadJson.assetCatalog only." ) ;
183183 return ;
184184 }
185185 this . renderCatalog ( versionCheck . payload . payloadJson . assetCatalog , versionCheck . payload ) ;
186186 }
187187
188188 renderCatalog ( assetCatalog , sessionContext ) {
189189 if ( typeof assetCatalog . name !== "string" || ! assetCatalog . name . trim ( ) ) {
190- this . renderError ( "Asset Browser V2 session data is invalid. Expected assetCatalog.name." ) ;
190+ this . renderError ( "Asset Manager V2 session data is invalid. Expected assetCatalog.name." ) ;
191191 return ;
192192 }
193193 if ( ! Array . isArray ( assetCatalog . entries ) ) {
194- this . renderError ( "Asset Browser V2 session data is invalid. Expected assetCatalog.entries[]." ) ;
194+ this . renderError ( "Asset Manager V2 session data is invalid. Expected assetCatalog.entries[]." ) ;
195195 return ;
196196 }
197197 if (
@@ -210,7 +210,7 @@ class AssetBrowserV2 {
210210 ! entry . path . trim ( )
211211 )
212212 ) {
213- this . renderError ( "Asset Browser V2 session data is invalid. Every entry requires id, label, kind, and path." ) ;
213+ this . renderError ( "Asset Manager V2 session data is invalid. Every entry requires id, label, kind, and path." ) ;
214214 return ;
215215 }
216216
@@ -220,10 +220,10 @@ class AssetBrowserV2 {
220220 document . getElementById ( "assetBrowserV2Title" ) . textContent = assetCatalog . name . trim ( ) ;
221221 document . getElementById ( "assetBrowserV2Count" ) . textContent = `${ assetCatalog . entries . length } asset${ assetCatalog . entries . length === 1 ? "" : "s" } ` ;
222222 document . getElementById ( "assetBrowserV2State" ) . textContent = assetCatalog . entries . length === 0
223- ? "Asset Browser V2 loaded a valid session asset catalog with zero entries."
224- : "Asset Browser V2 loaded the session asset catalog." ;
223+ ? "Asset Manager V2 loaded a valid session asset catalog with zero entries."
224+ : "Asset Manager V2 loaded the session asset catalog." ;
225225 if ( assetCatalog . entries . length === 0 ) {
226- document . getElementById ( "assetBrowserV2EmptyState" ) . textContent = "Asset catalog is valid but empty. Add assets to payloadJson.assetCatalog.entries and relaunch Asset Browser V2." ;
226+ document . getElementById ( "assetBrowserV2EmptyState" ) . textContent = "Asset catalog is valid but empty. Add assets to payloadJson.assetCatalog.entries and relaunch Asset Manager V2." ;
227227 document . getElementById ( "assetBrowserV2EmptyState" ) . hidden = false ;
228228 } else {
229229 document . getElementById ( "assetBrowserV2EmptyState" ) . hidden = true ;
@@ -279,10 +279,10 @@ class AssetBrowserV2 {
279279 this . logStructuredError ( "INVALID" , message , { hostContextId : this . urlState . hostContextId || "" } ) ;
280280 document . getElementById ( "assetBrowserV2SessionReadout" ) . textContent = "Session: read attempted" ;
281281 document . getElementById ( "assetBrowserV2ContractReadout" ) . textContent = "payloadJson.assetCatalog invalid" ;
282- document . getElementById ( "assetBrowserV2WorkspaceReadout" ) . textContent = "Workspace writes are disabled for invalid Asset Browser V2 session data." ;
283- document . getElementById ( "assetBrowserV2Title" ) . textContent = "Asset Browser V2 error" ;
282+ document . getElementById ( "assetBrowserV2WorkspaceReadout" ) . textContent = "Workspace writes are disabled for invalid Asset Manager V2 session data." ;
283+ document . getElementById ( "assetBrowserV2Title" ) . textContent = "Asset Manager V2 error" ;
284284 document . getElementById ( "assetBrowserV2Count" ) . textContent = "0 assets" ;
285- document . getElementById ( "assetBrowserV2InvalidState" ) . textContent = `${ message } Re-open Asset Browser V2 from a host session that provides payloadJson.assetCatalog.` ;
285+ document . getElementById ( "assetBrowserV2InvalidState" ) . textContent = `${ message } Re-open Asset Manager V2 from a host session that provides payloadJson.assetCatalog.` ;
286286 document . getElementById ( "assetBrowserV2EmptyState" ) . hidden = true ;
287287 document . getElementById ( "assetBrowserV2InvalidState" ) . hidden = false ;
288288 document . getElementById ( "assetBrowserV2ValidState" ) . hidden = true ;
0 commit comments