MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / buildChromeProfileAssetStamp

Function buildChromeProfileAssetStamp

packages/client/src/app/AppShell.tsx:218–265  ·  view source on GitHub ↗
(profile: ChromeProfile | null)

Source from the content-addressed store, hash-verified

216}
217
218function buildChromeProfileAssetStamp(profile: ChromeProfile | null): string {
219 if (!profile) {
220 return "";
221 }
222
223 const geometryStamp = [
224 profile.totalWidth,
225 profile.totalHeight,
226 profile.screenX,
227 profile.screenY,
228 profile.screenWidth,
229 profile.screenHeight,
230 profile.contentX,
231 profile.contentY,
232 profile.contentWidth,
233 profile.contentHeight,
234 profile.cornerRadius,
235 ]
236 .map(chromeStampNumber)
237 .join("x");
238 const maskStamp = profile.hasScreenMask ? "mask" : "nomask";
239 const buttonStamp = [...(profile.buttons ?? [])]
240 .sort((left, right) => left.name.localeCompare(right.name))
241 .map((button) =>
242 [
243 chromeStampText(button.name),
244 chromeStampText(button.type),
245 chromeStampText(button.imageName),
246 chromeStampText(button.imageDownName),
247 chromeStampText(button.anchor),
248 chromeStampText(button.align),
249 button.onTop ? "top" : "under",
250 chromeStampNumber(button.x),
251 chromeStampNumber(button.y),
252 chromeStampNumber(button.width),
253 chromeStampNumber(button.height),
254 chromeStampNumber(button.normalOffset?.x),
255 chromeStampNumber(button.normalOffset?.y),
256 chromeStampNumber(button.rolloverOffset?.x),
257 chromeStampNumber(button.rolloverOffset?.y),
258 String(button.usagePage ?? ""),
259 String(button.usage ?? ""),
260 ].join(","),
261 )
262 .join(";");
263
264 return [geometryStamp, maskStamp, buttonStamp].filter(Boolean).join(":");
265}
266
267function shouldUseRemoteStreamDefault(apiRoot: string): boolean {
268 if (apiRoot) {

Callers 1

AppShellFunction · 0.85

Calls 2

chromeStampTextFunction · 0.85
chromeStampNumberFunction · 0.85

Tested by

no test coverage detected